GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
QGoModesManagerWidget.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 __QGoModesManagerWidget_h
36 #define __QGoModesManagerWidget_h
37 
38 #include <QWidget>
39 #include <QStackedWidget>
40 #include <QVBoxLayout>
41 #include <QComboBox>
42 #include <QHash>
44 
54  public QWidget
55 {
56  Q_OBJECT
57 public:
58  explicit QGoModesManagerWidget(std::vector<QString> iVectChannels,
59  QStringList iListTimePoints, QWidget *iParent = 0);
61 
70  void AddWidgetWithModeName (std::string iModeName, QWidget* iWidget,
71  bool ModeNeedSeeds);
72 
79  void AddAlgoManagerWidget(QGoAlgorithmsManagerWidget* iAlgoManagerWidget,
80  bool ModeNeedSeeds, int iDefaultIndex = 0);
81 
88 
95 
101  void AddWidgetForManualMode(QWidget* iWidget,
102  QStringList iListTimePoint, bool ModeNeedSeeds);
103 
107  std::string GetCurrentImageName();
108  int GetSelectedTimePoint();
109  bool GetIsInvertedOn();
110 
111  void SetTSliceForClassicViewInAllAlgoModes(int iTimePoint);
113  QHash<QString, QColor> iListTimePoints, int iChannelNumber);
114 
118  std::string GetCurrentModeName();
119 
120 public slots:
126  void SetTheRightMode(int iIndex = -1);
127 
128 signals:
129  void SetSeedInteractorBehaviour(bool enable);
130  void ResetClicked();
131 
132 protected:
141 
142  void Initialize(std::vector<QString> iVectChannels, QStringList iListTimePoints);
143 
148  void CheckDefaultModes();
149 
150 
151 };
152 #endif
std::string GetCurrentImageName()
return the number of the selected channel
void SetTSliceForDopplerViewInAllAlgoModes(QHash< QString, QColor > iListTimePoints, int iChannelNumber)
void AddAlgoWidgetForSemiAutomaticMode(QGoAlgorithmWidget *iAlgoWidget)
add the iAlgoWidget directly in the QgoAlgomanager corresponding to the Semi Automatic mode ...
manages all the algorithms widget for a same mode, has a combobox with the name of the methods which ...
QGoModesManagerWidget(std::vector< QString > iVectChannels, QStringList iListTimePoints, QWidget *iParent=0)
widget that manages the different modes for the TraceEditingWidget, has a combobox with the mode name...
void SetTheRightMode(int iIndex=-1)
set the right mode according to the combobox if iIndex is different than -1 and emit a signal to enab...
QStackedWidget * m_ModeWidgets
void AddWidgetWithModeName(std::string iModeName, QWidget *iWidget, bool ModeNeedSeeds)
add a widget in the StackedWidget with the mode name that will be added in the combobox.
void SetSeedInteractorBehaviour(bool enable)
void CheckDefaultModes()
check that there is something in the default modes, if not, remove the mode name from the combobox ...
QGoAlgorithmsManagerWidget * m_AutoAlgoManagerWidget
QGoAlgorithmsManagerWidget * m_ManualModeManager
void Initialize(std::vector< QString > iVectChannels, QStringList iListTimePoints)
void AddAlgoWidgetForAutomaticMode(QGoAlgorithmWidget *iAlgoWidget)
add the iAlgoWidget directly in the QgoAlgomanager corresponding to the Automatic mode ...
void AddAlgoManagerWidget(QGoAlgorithmsManagerWidget *iAlgoManagerWidget, bool ModeNeedSeeds, int iDefaultIndex=0)
add a QGoAlgorithmsManagerWidget and set the default index of this algo widget to iDefaultIndex ...
void AddWidgetForManualMode(QWidget *iWidget, QStringList iListTimePoint, bool ModeNeedSeeds)
create the "manual" mode and makes it correspond to the provided widget
std::string GetCurrentModeName()
return the mode name currently selected in the combobox
void SetTSliceForClassicViewInAllAlgoModes(int iTimePoint)
QGoAlgorithmsManagerWidget * m_SemiAutoAlgoManagerWidget