VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/selector/UIToolsPaneMachine.h@ 68304

Last change on this file since 68304 was 68304, checked in by vboxsync, 8 years ago

FE/Qt: bugref:8900: Selector UI: Save/restore Machine/Global tools order/layout at exit/startup.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/* $Id: UIToolsPaneMachine.h 68304 2017-08-04 16:15:21Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIToolsPaneMachine class declaration.
4 */
5
6/*
7 * Copyright (C) 2017 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef ___UIToolsPaneMachine_h___
19#define ___UIToolsPaneMachine_h___
20
21/* Qt includes: */
22#include <QWidget>
23
24/* GUI includes: */
25#include "QIWithRetranslateUI.h"
26#include "UIExtraDataDefs.h"
27
28/* Forward declarations: */
29class QHBoxLayout;
30class QStackedLayout;
31class QVBoxLayout;
32class UIActionPool;
33class UIDesktopPane;
34class UIGDetails;
35class UISnapshotPane;
36class UIVMItem;
37class CMachine;
38
39
40/** QWidget subclass representing container for tool panes. */
41class UIToolsPaneMachine : public QIWithRetranslateUI<QWidget>
42{
43 Q_OBJECT;
44
45signals:
46
47 /** Redirects signal from UISelectorWindow to UIGDetails. */
48 void sigSlidingStarted();
49 /** Redirects signal from UISelectorWindow to UIGDetails. */
50 void sigToggleStarted();
51 /** Redirects signal from UISelectorWindow to UIGDetails. */
52 void sigToggleFinished();
53 /** Redirects signal from UIGDetails to UISelectorWindow. */
54 void sigLinkClicked(const QString &strCategory, const QString &strControl, const QString &strId);
55
56public:
57
58 /** Constructs tools pane passing @a pParent to the base-class. */
59 UIToolsPaneMachine(UIActionPool *pActionPool, QWidget *pParent = 0);
60 /** Destructs tools pane. */
61 virtual ~UIToolsPaneMachine() /* override */;
62
63 /** Returns type of tool currently opened. */
64 ToolTypeMachine currentTool() const;
65 /** Returns whether tool of particular @a enmType is opened. */
66 bool isToolOpened(ToolTypeMachine enmType) const;
67 /** Activates tool of passed @a enmType, creates new one if necessary. */
68 void openTool(ToolTypeMachine enmType);
69 /** Closes tool of passed @a enmType, deletes one if exists. */
70 void closeTool(ToolTypeMachine enmType);
71
72 /** Defines @a strError and switches to error details pane. */
73 void setDetailsError(const QString &strError);
74
75 /** Defines current machine @a pItem. */
76 void setCurrentItem(UIVMItem *pItem);
77
78 /** Defines the machine @a items. */
79 void setItems(const QList<UIVMItem*> &items);
80
81 /** Defines the @a comMachine object. */
82 void setMachine(const CMachine &comMachine);
83
84protected:
85
86 /** Handles translation event. */
87 virtual void retranslateUi() /* override */;
88
89private:
90
91 /** Prepares all. */
92 void prepare();
93 /** Prepares stacked-layout. */
94 void prepareStackedLayout();
95 /** Cleanups all. */
96 void cleanup();
97
98 /** Holds the action pool reference. */
99 UIActionPool *m_pActionPool;
100
101 /** Holds current machine item reference. */
102 UIVMItem *m_pItem;
103
104 /** Holds the stacked-layout instance. */
105 QStackedLayout *m_pLayout;
106 /** Holds the Desktop pane instance. */
107 UIDesktopPane *m_pPaneDesktop;
108 /** Holds the Details pane instance. */
109 UIGDetails *m_pPaneDetails;
110 /** Holds the Snapshots pane instance. */
111 UISnapshotPane *m_pPaneSnapshots;
112};
113
114#endif /* !___UIToolsPaneMachine_h___ */
115
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette