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