-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainmenu.h
77 lines (68 loc) · 1.52 KB
/
mainmenu.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef MAINMENU_H
#define MAINMENU_H
#include <QWidget>
#include <QApplication>
#include <QScreen>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QGridLayout>
#include <QSpacerItem>
#include <QPushButton>
#include <QToolButton>
#include <QLineEdit>
#include <QLabel>
#include <QScrollArea>
#include <QScrollBar>
#include <QIcon>
#include <QFile>
#include <QDir>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include <QFont>
#include <QDropEvent>
#include <QMimeData>
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include "configman.h"
enum Platform {
Linux,
Mac,
Windows,
Unknown
};
class MainMenu : public QWidget {
Q_OBJECT
public:
bool isFirstRun();
void makeUI(bool remake);
void setTheme();
void buildList(QString searchRequest);
int countTerms(QString path);
void import(QStringList paths);
void newStack();
MainMenu(QWidget *parent = nullptr,
QApplication* app = nullptr);
~MainMenu();
Platform mPlatform;
bool mFirstRun;
QString mCfgDir;
QFont mFont;
QVBoxLayout* mMainLayout;
QLineEdit* mSearchBox;
QScrollArea* mScrollArea;
QGridLayout* mGridLayout;
QList<QPushButton*> mStacksButtonList;
QWidget* mFirstRunWidget;
bool mNoStacks;
private:
ConfigMan* mCfgMan;
QApplication* mApp;
bool mDarkTheme;
protected:
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent* event);
void closeEvent(QCloseEvent* event);
};
#endif // MAINMENU_H