1 | /* $Id: UIWelcomePane.h 106061 2024-09-16 14:03:52Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIWelcomePane class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010-2024 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_manager_UIWelcomePane_h
|
---|
29 | #define FEQT_INCLUDED_SRC_manager_UIWelcomePane_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* Qt includes: */
|
---|
35 | #include <QIcon>
|
---|
36 | #include <QMap>
|
---|
37 | #include <QWidget>
|
---|
38 |
|
---|
39 | /* GUI includes: */
|
---|
40 | #include "UILibraryDefs.h"
|
---|
41 |
|
---|
42 | /* Forward declarations: */
|
---|
43 | class QAbstractButton;
|
---|
44 | class QLabel;
|
---|
45 | class QIRichTextLabel;
|
---|
46 |
|
---|
47 | /** QWidget subclass holding Welcome information about VirtualBox. */
|
---|
48 | class UIWelcomePane : public QWidget
|
---|
49 | {
|
---|
50 | Q_OBJECT;
|
---|
51 |
|
---|
52 | public:
|
---|
53 |
|
---|
54 | /** Constructs Welcome pane passing @a pParent to the base-class. */
|
---|
55 | UIWelcomePane(QWidget *pParent = 0);
|
---|
56 |
|
---|
57 | protected:
|
---|
58 |
|
---|
59 | /** Handles any Qt @a pEvent. */
|
---|
60 | virtual bool event(QEvent *pEvent) RT_OVERRIDE;
|
---|
61 |
|
---|
62 | private slots:
|
---|
63 |
|
---|
64 | /** Handles activated @a urlLink. */
|
---|
65 | void sltHandleLinkActivated(const QUrl &urlLink);
|
---|
66 |
|
---|
67 | /** Handles @a pButton click. */
|
---|
68 | void sltHandleButtonClicked(QAbstractButton *pButton);
|
---|
69 |
|
---|
70 | /** Handles translation event. */
|
---|
71 | void sltRetranslateUI();
|
---|
72 |
|
---|
73 | private:
|
---|
74 |
|
---|
75 | /** Prepares all. */
|
---|
76 | void prepare();
|
---|
77 |
|
---|
78 | /** Updates text labels. */
|
---|
79 | void updateTextLabels();
|
---|
80 | /** Updates pixmap. */
|
---|
81 | void updatePixmap();
|
---|
82 |
|
---|
83 | /** Holds the icon instance. */
|
---|
84 | QIcon m_icon;
|
---|
85 |
|
---|
86 | /** Holds the greetings label instance. */
|
---|
87 | QIRichTextLabel *m_pLabelGreetings;
|
---|
88 | /** Holds the mode label instance. */
|
---|
89 | QIRichTextLabel *m_pLabelMode;
|
---|
90 | /** Holds a list of experience mode button instances. */
|
---|
91 | QMap<bool, QAbstractButton*> m_buttons;
|
---|
92 | /** Holds the icon label instance. */
|
---|
93 | QLabel *m_pLabelIcon;
|
---|
94 | };
|
---|
95 |
|
---|
96 | #endif /* !FEQT_INCLUDED_SRC_manager_UIWelcomePane_h */
|
---|