CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Member Functions | Static Public Attributes | List of all members
ctkApplicationDescriptor Struct Referenceabstract

#include <Libs/PluginFramework/service/application/ctkApplicationDescriptor.h>

Public Member Functions

virtual QString getApplicationId () const =0
 
virtual ctkProperties getProperties () const =0
 
virtual ctkProperties getProperties (const QLocale &locale) const =0
 
virtual ctkApplicationHandlelaunch (const QHash< QString, QVariant > &arguments)=0
 
virtual ~ctkApplicationDescriptor ()
 

Static Public Attributes

static const QString APPLICATION_CONTAINER
 
static const QString APPLICATION_COPYRIGHT
 
static const QString APPLICATION_DESCRIPTION
 
static const QString APPLICATION_DOCUMENTATION
 
static const QString APPLICATION_ICON
 
static const QString APPLICATION_LAUNCHABLE
 
static const QString APPLICATION_LICENSE
 
static const QString APPLICATION_LOCATION
 
static const QString APPLICATION_LOCKED
 
static const QString APPLICATION_NAME
 
static const QString APPLICATION_PID
 
static const QString APPLICATION_VENDOR
 
static const QString APPLICATION_VERSION
 
static const QString APPLICATION_VISIBLE
 

Detailed Description

A service that represents an installed application and stores information about it. The application descriptor can be used for instance creation.

Definition at line 42 of file ctkApplicationDescriptor.h.

Constructor & Destructor Documentation

◆ ~ctkApplicationDescriptor()

virtual ctkApplicationDescriptor::~ctkApplicationDescriptor ( )
inlinevirtual

Definition at line 116 of file ctkApplicationDescriptor.h.

Member Function Documentation

◆ getApplicationId()

virtual QString ctkApplicationDescriptor::getApplicationId ( ) const
pure virtual

Returns the identifier of the represented application.

Returns
the identifier of the represented application

◆ getProperties() [1/2]

virtual ctkProperties ctkApplicationDescriptor::getProperties ( ) const
pure virtual

Returns the properties of the application descriptor as key-value pairs. The return value contains the raw (non-localized) property values. The returned QHash will include the service properties of this ctkApplicationDescriptor as well.

The returned QHash will contain the standard CTK service properties as well (e.g. service.id, service.vendor etc.) and specialized application descriptors may offer further service properties. The returned QHash contains a snapshot of the properties. It will not reflect further changes in the property values nor will the update of the Map change the corresponding service property.

Returns
copy of the non-localized service properties of this application descriptor service.
Exceptions
ctkIllegalStateExceptionif the application descriptor is unregistered

◆ getProperties() [2/2]

virtual ctkProperties ctkApplicationDescriptor::getProperties ( const QLocale &  locale) const
pure virtual

Returns the properties of the application descriptor as key-value pairs. The return value contains the locale aware and unaware properties as well. The returned QHash will include the service properties of this ctkApplicationDescriptor as well.

The returned QHash will contain the standard CTK service properties as well (e.g. service.id, service.vendor etc.) and specialized application descriptors may offer further service properties. The returned Map contains a snapshot of the properties. It will not reflect further changes in the property values nor will the update of the Map change the corresponding service property.

Parameters
localethe locale, defaults to the default constructed QLocale().
Returns
copy of the service properties of this application descriptor service, according to the specified locale.
Exceptions
ctkIllegalStateExceptionif the application descriptor is unregistered

◆ launch()

virtual ctkApplicationHandle* ctkApplicationDescriptor::launch ( const QHash< QString, QVariant > &  arguments)
pure virtual

Launches a new instance of an application. The arguments parameter specifies the startup parameters for the instance to be launched, it may be empty.

The following steps are made:

