Mercurial > hg > octave-lyh
annotate gui/src/MainWindow.cpp @ 14287:2f902bf44669 gui
Sending commands to the terminal from doubleclicking the history, loading and saving workspaces as well as clearing the workspace works again.
* MainWindow.cpp: Commented in the appropriate sendText method calls.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Tue, 31 Jan 2012 00:03:44 +0100 |
parents | 728c8929385f |
children | e7d9e6d8c6b5 |
rev | line source |
---|---|
13504
13e3d60aff2d
Replaced Quint with OctaveGUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13501
diff
changeset
|
1 /* OctaveGUI - A graphical user interface for Octave |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13666
diff
changeset
|
2 * Copyright (C) 2011 Jacob Dawid (jacob.dawid@googlemail.com) |
13501 | 3 * |
4 * This program is free software: you can redistribute it and/or modify | |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13666
diff
changeset
|
5 * it under the terms of the GNU Affero General Public License as |
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13666
diff
changeset
|
6 * published by the Free Software Foundation, either version 3 of the |
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13666
diff
changeset
|
7 * License, or (at your option) any later version. |
13501 | 8 * |
9 * This program is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13666
diff
changeset
|
12 * GNU Affero General Public License for more details. |
13501 | 13 * |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13666
diff
changeset
|
14 * You should have received a copy of the GNU Affero General Public License |
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13666
diff
changeset
|
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
13501 | 16 */ |
17 | |
18 #include <QMenuBar> | |
19 #include <QMenu> | |
20 #include <QAction> | |
21 #include <QSettings> | |
22 #include <QDesktopServices> | |
23 #include <QFileDialog> | |
13626
cc90c62ada21
Removed terminal, instead now using QPlainTextEdit, which looks much nicer and is not that error-prone...
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13620
diff
changeset
|
24 #include <QMessageBox> |
13501 | 25 #include "MainWindow.h" |
26 #include "FileEditorMdiSubWindow.h" | |
27 #include "ImageViewerMdiSubWindow.h" | |
28 #include "SettingsDialog.h" | |
29 | |
14283
8dfa333f1130
Removed complete terminal code, since everything moved to qterminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14269
diff
changeset
|
30 #define VERSION_STRING "Octave GUI (0.8.7)" |
13532
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
31 |
13541
b48ac9ad8de0
Highly improved separation of model and view classes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13540
diff
changeset
|
32 MainWindow::MainWindow (QWidget * parent):QMainWindow (parent) |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
33 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
34 construct (); |
13541
b48ac9ad8de0
Highly improved separation of model and view classes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13540
diff
changeset
|
35 OctaveLink::instance ()->launchOctave(); |
13501 | 36 } |
37 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
38 MainWindow::~MainWindow () |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
39 { |
13501 | 40 } |
41 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
42 void |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
43 MainWindow::handleOpenFileRequest (QString fileName) |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
44 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
45 reportStatusMessage (tr ("Opening file.")); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
46 QPixmap pixmap; |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
47 if (pixmap.load (fileName)) |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
48 { |
13501 | 49 // ImageViewerMdiSubWindow *subWindow = new ImageViewerMdiSubWindow(pixmap, this); |
50 // subWindow->setAttribute(Qt::WA_DeleteOnClose); | |
51 // m_centralMdiArea->addSubWindow(subWindow); | |
52 // subWindow->setWindowTitle(fileName); | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
53 } |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
54 else |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
55 { |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
56 openEditorFile(fileName); |
13501 | 57 } |
58 } | |
59 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
60 void |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
61 MainWindow::openEditor () |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
62 { |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
63 openEditorFile(QString()); |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
64 } |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
65 void |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
66 MainWindow::openEditorFile (QString fileName) |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
67 { |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
68 FileEditorMdiSubWindow *subWindow = new FileEditorMdiSubWindow (m_centralMdiArea); |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
69 subWindow->setAttribute (Qt::WA_DeleteOnClose); |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
70 // check whether lexer is already prepared and prepare it if not |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
71 if ( m_lexer == NULL ) |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
72 { |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
73 // this has to be done only once, not for each editor |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
74 m_lexer = new LexerOctaveGui(); |
13659
d98c6ef06dff
included some editor setting into the setting dialog
ttl <ttl@justmail.de>
parents:
13657
diff
changeset
|
75 // Editor font (default or from settings) |
d98c6ef06dff
included some editor setting into the setting dialog
ttl <ttl@justmail.de>
parents:
13657
diff
changeset
|
76 QSettings *settings = ResourceManager::instance ()->settings (); |
d98c6ef06dff
included some editor setting into the setting dialog
ttl <ttl@justmail.de>
parents:
13657
diff
changeset
|
77 m_lexer->setDefaultFont( QFont( |
d98c6ef06dff
included some editor setting into the setting dialog
ttl <ttl@justmail.de>
parents:
13657
diff
changeset
|
78 settings->value ("editor/fontName","Courier").toString (), |
d98c6ef06dff
included some editor setting into the setting dialog
ttl <ttl@justmail.de>
parents:
13657
diff
changeset
|
79 settings->value ("editor/fontSize",10).toInt () ) ); |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
80 // TODO: Autoindent not working as it should |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
81 m_lexer->setAutoIndentStyle(QsciScintilla::AiMaintain || |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
82 QsciScintilla::AiOpening || |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
83 QsciScintilla::AiClosing); |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
84 // The API info that is used for auto completion |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
85 // TODO: Where to store a file with API info (raw or prepared?)? |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
86 // TODO: Also provide infos on octave-forge functions? |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
87 // TODO: Also provide infos on function parameters? |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
88 // By now, use the keywords-list from syntax highlighting |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
89 m_lexerAPI = new QsciAPIs(m_lexer); |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
90 QString keyword; |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
91 QStringList keywordList; |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
92 keyword = m_lexer->keywords(1); // get whole string with all keywords |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
93 keywordList = keyword.split(QRegExp("\\s+")); // split into single strings |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
94 int i; |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
95 for ( i=0; i<keywordList.size(); i++ ) |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
96 { |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
97 m_lexerAPI->add(keywordList.at(i)); // add single strings to the API |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
98 } |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
99 m_lexerAPI->prepare(); // prepare API info ... this make take some time |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
100 } |
14255
5dcfb705ce12
GUI: Bundled the new qterminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13869
diff
changeset
|
101 //subWindow->initEditor(m_terminalView, m_lexer, this); // init necessary informations for editor |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
102 |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
103 if ( fileName.isEmpty() ) |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
104 subWindow->newFile (); |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
105 else |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
106 subWindow->loadFile (fileName); |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
107 } |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
108 |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
109 |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
110 void |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
111 MainWindow::reportStatusMessage (QString statusMessage) |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
112 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
113 m_statusBar->showMessage (statusMessage, 1000); |
13501 | 114 } |
115 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
116 void |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
117 MainWindow::openWebPage (QString url) |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
118 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
119 m_documentationWidget->load (QUrl (url)); |
13501 | 120 } |
121 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
122 void |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
123 MainWindow::handleSaveWorkspaceRequest () |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
124 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
125 QString selectedFile = |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
126 QFileDialog::getSaveFileName (this, tr ("Save Workspace"), |
13537
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
127 ResourceManager::instance ()->homePath ()); |
14287
2f902bf44669
Sending commands to the terminal from doubleclicking the history, loading and saving workspaces as well as clearing the workspace works again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14286
diff
changeset
|
128 m_terminalView->sendText (QString ("save \'%1\'\n").arg (selectedFile)); |
14255
5dcfb705ce12
GUI: Bundled the new qterminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13869
diff
changeset
|
129 m_terminalView->setFocus (); |
13501 | 130 } |
131 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
132 void |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
133 MainWindow::handleLoadWorkspaceRequest () |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
134 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
135 QString selectedFile = |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
136 QFileDialog::getOpenFileName (this, tr ("Load Workspace"), |
13537
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
137 ResourceManager::instance ()->homePath ()); |
14287
2f902bf44669
Sending commands to the terminal from doubleclicking the history, loading and saving workspaces as well as clearing the workspace works again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14286
diff
changeset
|
138 m_terminalView->sendText (QString ("load \'%1\'\n").arg (selectedFile)); |
14255
5dcfb705ce12
GUI: Bundled the new qterminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13869
diff
changeset
|
139 m_terminalView->setFocus (); |
13501 | 140 } |
141 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
142 void |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
143 MainWindow::handleClearWorkspaceRequest () |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
144 { |
14287
2f902bf44669
Sending commands to the terminal from doubleclicking the history, loading and saving workspaces as well as clearing the workspace works again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14286
diff
changeset
|
145 m_terminalView->sendText ("clear\n"); |
14255
5dcfb705ce12
GUI: Bundled the new qterminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13869
diff
changeset
|
146 m_terminalView->setFocus (); |
13501 | 147 } |
148 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
149 void |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
150 MainWindow::handleCommandDoubleClicked (QString command) |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
151 { |
14287
2f902bf44669
Sending commands to the terminal from doubleclicking the history, loading and saving workspaces as well as clearing the workspace works again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14286
diff
changeset
|
152 m_terminalView->sendText(command); |
14255
5dcfb705ce12
GUI: Bundled the new qterminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13869
diff
changeset
|
153 m_terminalView->setFocus (); |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
154 } |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
155 |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
156 void |
13611
7f6f339761f9
Chat Window changes logo on new messages.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13607
diff
changeset
|
157 MainWindow::handleUnreadMessages (bool yes) |
7f6f339761f9
Chat Window changes logo on new messages.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13607
diff
changeset
|
158 { |
7f6f339761f9
Chat Window changes logo on new messages.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13607
diff
changeset
|
159 if (yes) |
7f6f339761f9
Chat Window changes logo on new messages.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13607
diff
changeset
|
160 { |
13613
8728061cd0ec
Icons are now maintained by the ResourceManager.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13611
diff
changeset
|
161 m_ircWidgetSubWindow |
8728061cd0ec
Icons are now maintained by the ResourceManager.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13611
diff
changeset
|
162 ->setWindowIcon |
8728061cd0ec
Icons are now maintained by the ResourceManager.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13611
diff
changeset
|
163 (ResourceManager::instance ()->icon (ResourceManager::ChatNewMessage)); |
13611
7f6f339761f9
Chat Window changes logo on new messages.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13607
diff
changeset
|
164 } |
7f6f339761f9
Chat Window changes logo on new messages.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13607
diff
changeset
|
165 else |
7f6f339761f9
Chat Window changes logo on new messages.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13607
diff
changeset
|
166 { |
13613
8728061cd0ec
Icons are now maintained by the ResourceManager.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13611
diff
changeset
|
167 m_ircWidgetSubWindow |
8728061cd0ec
Icons are now maintained by the ResourceManager.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13611
diff
changeset
|
168 ->setWindowIcon |
8728061cd0ec
Icons are now maintained by the ResourceManager.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13611
diff
changeset
|
169 (ResourceManager::instance ()->icon (ResourceManager::Chat)); |
13611
7f6f339761f9
Chat Window changes logo on new messages.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13607
diff
changeset
|
170 } |
7f6f339761f9
Chat Window changes logo on new messages.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13607
diff
changeset
|
171 } |
7f6f339761f9
Chat Window changes logo on new messages.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13607
diff
changeset
|
172 |
7f6f339761f9
Chat Window changes logo on new messages.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13607
diff
changeset
|
173 void |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
174 MainWindow::alignMdiWindows () |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
175 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
176 m_centralMdiArea->tileSubWindows (); |
13501 | 177 } |
178 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
179 void |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
180 MainWindow::openBugTrackerPage () |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
181 { |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13534
diff
changeset
|
182 QDesktopServices::openUrl (QUrl ("http://savannah.gnu.org/bugs/?group=octave")); |
13501 | 183 } |
184 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
185 void |
13533
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
186 MainWindow::openAgoraPage () |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
187 { |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13534
diff
changeset
|
188 QDesktopServices::openUrl (QUrl ("http://agora.panocha.org.mx/")); |
13533
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
189 } |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
190 |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
191 void |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
192 MainWindow::openOctaveForgePage () |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
193 { |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13534
diff
changeset
|
194 QDesktopServices::openUrl (QUrl ("http://octave.sourceforge.net/")); |
13533
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
195 } |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
196 |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
197 void |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
198 MainWindow::processSettingsDialogRequest () |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
199 { |
13537
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
200 SettingsDialog settingsDialog (this); |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
201 settingsDialog.exec (); |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13534
diff
changeset
|
202 emit settingsChanged (); |
13607
fd31226d4c3a
Proxy settings can now be configured.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13604
diff
changeset
|
203 ResourceManager::instance ()->updateNetworkSettings (); |
13501 | 204 } |
205 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
206 void |
13548
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
207 MainWindow::showAboutOctave () |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
208 { |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
209 QString message = |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
210 "GNU Octave\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
211 "Copyright (C) 2009 John W. Eaton and others.\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
212 "This is free software; see the source code for copying conditions." |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
213 "There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
214 "FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
215 "\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
216 "Octave was configured for \"x86_64-pc-linux-gnu\".\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
217 "\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
218 "Additional information about Octave is available at http://www.octave.org.\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
219 "\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
220 "Please contribute if you find this software useful." |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
221 "For more information, visit http://www.octave.org/help-wanted.html\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
222 "\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
223 "Report bugs to <bug@octave.org> (but first, please read" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
224 "http://www.octave.org/bugs.html to learn how to write a helpful report).\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
225 "\n" |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
226 "For information about changes from previous versions, type `news'.\n"; |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
227 |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
228 QMessageBox::about (this, tr ("About Octave"), message); |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
229 } |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
230 |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
231 void |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
232 MainWindow::showAboutQt () |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
233 { |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
234 QMessageBox::aboutQt (this); |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
235 } |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
236 |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
237 void |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
238 MainWindow::closeEvent (QCloseEvent * closeEvent) |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
239 { |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
240 reportStatusMessage (tr ("Saving data and shutting down.")); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
241 writeSettings (); |
13657
347dfbea2c8a
modified editor files can be saved when main window is closed
ttl <ttl@justmail.de>
parents:
13648
diff
changeset
|
242 m_closeApplication = true; // inform editor window that whole application is closed |
13541
b48ac9ad8de0
Highly improved separation of model and view classes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13540
diff
changeset
|
243 OctaveLink::instance ()->terminateOctave(); |
13657
347dfbea2c8a
modified editor files can be saved when main window is closed
ttl <ttl@justmail.de>
parents:
13648
diff
changeset
|
244 m_centralMdiArea->closeAllSubWindows(); // send close events to subwindows |
347dfbea2c8a
modified editor files can be saved when main window is closed
ttl <ttl@justmail.de>
parents:
13648
diff
changeset
|
245 // (editor files can be saved!) |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
246 QMainWindow::closeEvent (closeEvent); |
13501 | 247 } |
248 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
249 void |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
250 MainWindow::readSettings () |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
251 { |
13537
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
252 QSettings *settings = ResourceManager::instance ()->settings (); |
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
253 restoreGeometry (settings->value ("MainWindow/geometry").toByteArray ()); |
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
254 restoreState (settings->value ("MainWindow/windowState").toByteArray ()); |
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
255 m_centralMdiArea->restoreGeometry (settings->value ("MdiArea/geometry").toByteArray ()); |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13534
diff
changeset
|
256 emit settingsChanged (); |
13501 | 257 } |
258 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
259 void |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
260 MainWindow::writeSettings () |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
261 { |
13537
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
262 QSettings *settings = ResourceManager::instance ()->settings (); |
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
263 settings->setValue ("MainWindow/geometry", saveGeometry ()); |
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
264 settings->setValue ("MainWindow/windowState", saveState ()); |
a43ecce77eec
Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13536
diff
changeset
|
265 settings->setValue ("MdiArea/geometry", m_centralMdiArea->saveGeometry ()); |
13501 | 266 } |
267 | |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
268 void |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
269 MainWindow::construct () |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
270 { |
13657
347dfbea2c8a
modified editor files can be saved when main window is closed
ttl <ttl@justmail.de>
parents:
13648
diff
changeset
|
271 m_closeApplication = false; // flag for editor files when closed |
13613
8728061cd0ec
Icons are now maintained by the ResourceManager.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13611
diff
changeset
|
272 setWindowIcon (ResourceManager::instance ()->icon (ResourceManager::Octave)); |
13501 | 273 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
274 // Initialize MDI area. |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
275 m_centralMdiArea = new QMdiArea (this); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
276 m_centralMdiArea->setObjectName ("CentralMdiArea"); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
277 m_centralMdiArea->setViewMode (QMdiArea::TabbedView); |
13501 | 278 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
279 // Setup dockable widgets and the status bar. |
13683
25dc40d24a44
Renamed VariablesDockWidget to WorkspaceView and optimized memory footprint for 30%.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13674
diff
changeset
|
280 m_workspaceView = new WorkspaceView (this); |
25dc40d24a44
Renamed VariablesDockWidget to WorkspaceView and optimized memory footprint for 30%.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13674
diff
changeset
|
281 m_workspaceView->setStatusTip (tr ("View the variables in the active workspace.")); |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
282 m_historyDockWidget = new HistoryDockWidget (this); |
13549
807e5e9b7591
Added lots of status tips.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13548
diff
changeset
|
283 m_historyDockWidget->setStatusTip (tr ("Browse and search the command history.")); |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
284 m_filesDockWidget = new FilesDockWidget (this); |
13549
807e5e9b7591
Added lots of status tips.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13548
diff
changeset
|
285 m_filesDockWidget->setStatusTip (tr ("Browse your files.")); |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
286 m_statusBar = new QStatusBar (this); |
13501 | 287 |
14286
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
288 // Documentation subwindow. |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
289 m_documentationWidget = new BrowserWidget (this); |
14286
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
290 m_documentationWidgetSubWindow = new NonClosableMdiSubWindow (this); |
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
291 m_documentationWidgetSubWindow->setWidget (m_documentationWidget); |
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
292 m_centralMdiArea->addSubWindow (m_documentationWidgetSubWindow, Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint); |
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
293 |
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
294 m_documentationWidgetSubWindow->setObjectName ("DocumentationWidgetSubWindow"); |
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
295 m_documentationWidgetSubWindow->setWindowTitle (tr ("Documentation")); |
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
296 m_documentationWidgetSubWindow |
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
297 ->setWindowIcon (ResourceManager::instance ()->icon (ResourceManager::Documentation)); |
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
298 m_documentationWidgetSubWindow->setFocusProxy (m_documentationWidget); |
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
299 m_documentationWidgetSubWindow->setStatusTip (tr ("Browse the Octave documentation for help.")); |
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
300 m_documentationWidgetSubWindow->setMinimumSize (300, 300); |
13501 | 301 |
13550
cd66481d55b0
Added close button to file editor, assorted subwindows after importance.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13549
diff
changeset
|
302 // Octave Terminal subwindow. |
14286
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
303 m_terminalView = new QTerminal(this); |
13648
da69cec2459f
Renamed OctaveTerminal to TerminalView.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13646
diff
changeset
|
304 m_terminalViewSubWindow = new NonClosableMdiSubWindow (this); |
14255
5dcfb705ce12
GUI: Bundled the new qterminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13869
diff
changeset
|
305 m_terminalViewSubWindow->setWidget (m_terminalView); |
13648
da69cec2459f
Renamed OctaveTerminal to TerminalView.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13646
diff
changeset
|
306 m_centralMdiArea->addSubWindow (m_terminalViewSubWindow, Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint); |
13614
5cb93c6d8aab
Important subwindows are not closable now. A close button is still displayed, which seems to be q Qt bug.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13613
diff
changeset
|
307 |
13648
da69cec2459f
Renamed OctaveTerminal to TerminalView.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13646
diff
changeset
|
308 m_terminalViewSubWindow->setObjectName ("OctaveTerminalSubWindow"); |
da69cec2459f
Renamed OctaveTerminal to TerminalView.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13646
diff
changeset
|
309 m_terminalViewSubWindow->setWindowTitle (tr ("Terminal")); |
da69cec2459f
Renamed OctaveTerminal to TerminalView.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13646
diff
changeset
|
310 m_terminalViewSubWindow |
13613
8728061cd0ec
Icons are now maintained by the ResourceManager.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13611
diff
changeset
|
311 ->setWindowIcon (ResourceManager::instance ()->icon (ResourceManager::Terminal)); |
14255
5dcfb705ce12
GUI: Bundled the new qterminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13869
diff
changeset
|
312 m_terminalViewSubWindow->setFocusProxy (m_terminalView); |
13648
da69cec2459f
Renamed OctaveTerminal to TerminalView.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13646
diff
changeset
|
313 m_terminalViewSubWindow->setStatusTip (tr ("Enter your commands into the Octave terminal.")); |
da69cec2459f
Renamed OctaveTerminal to TerminalView.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13646
diff
changeset
|
314 m_terminalViewSubWindow->setMinimumSize (300, 300); |
13501 | 315 |
13550
cd66481d55b0
Added close button to file editor, assorted subwindows after importance.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13549
diff
changeset
|
316 // Chat subwindow. |
14286
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
317 // Deactivated in the development process. |
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
318 /* |
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
319 m_ircWidget = new QIRCWidget (this); |
13614
5cb93c6d8aab
Important subwindows are not closable now. A close button is still displayed, which seems to be q Qt bug.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13613
diff
changeset
|
320 m_ircWidgetSubWindow = new NonClosableMdiSubWindow (this); |
14265
2254d7c14f41
Provided a patch in the pro for Windows, which does not need qterminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14255
diff
changeset
|
321 m_ircWidgetSubWindow->setWidget(m_ircWidget); |
13614
5cb93c6d8aab
Important subwindows are not closable now. A close button is still displayed, which seems to be q Qt bug.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13613
diff
changeset
|
322 m_centralMdiArea->addSubWindow (m_ircWidgetSubWindow, Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint); |
5cb93c6d8aab
Important subwindows are not closable now. A close button is still displayed, which seems to be q Qt bug.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13613
diff
changeset
|
323 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
324 m_ircWidgetSubWindow->setObjectName ("ChatWidgetSubWindow"); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
325 m_ircWidgetSubWindow->setWindowTitle (tr ("Chat")); |
13613
8728061cd0ec
Icons are now maintained by the ResourceManager.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13611
diff
changeset
|
326 m_ircWidgetSubWindow |
8728061cd0ec
Icons are now maintained by the ResourceManager.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13611
diff
changeset
|
327 ->setWindowIcon (ResourceManager::instance ()->icon (ResourceManager::Chat)); |
13549
807e5e9b7591
Added lots of status tips.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13548
diff
changeset
|
328 m_ircWidgetSubWindow->setStatusTip(tr ("Instantly chat with other Octave users for help.")); |
13611
7f6f339761f9
Chat Window changes logo on new messages.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13607
diff
changeset
|
329 m_ircWidgetSubWindow->setFocusProxy (m_ircWidget); |
13646
2e1f54803758
Lowered size limits for subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13640
diff
changeset
|
330 m_ircWidgetSubWindow->setMinimumSize (300, 300); |
14286
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
331 //connect (m_ircWidget, SIGNAL (unreadMessages (bool)), this, SLOT (handleUnreadMessages (bool))); |
13501 | 332 |
14269
4a6867289e24
Removed the old IRC Client code and replaced it by qirc.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14265
diff
changeset
|
333 m_ircWidget->connectToServer("irc.freenode.net", "Octave-GUI-User", "#octave"); |
14286
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
334 */ |
14269
4a6867289e24
Removed the old IRC Client code and replaced it by qirc.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14265
diff
changeset
|
335 |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
336 m_lexer = NULL; // initialise the empty lexer for the edtiors |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
13550
diff
changeset
|
337 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
338 QMenu *controlMenu = menuBar ()->addMenu (tr ("Octave")); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
339 QAction *settingsAction = controlMenu->addAction (tr ("Settings")); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
340 controlMenu->addSeparator (); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
341 QAction *exitAction = controlMenu->addAction (tr ("Exit")); |
13501 | 342 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
343 QMenu *interfaceMenu = menuBar ()->addMenu (tr ("Interface")); |
13532
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
344 |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
345 QAction *alignWindowsAction = interfaceMenu->addAction (tr ("Align Windows")); |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
346 interfaceMenu->addSeparator (); |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
347 QAction *showWorkspaceAction = interfaceMenu->addAction (tr ("Workspace")); |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
348 showWorkspaceAction->setCheckable (true); |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
349 |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
350 QAction *showHistoryAction = interfaceMenu->addAction (tr ("History")); |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
351 showHistoryAction->setCheckable (true); |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
352 |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
353 QAction *showFileBrowserAction = interfaceMenu->addAction (tr ("File Browser")); |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
354 showFileBrowserAction->setCheckable (true); |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
355 |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
356 interfaceMenu->addSeparator (); |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
357 QAction *openEditorAction = interfaceMenu->addAction (tr ("Open New Editor Window")); |
13501 | 358 |
13523
103b7bebb38f
Moved load/save/clear workspace into main menu.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13522
diff
changeset
|
359 QMenu *workspaceMenu = menuBar ()->addMenu (tr ("Workspace")); |
103b7bebb38f
Moved load/save/clear workspace into main menu.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13522
diff
changeset
|
360 QAction *loadWorkspaceAction = workspaceMenu->addAction (tr ("Load")); |
103b7bebb38f
Moved load/save/clear workspace into main menu.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13522
diff
changeset
|
361 QAction *saveWorkspaceAction = workspaceMenu->addAction (tr ("Save")); |
103b7bebb38f
Moved load/save/clear workspace into main menu.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13522
diff
changeset
|
362 workspaceMenu->addSeparator (); |
103b7bebb38f
Moved load/save/clear workspace into main menu.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13522
diff
changeset
|
363 QAction *clearWorkspaceAction = workspaceMenu->addAction (tr ("Clear")); |
103b7bebb38f
Moved load/save/clear workspace into main menu.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13522
diff
changeset
|
364 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
365 QMenu *communityMenu = menuBar ()->addMenu (tr ("Community")); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
366 QAction *reportBugAction = communityMenu->addAction (tr ("Report Bug")); |
13533
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
367 QAction *agoraAction = communityMenu->addAction (tr ("Agora")); |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
368 QAction *octaveForgeAction = communityMenu->addAction (tr ("Octave Forge")); |
13548
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
369 communityMenu->addSeparator (); |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
370 QAction *aboutOctaveAction = communityMenu->addAction (tr ("About Octave")); |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
371 QAction *aboutQt = communityMenu->addAction (tr ("About Qt")); |
13501 | 372 |
13532
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
373 connect (settingsAction, SIGNAL (triggered ()), this, SLOT (processSettingsDialogRequest ())); |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
374 connect (exitAction, SIGNAL (triggered ()), this, SLOT (close ())); |
13532
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
375 connect (alignWindowsAction, SIGNAL (triggered ()), this, SLOT (alignMdiWindows ())); |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
376 connect (openEditorAction, SIGNAL (triggered ()), this, SLOT (openEditor ())); |
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
377 connect (reportBugAction, SIGNAL (triggered ()), this, SLOT (openBugTrackerPage ())); |
13533
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
378 connect (agoraAction, SIGNAL (triggered ()), this, SLOT (openAgoraPage ())); |
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
379 connect (octaveForgeAction, SIGNAL (triggered ()), this, SLOT (openOctaveForgePage ())); |
13548
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
380 connect (aboutOctaveAction, SIGNAL (triggered ()), this, SLOT (showAboutOctave ())); |
5c2ea445e100
Added about boxes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13546
diff
changeset
|
381 connect (aboutQt, SIGNAL (triggered ()), this, SLOT (showAboutQt ())); |
13533
edaf8e72070e
Added urls for Agora and Octave Forge in Community Window.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13532
diff
changeset
|
382 |
13683
25dc40d24a44
Renamed VariablesDockWidget to WorkspaceView and optimized memory footprint for 30%.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13674
diff
changeset
|
383 connect (showWorkspaceAction, SIGNAL (toggled (bool)), m_workspaceView, SLOT (setShown (bool))); |
25dc40d24a44
Renamed VariablesDockWidget to WorkspaceView and optimized memory footprint for 30%.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13674
diff
changeset
|
384 connect (m_workspaceView, SIGNAL (activeChanged (bool)), showWorkspaceAction, SLOT (setChecked (bool))); |
13532
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
385 connect (showHistoryAction, SIGNAL (toggled (bool)), m_historyDockWidget, SLOT (setShown (bool))); |
13577
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13570
diff
changeset
|
386 connect (m_historyDockWidget, SIGNAL (activeChanged (bool)), showHistoryAction, SLOT (setChecked (bool))); |
13532
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
387 connect (showFileBrowserAction, SIGNAL (toggled (bool)), m_filesDockWidget, SLOT (setShown (bool))); |
13577
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13570
diff
changeset
|
388 connect (m_filesDockWidget, SIGNAL (activeChanged (bool)), showFileBrowserAction, SLOT (setChecked (bool))); |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
389 |
14286
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
390 //connect (this, SIGNAL (settingsChanged ()), m_workspaceView, SLOT (noticeSettings ())); |
728c8929385f
Commented out some functionality that has not been implemented correctly until now.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14283
diff
changeset
|
391 //connect (this, SIGNAL (settingsChanged ()), m_historyDockWidget, SLOT (noticeSettings ())); |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13534
diff
changeset
|
392 connect (this, SIGNAL (settingsChanged ()), m_filesDockWidget, SLOT (noticeSettings ())); |
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13534
diff
changeset
|
393 |
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13534
diff
changeset
|
394 connect (m_filesDockWidget, SIGNAL (openFile (QString)), this, SLOT (handleOpenFileRequest (QString))); |
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13534
diff
changeset
|
395 connect (m_historyDockWidget, SIGNAL (information (QString)), this, SLOT (reportStatusMessage (QString))); |
13546
5ef33f99a078
Command get inserted by double clicking in the command history again.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13542
diff
changeset
|
396 connect (m_historyDockWidget, SIGNAL (commandDoubleClicked (QString)), this, SLOT (handleCommandDoubleClicked (QString))); |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13534
diff
changeset
|
397 connect (saveWorkspaceAction, SIGNAL (triggered ()), this, SLOT (handleSaveWorkspaceRequest ())); |
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13534
diff
changeset
|
398 connect (loadWorkspaceAction, SIGNAL (triggered ()), this, SLOT (handleLoadWorkspaceRequest ())); |
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13534
diff
changeset
|
399 connect (clearWorkspaceAction, SIGNAL (triggered ()), this, SLOT (handleClearWorkspaceRequest ())); |
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13534
diff
changeset
|
400 |
13532
fd87d6f7e185
Dock windows are now selectable form the menus.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13531
diff
changeset
|
401 setWindowTitle (QString (VERSION_STRING)); |
13514
9accc22fd9b0
Added a version number.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13506
diff
changeset
|
402 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
403 setCentralWidget (m_centralMdiArea); |
13683
25dc40d24a44
Renamed VariablesDockWidget to WorkspaceView and optimized memory footprint for 30%.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13674
diff
changeset
|
404 addDockWidget (Qt::LeftDockWidgetArea, m_workspaceView); |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
405 addDockWidget (Qt::LeftDockWidgetArea, m_historyDockWidget); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
406 addDockWidget (Qt::RightDockWidgetArea, m_filesDockWidget); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
407 setStatusBar (m_statusBar); |
13501 | 408 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
409 readSettings (); |
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
410 openWebPage ("http://www.gnu.org/software/octave/doc/interpreter/"); |
13501 | 411 } |
412 |