itom
Loading...
Searching...
No Matches
workspaceDockWidget.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#ifndef WORKSPACEDOCKWIDGET_H
24#define WORKSPACEDOCKWIDGET_H
25
26#include "abstractDockWidget.h"
27#include "workspaceWidget.h"
28
29#include <qaction.h>
30#include <qevent.h>
31#include <qtoolbar.h>
32#include <qwidget.h>
33
34
35namespace ito {
36
37
39{
40 Q_OBJECT
41
42public:
44 const QString& title,
45 const QString& objName,
46 bool globalNotLocal,
47 QWidget* parent = NULL,
48 bool docked = true,
49 bool isDockAvailable = true,
50 tFloatingStyle floatingStyle = floatingNone,
51 tMovingStyle movingStyle = movingEnabled);
53
54protected:
55 // void closeEvent(QCloseEvent *event);
56 void dragEnterEvent(QDragEnterEvent* event);
57 void dropEvent(QDropEvent* event);
58
59 void createActions();
60 void createMenus();
61 void createToolBars();
62 void createStatusBar()
63 {
64 }
65 void updateActions();
66 void updatePythonActions()
67 {
69 }
70
71private:
72 bool m_globalNotLocal;
73
74 WorkspaceWidget* m_pWorkspaceWidget;
75 ShortcutAction* m_actDelete;
76 ShortcutAction* m_actRename;
77 ShortcutAction* m_actExport;
78 ShortcutAction* m_actImport;
79 QAction* m_actUnpack;
80 ShortcutAction* m_actClearAll;
81
82 // special actions
83 QAction* m_separatorSpecialActionsToolBar;
84 QAction* m_separatorSpecialActionsContextMenu;
85 QAction* m_separatorDisplayItemDetailsActionsToolBar;
86 QAction* m_separatorDisplayItemDetailsActionsContextMenu;
87 ShortcutAction* m_dObjPlot1d;
88 ShortcutAction* m_dObjPlot2d;
89 ShortcutAction* m_dObjPlot25d;
90 ShortcutAction* m_dObjPlot3d;
91
92 QToolBar* m_pMainToolBar;
93 QMenu* m_pContextMenu;
94 QTreeWidgetItem* m_firstCurrentItem;
95 QString m_firstCurrentItemKey;
96
97 void mnuPlotGeneric(const QString& plotClass);
98
99private slots:
100 void mnuDeleteItem();
101 void mnuExportItem();
102 void mnuImportItem();
103 void mnuRenameItem();
104 void mnuToggleUnpack();
105 void mnuPlot1D();
106 void mnuPlot2D();
107 void mnuPlot25D();
108 void mnuClearAll();
109
110 void treeWidgetItemSelectionChanged()
111 {
113 };
114 void treeWidgetItemChanged(QTreeWidgetItem* item, int column);
115 void treeViewContextMenuRequested(const QPoint& pos);
116
117public slots:
118 void checkToggleUnpack();
119 void propertiesChanged();
120
121signals:
122 void setStatusInformation(QString text, int timeout = 0);
123};
124
125} // end namespace ito
126
127#endif
abstract dock widget class which inherits QDockWidget. The content of QDockWidget consists of an inst...
Definition abstractDockWidget.h:55
tMovingStyle
The configuration if a docked AbstractDockWidget can be moved from one docking area to another one.
Definition abstractDockWidget.h:97
@ movingEnabled
Definition abstractDockWidget.h:99
tFloatingStyle
The floating style of a widget, derived from AbstractDockWidget.
Definition abstractDockWidget.h:89
@ floatingNone
Definition abstractDockWidget.h:90
Definition shortcutAction.h:41
docking widget for contents of type workspace widget
Definition workspaceDockWidget.h:39
void mnuRenameItem()
slot invoked if the rename button has been clicked in the menu
Definition workspaceDockWidget.cpp:473
void treeWidgetItemChanged(QTreeWidgetItem *item, int column)
slot invoked if name of element in workspaceWidget (TreeView) has been changed.
Definition workspaceDockWidget.cpp:914
void mnuDeleteItem()
slot invoked if the delete button has been clicked
Definition workspaceDockWidget.cpp:306
void mnuImportItem()
slot invoked if the import button has been clicked
Definition workspaceDockWidget.cpp:449
void createToolBars()
implementation for virtual method createToolBars in AbstractDockWidget.
Definition workspaceDockWidget.cpp:246
void mnuExportItem()
slot invoked if the import button has been clicked
Definition workspaceDockWidget.cpp:388
void mnuToggleUnpack()
slot invoked if the unpack dictionary button has been clicked in the menu
Definition workspaceDockWidget.cpp:495
~WorkspaceDockWidget()
destructor
Definition workspaceDockWidget.cpp:135
void updateActions()
updates the status of all actions of this widget
Definition workspaceDockWidget.cpp:774
WorkspaceDockWidget(const QString &title, const QString &objName, bool globalNotLocal, QWidget *parent=NULL, bool docked=true, bool isDockAvailable=true, tFloatingStyle floatingStyle=floatingNone, tMovingStyle movingStyle=movingEnabled)
constructor
Definition workspaceDockWidget.cpp:63
void createActions()
implementation for virtual method createActions in AbstractDockWidget.
Definition workspaceDockWidget.cpp:188
major class WorkspaceWidget to show a tree widget for the global and local workspace toolbox
Definition workspaceWidget.h:117
Definition apiFunctionsGraph.cpp:40