Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Properties | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
qSlicerCoreApplication Class Reference

#include <Base/QTCore/qSlicerCoreApplication.h>

Inheritance diagram for qSlicerCoreApplication:
Inheritance graph
[legend]
Collaboration diagram for qSlicerCoreApplication:
Collaboration graph
[legend]

Public Types

enum  ApplicationAttribute { AA_DisablePython = 1000, AA_EnableTesting }
 
enum  ReturnCode { ExitNotRequested = -1, ExitSuccess = EXIT_SUCCESS, ExitFailure = EXIT_FAILURE }
 
typedef QApplication Superclass
 

Properties

QString arch
 
QString defaultScenePath
 
QString extensionsInstallPath
 
QString intDir
 
bool isCustomMainApplication
 
bool isInstalled
 
QString launcherExecutableFilePath
 
QString launcherSettingsFilePath
 
int mainApplicationMajorVersion
 
int mainApplicationMinorVersion
 
QString mainApplicationName
 
int mainApplicationPatchVersion
 
QString mainApplicationRepositoryRevision
 
QString mainApplicationRepositoryUrl
 
int majorVersion
 
int minorVersion
 
QString os
 
QString platform
 
QString releaseType
 
QString repositoryBranch
 
QString repositoryRevision
 
QString repositoryUrl
 
QString slicerDefaultSettingsFilePath
 
QString slicerHome
 
QString slicerRevisionUserSettingsFilePath
 
QString slicerSharePath
 
QString slicerUserSettingsFilePath
 
QString temporaryPath
 

Public Slots

static void restart ()
 
virtual void setRenderPaused (bool pause)
 
bool unregisterResource (int handle)
 

Signals

void invokeEventRequested (unsigned int delay, void *caller, unsigned long event, void *callData)
 
void mrmlSceneChanged (vtkMRMLScene *mrmlScene)
 

Public Member Functions

virtual QString acknowledgment () const
 Return the acknowledgment text of Slicer. More...
 
Q_INVOKABLE void addModuleAssociatedNodeType (const QString &nodeClassName, const QString &moduleName)
 
Q_INVOKABLE QStringList allModuleAssociatedNodeTypes () const
 List of all node types that are associated with any module. More...
 
void appendEnvironmentVariable (const QString &key, const QString &value, QChar separator=';')
 
Q_INVOKABLE vtkSlicerApplicationLogicapplicationLogic () const
 Get application logic. More...
 
QString arch () const
 
virtual QString copyrights () const
 Return the copyrights of Slicer. More...
 
qSlicerCoreCommandOptionscoreCommandOptions () const
 Get coreCommandOptions. More...
 
Q_INVOKABLE qSlicerCoreIOManagercoreIOManager () const
 Get the IO manager. More...
 
QString defaultExtensionsInstallPath () const
 Get slicer default extensions path. More...
 
QString defaultScenePath () const
 
Q_INVOKABLE QSettings * defaultSettings () const
 
QString defaultTemporaryPath () const
 Get slicer default temporary directory. More...
 
Q_INVOKABLE QProcessEnvironment environment () const
 Returns the current environment. More...
 
Q_INVOKABLE ctkErrorLogAbstractModel * errorLogModel () const
 Get errorLogModel. More...
 
QString extensionsInstallPath () const
 Get slicer extension directory. More...
 
void gatherExtensionsHistoryInformationOnStartup ()
 
QString intDir () const
 
bool isCustomMainApplication () const
 Return if main application is custom application (not Slicer). More...
 
bool isEmbeddedModule (const QString &moduleFileName) const
 
bool isEnvironmentVariableValueSet (const QString &key, const QString &value)
 Returns True if environment variable identified by key is set to value. More...
 
bool isInstalled () const
 Return true is this instance of Slicer is running from an installed directory. More...
 
QString launcherExecutableFilePath () const
 If any, return slicer launcher executable file path. More...
 
QString launcherRevisionSpecificUserSettingsFilePath () const
 If any, return slicer user settings file path specific to a given revision of Slicer. More...
 
QString launcherSettingsFilePath () const
 If any, return slicer launcher settings file path. More...
 
virtual QString libraries () const
 Return the libraries of Slicer. More...
 
int mainApplicationMajorVersion () const
 
int mainApplicationMinorVersion () const
 
QString mainApplicationName () const
 Return the name of the main application. More...
 
