VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h@ 76581

Last change on this file since 76581 was 76581, checked in by vboxsync, 6 years ago

Fe/QT: scm header guard alignment.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 KB
Line 
1/* $Id: UIWizardNewVMPageBasic1.h 76581 2019-01-01 06:24:57Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIWizardNewVMPageBasic1 class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasic1_h
19#define FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasic1_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* Local includes: */
25#include "UIWizardPage.h"
26
27/* Forward declarations: */
28class UINameAndSystemEditor;
29class QIRichTextLabel;
30
31/* 1st page of the New Virtual Machine wizard (base part): */
32class UIWizardNewVMPage1 : public UIWizardPageBase
33{
34protected:
35
36 /* Constructor: */
37 UIWizardNewVMPage1(const QString &strGroup);
38
39 /* Handlers: */
40 void onNameChanged(QString strNewName);
41 void onOsTypeChanged();
42
43 bool createMachineFolder();
44 /** Removes a previously created folder (if exists) before creating a new one.
45 * used during page cleanup and new folder creation. */
46 bool cleanupMachineFolder();
47
48 QString machineFilePath() const;
49 void setMachineFilePath(const QString &strMachineFilePath);
50
51 QString machineFolder() const;
52 void setMachineFolder(const QString &strMachineFolder);
53
54 QString machineBaseName() const;
55 void setMachineBaseName(const QString &strMachineBaseName);
56
57 /** calls CVirtualBox::ComposeMachineFilename(...) and sets related member variables */
58 void composeMachineFilePath();
59
60 /** Provides a path selector and a line edit field for path and name entry. */
61 UINameAndSystemEditor *m_pNameAndSystemEditor;
62
63private:
64
65 /** Full path (including the file name) of the machine's configuration file. */
66 QString m_strMachineFilePath;
67 /** Path of the folder hosting the machine's configuration file. Generated from m_strMachineFilePath. */
68 QString m_strMachineFolder;
69 /** Path of the folder created by this wizard page. Used to remove previously created
70 * folder. see cleanupMachineFolder();*/
71 QString m_strCreatedFolder;
72 /** Base name of the machine is generated from the m_strMachineFilePath. */
73 QString m_strMachineBaseName;
74
75
76 QString m_strGroup;
77 bool m_fSupportsHWVirtEx;
78 bool m_fSupportsLongMode;
79};
80
81/* 1st page of the New Virtual Machine wizard (basic extension): */
82class UIWizardNewVMPageBasic1 : public UIWizardPage, public UIWizardNewVMPage1
83{
84 Q_OBJECT;
85 Q_PROPERTY(QString machineFilePath READ machineFilePath WRITE setMachineFilePath);
86 Q_PROPERTY(QString machineFolder READ machineFolder WRITE setMachineFolder);
87 Q_PROPERTY(QString machineBaseName READ machineBaseName WRITE setMachineBaseName);
88
89public:
90
91 /* Constructor: */
92 UIWizardNewVMPageBasic1(const QString &strGroup);
93
94protected:
95
96 /* Wrapper to access 'this' from base part: */
97 UIWizardPage* thisImp() { return this; }
98
99private slots:
100
101 /* Handlers: */
102 void sltNameChanged(const QString &strNewText);
103 void sltPathChanged(const QString &strNewPath);
104 void sltOsTypeChanged();
105
106private:
107
108 /* Translation stuff: */
109 void retranslateUi();
110
111 /* Prepare stuff: */
112 void initializePage();
113 void cleanupPage();
114
115 /* Validation stuff: */
116 bool validatePage();
117
118 /* Widgets: */
119 QIRichTextLabel *m_pLabel;
120};
121
122#endif /* !FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasic1_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