Changeset 87956 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 4, 2021 5:56:15 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic4.cpp
r87955 r87956 119 119 } 120 120 121 QWidget *UIWizardNewVMPage4::create DiskVariantAndSizeWidgets()121 QWidget *UIWizardNewVMPage4::createNewDiskWidgets() 122 122 { 123 123 return new QWidget(); … … 150 150 } 151 151 pDiskLayout->addWidget(m_pDiskNew, 0, 0, 1, 6); 152 pDiskLayout->addWidget(create DiskVariantAndSizeWidgets(), 1, 2, 3, 4);152 pDiskLayout->addWidget(createNewDiskWidgets(), 1, 2, 3, 4); 153 153 pDiskLayout->addWidget(m_pDiskExisting, 4, 0, 1, 6); 154 154 pDiskLayout->addWidget(m_pDiskSelector, 5, 2, 1, 3); … … 220 220 } 221 221 222 QWidget *UIWizardNewVMPageBasic4::create DiskVariantAndSizeWidgets()222 QWidget *UIWizardNewVMPageBasic4::createNewDiskWidgets() 223 223 { 224 224 QWidget *pWidget = new QWidget; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic4.h
r87946 r87956 61 61 62 62 virtual QWidget *createDiskWidgets(); 63 virtual QWidget *create DiskVariantAndSizeWidgets();63 virtual QWidget *createNewDiskWidgets(); 64 64 void getWithFileOpenDialog(); 65 65 void retranslateWidgets(); … … 128 128 void prepare(); 129 129 void createConnections(); 130 QWidget *create DiskVariantAndSizeWidgets();130 QWidget *createNewDiskWidgets(); 131 131 void retranslateUi(); 132 132 void initializePage(); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r87954 r87956 17 17 18 18 /* Qt includes: */ 19 #include <QButtonGroup> 19 20 #include <QCheckBox> 20 21 #include <QGridLayout> … … 31 32 #include "QIToolButton.h" 32 33 #include "UIBaseMemoryEditor.h" 34 #include "UIConverter.h" 33 35 #include "UIFilePathSelector.h" 34 36 #include "UIIconPool.h" … … 47 49 , m_pToolBox(0) 48 50 , m_pInstallationISOContainer(0) 51 , m_pDiskFormatGroupBox(0) 52 , m_pDiskVariantGroupBox(0) 53 , m_pDiskLocationGroupBox(0) 54 , m_pDiskSizeGroupBox(0) 55 49 56 { 50 57 /* Create widgets: */ … … 173 180 m_pToolBox->setPageTitle(ExpertToolboxItems_Hardware, UIWizardNewVM::tr("Hardware")); 174 181 } 182 183 184 if (m_pDiskLocationGroupBox) 185 m_pDiskLocationGroupBox->setTitle(UIWizardNewVM::tr("Hard disk file &location")); 186 if (m_pDiskSizeGroupBox) 187 m_pDiskSizeGroupBox->setTitle(UIWizardNewVM::tr("Hard disk file &size")); 188 if (m_pDiskFormatGroupBox) 189 m_pDiskFormatGroupBox->setTitle(UIWizardNewVM::tr("Hard disk file &type")); 190 if (m_pFormatButtonGroup) 191 { 192 QList<QAbstractButton*> buttons = m_pFormatButtonGroup->buttons(); 193 for (int i = 0; i < buttons.size(); ++i) 194 { 195 QAbstractButton *pButton = buttons[i]; 196 UIMediumFormat enmFormat = gpConverter->fromInternalString<UIMediumFormat>(m_formatNames[m_pFormatButtonGroup->id(pButton)]); 197 pButton->setText(gpConverter->toString(enmFormat)); 198 } 199 } 200 if (m_pDiskVariantGroupBox) 201 m_pDiskVariantGroupBox->setTitle(UIWizardNewVM::tr("Storage on physical hard disk")); 202 175 203 } 176 204 … … 359 387 } 360 388 361 QWidget *UIWizardNewVMPageExpert::create DiskWidgets()362 { 363 QWidget *p DiskContainerWidget = new QWidget;364 QGridLayout *pDiskContainerLayout = new QGridLayout(p DiskContainerWidget);389 QWidget *UIWizardNewVMPageExpert::createNewDiskWidgets() 390 { 391 QWidget *pNewDiskContainerWidget = new QWidget; 392 QGridLayout *pDiskContainerLayout = new QGridLayout(pNewDiskContainerWidget); 365 393 366 394 /* Disk location widgets: */ 367 QGroupBox *pLocationGroupBox = new QGroupBox;368 QHBoxLayout *pLocationLayout = new QHBoxLayout( pLocationGroupBox);395 m_pDiskLocationGroupBox = new QGroupBox; 396 QHBoxLayout *pLocationLayout = new QHBoxLayout(m_pDiskLocationGroupBox); 369 397 m_pLocationEditor = new QLineEdit; 370 398 m_pLocationOpenButton = new QIToolButton; … … 378 406 379 407 /* Disk file size widgets: */ 380 QGroupBox *pDiskSizeGroupBox = new QGroupBox;381 QHBoxLayout *pDiskSizeLayout = new QHBoxLayout( pDiskSizeGroupBox);408 m_pDiskSizeGroupBox = new QGroupBox; 409 QHBoxLayout *pDiskSizeLayout = new QHBoxLayout(m_pDiskSizeGroupBox); 382 410 m_pSizeEditor = new UIMediumSizeEditor; 383 411 pDiskSizeLayout->addWidget(m_pSizeEditor); 384 412 385 413 /* Disk file format widgets: */ 386 QGroupBox *pDiskFormatGroupBox = new QGroupBox;387 QHBoxLayout *pDiskFormatLayout = new QHBoxLayout( pDiskFormatGroupBox);414 m_pDiskFormatGroupBox = new QGroupBox; 415 QHBoxLayout *pDiskFormatLayout = new QHBoxLayout(m_pDiskFormatGroupBox); 388 416 m_pSizeEditor = new UIMediumSizeEditor; 389 417 pDiskFormatLayout->addWidget(createFormatButtonGroup(true)); 390 418 391 419 /* Disk variant and dik split widgets: */ 392 QGroupBox *pDiskVariantGroupBox= new QGroupBox;393 QVBoxLayout *pDiskVariantLayout = new QVBoxLayout( pDiskVariantGroupBox);420 m_pDiskVariantGroupBox = new QGroupBox; 421 QVBoxLayout *pDiskVariantLayout = new QVBoxLayout(m_pDiskVariantGroupBox); 394 422 pDiskVariantLayout->addWidget(createMediumVariantWidgets(false /* fWithLabels */)); 395 423 396 pDiskContainerLayout->addWidget( pLocationGroupBox, 0, 0, 1, 2);397 pDiskContainerLayout->addWidget( pDiskSizeGroupBox, 1, 0, 1, 2);398 pDiskContainerLayout->addWidget( pDiskFormatGroupBox, 2, 0, 1, 1);399 pDiskContainerLayout->addWidget( pDiskVariantGroupBox, 2, 1, 1, 1);400 401 return p DiskContainerWidget;424 pDiskContainerLayout->addWidget(m_pDiskLocationGroupBox, 0, 0, 1, 2); 425 pDiskContainerLayout->addWidget(m_pDiskSizeGroupBox, 1, 0, 1, 2); 426 pDiskContainerLayout->addWidget(m_pDiskFormatGroupBox, 2, 0, 1, 1); 427 pDiskContainerLayout->addWidget(m_pDiskVariantGroupBox, 2, 1, 1, 1); 428 429 return pNewDiskContainerWidget; 402 430 } 403 431 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
r87951 r87956 127 127 void markWidgets() const; 128 128 QWidget *createUnattendedWidgets(); 129 virtual QWidget *create DiskWidgets() /* override */;129 virtual QWidget *createNewDiskWidgets() /* override */; 130 130 131 131 UIToolBox *m_pToolBox; 132 132 QGroupBox *m_pInstallationISOContainer; 133 134 QGroupBox *m_pDiskFormatGroupBox; 135 QGroupBox *m_pDiskVariantGroupBox; 136 QGroupBox *m_pDiskLocationGroupBox; 137 QGroupBox *m_pDiskSizeGroupBox; 138 133 139 134 140 /** Set of widgets which user explicitly modified their values. They are exempt from
Note:
See TracChangeset
for help on using the changeset viewer.