int mainApplicationPatchVersion () const
 
QString mainApplicationRepositoryRevision () const
 
QString mainApplicationRepositoryUrl () const
 
int majorVersion () const
 Return the Slicer major version number. More...
 
int minorVersion () const
 Return the Slicer minor version number. More...
 
Q_INVOKABLE qSlicerModuleManagermoduleManager () const
 Get the module manager. More...
 
Q_INVOKABLE QStringList modulesAssociatedWithNodeType (const QString &nodeClassName) const
 List of all modules that are associated with the specified node type. More...
 
Q_INVOKABLE vtkMRMLScenemrmlScene () const
 Get MRML Scene. More...
 
QString os () const
 
void parseArguments (bool &exitWhenDone)
 
virtual void pauseRender ()
 
QString platform () const
 
void prependEnvironmentVariable (const QString &key, const QString &value, QChar separator=';')
 
 qSlicerCoreApplication (int &argc, char **argv)
 
Q_INVOKABLE int registerResource (const QByteArray &data)
 
QString releaseType () const
 Return the release type of this instance of Slicer. More...
 
Q_INVOKABLE void removeModuleAssociatedNodeType (const QString &nodeClassName, const QString &moduleName)
 Remove association between a module and a node type. More...
 
QString repositoryBranch () const
 
QString repositoryRevision () const
 
QString repositoryUrl () const
 
virtual void resumeRender ()
 
int returnCode () const
 
Q_INVOKABLE QSettings * revisionUserSettings () const
 
void setCoreCommandOptions (qSlicerCoreCommandOptions *options)
 
void setCoreIOManager (qSlicerCoreIOManager *ioManager)
 
void setDefaultScenePath (const QString &path)
 Set default slicer scene directory. More...
 
void setEnvironmentVariable (const QString &key, const QString &value)
 Convenient function to set an environment variable. More...
 
void setExtensionsInstallPath (const QString &path)
 Set slicer extension directory. More...
 
void setTemporaryPath (const QString &path)
 Set slicer temporary directory. More...
 
Q_INVOKABLE QSettings * settings () const
 
Q_INVOKABLE void showConsoleMessage (QString message, bool error=true) const
 
QString slicerDefaultSettingsFilePath () const
 
QString slicerHome () const
 
QString slicerRevisionUserSettingsFilePath () const
 
QString slicerSharePath () const
 
QString slicerUserSettingsFilePath () const
 
Q_INVOKABLE QProcessEnvironment startupEnvironment () const
 Returns the environment without the Slicer specific values. More...
 
QString temporaryPath () const
 Get slicer temporary directory. More...
 
Q_INVOKABLE QSettings * userSettings () const
 
 ~qSlicerCoreApplication () override
 

Static Public Member Functions

static qSlicerCoreApplicationapplication ()
 Return a reference to the application singleton. More...
 
static int exec ()
 
static bool loadCaCertificates (const QString &slicerHome)
 
static void loadLanguage ()
 
static void loadTranslations (const QString &dir)
 
static void setAttribute (qSlicerCoreApplication::ApplicationAttribute attribute, bool on=true)
 
static bool testAttribute (qSlicerCoreApplication::ApplicationAttribute attribute)
 

Protected Slots

virtual void handleCommandLineArguments ()
 
void invokeEvent ()
 
virtual void onAboutToQuit ()
 Perform application cleanup following a call to QCoreApplication::exit(). More...
 
virtual void onSlicerApplicationLogicModified ()
 
void onSlicerApplicationLogicRequest (vtkObject *, void *, unsigned long)
 
virtual void onUserInformationModified ()
 
void processAppLogicModified ()
 
void processAppLogicReadData ()
 
void processAppLogicWriteData ()
 
void requestInvokeEvent (vtkObject *caller, void *callData)
 
void scheduleInvokeEvent (unsigned int delay, void *caller, unsigned long event, void *callData)
 
void terminate (int exitCode=qSlicerCoreApplication::ExitSuccess)
 Set the ReturnCode flag and call QCoreApplication::exit() More...
 

Protected Member Functions

virtual void handlePreApplicationCommandLineArguments ()
 
 qSlicerCoreApplication (qSlicerCoreApplicationPrivate *pimpl, int &argc, char **argv)
 
virtual void setMRMLScene (vtkMRMLScene *scene)
 

Protected Attributes

