00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2009-08-26 18:11:29 +0200 (Mi, 26 Aug 2009) $ 00006 Version: $Revision: 18726 $ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #include "QmitkFileExitAction.h" 00019 00020 #include <QFileDialog> 00021 #include <mitkDataNodeFactory.h> 00022 00023 #include <mitkCoreObjectFactory.h> 00024 #include <mitkDataStorageEditorInput.h> 00025 #include <berryIEditorPart.h> 00026 #include <berryIWorkbenchPage.h> 00027 00028 #include "QmitkStdMultiWidgetEditor.h" 00029 #include <berryPlatformUI.h> 00030 00031 QmitkFileExitAction::QmitkFileExitAction(berry::IWorkbenchWindow::Pointer window) 00032 : QAction(0) 00033 { 00034 m_Window = window.GetPointer(); 00035 00036 this->setParent(static_cast<QWidget*>(m_Window->GetShell()->GetControl())); 00037 this->setText("&Exit"); 00038 00039 this->connect(this, SIGNAL(triggered(bool)), this, SLOT(Run())); 00040 } 00041 00042 void QmitkFileExitAction::Run() 00043 { 00044 berry::PlatformUI::GetWorkbench()->Close(); 00045 }