VirtualBox

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

Last change on this file was 104290, checked in by vboxsync, 2 months 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: 2.9 KB
Line 
1/* $Id: UIInformationConfiguration.h 104290 2024-04-11 09:37:29Z 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 "UITextTable.h"
39
40/* Forward declarations: */
41class QTableWidget;
42class QTableWidgetItem;
43class QTextDocument;
44class QVBoxLayout;
45
46class UIInformationConfiguration : public QWidget
47{
48 Q_OBJECT;
49
50public:
51
52 /** Constructs information-tab passing @a pParent to the base-class. */
53 UIInformationConfiguration(QWidget *pParent);
54
55private slots:
56
57 void sltRetranslateUI();
58 void sltMachineDataChanged();
59 void sltHandleTableContextMenuRequest(const QPoint &position);
60 void sltCopyTableToClipboard();
61
62private:
63
64 void createTableItems();
65 void prepareObjects();
66 void insertTitleRow(const QString &strTitle, const QIcon &icon, const QFontMetrics &fontMetrics);
67 void insertInfoRows(const UITextTable &table, const QFontMetrics &fontMetrics, int &iMaxColumn1Length);
68 void insertInfoRow(const QString strText1, const QString &strText2,
69 const QFontMetrics &fontMetrics, int &iMaxColumn1Length);
70 void resetTable();
71 QString removeHtmlFromString(const QString &strOriginal);
72 QString tableData() const;
73
74 QVBoxLayout *m_pMainLayout;
75 QTableWidget *m_pTableWidget;
76 QAction *m_pCopyWholeTableAction;
77
78 const int m_iColumCount;
79 const int m_iRowLeftMargin;
80 const int m_iRowTopMargin;
81 const int m_iRowRightMargin;
82 const int m_iRowBottomMargin;
83
84
85 /** @name Cached translated string.
86 * @{ */
87 QString m_strGeneralTitle;
88 QString m_strSystemTitle;
89 QString m_strDisplayTitle;
90 QString m_strStorageTitle;
91 QString m_strAudioTitle;
92 QString m_strNetworkTitle;
93 QString m_strSerialPortsTitle;
94 QString m_strUSBTitle;
95 QString m_strSharedFoldersTitle;
96 /** @} */
97};
98
99#endif /* !FEQT_INCLUDED_SRC_runtime_information_UIInformationConfiguration_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use