Changeset 87301 in vbox
- Timestamp:
- Jan 18, 2021 5:29:25 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r87276 r87301 899 899 src/widgets/UIStatusBarEditorWindow.h \ 900 900 src/widgets/UISearchLineEdit.h \ 901 src/widgets/UIToolBox.h \ 901 902 src/widgets/UIWarningPane.h \ 902 903 src/wizards/UIWizard.h \ … … 1016 1017 src/widgets/UIFilmContainer.cpp \ 1017 1018 src/widgets/UIPortForwardingTable.cpp \ 1018 src/widgets/UIStatusBarEditorWindow.cpp 1019 src/widgets/UIStatusBarEditorWindow.cpp \ 1020 src/widgets/UIToolBox.cpp 1019 1021 1020 1022 ifdef VBOX_GUI_WITH_NETWORK_MANAGER … … 1429 1431 src/widgets/UISpecialControls.cpp \ 1430 1432 src/widgets/UIStatusBarEditorWindow.cpp \ 1433 src/widgets/UIToolBox.cpp \ 1431 1434 src/widgets/UIWarningPane.cpp \ 1432 1435 src/wizards/UIWizard.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBox.cpp
r87293 r87301 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI UserNamePasswordEditorclass implementation.3 * VBox Qt GUI - UIToolBox class implementation. 4 4 */ 5 5 … … 17 17 18 18 /* Qt includes: */ 19 #include <QGridLayout>20 19 #include <QLabel> 21 20 #include <QStyle> … … 27 26 #include "UICommon.h" 28 27 #include "UIIconPool.h" 29 #include "UI UserNamePasswordEditor.h"28 #include "UIToolBox.h" 30 29 #include "UIWizardNewVM.h" 31 30 32 UIPasswordLineEdit::UIPasswordLineEdit(QWidget *pParent /*= 0 */) 33 : QLineEdit(pParent) 34 , m_pTextVisibilityButton(0) 31 class UITest : public QWidget 32 { 33 Q_OBJECT; 34 public: 35 UITest(QWidget *pParent = 0) 36 :QWidget(pParent) 37 {} 38 ~UITest(){} 39 }; 40 41 /********************************************************************************************************************************* 42 * UIToolTitleWidget definition. * 43 *********************************************************************************************************************************/ 44 45 class UIToolBoxTitleWidget : public QWidget 46 { 47 48 Q_OBJECT; 49 50 signals: 51 52 void sigShowPageWidget(); 53 54 public: 55 56 UIToolBoxTitleWidget(QWidget *pParent = 0); 57 void setText(const QString &strText); 58 59 private: 60 61 void prepare(); 62 QHBoxLayout *m_pLayout; 63 QLabel *m_pTitleLabel; 64 }; 65 66 /********************************************************************************************************************************* 67 * UIToolBoxPage definition. * 68 *********************************************************************************************************************************/ 69 70 class UIToolBoxPage : public QWidget 71 { 72 73 Q_OBJECT; 74 75 signals: 76 77 void sigShowPageWidget(); 78 79 public: 80 81 UIToolBoxPage(QWidget *pParent = 0); 82 void setTitle(const QString &strTitle); 83 /* @p pWidget's ownership is transferred to the page. */ 84 void setWidget(QWidget *pWidget); 85 void setTitleBackgroundColor(const QColor &color); 86 void setPageWidgetVisible(bool fVisible); 87 int index() const; 88 void setIndex(int iIndex); 89 90 protected: 91 92 virtual bool eventFilter(QObject *pWatched, QEvent *pEvent) /* override */; 93 94 private: 95 96 void prepare(); 97 QVBoxLayout *m_pLayout; 98 UIToolBoxTitleWidget *m_pTitleWidget; 99 QWidget *m_pWidget; 100 int m_iIndex; 101 }; 102 103 /********************************************************************************************************************************* 104 * UIToolTitleWidget implementation. * 105 *********************************************************************************************************************************/ 106 107 UIToolBoxTitleWidget::UIToolBoxTitleWidget(QWidget *pParent /* = 0 */) 108 :QWidget(pParent) 35 109 { 36 110 prepare(); 37 111 } 38 112 39 void UIPasswordLineEdit::toggleTextVisibility(bool fTextVisible) 40 { 41 AssertPtrReturnVoid(m_pTextVisibilityButton); 42 43 if (fTextVisible) 44 { 45 setEchoMode(QLineEdit::Normal); 46 if (m_pTextVisibilityButton) 47 m_pTextVisibilityButton->setIcon(UIIconPool::iconSet(":/eye_closed_10px.png")); 48 } 49 else 50 { 51 setEchoMode(QLineEdit::Password); 52 if (m_pTextVisibilityButton) 53 m_pTextVisibilityButton->setIcon(UIIconPool::iconSet(":/eye_10px.png")); 54 } 55 } 56 57 void UIPasswordLineEdit::prepare() 58 { 59 /* Prepare text visibility button: */ 60 m_pTextVisibilityButton = new QIToolButton(this); 61 if (m_pTextVisibilityButton) 62 { 63 m_pTextVisibilityButton->setIconSize(QSize(10, 10)); 64 m_pTextVisibilityButton->setFocusPolicy(Qt::ClickFocus); 65 m_pTextVisibilityButton->setCursor(Qt::ArrowCursor); 66 m_pTextVisibilityButton->show(); 67 connect(m_pTextVisibilityButton, &QToolButton::clicked, this, &UIPasswordLineEdit::sltHandleTextVisibilityChange); 68 } 69 70 toggleTextVisibility(false); 71 adjustTextVisibilityButtonGeometry(); 72 } 73 74 void UIPasswordLineEdit::adjustTextVisibilityButtonGeometry() 75 { 76 AssertPtrReturnVoid(m_pTextVisibilityButton); 77 78 #ifdef VBOX_WS_MAC 79 /* Do not forget to update QIToolButton size on macOS, it's FIXED: */ 80 m_pTextVisibilityButton->setFixedSize(m_pTextVisibilityButton->minimumSizeHint()); 81 /* Calculate suitable position for a QIToolButton, it's FRAMELESS: */ 82 const int iWidth = m_pTextVisibilityButton->width(); 83 const int iMinHeight = qMin(height(), m_pTextVisibilityButton->height()); 84 const int iMaxHeight = qMax(height(), m_pTextVisibilityButton->height()); 85 const int iHalfHeightDiff = (iMaxHeight - iMinHeight) / 2; 86 m_pTextVisibilityButton->setGeometry(width() - iWidth - iHalfHeightDiff, iHalfHeightDiff, iWidth, iWidth); 87 #else 88 int iFrameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth); 89 int iSize = height() - 2 * iFrameWidth; 90 m_pTextVisibilityButton->setGeometry(width() - iSize, iFrameWidth, iSize, iSize); 91 #endif 92 } 93 94 void UIPasswordLineEdit::resizeEvent(QResizeEvent *pEvent) 95 { 96 /* Call to base-class: */ 97 QLineEdit::resizeEvent(pEvent); 98 99 adjustTextVisibilityButtonGeometry(); 100 } 101 102 void UIPasswordLineEdit::sltHandleTextVisibilityChange() 103 { 104 bool fTextVisible = false; 105 if (echoMode() == QLineEdit::Normal) 106 fTextVisible = false; 107 else 108 fTextVisible = true; 109 toggleTextVisibility(fTextVisible); 110 emit sigTextVisibilityToggled(fTextVisible); 111 } 112 113 UIUserNamePasswordEditor::UIUserNamePasswordEditor(QWidget *pParent /* = 0 */) 114 : QIWithRetranslateUI<QWidget>(pParent) 115 , m_pUserNameLineEdit(0) 116 , m_pPasswordLineEdit(0) 117 , m_pPasswordRepeatLineEdit(0) 118 , m_pUserNameLabel(0) 119 , m_pPasswordLabel(0) 120 , m_pPasswordRepeatLabel(0) 121 , m_fForceUnmark(false) 113 void UIToolBoxTitleWidget::setText(const QString &strText) 114 { 115 if (m_pTitleLabel) 116 m_pTitleLabel->setText(strText); 117 } 118 119 void UIToolBoxTitleWidget::prepare() 120 { 121 m_pLayout = new QHBoxLayout(this); 122 m_pLayout->setContentsMargins(1.f * qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin), 123 .4f * qApp->style()->pixelMetric(QStyle::PM_LayoutTopMargin), 124 1.f * qApp->style()->pixelMetric(QStyle::PM_LayoutRightMargin), 125 .4f * qApp->style()->pixelMetric(QStyle::PM_LayoutRightMargin)); 126 127 m_pTitleLabel = new QLabel; 128 m_pLayout->addWidget(m_pTitleLabel); 129 } 130 131 /********************************************************************************************************************************* 132 * UIToolBoxPage implementation. * 133 *********************************************************************************************************************************/ 134 135 UIToolBoxPage::UIToolBoxPage(QWidget *pParent /* = 0 */) 136 :QWidget(pParent) 137 , m_pLayout(0) 138 , m_pTitleWidget(0) 139 , m_pWidget(0) 140 , m_iIndex(0) 141 122 142 { 123 143 prepare(); 124 144 } 125 145 126 QString UIUserNamePasswordEditor::userName() const 127 { 128 if (m_pUserNameLineEdit) 129 return m_pUserNameLineEdit->text(); 130 return QString(); 131 } 132 133 void UIUserNamePasswordEditor::setUserName(const QString &strUserName) 134 { 135 if (m_pUserNameLineEdit) 136 return m_pUserNameLineEdit->setText(strUserName); 137 } 138 139 QString UIUserNamePasswordEditor::password() const 140 { 141 if (m_pPasswordLineEdit) 142 return m_pPasswordLineEdit->text(); 143 return QString(); 144 } 145 146 void UIUserNamePasswordEditor::setPassword(const QString &strPassword) 147 { 148 if (m_pPasswordLineEdit) 149 m_pPasswordLineEdit->setText(strPassword); 150 if (m_pPasswordRepeatLineEdit) 151 m_pPasswordRepeatLineEdit->setText(strPassword); 152 } 153 154 bool UIUserNamePasswordEditor::isUserNameComplete() 155 { 156 bool fComplete = (m_pUserNameLineEdit && !m_pUserNameLineEdit->text().isEmpty()); 157 markLineEdit(m_pUserNameLineEdit, !fComplete); 158 return fComplete; 159 } 160 161 bool UIUserNamePasswordEditor::isPasswordComplete() 162 { 163 bool fPasswordOK = true; 164 if (m_pPasswordLineEdit && m_pPasswordRepeatLineEdit) 165 { 166 if (m_pPasswordLineEdit->text() != m_pPasswordRepeatLineEdit->text()) 167 fPasswordOK = false; 168 if (m_pPasswordLineEdit->text().isEmpty()) 169 fPasswordOK = false; 170 } 171 markLineEdit(m_pPasswordLineEdit, !fPasswordOK); 172 markLineEdit(m_pPasswordRepeatLineEdit, !fPasswordOK); 173 return fPasswordOK; 174 } 175 176 bool UIUserNamePasswordEditor::isComplete() 177 { 178 bool fUserNameField = isUserNameComplete(); 179 bool fPasswordField = isPasswordComplete(); 180 return fUserNameField && fPasswordField; 181 } 182 183 void UIUserNamePasswordEditor::setForceUnmark(bool fForceUnmark) 184 { 185 m_fForceUnmark = fForceUnmark; 186 isUserNameComplete(); 187 isPasswordComplete(); 188 } 189 190 void UIUserNamePasswordEditor::retranslateUi() 191 { 192 if (m_pUserNameLabel) 193 { 194 m_pUserNameLabel->setText(UIWizardNewVM::tr("User Name:")); 195 m_pUserNameLabel->setToolTip(UIWizardNewVM::tr("Type the user name which will be used in attended install:")); 196 197 } 198 if (m_pPasswordLabel) 199 { 200 m_pPasswordLabel->setText(UIWizardNewVM::tr("Password:")); 201 m_pPasswordLabel->setToolTip(UIWizardNewVM::tr("Type the password for the user name")); 202 203 } 204 if (m_pPasswordRepeatLabel) 205 { 206 m_pPasswordRepeatLabel->setText(UIWizardNewVM::tr("Repeat Password:")); 207 m_pPasswordRepeatLabel->setToolTip(UIWizardNewVM::tr("Retype the password:")); 208 } 209 } 210 211 template <class T> 212 void UIUserNamePasswordEditor::addLineEdit(int &iRow, QLabel *&pLabel, T *&pLineEdit, QGridLayout *pLayout) 213 { 214 if (!pLayout || pLabel || pLineEdit) 215 return; 216 pLabel = new QLabel; 217 if (!pLabel) 218 return; 219 pLabel->setAlignment(Qt::AlignRight); 220 pLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); 221 222 pLayout->addWidget(pLabel, iRow, 0, 1, 1); 223 224 225 pLineEdit = new T; 226 if (!pLineEdit) 227 return; 228 pLayout->addWidget(pLineEdit, iRow, 1, 1, 3); 229 230 pLabel->setBuddy(pLineEdit); 231 ++iRow; 232 connect(pLineEdit, &T::textChanged, this, &UIUserNamePasswordEditor::sltSomeTextChanged); 233 return; 234 } 235 236 void UIUserNamePasswordEditor::markLineEdit(QLineEdit *pLineEdit, bool fError) 237 { 238 if (!pLineEdit) 239 return; 240 QPalette palette = pLineEdit->palette(); 241 if (!fError || m_fForceUnmark) 242 palette.setColor(QPalette::Base, m_orginalLineEditBaseColor); 243 else 244 palette.setColor(QPalette::Base, QColor(255, 180, 180)); 245 pLineEdit->setPalette(palette); 246 } 247 248 void UIUserNamePasswordEditor::prepare() 249 { 250 QGridLayout *pMainLayout = new QGridLayout; 251 pMainLayout->setContentsMargins(0, 0, 0, 0); 252 if (!pMainLayout) 253 return; 254 setLayout(pMainLayout); 255 int iRow = 0; 256 addLineEdit<QLineEdit>(iRow, m_pUserNameLabel, m_pUserNameLineEdit, pMainLayout); 257 addLineEdit<UIPasswordLineEdit>(iRow, m_pPasswordLabel, m_pPasswordLineEdit, pMainLayout); 258 addLineEdit<UIPasswordLineEdit>(iRow, m_pPasswordRepeatLabel, m_pPasswordRepeatLineEdit, pMainLayout); 259 260 connect(m_pPasswordLineEdit, &UIPasswordLineEdit::sigTextVisibilityToggled, 261 this, &UIUserNamePasswordEditor::sltHandlePasswordVisibility); 262 connect(m_pPasswordRepeatLineEdit, &UIPasswordLineEdit::sigTextVisibilityToggled, 263 this, &UIUserNamePasswordEditor::sltHandlePasswordVisibility); 264 /* Cache the original back color of the line edit to restore it correctly: */ 265 if (m_pUserNameLineEdit) 266 m_orginalLineEditBaseColor = m_pUserNameLineEdit->palette().color(QPalette::Base); 146 void UIToolBoxPage::setTitle(const QString &strTitle) 147 { 148 if (!m_pTitleWidget) 149 return; 150 m_pTitleWidget->setText(strTitle); 151 } 152 153 void UIToolBoxPage::prepare() 154 { 155 m_pLayout = new QVBoxLayout(this); 156 m_pLayout->setContentsMargins(0, 0, 0, 0); 157 m_pTitleWidget = new UIToolBoxTitleWidget; 158 m_pTitleWidget->installEventFilter(this); 159 m_pLayout->addWidget(m_pTitleWidget); 160 } 161 162 void UIToolBoxPage::setWidget(QWidget *pWidget) 163 { 164 if (!m_pLayout || !pWidget) 165 return; 166 m_pWidget = pWidget; 167 m_pLayout->addWidget(m_pWidget); 168 m_pWidget->hide(); 169 } 170 171 void UIToolBoxPage::setTitleBackgroundColor(const QColor &color) 172 { 173 if (!m_pTitleWidget) 174 return; 175 QPalette palette = m_pTitleWidget->palette(); 176 palette.setColor(QPalette::Window, color); 177 m_pTitleWidget->setPalette(palette); 178 m_pTitleWidget->setAutoFillBackground(true); 179 } 180 181 void UIToolBoxPage::setPageWidgetVisible(bool fVisible) 182 { 183 if (m_pWidget) 184 m_pWidget->setVisible(fVisible); 185 } 186 187 int UIToolBoxPage::index() const 188 { 189 return m_iIndex; 190 } 191 192 void UIToolBoxPage::setIndex(int iIndex) 193 { 194 m_iIndex = iIndex; 195 } 196 197 bool UIToolBoxPage::eventFilter(QObject *pWatched, QEvent *pEvent) 198 { 199 if (pWatched == m_pTitleWidget && pEvent->type() == QEvent::MouseButtonPress) 200 emit sigShowPageWidget(); 201 return QWidget::eventFilter(pWatched, pEvent); 202 203 } 204 205 /********************************************************************************************************************************* 206 * UIToolBox implementation. * 207 *********************************************************************************************************************************/ 208 209 UIToolBox::UIToolBox(QWidget *pParent /* = 0 */) 210 : QIWithRetranslateUI<QFrame>(pParent) 211 { 212 prepare(); 213 } 214 215 bool UIToolBox::insertItem(int iIndex, QWidget *pWidget, const QString &strTitle) 216 { 217 if (m_pages.contains(iIndex)) 218 return false; 219 UIToolBoxPage *pNewPage = new UIToolBoxPage; 220 221 pNewPage->setWidget(pWidget); 222 pNewPage->setIndex(iIndex); 223 pNewPage->setTitle(strTitle); 224 225 const QPalette pal = palette(); 226 QColor tabBackgroundColor = pal.color(QPalette::Active, QPalette::Highlight).lighter(110); 227 pNewPage->setTitleBackgroundColor(tabBackgroundColor); 228 229 m_pages[iIndex] = pNewPage; 230 m_pMainLayout->insertWidget(iIndex, pNewPage); 231 232 connect(pNewPage, &UIToolBoxPage::sigShowPageWidget, 233 this, &UIToolBox::sltHandleShowPageWidget); 234 235 return iIndex; 236 } 237 238 void UIToolBox::setItemEnabled(int iIndex, bool fEnabled) 239 { 240 Q_UNUSED(fEnabled); 241 Q_UNUSED(iIndex); 242 } 243 244 void UIToolBox::setItemText(int iIndex, const QString &strTitle) 245 { 246 QMap<int, UIToolBoxPage*>::iterator iterator = m_pages.find(iIndex); 247 if (iterator == m_pages.end()) 248 return; 249 iterator.value()->setTitle(strTitle); 250 } 251 252 void UIToolBox::setItemIcon(int iIndex, const QIcon &icon) 253 { 254 Q_UNUSED(iIndex); 255 Q_UNUSED(icon); 256 } 257 258 void UIToolBox::setPageVisible(int iIndex) 259 { 260 QMap<int, UIToolBoxPage*>::iterator iterator = m_pages.find(iIndex); 261 if (iterator == m_pages.end()) 262 return; 263 foreach(UIToolBoxPage *pPage, m_pages) 264 pPage->setPageWidgetVisible(false); 265 266 iterator.value()->setPageWidgetVisible(true); 267 } 268 269 void UIToolBox::retranslateUi() 270 { 271 } 272 273 void UIToolBox::prepare() 274 { 275 m_pMainLayout = new QVBoxLayout(this); 276 //m_pMainLayout->setContentsMargins(0, 0, 0, 0); 267 277 268 278 retranslateUi(); 269 279 } 270 280 271 void UIUserNamePasswordEditor::sltHandlePasswordVisibility(bool fPasswordVisible) 272 { 273 if (m_pPasswordLineEdit) 274 m_pPasswordLineEdit->toggleTextVisibility(fPasswordVisible); 275 if (m_pPasswordRepeatLineEdit) 276 m_pPasswordRepeatLineEdit->toggleTextVisibility(fPasswordVisible); 277 } 278 279 void UIUserNamePasswordEditor::sltSomeTextChanged() 280 { 281 /* Check text lines edits and mark them accordingly: */ 282 isComplete(); 283 emit sigSomeTextChanged(); 284 } 281 void UIToolBox::sltHandleShowPageWidget() 282 { 283 UIToolBoxPage *pPage = qobject_cast<UIToolBoxPage*>(sender()); 284 if (!pPage) 285 return; 286 setPageVisible(pPage->index()); 287 } 288 289 #include "UIToolBox.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBox.h
r87293 r87301 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI UserNamePasswordEditorclass declaration.3 * VBox Qt GUI - UIToolBox class declaration. 4 4 */ 5 5 … … 16 16 */ 17 17 18 #ifndef FEQT_INCLUDED_SRC_widgets_UI UserNamePasswordEditor_h19 #define FEQT_INCLUDED_SRC_widgets_UI UserNamePasswordEditor_h18 #ifndef FEQT_INCLUDED_SRC_widgets_UIToolBox_h 19 #define FEQT_INCLUDED_SRC_widgets_UIToolBox_h 20 20 #ifndef RT_WITHOUT_PRAGMA_ONCE 21 21 # pragma once … … 23 23 24 24 /* Qt includes: */ 25 #include <Q LineEdit>26 #include <Q Widget>25 #include <QFrame> 26 #include <QMap> 27 27 28 28 /* Local includes: */ … … 30 30 31 31 /* Forward declarations: */ 32 class Q GridLayout;32 class QVBoxLayout; 33 33 class QLabel; 34 class QIToolButton;34 class UIToolBoxPage; 35 35 36 class UIPasswordLineEdit : public QLineEdit 37 { 38 Q_OBJECT; 39 40 signals: 41 42 void sigTextVisibilityToggled(bool fTextVisible); 43 44 public: 45 46 UIPasswordLineEdit(QWidget *pParent = 0); 47 void toggleTextVisibility(bool fTextVisible); 48 49 protected: 50 51 virtual void resizeEvent(QResizeEvent *pEvent) /* override */; 52 53 private: 54 55 void prepare(); 56 void adjustTextVisibilityButtonGeometry(); 57 58 QIToolButton *m_pTextVisibilityButton; 59 60 private slots: 61 62 void sltHandleTextVisibilityChange(); 63 }; 64 65 class UIUserNamePasswordEditor : public QIWithRetranslateUI<QWidget> 36 class SHARED_LIBRARY_STUFF UIToolBox : public QIWithRetranslateUI<QFrame> 66 37 { 67 38 … … 70 41 signals: 71 42 72 /** this is emitted whenever the content of one of the line edits is changed. */73 void sigSomeTextChanged();74 43 75 44 public: 76 45 77 UIUserNamePasswordEditor(QWidget *pParent = 0); 78 79 QString userName() const; 80 void setUserName(const QString &strUserName); 81 82 QString password() const; 83 void setPassword(const QString &strPassword); 84 85 /** Returns false if username or password fields are empty, or password fields do not match. */ 86 bool isComplete(); 87 /** Sets m_fForceUnmark flag. see it for more info. */ 88 void setForceUnmark(bool fForceUnmark); 46 UIToolBox(QWidget *pParent = 0); 47 bool insertItem(int iIndex, QWidget *pWidget, const QString &strTitle); 48 void setItemEnabled(int iIndex, bool fEnabled); 49 void setItemText(int iIndex, const QString &strTitle); 50 void setItemIcon(int iIndex, const QIcon &icon); 51 void setPageVisible(int iIndex); 89 52 90 53 protected: … … 94 57 private slots: 95 58 96 void sltHandlePasswordVisibility(bool fPasswordVisible); 97 void sltSomeTextChanged(); 59 void sltHandleShowPageWidget(); 98 60 99 61 private: 100 62 101 63 void prepare(); 102 template <class T>103 void addLineEdit(int &iRow, QLabel *&pLabel, T *&pLineEdit, QGridLayout *pLayout);104 /** Changes @p pLineEdit's base color to indicate an error or reverts it to the original color. */105 void markLineEdit(QLineEdit *pLineEdit, bool fError);106 64 107 bool isUserNameComplete(); 108 bool isPasswordComplete(); 109 110 QLineEdit *m_pUserNameLineEdit; 111 UIPasswordLineEdit *m_pPasswordLineEdit; 112 UIPasswordLineEdit *m_pPasswordRepeatLineEdit; 113 114 QLabel *m_pUserNameLabel; 115 QLabel *m_pPasswordLabel; 116 QLabel *m_pPasswordRepeatLabel; 117 QColor m_orginalLineEditBaseColor; 118 /** When true line edits are not marked even if they have to be. */ 119 bool m_fForceUnmark; 65 QVBoxLayout *m_pMainLayout; 66 QMap<int, UIToolBoxPage*> m_pages; 120 67 }; 121 68 122 #endif /* !FEQT_INCLUDED_SRC_widgets_UI UserNamePasswordEditor_h */69 #endif /* !FEQT_INCLUDED_SRC_widgets_UIToolBox_h */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r87294 r87301 25 25 #include <QSpacerItem> 26 26 #include <QSpinBox> 27 #include <QToolBox>28 27 #include <QVBoxLayout> 29 28 … … 37 36 #include "UIMedium.h" 38 37 #include "UINameAndSystemEditor.h" 38 #include "UIToolBox.h" 39 39 #include "UIUserNamePasswordEditor.h" 40 40 #include "UIWizardNewVM.h" … … 49 49 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 50 50 { 51 m_pToolBox = new QToolBox;51 m_pToolBox = new UIToolBox; 52 52 m_pToolBox->insertItem(ExpertToolboxItems_NameAndOSType, createNameOSTypeWidgets(/* fIncreaseLeftIndent */ true, 53 53 /* fCreateLabels */ false), ""); … … 57 57 m_pToolBox->insertItem(ExpertToolboxItems_GAInstall, createGAInstallWidgets(/* fIncreaseLeftIndent */ true), ""); 58 58 m_pToolBox->insertItem(ExpertToolboxItems_ProductKey, createProductKeyWidgets(/* fIncreaseLeftIndent */ true), ""); 59 60 m_pToolBox->setPageVisible(ExpertToolboxItems_NameAndOSType); 59 61 pMainLayout->addWidget(m_pToolBox); 62 60 63 61 64 pMainLayout->addStretch(); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
r87244 r87301 28 28 29 29 /* Forward declarations: */ 30 class QToolBox;30 class UIToolBox; 31 31 32 32 /** Expert page of the New Virtual Machine wizard. */ … … 111 111 void markWidgets() const; 112 112 113 QToolBox *m_pToolBox;113 UIToolBox *m_pToolBox; 114 114 }; 115 115
Note:
See TracChangeset
for help on using the changeset viewer.