26 |
27 | class QVariant;
28 |
29 | /**
30 | * Like a QRunnable, an object which captures a block of code which can
31 | * be passed around and executed as well as stopped. Unlike standard runnables,
32 | * paramaterized runnables allow an arbitrary QVariant to be passed in when the
33 | * block is evaluated.
34 | *
35 | * Clients may implement this interface.
36 | *
37 | */
38 | struct CTK_PLUGINFW_EXPORT ctkApplicationRunnable
39 | {
40 |
41 | virtual ~ctkApplicationRunnable();
42 |
43 | /**
44 | * Executes the block of code encapsulated by this runnable in the context of
45 | * the given object and returns the result. The result may be an invalid QVariant.
46 | *
47 | * @param context the context for evaluating the runnable
48 | * @return the result of evaluating the runnable in the given context
49 | * @throws std::exception if there is a problem running this runnable
50 | */
51 | virtual QVariant run(const QVariant& context) = 0;
52 |
53 | /**
54 | * Forces this runnable to stop.
55 | */
56 | virtual void stop() = 0;
57 |
58 | };
59 |
60 | #endif // CTKAPPLICATIONRUNNABLE_H
61 |
--------------------------------------------------------------------------------
/includes/ctk-0.1/ctkPopupWidget_p.h:
--------------------------------------------------------------------------------
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 __ctkPopupWidget_p_h
22 | #define __ctkPopupWidget_p_h
23 |
24 | // CTK includes
25 | #include "ctkBasePopupWidget_p.h"
26 | #include "ctkPopupWidget.h"
27 |
28 | // -------------------------------------------------------------------------
29 | /// \ingroup Widgets
30 | class CTK_WIDGETS_EXPORT ctkPopupWidgetPrivate
31 | : public ctkBasePopupWidgetPrivate
32 | {
33 | Q_OBJECT
34 | Q_DECLARE_PUBLIC(ctkPopupWidget);
35 | public:
36 | typedef ctkBasePopupWidgetPrivate Superclass;
37 | ctkPopupWidgetPrivate(ctkPopupWidget& object);
38 | ~ctkPopupWidgetPrivate();
39 |
40 | virtual void init();
41 |
42 | // Return the widget if the mouse cursor is above any of the focus widgets or their
43 | // children.
44 | // If the cursor is above a child widget, install the event filter to listen
45 | // when the cursor leaves the widget.
46 | virtual QWidget* mouseOver();
47 |
48 | virtual bool eventFilter(QObject* obj, QEvent* event);
49 |
50 | void temporarilyHiddenOn();
51 | void temporarilyHiddenOff();
52 |
53 | bool isHidingCandidate(QWidget* widget)const;
54 |
55 | public Q_SLOTS:
56 | void updateVisibility();
57 | void onApplicationDeactivate();
58 |
59 | protected:
60 | bool Active;
61 | bool AutoShow;
62 | int ShowDelay;
63 | bool AutoHide;
64 | int HideDelay;
65 | };
66 |
67 | #endif
68 |
--------------------------------------------------------------------------------
/includes/ctk-0.1/ctkTransferFunctionGradientItem.h:
--------------------------------------------------------------------------------
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 __ctkTransferFunctionGradientItem_h
22 | #define __ctkTransferFunctionGradientItem_h
23 |
24 | /// Qt includes
25 | #include
26 | #include
27 |
28 | /// CTK includes
29 | #include "ctkWidgetsExport.h"
30 | #include "ctkPimpl.h"
31 | #include "ctkTransferFunctionItem.h"
32 |
33 | class ctkTransferFunctionGradientItemPrivate;
34 |
35 | //-----------------------------------------------------------------------------
36 | /// \ingroup Widgets
37 | class CTK_WIDGETS_EXPORT ctkTransferFunctionGradientItem: public ctkTransferFunctionItem
38 | {
39 | Q_OBJECT
40 | Q_PROPERTY(bool mask READ mask WRITE setMask)
41 |
42 | public:
43 | ctkTransferFunctionGradientItem(QGraphicsItem* parent = 0);
44 | ctkTransferFunctionGradientItem(ctkTransferFunction* transferFunction,
45 | QGraphicsItem* parent = 0);
46 | virtual ~ctkTransferFunctionGradientItem();
47 |
48 | virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0);
49 |
50 | bool mask()const;
51 | void setMask(bool mask);
52 |
53 | protected:
54 | QScopedPointer d_ptr;
55 |
56 | private:
57 | Q_DECLARE_PRIVATE(ctkTransferFunctionGradientItem);
58 | Q_DISABLE_COPY(ctkTransferFunctionGradientItem);
59 | };
60 |
61 | #endif
62 |
--------------------------------------------------------------------------------
/includes/ctk-0.1/service/datalocation/ctkLocation.cpp:
--------------------------------------------------------------------------------
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 | #include "ctkLocation.h"
23 |
24 | const QString ctkLocation::INSTANCE_FILTER = QString("(&(objectClass=") +
25 | qobject_interface_iid() +
26 | ")(type=ctk.instance.area))";
27 |
28 | const QString ctkLocation::INSTALL_FILTER = QString("(&(objectClass=") +
29 | qobject_interface_iid() +
30 | ")(type=ctk.install.area))";
31 |
32 | const QString ctkLocation::CONFIGURATION_FILTER = QString("(&(objectClass=") +
33 | qobject_interface_iid() +
34 | ")(type=ctk.configuration.area))";
35 |
36 | const QString ctkLocation::USER_FILTER = QString("(&(objectClass=") +
37 | qobject_interface_iid() +
38 | ")(type=ctk.user.area))";
39 |
40 | const QString ctkLocation::CTK_HOME_FILTER = QString("(&(objectClass=") +
41 | qobject_interface_iid() +
42 | ")(type=ctk.home.location))";
43 |
--------------------------------------------------------------------------------
/includes/ctk-0.1/ctkAbstractQObjectFactory.h:
--------------------------------------------------------------------------------
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 __ctkAbstractQObjectFactory_h
22 | #define __ctkAbstractQObjectFactory_h
23 |
24 | // Qt includes
25 | #include
26 |
27 | // CTK includes
28 | #include "ctkAbstractObjectFactory.h"
29 |
30 | //----------------------------------------------------------------------------
31 | /// \ingroup Core
32 | template
33 | class ctkAbstractQObjectFactory : public ctkAbstractObjectFactory
34 | {
35 | public:
36 |
37 | /// Constructor/Desctructor
38 | explicit ctkAbstractQObjectFactory();
39 | virtual ~ctkAbstractQObjectFactory();
40 |
41 | /// \brief Return a name allowing to uniquely identify the QObject
42 | /// By default, it return \a objectName obtained using staticMetaObject.className()
43 | virtual QString objectNameToKey(const QString& objectName);
44 |
45 | /// \brief Register an object in the factory
46 | /// The parameter \a key passed by reference will be updated with the
47 | /// associated object name obtained using objectNameToKey(const QString&)
48 | template
49 | bool registerQObject(QString& key);
50 |
51 | private:
52 | ctkAbstractQObjectFactory(const ctkAbstractQObjectFactory &); /// Not implemented
53 | void operator=(const ctkAbstractQObjectFactory&); /// Not implemented
54 | };
55 |
56 | #include "ctkAbstractQObjectFactory.tpp"
57 |
58 | #endif
59 |
--------------------------------------------------------------------------------
/includes/ctk-0.1/ctkFittedTextBrowser_p.h:
--------------------------------------------------------------------------------
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 __ctkFittedTextBrowser_p_h
22 | #define __ctkFittedTextBrowser_p_h
23 |
24 | // CTK includes
25 | #include "ctkFittedTextBrowser.h"
26 |
27 | //-----------------------------------------------------------------------------
28 | /// \ingroup Widgets
29 | class CTK_WIDGETS_EXPORT ctkFittedTextBrowserPrivate
30 | {
31 | Q_DECLARE_PUBLIC(ctkFittedTextBrowser);
32 |
33 | protected:
34 | ctkFittedTextBrowser* const q_ptr;
35 |
36 | public:
37 | ctkFittedTextBrowserPrivate(ctkFittedTextBrowser& object);
38 | virtual ~ctkFittedTextBrowserPrivate();
39 |
40 | // Update collapsed/expanded text in the widget.
41 | void updateCollapsedText();
42 |
43 | // Get collapsed/expanded text in html format from plain text.
44 | QString collapsedTextFromPlainText() const;
45 | // Get collapsed/expanded text in html format from html.
46 | QString collapsedTextFromHtml() const;
47 |
48 | // Get more/less link in html format
49 | QString collapseLinkText() const;
50 |
51 | bool Collapsed;
52 |
53 | QString ShowDetailsText;
54 | QString HideDetailsText;
55 |
56 | // Stores the text that the user originally set.
57 | QString CollapsibleText;
58 |
59 | enum CollapsibleTextSetMethod
60 | {
61 | Text,
62 | PlainText,
63 | Html
64 | };
65 |
66 | // Stores what method the user called to set text
67 | CollapsibleTextSetMethod CollapsibleTextSetter;
68 | };
69 |
70 | #endif
71 |
--------------------------------------------------------------------------------
/includes/ctk-0.1/org.commontk.metatype/ctkMetaTypeServiceImpl_p.h:
--------------------------------------------------------------------------------
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 |
23 | #ifndef CTKMETATYPESERVICEIMPL_P_H
24 | #define CTKMETATYPESERVICEIMPL_P_H
25 |
26 | #include
27 | #include
28 |
29 | #include
30 |
31 | /**
32 | * Implementation of ctkMetaTypeService
33 | */
34 | class ctkMetaTypeServiceImpl : public QObject, public ctkMetaTypeService
35 | {
36 | Q_OBJECT
37 | Q_INTERFACES(ctkMetaTypeService)
38 |
39 | private:
40 |
41 | QMutex _mtpsMutex;
42 | QHash _mtps;
43 |
44 | ctkLogService* const logger;
45 | ctkServiceTracker<>* metaTypeProviderTracker;
46 |
47 | public:
48 |
49 | /**
50 | * Constructor of class ctkMetaTypeServiceImpl.
51 | */
52 | ctkMetaTypeServiceImpl(ctkLogService* logger, ctkServiceTracker<>* metaTypeProviderTracker);
53 |
54 | /*
55 | * @see ctkMetaTypeService#getMetaTypeInformation()
56 | */
57 | ctkMetaTypeInformationPtr getMetaTypeInformation(const QSharedPointer& plugin);
58 |
59 | public Q_SLOTS:
60 |
61 | void pluginChanged(const ctkPluginEvent& event);
62 |
63 | private:
64 |
65 | /**
66 | * Internal Method - to get ctkMetaTypeProvider object.
67 | */
68 | ctkMetaTypeInformationPtr getMetaTypeProvider(const QSharedPointer& p);
69 |
70 | };
71 |
72 | #endif // CTKMETATYPESERVICEIMPL_P_H
73 |
--------------------------------------------------------------------------------
/includes/ctk-0.1/ctkCheckBox.h:
--------------------------------------------------------------------------------
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 __ctkCheckBox_h
22 | #define __ctkCheckBox_h
23 |
24 | // QT includes
25 | #include
26 |
27 | // CTK includes
28 | #include "ctkWidgetsExport.h"
29 |
30 | class ctkCheckBoxPrivate;
31 |
32 | /// \ingroup Widgets
33 | /// ctkCheckBox is an advanced QCheckBox that gives more control
34 | /// over its look and feel.
35 | /// We can change the indicator check box by a new QIcon, with two mode On/Off.
36 | /// The indicator icon size can be controled. see setIndicatorIconSize()
37 |
38 | class CTK_WIDGETS_EXPORT ctkCheckBox : public QCheckBox
39 | {
40 | Q_OBJECT
41 | Q_PROPERTY(QIcon indicatorIcon READ indicatorIcon WRITE setIndicatorIcon)
42 | Q_PROPERTY(QSize indicatorIconSize READ indicatorIconSize WRITE setIndicatorIconSize)
43 |
44 | public:
45 | typedef QCheckBox Superclass;
46 |
47 | ctkCheckBox(QWidget *_parent = 0);
48 | virtual ~ctkCheckBox();
49 |
50 | void setIndicatorIcon(const QIcon& newIcon);
51 | QIcon indicatorIcon() const;
52 |
53 | /// Resize the indicator icon to Qsize.
54 | /// If newSize is bigger than the indicator icon's maximum size,
55 | /// The icon will get the icon's maximum size and not newSize.
56 | void setIndicatorIconSize(const QSize& newSize);
57 | QSize indicatorIconSize() const;
58 |
59 | protected:
60 | QScopedPointer d_ptr;
61 |
62 | private:
63 | Q_DECLARE_PRIVATE(ctkCheckBox);
64 | Q_DISABLE_COPY(ctkCheckBox);
65 | };
66 |
67 | #endif
68 |
--------------------------------------------------------------------------------
/includes/ctk-0.1/service/event/ctkEventConstants.cpp:
--------------------------------------------------------------------------------
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 | #include "ctkEventConstants.h"
23 |
24 |
25 | const QString ctkEventConstants::EVENT_TOPIC = "event.topics";
26 | const QString ctkEventConstants::EVENT_FILTER = "event.filter";
27 |
28 | const QString ctkEventConstants::EVENT_DELIVERY = "event.delivery";
29 | const QString ctkEventConstants::DELIVERY_ASYNC_ORDERED = "async.ordered";
30 | const QString ctkEventConstants::DELIVERY_ASYNC_UNORDERED = "async.unordered";
31 |
32 | const QString ctkEventConstants::PLUGIN_SYMBOLICNAME = "plugin.symbolicName";
33 | const QString ctkEventConstants::PLUGIN_ID = "plugin.id";
34 | const QString ctkEventConstants::PLUGIN = "plugin";
35 | const QString ctkEventConstants::PLUGIN_VERSION = "plugin.version";
36 |
37 | const QString ctkEventConstants::EVENT = "event";
38 | const QString ctkEventConstants::EXCEPTION = "exception";
39 | const QString ctkEventConstants::EXCEPTION_CLASS = "exception.class";
40 | const QString ctkEventConstants::EXCEPTION_MESSAGE = "exception.message";
41 | const QString ctkEventConstants::MESSAGE = "message";
42 | const QString ctkEventConstants::SERVICE = "service";
43 | const QString ctkEventConstants::SERVICE_ID = "service.id";
44 | const QString ctkEventConstants::SERVICE_OBJECTCLASS = "service.objectClass";
45 | const QString ctkEventConstants::SERVICE_PID = "service.pid";
46 | const QString ctkEventConstants::TIMESTAMP = "timestamp";
47 |
--------------------------------------------------------------------------------
/libs/ctk-0.1/CMake/ctkFunctionAddPluginRepo.cmake:
--------------------------------------------------------------------------------
1 | function(ctkFunctionAddPluginRepo)
2 |
3 | ctkMacroParseArguments("" "NAME;GIT_URL;GIT_TAG;GIT_PROTOCOL" "" ${ARGN})
4 |
5 | foreach(_required_arg NAME)
6 | if(NOT _${_required_arg})
7 | message(FATAL_ERROR "${_required_arg} is empty")
8 | endif()
9 | endforeach()
10 |
11 | if(NOT _GIT_URL AND NOT ${_NAME}_DIR)
12 | message(FATAL_ERROR "Either ${_NAME}_DIR or GIT_URL must be set")
13 | endif()
14 |
15 | if(NOT ${_NAME}_DIR)
16 | ctkFunctionCheckoutRepo(
17 | NAME ${_NAME}
18 | GIT_URL ${_GIT_URL}
19 | GIT_TAG ${_GIT_TAG}
20 | GIT_PROTOCOL ${_GIT_PROTOCOL}
21 | )
22 | endif()
23 |
24 | set(_gitmodules_files ${${_NAME}_DIR}/.gitmodules)
25 | if(NOT EXISTS ${_gitmodules_files})
26 | message(FATAL_ERROR "The repository at ${${_NAME}_DIR} does not contain a .gitmodules file")
27 | endif()
28 |
29 | # Parse the .gitmodules file and add the submodules as contributed plugins
30 | file(STRINGS "${_gitmodules_files}" _plugin_paths REGEX "path =.*")
31 | foreach(_plugin_path ${_plugin_paths})
32 | string(REPLACE " = " ";" _plugin_path_list ${_plugin_path})
33 | list(GET _plugin_path_list 1 _plugin_name)
34 | ctk_plugin_option(${_plugin_name} "Build the ${_plugin_name} plugin." OFF)
35 |
36 | # Push the value which might have been changed in ctk_plugin_option to the parent scope
37 | set(CTK_PLUGIN_${_plugin_name} ${CTK_PLUGIN_${_plugin_name}} PARENT_SCOPE)
38 |
39 | set(${_plugin_name}_SOURCE_DIR ${${_NAME}_DIR}/${_plugin_name})
40 | set(${_plugin_name}_SOURCE_DIR ${${_plugin_name}_SOURCE_DIR} PARENT_SCOPE)
41 |
42 | if(CTK_PLUGIN_${_plugin_name} AND NOT EXISTS ${${_plugin_name}_SOURCE_DIR})
43 | execute_process(
44 | COMMAND ${GIT_EXECUTABLE} submodule update ${_plugin_name}
45 | WORKING_DIRECTORY ${${_NAME}_DIR}
46 | RESULT_VARIABLE return_code
47 | ERROR_VARIABLE error_msg
48 | )
49 | if(return_code)
50 | message(FATAL_ERROR "Could not invoke git submodule update for ${${_plugin_name}_SOURCE_DIR}")
51 | endif()
52 | endif()
53 | endforeach()
54 |
55 | set(CTK_PLUGINS ${CTK_PLUGINS} PARENT_SCOPE)
56 | set(${_NAME}_DIR ${${_NAME}_DIR} PARENT_SCOPE)
57 |
58 | endfunction()
59 |
--------------------------------------------------------------------------------
/includes/ctk-0.1/service/application/ctkApplicationDescriptor.cpp:
--------------------------------------------------------------------------------
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 | #include "ctkApplicationDescriptor.h"
23 |
24 | #include
25 |
26 | const QString ctkApplicationDescriptor::APPLICATION_NAME = "application.name";
27 | const QString ctkApplicationDescriptor::APPLICATION_ICON = "application.icon";
28 | const QString ctkApplicationDescriptor::APPLICATION_PID = ctkPluginConstants::SERVICE_PID;
29 | const QString ctkApplicationDescriptor::APPLICATION_VERSION = "application.version";
30 | const QString ctkApplicationDescriptor::APPLICATION_VENDOR = ctkPluginConstants::SERVICE_VENDOR;
31 | const QString ctkApplicationDescriptor::APPLICATION_VISIBLE = "application.visible";
32 | const QString ctkApplicationDescriptor::APPLICATION_LAUNCHABLE = "application.launchable";
33 | const QString ctkApplicationDescriptor::APPLICATION_LOCKED = "application.locked";
34 | const QString ctkApplicationDescriptor::APPLICATION_DESCRIPTION = "application.description";
35 | const QString ctkApplicationDescriptor::APPLICATION_DOCUMENTATION = "application.documentation";
36 | const QString ctkApplicationDescriptor::APPLICATION_COPYRIGHT = "application.copyright";
37 | const QString ctkApplicationDescriptor::APPLICATION_LICENSE = "application.license";
38 | const QString ctkApplicationDescriptor::APPLICATION_CONTAINER = "application.container";
39 | const QString ctkApplicationDescriptor::APPLICATION_LOCATION = "application.location";
40 |
--------------------------------------------------------------------------------
/includes/ctk-0.1/service/metatype/ctkMetaTypeInformation.h:
--------------------------------------------------------------------------------
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 |
23 | #ifndef CTKMETATYPEINFORMATION_H
24 | #define CTKMETATYPEINFORMATION_H
25 |
26 | #include "ctkMetaTypeProvider.h"
27 |
28 | #include
29 |
30 | class ctkPlugin;
31 |
32 | /**
33 | * \ingroup Metatype
34 | *
35 | * A MetaType Information object is created by the ctkMetaTypeService to return
36 | * meta type information for a specific plugin.
37 | */
38 | struct ctkMetaTypeInformation : public ctkMetaTypeProvider
39 | {
40 | /**
41 | * Return the PIDs (for ManagedServices) for which ctkObjectClassDefinition
42 | * information is available.
43 | *
44 | * @return List of PIDs.
45 | */
46 | virtual QStringList getPids() const = 0;
47 |
48 | /**
49 | * Return the Factory PIDs (for ManagedServiceFactories) for which
50 | * ctkObjectClassDefinition information is available.
51 | *
52 | * @return List of Factory PIDs.
53 | */
54 | virtual QStringList getFactoryPids() const = 0;
55 |
56 | /**
57 | * Return the plugin for which this object provides meta type information.
58 | *
59 | * @return Plugin for which this object provides meta type information.
60 | */
61 | virtual QSharedPointer getPlugin() const = 0;
62 | };
63 |
64 | /**
65 | * \ingroup Metatype
66 | */
67 | typedef QSharedPointer ctkMetaTypeInformationPtr;
68 |
69 | #endif // CTKMETATYPEINFORMATION_H
70 |
--------------------------------------------------------------------------------
/includes/ctk-0.1/ctkErrorLogTerminalOutput.h:
--------------------------------------------------------------------------------
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 CTKERRORLOGTERMINALOUTPUT_H
22 | #define CTKERRORLOGTERMINALOUTPUT_H
23 |
24 | // Qt includes
25 | #include
26 | #include
27 |
28 | // CTK includes
29 | #include
30 |
31 | //------------------------------------------------------------------------------
32 | class ctkErrorLogTerminalOutputPrivate;
33 |
34 | //------------------------------------------------------------------------------
35 | /// \ingroup Core
36 | class CTK_CORE_EXPORT ctkErrorLogTerminalOutput : public QObject
37 | {
38 | Q_OBJECT
39 | Q_FLAGS(TerminalOutputs)
40 |
41 | public:
42 | ctkErrorLogTerminalOutput();
43 | virtual ~ctkErrorLogTerminalOutput();
44 |
45 | enum TerminalOutput
46 | {
47 | None = 0x0,
48 | StandardError = 0x1,
49 | StandardOutput = 0x2,
50 | All = StandardError | StandardOutput
51 | };
52 | Q_DECLARE_FLAGS(TerminalOutputs, TerminalOutput)
53 |
54 | bool enabled()const;
55 | void setEnabled(bool value);
56 |
57 | int fileDescriptor()const;
58 | void setFileDescriptor(int fd);
59 |
60 | void output(const QString& text);
61 |
62 | protected:
63 | QScopedPointer d_ptr;
64 |
65 | private:
66 | Q_DECLARE_PRIVATE(ctkErrorLogTerminalOutput)
67 | Q_DISABLE_COPY(ctkErrorLogTerminalOutput)
68 | };
69 |
70 | Q_DECLARE_OPERATORS_FOR_FLAGS(ctkErrorLogTerminalOutput::TerminalOutputs)
71 |
72 | #endif // CTKERRORLOGTERMINALOUTPUT_H
73 |
--------------------------------------------------------------------------------
/includes/ctk-0.1/ctkLayoutManager_p.h:
--------------------------------------------------------------------------------
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 __ctkLayoutManager_p_h
22 | #define __ctkLayoutManager_p_h
23 |
24 | // Qt includes
25 | #include
26 | #include
27 | #include
28 |
29 | class QLayout;
30 | class QWidget;
31 |
32 | // CTK includes
33 | #include "ctkLayoutManager.h"
34 |
35 | //-----------------------------------------------------------------------------
36 | /// \ingroup Widgets
37 | class CTK_WIDGETS_EXPORT ctkLayoutManagerPrivate
38 | {
39 | Q_DECLARE_PUBLIC(ctkLayoutManager);
40 |
41 | protected:
42 | ctkLayoutManager* const q_ptr;
43 |
44 | public:
45 | ctkLayoutManagerPrivate(ctkLayoutManager& object);
46 | virtual ~ctkLayoutManagerPrivate();
47 |
48 | virtual void init();
49 | void clearLayout(QLayout* layout);
50 | void clearWidget(QWidget* widget, QLayout* parentLayout = 0);
51 |
52 | /// The widget where the layout is populated into.
53 | QWidget* Viewport;
54 | /// The XML description of the current layout.
55 | QDomDocument Layout;
56 | /// All the QWidgets in the Viewports. The list contains the
57 | /// LayoutWidgets as well as the "items" of the layout.
58 | QSet Views;
59 | /// All the widgets created by ctkLayoutManager.
60 | /// Those widgets are "layout" widgets in a sense that they are simple
61 | /// containers or spacers to layout the "views" of the layout.
62 | QSet LayoutWidgets;
63 | /// Unique spacing used by all the inner layouts.
64 | int Spacing;
65 | };
66 |
67 | #endif
68 |
--------------------------------------------------------------------------------