1 | /* $Id: VBoxAboutDlg.h 76581 2019-01-01 06:24:57Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - VBoxAboutDlg class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2019 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef FEQT_INCLUDED_SRC_VBoxAboutDlg_h
|
---|
19 | #define FEQT_INCLUDED_SRC_VBoxAboutDlg_h
|
---|
20 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
21 | # pragma once
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | /* Qt includes: */
|
---|
25 | #include <QPixmap>
|
---|
26 |
|
---|
27 | /* GUI includes: */
|
---|
28 | #include "QIDialog.h"
|
---|
29 | #include "QIWithRetranslateUI.h"
|
---|
30 | #include "UILibraryDefs.h"
|
---|
31 |
|
---|
32 | /* Forward declarations: */
|
---|
33 | class QEvent;
|
---|
34 | class QLabel;
|
---|
35 | class QVBoxLayout;
|
---|
36 |
|
---|
37 | /** QIDialog extension
|
---|
38 | * used to show the About-VirtualBox dialog. */
|
---|
39 | class SHARED_LIBRARY_STUFF VBoxAboutDlg : public QIWithRetranslateUI2<QIDialog>
|
---|
40 | {
|
---|
41 | Q_OBJECT;
|
---|
42 |
|
---|
43 | public:
|
---|
44 |
|
---|
45 | /** Constructs dialog passing @a pParent to the base-class.
|
---|
46 | * @param strVersion Brings the version number of VirtualBox. */
|
---|
47 | VBoxAboutDlg(QWidget *pParent, const QString &strVersion);
|
---|
48 |
|
---|
49 | protected:
|
---|
50 |
|
---|
51 | /** Handles any Qt @a pEvent. */
|
---|
52 | virtual bool event(QEvent *pEvent) /* override */;
|
---|
53 |
|
---|
54 | /** Handles paint @a pEvent. */
|
---|
55 | virtual void paintEvent(QPaintEvent *pEvent) /* override */;
|
---|
56 |
|
---|
57 | /** Handles translation event. */
|
---|
58 | virtual void retranslateUi() /* override */;
|
---|
59 |
|
---|
60 | private:
|
---|
61 |
|
---|
62 | /** Prepares all. */
|
---|
63 | void prepare();
|
---|
64 | /** Prepares main-layout. */
|
---|
65 | void prepareMainLayout();
|
---|
66 | /** Prepares label. */
|
---|
67 | void prepareLabel();
|
---|
68 | /** Prepares close-button. */
|
---|
69 | void prepareCloseButton();
|
---|
70 |
|
---|
71 | /** Holds the pseudo-parent widget reference. */
|
---|
72 | QObject *m_pPseudoParent;
|
---|
73 |
|
---|
74 | /** Holds the About-VirtualBox text. */
|
---|
75 | QString m_strAboutText;
|
---|
76 | /** Holds the VirtualBox version number. */
|
---|
77 | QString m_strVersion;
|
---|
78 |
|
---|
79 | /** Holds the About-VirtualBox image. */
|
---|
80 | QPixmap m_pixmap;
|
---|
81 | /** Holds the About-VirtualBox dialog size. */
|
---|
82 | QSize m_size;
|
---|
83 |
|
---|
84 | /** Holds About-VirtualBox main-layout instance. */
|
---|
85 | QVBoxLayout *m_pMainLayout;
|
---|
86 | /** Holds About-VirtualBox text-label instance. */
|
---|
87 | QLabel *m_pLabel;
|
---|
88 | };
|
---|
89 |
|
---|
90 | #endif /* !FEQT_INCLUDED_SRC_VBoxAboutDlg_h */
|
---|
91 |
|
---|