Changeset 91259 in vbox
- Timestamp:
- Sep 15, 2021 6:47:38 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp
r90564 r91259 187 187 setOption(QWizard::HaveCustomButton2, (mode() == WizardMode_Basic && iId == Page3) 188 188 || (mode() == WizardMode_Expert && iId == PageExpert)); 189 }190 191 void UIWizardExportApp::sltCustomButtonClicked(int iId)192 {193 /* Call to base-class: */194 UIWizard::sltCustomButtonClicked(iId);195 196 /* Handle 2nd button: */197 if (iId == CustomButton2)198 {199 /* Get appliance widget and make sure it's valid: */200 ExportAppliancePointer pApplianceWidget = field("applianceWidget").value<ExportAppliancePointer>();201 AssertMsg(!pApplianceWidget.isNull(), ("Appliance Widget is not set!\n"));202 /* Reset it to default: */203 pApplianceWidget->restoreDefaults();204 }205 189 } 206 190 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.h
r82968 r91259 65 65 virtual void sltCurrentIdChanged(int iId) /* override */; 66 66 67 /** Handles custom button @a iId click. */68 virtual void sltCustomButtonClicked(int iId) /* override */;69 70 67 protected: 71 68 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp
r82968 r91259 201 201 else 202 202 refreshApplianceSettingsWidget(); 203 204 /* Listen for custom button clicks: */ 205 connect(wizard(), &UIWizard::customButtonClicked, 206 this, &UIWizardExportAppPageBasic3::sltHandleCustomButtonClicked, 207 Qt::UniqueConnection); 208 } 209 210 void UIWizardExportAppPageBasic3::cleanupPage() 211 { 212 /* Call to base-class: */ 213 UIWizardPage::cleanupPage(); 214 215 /* Stop listen for custom button clicks: */ 216 disconnect(wizard(), &UIWizard::customButtonClicked, 217 this, &UIWizardExportAppPageBasic3::sltHandleCustomButtonClicked); 203 218 } 204 219 … … 265 280 } 266 281 } 282 283 void UIWizardExportAppPageBasic3::sltHandleCustomButtonClicked(int iId) 284 { 285 /* Handle 2nd button: */ 286 if (iId == QWizard::CustomButton2) 287 { 288 /* Reset widget to default: */ 289 AssertPtrReturnVoid(m_pApplianceWidget.data()); 290 m_pApplianceWidget->restoreDefaults(); 291 } 292 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.h
r82968 r91259 92 92 /** Performs page initialization. */ 93 93 virtual void initializePage() /* override */; 94 /** Performs page cleanup. */ 95 virtual void cleanupPage() /* override */; 94 96 95 97 /** Performs page validation. */ … … 98 100 /** Updates page appearance. */ 99 101 virtual void updatePageAppearance() /* override */; 102 103 private slots: 104 105 /** Handles custom button clicked. 106 * @param iId Brings clicked button id. */ 107 void sltHandleCustomButtonClicked(int iId); 100 108 101 109 private: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp
r91220 r91259 561 561 /* Choose default cloud export option: */ 562 562 m_pRadioExportThenAsk->setChecked(true); 563 564 /* Listen for custom button clicks: */ 565 connect(wizard(), &UIWizard::customButtonClicked, 566 this, &UIWizardExportAppPageExpert::sltHandleCustomButtonClicked, 567 Qt::UniqueConnection); 563 568 } 564 569 565 570 void UIWizardExportAppPageExpert::cleanupPage() 566 571 { 567 /* Do nothing, we don't want field values to be reseted. */ 572 /* Do not pass call to base-class, we don't want field values to be reseted. */ 573 574 /* Stop listen for custom button clicks: */ 575 disconnect(wizard(), &UIWizard::customButtonClicked, 576 this, &UIWizardExportAppPageExpert::sltHandleCustomButtonClicked); 568 577 } 569 578 … … 696 705 } 697 706 707 void UIWizardExportAppPageExpert::sltHandleCustomButtonClicked(int iId) 708 { 709 /* Handle 2nd button: */ 710 if (iId == QWizard::CustomButton2) 711 { 712 /* Reset widget to default: */ 713 m_pApplianceWidget->restoreDefaults(); 714 } 715 } 716 698 717 void UIWizardExportAppPageExpert::sltHandleProfileComboChange() 699 718 { -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h
r86346 r91259 96 96 void sltHandleMACAddressExportPolicyComboChange(); 97 97 98 /** Handles custom button clicked. 99 * @param iId Brings clicked button id. */ 100 void sltHandleCustomButtonClicked(int iId); 101 98 102 /** Handles change in profile combo-box. */ 99 103 void sltHandleProfileComboChange();
Note:
See TracChangeset
for help on using the changeset viewer.