-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
67 lines (51 loc) · 1.49 KB
/
mainwindow.h
File metadata and controls
67 lines (51 loc) · 1.49 KB
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QListView>
#include <QString>
#include <QStandardPaths>
#include <QDir>
#include <QMenu>
#include <QMenuBar>
#include <QMap>
#include <QMapIterator>
#include <QStackedWidget>
#include <QDebug>
#include <QModelIndexList>
#include "taglist.h"
#include "taglistmodeldropcheckable.h"
#include "filelistmodel.h"
#include "taglistwidget.h"
#include "filelistwidget.h"
class MainWindow : public QMainWindow
{
Q_OBJECT
private:
// The two principal widgets
TagListWidget *_tagListWidget;
FileListWidget *_fileListWidget;
TagList *_tagList; // The class containing all the data
TagListModelDropCheckable *_tagListModel; // A model for displaying tags
// Helper widgets
QStackedWidget *_stackedWidget = new QStackedWidget();
QToolBar *_toolbar = new QToolBar(this);
QMenuBar *_menuBar;
QMenu *_menu = new QMenu(tr("File"));
// Actions
QAction *getAction(QString);
QMap<QString, QAction *> *_actions = new (QMap<QString, QAction *>);
// Used for persistance
QString _path = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation);
QString _fileName = "save.xml";
TagList *loadPersistance();
void savePersistance(TagList *);
void createActions();
void hideWidget();
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void showFileList(QModelIndexList *);
void showTagList();
};
#endif // MAINWINDOW_H