-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
87 lines (68 loc) · 1.74 KB
/
mainwindow.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
78
79
80
81
82
83
84
85
86
87
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtDebug>
#include <QMainWindow>
#include <QShortcut>
#include <QFileDialog>
#include <QMessageBox>
#include <QSettings>
#include <QSystemTrayIcon>
#include <QClipboard>
#include "sqlitedb.h"
#include "fileexplorer.h"
#include "dbtablewidget.h"
#include "fsmixdbmodel.h"
#include "tagpool.h"
#include "dbmanager.h"
#include "rankpool.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
signals:
void sigStatusMsg(QString, int t = 2000);
private slots:
void openDBfile(QString fn = QString());
void closeDBconnection();
void loadDBTabs(); // load db tables to view
void removeDBTabs();
void openDBManager();
void onQuitAct();
void onClipboardChanged();
void onTrayIconActivated(QSystemTrayIcon::ActivationReason reason);
void on_topTabWidget_currentChanged(int index);
private:
Ui::MainWindow *ui;
// ui::Menu
void createActions();
void createMenus();
void createTrayIcon();
QMenu *DBMenu;
QAction *openAct;
QAction *closeAct; // close DB
QAction *dbManAct;
QAction *tags2DBAct;
QAction *quitAct;
// ui: File explorer
FileExplorer *file_exp_widget_;
// ui: tags
FileTagsWidget *file_tags_widget_;
// DB
SQLiteDB *db_;
// file hash pool
HashPool *hp_;
TagPool *tp_;
RankPool *rp_;
// ui: DB tabs
QHash<DBTableWidget*, int> db_table_widgets_hash_;
// ui: tray icon
QSystemTrayIcon *tray_icon_;
QClipboard *clipboard_;
QMenu *tray_menu_;
};
#endif // MAINWINDOW_H