Changeset 41389 in vbox
- Timestamp:
- May 22, 2012 1:04:09 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 8 edited
-
UIWizardNewVMPageBasic1.cpp (modified) (3 diffs)
-
UIWizardNewVMPageBasic1.h (modified) (2 diffs)
-
UIWizardNewVMPageBasic2.cpp (modified) (3 diffs)
-
UIWizardNewVMPageBasic2.h (modified) (3 diffs)
-
UIWizardNewVMPageBasic3.cpp (modified) (8 diffs)
-
UIWizardNewVMPageBasic3.h (modified) (3 diffs)
-
UIWizardNewVMPageExpert.cpp (modified) (9 diffs)
-
UIWizardNewVMPageExpert.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
r41387 r41389 22 22 #include <QVBoxLayout> 23 23 #include <QHBoxLayout> 24 #include <QGroupBox>25 24 #include <QLineEdit> 26 25 … … 228 227 { 229 228 m_pLabel = new QIRichTextLabel(this); 230 m_pNameAndSystemCnt = new QGroupBox(this); 231 { 232 m_pNameAndSystemCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 233 QHBoxLayout *pNameAndSystemLayout = new QHBoxLayout(m_pNameAndSystemCnt); 234 { 235 m_pNameAndSystemEditor = new UINameAndSystemEditor(m_pNameAndSystemCnt); 236 pNameAndSystemLayout->addWidget(m_pNameAndSystemEditor); 237 } 238 } 229 m_pNameAndSystemEditor = new UINameAndSystemEditor(this); 239 230 pMainLayout->addWidget(m_pLabel); 240 pMainLayout->addWidget(m_pNameAndSystem Cnt);231 pMainLayout->addWidget(m_pNameAndSystemEditor); 241 232 pMainLayout->addStretch(); 242 233 } … … 275 266 "The name you choose will be used throughout VirtualBox " 276 267 "to identify this machine.")); 277 m_pNameAndSystemCnt->setTitle(UIWizardNewVM::tr("Name and operating system"));278 268 } 279 269 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h
r41387 r41389 24 24 25 25 /* Forward declarations: */ 26 class QGroupBox;27 26 class UINameAndSystemEditor; 28 27 class QIRichTextLabel; … … 58 57 59 58 /* Widgets: */ 60 QGroupBox *m_pNameAndSystemCnt;61 59 UINameAndSystemEditor *m_pNameAndSystemEditor; 62 60 }; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp
r41373 r41389 23 23 #include <QGridLayout> 24 24 #include <QSpacerItem> 25 #include <QGroupBox>26 25 #include <QLabel> 27 26 … … 60 59 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 61 60 { 62 m_pLabel 1= new QIRichTextLabel(this);63 m_pMemoryCnt = new QGroupBox(this);61 m_pLabel = new QIRichTextLabel(this); 62 QGridLayout *pMemoryLayout = new QGridLayout; 64 63 { 65 m_pMemoryCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 66 QGridLayout *pMemoryCntLayout = new QGridLayout(m_pMemoryCnt); 64 m_pRamSlider = new VBoxGuestRAMSlider(this); 67 65 { 68 m_pRamSlider = new VBoxGuestRAMSlider(m_pMemoryCnt); 69 { 70 m_pRamSlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); 71 m_pRamSlider->setOrientation(Qt::Horizontal); 72 m_pRamSlider->setTickPosition(QSlider::TicksBelow); 73 } 74 m_pRamEditor = new QILineEdit(m_pMemoryCnt); 75 { 76 m_pRamEditor->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); 77 m_pRamEditor->setFixedWidthByText("88888"); 78 m_pRamEditor->setAlignment(Qt::AlignRight); 79 m_pRamEditor->setValidator(new QIntValidator(m_pRamSlider->minRAM(), m_pRamSlider->maxRAM(), this)); 80 } 81 m_pRamUnits = new QLabel(m_pMemoryCnt); 82 { 83 m_pRamUnits->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 84 } 85 m_pRamMin = new QLabel(m_pMemoryCnt); 86 { 87 m_pRamMin->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 88 } 89 QSpacerItem *m_pRamSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding); 90 m_pRamMax = new QLabel(m_pMemoryCnt); 91 { 92 m_pRamMax->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 93 } 94 pMemoryCntLayout->addWidget(m_pRamSlider, 0, 0, 1, 3); 95 pMemoryCntLayout->addWidget(m_pRamEditor, 0, 3); 96 pMemoryCntLayout->addWidget(m_pRamUnits, 0, 4); 97 pMemoryCntLayout->addWidget(m_pRamMin, 1, 0); 98 pMemoryCntLayout->addItem(m_pRamSpacer, 1, 1); 99 pMemoryCntLayout->addWidget(m_pRamMax, 1, 2); 66 m_pRamSlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); 67 m_pRamSlider->setOrientation(Qt::Horizontal); 68 m_pRamSlider->setTickPosition(QSlider::TicksBelow); 100 69 } 70 m_pRamEditor = new QILineEdit(this); 71 { 72 m_pRamEditor->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); 73 m_pRamEditor->setFixedWidthByText("88888"); 74 m_pRamEditor->setAlignment(Qt::AlignRight); 75 m_pRamEditor->setValidator(new QIntValidator(m_pRamSlider->minRAM(), m_pRamSlider->maxRAM(), this)); 76 } 77 m_pRamUnits = new QLabel(this); 78 { 79 m_pRamUnits->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 80 } 81 m_pRamMin = new QLabel(this); 82 { 83 m_pRamMin->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 84 } 85 m_pRamMax = new QLabel(this); 86 { 87 m_pRamMax->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 88 } 89 pMemoryLayout->addWidget(m_pRamSlider, 0, 0, 1, 3); 90 pMemoryLayout->addWidget(m_pRamEditor, 0, 3); 91 pMemoryLayout->addWidget(m_pRamUnits, 0, 4); 92 pMemoryLayout->addWidget(m_pRamMin, 1, 0); 93 pMemoryLayout->setColumnStretch(1, 1); 94 pMemoryLayout->addWidget(m_pRamMax, 1, 2); 101 95 } 102 pMainLayout->addWidget(m_pLabel 1);103 pMainLayout->add Widget(m_pMemoryCnt);96 pMainLayout->addWidget(m_pLabel); 97 pMainLayout->addLayout(pMemoryLayout); 104 98 pMainLayout->addStretch(); 105 99 } … … 139 133 QString strRecommendedRAM = field("type").value<CGuestOSType>().isNull() ? 140 134 QString() : QString::number(field("type").value<CGuestOSType>().GetRecommendedRAM()); 141 m_pLabel1->setText(UIWizardNewVM::tr("<p>Select the amount of memory (RAM) in megabytes " 142 "to be allocated to the virtual machine.</p>" 143 "<p>The recommended memory size is <b>%1</b> MB.</p>") 144 .arg(strRecommendedRAM)); 145 m_pMemoryCnt->setTitle(UIWizardNewVM::tr("&Memory size")); 135 m_pLabel->setText(UIWizardNewVM::tr("<p>Select the amount of memory (RAM) in megabytes " 136 "to be allocated to the virtual machine.</p>" 137 "<p>The recommended memory size is <b>%1</b> MB.</p>") 138 .arg(strRecommendedRAM)); 146 139 m_pRamUnits->setText(VBoxGlobal::tr("MB", "size suffix MBytes=1024 KBytes")); 147 140 m_pRamMin->setText(QString("%1 %2").arg(m_pRamSlider->minRAM()).arg(VBoxGlobal::tr("MB", "size suffix MBytes=1024 KBytes"))); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.h
r41373 r41389 24 24 25 25 /* Forward declarations: */ 26 class QGroupBox;27 26 class VBoxGuestRAMSlider; 28 27 class QILineEdit; … … 43 42 44 43 /* Widgets: */ 45 QGroupBox *m_pMemoryCnt;46 44 VBoxGuestRAMSlider *m_pRamSlider; 47 45 QILineEdit *m_pRamEditor; … … 79 77 80 78 /* Widgets: */ 81 QIRichTextLabel *m_pLabel 1;79 QIRichTextLabel *m_pLabel; 82 80 }; 83 81 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp
r41373 r41389 22 22 #include <QVBoxLayout> 23 23 #include <QGridLayout> 24 #include <QGroupBox>25 24 #include <QRadioButton> 26 25 … … 43 42 { 44 43 /* Enable/disable controls: */ 45 m_pDiskCreate->setEnabled(m_pDiskCnt->isChecked()); 46 m_pDiskPresent->setEnabled(m_pDiskCnt->isChecked()); 47 m_pDiskSelector->setEnabled(m_pDiskPresent->isEnabled() && m_pDiskPresent->isChecked()); 48 m_pVMMButton->setEnabled(m_pDiskPresent->isEnabled() && m_pDiskPresent->isChecked()); 44 m_pDiskSelector->setEnabled(m_pDiskPresent->isChecked()); 45 m_pVMMButton->setEnabled(m_pDiskPresent->isChecked()); 49 46 50 47 /* Fetch filed values: */ 51 if (m_pDiskCnt->isChecked() && m_pDiskPresent->isChecked()) 48 if (m_pDiskSkip->isChecked()) 49 { 50 m_strVirtualDiskId = QString(); 51 m_strVirtualDiskName = QString(); 52 m_strVirtualDiskLocation = QString(); 53 } 54 else if (m_pDiskPresent->isChecked()) 52 55 { 53 56 m_strVirtualDiskId = m_pDiskSelector->id(); 54 57 m_strVirtualDiskName = m_pDiskSelector->currentText(); 55 58 m_strVirtualDiskLocation = m_pDiskSelector->location(); 56 }57 else58 {59 m_strVirtualDiskId = QString();60 m_strVirtualDiskName = QString();61 m_strVirtualDiskLocation = QString();62 59 } 63 60 } … … 131 128 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 132 129 { 133 m_pLabel 1= new QIRichTextLabel(this);134 m_pDiskCnt = new QGroupBox(this);130 m_pLabel = new QIRichTextLabel(this); 131 QGridLayout *pDiskLayout = new QGridLayout; 135 132 { 136 m_pDiskCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 137 m_pDiskCnt->setCheckable(true); 138 QGridLayout *pDiskLayout = new QGridLayout(m_pDiskCnt); 133 m_pDiskSkip = new QRadioButton(this); 134 m_pDiskCreate = new QRadioButton(this); 135 m_pDiskPresent = new QRadioButton(this); 136 QStyleOptionButton options; 137 options.initFrom(m_pDiskPresent); 138 int iWidth = m_pDiskPresent->style()->pixelMetric(QStyle::PM_ExclusiveIndicatorWidth, &options, m_pDiskPresent); 139 pDiskLayout->setColumnMinimumWidth(0, iWidth); 140 m_pDiskSelector = new VBoxMediaComboBox(this); 139 141 { 140 m_pDiskCreate = new QRadioButton(m_pDiskCnt); 141 m_pDiskPresent = new QRadioButton(m_pDiskCnt); 142 QStyleOptionButton options; 143 options.initFrom(m_pDiskCreate); 144 int iWidth = m_pDiskCreate->style()->subElementRect(QStyle::SE_RadioButtonIndicator, &options, m_pDiskCreate).width() + 145 m_pDiskCreate->style()->pixelMetric(QStyle::PM_RadioButtonLabelSpacing, &options, m_pDiskCreate) - 146 pDiskLayout->spacing() - 1; 147 QSpacerItem *pSpacer = new QSpacerItem(iWidth, 0, QSizePolicy::Fixed, QSizePolicy::Fixed); 148 m_pDiskSelector = new VBoxMediaComboBox(m_pDiskCnt); 149 { 150 m_pDiskSelector->setType(VBoxDefs::MediumType_HardDisk); 151 m_pDiskSelector->repopulate(); 152 } 153 m_pVMMButton = new QIToolButton(m_pDiskCnt); 154 { 155 m_pVMMButton->setAutoRaise(true); 156 m_pVMMButton->setIcon(UIIconPool::iconSet(":/select_file_16px.png", ":/select_file_dis_16px.png")); 157 } 158 pDiskLayout->addWidget(m_pDiskCreate, 0, 0, 1, 3); 159 pDiskLayout->addWidget(m_pDiskPresent, 1, 0, 1, 3); 160 pDiskLayout->addItem(pSpacer, 2, 0); 161 pDiskLayout->addWidget(m_pDiskSelector, 2, 1); 162 pDiskLayout->addWidget(m_pVMMButton, 2, 2); 142 m_pDiskSelector->setType(VBoxDefs::MediumType_HardDisk); 143 m_pDiskSelector->repopulate(); 163 144 } 145 m_pVMMButton = new QIToolButton(this); 146 { 147 m_pVMMButton->setAutoRaise(true); 148 m_pVMMButton->setIcon(UIIconPool::iconSet(":/select_file_16px.png", ":/select_file_dis_16px.png")); 149 } 150 pDiskLayout->addWidget(m_pDiskSkip, 0, 0, 1, 3); 151 pDiskLayout->addWidget(m_pDiskCreate, 1, 0, 1, 3); 152 pDiskLayout->addWidget(m_pDiskPresent, 2, 0, 1, 3); 153 pDiskLayout->addWidget(m_pDiskSelector, 3, 1); 154 pDiskLayout->addWidget(m_pVMMButton, 3, 2); 164 155 } 165 pMainLayout->addWidget(m_pLabel 1);166 pMainLayout->add Widget(m_pDiskCnt);156 pMainLayout->addWidget(m_pLabel); 157 pMainLayout->addLayout(pDiskLayout); 167 158 pMainLayout->addStretch(); 168 159 updateVirtualDiskSource(); … … 170 161 171 162 /* Setup connections: */ 172 connect(m_pDisk Cnt, SIGNAL(toggled(bool)), this, SLOT(sltVirtualDiskSourceChanged()));163 connect(m_pDiskSkip, SIGNAL(toggled(bool)), this, SLOT(sltVirtualDiskSourceChanged())); 173 164 connect(m_pDiskCreate, SIGNAL(toggled(bool)), this, SLOT(sltVirtualDiskSourceChanged())); 174 165 connect(m_pDiskPresent, SIGNAL(toggled(bool)), this, SLOT(sltVirtualDiskSourceChanged())); … … 208 199 QString strRecommendedHDD = field("type").value<CGuestOSType>().isNull() ? QString() : 209 200 VBoxGlobal::formatSize(field("type").value<CGuestOSType>().GetRecommendedHDD()); 210 m_pLabel 1->setText(UIWizardNewVM::tr("<p>If you wish you can add a virtual hard drive to the new machine. "211 "You can either create a new hard drive file or select one from the list "212 "or from another location using the folder icon.</p>"213 "<p>If you need a more complex storage set-up you can skip this step "214 "and make the changes to the machine settings once the machine is created.</p>"215 "<p>The recommended size of the hard drive is <b>%1</b>.</p>")216 .arg(strRecommendedHDD));217 m_pDisk Cnt->setTitle(UIWizardNewVM::tr("Hard &drive"));201 m_pLabel->setText(UIWizardNewVM::tr("<p>If you wish you can add a virtual hard drive to the new machine. " 202 "You can either create a new hard drive file or select one from the list " 203 "or from another location using the folder icon.</p>" 204 "<p>If you need a more complex storage set-up you can skip this step " 205 "and make the changes to the machine settings once the machine is created.</p>" 206 "<p>The recommended size of the hard drive is <b>%1</b>.</p>") 207 .arg(strRecommendedHDD)); 208 m_pDiskSkip->setText(UIWizardNewVM::tr("&Do not add virtual hard drive")); 218 209 m_pDiskCreate->setText(UIWizardNewVM::tr("&Create new virtual hard drive")); 219 210 m_pDiskPresent->setText(UIWizardNewVM::tr("&Use existing virtual hard drive file")); … … 227 218 228 219 /* Prepare initial choice: */ 229 m_pDiskCnt->setChecked(true); 220 m_pDiskCreate->setFocus(); 221 m_pDiskCreate->setChecked(true); 230 222 m_pDiskSelector->setCurrentIndex(0); 231 m_pDiskCreate->setChecked(true);232 233 /* 'Create new hard-disk' should have focus initially: */234 m_pDiskCreate->setFocus();235 223 } 236 224 … … 245 233 { 246 234 /* Make sure 'virtualDisk' field feats the rules: */ 247 return !m_pDiskCnt->isChecked() ||235 return m_pDiskSkip->isChecked() || 248 236 !m_pDiskPresent->isChecked() || 249 237 !vboxGlobal().findMedium(m_pDiskSelector->id()).isNull(); … … 256 244 257 245 /* Ensure unused virtual-disk is deleted: */ 258 if ( !m_pDiskCnt->isChecked() || m_pDiskCreate->isChecked() || (!m_virtualDisk.isNull() && m_strVirtualDiskId != m_virtualDisk.GetId()))246 if (m_pDiskSkip->isChecked() || m_pDiskCreate->isChecked() || (!m_virtualDisk.isNull() && m_strVirtualDiskId != m_virtualDisk.GetId())) 259 247 ensureNewVirtualDiskDeleted(); 260 248 261 if ( !m_pDiskCnt->isChecked())249 if (m_pDiskSkip->isChecked()) 262 250 { 263 251 /* Ask user about disk-less machine: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.h
r41373 r41389 28 28 29 29 /* Forward declarations: */ 30 class QGroupBox;31 30 class QRadioButton; 32 31 class VBoxMediaComboBox; … … 73 72 74 73 /* Widgets: */ 75 Q GroupBox *m_pDiskCnt;74 QRadioButton *m_pDiskSkip; 76 75 QRadioButton *m_pDiskCreate; 77 76 QRadioButton *m_pDiskPresent; … … 121 120 122 121 /* Widgets: */ 123 QIRichTextLabel *m_pLabel 1;122 QIRichTextLabel *m_pLabel; 124 123 }; 125 124 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r41387 r41389 56 56 { 57 57 m_pMemoryCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 58 QGridLayout *pMemory CntLayout = new QGridLayout(m_pMemoryCnt);58 QGridLayout *pMemoryLayout = new QGridLayout(m_pMemoryCnt); 59 59 { 60 60 m_pRamSlider = new VBoxGuestRAMSlider(m_pMemoryCnt); … … 81 81 m_pRamMin->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 82 82 } 83 QSpacerItem *m_pRamSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding);84 83 m_pRamMax = new QLabel(m_pMemoryCnt); 85 84 { 86 85 m_pRamMax->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 87 86 } 88 pMemory CntLayout->addWidget(m_pRamSlider, 0, 0, 1, 3);89 pMemory CntLayout->addWidget(m_pRamEditor, 0, 3);90 pMemory CntLayout->addWidget(m_pRamUnits, 0, 4);91 pMemory CntLayout->addWidget(m_pRamMin, 1, 0);92 pMemory CntLayout->addItem(m_pRamSpacer,1, 1);93 pMemory CntLayout->addWidget(m_pRamMax, 1, 2);87 pMemoryLayout->addWidget(m_pRamSlider, 0, 0, 1, 3); 88 pMemoryLayout->addWidget(m_pRamEditor, 0, 3); 89 pMemoryLayout->addWidget(m_pRamUnits, 0, 4); 90 pMemoryLayout->addWidget(m_pRamMin, 1, 0); 91 pMemoryLayout->setColumnStretch(1, 1); 92 pMemoryLayout->addWidget(m_pRamMax, 1, 2); 94 93 } 95 94 } … … 97 96 { 98 97 m_pDiskCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 99 m_pDiskCnt->setCheckable(true); 100 m_pDiskCnt->setChecked(true); 101 QGridLayout *pDiskCntLayout = new QGridLayout(m_pDiskCnt); 102 { 98 QGridLayout *pDiskLayout = new QGridLayout(m_pDiskCnt); 99 { 100 m_pDiskSkip = new QRadioButton(m_pDiskCnt); 103 101 m_pDiskCreate = new QRadioButton(m_pDiskCnt); 104 102 { … … 107 105 m_pDiskPresent = new QRadioButton(m_pDiskCnt); 108 106 QStyleOptionButton options; 109 options.initFrom(m_pDiskCreate); 110 int iWidth = m_pDiskCreate->style()->subElementRect(QStyle::SE_RadioButtonIndicator, &options, m_pDiskCreate).width() + 111 m_pDiskCreate->style()->pixelMetric(QStyle::PM_RadioButtonLabelSpacing, &options, m_pDiskCreate) - 112 pDiskCntLayout->spacing() - 1; 113 QSpacerItem *pSpacer = new QSpacerItem(iWidth, 0, QSizePolicy::Fixed, QSizePolicy::Fixed); 107 options.initFrom(m_pDiskPresent); 108 int iWidth = m_pDiskPresent->style()->pixelMetric(QStyle::PM_ExclusiveIndicatorWidth, &options, m_pDiskPresent); 109 pDiskLayout->setColumnMinimumWidth(0, iWidth); 114 110 m_pDiskSelector = new VBoxMediaComboBox(m_pDiskCnt); 115 111 { … … 122 118 m_pVMMButton->setIcon(UIIconPool::iconSet(":/select_file_16px.png", ":/select_file_dis_16px.png")); 123 119 } 124 pDisk CntLayout->addWidget(m_pDiskCreate, 0, 0, 1, 3);125 pDisk CntLayout->addWidget(m_pDiskPresent, 1, 0, 1, 3);126 pDisk CntLayout->addItem(pSpacer, 2, 0);127 pDisk CntLayout->addWidget(m_pDiskSelector, 2, 1);128 pDisk CntLayout->addWidget(m_pVMMButton, 2, 2);120 pDiskLayout->addWidget(m_pDiskSkip, 0, 0, 1, 3); 121 pDiskLayout->addWidget(m_pDiskCreate, 1, 0, 1, 3); 122 pDiskLayout->addWidget(m_pDiskPresent, 2, 0, 1, 3); 123 pDiskLayout->addWidget(m_pDiskSelector, 3, 1); 124 pDiskLayout->addWidget(m_pVMMButton, 3, 2); 129 125 } 130 126 } … … 141 137 connect(m_pRamSlider, SIGNAL(valueChanged(int)), this, SLOT(sltRamSliderValueChanged(int))); 142 138 connect(m_pRamEditor, SIGNAL(textChanged(const QString &)), this, SLOT(sltRamEditorTextChanged(const QString &))); 143 connect(m_pDisk Cnt, SIGNAL(toggled(bool)), this, SLOT(sltVirtualDiskSourceChanged()));139 connect(m_pDiskSkip, SIGNAL(toggled(bool)), this, SLOT(sltVirtualDiskSourceChanged())); 144 140 connect(m_pDiskCreate, SIGNAL(toggled(bool)), this, SLOT(sltVirtualDiskSourceChanged())); 145 141 connect(m_pDiskPresent, SIGNAL(toggled(bool)), this, SLOT(sltVirtualDiskSourceChanged())); … … 229 225 m_pRamMin->setText(QString("%1 %2").arg(m_pRamSlider->minRAM()).arg(VBoxGlobal::tr("MB", "size suffix MBytes=1024 KBytes"))); 230 226 m_pRamMax->setText(QString("%1 %2").arg(m_pRamSlider->maxRAM()).arg(VBoxGlobal::tr("MB", "size suffix MBytes=1024 KBytes"))); 231 m_pDiskCnt->setTitle(UIWizardNewVM::tr("Hard &drive")); 227 m_pDiskCnt->setTitle(UIWizardNewVM::tr("Hard drive")); 228 m_pDiskSkip->setText(UIWizardNewVM::tr("&Do not add virtual hard drive")); 232 229 m_pDiskCreate->setText(UIWizardNewVM::tr("&Create new virtual hard drive")); 233 230 m_pDiskPresent->setText(UIWizardNewVM::tr("&Use existing virtual hard drive file")); … … 255 252 return UIWizardPage::isComplete() && 256 253 (m_pRamSlider->value() >= qMax(1, (int)m_pRamSlider->minRAM()) && m_pRamSlider->value() <= (int)m_pRamSlider->maxRAM()) && 257 ( !m_pDiskCnt->isChecked() || !m_pDiskPresent->isChecked() || !vboxGlobal().findMedium(m_pDiskSelector->id()).isNull());254 (m_pDiskSkip->isChecked() || !m_pDiskPresent->isChecked() || !vboxGlobal().findMedium(m_pDiskSelector->id()).isNull()); 258 255 } 259 256 … … 277 274 if (fResult) 278 275 { 279 if (m_pDiskC nt->isChecked() && m_pDiskCreate->isChecked())276 if (m_pDiskCreate->isChecked()) 280 277 { 281 278 /* Show the New Virtual Hard Drive wizard if necessary: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
r41373 r41389 24 24 #include "UIWizardNewVMPageBasic2.h" 25 25 #include "UIWizardNewVMPageBasic3.h" 26 27 /* Forward declarations: */ 28 class QGroupBox; 26 29 27 30 /* Expert page of the New Virtual Machine wizard: */ … … 72 75 bool isComplete() const; 73 76 bool validatePage(); 77 78 /* Widgets: */ 79 QGroupBox *m_pNameAndSystemCnt; 80 QGroupBox *m_pMemoryCnt; 81 QGroupBox *m_pDiskCnt; 74 82 }; 75 83
Note:
See TracChangeset
for help on using the changeset viewer.

