comparison gui/src/WorkspaceView.h @ 13683:25dc40d24a44

Renamed VariablesDockWidget to WorkspaceView and optimized memory footprint for 30%.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Fri, 30 Sep 2011 12:34:37 +0200
parents gui/src/VariablesDockWidget.h@117ae3cb156e
children 7ecaa8a66d5a faece6b2ab90
comparison
equal deleted inserted replaced
13682:c0e0625ffd13 13683:25dc40d24a44
1 /* OctaveGUI - A graphical user interface for Octave
2 * Copyright (C) 2011 Jacob Dawid (jacob.dawid@googlemail.com)
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License as
6 * published by the Free Software Foundation, either version 3 of the
7 * License, or (at your option) any later version.
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
12 * GNU Affero General Public License for more details.
13 *
14 * You should have received a copy of the GNU Affero General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #ifndef WORKSPACEVIEW_H
19 #define WORKSPACEVIEW_H
20
21 #include <QDockWidget>
22 #include <QTreeWidget>
23 #include <QSemaphore>
24 #include "OctaveLink.h"
25
26 class WorkspaceView:public QDockWidget
27 {
28 Q_OBJECT
29 public:
30 WorkspaceView (QWidget * parent = 0);
31
32 public slots:
33 void fetchSymbolTable ();
34 void handleVisibilityChanged (bool visible);
35
36 signals:
37 /** Custom signal that tells if a user has clicke away that dock widget. */
38 void activeChanged (bool active);
39
40 protected:
41 void closeEvent (QCloseEvent *event);
42
43 private:
44 void updateFromSymbolTable (QList < SymbolRecord > symbolTable);
45 void updateTreeEntry (QTreeWidgetItem * treeItem, SymbolRecord symbolRecord);
46 void updateScope (int topLevelItemIndex, QList < SymbolRecord > symbolTable);
47
48 QTreeWidget *m_variablesTreeWidget;
49 QSemaphore *m_updateSemaphore;
50 };
51
52 #endif // WORKSPACEVIEW_H