Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkFileExitAction.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "QmitkFileExitAction.h"
14 #include "internal/org_mitk_gui_qt_application_Activator.h"
15 
16 #include <berryPlatformUI.h>
17 
19  : QAction(nullptr)
20  , m_Window(nullptr)
21 {
22  this->init(window.GetPointer());
23 }
24 
26  : QAction(nullptr)
27  , m_Window(nullptr)
28 {
29  this->setIcon(icon);
30  this->init(window.GetPointer());
31 }
32 
34  : QAction(nullptr)
35  , m_Window(nullptr)
36 {
37  this->init(window);
38 }
39 
41  : QAction(nullptr)
42  , m_Window(nullptr)
43 {
44  this->setIcon(icon);
45  this->init(window);
46 }
47 
48 void QmitkFileExitAction::init(berry::IWorkbenchWindow* window)
49 {
50  m_Window = window;
51  this->setText("&Exit");
52  this->setToolTip("Exit the application. Please save your data before exiting.");
53  this->connect(this, SIGNAL(triggered(bool)), this, SLOT(Run()));
54 }
55 
57 {
59 }
QmitkFileExitAction(berry::SmartPointer< berry::IWorkbenchWindow > window)
virtual bool Close()=0
static IWorkbench * GetWorkbench()
ObjectType * GetPointer() const