VirtualBox

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

Last change on this file was 106061, checked in by vboxsync, 2 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: 2.9 KB
Line 
1/* $Id: UIVMActivityToolWidget.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIVMActivityToolWidget class declaration.
4 */
5
6/*
7 * Copyright (C) 2009-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_activity_vmactivity_UIVMActivityToolWidget_h
29#define FEQT_INCLUDED_SRC_activity_vmactivity_UIVMActivityToolWidget_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QColor>
36#include <QWidget>
37#include <QUuid>
38
39/* GUI includes: */
40#include "QIManagerDialog.h"
41
42/* Forward declarations: */
43class QIToolBar;
44class UIActionPool;
45class UIVirtualMachineItem;
46class UIVMActivityMonitorContainer;
47
48/** QTabWidget extension host machine activity widget(s) in the Manager UI. */
49class UIVMActivityToolWidget : public QWidget
50{
51 Q_OBJECT;
52
53signals:
54
55 void sigSwitchToActivityOverviewPane();
56
57public:
58
59 UIVMActivityToolWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool,
60 bool fShowToolbar = true, QWidget *pParent = 0);
61 QMenu *menu() const;
62
63 bool isCurrentTool() const;
64 void setIsCurrentTool(bool fIsCurrentTool);
65
66 void setSelectedVMListItems(const QList<UIVirtualMachineItem*> &items);
67
68#ifdef VBOX_WS_MAC
69 QIToolBar *toolbar() const { return m_pToolBar; }
70#endif
71
72private:
73
74 void setMachines(const QList<UIVirtualMachineItem*> &machines);
75 /** @name Prepare/cleanup cascade.
76 * @{ */
77 void prepare();
78 void prepareToolBar();
79 void prepareActions();
80 void updateColumnsMenu();
81 /** @} */
82
83 /** Add new tabs for each QUuid in @machineIdsToAdd. Does not check for duplicates. */
84 void addTabs(const QList<UIVirtualMachineItem*> &machines);
85 void setExportActionEnabled(bool fEnabled);
86
87 /** @name General variables.
88 * @{ */
89 const EmbedTo m_enmEmbedding;
90 UIActionPool *m_pActionPool;
91 const bool m_fShowToolbar;
92 /** @} */
93
94 QIToolBar *m_pToolBar;
95 /** Indicates if this widget's host tool is current tool. */
96 bool m_fIsCurrentTool;
97 QVector<QUuid> m_machineIds;
98 UIVMActivityMonitorContainer *m_pMonitorContainer;
99};
100
101
102#endif /* !FEQT_INCLUDED_SRC_activity_vmactivity_UIVMActivityToolWidget_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