NorMIT-nav  22.09
An IGT application
cxHelperWidgets.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 
13 #ifndef CXHELPERWIDGETS_H_
14 #define CXHELPERWIDGETS_H_
15 
16 #include "cxResourceWidgetsExport.h"
17 
18 #include <QWidget>
19 #include "cxProperty.h"
20 class QGridLayout;
21 class QHBoxLayout;
22 
23 namespace cx
24 {
25 
36 class cxResourceWidgets_EXPORT sscFloatingWidget: public QWidget
37 {
38 Q_OBJECT
39 
40 public:
42  {
43  }
44  sscFloatingWidget(QWidget* parent = 0) :
45  QWidget(parent)
46  {
47  Qt::WindowFlags flags = Qt::FramelessWindowHint;
48  flags |= Qt::Window;
49  flags |= Qt::WindowStaysOnTopHint;
50  this->setWindowFlags(flags);
51  }
52 };
53 
69 cxResourceWidgets_EXPORT QHBoxLayout* mergeWidgetsIntoHBoxLayout(QWidget* first, QWidget* second);
75 cxResourceWidgets_EXPORT QWidget* addDummyMargin(QWidget* widget);
76 
83 cxResourceWidgets_EXPORT QWidget* sscCreateDataWidget(QWidget* parent, PropertyPtr data, QGridLayout* gridLayout = 0, int row = 0);
84 
85 typedef boost::shared_ptr<class PatientModelService> PatientModelServicePtr;
86 typedef boost::shared_ptr<class ViewService> ViewServicePtr;
87 
95 cxResourceWidgets_EXPORT QWidget* createDataWidget(ViewServicePtr viewService, PatientModelServicePtr patientModelService, QWidget* parent, cx::PropertyPtr data, QGridLayout* gridLayout = 0, int row = 0);
96 
97 
98 } // namespace cx
99 
100 
105 #endif
cx::createDataWidget
QWidget * createDataWidget(ViewServicePtr viewService, PatientModelServicePtr patientModelService, QWidget *parent, PropertyPtr data, QGridLayout *gridLayout, int row)
Create a widget capable of displaying the input data.
Definition: cxHelperWidgets.cpp:41
cx::addDummyMargin
QWidget * addDummyMargin(QWidget *widget)
Definition: cxHelperWidgets.cpp:123
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::mergeWidgetsIntoHBoxLayout
QHBoxLayout * mergeWidgetsIntoHBoxLayout(QWidget *first, QWidget *second)
Definition: cxHelperWidgets.cpp:131
cx::sscFloatingWidget::~sscFloatingWidget
virtual ~sscFloatingWidget()
Definition: cxHelperWidgets.h:41
cx::PropertyPtr
boost::shared_ptr< class Property > PropertyPtr
Definition: cxLocalServerStreamerServer.h:25
cx::PatientModelServicePtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Definition: cxLogicManager.h:25
cx::ViewServicePtr
boost::shared_ptr< class ViewService > ViewServicePtr
Definition: cxLogicManager.h:28
cxProperty.h
cx::sscFloatingWidget::sscFloatingWidget
sscFloatingWidget(QWidget *parent=0)
Definition: cxHelperWidgets.h:44
cx::sscFloatingWidget
A widget that floats above the other windows. Used as basis for the floating controls.
Definition: cxHelperWidgets.h:36
cx::sscCreateDataWidget
QWidget * sscCreateDataWidget(QWidget *parent, PropertyPtr data, QGridLayout *gridLayout, int row)
Create a widget capable of displaying the input data.
Definition: cxHelperWidgets.cpp:59