Changeset 87423 in vbox
- Timestamp:
- Jan 25, 2021 6:48:16 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 142417
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic4.cpp
r87414 r87423 20 20 #include <QMetaType> 21 21 #include <QRadioButton> 22 #include <QToolBox>23 22 #include <QVBoxLayout> 24 23 … … 158 157 void UIWizardNewVMPage4::retranslateWidgets() 159 158 { 160 m_pDiskSkip->setText(UIWizardNewVM::tr("&Do not add a virtual hard disk")); 161 m_pDiskCreate->setText(UIWizardNewVM::tr("&Create a virtual hard disk now")); 162 m_pDiskPresent->setText(UIWizardNewVM::tr("&Use an existing virtual hard disk file")); 163 m_pVMMButton->setToolTip(UIWizardNewVM::tr("Choose a virtual hard disk file...")); 159 if (m_pDiskSkip) 160 m_pDiskSkip->setText(UIWizardNewVM::tr("&Do not add a virtual hard disk")); 161 if (m_pDiskCreate) 162 m_pDiskCreate->setText(UIWizardNewVM::tr("&Create a virtual hard disk now")); 163 if (m_pDiskPresent) 164 m_pDiskPresent->setText(UIWizardNewVM::tr("&Use an existing virtual hard disk file")); 165 if (m_pVMMButton) 166 m_pVMMButton->setToolTip(UIWizardNewVM::tr("Choose a virtual hard disk file...")); 164 167 } 165 168 … … 208 211 UIWizardNewVMPageBasic4::UIWizardNewVMPageBasic4() 209 212 : m_pLabel(0) 210 , m_pToolBox(0)211 213 { 212 214 prepare(); … … 223 225 { 224 226 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 225 m_pToolBox = new QToolBox;226 227 227 228 m_pLabel = new QIRichTextLabel(this); 228 229 pMainLayout->addWidget(m_pLabel); 229 pMainLayout->addWidget(m_pToolBox); 230 231 m_pToolBox->insertItem(ToolBoxItems_Disk, createDiskWidgets(), QString()); 232 m_pToolBox->insertItem(ToolBoxItems_Hardware, createHardwareWidgets(), QString()); 233 m_pToolBox->setStyleSheet("QToolBox::tab:selected { font: bold; }"); 230 pMainLayout->addWidget(createDiskWidgets()); 234 231 235 232 pMainLayout->addStretch(); … … 275 272 QString strRecommendedHDD = field("type").value<CGuestOSType>().isNull() ? QString() : 276 273 UICommon::formatSize(field("type").value<CGuestOSType>().GetRecommendedHDD()); 277 m_pLabel->setText(UIWizardNewVM::tr("<p>If you wish you can add a virtual hard disk to the new machine. " 278 "You can either create a new hard disk file or select one from the list " 279 "or from another location using the folder icon. " 280 "If you need a more complex storage set-up you can skip this step " 281 "and make the changes to the machine settings once the machine is created. " 282 "The recommended size of the hard disk is <b>%1</b>." 283 "<p>You can also modify the virtual machine's hardware by modifying the amount of memory " 284 "and virtual processors.</p>") 285 .arg(strRecommendedHDD)); 274 if (m_pLabel) 275 m_pLabel->setText(UIWizardNewVM::tr("<p>If you wish you can add a virtual hard disk to the new machine. " 276 "You can either create a new hard disk file or select one from the list " 277 "or from another location using the folder icon. " 278 "If you need a more complex storage set-up you can skip this step " 279 "and make the changes to the machine settings once the machine is created. " 280 "The recommended size of the hard disk is <b>%1</b>.") 281 .arg(strRecommendedHDD)); 286 282 retranslateWidgets(); 287 if (m_pToolBox)288 {289 m_pToolBox->setItemText(ToolBoxItems_Disk, UIWizardNewVM::tr("Hard Disk"));290 m_pToolBox->setItemText(ToolBoxItems_Hardware, UIWizardNewVM::tr("Hardware"));291 }292 283 } 293 284 … … 302 293 CGuestOSType type = field("type").value<CGuestOSType>(); 303 294 ULONG recommendedRam = type.GetRecommendedRAM(); 304 m_pBaseMemoryEditor->setValue(recommendedRam); 295 if (m_pBaseMemoryEditor) 296 m_pBaseMemoryEditor->setValue(recommendedRam); 305 297 306 298 … … 338 330 { 339 331 /* Make sure 'virtualDisk' field feats the rules: */ 332 if (!m_pDiskSkip) 333 return false; 340 334 return m_pDiskSkip->isChecked() || 341 342 335 !m_pDiskPresent->isChecked() || 336 !uiCommon().medium(m_pDiskSelector->id()).isNull(); 343 337 } 344 338 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic4.h
r87414 r87423 34 34 /* Forward declarations: */ 35 35 class QRadioButton; 36 class QToolBox;37 36 class QIRichTextLabel; 38 37 class QIToolButton; … … 46 45 47 46 protected: 48 49 enum50 {51 ToolBoxItems_Disk,52 ToolBoxItems_Hardware53 };54 55 47 56 48 /** Constructor. */ … … 155 147 /** Widgets. */ 156 148 QIRichTextLabel *m_pLabel; 157 QToolBox *m_pToolBox;158 149 }; 159 150
Note:
See TracChangeset
for help on using the changeset viewer.