QScopedPointer< qSlicerCoreApplicationPrivate > d_ptr
 

Detailed Description

Definition at line 60 of file qSlicerCoreApplication.h.

Member Typedef Documentation

◆ Superclass

typedef QApplication qSlicerCoreApplication::Superclass

Definition at line 101 of file qSlicerCoreApplication.h.

Member Enumeration Documentation

◆ ApplicationAttribute

Used in addition to existing QCoreApplication attribute.

See also
Qt::ApplicationAttribute
Enumerator
AA_DisablePython 
AA_EnableTesting 

Definition at line 110 of file qSlicerCoreApplication.h.

◆ ReturnCode

Enumerator
ExitNotRequested 
ExitSuccess 
ExitFailure 

Definition at line 173 of file qSlicerCoreApplication.h.

Property Documentation

◆ arch

QString qSlicerCoreApplication::arch
read

Definition at line 89 of file qSlicerCoreApplication.h.

◆ defaultScenePath

QString qSlicerCoreApplication::defaultScenePath
readwrite

Definition at line 71 of file qSlicerCoreApplication.h.

◆ extensionsInstallPath

QString qSlicerCoreApplication::extensionsInstallPath
readwrite

Definition at line 79 of file qSlicerCoreApplication.h.

◆ intDir

QString qSlicerCoreApplication::intDir
read

Definition at line 80 of file qSlicerCoreApplication.h.

◆ isCustomMainApplication

bool qSlicerCoreApplication::isCustomMainApplication
read

Definition at line 91 of file qSlicerCoreApplication.h.

◆ isInstalled

bool qSlicerCoreApplication::isInstalled
read

Definition at line 81 of file qSlicerCoreApplication.h.

◆ launcherExecutableFilePath

QString qSlicerCoreApplication::launcherExecutableFilePath
read

Definition at line 74 of file qSlicerCoreApplication.h.

◆ launcherSettingsFilePath

QString qSlicerCoreApplication::launcherSettingsFilePath
read

Definition at line 75 of file qSlicerCoreApplication.h.

◆ mainApplicationMajorVersion

int qSlicerCoreApplication::mainApplicationMajorVersion
read

Definition at line 95 of file qSlicerCoreApplication.h.

◆ mainApplicationMinorVersion

int qSlicerCoreApplication::mainApplicationMinorVersion
read

Definition at line 96 of file qSlicerCoreApplication.h.

◆ mainApplicationName

QString qSlicerCoreApplication::mainApplicationName
read

Definition at line 92 of file qSlicerCoreApplication.h.

◆ mainApplicationPatchVersion

int qSlicerCoreApplication::mainApplicationPatchVersion
read

Definition at line 97 of file qSlicerCoreApplication.h.

◆ mainApplicationRepositoryRevision

QString qSlicerCoreApplication::mainApplicationRepositoryRevision
read

Definition at line 94 of file qSlicerCoreApplication.h.

◆ mainApplicationRepositoryUrl

QString qSlicerCoreApplication::mainApplicationRepositoryUrl
read

Definition at line 93 of file qSlicerCoreApplication.h.

◆ majorVersion

int qSlicerCoreApplication::majorVersion
read

Definition at line 86 of file qSlicerCoreApplication.h.

◆ minorVersion

int qSlicerCoreApplication::minorVersion
read

Definition at line 87 of file qSlicerCoreApplication.h.

◆ os

QString qSlicerCoreApplication::os
read

Definition at line 90 of file qSlicerCoreApplication.h.

◆ platform

QString qSlicerCoreApplication::platform
read

Definition at line 88 of file qSlicerCoreApplication.h.

◆ releaseType

QString qSlicerCoreApplication::releaseType
read

Definition at line 82 of file qSlicerCoreApplication.h.

◆ repositoryBranch

QString qSlicerCoreApplication::repositoryBranch
read

Definition at line 84 of file qSlicerCoreApplication.h.

◆ repositoryRevision

QString qSlicerCoreApplication::repositoryRevision
read

Definition at line 85 of file qSlicerCoreApplication.h.

◆ repositoryUrl

QString qSlicerCoreApplication::repositoryUrl
read

Definition at line 83 of file qSlicerCoreApplication.h.

◆ slicerDefaultSettingsFilePath

QString qSlicerCoreApplication::slicerDefaultSettingsFilePath
read

