CustusX
2023.01.05-dev+develop.0da12
An IGT application
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
cxMainWindowApplicationComponent.h
Go to the documentation of this file.
1
#ifndef CXMAINWINDOWAPPLICATIONCOMPONENT_H
2
#define CXMAINWINDOWAPPLICATIONCOMPONENT_H
3
4
5
/*=========================================================================
6
This file is part of CustusX, an Image Guided Therapy Application.
7
8
Copyright (c) SINTEF Department of Medical Technology.
9
All rights reserved.
10
11
CustusX is released under a BSD 3-Clause license.
12
13
See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
14
=========================================================================*/
15
16
#include "
cxLogicManager.h
"
17
#include "
cxApplication.h
"
18
19
namespace
cx
20
{
21
26
template
<
class
MAIN_WINDOW>
27
class
MainWindowApplicationComponent
:
public
ApplicationComponent
28
{
29
public
:
30
virtual
void
create
()
31
{
32
if
(this->
exists
())
33
return
;
34
mMainWindow
=
new
MAIN_WINDOW;
35
cx::bringWindowToFront
(
mMainWindow
);
36
}
37
38
virtual
bool
exists
()
const
39
{
40
return
mMainWindow
!= 0;
41
}
42
43
virtual
void
destroy
()
44
{
45
if
(!this->
exists
())
46
return
;
47
48
delete
mMainWindow
;
49
}
50
51
//private:
52
QPointer<MAIN_WINDOW>
mMainWindow
;
53
};
54
55
}
// namespace cx
56
57
58
#endif // CXMAINWINDOWAPPLICATIONCOMPONENT_H
cx::ApplicationComponent
Definition:
cxLogicManager.h:45
cx::MainWindowApplicationComponent::destroy
virtual void destroy()
Definition:
cxMainWindowApplicationComponent.h:43
cxLogicManager.h
cx::bringWindowToFront
void bringWindowToFront(QWidget *window)
Definition:
cxApplication.cpp:99
cx::MainWindowApplicationComponent::create
virtual void create()
Definition:
cxMainWindowApplicationComponent.h:30
cx::MainWindowApplicationComponent
Definition:
cxMainWindowApplicationComponent.h:27
cx::MainWindowApplicationComponent::exists
virtual bool exists() const
Definition:
cxMainWindowApplicationComponent.h:38
cxApplication.h
cx::MainWindowApplicationComponent::mMainWindow
QPointer< MAIN_WINDOW > mMainWindow
Definition:
cxMainWindowApplicationComponent.h:52
cx
Namespace for all CustusX production code.
Definition:
cx_dev_group_definitions.h:13
CX
source
gui
cxMainWindowApplicationComponent.h
Generated on Thu Jan 5 2023 00:50:38 for CustusX by
1.8.11