#pragma once #include #include "sqlitehelper.h" #include "buttonstruct.h" #include #include #include #include #include #include #include #include "minibutton.h" #include #include "qminiblink.h" #include "ui_applicationmanager.h" #include #include #include "config.h" class ApplicationManagerPage; struct Record2 { /*QLabel *name; QLabel *orig_name; QLabel *dev; QLabel *use_time;*/ QLabel* icon; MiniButton* settings; MiniButton * open; QString op; QString func; QString name; QString orig_name; QString exe_file; QCheckBox *check_box; bool is_locked; int sort; QString url; bool categories[CATEGORIES_NUM]; }; struct Title { QLabel* name; QLabel* orig_name; QLabel* dev; QLabel* use_time; QLabel* op; }; class ApplicationManager : public QWidget { Q_OBJECT signals: void clickButton(QString orig_name, QString op, QString func, QString url, QString path, QString initial_position); void refresh(); void refresh_tab(); public: QList buttons; ApplicationManager(QWidget *parent = nullptr); ~ApplicationManager(); QWidget* parent; private: QHash pages; QVBoxLayout* layout; QTabBar *tab_bar; QMap map; QMap map2; QHBoxLayout* layout_top; QHBoxLayout* layout_bottom; QMiniBlink* miniblink; QList softwares; QList button_structs; ApplicationManagerPage* application_manager_page_all; Ui::ApplicationManagerClass ui; QHBoxLayout* layout_top_left; QHBoxLayout* layout_top_right; SQLiteHelper sqlite_helper; QVBoxLayout *layout_bottom_top; QTableWidget *table; Title title; public slots: void onclick1(QString op, QString func, QString path, QString url); void onclick2(QString orig_name, QString op); void tabChange(int index); void onNumChange(); };