00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2010-01-16 19:57:43 +0100 (Sa, 16 Jan 2010) $ 00006 Version: $Revision: 21070 $ 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 #ifndef QMITKEXTFILEOPENACTION_H_ 00019 #define QMITKEXTFILEOPENACTION_H_ 00020 00021 #ifdef __MINGW32__ 00022 // We need to inlclude winbase.h here in order to declare 00023 // atomic intrinsics like InterlockedIncrement correctly. 00024 // Otherwhise, they would be declared wrong within qatomic_windows.h . 00025 #include <windows.h> 00026 #endif 00027 00028 #include <QAction> 00029 #include <QIcon> 00030 00031 #include "mitkQtCommonExtDll.h" 00032 00033 #include <berryIWorkbenchWindow.h> 00034 #include <berryIPreferences.h> 00035 00036 class MITK_QT_COMMON_EXT_EXPORT QmitkExtFileOpenAction : public QAction 00037 { 00038 Q_OBJECT 00039 00040 public: 00041 QmitkExtFileOpenAction(berry::IWorkbenchWindow::Pointer window); 00042 QmitkExtFileOpenAction(const QIcon & icon, berry::IWorkbenchWindow::Pointer window); 00043 00044 protected slots: 00045 00046 void Run(); 00047 00048 private: 00049 void init ( berry::IWorkbenchWindow::Pointer window ); 00050 berry::IWorkbenchWindow::Pointer m_Window; 00051 berry::IPreferences::WeakPtr m_GeneralPreferencesNode; 00052 }; 00053 00054 00055 #endif /*QMITKEXTFILEOPENACTION_H_*/