itom 1.4.0
|
00001 /* ******************************************************************** 00002 itom software 00003 URL: http://www.uni-stuttgart.de/ito 00004 Copyright (C) 2013, Institut für Technische Optik (ITO), 00005 Universität Stuttgart, Germany 00006 00007 This file is part of itom. 00008 00009 itom is free software; you can redistribute it and/or modify it 00010 under the terms of the GNU Library General Public Licence as published by 00011 the Free Software Foundation; either version 2 of the Licence, or (at 00012 your option) any later version. 00013 00014 itom is distributed in the hope that it will be useful, but 00015 WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library 00017 General Public Licence for more details. 00018 00019 You should have received a copy of the GNU Library General Public License 00020 along with itom. If not, see <http://www.gnu.org/licenses/>. 00021 *********************************************************************** */ 00022 00023 #ifndef ADDINMANAGERWIDGET_H 00024 #define ADDINMANAGERWIDGET_H 00025 00026 #include "../organizer/uiOrganizer.h" 00027 #include "../../common/addInInterface.h" 00028 #include "abstractDockWidget.h" 00029 00030 #include <qdockwidget.h> 00031 #include <qtreeview.h> 00032 #include <qmenu.h> 00033 #include <qaction.h> 00034 #include <qsortfilterproxymodel.h> 00035 00036 namespace ito 00037 { 00038 class AIManagerWidget : public AbstractDockWidget 00039 { 00040 Q_OBJECT 00041 00042 public: 00043 // AIManagerWidget(); 00044 AIManagerWidget(const QString &title, const QString &objName, QWidget *parent = NULL, bool docked = true, bool isDockAvailable = true, tFloatingStyle floatingStyle = floatingNone, tMovingStyle movingStyle = movingEnabled); 00045 ~AIManagerWidget(); 00046 00047 protected: 00048 // QList<QAction*> getAlgoWidgetActions(const ito::AddInInterfaceBase *aib); 00049 // void closeEvent(QCloseEvent *event) {}; 00050 QMenu* m_pContextMenu; 00051 QMenu* m_pAIManagerViewSettingMenu; 00052 00053 QToolBar* m_pMainToolbar; 00054 00055 QAction *m_pShowConfDialog; 00056 QAction *m_pActDockWidget; 00057 QAction *m_pActDockWidgetToolbar; 00058 QAction *m_pActNewInstance; 00059 QAction *m_pActCloseInstance; 00060 QAction *m_pActCloseAllInstances; 00061 QAction *m_pActSendToPython; 00062 QAction *m_pActLiveImage; 00063 QAction *m_pActSnapDialog; 00064 QAction *m_pActAutoGrabbing; 00065 QAction *m_pActInfo; 00066 QAction *m_pActOpenWidget; 00067 QAction *m_pMainToolbarSeparator1; 00068 QAction *m_pMainToolbarSeparator2; 00069 00070 ShortcutAction* m_pViewList; 00071 ShortcutAction* m_pViewDetails; 00072 00073 void createActions(); 00074 void createMenus(); 00075 void createToolBars(); 00076 void createStatusBar(){} 00077 void updateActions(); 00078 void updatePythonActions(){ updateActions(); } 00079 void CloseInstance(const QModelIndex index); 00080 00081 private: 00082 QTreeView *m_pAIManagerView; 00083 QSortFilterProxyModel *m_pSortFilterProxyModel; 00084 int *m_pColumnWidth; 00085 00086 public slots: 00087 00088 private slots: 00089 void treeViewContextMenuRequested(const QPoint &pos); 00090 void selectionChanged(const QItemSelection& newSelection, const QItemSelection& oldSelection); 00091 void mnuShowConfdialog(); 00092 void mnuToggleDockWidget(); 00093 void mnuCreateNewInstance(); 00094 void mnuCloseInstance(); 00095 void mnuCloseAllInstances(); 00096 void mnuSendToPython(); 00097 void mnuShowAlgoWidget(ito::AddInAlgo::AlgoWidgetDef* awd); 00098 void mnuOpenWidget(); 00099 void mnuToggleView(); 00100 void mnuShowLiveImage(); 00101 void mnuToggleAutoGrabbing(); 00102 void setTreeViewHideColumns(const bool &hide, const int colCount); 00103 void showList(); 00104 void showDetails(); 00105 void mnuShowInfo(); 00106 00107 signals: 00108 void showPluginInfo(QString name, int type); 00109 void showDockWidget(); 00110 }; 00111 00112 }; // namespace ito 00113 00114 #endif