OfficeAssistant_Win10/OfficeAssistant_msvc/applicationmanager.h

82 lines
1.8 KiB
C
Raw Normal View History

2023-08-13 12:16:22 +08:00
#pragma once
#include <QWidget>
#include "sqlitehelper.h"
#include "buttonstruct.h"
#include <QVBoxLayout>
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QSvgWidget>
#include <QPushButton>
#include "minibutton.h"
#include <QLabel>
#include "qminiblink.h"
#include "ui_applicationmanager.h"
#include <QTabBar>
#include <QCheckBox>
class ApplicationManagerPage;
struct Record2
{
/*QLabel *name;
QLabel *orig_name;
QLabel *dev;
QLabel *use_time;*/
QSvgWidget* icon;
MiniButton* settings;
MiniButton * open;
2023-08-15 11:17:09 +08:00
QString op;
QString func;
QString name;
2023-08-13 12:16:22 +08:00
QString orig_name;
QString exe_file;
QCheckBox *check_box;
int sort;
QString url;
bool categories[8];
};
struct Title
{
QLabel* name;
QLabel* orig_name;
QLabel* dev;
QLabel* use_time;
QLabel* op;
};
class ApplicationManager : public QWidget
{
Q_OBJECT
signals:
void changeUrl(QString url);
void refresh();
public:
ApplicationManager(QWidget *parent = nullptr);
~ApplicationManager();
2023-08-15 11:17:09 +08:00
QWidget* parent;
2023-08-13 12:16:22 +08:00
private:
QHash<QHBoxLayout*,ApplicationManagerPage*> pages;
QVBoxLayout* layout;
QTabBar *tab_bar;
QMap<int, ApplicationManagerPage*> map;
QHBoxLayout* layout_top;
QHBoxLayout* layout_bottom;
QMiniBlink* miniblink;
QList<MiniButton*> buttons;
QList<Record> softwares;
QList<ButtonStruct> button_structs;
ApplicationManagerPage* application_manager_page_all;
Ui::ApplicationManagerClass ui;
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);
2023-08-15 20:12:36 +08:00
void onNumChange();
2023-08-13 12:16:22 +08:00
};