Changeset 85081 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jul 7, 2020 12:03:00 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 138986
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
r85078 r85081 489 489 QGridLayout *pMainLayout = new QGridLayout(this);; 490 490 createWidgets(pMainLayout); 491 voidcreateConnections();491 createConnections(); 492 492 /* Register fields: */ 493 493 registerField("name*", m_pNameAndSystemEditor, "name", SIGNAL(sigNameChanged(const QString &))); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp
r85071 r85081 52 52 void UIWizardNewVMPage3::updateVirtualDiskSource() 53 53 { 54 if (!m_pDiskSelector || !m_pVMMButton) 55 return; 56 54 57 /* Enable/disable controls: */ 55 58 m_pDiskSelector->setEnabled(m_pDiskPresent->isChecked()); … … 260 263 { 261 264 /* Translate page: */ 262 setTitle(UIWizardNewVM::tr("Hard disk "));265 setTitle(UIWizardNewVM::tr("Hard disk and Hardware")); 263 266 264 267 /* Translate widgets: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r85055 r85081 25 25 #include <QSpacerItem> 26 26 #include <QSpinBox> 27 #include <QToolBox> 27 28 #include <QVBoxLayout> 28 29 … … 41 42 UIWizardNewVMPageExpert::UIWizardNewVMPageExpert(const QString &strGroup) 42 43 : UIWizardNewVMPage1(strGroup) 44 , m_pNameAndSystemCnt(0) 45 , m_pMemoryCnt(0) 46 , m_pDiskCnt(0) 47 , m_pToolBox(0) 43 48 { 44 49 /* Create widgets: */ 45 50 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 46 51 { 47 m_pNameAndSystemCnt = new QGroupBox(this); 52 m_pToolBox = new QToolBox; 53 m_pNameAndSystemCnt = new QWidget(this); 48 54 { 49 55 m_pNameAndSystemCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); … … 54 60 } 55 61 } 56 m_pMemoryCnt = new QGroupBox(this); 57 { 58 m_pMemoryCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 59 QGridLayout *pMemoryCntLayout = new QGridLayout(m_pMemoryCnt); 60 { 61 m_pBaseMemoryEditor = new UIBaseMemoryEditor; 62 pMemoryCntLayout->addWidget(m_pBaseMemoryEditor, 0, 0, 1, 4); 63 } 64 } 65 m_pDiskCnt = new QGroupBox(this); 66 { 67 m_pDiskCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 68 QGridLayout *pDiskCntLayout = new QGridLayout(m_pDiskCnt); 69 { 70 m_pDiskSkip = new QRadioButton(m_pDiskCnt); 71 m_pDiskCreate = new QRadioButton(m_pDiskCnt); 72 { 73 m_pDiskCreate->setChecked(true); 74 } 75 m_pDiskPresent = new QRadioButton(m_pDiskCnt); 76 QStyleOptionButton options; 77 options.initFrom(m_pDiskPresent); 78 int iWidth = m_pDiskPresent->style()->pixelMetric(QStyle::PM_ExclusiveIndicatorWidth, &options, m_pDiskPresent); 79 pDiskCntLayout->setColumnMinimumWidth(0, iWidth); 80 m_pDiskSelector = new UIMediaComboBox(m_pDiskCnt); 81 { 82 m_pDiskSelector->setType(UIMediumDeviceType_HardDisk); 83 m_pDiskSelector->repopulate(); 84 } 85 m_pVMMButton = new QIToolButton(m_pDiskCnt); 86 { 87 m_pVMMButton->setAutoRaise(true); 88 m_pVMMButton->setIcon(UIIconPool::iconSet(":/select_file_16px.png", ":/select_file_disabled_16px.png")); 89 } 90 pDiskCntLayout->addWidget(m_pDiskSkip, 0, 0, 1, 3); 91 pDiskCntLayout->addWidget(m_pDiskCreate, 1, 0, 1, 3); 92 pDiskCntLayout->addWidget(m_pDiskPresent, 2, 0, 1, 3); 93 pDiskCntLayout->addWidget(m_pDiskSelector, 3, 1); 94 pDiskCntLayout->addWidget(m_pVMMButton, 3, 2); 95 } 96 } 97 pMainLayout->addWidget(m_pNameAndSystemCnt); 98 pMainLayout->addWidget(m_pMemoryCnt); 99 pMainLayout->addWidget(m_pDiskCnt); 62 63 pMainLayout->addWidget(m_pToolBox); 64 m_pToolBox->insertItem(ExpertToolboxItems_NameAnsOSType, m_pNameAndSystemCnt, ""); 65 m_pToolBox->insertItem(ExpertToolboxItems_Disk, createDiskWidgets(), ""); 66 m_pToolBox->insertItem(ExpertToolboxItems_Hardware, createHardwareWidgets(), ""); 67 100 68 pMainLayout->addStretch(); 101 69 updateVirtualDiskSource(); … … 184 152 { 185 153 /* Translate widgets: */ 186 m_pNameAndSystemCnt->setTitle(UIWizardNewVM::tr("Name and operating system")); 187 m_pMemoryCnt->setTitle(UIWizardNewVM::tr("&Memory size"));188 m_pDiskCnt->setTitle(UIWizardNewVM::tr("Hard disk"));154 155 //m_pMemoryCnt->setTitle(UIWizardNewVM::tr("&Memory size")); 156 //m_pDiskCnt->setTitle(UIWizardNewVM::tr("Hard disk")); 189 157 m_pDiskSkip->setText(UIWizardNewVM::tr("&Do not add a virtual hard disk")); 190 158 m_pDiskCreate->setText(UIWizardNewVM::tr("&Create a virtual hard disk now")); 191 159 m_pDiskPresent->setText(UIWizardNewVM::tr("&Use an existing virtual hard disk file")); 192 160 m_pVMMButton->setToolTip(UIWizardNewVM::tr("Choose a virtual hard disk file...")); 161 if (m_pToolBox) 162 { 163 m_pToolBox->setItemText(ExpertToolboxItems_NameAnsOSType, UIWizardNewVM::tr("Name and operating system")); 164 m_pToolBox->setItemText(ExpertToolboxItems_Disk, UIWizardNewVM::tr("Hard disk")); 165 m_pToolBox->setItemText(ExpertToolboxItems_Hardware, UIWizardNewVM::tr("Hardware")); 166 } 193 167 } 194 168 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
r85064 r85081 28 28 /* Forward declarations: */ 29 29 class QGroupBox; 30 class QToolBox; 30 31 31 /* Expert page of the New Virtual Machine wizard:*/32 /** Expert page of the New Virtual Machine wizard. */ 32 33 class UIWizardNewVMPageExpert : public UIWizardPage, 33 34 public UIWizardNewVMPage1, … … 45 46 public: 46 47 47 /* Constructor:*/48 /** Constructor. */ 48 49 UIWizardNewVMPageExpert(const QString &strGroup); 49 50 50 51 protected: 51 52 52 /* Wrapper to access 'wizard' from base part:*/53 /** Wrapper to access 'wizard' from base part. */ 53 54 UIWizard *wizardImp() const { return wizard(); } 54 /* Wrapper to access 'this' from base part:*/55 /** Wrapper to access 'this' from base part. */ 55 56 UIWizardPage* thisImp() { return this; } 56 /* Wrapper to access 'wizard-field' from base part:*/57 /** Wrapper to access 'wizard-field' from base part. */ 57 58 QVariant fieldImp(const QString &strFieldName) const { return UIWizardPage::field(strFieldName); } 58 59 59 60 private slots: 60 61 61 /* Handlers:*/62 /** Handlers. */ 62 63 void sltNameChanged(const QString &strNewText); 63 64 void sltPathChanged(const QString &strNewPath); … … 67 68 68 69 private: 70 enum ExpertToolboxItems 71 { 72 ExpertToolboxItems_NameAnsOSType, 73 ExpertToolboxItems_Disk, 74 ExpertToolboxItems_Hardware 69 75 70 /* Translation stuff: */ 76 }; 77 /** Translation stuff. */ 71 78 void retranslateUi(); 72 79 73 /* Prepare stuff:*/80 /** Prepare stuff. */ 74 81 void initializePage(); 75 82 void cleanupPage(); 76 83 77 /* Validation stuff:*/84 /** Validation stuff. */ 78 85 bool isComplete() const; 79 86 bool validatePage(); 80 87 81 /* Widgets:*/82 Q GroupBox*m_pNameAndSystemCnt;88 /** Widgets. */ 89 QWidget *m_pNameAndSystemCnt; 83 90 QGroupBox *m_pMemoryCnt; 84 91 QGroupBox *m_pDiskCnt; 92 QToolBox *m_pToolBox; 85 93 }; 86 94
Note:
See TracChangeset
for help on using the changeset viewer.