-
Notifications
You must be signed in to change notification settings - Fork 2
/
appletwidget.h
59 lines (52 loc) · 1.32 KB
/
appletwidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtGlobal>
#include <QMainWindow>
#include <vector>
#include <unordered_map>
#include <QButtonGroup>
#include <QFile>
#include <QMap>
#include <QDebug>
#include <QVBoxLayout>
#include <QRgb>
#include <QScreen>
#include <QApplication>
#include <QStandardItemModel>
#include <QTableView>
#include <QPushButton>
using namespace std;
class AppletWidget : public QMainWindow
{
Q_OBJECT
public:
explicit AppletWidget(QWidget *parent = nullptr);
~AppletWidget();
QVector<QString> searchAll();
void update();
QPair<QString, bool> readfiles(QString);
QString disable(QString);
QString enable(QString);
QString getFileName(QString);
QString getFileDir(QString);
void getAllFiles(QString);
void globalSearch();
QString Add();
void Delete(QString name);
void showApps();
void showPaths();
void update_widget();
private:
std::vector<QButtonGroup*> Btngroups;
std::vector<QButtonGroup*> Btns;
QMap<QString, bool> selfSetUp;
QMap<QString, QString> name_path;
QString username;
QTableView *tableView ;
QStandardItemModel *tableModel;
protected slots:
void onButtonClicked(QAbstractButton *button);
void addButtonClicked();
void delButtonClicked(QAbstractButton *button);
};
#endif // MAINWINDOW_H