VirtualBox

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

Last change on this file was 106061, checked in by vboxsync, 3 weeks ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
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: */
41class QCheckBox;
42class QLabel;
43class QVBoxLayout;
44class QIDialogButtonBox;
45class QIRichTextLabel;
46class UIFilePathSelector;
47
48/** QIDialog extension providing GUI with a dialog to select an existing medium. */
49class UIBootFailureDialog : public QIMainDialog
50{
51
52 Q_OBJECT;
53
54signals:
55
56public:
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
69protected:
70
71 virtual void showEvent(QShowEvent *pEvent) RT_OVERRIDE;
72
73private 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
84private:
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 */
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