Definition at line 76 of file qSlicerCoreApplication.h.

◆ slicerHome

QString qSlicerCoreApplication::slicerHome
read

This property holds the path where the Slicer application is. For example, for an installed Slicer on Windows, the path can be "C:\Program Files (x86)\Slicer 4.4.0\".

See also
slicerHome(), temporaryPath, isInstalled

Definition at line 70 of file qSlicerCoreApplication.h.

◆ slicerRevisionUserSettingsFilePath

QString qSlicerCoreApplication::slicerRevisionUserSettingsFilePath
read

Definition at line 78 of file qSlicerCoreApplication.h.

◆ slicerSharePath

QString qSlicerCoreApplication::slicerSharePath
read

Definition at line 72 of file qSlicerCoreApplication.h.

◆ slicerUserSettingsFilePath

QString qSlicerCoreApplication::slicerUserSettingsFilePath
read

Definition at line 77 of file qSlicerCoreApplication.h.

◆ temporaryPath

QString qSlicerCoreApplication::temporaryPath
readwrite

Definition at line 73 of file qSlicerCoreApplication.h.

Constructor & Destructor Documentation

◆ qSlicerCoreApplication() [1/2]

qSlicerCoreApplication::qSlicerCoreApplication ( int &  argc,
char **  argv 
)

◆ ~qSlicerCoreApplication()

qSlicerCoreApplication::~qSlicerCoreApplication ( )
override

◆ qSlicerCoreApplication() [2/2]

qSlicerCoreApplication::qSlicerCoreApplication ( qSlicerCoreApplicationPrivate *  pimpl,
int &  argc,
char **  argv 
)
protected

Member Function Documentation

◆ acknowledgment()

virtual QString qSlicerCoreApplication::acknowledgment ( ) const
virtual

Return the acknowledgment text of Slicer.

◆ addModuleAssociatedNodeType()

Q_INVOKABLE void qSlicerCoreApplication::addModuleAssociatedNodeType ( const QString &  nodeClassName,
const QString &  moduleName 
)

Associate a module with a node type. It is currently only used for determining which module can edit a specific node. If multiple modules are registered for the same class then the node widget's nodeEditable method is used for determining which module is the most suitable for editing.

◆ allModuleAssociatedNodeTypes()

Q_INVOKABLE QStringList qSlicerCoreApplication::allModuleAssociatedNodeTypes ( ) const

List of all node types that are associated with any module.

◆ appendEnvironmentVariable()

void qSlicerCoreApplication::appendEnvironmentVariable ( const QString &  key,
const QString &  value,
QChar  separator = ';' 
)

Convenient function allowing to append value to environment variable identified by by key using separator

◆ application()

static qSlicerCoreApplication* qSlicerCoreApplication::application ( )
static

Return a reference to the application singleton.

◆ applicationLogic()

Q_INVOKABLE vtkSlicerApplicationLogic* qSlicerCoreApplication::applicationLogic ( ) const

Get application logic.

◆ arch()

QString qSlicerCoreApplication::arch ( ) const

Return the arch associated to this build

See also
qSlicerCoreApplicationPrivate::discoverRepository

◆ copyrights()

virtual QString qSlicerCoreApplication::copyrights ( ) const
virtual

Return the copyrights of Slicer.

◆ coreCommandOptions()

qSlicerCoreCommandOptions* qSlicerCoreApplication::coreCommandOptions ( ) const

Get coreCommandOptions.

◆ coreIOManager()

Q_INVOKABLE qSlicerCoreIOManager* qSlicerCoreApplication::coreIOManager ( ) const

Get the IO manager.

◆ defaultExtensionsInstallPath()

QString qSlicerCoreApplication::defaultExtensionsInstallPath ( ) const

Get slicer default extensions path.

◆ defaultScenePath()

QString qSlicerCoreApplication::defaultScenePath ( ) const

Get default scene directory

This returns the full path where scenes are saved to by default

◆ defaultSettings()

Q_INVOKABLE QSettings* qSlicerCoreApplication::defaultSettings ( ) const

Get slicer application default settings.

See also
slicerDefaultSettingsFilePath()

◆ defaultTemporaryPath()

QString qSlicerCoreApplication::defaultTemporaryPath ( ) const

Get slicer default temporary directory.

◆ environment()

Q_INVOKABLE QProcessEnvironment qSlicerCoreApplication::environment ( ) const

