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: */
|
---|
42 | class QTableWidget;
|
---|
43 | class QTableWidgetItem;
|
---|
44 | class QTextDocument;
|
---|
45 | class QVBoxLayout;
|
---|
46 |
|
---|
47 | class UIInformationConfiguration : public QIWithRetranslateUI<QWidget>
|
---|
48 | {
|
---|
49 | Q_OBJECT;
|
---|
50 |
|
---|
51 | public:
|
---|
52 |
|
---|
53 | /** Constructs information-tab passing @a pParent to the base-class. */
|
---|
54 | UIInformationConfiguration(QWidget *pParent);
|
---|
55 |
|
---|
56 | protected:
|
---|
57 |
|
---|
58 | void retranslateUi() RT_OVERRIDE;
|
---|
59 |
|
---|
60 | private slots:
|
---|
61 |
|
---|
62 | void sltMachineDataChanged();
|
---|
63 | void sltHandleTableContextMenuRequest(const QPoint &position);
|
---|
64 | void sltCopyTableToClipboard();
|
---|
65 |
|
---|
66 | private:
|
---|
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 */
|
---|