Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MitkWorkbench.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include <mitkBaseApplication.h>
18 
19 #include <QVariant>
20 
21 int main(int argc, char **argv)
22 {
23  mitk::BaseApplication app(argc, argv);
24 
25  app.setSingleMode(true);
26  app.setApplicationName("MITK Workbench");
27  app.setOrganizationName("DKFZ");
28 
29  // Preload the org.mitk.gui.qt.ext plug-in (and hence also QmitkExt) to speed
30  // up a clean-cache start. This also works around bugs in older gcc and glibc implementations,
31  // which have difficulties with multiple dynamic opening and closing of shared libraries with
32  // many global static initializers. It also helps if dependent libraries have weird static
33  // initialization methods and/or missing de-initialization code.
34  QStringList preloadLibs;
35  preloadLibs << "liborg_mitk_gui_qt_ext";
36  app.setPreloadLibraries(preloadLibs);
37 
38  app.setProperty(mitk::BaseApplication::PROP_PRODUCT, "org.mitk.gui.qt.extapplication.workbench");
39 
40  // Run the workbench.
41  return app.run();
42 }
void setPreloadLibraries(const QStringList &libraryBaseNames)
void setProperty(const QString &property, const QVariant &value)
void setOrganizationName(const QString &name)
void setSingleMode(bool singleMode)
int main(int argc, char **argv)
void setApplicationName(const QString &name)