Returns the current environment.

The returned environment contains all values found in the launcher settings.

Note
Environment variables set from python updating os.environ or set from c++ directly calling putenv() will NOT be found in the environment returned by this function.
See also
setEnvironmentVariable(const QString& key, const QString& value);

◆ errorLogModel()

Q_INVOKABLE ctkErrorLogAbstractModel* qSlicerCoreApplication::errorLogModel ( ) const

Get errorLogModel.

◆ exec()

static int qSlicerCoreApplication::exec ( )
static

Enters the main event loop and waits until exit(), quit() or terminate() is called.

To ensure that python exceptions occurring during the module unloading performed in onAboutToQuit() are considered, it is important to start the event loop directly calling this function.

Note that the override of return code if an exception is raised during module cleanup happens only if testing mode is enabled.

See also
QApplication::exec(), returnCode()
qSlicerCoreCommandOptions::isTestingEnabled()

◆ extensionsInstallPath()

QString qSlicerCoreApplication::extensionsInstallPath ( ) const

Get slicer extension directory.

◆ gatherExtensionsHistoryInformationOnStartup()

void qSlicerCoreApplication::gatherExtensionsHistoryInformationOnStartup ( )

◆ handleCommandLineArguments

virtual void qSlicerCoreApplication::handleCommandLineArguments ( )
protectedvirtualslot

Process command line arguments atfer the applicaton event loop is started.

See also
handlePreApplicationCommandLineArguments()
qSlicerApplication::startupCompleted()

Reimplemented in qSlicerApplication.

◆ handlePreApplicationCommandLineArguments()

virtual void qSlicerCoreApplication::handlePreApplicationCommandLineArguments ( )
protectedvirtual

Process command line arguments before the applicaton event loop is started.

See also
handleCommandLineArguments()
qSlicerApplication::startupCompleted()

Reimplemented in qSlicerApplication.

◆ intDir()

QString qSlicerCoreApplication::intDir ( ) const

If any, this method return the build intermediate directory See on http://msdn.microsoft.com/en-us/library/c02as0cs%28VS.71%29.aspx

◆ invokeEvent

void qSlicerCoreApplication::invokeEvent ( )
protectedslot

Internal method called only when a special QTimer times out. The timer contains dynamic properties describing an event to invoke on a specific object.

See also
requestInvokeEvent

◆ invokeEventRequested

void qSlicerCoreApplication::invokeEventRequested ( unsigned int  delay,
void *  caller,
unsigned long  event,
void *  callData 
)
signal

Internal method used to move an invocation from a thread to the main thread.

See also
requestInvokeEvent(), scheduleInvokeEvent()

◆ isCustomMainApplication()

bool qSlicerCoreApplication::isCustomMainApplication ( ) const

Return if main application is custom application (not Slicer).

◆ isEmbeddedModule()

bool qSlicerCoreApplication::isEmbeddedModule ( const QString &  moduleFileName) const

Returns True if module identified by moduleFileName is a descendant of slicer home.

See also
slicerHome()

◆ isEnvironmentVariableValueSet()

bool qSlicerCoreApplication::isEnvironmentVariableValueSet ( const QString &  key,
const QString &  value 
)

Returns True if environment variable identified by key is set to value.

◆ isInstalled()

bool qSlicerCoreApplication::isInstalled ( ) const

Return true is this instance of Slicer is running from an installed directory.

◆ launcherExecutableFilePath()

QString qSlicerCoreApplication::launcherExecutableFilePath ( ) const

If any, return slicer launcher executable file path.

◆ launcherRevisionSpecificUserSettingsFilePath()

QString qSlicerCoreApplication::launcherRevisionSpecificUserSettingsFilePath ( ) const

If any, return slicer user settings file path specific to a given revision of Slicer.

◆ launcherSettingsFilePath()

QString qSlicerCoreApplication::launcherSettingsFilePath ( ) const

If any, return slicer launcher settings file path.

◆ libraries()

virtual QString qSlicerCoreApplication::libraries ( ) const
virtual

Return the libraries of Slicer.

◆ loadCaCertificates()

static bool qSlicerCoreApplication::loadCaCertificates ( const QString &  slicerHome)
static

Load certificates bundled into '<slicerHome>/<SLICER_SHARE_DIR>/Slicer.crt'. For more details, see Slicer/Base/QTCore/Resources/Certs/README Returns False if 'Slicer.crt' failed to be loaded.

See also
QSslSocket::defaultCaCertificates()

◆ loadLanguage()

static void qSlicerCoreApplication::loadLanguage ( )
static

◆ loadTranslations()

static void qSlicerCoreApplication::loadTranslations ( const QString &  dir)
static

◆ mainApplicationMajorVersion()

int qSlicerCoreApplication::mainApplicationMajorVersion ( ) const

Return the main application's major version number. Useful for custom applications.

◆ mainApplicationMinorVersion()

int qSlicerCoreApplication::mainApplicationMinorVersion ( ) const

Return the main application's minor version number. Useful for custom applications.

◆ mainApplicationName()

QString qSlicerCoreApplication::mainApplicationName ( ) const

Return the name of the main application.

◆ mainApplicationPatchVersion()

int qSlicerCoreApplication::mainApplicationPatchVersion ( ) const

Return the main application's patch version number. Useful for custom applications.

◆ mainApplicationRepositoryRevision()

QString qSlicerCoreApplication::mainApplicationRepositoryRevision ( ) const

Return the main application's source repository Revision associated with this build. Useful for custom applications.

See also
qSlicerCoreApplicationPrivate::discoverRepository

◆ mainApplicationRepositoryUrl()

QString qSlicerCoreApplication::mainApplicationRepositoryUrl ( ) const

Return the main application's source repository URL associated with this build. Useful for custom applications.

See also
qSlicerCoreApplicationPrivate::discoverRepository

◆ majorVersion()

int qSlicerCoreApplication::majorVersion ( ) const

Return the Slicer major version number.

◆ minorVersion()

int qSlicerCoreApplication::minorVersion ( ) const

Return the Slicer minor version number.

◆ moduleManager()

Q_INVOKABLE qSlicerModuleManager* qSlicerCoreApplication::moduleManager ( ) const

Get the module manager.

◆ modulesAssociatedWithNodeType()

Q_INVOKABLE QStringList qSlicerCoreApplication::modulesAssociatedWithNodeType ( const QString &  nodeClassName) const

List of all modules that are associated with the specified node type.

◆ mrmlScene()

Q_INVOKABLE vtkMRMLScene* qSlicerCoreApplication::mrmlScene ( ) const

Get MRML Scene.

◆ mrmlSceneChanged

void qSlicerCoreApplication::mrmlSceneChanged ( vtkMRMLScene mrmlScene)
signal

◆ onAboutToQuit

virtual void qSlicerCoreApplication::onAboutToQuit ( )
protectedvirtualslot

Perform application cleanup following a call to QCoreApplication::exit().

◆ onSlicerApplicationLogicModified

virtual void qSlicerCoreApplication::onSlicerApplicationLogicModified ( )
protectedvirtualslot

Reimplemented in qSlicerApplication.

◆ onSlicerApplicationLogicRequest

void qSlicerCoreApplication::onSlicerApplicationLogicRequest ( vtkObject *  ,
void *  ,
unsigned  long 
)
protectedslot

◆ onUserInformationModified

virtual void qSlicerCoreApplication::onUserInformationModified ( )
protectedvirtualslot

◆ os()

QString qSlicerCoreApplication::os ( ) const

Return the os associated to this build

See also
qSlicerCoreApplicationPrivate::discoverRepository

◆ parseArguments()

void qSlicerCoreApplication::parseArguments ( bool &  exitWhenDone)

Parse arguments

Note
If exitWhenDone is True, it's your responsibility to exit the application

◆ pauseRender()

virtual void qSlicerCoreApplication::pauseRender ( )
inlinevirtual

Equivalent to setRenderPaused(true)

See also
setRenderPaused

Definition at line 483 of file qSlicerCoreApplication.h.

◆ platform()

QString qSlicerCoreApplication::platform ( ) const

Return the platform associated to this build

See also
qSlicerCoreApplicationPrivate::discoverRepository

◆ prependEnvironmentVariable()

void qSlicerCoreApplication::prependEnvironmentVariable ( const QString &  key,
const QString &  value,
QChar  separator = ';' 
)

Convenient function allowing to prepend value to environment variable identified by by key using separator

◆ processAppLogicModified

void qSlicerCoreApplication::processAppLogicModified ( )
protectedslot