The QHash argument of the launch method contains startup arguments for the application. The keys used in the QHash must be non-empty QString objects. They can be standard or application specific. CTK defines the org.commontk.triggeringevent key to be used to pass the triggering event to a scheduled application, however in the future it is possible that other well-known keys will be defined. To avoid unwanted clashes of keys, the following rules should be applied:

  • The keys starting with the dash (-) character are application specific, no well-known meaning should be associated with them.
  • Well-known keys should follow the reverse domain name based naming. In particular, the keys standardized in CTK should start with org.commontk..

The method is synchronous, it returns only when the application instance was successfully started or the attempt to start it failed.

This method never returns null. If launching an application fails, the appropriate exception is thrown.

Parameters
argumentsArguments for the newly launched application, may be null
Returns
the registered ctkApplicationHandle, which represents the newly launched application instance. Never returns null.
Exceptions
ctkApplicationExceptionif starting the application failed
ctkIllegalStateExceptionif the application descriptor is unregistered
std::invalid_argumentif the specified QHash contains invalid keys (empty QString)

Member Data Documentation

◆ APPLICATION_CONTAINER

const QString ctkApplicationDescriptor::APPLICATION_CONTAINER
static

The property key for the application container of the application.

Definition at line 108 of file ctkApplicationDescriptor.h.

◆ APPLICATION_COPYRIGHT

const QString ctkApplicationDescriptor::APPLICATION_COPYRIGHT
static

The property key for the localized copyright notice of the application.

Definition at line 98 of file ctkApplicationDescriptor.h.

◆ APPLICATION_DESCRIPTION

const QString ctkApplicationDescriptor::APPLICATION_DESCRIPTION
static

The property key for the localized description of the application.

Definition at line 88 of file ctkApplicationDescriptor.h.

◆ APPLICATION_DOCUMENTATION

const QString ctkApplicationDescriptor::APPLICATION_DOCUMENTATION
static

The property key for the localized documentation of the application.

Definition at line 93 of file ctkApplicationDescriptor.h.

◆ APPLICATION_ICON

const QString ctkApplicationDescriptor::APPLICATION_ICON
static

The property key for the localized icon of the application.

Definition at line 53 of file ctkApplicationDescriptor.h.

◆ APPLICATION_LAUNCHABLE

const QString ctkApplicationDescriptor::APPLICATION_LAUNCHABLE
static

The property key for the launchable property of the application.

Definition at line 78 of file ctkApplicationDescriptor.h.

◆ APPLICATION_LICENSE

const QString ctkApplicationDescriptor::APPLICATION_LICENSE
static

The property key for the localized license of the application.

Definition at line 103 of file ctkApplicationDescriptor.h.

◆ APPLICATION_LOCATION

const QString ctkApplicationDescriptor::APPLICATION_LOCATION
static

The property key for the location of the application.

Definition at line 113 of file ctkApplicationDescriptor.h.

◆ APPLICATION_LOCKED

const QString ctkApplicationDescriptor::APPLICATION_LOCKED
static

The property key for the locked property of the application.

Definition at line 83 of file ctkApplicationDescriptor.h.

◆ APPLICATION_NAME

const QString ctkApplicationDescriptor::APPLICATION_NAME
static

The property key for the localized name of the application.

Definition at line 48 of file ctkApplicationDescriptor.h.

◆ APPLICATION_PID

const QString ctkApplicationDescriptor::APPLICATION_PID
static

The property key for the unique identifier (PID) of the application.

Definition at line 58 of file ctkApplicationDescriptor.h.

◆ APPLICATION_VENDOR

const QString ctkApplicationDescriptor::APPLICATION_VENDOR
static

The property key for the name of the application vendor.

Definition at line 68 of file ctkApplicationDescriptor.h.

◆ APPLICATION_VERSION

const QString ctkApplicationDescriptor::APPLICATION_VERSION
static

The property key for the version of the application.

Definition at line 63 of file ctkApplicationDescriptor.h.

◆ APPLICATION_VISIBLE

const QString ctkApplicationDescriptor::APPLICATION_VISIBLE
static

The property key for the visibility property of the application.

Definition at line 73 of file ctkApplicationDescriptor.h.


The documentation for this struct was generated from the following file: