Slicer  5.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerSingletonViewFactory.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3 Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4 Queen's University, Kingston, ON, Canada. All Rights Reserved.
5 
6 See COPYRIGHT.txt
7 or http://www.slicer.org/copyright/copyright.txt for details.
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 
15 This file was originally developed by Kyle Sunderland, PerkLab, Queen's University
16 and was supported through CANARIE's Research Software Program, and Cancer
17 Care Ontario.
18 
19 ==============================================================================*/
20 
21 #ifndef qSlicerSingletonViewFactory_h
22 #define qSlicerSingletonViewFactory_h
23 
24 // CTK includes
25 #include "ctkLayoutViewFactory.h"
26 
27 // QtGUI includes
28 #include "qSlicerBaseQTGUIExport.h"
29 
30 class ctkDICOMBrowser;
31 class qSlicerSingletonViewFactoryPrivate;
32 
38 class Q_SLICER_BASE_QTGUI_EXPORT qSlicerSingletonViewFactory : public ctkLayoutViewFactory
39 {
40  Q_OBJECT
41 public:
42  typedef ctkLayoutViewFactory Superclass;
43  qSlicerSingletonViewFactory(QObject* parent=nullptr);
44  ~qSlicerSingletonViewFactory() override;
45 
47  QStringList supportedElementNames()const override;
48 
51  Q_INVOKABLE virtual void setWidget(QWidget* widget);
53  Q_INVOKABLE virtual QWidget* widget();
54 
56  Q_INVOKABLE virtual void setTagName(QString tagName);
58  Q_INVOKABLE QString tagName();
59 
60 public slots:
61  virtual void onWidgetDestroyed();
62 
63 protected:
64  QScopedPointer<qSlicerSingletonViewFactoryPrivate> d_ptr;
65 
67  Q_INVOKABLE QWidget* createViewFromXML(QDomElement layoutElement) override;
68 
69 private:
70  Q_DECLARE_PRIVATE(qSlicerSingletonViewFactory)
71 };
72 
73 #endif
QScopedPointer< qSlicerSingletonViewFactoryPrivate > d_ptr