GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
QGoTabElementBase.h
Go to the documentation of this file.
1 /*=========================================================================
2  Authors: The GoFigure Dev. Team.
3  at Megason Lab, Systems biology, Harvard Medical school, 2009-11
4 
5  Copyright (c) 2009-11, President and Fellows of Harvard College.
6  All rights reserved.
7 
8  Redistribution and use in source and binary forms, with or without
9  modification, are permitted provided that the following conditions are met:
10 
11  Redistributions of source code must retain the above copyright notice,
12  this list of conditions and the following disclaimer.
13  Redistributions in binary form must reproduce the above copyright notice,
14  this list of conditions and the following disclaimer in the documentation
15  and/or other materials provided with the distribution.
16  Neither the name of the President and Fellows of Harvard College
17  nor the names of its contributors may be used to endorse or promote
18  products derived from this software without specific prior written
19  permission.
20 
21  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
25  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
27  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
28  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
30  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 
33 =========================================================================*/
34 
35 #ifndef __QGoTabElementBase_h
36 #define __QGoTabElementBase_h
37 
38 #include <QMainWindow>
39 #include <QDir>
40 #include <QStatusBar>
41 
42 #include "QGoPlugin.h"
43 #include "QGoDockWidgetStatus.h"
44 
45 #include "QGoGUILibConfigure.h"
46 #include "QGoTraceSettingsWidget.h"
47 #include "QGoToolBarStatus.h"
48 
49 class QAction;
50 class QActionGroup;
51 class QMenu;
52 class QToolBar;
53 class QDockWidget;
54 class QGoPluginManager;
55 
61 class QGOGUILIB_EXPORT QGoTabElementBase:public QMainWindow
62 {
63  Q_OBJECT
64 public:
66  explicit QGoTabElementBase(QWidget *parent = 0);
67 
69  virtual ~QGoTabElementBase();
70 
71  typedef std::pair< QGoDockWidgetStatus *, QDockWidget * > QGoDockWidgetStatusPair;
72 
74  virtual GoFigure::TabDimensionType GetTabDimensionType() const = 0;
75 
76  virtual std::list< QGoToolBarStatus* > GetToolBarsStatus();
77 
79  virtual std::vector< QAction * > ViewActions();
80 
82  virtual std::vector< QAction * > ViewNoToolBarActions();
83 
85  virtual std::vector< QAction * > SegmentationActions();
86 
88  virtual std::vector< QAction * > ToolsActions();
89 
91  virtual std::vector< QAction * > BookmarkActions();
92 
94  //virtual std::vector< QAction * > ModeActions();
95 
97  //virtual std::vector< QAction * > TracesActions();
98  //virtual QGoToolBarStatus* TracesActions();
99 
101  //virtual QGoTraceSettingsWidget* TraceSettingsWidget();
102 
104  virtual std::list< QGoDockWidgetStatusPair > & DockWidget();
105 
106 // virtual QStatusBar* StatusBar();
107 
108  virtual std::list< QAction * > GetPluginActions();
109 
110  virtual void SetPluginActions(std::list< QAction * > iList);
111 
113  virtual void WriteSettings() = 0;
114 
116  virtual void ReadSettings() = 0;
117 
121  virtual void DefaultInteractorBehavior(bool){}
126  virtual void ZoomInteractorBehavior(bool){}
130  virtual void TranslateInteractorBehavior(bool){}
131 
132  void SetStatusBarPointer(QStatusBar* iStatusbar);
133 
134  //virtual void SetTraceSettingsToolBar(QToolBar* iToolBar);
135 
136  virtual void CreateModeToolBar(QMenu* iMenu, QToolBar* iToolBar);
137  virtual void CreateViewToolBar(QMenu* iMenu, QToolBar* iToolBar);
138 
139 protected:
140  std::list< QAction * > m_PluginActionList;
141 
142  std::vector< QAction * > m_ViewActions;
144  std::vector< QAction* > m_ViewNoToolBarActions;
145  std::vector< QAction * > m_SegmentationActions;
146  std::vector< QAction * > m_ToolsActions;
147  std::vector< QAction * > m_BookmarkActions;
148  //std::vector< QAction * > m_ModeActions;
150  //std::vector< QAction * > m_TracesActions;
151  //QGoToolBarStatus* m_TracesActions;
152  //QGoTraceSettingsWidget* m_TraceSettingsWidgetForToolBar;
153  //QToolBar* m_TraceSettingsToolBar;
154 
155  std::list< QGoDockWidgetStatusPair > m_DockWidgetList;
156  std::list< QGoToolBarStatus* > m_ToolBarList;
158 
159 private:
160  Q_DISABLE_COPY(QGoTabElementBase);
161 };
162 #endif
Abstract class for one tab element in GoFigure2.
std::list< QGoDockWidgetStatusPair > m_DockWidgetList
virtual void TranslateInteractorBehavior(bool)
Mouse interaction style allows user to Translate volume with all buttons.
QGoToolBarStatus * m_ViewActionsMenuToolBar
std::pair< QGoDockWidgetStatus *, QDockWidget * > QGoDockWidgetStatusPair
virtual void ZoomInteractorBehavior(bool)
Mouse interaction style allows user to zoom in/out volume with all buttons.
std::vector< QAction * > m_SegmentationActions
virtual void DefaultInteractorBehavior(bool)
Mouse interaction style set as default.
std::vector< QAction * > m_ToolsActions
std::list< QGoToolBarStatus * > m_ToolBarList
std::vector< QAction * > m_ViewNoToolBarActions
QStatusBar * m_StatusBar
std::vector< QAction * > m_ViewActions
std::list< QAction * > m_PluginActionList
std::vector< QAction * > m_BookmarkActions
QGoToolBarStatus * m_ModeToolBar