Changeset 47847 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 19, 2013 3:44:05 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.cpp
r47846 r47847 32 32 UIWarningPane::UIWarningPane(QWidget *pParent) 33 33 : QWidget(pParent) 34 , m_pWarningLabel(0) 34 , m_pIconLayout(0) 35 , m_pTextLabel(0) 35 36 { 36 37 /* Prepare: */ … … 40 41 void UIWarningPane::setWarningLabel(const QString &strWarningLabel) 41 42 { 42 m_pWarningLabel->setText(strWarningLabel); 43 /* Assign passed text directly to warning-label: */ 44 m_pTextLabel->setText(strWarningLabel); 43 45 } 44 46 45 47 void UIWarningPane::registerValidator(UIPageValidator *pValidator) 46 48 { 47 /* Make sure validator is set!*/49 /* Make sure validator exists: */ 48 50 AssertPtrReturnVoid(pValidator); 49 51 50 /* Mak re sure validator is not registered yet: */52 /* Make sure validator is not registered yet: */ 51 53 if (m_validators.contains(pValidator)) 52 54 { … … 64 66 m_icons << pIconLabel; 65 67 /* Add icon-label into layout: */ 66 m_p Layout->addWidget(pIconLabel);68 m_pIconLayout->addWidget(pIconLabel); 67 69 /* Configure icon-label: */ 68 70 pIconLabel->setMouseTracking(true); … … 73 75 } 74 76 75 /* Mark icon as ' non-hovered': */77 /* Mark icon as 'unhovered': */ 76 78 m_hovered << false; 77 79 } … … 92 94 /* Add left stretch: */ 93 95 pMainLayout->addStretch(); 94 /* Create warning-label: */95 m_p WarningLabel = new QLabel;96 /* Create text-label: */ 97 m_pTextLabel = new QLabel; 96 98 { 97 99 /* Add into main-layout: */ 98 pMainLayout->addWidget(m_p WarningLabel);100 pMainLayout->addWidget(m_pTextLabel); 99 101 } 100 102 /* Create layout: */ 101 m_p Layout = new QHBoxLayout;103 m_pIconLayout = new QHBoxLayout; 102 104 { 103 105 /* Configure layout: */ 104 m_p Layout->setContentsMargins(0, 0, 0, 0);106 m_pIconLayout->setContentsMargins(0, 0, 0, 0); 105 107 /* Add into main-layout: */ 106 pMainLayout->addLayout(m_p Layout);108 pMainLayout->addLayout(m_pIconLayout); 107 109 } 108 110 /* Add right stretch: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.h
r47846 r47847 60 60 61 61 /* Variables: */ 62 QHBoxLayout *m_p Layout;63 QLabel *m_p WarningLabel;62 QHBoxLayout *m_pIconLayout; 63 QLabel *m_pTextLabel; 64 64 QList<UIPageValidator*> m_validators; 65 65 QList<QLabel*> m_icons;
Note:
See TracChangeset
for help on using the changeset viewer.