00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 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 QMITKSTDMULTIWIDGETEDITOR_H_ 00019 #define QMITKSTDMULTIWIDGETEDITOR_H_ 00020 00021 #include <berryQtEditorPart.h> 00022 #include <berryIPartListener.h> 00023 00024 #include <QmitkStdMultiWidget.h> 00025 #include <QmitkDnDFrameWidget.h> 00026 00027 #include "mitkQtCommonDll.h" 00028 00029 class MITK_QT_COMMON QmitkStdMultiWidgetEditor : public berry::QtEditorPart, virtual public berry::IPartListener 00030 { 00031 public: 00032 berryObjectMacro(QmitkStdMultiWidgetEditor); 00033 00034 static const std::string EDITOR_ID; 00035 00036 QmitkStdMultiWidgetEditor(); 00037 ~QmitkStdMultiWidgetEditor(); 00038 00039 QmitkStdMultiWidget* GetStdMultiWidget(); 00040 00041 void Init(berry::IEditorSite::Pointer site, berry::IEditorInput::Pointer input); 00042 00043 void SetFocus(); 00044 00045 void DoSave() {} 00046 void DoSaveAs() {} 00047 bool IsDirty() const { return false; } 00048 bool IsSaveAsAllowed() const { return false; } 00049 00050 protected: 00051 00052 void CreateQtPartControl(QWidget* parent); 00053 // IPartListener 00054 Events::Types GetPartEventTypes() const; 00055 virtual void PartClosed (berry::IWorkbenchPartReference::Pointer partRef); 00056 virtual void PartHidden (berry::IWorkbenchPartReference::Pointer partRef); 00057 virtual void PartVisible (berry::IWorkbenchPartReference::Pointer partRef); 00058 00059 private: 00060 00061 QmitkStdMultiWidget* m_StdMultiWidget; 00062 QmitkDnDFrameWidget* m_DndFrameWidget; 00063 }; 00064 00065 #endif /*QMITKSTDMULTIWIDGETEDITOR_H_*/