1 | /* $Id: UIActionPoolManager.cpp 105955 2024-09-04 15:54:04Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIActionPoolManager class implementation.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010-2024 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox base platform packages, as
|
---|
10 | * available from https://www.virtualbox.org.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or
|
---|
13 | * modify it under the terms of the GNU General Public License
|
---|
14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
15 | * License.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful, but
|
---|
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | * General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | *
|
---|
25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | */
|
---|
27 |
|
---|
28 | /* Qt includes: */
|
---|
29 | #include <QApplication>
|
---|
30 | #include <QActionGroup>
|
---|
31 |
|
---|
32 | /* GUI includes: */
|
---|
33 | #include "UIActionPoolManager.h"
|
---|
34 | #include "UIExtraDataManager.h"
|
---|
35 | #include "UIIconPool.h"
|
---|
36 | #include "UIShortcutPool.h"
|
---|
37 | #include "UIDefs.h"
|
---|
38 |
|
---|
39 | /* COM includes: */
|
---|
40 | #include "CExtPack.h"
|
---|
41 | #include "CExtPackManager.h"
|
---|
42 |
|
---|
43 | /* TEMPORARY! */
|
---|
44 | #if defined(_MSC_VER) && !defined(RT_ARCH_AMD64)
|
---|
45 | # pragma optimize("g", off)
|
---|
46 | #endif
|
---|
47 |
|
---|
48 | /* Namespaces: */
|
---|
49 | using namespace UIExtraDataDefs;
|
---|
50 |
|
---|
51 |
|
---|
52 | /** Menu action extension, used as 'File' menu class. */
|
---|
53 | class UIActionMenuManagerFile : public UIActionMenu
|
---|
54 | {
|
---|
55 | Q_OBJECT;
|
---|
56 |
|
---|
57 | public:
|
---|
58 |
|
---|
59 | /** Constructs action passing @a pParent to the base-class. */
|
---|
60 | UIActionMenuManagerFile(UIActionPool *pParent)
|
---|
61 | : UIActionMenu(pParent)
|
---|
62 | {}
|
---|
63 |
|
---|
64 | protected:
|
---|
65 |
|
---|
66 | /** Handles translation event. */
|
---|
67 | virtual void retranslateUi() RT_OVERRIDE
|
---|
68 | {
|
---|
69 | #ifdef VBOX_WS_MAC
|
---|
70 | setName(QApplication::translate("UIActionPool", "&File", "Mac OS X version"));
|
---|
71 | #else /* VBOX_WS_MAC */
|
---|
72 | setName(QApplication::translate("UIActionPool", "&File", "Non Mac OS X version"));
|
---|
73 | #endif /* !VBOX_WS_MAC */
|
---|
74 | }
|
---|
75 | };
|
---|
76 |
|
---|
77 | /** Simple action extension, used as 'Show Import Appliance Wizard' action class. */
|
---|
78 | class UIActionSimpleManagerFileShowImportApplianceWizard : public UIActionSimple
|
---|
79 | {
|
---|
80 | Q_OBJECT;
|
---|
81 |
|
---|
82 | public:
|
---|
83 |
|
---|
84 | /** Constructs action passing @a pParent to the base-class. */
|
---|
85 | UIActionSimpleManagerFileShowImportApplianceWizard(UIActionPool *pParent)
|
---|
86 | : UIActionSimple(pParent,
|
---|
87 | ":/import_32px.png", ":/import_16px.png",
|
---|
88 | ":/import_disabled_32px.png", ":/import_disabled_16px.png")
|
---|
89 | {}
|
---|
90 |
|
---|
91 | protected:
|
---|
92 |
|
---|
93 | /** Returns shortcut extra-data ID. */
|
---|
94 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
95 | {
|
---|
96 | return QString("ImportAppliance");
|
---|
97 | }
|
---|
98 |
|
---|
99 | /** Returns default shortcut. */
|
---|
100 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
101 | {
|
---|
102 | return QKeySequence("Ctrl+I");
|
---|
103 | }
|
---|
104 |
|
---|
105 | /** Handles translation event. */
|
---|
106 | virtual void retranslateUi() RT_OVERRIDE
|
---|
107 | {
|
---|
108 | setIconText(QApplication::translate("UIActionPool", "Import"));
|
---|
109 | setName(QApplication::translate("UIActionPool", "&Import Appliance..."));
|
---|
110 | setStatusTip(QApplication::translate("UIActionPool", "Import an appliance into VirtualBox"));
|
---|
111 | setToolTip(simplifyText(text()) + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
112 | }
|
---|
113 | };
|
---|
114 |
|
---|
115 | /** Simple action extension, used as 'Show Export Appliance Wizard' action class. */
|
---|
116 | class UIActionSimpleManagerFileShowExportApplianceWizard : public UIActionSimple
|
---|
117 | {
|
---|
118 | Q_OBJECT;
|
---|
119 |
|
---|
120 | public:
|
---|
121 |
|
---|
122 | /** Constructs action passing @a pParent to the base-class. */
|
---|
123 | UIActionSimpleManagerFileShowExportApplianceWizard(UIActionPool *pParent)
|
---|
124 | : UIActionSimple(pParent,
|
---|
125 | ":/export_32px.png", ":/export_16px.png",
|
---|
126 | ":/export_disabled_32px.png", ":/export_disabled_16px.png")
|
---|
127 | {}
|
---|
128 |
|
---|
129 | protected:
|
---|
130 |
|
---|
131 | /** Returns shortcut extra-data ID. */
|
---|
132 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
133 | {
|
---|
134 | return QString("ExportAppliance");
|
---|
135 | }
|
---|
136 |
|
---|
137 | /** Returns default shortcut. */
|
---|
138 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
139 | {
|
---|
140 | return QKeySequence("Ctrl+E");
|
---|
141 | }
|
---|
142 |
|
---|
143 | /** Handles translation event. */
|
---|
144 | virtual void retranslateUi() RT_OVERRIDE
|
---|
145 | {
|
---|
146 | setIconText(QApplication::translate("UIActionPool", "Export"));
|
---|
147 | setName(QApplication::translate("UIActionPool", "&Export Appliance..."));
|
---|
148 | setStatusTip(QApplication::translate("UIActionPool", "Export one or more VirtualBox virtual machines as an appliance"));
|
---|
149 | setToolTip(simplifyText(text()) + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
150 | }
|
---|
151 | };
|
---|
152 |
|
---|
153 | /** Menu action extension, used as 'Global Tools' menu class. */
|
---|
154 | class UIActionMenuManagerToolsGlobal : public UIActionMenu
|
---|
155 | {
|
---|
156 | Q_OBJECT;
|
---|
157 |
|
---|
158 | public:
|
---|
159 |
|
---|
160 | /** Constructs action passing @a pParent to the base-class. */
|
---|
161 | UIActionMenuManagerToolsGlobal(UIActionPool *pParent)
|
---|
162 | : UIActionMenu(pParent, ":/tools_menu_24px.png") /// @todo replace with 16px icon
|
---|
163 | {}
|
---|
164 |
|
---|
165 | protected:
|
---|
166 |
|
---|
167 | /** Handles translation event. */
|
---|
168 | virtual void retranslateUi() RT_OVERRIDE
|
---|
169 | {
|
---|
170 | setName(QApplication::translate("UIActionPool", "Tools"));
|
---|
171 | }
|
---|
172 | };
|
---|
173 |
|
---|
174 | /** Simple action extension, used as 'Show Welcome Screen' action class. */
|
---|
175 | class UIActionToggleManagerToolsGlobalShowWelcomeScreen : public UIActionToggle
|
---|
176 | {
|
---|
177 | Q_OBJECT;
|
---|
178 |
|
---|
179 | public:
|
---|
180 |
|
---|
181 | /** Constructs action passing @a pParent to the base-class. */
|
---|
182 | UIActionToggleManagerToolsGlobalShowWelcomeScreen(UIActionPool *pParent)
|
---|
183 | : UIActionToggle(pParent)
|
---|
184 | {
|
---|
185 | setProperty("UIToolType", QVariant::fromValue(UIToolType_Welcome));
|
---|
186 | /// @todo use icons with check-boxes
|
---|
187 | setIcon(UIIconPool::iconSetFull(":/welcome_screen_24px.png", ":/welcome_screen_24px.png",
|
---|
188 | ":/welcome_screen_24px.png", ":/welcome_screen_24px.png"));
|
---|
189 | }
|
---|
190 |
|
---|
191 | protected:
|
---|
192 |
|
---|
193 | /** Returns shortcut extra-data ID. */
|
---|
194 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
195 | {
|
---|
196 | return QString("WelcomeScreen");
|
---|
197 | }
|
---|
198 |
|
---|
199 | /** Handles translation event. */
|
---|
200 | virtual void retranslateUi() RT_OVERRIDE
|
---|
201 | {
|
---|
202 | setName(QApplication::translate("UIActionPool", "&Welcome Screen"));
|
---|
203 | setStatusTip(QApplication::translate("UIActionPool", "Open the Welcome Screen"));
|
---|
204 | }
|
---|
205 | };
|
---|
206 |
|
---|
207 | /** Simple action extension, used as 'Show Extension Pack Manager' action class. */
|
---|
208 | class UIActionToggleManagerToolsGlobalShowExtensionPackManager : public UIActionToggle
|
---|
209 | {
|
---|
210 | Q_OBJECT;
|
---|
211 |
|
---|
212 | public:
|
---|
213 |
|
---|
214 | /** Constructs action passing @a pParent to the base-class. */
|
---|
215 | UIActionToggleManagerToolsGlobalShowExtensionPackManager(UIActionPool *pParent)
|
---|
216 | : UIActionToggle(pParent)
|
---|
217 | {
|
---|
218 | setProperty("UIToolType", QVariant::fromValue(UIToolType_Extensions));
|
---|
219 | /// @todo use icons with check-boxes
|
---|
220 | setIcon(UIIconPool::iconSetFull(":/extension_pack_manager_24px.png", ":/extension_pack_manager_16px.png",
|
---|
221 | ":/extension_pack_manager_disabled_24px.png", ":/extension_pack_manager_disabled_16px.png"));
|
---|
222 | }
|
---|
223 |
|
---|
224 | protected:
|
---|
225 |
|
---|
226 | /** Returns shortcut extra-data ID. */
|
---|
227 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
228 | {
|
---|
229 | return QString("ExtensionPackManager");
|
---|
230 | }
|
---|
231 |
|
---|
232 | /** Returns default shortcut. */
|
---|
233 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
234 | {
|
---|
235 | return QKeySequence("Ctrl+T");
|
---|
236 | }
|
---|
237 |
|
---|
238 | /** Handles translation event. */
|
---|
239 | virtual void retranslateUi() RT_OVERRIDE
|
---|
240 | {
|
---|
241 | setName(QApplication::translate("UIActionPool", "&Extension Pack Manager"));
|
---|
242 | setStatusTip(QApplication::translate("UIActionPool", "Open the Extension Pack Manager"));
|
---|
243 | }
|
---|
244 | };
|
---|
245 |
|
---|
246 | /** Simple action extension, used as 'Show Virtual Media Manager' action class. */
|
---|
247 | class UIActionToggleManagerToolsGlobalShowVirtualMediaManager : public UIActionToggle
|
---|
248 | {
|
---|
249 | Q_OBJECT;
|
---|
250 |
|
---|
251 | public:
|
---|
252 |
|
---|
253 | /** Constructs action passing @a pParent to the base-class. */
|
---|
254 | UIActionToggleManagerToolsGlobalShowVirtualMediaManager(UIActionPool *pParent)
|
---|
255 | : UIActionToggle(pParent)
|
---|
256 | {
|
---|
257 | setProperty("UIToolType", QVariant::fromValue(UIToolType_Media));
|
---|
258 | /// @todo use icons with check-boxes
|
---|
259 | setIcon(UIIconPool::iconSetFull(":/media_manager_24px.png", ":/media_manager_16px.png",
|
---|
260 | ":/media_manager_disabled_24px.png", ":/media_manager_disabled_16px.png"));
|
---|
261 | }
|
---|
262 |
|
---|
263 | protected:
|
---|
264 |
|
---|
265 | /** Returns shortcut extra-data ID. */
|
---|
266 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
267 | {
|
---|
268 | return QString("VirtualMediaManager");
|
---|
269 | }
|
---|
270 |
|
---|
271 | /** Returns default shortcut. */
|
---|
272 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
273 | {
|
---|
274 | return QKeySequence("Ctrl+D");
|
---|
275 | }
|
---|
276 |
|
---|
277 | /** Handles translation event. */
|
---|
278 | virtual void retranslateUi() RT_OVERRIDE
|
---|
279 | {
|
---|
280 | setName(QApplication::translate("UIActionPool", "&Virtual Media Manager"));
|
---|
281 | setStatusTip(QApplication::translate("UIActionPool", "Open the Virtual Media Manager"));
|
---|
282 | }
|
---|
283 | };
|
---|
284 |
|
---|
285 | /** Simple action extension, used as 'Show Network Manager' action class. */
|
---|
286 | class UIActionToggleManagerToolsGlobalShowNetworkManager : public UIActionToggle
|
---|
287 | {
|
---|
288 | Q_OBJECT;
|
---|
289 |
|
---|
290 | public:
|
---|
291 |
|
---|
292 | /** Constructs action passing @a pParent to the base-class. */
|
---|
293 | UIActionToggleManagerToolsGlobalShowNetworkManager(UIActionPool *pParent)
|
---|
294 | : UIActionToggle(pParent)
|
---|
295 | {
|
---|
296 | setProperty("UIToolType", QVariant::fromValue(UIToolType_Network));
|
---|
297 | /// @todo use icons with check-boxes
|
---|
298 | setIcon(UIIconPool::iconSetFull(":/host_iface_manager_24px.png", ":/host_iface_manager_16px.png",
|
---|
299 | ":/host_iface_manager_disabled_24px.png", ":/host_iface_manager_disabled_16px.png"));
|
---|
300 | }
|
---|
301 |
|
---|
302 | protected:
|
---|
303 |
|
---|
304 | /** Returns shortcut extra-data ID. */
|
---|
305 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
306 | {
|
---|
307 | return QString("HostNetworkManager");
|
---|
308 | }
|
---|
309 |
|
---|
310 | /** Returns default shortcut. */
|
---|
311 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
312 | {
|
---|
313 | return QKeySequence("Ctrl+H");
|
---|
314 | }
|
---|
315 |
|
---|
316 | /** Handles translation event. */
|
---|
317 | virtual void retranslateUi() RT_OVERRIDE
|
---|
318 | {
|
---|
319 | setName(QApplication::translate("UIActionPool", "&Network Manager"));
|
---|
320 | setStatusTip(QApplication::translate("UIActionPool", "Open the Network Manager"));
|
---|
321 | }
|
---|
322 | };
|
---|
323 |
|
---|
324 | /** Simple action extension, used as 'Show Cloud Profile Manager' action class. */
|
---|
325 | class UIActionToggleManagerToolsGlobalShowCloudProfileManager : public UIActionToggle
|
---|
326 | {
|
---|
327 | Q_OBJECT;
|
---|
328 |
|
---|
329 | public:
|
---|
330 |
|
---|
331 | /** Constructs action passing @a pParent to the base-class. */
|
---|
332 | UIActionToggleManagerToolsGlobalShowCloudProfileManager(UIActionPool *pParent)
|
---|
333 | : UIActionToggle(pParent)
|
---|
334 | {
|
---|
335 | setProperty("UIToolType", QVariant::fromValue(UIToolType_Cloud));
|
---|
336 | /// @todo use icons with check-boxes
|
---|
337 | setIcon(UIIconPool::iconSetFull(":/cloud_profile_manager_24px.png", ":/cloud_profile_manager_16px.png",
|
---|
338 | ":/cloud_profile_manager_disabled_24px.png", ":/cloud_profile_manager_disabled_16px.png"));
|
---|
339 | }
|
---|
340 |
|
---|
341 | protected:
|
---|
342 |
|
---|
343 | /** Returns shortcut extra-data ID. */
|
---|
344 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
345 | {
|
---|
346 | return QString("CloudProfileManager");
|
---|
347 | }
|
---|
348 |
|
---|
349 | /** Returns default shortcut. */
|
---|
350 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
351 | {
|
---|
352 | return QKeySequence("Ctrl+P");
|
---|
353 | }
|
---|
354 |
|
---|
355 | /** Handles translation event. */
|
---|
356 | virtual void retranslateUi() RT_OVERRIDE
|
---|
357 | {
|
---|
358 | setName(QApplication::translate("UIActionPool", "&Cloud Profile Manager"));
|
---|
359 | setStatusTip(QApplication::translate("UIActionPool", "Open the Cloud Profile Manager"));
|
---|
360 | }
|
---|
361 | };
|
---|
362 |
|
---|
363 | /** Simple action extension, used as 'Show VM Activity Overview' action class. */
|
---|
364 | class UIActionToggleManagerToolsGlobalShowVMActivityOverview : public UIActionToggle
|
---|
365 | {
|
---|
366 | Q_OBJECT;
|
---|
367 |
|
---|
368 | public:
|
---|
369 |
|
---|
370 | /** Constructs action passing @a pParent to the base-class. */
|
---|
371 | UIActionToggleManagerToolsGlobalShowVMActivityOverview(UIActionPool *pParent)
|
---|
372 | : UIActionToggle(pParent)
|
---|
373 | {
|
---|
374 | setProperty("UIToolType", QVariant::fromValue(UIToolType_VMActivityOverview));
|
---|
375 | /// @todo use icons with check-boxes
|
---|
376 | setIcon(UIIconPool::iconSetFull(":/resources_monitor_24px.png", ":/resources_monitor_16px.png",
|
---|
377 | ":/resources_monitor_disabled_24px.png", ":/resources_monitor_disabled_16px.png"));
|
---|
378 | }
|
---|
379 |
|
---|
380 | protected:
|
---|
381 |
|
---|
382 | /** Returns shortcut extra-data ID. */
|
---|
383 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
384 | {
|
---|
385 | return QString("ToolsGlobalVMActivityOverview");
|
---|
386 | }
|
---|
387 |
|
---|
388 | /** Handles translation event. */
|
---|
389 | virtual void retranslateUi() RT_OVERRIDE
|
---|
390 | {
|
---|
391 | setName(QApplication::translate("UIActionPool", "&VM Activity Overview"));
|
---|
392 | setStatusTip(QApplication::translate("UIActionPool", "Open the VM Activity Overview"));
|
---|
393 | }
|
---|
394 | };
|
---|
395 |
|
---|
396 | #ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
|
---|
397 | /** Simple action extension, used as 'Show Extra-data Manager' action class. */
|
---|
398 | class UIActionSimpleManagerFileShowExtraDataManager : public UIActionSimple
|
---|
399 | {
|
---|
400 | Q_OBJECT;
|
---|
401 |
|
---|
402 | public:
|
---|
403 |
|
---|
404 | /** Constructs action passing @a pParent to the base-class. */
|
---|
405 | UIActionSimpleManagerFileShowExtraDataManager(UIActionPool *pParent)
|
---|
406 | : UIActionSimple(pParent, ":/edata_manager_16px.png", ":/edata_manager_16px.png")
|
---|
407 | {}
|
---|
408 |
|
---|
409 | protected:
|
---|
410 |
|
---|
411 | /** Returns shortcut extra-data ID. */
|
---|
412 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
413 | {
|
---|
414 | return QString("ExtraDataManager");
|
---|
415 | }
|
---|
416 |
|
---|
417 | /** Returns default shortcut. */
|
---|
418 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
419 | {
|
---|
420 | return QKeySequence("Ctrl+X");
|
---|
421 | }
|
---|
422 |
|
---|
423 | /** Handles translation event. */
|
---|
424 | virtual void retranslateUi() RT_OVERRIDE
|
---|
425 | {
|
---|
426 | setName(QApplication::translate("UIActionPool", "E&xtra Data Manager..."));
|
---|
427 | setStatusTip(QApplication::translate("UIActionPool", "Display the Extra Data Manager window"));
|
---|
428 | }
|
---|
429 | };
|
---|
430 | #endif /* VBOX_GUI_WITH_EXTRADATA_MANAGER_UI */
|
---|
431 |
|
---|
432 | /** Simple action extension, used as 'Perform Exit' action class. */
|
---|
433 | class UIActionSimpleManagerFilePerformExit : public UIActionSimple
|
---|
434 | {
|
---|
435 | Q_OBJECT;
|
---|
436 |
|
---|
437 | public:
|
---|
438 |
|
---|
439 | /** Constructs action passing @a pParent to the base-class. */
|
---|
440 | UIActionSimpleManagerFilePerformExit(UIActionPool *pParent)
|
---|
441 | : UIActionSimple(pParent, ":/exit_16px.png", ":/exit_16px.png")
|
---|
442 | {
|
---|
443 | setMenuRole(QAction::QuitRole);
|
---|
444 | }
|
---|
445 |
|
---|
446 | protected:
|
---|
447 |
|
---|
448 | /** Returns shortcut extra-data ID. */
|
---|
449 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
450 | {
|
---|
451 | return QString("Exit");
|
---|
452 | }
|
---|
453 |
|
---|
454 | /** Returns default shortcut. */
|
---|
455 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
456 | {
|
---|
457 | return QKeySequence("Ctrl+Q");
|
---|
458 | }
|
---|
459 |
|
---|
460 | /** Handles translation event. */
|
---|
461 | virtual void retranslateUi() RT_OVERRIDE
|
---|
462 | {
|
---|
463 | setName(QApplication::translate("UIActionPool", "&Quit"));
|
---|
464 | setStatusTip(QApplication::translate("UIActionPool", "Close application"));
|
---|
465 | }
|
---|
466 | };
|
---|
467 |
|
---|
468 |
|
---|
469 | /** Menu action extension, used as 'Group' menu class. */
|
---|
470 | class UIActionMenuManagerGroup : public UIActionMenu
|
---|
471 | {
|
---|
472 | Q_OBJECT;
|
---|
473 |
|
---|
474 | public:
|
---|
475 |
|
---|
476 | /** Constructs action passing @a pParent to the base-class. */
|
---|
477 | UIActionMenuManagerGroup(UIActionPool *pParent)
|
---|
478 | : UIActionMenu(pParent)
|
---|
479 | {}
|
---|
480 |
|
---|
481 | protected:
|
---|
482 |
|
---|
483 | /** Handles translation event. */
|
---|
484 | virtual void retranslateUi() RT_OVERRIDE
|
---|
485 | {
|
---|
486 | setName(QApplication::translate("UIActionPool", "&Group"));
|
---|
487 | }
|
---|
488 | };
|
---|
489 |
|
---|
490 | /** Simple action extension, used as 'Perform Create Machine' action class. */
|
---|
491 | class UIActionSimpleManagerGroupPerformCreateMachine : public UIActionSimple
|
---|
492 | {
|
---|
493 | Q_OBJECT;
|
---|
494 |
|
---|
495 | public:
|
---|
496 |
|
---|
497 | /** Constructs action passing @a pParent to the base-class. */
|
---|
498 | UIActionSimpleManagerGroupPerformCreateMachine(UIActionPool *pParent)
|
---|
499 | : UIActionSimple(pParent,
|
---|
500 | ":/vm_new_32px.png", ":/vm_new_16px.png",
|
---|
501 | ":/vm_new_disabled_32px.png", ":/vm_new_disabled_16px.png")
|
---|
502 | {}
|
---|
503 |
|
---|
504 | protected:
|
---|
505 |
|
---|
506 | /** Returns shortcut extra-data ID. */
|
---|
507 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
508 | {
|
---|
509 | return QString("NewVM");
|
---|
510 | }
|
---|
511 |
|
---|
512 | /** Returns default shortcut. */
|
---|
513 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
514 | {
|
---|
515 | return QKeySequence("Ctrl+N");
|
---|
516 | }
|
---|
517 |
|
---|
518 | /** Handles translation event. */
|
---|
519 | virtual void retranslateUi() RT_OVERRIDE
|
---|
520 | {
|
---|
521 | /// @todo replace that one with separate "New" before 6.2
|
---|
522 | setIconText(QApplication::translate("UIActionPool", "&New...").remove('.'));
|
---|
523 | setName(QApplication::translate("UIActionPool", "&New Machine..."));
|
---|
524 | setStatusTip(QApplication::translate("UIActionPool", "Create new virtual machine"));
|
---|
525 | setToolTip(simplifyText(text()) + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
526 | }
|
---|
527 | };
|
---|
528 |
|
---|
529 | /** Simple action extension, used as 'Perform Add Machine' action class. */
|
---|
530 | class UIActionSimpleManagerGroupPerformAddMachine : public UIActionSimple
|
---|
531 | {
|
---|
532 | Q_OBJECT;
|
---|
533 |
|
---|
534 | public:
|
---|
535 |
|
---|
536 | /** Constructs action passing @a pParent to the base-class. */
|
---|
537 | UIActionSimpleManagerGroupPerformAddMachine(UIActionPool *pParent)
|
---|
538 | : UIActionSimple(pParent,
|
---|
539 | ":/vm_add_32px.png", ":/vm_add_16px.png",
|
---|
540 | ":/vm_add_disabled_32px.png", ":/vm_add_disabled_16px.png")
|
---|
541 | {}
|
---|
542 |
|
---|
543 | protected:
|
---|
544 |
|
---|
545 | /** Returns shortcut extra-data ID. */
|
---|
546 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
547 | {
|
---|
548 | return QString("AddVM");
|
---|
549 | }
|
---|
550 |
|
---|
551 | /** Returns default shortcut. */
|
---|
552 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
553 | {
|
---|
554 | return QKeySequence("Ctrl+A");
|
---|
555 | }
|
---|
556 |
|
---|
557 | /** Handles translation event. */
|
---|
558 | virtual void retranslateUi() RT_OVERRIDE
|
---|
559 | {
|
---|
560 | /// @todo replace that one with separate "Add" before 6.2
|
---|
561 | setIconText(QApplication::translate("UIActionPool", "&Add...").remove('.'));
|
---|
562 | setName(QApplication::translate("UIActionPool", "&Add Machine..."));
|
---|
563 | setStatusTip(QApplication::translate("UIActionPool", "Add existing virtual machine"));
|
---|
564 | setToolTip(simplifyText(text()) + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
565 | }
|
---|
566 | };
|
---|
567 |
|
---|
568 | /** Simple action extension, used as 'Perform Rename Group' action class. */
|
---|
569 | class UIActionSimpleManagerGroupPerformRename : public UIActionSimple
|
---|
570 | {
|
---|
571 | Q_OBJECT;
|
---|
572 |
|
---|
573 | public:
|
---|
574 |
|
---|
575 | /** Constructs action passing @a pParent to the base-class. */
|
---|
576 | UIActionSimpleManagerGroupPerformRename(UIActionPool *pParent)
|
---|
577 | : UIActionSimple(pParent, ":/vm_group_name_16px.png", ":/vm_group_name_disabled_16px.png")
|
---|
578 | {}
|
---|
579 |
|
---|
580 | protected:
|
---|
581 |
|
---|
582 | /** Returns shortcut extra-data ID. */
|
---|
583 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
584 | {
|
---|
585 | return QString("RenameVMGroup");
|
---|
586 | }
|
---|
587 |
|
---|
588 | /** Handles translation event. */
|
---|
589 | virtual void retranslateUi() RT_OVERRIDE
|
---|
590 | {
|
---|
591 | setName(QApplication::translate("UIActionPool", "Rena&me Group..."));
|
---|
592 | setStatusTip(QApplication::translate("UIActionPool", "Rename selected virtual machine group"));
|
---|
593 | }
|
---|
594 | };
|
---|
595 |
|
---|
596 | /** Simple action extension, used as 'Perform Remove Group' action class. */
|
---|
597 | class UIActionSimpleManagerGroupPerformRemove : public UIActionSimple
|
---|
598 | {
|
---|
599 | Q_OBJECT;
|
---|
600 |
|
---|
601 | public:
|
---|
602 |
|
---|
603 | /** Constructs action passing @a pParent to the base-class. */
|
---|
604 | UIActionSimpleManagerGroupPerformRemove(UIActionPool *pParent)
|
---|
605 | : UIActionSimple(pParent, ":/vm_group_remove_16px.png", ":/vm_group_remove_disabled_16px.png")
|
---|
606 | {}
|
---|
607 |
|
---|
608 | protected:
|
---|
609 |
|
---|
610 | /** Returns shortcut extra-data ID. */
|
---|
611 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
612 | {
|
---|
613 | return QString("AddVMGroup");
|
---|
614 | }
|
---|
615 |
|
---|
616 | /** Handles translation event. */
|
---|
617 | virtual void retranslateUi() RT_OVERRIDE
|
---|
618 | {
|
---|
619 | setName(QApplication::translate("UIActionPool", "&Ungroup"));
|
---|
620 | setStatusTip(QApplication::translate("UIActionPool", "Ungroup items of selected virtual machine group"));
|
---|
621 | }
|
---|
622 | };
|
---|
623 |
|
---|
624 | /** Simple action extension, used as 'Perform Sort Group' action class. */
|
---|
625 | class UIActionSimpleManagerGroupPerformSort : public UIActionSimple
|
---|
626 | {
|
---|
627 | Q_OBJECT;
|
---|
628 |
|
---|
629 | public:
|
---|
630 |
|
---|
631 | /** Constructs action passing @a pParent to the base-class. */
|
---|
632 | UIActionSimpleManagerGroupPerformSort(UIActionPool *pParent)
|
---|
633 | : UIActionSimple(pParent, ":/sort_16px.png", ":/sort_disabled_16px.png")
|
---|
634 | {}
|
---|
635 |
|
---|
636 | protected:
|
---|
637 |
|
---|
638 | /** Returns shortcut extra-data ID. */
|
---|
639 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
640 | {
|
---|
641 | return QString("SortGroup");
|
---|
642 | }
|
---|
643 |
|
---|
644 | /** Handles translation event. */
|
---|
645 | virtual void retranslateUi() RT_OVERRIDE
|
---|
646 | {
|
---|
647 | setName(QApplication::translate("UIActionPool", "&Sort"));
|
---|
648 | setStatusTip(QApplication::translate("UIActionPool", "Sort items of selected virtual machine group alphabetically"));
|
---|
649 | }
|
---|
650 | };
|
---|
651 |
|
---|
652 |
|
---|
653 | /** Menu action extension, used as 'Machine' menu class. */
|
---|
654 | class UIActionMenuManagerMachine : public UIActionMenu
|
---|
655 | {
|
---|
656 | Q_OBJECT;
|
---|
657 |
|
---|
658 | public:
|
---|
659 |
|
---|
660 | /** Constructs action passing @a pParent to the base-class. */
|
---|
661 | UIActionMenuManagerMachine(UIActionPool *pParent)
|
---|
662 | : UIActionMenu(pParent)
|
---|
663 | {}
|
---|
664 |
|
---|
665 | protected:
|
---|
666 |
|
---|
667 | /** Handles translation event. */
|
---|
668 | virtual void retranslateUi() RT_OVERRIDE
|
---|
669 | {
|
---|
670 | setName(QApplication::translate("UIActionPool", "&Machine"));
|
---|
671 | }
|
---|
672 | };
|
---|
673 |
|
---|
674 | /** Simple action extension, used as 'Perform Create Machine' action class. */
|
---|
675 | class UIActionSimpleManagerMachinePerformCreate : public UIActionSimple
|
---|
676 | {
|
---|
677 | Q_OBJECT;
|
---|
678 |
|
---|
679 | public:
|
---|
680 |
|
---|
681 | /** Constructs action passing @a pParent to the base-class. */
|
---|
682 | UIActionSimpleManagerMachinePerformCreate(UIActionPool *pParent)
|
---|
683 | : UIActionSimple(pParent,
|
---|
684 | ":/vm_new_32px.png", ":/vm_new_16px.png",
|
---|
685 | ":/vm_new_disabled_32px.png", ":/vm_new_disabled_16px.png")
|
---|
686 | {}
|
---|
687 |
|
---|
688 | protected:
|
---|
689 |
|
---|
690 | /** Returns shortcut extra-data ID. */
|
---|
691 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
692 | {
|
---|
693 | return QString("NewVM");
|
---|
694 | }
|
---|
695 |
|
---|
696 | /** Returns default shortcut. */
|
---|
697 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
698 | {
|
---|
699 | return QKeySequence("Ctrl+N");
|
---|
700 | }
|
---|
701 |
|
---|
702 | /** Handles translation event. */
|
---|
703 | virtual void retranslateUi() RT_OVERRIDE
|
---|
704 | {
|
---|
705 | setName(QApplication::translate("UIActionPool", "&New..."));
|
---|
706 | setStatusTip(QApplication::translate("UIActionPool", "Create new virtual machine"));
|
---|
707 | setToolTip(simplifyText(text()) + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
708 | }
|
---|
709 | };
|
---|
710 |
|
---|
711 | /** Simple action extension, used as 'Perform Add Machine' action class. */
|
---|
712 | class UIActionSimpleManagerMachinePerformAdd : public UIActionSimple
|
---|
713 | {
|
---|
714 | Q_OBJECT;
|
---|
715 |
|
---|
716 | public:
|
---|
717 |
|
---|
718 | /** Constructs action passing @a pParent to the base-class. */
|
---|
719 | UIActionSimpleManagerMachinePerformAdd(UIActionPool *pParent)
|
---|
720 | : UIActionSimple(pParent,
|
---|
721 | ":/vm_add_32px.png", ":/vm_add_16px.png",
|
---|
722 | ":/vm_add_disabled_32px.png", ":/vm_add_disabled_16px.png")
|
---|
723 | {}
|
---|
724 |
|
---|
725 | protected:
|
---|
726 |
|
---|
727 | /** Returns shortcut extra-data ID. */
|
---|
728 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
729 | {
|
---|
730 | return QString("AddVM");
|
---|
731 | }
|
---|
732 |
|
---|
733 | /** Returns default shortcut. */
|
---|
734 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
735 | {
|
---|
736 | return QKeySequence("Ctrl+A");
|
---|
737 | }
|
---|
738 |
|
---|
739 | /** Handles translation event. */
|
---|
740 | virtual void retranslateUi() RT_OVERRIDE
|
---|
741 | {
|
---|
742 | setName(QApplication::translate("UIActionPool", "&Add..."));
|
---|
743 | setStatusTip(QApplication::translate("UIActionPool", "Add existing virtual machine"));
|
---|
744 | setToolTip(simplifyText(text()) + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
745 | }
|
---|
746 | };
|
---|
747 |
|
---|
748 | /** Simple action extension, used as 'Move to Group => New' action class. */
|
---|
749 | class UIActionSimpleManagerMachineMoveToGroupNew : public UIActionSimple
|
---|
750 | {
|
---|
751 | Q_OBJECT;
|
---|
752 |
|
---|
753 | public:
|
---|
754 |
|
---|
755 | /** Constructs action passing @a pParent to the base-class. */
|
---|
756 | UIActionSimpleManagerMachineMoveToGroupNew(UIActionPool *pParent)
|
---|
757 | : UIActionSimple(pParent)
|
---|
758 | {}
|
---|
759 |
|
---|
760 | protected:
|
---|
761 |
|
---|
762 | /** Returns shortcut extra-data ID. */
|
---|
763 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
764 | {
|
---|
765 | return QString("AddVMGroup");
|
---|
766 | }
|
---|
767 |
|
---|
768 | /** Handles translation event. */
|
---|
769 | virtual void retranslateUi() RT_OVERRIDE
|
---|
770 | {
|
---|
771 | setName(QApplication::translate("UIActionPool", "[New]", "group"));
|
---|
772 | setStatusTip(QApplication::translate("UIActionPool", "Add new group based on selected virtual machines"));
|
---|
773 | }
|
---|
774 | };
|
---|
775 |
|
---|
776 | /** Simple action extension, used as 'Show Machine Settings' action class. */
|
---|
777 | class UIActionSimpleManagerMachineShowSettings : public UIActionSimple
|
---|
778 | {
|
---|
779 | Q_OBJECT;
|
---|
780 |
|
---|
781 | public:
|
---|
782 |
|
---|
783 | /** Constructs action passing @a pParent to the base-class. */
|
---|
784 | UIActionSimpleManagerMachineShowSettings(UIActionPool *pParent)
|
---|
785 | : UIActionSimple(pParent,
|
---|
786 | ":/vm_settings_32px.png", ":/vm_settings_16px.png",
|
---|
787 | ":/vm_settings_disabled_32px.png", ":/vm_settings_disabled_16px.png")
|
---|
788 | {}
|
---|
789 |
|
---|
790 | protected:
|
---|
791 |
|
---|
792 | /** Returns shortcut extra-data ID. */
|
---|
793 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
794 | {
|
---|
795 | return QString("SettingsVM");
|
---|
796 | }
|
---|
797 |
|
---|
798 | /** Returns default shortcut. */
|
---|
799 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
800 | {
|
---|
801 | return QKeySequence("Ctrl+S");
|
---|
802 | }
|
---|
803 |
|
---|
804 | /** Handles translation event. */
|
---|
805 | virtual void retranslateUi() RT_OVERRIDE
|
---|
806 | {
|
---|
807 | setName(QApplication::translate("UIActionPool", "&Settings..."));
|
---|
808 | setStatusTip(QApplication::translate("UIActionPool", "Display the virtual machine settings window"));
|
---|
809 | setToolTip(simplifyText(text()) + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
810 | }
|
---|
811 | };
|
---|
812 |
|
---|
813 | /** Simple action extension, used as 'Perform Clone Machine' action class. */
|
---|
814 | class UIActionSimpleManagerMachinePerformClone : public UIActionSimple
|
---|
815 | {
|
---|
816 | Q_OBJECT;
|
---|
817 |
|
---|
818 | public:
|
---|
819 |
|
---|
820 | /** Constructs action passing @a pParent to the base-class. */
|
---|
821 | UIActionSimpleManagerMachinePerformClone(UIActionPool *pParent)
|
---|
822 | : UIActionSimple(pParent, ":/vm_clone_16px.png", ":/vm_clone_disabled_16px.png")
|
---|
823 | {}
|
---|
824 |
|
---|
825 | protected:
|
---|
826 |
|
---|
827 | /** Returns shortcut extra-data ID. */
|
---|
828 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
829 | {
|
---|
830 | return QString("CloneVM");
|
---|
831 | }
|
---|
832 |
|
---|
833 | /** Returns default shortcut. */
|
---|
834 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
835 | {
|
---|
836 | return QKeySequence("Ctrl+O");
|
---|
837 | }
|
---|
838 |
|
---|
839 | /** Handles translation event. */
|
---|
840 | virtual void retranslateUi() RT_OVERRIDE
|
---|
841 | {
|
---|
842 | setName(QApplication::translate("UIActionPool", "Cl&one..."));
|
---|
843 | setStatusTip(QApplication::translate("UIActionPool", "Clone selected virtual machine"));
|
---|
844 | }
|
---|
845 | };
|
---|
846 |
|
---|
847 | /** Simple action extension, used as 'Perform Move Machine' action class. */
|
---|
848 | class UIActionSimpleManagerMachinePerformMove : public UIActionSimple
|
---|
849 | {
|
---|
850 | Q_OBJECT;
|
---|
851 |
|
---|
852 | public:
|
---|
853 |
|
---|
854 | /** Constructs action passing @a pParent to the base-class. */
|
---|
855 | UIActionSimpleManagerMachinePerformMove(UIActionPool *pParent)
|
---|
856 | : UIActionSimple(pParent, ":/vm_move_16px.png", ":/vm_move_disabled_16px.png")
|
---|
857 | {}
|
---|
858 |
|
---|
859 | protected:
|
---|
860 |
|
---|
861 | /** Returns shortcut extra-data ID. */
|
---|
862 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
863 | {
|
---|
864 | return QString("MoveVM");
|
---|
865 | }
|
---|
866 |
|
---|
867 | /** Handles translation event. */
|
---|
868 | virtual void retranslateUi() RT_OVERRIDE
|
---|
869 | {
|
---|
870 | setName(QApplication::translate("UIActionPool", "&Move..."));
|
---|
871 | setStatusTip(QApplication::translate("UIActionPool", "Move selected virtual machine"));
|
---|
872 | }
|
---|
873 | };
|
---|
874 |
|
---|
875 | /** Simple action extension, used as 'Perform Export Machine locally' action class. */
|
---|
876 | class UIActionSimpleManagerMachinePerformExportLocally : public UIActionSimple
|
---|
877 | {
|
---|
878 | Q_OBJECT;
|
---|
879 |
|
---|
880 | public:
|
---|
881 |
|
---|
882 | /** Constructs action passing @a pParent to the base-class. */
|
---|
883 | UIActionSimpleManagerMachinePerformExportLocally(UIActionPool *pParent)
|
---|
884 | : UIActionSimple(pParent, ":/export_16px.png", ":/export_disabled_16px.png")
|
---|
885 | {}
|
---|
886 |
|
---|
887 | protected:
|
---|
888 |
|
---|
889 | /** Returns shortcut extra-data ID. */
|
---|
890 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
891 | {
|
---|
892 | return QString("ExportLocally");
|
---|
893 | }
|
---|
894 |
|
---|
895 | /** Handles translation event. */
|
---|
896 | virtual void retranslateUi() RT_OVERRIDE
|
---|
897 | {
|
---|
898 | setName(QApplication::translate("UIActionPool", "E&xport Locally..."));
|
---|
899 | setStatusTip(QApplication::translate("UIActionPool", "Export selected virtual machine locally"));
|
---|
900 | }
|
---|
901 | };
|
---|
902 |
|
---|
903 | /** Simple action extension, used as 'Perform Export Machine to OCI' action class. */
|
---|
904 | class UIActionSimpleManagerMachinePerformExportToOCI : public UIActionSimple
|
---|
905 | {
|
---|
906 | Q_OBJECT;
|
---|
907 |
|
---|
908 | public:
|
---|
909 |
|
---|
910 | /** Constructs action passing @a pParent to the base-class. */
|
---|
911 | UIActionSimpleManagerMachinePerformExportToOCI(UIActionPool *pParent)
|
---|
912 | : UIActionSimple(pParent, ":/export_16px.png", ":/export_disabled_16px.png")
|
---|
913 | {}
|
---|
914 |
|
---|
915 | protected:
|
---|
916 |
|
---|
917 | /** Returns shortcut extra-data ID. */
|
---|
918 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
919 | {
|
---|
920 | return QString("ExportToOCI");
|
---|
921 | }
|
---|
922 |
|
---|
923 | /** Handles translation event. */
|
---|
924 | virtual void retranslateUi() RT_OVERRIDE
|
---|
925 | {
|
---|
926 | setName(QApplication::translate("UIActionPool", "E&xport to OCI..."));
|
---|
927 | setStatusTip(QApplication::translate("UIActionPool", "Export selected virtual machine to OCI"));
|
---|
928 | }
|
---|
929 | };
|
---|
930 |
|
---|
931 | /** Simple action extension, used as 'Perform Remove Machine' action class. */
|
---|
932 | class UIActionSimpleManagerMachinePerformRemove : public UIActionSimple
|
---|
933 | {
|
---|
934 | Q_OBJECT;
|
---|
935 |
|
---|
936 | public:
|
---|
937 |
|
---|
938 | /** Constructs action passing @a pParent to the base-class. */
|
---|
939 | UIActionSimpleManagerMachinePerformRemove(UIActionPool *pParent)
|
---|
940 | : UIActionSimple(pParent,
|
---|
941 | ":/vm_delete_32px.png", ":/vm_delete_16px.png",
|
---|
942 | ":/vm_delete_disabled_32px.png", ":/vm_delete_disabled_16px.png")
|
---|
943 | {}
|
---|
944 |
|
---|
945 | protected:
|
---|
946 |
|
---|
947 | /** Returns shortcut extra-data ID. */
|
---|
948 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
949 | {
|
---|
950 | return QString("RemoveVM");
|
---|
951 | }
|
---|
952 |
|
---|
953 | /** Handles translation event. */
|
---|
954 | virtual void retranslateUi() RT_OVERRIDE
|
---|
955 | {
|
---|
956 | setName(QApplication::translate("UIActionPool", "&Remove..."));
|
---|
957 | setStatusTip(QApplication::translate("UIActionPool", "Remove selected virtual machines"));
|
---|
958 | }
|
---|
959 | };
|
---|
960 |
|
---|
961 | /** Simple action extension, used as 'Perform Sort Parent' action class. */
|
---|
962 | class UIActionSimpleManagerMachinePerformSortParent : public UIActionSimple
|
---|
963 | {
|
---|
964 | Q_OBJECT;
|
---|
965 |
|
---|
966 | public:
|
---|
967 |
|
---|
968 | /** Constructs action passing @a pParent to the base-class. */
|
---|
969 | UIActionSimpleManagerMachinePerformSortParent(UIActionPool *pParent)
|
---|
970 | : UIActionSimple(pParent, ":/sort_16px.png", ":/sort_disabled_16px.png")
|
---|
971 | {}
|
---|
972 |
|
---|
973 | protected:
|
---|
974 |
|
---|
975 | /** Returns shortcut extra-data ID. */
|
---|
976 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
977 | {
|
---|
978 | return QString("SortGroup");
|
---|
979 | }
|
---|
980 |
|
---|
981 | /** Handles translation event. */
|
---|
982 | virtual void retranslateUi() RT_OVERRIDE
|
---|
983 | {
|
---|
984 | setName(QApplication::translate("UIActionPool", "&Sort"));
|
---|
985 | setStatusTip(QApplication::translate("UIActionPool", "Sort group of first selected virtual machine alphabetically"));
|
---|
986 | }
|
---|
987 | };
|
---|
988 |
|
---|
989 |
|
---|
990 | /** Menu action extension, used as 'Move to Group' menu class. */
|
---|
991 | class UIActionMenuManagerCommonMoveToGroup : public UIActionMenu
|
---|
992 | {
|
---|
993 | Q_OBJECT;
|
---|
994 |
|
---|
995 | public:
|
---|
996 |
|
---|
997 | /** Constructs action passing @a pParent to the base-class. */
|
---|
998 | UIActionMenuManagerCommonMoveToGroup(UIActionPool *pParent)
|
---|
999 | : UIActionMenu(pParent, ":/vm_group_create_16px.png", ":/vm_group_create_disabled_16px.png")
|
---|
1000 | {}
|
---|
1001 |
|
---|
1002 | protected:
|
---|
1003 |
|
---|
1004 | /** Handles translation event. */
|
---|
1005 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1006 | {
|
---|
1007 | setName(QApplication::translate("UIActionPool", "Move to Gro&up"));
|
---|
1008 | }
|
---|
1009 | };
|
---|
1010 |
|
---|
1011 | /** Menu action extension, used as 'Start or Show' menu class. */
|
---|
1012 | class UIActionStateManagerCommonStartOrShow : public UIActionMenu
|
---|
1013 | {
|
---|
1014 | Q_OBJECT;
|
---|
1015 |
|
---|
1016 | public:
|
---|
1017 |
|
---|
1018 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1019 | UIActionStateManagerCommonStartOrShow(UIActionPool *pParent)
|
---|
1020 | : UIActionMenu(pParent,
|
---|
1021 | ":/vm_start_32px.png", ":/vm_start_16px.png",
|
---|
1022 | ":/vm_start_disabled_32px.png", ":/vm_start_disabled_16px.png")
|
---|
1023 | {}
|
---|
1024 |
|
---|
1025 | protected:
|
---|
1026 |
|
---|
1027 | /** Handles translation event. */
|
---|
1028 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1029 | {
|
---|
1030 | switch (state())
|
---|
1031 | {
|
---|
1032 | case 0:
|
---|
1033 | {
|
---|
1034 | setName(QApplication::translate("UIActionPool", "S&tart"));
|
---|
1035 | setStatusTip(QApplication::translate("UIActionPool", "Start selected virtual machines"));
|
---|
1036 | setToolTip(simplifyText(text()) + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
1037 | break;
|
---|
1038 | }
|
---|
1039 | case 1:
|
---|
1040 | {
|
---|
1041 | setName(QApplication::translate("UIActionPool", "S&how"));
|
---|
1042 | setStatusTip(QApplication::translate("UIActionPool", "Switch to the windows of selected virtual machines"));
|
---|
1043 | setToolTip(simplifyText(text()) + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
1044 | break;
|
---|
1045 | }
|
---|
1046 | default:
|
---|
1047 | break;
|
---|
1048 | }
|
---|
1049 | }
|
---|
1050 |
|
---|
1051 | /** Handles state change. */
|
---|
1052 | virtual void handleStateChange() RT_OVERRIDE
|
---|
1053 | {
|
---|
1054 | switch (state())
|
---|
1055 | {
|
---|
1056 | case 0: showMenu(); break;
|
---|
1057 | case 1: hideMenu(); break;
|
---|
1058 | default: break;
|
---|
1059 | }
|
---|
1060 | }
|
---|
1061 | };
|
---|
1062 |
|
---|
1063 | /** Simple action extension, used as 'Perform Normal Start' action class. */
|
---|
1064 | class UIActionSimpleManagerCommonPerformStartNormal : public UIActionSimple
|
---|
1065 | {
|
---|
1066 | Q_OBJECT;
|
---|
1067 |
|
---|
1068 | public:
|
---|
1069 |
|
---|
1070 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1071 | UIActionSimpleManagerCommonPerformStartNormal(UIActionPool *pParent)
|
---|
1072 | : UIActionSimple(pParent, ":/vm_start_16px.png", ":/vm_start_16px.png")
|
---|
1073 | {}
|
---|
1074 |
|
---|
1075 | protected:
|
---|
1076 |
|
---|
1077 | /** Returns shortcut extra-data ID. */
|
---|
1078 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1079 | {
|
---|
1080 | return QString("StartVMNormal");
|
---|
1081 | }
|
---|
1082 |
|
---|
1083 | /** Handles translation event. */
|
---|
1084 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1085 | {
|
---|
1086 | setName(QApplication::translate("UIActionPool", "&Normal Start"));
|
---|
1087 | setStatusTip(QApplication::translate("UIActionPool", "Start selected virtual machines"));
|
---|
1088 | }
|
---|
1089 | };
|
---|
1090 |
|
---|
1091 | /** Simple action extension, used as 'Perform Headless Start' action class. */
|
---|
1092 | class UIActionSimpleManagerCommonPerformStartHeadless : public UIActionSimple
|
---|
1093 | {
|
---|
1094 | Q_OBJECT;
|
---|
1095 |
|
---|
1096 | public:
|
---|
1097 |
|
---|
1098 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1099 | UIActionSimpleManagerCommonPerformStartHeadless(UIActionPool *pParent)
|
---|
1100 | : UIActionSimple(pParent, ":/vm_start_headless_16px.png", ":/vm_start_headless_16px.png")
|
---|
1101 | {}
|
---|
1102 |
|
---|
1103 | protected:
|
---|
1104 |
|
---|
1105 | /** Returns shortcut extra-data ID. */
|
---|
1106 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1107 | {
|
---|
1108 | return QString("StartVMHeadless");
|
---|
1109 | }
|
---|
1110 |
|
---|
1111 | /** Handles translation event. */
|
---|
1112 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1113 | {
|
---|
1114 | setName(QApplication::translate("UIActionPool", "&Headless Start"));
|
---|
1115 | setStatusTip(QApplication::translate("UIActionPool", "Start selected virtual machines in the background"));
|
---|
1116 | }
|
---|
1117 | };
|
---|
1118 |
|
---|
1119 | /** Simple action extension, used as 'Perform Detachable Start' action class. */
|
---|
1120 | class UIActionSimpleManagerCommonPerformStartDetachable : public UIActionSimple
|
---|
1121 | {
|
---|
1122 | Q_OBJECT;
|
---|
1123 |
|
---|
1124 | public:
|
---|
1125 |
|
---|
1126 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1127 | UIActionSimpleManagerCommonPerformStartDetachable(UIActionPool *pParent)
|
---|
1128 | : UIActionSimple(pParent, ":/vm_start_separate_16px.png", ":/vm_start_separate_16px.png")
|
---|
1129 | {}
|
---|
1130 |
|
---|
1131 | protected:
|
---|
1132 |
|
---|
1133 | /** Returns shortcut extra-data ID. */
|
---|
1134 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1135 | {
|
---|
1136 | return QString("StartVMDetachable");
|
---|
1137 | }
|
---|
1138 |
|
---|
1139 | /** Handles translation event. */
|
---|
1140 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1141 | {
|
---|
1142 | setName(QApplication::translate("UIActionPool", "&Detachable Start"));
|
---|
1143 | setStatusTip(QApplication::translate("UIActionPool", "Start selected virtual machines with option of continuing in background"));
|
---|
1144 | }
|
---|
1145 | };
|
---|
1146 |
|
---|
1147 | /** Toggle action extension, used as 'Pause and Resume' action class. */
|
---|
1148 | class UIActionToggleManagerCommonPauseAndResume : public UIActionToggle
|
---|
1149 | {
|
---|
1150 | Q_OBJECT;
|
---|
1151 |
|
---|
1152 | public:
|
---|
1153 |
|
---|
1154 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1155 | UIActionToggleManagerCommonPauseAndResume(UIActionPool *pParent)
|
---|
1156 | : UIActionToggle(pParent,
|
---|
1157 | ":/vm_pause_on_16px.png", ":/vm_pause_16px.png",
|
---|
1158 | ":/vm_pause_on_disabled_16px.png", ":/vm_pause_disabled_16px.png")
|
---|
1159 | {}
|
---|
1160 |
|
---|
1161 | protected:
|
---|
1162 |
|
---|
1163 | /** Returns shortcut extra-data ID. */
|
---|
1164 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1165 | {
|
---|
1166 | return QString("PauseVM");
|
---|
1167 | }
|
---|
1168 |
|
---|
1169 | /** Handles translation event. */
|
---|
1170 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1171 | {
|
---|
1172 | setName(QApplication::translate("UIActionPool", "&Pause"));
|
---|
1173 | setStatusTip(QApplication::translate("UIActionPool", "Suspend execution of selected virtual machines"));
|
---|
1174 | }
|
---|
1175 | };
|
---|
1176 |
|
---|
1177 | /** Simple action extension, used as 'Perform Reset' action class. */
|
---|
1178 | class UIActionSimpleManagerCommonPerformReset : public UIActionSimple
|
---|
1179 | {
|
---|
1180 | Q_OBJECT;
|
---|
1181 |
|
---|
1182 | public:
|
---|
1183 |
|
---|
1184 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1185 | UIActionSimpleManagerCommonPerformReset(UIActionPool *pParent)
|
---|
1186 | : UIActionSimple(pParent, ":/vm_reset_16px.png", ":/vm_reset_disabled_16px.png")
|
---|
1187 | {}
|
---|
1188 |
|
---|
1189 | protected:
|
---|
1190 |
|
---|
1191 | /** Returns shortcut extra-data ID. */
|
---|
1192 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1193 | {
|
---|
1194 | return QString("ResetVM");
|
---|
1195 | }
|
---|
1196 |
|
---|
1197 | /** Handles translation event. */
|
---|
1198 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1199 | {
|
---|
1200 | setName(QApplication::translate("UIActionPool", "&Reset"));
|
---|
1201 | setStatusTip(QApplication::translate("UIActionPool", "Reset selected virtual machines"));
|
---|
1202 | }
|
---|
1203 | };
|
---|
1204 |
|
---|
1205 | /** Simple action extension, used as 'Perform Detach' action class. */
|
---|
1206 | class UIActionSimpleManagerCommonPerformDetach : public UIActionSimple
|
---|
1207 | {
|
---|
1208 | Q_OBJECT;
|
---|
1209 |
|
---|
1210 | public:
|
---|
1211 |
|
---|
1212 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1213 | UIActionSimpleManagerCommonPerformDetach(UIActionPool *pParent)
|
---|
1214 | : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png")
|
---|
1215 | {}
|
---|
1216 |
|
---|
1217 | protected:
|
---|
1218 |
|
---|
1219 | /** Returns shortcut extra-data ID. */
|
---|
1220 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1221 | {
|
---|
1222 | return QString("DetachUIVM");
|
---|
1223 | }
|
---|
1224 |
|
---|
1225 | /** Handles translation event. */
|
---|
1226 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1227 | {
|
---|
1228 | setName(QApplication::translate("UIActionPool", "&Detach GUI"));
|
---|
1229 | setStatusTip(QApplication::translate("UIActionPool", "Detach the GUI from headless VM"));
|
---|
1230 | }
|
---|
1231 | };
|
---|
1232 |
|
---|
1233 | /** Simple menu action extension, used as 'Perform Discard' action class. */
|
---|
1234 | class UIActionSimpleManagerCommonPerformDiscard : public UIActionSimple
|
---|
1235 | {
|
---|
1236 | Q_OBJECT;
|
---|
1237 |
|
---|
1238 | public:
|
---|
1239 |
|
---|
1240 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1241 | UIActionSimpleManagerCommonPerformDiscard(UIActionPool *pParent)
|
---|
1242 | : UIActionSimple(pParent,
|
---|
1243 | ":/vm_discard_32px.png", ":/vm_discard_16px.png",
|
---|
1244 | ":/vm_discard_disabled_32px.png", ":/vm_discard_disabled_16px.png")
|
---|
1245 | {}
|
---|
1246 |
|
---|
1247 | protected:
|
---|
1248 |
|
---|
1249 | /** Returns shortcut extra-data ID. */
|
---|
1250 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1251 | {
|
---|
1252 | return QString("DiscardVM");
|
---|
1253 | }
|
---|
1254 |
|
---|
1255 | /** Handles translation event. */
|
---|
1256 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1257 | {
|
---|
1258 | setIconText(QApplication::translate("UIActionPool", "Discard"));
|
---|
1259 | setName(QApplication::translate("UIActionPool", "D&iscard Saved State..."));
|
---|
1260 | setStatusTip(QApplication::translate("UIActionPool", "Discard saved state of selected virtual machines"));
|
---|
1261 | setToolTip(simplifyText(text()) + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
1262 | }
|
---|
1263 | };
|
---|
1264 |
|
---|
1265 | /** Simple action extension, used as 'Perform Refresh' action class. */
|
---|
1266 | class UIActionSimpleManagerCommonPerformRefresh : public UIActionSimple
|
---|
1267 | {
|
---|
1268 | Q_OBJECT;
|
---|
1269 |
|
---|
1270 | public:
|
---|
1271 |
|
---|
1272 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1273 | UIActionSimpleManagerCommonPerformRefresh(UIActionPool *pParent)
|
---|
1274 | : UIActionSimple(pParent,
|
---|
1275 | ":/refresh_32px.png", ":/refresh_16px.png",
|
---|
1276 | ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png")
|
---|
1277 | {}
|
---|
1278 |
|
---|
1279 | protected:
|
---|
1280 |
|
---|
1281 | /** Returns shortcut extra-data ID. */
|
---|
1282 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1283 | {
|
---|
1284 | return QString("RefreshVM");
|
---|
1285 | }
|
---|
1286 |
|
---|
1287 | /** Handles translation event. */
|
---|
1288 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1289 | {
|
---|
1290 | setName(QApplication::translate("UIActionPool", "Re&fresh"));
|
---|
1291 | setStatusTip(QApplication::translate("UIActionPool", "Refresh accessibility state of selected virtual machines"));
|
---|
1292 | }
|
---|
1293 | };
|
---|
1294 |
|
---|
1295 | /** Simple action extension, used as 'Show in File Manager' action class. */
|
---|
1296 | class UIActionSimpleManagerCommonShowInFileManager : public UIActionSimple
|
---|
1297 | {
|
---|
1298 | Q_OBJECT;
|
---|
1299 |
|
---|
1300 | public:
|
---|
1301 |
|
---|
1302 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1303 | UIActionSimpleManagerCommonShowInFileManager(UIActionPool *pParent)
|
---|
1304 | : UIActionSimple(pParent, ":/vm_open_filemanager_16px.png", ":/vm_open_filemanager_disabled_16px.png")
|
---|
1305 | {}
|
---|
1306 |
|
---|
1307 | protected:
|
---|
1308 |
|
---|
1309 | /** Returns shortcut extra-data ID. */
|
---|
1310 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1311 | {
|
---|
1312 | return QString("ShowVMInFileManager");
|
---|
1313 | }
|
---|
1314 |
|
---|
1315 | /** Handles translation event. */
|
---|
1316 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1317 | {
|
---|
1318 | #if defined(VBOX_WS_MAC)
|
---|
1319 | setName(QApplication::translate("UIActionPool", "S&how in Finder"));
|
---|
1320 | setStatusTip(QApplication::translate("UIActionPool", "Show the VirtualBox Machine Definition files in Finder"));
|
---|
1321 | #elif defined(VBOX_WS_WIN)
|
---|
1322 | setName(QApplication::translate("UIActionPool", "S&how in Explorer"));
|
---|
1323 | setStatusTip(QApplication::translate("UIActionPool", "Show the VirtualBox Machine Definition files in Explorer"));
|
---|
1324 | #else
|
---|
1325 | setName(QApplication::translate("UIActionPool", "S&how in File Manager"));
|
---|
1326 | setStatusTip(QApplication::translate("UIActionPool", "Show the VirtualBox Machine Definition files in the File Manager"));
|
---|
1327 | #endif
|
---|
1328 | }
|
---|
1329 | };
|
---|
1330 |
|
---|
1331 | /** Simple action extension, used as 'Perform Create Shortcut' action class. */
|
---|
1332 | class UIActionSimpleManagerCommonPerformCreateShortcut : public UIActionSimple
|
---|
1333 | {
|
---|
1334 | Q_OBJECT;
|
---|
1335 |
|
---|
1336 | public:
|
---|
1337 |
|
---|
1338 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1339 | UIActionSimpleManagerCommonPerformCreateShortcut(UIActionPool *pParent)
|
---|
1340 | : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png")
|
---|
1341 | {}
|
---|
1342 |
|
---|
1343 | protected:
|
---|
1344 |
|
---|
1345 | /** Returns shortcut extra-data ID. */
|
---|
1346 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1347 | {
|
---|
1348 | return QString("CreateVMAlias");
|
---|
1349 | }
|
---|
1350 |
|
---|
1351 | /** Handles translation event. */
|
---|
1352 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1353 | {
|
---|
1354 | #if defined(VBOX_WS_MAC)
|
---|
1355 | setName(QApplication::translate("UIActionPool", "Cr&eate Alias on Desktop"));
|
---|
1356 | setStatusTip(QApplication::translate("UIActionPool", "Create alias files to the VirtualBox Machine Definition files on your desktop"));
|
---|
1357 | #else
|
---|
1358 | setName(QApplication::translate("UIActionPool", "Cr&eate Shortcut on Desktop"));
|
---|
1359 | setStatusTip(QApplication::translate("UIActionPool", "Create shortcut files to the VirtualBox Machine Definition files on your desktop"));
|
---|
1360 | #endif
|
---|
1361 | }
|
---|
1362 | };
|
---|
1363 |
|
---|
1364 | /** Toggle action extension, used as 'Search' action class. */
|
---|
1365 | class UIActionToggleManagerCommonToggleSearch : public UIActionToggle
|
---|
1366 | {
|
---|
1367 | Q_OBJECT;
|
---|
1368 |
|
---|
1369 | public:
|
---|
1370 |
|
---|
1371 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1372 | UIActionToggleManagerCommonToggleSearch(UIActionPool *pParent)
|
---|
1373 | : UIActionToggle(pParent,
|
---|
1374 | ":/search_16px.png", ":/search_16px.png",
|
---|
1375 | ":/search_16px.png", ":/search_16px.png") /// @todo use icons with check-boxes
|
---|
1376 | {}
|
---|
1377 |
|
---|
1378 | protected:
|
---|
1379 |
|
---|
1380 | /** Returns shortcut extra-data ID. */
|
---|
1381 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1382 | {
|
---|
1383 | return QString("SearchVM");
|
---|
1384 | }
|
---|
1385 |
|
---|
1386 | /** Returns default shortcut. */
|
---|
1387 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
1388 | {
|
---|
1389 | return QKeySequence("Ctrl+F");
|
---|
1390 | }
|
---|
1391 |
|
---|
1392 | /** Handles translation event. */
|
---|
1393 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1394 | {
|
---|
1395 | setName(QApplication::translate("UIActionPool", "S&earch"));
|
---|
1396 | setStatusTip(QApplication::translate("UIActionPool", "Search virtual machines with respect to a search term"));
|
---|
1397 | }
|
---|
1398 | };
|
---|
1399 |
|
---|
1400 |
|
---|
1401 | /** Menu action extension, used as 'Console' menu class. */
|
---|
1402 | class UIActionMenuManagerConsole : public UIActionMenu
|
---|
1403 | {
|
---|
1404 | Q_OBJECT;
|
---|
1405 |
|
---|
1406 | public:
|
---|
1407 |
|
---|
1408 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1409 | UIActionMenuManagerConsole(UIActionPool *pParent)
|
---|
1410 | : UIActionMenu(pParent, ":/cloud_machine_console_16px.png")
|
---|
1411 | {}
|
---|
1412 |
|
---|
1413 | protected:
|
---|
1414 |
|
---|
1415 | /** Handles translation event. */
|
---|
1416 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1417 | {
|
---|
1418 | setName(QApplication::translate("UIActionPool", "C&onsole"));
|
---|
1419 | }
|
---|
1420 | };
|
---|
1421 |
|
---|
1422 | /** Simple action extension, used as 'Perform Create Console Connection' action class. */
|
---|
1423 | class UIActionSimpleManagerConsolePerformCreateConnection : public UIActionSimple
|
---|
1424 | {
|
---|
1425 | Q_OBJECT;
|
---|
1426 |
|
---|
1427 | public:
|
---|
1428 |
|
---|
1429 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1430 | UIActionSimpleManagerConsolePerformCreateConnection(UIActionPool *pParent)
|
---|
1431 | : UIActionSimple(pParent,
|
---|
1432 | ":/cloud_machine_console_create_connection_16px.png",
|
---|
1433 | ":/cloud_machine_console_create_connection_disabled_16px.png")
|
---|
1434 | {}
|
---|
1435 |
|
---|
1436 | protected:
|
---|
1437 |
|
---|
1438 | /** Returns shortcut extra-data ID. */
|
---|
1439 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1440 | {
|
---|
1441 | return QString("CreateConsoleConnection");
|
---|
1442 | }
|
---|
1443 |
|
---|
1444 | /** Handles translation event. */
|
---|
1445 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1446 | {
|
---|
1447 | setName(QApplication::translate("UIActionPool", "&Create Connection"));
|
---|
1448 | setStatusTip(QApplication::translate("UIActionPool", "Create console connection to be able to use ssh/vnc clients"));
|
---|
1449 | }
|
---|
1450 | };
|
---|
1451 |
|
---|
1452 | /** Simple action extension, used as 'Perform Delete Console Connection' action class. */
|
---|
1453 | class UIActionSimpleManagerConsolePerformDeleteConnection : public UIActionSimple
|
---|
1454 | {
|
---|
1455 | Q_OBJECT;
|
---|
1456 |
|
---|
1457 | public:
|
---|
1458 |
|
---|
1459 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1460 | UIActionSimpleManagerConsolePerformDeleteConnection(UIActionPool *pParent)
|
---|
1461 | : UIActionSimple(pParent,
|
---|
1462 | ":/cloud_machine_console_delete_connection_16px.png",
|
---|
1463 | ":/cloud_machine_console_delete_connection_disabled_16px.png")
|
---|
1464 | {}
|
---|
1465 |
|
---|
1466 | protected:
|
---|
1467 |
|
---|
1468 | /** Returns shortcut extra-data ID. */
|
---|
1469 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1470 | {
|
---|
1471 | return QString("DeleteConsoleConnection");
|
---|
1472 | }
|
---|
1473 |
|
---|
1474 | /** Handles translation event. */
|
---|
1475 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1476 | {
|
---|
1477 | setName(QApplication::translate("UIActionPool", "&Delete Connection"));
|
---|
1478 | setStatusTip(QApplication::translate("UIActionPool", "Delete console connection to disconnect ssh/vnc clients"));
|
---|
1479 | }
|
---|
1480 | };
|
---|
1481 |
|
---|
1482 | /** Simple action extension, used as 'Perform Configure Applications' action class. */
|
---|
1483 | class UIActionSimpleManagerConsolePerformConfigureApplications : public UIActionSimple
|
---|
1484 | {
|
---|
1485 | Q_OBJECT;
|
---|
1486 |
|
---|
1487 | public:
|
---|
1488 |
|
---|
1489 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1490 | UIActionSimpleManagerConsolePerformConfigureApplications(UIActionPool *pParent)
|
---|
1491 | : UIActionSimple(pParent,
|
---|
1492 | ":/cloud_machine_console_configure_external_terminal_16px.png",
|
---|
1493 | ":/cloud_machine_console_configure_external_terminal_disabled_16px.png")
|
---|
1494 | {
|
---|
1495 | setProperty("UIToolType", QVariant::fromValue(UIToolType_CloudConsole));
|
---|
1496 | }
|
---|
1497 |
|
---|
1498 | protected:
|
---|
1499 |
|
---|
1500 | /** Returns shortcut extra-data ID. */
|
---|
1501 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1502 | {
|
---|
1503 | return QString("ConfigureConsoleApplications");
|
---|
1504 | }
|
---|
1505 |
|
---|
1506 | /** Handles translation event. */
|
---|
1507 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1508 | {
|
---|
1509 | setName(QApplication::translate("UIActionPool", "&Configure Console Applications"));
|
---|
1510 | setStatusTip(QApplication::translate("UIActionPool", "Open configuration dialog to edit console application settings"));
|
---|
1511 | }
|
---|
1512 | };
|
---|
1513 |
|
---|
1514 | /** Simple action extension, used as 'Copy Command' action class. */
|
---|
1515 | class UIActionSimpleManagerConsolePerformCopyCommand : public UIActionSimple
|
---|
1516 | {
|
---|
1517 | Q_OBJECT;
|
---|
1518 |
|
---|
1519 | public:
|
---|
1520 |
|
---|
1521 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1522 | UIActionSimpleManagerConsolePerformCopyCommand(UIActionPool *pParent, bool fSerial, bool fUnix)
|
---|
1523 | : UIActionSimple(pParent)
|
---|
1524 | , m_fSerial(fSerial)
|
---|
1525 | , m_fUnix(fUnix)
|
---|
1526 | {
|
---|
1527 | if (m_fSerial)
|
---|
1528 | setIcon(UIIconPool::iconSet(":/cloud_machine_console_get_serial_console_command_16px.png",
|
---|
1529 | ":/cloud_machine_console_get_serial_console_command_disabled_16px.png"));
|
---|
1530 | else
|
---|
1531 | setIcon(UIIconPool::iconSet(":/cloud_machine_console_get_vnc_console_command_16px.png",
|
---|
1532 | ":/cloud_machine_console_get_vnc_console_command_disabled_16px.png"));
|
---|
1533 | }
|
---|
1534 |
|
---|
1535 | protected:
|
---|
1536 |
|
---|
1537 | /** Returns shortcut extra-data ID. */
|
---|
1538 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1539 | {
|
---|
1540 | return m_fSerial
|
---|
1541 | ? QString("CopyConsoleCommandSerial")
|
---|
1542 | : QString("CopyConsoleCommandVNC");
|
---|
1543 | }
|
---|
1544 |
|
---|
1545 | /** Handles translation event. */
|
---|
1546 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1547 | {
|
---|
1548 | if (m_fSerial)
|
---|
1549 | {
|
---|
1550 | if (m_fUnix)
|
---|
1551 | setName(QApplication::translate("UIActionPool", "&Copy Command (serial) for Unix"));
|
---|
1552 | else
|
---|
1553 | setName(QApplication::translate("UIActionPool", "&Copy Command (serial) for Windows"));
|
---|
1554 | setStatusTip(QApplication::translate("UIActionPool", "Copy console command for serial connection"));
|
---|
1555 | }
|
---|
1556 | else
|
---|
1557 | {
|
---|
1558 | if (m_fUnix)
|
---|
1559 | setName(QApplication::translate("UIActionPool", "&Copy Command (VNC) for Unix"));
|
---|
1560 | else
|
---|
1561 | setName(QApplication::translate("UIActionPool", "&Copy Command (VNC) for Windows"));
|
---|
1562 | setStatusTip(QApplication::translate("UIActionPool", "Copy console command for VNC connection"));
|
---|
1563 | }
|
---|
1564 | }
|
---|
1565 |
|
---|
1566 | private:
|
---|
1567 |
|
---|
1568 | /** Holds whether this command is of serial type. */
|
---|
1569 | bool m_fSerial;
|
---|
1570 | /** Holds whether this command is for unix. */
|
---|
1571 | bool m_fUnix;
|
---|
1572 | };
|
---|
1573 |
|
---|
1574 | /** Simple action extension, used as 'Show Log' action class. */
|
---|
1575 | class UIActionSimpleManagerConsolePerformShowLog : public UIActionSimple
|
---|
1576 | {
|
---|
1577 | Q_OBJECT;
|
---|
1578 |
|
---|
1579 | public:
|
---|
1580 |
|
---|
1581 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1582 | UIActionSimpleManagerConsolePerformShowLog(UIActionPool *pParent)
|
---|
1583 | : UIActionSimple(pParent,
|
---|
1584 | ":/vm_show_logs_16px.png",
|
---|
1585 | ":/vm_show_logs_disabled_16px.png")
|
---|
1586 | {}
|
---|
1587 |
|
---|
1588 | protected:
|
---|
1589 |
|
---|
1590 | /** Returns shortcut extra-data ID. */
|
---|
1591 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1592 | {
|
---|
1593 | return QString("ShowConsoleLog");
|
---|
1594 | }
|
---|
1595 |
|
---|
1596 | /** Handles translation event. */
|
---|
1597 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1598 | {
|
---|
1599 | setName(QApplication::translate("UIActionPool", "Show &Log"));
|
---|
1600 | setStatusTip(QApplication::translate("UIActionPool", "Show cloud console log"));
|
---|
1601 | }
|
---|
1602 | };
|
---|
1603 |
|
---|
1604 |
|
---|
1605 | /** Menu action extension, used as 'Stop' menu class. */
|
---|
1606 | class UIActionMenuManagerStop : public UIActionMenu
|
---|
1607 | {
|
---|
1608 | Q_OBJECT;
|
---|
1609 |
|
---|
1610 | public:
|
---|
1611 |
|
---|
1612 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1613 | UIActionMenuManagerStop(UIActionPool *pParent)
|
---|
1614 | : UIActionMenu(pParent, ":/exit_16px.png")
|
---|
1615 | {}
|
---|
1616 |
|
---|
1617 | protected:
|
---|
1618 |
|
---|
1619 | /** Handles translation event. */
|
---|
1620 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1621 | {
|
---|
1622 | setName(QApplication::translate("UIActionPool", "Stop"));
|
---|
1623 | }
|
---|
1624 | };
|
---|
1625 |
|
---|
1626 | /** Simple action extension, used as 'Perform Save' action class. */
|
---|
1627 | class UIActionSimpleManagerStopPerformSave : public UIActionSimple
|
---|
1628 | {
|
---|
1629 | Q_OBJECT;
|
---|
1630 |
|
---|
1631 | public:
|
---|
1632 |
|
---|
1633 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1634 | UIActionSimpleManagerStopPerformSave(UIActionPool *pParent)
|
---|
1635 | : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png")
|
---|
1636 | {}
|
---|
1637 |
|
---|
1638 | protected:
|
---|
1639 |
|
---|
1640 | /** Returns shortcut extra-data ID. */
|
---|
1641 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1642 | {
|
---|
1643 | return QString("SaveVM");
|
---|
1644 | }
|
---|
1645 |
|
---|
1646 | /** Handles translation event. */
|
---|
1647 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1648 | {
|
---|
1649 | setName(QApplication::translate("UIActionPool", "&Save State"));
|
---|
1650 | setStatusTip(QApplication::translate("UIActionPool", "Save state of selected virtual machines"));
|
---|
1651 | }
|
---|
1652 | };
|
---|
1653 |
|
---|
1654 | /** Simple action extension, used as 'Perform Terminate' action class. */
|
---|
1655 | class UIActionSimpleManagerStopPerformTerminate : public UIActionSimple
|
---|
1656 | {
|
---|
1657 | Q_OBJECT;
|
---|
1658 |
|
---|
1659 | public:
|
---|
1660 |
|
---|
1661 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1662 | UIActionSimpleManagerStopPerformTerminate(UIActionPool *pParent)
|
---|
1663 | : UIActionSimple(pParent, ":/vm_discard_16px.png", ":/vm_discard_disabled_16px.png")
|
---|
1664 | {}
|
---|
1665 |
|
---|
1666 | protected:
|
---|
1667 |
|
---|
1668 | /** Returns shortcut extra-data ID. */
|
---|
1669 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1670 | {
|
---|
1671 | return QString("TerminateVM");
|
---|
1672 | }
|
---|
1673 |
|
---|
1674 | /** Handles translation event. */
|
---|
1675 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1676 | {
|
---|
1677 | setIconText(QApplication::translate("UIActionPool", "Terminate"));
|
---|
1678 | setName(QApplication::translate("UIActionPool", "&Terminate Cloud Instance..."));
|
---|
1679 | setStatusTip(QApplication::translate("UIActionPool", "Terminate cloud instance of selected virtual machines"));
|
---|
1680 | setToolTip(simplifyText(text()) + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
1681 | }
|
---|
1682 | };
|
---|
1683 |
|
---|
1684 | /** Simple action extension, used as 'Perform Shutdown' action class. */
|
---|
1685 | class UIActionSimpleManagerStopPerformShutdown : public UIActionSimple
|
---|
1686 | {
|
---|
1687 | Q_OBJECT;
|
---|
1688 |
|
---|
1689 | public:
|
---|
1690 |
|
---|
1691 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1692 | UIActionSimpleManagerStopPerformShutdown(UIActionPool *pParent)
|
---|
1693 | : UIActionSimple(pParent, ":/vm_shutdown_16px.png", ":/vm_shutdown_disabled_16px.png")
|
---|
1694 | {}
|
---|
1695 |
|
---|
1696 | protected:
|
---|
1697 |
|
---|
1698 | /** Returns shortcut extra-data ID. */
|
---|
1699 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1700 | {
|
---|
1701 | return QString("ACPIShutdownVM");
|
---|
1702 | }
|
---|
1703 |
|
---|
1704 | /** Handles translation event. */
|
---|
1705 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1706 | {
|
---|
1707 | setName(QApplication::translate("UIActionPool", "ACPI Sh&utdown"));
|
---|
1708 | setStatusTip(QApplication::translate("UIActionPool", "Send ACPI Shutdown signal to selected virtual machines"));
|
---|
1709 | }
|
---|
1710 | };
|
---|
1711 |
|
---|
1712 | /** Simple action extension, used as 'Perform PowerOff' action class. */
|
---|
1713 | class UIActionSimpleManagerStopPerformPowerOff : public UIActionSimple
|
---|
1714 | {
|
---|
1715 | Q_OBJECT;
|
---|
1716 |
|
---|
1717 | public:
|
---|
1718 |
|
---|
1719 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1720 | UIActionSimpleManagerStopPerformPowerOff(UIActionPool *pParent)
|
---|
1721 | : UIActionSimple(pParent, ":/vm_poweroff_16px.png", ":/vm_poweroff_disabled_16px.png")
|
---|
1722 | {}
|
---|
1723 |
|
---|
1724 | protected:
|
---|
1725 |
|
---|
1726 | /** Returns shortcut extra-data ID. */
|
---|
1727 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1728 | {
|
---|
1729 | return QString("PowerOffVM");
|
---|
1730 | }
|
---|
1731 |
|
---|
1732 | /** Handles translation event. */
|
---|
1733 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1734 | {
|
---|
1735 | setName(QApplication::translate("UIActionPool", "Po&wer Off"));
|
---|
1736 | setStatusTip(QApplication::translate("UIActionPool", "Power off selected virtual machines"));
|
---|
1737 | }
|
---|
1738 | };
|
---|
1739 |
|
---|
1740 |
|
---|
1741 | /** Menu action extension, used as 'Machine Tools' menu class. */
|
---|
1742 | class UIActionMenuManagerToolsMachine : public UIActionMenu
|
---|
1743 | {
|
---|
1744 | Q_OBJECT;
|
---|
1745 |
|
---|
1746 | public:
|
---|
1747 |
|
---|
1748 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1749 | UIActionMenuManagerToolsMachine(UIActionPool *pParent)
|
---|
1750 | : UIActionMenu(pParent, ":/tools_menu_24px.png") /// @todo replace with 16px icon
|
---|
1751 | {}
|
---|
1752 |
|
---|
1753 | protected:
|
---|
1754 |
|
---|
1755 | /** Handles translation event. */
|
---|
1756 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1757 | {
|
---|
1758 | setName(QApplication::translate("UIActionPool", "Tools"));
|
---|
1759 | }
|
---|
1760 | };
|
---|
1761 |
|
---|
1762 | /** Simple action extension, used as 'Show Machine Details' action class. */
|
---|
1763 | class UIActionToggleManagerToolsMachineShowDetails : public UIActionToggle
|
---|
1764 | {
|
---|
1765 | Q_OBJECT;
|
---|
1766 |
|
---|
1767 | public:
|
---|
1768 |
|
---|
1769 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1770 | UIActionToggleManagerToolsMachineShowDetails(UIActionPool *pParent)
|
---|
1771 | : UIActionToggle(pParent)
|
---|
1772 | {
|
---|
1773 | setProperty("UIToolType", QVariant::fromValue(UIToolType_Details));
|
---|
1774 | /// @todo use icons with check-boxes
|
---|
1775 | setIcon(UIIconPool::iconSetFull(":/machine_details_manager_24px.png", ":/machine_details_manager_16px.png",
|
---|
1776 | ":/machine_details_manager_disabled_24px.png", ":/machine_details_manager_disabled_16px.png"));
|
---|
1777 | }
|
---|
1778 |
|
---|
1779 | protected:
|
---|
1780 |
|
---|
1781 | /** Returns shortcut extra-data ID. */
|
---|
1782 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1783 | {
|
---|
1784 | return QString("ToolsMachineDetails");
|
---|
1785 | }
|
---|
1786 |
|
---|
1787 | /** Handles translation event. */
|
---|
1788 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1789 | {
|
---|
1790 | setName(QApplication::translate("UIActionPool", "&Details"));
|
---|
1791 | setStatusTip(QApplication::translate("UIActionPool", "Open the machine details pane"));
|
---|
1792 | }
|
---|
1793 | };
|
---|
1794 |
|
---|
1795 | /** Simple action extension, used as 'Show Machine Snapshots' action class. */
|
---|
1796 | class UIActionToggleManagerToolsMachineShowSnapshots : public UIActionToggle
|
---|
1797 | {
|
---|
1798 | Q_OBJECT;
|
---|
1799 |
|
---|
1800 | public:
|
---|
1801 |
|
---|
1802 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1803 | UIActionToggleManagerToolsMachineShowSnapshots(UIActionPool *pParent)
|
---|
1804 | : UIActionToggle(pParent)
|
---|
1805 | {
|
---|
1806 | setProperty("UIToolType", QVariant::fromValue(UIToolType_Snapshots));
|
---|
1807 | /// @todo use icons with check-boxes
|
---|
1808 | setIcon(UIIconPool::iconSetFull(":/snapshot_manager_24px.png", ":/snapshot_manager_16px.png",
|
---|
1809 | ":/snapshot_manager_disabled_24px.png", ":/snapshot_manager_disabled_16px.png"));
|
---|
1810 | }
|
---|
1811 |
|
---|
1812 | protected:
|
---|
1813 |
|
---|
1814 | /** Returns shortcut extra-data ID. */
|
---|
1815 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1816 | {
|
---|
1817 | return QString("ToolsMachineSnapshots");
|
---|
1818 | }
|
---|
1819 |
|
---|
1820 | /** Handles translation event. */
|
---|
1821 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1822 | {
|
---|
1823 | setName(QApplication::translate("UIActionPool", "&Snapshots"));
|
---|
1824 | setStatusTip(QApplication::translate("UIActionPool", "Open the machine snapshots pane"));
|
---|
1825 | }
|
---|
1826 | };
|
---|
1827 |
|
---|
1828 | /** Simple action extension, used as 'Show Machine Logs' action class. */
|
---|
1829 | class UIActionToggleManagerToolsMachineShowLogs : public UIActionToggle
|
---|
1830 | {
|
---|
1831 | Q_OBJECT;
|
---|
1832 |
|
---|
1833 | public:
|
---|
1834 |
|
---|
1835 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1836 | UIActionToggleManagerToolsMachineShowLogs(UIActionPool *pParent)
|
---|
1837 | : UIActionToggle(pParent)
|
---|
1838 | {
|
---|
1839 | setProperty("UIToolType", QVariant::fromValue(UIToolType_Logs));
|
---|
1840 | /// @todo use icons with check-boxes
|
---|
1841 | setIcon(UIIconPool::iconSetFull(":/vm_show_logs_32px.png", ":/vm_show_logs_16px.png",
|
---|
1842 | ":/vm_show_logs_disabled_32px.png", ":/vm_show_logs_disabled_16px.png"));
|
---|
1843 | }
|
---|
1844 |
|
---|
1845 | protected:
|
---|
1846 |
|
---|
1847 | /** Returns shortcut extra-data ID. */
|
---|
1848 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1849 | {
|
---|
1850 | return QString("ToolsMachineLogViewer");
|
---|
1851 | }
|
---|
1852 |
|
---|
1853 | /** Returns default shortcut. */
|
---|
1854 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
1855 | {
|
---|
1856 | return QKeySequence("Ctrl+L");
|
---|
1857 | }
|
---|
1858 |
|
---|
1859 | /** Handles translation event. */
|
---|
1860 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1861 | {
|
---|
1862 | setName(QApplication::translate("UIActionPool", "&Logs"));
|
---|
1863 | setStatusTip(QApplication::translate("UIActionPool", "Open the machine logs pane"));
|
---|
1864 | }
|
---|
1865 | };
|
---|
1866 |
|
---|
1867 | /** Simple action extension, used as 'Show VM Activity Monitor' action class. */
|
---|
1868 | class UIActionToggleManagerToolsMachineShowActivity : public UIActionToggle
|
---|
1869 | {
|
---|
1870 | Q_OBJECT;
|
---|
1871 |
|
---|
1872 | public:
|
---|
1873 |
|
---|
1874 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1875 | UIActionToggleManagerToolsMachineShowActivity(UIActionPool *pParent)
|
---|
1876 | : UIActionToggle(pParent)
|
---|
1877 | {
|
---|
1878 | setProperty("UIToolType", QVariant::fromValue(UIToolType_VMActivity));
|
---|
1879 | /// @todo use icons with check-boxes
|
---|
1880 | setIcon(UIIconPool::iconSetFull(":/performance_monitor_32px.png", ":/performance_monitor_16px.png",
|
---|
1881 | ":/performance_monitor_disabled_32px.png", ":/performance_monitor_disabled_16px.png"));
|
---|
1882 | }
|
---|
1883 |
|
---|
1884 | protected:
|
---|
1885 |
|
---|
1886 | /** Returns shortcut extra-data ID. */
|
---|
1887 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1888 | {
|
---|
1889 | return QString("ToolsMachineVMActivityMonitor");
|
---|
1890 | }
|
---|
1891 |
|
---|
1892 | /** Handles translation event. */
|
---|
1893 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1894 | {
|
---|
1895 | setName(QApplication::translate("UIActionPool", "&Activity"));
|
---|
1896 | setStatusTip(QApplication::translate("UIActionPool", "Open the machine activity monitor pane"));
|
---|
1897 | }
|
---|
1898 | };
|
---|
1899 |
|
---|
1900 | /** Simple action extension, used as 'Show File Manager' action class. */
|
---|
1901 | class UIActionToggleManagerToolsMachineShowFileManager : public UIActionToggle
|
---|
1902 | {
|
---|
1903 | Q_OBJECT;
|
---|
1904 |
|
---|
1905 | public:
|
---|
1906 |
|
---|
1907 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1908 | UIActionToggleManagerToolsMachineShowFileManager(UIActionPool *pParent)
|
---|
1909 | : UIActionToggle(pParent)
|
---|
1910 | {
|
---|
1911 | setProperty("UIToolType", QVariant::fromValue(UIToolType_FileManager));
|
---|
1912 | /// @todo use icons with check-boxes
|
---|
1913 | setIcon(UIIconPool::iconSetFull(":/file_manager_24px.png", ":/file_manager_16px.png",
|
---|
1914 | ":/file_manager_disabled_24px.png", ":/file_manager_disabled_16px.png"));
|
---|
1915 | }
|
---|
1916 |
|
---|
1917 | protected:
|
---|
1918 |
|
---|
1919 | /** Returns shortcut extra-data ID. */
|
---|
1920 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1921 | {
|
---|
1922 | return QString("ToolsMachineFileManager");
|
---|
1923 | }
|
---|
1924 |
|
---|
1925 | /** Handles translation event. */
|
---|
1926 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1927 | {
|
---|
1928 | setName(QApplication::translate("UIActionPool", "&File Manager"));
|
---|
1929 | setStatusTip(QApplication::translate("UIActionPool", "Open the File Manager"));
|
---|
1930 | }
|
---|
1931 | };
|
---|
1932 |
|
---|
1933 |
|
---|
1934 | /** Menu action extension, used as 'Snapshot' menu class. */
|
---|
1935 | class UIActionMenuManagerSnapshot : public UIActionMenu
|
---|
1936 | {
|
---|
1937 | Q_OBJECT;
|
---|
1938 |
|
---|
1939 | public:
|
---|
1940 |
|
---|
1941 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1942 | UIActionMenuManagerSnapshot(UIActionPool *pParent)
|
---|
1943 | : UIActionMenu(pParent)
|
---|
1944 | {}
|
---|
1945 |
|
---|
1946 | protected:
|
---|
1947 |
|
---|
1948 | /** Handles translation event. */
|
---|
1949 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1950 | {
|
---|
1951 | setName(QApplication::translate("UIActionPool", "&Snapshot"));
|
---|
1952 | }
|
---|
1953 | };
|
---|
1954 |
|
---|
1955 | /** Simple action extension, used as 'Perform Take' action class. */
|
---|
1956 | class UIActionMenuManagerSnapshotPerformTake : public UIActionSimple
|
---|
1957 | {
|
---|
1958 | Q_OBJECT;
|
---|
1959 |
|
---|
1960 | public:
|
---|
1961 |
|
---|
1962 | /** Constructs action passing @a pParent to the base-class. */
|
---|
1963 | UIActionMenuManagerSnapshotPerformTake(UIActionPool *pParent)
|
---|
1964 | : UIActionSimple(pParent,
|
---|
1965 | ":/snapshot_take_32px.png", ":/snapshot_take_16px.png",
|
---|
1966 | ":/snapshot_take_disabled_32px.png", ":/snapshot_take_disabled_16px.png")
|
---|
1967 | {
|
---|
1968 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
1969 | }
|
---|
1970 |
|
---|
1971 | protected:
|
---|
1972 |
|
---|
1973 | /** Returns shortcut extra-data ID. */
|
---|
1974 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
1975 | {
|
---|
1976 | return QString("TakeSnapshot");
|
---|
1977 | }
|
---|
1978 |
|
---|
1979 | /** Returns default shortcut. */
|
---|
1980 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
1981 | {
|
---|
1982 | return QKeySequence("Ctrl+Shift+T");
|
---|
1983 | }
|
---|
1984 |
|
---|
1985 | /** Handles translation event. */
|
---|
1986 | virtual void retranslateUi() RT_OVERRIDE
|
---|
1987 | {
|
---|
1988 | setName(QApplication::translate("UIActionPool", "&Take..."));
|
---|
1989 | setShortcutScope(QApplication::translate("UIActionPool", "Snapshot Pane"));
|
---|
1990 | setStatusTip(QApplication::translate("UIActionPool", "Take a snapshot of the current virtual machine state"));
|
---|
1991 | setToolTip( QApplication::translate("UIActionPool", "Take Snapshot")
|
---|
1992 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
1993 | }
|
---|
1994 | };
|
---|
1995 |
|
---|
1996 | /** Simple action extension, used as 'Perform Delete' action class. */
|
---|
1997 | class UIActionMenuManagerSnapshotPerformDelete : public UIActionSimple
|
---|
1998 | {
|
---|
1999 | Q_OBJECT;
|
---|
2000 |
|
---|
2001 | public:
|
---|
2002 |
|
---|
2003 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2004 | UIActionMenuManagerSnapshotPerformDelete(UIActionPool *pParent)
|
---|
2005 | : UIActionSimple(pParent,
|
---|
2006 | ":/snapshot_delete_32px.png", ":/snapshot_delete_16px.png",
|
---|
2007 | ":/snapshot_delete_disabled_32px.png", ":/snapshot_delete_disabled_16px.png")
|
---|
2008 | {
|
---|
2009 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2010 | }
|
---|
2011 |
|
---|
2012 | protected:
|
---|
2013 |
|
---|
2014 | /** Returns shortcut extra-data ID. */
|
---|
2015 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2016 | {
|
---|
2017 | return QString("DeleteSnapshot");
|
---|
2018 | }
|
---|
2019 |
|
---|
2020 | /** Returns default shortcut. */
|
---|
2021 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2022 | {
|
---|
2023 | return QKeySequence("Ctrl+Shift+D");
|
---|
2024 | }
|
---|
2025 |
|
---|
2026 | /** Handles translation event. */
|
---|
2027 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2028 | {
|
---|
2029 | setName(QApplication::translate("UIActionPool", "&Delete..."));
|
---|
2030 | setShortcutScope(QApplication::translate("UIActionPool", "Snapshot Pane"));
|
---|
2031 | setStatusTip(QApplication::translate("UIActionPool", "Delete selected snapshot of the virtual machine"));
|
---|
2032 | setToolTip( QApplication::translate("UIActionPool", "Delete Snapshot")
|
---|
2033 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2034 | }
|
---|
2035 | };
|
---|
2036 |
|
---|
2037 | /** Simple action extension, used as 'Perform Restore' action class. */
|
---|
2038 | class UIActionMenuManagerSnapshotPerformRestore : public UIActionSimple
|
---|
2039 | {
|
---|
2040 | Q_OBJECT;
|
---|
2041 |
|
---|
2042 | public:
|
---|
2043 |
|
---|
2044 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2045 | UIActionMenuManagerSnapshotPerformRestore(UIActionPool *pParent)
|
---|
2046 | : UIActionSimple(pParent,
|
---|
2047 | ":/snapshot_restore_32px.png", ":/snapshot_restore_16px.png",
|
---|
2048 | ":/snapshot_restore_disabled_32px.png", ":/snapshot_restore_disabled_16px.png")
|
---|
2049 | {
|
---|
2050 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2051 | }
|
---|
2052 |
|
---|
2053 | protected:
|
---|
2054 |
|
---|
2055 | /** Returns shortcut extra-data ID. */
|
---|
2056 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2057 | {
|
---|
2058 | return QString("RestoreSnapshot");
|
---|
2059 | }
|
---|
2060 |
|
---|
2061 | /** Returns default shortcut. */
|
---|
2062 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2063 | {
|
---|
2064 | return QKeySequence("Ctrl+Shift+R");
|
---|
2065 | }
|
---|
2066 |
|
---|
2067 | /** Handles translation event. */
|
---|
2068 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2069 | {
|
---|
2070 | setName(QApplication::translate("UIActionPool", "&Restore..."));
|
---|
2071 | setShortcutScope(QApplication::translate("UIActionPool", "Snapshot Pane"));
|
---|
2072 | setStatusTip(QApplication::translate("UIActionPool", "Restore selected snapshot of the virtual machine"));
|
---|
2073 | setToolTip( QApplication::translate("UIActionPool", "Restore Snapshot")
|
---|
2074 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2075 | }
|
---|
2076 | };
|
---|
2077 |
|
---|
2078 | /** Toggle action extension, used as 'Toggle Snapshot Properties' action class. */
|
---|
2079 | class UIActionMenuManagerSnapshotToggleProperties : public UIActionToggle
|
---|
2080 | {
|
---|
2081 | Q_OBJECT;
|
---|
2082 |
|
---|
2083 | public:
|
---|
2084 |
|
---|
2085 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2086 | UIActionMenuManagerSnapshotToggleProperties(UIActionPool *pParent)
|
---|
2087 | : UIActionToggle(pParent)
|
---|
2088 | {
|
---|
2089 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2090 | /// @todo use icons with check-boxes
|
---|
2091 | setIcon(UIIconPool::iconSetFull(":/snapshot_show_details_32px.png", ":/snapshot_show_details_16px.png",
|
---|
2092 | ":/snapshot_show_details_disabled_32px.png", ":/snapshot_show_details_disabled_16px.png"));
|
---|
2093 | }
|
---|
2094 |
|
---|
2095 | protected:
|
---|
2096 |
|
---|
2097 | /** Returns shortcut extra-data ID. */
|
---|
2098 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2099 | {
|
---|
2100 | return QString("ToggleSnapshotProperties");
|
---|
2101 | }
|
---|
2102 |
|
---|
2103 | /** Returns default shortcut. */
|
---|
2104 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2105 | {
|
---|
2106 | return QKeySequence("Ctrl+Shift+P");
|
---|
2107 | }
|
---|
2108 |
|
---|
2109 | /** Handles translation event. */
|
---|
2110 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2111 | {
|
---|
2112 | setName(QApplication::translate("UIActionPool", "&Properties"));
|
---|
2113 | setShortcutScope(QApplication::translate("UIActionPool", "Snapshot Pane"));
|
---|
2114 | setStatusTip(QApplication::translate("UIActionPool", "Open pane with the selected snapshot properties"));
|
---|
2115 | setToolTip( QApplication::translate("UIActionPool", "Open Snapshot Properties")
|
---|
2116 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2117 | }
|
---|
2118 | };
|
---|
2119 |
|
---|
2120 | /** Simple action extension, used as 'Perform Clone' action class. */
|
---|
2121 | class UIActionMenuManagerSnapshotPerformClone : public UIActionSimple
|
---|
2122 | {
|
---|
2123 | Q_OBJECT;
|
---|
2124 |
|
---|
2125 | public:
|
---|
2126 |
|
---|
2127 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2128 | UIActionMenuManagerSnapshotPerformClone(UIActionPool *pParent)
|
---|
2129 | : UIActionSimple(pParent,
|
---|
2130 | ":/vm_clone_32px.png", ":/vm_clone_16px.png",
|
---|
2131 | ":/vm_clone_disabled_32px.png", ":/vm_clone_disabled_16px.png")
|
---|
2132 | {
|
---|
2133 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2134 | }
|
---|
2135 |
|
---|
2136 | protected:
|
---|
2137 |
|
---|
2138 | /** Returns shortcut extra-data ID. */
|
---|
2139 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2140 | {
|
---|
2141 | return QString("CloneSnapshot");
|
---|
2142 | }
|
---|
2143 |
|
---|
2144 | /** Returns default shortcut. */
|
---|
2145 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2146 | {
|
---|
2147 | return QKeySequence("Ctrl+Shift+C");
|
---|
2148 | }
|
---|
2149 |
|
---|
2150 | /** Handles translation event. */
|
---|
2151 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2152 | {
|
---|
2153 | setName(QApplication::translate("UIActionPool", "&Clone..."));
|
---|
2154 | setShortcutScope(QApplication::translate("UIActionPool", "Snapshot Pane"));
|
---|
2155 | setStatusTip(QApplication::translate("UIActionPool", "Clone selected virtual machine"));
|
---|
2156 | setToolTip( QApplication::translate("UIActionPool", "Clone Virtual Machine")
|
---|
2157 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2158 | }
|
---|
2159 | };
|
---|
2160 |
|
---|
2161 |
|
---|
2162 | /** Menu action extension, used as 'Extension' menu class. */
|
---|
2163 | class UIActionMenuManagerExtension : public UIActionMenu
|
---|
2164 | {
|
---|
2165 | Q_OBJECT;
|
---|
2166 |
|
---|
2167 | public:
|
---|
2168 |
|
---|
2169 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2170 | UIActionMenuManagerExtension(UIActionPool *pParent)
|
---|
2171 | : UIActionMenu(pParent)
|
---|
2172 | {}
|
---|
2173 |
|
---|
2174 | protected:
|
---|
2175 |
|
---|
2176 | /** Handles translation event. */
|
---|
2177 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2178 | {
|
---|
2179 | setName(QApplication::translate("UIActionPool", "&Extension"));
|
---|
2180 | }
|
---|
2181 | };
|
---|
2182 |
|
---|
2183 | /** Simple action extension, used as 'Perform Install' action class. */
|
---|
2184 | class UIActionSimpleManagerExtensionPerformInstall : public UIActionSimple
|
---|
2185 | {
|
---|
2186 | Q_OBJECT;
|
---|
2187 |
|
---|
2188 | public:
|
---|
2189 |
|
---|
2190 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2191 | UIActionSimpleManagerExtensionPerformInstall(UIActionPool *pParent)
|
---|
2192 | : UIActionSimple(pParent,
|
---|
2193 | ":/extension_pack_install_32px.png", ":/extension_pack_install_16px.png",
|
---|
2194 | ":/extension_pack_install_disabled_32px.png", ":/extension_pack_install_disabled_16px.png")
|
---|
2195 | {
|
---|
2196 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2197 | }
|
---|
2198 |
|
---|
2199 | protected:
|
---|
2200 |
|
---|
2201 | /** Returns shortcut extra-data ID. */
|
---|
2202 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2203 | {
|
---|
2204 | return QString("InstallExtension");
|
---|
2205 | }
|
---|
2206 |
|
---|
2207 | /** Returns default shortcut. */
|
---|
2208 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2209 | {
|
---|
2210 | return QKeySequence("Ctrl+Shift+I");
|
---|
2211 | }
|
---|
2212 |
|
---|
2213 | /** Handles translation event. */
|
---|
2214 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2215 | {
|
---|
2216 | setName(QApplication::translate("UIActionPool", "&Install..."));
|
---|
2217 | setShortcutScope(QApplication::translate("UIActionPool", "Extension Pack Manager"));
|
---|
2218 | setStatusTip(QApplication::translate("UIActionPool", "Install extension pack"));
|
---|
2219 | setToolTip( QApplication::translate("UIActionPool", "Install Extension Pack")
|
---|
2220 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2221 | }
|
---|
2222 | };
|
---|
2223 |
|
---|
2224 | /** Simple action extension, used as 'Perform Uninstall' action class. */
|
---|
2225 | class UIActionSimpleManagerExtensionPerformUninstall : public UIActionSimple
|
---|
2226 | {
|
---|
2227 | Q_OBJECT;
|
---|
2228 |
|
---|
2229 | public:
|
---|
2230 |
|
---|
2231 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2232 | UIActionSimpleManagerExtensionPerformUninstall(UIActionPool *pParent)
|
---|
2233 | : UIActionSimple(pParent,
|
---|
2234 | ":/extension_pack_uninstall_32px.png", ":/extension_pack_uninstall_16px.png",
|
---|
2235 | ":/extension_pack_uninstall_disabled_32px.png", ":/extension_pack_uninstall_disabled_16px.png")
|
---|
2236 | {
|
---|
2237 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2238 | }
|
---|
2239 |
|
---|
2240 | protected:
|
---|
2241 |
|
---|
2242 | /** Returns shortcut extra-data ID. */
|
---|
2243 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2244 | {
|
---|
2245 | return QString("UninstallExtension");
|
---|
2246 | }
|
---|
2247 |
|
---|
2248 | /** Returns default shortcut. */
|
---|
2249 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2250 | {
|
---|
2251 | return QKeySequence("Ctrl+Shift+U");
|
---|
2252 | }
|
---|
2253 |
|
---|
2254 | /** Handles translation event. */
|
---|
2255 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2256 | {
|
---|
2257 | setName(QApplication::translate("UIActionPool", "&Uninstall..."));
|
---|
2258 | setShortcutScope(QApplication::translate("UIActionPool", "Extension Pack Manager"));
|
---|
2259 | setStatusTip(QApplication::translate("UIActionPool", "Uninstall selected extension pack"));
|
---|
2260 | setToolTip( QApplication::translate("UIActionPool", "Uninstall Extension Pack")
|
---|
2261 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2262 | }
|
---|
2263 | };
|
---|
2264 |
|
---|
2265 |
|
---|
2266 | /** Menu action extension, used as 'Medium' menu class. */
|
---|
2267 | class UIActionMenuManagerMedium : public UIActionMenu
|
---|
2268 | {
|
---|
2269 | Q_OBJECT;
|
---|
2270 |
|
---|
2271 | public:
|
---|
2272 |
|
---|
2273 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2274 | UIActionMenuManagerMedium(UIActionPool *pParent)
|
---|
2275 | : UIActionMenu(pParent)
|
---|
2276 | {}
|
---|
2277 |
|
---|
2278 | protected:
|
---|
2279 |
|
---|
2280 | /** Handles translation event. */
|
---|
2281 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2282 | {
|
---|
2283 | setName(QApplication::translate("UIActionPool", "&Medium"));
|
---|
2284 | }
|
---|
2285 | };
|
---|
2286 |
|
---|
2287 | /** Simple action extension, used as 'Perform Add' action class. */
|
---|
2288 | class UIActionMenuManagerMediumPerformAdd : public UIActionSimple
|
---|
2289 | {
|
---|
2290 | Q_OBJECT;
|
---|
2291 |
|
---|
2292 | public:
|
---|
2293 |
|
---|
2294 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2295 | UIActionMenuManagerMediumPerformAdd(UIActionPool *pParent)
|
---|
2296 | : UIActionSimple(pParent)
|
---|
2297 | {
|
---|
2298 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2299 | setIcon(0, UIIconPool::iconSetFull(":/hd_add_32px.png", ":/hd_add_16px.png",
|
---|
2300 | ":/hd_add_disabled_32px.png", ":/hd_add_disabled_16px.png"));
|
---|
2301 | setIcon(1, UIIconPool::iconSetFull(":/cd_add_32px.png", ":/cd_add_16px.png",
|
---|
2302 | ":/cd_add_disabled_32px.png", ":/cd_add_disabled_16px.png"));
|
---|
2303 | setIcon(2, UIIconPool::iconSetFull(":/fd_add_32px.png", ":/fd_add_16px.png",
|
---|
2304 | ":/fd_add_disabled_32px.png", ":/fd_add_disabled_16px.png"));
|
---|
2305 | }
|
---|
2306 |
|
---|
2307 | protected:
|
---|
2308 |
|
---|
2309 | /** Returns shortcut extra-data ID. */
|
---|
2310 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2311 | {
|
---|
2312 | return QString("AddMedium");
|
---|
2313 | }
|
---|
2314 |
|
---|
2315 | /** Returns default shortcut. */
|
---|
2316 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2317 | {
|
---|
2318 | return QKeySequence("Ctrl+Shift+A");
|
---|
2319 | }
|
---|
2320 |
|
---|
2321 | /** Handles translation event. */
|
---|
2322 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2323 | {
|
---|
2324 | setName(QApplication::translate("UIActionPool", "&Add..."));
|
---|
2325 | setShortcutScope(QApplication::translate("UIActionPool", "Media Manager"));
|
---|
2326 | setStatusTip(QApplication::translate("UIActionPool", "Add a disk image"));
|
---|
2327 | setToolTip( QApplication::translate("UIActionPool", "Add Disk Image")
|
---|
2328 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2329 | }
|
---|
2330 | };
|
---|
2331 |
|
---|
2332 | /** Simple action extension, used as 'Perform Create' action class. */
|
---|
2333 | class UIActionMenuManagerMediumPerformCreate : public UIActionSimple
|
---|
2334 | {
|
---|
2335 | Q_OBJECT;
|
---|
2336 |
|
---|
2337 | public:
|
---|
2338 |
|
---|
2339 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2340 | UIActionMenuManagerMediumPerformCreate(UIActionPool *pParent)
|
---|
2341 | : UIActionSimple(pParent)
|
---|
2342 | {
|
---|
2343 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2344 | setIcon(0, UIIconPool::iconSetFull(":/hd_create_32px.png", ":/hd_create_16px.png",
|
---|
2345 | ":/hd_create_disabled_32px.png", ":/hd_create_disabled_16px.png"));
|
---|
2346 | setIcon(1, UIIconPool::iconSetFull(":/cd_create_32px.png", ":/cd_create_16px.png",
|
---|
2347 | ":/cd_create_disabled_32px.png", ":/cd_create_disabled_16px.png"));
|
---|
2348 | setIcon(2, UIIconPool::iconSetFull(":/fd_create_32px.png", ":/fd_create_16px.png",
|
---|
2349 | ":/fd_create_disabled_32px.png", ":/fd_create_disabled_16px.png"));
|
---|
2350 | }
|
---|
2351 |
|
---|
2352 | protected:
|
---|
2353 |
|
---|
2354 | /** Returns shortcut extra-data ID. */
|
---|
2355 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2356 | {
|
---|
2357 | return QString("CreateMedium");
|
---|
2358 | }
|
---|
2359 |
|
---|
2360 | /** Returns default shortcut. */
|
---|
2361 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2362 | {
|
---|
2363 | return QKeySequence("");
|
---|
2364 | }
|
---|
2365 |
|
---|
2366 | /** Handles translation event. */
|
---|
2367 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2368 | {
|
---|
2369 | setName(QApplication::translate("UIActionPool", "&Create..."));
|
---|
2370 | setShortcutScope(QApplication::translate("UIActionPool", "Media Manager"));
|
---|
2371 | setStatusTip(QApplication::translate("UIActionPool", "Create a new disk image"));
|
---|
2372 | setToolTip( QApplication::translate("UIActionPool", "Create Disk Image")
|
---|
2373 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2374 | }
|
---|
2375 | };
|
---|
2376 |
|
---|
2377 | /** Simple action extension, used as 'Perform Copy' action class. */
|
---|
2378 | class UIActionMenuManagerMediumPerformCopy : public UIActionSimple
|
---|
2379 | {
|
---|
2380 | Q_OBJECT;
|
---|
2381 |
|
---|
2382 | public:
|
---|
2383 |
|
---|
2384 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2385 | UIActionMenuManagerMediumPerformCopy(UIActionPool *pParent)
|
---|
2386 | : UIActionSimple(pParent)
|
---|
2387 | {
|
---|
2388 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2389 | setIcon(0, UIIconPool::iconSetFull(":/hd_copy_32px.png", ":/hd_copy_16px.png",
|
---|
2390 | ":/hd_copy_disabled_32px.png", ":/hd_copy_disabled_16px.png"));
|
---|
2391 | setIcon(1, UIIconPool::iconSetFull(":/cd_copy_32px.png", ":/cd_copy_16px.png",
|
---|
2392 | ":/cd_copy_disabled_32px.png", ":/cd_copy_disabled_16px.png"));
|
---|
2393 | setIcon(2, UIIconPool::iconSetFull(":/fd_copy_32px.png", ":/fd_copy_16px.png",
|
---|
2394 | ":/fd_copy_disabled_32px.png", ":/fd_copy_disabled_16px.png"));
|
---|
2395 | }
|
---|
2396 |
|
---|
2397 | protected:
|
---|
2398 |
|
---|
2399 | /** Returns shortcut extra-data ID. */
|
---|
2400 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2401 | {
|
---|
2402 | return QString("CopyMedium");
|
---|
2403 | }
|
---|
2404 |
|
---|
2405 | /** Returns default shortcut. */
|
---|
2406 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2407 | {
|
---|
2408 | return QKeySequence("Ctrl+Shift+C");
|
---|
2409 | }
|
---|
2410 |
|
---|
2411 | /** Handles translation event. */
|
---|
2412 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2413 | {
|
---|
2414 | setName(QApplication::translate("UIActionPool", "&Copy..."));
|
---|
2415 | setShortcutScope(QApplication::translate("UIActionPool", "Media Manager"));
|
---|
2416 | setStatusTip(QApplication::translate("UIActionPool", "Copy selected disk image"));
|
---|
2417 | setToolTip( QApplication::translate("UIActionPool", "Copy Disk Image")
|
---|
2418 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2419 | }
|
---|
2420 | };
|
---|
2421 |
|
---|
2422 | /** Simple action extension, used as 'Perform Move' action class. */
|
---|
2423 | class UIActionMenuManagerMediumPerformMove : public UIActionSimple
|
---|
2424 | {
|
---|
2425 | Q_OBJECT;
|
---|
2426 |
|
---|
2427 | public:
|
---|
2428 |
|
---|
2429 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2430 | UIActionMenuManagerMediumPerformMove(UIActionPool *pParent)
|
---|
2431 | : UIActionSimple(pParent)
|
---|
2432 | {
|
---|
2433 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2434 | setIcon(0, UIIconPool::iconSetFull(":/hd_move_32px.png", ":/hd_move_16px.png",
|
---|
2435 | ":/hd_move_disabled_32px.png", ":/hd_move_disabled_16px.png"));
|
---|
2436 | setIcon(1, UIIconPool::iconSetFull(":/cd_move_32px.png", ":/cd_move_16px.png",
|
---|
2437 | ":/cd_move_disabled_32px.png", ":/cd_move_disabled_16px.png"));
|
---|
2438 | setIcon(2, UIIconPool::iconSetFull(":/fd_move_32px.png", ":/fd_move_16px.png",
|
---|
2439 | ":/fd_move_disabled_32px.png", ":/fd_move_disabled_16px.png"));
|
---|
2440 | }
|
---|
2441 |
|
---|
2442 | protected:
|
---|
2443 |
|
---|
2444 | /** Returns shortcut extra-data ID. */
|
---|
2445 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2446 | {
|
---|
2447 | return QString("MoveMedium");
|
---|
2448 | }
|
---|
2449 |
|
---|
2450 | /** Returns default shortcut. */
|
---|
2451 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2452 | {
|
---|
2453 | return QKeySequence("Ctrl+Shift+M");
|
---|
2454 | }
|
---|
2455 |
|
---|
2456 | /** Handles translation event. */
|
---|
2457 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2458 | {
|
---|
2459 | setName(QApplication::translate("UIActionPool", "&Move..."));
|
---|
2460 | setShortcutScope(QApplication::translate("UIActionPool", "Media Manager"));
|
---|
2461 | setStatusTip(QApplication::translate("UIActionPool", "Move selected disk image"));
|
---|
2462 | setToolTip( QApplication::translate("UIActionPool", "Move Disk Image")
|
---|
2463 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2464 | }
|
---|
2465 | };
|
---|
2466 |
|
---|
2467 | /** Simple action extension, used as 'Perform Remove' action class. */
|
---|
2468 | class UIActionMenuManagerMediumPerformRemove : public UIActionSimple
|
---|
2469 | {
|
---|
2470 | Q_OBJECT;
|
---|
2471 |
|
---|
2472 | public:
|
---|
2473 |
|
---|
2474 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2475 | UIActionMenuManagerMediumPerformRemove(UIActionPool *pParent)
|
---|
2476 | : UIActionSimple(pParent)
|
---|
2477 | {
|
---|
2478 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2479 | setIcon(0, UIIconPool::iconSetFull(":/hd_remove_32px.png", ":/hd_remove_16px.png",
|
---|
2480 | ":/hd_remove_disabled_32px.png", ":/hd_remove_disabled_16px.png"));
|
---|
2481 | setIcon(1, UIIconPool::iconSetFull(":/cd_remove_32px.png", ":/cd_remove_16px.png",
|
---|
2482 | ":/cd_remove_disabled_32px.png", ":/cd_remove_disabled_16px.png"));
|
---|
2483 | setIcon(2, UIIconPool::iconSetFull(":/fd_remove_32px.png", ":/fd_remove_16px.png",
|
---|
2484 | ":/fd_remove_disabled_32px.png", ":/fd_remove_disabled_16px.png"));
|
---|
2485 | }
|
---|
2486 |
|
---|
2487 | protected:
|
---|
2488 |
|
---|
2489 | /** Returns shortcut extra-data ID. */
|
---|
2490 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2491 | {
|
---|
2492 | return QString("RemoveMedium");
|
---|
2493 | }
|
---|
2494 |
|
---|
2495 | /** Returns default shortcut. */
|
---|
2496 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2497 | {
|
---|
2498 | return QKeySequence("Ctrl+Shift+R");
|
---|
2499 | }
|
---|
2500 |
|
---|
2501 | /** Handles translation event. */
|
---|
2502 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2503 | {
|
---|
2504 | setName(QApplication::translate("UIActionPool", "&Remove..."));
|
---|
2505 | setShortcutScope(QApplication::translate("UIActionPool", "Media Manager"));
|
---|
2506 | setStatusTip(QApplication::translate("UIActionPool", "Remove selected disk image"));
|
---|
2507 | setToolTip( QApplication::translate("UIActionPool", "Remove Disk Image")
|
---|
2508 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2509 | }
|
---|
2510 | };
|
---|
2511 |
|
---|
2512 | /** Simple action extension, used as 'Perform Release' action class. */
|
---|
2513 | class UIActionMenuManagerMediumPerformRelease : public UIActionSimple
|
---|
2514 | {
|
---|
2515 | Q_OBJECT;
|
---|
2516 |
|
---|
2517 | public:
|
---|
2518 |
|
---|
2519 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2520 | UIActionMenuManagerMediumPerformRelease(UIActionPool *pParent)
|
---|
2521 | : UIActionSimple(pParent)
|
---|
2522 | {
|
---|
2523 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2524 | setIcon(0, UIIconPool::iconSetFull(":/hd_release_32px.png", ":/hd_release_16px.png",
|
---|
2525 | ":/hd_release_disabled_32px.png", ":/hd_release_disabled_16px.png"));
|
---|
2526 | setIcon(1, UIIconPool::iconSetFull(":/cd_release_32px.png", ":/cd_release_16px.png",
|
---|
2527 | ":/cd_release_disabled_32px.png", ":/cd_release_disabled_16px.png"));
|
---|
2528 | setIcon(2, UIIconPool::iconSetFull(":/fd_release_32px.png", ":/fd_release_16px.png",
|
---|
2529 | ":/fd_release_disabled_32px.png", ":/fd_release_disabled_16px.png"));
|
---|
2530 | }
|
---|
2531 |
|
---|
2532 | protected:
|
---|
2533 |
|
---|
2534 | /** Returns shortcut extra-data ID. */
|
---|
2535 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2536 | {
|
---|
2537 | return QString("ReleaseMedium");
|
---|
2538 | }
|
---|
2539 |
|
---|
2540 | /** Returns default shortcut. */
|
---|
2541 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2542 | {
|
---|
2543 | return QKeySequence("Ctrl+Shift+L");
|
---|
2544 | }
|
---|
2545 |
|
---|
2546 | /** Handles translation event. */
|
---|
2547 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2548 | {
|
---|
2549 | setName(QApplication::translate("UIActionPool", "Re&lease..."));
|
---|
2550 | setShortcutScope(QApplication::translate("UIActionPool", "Media Manager"));
|
---|
2551 | setStatusTip(QApplication::translate("UIActionPool", "Release selected disk image"));
|
---|
2552 | setToolTip( QApplication::translate("UIActionPool", "Release Disk Image")
|
---|
2553 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2554 | }
|
---|
2555 | };
|
---|
2556 |
|
---|
2557 | /** Toggle action extension, used as 'Toggle Medium Properties' action class. */
|
---|
2558 | class UIActionMenuManagerMediumToggleProperties : public UIActionToggle
|
---|
2559 | {
|
---|
2560 | Q_OBJECT;
|
---|
2561 |
|
---|
2562 | public:
|
---|
2563 |
|
---|
2564 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2565 | UIActionMenuManagerMediumToggleProperties(UIActionPool *pParent)
|
---|
2566 | : UIActionToggle(pParent)
|
---|
2567 | {
|
---|
2568 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2569 | /// @todo use icons with check-boxes
|
---|
2570 | setIcon(0, UIIconPool::iconSetFull(":/hd_modify_32px.png", ":/hd_modify_16px.png",
|
---|
2571 | ":/hd_modify_disabled_32px.png", ":/hd_modify_disabled_16px.png"));
|
---|
2572 | setIcon(1, UIIconPool::iconSetFull(":/cd_modify_32px.png", ":/cd_modify_16px.png",
|
---|
2573 | ":/cd_modify_disabled_32px.png", ":/cd_modify_disabled_16px.png"));
|
---|
2574 | setIcon(2, UIIconPool::iconSetFull(":/fd_modify_32px.png", ":/fd_modify_16px.png",
|
---|
2575 | ":/fd_modify_disabled_32px.png", ":/fd_modify_disabled_16px.png"));
|
---|
2576 | }
|
---|
2577 |
|
---|
2578 | protected:
|
---|
2579 |
|
---|
2580 | /** Returns shortcut extra-data ID. */
|
---|
2581 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2582 | {
|
---|
2583 | return QString("ToggleMediumProperties");
|
---|
2584 | }
|
---|
2585 |
|
---|
2586 | /** Returns default shortcut. */
|
---|
2587 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2588 | {
|
---|
2589 | return QKeySequence("Ctrl+Shift+P");
|
---|
2590 | }
|
---|
2591 |
|
---|
2592 | /** Handles translation event. */
|
---|
2593 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2594 | {
|
---|
2595 | setName(QApplication::translate("UIActionPool", "&Properties"));
|
---|
2596 | setShortcutScope(QApplication::translate("UIActionPool", "Media Manager"));
|
---|
2597 | setStatusTip(QApplication::translate("UIActionPool", "Open pane with selected disk image properties"));
|
---|
2598 | setToolTip( QApplication::translate("UIActionPool", "Open Disk Image Properties")
|
---|
2599 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2600 | }
|
---|
2601 | };
|
---|
2602 |
|
---|
2603 | /** Toggle action extension, used as 'Toggle Search Pane' action class. */
|
---|
2604 | class UIActionMenuManagerMediumToggleSearch : public UIActionToggle
|
---|
2605 | {
|
---|
2606 | Q_OBJECT;
|
---|
2607 |
|
---|
2608 | public:
|
---|
2609 |
|
---|
2610 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2611 | UIActionMenuManagerMediumToggleSearch(UIActionPool *pParent)
|
---|
2612 | : UIActionToggle(pParent)
|
---|
2613 | {
|
---|
2614 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2615 | /// @todo use icons with check-boxes
|
---|
2616 | setIcon(0, UIIconPool::iconSetFull(":/hd_search_32px.png", ":/hd_search_16px.png",
|
---|
2617 | ":/hd_search_disabled_32px.png", ":/hd_search_disabled_16px.png"));
|
---|
2618 | setIcon(1, UIIconPool::iconSetFull(":/cd_search_32px.png", ":/cd_search_16px.png",
|
---|
2619 | ":/cd_search_disabled_32px.png", ":/cd_search_disabled_16px.png"));
|
---|
2620 | setIcon(2, UIIconPool::iconSetFull(":/fd_search_32px.png", ":/fd_search_16px.png",
|
---|
2621 | ":/fd_search_disabled_32px.png", ":/fd_search_disabled_16px.png"));
|
---|
2622 | }
|
---|
2623 |
|
---|
2624 | protected:
|
---|
2625 |
|
---|
2626 | /** Returns shortcut extra-data ID. */
|
---|
2627 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2628 | {
|
---|
2629 | return QString("ToggleMediumSearch");
|
---|
2630 | }
|
---|
2631 |
|
---|
2632 | /** Returns standard shortcut. */
|
---|
2633 | virtual QKeySequence standardShortcut(UIType) const RT_OVERRIDE
|
---|
2634 | {
|
---|
2635 | return actionPool()->isTemporary() ? QKeySequence() : QKeySequence(QKeySequence::Find);
|
---|
2636 | }
|
---|
2637 |
|
---|
2638 | /** Handles translation event. */
|
---|
2639 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2640 | {
|
---|
2641 | setName(QApplication::translate("UIActionPool", "&Search"));
|
---|
2642 | setShortcutScope(QApplication::translate("UIActionPool", "Media Manager"));
|
---|
2643 | setStatusTip(QApplication::translate("UIActionPool", "Open the disk image search pane"));
|
---|
2644 | setToolTip( QApplication::translate("UIActionPool", "Open Disk Image Search Pane")
|
---|
2645 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2646 | }
|
---|
2647 | };
|
---|
2648 |
|
---|
2649 | /** Simple action extension, used as 'Perform Refresh' action class. */
|
---|
2650 | class UIActionMenuManagerMediumPerformRefresh : public UIActionSimple
|
---|
2651 | {
|
---|
2652 | Q_OBJECT;
|
---|
2653 |
|
---|
2654 | public:
|
---|
2655 |
|
---|
2656 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2657 | UIActionMenuManagerMediumPerformRefresh(UIActionPool *pParent)
|
---|
2658 | : UIActionSimple(pParent,
|
---|
2659 | ":/refresh_32px.png", ":/refresh_16px.png",
|
---|
2660 | ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png")
|
---|
2661 | {
|
---|
2662 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2663 | }
|
---|
2664 |
|
---|
2665 | protected:
|
---|
2666 |
|
---|
2667 | /** Returns shortcut extra-data ID. */
|
---|
2668 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2669 | {
|
---|
2670 | return QString("RefreshMedia");
|
---|
2671 | }
|
---|
2672 |
|
---|
2673 | /** Returns default shortcut. */
|
---|
2674 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2675 | {
|
---|
2676 | return QKeySequence("Ctrl+Shift+F");
|
---|
2677 | }
|
---|
2678 |
|
---|
2679 | /** Returns standard shortcut. */
|
---|
2680 | virtual QKeySequence standardShortcut(UIType) const RT_OVERRIDE
|
---|
2681 | {
|
---|
2682 | return actionPool()->isTemporary() ? QKeySequence() : QKeySequence(QKeySequence::Refresh);
|
---|
2683 | }
|
---|
2684 |
|
---|
2685 | /** Handles translation event. */
|
---|
2686 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2687 | {
|
---|
2688 | setName(QApplication::translate("UIActionPool", "Re&fresh..."));
|
---|
2689 | setShortcutScope(QApplication::translate("UIActionPool", "Media Manager"));
|
---|
2690 | setStatusTip(QApplication::translate("UIActionPool", "Refresh the list of disk images"));
|
---|
2691 | setToolTip( QApplication::translate("UIActionPool", "Refresh Disk Images")
|
---|
2692 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2693 | }
|
---|
2694 | };
|
---|
2695 |
|
---|
2696 | /** Simple action extension, used as 'Perform Clear' action class. */
|
---|
2697 | class UIActionMenuManagerMediumPerformClear : public UIActionSimple
|
---|
2698 | {
|
---|
2699 | Q_OBJECT;
|
---|
2700 |
|
---|
2701 | public:
|
---|
2702 |
|
---|
2703 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2704 | UIActionMenuManagerMediumPerformClear(UIActionPool *pParent)
|
---|
2705 | : UIActionSimple(pParent)
|
---|
2706 | {
|
---|
2707 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2708 | setIcon(1, UIIconPool::iconSetFull(":/cd_clear_32px.png", ":/cd_clear_16px.png",
|
---|
2709 | ":/cd_clear_disabled_32px.png", ":/cd_clear_disabled_16px.png"));
|
---|
2710 | setIcon(2, UIIconPool::iconSetFull(":/fd_clear_32px.png", ":/fd_clear_16px.png",
|
---|
2711 | ":/fd_clear_disabled_32px.png", ":/fd_clear_disabled_16px.png"));
|
---|
2712 | }
|
---|
2713 |
|
---|
2714 | protected:
|
---|
2715 |
|
---|
2716 | /** Returns shortcut extra-data ID. */
|
---|
2717 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2718 | {
|
---|
2719 | return QString("Clear");
|
---|
2720 | }
|
---|
2721 |
|
---|
2722 | /** Handles translation event. */
|
---|
2723 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2724 | {
|
---|
2725 | setName(QApplication::translate("UIActionPool", "&Clear"));
|
---|
2726 | setShortcutScope(QApplication::translate("UIActionPool", "Media Manager"));
|
---|
2727 | setStatusTip(QApplication::translate("UIActionPool", "Remove all inaccessible media"));
|
---|
2728 | setToolTip( QApplication::translate("UIActionPool", "Remove Inaccessible Media")
|
---|
2729 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2730 | }
|
---|
2731 | };
|
---|
2732 |
|
---|
2733 | /** Menu action extension, used as 'Network' menu class. */
|
---|
2734 | class UIActionMenuManagerNetwork : public UIActionMenu
|
---|
2735 | {
|
---|
2736 | Q_OBJECT;
|
---|
2737 |
|
---|
2738 | public:
|
---|
2739 |
|
---|
2740 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2741 | UIActionMenuManagerNetwork(UIActionPool *pParent)
|
---|
2742 | : UIActionMenu(pParent)
|
---|
2743 | {}
|
---|
2744 |
|
---|
2745 | protected:
|
---|
2746 |
|
---|
2747 | /** Handles translation event. */
|
---|
2748 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2749 | {
|
---|
2750 | setName(QApplication::translate("UIActionPool", "&Network"));
|
---|
2751 | }
|
---|
2752 | };
|
---|
2753 |
|
---|
2754 | /** Simple action extension, used as 'Perform Create' action class. */
|
---|
2755 | class UIActionMenuManagerNetworkPerformCreate : public UIActionSimple
|
---|
2756 | {
|
---|
2757 | Q_OBJECT;
|
---|
2758 |
|
---|
2759 | public:
|
---|
2760 |
|
---|
2761 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2762 | UIActionMenuManagerNetworkPerformCreate(UIActionPool *pParent)
|
---|
2763 | : UIActionSimple(pParent,
|
---|
2764 | ":/host_iface_add_32px.png", ":/host_iface_add_16px.png",
|
---|
2765 | ":/host_iface_add_disabled_32px.png", ":/host_iface_add_disabled_16px.png")
|
---|
2766 | {
|
---|
2767 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2768 | }
|
---|
2769 |
|
---|
2770 | protected:
|
---|
2771 |
|
---|
2772 | /** Returns shortcut extra-data ID. */
|
---|
2773 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2774 | {
|
---|
2775 | return QString("CreateNetwork");
|
---|
2776 | }
|
---|
2777 |
|
---|
2778 | /** Returns default shortcut. */
|
---|
2779 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2780 | {
|
---|
2781 | return QKeySequence("Ctrl+Shift+C");
|
---|
2782 | }
|
---|
2783 |
|
---|
2784 | /** Handles translation event. */
|
---|
2785 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2786 | {
|
---|
2787 | setName(QApplication::translate("UIActionPool", "&Create..."));
|
---|
2788 | setShortcutScope(QApplication::translate("UIActionPool", "Network Manager"));
|
---|
2789 | setStatusTip(QApplication::translate("UIActionPool", "Create new host-only network"));
|
---|
2790 | setToolTip( QApplication::translate("UIActionPool", "Create Host-only Network")
|
---|
2791 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2792 | }
|
---|
2793 | };
|
---|
2794 |
|
---|
2795 | /** Simple action extension, used as 'Perform Remove' action class. */
|
---|
2796 | class UIActionMenuManagerNetworkPerformRemove : public UIActionSimple
|
---|
2797 | {
|
---|
2798 | Q_OBJECT;
|
---|
2799 |
|
---|
2800 | public:
|
---|
2801 |
|
---|
2802 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2803 | UIActionMenuManagerNetworkPerformRemove(UIActionPool *pParent)
|
---|
2804 | : UIActionSimple(pParent,
|
---|
2805 | ":/host_iface_remove_32px.png", ":/host_iface_remove_16px.png",
|
---|
2806 | ":/host_iface_remove_disabled_32px.png", ":/host_iface_remove_disabled_16px.png")
|
---|
2807 | {
|
---|
2808 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2809 | }
|
---|
2810 |
|
---|
2811 | protected:
|
---|
2812 |
|
---|
2813 | /** Returns shortcut extra-data ID. */
|
---|
2814 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2815 | {
|
---|
2816 | return QString("RemoveNetwork");
|
---|
2817 | }
|
---|
2818 |
|
---|
2819 | /** Returns default shortcut. */
|
---|
2820 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2821 | {
|
---|
2822 | return QKeySequence("Ctrl+Shift+R");
|
---|
2823 | }
|
---|
2824 |
|
---|
2825 | /** Handles translation event. */
|
---|
2826 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2827 | {
|
---|
2828 | setName(QApplication::translate("UIActionPool", "&Remove..."));
|
---|
2829 | setShortcutScope(QApplication::translate("UIActionPool", "Network Manager"));
|
---|
2830 | setStatusTip(QApplication::translate("UIActionPool", "Remove selected host-only network"));
|
---|
2831 | setToolTip( QApplication::translate("UIActionPool", "Remove Host-only Network")
|
---|
2832 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2833 | }
|
---|
2834 | };
|
---|
2835 |
|
---|
2836 | /** Toggle action extension, used as 'Toggle Network Properties' action class. */
|
---|
2837 | class UIActionMenuManagerNetworkToggleProperties : public UIActionToggle
|
---|
2838 | {
|
---|
2839 | Q_OBJECT;
|
---|
2840 |
|
---|
2841 | public:
|
---|
2842 |
|
---|
2843 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2844 | UIActionMenuManagerNetworkToggleProperties(UIActionPool *pParent)
|
---|
2845 | : UIActionToggle(pParent)
|
---|
2846 | {
|
---|
2847 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2848 | /// @todo use icons with check-boxes
|
---|
2849 | setIcon(UIIconPool::iconSetFull(":/host_iface_edit_32px.png", ":/host_iface_edit_16px.png",
|
---|
2850 | ":/host_iface_edit_disabled_32px.png", ":/host_iface_edit_disabled_16px.png"));
|
---|
2851 | }
|
---|
2852 |
|
---|
2853 | protected:
|
---|
2854 |
|
---|
2855 | /** Returns shortcut extra-data ID. */
|
---|
2856 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2857 | {
|
---|
2858 | return QString("ToggleNetworkProperties");
|
---|
2859 | }
|
---|
2860 |
|
---|
2861 | /** Returns default shortcut. */
|
---|
2862 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2863 | {
|
---|
2864 | return QKeySequence("Ctrl+Shift+P");
|
---|
2865 | }
|
---|
2866 |
|
---|
2867 | /** Handles translation event. */
|
---|
2868 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2869 | {
|
---|
2870 | setName(QApplication::translate("UIActionPool", "&Properties"));
|
---|
2871 | setShortcutScope(QApplication::translate("UIActionPool", "Network Manager"));
|
---|
2872 | setStatusTip(QApplication::translate("UIActionPool", "Open pane with selected host-only network properties"));
|
---|
2873 | setToolTip( QApplication::translate("UIActionPool", "Open Host-only Network Properties")
|
---|
2874 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2875 | }
|
---|
2876 | };
|
---|
2877 |
|
---|
2878 | /** Simple action extension, used as 'Perform Refresh' action class. */
|
---|
2879 | class UIActionMenuManagerNetworkPerformRefresh : public UIActionSimple
|
---|
2880 | {
|
---|
2881 | Q_OBJECT;
|
---|
2882 |
|
---|
2883 | public:
|
---|
2884 |
|
---|
2885 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2886 | UIActionMenuManagerNetworkPerformRefresh(UIActionPool *pParent)
|
---|
2887 | : UIActionSimple(pParent,
|
---|
2888 | ":/refresh_32px.png", ":/refresh_16px.png",
|
---|
2889 | ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png")
|
---|
2890 | {
|
---|
2891 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2892 | }
|
---|
2893 |
|
---|
2894 | protected:
|
---|
2895 |
|
---|
2896 | /** Returns shortcut extra-data ID. */
|
---|
2897 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2898 | {
|
---|
2899 | return QString("RefreshNetworks");
|
---|
2900 | }
|
---|
2901 |
|
---|
2902 | /** Returns default shortcut. */
|
---|
2903 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2904 | {
|
---|
2905 | return QKeySequence("Ctrl+Shift+F");
|
---|
2906 | }
|
---|
2907 |
|
---|
2908 | /** Returns standard shortcut. */
|
---|
2909 | virtual QKeySequence standardShortcut(UIType) const RT_OVERRIDE
|
---|
2910 | {
|
---|
2911 | return actionPool()->isTemporary() ? QKeySequence() : QKeySequence(QKeySequence::Refresh);
|
---|
2912 | }
|
---|
2913 |
|
---|
2914 | /** Handles translation event. */
|
---|
2915 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2916 | {
|
---|
2917 | setName(QApplication::translate("UIActionPool", "Re&fresh..."));
|
---|
2918 | setShortcutScope(QApplication::translate("UIActionPool", "Network Manager"));
|
---|
2919 | setStatusTip(QApplication::translate("UIActionPool", "Refresh the list of host-only networks"));
|
---|
2920 | setToolTip( QApplication::translate("UIActionPool", "Refresh Host-only Networks")
|
---|
2921 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2922 | }
|
---|
2923 | };
|
---|
2924 |
|
---|
2925 |
|
---|
2926 | /** Menu action extension, used as 'Cloud' menu class. */
|
---|
2927 | class UIActionMenuManagerCloud : public UIActionMenu
|
---|
2928 | {
|
---|
2929 | Q_OBJECT;
|
---|
2930 |
|
---|
2931 | public:
|
---|
2932 |
|
---|
2933 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2934 | UIActionMenuManagerCloud(UIActionPool *pParent)
|
---|
2935 | : UIActionMenu(pParent)
|
---|
2936 | {}
|
---|
2937 |
|
---|
2938 | protected:
|
---|
2939 |
|
---|
2940 | /** Handles translation event. */
|
---|
2941 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2942 | {
|
---|
2943 | setName(QApplication::translate("UIActionPool", "&Cloud"));
|
---|
2944 | }
|
---|
2945 | };
|
---|
2946 |
|
---|
2947 | /** Simple action extension, used as 'Perform Add' action class. */
|
---|
2948 | class UIActionMenuManagerCloudPerformAdd : public UIActionSimple
|
---|
2949 | {
|
---|
2950 | Q_OBJECT;
|
---|
2951 |
|
---|
2952 | public:
|
---|
2953 |
|
---|
2954 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2955 | UIActionMenuManagerCloudPerformAdd(UIActionPool *pParent)
|
---|
2956 | : UIActionSimple(pParent,
|
---|
2957 | ":/cloud_profile_add_32px.png", ":/cloud_profile_add_16px.png",
|
---|
2958 | ":/cloud_profile_add_disabled_32px.png", ":/cloud_profile_add_disabled_16px.png")
|
---|
2959 | {
|
---|
2960 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
2961 | }
|
---|
2962 |
|
---|
2963 | protected:
|
---|
2964 |
|
---|
2965 | /** Returns shortcut extra-data ID. */
|
---|
2966 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
2967 | {
|
---|
2968 | return QString("AddCloudProfile");
|
---|
2969 | }
|
---|
2970 |
|
---|
2971 | /** Returns default shortcut. */
|
---|
2972 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
2973 | {
|
---|
2974 | return QKeySequence("Ctrl+Shift+A");
|
---|
2975 | }
|
---|
2976 |
|
---|
2977 | /** Handles translation event. */
|
---|
2978 | virtual void retranslateUi() RT_OVERRIDE
|
---|
2979 | {
|
---|
2980 | setIconText(QApplication::translate("UIActionPool", "Add"));
|
---|
2981 | setName(QApplication::translate("UIActionPool", "&Add Profile..."));
|
---|
2982 | setShortcutScope(QApplication::translate("UIActionPool", "Cloud Profile Manager"));
|
---|
2983 | setStatusTip(QApplication::translate("UIActionPool", "Add new cloud profile"));
|
---|
2984 | setToolTip( QApplication::translate("UIActionPool", "Add Cloud Profile")
|
---|
2985 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
2986 | }
|
---|
2987 | };
|
---|
2988 |
|
---|
2989 | /** Simple action extension, used as 'Perform Import' action class. */
|
---|
2990 | class UIActionMenuManagerCloudPerformImport : public UIActionSimple
|
---|
2991 | {
|
---|
2992 | Q_OBJECT;
|
---|
2993 |
|
---|
2994 | public:
|
---|
2995 |
|
---|
2996 | /** Constructs action passing @a pParent to the base-class. */
|
---|
2997 | UIActionMenuManagerCloudPerformImport(UIActionPool *pParent)
|
---|
2998 | : UIActionSimple(pParent,
|
---|
2999 | ":/cloud_profile_restore_32px.png", ":/cloud_profile_restore_16px.png",
|
---|
3000 | ":/cloud_profile_restore_disabled_32px.png", ":/cloud_profile_restore_disabled_16px.png")
|
---|
3001 | {
|
---|
3002 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
3003 | }
|
---|
3004 |
|
---|
3005 | protected:
|
---|
3006 |
|
---|
3007 | /** Returns shortcut extra-data ID. */
|
---|
3008 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
3009 | {
|
---|
3010 | return QString("ImportCloudProfiles");
|
---|
3011 | }
|
---|
3012 |
|
---|
3013 | /** Returns default shortcut. */
|
---|
3014 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
3015 | {
|
---|
3016 | return QKeySequence("Ctrl+Shift+I");
|
---|
3017 | }
|
---|
3018 |
|
---|
3019 | /** Handles translation event. */
|
---|
3020 | virtual void retranslateUi() RT_OVERRIDE
|
---|
3021 | {
|
---|
3022 | setIconText(QApplication::translate("UIActionPool", "Import"));
|
---|
3023 | setName(QApplication::translate("UIActionPool", "&Import Profiles..."));
|
---|
3024 | setShortcutScope(QApplication::translate("UIActionPool", "Cloud Profile Manager"));
|
---|
3025 | setStatusTip(QApplication::translate("UIActionPool", "Import the list of cloud profiles from external files"));
|
---|
3026 | setToolTip( QApplication::translate("UIActionPool", "Import Cloud Profiles")
|
---|
3027 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
3028 | }
|
---|
3029 | };
|
---|
3030 |
|
---|
3031 | /** Simple action extension, used as 'Perform Remove' action class. */
|
---|
3032 | class UIActionMenuManagerCloudPerformRemove : public UIActionSimple
|
---|
3033 | {
|
---|
3034 | Q_OBJECT;
|
---|
3035 |
|
---|
3036 | public:
|
---|
3037 |
|
---|
3038 | /** Constructs action passing @a pParent to the base-class. */
|
---|
3039 | UIActionMenuManagerCloudPerformRemove(UIActionPool *pParent)
|
---|
3040 | : UIActionSimple(pParent,
|
---|
3041 | ":/cloud_profile_remove_32px.png", ":/cloud_profile_remove_16px.png",
|
---|
3042 | ":/cloud_profile_remove_disabled_32px.png", ":/cloud_profile_remove_disabled_16px.png")
|
---|
3043 | {
|
---|
3044 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
3045 | }
|
---|
3046 |
|
---|
3047 | protected:
|
---|
3048 |
|
---|
3049 | /** Returns shortcut extra-data ID. */
|
---|
3050 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
3051 | {
|
---|
3052 | return QString("RemoveCloudProfile");
|
---|
3053 | }
|
---|
3054 |
|
---|
3055 | /** Returns default shortcut. */
|
---|
3056 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
3057 | {
|
---|
3058 | return QKeySequence("Ctrl+Shift+R");
|
---|
3059 | }
|
---|
3060 |
|
---|
3061 | /** Handles translation event. */
|
---|
3062 | virtual void retranslateUi() RT_OVERRIDE
|
---|
3063 | {
|
---|
3064 | setIconText(QApplication::translate("UIActionPool", "Remove"));
|
---|
3065 | setName(QApplication::translate("UIActionPool", "&Remove Profile..."));
|
---|
3066 | setShortcutScope(QApplication::translate("UIActionPool", "Cloud Profile Manager"));
|
---|
3067 | setStatusTip(QApplication::translate("UIActionPool", "Remove selected cloud profile"));
|
---|
3068 | setToolTip( QApplication::translate("UIActionPool", "Remove Cloud Profile")
|
---|
3069 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
3070 | }
|
---|
3071 | };
|
---|
3072 |
|
---|
3073 | /** Toggle action extension, used as 'Toggle Properties' action class. */
|
---|
3074 | class UIActionMenuManagerCloudToggleProperties : public UIActionToggle
|
---|
3075 | {
|
---|
3076 | Q_OBJECT;
|
---|
3077 |
|
---|
3078 | public:
|
---|
3079 |
|
---|
3080 | /** Constructs action passing @a pParent to the base-class. */
|
---|
3081 | UIActionMenuManagerCloudToggleProperties(UIActionPool *pParent)
|
---|
3082 | : UIActionToggle(pParent)
|
---|
3083 | {
|
---|
3084 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
3085 | /// @todo use icons with check-boxes
|
---|
3086 | setIcon(UIIconPool::iconSetFull(":/cloud_profile_edit_32px.png", ":/cloud_profile_edit_16px.png",
|
---|
3087 | ":/cloud_profile_edit_disabled_32px.png", ":/cloud_profile_edit_disabled_16px.png"));
|
---|
3088 | }
|
---|
3089 |
|
---|
3090 | protected:
|
---|
3091 |
|
---|
3092 | /** Returns shortcut extra-data ID. */
|
---|
3093 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
3094 | {
|
---|
3095 | return QString("ToggleCloudProfileProperties");
|
---|
3096 | }
|
---|
3097 |
|
---|
3098 | /** Returns default shortcut. */
|
---|
3099 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
3100 | {
|
---|
3101 | return QKeySequence("Ctrl+Shift+P");
|
---|
3102 | }
|
---|
3103 |
|
---|
3104 | /** Handles translation event. */
|
---|
3105 | virtual void retranslateUi() RT_OVERRIDE
|
---|
3106 | {
|
---|
3107 | setIconText(QApplication::translate("UIActionPool", "Properties"));
|
---|
3108 | setName(QApplication::translate("UIActionPool", "Profile &Properties"));
|
---|
3109 | setShortcutScope(QApplication::translate("UIActionPool", "Cloud Profile Manager"));
|
---|
3110 | setStatusTip(QApplication::translate("UIActionPool", "Open pane with selected cloud profile properties"));
|
---|
3111 | setToolTip( QApplication::translate("UIActionPool", "Open Cloud Profile Properties")
|
---|
3112 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
3113 | }
|
---|
3114 | };
|
---|
3115 |
|
---|
3116 | /** Simple action extension, used as 'Try Page' action class. */
|
---|
3117 | class UIActionMenuManagerCloudShowTryPage : public UIActionSimple
|
---|
3118 | {
|
---|
3119 | Q_OBJECT;
|
---|
3120 |
|
---|
3121 | public:
|
---|
3122 |
|
---|
3123 | /** Constructs action passing @a pParent to the base-class. */
|
---|
3124 | UIActionMenuManagerCloudShowTryPage(UIActionPool *pParent)
|
---|
3125 | : UIActionSimple(pParent,
|
---|
3126 | ":/cloud_profile_try_32px.png", ":/cloud_profile_try_16px.png",
|
---|
3127 | ":/cloud_profile_try_disabled_32px.png", ":/cloud_profile_try_disabled_16px.png")
|
---|
3128 | {
|
---|
3129 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
3130 | }
|
---|
3131 |
|
---|
3132 | protected:
|
---|
3133 |
|
---|
3134 | /** Returns shortcut extra-data ID. */
|
---|
3135 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
3136 | {
|
---|
3137 | return QString("ShowCloudProfileTryPage");
|
---|
3138 | }
|
---|
3139 |
|
---|
3140 | /** Returns default shortcut. */
|
---|
3141 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
3142 | {
|
---|
3143 | return QKeySequence("Ctrl+Shift+T");
|
---|
3144 | }
|
---|
3145 |
|
---|
3146 | /** Handles translation event. */
|
---|
3147 | virtual void retranslateUi() RT_OVERRIDE
|
---|
3148 | {
|
---|
3149 | setIconText(QApplication::translate("UIActionPool", "Try"));
|
---|
3150 | setName(QApplication::translate("UIActionPool", "&Try Oracle Cloud for Free..."));
|
---|
3151 | setShortcutScope(QApplication::translate("UIActionPool", "Cloud Profile Manager"));
|
---|
3152 | setStatusTip(QApplication::translate("UIActionPool", "Try Oracle cloud for free"));
|
---|
3153 | setToolTip( QApplication::translate("UIActionPool", "Try Oracle Cloud for Free")
|
---|
3154 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
3155 | }
|
---|
3156 | };
|
---|
3157 |
|
---|
3158 | /** Simple action extension, used as 'Show Help' action class. */
|
---|
3159 | class UIActionMenuManagerCloudShowHelp : public UIActionSimple
|
---|
3160 | {
|
---|
3161 | Q_OBJECT;
|
---|
3162 |
|
---|
3163 | public:
|
---|
3164 |
|
---|
3165 | /** Constructs action passing @a pParent to the base-class. */
|
---|
3166 | UIActionMenuManagerCloudShowHelp(UIActionPool *pParent)
|
---|
3167 | : UIActionSimple(pParent,
|
---|
3168 | ":/cloud_profile_help_32px.png", ":/cloud_profile_help_16px.png",
|
---|
3169 | ":/cloud_profile_help_disabled_32px.png", ":/cloud_profile_help_disabled_16px.png")
|
---|
3170 | {
|
---|
3171 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
3172 | }
|
---|
3173 |
|
---|
3174 | protected:
|
---|
3175 |
|
---|
3176 | /** Returns shortcut extra-data ID. */
|
---|
3177 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
3178 | {
|
---|
3179 | return QString("ShowCloudProfileHelp");
|
---|
3180 | }
|
---|
3181 |
|
---|
3182 | /** Returns default shortcut. */
|
---|
3183 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
3184 | {
|
---|
3185 | return QKeySequence("Ctrl+Shift+H");
|
---|
3186 | }
|
---|
3187 |
|
---|
3188 | /** Handles translation event. */
|
---|
3189 | virtual void retranslateUi() RT_OVERRIDE
|
---|
3190 | {
|
---|
3191 | setIconText(QApplication::translate("UIActionPool", "Help"));
|
---|
3192 | setName(QApplication::translate("UIActionPool", "&Show Help..."));
|
---|
3193 | setShortcutScope(QApplication::translate("UIActionPool", "Cloud Profile Manager"));
|
---|
3194 | setStatusTip(QApplication::translate("UIActionPool", "Show cloud profile help"));
|
---|
3195 | setToolTip( QApplication::translate("UIActionPool", "Show Cloud Profile Help")
|
---|
3196 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
3197 | }
|
---|
3198 | };
|
---|
3199 |
|
---|
3200 |
|
---|
3201 | /** Menu action extension, used as 'Cloud Console' menu class. */
|
---|
3202 | class UIActionMenuManagerCloudConsole : public UIActionMenu
|
---|
3203 | {
|
---|
3204 | Q_OBJECT;
|
---|
3205 |
|
---|
3206 | public:
|
---|
3207 |
|
---|
3208 | /** Constructs action passing @a pParent to the base-class. */
|
---|
3209 | UIActionMenuManagerCloudConsole(UIActionPool *pParent)
|
---|
3210 | : UIActionMenu(pParent)
|
---|
3211 | {}
|
---|
3212 |
|
---|
3213 | protected:
|
---|
3214 |
|
---|
3215 | /** Handles translation event. */
|
---|
3216 | virtual void retranslateUi() RT_OVERRIDE
|
---|
3217 | {
|
---|
3218 | setName(QApplication::translate("UIActionPool", "&Console"));
|
---|
3219 | }
|
---|
3220 | };
|
---|
3221 |
|
---|
3222 | /** Simple action extension, used as 'Perform Console Application Add' action class. */
|
---|
3223 | class UIActionMenuManagerCloudConsolePerformApplicationAdd : public UIActionSimple
|
---|
3224 | {
|
---|
3225 | Q_OBJECT;
|
---|
3226 |
|
---|
3227 | public:
|
---|
3228 |
|
---|
3229 | /** Constructs action passing @a pParent to the base-class. */
|
---|
3230 | UIActionMenuManagerCloudConsolePerformApplicationAdd(UIActionPool *pParent)
|
---|
3231 | : UIActionSimple(pParent,
|
---|
3232 | ":/cloud_console_application_add_32px.png", ":/cloud_console_application_add_16px.png",
|
---|
3233 | ":/cloud_console_application_add_disabled_32px.png", ":/cloud_console_application_add_disabled_16px.png")
|
---|
3234 | {
|
---|
3235 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
3236 | }
|
---|
3237 |
|
---|
3238 | protected:
|
---|
3239 |
|
---|
3240 | /** Returns shortcut extra-data ID. */
|
---|
3241 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
3242 | {
|
---|
3243 | return QString("AddCloudConsoleApplication");
|
---|
3244 | }
|
---|
3245 |
|
---|
3246 | /** Handles translation event. */
|
---|
3247 | virtual void retranslateUi() RT_OVERRIDE
|
---|
3248 | {
|
---|
3249 | setName(QApplication::translate("UIActionPool", "&Add Application..."));
|
---|
3250 | setShortcutScope(QApplication::translate("UIActionPool", "Cloud Console Manager"));
|
---|
3251 | setStatusTip(QApplication::translate("UIActionPool", "Add new cloud console application"));
|
---|
3252 | setToolTip( QApplication::translate("UIActionPool", "Add Cloud Console Application")
|
---|
3253 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
3254 | }
|
---|
3255 | };
|
---|
3256 |
|
---|
3257 | /** Simple action extension, used as 'Perform Console Application Remove' action class. */
|
---|
3258 | class UIActionMenuManagerCloudConsolePerformApplicationRemove : public UIActionSimple
|
---|
3259 | {
|
---|
3260 | Q_OBJECT;
|
---|
3261 |
|
---|
3262 | public:
|
---|
3263 |
|
---|
3264 | /** Constructs action passing @a pParent to the base-class. */
|
---|
3265 | UIActionMenuManagerCloudConsolePerformApplicationRemove(UIActionPool *pParent)
|
---|
3266 | : UIActionSimple(pParent,
|
---|
3267 | ":/cloud_console_application_remove_32px.png", ":/cloud_console_application_remove_16px.png",
|
---|
3268 | ":/cloud_console_application_remove_disabled_32px.png", ":/cloud_console_application_remove_disabled_16px.png")
|
---|
3269 | {
|
---|
3270 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
3271 | }
|
---|
3272 |
|
---|
3273 | protected:
|
---|
3274 |
|
---|
3275 | /** Returns shortcut extra-data ID. */
|
---|
3276 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
3277 | {
|
---|
3278 | return QString("RemoveCloudConsoleApplication");
|
---|
3279 | }
|
---|
3280 |
|
---|
3281 | /** Handles translation event. */
|
---|
3282 | virtual void retranslateUi() RT_OVERRIDE
|
---|
3283 | {
|
---|
3284 | setName(QApplication::translate("UIActionPool", "&Remove Application..."));
|
---|
3285 | setShortcutScope(QApplication::translate("UIActionPool", "Cloud Console Manager"));
|
---|
3286 | setStatusTip(QApplication::translate("UIActionPool", "Remove selected cloud console application"));
|
---|
3287 | setToolTip( QApplication::translate("UIActionPool", "Remove Cloud Console Application")
|
---|
3288 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
3289 | }
|
---|
3290 | };
|
---|
3291 |
|
---|
3292 | /** Simple action extension, used as 'Perform Console Profile Add' action class. */
|
---|
3293 | class UIActionMenuManagerCloudConsolePerformProfileAdd : public UIActionSimple
|
---|
3294 | {
|
---|
3295 | Q_OBJECT;
|
---|
3296 |
|
---|
3297 | public:
|
---|
3298 |
|
---|
3299 | /** Constructs action passing @a pParent to the base-class. */
|
---|
3300 | UIActionMenuManagerCloudConsolePerformProfileAdd(UIActionPool *pParent)
|
---|
3301 | : UIActionSimple(pParent,
|
---|
3302 | ":/cloud_console_profile_add_32px.png", ":/cloud_console_profile_add_16px.png",
|
---|
3303 | ":/cloud_console_profile_add_disabled_32px.png", ":/cloud_console_profile_add_disabled_16px.png")
|
---|
3304 | {
|
---|
3305 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
3306 | }
|
---|
3307 |
|
---|
3308 | protected:
|
---|
3309 |
|
---|
3310 | /** Returns shortcut extra-data ID. */
|
---|
3311 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
3312 | {
|
---|
3313 | return QString("AddCloudConsoleProfile");
|
---|
3314 | }
|
---|
3315 |
|
---|
3316 | /** Handles translation event. */
|
---|
3317 | virtual void retranslateUi() RT_OVERRIDE
|
---|
3318 | {
|
---|
3319 | setName(QApplication::translate("UIActionPool", "&Add Profile..."));
|
---|
3320 | setShortcutScope(QApplication::translate("UIActionPool", "Cloud Console Manager"));
|
---|
3321 | setStatusTip(QApplication::translate("UIActionPool", "Add new cloud console profile"));
|
---|
3322 | setToolTip( QApplication::translate("UIActionPool", "Add Cloud Console Profile")
|
---|
3323 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
3324 | }
|
---|
3325 | };
|
---|
3326 |
|
---|
3327 | /** Simple action extension, used as 'Perform Console Profile Remove' action class. */
|
---|
3328 | class UIActionMenuManagerCloudConsolePerformProfileRemove : public UIActionSimple
|
---|
3329 | {
|
---|
3330 | Q_OBJECT;
|
---|
3331 |
|
---|
3332 | public:
|
---|
3333 |
|
---|
3334 | /** Constructs action passing @a pParent to the base-class. */
|
---|
3335 | UIActionMenuManagerCloudConsolePerformProfileRemove(UIActionPool *pParent)
|
---|
3336 | : UIActionSimple(pParent,
|
---|
3337 | ":/cloud_console_profile_remove_32px.png", ":/cloud_console_profile_remove_16px.png",
|
---|
3338 | ":/cloud_console_profile_remove_disabled_32px.png", ":/cloud_console_profile_remove_disabled_16px.png")
|
---|
3339 | {
|
---|
3340 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
3341 | }
|
---|
3342 |
|
---|
3343 | protected:
|
---|
3344 |
|
---|
3345 | /** Returns shortcut extra-data ID. */
|
---|
3346 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
3347 | {
|
---|
3348 | return QString("RemoveCloudConsoleProfile");
|
---|
3349 | }
|
---|
3350 |
|
---|
3351 | /** Handles translation event. */
|
---|
3352 | virtual void retranslateUi() RT_OVERRIDE
|
---|
3353 | {
|
---|
3354 | setName(QApplication::translate("UIActionPool", "&Remove Profile..."));
|
---|
3355 | setShortcutScope(QApplication::translate("UIActionPool", "Cloud Console Manager"));
|
---|
3356 | setStatusTip(QApplication::translate("UIActionPool", "Remove selected cloud console profile"));
|
---|
3357 | setToolTip( QApplication::translate("UIActionPool", "Remove Cloud Console Profile")
|
---|
3358 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
3359 | }
|
---|
3360 | };
|
---|
3361 |
|
---|
3362 | /** Toggle action extension, used as 'Toggle Cloud Console Properties' action class. */
|
---|
3363 | class UIActionMenuManagerCloudConsoleToggleProperties : public UIActionToggle
|
---|
3364 | {
|
---|
3365 | Q_OBJECT;
|
---|
3366 |
|
---|
3367 | public:
|
---|
3368 |
|
---|
3369 | /** Constructs action passing @a pParent to the base-class. */
|
---|
3370 | UIActionMenuManagerCloudConsoleToggleProperties(UIActionPool *pParent)
|
---|
3371 | : UIActionToggle(pParent)
|
---|
3372 | {
|
---|
3373 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
3374 | /// @todo use icons with check-boxes
|
---|
3375 | setIcon(UIIconPool::iconSetFull(":/cloud_console_edit_32px.png", ":/cloud_console_edit_16px.png",
|
---|
3376 | ":/cloud_console_edit_disabled_32px.png", ":/cloud_console_edit_disabled_16px.png"));
|
---|
3377 | }
|
---|
3378 |
|
---|
3379 | protected:
|
---|
3380 |
|
---|
3381 | /** Returns shortcut extra-data ID. */
|
---|
3382 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
3383 | {
|
---|
3384 | return QString("ToggleCloudConsoleProperties");
|
---|
3385 | }
|
---|
3386 |
|
---|
3387 | /** Returns default shortcut. */
|
---|
3388 | virtual QKeySequence defaultShortcut(UIType) const RT_OVERRIDE
|
---|
3389 | {
|
---|
3390 | return QKeySequence("Ctrl+Shift+P");
|
---|
3391 | }
|
---|
3392 |
|
---|
3393 | /** Handles translation event. */
|
---|
3394 | virtual void retranslateUi() RT_OVERRIDE
|
---|
3395 | {
|
---|
3396 | setIconText(QApplication::translate("UIActionPool", "Properties"));
|
---|
3397 | setName(QApplication::translate("UIActionPool", "Console &Properties"));
|
---|
3398 | setShortcutScope(QApplication::translate("UIActionPool", "Cloud Console Manager"));
|
---|
3399 | setStatusTip(QApplication::translate("UIActionPool", "Open pane with selected cloud console properties"));
|
---|
3400 | setToolTip( QApplication::translate("UIActionPool", "Open Cloud Console Properties")
|
---|
3401 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
3402 | }
|
---|
3403 | };
|
---|
3404 |
|
---|
3405 |
|
---|
3406 | /** Menu action extension, used as 'Resources' menu class. */
|
---|
3407 | class UIActionMenuVMActivityOverview : public UIActionMenu
|
---|
3408 | {
|
---|
3409 | Q_OBJECT;
|
---|
3410 |
|
---|
3411 | public:
|
---|
3412 |
|
---|
3413 | /** Constructs action passing @a pParent to the base-class. */
|
---|
3414 | UIActionMenuVMActivityOverview(UIActionPool *pParent)
|
---|
3415 | : UIActionMenu(pParent)
|
---|
3416 | {}
|
---|
3417 |
|
---|
3418 | protected:
|
---|
3419 |
|
---|
3420 | /** Handles translation event. */
|
---|
3421 | virtual void retranslateUi() RT_OVERRIDE
|
---|
3422 | {
|
---|
3423 | setName(QApplication::translate("UIActionPool", "&Resources"));
|
---|
3424 | }
|
---|
3425 | };
|
---|
3426 |
|
---|
3427 | /** Menu action extension, used as 'Columns' menu class. */
|
---|
3428 | class UIActionMenuManagerVMActivityOverviewColumns : public UIActionMenu
|
---|
3429 | {
|
---|
3430 | Q_OBJECT;
|
---|
3431 |
|
---|
3432 | public:
|
---|
3433 |
|
---|
3434 | /** Constructs action passing @a pParent to the base-class. */
|
---|
3435 | UIActionMenuManagerVMActivityOverviewColumns(UIActionPool *pParent)
|
---|
3436 | : UIActionMenu(pParent,
|
---|
3437 | ":/resources_monitor_columns_32px.png", ":/resources_monitor_columns_16px.png",
|
---|
3438 | ":/resources_monitor_columns_disabled_32px.png", ":/resources_monitor_columns_disabled_16px.png")
|
---|
3439 | {
|
---|
3440 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
3441 | }
|
---|
3442 |
|
---|
3443 | protected:
|
---|
3444 |
|
---|
3445 | /** Handles translation event. */
|
---|
3446 | virtual void retranslateUi() RT_OVERRIDE
|
---|
3447 | {
|
---|
3448 | setName(QApplication::translate("UIActionPool", "Columns"));
|
---|
3449 | setShortcutScope(QApplication::translate("UIActionPool", "VM Activity Overview"));
|
---|
3450 | setStatusTip(QApplication::translate("UIActionPool", "Show/Hide Columns"));
|
---|
3451 | setToolTip( QApplication::translate("UIActionPool", "Show/Hide Columns")
|
---|
3452 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
3453 | }
|
---|
3454 | };
|
---|
3455 |
|
---|
3456 | /** Simple action extension, used as 'Switch to Machine Activity' action class. */
|
---|
3457 | class UIActionMenuManagerVMActivityOverviewSwitchToMachineActivity : public UIActionSimple
|
---|
3458 | {
|
---|
3459 | Q_OBJECT;
|
---|
3460 |
|
---|
3461 | public:
|
---|
3462 |
|
---|
3463 | /** Constructs action passing @a pParent to the base-class. */
|
---|
3464 | UIActionMenuManagerVMActivityOverviewSwitchToMachineActivity(UIActionPool *pParent)
|
---|
3465 | : UIActionSimple(pParent,
|
---|
3466 | ":/resources_monitor_jump_to_vm_32px.png", ":/resources_monitor_jump_to_vm_16px.png",
|
---|
3467 | ":/resources_monitor_jump_to_vm_disabled_32px.png", ":/resources_monitor_jump_to_vm_disabled_16px.png")
|
---|
3468 | {
|
---|
3469 | setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
---|
3470 | }
|
---|
3471 |
|
---|
3472 | protected:
|
---|
3473 |
|
---|
3474 | /** Returns shortcut extra-data ID. */
|
---|
3475 | virtual QString shortcutExtraDataID() const RT_OVERRIDE
|
---|
3476 | {
|
---|
3477 | return QString("VMActivityOverviewSwitchToMachineActivity");
|
---|
3478 | }
|
---|
3479 |
|
---|
3480 | /** Handles translation event. */
|
---|
3481 | virtual void retranslateUi() RT_OVERRIDE
|
---|
3482 | {
|
---|
3483 | setName(QApplication::translate("UIActionPool", "VM Activity"));
|
---|
3484 | setShortcutScope(QApplication::translate("UIActionPool", "VM Activity Overview"));
|
---|
3485 | setStatusTip(QApplication::translate("UIActionPool", "Switch to selected virtual machine's activity monitor pane"));
|
---|
3486 | setToolTip( QApplication::translate("UIActionPool", "Switch to selected virtual machine's activity monitor pane")
|
---|
3487 | + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
|
---|
3488 | }
|
---|
3489 | };
|
---|
3490 |
|
---|
3491 |
|
---|
3492 | /*********************************************************************************************************************************
|
---|
3493 | * Class UIActionPoolManager implementation. *
|
---|
3494 | *********************************************************************************************************************************/
|
---|
3495 |
|
---|
3496 | UIActionPoolManager::UIActionPoolManager(bool fTemporary /* = false */)
|
---|
3497 | : UIActionPool(UIType_ManagerUI, fTemporary)
|
---|
3498 | {
|
---|
3499 | }
|
---|
3500 |
|
---|
3501 | void UIActionPoolManager::preparePool()
|
---|
3502 | {
|
---|
3503 | /* 'File' actions: */
|
---|
3504 | m_pool[UIActionIndexMN_M_File] = new UIActionMenuManagerFile(this);
|
---|
3505 | m_pool[UIActionIndexMN_M_File_S_ImportAppliance] = new UIActionSimpleManagerFileShowImportApplianceWizard(this);
|
---|
3506 | m_pool[UIActionIndexMN_M_File_S_ExportAppliance] = new UIActionSimpleManagerFileShowExportApplianceWizard(this);
|
---|
3507 | m_pool[UIActionIndexMN_M_File_M_Tools] = new UIActionMenuManagerToolsGlobal(this);
|
---|
3508 | m_pool[UIActionIndexMN_M_File_M_Tools_T_WelcomeScreen] = new UIActionToggleManagerToolsGlobalShowWelcomeScreen(this);
|
---|
3509 | m_pool[UIActionIndexMN_M_File_M_Tools_T_ExtensionPackManager] = new UIActionToggleManagerToolsGlobalShowExtensionPackManager(this);
|
---|
3510 | m_pool[UIActionIndexMN_M_File_M_Tools_T_VirtualMediaManager] = new UIActionToggleManagerToolsGlobalShowVirtualMediaManager(this);
|
---|
3511 | m_pool[UIActionIndexMN_M_File_M_Tools_T_NetworkManager] = new UIActionToggleManagerToolsGlobalShowNetworkManager(this);
|
---|
3512 | m_pool[UIActionIndexMN_M_File_M_Tools_T_CloudProfileManager] = new UIActionToggleManagerToolsGlobalShowCloudProfileManager(this);
|
---|
3513 | m_pool[UIActionIndexMN_M_File_M_Tools_T_VMActivityOverview] = new UIActionToggleManagerToolsGlobalShowVMActivityOverview(this);
|
---|
3514 | #ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
|
---|
3515 | m_pool[UIActionIndexMN_M_File_S_ShowExtraDataManager] = new UIActionSimpleManagerFileShowExtraDataManager(this);
|
---|
3516 | #endif
|
---|
3517 | m_pool[UIActionIndexMN_M_File_S_Close] = new UIActionSimpleManagerFilePerformExit(this);
|
---|
3518 |
|
---|
3519 | /* 'Welcome' actions: */
|
---|
3520 | m_pool[UIActionIndexMN_M_Welcome] = new UIActionMenuManagerMachine(this);
|
---|
3521 | m_pool[UIActionIndexMN_M_Welcome_S_New] = new UIActionSimpleManagerMachinePerformCreate(this);
|
---|
3522 | m_pool[UIActionIndexMN_M_Welcome_S_Add] = new UIActionSimpleManagerMachinePerformAdd(this);
|
---|
3523 |
|
---|
3524 | /* 'Group' actions: */
|
---|
3525 | m_pool[UIActionIndexMN_M_Group] = new UIActionMenuManagerGroup(this);
|
---|
3526 | m_pool[UIActionIndexMN_M_Group_S_New] = new UIActionSimpleManagerGroupPerformCreateMachine(this);
|
---|
3527 | m_pool[UIActionIndexMN_M_Group_S_Add] = new UIActionSimpleManagerGroupPerformAddMachine(this);
|
---|
3528 | m_pool[UIActionIndexMN_M_Group_S_Rename] = new UIActionSimpleManagerGroupPerformRename(this);
|
---|
3529 | m_pool[UIActionIndexMN_M_Group_S_Remove] = new UIActionSimpleManagerGroupPerformRemove(this);
|
---|
3530 | m_pool[UIActionIndexMN_M_Group_M_MoveToGroup] = new UIActionMenuManagerCommonMoveToGroup(this);
|
---|
3531 | m_pool[UIActionIndexMN_M_Group_M_StartOrShow] = new UIActionStateManagerCommonStartOrShow(this);
|
---|
3532 | m_pool[UIActionIndexMN_M_Group_M_StartOrShow_S_StartNormal] = new UIActionSimpleManagerCommonPerformStartNormal(this);
|
---|
3533 | m_pool[UIActionIndexMN_M_Group_M_StartOrShow_S_StartHeadless] = new UIActionSimpleManagerCommonPerformStartHeadless(this);
|
---|
3534 | m_pool[UIActionIndexMN_M_Group_M_StartOrShow_S_StartDetachable] = new UIActionSimpleManagerCommonPerformStartDetachable(this);
|
---|
3535 | m_pool[UIActionIndexMN_M_Group_T_Pause] = new UIActionToggleManagerCommonPauseAndResume(this);
|
---|
3536 | m_pool[UIActionIndexMN_M_Group_S_Reset] = new UIActionSimpleManagerCommonPerformReset(this);
|
---|
3537 | m_pool[UIActionIndexMN_M_Group_S_Detach] = new UIActionSimpleManagerCommonPerformDetach(this);
|
---|
3538 | m_pool[UIActionIndexMN_M_Group_M_Console] = new UIActionMenuManagerConsole(this);
|
---|
3539 | m_pool[UIActionIndexMN_M_Group_M_Console_S_CreateConnection] = new UIActionSimpleManagerConsolePerformCreateConnection(this);
|
---|
3540 | m_pool[UIActionIndexMN_M_Group_M_Console_S_DeleteConnection] = new UIActionSimpleManagerConsolePerformDeleteConnection(this);
|
---|
3541 | m_pool[UIActionIndexMN_M_Group_M_Console_S_ConfigureApplications] = new UIActionSimpleManagerConsolePerformConfigureApplications(this);
|
---|
3542 | m_pool[UIActionIndexMN_M_Group_M_Stop] = new UIActionMenuManagerStop(this);
|
---|
3543 | m_pool[UIActionIndexMN_M_Group_M_Stop_S_SaveState] = new UIActionSimpleManagerStopPerformSave(this);
|
---|
3544 | m_pool[UIActionIndexMN_M_Group_M_Stop_S_Terminate] = new UIActionSimpleManagerStopPerformTerminate(this);
|
---|
3545 | m_pool[UIActionIndexMN_M_Group_M_Stop_S_Shutdown] = new UIActionSimpleManagerStopPerformShutdown(this);
|
---|
3546 | m_pool[UIActionIndexMN_M_Group_M_Stop_S_PowerOff] = new UIActionSimpleManagerStopPerformPowerOff(this);
|
---|
3547 | m_pool[UIActionIndexMN_M_Group_M_Tools] = new UIActionMenuManagerToolsMachine(this);
|
---|
3548 | m_pool[UIActionIndexMN_M_Group_M_Tools_T_Details] = new UIActionToggleManagerToolsMachineShowDetails(this);
|
---|
3549 | m_pool[UIActionIndexMN_M_Group_M_Tools_T_Snapshots] = new UIActionToggleManagerToolsMachineShowSnapshots(this);
|
---|
3550 | m_pool[UIActionIndexMN_M_Group_M_Tools_T_Logs] = new UIActionToggleManagerToolsMachineShowLogs(this);
|
---|
3551 | m_pool[UIActionIndexMN_M_Group_M_Tools_T_Activity] = new UIActionToggleManagerToolsMachineShowActivity(this);
|
---|
3552 | m_pool[UIActionIndexMN_M_Group_M_Tools_T_FileManager] = new UIActionToggleManagerToolsMachineShowFileManager(this);
|
---|
3553 | m_pool[UIActionIndexMN_M_Group_S_Discard] = new UIActionSimpleManagerCommonPerformDiscard(this);
|
---|
3554 | m_pool[UIActionIndexMN_M_Group_S_Refresh] = new UIActionSimpleManagerCommonPerformRefresh(this);
|
---|
3555 | m_pool[UIActionIndexMN_M_Group_S_ShowInFileManager] = new UIActionSimpleManagerCommonShowInFileManager(this);
|
---|
3556 | m_pool[UIActionIndexMN_M_Group_S_CreateShortcut] = new UIActionSimpleManagerCommonPerformCreateShortcut(this);
|
---|
3557 | m_pool[UIActionIndexMN_M_Group_S_Sort] = new UIActionSimpleManagerGroupPerformSort(this);
|
---|
3558 | m_pool[UIActionIndexMN_M_Group_T_Search] = new UIActionToggleManagerCommonToggleSearch(this);
|
---|
3559 |
|
---|
3560 | /* 'Machine' actions: */
|
---|
3561 | m_pool[UIActionIndexMN_M_Machine] = new UIActionMenuManagerMachine(this);
|
---|
3562 | m_pool[UIActionIndexMN_M_Machine_S_New] = new UIActionSimpleManagerMachinePerformCreate(this);
|
---|
3563 | m_pool[UIActionIndexMN_M_Machine_S_Add] = new UIActionSimpleManagerMachinePerformAdd(this);
|
---|
3564 | m_pool[UIActionIndexMN_M_Machine_S_Settings] = new UIActionSimpleManagerMachineShowSettings(this);
|
---|
3565 | m_pool[UIActionIndexMN_M_Machine_S_Clone] = new UIActionSimpleManagerMachinePerformClone(this);
|
---|
3566 | m_pool[UIActionIndexMN_M_Machine_S_Move] = new UIActionSimpleManagerMachinePerformMove(this);
|
---|
3567 | m_pool[UIActionIndexMN_M_Machine_S_ExportToOCI] = new UIActionSimpleManagerMachinePerformExportToOCI(this);
|
---|
3568 | m_pool[UIActionIndexMN_M_Machine_S_Remove] = new UIActionSimpleManagerMachinePerformRemove(this);
|
---|
3569 | m_pool[UIActionIndexMN_M_Machine_M_MoveToGroup] = new UIActionMenuManagerCommonMoveToGroup(this);
|
---|
3570 | m_pool[UIActionIndexMN_M_Machine_M_MoveToGroup_S_New] = new UIActionSimpleManagerMachineMoveToGroupNew(this);
|
---|
3571 | m_pool[UIActionIndexMN_M_Machine_M_StartOrShow] = new UIActionStateManagerCommonStartOrShow(this);
|
---|
3572 | m_pool[UIActionIndexMN_M_Machine_M_StartOrShow_S_StartNormal] = new UIActionSimpleManagerCommonPerformStartNormal(this);
|
---|
3573 | m_pool[UIActionIndexMN_M_Machine_M_StartOrShow_S_StartHeadless] = new UIActionSimpleManagerCommonPerformStartHeadless(this);
|
---|
3574 | m_pool[UIActionIndexMN_M_Machine_M_StartOrShow_S_StartDetachable] = new UIActionSimpleManagerCommonPerformStartDetachable(this);
|
---|
3575 | m_pool[UIActionIndexMN_M_Machine_T_Pause] = new UIActionToggleManagerCommonPauseAndResume(this);
|
---|
3576 | m_pool[UIActionIndexMN_M_Machine_S_Reset] = new UIActionSimpleManagerCommonPerformReset(this);
|
---|
3577 | m_pool[UIActionIndexMN_M_Machine_S_Detach] = new UIActionSimpleManagerCommonPerformDetach(this);
|
---|
3578 | m_pool[UIActionIndexMN_M_Machine_M_Console] = new UIActionMenuManagerConsole(this);
|
---|
3579 | m_pool[UIActionIndexMN_M_Machine_M_Console_S_CreateConnection] = new UIActionSimpleManagerConsolePerformCreateConnection(this);
|
---|
3580 | m_pool[UIActionIndexMN_M_Machine_M_Console_S_DeleteConnection] = new UIActionSimpleManagerConsolePerformDeleteConnection(this);
|
---|
3581 | m_pool[UIActionIndexMN_M_Machine_M_Console_S_CopyCommandSerialUnix] = new UIActionSimpleManagerConsolePerformCopyCommand(this, true, true);
|
---|
3582 | m_pool[UIActionIndexMN_M_Machine_M_Console_S_CopyCommandSerialWindows] = new UIActionSimpleManagerConsolePerformCopyCommand(this, true, false);
|
---|
3583 | m_pool[UIActionIndexMN_M_Machine_M_Console_S_CopyCommandVNCUnix] = new UIActionSimpleManagerConsolePerformCopyCommand(this, false, true);
|
---|
3584 | m_pool[UIActionIndexMN_M_Machine_M_Console_S_CopyCommandVNCWindows] = new UIActionSimpleManagerConsolePerformCopyCommand(this, false, false);
|
---|
3585 | m_pool[UIActionIndexMN_M_Machine_M_Console_S_ConfigureApplications] = new UIActionSimpleManagerConsolePerformConfigureApplications(this);
|
---|
3586 | m_pool[UIActionIndexMN_M_Machine_M_Console_S_ShowLog] = new UIActionSimpleManagerConsolePerformShowLog(this);
|
---|
3587 | m_pool[UIActionIndexMN_M_Machine_M_Stop] = new UIActionMenuManagerStop(this);
|
---|
3588 | m_pool[UIActionIndexMN_M_Machine_M_Stop_S_SaveState] = new UIActionSimpleManagerStopPerformSave(this);
|
---|
3589 | m_pool[UIActionIndexMN_M_Machine_M_Stop_S_Terminate] = new UIActionSimpleManagerStopPerformTerminate(this);
|
---|
3590 | m_pool[UIActionIndexMN_M_Machine_M_Stop_S_Shutdown] = new UIActionSimpleManagerStopPerformShutdown(this);
|
---|
3591 | m_pool[UIActionIndexMN_M_Machine_M_Stop_S_PowerOff] = new UIActionSimpleManagerStopPerformPowerOff(this);
|
---|
3592 | m_pool[UIActionIndexMN_M_Machine_M_Tools] = new UIActionMenuManagerToolsMachine(this);
|
---|
3593 | m_pool[UIActionIndexMN_M_Machine_M_Tools_T_Details] = new UIActionToggleManagerToolsMachineShowDetails(this);
|
---|
3594 | m_pool[UIActionIndexMN_M_Machine_M_Tools_T_Snapshots] = new UIActionToggleManagerToolsMachineShowSnapshots(this);
|
---|
3595 | m_pool[UIActionIndexMN_M_Machine_M_Tools_T_Logs] = new UIActionToggleManagerToolsMachineShowLogs(this);
|
---|
3596 | m_pool[UIActionIndexMN_M_Machine_M_Tools_T_Activity] = new UIActionToggleManagerToolsMachineShowActivity(this);
|
---|
3597 | m_pool[UIActionIndexMN_M_Machine_M_Tools_T_FileManager] = new UIActionToggleManagerToolsMachineShowFileManager(this);
|
---|
3598 | m_pool[UIActionIndexMN_M_Machine_S_Discard] = new UIActionSimpleManagerCommonPerformDiscard(this);
|
---|
3599 | m_pool[UIActionIndexMN_M_Machine_S_Refresh] = new UIActionSimpleManagerCommonPerformRefresh(this);
|
---|
3600 | m_pool[UIActionIndexMN_M_Machine_S_ShowInFileManager] = new UIActionSimpleManagerCommonShowInFileManager(this);
|
---|
3601 | m_pool[UIActionIndexMN_M_Machine_S_CreateShortcut] = new UIActionSimpleManagerCommonPerformCreateShortcut(this);
|
---|
3602 | m_pool[UIActionIndexMN_M_Machine_S_SortParent] = new UIActionSimpleManagerMachinePerformSortParent(this);
|
---|
3603 | m_pool[UIActionIndexMN_M_Machine_T_Search] = new UIActionToggleManagerCommonToggleSearch(this);
|
---|
3604 |
|
---|
3605 | /* Snapshot Pane actions: */
|
---|
3606 | m_pool[UIActionIndexMN_M_Snapshot] = new UIActionMenuManagerSnapshot(this);
|
---|
3607 | m_pool[UIActionIndexMN_M_Snapshot_S_Take] = new UIActionMenuManagerSnapshotPerformTake(this);
|
---|
3608 | m_pool[UIActionIndexMN_M_Snapshot_S_Delete] = new UIActionMenuManagerSnapshotPerformDelete(this);
|
---|
3609 | m_pool[UIActionIndexMN_M_Snapshot_S_Restore] = new UIActionMenuManagerSnapshotPerformRestore(this);
|
---|
3610 | m_pool[UIActionIndexMN_M_Snapshot_T_Properties] = new UIActionMenuManagerSnapshotToggleProperties(this);
|
---|
3611 | m_pool[UIActionIndexMN_M_Snapshot_S_Clone] = new UIActionMenuManagerSnapshotPerformClone(this);
|
---|
3612 |
|
---|
3613 | /* Extension Pack Manager actions: */
|
---|
3614 | m_pool[UIActionIndexMN_M_ExtensionWindow] = new UIActionMenuManagerExtension(this);
|
---|
3615 | m_pool[UIActionIndexMN_M_Extension] = new UIActionMenuManagerExtension(this);
|
---|
3616 | m_pool[UIActionIndexMN_M_Extension_S_Install] = new UIActionSimpleManagerExtensionPerformInstall(this);
|
---|
3617 | m_pool[UIActionIndexMN_M_Extension_S_Uninstall] = new UIActionSimpleManagerExtensionPerformUninstall(this);
|
---|
3618 |
|
---|
3619 | /* Virtual Medium Manager actions: */
|
---|
3620 | m_pool[UIActionIndexMN_M_MediumWindow] = new UIActionMenuManagerMedium(this);
|
---|
3621 | m_pool[UIActionIndexMN_M_Medium] = new UIActionMenuManagerMedium(this);
|
---|
3622 | m_pool[UIActionIndexMN_M_Medium_S_Add] = new UIActionMenuManagerMediumPerformAdd(this);
|
---|
3623 | m_pool[UIActionIndexMN_M_Medium_S_Create] = new UIActionMenuManagerMediumPerformCreate(this);
|
---|
3624 | m_pool[UIActionIndexMN_M_Medium_S_Copy] = new UIActionMenuManagerMediumPerformCopy(this);
|
---|
3625 | m_pool[UIActionIndexMN_M_Medium_S_Move] = new UIActionMenuManagerMediumPerformMove(this);
|
---|
3626 | m_pool[UIActionIndexMN_M_Medium_S_Remove] = new UIActionMenuManagerMediumPerformRemove(this);
|
---|
3627 | m_pool[UIActionIndexMN_M_Medium_S_Release] = new UIActionMenuManagerMediumPerformRelease(this);
|
---|
3628 | m_pool[UIActionIndexMN_M_Medium_T_Details] = new UIActionMenuManagerMediumToggleProperties(this);
|
---|
3629 | m_pool[UIActionIndexMN_M_Medium_T_Search] = new UIActionMenuManagerMediumToggleSearch(this);
|
---|
3630 | m_pool[UIActionIndexMN_M_Medium_S_Refresh] = new UIActionMenuManagerMediumPerformRefresh(this);
|
---|
3631 | m_pool[UIActionIndexMN_M_Medium_S_Clear] = new UIActionMenuManagerMediumPerformClear(this);
|
---|
3632 |
|
---|
3633 | /* Network Manager actions: */
|
---|
3634 | m_pool[UIActionIndexMN_M_NetworkWindow] = new UIActionMenuManagerNetwork(this);
|
---|
3635 | m_pool[UIActionIndexMN_M_Network] = new UIActionMenuManagerNetwork(this);
|
---|
3636 | m_pool[UIActionIndexMN_M_Network_S_Create] = new UIActionMenuManagerNetworkPerformCreate(this);
|
---|
3637 | m_pool[UIActionIndexMN_M_Network_S_Remove] = new UIActionMenuManagerNetworkPerformRemove(this);
|
---|
3638 | m_pool[UIActionIndexMN_M_Network_T_Details] = new UIActionMenuManagerNetworkToggleProperties(this);
|
---|
3639 | m_pool[UIActionIndexMN_M_Network_S_Refresh] = new UIActionMenuManagerNetworkPerformRefresh(this);
|
---|
3640 |
|
---|
3641 | /* Cloud Profile Manager actions: */
|
---|
3642 | m_pool[UIActionIndexMN_M_CloudWindow] = new UIActionMenuManagerCloud(this);
|
---|
3643 | m_pool[UIActionIndexMN_M_Cloud] = new UIActionMenuManagerCloud(this);
|
---|
3644 | m_pool[UIActionIndexMN_M_Cloud_S_Add] = new UIActionMenuManagerCloudPerformAdd(this);
|
---|
3645 | m_pool[UIActionIndexMN_M_Cloud_S_Import] = new UIActionMenuManagerCloudPerformImport(this);
|
---|
3646 | m_pool[UIActionIndexMN_M_Cloud_S_Remove] = new UIActionMenuManagerCloudPerformRemove(this);
|
---|
3647 | m_pool[UIActionIndexMN_M_Cloud_T_Details] = new UIActionMenuManagerCloudToggleProperties(this);
|
---|
3648 | m_pool[UIActionIndexMN_M_Cloud_S_TryPage] = new UIActionMenuManagerCloudShowTryPage(this);
|
---|
3649 | m_pool[UIActionIndexMN_M_Cloud_S_Help] = new UIActionMenuManagerCloudShowHelp(this);
|
---|
3650 |
|
---|
3651 | /* Cloud Console Manager actions: */
|
---|
3652 | m_pool[UIActionIndexMN_M_CloudConsoleWindow] = new UIActionMenuManagerCloudConsole(this);
|
---|
3653 | m_pool[UIActionIndexMN_M_CloudConsole] = new UIActionMenuManagerCloudConsole(this);
|
---|
3654 | m_pool[UIActionIndexMN_M_CloudConsole_S_ApplicationAdd] = new UIActionMenuManagerCloudConsolePerformApplicationAdd(this);
|
---|
3655 | m_pool[UIActionIndexMN_M_CloudConsole_S_ApplicationRemove] = new UIActionMenuManagerCloudConsolePerformApplicationRemove(this);
|
---|
3656 | m_pool[UIActionIndexMN_M_CloudConsole_S_ProfileAdd] = new UIActionMenuManagerCloudConsolePerformProfileAdd(this);
|
---|
3657 | m_pool[UIActionIndexMN_M_CloudConsole_S_ProfileRemove] = new UIActionMenuManagerCloudConsolePerformProfileRemove(this);
|
---|
3658 | m_pool[UIActionIndexMN_M_CloudConsole_T_Details] = new UIActionMenuManagerCloudConsoleToggleProperties(this);
|
---|
3659 |
|
---|
3660 | /* VM Activity Overview actions: */
|
---|
3661 | m_pool[UIActionIndexMN_M_VMActivityOverview] = new UIActionMenuVMActivityOverview(this);
|
---|
3662 | m_pool[UIActionIndexMN_M_VMActivityOverview_M_Columns] = new UIActionMenuManagerVMActivityOverviewColumns(this);
|
---|
3663 | m_pool[UIActionIndexMN_M_VMActivityOverview_S_SwitchToMachineActivity] = new UIActionMenuManagerVMActivityOverviewSwitchToMachineActivity(this);
|
---|
3664 |
|
---|
3665 | /* 'File' action groups: */
|
---|
3666 | m_groupPool[UIActionIndexMN_M_File_M_Tools] = new QActionGroup(m_pool.value(UIActionIndexMN_M_File_M_Tools));
|
---|
3667 | m_groupPool[UIActionIndexMN_M_File_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_File_M_Tools_T_WelcomeScreen));
|
---|
3668 | m_groupPool[UIActionIndexMN_M_File_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_File_M_Tools_T_ExtensionPackManager));
|
---|
3669 | m_groupPool[UIActionIndexMN_M_File_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_File_M_Tools_T_VirtualMediaManager));
|
---|
3670 | m_groupPool[UIActionIndexMN_M_File_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_File_M_Tools_T_NetworkManager));
|
---|
3671 | m_groupPool[UIActionIndexMN_M_File_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_File_M_Tools_T_CloudProfileManager));
|
---|
3672 | m_groupPool[UIActionIndexMN_M_File_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_File_M_Tools_T_VMActivityOverview));
|
---|
3673 |
|
---|
3674 | /* 'Group' action groups: */
|
---|
3675 | m_groupPool[UIActionIndexMN_M_Group_M_Tools] = new QActionGroup(m_pool.value(UIActionIndexMN_M_Group_M_Tools));
|
---|
3676 | m_groupPool[UIActionIndexMN_M_Group_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_Group_M_Tools_T_Details));
|
---|
3677 | m_groupPool[UIActionIndexMN_M_Group_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_Group_M_Tools_T_Snapshots));
|
---|
3678 | m_groupPool[UIActionIndexMN_M_Group_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_Group_M_Tools_T_Logs));
|
---|
3679 | m_groupPool[UIActionIndexMN_M_Group_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_Group_M_Tools_T_Activity));
|
---|
3680 | m_groupPool[UIActionIndexMN_M_Group_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_Group_M_Tools_T_FileManager));
|
---|
3681 |
|
---|
3682 | /* 'Machine' action groups: */
|
---|
3683 | m_groupPool[UIActionIndexMN_M_Machine_M_Tools] = new QActionGroup(m_pool.value(UIActionIndexMN_M_Machine_M_Tools));
|
---|
3684 | m_groupPool[UIActionIndexMN_M_Machine_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_Machine_M_Tools_T_Details));
|
---|
3685 | m_groupPool[UIActionIndexMN_M_Machine_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_Machine_M_Tools_T_Snapshots));
|
---|
3686 | m_groupPool[UIActionIndexMN_M_Machine_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_Machine_M_Tools_T_Logs));
|
---|
3687 | m_groupPool[UIActionIndexMN_M_Machine_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_Machine_M_Tools_T_Activity));
|
---|
3688 | m_groupPool[UIActionIndexMN_M_Machine_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_Machine_M_Tools_T_FileManager));
|
---|
3689 |
|
---|
3690 | /* Prepare update-handlers for known menus: */
|
---|
3691 | m_menuUpdateHandlers[UIActionIndexMN_M_File].ptfm = &UIActionPoolManager::updateMenuFile;
|
---|
3692 | m_menuUpdateHandlers[UIActionIndexMN_M_File_M_Tools].ptfm = &UIActionPoolManager::updateMenuFileTools;
|
---|
3693 | m_menuUpdateHandlers[UIActionIndexMN_M_Welcome].ptfm = &UIActionPoolManager::updateMenuWelcome;
|
---|
3694 | m_menuUpdateHandlers[UIActionIndexMN_M_Group].ptfm = &UIActionPoolManager::updateMenuGroup;
|
---|
3695 | m_menuUpdateHandlers[UIActionIndexMN_M_Machine].ptfm = &UIActionPoolManager::updateMenuMachine;
|
---|
3696 | m_menuUpdateHandlers[UIActionIndexMN_M_Group_M_MoveToGroup].ptfm = &UIActionPoolManager::updateMenuGroupMoveToGroup;
|
---|
3697 | m_menuUpdateHandlers[UIActionIndexMN_M_Machine_M_MoveToGroup].ptfm = &UIActionPoolManager::updateMenuMachineMoveToGroup;
|
---|
3698 | m_menuUpdateHandlers[UIActionIndexMN_M_Group_M_StartOrShow].ptfm = &UIActionPoolManager::updateMenuGroupStartOrShow;
|
---|
3699 | m_menuUpdateHandlers[UIActionIndexMN_M_Machine_M_StartOrShow].ptfm = &UIActionPoolManager::updateMenuMachineStartOrShow;
|
---|
3700 | m_menuUpdateHandlers[UIActionIndexMN_M_Group_M_Console].ptfm = &UIActionPoolManager::updateMenuGroupConsole;
|
---|
3701 | m_menuUpdateHandlers[UIActionIndexMN_M_Machine_M_Console].ptfm = &UIActionPoolManager::updateMenuMachineConsole;
|
---|
3702 | m_menuUpdateHandlers[UIActionIndexMN_M_Group_M_Stop].ptfm = &UIActionPoolManager::updateMenuGroupClose;
|
---|
3703 | m_menuUpdateHandlers[UIActionIndexMN_M_Machine_M_Stop].ptfm = &UIActionPoolManager::updateMenuMachineClose;
|
---|
3704 | m_menuUpdateHandlers[UIActionIndexMN_M_Group_M_Tools].ptfm = &UIActionPoolManager::updateMenuGroupTools;
|
---|
3705 | m_menuUpdateHandlers[UIActionIndexMN_M_Machine_M_Tools].ptfm = &UIActionPoolManager::updateMenuMachineTools;
|
---|
3706 | m_menuUpdateHandlers[UIActionIndexMN_M_ExtensionWindow].ptfm = &UIActionPoolManager::updateMenuExtensionWindow;
|
---|
3707 | m_menuUpdateHandlers[UIActionIndexMN_M_Extension].ptfm = &UIActionPoolManager::updateMenuExtension;
|
---|
3708 | m_menuUpdateHandlers[UIActionIndexMN_M_MediumWindow].ptfm = &UIActionPoolManager::updateMenuMediumWindow;
|
---|
3709 | m_menuUpdateHandlers[UIActionIndexMN_M_Medium].ptfm = &UIActionPoolManager::updateMenuMedium;
|
---|
3710 | m_menuUpdateHandlers[UIActionIndexMN_M_NetworkWindow].ptfm = &UIActionPoolManager::updateMenuNetworkWindow;
|
---|
3711 | m_menuUpdateHandlers[UIActionIndexMN_M_Network].ptfm = &UIActionPoolManager::updateMenuNetwork;
|
---|
3712 | m_menuUpdateHandlers[UIActionIndexMN_M_CloudWindow].ptfm = &UIActionPoolManager::updateMenuCloudWindow;
|
---|
3713 | m_menuUpdateHandlers[UIActionIndexMN_M_Cloud].ptfm = &UIActionPoolManager::updateMenuCloud;
|
---|
3714 | m_menuUpdateHandlers[UIActionIndexMN_M_CloudConsoleWindow].ptfm = &UIActionPoolManager::updateMenuCloudConsoleWindow;
|
---|
3715 | m_menuUpdateHandlers[UIActionIndexMN_M_CloudConsole].ptfm = &UIActionPoolManager::updateMenuCloudConsole;
|
---|
3716 | m_menuUpdateHandlers[UIActionIndexMN_M_VMActivityOverview].ptfm = &UIActionPoolManager::updateMenuVMActivityOverview;
|
---|
3717 | m_menuUpdateHandlers[UIActionIndexMN_M_Snapshot].ptfm = &UIActionPoolManager::updateMenuSnapshot;
|
---|
3718 |
|
---|
3719 | /* Call to base-class: */
|
---|
3720 | UIActionPool::preparePool();
|
---|
3721 | }
|
---|
3722 |
|
---|
3723 | void UIActionPoolManager::prepareConnections()
|
---|
3724 | {
|
---|
3725 | /* Prepare connections: */
|
---|
3726 | connect(gShortcutPool, &UIShortcutPool::sigManagerShortcutsReloaded,
|
---|
3727 | this, &UIActionPoolManager::sltApplyShortcuts);
|
---|
3728 | connect(gShortcutPool, &UIShortcutPool::sigRuntimeShortcutsReloaded,
|
---|
3729 | this, &UIActionPoolManager::sltApplyShortcuts);
|
---|
3730 | connect(gEDataManager, &UIExtraDataManager::sigSettingsExpertModeChange,
|
---|
3731 | this, &UIActionPoolManager::sltHandleSettingsExpertModeChange);
|
---|
3732 |
|
---|
3733 | /* Call to base-class: */
|
---|
3734 | UIActionPool::prepareConnections();
|
---|
3735 | }
|
---|
3736 |
|
---|
3737 | void UIActionPoolManager::updateMenu(int iIndex)
|
---|
3738 | {
|
---|
3739 | /* If index belongs to base-class => delegate to base-class: */
|
---|
3740 | if (iIndex < UIActionIndex_Max)
|
---|
3741 | UIActionPool::updateMenu(iIndex);
|
---|
3742 | /* Otherwise,
|
---|
3743 | * if menu with such index is invalidated
|
---|
3744 | * and there is update-handler => handle it here: */
|
---|
3745 | else if ( iIndex > UIActionIndex_Max
|
---|
3746 | && m_invalidations.contains(iIndex)
|
---|
3747 | && m_menuUpdateHandlers.contains(iIndex))
|
---|
3748 | (this->*(m_menuUpdateHandlers.value(iIndex).ptfm))();
|
---|
3749 | }
|
---|
3750 |
|
---|
3751 | void UIActionPoolManager::updateMenus()
|
---|
3752 | {
|
---|
3753 | /* Clear menu list: */
|
---|
3754 | m_mainMenus.clear();
|
---|
3755 |
|
---|
3756 | /* 'File' menu: */
|
---|
3757 | addMenu(m_mainMenus, action(UIActionIndexMN_M_File));
|
---|
3758 | updateMenuFile();
|
---|
3759 |
|
---|
3760 | /* 'File' / 'Tools' menu: */
|
---|
3761 | updateMenuFileTools();
|
---|
3762 |
|
---|
3763 | /* 'Welcome' menu: */
|
---|
3764 | addMenu(m_mainMenus, action(UIActionIndexMN_M_Welcome));
|
---|
3765 | updateMenuWelcome();
|
---|
3766 | /* 'Group' menu: */
|
---|
3767 | addMenu(m_mainMenus, action(UIActionIndexMN_M_Group));
|
---|
3768 | updateMenuGroup();
|
---|
3769 | /* 'Machine' menu: */
|
---|
3770 | addMenu(m_mainMenus, action(UIActionIndexMN_M_Machine));
|
---|
3771 | updateMenuMachine();
|
---|
3772 |
|
---|
3773 | /* 'Machine' / 'Move to Group' menu: */
|
---|
3774 | updateMenuMachineMoveToGroup();
|
---|
3775 | /* 'Group' / 'Start or Show' menu: */
|
---|
3776 | updateMenuGroupStartOrShow();
|
---|
3777 | /* 'Machine' / 'Start or Show' menu: */
|
---|
3778 | updateMenuMachineStartOrShow();
|
---|
3779 | /* 'Group' / 'Close' menu: */
|
---|
3780 | updateMenuGroupClose();
|
---|
3781 | /* 'Machine' / 'Close' menu: */
|
---|
3782 | updateMenuMachineClose();
|
---|
3783 | /* 'Group' / 'Tools' menu: */
|
---|
3784 | updateMenuGroupTools();
|
---|
3785 | /* 'Machine' / 'Tools' menu: */
|
---|
3786 | updateMenuMachineTools();
|
---|
3787 |
|
---|
3788 | /* 'Extension Pack Manager' menu: */
|
---|
3789 | addMenu(m_mainMenus, action(UIActionIndexMN_M_Extension));
|
---|
3790 | updateMenuExtensionWindow();
|
---|
3791 | updateMenuExtension();
|
---|
3792 | /* 'Virtual Media Manager' menu: */
|
---|
3793 | addMenu(m_mainMenus, action(UIActionIndexMN_M_Medium));
|
---|
3794 | updateMenuMediumWindow();
|
---|
3795 | updateMenuMedium();
|
---|
3796 | /* 'Network Manager' menu: */
|
---|
3797 | addMenu(m_mainMenus, action(UIActionIndexMN_M_Network));
|
---|
3798 | updateMenuNetworkWindow();
|
---|
3799 | updateMenuNetwork();
|
---|
3800 | /* 'Cloud Profile Manager' menu: */
|
---|
3801 | addMenu(m_mainMenus, action(UIActionIndexMN_M_Cloud));
|
---|
3802 | updateMenuCloudWindow();
|
---|
3803 | updateMenuCloud();
|
---|
3804 | /* 'VM Activity Overview' menu: */
|
---|
3805 | addMenu(m_mainMenus, action(UIActionIndexMN_M_VMActivityOverview));
|
---|
3806 | updateMenuVMActivityOverview();
|
---|
3807 |
|
---|
3808 | /* 'Snapshot' menu: */
|
---|
3809 | addMenu(m_mainMenus, action(UIActionIndexMN_M_Snapshot));
|
---|
3810 | updateMenuSnapshot();
|
---|
3811 | /* 'Log' menu: */
|
---|
3812 | addMenu(m_mainMenus, action(UIActionIndex_M_Log));
|
---|
3813 | updateMenuLogViewerWindow();
|
---|
3814 | updateMenuLogViewer();
|
---|
3815 | /* 'Activity' menu: */
|
---|
3816 | addMenu(m_mainMenus, action(UIActionIndex_M_Activity));
|
---|
3817 | updateMenuVMActivityMonitor();
|
---|
3818 |
|
---|
3819 | /* 'File Manager' menu*/
|
---|
3820 | addMenu(m_mainMenus, action(UIActionIndex_M_FileManager));
|
---|
3821 | updateMenuFileManager();
|
---|
3822 |
|
---|
3823 | /* 'Help' menu: */
|
---|
3824 | addMenu(m_mainMenus, action(UIActionIndex_Menu_Help));
|
---|
3825 | updateMenuHelp();
|
---|
3826 | }
|
---|
3827 |
|
---|
3828 | void UIActionPoolManager::setShortcutsVisible(int iIndex, bool fVisible)
|
---|
3829 | {
|
---|
3830 | /* Prepare a list of actions: */
|
---|
3831 | QList<UIAction*> actions;
|
---|
3832 |
|
---|
3833 | /* Handle known menus: */
|
---|
3834 | switch (iIndex)
|
---|
3835 | {
|
---|
3836 | case UIActionIndexMN_M_Welcome:
|
---|
3837 | {
|
---|
3838 | actions << action(UIActionIndexMN_M_Welcome_S_New)
|
---|
3839 | << action(UIActionIndexMN_M_Welcome_S_Add);
|
---|
3840 | break;
|
---|
3841 | }
|
---|
3842 | case UIActionIndexMN_M_Group:
|
---|
3843 | {
|
---|
3844 | actions << action(UIActionIndexMN_M_Group_S_New)
|
---|
3845 | << action(UIActionIndexMN_M_Group_S_Add)
|
---|
3846 | << action(UIActionIndexMN_M_Group_S_Rename)
|
---|
3847 | << action(UIActionIndexMN_M_Group_S_Remove)
|
---|
3848 | << action(UIActionIndexMN_M_Group_M_MoveToGroup)
|
---|
3849 | << action(UIActionIndexMN_M_Group_M_StartOrShow)
|
---|
3850 | << action(UIActionIndexMN_M_Group_T_Pause)
|
---|
3851 | << action(UIActionIndexMN_M_Group_S_Reset)
|
---|
3852 | // << action(UIActionIndexMN_M_Group_S_Detach)
|
---|
3853 | << action(UIActionIndexMN_M_Group_S_Discard)
|
---|
3854 | << action(UIActionIndexMN_M_Group_S_Refresh)
|
---|
3855 | << action(UIActionIndexMN_M_Group_S_ShowInFileManager)
|
---|
3856 | << action(UIActionIndexMN_M_Group_S_CreateShortcut)
|
---|
3857 | << action(UIActionIndexMN_M_Group_S_Sort)
|
---|
3858 | << action(UIActionIndexMN_M_Group_M_StartOrShow_S_StartNormal)
|
---|
3859 | << action(UIActionIndexMN_M_Group_M_StartOrShow_S_StartHeadless)
|
---|
3860 | << action(UIActionIndexMN_M_Group_M_StartOrShow_S_StartDetachable)
|
---|
3861 | << action(UIActionIndexMN_M_Group_M_Console_S_CreateConnection)
|
---|
3862 | << action(UIActionIndexMN_M_Group_M_Console_S_DeleteConnection)
|
---|
3863 | << action(UIActionIndexMN_M_Group_M_Console_S_ConfigureApplications)
|
---|
3864 | << action(UIActionIndexMN_M_Group_M_Stop_S_SaveState)
|
---|
3865 | << action(UIActionIndexMN_M_Group_M_Stop_S_Terminate)
|
---|
3866 | << action(UIActionIndexMN_M_Group_M_Stop_S_Shutdown)
|
---|
3867 | << action(UIActionIndexMN_M_Group_M_Stop_S_PowerOff)
|
---|
3868 | << action(UIActionIndexMN_M_Group_M_Tools_T_Details)
|
---|
3869 | << action(UIActionIndexMN_M_Group_M_Tools_T_Snapshots)
|
---|
3870 | << action(UIActionIndexMN_M_Group_M_Tools_T_Logs)
|
---|
3871 | << action(UIActionIndexMN_M_Group_M_Tools_T_Activity);
|
---|
3872 | break;
|
---|
3873 | }
|
---|
3874 | case UIActionIndexMN_M_Machine:
|
---|
3875 | {
|
---|
3876 | actions << action(UIActionIndexMN_M_Machine_S_New)
|
---|
3877 | << action(UIActionIndexMN_M_Machine_S_Add)
|
---|
3878 | << action(UIActionIndexMN_M_Machine_S_Settings)
|
---|
3879 | << action(UIActionIndexMN_M_Machine_S_Clone)
|
---|
3880 | << action(UIActionIndexMN_M_Machine_S_Move)
|
---|
3881 | << action(UIActionIndexMN_M_Machine_S_ExportToOCI)
|
---|
3882 | << action(UIActionIndexMN_M_Machine_S_Remove)
|
---|
3883 | << action(UIActionIndexMN_M_Machine_M_MoveToGroup)
|
---|
3884 | << action(UIActionIndexMN_M_Machine_M_StartOrShow)
|
---|
3885 | << action(UIActionIndexMN_M_Machine_T_Pause)
|
---|
3886 | << action(UIActionIndexMN_M_Machine_S_Reset)
|
---|
3887 | // << action(UIActionIndexMN_M_Machine_S_Detach)
|
---|
3888 | << action(UIActionIndexMN_M_Machine_S_Discard)
|
---|
3889 | << action(UIActionIndexMN_M_Machine_S_Refresh)
|
---|
3890 | << action(UIActionIndexMN_M_Machine_S_ShowInFileManager)
|
---|
3891 | << action(UIActionIndexMN_M_Machine_S_CreateShortcut)
|
---|
3892 | << action(UIActionIndexMN_M_Machine_S_SortParent)
|
---|
3893 | << action(UIActionIndexMN_M_Machine_M_MoveToGroup_S_New)
|
---|
3894 | << action(UIActionIndexMN_M_Machine_M_StartOrShow_S_StartNormal)
|
---|
3895 | << action(UIActionIndexMN_M_Machine_M_StartOrShow_S_StartHeadless)
|
---|
3896 | << action(UIActionIndexMN_M_Machine_M_StartOrShow_S_StartDetachable)
|
---|
3897 | << action(UIActionIndexMN_M_Machine_M_Console_S_CreateConnection)
|
---|
3898 | << action(UIActionIndexMN_M_Machine_M_Console_S_DeleteConnection)
|
---|
3899 | << action(UIActionIndexMN_M_Machine_M_Console_S_CopyCommandSerialUnix)
|
---|
3900 | << action(UIActionIndexMN_M_Machine_M_Console_S_CopyCommandSerialWindows)
|
---|
3901 | << action(UIActionIndexMN_M_Machine_M_Console_S_CopyCommandVNCUnix)
|
---|
3902 | << action(UIActionIndexMN_M_Machine_M_Console_S_CopyCommandVNCWindows)
|
---|
3903 | << action(UIActionIndexMN_M_Machine_M_Console_S_ConfigureApplications)
|
---|
3904 | << action(UIActionIndexMN_M_Machine_M_Console_S_ShowLog)
|
---|
3905 | << action(UIActionIndexMN_M_Machine_M_Stop_S_SaveState)
|
---|
3906 | << action(UIActionIndexMN_M_Machine_M_Stop_S_Terminate)
|
---|
3907 | << action(UIActionIndexMN_M_Machine_M_Stop_S_Shutdown)
|
---|
3908 | << action(UIActionIndexMN_M_Machine_M_Stop_S_PowerOff)
|
---|
3909 | << action(UIActionIndexMN_M_Machine_M_Tools_T_Details)
|
---|
3910 | << action(UIActionIndexMN_M_Machine_M_Tools_T_Snapshots)
|
---|
3911 | << action(UIActionIndexMN_M_Machine_M_Tools_T_Logs)
|
---|
3912 | << action(UIActionIndexMN_M_Machine_M_Tools_T_Activity);
|
---|
3913 | break;
|
---|
3914 | }
|
---|
3915 | default:
|
---|
3916 | break;
|
---|
3917 | }
|
---|
3918 |
|
---|
3919 | /* Update shortcut visibility: */
|
---|
3920 | foreach (UIAction *pAction, actions)
|
---|
3921 | fVisible ? pAction->showShortcut() : pAction->hideShortcut();
|
---|
3922 | }
|
---|
3923 |
|
---|
3924 | QString UIActionPoolManager::shortcutsExtraDataID() const
|
---|
3925 | {
|
---|
3926 | return GUI_Input_SelectorShortcuts;
|
---|
3927 | }
|
---|
3928 |
|
---|
3929 | void UIActionPoolManager::updateShortcuts()
|
---|
3930 | {
|
---|
3931 | /* Call to base-class: */
|
---|
3932 | UIActionPool::updateShortcuts();
|
---|
3933 | /* Create temporary Runtime UI pool to do the same: */
|
---|
3934 | if (!isTemporary())
|
---|
3935 | UIActionPool::createTemporary(UIType_RuntimeUI);
|
---|
3936 | }
|
---|
3937 |
|
---|
3938 | void UIActionPoolManager::sltHandleSettingsExpertModeChange()
|
---|
3939 | {
|
---|
3940 | /* Invalidate corresponding menus: */
|
---|
3941 | m_invalidations << UIActionIndexMN_M_File_M_Tools
|
---|
3942 | << UIActionIndexMN_M_Group_M_Tools
|
---|
3943 | << UIActionIndexMN_M_Machine_M_Tools
|
---|
3944 | << UIActionIndexMN_M_Snapshot;
|
---|
3945 | }
|
---|
3946 |
|
---|
3947 | void UIActionPoolManager::updateMenuFile()
|
---|
3948 | {
|
---|
3949 | /* Get corresponding menu: */
|
---|
3950 | UIMenu *pMenu = action(UIActionIndexMN_M_File)->menu();
|
---|
3951 | AssertPtrReturnVoid(pMenu);
|
---|
3952 | /* Clear contents: */
|
---|
3953 | pMenu->clear();
|
---|
3954 |
|
---|
3955 | /* The Application / 'File' menu contents is very different depending on host type. */
|
---|
3956 |
|
---|
3957 | #ifdef VBOX_WS_MAC
|
---|
3958 |
|
---|
3959 | /* 'About' action goes to Application menu: */
|
---|
3960 | pMenu->addAction(action(UIActionIndex_M_Application_S_About));
|
---|
3961 | # ifdef VBOX_GUI_WITH_NETWORK_MANAGER
|
---|
3962 | /* 'Check for Updates' action goes to Application menu: */
|
---|
3963 | if (gEDataManager->applicationUpdateEnabled())
|
---|
3964 | pMenu->addAction(action(UIActionIndex_M_Application_S_CheckForUpdates));
|
---|
3965 | # endif
|
---|
3966 | /* 'Reset Warnings' action goes to Application menu: */
|
---|
3967 | pMenu->addAction(action(UIActionIndex_M_Application_S_ResetWarnings));
|
---|
3968 | /* 'Preferences' action goes to Application menu: */
|
---|
3969 | pMenu->addAction(action(UIActionIndex_M_Application_S_Preferences));
|
---|
3970 | /* 'Close' action goes to Application menu: */
|
---|
3971 | pMenu->addAction(action(UIActionIndexMN_M_File_S_Close));
|
---|
3972 |
|
---|
3973 | /* 'Import Appliance' action goes to 'File' menu: */
|
---|
3974 | pMenu->addAction(action(UIActionIndexMN_M_File_S_ImportAppliance));
|
---|
3975 | /* 'Export Appliance' action goes to 'File' menu: */
|
---|
3976 | pMenu->addAction(action(UIActionIndexMN_M_File_S_ExportAppliance));
|
---|
3977 | # ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
|
---|
3978 | /* 'Show Extra-data Manager' action goes to 'File' menu for Debug build: */
|
---|
3979 | pMenu->addAction(action(UIActionIndexMN_M_File_S_ShowExtraDataManager));
|
---|
3980 | # endif
|
---|
3981 | /* Separator after Import/Export actions of the 'File' menu: */
|
---|
3982 | pMenu->addSeparator();
|
---|
3983 | /* 'Tools' submenu goes to 'File' menu: */
|
---|
3984 | pMenu->addMenu(action(UIActionIndexMN_M_File_M_Tools)->menu());
|
---|
3985 | #else /* !VBOX_WS_MAC */
|
---|
3986 |
|
---|
3987 | /* 'Preferences' action goes to 'File' menu: */
|
---|
3988 | pMenu->addAction(action(UIActionIndex_M_Application_S_Preferences));
|
---|
3989 | /* Separator after 'Preferences' action of the 'File' menu: */
|
---|
3990 | pMenu->addSeparator();
|
---|
3991 | /* 'Import Appliance' action goes to 'File' menu: */
|
---|
3992 | pMenu->addAction(action(UIActionIndexMN_M_File_S_ImportAppliance));
|
---|
3993 | /* 'Export Appliance' action goes to 'File' menu: */
|
---|
3994 | pMenu->addAction(action(UIActionIndexMN_M_File_S_ExportAppliance));
|
---|
3995 | /* Separator after 'Export Appliance' action of the 'File' menu: */
|
---|
3996 | pMenu->addSeparator();
|
---|
3997 | # ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
|
---|
3998 | /* 'Extra-data Manager' action goes to 'File' menu for Debug build: */
|
---|
3999 | pMenu->addAction(action(UIActionIndexMN_M_File_S_ShowExtraDataManager));
|
---|
4000 | /* Separator after 'Extra-data Manager' action of the 'File' menu: */
|
---|
4001 | pMenu->addSeparator();
|
---|
4002 | # endif
|
---|
4003 | /* 'Tools' submenu goes to 'File' menu: */
|
---|
4004 | pMenu->addMenu(action(UIActionIndexMN_M_File_M_Tools)->menu());
|
---|
4005 | /* Separator after 'Tools' submenu of the 'File' menu: */
|
---|
4006 | pMenu->addSeparator();
|
---|
4007 | # ifdef VBOX_GUI_WITH_NETWORK_MANAGER
|
---|
4008 | /* 'Check for Updates' action goes to 'File' menu: */
|
---|
4009 | if (gEDataManager->applicationUpdateEnabled())
|
---|
4010 | pMenu->addAction(action(UIActionIndex_M_Application_S_CheckForUpdates));
|
---|
4011 | # endif
|
---|
4012 | /* 'Reset Warnings' action goes 'File' menu: */
|
---|
4013 | pMenu->addAction(action(UIActionIndex_M_Application_S_ResetWarnings));
|
---|
4014 | /* Separator after 'Reset Warnings' action of the 'File' menu: */
|
---|
4015 | pMenu->addSeparator();
|
---|
4016 | /* 'Close' action goes to 'File' menu: */
|
---|
4017 | pMenu->addAction(action(UIActionIndexMN_M_File_S_Close));
|
---|
4018 |
|
---|
4019 | #endif /* !VBOX_WS_MAC */
|
---|
4020 |
|
---|
4021 | /* Mark menu as valid: */
|
---|
4022 | m_invalidations.remove(UIActionIndexMN_M_File);
|
---|
4023 | }
|
---|
4024 |
|
---|
4025 | void UIActionPoolManager::updateMenuFileTools()
|
---|
4026 | {
|
---|
4027 | /* Get corresponding menu: */
|
---|
4028 | UIMenu *pMenu = action(UIActionIndexMN_M_File_M_Tools)->menu();
|
---|
4029 | AssertPtrReturnVoid(pMenu);
|
---|
4030 | /* Clear contents: */
|
---|
4031 | pMenu->clear();
|
---|
4032 |
|
---|
4033 | /* Populate 'File' / 'Tools' menu: */
|
---|
4034 | const bool fExpertMode = gEDataManager->isSettingsInExpertMode();
|
---|
4035 | pMenu->addAction(action(UIActionIndexMN_M_File_M_Tools_T_ExtensionPackManager));
|
---|
4036 | if (fExpertMode)
|
---|
4037 | {
|
---|
4038 | pMenu->addAction(action(UIActionIndexMN_M_File_M_Tools_T_VirtualMediaManager));
|
---|
4039 | pMenu->addAction(action(UIActionIndexMN_M_File_M_Tools_T_NetworkManager));
|
---|
4040 | }
|
---|
4041 | pMenu->addAction(action(UIActionIndexMN_M_File_M_Tools_T_CloudProfileManager));
|
---|
4042 | pMenu->addAction(action(UIActionIndexMN_M_File_M_Tools_T_VMActivityOverview));
|
---|
4043 |
|
---|
4044 | /* Mark menu as valid: */
|
---|
4045 | m_invalidations.remove(UIActionIndexMN_M_File_M_Tools);
|
---|
4046 | }
|
---|
4047 |
|
---|
4048 | void UIActionPoolManager::updateMenuWelcome()
|
---|
4049 | {
|
---|
4050 | /* Get corresponding menu: */
|
---|
4051 | UIMenu *pMenu = action(UIActionIndexMN_M_Welcome)->menu();
|
---|
4052 | AssertPtrReturnVoid(pMenu);
|
---|
4053 | /* Clear contents: */
|
---|
4054 | pMenu->clear();
|
---|
4055 |
|
---|
4056 | /* Populate 'Welcome' menu: */
|
---|
4057 | pMenu->addAction(action(UIActionIndexMN_M_Welcome_S_New));
|
---|
4058 | pMenu->addAction(action(UIActionIndexMN_M_Welcome_S_Add));
|
---|
4059 |
|
---|
4060 | /* Mark menu as valid: */
|
---|
4061 | m_invalidations.remove(UIActionIndexMN_M_Welcome);
|
---|
4062 | }
|
---|
4063 |
|
---|
4064 | void UIActionPoolManager::updateMenuGroup()
|
---|
4065 | {
|
---|
4066 | /* Get corresponding menu: */
|
---|
4067 | UIMenu *pMenu = action(UIActionIndexMN_M_Group)->menu();
|
---|
4068 | AssertPtrReturnVoid(pMenu);
|
---|
4069 | /* Clear contents: */
|
---|
4070 | pMenu->clear();
|
---|
4071 |
|
---|
4072 | #ifdef VBOX_WS_MAC
|
---|
4073 | // WORKAROUND:
|
---|
4074 | // On macOS you can't leave menu empty and still have it in
|
---|
4075 | // the menu-bar, you have to leave there at least something.
|
---|
4076 | // Remaining stuff will be appended from UIVirtualBoxManager.
|
---|
4077 | pMenu->addAction(action(UIActionIndexMN_M_Group_S_New));
|
---|
4078 | #endif
|
---|
4079 |
|
---|
4080 | /* This menu always remains invalid.. */
|
---|
4081 | }
|
---|
4082 |
|
---|
4083 | void UIActionPoolManager::updateMenuMachine()
|
---|
4084 | {
|
---|
4085 | /* Get corresponding menu: */
|
---|
4086 | UIMenu *pMenu = action(UIActionIndexMN_M_Machine)->menu();
|
---|
4087 | AssertPtrReturnVoid(pMenu);
|
---|
4088 | /* Clear contents: */
|
---|
4089 | pMenu->clear();
|
---|
4090 |
|
---|
4091 | #ifdef VBOX_WS_MAC
|
---|
4092 | // WORKAROUND:
|
---|
4093 | // On macOS you can't leave menu empty and still have it in
|
---|
4094 | // the menu-bar, you have to leave there at least something.
|
---|
4095 | // Remaining stuff will be appended from UIVirtualBoxManager.
|
---|
4096 | pMenu->addAction(action(UIActionIndexMN_M_Machine_S_New));
|
---|
4097 | #endif
|
---|
4098 |
|
---|
4099 | /* This menu always remains invalid.. */
|
---|
4100 | }
|
---|
4101 |
|
---|
4102 | void UIActionPoolManager::updateMenuGroupMoveToGroup()
|
---|
4103 | {
|
---|
4104 | /* Get corresponding menu: */
|
---|
4105 | UIMenu *pMenu = action(UIActionIndexMN_M_Group_M_MoveToGroup)->menu();
|
---|
4106 | AssertPtrReturnVoid(pMenu);
|
---|
4107 | /* Clear contents: */
|
---|
4108 | pMenu->clear();
|
---|
4109 |
|
---|
4110 | /* This menu always remains invalid.. */
|
---|
4111 | }
|
---|
4112 |
|
---|
4113 | void UIActionPoolManager::updateMenuMachineMoveToGroup()
|
---|
4114 | {
|
---|
4115 | /* Get corresponding menu: */
|
---|
4116 | UIMenu *pMenu = action(UIActionIndexMN_M_Machine_M_MoveToGroup)->menu();
|
---|
4117 | AssertPtrReturnVoid(pMenu);
|
---|
4118 | /* Clear contents: */
|
---|
4119 | pMenu->clear();
|
---|
4120 |
|
---|
4121 | /* Populate 'Machine' / 'Move to Group' menu: */
|
---|
4122 | pMenu->addAction(action(UIActionIndexMN_M_Machine_M_MoveToGroup_S_New));
|
---|
4123 |
|
---|
4124 | /* This menu always remains invalid.. */
|
---|
4125 | }
|
---|
4126 |
|
---|
4127 | void UIActionPoolManager::updateMenuGroupStartOrShow()
|
---|
4128 | {
|
---|
4129 | /* Get corresponding menu: */
|
---|
4130 | UIMenu *pMenu = action(UIActionIndexMN_M_Group_M_StartOrShow)->menu();
|
---|
4131 | AssertPtrReturnVoid(pMenu);
|
---|
4132 | /* Clear contents: */
|
---|
4133 | pMenu->clear();
|
---|
4134 |
|
---|
4135 | /* Populate 'Group' / 'Start or Show' menu: */
|
---|
4136 | pMenu->addAction(action(UIActionIndexMN_M_Group_M_StartOrShow_S_StartNormal));
|
---|
4137 | pMenu->addAction(action(UIActionIndexMN_M_Group_M_StartOrShow_S_StartHeadless));
|
---|
4138 | pMenu->addAction(action(UIActionIndexMN_M_Group_M_StartOrShow_S_StartDetachable));
|
---|
4139 |
|
---|
4140 | /* Mark menu as valid: */
|
---|
4141 | m_invalidations.remove(UIActionIndexMN_M_Group_M_StartOrShow);
|
---|
4142 | }
|
---|
4143 |
|
---|
4144 | void UIActionPoolManager::updateMenuMachineStartOrShow()
|
---|
4145 | {
|
---|
4146 | /* Get corresponding menu: */
|
---|
4147 | UIMenu *pMenu = action(UIActionIndexMN_M_Machine_M_StartOrShow)->menu();
|
---|
4148 | AssertPtrReturnVoid(pMenu);
|
---|
4149 | /* Clear contents: */
|
---|
4150 | pMenu->clear();
|
---|
4151 |
|
---|
4152 | /* Populate 'Machine' / 'Start or Show' menu: */
|
---|
4153 | pMenu->addAction(action(UIActionIndexMN_M_Machine_M_StartOrShow_S_StartNormal));
|
---|
4154 | pMenu->addAction(action(UIActionIndexMN_M_Machine_M_StartOrShow_S_StartHeadless));
|
---|
4155 | pMenu->addAction(action(UIActionIndexMN_M_Machine_M_StartOrShow_S_StartDetachable));
|
---|
4156 |
|
---|
4157 | /* Mark menu as valid: */
|
---|
4158 | m_invalidations.remove(UIActionIndexMN_M_Machine_M_StartOrShow);
|
---|
4159 | }
|
---|
4160 |
|
---|
4161 | void UIActionPoolManager::updateMenuGroupConsole()
|
---|
4162 | {
|
---|
4163 | /* Get corresponding menu: */
|
---|
4164 | UIMenu *pMenu = action(UIActionIndexMN_M_Group_M_Console)->menu();
|
---|
4165 | AssertPtrReturnVoid(pMenu);
|
---|
4166 | /* Clear contents: */
|
---|
4167 | pMenu->clear();
|
---|
4168 |
|
---|
4169 | /* This menu always remains invalid.. */
|
---|
4170 | }
|
---|
4171 |
|
---|
4172 | void UIActionPoolManager::updateMenuMachineConsole()
|
---|
4173 | {
|
---|
4174 | /* Get corresponding menu: */
|
---|
4175 | UIMenu *pMenu = action(UIActionIndexMN_M_Machine_M_Console)->menu();
|
---|
4176 | AssertPtrReturnVoid(pMenu);
|
---|
4177 | /* Clear contents: */
|
---|
4178 | pMenu->clear();
|
---|
4179 |
|
---|
4180 | /* This menu always remains invalid.. */
|
---|
4181 | }
|
---|
4182 |
|
---|
4183 | void UIActionPoolManager::updateMenuGroupClose()
|
---|
4184 | {
|
---|
4185 | /* Get corresponding menu: */
|
---|
4186 | UIMenu *pMenu = action(UIActionIndexMN_M_Group_M_Stop)->menu();
|
---|
4187 | AssertPtrReturnVoid(pMenu);
|
---|
4188 | /* Clear contents: */
|
---|
4189 | pMenu->clear();
|
---|
4190 |
|
---|
4191 | #ifdef VBOX_WS_MAC
|
---|
4192 | // WORKAROUND:
|
---|
4193 | // On macOS you can't leave menu empty and still have it in
|
---|
4194 | // the menu-bar, you have to leave there at least something.
|
---|
4195 | // Remaining stuff will be appended from UIVirtualBoxManager.
|
---|
4196 | pMenu->addAction(action(UIActionIndexMN_M_Group_M_Stop_S_PowerOff));
|
---|
4197 | #endif
|
---|
4198 |
|
---|
4199 | /* This menu always remains invalid.. */
|
---|
4200 | }
|
---|
4201 |
|
---|
4202 | void UIActionPoolManager::updateMenuMachineClose()
|
---|
4203 | {
|
---|
4204 | /* Get corresponding menu: */
|
---|
4205 | UIMenu *pMenu = action(UIActionIndexMN_M_Machine_M_Stop)->menu();
|
---|
4206 | AssertPtrReturnVoid(pMenu);
|
---|
4207 | /* Clear contents: */
|
---|
4208 | pMenu->clear();
|
---|
4209 |
|
---|
4210 | #ifdef VBOX_WS_MAC
|
---|
4211 | // WORKAROUND:
|
---|
4212 | // On macOS you can't leave menu empty and still have it in
|
---|
4213 | // the menu-bar, you have to leave there at least something.
|
---|
4214 | // Remaining stuff will be appended from UIVirtualBoxManager.
|
---|
4215 | pMenu->addAction(action(UIActionIndexMN_M_Machine_M_Stop_S_PowerOff));
|
---|
4216 | #endif
|
---|
4217 |
|
---|
4218 | /* This menu always remains invalid.. */
|
---|
4219 | }
|
---|
4220 |
|
---|
4221 | void UIActionPoolManager::updateMenuGroupTools()
|
---|
4222 | {
|
---|
4223 | /* Get corresponding menu: */
|
---|
4224 | UIMenu *pMenu = action(UIActionIndexMN_M_Group_M_Tools)->menu();
|
---|
4225 | AssertPtrReturnVoid(pMenu);
|
---|
4226 | /* Clear contents: */
|
---|
4227 | pMenu->clear();
|
---|
4228 |
|
---|
4229 | /* Populate 'Group' / 'Tools' menu: */
|
---|
4230 | const bool fExpertMode = gEDataManager->isSettingsInExpertMode();
|
---|
4231 | pMenu->addAction(action(UIActionIndexMN_M_Group_M_Tools_T_Details));
|
---|
4232 | pMenu->addAction(action(UIActionIndexMN_M_Group_M_Tools_T_Snapshots));
|
---|
4233 | pMenu->addAction(action(UIActionIndexMN_M_Group_M_Tools_T_Logs));
|
---|
4234 | pMenu->addAction(action(UIActionIndexMN_M_Group_M_Tools_T_Activity));
|
---|
4235 | if (fExpertMode)
|
---|
4236 | pMenu->addAction(action(UIActionIndexMN_M_Group_M_Tools_T_FileManager));
|
---|
4237 |
|
---|
4238 | /* Mark menu as valid: */
|
---|
4239 | m_invalidations.remove(UIActionIndexMN_M_Group_M_Tools);
|
---|
4240 | }
|
---|
4241 |
|
---|
4242 | void UIActionPoolManager::updateMenuMachineTools()
|
---|
4243 | {
|
---|
4244 | /* Get corresponding menu: */
|
---|
4245 | UIMenu *pMenu = action(UIActionIndexMN_M_Machine_M_Tools)->menu();
|
---|
4246 | AssertPtrReturnVoid(pMenu);
|
---|
4247 | /* Clear contents: */
|
---|
4248 | pMenu->clear();
|
---|
4249 |
|
---|
4250 | /* Populate 'Machine' / 'Tools' menu: */
|
---|
4251 | const bool fExpertMode = gEDataManager->isSettingsInExpertMode();
|
---|
4252 | pMenu->addAction(action(UIActionIndexMN_M_Machine_M_Tools_T_Details));
|
---|
4253 | pMenu->addAction(action(UIActionIndexMN_M_Machine_M_Tools_T_Snapshots));
|
---|
4254 | pMenu->addAction(action(UIActionIndexMN_M_Machine_M_Tools_T_Logs));
|
---|
4255 | pMenu->addAction(action(UIActionIndexMN_M_Machine_M_Tools_T_Activity));
|
---|
4256 | if (fExpertMode)
|
---|
4257 | pMenu->addAction(action(UIActionIndexMN_M_Machine_M_Tools_T_FileManager));
|
---|
4258 |
|
---|
4259 | /* Mark menu as valid: */
|
---|
4260 | m_invalidations.remove(UIActionIndexMN_M_Machine_M_Tools);
|
---|
4261 | }
|
---|
4262 |
|
---|
4263 | void UIActionPoolManager::updateMenuExtensionWindow()
|
---|
4264 | {
|
---|
4265 | /* Update corresponding menu: */
|
---|
4266 | updateMenuExtensionWrapper(action(UIActionIndexMN_M_ExtensionWindow)->menu());
|
---|
4267 |
|
---|
4268 | /* Mark menu as valid: */
|
---|
4269 | m_invalidations.remove(UIActionIndexMN_M_ExtensionWindow);
|
---|
4270 | }
|
---|
4271 |
|
---|
4272 | void UIActionPoolManager::updateMenuExtension()
|
---|
4273 | {
|
---|
4274 | /* Update corresponding menu: */
|
---|
4275 | updateMenuExtensionWrapper(action(UIActionIndexMN_M_Extension)->menu());
|
---|
4276 |
|
---|
4277 | /* Mark menu as valid: */
|
---|
4278 | m_invalidations.remove(UIActionIndexMN_M_Extension);
|
---|
4279 | }
|
---|
4280 |
|
---|
4281 | void UIActionPoolManager::updateMenuExtensionWrapper(UIMenu *pMenu)
|
---|
4282 | {
|
---|
4283 | /* Clear contents: */
|
---|
4284 | pMenu->clear();
|
---|
4285 |
|
---|
4286 | /* 'Add' action: */
|
---|
4287 | addAction(pMenu, action(UIActionIndexMN_M_Extension_S_Install));
|
---|
4288 | /* 'Remove' action: */
|
---|
4289 | addAction(pMenu, action(UIActionIndexMN_M_Extension_S_Uninstall));
|
---|
4290 | }
|
---|
4291 |
|
---|
4292 | void UIActionPoolManager::updateMenuMediumWindow()
|
---|
4293 | {
|
---|
4294 | /* Update corresponding menu: */
|
---|
4295 | updateMenuMediumWrapper(action(UIActionIndexMN_M_MediumWindow)->menu());
|
---|
4296 |
|
---|
4297 | /* Mark menu as valid: */
|
---|
4298 | m_invalidations.remove(UIActionIndexMN_M_MediumWindow);
|
---|
4299 | }
|
---|
4300 |
|
---|
4301 | void UIActionPoolManager::updateMenuMedium()
|
---|
4302 | {
|
---|
4303 | /* Update corresponding menu: */
|
---|
4304 | updateMenuMediumWrapper(action(UIActionIndexMN_M_Medium)->menu());
|
---|
4305 |
|
---|
4306 | /* Mark menu as valid: */
|
---|
4307 | m_invalidations.remove(UIActionIndexMN_M_Medium);
|
---|
4308 | }
|
---|
4309 |
|
---|
4310 | void UIActionPoolManager::updateMenuMediumWrapper(UIMenu *pMenu)
|
---|
4311 | {
|
---|
4312 | /* Clear contents: */
|
---|
4313 | pMenu->clear();
|
---|
4314 |
|
---|
4315 | /* Separator? */
|
---|
4316 | bool fSeparator = false;
|
---|
4317 |
|
---|
4318 | /* 'Add' action: */
|
---|
4319 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Medium_S_Add)) || fSeparator;
|
---|
4320 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Medium_S_Create)) || fSeparator;
|
---|
4321 |
|
---|
4322 | /* Separator? */
|
---|
4323 | if (fSeparator)
|
---|
4324 | {
|
---|
4325 | pMenu->addSeparator();
|
---|
4326 | fSeparator = false;
|
---|
4327 | }
|
---|
4328 |
|
---|
4329 | /* 'Copy' action: */
|
---|
4330 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Medium_S_Copy)) || fSeparator;
|
---|
4331 | /* 'Move' action: */
|
---|
4332 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Medium_S_Move)) || fSeparator;
|
---|
4333 | /* 'Remove' action: */
|
---|
4334 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Medium_S_Remove)) || fSeparator;
|
---|
4335 | /* 'Release' action: */
|
---|
4336 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Medium_S_Release)) || fSeparator;
|
---|
4337 | /* 'Clear' action: */
|
---|
4338 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Medium_S_Clear)) || fSeparator;
|
---|
4339 | /* 'Search' action: */
|
---|
4340 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Medium_T_Search)) || fSeparator;
|
---|
4341 | /* 'Properties' action: */
|
---|
4342 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Medium_T_Details)) || fSeparator;
|
---|
4343 |
|
---|
4344 | /* Separator? */
|
---|
4345 | if (fSeparator)
|
---|
4346 | {
|
---|
4347 | pMenu->addSeparator();
|
---|
4348 | fSeparator = false;
|
---|
4349 | }
|
---|
4350 |
|
---|
4351 | /* 'Refresh' action: */
|
---|
4352 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Medium_S_Refresh)) || fSeparator;;
|
---|
4353 | }
|
---|
4354 |
|
---|
4355 | void UIActionPoolManager::updateMenuNetworkWindow()
|
---|
4356 | {
|
---|
4357 | /* Update corresponding menu: */
|
---|
4358 | updateMenuNetworkWrapper(action(UIActionIndexMN_M_NetworkWindow)->menu());
|
---|
4359 |
|
---|
4360 | /* Mark menu as valid: */
|
---|
4361 | m_invalidations.remove(UIActionIndexMN_M_NetworkWindow);
|
---|
4362 | }
|
---|
4363 |
|
---|
4364 | void UIActionPoolManager::updateMenuNetwork()
|
---|
4365 | {
|
---|
4366 | /* Update corresponding menu: */
|
---|
4367 | updateMenuNetworkWrapper(action(UIActionIndexMN_M_Network)->menu());
|
---|
4368 |
|
---|
4369 | /* Mark menu as valid: */
|
---|
4370 | m_invalidations.remove(UIActionIndexMN_M_Network);
|
---|
4371 | }
|
---|
4372 |
|
---|
4373 | void UIActionPoolManager::updateMenuNetworkWrapper(UIMenu *pMenu)
|
---|
4374 | {
|
---|
4375 | /* Clear contents: */
|
---|
4376 | pMenu->clear();
|
---|
4377 |
|
---|
4378 | /* Separator? */
|
---|
4379 | bool fSeparator = false;
|
---|
4380 |
|
---|
4381 | /* 'Create' action: */
|
---|
4382 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Network_S_Create)) || fSeparator;
|
---|
4383 |
|
---|
4384 | /* Separator? */
|
---|
4385 | if (fSeparator)
|
---|
4386 | {
|
---|
4387 | pMenu->addSeparator();
|
---|
4388 | fSeparator = false;
|
---|
4389 | }
|
---|
4390 |
|
---|
4391 | /* 'Remove' action: */
|
---|
4392 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Network_S_Remove)) || fSeparator;
|
---|
4393 | /* 'Properties' action: */
|
---|
4394 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Network_T_Details)) || fSeparator;
|
---|
4395 |
|
---|
4396 | // /* Separator? */
|
---|
4397 | // if (fSeparator)
|
---|
4398 | // {
|
---|
4399 | // pMenu->addSeparator();
|
---|
4400 | // fSeparator = false;
|
---|
4401 | // }
|
---|
4402 |
|
---|
4403 | // /* 'Refresh' action: */
|
---|
4404 | // fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Network_S_Refresh)) || fSeparator;;
|
---|
4405 | }
|
---|
4406 |
|
---|
4407 | void UIActionPoolManager::updateMenuCloudWindow()
|
---|
4408 | {
|
---|
4409 | /* Update corresponding menu: */
|
---|
4410 | updateMenuCloudWrapper(action(UIActionIndexMN_M_CloudWindow)->menu());
|
---|
4411 |
|
---|
4412 | /* Mark menu as valid: */
|
---|
4413 | m_invalidations.remove(UIActionIndexMN_M_CloudWindow);
|
---|
4414 | }
|
---|
4415 |
|
---|
4416 | void UIActionPoolManager::updateMenuCloud()
|
---|
4417 | {
|
---|
4418 | /* Update corresponding menu: */
|
---|
4419 | updateMenuCloudWrapper(action(UIActionIndexMN_M_Cloud)->menu());
|
---|
4420 |
|
---|
4421 | /* Mark menu as valid: */
|
---|
4422 | m_invalidations.remove(UIActionIndexMN_M_Cloud);
|
---|
4423 | }
|
---|
4424 |
|
---|
4425 | void UIActionPoolManager::updateMenuCloudWrapper(UIMenu *pMenu)
|
---|
4426 | {
|
---|
4427 | /* Clear contents: */
|
---|
4428 | pMenu->clear();
|
---|
4429 |
|
---|
4430 | /* Separator? */
|
---|
4431 | bool fSeparator = false;
|
---|
4432 |
|
---|
4433 | /* 'Add' action: */
|
---|
4434 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Cloud_S_Add)) || fSeparator;
|
---|
4435 | /* 'Import' action: */
|
---|
4436 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Cloud_S_Import)) || fSeparator;
|
---|
4437 |
|
---|
4438 | /* Separator? */
|
---|
4439 | if (fSeparator)
|
---|
4440 | {
|
---|
4441 | pMenu->addSeparator();
|
---|
4442 | fSeparator = false;
|
---|
4443 | }
|
---|
4444 |
|
---|
4445 | /* 'Remove' action: */
|
---|
4446 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Cloud_S_Remove)) || fSeparator;
|
---|
4447 | /* 'Properties' action: */
|
---|
4448 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Cloud_T_Details)) || fSeparator;
|
---|
4449 |
|
---|
4450 | /* Separator? */
|
---|
4451 | if (fSeparator)
|
---|
4452 | {
|
---|
4453 | pMenu->addSeparator();
|
---|
4454 | fSeparator = false;
|
---|
4455 | }
|
---|
4456 |
|
---|
4457 | /* 'Try Page' action: */
|
---|
4458 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Cloud_S_TryPage)) || fSeparator;
|
---|
4459 | /* 'Help' action: */
|
---|
4460 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Cloud_S_Help)) || fSeparator;
|
---|
4461 | }
|
---|
4462 |
|
---|
4463 | void UIActionPoolManager::updateMenuCloudConsoleWindow()
|
---|
4464 | {
|
---|
4465 | /* Update corresponding menu: */
|
---|
4466 | updateMenuCloudConsoleWrapper(action(UIActionIndexMN_M_CloudConsoleWindow)->menu());
|
---|
4467 |
|
---|
4468 | /* Mark menu as valid: */
|
---|
4469 | m_invalidations.remove(UIActionIndexMN_M_CloudConsoleWindow);
|
---|
4470 | }
|
---|
4471 |
|
---|
4472 | void UIActionPoolManager::updateMenuCloudConsole()
|
---|
4473 | {
|
---|
4474 | /* Update corresponding menu: */
|
---|
4475 | updateMenuCloudConsoleWrapper(action(UIActionIndexMN_M_CloudConsole)->menu());
|
---|
4476 |
|
---|
4477 | /* Mark menu as valid: */
|
---|
4478 | m_invalidations.remove(UIActionIndexMN_M_CloudConsole);
|
---|
4479 | }
|
---|
4480 |
|
---|
4481 | void UIActionPoolManager::updateMenuCloudConsoleWrapper(UIMenu *pMenu)
|
---|
4482 | {
|
---|
4483 | /* Clear contents: */
|
---|
4484 | pMenu->clear();
|
---|
4485 |
|
---|
4486 | /* Separator? */
|
---|
4487 | bool fSeparator = false;
|
---|
4488 |
|
---|
4489 | /* 'Add Application' action: */
|
---|
4490 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_CloudConsole_S_ApplicationAdd)) || fSeparator;
|
---|
4491 | /* 'Remove Application' action: */
|
---|
4492 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_CloudConsole_S_ApplicationRemove)) || fSeparator;
|
---|
4493 |
|
---|
4494 | /* Separator? */
|
---|
4495 | if (fSeparator)
|
---|
4496 | {
|
---|
4497 | pMenu->addSeparator();
|
---|
4498 | fSeparator = false;
|
---|
4499 | }
|
---|
4500 |
|
---|
4501 | /* 'Add Profile' action: */
|
---|
4502 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_CloudConsole_S_ProfileAdd)) || fSeparator;
|
---|
4503 | /* 'Remove Profile' action: */
|
---|
4504 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_CloudConsole_S_ProfileRemove)) || fSeparator;
|
---|
4505 |
|
---|
4506 | /* Separator? */
|
---|
4507 | if (fSeparator)
|
---|
4508 | {
|
---|
4509 | pMenu->addSeparator();
|
---|
4510 | fSeparator = false;
|
---|
4511 | }
|
---|
4512 |
|
---|
4513 | /* 'Properties' action: */
|
---|
4514 | fSeparator = addAction(pMenu, action(UIActionIndexMN_M_CloudConsole_T_Details)) || fSeparator;
|
---|
4515 | }
|
---|
4516 |
|
---|
4517 | void UIActionPoolManager::updateMenuVMActivityOverview()
|
---|
4518 | {
|
---|
4519 | /* Update corresponding menu: */
|
---|
4520 | updateMenuVMActivityOverviewWrapper(action(UIActionIndexMN_M_VMActivityOverview)->menu());
|
---|
4521 |
|
---|
4522 | /* Mark menu as valid: */
|
---|
4523 | m_invalidations.remove(UIActionIndexMN_M_VMActivityOverview);
|
---|
4524 | }
|
---|
4525 |
|
---|
4526 | void UIActionPoolManager::updateMenuVMActivityOverviewWrapper(UIMenu *pMenu)
|
---|
4527 | {
|
---|
4528 | /* Clear contents: */
|
---|
4529 | pMenu->clear();
|
---|
4530 | addAction(pMenu, action(UIActionIndexMN_M_VMActivityOverview_M_Columns));
|
---|
4531 | addAction(pMenu, action(UIActionIndexMN_M_VMActivityOverview_S_SwitchToMachineActivity));
|
---|
4532 | }
|
---|
4533 |
|
---|
4534 | void UIActionPoolManager::updateMenuSnapshot()
|
---|
4535 | {
|
---|
4536 | /* Get corresponding menu: */
|
---|
4537 | UIMenu *pMenu = action(UIActionIndexMN_M_Snapshot)->menu();
|
---|
4538 | AssertPtrReturnVoid(pMenu);
|
---|
4539 | /* Clear contents: */
|
---|
4540 | pMenu->clear();
|
---|
4541 |
|
---|
4542 | /* Populate Snapshot-menu: */
|
---|
4543 | const bool fExpertMode = gEDataManager->isSettingsInExpertMode();
|
---|
4544 | pMenu->addAction(action(UIActionIndexMN_M_Snapshot_S_Take));
|
---|
4545 | pMenu->addAction(action(UIActionIndexMN_M_Snapshot_S_Delete));
|
---|
4546 | pMenu->addAction(action(UIActionIndexMN_M_Snapshot_S_Restore));
|
---|
4547 | pMenu->addAction(action(UIActionIndexMN_M_Snapshot_T_Properties));
|
---|
4548 | if (fExpertMode)
|
---|
4549 | pMenu->addAction(action(UIActionIndexMN_M_Snapshot_S_Clone));
|
---|
4550 |
|
---|
4551 | /* Mark menu as valid: */
|
---|
4552 | m_invalidations.remove(UIActionIndexMN_M_Snapshot);
|
---|
4553 | }
|
---|
4554 |
|
---|
4555 |
|
---|
4556 | #include "UIActionPoolManager.moc"
|
---|