Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryMenuUtil.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 
18 #include "berryMenuUtil.h"
19 
20 #include <QString>
21 
22 namespace berry {
23 
24 QString MenuUtil::WORKBENCH_MENU = "menu:org.blueberry.ui.workbench.menu";
25 QString MenuUtil::MAIN_MENU = "menu:org.blueberry.ui.main.menu";
26 QString MenuUtil::MAIN_TOOLBAR = "toolbar:org.blueberry.ui.main.toolbar";
27 
28 QString MenuUtil::ANY_POPUP = "popup:org.blueberry.ui.popup.any";
29 
30 QString MenuUtil::QUERY_BEFORE = "before";
31 QString MenuUtil::QUERY_AFTER = "after";
32 QString MenuUtil::QUERY_ENDOF = "endof";
33 
34 QString MenuUtil::SHOW_IN_MENU_ID = "popup:org.blueberry.ui.menus.showInMenu";
35 
36 QString MenuUtil::MenuUri(const QString& id)
37 {
38  return QString("menu:") + id;
39 }
40 
41 QString MenuUtil::MenuAddition(const QString& id, const QString& location,
42  const QString& refId)
43 {
44  return MenuUri(id) + '?' + location + '=' + refId;
45 }
46 
47 QString MenuUtil::MenuAddition(const QString& id)
48 {
49  return MenuAddition(id, "after", "additions");
50 }
51 
52 QString MenuUtil::ToolbarUri(const QString& id)
53 {
54  return QString("toolbar:") + id;
55 }
56 
57 QString MenuUtil::ToolbarAddition(const QString& id, const QString& location,
58  const QString& refId)
59 {
60  return ToolbarUri(id) + '?' + location + '=' + refId;
61 }
62 
63 QString MenuUtil::ToolbarAddition(const QString& id)
64 {
65  return ToolbarAddition(id, "after", "additions");
66 }
67 
68 }
static QString QUERY_BEFORE
Definition: berryMenuUtil.h:53
static QString SHOW_IN_MENU_ID
Definition: berryMenuUtil.h:75
static QString MAIN_MENU
Definition: berryMenuUtil.h:43
static QString QUERY_AFTER
Definition: berryMenuUtil.h:58
static QString ANY_POPUP
Definition: berryMenuUtil.h:48
static QString ToolbarAddition(const QString &id, const QString &location, const QString &refId)
static QString WORKBENCH_MENU
Definition: berryMenuUtil.h:41
static QString MenuAddition(const QString &id, const QString &location, const QString &refId)
static QString MenuUri(const QString &id)
static QString QUERY_ENDOF
Definition: berryMenuUtil.h:69
static QString ToolbarUri(const QString &id)
static QString MAIN_TOOLBAR
Definition: berryMenuUtil.h:45