Changeset 84917 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jun 23, 2020 12:06:12 PM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicInstallSetup.cpp
r84915 r84917 60 60 { 61 61 m_pTextVisibilityButton = new QToolButton(this); 62 m_pTextVisibilityButton->setFocusPolicy(Qt::ClickFocus); 62 63 m_pTextVisibilityButton->setAutoRaise(true); 63 64 m_pTextVisibilityButton->setCursor(Qt::ArrowCursor); … … 127 128 } 128 129 130 bool UIUserNamePasswordEditor::isComplete() 131 { 132 if (m_pUserNameLineEdit && m_pUserNameLineEdit->text().isEmpty()) 133 { 134 // mark user name the line edit 135 return false; 136 } 137 if (m_pPasswordLineEdit && m_pPasswordRepeatLineEdit) 138 { 139 if (m_pPasswordLineEdit->text() != m_pPasswordRepeatLineEdit->text()) 140 { 141 // mark password line edits 142 return false; 143 } 144 if (m_pPasswordLineEdit->text().isEmpty()) 145 return false; 146 } 147 return true; 148 } 149 129 150 void UIUserNamePasswordEditor::retranslateUi() 130 151 { … … 165 186 pLabel->setBuddy(pLineEdit); 166 187 ++iRow; 188 connect(pLineEdit, &T::textChanged, this, &UIUserNamePasswordEditor::sigSomeTextChanged); 167 189 return; 168 190 } … … 226 248 m_pUserNamePasswordEditor = new UIUserNamePasswordEditor; 227 249 pMemoryLayout->addWidget(m_pUserNamePasswordEditor, 0, 0); 250 connect(m_pUserNamePasswordEditor, &UIUserNamePasswordEditor::sigSomeTextChanged, 251 this, &UIWizardNewVMPageBasicInstallSetup::completeChanged); 228 252 } 229 253 if (m_pLabel) … … 277 301 bool UIWizardNewVMPageBasicInstallSetup::isComplete() const 278 302 { 279 return UIWizardPage::isComplete(); 280 } 303 if (m_pUserNamePasswordEditor) 304 return m_pUserNamePasswordEditor->isComplete(); 305 return true; 306 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicInstallSetup.h
r84915 r84917 70 70 Q_OBJECT; 71 71 72 signals: 73 74 /** this is emitted whenever the content of one of the line edits is changed. */ 75 void sigSomeTextChanged(); 76 72 77 public: 73 78 … … 79 84 QString password() const; 80 85 void setPassword(const QString &strPassword); 86 87 /** Returns false if username or password fields are empty, or password fields do not match. */ 88 bool isComplete(); 81 89 82 90 protected: … … 115 123 protected: 116 124 117 118 119 125 /* Widgets: */ 120 126 UIUserNamePasswordEditor *m_pUserNamePasswordEditor; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicNameType.cpp
r84915 r84917 347 347 int UIWizardNewVMPageBasicNameType::nextId() const 348 348 { 349 //UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard());350 //if (!pWizard || !pWizard->isUnattendedInstallEnabled())351 //return UIWizardNewVM::PageHardware;349 UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard()); 350 if (!pWizard || !pWizard->isUnattendedInstallEnabled()) 351 return UIWizardNewVM::PageHardware; 352 352 return UIWizardNewVM::PageInstallSetup; 353 353 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicNameType.h
r84890 r84917 117 117 118 118 /* Validation stuff: */ 119 bool validatePage();119 virtual bool validatePage() /* override */; 120 120 121 121 /* Widgets: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicUnattended.cpp
r84886 r84917 115 115 { 116 116 bool fISOFileOK = checkISOFile(); 117 //emit completeChanged();118 117 return fISOFileOK; 119 118 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicUnattended.h
r84886 r84917 91 91 92 92 /* Validation stuff: */ 93 bool validatePage();93 virtual bool validatePage() /* override */; 94 94 95 95 /* Widgets: */
Note:
See TracChangeset
for help on using the changeset viewer.