Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
berryEditorPart.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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "berryEditorPart.h"
14 
16 
17 #include <cassert>
18 
19 namespace berry
20 {
21 
23 {
24 }
25 
27 {
28  editorInput = input;
29 }
30 
32 {
33  if (input != editorInput)
34  {
35  editorInput = input;
37  }
38 }
39 
40 void EditorPart::SetContentDescription(const QString& description)
41 {
42 // if (compatibilityTitleListener != null)
43 // {
44 // removePropertyListener(compatibilityTitleListener);
45 // compatibilityTitleListener = null;
46 // }
47 
49 }
50 
51 void EditorPart::SetPartName(const QString& partName)
52 {
53 // if (compatibilityTitleListener != null)
54 // {
55 // removePropertyListener(compatibilityTitleListener);
56 // compatibilityTitleListener = null;
57 // }
58 
60 }
61 
63 {
65  assert(!site.Cast<IEditorSite>().IsNull()); // The site for an editor must be an IEditorSite
66 }
67 
69 {
70  return editorInput;
71 }
72 
74 {
75  return this->GetSite().Cast<IEditorSite>();
76 }
77 
79 {
80  if (editorInput.IsNull())
81  {
83  }
84  else
85  {
86  return editorInput->GetToolTipText();
87  }
88 }
89 
91 {
92  return this->IsDirty();
93 }
94 
95 
96 }
IEditorInput::Pointer GetEditorInput() const override
SmartPointer< Other > Cast() const
virtual void SetPartName(const QString &partName)
bool IsSaveOnCloseNeeded() const override
virtual void SetInputWithNotify(IEditorInput::Pointer input)
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)
bool IsDirty() const override=0
virtual void SetInput(IEditorInput::Pointer input)
void SetPartName(const QString &partName) override
QString GetTitleToolTip() const override
void CheckSite(IWorkbenchPartSite::Pointer site) override
IWorkbenchPartSite::Pointer GetSite() const override