VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.h@ 104158

Last change on this file since 104158 was 104037, checked in by vboxsync, 10 months ago

FE/Qt: Fixing build (some missing includes).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
Line 
1/* $Id: UIWizardNewVMNameOSTypePage.h 104037 2024-03-25 13:28:11Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIWizardNewVMNameOSTypePage 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_wizards_newvm_UIWizardNewVMNameOSTypePage_h
29#define FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMNameOSTypePage_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QSet>
36
37/* GUI includes: */
38#include "UINativeWizardPage.h"
39
40/* Forward declarations: */
41class QCheckBox;
42class QGridLayout;
43class QIRichTextLabel;
44class UINameAndSystemEditor;
45class UIWizardNewVM;
46
47namespace UIWizardNewVMNameOSTypeCommon
48{
49 bool guessOSTypeFromName(UINameAndSystemEditor *pNameAndSystemEditor, QString strNewName);
50 bool guessOSTypeDetectedOSTypeString(UINameAndSystemEditor *pNameAndSystemEditor, QString strDetectedOSType);
51 bool createMachineFolder(UINameAndSystemEditor *pNameAndSystemEditor, UIWizardNewVM *pWizard);
52
53 /** Removes a previously created folder (if exists) before creating a new one.
54 * used during page cleanup and new folder creation. Called upon page Next/Back and
55 * wizard cancel */
56 bool cleanupMachineFolder(UIWizardNewVM *pWizard, bool fWizardCancel = false);
57 void composeMachineFilePath(UINameAndSystemEditor *pNameAndSystemEditor, UIWizardNewVM *pWizard);
58 /** Return false if ISO path is not empty but points to an missing or unreadable file. */
59 bool checkISOFile(UINameAndSystemEditor *pNameAndSystemEditor);
60}
61
62/** 1st page of the New Virtual Machine wizard (basic extension). */
63class UIWizardNewVMNameOSTypePage : public UINativeWizardPage
64{
65 Q_OBJECT;
66
67public:
68
69 /** Constructor. */
70 UIWizardNewVMNameOSTypePage();
71 void setISOFilePath(const QString &strISOFilePath);
72
73protected:
74
75 virtual bool isComplete() const RT_OVERRIDE RT_FINAL;
76 /** Validation stuff. */
77 virtual bool validatePage() RT_OVERRIDE;
78
79private slots:
80
81 void sltNameChanged(const QString &strNewText);
82 void sltPathChanged(const QString &strNewPath);
83 void sltOsTypeChanged();
84 void sltISOPathChanged(const QString &strPath);
85 void sltGuestOSFamilyChanged(const QString &strGuestOSFamilyId);
86 void sltSkipUnattendedInstallChanged(bool fSkip);
87 void sltSelectedEditionChanged(ulong uEditionIndex);
88 /** Translation stuff. */
89 virtual void sltRetranslateUI() RT_OVERRIDE RT_FINAL;
90
91private:
92
93 /** Prepare stuff. */
94 void prepare();
95 void createConnections();
96 void initializePage() RT_OVERRIDE;
97 QWidget *createNameOSTypeWidgets();
98 void markWidgets() const;
99 void setSkipCheckBoxEnable();
100 bool isUnattendedEnabled() const;
101 bool isUnattendedInstallSupported() const;
102 void setEditionSelectorEnabled();
103 void updateInfoLabel();
104
105 /** @name Widgets
106 * @{ */
107 QGridLayout *m_pNameAndSystemLayout;
108 UINameAndSystemEditor *m_pNameAndSystemEditor;
109 QCheckBox *m_pSkipUnattendedCheckBox;
110 QIRichTextLabel *m_pNameOSTypeLabel;
111 QIRichTextLabel *m_pInfoLabel;
112 /** @} */
113 QSet<QString> m_userModifiedParameters;
114};
115
116#endif /* !FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMNameOSTypePage_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