◆ processAppLogicReadData

void qSlicerCoreApplication::processAppLogicReadData ( )
protectedslot

◆ processAppLogicWriteData

void qSlicerCoreApplication::processAppLogicWriteData ( )
protectedslot

◆ registerResource()

Q_INVOKABLE int qSlicerCoreApplication::registerResource ( const QByteArray &  data)

◆ releaseType()

QString qSlicerCoreApplication::releaseType ( ) const

Return the release type of this instance of Slicer.

Release type can be Experimental, Nightly or Stable.

◆ removeModuleAssociatedNodeType()

Q_INVOKABLE void qSlicerCoreApplication::removeModuleAssociatedNodeType ( const QString &  nodeClassName,
const QString &  moduleName 
)

Remove association between a module and a node type.

◆ repositoryBranch()

QString qSlicerCoreApplication::repositoryBranch ( ) const

Return the Slicer source repository Branch associated with this build

See also
qSlicerCoreApplicationPrivate::discoverRepository

◆ repositoryRevision()

QString qSlicerCoreApplication::repositoryRevision ( ) const

Return the Slicer source repository Revision associated with this build

See also
qSlicerCoreApplicationPrivate::discoverRepository

◆ repositoryUrl()

QString qSlicerCoreApplication::repositoryUrl ( ) const

Return the Slicer source repository URL associated with this build

See also
qSlicerCoreApplicationPrivate::discoverRepository

◆ requestInvokeEvent

void qSlicerCoreApplication::requestInvokeEvent ( vtkObject *  caller,
void *  callData 
)
protectedslot

Called when the application logic requests a delayed event invocation. When the singleton application logic fires the RequestInvokeEvent,

See also
invokeEvent(), vtkMRMLApplicationLogic::InvokeRequest
onSlicerApplicationLogicRequest(), processAppLogicModified()

◆ restart

static void qSlicerCoreApplication::restart ( )
staticslot

Restart the application with the arguments passed at startup time

See also
QCoreApplication::arguments()

◆ resumeRender()

virtual void qSlicerCoreApplication::resumeRender ( )
inlinevirtual

Equivalent to setRenderPaused(false)

See also
setRenderPaused

Definition at line 486 of file qSlicerCoreApplication.h.

◆ returnCode()

int qSlicerCoreApplication::returnCode ( ) const

Return exit code that may be set before the main event loop started or after it exited.

After parsing arguments and before starting the event loop using exec(), returnCode is set if early exit was requested or if there was a parsing error.

After exiting the event loop, returnCode is set if there was an error during cleanup performed in onAboutToQuit().

Returns -1 if the application has not been asked to exit. EXIT_SUCCESS (0) if the application must return in success. EXIT_FAILURE (1) if the application failed.

See also
exec()

◆ revisionUserSettings()

Q_INVOKABLE QSettings* qSlicerCoreApplication::revisionUserSettings ( ) const

Get revision specific slicer application user settings

Note
It will also instantiate a QSettings object if required.
See also
slicerRevisionSpecificUserSettingsFilePath()

◆ scheduleInvokeEvent

void qSlicerCoreApplication::scheduleInvokeEvent ( unsigned int  delay,
void *  caller,
unsigned long  event,
void *  callData 
)
protectedslot

a timer is created, and on timeout, invokeEvent() is called to propagate the requested event invocation.

See also
invokeEventRequested(), requestInvokeEvent(), invokeEvent()

◆ setAttribute()

static void qSlicerCoreApplication::setAttribute ( qSlicerCoreApplication::ApplicationAttribute  attribute,
bool  on = true 
)
static
See also
QCoreApplication::setAttribute

◆ setCoreCommandOptions()

void qSlicerCoreApplication::setCoreCommandOptions ( qSlicerCoreCommandOptions options)

Set coreCommandOptions

Note
qSlicerCoreApplication takes ownership of the object

◆ setCoreIOManager()

void qSlicerCoreApplication::setCoreIOManager ( qSlicerCoreIOManager ioManager)

Set the IO manager

Note
qSlicerCoreApplication takes ownership of the object

◆ setDefaultScenePath()

void qSlicerCoreApplication::setDefaultScenePath ( const QString &  path)

Set default slicer scene directory.

◆ setEnvironmentVariable()

void qSlicerCoreApplication::setEnvironmentVariable ( const QString &  key,
const QString &  value 
)

Convenient function to set an environment variable.

Note
Using this function will ensure that the environment is up-to-date for processes started using QProcess or other alternative methods.

◆ setExtensionsInstallPath()

void qSlicerCoreApplication::setExtensionsInstallPath ( const QString &  path)

Set slicer extension directory.

◆ setMRMLScene()

virtual void qSlicerCoreApplication::setMRMLScene ( vtkMRMLScene scene)
protectedvirtual

◆ setRenderPaused

virtual void qSlicerCoreApplication::setRenderPaused ( bool  pause)
inlinevirtualslot

Calls setRenderPaused(pause) on the current layout manager. Emits pauseRenderRequested() if pause is true and resumeRenderRequested() if pause is false. The caller is responsible for making sure that each setRenderPaused(true) is paired with setRenderPaused(false). Implemented in qSlicerApplication

See also
qSlicerApplication::setRenderPaused()

Definition at line 480 of file qSlicerCoreApplication.h.

◆ setTemporaryPath()

void qSlicerCoreApplication::setTemporaryPath ( const QString &  path)

Set slicer temporary directory.

◆ settings()

Q_INVOKABLE QSettings* qSlicerCoreApplication::settings ( ) const

This function has been deprecated: userSettings() should be used.

Deprecated:
See also
userSettings()

◆ showConsoleMessage()

Q_INVOKABLE void qSlicerCoreApplication::showConsoleMessage ( QString  message,
bool  error = true 
) const

Print message on console. If error is true then the message is printed on stderr, otherwise on stdout.

◆ slicerDefaultSettingsFilePath()

QString qSlicerCoreApplication::slicerDefaultSettingsFilePath ( ) const

If any, return slicer default settings file path.

See also
defaultSettings()

◆ slicerHome()

QString qSlicerCoreApplication::slicerHome ( ) const

Get slicer home directory

See also
slicerHome

◆ slicerRevisionUserSettingsFilePath()

QString qSlicerCoreApplication::slicerRevisionUserSettingsFilePath ( ) const

Return slicer settings file path specific to a given revision of Slicer.

See also
revisionUserSettings()

◆ slicerSharePath()

QString qSlicerCoreApplication::slicerSharePath ( ) const

Get slicer share directory

This returns the partial path where slicer resources are located, which is normally of the form "share/Slicer-<i>version</i>".

See also
slicerSharePath, slicerHome()

◆ slicerUserSettingsFilePath()

QString qSlicerCoreApplication::slicerUserSettingsFilePath ( ) const

Return slicer user settings file path.

See also
userSettings()

◆ startupEnvironment()

Q_INVOKABLE QProcessEnvironment qSlicerCoreApplication::startupEnvironment ( ) const

Returns the environment without the Slicer specific values.

Path environment variables like PATH, LD_LIBRARY_PATH or PYTHONPATH will not contain values found in the launcher settings.

Similarly key=value environment variables also found in the launcher settings are excluded. Note that if a value was associated with a key prior starting Slicer, it will not be set in the environment returned by this function.

The function excludes both the Slicer launcher settings and the revision specific launcher settings.

See also
launcherSettingsFilePath(), launcherRevisionSpecificUserSettingsFilePath()
repositoryRevision()
environment()

◆ temporaryPath()

QString qSlicerCoreApplication::temporaryPath ( ) const

Get slicer temporary directory.

◆ terminate

void qSlicerCoreApplication::terminate ( int  exitCode = qSlicerCoreApplication::ExitSuccess)
protectedslot

Set the ReturnCode flag and call QCoreApplication::exit()

◆ testAttribute()

static bool qSlicerCoreApplication::testAttribute ( qSlicerCoreApplication::ApplicationAttribute  attribute)
static
See also
QCoreApplication::testAttribute

◆ unregisterResource

bool qSlicerCoreApplication::unregisterResource ( int  handle)
slot

◆ userSettings()

Q_INVOKABLE QSettings* qSlicerCoreApplication::userSettings ( ) const

Get slicer application user settings

Note
It will also instantiate a QSettings object if required.
See also
slicerUserSettingsFilePath()

Member Data Documentation

◆ d_ptr

QScopedPointer<qSlicerCoreApplicationPrivate> qSlicerCoreApplication::d_ptr
protected

Definition at line 546 of file qSlicerCoreApplication.h.


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