CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkCmdLineModuleFrontendQtGui.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  Library: CTK
4 
5  Copyright (c) German Cancer Research Center,
6  Division of Medical and Biological Informatics
7 
8  Licensed under the Apache License, Version 2.0 (the "License");
9  you may not use this file except in compliance with the License.
10  You may obtain a copy of the License at
11 
12  http://www.apache.org/licenses/LICENSE-2.0
13 
14  Unless required by applicable law or agreed to in writing, software
15  distributed under the License is distributed on an "AS IS" BASIS,
16  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  See the License for the specific language governing permissions and
18  limitations under the License.
19 
20 =============================================================================*/
21 
22 #ifndef CTKCMDLINEMODULEFRONTENDQTGUI_H
23 #define CTKCMDLINEMODULEFRONTENDQTGUI_H
24 
26 
27 #include "ctkCommandLineModulesFrontendQtGuiExport.h"
28 
31 
32 class QUiLoader;
33 class QWidget;
34 
35 struct ctkCmdLineModuleFrontendQtGuiPrivate;
36 
123 class CTK_CMDLINEMODULEQTGUI_EXPORT ctkCmdLineModuleFrontendQtGui : public ctkCmdLineModuleFrontend
124 {
125 
126 public:
127 
130 
131  // ctkCmdLineModuleFrontend overrides
132 
139  virtual QObject* guiHandle() const;
140 
153  virtual QVariant value(const QString& parameter, int role = LocalResourceRole) const;
154 
167  virtual void setValue(const QString& parameter, const QVariant& value, int role = DisplayRole);
168 
169  virtual QList<QString> parameterNames() const;
170 
178  virtual void setParameterContainerEnabled(const bool& enabled);
179 
180 protected:
181 
191  virtual QUiLoader* uiLoader() const;
192 
202  virtual ctkCmdLineModuleXslTransform* xslTransform() const;
203 
215  QVariant customValue(const QString& parameter, const QString& propertyName = QString()) const;
216 
228  void setCustomValue(const QString& parameter, const QVariant& value, const QString& propertyName = QString()) ;
229 
230 private:
231 
232  QScopedPointer<ctkCmdLineModuleFrontendQtGuiPrivate> d;
233 
234 };
235 
236 #endif // CTKCMDLINEMODULEFRONTENDQTGUI_H
Abstract base class for all front-end command line module implementations.A module front-end represen...
A Qt based implementation of the module front end.This class is able to generate a Qt widgets based G...
virtual void setValue(const QString &parameter, const QVariant &value, int role=DisplayRole)=0
Set the value of a certain parameter.
Transforms a given XML input using an XML stylesheet.
virtual QVariant value(const QString &parameter, int role=LocalResourceRole) const =0
GUIs will need to be able to read parameters, here we retrieve by role.
virtual QObject * guiHandle() const =0
Returns the GUI representation.
virtual QList< QString > parameterNames() const
Returns a list of all valid parameter names.
Defines a reference or handle to a module, including location, XML, description and access to the ass...