1 | /* $Id: UIBootFailureDialog.h 106061 2024-09-16 14:03:52Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIBootFailureDialog class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-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_runtime_UIBootFailureDialog_h
|
---|
29 | #define FEQT_INCLUDED_SRC_runtime_UIBootFailureDialog_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* GUI includes: */
|
---|
35 | #include "QIMainDialog.h"
|
---|
36 | #include "UIMedium.h"
|
---|
37 | #include "UIMediumDefs.h"
|
---|
38 |
|
---|
39 |
|
---|
40 | /* Forward declarations: */
|
---|
41 | class QCheckBox;
|
---|
42 | class QLabel;
|
---|
43 | class QVBoxLayout;
|
---|
44 | class QIDialogButtonBox;
|
---|
45 | class QIRichTextLabel;
|
---|
46 | class UIFilePathSelector;
|
---|
47 |
|
---|
48 | /** QIDialog extension providing GUI with a dialog to select an existing medium. */
|
---|
49 | class UIBootFailureDialog : public QIMainDialog
|
---|
50 | {
|
---|
51 |
|
---|
52 | Q_OBJECT;
|
---|
53 |
|
---|
54 | signals:
|
---|
55 |
|
---|
56 | public:
|
---|
57 |
|
---|
58 | enum ReturnCode
|
---|
59 | {
|
---|
60 | ReturnCode_Close = 0,
|
---|
61 | ReturnCode_Reset,
|
---|
62 | ReturnCode_Max
|
---|
63 | };
|
---|
64 |
|
---|
65 | UIBootFailureDialog(QWidget *pParent);
|
---|
66 | ~UIBootFailureDialog();
|
---|
67 | QString bootMediumPath() const;
|
---|
68 |
|
---|
69 | protected:
|
---|
70 |
|
---|
71 | virtual void showEvent(QShowEvent *pEvent) RT_OVERRIDE;
|
---|
72 |
|
---|
73 | private slots:
|
---|
74 |
|
---|
75 | void sltCancel();
|
---|
76 | void sltReset();
|
---|
77 | void sltFileSelectorPathChanged(const QString &strPath);
|
---|
78 | /** @name Event-handling stuff.
|
---|
79 | * @{ */
|
---|
80 | /** Handles translation event. */
|
---|
81 | void sltRetranslateUI();
|
---|
82 | /** @} */
|
---|
83 |
|
---|
84 | private:
|
---|
85 |
|
---|
86 | QPixmap iconPixmap();
|
---|
87 | /* Checks if selected iso exists and readable. Returns false if not. Returns true if nothing is selected. */
|
---|
88 | bool checkISOImage() const;
|
---|
89 |
|
---|
90 | /** @name Prepare/cleanup cascade.
|
---|
91 | * @{ */
|
---|
92 | /** Configures all. */
|
---|
93 | void configure();
|
---|
94 | void prepareWidgets();
|
---|
95 | void prepareConnections();
|
---|
96 | /** @} */
|
---|
97 |
|
---|
98 | void setTitle();
|
---|
99 | QWidget *m_pParent;
|
---|
100 |
|
---|
101 | QWidget *m_pCentralWidget;
|
---|
102 | QVBoxLayout *m_pMainLayout;
|
---|
103 | QIDialogButtonBox *m_pButtonBox;
|
---|
104 | QPushButton *m_pCloseButton;
|
---|
105 | QPushButton *m_pResetButton;
|
---|
106 | QIRichTextLabel *m_pLabel;
|
---|
107 | UIFilePathSelector *m_pBootImageSelector;
|
---|
108 | QLabel *m_pBootImageLabel;
|
---|
109 | QLabel *m_pIconLabel;
|
---|
110 | QCheckBox *m_pSuppressDialogCheckBox;
|
---|
111 | };
|
---|
112 |
|
---|
113 | #endif /* !FEQT_INCLUDED_SRC_runtime_UIBootFailureDialog_h */
|
---|