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::setHideWidgetsOfNonCurrentSteps
void setHideWidgetsOfNonCurrentSteps(bool newHideWidgetsOfNonCurrentSteps)
ctkWorkflowGroupBox::title
QString title() const
Get the title text (usually a few words), located in the top area.
ctkWorkflowGroupBox::setErrorText
virtual void setErrorText(const QString &newErrorText)
ctkWorkflowGroupBox::errorTextFormat
QString errorTextFormat() const
ctkWorkflowGroupBox::setSubTitleFormat
void setSubTitleFormat(const QString &format)
ctkWorkflowGroupBox::setErrorTextFormat
void setErrorTextFormat(const QString &format)
ctkWorkflowStep
ctkWorkflowStep is the basis for a workflow step.
Definition: ctkWorkflowStep.h:46
ctkWorkflowGroupBox::subTitleFormat
QString subTitleFormat() const
ctkWorkflowGroupBox::setPostText
void setPostText(const QString &newPostText)
ctkWorkflowGroupBox::postText
QString postText() const
Set/get the post-text, i.e. the contents of a convenience text section placed just below the client a...
ctkWorkflowGroupBox::setSubTitle
virtual void setSubTitle(const QString &newSubTitle)
ctkWorkflowGroupBox::d_ptr
QScopedPointer< ctkWorkflowGroupBoxPrivate > d_ptr
Definition: ctkWorkflowGroupBox.h:152
ctkWorkflowGroupBox::titleFormat
QString titleFormat() const
ctkWorkflowGroupBox
ctkWorkflowGroupBox is a widget displaying the user interface elements, title, description and/or err...
Definition: ctkWorkflowGroupBox.h:42
ctkWorkflowGroupBox::updateGroupBox
virtual void updateGroupBox(ctkWorkflowStep *currentStep)
ctkWorkflowGroupBox::ctkWorkflowGroupBox
ctkWorkflowGroupBox(QWidget *parent=0)
ctkWorkflowGroupBox::errorTextEnabled
bool errorTextEnabled() const
ctkWorkflowGroupBox::~ctkWorkflowGroupBox
virtual ~ctkWorkflowGroupBox()
ctkWorkflowGroupBox::setErrorTextEnabled
void setErrorTextEnabled(bool newErrorTextEnabled)
ctkWorkflowGroupBox::preText
QString preText() const
Set/get the pre-text, i.e. the contents of a convenience text section placed just above the client ar...
ctkWorkflowGroupBox::clientAreaLayout
QLayout * clientAreaLayout() const
Get the layout onto which step specific widgets are placed.
ctkPimpl.h
ctkWorkflowGroupBox::setTitleFormat
void setTitleFormat(const QString &format)
ctkWorkflowGroupBox::subTitle
QString subTitle() const
Set/get the subtitle text (usually a short sentence or two), located in the top area below the title.
ctkWorkflowGroupBox::hideWidgetsOfNonCurrentSteps
bool hideWidgetsOfNonCurrentSteps() const
ctkWorkflowGroupBox::errorText
QString errorText() const
Set/get the error text.
ctkWorkflowGroupBox::Superclass
QWidget Superclass
Definition: ctkWorkflowGroupBox.h:65
ctkWorkflowGroupBox::setPreText
void setPreText(const QString &newPreText)