-
Notifications
You must be signed in to change notification settings - Fork 1
/
mainwindow.h
99 lines (81 loc) · 2.12 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
88
89
90
91
92
93
94
95
96
97
98
99
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QMainWindow>
#include <QGridLayout>
#include <QWidget>
#include <QTabWidget>
//#include <QSyntaxHighlighter>
#include <QString>
#include <QMenu>
#include <QMessageBox>
#include <QErrorMessage>
#include <QFile>
#include <QFileDialog>
#include <QFileInfo>
//#include <QPrinter>
#include <QDockWidget>
#include <QListWidget>
#include <QListWidgetItem>
#include <QTreeView>
#include <QDirModel>
#include <QModelIndex>
#include <QToolBar>
#include <QTabBar>
#include <QAction>
#include <QToolButton>
#include <QCloseEvent>
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QMimeData>
#include <QList>
#include <QUrl>
#include "LineNumberArea.h"
#include "CodeEditor.h"
#include "Highlighter.h"
QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE
class MainWindow : public QMainWindow {
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
QTabWidget* tabs;
Highlighter* highlighter;
QDirModel* file_system_model;
QTreeView* file_system_view;
QListWidget* opened_docs_widget;
QDockWidget* file_explorer_dock;
QDockWidget* opened_docs_dock;
void dragEnterEvent(QDragEnterEvent* drag_event) override;
void dropEvent(QDropEvent* drop_event) override;
void SetupTabWidget();
void SetupMenuBar();
void SetupFileExplorerDock();
void SetupOpenedDocsDock();
void closeEvent(QCloseEvent*) override;
private slots:
void UpdateParameter();
void CreateFile();
void OpenFile();
void OpenFile(const QString&);
void OpenFile(QModelIndex);
void SaveFile();
void SaveFileAs();
void SaveAllFiles();
void CloseFile();
void CloseFile(int);
void CloseAllFiles();
void CloseWindow();
void ChangeTabIndexInList(int, int);
void DeleteTabFromList(int);
void UpdateCurrentIndex(int);
void UpdateCurrentIndex(QListWidgetItem*);
void UpdateCurrentIndexOnDelete();
};
#endif // MAINWINDOW_H