Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
berryHandlerUtil.h
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 #ifndef BERRYHANDLERUTIL_H_
14 #define BERRYHANDLERUTIL_H_
15 
16 #include <berryExecutionEvent.h>
17 #include <berryObjectList.h>
18 #include <berryObjectString.h>
19 
21 #include "berryIWorkbenchPart.h"
23 #include "berryISelection.h"
24 #include "berryIWorkbenchWindow.h"
25 
26 #include "berryISources.h"
27 
28 namespace berry {
29 
41 
42 private:
43 
44  static void NoVariableFound(const ExecutionEvent::ConstPointer& event, const QString& name);
45 
46  static void IncorrectTypeFound(const ExecutionEvent::ConstPointer& event, const QString& name,
47  const QString& expectedType, const QString& wrongType);
48 
49 
50 public:
51 
53 
64  static Object::ConstPointer GetVariable(const ExecutionEvent::ConstPointer& event, const QString& name);
65 
78  static Object::ConstPointer GetVariableChecked(const ExecutionEvent::ConstPointer& event, const QString& name);
79 
90  static Object::ConstPointer GetVariable(Object::Pointer context, const QString& name);
91 
100 
112 
121 
132  const ExecutionEvent::ConstPointer& event);
133 
142 
154 
163 
174 
183 
194 
203 
214 
223 
234 
243 
254 
264 
276 
286 
299  const ExecutionEvent::ConstPointer& event);
300 
309 
320 
329 
340 
350  static bool ToggleCommandState(const SmartPointer<Command>& command);
351 
366 
378  static void UpdateRadioState(const SmartPointer<Command>& command, const QString& newState);
379 };
380 
381 }
382 #endif /*BERRYHANDLERUTIL_H_*/
static Object::ConstPointer GetVariable(Object::Pointer context, const QString &name)
static ISelection::ConstPointer GetActiveMenuEditorInput(const ExecutionEvent::ConstPointer &event)
static Object::ConstPointer GetVariable(const ExecutionEvent::ConstPointer &event, const QString &name)
ObjectList< ObjectString::Pointer > StringVectorType
static IWorkbenchPart::Pointer GetActivePartChecked(const ExecutionEvent::ConstPointer &event)
static ISelection::ConstPointer GetCurrentSelectionChecked(const ExecutionEvent::ConstPointer &event)
static ObjectString::ConstPointer GetActivePartIdChecked(const ExecutionEvent::ConstPointer &event)
static IWorkbenchWindow::Pointer GetActiveWorkbenchWindowChecked(const ExecutionEvent::ConstPointer &event)
static Object::ConstPointer GetShowInInputChecked(const ExecutionEvent::ConstPointer &event)
static ISelection::ConstPointer GetActiveMenuSelection(const ExecutionEvent::ConstPointer &event)
static bool MatchesRadioState(const SmartPointer< ExecutionEvent > &event)
static StringVectorType::ConstPointer GetActiveMenusChecked(const ExecutionEvent::ConstPointer &event)
static ObjectString::ConstPointer GetActiveEditorIdChecked(const ExecutionEvent::ConstPointer &event)
static ISelection::ConstPointer GetShowInSelectionChecked(const ExecutionEvent::ConstPointer &event)
static IWorkbenchPartSite::Pointer GetActiveSite(const ExecutionEvent::ConstPointer &event)
static IWorkbenchPartSite::Pointer GetActiveSiteChecked(const ExecutionEvent::ConstPointer &event)
static void UpdateRadioState(const SmartPointer< Command > &command, const QString &newState)
static bool ToggleCommandState(const SmartPointer< Command > &command)
static ISelection::ConstPointer GetCurrentSelection(const ExecutionEvent::ConstPointer &event)
static ISelection::ConstPointer GetShowInSelection(const ExecutionEvent::ConstPointer &event)
static ISelection::ConstPointer GetActiveMenuEditorInputChecked(const ExecutionEvent::ConstPointer &event)
static ISelection::ConstPointer GetActiveMenuSelectionChecked(const ExecutionEvent::ConstPointer &event)
static Object::ConstPointer GetShowInInput(const ExecutionEvent::ConstPointer &event)
static ObjectString::ConstPointer GetActivePartId(const ExecutionEvent::ConstPointer &event)
static Object::ConstPointer GetVariableChecked(const ExecutionEvent::ConstPointer &event, const QString &name)
static StringVectorType::ConstPointer GetActiveContexts(const ExecutionEvent::ConstPointer &event)
static StringVectorType::ConstPointer GetActiveContextsChecked(const ExecutionEvent::ConstPointer &event)
static IWorkbenchWindow::Pointer GetActiveWorkbenchWindow(const ExecutionEvent::ConstPointer &event)
static ObjectString::ConstPointer GetActiveEditorId(const ExecutionEvent::ConstPointer &event)
static StringVectorType::ConstPointer GetActiveMenus(const ExecutionEvent::ConstPointer &event)
static IWorkbenchPart::Pointer GetActivePart(const ExecutionEvent::ConstPointer &event)
Implements transparent reference counting.
#define BERRY_UI_QT