CustusX  16.12
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cxMetricUtilities.h
Go to the documentation of this file.
1 #ifndef CXMETRICUTILITIES_H
2 #define CXMETRICUTILITIES_H
3 
4 #include "cxViewService.h"
6 #include "cxDataMetricWrappers.h"
7 #include "cxBaseWidget.h"
8 
9 namespace cx
10 {
11 
13 {
14  Q_OBJECT
15 public:
16  SingleMetricWidget(QWidget* parent, MetricBasePtr wrapper, QLabel *valueLabel);
18  {
19  }
20 
21  DataPtr getData();
22 protected:
23 
24  virtual void prePaintEvent();
26  QLabel* mValueLabel;
27 };
28 
29 class MetricUtilities: public QObject
30 {
31 public:
33 
35  std::vector<MetricBasePtr> createMetricWrappers();
36  QWidget *createMetricWidget(DataPtr data);
37 
38 private:
39  PatientModelServicePtr mPatientModelService;
40  ViewServicePtr mViewService;
41 };
42 
43 }//cx
44 
45 #endif // CXMETRICUTILITIES_H
MetricUtilities(ViewServicePtr viewService, PatientModelServicePtr patientModelService)
boost::shared_ptr< class ViewService > ViewServicePtr
std::vector< MetricBasePtr > createMetricWrappers()
SingleMetricWidget(QWidget *parent, MetricBasePtr wrapper, QLabel *valueLabel)
boost::shared_ptr< class Data > DataPtr
boost::shared_ptr< class MetricBase > MetricBasePtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:108
cxLogicManager_EXPORT ViewServicePtr viewService()
QWidget * createMetricWidget(DataPtr data)
MetricBasePtr createMetricWrapper(DataPtr data)