82 lines
2.2 KiB
C++
82 lines
2.2 KiB
C++
#ifndef P12_NETWORKPAGE_H
|
|
#define P12_NETWORKPAGE_H
|
|
|
|
#include <QWidget>
|
|
#include <QStandardItemModel>
|
|
#include <QTableWidget>
|
|
#include <GlobalDefinitions/Variable.h>
|
|
#include <FileOperation/ConfigFiles.h>
|
|
typedef struct tsCsvConfigText // 8位数据类型
|
|
{
|
|
QString FileName;
|
|
/** @brief 是否为bool量 */
|
|
QStringList Type;
|
|
|
|
/** @brief 引脚名称 */
|
|
QStringList PinName;
|
|
|
|
/** @brief 显示引脚的功能文本 */
|
|
QStringList ShowText;
|
|
|
|
/** @brief 如果是bool量,为ture的颜色 */
|
|
QStringList TColor;
|
|
|
|
/** @brief 如果是bool量,为false的颜色 */
|
|
QStringList FColor;
|
|
|
|
/** @brief 绑定的数据节点 */
|
|
QStringList DataNode;
|
|
}_tsCsvConfigText;
|
|
namespace Ui {
|
|
class P12_NetworkPage;
|
|
}
|
|
|
|
class P12_NetworkPage : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit P12_NetworkPage(QWidget *parent = nullptr);
|
|
~P12_NetworkPage();
|
|
void WinInit();
|
|
void TableViewInit( QTableWidget *tw,tsCsvConfigText *CCT);
|
|
void TableViewDataUpdate( QTableWidget *tw,tsCsvConfigText *CCT);
|
|
void UIRefresh_Page0();
|
|
void UIRefresh_Page1();
|
|
void UIRefresh_Page2();
|
|
void UIRefresh_Page3();
|
|
void UIRefresh_Page4();
|
|
void UIRefresh_Page5();
|
|
void UIRefresh_Page6();
|
|
void UIRefresh_Page7();
|
|
void UIRefresh_Page8();
|
|
void UIRefresh_Page9();
|
|
|
|
inline QTableWidgetItem *makeColorItem(const QString &Type,
|
|
const bool Color,
|
|
const QString &colorWhen0,
|
|
const QString &colorWhen1,
|
|
bool editable = false);
|
|
private slots:
|
|
void UIRefreshTimeOut();
|
|
void on_But_Network_0_clicked();
|
|
void on_But_Network_1_clicked();
|
|
void on_But_Network_2_clicked();
|
|
void on_But_Network_3_clicked();
|
|
void on_But_Network_4_clicked();
|
|
void on_But_Network_5_clicked();
|
|
void on_But_Network_6_clicked();
|
|
void on_But_Network_7_clicked();
|
|
void on_But_Network_8_clicked();
|
|
void on_But_Network_9_clicked();
|
|
void on_MainWidget_currentChanged(int arg1);
|
|
|
|
private:
|
|
Ui::P12_NetworkPage *ui;
|
|
|
|
tsCsvConfigText mCsvConfig[9];
|
|
|
|
};
|
|
|
|
#endif // P12_NETWORKPAGE_H
|