Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxViewCollectionWidget.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 CXVIEWCOLLECTIONWIDGET_H_
13 #define CXVIEWCOLLECTIONWIDGET_H_
14 
15 #include "cxResourceVisualizationExport.h"
16 
17 #include "cxView.h"
18 #include "cxLayoutData.h"
19 #include <QWidget>
20 
21 
22 class QGridLayout;
23 
24 namespace cx
25 {
26 
39 class cxResourceVisualization_EXPORT ViewCollectionWidget : public QWidget
40 {
41  Q_OBJECT
42 public:
43  static QPointer<ViewCollectionWidget> createViewWidgetLayout(RenderWindowFactoryPtr factory, QWidget* parent = NULL);
44  static QPointer<ViewCollectionWidget> createOptimizedLayout(RenderWindowFactoryPtr factory, QWidget* parent = NULL);
45 
46  virtual ~ViewCollectionWidget() {}
47 
48  virtual ViewPtr addView(View::Type type, LayoutRegion region) = 0;
49  virtual void setOffScreenRenderingAndClear(bool on) = 0;
50  virtual bool getOffScreenRendering() const = 0;
51  virtual void clearViews() = 0;
52  virtual void setModified() = 0;
53  virtual void render() = 0;
54  virtual void setGridSpacing(int val) = 0;
55  virtual void setGridMargin(int val) = 0;
56  virtual int getGridSpacing() const = 0;
57  virtual int getGridMargin() const = 0;
58  virtual void enableContextMenuForViews(bool enable) = 0;
59 
60  virtual std::vector<ViewPtr> getViews() = 0;
65  virtual QPoint getPosition(ViewPtr view) = 0;
66 
67 signals:
68  void rendered();
69 protected:
70  ViewCollectionWidget(QWidget* parent) : QWidget(parent) {}
71 };
72 
73 
74 } // namespace cx
75 
76 #endif // CXVIEWCOLLECTIONWIDGET_H_
boost::shared_ptr< class View > ViewPtr
ViewCollectionWidget(QWidget *parent)
boost::shared_ptr< class RenderWindowFactory > RenderWindowFactoryPtr
Namespace for all CustusX production code.