Mercurial > octave-nkf
comparison gui/src/MainWindow.h @ 14599:97cb9286919c gui
Cleaned up code.
* .hgsub: Removed IRC Widget.
* gui.pro: Removed dependency on IRC Widget and removed files.
* class FileEditorMdiSubWindow: Renamed to FileEditor. File editor windows are now independent windows, thus removed the extra close button.
* MainWindow: Removed MDI Area and replaced it with the terminal instead.
* BrowserWidget: Removed browser widget.
* SettingsDialog: Rearranged settings for the editor, removed tab for shortcuts.
* OctaveCallbackThread: Raised update intervals from 0,5s to 1s.
* OctaveLink: Replaced signals names for triggering updates on the symbol table.
* WorkspaceView: Adjusted connect statements to fit the new signal names.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Mon, 07 May 2012 00:53:54 +0200 |
parents | fa52c6e84ae0 |
children | c8453a013000 |
comparison
equal
deleted
inserted
replaced
14588:fa52c6e84ae0 | 14599:97cb9286919c |
---|---|
16 */ | 16 */ |
17 | 17 |
18 #ifndef MAINWINDOW_H | 18 #ifndef MAINWINDOW_H |
19 #define MAINWINDOW_H | 19 #define MAINWINDOW_H |
20 | 20 |
21 // Qt includes | |
21 #include <QtGui/QMainWindow> | 22 #include <QtGui/QMainWindow> |
22 #include <QThread> | 23 #include <QThread> |
23 #include <QTabWidget> | 24 #include <QTabWidget> |
24 #include <QMdiArea> | 25 #include <QMdiArea> |
25 #include <QStatusBar> | 26 #include <QStatusBar> |
26 #include <QToolBar> | 27 #include <QToolBar> |
27 #include <QQueue> | 28 #include <QQueue> |
28 #include <Qsci/qsciapis.h> | |
29 #include <QMdiSubWindow> | 29 #include <QMdiSubWindow> |
30 #include <QCloseEvent> | 30 #include <QCloseEvent> |
31 | |
32 // QScintilla includes | |
33 #include <Qsci/qsciapis.h> | |
34 #include "lexer/lexeroctavegui.h" | |
35 | |
36 // QTerminal includes | |
37 #include "QTerminal.h" | |
38 | |
39 // Own includes | |
31 #include "ResourceManager.h" | 40 #include "ResourceManager.h" |
32 #include "OctaveLink.h" | 41 #include "OctaveLink.h" |
33 #include "WorkspaceView.h" | 42 #include "WorkspaceView.h" |
34 #include "HistoryDockWidget.h" | 43 #include "HistoryDockWidget.h" |
35 #include "FilesDockWidget.h" | 44 #include "FilesDockWidget.h" |
36 #include "BrowserWidget.h" | |
37 #include "lexer/lexeroctavegui.h" | |
38 #include "QTerminal.h" | |
39 #include "QIRCWidget.h" | |
40 | |
41 class NonClosableMdiSubWindow : public QMdiSubWindow | |
42 { | |
43 Q_OBJECT | |
44 public: | |
45 explicit NonClosableMdiSubWindow (QWidget *parent = 0) | |
46 : QMdiSubWindow (parent) { } | |
47 virtual ~NonClosableMdiSubWindow () { } | |
48 protected: | |
49 void closeEvent (QCloseEvent *closeEvent) | |
50 { | |
51 closeEvent->ignore (); | |
52 } | |
53 }; | |
54 | 45 |
55 /** | 46 /** |
56 * \class MainWindow | 47 * \class MainWindow |
57 * | 48 * |
58 * Represents the main window. | 49 * Represents the main window. |
83 | 74 |
84 signals: | 75 signals: |
85 void settingsChanged (); | 76 void settingsChanged (); |
86 | 77 |
87 public slots: | 78 public slots: |
88 void handleOpenFileRequest (QString fileName); | 79 void openExistingFile (QString fileName); |
89 void reportStatusMessage (QString statusMessage); | 80 void reportStatusMessage (QString statusMessage); |
90 void openWebPage (QString url); | |
91 void openChat (); | |
92 void handleSaveWorkspaceRequest (); | 81 void handleSaveWorkspaceRequest (); |
93 void handleLoadWorkspaceRequest (); | 82 void handleLoadWorkspaceRequest (); |
94 void handleClearWorkspaceRequest (); | 83 void handleClearWorkspaceRequest (); |
95 void handleCommandDoubleClicked (QString command); | 84 void handleCommandDoubleClicked (QString command); |
96 void alignMdiWindows (); | 85 void newFile (); |
97 void openEditor (); | 86 void newEditorWindow (QString fileName); |
98 void openEditorFile (QString fileName); | |
99 void openBugTrackerPage (); | 87 void openBugTrackerPage (); |
100 void openAgoraPage (); | 88 void openAgoraPage (); |
101 void openOctaveForgePage (); | 89 void openOctaveForgePage (); |
102 void processSettingsDialogRequest (); | 90 void processSettingsDialogRequest (); |
103 void showAboutOctave (); | 91 void showAboutOctave (); |
104 void showAboutQt (); | |
105 void updateTerminalFont (); | 92 void updateTerminalFont (); |
106 | 93 |
107 protected: | 94 protected: |
108 void closeEvent (QCloseEvent * closeEvent); | 95 void closeEvent (QCloseEvent * closeEvent); |
109 void readSettings (); | 96 void readSettings (); |
110 void writeSettings (); | 97 void writeSettings (); |
111 | 98 |
112 private: | 99 private: |
113 void construct (); | 100 void construct (); |
114 void establishOctaveLink (); | 101 void establishOctaveLink (); |
115 QMdiArea *m_centralMdiArea; | |
116 | 102 |
117 // Mdi sub windows. | |
118 QTerminal *m_terminalView; | 103 QTerminal *m_terminalView; |
119 BrowserWidget *m_documentationWidget; | |
120 QIRCWidget *m_ircWidget; | |
121 | |
122 NonClosableMdiSubWindow *m_terminalViewSubWindow; | |
123 NonClosableMdiSubWindow *m_documentationWidgetSubWindow; | |
124 | 104 |
125 // Dock widgets. | 105 // Dock widgets. |
126 WorkspaceView *m_workspaceView; | 106 WorkspaceView *m_workspaceView; |
127 HistoryDockWidget *m_historyDockWidget; | 107 HistoryDockWidget *m_historyDockWidget; |
128 FilesDockWidget *m_filesDockWidget; | 108 FilesDockWidget *m_filesDockWidget; |