Functions

CoreApp.cpp File Reference

#include <org.blueberry.osgi/src/application/berryStarter.h>
#include <Poco/Util/MapConfiguration.h>

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main ( int  argc,
char **  argv 
)
Examples:
QtFreeRender.cpp, Step1.cpp, Step10.cpp, Step2.cpp, Step3.cpp, Step4.cpp, Step5.cpp, Step6main.cpp, Step7main.cpp, and Step8main.cpp.

Definition at line 21 of file CoreApp.cpp.

References berry::Platform::ARG_APPLICATION, berry::Platform::ARG_PLUGIN_DIRS, and berry::Starter::Run().

Referenced by QxtSpanSlider::keyPressEvent(), QxtSpanSliderPrivate::movePressedHandle(), QxtSpanSlider::setLowerPosition(), and QxtSpanSlider::setUpperPosition().

{
  // These paths replace the .ini file and are tailored for installation
  // packages created with CPack. If a .ini file is presented, it will
  // overwrite the settings in MapConfiguration
  Poco::Path basePath(argv[0]);
  basePath.setFileName("");
  
  Poco::Path BlueBerryPath(basePath);
  BlueBerryPath.pushDirectory("BlueBerry");

  Poco::Path corePath(basePath);
  corePath.pushDirectory("CoreBundles");

  std::string pluginDirs = BlueBerryPath.toString() + ";" + corePath.toString();

  Poco::Util::MapConfiguration* coreConfig(new Poco::Util::MapConfiguration());
  coreConfig->setString(berry::Platform::ARG_PLUGIN_DIRS, pluginDirs);
  coreConfig->setString(berry::Platform::ARG_APPLICATION, "org.mitk.qt.application");
  return berry::Starter::Run(argc, argv, coreConfig);
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines