Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxConsoleWidgetCollection.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 CXCONSOLEWIDGETCOLLECTION_H
13 #define CXCONSOLEWIDGETCOLLECTION_H
14 
15 #include <QMainWindow>
16 #include "cxXmlOptionItem.h"
17 #include <boost/shared_ptr.hpp>
18 class QMenu;
19 
20 #include "cxResourceWidgetsExport.h"
21 
22 namespace cx
23 {
24 typedef boost::shared_ptr<class Log> LogPtr;
25 
26 class cxResourceWidgets_EXPORT ConsoleWidgetCollection : public QMainWindow
27 {
28  Q_OBJECT
29 public:
30  ConsoleWidgetCollection(QWidget* parent, QString objectName, QString windowTitle, XmlOptionFile options, LogPtr log);
31  ConsoleWidgetCollection(QWidget* parent, QString objectName, QString windowTitle);
32  virtual ~ConsoleWidgetCollection();
33 private slots:
34  void onDockWidgetVisibilityChanged(bool val);
35  void onNewConsole();
36  void checkVisibility();
37  void onConsoleWindowTitleChanged(const QString & title);
38 protected:
39  virtual QMenu* createPopupMenu();
40 private:
41  QDockWidget* addAsDockWidget(QWidget* widget);
42  QDockWidget* createDockWidget(QWidget* widget);
43  void deleteDockWidget(QDockWidget* dockWidget);
44  void removeHiddenConsoles();
45  class ConsoleWidget* addConsole();
46 
47  QString mObjectName;
48  QString mWindowTitle;
49  XmlOptionFile mOptions;
50  LogPtr mLog;
51  XmlOptionItem option(QString name);
52  void setupUI();
53 
54  QList<QDockWidget*> mDockWidgets;
55 };
56 
57 } //namespace cx
58 
59 
60 #endif // CXCONSOLEWIDGETCOLLECTION_H
Widget for displaying status messages.
Helper class for storing one string value in an xml document.
boost::shared_ptr< class Log > LogPtr
Definition: cxLog.h:48
Helper class for xml files used to store ssc/cx data.
Namespace for all CustusX production code.