Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
berryEditorPart.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 BlueBerry Platform
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 "berryEditorPart.h"
18 
20 
21 #include <cassert>
22 
23 namespace berry
24 {
25 
27 {
28 }
29 
31 {
32  editorInput = input;
33 }
34 
36 {
37  if (input != editorInput)
38  {
39  editorInput = input;
41  }
42 }
43 
44 void EditorPart::SetContentDescription(const QString& description)
45 {
46 // if (compatibilityTitleListener != null)
47 // {
48 // removePropertyListener(compatibilityTitleListener);
49 // compatibilityTitleListener = null;
50 // }
51 
53 }
54 
55 void EditorPart::SetPartName(const QString& partName)
56 {
57 // if (compatibilityTitleListener != null)
58 // {
59 // removePropertyListener(compatibilityTitleListener);
60 // compatibilityTitleListener = null;
61 // }
62 
64 }
65 
67 {
69  assert(!site.Cast<IEditorSite>().IsNull()); // The site for an editor must be an IEditorSite
70 }
71 
73 {
74  return editorInput;
75 }
76 
78 {
79  return this->GetSite().Cast<IEditorSite>();
80 }
81 
83 {
84  if (editorInput.IsNull())
85  {
87  }
88  else
89  {
90  return editorInput->GetToolTipText();
91  }
92 }
93 
95 {
96  return this->IsDirty();
97 }
98 
99 
100 }
IEditorInput::Pointer GetEditorInput() const override
virtual void SetPartName(const QString &partName)
virtual bool IsSaveOnCloseNeeded() const override
virtual void SetInputWithNotify(IEditorInput::Pointer input)
virtual void SetContentDescription(const QString &description) override
virtual void CheckSite(IWorkbenchPartSite::Pointer site)
QString GetTitleToolTip() const override
IEditorSite::Pointer GetEditorSite() const override
virtual void SetContentDescription(const QString &description)
void FirePropertyChange(int propertyId)
virtual void SetInput(IEditorInput::Pointer input)
SmartPointer< Other > Cast() const
virtual void SetPartName(const QString &partName) override
QString GetTitleToolTip() const override
void CheckSite(IWorkbenchPartSite::Pointer site) override
virtual bool IsDirty() const override=0
IWorkbenchPartSite::Pointer GetSite() const override