VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationConfiguration.h@ 103977

Last change on this file since 103977 was 98874, checked in by vboxsync, 2 years ago

FE/Qt: bugref:10322: Cleanup for UIVMInformationDialog related to UIMachine global pointer.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/* $Id: UIInformationConfiguration.h 98874 2023-03-08 09:34:42Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIInformationConfiguration 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_UIInformationConfiguration_h
29#define FEQT_INCLUDED_SRC_runtime_information_UIInformationConfiguration_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 "QIWithRetranslateUI.h"
39#include "UITextTable.h"
40
41/* Forward declarations: */
42class QTableWidget;
43class QTableWidgetItem;
44class QTextDocument;
45class QVBoxLayout;
46
47class UIInformationConfiguration : public QIWithRetranslateUI<QWidget>
48{
49 Q_OBJECT;
50
51public:
52
53 /** Constructs information-tab passing @a pParent to the base-class. */
54 UIInformationConfiguration(QWidget *pParent);
55
56protected:
57
58 void retranslateUi() RT_OVERRIDE;
59
60private slots:
61
62 void sltMachineDataChanged();
63 void sltHandleTableContextMenuRequest(const QPoint &position);
64 void sltCopyTableToClipboard();
65
66private:
67
68 void createTableItems();
69 void prepareObjects();
70 void insertTitleRow(const QString &strTitle, const QIcon &icon, const QFontMetrics &fontMetrics);
71 void insertInfoRows(const UITextTable &table, const QFontMetrics &fontMetrics, int &iMaxColumn1Length);
72 void insertInfoRow(const QString strText1, const QString &strText2,
73 const QFontMetrics &fontMetrics, int &iMaxColumn1Length);
74 void resetTable();
75 QString removeHtmlFromString(const QString &strOriginal);
76 QString tableData() const;
77
78 QVBoxLayout *m_pMainLayout;
79 QTableWidget *m_pTableWidget;
80 QAction *m_pCopyWholeTableAction;
81
82 const int m_iColumCount;
83 const int m_iRowLeftMargin;
84 const int m_iRowTopMargin;
85 const int m_iRowRightMargin;
86 const int m_iRowBottomMargin;
87
88
89 /** @name Cached translated string.
90 * @{ */
91 QString m_strGeneralTitle;
92 QString m_strSystemTitle;
93 QString m_strDisplayTitle;
94 QString m_strStorageTitle;
95 QString m_strAudioTitle;
96 QString m_strNetworkTitle;
97 QString m_strSerialPortsTitle;
98 QString m_strUSBTitle;
99 QString m_strSharedFoldersTitle;
100 /** @} */
101};
102
103#endif /* !FEQT_INCLUDED_SRC_runtime_information_UIInformationConfiguration_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