- Timestamp:
- Oct 25, 2021 3:45:00 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards
- Files:
-
- 2 edited
-
UINativeWizard.cpp (modified) (5 diffs)
-
UINativeWizard.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UINativeWizard.cpp
r92041 r92044 79 79 #endif /* VBOX_WS_MAC */ 80 80 81 82 UINotificationCenter *UINativeWizard::notificationCenter() const83 {84 return m_pNotificationCenter;85 }86 87 bool UINativeWizard::handleNotificationProgressNow(UINotificationProgress *pProgress)88 {89 return m_pNotificationCenter->handleNow(pProgress);90 }91 92 int UINativeWizard::exec()93 {94 /* Init wizard: */95 init();96 97 /* Call to base-class: */98 return QIWithRetranslateUI<QDialog>::exec();99 }100 81 101 82 UINativeWizard::UINativeWizard(QWidget *pParent, … … 119 100 } 120 101 102 UINativeWizard::~UINativeWizard() 103 { 104 cleanup(); 105 } 106 107 UINotificationCenter *UINativeWizard::notificationCenter() const 108 { 109 return m_pNotificationCenter; 110 } 111 112 bool UINativeWizard::handleNotificationProgressNow(UINotificationProgress *pProgress) 113 { 114 return m_pNotificationCenter->handleNow(pProgress); 115 } 116 117 int UINativeWizard::exec() 118 { 119 /* Init wizard: */ 120 init(); 121 122 /* Call to base-class: */ 123 return QIWithRetranslateUI<QDialog>::exec(); 124 } 125 121 126 QPushButton *UINativeWizard::wizardButton(const WizardButtonType &enmType) const 122 127 { … … 325 330 gEDataManager->setModeForWizardType(m_enmType, m_enmMode); 326 331 327 /* Cleanup/init again: */328 cleanup();332 /* Reinit everything: */ 333 deinit(); 329 334 init(); 330 335 } … … 565 570 delete m_pNotificationCenter; 566 571 m_pNotificationCenter = 0; 567 572 } 573 574 void UINativeWizard::init() 575 { 576 /* Populate pages: */ 577 populatePages(); 578 579 /* Translate wizard: */ 580 retranslateUi(); 581 /* Translate wizard pages: */ 582 retranslatePages(); 583 584 /* Resize wizard to 'golden ratio': */ 585 resizeToGoldenRatio(); 586 587 /* Make sure current page initialized: */ 588 sltCurrentIndexChanged(); 589 } 590 591 void UINativeWizard::deinit() 592 { 568 593 /* Remove all the pages: */ 569 594 m_pWidgetStack->blockSignals(true); … … 581 606 m_invisiblePages.clear(); 582 607 wizardClean(); 583 }584 585 void UINativeWizard::init()586 {587 /* Populate pages: */588 populatePages();589 590 /* Translate wizard: */591 retranslateUi();592 /* Translate wizard pages: */593 retranslatePages();594 595 /* Resize wizard to 'golden ratio': */596 resizeToGoldenRatio();597 598 /* Make sure current page initialized: */599 sltCurrentIndexChanged();600 608 } 601 609 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UINativeWizard.h
r92035 r92044 80 80 public: 81 81 82 /** Returns local notification-center reference. */83 UINotificationCenter *notificationCenter() const;84 /** Immediately handles notification @a pProgress object. */85 bool handleNotificationProgressNow(UINotificationProgress *pProgress);86 87 public slots:88 89 /** Executes wizard in window modal mode.90 * @note You shouldn't have to override it! */91 virtual int exec() /* final */;92 93 protected:94 95 82 /** Constructs wizard passing @a pParent to the base-class. 96 83 * @param enmType Brings the wizard type. … … 101 88 WizardMode enmMode = WizardMode_Auto, 102 89 const QString &strHelpHashtag = QString()); 90 /** Destructs wizard. */ 91 virtual ~UINativeWizard() /* override */; 92 93 /** Returns local notification-center reference. */ 94 UINotificationCenter *notificationCenter() const; 95 /** Immediately handles notification @a pProgress object. */ 96 bool handleNotificationProgressNow(UINotificationProgress *pProgress); 97 98 public slots: 99 100 /** Executes wizard in window modal mode. 101 * @note You shouldn't have to override it! */ 102 virtual int exec() /* final */; 103 104 protected: 103 105 104 106 /** Returns wizard type. */ … … 166 168 /** Inits all. */ 167 169 void init(); 170 /** Deinits all. */ 171 void deinit(); 168 172 169 173 /** Performs pages translation. */
Note:
See TracChangeset
for help on using the changeset viewer.

