MCPcopy Create free account
hub / github.com/MITK/MITK / main

Function main

Examples/BlueBerryExampleLauncher/BlueBerryExampleLauncher.cpp:20–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18#include <QVariant>
19
20int main(int argc, char **argv)
21{
22 mitk::BaseApplication app(argc, argv);
23 app.setApplicationName("BlueBerryExampleLauncher");
24 app.setOrganizationName("DKFZ");
25 app.initializeQt();
26
27 BlueBerryExampleLauncherDialog demoDialog;
28 QString selectedConfiguration = demoDialog.getDemoConfiguration();
29
30 if (selectedConfiguration.isEmpty())
31 return EXIT_SUCCESS;
32
33 app.setProvisioningFilePath(selectedConfiguration);
34
35 // We create the application id relying on a convention:
36 // org.mitk.example.<configuration-name>
37 QString appId = "org.mitk.example.";
38 QStringList appIdTokens = QFileInfo(selectedConfiguration).baseName().toLower().split('_', Qt::SkipEmptyParts);
39 appId += appIdTokens.size() > 1 ? appIdTokens.at(1) : appIdTokens.at(0);
40
41 // Special cases
42 if (appId == "org.mitk.example.exampleplugins")
43 {
44 appId = "org.mitk.qt.extapplication";
45 }
46
47 app.setProperty(mitk::BaseApplication::PROP_APPLICATION, appId);
48
49 return app.run();
50}

Callers

nothing calls this directly

Calls 9

setApplicationNameMethod · 0.80
setOrganizationNameMethod · 0.80
initializeQtMethod · 0.80
getDemoConfigurationMethod · 0.80
atMethod · 0.80
setPropertyMethod · 0.80
sizeMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected