#ifndef MAINWINDOW_H #define MAINWINDOW_H #include "gutil/qgui.h" #include "gutil/qjson.h" #include #include #include struct Card { QLabel *lbName; QLineEdit *edName; QComboBox *edId; QLabel *lbStatus; QLabel *lbAlias, *lbCur; QButtonGroup *btnGrp; QString id; QString ip; std::vector btns; std::vector edits; bool online = false; }; class MainWindow : public QWidget { Q_OBJECT public: MainWindow(); ~MainWindow(); void readfile(); void addPart(VBox *); void click(); void edit(); void sendGetInfo(); bool SendAnycastCmd(int, const Card &); void getNames(const Card &); JObj cfg; QPushButton *btnEdit, *btnOK, *btnCcl, *btnChg; QUdpSocket mUdpSocket; std::vector cards; std::vector> iconss; int timerId = 0; protected: void timerEvent(QTimerEvent *event); }; #endif // MAINWINDOW_H