VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIBootFailureDialog.h@ 104158

Last change on this file since 104158 was 98805, checked in by vboxsync, 22 months ago

FE/Qt: bugref:10322: Runtime UI: Reworking CMachine wrapper usage step-by-step; Storage stuff related to boot dialog.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
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: */
42class QCheckBox;
43class QLabel;
44class QVBoxLayout;
45class QIDialogButtonBox;
46class QIRichTextLabel;
47class UIFilePathSelector;
48
49/** QIDialog extension providing GUI with a dialog to select an existing medium. */
50class UIBootFailureDialog : public QIWithRetranslateUI<QIMainDialog>
51{
52
53 Q_OBJECT;
54
55signals:
56
57public:
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
70protected:
71
72 virtual void showEvent(QShowEvent *pEvent) RT_OVERRIDE;
73
74private slots:
75
76 void sltCancel();
77 void sltReset();
78 void sltFileSelectorPathChanged(const QString &strPath);
79
80private:
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 */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette