CTK 0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkWorkflowAbstractPagedWidget.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 __ctkWorkflowAbstractPagedWidget_h
22#define __ctkWorkflowAbstractPagedWidget_h
23
24// Qt includes
25class QString;
26
27// CTK includes
28#include "ctkWorkflowWidget.h"
29#include "ctkPimpl.h"
30#include "ctkWidgetsExport.h"
31class ctkWorkflowStep;
32
33class ctkWorkflowAbstractPagedWidgetPrivate;
34
40class CTK_WIDGETS_EXPORT ctkWorkflowAbstractPagedWidget : public ctkWorkflowWidget
41{
42 Q_OBJECT
43
44public:
45
47 explicit ctkWorkflowAbstractPagedWidget(QWidget* newParent = 0);
49
51 virtual void associateStepWithLabel(ctkWorkflowStep* step, QString label);
52
56 virtual void associateStepWithPage(ctkWorkflowStep* step, int index);
57 virtual void associateStepWithPage(ctkWorkflowStep* step, int index, QString label);
58
62
63protected:
64
65 // Triggers updates of the workflowGroupBox on the current page, when the workflow step hyas
66 // changed.
67 virtual void updateStepUI(ctkWorkflowStep* currentStep);
68
69 virtual void initClientArea() = 0;
70
71 virtual QWidget* clientArea() = 0;
72
73 virtual void createNewPage(QWidget* widget) = 0;
74
75 virtual void showPage(QWidget* widget, const QString& label) = 0;
76
77protected:
78 QScopedPointer<ctkWorkflowAbstractPagedWidgetPrivate> d_ptr;
79
80private:
81 Q_DECLARE_PRIVATE(ctkWorkflowAbstractPagedWidget);
82 Q_DISABLE_COPY(ctkWorkflowAbstractPagedWidget);
83};
84
85#endif
virtual void showPage(QWidget *widget, const QString &label)=0
ctkWorkflowAbstractPagedWidget(QWidget *newParent=0)
virtual void associateStepWithLabel(ctkWorkflowStep *step, QString label)
Optionally specify the label to be displayed on the page shown for the given step.
QScopedPointer< ctkWorkflowAbstractPagedWidgetPrivate > d_ptr
virtual void initClientArea()=0
virtual void updateStepUI(ctkWorkflowStep *currentStep)
virtual ctkWorkflowGroupBox * workflowGroupBox(ctkWorkflowStep *step) const
virtual void associateStepWithPage(ctkWorkflowStep *step, int index, QString label)
virtual void associateStepWithPage(ctkWorkflowStep *step, int index)
virtual void createNewPage(QWidget *widget)=0
virtual QWidget * clientArea()=0
ctkWorkflowGroupBox is a widget displaying the user interface elements, title, description and/or err...
ctkWorkflowStep is the basis for a workflow step.
ctkWorkflowWidget is the basis for a workflow with a user interface. It groups together and manages a...
virtual Q_INVOKABLE ctkWorkflowGroupBox * workflowGroupBox() const