VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.h

Last change on this file was 104290, checked in by vboxsync, 8 weeks ago

FE/Qt. bugref:10622. Using new UITranslationEventListener in the runtime UI related classes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/* $Id: UIVMInformationDialog.h 104290 2024-04-11 09:37:29Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIVMInformationDialog class declaration.
4 */
5
6/*
7 * Copyright (C) 2016-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_runtime_information_UIVMInformationDialog_h
29#define FEQT_INCLUDED_SRC_runtime_information_UIVMInformationDialog_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QMainWindow>
36#include <QUuid>
37
38/* GUI includes: */
39#include "QIWithRestorableGeometry.h"
40
41/* COM includes: */
42#include "KMachineState.h"
43
44/* Forward declarations: */
45class QITabWidget;
46class QIDialogButtonBox;
47
48/* Type definitions: */
49typedef QIWithRestorableGeometry<QMainWindow> QMainWindowWithRestorableGeometry;
50
51/** QMainWindow subclass providing user
52 * with the dialog unifying VM details and statistics. */
53class UIVMInformationDialog : public QMainWindowWithRestorableGeometry
54{
55 Q_OBJECT;
56
57signals:
58
59 void sigClose();
60
61public:
62
63 /** Constructs information dialog. */
64 UIVMInformationDialog();
65
66 /** Returns whether the dialog should be maximized when geometry being restored. */
67 virtual bool shouldBeMaximized() const RT_OVERRIDE;
68
69protected:
70
71 virtual void closeEvent(QCloseEvent *pEvent) RT_OVERRIDE;
72 virtual bool event(QEvent *pEvent) RT_OVERRIDE;
73
74private slots:
75
76 /** Handles translation event. */
77 void sltRetranslateUI();
78 /** Handles tab-widget page change. */
79 void sltHandlePageChanged(int iIndex);
80 void sltMachineStateChange(const QUuid &uMachineId, const KMachineState state);
81
82private:
83 enum Tabs
84 {
85 Tabs_ConfigurationDetails = 0,
86 Tabs_RuntimeInformation,
87 Tabs_ActivityMonitor,
88 Tabs_GuestControl
89 };
90 /** Prepares all. */
91 void prepare();
92 /** Prepares central-widget. */
93 void prepareCentralWidget();
94 /** Prepares tab-widget. */
95 void prepareTabWidget();
96 /** Prepares tab with @a iTabIndex. */
97 void prepareTab(int iTabIndex);
98 /** Prepares button-box. */
99 void prepareButtonBox();
100 /** Prepares connections: */
101 void prepareConnections();
102 void loadDialogGeometry();
103 void saveDialogGeometry();
104
105 /** @name Widget variables.
106 * @{ */
107 /** Holds the dialog tab-widget instance. */
108 QITabWidget *m_pTabWidget;
109 /** Holds the map of dialog tab instances. */
110 QMap<int, QWidget*> m_tabs;
111 /** Holds the dialog button-box instance. */
112 QIDialogButtonBox *m_pButtonBox;
113 /** @} */
114 bool m_fCloseEmitted;
115 int m_iGeometrySaveTimerId;
116 QUuid m_uMachineId;
117 QString m_strMachineName;
118};
119
120#endif /* !FEQT_INCLUDED_SRC_runtime_information_UIVMInformationDialog_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use