Mercurial > octave-nkf
annotate libgui/src/workspace-view.h @ 15196:017f0b2e6933
rename gui directory to libgu
* libgui: Rename from gui.
* .hgsub (libgui/qterminal): Rename from gui/qterminal.
* Makefile.am (GUIDIR): Set to libgui instead of gui if
AMCOND_BUILD_GUI is true.
* configure.ac (AC_CONFIG_FILES): Update list for directory renaming.
* Makefile.am (.NOTPARALLEL): Delete.
List octave.html/index.html as the primary HTML target, not
octave.html.
(octave.html): New target for making the octave.html directory.
(octave.pdf): Depend on octave.dvi.
* images.awk: In generated rules for png files, depend on octave.html,
not octave.html/index.html.
* src/Makefile.am (OCTAVE_GUI_CPPFLAGS, OCTAVE_GUI_LIBS): Update for
directory renaming.
(CLEANFILES): Fix typo.
* fntests.m (src_tree): Use libinterp, not src.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 18 Aug 2012 18:10:09 -0400 |
parents | gui/src/workspace-view.h@2d6766e93f7b |
children | 359098ad343e |
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" |
14726
e94a54ee0f46
Added debug events, debug mode detection and fixed compiling error.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14720
diff
changeset
|
25 #include "workspace-model.h" |
13501 | 26 |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
27 class workspace_view : public QDockWidget |
13501 | 28 { |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13523
diff
changeset
|
29 Q_OBJECT |
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13523
diff
changeset
|
30 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
|
31 workspace_view (QWidget * parent = 0); |
14997
2d6766e93f7b
The GUI now remembers when categories in the workspace view have been closed. Bug #36885
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14874
diff
changeset
|
32 ~workspace_view (); |
13501 | 33 |
13536
869c62c15e95
Few minor improvements, added advanced settings for file browser.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13523
diff
changeset
|
34 public slots: |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
35 void handle_visibility_changed (bool visible); |
14761
8c4d5029d933
Collapsing/Expanding items now works with a workaround.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
36 void model_changed (); |
13683
25dc40d24a44
Renamed VariablesDockWidget to WorkspaceView and optimized memory footprint for 30%.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13678
diff
changeset
|
37 |
13577
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13541
diff
changeset
|
38 signals: |
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13541
diff
changeset
|
39 /** 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
|
40 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
|
41 |
13577
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13541
diff
changeset
|
42 protected: |
e440b3f32f02
Fixed bug with closing subwindows.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13541
diff
changeset
|
43 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
|
44 |
14761
8c4d5029d933
Collapsing/Expanding items now works with a workaround.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
45 protected slots: |
8c4d5029d933
Collapsing/Expanding items now works with a workaround.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
46 void collapse_requested (QModelIndex index); |
8c4d5029d933
Collapsing/Expanding items now works with a workaround.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
47 void expand_requested (QModelIndex index); |
14874
5d74d8b982a5
Forgot to have a fallback lexer when the file suffix is unknown. Removed unused variable and added comments.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
14761
diff
changeset
|
48 void item_double_clicked (QModelIndex index); |
14761
8c4d5029d933
Collapsing/Expanding items now works with a workaround.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
49 |
13501 | 50 private: |
14712
5cb54cca8a06
Completion of code reformatting.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14709
diff
changeset
|
51 QTreeView *_workspace_tree_view; |
14719
89c64340e9ab
Extended event based communication model.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14712
diff
changeset
|
52 |
14720
cecc7da96e2a
Added update events for the command history model and workspace model.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14719
diff
changeset
|
53 /** 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
|
54 workspace_model *_workspace_model; |
14761
8c4d5029d933
Collapsing/Expanding items now works with a workaround.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
55 |
8c4d5029d933
Collapsing/Expanding items now works with a workaround.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
56 struct |
8c4d5029d933
Collapsing/Expanding items now works with a workaround.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
57 { |
8c4d5029d933
Collapsing/Expanding items now works with a workaround.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
58 bool local; |
8c4d5029d933
Collapsing/Expanding items now works with a workaround.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
59 bool global; |
8c4d5029d933
Collapsing/Expanding items now works with a workaround.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
60 bool persistent; |
8c4d5029d933
Collapsing/Expanding items now works with a workaround.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
61 bool hidden; |
8c4d5029d933
Collapsing/Expanding items now works with a workaround.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14726
diff
changeset
|
62 } _explicit_collapse; |
13501 | 63 }; |
64 | |
13683
25dc40d24a44
Renamed VariablesDockWidget to WorkspaceView and optimized memory footprint for 30%.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13678
diff
changeset
|
65 #endif // WORKSPACEVIEW_H |