13501
|
1 /* Quint - A graphical user interface for Octave |
|
2 * Copyright (C) 2011 Jacob Dawid |
|
3 * jacob.dawid@googlemail.com |
|
4 * |
|
5 * This program is free software: you can redistribute it and/or modify |
|
6 * it under the terms of the GNU General Public License as published by |
|
7 * the Free Software Foundation, either version 3 of the License, or |
|
8 * (at your option) any later version. |
|
9 * |
|
10 * This program is distributed in the hope that it will be useful, |
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 * GNU General Public License for more details. |
|
14 * |
|
15 * You should have received a copy of the GNU General Public License |
|
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 */ |
|
18 |
|
19 #ifndef FILEEDITORMDISUBWINDOW_H |
|
20 #define FILEEDITORMDISUBWINDOW_H |
|
21 |
|
22 #include <QMdiSubWindow> |
|
23 #include <QToolBar> |
|
24 #include <QStatusBar> |
|
25 #include <Qsci/qsciscintilla.h> |
|
26 |
|
27 class FileEditorMdiSubWindow : public QMdiSubWindow { |
|
28 Q_OBJECT |
|
29 public: |
|
30 FileEditorMdiSubWindow(QWidget *parent = 0); |
|
31 ~FileEditorMdiSubWindow(); |
|
32 void loadFile(QString fileName); |
|
33 |
|
34 public slots: |
|
35 void newFile(); |
|
36 void saveFile(); |
|
37 void saveFileAs(); |
|
38 |
|
39 void showToolTipNew(); |
|
40 void showToolTipSave(); |
|
41 void showToolTipSaveAs(); |
|
42 void showToolTipUndo(); |
|
43 void showToolTipRedo(); |
|
44 |
|
45 void registerModified(bool modified); |
|
46 private: |
|
47 int checkFileModified(QString msg); |
|
48 void construct(); |
|
49 QToolBar *m_toolBar; |
|
50 QsciScintilla *m_editor; |
|
51 QStatusBar *m_statusBar; |
|
52 QString m_fileName; |
|
53 bool m_modified; |
|
54 }; |
|
55 |
|
56 #endif // FILEEDITORMDISUBWINDOW_H |