Fraxinus  2023.01.05-dev+develop.0da12
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
QWidget * addDummyMargin(QWidget *widget)
boost::shared_ptr< class ViewService > ViewServicePtr
QWidget * createDataWidget(ViewServicePtr viewService, PatientModelServicePtr patientModelService, QWidget *parent, PropertyPtr data, QGridLayout *gridLayout, int row)
Create a widget capable of displaying the input data.
QHBoxLayout * mergeWidgetsIntoHBoxLayout(QWidget *first, QWidget *second)
sscFloatingWidget(QWidget *parent=0)
boost::shared_ptr< class Property > PropertyPtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
QWidget * sscCreateDataWidget(QWidget *parent, PropertyPtr data, QGridLayout *gridLayout, int row)
Create a widget capable of displaying the input data.
A widget that floats above the other windows. Used as basis for the floating controls.
Namespace for all CustusX production code.