Mercurial > octave-nkf
annotate gui/src/workspace-view.h @ 14720:cecc7da96e2a gui
Added update events for the command history model and workspace model.
* history-dockwidget.cc: Moved string list model to dock widget.
* octave-event-observer.h: Removed constness from accepted and rejected methods.
* octave-event.h: Removed constness from accepted and rejected methods, add new event types.
* octave-link: Almost removed all Qt code.
* workspace-model: Moved update timer to model.
* workspace-view: Model workspace model to widget.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Mon, 04 Jun 2012 21:28:08 +0200 |
parents | 89c64340e9ab |
children | e94a54ee0f46 |
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:
13577
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 | |
14290
faece6b2ab90
Corrected license headers in all files to GPL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13683
diff
changeset
|
5 * it under the terms of the GNU General Public License as |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13577
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:
13577
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 | |
14290
faece6b2ab90
Corrected license headers in all files to GPL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13683
diff
changeset
|
12 * GNU General Public License for more details. |
13501 | 13 * |
14290
faece6b2ab90
Corrected license headers in all files to GPL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13683
diff
changeset
|
14 * You should have received a copy of the GNU General Public License |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13577
diff
changeset
|
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
13501 | 16 */ |
17 | |
13683
25dc40d24a44
Renamed VariablesDockWidget to WorkspaceView and optimized memory footprint for 30%.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13678
diff
changeset
|
18 #ifndef WORKSPACEVIEW_H |
25dc40d24a44
Renamed VariablesDockWidget to WorkspaceView and optimized memory footprint for 30%.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13678
diff
changeset
|
19 #define WORKSPACEVIEW_H |
13501 | 20 |
21 #include <QDockWidget> | |
14664
664f54233c98
Extracted model code from the WorkspaceView and rearranged it in a new model class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14290
diff
changeset
|
22 #include <QTreeView> |
13501 | 23 #include <QSemaphore> |
14707
674740c44c09
Changed various files to matche file naming conventions.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14703
diff
changeset
|
24 #include "octave-link.h" |
13501 | 25 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
26 class workspace_view : public QDockWidget |
13501 | 27 { |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13523
diff
changeset
|
28 Q_OBJECT |
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13523
diff
changeset
|
29 public: |
14709
f50591409306
Started to rename class names and methods from camel case to underscore-
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14707
diff
changeset
|
30 workspace_view (QWidget * parent = 0); |
13501 | 31 |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13523
diff
changeset
|
32 public slots: |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
33 void handle_visibility_changed (bool visible); |
13683
25dc40d24a44
Renamed VariablesDockWidget to WorkspaceView and optimized memory footprint for 30%.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13678
diff
changeset
|
34 |
13577
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13541
diff
changeset
|
35 signals: |
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13541
diff
changeset
|
36 /** Custom signal that tells if a user has clicke away that dock widget. */ |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
37 void active_changed (bool active); |
13683
25dc40d24a44
Renamed VariablesDockWidget to WorkspaceView and optimized memory footprint for 30%.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13678
diff
changeset
|
38 |
13577
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13541
diff
changeset
|
39 protected: |
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13541
diff
changeset
|
40 void closeEvent (QCloseEvent *event); |
13683
25dc40d24a44
Renamed VariablesDockWidget to WorkspaceView and optimized memory footprint for 30%.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13678
diff
changeset
|
41 |
13501 | 42 private: |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
43 QTreeView *_workspace_tree_view; |
14719
89c64340e9ab
Extended event based communication model.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14712
diff
changeset
|
44 |
14720
cecc7da96e2a
Added update events for the command history model and workspace model.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
45 /** Stores the current workspace model. */ |
cecc7da96e2a
Added update events for the command history model and workspace model.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
46 workspace_model *_workspace_model; |
13501 | 47 }; |
48 | |
13683
25dc40d24a44
Renamed VariablesDockWidget to WorkspaceView and optimized memory footprint for 30%.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13678
diff
changeset
|
49 #endif // WORKSPACEVIEW_H |