Changeset 85168 in vbox
- Timestamp:
- Jul 10, 2020 10:13:03 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 7 edited
-
UIWizardNewVMPageBasic1.cpp (modified) (3 diffs)
-
UIWizardNewVMPageBasic1.h (modified) (1 diff)
-
UIWizardNewVMPageBasic2.cpp (modified) (6 diffs)
-
UIWizardNewVMPageBasic2.h (modified) (1 diff)
-
UIWizardNewVMPageBasic3.cpp (modified) (3 diffs)
-
UIWizardNewVMPageBasic3.h (modified) (1 diff)
-
UIWizardNewVMPageExpert.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
r85150 r85168 504 504 } 505 505 506 void UIWizardNewVMPage1::retranslateWidgets() 507 { 508 if (m_pButtonSimple) 509 { 510 m_pButtonSimple->setText(UIWizardNewVM::tr("Leave Disk Empty")); 511 m_pButtonSimple->setToolTip(UIWizardNewVM::tr("When checked, no guest OS will be installed after this wizard is closed thereby leaving the virtual machine's disk empty.")); 512 } 513 if (m_pButtonUnattended) 514 { 515 m_pButtonUnattended->setText(UIWizardNewVM::tr("Unattended Install")); 516 m_pButtonUnattended->setToolTip(UIWizardNewVM::tr("When checked, an unattended guest OS installation will be started after this wizard is closed.")); 517 } 518 519 if (m_pISOSelectorLabel) 520 m_pISOSelectorLabel->setText(UIWizardNewVM::tr("Image:")); 521 522 if (m_pStartHeadlessLabel) 523 m_pStartHeadlessLabel->setText(UIWizardNewVM::tr("Options:")); 524 if (m_pStartHeadlessCheckBox) 525 { 526 m_pStartHeadlessCheckBox->setText(UIWizardNewVM::tr("Start VM Headless")); 527 m_pStartHeadlessCheckBox->setToolTip(UIWizardNewVM::tr("When checked, the unattended install will start the virtual machine in headless mode.")); 528 } 529 530 } 531 506 532 UIWizardNewVMPageBasic1::UIWizardNewVMPageBasic1(const QString &strGroup) 507 533 : UIWizardNewVMPage1(strGroup) … … 596 622 void UIWizardNewVMPageBasic1::retranslateUi() 597 623 { 624 retranslateWidgets(); 598 625 /* Translate page: */ 599 626 setTitle(UIWizardNewVM::tr("Virtual machine name and operating system")); … … 605 632 "Additionally you can choose to start the unattended install as a headless vm process.")); 606 633 607 if (m_pButtonSimple)608 {609 m_pButtonSimple->setText(UIWizardNewVM::tr("Leave Disk Empty"));610 m_pButtonSimple->setToolTip(UIWizardNewVM::tr("When checked, no guest OS will be installed after this wizard is closed"));611 }612 if (m_pButtonUnattended)613 {614 m_pButtonUnattended->setText(UIWizardNewVM::tr("Unattended Install"));615 m_pButtonUnattended->setToolTip(UIWizardNewVM::tr("When checked, an unattended guest OS will be initialized after this wizard is closed"));616 }617 618 if (m_pISOSelectorLabel)619 m_pISOSelectorLabel->setText(UIWizardNewVM::tr("Image:"));620 621 if (m_pStartHeadlessLabel)622 m_pStartHeadlessLabel->setText(UIWizardNewVM::tr("Options:"));623 if (m_pStartHeadlessCheckBox)624 {625 m_pStartHeadlessCheckBox->setText(UIWizardNewVM::tr("Start VM Headless"));626 m_pStartHeadlessCheckBox->setToolTip(UIWizardNewVM::tr("When checked, the unattended install will start the virtual machine headless"));627 }628 634 629 635 if (m_pNameOSTypeLabel) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h
r85135 r85168 79 79 /** Colors the widgets red if they cause isComplete to fail. */ 80 80 void markWidgets() const; 81 82 81 bool isISOFileSelectorComplete() const; 82 void retranslateWidgets(); 83 83 84 84 /** @name Widgets -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp
r85150 r85168 191 191 } 192 192 193 void UIWizardNewVMPage2::retranslateWidgets() 194 { 195 if (m_pHostnameLabel) 196 m_pHostnameLabel->setText(UIWizardNewVM::tr("Hostname:")); 197 if (m_pInstallGACheckBox) 198 m_pInstallGACheckBox->setText(UIWizardNewVM::tr("Install guest additions")); 199 if (m_pGAISOPathLabel) 200 m_pGAISOPathLabel->setText(UIWizardNewVM::tr("Installation medium:")); 201 if (m_pGAISOFilePathSelector) 202 m_pGAISOFilePathSelector->setToolTip(UIWizardNewVM::tr("Please select an installation medium (ISO file)")); 203 if (m_pProductKeyLabel) 204 m_pProductKeyLabel->setText(UIWizardNewVM::tr("Product Key:")); 205 } 206 193 207 UIWizardNewVMPageBasic2::UIWizardNewVMPageBasic2() 194 208 : m_pLabel(0) … … 212 226 } 213 227 214 m_pToolBox->insertItem(ToolBoxItems_UserNameHostname, createUserNameHostNameWidgets(), 215 UIIconPool::iconSet(":/cloud_profile_manager_16px.png"), QString()); 216 m_pToolBox->insertItem(ToolBoxItems_GAInstall, createGAInstallWidgets(), 217 UIIconPool::iconSet(":/cloud_profile_manager_16px.png"), QString()); 218 m_pToolBox->insertItem(ToolBoxItems_ProductKey, createProductKeyWidgets(), 219 UIIconPool::iconSet(":/cloud_profile_manager_16px.png"), QString()); 228 m_pToolBox->insertItem(ToolBoxItems_UserNameHostname, createUserNameHostNameWidgets(), QString()); 229 m_pToolBox->insertItem(ToolBoxItems_GAInstall, createGAInstallWidgets(), QString()); 230 m_pToolBox->insertItem(ToolBoxItems_ProductKey, createProductKeyWidgets(), QString()); 231 m_pToolBox->setStyleSheet("QToolBox::tab:selected { font: bold; }"); 220 232 221 233 registerField("userName", this, "userName"); … … 249 261 "hostname. You can additionally enable guest additions install. " 250 262 "For Microsoft Windows guests it is possible to provide a product key..</p>")); 251 if (m_pHostnameLabel) 252 m_pHostnameLabel->setText(UIWizardNewVM::tr("Hostname:")); 263 retranslateWidgets(); 253 264 if (m_pToolBox) 254 265 { … … 257 268 m_pToolBox->setItemText(ToolBoxItems_ProductKey, UIWizardNewVM::tr("Product key")); 258 269 } 259 if (m_pInstallGACheckBox)260 m_pInstallGACheckBox->setText(UIWizardNewVM::tr("Install guest additions"));261 if (m_pGAISOPathLabel)262 m_pGAISOPathLabel->setText(UIWizardNewVM::tr("Installation medium:"));263 if (m_pGAISOFilePathSelector)264 m_pGAISOFilePathSelector->setToolTip(UIWizardNewVM::tr("Please select an installation medium (ISO file)"));265 if (m_pProductKeyLabel)266 m_pProductKeyLabel->setText(UIWizardNewVM::tr("Product Key:"));267 270 } 268 271 … … 274 277 bool UIWizardNewVMPageBasic2::isComplete() const 275 278 { 279 AssertReturn(m_pToolBox, false); 280 281 m_pToolBox->setItemIcon(ToolBoxItems_UserNameHostname, QIcon()); 282 m_pToolBox->setItemIcon(ToolBoxItems_GAInstall, QIcon()); 283 m_pToolBox->setItemIcon(ToolBoxItems_ProductKey, QIcon()); 284 276 285 markWidgets(); 286 bool fIsComplete = true; 277 287 if (!checkGAISOFile()) 278 return false; 279 if (m_pUserNamePasswordEditor) 280 return m_pUserNamePasswordEditor->isComplete(); 281 return true; 288 { 289 m_pToolBox->setItemIcon(ToolBoxItems_GAInstall, UIIconPool::iconSet(":/warning.png")); 290 fIsComplete = false; 291 } 292 if (m_pUserNamePasswordEditor && !m_pUserNamePasswordEditor->isComplete()) 293 { 294 m_pToolBox->setItemIcon(ToolBoxItems_UserNameHostname, UIIconPool::iconSet(":/warning.png")); 295 fIsComplete = false; 296 } 297 return fIsComplete; 282 298 } 283 299 … … 289 305 { 290 306 if (m_pToolBox) 291 { 292 QWidget *pProductKeyWidget = m_pToolBox->widget(ToolBoxItems_ProductKey); 293 if (pProductKeyWidget) 294 pProductKeyWidget->setEnabled(isProductKeyWidgetEnabled()); 295 } 307 m_pToolBox->setItemEnabled(ToolBoxItems_ProductKey, isProductKeyWidgetEnabled()); 296 308 UIWizardPage::showEvent(pEvent); 297 309 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.h
r85150 r85168 73 73 bool checkGAISOFile() const; 74 74 void markWidgets() const; 75 void retranslateWidgets(); 75 76 76 77 /** @name Widgets -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp
r85090 r85168 156 156 } 157 157 158 void UIWizardNewVMPage3::retranslateWidgets() 159 { 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...")); 164 } 165 158 166 QWidget *UIWizardNewVMPage3::createDiskWidgets() 159 167 { … … 222 230 pMainLayout->addWidget(m_pToolBox); 223 231 224 m_pToolBox->insertItem(ToolBoxItems_Disk, createDiskWidgets(), 225 UIIconPool::iconSet(":/cloud_profile_manager_16px.png"), QString()); 226 m_pToolBox->insertItem(ToolBoxItems_Hardware, createHardwareWidgets(), 227 UIIconPool::iconSet(":/cloud_profile_manager_16px.png"), QString()); 232 m_pToolBox->insertItem(ToolBoxItems_Disk, createDiskWidgets(), QString()); 233 m_pToolBox->insertItem(ToolBoxItems_Hardware, createHardwareWidgets(), QString()); 234 m_pToolBox->setStyleSheet("QToolBox::tab:selected { font: bold; }"); 228 235 229 236 pMainLayout->addStretch(); … … 278 285 "and virtual processors.</p>") 279 286 .arg(strRecommendedHDD)); 280 281 m_pDiskSkip->setText(UIWizardNewVM::tr("&Do not add a virtual hard disk")); 282 m_pDiskCreate->setText(UIWizardNewVM::tr("&Create a virtual hard disk now")); 283 m_pDiskPresent->setText(UIWizardNewVM::tr("&Use an existing virtual hard disk file")); 284 m_pVMMButton->setToolTip(UIWizardNewVM::tr("Choose a virtual hard disk file...")); 285 287 retranslateWidgets(); 286 288 if (m_pToolBox) 287 289 { -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.h
r85090 r85168 82 82 /** Helpers. */ 83 83 void ensureNewVirtualDiskDeleted(); 84 void retranslateWidgets(); 84 85 85 86 /** Input. */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r85157 r85168 187 187 void UIWizardNewVMPageExpert::retranslateUi() 188 188 { 189 if (m_pUnattendedLabel) 190 m_pUnattendedLabel->setText(UIWizardNewVM::tr("Please choose whether you want to start an unattended guest os install " 191 "in which case you will have to select a valid installation medium. If not " 192 "your virtual disk will have an empty virtual hard disk. " 193 "Additionally you can choose to start the unattended install as a headless vm process.")); 194 if (m_pButtonSimple) 195 { 196 m_pButtonSimple->setText(UIWizardNewVM::tr("Leave Disk Empty")); 197 m_pButtonSimple->setToolTip(UIWizardNewVM::tr("When checked, no guest OS will be installed after this wizard is closed")); 198 } 199 if (m_pButtonUnattended) 200 { 201 m_pButtonUnattended->setText(UIWizardNewVM::tr("Unattended Install")); 202 m_pButtonUnattended->setToolTip(UIWizardNewVM::tr("When checked, an unattended guest OS will be initialized after this wizard is closed")); 203 } 204 205 if (m_pISOSelectorLabel) 206 m_pISOSelectorLabel->setText(UIWizardNewVM::tr("Image:")); 207 208 if (m_pStartHeadlessLabel) 209 m_pStartHeadlessLabel->setText(UIWizardNewVM::tr("Options:")); 210 if (m_pStartHeadlessCheckBox) 211 { 212 m_pStartHeadlessCheckBox->setText(UIWizardNewVM::tr("Start VM Headless")); 213 m_pStartHeadlessCheckBox->setToolTip(UIWizardNewVM::tr("When checked, the unattended install will start the virtual machine headless")); 214 } 215 216 217 218 m_pDiskSkip->setText(UIWizardNewVM::tr("&Do not add a virtual hard disk")); 219 m_pDiskCreate->setText(UIWizardNewVM::tr("&Create a virtual hard disk now")); 220 m_pDiskPresent->setText(UIWizardNewVM::tr("&Use an existing virtual hard disk file")); 221 m_pVMMButton->setToolTip(UIWizardNewVM::tr("Choose a virtual hard disk file...")); 189 UIWizardNewVMPage1::retranslateWidgets(); 190 UIWizardNewVMPage2::retranslateWidgets(); 191 UIWizardNewVMPage3::retranslateWidgets(); 192 222 193 if (m_pToolBox) 223 194 { … … 229 200 m_pToolBox->setItemText(ExpertToolboxItems_Hardware, UIWizardNewVM::tr("Hardware")); 230 201 } 231 232 if (m_pHostnameLabel)233 m_pHostnameLabel->setText(UIWizardNewVM::tr("Hostname:"));234 if (m_pInstallGACheckBox)235 m_pInstallGACheckBox->setText(UIWizardNewVM::tr("Install guest additions"));236 if (m_pGAISOPathLabel)237 m_pGAISOPathLabel->setText(UIWizardNewVM::tr("Installation medium:"));238 if (m_pGAISOFilePathSelector)239 m_pGAISOFilePathSelector->setToolTip(UIWizardNewVM::tr("Please select an installation medium (ISO file)"));240 if (m_pProductKeyLabel)241 m_pProductKeyLabel->setText(UIWizardNewVM::tr("Product Key:"));242 243 202 } 244 203
Note:
See TracChangeset
for help on using the changeset viewer.

