#ifndef MAINWINDOW_H #define MAINWINDOW_H #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = nullptr); ~MainWindow(); protected: void closeEvent(QCloseEvent *event) override; private: template void fillTable(const QMap &map); void updateListWidgetDevices(int entityId); QWidget* createMessageEmptyCard(); QWidget* createDeviceCard(const Project &project); void addDeviceToList(const Project &project); void returnToDeviceList(); void showTableWithStructureElements(const QList& elements); void showTableWithDeviceModelCharacteristics(const DeviceModel& model); void clearFilters(); void clearDevicesOutputSettings(); int getSelectedIndex(); public slots: void getStages(QMap &map); void getTeams(QMap &map); void getWorkers(QMap &map); void getDeviceTypes(QMap &map); void getDeviceModels(QMap &map); void getProjects(QMap &map); private slots: void updateTableWidget(int index); void updateListWidget(); void showItemInfo(QListWidgetItem*); void changeSortOrder(); void pushButtonBackClicked(); void pushButtonClearClicked(); void pushButtonSearchClicked(); void pushButtonApplyFiltersClicked(); void pushButtonCancelFiltersClicked(); void pushButtonStructureClicked(); void pushButtonCharacteristicsClicked(); void pushButtonDefaultClicked(); private: Ui::MainWindow *ui; ProjectLogic *logic; QString searchInfo = ""; FilterParams filterParams; int idCard = 0; QMap deviceTypeImages; QMap mapStages; QMap mapWorkers; QMap mapTeams; QMap mapDeviceTypes; QMap mapDeviceModels; QMap mapDevices; }; #endif // MAINWINDOW_H