|
| static QString | executableExtension () |
| |
| static QString | extractModuleNameFromClassName (const QString &className) |
| |
| static QString | extractModuleNameFromLibraryName (const QString &libraryName) |
| | This function returns ".dll. on windows, ".so" on linux and ".dylib" on Mac.
|
| |
| static bool | isCLIExecutable (const QString &filePath) |
| | Returns true if the filePath matches the CLI executable file name requirements.
|
| |
| static bool | isCLILoadableModule (const QString &filePath) |
| |
| static bool | isCLIScriptedExecutable (const QString &filePath) |
| | Returns true if the filePath matches scripted CLI requirements.
|
| |
| static bool | isExecutableName (const QString &name) |
| |
| static bool | isLoadableModule (const QString &filePath) |
| |
| static bool | isPluginBuiltIn (const QString &filePath, const QString &applicationHomeDir, const QString &applicationRevision) |
| | Return true if the plugin identified with its filePath is a built-in Slicer module.
|
| |
| static bool | isPluginInstalled (const QString &filePath, const QString &applicationHomeDir) |
| |
| static bool | isTestingModule (qSlicerAbstractCoreModule *module) |
| |
| static bool | pathEndsWith (const QString &inputPath, const QString &path) |
| | Return true if the inputPath ends with path.
|
| |
| static QString | pathWithoutIntDir (const QString &path, const QString &subDirWithoutIntDir) |
| |
| static QString | pathWithoutIntDir (const QString &path, const QString &subDirWithoutIntDir, QString &intDir) |
| |
| static QString | replaceDocumentationUrlVersion (const QString &text, const QString &hostname, const QString &version) |
| | Return an updated text where Slicer documentation URL version is replaced with the provided one.
|
| |
| static QString | replaceWikiUrlVersion (const QString &text, const QString &version) |
| | Return an updated text where Slicer wiki URL version is replaced with the provided one. It is now deprecated as the Slicer wiki is no longer recommended for storing documentation. Instead Slicer core documentation is hosted on ReadTheDocs (and versioning can be implemented using replaceDocumentationUrlVersion) and extension documentation is expected to be hosted in each extension's repository (and modules in extensions can create versioned links for their documentation using qSlicerCoreApplication::documentationVersion()).
|
| |
| static QString | safeQStringFromUtf8Ptr (const char *cString) |
| |
| static QString | searchTargetInIntDir (const QString &directory, const QString &target) |
| |
| static bool | setPermissionsRecursively (const QString &path, QFile::Permissions directoryPermissions, QFile::Permissions filePermissions) |
| |
Definition at line 31 of file qSlicerUtils.h.
| static QString qSlicerUtils::extractModuleNameFromLibraryName |
( |
const QString & | libraryName | ) |
|
|
static |
This function returns ".dll. on windows, ".so" on linux and ".dylib" on Mac.
Extract module name given a library name For example: on linux, libThresholdLib.so -> Threshold on mac, libThresholdLib.{dylib, bundle, so} -> Threshold on windows, ThresholdLib.dll -> Threshold
| static bool qSlicerUtils::isExecutableName |
( |
const QString & | name | ) |
|
|
static |
Return true if the string name ends with one of these executable extension: ".bat", ".com", ".sh", ".csh", ".tcsh", ".pl", ".py", ".tcl", ".m", ".exe"
- Note
- The comparison is case insensitive
| static QString qSlicerUtils::replaceDocumentationUrlVersion |
( |
const QString & | text, |
|
|
const QString & | hostname, |
|
|
const QString & | version ) |
|
static |
Return an updated text where Slicer documentation URL version is replaced with the provided one.
Any URL that contains /<VERSION>/ and with URL host name that contains the provided hostname string will be updated.
Following readthedocs versioning conventions, <VERSION> can be <major>.<minor>, v<major>.<minor>, latest, or stable.
Only the first occurrence of version is replaced (to keep file or directory names that have a name that matches accepted version patterns unchanged). For example, in https://slicer.readthedocs.io/en/latest/user_guide/schema/1.0/something.html the 1.0 folder name will not be changed (only latest will be set to the actual version).
Limitations:
- language code is not updated (the language specified in the original URL will be used)
- extensions that have versioned documentation maintained in their own repository have to generate their versioned links (for example, using qSlicerCoreApplication::documentationVersion()).
| static QString qSlicerUtils::replaceWikiUrlVersion |
( |
const QString & | text, |
|
|
const QString & | version ) |
|
static |
Return an updated text where Slicer wiki URL version is replaced with the provided one. It is now deprecated as the Slicer wiki is no longer recommended for storing documentation. Instead Slicer core documentation is hosted on ReadTheDocs (and versioning can be implemented using replaceDocumentationUrlVersion) and extension documentation is expected to be hosted in each extension's repository (and modules in extensions can create versioned links for their documentation using qSlicerCoreApplication::documentationVersion()).
Any URL containing Documentation/<VERSION>/ will be updated.
More specifically, in an URL with http or https protocol that contains "Documentation" path element, the following path element is replaced by the provided version. If there are multiple "Documentation" path elements then only the first one is considered.
- Note
- The "path element" term is defined in this rfc: https://tools.ietf.org/html/rfc3986 "A path consists of a sequence of path segments separated by a slash
("/") character."
Examples:
"https://wiki.slicer.org/slicerWiki/index.php/Documentation/4.4/Extensions/SlicerToKiwiExporter");
"https://wiki.slicer.org/slicerWiki/index.php/Documentation/Bar/Extensions/SlicerToKiwiExporter");
"https://wiki.slicer.org/slicerWiki/index.php/Documentation/Bar/Extensions/SlicerToKiwiExporter/Foo");
QString input = "Read documentation at "
"https://wiki.slicer.org/slicerWiki/index.php/Documentation/4.4/Extensions/SlicerToKiwiExporter."
"You will learn how to ...";
QString expectedOutput = "Read documentation at "
"https://wiki.slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/SlicerToKiwiExporter."
"You will learn how to ...";