1 | /* $Id: VBoxAboutDlg.h 98103 2023-01-17 14:15:46Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - VBoxAboutDlg class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-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_VBoxAboutDlg_h
|
---|
29 | #define FEQT_INCLUDED_SRC_VBoxAboutDlg_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* Qt includes: */
|
---|
35 | #include <QPixmap>
|
---|
36 |
|
---|
37 | /* GUI includes: */
|
---|
38 | #include "QIDialog.h"
|
---|
39 | #include "QIWithRetranslateUI.h"
|
---|
40 | #include "UILibraryDefs.h"
|
---|
41 |
|
---|
42 | /* Forward declarations: */
|
---|
43 | class QEvent;
|
---|
44 | class QLabel;
|
---|
45 | class QVBoxLayout;
|
---|
46 |
|
---|
47 | /** QIDialog extension
|
---|
48 | * used to show the About-VirtualBox dialog. */
|
---|
49 | class SHARED_LIBRARY_STUFF VBoxAboutDlg : public QIWithRetranslateUI2<QIDialog>
|
---|
50 | {
|
---|
51 | Q_OBJECT;
|
---|
52 |
|
---|
53 | public:
|
---|
54 |
|
---|
55 | /** Constructs dialog passing @a pParent to the base-class.
|
---|
56 | * @param strVersion Brings the version number of VirtualBox. */
|
---|
57 | VBoxAboutDlg(QWidget *pParent, const QString &strVersion);
|
---|
58 |
|
---|
59 | protected:
|
---|
60 |
|
---|
61 | /** Handles any Qt @a pEvent. */
|
---|
62 | virtual bool event(QEvent *pEvent) RT_OVERRIDE;
|
---|
63 |
|
---|
64 | /** Handles paint @a pEvent. */
|
---|
65 | virtual void paintEvent(QPaintEvent *pEvent) RT_OVERRIDE;
|
---|
66 |
|
---|
67 | /** Handles translation event. */
|
---|
68 | virtual void retranslateUi() RT_OVERRIDE;
|
---|
69 |
|
---|
70 | private:
|
---|
71 |
|
---|
72 | /** Prepares all. */
|
---|
73 | void prepare();
|
---|
74 | /** Prepares main-layout. */
|
---|
75 | void prepareMainLayout();
|
---|
76 | /** Prepares label. */
|
---|
77 | void prepareLabel();
|
---|
78 | /** Prepares close-button. */
|
---|
79 | void prepareCloseButton();
|
---|
80 |
|
---|
81 | /** Holds the pseudo-parent widget reference. */
|
---|
82 | QObject *m_pPseudoParent;
|
---|
83 |
|
---|
84 | /** Holds the About-VirtualBox text. */
|
---|
85 | QString m_strAboutText;
|
---|
86 | /** Holds the VirtualBox version number. */
|
---|
87 | QString m_strVersion;
|
---|
88 |
|
---|
89 | /** Holds the About-VirtualBox image. */
|
---|
90 | QPixmap m_pixmap;
|
---|
91 | /** Holds the About-VirtualBox dialog size. */
|
---|
92 | QSize m_size;
|
---|
93 |
|
---|
94 | /** Holds About-VirtualBox main-layout instance. */
|
---|
95 | QVBoxLayout *m_pMainLayout;
|
---|
96 | /** Holds About-VirtualBox text-label instance. */
|
---|
97 | QLabel *m_pLabel;
|
---|
98 | /** Holds size set flag to make sure dialog size if set only once. */
|
---|
99 | bool m_fFixedSizeSet;
|
---|
100 | };
|
---|
101 |
|
---|
102 | #endif /* !FEQT_INCLUDED_SRC_VBoxAboutDlg_h */
|
---|
103 |
|
---|