VirtualBox

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

Last change on this file since 74878 was 74878, checked in by vboxsync, 6 years ago

FE/Qt: bugref:9261: Changed COMWrapper to generate QUuid for GUID instead of QString

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1/* $Id: UIToolsPaneMachine.h 74878 2018-10-17 13:34:24Z 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 UIVMLogViewerWidget;
36class UISnapshotPane;
37class UIVMItem;
38class CMachine;
39
40
41/** QWidget subclass representing container for tool panes. */
42class UIToolsPaneMachine : public QIWithRetranslateUI<QWidget>
43{
44 Q_OBJECT;
45
46signals:
47
48 /** Redirects signal from UISelectorWindow to UIGDetails. */
49 void sigSlidingStarted();
50 /** Redirects signal from UISelectorWindow to UIGDetails. */
51 void sigToggleStarted();
52 /** Redirects signal from UISelectorWindow to UIGDetails. */
53 void sigToggleFinished();
54 /** Redirects signal from UIGDetails to UISelectorWindow. */
55 void sigLinkClicked(const QString &strCategory, const QString &strControl, const QUuid &aId);
56
57public:
58
59 /** Constructs tools pane passing @a pParent to the base-class. */
60 UIToolsPaneMachine(UIActionPool *pActionPool, QWidget *pParent = 0);
61 /** Destructs tools pane. */
62 virtual ~UIToolsPaneMachine() /* override */;
63
64 /** Returns type of tool currently opened. */
65 ToolTypeMachine currentTool() const;
66 /** Returns whether tool of particular @a enmType is opened. */
67 bool isToolOpened(ToolTypeMachine enmType) const;
68 /** Activates tool of passed @a enmType, creates new one if necessary. */
69 void openTool(ToolTypeMachine enmType);
70 /** Closes tool of passed @a enmType, deletes one if exists. */
71 void closeTool(ToolTypeMachine enmType);
72
73 /** Defines @a strError and switches to error details pane. */
74 void setDetailsError(const QString &strError);
75
76 /** Defines current machine @a pItem. */
77 void setCurrentItem(UIVMItem *pItem);
78
79 /** Defines the machine @a items. */
80 void setItems(const QList<UIVMItem*> &items);
81
82 /** Defines the @a comMachine object. */
83 void setMachine(const CMachine &comMachine);
84
85protected:
86
87 /** Handles translation event. */
88 virtual void retranslateUi() /* override */;
89
90private:
91
92 /** Prepares all. */
93 void prepare();
94 /** Prepares stacked-layout. */
95 void prepareStackedLayout();
96 /** Cleanups all. */
97 void cleanup();
98
99 /** Holds the action pool reference. */
100 UIActionPool *m_pActionPool;
101
102 /** Holds current machine item reference. */
103 UIVMItem *m_pItem;
104
105 /** Holds the stacked-layout instance. */
106 QStackedLayout *m_pLayout;
107 /** Holds the Desktop pane instance. */
108 UIDesktopPane *m_pPaneDesktop;
109 /** Holds the Details pane instance. */
110 UIGDetails *m_pPaneDetails;
111 /** Holds the Snapshots pane instance. */
112 UISnapshotPane *m_pPaneSnapshots;
113 /** Holds the Logviewer pane instance. */
114 UIVMLogViewerWidget *m_pPaneLogViewer;
115};
116
117#endif /* !___UIToolsPaneMachine_h___ */
118
Note: See TracBrowser for help on using the repository browser.

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