Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkSafeApplication.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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include "QmitkSafeApplication.h"
18 
19 #include "QmitkSafeNotify.h"
20 
21 #include <mitkException.h>
22 #include <mitkLogMacros.h>
23 
24 QmitkSafeApplication::QmitkSafeApplication(int &argc, char **argv) : QApplication(argc, argv)
25 {
26 }
27 
28 bool QmitkSafeApplication::notify(QObject *receiver, QEvent *event)
29 {
30  if (!m_SafeMode)
31  {
32  return QApplication::notify(receiver, event);
33  }
34 
35  return QmitkSafeNotify<QApplication>(this, receiver, event);
36 }
37 
39 {
40  m_SafeMode = safeMode;
41 }
42 
44 {
45  return m_SafeMode;
46 }
bool notify(QObject *receiver, QEvent *event) override
void setSafeMode(bool safeMode)
QmitkSafeApplication(int &argc, char **argv)