Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
Home
Manual
API Reference
Download
Bugzilla
Groups
Namespace List
Class List
File List
Examples
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
berryHandlerUtil.h
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
#ifndef BERRYHANDLERUTIL_H_
18
#define BERRYHANDLERUTIL_H_
19
20
#include <
berryExecutionEvent.h
>
21
#include <
berryObjectList.h
>
22
#include <
berryObjectString.h
>
23
24
#include <
org_blueberry_ui_qt_Export.h
>
25
#include "
berryIWorkbenchPart.h
"
26
#include "
berryIWorkbenchPartSite.h
"
27
#include "
berryISelection.h
"
28
#include "
berryIWorkbenchWindow.h
"
29
30
#include "
berryISources.h
"
31
32
namespace
berry
{
33
44
class
BERRY_UI_QT
HandlerUtil
{
45
46
private
:
47
48
static
void
NoVariableFound(
const
ExecutionEvent::ConstPointer
& event,
const
QString& name);
49
50
static
void
IncorrectTypeFound(
const
ExecutionEvent::ConstPointer
& event,
const
QString& name,
51
const
QString& expectedType,
const
QString& wrongType);
52
53
54
public
:
55
56
typedef
ObjectList<ObjectString::Pointer>
StringVectorType
;
57
68
static
Object::ConstPointer
GetVariable(
const
ExecutionEvent::ConstPointer
& event,
const
QString& name);
69
82
static
Object::ConstPointer
GetVariableChecked(
const
ExecutionEvent::ConstPointer
& event,
const
QString& name);
83
94
static
Object::ConstPointer
GetVariable(
Object::Pointer
context,
const
QString& name);
95
103
static
StringVectorType::ConstPointer
GetActiveContexts(
const
ExecutionEvent::ConstPointer
& event);
104
115
static
StringVectorType::ConstPointer
GetActiveContextsChecked(
const
ExecutionEvent::ConstPointer
& event);
116
125
// static Shell GetActiveShell(const ExecutionEvent::ConstPointer& event) {
126
// Object::Pointer o = getVariable(event, ISources.ACTIVE_SHELL_NAME);
127
// if (o instanceof Shell) {
128
// return (Shell) o;
129
// }
130
// return null;
131
// }
132
143
// static Shell GetActiveShellChecked(const ExecutionEvent::ConstPointer& event)
144
// {
145
// Object::Pointer o = getVariableChecked(event, ISources.ACTIVE_SHELL_NAME);
146
// if (!(o instanceof Shell)) {
147
// incorrectTypeFound(event, ISources.ACTIVE_SHELL_NAME, Shell.class,
148
// o.getClass());
149
// }
150
// return (Shell) o;
151
// }
152
160
static
IWorkbenchWindow::Pointer
GetActiveWorkbenchWindow(
const
ExecutionEvent::ConstPointer
& event);
161
171
static
IWorkbenchWindow::Pointer
GetActiveWorkbenchWindowChecked(
172
const
ExecutionEvent::ConstPointer
& event);
173
181
//static IEditorPart::Pointer GetActiveEditor(const ExecutionEvent::ConstPointer& event);
182
192
//static IEditorPart::Pointer GetActiveEditorChecked(const ExecutionEvent::ConstPointer& event);
193
201
static
ObjectString::ConstPointer
GetActiveEditorId(
const
ExecutionEvent::ConstPointer
& event);
202
213
static
ObjectString::ConstPointer
GetActiveEditorIdChecked(
const
ExecutionEvent::ConstPointer
& event);
214
222
static
IWorkbenchPart::Pointer
GetActivePart(
const
ExecutionEvent::ConstPointer
& event);
223
233
static
IWorkbenchPart::Pointer
GetActivePartChecked(
const
ExecutionEvent::ConstPointer
& event);
234
242
static
ObjectString::ConstPointer
GetActivePartId(
const
ExecutionEvent::ConstPointer
& event);
243
253
static
ObjectString::ConstPointer
GetActivePartIdChecked(
const
ExecutionEvent::ConstPointer
& event);
254
262
static
IWorkbenchPartSite::Pointer
GetActiveSite(
const
ExecutionEvent::ConstPointer
& event);
263
273
static
IWorkbenchPartSite::Pointer
GetActiveSiteChecked(
const
ExecutionEvent::ConstPointer
& event);
274
282
static
ISelection::ConstPointer
GetCurrentSelection(
const
ExecutionEvent::ConstPointer
& event);
283
293
static
ISelection::ConstPointer
GetCurrentSelectionChecked(
const
ExecutionEvent::ConstPointer
& event);
294
303
static
StringVectorType::ConstPointer
GetActiveMenus(
const
ExecutionEvent::ConstPointer
& event);
304
315
static
StringVectorType::ConstPointer
GetActiveMenusChecked(
const
ExecutionEvent::ConstPointer
& event);
316
325
static
ISelection::ConstPointer
GetActiveMenuSelection(
const
ExecutionEvent::ConstPointer
& event);
326
337
static
ISelection::ConstPointer
GetActiveMenuSelectionChecked(
const
ExecutionEvent::ConstPointer
& event);
338
347
static
ISelection::ConstPointer
GetActiveMenuEditorInput(
const
ExecutionEvent::ConstPointer
& event);
348
360
static
ISelection::ConstPointer
GetActiveMenuEditorInputChecked(
361
const
ExecutionEvent::ConstPointer
& event);
362
370
static
ISelection::ConstPointer
GetShowInSelection(
const
ExecutionEvent::ConstPointer
& event);
371
381
static
ISelection::ConstPointer
GetShowInSelectionChecked(
const
ExecutionEvent::ConstPointer
& event);
382
390
static
Object::ConstPointer
GetShowInInput(
const
ExecutionEvent::ConstPointer
& event);
391
401
static
Object::ConstPointer
GetShowInInputChecked(
const
ExecutionEvent::ConstPointer
& event);
402
412
static
bool
ToggleCommandState(
const
SmartPointer<Command>
& command);
413
427
static
bool
MatchesRadioState(
const
SmartPointer<ExecutionEvent>
& event);
428
440
static
void
UpdateRadioState(
const
SmartPointer<Command>
& command,
const
QString& newState);
441
};
442
443
}
444
#endif
/*BERRYHANDLERUTIL_H_*/
berry
Definition:
QmitkPropertyItemModel.h:27
berryIWorkbenchPart.h
berry::ObjectList
Definition:
berryObjectList.h:29
berry::SmartPointer< const Self >
berryIWorkbenchPartSite.h
org_blueberry_ui_qt_Export.h
berryISources.h
berryISelection.h
berryObjectString.h
berryObjectList.h
berry::HandlerUtil::StringVectorType
ObjectList< ObjectString::Pointer > StringVectorType
Definition:
berryHandlerUtil.h:56
berry::HandlerUtil
Definition:
berryHandlerUtil.h:44
berryIWorkbenchWindow.h
berryExecutionEvent.h
BERRY_UI_QT
#define BERRY_UI_QT
Definition:
org_blueberry_ui_qt_Export.h:23
git
MITK
Plugins
org.blueberry.ui.qt
src
handlers
berryHandlerUtil.h
Generated on Fri Feb 3 2017 20:51:44 for Medical Imaging Interaction Toolkit by
1.8.9.1