VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.h

Last change on this file was 106061, checked in by vboxsync, 3 weeks ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 KB
Line 
1/* $Id: UIToolPaneGlobal.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIToolPaneGlobal class declaration.
4 */
5
6/*
7 * Copyright (C) 2017-2024 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef FEQT_INCLUDED_SRC_manager_UIToolPaneGlobal_h
29#define FEQT_INCLUDED_SRC_manager_UIToolPaneGlobal_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QWidget>
36
37/* GUI includes: */
38#include "UIExtraDataDefs.h"
39
40/* Forward declarations: */
41class QHBoxLayout;
42class QStackedLayout;
43class QUuid;
44class QVBoxLayout;
45class UIActionPool;
46class UICloudProfileManagerWidget;
47class UIExtensionPackManagerWidget;
48class UIMediumManagerWidget;
49class UINetworkManagerWidget;
50class UIVMActivityOverviewWidget;
51class UIVirtualMachineItemCloud;
52class UIWelcomePane;
53class CMachine;
54
55
56/** QWidget subclass representing container for tool panes. */
57class UIToolPaneGlobal : public QWidget
58{
59 Q_OBJECT;
60
61signals:
62
63 /** Notifies listeners about creation procedure was requested. */
64 void sigCreateMedium();
65 /** Notifies listeners about copy procedure was requested for medium with specified @a uMediumId. */
66 void sigCopyMedium(const QUuid &uMediumId);
67
68 /** Notifies listeners about request to switch to Activity pane of machine with @a uMachineId. */
69 void sigSwitchToMachineActivityPane(const QUuid &uMachineId);
70
71public:
72
73 /** Constructs tools pane passing @a pParent to the base-class. */
74 UIToolPaneGlobal(UIActionPool *pActionPool, QWidget *pParent = 0);
75 /** Destructs tools pane. */
76 virtual ~UIToolPaneGlobal() RT_OVERRIDE;
77
78 /** Defines whether this pane is @a fActive. */
79 void setActive(bool fActive);
80 /** Returns whether this pane is active. */
81 bool active() const { return m_fActive; }
82
83 /** Returns type of tool currently opened. */
84 UIToolType currentTool() const;
85 /** Returns whether tool of particular @a enmType is opened. */
86 bool isToolOpened(UIToolType enmType) const;
87 /** Activates tool of passed @a enmType, creates new one if necessary. */
88 void openTool(UIToolType enmType);
89 /** Closes tool of passed @a enmType, deletes one if exists. */
90 void closeTool(UIToolType enmType);
91 /** Returns the help keyword of the current tool's widget. */
92 QString currentHelpKeyword() const;
93
94 /** Defines the @a cloudItems. */
95 void setCloudMachineItems(const QList<UIVirtualMachineItemCloud*> &cloudItems);
96
97private:
98
99 /** Prepares all. */
100 void prepare();
101 /** Prepares stacked-layout. */
102 void prepareStackedLayout();
103 /** Cleanups all. */
104 void cleanup();
105
106 /** Handles token change. */
107 void handleTokenChange();
108
109 /** Holds the action pool reference. */
110 UIActionPool *m_pActionPool;
111
112 /** Holds the stacked-layout instance. */
113 QStackedLayout *m_pLayout;
114 /** Holds the Welcome pane instance. */
115 UIWelcomePane *m_pPaneWelcome;
116 /** Holds the Extension Pack Manager instance. */
117 UIExtensionPackManagerWidget *m_pPaneExtensions;
118 /** Holds the Virtual Media Manager instance. */
119 UIMediumManagerWidget *m_pPaneMedia;
120 /** Holds the Network Manager instance. */
121 UINetworkManagerWidget *m_pPaneNetwork;
122 /** Holds the Cloud Profile Manager instance. */
123 UICloudProfileManagerWidget *m_pPaneCloud;
124 /** Holds the VM Activity Overview instance. */
125 UIVMActivityOverviewWidget *m_pPaneVMActivityOverview;
126
127 /** Holds whether this pane is active. */
128 bool m_fActive;
129
130 /** Holds the cache of passed cloud machine items. */
131 QList<UIVirtualMachineItemCloud*> m_cloudItems;
132};
133
134#endif /* !FEQT_INCLUDED_SRC_manager_UIToolPaneGlobal_h */
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