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