PowerModeler/include/attributeView.h

49 lines
1.3 KiB
C++

#ifndef ATTRIBUTEVIEW_H
#define ATTRIBUTEVIEW_H
#include <QWidget>
#include <QTableView>
#include "global.h"
#include "attributeTableModel.h"
#include "attributeTableDelegate.h"
class QVBoxLayout;
class MultiLineHeaderView;
class AttributeView : public QWidget
{
Q_OBJECT
public:
AttributeView(const ModelAttributeGroup& modelAttributeGroup
, QWidget* parent = nullptr
, const QString& connection = ""
, const QString& tableName = "basic.attribute");
~AttributeView();
QTableView* view() const { return m_tableView; }
AttributeTableModel* model() const { return m_attributeTableModel; }
AttributeTableDelegate* delegate() const { return m_attributeTableDelegate; }
void active();
void setEditable(bool);
void syncChangeRecord();
signals:
void showMessage(MessageDialogType,const QString&,const QString&);
private:
QString m_connection;
QString m_attributeTable;
AttributeGroup m_attributeGroup;
ModelAttributeGroup m_modelAttributeGroup;
QTableView* m_tableView;
AttributeTableModel* m_attributeTableModel;
AttributeTableDelegate* m_attributeTableDelegate;
QVBoxLayout* m_vLayout;
MultiLineHeaderView* m_multiLinHeader;
};
#endif //ATTRIBUTEVIEW_H