21 #ifndef __qSlicerCoreCommandOptions_h 22 #define __qSlicerCoreCommandOptions_h 25 #include <ctkCommandLineParser.h> 27 #include "qSlicerBaseQTCoreExport.h" 28 #include "vtkSlicerConfigure.h" 31 class qSlicerCoreCommandOptionsPrivate;
36 Q_PROPERTY(
bool displayHelpAndExit READ displayHelpAndExit CONSTANT)
37 Q_PROPERTY(
bool ignoreSlicerRC READ ignoreSlicerRC CONSTANT)
38 Q_PROPERTY(QString pythonScript READ pythonScript CONSTANT)
39 Q_PROPERTY(QString extraPythonScript READ extraPythonScript CONSTANT)
40 Q_PROPERTY(QString pythonCode READ pythonCode CONSTANT)
41 Q_PROPERTY(
bool runPythonAndExit READ runPythonAndExit WRITE setRunPythonAndExit)
42 Q_PROPERTY(
bool disableCLIModules READ disableCLIModules CONSTANT)
43 Q_PROPERTY(
bool disableLoadableModules READ disableLoadableModules CONSTANT)
44 Q_PROPERTY(
bool disableScriptedLoadableModules READ disableScriptedLoadableModules CONSTANT)
45 Q_PROPERTY(
bool disableBuiltInCLIModules READ disableBuiltInCLIModules CONSTANT)
46 Q_PROPERTY(
bool disableBuiltInLoadableModules READ disableBuiltInLoadableModules CONSTANT)
47 Q_PROPERTY(
bool disableBuiltInScriptedLoadableModules READ disableBuiltInScriptedLoadableModules CONSTANT)
48 Q_PROPERTY(
bool displayApplicationInformation READ displayApplicationInformation CONSTANT)
49 Q_PROPERTY(
bool displayVersionAndExit READ displayVersionAndExit CONSTANT)
50 Q_PROPERTY(
bool displayProgramPathAndExit READ displayProgramPathAndExit CONSTANT)
51 Q_PROPERTY(
bool displayHomePathAndExit READ displayHomePathAndExit CONSTANT)
52 Q_PROPERTY(
bool displaySettingsPathAndExit READ displaySettingsPathAndExit CONSTANT)
53 Q_PROPERTY(
bool displayTemporaryPathAndExit READ displayTemporaryPathAndExit CONSTANT)
54 Q_PROPERTY(
bool displayMessageAndExit READ displayMessageAndExit STORED false CONSTANT)
55 Q_PROPERTY(
bool verboseModuleDiscovery READ verboseModuleDiscovery CONSTANT)
56 Q_PROPERTY(
bool disableMessageHandlers READ disableMessageHandlers CONSTANT)
57 Q_PROPERTY(
bool testingEnabled READ isTestingEnabled CONSTANT)
58 #ifdef Slicer_USE_PYTHONQT 59 Q_PROPERTY(
bool pythonDisabled READ isPythonDisabled CONSTANT)
61 Q_PROPERTY(QStringList additionalModulePaths READ additionalModulePaths CONSTANT)
62 Q_PROPERTY(QStringList modulesToIgnore READ modulesToIgnore CONSTANT)
69 bool parse(const QStringList& arguments);
72 bool displayHelpAndExit()const;
75 bool ignoreRest() const;
78 bool ignoreSlicerRC()const;
81 QString pythonScript()const;
84 QString extraPythonScript()const;
87 void setExtraPythonScript(const QString& newExtraPythonScript);
90 QString pythonCode()const;
93 bool runPythonAndExit()const;
96 void setRunPythonAndExit(
bool value);
99 QStringList additionalModulePaths()const;
102 QStringList modulesToIgnore()const;
105 bool disableModules()const;
108 bool disableBuiltInModules()const;
111 bool disableCLIModules()const;
114 bool disableBuiltInCLIModules()const;
117 bool disableLoadableModules()const;
120 bool disableBuiltInLoadableModules()const;
123 bool disableScriptedLoadableModules()const;
126 bool disableBuiltInScriptedLoadableModules()const;
129 bool displayVersionAndExit()const;
132 bool displayProgramPathAndExit()const;
135 bool displayHomePathAndExit()const;
138 bool displaySettingsPathAndExit()const;
141 bool displayTemporaryPathAndExit()const;
152 virtual
bool displayMessageAndExit() const;
155 bool displayApplicationInformation() const;
158 bool verboseModuleDiscovery()const;
164 bool disableMessageHandlers()const;
171 bool disableTerminalOutputs()const;
179 bool settingsDisabled() const;
185 bool keepTemporarySettings() const;
192 bool isTestingEnabled()const;
194 #ifdef Slicer_USE_PYTHONQT 195 bool isPythonDisabled()
const;
205 virtual void addArguments();
209 QHash<QString, QVariant> parsedArgs()
const;
212 QScopedPointer<qSlicerCoreCommandOptionsPrivate>
d_ptr;
QScopedPointer< qSlicerCoreCommandOptionsPrivate > d_ptr
ctkCommandLineParser Superclass