1 | /* $Id: VBoxAboutDlg.h 71630 2018-04-03 16:37:08Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - VBoxAboutDlg class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2018 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 ___VBoxAboutDlg_h___
|
---|
19 | #define ___VBoxAboutDlg_h___
|
---|
20 |
|
---|
21 | /* Qt includes: */
|
---|
22 | #include <QPixmap>
|
---|
23 |
|
---|
24 | /* GUI includes: */
|
---|
25 | #include "QIDialog.h"
|
---|
26 | #include "QIWithRetranslateUI.h"
|
---|
27 | #include "UILibraryDefs.h"
|
---|
28 |
|
---|
29 | /* Forward declarations: */
|
---|
30 | class QEvent;
|
---|
31 | class QLabel;
|
---|
32 | class QVBoxLayout;
|
---|
33 |
|
---|
34 | /** QIDialog extension
|
---|
35 | * used to show the About-VirtualBox dialog. */
|
---|
36 | class SHARED_LIBRARY_STUFF VBoxAboutDlg : public QIWithRetranslateUI2<QIDialog>
|
---|
37 | {
|
---|
38 | Q_OBJECT;
|
---|
39 |
|
---|
40 | public:
|
---|
41 |
|
---|
42 | /** Constructs dialog passing @a pParent to the base-class.
|
---|
43 | * @param strVersion Brings the version number of VirtualBox. */
|
---|
44 | VBoxAboutDlg(QWidget *pParent, const QString &strVersion);
|
---|
45 |
|
---|
46 | protected:
|
---|
47 |
|
---|
48 | /** Handles any Qt @a pEvent. */
|
---|
49 | virtual bool event(QEvent *pEvent) /* override */;
|
---|
50 |
|
---|
51 | /** Handles paint @a pEvent. */
|
---|
52 | virtual void paintEvent(QPaintEvent *pEvent) /* override */;
|
---|
53 |
|
---|
54 | /** Handles translation event. */
|
---|
55 | virtual void retranslateUi() /* override */;
|
---|
56 |
|
---|
57 | private:
|
---|
58 |
|
---|
59 | /** Prepares all. */
|
---|
60 | void prepare();
|
---|
61 | /** Prepares main-layout. */
|
---|
62 | void prepareMainLayout();
|
---|
63 | /** Prepares label. */
|
---|
64 | void prepareLabel();
|
---|
65 | /** Prepares close-button. */
|
---|
66 | void prepareCloseButton();
|
---|
67 |
|
---|
68 | /** Holds the pseudo-parent widget reference. */
|
---|
69 | QObject *m_pPseudoParent;
|
---|
70 |
|
---|
71 | /** Holds the About-VirtualBox text. */
|
---|
72 | QString m_strAboutText;
|
---|
73 | /** Holds the VirtualBox version number. */
|
---|
74 | QString m_strVersion;
|
---|
75 |
|
---|
76 | /** Holds the About-VirtualBox image. */
|
---|
77 | QPixmap m_pixmap;
|
---|
78 | /** Holds the About-VirtualBox dialog size. */
|
---|
79 | QSize m_size;
|
---|
80 |
|
---|
81 | /** Holds About-VirtualBox main-layout instance. */
|
---|
82 | QVBoxLayout *m_pMainLayout;
|
---|
83 | /** Holds About-VirtualBox text-label instance. */
|
---|
84 | QLabel *m_pLabel;
|
---|
85 | };
|
---|
86 |
|
---|
87 | #endif /* !___VBoxAboutDlg_h___ */
|
---|
88 |
|
---|