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