itom 1.0.14
D:/git-itom/sources/itom/Qitom/widgets/AIManagerWidget.h
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, 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_pActInfo;
00065             QAction *m_pActOpenWidget;
00066             QAction *m_pMainToolbarSeparator1;
00067             QAction *m_pMainToolbarSeparator2;
00068 
00069             ShortcutAction* m_pViewList;
00070             ShortcutAction* m_pViewDetails;
00071 
00072             void createActions();
00073             void createMenus();
00074             void createToolBars();
00075             void createStatusBar(){}
00076             void updateActions();
00077             void updatePythonActions(){ updateActions(); }
00078             void CloseInstance(const QModelIndex index);
00079 
00080         private:
00081             QTreeView *m_pAIManagerView;
00082             QSortFilterProxyModel *m_pSortFilterProxyModel;
00083             int *m_pColumnWidth;
00084 
00085         public slots:
00086 
00087         private slots:
00088             void treeViewContextMenuRequested(const QPoint &pos);
00089             void selectionChanged(const QItemSelection& newSelection, const QItemSelection& oldSelection);
00090             void mnuShowConfdialog();
00091                         void mnuToggleDockWidget();
00092             void mnuCreateNewInstance();
00093             void mnuCloseInstance();
00094             void mnuCloseAllInstances();
00095             void mnuSendToPython();
00096             void mnuShowAlgoWidget(ito::AddInAlgo::AlgoWidgetDef* awd);
00097             void mnuOpenWidget();
00098             void mnuToggleView();
00099             void mnuShowLiveImage();
00100             void setTreeViewHideColumns(const bool &hide, const int colCount);
00101             void showList();
00102             void showDetails();
00103     };
00104 
00105 };  // namespace ito
00106 
00107 #endif
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends