Slicer  4.8
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 isInstalled
 
bool isRelease
 
QString launcherExecutableFilePath
 
QString launcherSettingsFilePath
 
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 ()
 
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...
 
QString extensionsInstallPath () const
 Get slicer extension directory. More...
 
QString intDir () const
 
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...
 
bool isRelease () const
 Return true if this instance of Slicer is a Stable release build. 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 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)
 
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
 
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
 
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
 
virtual ~qSlicerCoreApplication ()
 

Static Public Member Functions

static qSlicerCoreApplicationapplication ()
 Return a reference to the application singleton. More...
 
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 onSlicerApplicationLogicModified ()
 
void onSlicerApplicationLogicRequest (vtkObject *, void *, unsigned long)
 
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 59 of file qSlicerCoreApplication.h.

Member Typedef Documentation

◆ Superclass

typedef QApplication qSlicerCoreApplication::Superclass

Definition at line 93 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 102 of file qSlicerCoreApplication.h.

◆ ReturnCode

Enumerator
ExitNotRequested 
ExitSuccess 
ExitFailure 

Definition at line 165 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 70 of file qSlicerCoreApplication.h.

◆ extensionsInstallPath

QString qSlicerCoreApplication::extensionsInstallPath
readwrite

Definition at line 78 of file qSlicerCoreApplication.h.

◆ intDir

QString qSlicerCoreApplication::intDir
read

Definition at line 79 of file qSlicerCoreApplication.h.

◆ isInstalled

bool qSlicerCoreApplication::isInstalled
read

Definition at line 80 of file qSlicerCoreApplication.h.

◆ isRelease

bool qSlicerCoreApplication::isRelease
read

Definition at line 81 of file qSlicerCoreApplication.h.

◆ launcherExecutableFilePath

QString qSlicerCoreApplication::launcherExecutableFilePath
read

Definition at line 73 of file qSlicerCoreApplication.h.

◆ launcherSettingsFilePath

QString qSlicerCoreApplication::launcherSettingsFilePath
read

Definition at line 74 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 75 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 69 of file qSlicerCoreApplication.h.

◆ slicerRevisionUserSettingsFilePath

QString qSlicerCoreApplication::slicerRevisionUserSettingsFilePath
read

Definition at line 77 of file qSlicerCoreApplication.h.

◆ slicerSharePath

QString qSlicerCoreApplication::slicerSharePath
read

Definition at line 71 of file qSlicerCoreApplication.h.

◆ slicerUserSettingsFilePath

QString qSlicerCoreApplication::slicerUserSettingsFilePath
read

Definition at line 76 of file qSlicerCoreApplication.h.

◆ temporaryPath

QString qSlicerCoreApplication::temporaryPath
readwrite

Definition at line 72 of file qSlicerCoreApplication.h.

Constructor & Destructor Documentation

◆ qSlicerCoreApplication() [1/2]

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

◆ ~qSlicerCoreApplication()

virtual qSlicerCoreApplication::~qSlicerCoreApplication ( )
virtual

◆ 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);

◆ extensionsInstallPath()

QString qSlicerCoreApplication::extensionsInstallPath ( ) const

Get slicer extension directory.

◆ handleCommandLineArguments

virtual void qSlicerCoreApplication::handleCommandLineArguments ( )
protectedvirtualslot

Reimplemented in qSlicerApplication.

◆ handlePreApplicationCommandLineArguments()

virtual void qSlicerCoreApplication::handlePreApplicationCommandLineArguments ( )
protectedvirtual

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()

◆ 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.

◆ isRelease()

bool qSlicerCoreApplication::isRelease ( ) const

Return true if this instance of Slicer is a Stable release build.

Deprecated:
Use releaseType() == "Stable" instead.
See also
releaseType()

◆ 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 certicates 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

◆ 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

◆ onSlicerApplicationLogicModified

virtual void qSlicerCoreApplication::onSlicerApplicationLogicModified ( )
protectedvirtualslot

Reimplemented in qSlicerApplication.

◆ onSlicerApplicationLogicRequest

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

◆ 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 responsability to exit the application

◆ 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 source repository Branch associated to this build

See also
qSlicerCoreApplicationPrivate::discoverRepository

◆ repositoryRevision()

QString qSlicerCoreApplication::repositoryRevision ( ) const

Return the source repository Revision associated to this build

See also
qSlicerCoreApplicationPrivate::discoverRepository

◆ repositoryUrl()

QString qSlicerCoreApplication::repositoryUrl ( ) const

Return the source repository URL associated to this build

See also
qSlicerCoreApplicationPrivate::discoverRepository

◆ requestInvokeEvent

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

Called when the application logic requests a delayed event invokation. 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()

◆ returnCode()

int qSlicerCoreApplication::returnCode ( ) const

After parsing arguments and before exec() is called, returnCode contains the return code if any (!= -1). -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.

◆ 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

◆ 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()

◆ 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 461 of file qSlicerCoreApplication.h.


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