Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxViewCollectionWidgetUsingViewContainer.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 CXVIEWCOLLECTIONWIDGETUSINGVIEWCONTAINER_H_
13 #define CXVIEWCOLLECTIONWIDGETUSINGVIEWCONTAINER_H_
14 
15 #include "cxResourceVisualizationExport.h"
16 
17 #include "cxView.h"
18 #include "cxLayoutData.h"
19 #include "cxViewCollectionWidget.h"
20 
21 
22 class QGridLayout;
23 
24 namespace cx
25 {
26 
35 class cxResourceVisualization_EXPORT ViewCollectionWidgetUsingViewContainer : public ViewCollectionWidget
36 {
37  Q_OBJECT
38 public:
41 
42  ViewPtr addView(View::Type type, LayoutRegion region);
43  virtual void setOffScreenRenderingAndClear(bool on);
44  virtual bool getOffScreenRendering() const;
45  void clearViews();
46  virtual void setModified();
47  virtual void render();
48  virtual void setGridSpacing(int val);
49  virtual void setGridMargin(int val);
50  virtual int getGridSpacing() const;
51  virtual int getGridMargin() const;
52  virtual std::vector<ViewPtr> getViews();
53  virtual QPoint getPosition(ViewPtr view);
54  virtual void enableContextMenuForViews(bool enable);
55 
56 private:
57  std::vector<ViewPtr> mViews;
58  class ViewContainer* mViewContainer;
59 };
60 
61 
62 
63 } // namespace cx
64 #endif /* CXVIEWCOLLECTIONWIDGETUSINGVIEWCONTAINER_H_ */
boost::shared_ptr< class View > ViewPtr
boost::shared_ptr< class RenderWindowFactory > RenderWindowFactoryPtr
Namespace for all CustusX production code.