VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityToolWidget.h

Last change on this file was 104445, checked in by vboxsync, 7 weeks ago

FE/Qt. bugref:9510. Adding a new pane container to activity monitor widget to host setting controls.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1/* $Id: UIVMActivityToolWidget.h 104445 2024-04-26 14:09:35Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIVMActivityToolWidget class declaration.
4 */
5
6/*
7 * Copyright (C) 2009-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#ifndef FEQT_INCLUDED_SRC_activity_overview_UIVMActivityToolWidget_h
29#define FEQT_INCLUDED_SRC_activity_overview_UIVMActivityToolWidget_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QWidget>
36#include <QUuid>
37
38/* GUI includes: */
39#include "QIManagerDialog.h"
40
41/* Forward declarations: */
42class CMachine;
43class QIToolBar;
44class QTabWidget;
45class UIActionPool;
46class UIVirtualMachineItem;
47class UIVMActivityMonitorPaneContainer;
48
49
50/** QTabWidget extension host machine activity widget(s) in the Manager UI. */
51class UIVMActivityToolWidget : public QWidget
52{
53 Q_OBJECT;
54
55signals:
56
57 void sigSwitchToActivityOverviewPane();
58
59public:
60
61 UIVMActivityToolWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool,
62 bool fShowToolbar = true, QWidget *pParent = 0);
63 QMenu *menu() const;
64
65 bool isCurrentTool() const;
66 void setIsCurrentTool(bool fIsCurrentTool);
67
68 void setSelectedVMListItems(const QList<UIVirtualMachineItem*> &items);
69
70#ifdef VBOX_WS_MAC
71 QIToolBar *toolbar() const { return m_pToolBar; }
72#endif
73
74private slots:
75
76 void sltExportToFile();
77 void sltCurrentTabChanged(int iIndex);
78 void sltTogglePreferencesPane(bool fChecked);
79
80private:
81
82 void setMachines(const QList<UIVirtualMachineItem*> &machines);
83 /** @name Prepare/cleanup cascade.
84 * @{ */
85 void prepare();
86 void prepareToolBar();
87 void prepareActions();
88 void updateColumnsMenu();
89 void loadSettings();
90 /** @} */
91
92 /** Remove tabs conaining machine monitors with ids @machineIdsToRemove. */
93 void removeTabs(const QVector<QUuid> &machineIdsToRemove);
94 /** Add new tabs for each QUuid in @machineIdsToAdd. Does not check for duplicates. */
95 void addTabs(const QList<UIVirtualMachineItem*> &machines);
96 void setExportActionEnabled(bool fEnabled);
97
98 /** @name General variables.
99 * @{ */
100 const EmbedTo m_enmEmbedding;
101 UIActionPool *m_pActionPool;
102 const bool m_fShowToolbar;
103 /** @} */
104
105 QIToolBar *m_pToolBar;
106
107 /** Indicates if this widget's host tool is current tool. */
108 bool m_fIsCurrentTool;
109 QVector<QUuid> m_machineIds;
110 QAction *m_pExportToFileAction;
111 UIVMActivityMonitorPaneContainer *m_pPaneContainer;
112 QTabWidget *m_pTabWidget;
113};
114
115
116#endif /* !FEQT_INCLUDED_SRC_activity_overview_UIVMActivityToolWidget_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use