103 lines
2.7 KiB
C++
103 lines
2.7 KiB
C++
#ifndef KBDFESPOINTWIDGET_H
|
|
#define KBDFESPOINTWIDGET_H
|
|
|
|
#include <QWidget>
|
|
|
|
class QComboBox;
|
|
class KbdPage;
|
|
class QTabBar;
|
|
class QListWidget;
|
|
class KbdTableModel;
|
|
class QMenu;
|
|
class KbdTreeView;
|
|
class KbdDomModel;
|
|
class QPushButton;
|
|
class QStandardItem;
|
|
class kbdSearchWidget;
|
|
|
|
/**
|
|
* @brief The KbdFesPointWidget class 本类原来是用于展示前置测点,经过改版现在设备和测点一起展示
|
|
*/
|
|
class KbdFesPointWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit KbdFesPointWidget(QWidget *parent = nullptr);
|
|
|
|
private:
|
|
void initLayout();
|
|
QLayout *initLeftDevLayout();
|
|
QLayout *initRightPointLayout();
|
|
void initMenu();
|
|
void initData();
|
|
void initConnet();
|
|
QString getTabDesc(const QString &tableName);//获取TAB标签的描述
|
|
QString getTableXml(const QString &tabText);//根据TAB标签的描述获取对应的xml文件
|
|
QString getTableName(const QString &tabText);//根据TAB标签的描述获取对应的表名
|
|
|
|
KbdTableModel *fesDevModel(const QString &fesDevTag);
|
|
|
|
void getItems(QList<QStandardItem*>& listItem, QStandardItem* item);
|
|
void getWhereSql(QString& whereSql, QStringList& whereArgs);
|
|
void getWhereSqlByCheck(QList<QStandardItem*> listItem, QString& whereSql);
|
|
|
|
void updateDataFromPsc3000(QString csvFile);
|
|
private slots:
|
|
void onLocationAndSubSysTemChange();
|
|
|
|
void onFesDevClicked();
|
|
void onTabBarChange(int index);
|
|
|
|
void onAddDevByNoTemp();//无模板添加设备
|
|
void onModifyDev();
|
|
void onRemoveDev();
|
|
void onImportDataFromPsc3000();
|
|
void onRefreshDev();
|
|
|
|
void onAddFesPoint();
|
|
void onAddDataBlock(QString devTag, QString rtuTag);
|
|
void onAddFesConst(QString devTag, QString rtuTag);
|
|
void onModifyFesPoint();
|
|
void onCopyFesPoint();
|
|
void onModifyDataBlock();
|
|
void onRemoveFesPoint();
|
|
void onRemoveDataBlock();
|
|
|
|
void onBeforeMenuExecute(int row, int column, int menuType, const QString & text);
|
|
void onStartTransactionError(const QString&erroStr);
|
|
void onCommitError();
|
|
void onMsg(const QString &text);
|
|
void onDeleteShortcut();
|
|
void onSortRes1();
|
|
|
|
void onShowLocationChange(bool bShow);
|
|
void onShowRTUChange(bool bShow);
|
|
void onShowDevChange(bool bShow);
|
|
|
|
void onSetCheckEnable(bool checked);
|
|
void onSearch();
|
|
void onChangeShowType();
|
|
|
|
void onSearchTableText(const QString &text);
|
|
private:
|
|
QComboBox *m_cbSubSystem;
|
|
KbdTreeView *m_TreeFesDev;
|
|
KbdDomModel* m_modelFesDev;
|
|
QTabBar *m_tabFesPoint;
|
|
KbdPage *m_pageTable;
|
|
QAction * m_copyAction;
|
|
|
|
QMenu *m_menu;
|
|
QMenu* m_menuShowType;
|
|
bool m_bCheckEnable;
|
|
bool m_bShowLocation;
|
|
bool m_bShowRTU;
|
|
bool m_bShowDev;
|
|
|
|
QPushButton* m_btnSearch;
|
|
kbdSearchWidget* m_tableSearch;
|
|
};
|
|
|
|
|
|
#endif // KBDFESPOINTWIDGET_H
|