NorMIT-nav  22.09
An IGT application
cxSecondaryMainWindow.cpp
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 #include "cxSecondaryMainWindow.h"
12 
13 #include "cxTrackPadWidget.h"
14 
15 namespace cx
16 {
17 
18 SecondaryMainWindow::SecondaryMainWindow(QWidget* parent, QWidget* widget) :
19  QMainWindow(parent, Qt::WindowStaysOnTopHint)
20 {
21 // this->setWindowTitle("Control Panel");
22  this->setTabPosition(Qt::AllDockWidgetAreas, QTabWidget::North);
23 
24  widget->setParent(this);
25  this->addAsDockWidget(widget, true);
26 
27  //Define geometry to prevent the window from being placed in the center of the screen.
28  this->setGeometry(0, 600, 600, 400);
29 }
30 
32 {
33 
34 }
35 
36 void SecondaryMainWindow::addAsDockWidget(QWidget* widget, bool visible)
37 {
38  QDockWidget* dockWidget = new QDockWidget(widget->windowTitle(), this);
39  dockWidget->setObjectName(widget->objectName() + "DockWidget");
40  dockWidget->setWidget(widget);
41  this->addDockWidget(Qt::LeftDockWidgetArea, dockWidget);
42  dockWidget->setVisible(visible); // default visibility
43 }
44 
45 } // namespace cx
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxSecondaryMainWindow.h
cx::SecondaryMainWindow::~SecondaryMainWindow
~SecondaryMainWindow()
Definition: cxSecondaryMainWindow.cpp:31
cxTrackPadWidget.h
cx::SecondaryMainWindow::SecondaryMainWindow
SecondaryMainWindow(QWidget *parent, QWidget *widget)
Definition: cxSecondaryMainWindow.cpp:18