NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkBaseApplicationPluginActivator.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef niftkBaseApplicationPluginActivator_h
16 #define niftkBaseApplicationPluginActivator_h
17 
18 #include <uk_ac_ucl_cmic_commonapps_Export.h>
19 
20 #include <ctkServiceTracker.h>
21 
22 #include <QObject>
23 #include <ctkPluginActivator.h>
24 
25 
26 namespace niftk
27 {
28 
32 class COMMONAPPS_EXPORT BaseApplicationPluginActivator : public QObject, public ctkPluginActivator
33 {
34  Q_OBJECT
35  Q_INTERFACES(ctkPluginActivator)
36 
37 public:
38 
41 
42  static BaseApplicationPluginActivator* GetInstance();
43 
44  ctkPluginContext* GetContext() const;
45 
46  virtual void start(ctkPluginContext* context) override;
47 
48  virtual void stop(ctkPluginContext* context) override;
49 
50 protected:
51 
53  void RegisterHelpSystem();
54 
55  // \brief Sets a preference whether to reinitialise the rendering manager after opening a file.
56  // It is suggested to set this to 'false' with the DnD display.
57  void SetFileOpenTriggersReinit(bool openEditor);
58 
60  virtual QString GetHelpHomePageURL() const
61  {
62  return QString();
63  }
64 
65 private:
66 
67  ctkPluginContext* m_Context;
68 
69  static BaseApplicationPluginActivator* s_Instance;
70 
71 };
72 
73 }
74 
75 #endif
Abstract class that implements QT and CTK specific functionality to launch the application as a plugi...
Definition: niftkBaseApplicationPluginActivator.h:32
GLuint start
Definition: glew.h:1237
virtual QString GetHelpHomePageURL() const
Derived classes should provide a URL for which help page to use as the 'home' page.
Definition: niftkBaseApplicationPluginActivator.h:60
Definition: niftkExceptionObject.h:21