Changeset 41392 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- May 22, 2012 2:13:30 PM (13 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.cpp
r41387 r41392 403 403 { 404 404 case UIWizardType_NewVD: 405 dRatio += 0.1; 405 406 case UIWizardType_CloneVD: 406 407 case UIWizardType_ExportAppliance: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.cpp
r41372 r41392 21 21 #include <QVBoxLayout> 22 22 #include <QButtonGroup> 23 #include <QGroupBox>24 23 #include <QRadioButton> 25 24 … … 34 33 } 35 34 36 QRadioButton* UIWizardNewVDPage1::addFormatButton(QVBoxLayout *pFormatsLayout, CMediumFormat mf)35 void UIWizardNewVDPage1::addFormatButton(QWidget *pParent, QVBoxLayout *pFormatsLayout, CMediumFormat medFormat) 37 36 { 38 37 /* Check that medium format supports creation: */ 39 ULONG uFormatCapabilities = m f.GetCapabilities();38 ULONG uFormatCapabilities = medFormat.GetCapabilities(); 40 39 if (!(uFormatCapabilities & MediumFormatCapabilities_CreateFixed || 41 40 uFormatCapabilities & MediumFormatCapabilities_CreateDynamic)) 42 return 0;41 return; 43 42 44 43 /* Check that medium format supports creation of virtual hard-disks: */ 45 44 QVector<QString> fileExtensions; 46 45 QVector<KDeviceType> deviceTypes; 47 m f.DescribeFileExtensions(fileExtensions, deviceTypes);46 medFormat.DescribeFileExtensions(fileExtensions, deviceTypes); 48 47 if (!deviceTypes.contains(KDeviceType_HardDisk)) 49 return 0;48 return; 50 49 51 50 /* Create/add corresponding radio-button: */ 52 QRadioButton *pFormatButton = new QRadioButton( m_pFormatCnt);51 QRadioButton *pFormatButton = new QRadioButton(pParent); 53 52 pFormatsLayout->addWidget(pFormatButton); 54 return pFormatButton; 53 m_formats << medFormat; 54 m_formatNames << medFormat.GetName(); 55 m_pFormatButtonGroup->addButton(pFormatButton, m_formatNames.size() - 1); 55 56 } 56 57 … … 76 77 { 77 78 m_pLabel = new QIRichTextLabel(this); 78 m_pFormatCnt = new QGroupBox(this);79 QVBoxLayout *pFormatsLayout = new QVBoxLayout; 79 80 { 80 m_pFormatCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 81 m_pFormatButtonGroup = new QButtonGroup(m_pFormatCnt); 81 m_pFormatButtonGroup = new QButtonGroup(this); 82 82 { 83 QVBoxLayout *pFormatsLayout = new QVBoxLayout(m_pFormatCnt); 83 CSystemProperties systemProperties = vboxGlobal().virtualBox().GetSystemProperties(); 84 const QVector<CMediumFormat> &medFormats = systemProperties.GetMediumFormats(); 85 for (int i = 0; i < medFormats.size(); ++i) 84 86 { 85 CSystemProperties systemProperties = vboxGlobal().virtualBox().GetSystemProperties(); 86 const QVector<CMediumFormat> &medFormats = systemProperties.GetMediumFormats(); 87 for (int i = 0; i < medFormats.size(); ++i) 88 { 89 const CMediumFormat &medFormat = medFormats[i]; 90 QString strFormatName(medFormat.GetName()); 91 if (strFormatName == "VDI") 92 { 93 QRadioButton *pButton = addFormatButton(pFormatsLayout, medFormat); 94 if (pButton) 95 { 96 m_formats << medFormat; 97 m_formatNames << strFormatName; 98 m_pFormatButtonGroup->addButton(pButton, m_formatNames.size() - 1); 99 } 100 } 101 } 102 for (int i = 0; i < medFormats.size(); ++i) 103 { 104 const CMediumFormat &medFormat = medFormats[i]; 105 QString strFormatName(medFormat.GetName()); 106 if (strFormatName != "VDI") 107 { 108 QRadioButton *pButton = addFormatButton(pFormatsLayout, medFormat); 109 if (pButton) 110 { 111 m_formats << medFormat; 112 m_formatNames << strFormatName; 113 m_pFormatButtonGroup->addButton(pButton, m_formatNames.size() - 1); 114 } 115 } 116 } 87 const CMediumFormat &medFormat = medFormats[i]; 88 if (medFormat.GetName() == "VDI") 89 addFormatButton(this, pFormatsLayout, medFormat); 117 90 } 118 m_pFormatButtonGroup->button(0)->click(); 119 m_pFormatButtonGroup->button(0)->setFocus(); 91 for (int i = 0; i < medFormats.size(); ++i) 92 { 93 const CMediumFormat &medFormat = medFormats[i]; 94 if (medFormat.GetName() != "VDI") 95 addFormatButton(this, pFormatsLayout, medFormat); 96 } 120 97 } 98 m_pFormatButtonGroup->button(0)->click(); 99 m_pFormatButtonGroup->button(0)->setFocus(); 121 100 } 122 101 pMainLayout->addWidget(m_pLabel); 123 pMainLayout->add Widget(m_pFormatCnt);102 pMainLayout->addLayout(pFormatsLayout); 124 103 pMainLayout->addStretch(); 125 104 } … … 143 122 "for the new virtual hard drive. If you do not need to use it " 144 123 "with other virtualization software you can leave this setting unchanged.")); 145 m_pFormatCnt->setTitle(UIWizardNewVD::tr("File &type"));146 124 QList<QAbstractButton*> buttons = m_pFormatButtonGroup->buttons(); 147 125 for (int i = 0; i < buttons.size(); ++i) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.h
r41372 r41392 27 27 class QVBoxLayout; 28 28 class QButtonGroup; 29 class QGroupBox;30 29 class QRadioButton; 31 30 class QIRichTextLabel; … … 40 39 41 40 /* Helping stuff: */ 42 QRadioButton* addFormatButton(QVBoxLayout *pFormatsLayout, CMediumFormat mf);41 void addFormatButton(QWidget *pParent, QVBoxLayout *pFormatsLayout, CMediumFormat medFormat); 43 42 44 43 /* Stuff for 'mediumFormat' field: */ … … 50 49 QList<CMediumFormat> m_formats; 51 50 QStringList m_formatNames; 52 53 /* Widgets: */54 QGroupBox *m_pFormatCnt;55 51 }; 56 52 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic2.cpp
r41372 r41392 20 20 /* Global includes: */ 21 21 #include <QVBoxLayout> 22 #include <QGroupBox>23 22 #include <QButtonGroup> 24 23 #include <QRadioButton> … … 81 80 m_pFixedLabel = new QIRichTextLabel(this); 82 81 m_pSplitLabel = new QIRichTextLabel(this); 83 m_pVariantCnt = new QGroupBox(this);82 QVBoxLayout *pVariantsLayout = new QVBoxLayout; 84 83 { 85 m_pVariantCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 86 QVBoxLayout *pVariantCntLayout = new QVBoxLayout(m_pVariantCnt); 84 m_pVariantButtonGroup = new QButtonGroup(this); 87 85 { 88 m_p VariantButtonGroup = new QButtonGroup(m_pVariantCnt);86 m_pDynamicalButton = new QRadioButton(this); 89 87 { 90 m_pDynamicalButton = new QRadioButton(m_pVariantCnt); 91 { 92 m_pDynamicalButton->click(); 93 m_pDynamicalButton->setFocus(); 94 } 95 m_pFixedButton = new QRadioButton(m_pVariantCnt); 96 m_pVariantButtonGroup->addButton(m_pDynamicalButton, 0); 97 m_pVariantButtonGroup->addButton(m_pFixedButton, 1); 88 m_pDynamicalButton->click(); 89 m_pDynamicalButton->setFocus(); 98 90 } 99 m_pSplitBox = new QCheckBox(m_pVariantCnt); 100 pVariantCntLayout->addWidget(m_pDynamicalButton); 101 pVariantCntLayout->addWidget(m_pFixedButton); 102 pVariantCntLayout->addWidget(m_pSplitBox); 91 m_pFixedButton = new QRadioButton(this); 92 m_pVariantButtonGroup->addButton(m_pDynamicalButton, 0); 93 m_pVariantButtonGroup->addButton(m_pFixedButton, 1); 103 94 } 95 m_pSplitBox = new QCheckBox(this); 96 pVariantsLayout->addWidget(m_pDynamicalButton); 97 pVariantsLayout->addWidget(m_pFixedButton); 98 pVariantsLayout->addWidget(m_pSplitBox); 104 99 } 105 100 pMainLayout->addWidget(m_pDescriptionLabel); … … 107 102 pMainLayout->addWidget(m_pFixedLabel); 108 103 pMainLayout->addWidget(m_pSplitLabel); 109 pMainLayout->add Widget(m_pVariantCnt);104 pMainLayout->addLayout(pVariantsLayout); 110 105 pMainLayout->addStretch(); 111 106 } … … 136 131 "virtual machine on removable USB devices or old systems, some of which cannot " 137 132 "handle very large files.")); 138 m_pVariantCnt->setTitle(UIWizardNewVD::tr("Storage details"));139 133 m_pDynamicalButton->setText(UIWizardNewVD::tr("&Dynamically allocated")); 140 134 m_pFixedButton->setText(UIWizardNewVD::tr("&Fixed size")); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic2.h
r41372 r41392 24 24 25 25 /* Forward declarations: */ 26 class QGroupBox;27 26 class QButtonGroup; 28 27 class QRadioButton; … … 43 42 44 43 /* Widgets: */ 45 QGroupBox *m_pVariantCnt;46 44 QButtonGroup *m_pVariantButtonGroup; 47 45 QRadioButton *m_pDynamicalButton; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.cpp
r41372 r41392 23 23 #include <QVBoxLayout> 24 24 #include <QHBoxLayout> 25 #include <QGroupBox>26 25 #include <QLineEdit> 27 26 #include <QSlider> … … 263 262 { 264 263 m_pLocationLabel = new QIRichTextLabel(this); 265 m_pLocationCnt = new QGroupBox(this);264 QHBoxLayout *pLocationLayout = new QHBoxLayout; 266 265 { 267 m_pLocation Cnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);268 QHBoxLayout *pLocationCntLayout = new QHBoxLayout(m_pLocationCnt);266 m_pLocationEditor = new QLineEdit(this); 267 m_pLocationOpenButton = new QIToolButton(this); 269 268 { 270 m_pLocationEditor = new QLineEdit(m_pLocationCnt); 271 m_pLocationOpenButton = new QIToolButton(m_pLocationCnt); 272 { 273 m_pLocationOpenButton->setAutoRaise(true); 274 m_pLocationOpenButton->setIcon(UIIconPool::iconSet(":/select_file_16px.png", "select_file_dis_16px.png")); 275 } 276 pLocationCntLayout->addWidget(m_pLocationEditor); 277 pLocationCntLayout->addWidget(m_pLocationOpenButton); 269 m_pLocationOpenButton->setAutoRaise(true); 270 m_pLocationOpenButton->setIcon(UIIconPool::iconSet(":/select_file_16px.png", "select_file_dis_16px.png")); 278 271 } 272 pLocationLayout->addWidget(m_pLocationEditor); 273 pLocationLayout->addWidget(m_pLocationOpenButton); 279 274 } 280 275 m_pSizeLabel = new QIRichTextLabel(this); 281 m_pSizeCnt = new QGroupBox(this);276 QGridLayout *m_pSizeLayout = new QGridLayout; 282 277 { 283 m_pSizeCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 284 QGridLayout *m_pSizeCntLayout = new QGridLayout(m_pSizeCnt); 278 m_pSizeSlider = new QSlider(this); 285 279 { 286 m_pSizeSlider = new QSlider(m_pSizeCnt); 287 { 288 m_pSizeSlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); 289 m_pSizeSlider->setOrientation(Qt::Horizontal); 290 m_pSizeSlider->setTickPosition(QSlider::TicksBelow); 291 m_pSizeSlider->setFocusPolicy(Qt::StrongFocus); 292 m_pSizeSlider->setPageStep(m_iSliderScale); 293 m_pSizeSlider->setSingleStep(m_iSliderScale / 8); 294 m_pSizeSlider->setTickInterval(0); 295 m_pSizeSlider->setMinimum(sizeMBToSlider(m_uMediumSizeMin, m_iSliderScale)); 296 m_pSizeSlider->setMaximum(sizeMBToSlider(m_uMediumSizeMax, m_iSliderScale)); 297 } 298 m_pSizeEditor = new QILineEdit(m_pSizeCnt); 299 { 300 m_pSizeEditor->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); 301 m_pSizeEditor->setFixedWidthByText("88888.88 MB"); 302 m_pSizeEditor->setAlignment(Qt::AlignRight); 303 m_pSizeEditor->setValidator(new QRegExpValidator(QRegExp(vboxGlobal().sizeRegexp()), this)); 304 } 305 QLabel *m_pSizeMin = new QLabel(m_pSizeCnt); 306 { 307 m_pSizeMin->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); 308 m_pSizeMin->setText(vboxGlobal().formatSize(m_uMediumSizeMin)); 309 } 310 QSpacerItem *m_pSizeSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed); 311 QLabel *m_pSizeMax = new QLabel(m_pSizeCnt); 312 { 313 m_pSizeMax->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); 314 m_pSizeMax->setText(vboxGlobal().formatSize(m_uMediumSizeMax)); 315 } 316 m_pSizeCntLayout->addWidget(m_pSizeSlider, 0, 0, 1, 3); 317 m_pSizeCntLayout->addWidget(m_pSizeEditor, 0, 3); 318 m_pSizeCntLayout->addWidget(m_pSizeMin, 1, 0); 319 m_pSizeCntLayout->addItem(m_pSizeSpacer, 1, 1); 320 m_pSizeCntLayout->addWidget(m_pSizeMax, 1, 2); 280 m_pSizeSlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); 281 m_pSizeSlider->setOrientation(Qt::Horizontal); 282 m_pSizeSlider->setTickPosition(QSlider::TicksBelow); 283 m_pSizeSlider->setFocusPolicy(Qt::StrongFocus); 284 m_pSizeSlider->setPageStep(m_iSliderScale); 285 m_pSizeSlider->setSingleStep(m_iSliderScale / 8); 286 m_pSizeSlider->setTickInterval(0); 287 m_pSizeSlider->setMinimum(sizeMBToSlider(m_uMediumSizeMin, m_iSliderScale)); 288 m_pSizeSlider->setMaximum(sizeMBToSlider(m_uMediumSizeMax, m_iSliderScale)); 321 289 } 322 setMediumSize(uDefaultSize); 290 m_pSizeEditor = new QILineEdit(this); 291 { 292 m_pSizeEditor->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); 293 m_pSizeEditor->setFixedWidthByText("88888.88 MB"); 294 m_pSizeEditor->setAlignment(Qt::AlignRight); 295 m_pSizeEditor->setValidator(new QRegExpValidator(QRegExp(vboxGlobal().sizeRegexp()), this)); 296 } 297 QLabel *m_pSizeMin = new QLabel(this); 298 { 299 m_pSizeMin->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); 300 m_pSizeMin->setText(vboxGlobal().formatSize(m_uMediumSizeMin)); 301 } 302 QLabel *m_pSizeMax = new QLabel(this); 303 { 304 m_pSizeMax->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); 305 m_pSizeMax->setText(vboxGlobal().formatSize(m_uMediumSizeMax)); 306 } 307 m_pSizeLayout->addWidget(m_pSizeSlider, 0, 0, 1, 3); 308 m_pSizeLayout->addWidget(m_pSizeEditor, 0, 3); 309 m_pSizeLayout->addWidget(m_pSizeMin, 1, 0); 310 m_pSizeLayout->setColumnStretch(1, 1); 311 m_pSizeLayout->addWidget(m_pSizeMax, 1, 2); 323 312 } 313 setMediumSize(uDefaultSize); 324 314 pMainLayout->addWidget(m_pLocationLabel); 325 pMainLayout->add Widget(m_pLocationCnt);315 pMainLayout->addLayout(pLocationLayout); 326 316 pMainLayout->addWidget(m_pSizeLabel); 327 pMainLayout->add Widget(m_pSizeCnt);317 pMainLayout->addLayout(m_pSizeLayout); 328 318 pMainLayout->addStretch(); 329 319 } … … 372 362 m_pLocationLabel->setText(UIWizardNewVD::tr("Please type the name of the new virtual hard drive file into the box below or " 373 363 "click on the folder icon to select a different folder to create the file in.")); 374 m_pLocationCnt->setTitle(UIWizardNewVD::tr("&Location"));375 364 m_pLocationOpenButton->setToolTip(UIWizardNewVD::tr("Choose a location for new virtual hard drive file...")); 376 365 m_pSizeLabel->setText(UIWizardNewVD::tr("Select the size of the virtual hard drive in megabytes. This size will be reported " 377 366 "to the Guest OS as the maximum size of this hard drive.")); 378 m_pSizeCnt->setTitle(UIWizardNewVD::tr("&Size"));379 367 } 380 368 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.h
r41372 r41392 26 26 /* Forward declarations: */ 27 27 class CMediumFormat; 28 class QGroupBox;29 28 class QLineEdit; 30 29 class QIToolButton; … … 74 73 75 74 /* Widgets: */ 76 QGroupBox *m_pLocationCnt;77 75 QLineEdit *m_pLocationEditor; 78 76 QIToolButton *m_pLocationOpenButton; 79 QGroupBox *m_pSizeCnt;80 77 QSlider *m_pSizeSlider; 81 78 QILineEdit *m_pSizeEditor; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.cpp
r41372 r41392 94 94 m_pSizeMin->setText(vboxGlobal().formatSize(m_uMediumSizeMin)); 95 95 } 96 QSpacerItem *m_pSizeSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed);97 96 QLabel *m_pSizeMax = new QLabel(m_pSizeCnt); 98 97 { … … 103 102 m_pSizeCntLayout->addWidget(m_pSizeEditor, 0, 3); 104 103 m_pSizeCntLayout->addWidget(m_pSizeMin, 1, 0); 105 m_pSizeCntLayout-> addItem(m_pSizeSpacer,1, 1);104 m_pSizeCntLayout->setColumnStretch(1, 1); 106 105 m_pSizeCntLayout->addWidget(m_pSizeMax, 1, 2); 107 106 } 108 107 } 109 QVBoxLayout *pFormatWrappingLayout = new QVBoxLayout; 110 { 111 m_pFormatCnt = new QGroupBox(this); 112 { 113 m_pFormatCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 114 QVBoxLayout *pFormatCntLayout = new QVBoxLayout(m_pFormatCnt); 115 { 116 m_pFormatButtonGroup = new QButtonGroup(m_pFormatCnt); 108 m_pFormatCnt = new QGroupBox(this); 109 { 110 m_pFormatCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 111 QVBoxLayout *pFormatCntLayout = new QVBoxLayout(m_pFormatCnt); 112 { 113 m_pFormatButtonGroup = new QButtonGroup(m_pFormatCnt); 114 { 115 CSystemProperties systemProperties = vboxGlobal().virtualBox().GetSystemProperties(); 116 const QVector<CMediumFormat> &medFormats = systemProperties.GetMediumFormats(); 117 for (int i = 0; i < medFormats.size(); ++i) 117 118 { 118 CSystemProperties systemProperties = vboxGlobal().virtualBox().GetSystemProperties(); 119 const QVector<CMediumFormat> &medFormats = systemProperties.GetMediumFormats(); 120 for (int i = 0; i < medFormats.size(); ++i) 121 { 122 const CMediumFormat &medFormat = medFormats[i]; 123 QString strFormatName(medFormat.GetName()); 124 if (strFormatName == "VDI") 125 { 126 QRadioButton *pButton = addFormatButton(pFormatCntLayout, medFormat); 127 if (pButton) 128 { 129 m_formats << medFormat; 130 m_formatNames << strFormatName; 131 m_pFormatButtonGroup->addButton(pButton, m_formatNames.size() - 1); 132 } 133 } 134 } 135 for (int i = 0; i < medFormats.size(); ++i) 136 { 137 const CMediumFormat &medFormat = medFormats[i]; 138 QString strFormatName(medFormat.GetName()); 139 if (strFormatName != "VDI") 140 { 141 QRadioButton *pButton = addFormatButton(pFormatCntLayout, medFormat); 142 if (pButton) 143 { 144 m_formats << medFormat; 145 m_formatNames << strFormatName; 146 m_pFormatButtonGroup->addButton(pButton, m_formatNames.size() - 1); 147 } 148 } 149 } 150 m_pFormatButtonGroup->button(0)->click(); 151 m_pFormatButtonGroup->button(0)->setFocus(); 119 const CMediumFormat &medFormat = medFormats[i]; 120 if (medFormat.GetName() == "VDI") 121 addFormatButton(m_pFormatCnt, pFormatCntLayout, medFormat); 152 122 } 153 } 154 } 155 QSpacerItem *m_pSizeSpacer = new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::Expanding); 156 pFormatWrappingLayout->addWidget(m_pFormatCnt); 157 pFormatWrappingLayout->addItem(m_pSizeSpacer); 158 } 159 QVBoxLayout *pVariantWrappingLayout = new QVBoxLayout; 160 { 161 m_pVariantCnt = new QGroupBox(this); 162 { 163 m_pVariantCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 164 QVBoxLayout *pVariantsLayout = new QVBoxLayout(m_pVariantCnt); 165 { 166 m_pVariantButtonGroup = new QButtonGroup(m_pVariantCnt); 123 for (int i = 0; i < medFormats.size(); ++i) 167 124 { 168 m_pDynamicalButton = new QRadioButton(m_pVariantCnt); 169 { 170 m_pDynamicalButton->click(); 171 m_pDynamicalButton->setFocus(); 172 } 173 m_pFixedButton = new QRadioButton(m_pVariantCnt); 174 m_pVariantButtonGroup->addButton(m_pDynamicalButton, 0); 175 m_pVariantButtonGroup->addButton(m_pFixedButton, 1); 125 const CMediumFormat &medFormat = medFormats[i]; 126 if (medFormat.GetName() != "VDI") 127 addFormatButton(m_pFormatCnt, pFormatCntLayout, medFormat); 176 128 } 177 m_pSplitBox = new QCheckBox(m_pVariantCnt); 178 pVariantsLayout->addWidget(m_pDynamicalButton); 179 pVariantsLayout->addWidget(m_pFixedButton); 180 pVariantsLayout->addWidget(m_pSplitBox); 181 } 182 } 183 QSpacerItem *m_pSizeSpacer = new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::Expanding); 184 pVariantWrappingLayout->addWidget(m_pVariantCnt); 185 pVariantWrappingLayout->addItem(m_pSizeSpacer); 129 m_pFormatButtonGroup->button(0)->click(); 130 m_pFormatButtonGroup->button(0)->setFocus(); 131 } 132 } 133 } 134 m_pVariantCnt = new QGroupBox(this); 135 { 136 m_pVariantCnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 137 QVBoxLayout *pVariantsLayout = new QVBoxLayout(m_pVariantCnt); 138 { 139 m_pVariantButtonGroup = new QButtonGroup(m_pVariantCnt); 140 { 141 m_pDynamicalButton = new QRadioButton(m_pVariantCnt); 142 { 143 m_pDynamicalButton->click(); 144 m_pDynamicalButton->setFocus(); 145 } 146 m_pFixedButton = new QRadioButton(m_pVariantCnt); 147 m_pVariantButtonGroup->addButton(m_pDynamicalButton, 0); 148 m_pVariantButtonGroup->addButton(m_pFixedButton, 1); 149 } 150 m_pSplitBox = new QCheckBox(m_pVariantCnt); 151 pVariantsLayout->addWidget(m_pDynamicalButton); 152 pVariantsLayout->addWidget(m_pFixedButton); 153 pVariantsLayout->addWidget(m_pSplitBox); 154 } 186 155 } 187 156 pMainLayout->addWidget(m_pLocationCnt, 0, 0, 1, 2); 188 157 pMainLayout->addWidget(m_pSizeCnt, 1, 0, 1, 2); 189 pMainLayout->add Layout(pFormatWrappingLayout, 2, 0);190 pMainLayout->add Layout(pVariantWrappingLayout, 2, 1);158 pMainLayout->addWidget(m_pFormatCnt, 2, 0, Qt::AlignTop); 159 pMainLayout->addWidget(m_pVariantCnt, 2, 1, Qt::AlignTop); 191 160 setMediumSize(uDefaultSize); 192 161 sltMediumFormatChanged(); … … 256 225 /* Translate widgets: */ 257 226 m_pLocationCnt->setTitle(UIWizardNewVD::tr("&Location")); 258 m_pLocationOpenButton->setToolTip(UIWizardNewVD::tr("Choose a virtual hard drive file..."));227 m_pLocationOpenButton->setToolTip(UIWizardNewVD::tr("Choose a location for new virtual hard drive file...")); 259 228 m_pSizeCnt->setTitle(UIWizardNewVD::tr("&Size")); 260 229 m_pFormatCnt->setTitle(UIWizardNewVD::tr("File &type")); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.h
r41372 r41392 24 24 #include "UIWizardNewVDPageBasic2.h" 25 25 #include "UIWizardNewVDPageBasic3.h" 26 27 /* Forward declarations: */ 28 class QGroupBox; 26 29 27 30 /* Expert page of the New Virtual Hard Drive wizard: */ … … 71 74 bool isComplete() const; 72 75 bool validatePage(); 76 77 /* Widgets: */ 78 QGroupBox *m_pFormatCnt; 79 QGroupBox *m_pVariantCnt; 80 QGroupBox *m_pLocationCnt; 81 QGroupBox *m_pSizeCnt; 73 82 }; 74 83
Note:
See TracChangeset
for help on using the changeset viewer.