Changeset 100967 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 25, 2023 11:37:51 AM (16 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp
r100961 r100967 193 193 #endif 194 194 195 /* Translate warning stuff: */ 196 m_strWarningHint = tr("Invalid settings detected"); 197 if (!m_fValid || !m_fSilent) 198 m_pWarningPane->setWarningLabel(m_strWarningHint); 195 /* Translate warning-pane stuff: */ 196 m_pWarningPane->setWarningLabelText(tr("Invalid settings detected")); 199 197 200 198 /* Retranslate all validators: */ … … 493 491 m_fValid = true; 494 492 m_fSilent = true; 495 m_pWarningPane->setWarningLabel(QString());496 493 497 494 /* Enumerating all the validators we have: */ … … 514 511 m_fSilent = false; 515 512 516 /* Configure warning-pane label: */517 m_pWarningPane->setWarningLabel(m_strWarningHint);518 519 513 /* Stop dialog revalidation on first error/warning: */ 520 514 break; 521 515 } 522 516 } 517 518 /* Update warning-pane visibility: */ 519 m_pWarningPane->setWarningLabelVisible(!m_fValid || !m_fSilent); 523 520 524 521 /* Make sure warning-pane visible if necessary: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsWarningPane.cpp
r100961 r100967 50 50 } 51 51 52 void UISettingsWarningPane::setWarningLabel(const QString &strWarningLabel) 53 { 54 /* Assign passed text directly to warning-label: */ 55 m_pTextLabel->setText(strWarningLabel); 52 void UISettingsWarningPane::setWarningLabelText(const QString &strText) 53 { 54 m_pTextLabel->setText(strText); 55 } 56 57 void UISettingsWarningPane::setWarningLabelVisible(bool fVisible) 58 { 59 m_pTextLabel->setVisible(fVisible); 56 60 } 57 61 … … 175 179 m_pTextLabel = new QLabel; 176 180 { 177 /* Add into layout: */181 m_pTextLabel->setVisible(false); 178 182 pMainLayout->addWidget(m_pTextLabel); 179 183 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsWarningPane.h
r100961 r100967 68 68 UISettingsWarningPane(QWidget *pParent = 0); 69 69 70 /** Defines current @a strWarningLabel text. */ 71 void setWarningLabel(const QString &strWarningLabel); 70 /** Defines current warning-label @a strText. */ 71 void setWarningLabelText(const QString &strText); 72 /** Defines whether warning-label should be @a fVisible. */ 73 void setWarningLabelVisible(bool fVisible); 72 74 73 75 /** Registers corresponding @a pValidator. */
Note:
See TracChangeset
for help on using the changeset viewer.