CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkWorkflowGroupBox.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Library: CTK
4 
5  Copyright (c) Kitware Inc.
6 
7  Licensed under the Apache License, Version 2.0 (the "License");
8  you may not use this file except in compliance with the License.
9  You may obtain a copy of the License at
10 
11  http://www.apache.org/licenses/LICENSE-2.0.txt
12 
13  Unless required by applicable law or agreed to in writing, software
14  distributed under the License is distributed on an "AS IS" BASIS,
15  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  See the License for the specific language governing permissions and
17  limitations under the License.
18 
19 =========================================================================*/
20 
21 #ifndef __ctkWorkflowGroupBox_h
22 #define __ctkWorkflowGroupBox_h
23 
24 // Qt includes
25 //#include <QGroupBox>
26 #include <QWidget>
27 class QString;
28 class QVBoxLayout;
29 class ctkWorkflowStep;
30 
31 // CTK includes
32 #include "ctkPimpl.h"
33 #include "ctkWidgetsExport.h"
34 
35 class ctkWorkflowGroupBoxPrivate;
36 
40 
41 class CTK_WIDGETS_EXPORT ctkWorkflowGroupBox : public QWidget
42 {
43  Q_OBJECT
44  Q_PROPERTY(QString preText READ preText WRITE setPreText)
45  Q_PROPERTY(QString postText READ postText WRITE setPostText)
49  Q_PROPERTY(QString titleFormat READ titleFormat WRITE setTitleFormat)
54  Q_PROPERTY(QString subTitleFormat READ subTitleFormat WRITE setSubTitleFormat)
59  Q_PROPERTY(QString errorTextFormat READ errorTextFormat WRITE setErrorTextFormat)
60  Q_PROPERTY(bool hideWidgetsOfNonCurrentSteps READ hideWidgetsOfNonCurrentSteps WRITE setHideWidgetsOfNonCurrentSteps)
61  Q_PROPERTY(bool errorTextEnabled READ errorTextEnabled WRITE setErrorTextEnabled)
62 
63 public:
64 
65  typedef QWidget Superclass;
66  explicit ctkWorkflowGroupBox(QWidget* parent = 0);
68 
72  QString title()const;
73 
78  QString subTitle()const;
79 
84  QString preText()const;
85  void setPreText(const QString& newPreText);
86 
91  QString postText()const;
92  void setPostText(const QString& newPostText);
93 
97  QString errorText()const;
98 
100  QLayout* clientAreaLayout()const;
101 
104  QString titleFormat()const;
105 
108  void setTitleFormat(const QString& format);
109 
112  QString subTitleFormat()const;
113 
116  void setSubTitleFormat(const QString& format);
117 
120  QString errorTextFormat()const;
121 
124  void setErrorTextFormat(const QString& format);
125 
132  void setHideWidgetsOfNonCurrentSteps(bool newHideWidgetsOfNonCurrentSteps);
133 
140  bool errorTextEnabled()const;
141  void setErrorTextEnabled(bool newErrorTextEnabled);
142 
143 public Q_SLOTS:
144 
145  virtual void updateGroupBox(ctkWorkflowStep* currentStep);
146 
147 protected:
148  virtual void setSubTitle(const QString& newSubTitle);
149  virtual void setErrorText(const QString& newErrorText);
150 
151 protected:
152  QScopedPointer<ctkWorkflowGroupBoxPrivate> d_ptr;
153 
154 private:
155  Q_DECLARE_PRIVATE(ctkWorkflowGroupBox);
156  Q_DISABLE_COPY(ctkWorkflowGroupBox);
157 
158 };
159 
160 #endif
161 
ctkWorkflowGroupBox is a widget displaying the user interface elements, title, description and/or err...
QString titleFormat() const
void setPostText(const QString &newPostText)
virtual ~ctkWorkflowGroupBox()
QString subTitleFormat() const
QString postText() const
Set/get the post-text, i.e. the contents of a convenience text section placed just below the client a...
void setErrorTextFormat(const QString &format)
virtual void updateGroupBox(ctkWorkflowStep *currentStep)
void setPreText(const QString &newPreText)
QString errorText() const
Set/get the error text.
virtual void setSubTitle(const QString &newSubTitle)
void setTitleFormat(const QString &format)
void setSubTitleFormat(const QString &format)
bool hideWidgetsOfNonCurrentSteps() const
QLayout * clientAreaLayout() const
Get the layout onto which step specific widgets are placed.
virtual void setErrorText(const QString &newErrorText)
QString preText() const
Set/get the pre-text, i.e. the contents of a convenience text section placed just above the client ar...
QString title() const
Get the title text (usually a few words), located in the top area.
QString subTitle() const
Set/get the subtitle text (usually a short sentence or two), located in the top area below the title.
void setErrorTextEnabled(bool newErrorTextEnabled)
QString errorTextFormat() const
bool errorTextEnabled() const
QScopedPointer< ctkWorkflowGroupBoxPrivate > d_ptr
ctkWorkflowGroupBox(QWidget *parent=0)
void setHideWidgetsOfNonCurrentSteps(bool newHideWidgetsOfNonCurrentSteps)
ctkWorkflowStep is the basis for a workflow step.