NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxGUIExtenderService.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXGUIEXTENDERSERVICE_H_
13 #define CXGUIEXTENDERSERVICE_H_
14 
15 #include "cxGUIExtenderServiceExport.h"
16 
17 #include <QObject>
18 #include "boost/shared_ptr.hpp"
19 class QWidget;
20 class QToolBar;
21 #include <vector>
22 
23 #define GUIExtenderService_iid "cx::GUIExtenderService"
24 
25 namespace cx
26 {
27 typedef boost::shared_ptr<class GUIExtenderService> GUIExtenderServicePtr;
28 typedef boost::shared_ptr<class PatientModelService> PatientModelServicePtr;
29 typedef boost::shared_ptr<class RegistrationService> RegistrationServicePtr;
30 typedef boost::shared_ptr<class ViewService> ViewServicePtr;
31 typedef boost::shared_ptr<class VideoService> VideoServicePtr;
32 typedef boost::shared_ptr<class VisServices> VisServicesPtr;
33 
40 class cxGUIExtenderService_EXPORT GUIExtenderService : public QObject
41 {
42  Q_OBJECT
43 public:
45  {
47  CategorizedWidget(QWidget* widget, QString category, bool placeInSeparateWindow = false) :
48  mWidget(widget), mCategory(category), mPlaceInSeparateWindow(placeInSeparateWindow) {}
49  QWidget* mWidget;
50  QString mCategory;
52  };
53  virtual ~GUIExtenderService() {}
54 
55  virtual std::vector<CategorizedWidget> createWidgets() const = 0;
56  virtual std::vector<QToolBar*> createToolBars() const { return std::vector<QToolBar*>(); }
57 };
58 
59 } // namespace cx
61 
62 
63 #endif /* CXGUIEXTENDERSERVICE_H_ */
cx::RegistrationServicePtr
boost::shared_ptr< class RegistrationService > RegistrationServicePtr
Definition: cxRegistrationProperties.h:25
cx::VideoServicePtr
boost::shared_ptr< class VideoService > VideoServicePtr
Definition: cxLogicManager.h:26
cx::GUIExtenderService::CategorizedWidget::CategorizedWidget
CategorizedWidget(QWidget *widget, QString category, bool placeInSeparateWindow=false)
Definition: cxGUIExtenderService.h:47
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::GUIExtenderService::CategorizedWidget::mPlaceInSeparateWindow
bool mPlaceInSeparateWindow
Definition: cxGUIExtenderService.h:51
cx::VisServicesPtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
cx::GUIExtenderService::CategorizedWidget::CategorizedWidget
CategorizedWidget()
Definition: cxGUIExtenderService.h:46
cx::GUIExtenderService
Definition: cxGUIExtenderService.h:40
cx::PatientModelServicePtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Definition: cxLogicManager.h:25
cx::ViewServicePtr
boost::shared_ptr< class ViewService > ViewServicePtr
Definition: cxLogicManager.h:28
cx::GUIExtenderService::CategorizedWidget::mCategory
QString mCategory
Definition: cxGUIExtenderService.h:50
cx::GUIExtenderServicePtr
boost::shared_ptr< class GUIExtenderService > GUIExtenderServicePtr
Definition: cxGUIExtenderService.h:27
cx::GUIExtenderService::createToolBars
virtual std::vector< QToolBar * > createToolBars() const
Definition: cxGUIExtenderService.h:56
GUIExtenderService_iid
#define GUIExtenderService_iid
Definition: cxGUIExtenderService.h:23
cx::GUIExtenderService::CategorizedWidget::mWidget
QWidget * mWidget
Definition: cxGUIExtenderService.h:49
cx::GUIExtenderService::CategorizedWidget
Definition: cxGUIExtenderService.h:44
cx::GUIExtenderService::~GUIExtenderService
virtual ~GUIExtenderService()
Definition: cxGUIExtenderService.h:53