itom  3.0.0
AIManagerWidget.h
1 /* ********************************************************************
2  itom software
3  URL: http://www.uni-stuttgart.de/ito
4  Copyright (C) 2016, Institut fuer Technische Optik (ITO),
5  Universitaet 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 ADDINMANAGERWIDGET_H
24 #define ADDINMANAGERWIDGET_H
25 
26 #include "../organizer/uiOrganizer.h"
27 #include "../../common/addInInterface.h"
28 #include "abstractDockWidget.h"
29 
30 #include <qdockwidget.h>
31 #include <qtreeview.h>
32 #include <qmenu.h>
33 #include <qaction.h>
34 #include <qsortfilterproxymodel.h>
35 
36 namespace ito
37 {
39  {
40  Q_OBJECT
41 
42  public:
43 // AIManagerWidget();
44  AIManagerWidget(const QString &title, const QString &objName, QWidget *parent = NULL, bool docked = true, bool isDockAvailable = true, tFloatingStyle floatingStyle = floatingNone, tMovingStyle movingStyle = movingEnabled);
45  ~AIManagerWidget();
46 
47  protected:
48 // QList<QAction*> getAlgoWidgetActions(const ito::AddInInterfaceBase *aib);
49  // void closeEvent(QCloseEvent *event) {};
50  QMenu* m_pContextMenu;
51  QMenu* m_pAIManagerViewSettingMenu;
52 
53  QToolBar* m_pMainToolbar;
54 
55  QAction *m_pShowConfDialog;
56  QAction *m_pActDockWidget;
57  QAction *m_pActDockWidgetToolbar;
58  QAction *m_pActNewInstance;
59  QAction *m_pActCloseInstance;
60  QAction *m_pActCloseAllInstances;
61  QAction *m_pActSendToPython;
62  QAction *m_pActLiveImage;
63  QAction *m_pActSnapDialog;
64  QAction *m_pActAutoGrabbing;
65  QAction *m_pActInfo;
66  QAction *m_pActOpenWidget;
67  QAction *m_pMainToolbarSeparator1;
68  QAction *m_pMainToolbarSeparator2;
69 
70  ShortcutAction* m_pViewList;
71  ShortcutAction* m_pViewDetails;
72 
73  void createActions();
74  void createMenus();
75  void createToolBars();
76  void createStatusBar(){}
77  void updateActions();
78  void updatePythonActions(){ updateActions(); }
79  void CloseInstance(const QModelIndex index);
80 
81  private:
82  QTreeView *m_pAIManagerView;
83  QSortFilterProxyModel *m_pSortFilterProxyModel;
84  int *m_pColumnWidth;
85 
86  public slots:
87 
88  private slots:
89  void treeViewContextMenuRequested(const QPoint &pos);
90  void selectionChanged(const QItemSelection& newSelection, const QItemSelection& oldSelection);
91  void mnuShowConfdialog();
92  void mnuToggleDockWidget();
93  void mnuCreateNewInstance();
94  void mnuCloseInstance();
95  void mnuCloseAllInstances();
96  void mnuSendToPython();
97  void mnuShowAlgoWidget(ito::AddInAlgo::AlgoWidgetDef* awd);
98  void mnuOpenWidget();
99  void mnuToggleView();
100  void mnuShowLiveImage();
101  void mnuSnapDialog();
102  void mnuToggleAutoGrabbing();
103  void setTreeViewHideColumns(const bool &hide, const int colCount);
104  void showList();
105  void showDetails();
106  void mnuShowInfo();
107 
108  signals:
109  void showPluginInfo(QString name, int type);
110  void showDockWidget();
111  };
112 
113 }; // namespace ito
114 
115 #endif
container for publishing widgets provided by any plugin
Definition: addInInterface.h:983
Definition: AIManagerWidget.h:38
Definition: apiFunctionsGraph.cpp:39
abstract dock widget class which inherits QDockWidget. The content of QDockWidget consists of an inst...
Definition: abstractDockWidget.h:45
Definition: abstractDockWidget.h:183
bool docked() const
Definition: abstractDockWidget.h:86