- Timestamp:
- Jul 17, 2013 11:58:03 AM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp
r47121 r47209 162 162 } 163 163 164 void UIPopupCenter::recall(QWidget *pParent, const QString &strPopupPaneID) 165 { 166 hidePopupPane(pParent, strPopupPaneID); 167 } 168 164 169 void UIPopupCenter::showPopupPane(QWidget *pParent, const QString &strPopupPaneID, 165 170 const QString &strMessage, const QString &strDetails, … … 191 196 } 192 197 193 /* Make sure parent is alwaysset! */198 /* Make sure parent is set! */ 194 199 AssertMsg(pParent, ("Parent is NULL!")); 195 200 if (!pParent) … … 235 240 buttonDescriptions, fProposeAutoConfirmation); 236 241 } 242 } 243 244 void UIPopupCenter::hidePopupPane(QWidget *pParent, const QString &strPopupPaneID) 245 { 246 /* Make sure parent is set! */ 247 AssertMsg(pParent, ("Parent is NULL!")); 248 if (!pParent) 249 return; 250 251 /* Make sure corresponding popup-stack *exists*: */ 252 const QString strPopupStackID(popupStackID(pParent)); 253 if (!m_stacks.contains(strPopupStackID)) 254 return; 255 256 /* Make sure corresponding popup-pane *exists*: */ 257 UIPopupStack *pPopupStack = m_stacks[strPopupStackID]; 258 if (!pPopupStack->exists(strPopupPaneID)) 259 return; 260 261 /* Recall corresponding popup-pane: */ 262 pPopupStack->recallPopupPane(strPopupPaneID); 237 263 } 238 264 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h
r47121 r47209 95 95 bool fProposeAutoConfirmation = false); 96 96 97 /* API: Recall function, 98 * Close corresponding popup of passed parent: */ 99 void recall(QWidget *pParent, const QString &strPopupPaneID); 100 97 101 /* API: Runtime UI stuff: */ 98 102 void cannotSendACPIToMachine(QWidget *pParent); … … 124 128 void cleanup(); 125 129 126 /* Helper : Popup-pane stuff: */130 /* Helpers: Popup-pane stuff: */ 127 131 void showPopupPane(QWidget *pParent, const QString &strPopupPaneID, 128 132 const QString &strMessage, const QString &strDetails, … … 130 134 QString strButtonText1, QString strButtonText2, 131 135 bool fProposeAutoConfirmation); 136 void hidePopupPane(QWidget *pParent, const QString &strPopupPaneID); 132 137 133 138 /* Helpers: Popup-stack stuff: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp
r47108 r47209 51 51 } 52 52 53 void UIPopupPane::recall() 54 { 55 /* Close popup-pane with *escape* button: */ 56 done(m_pButtonPane->escapeButton()); 57 } 58 53 59 void UIPopupPane::setMessage(const QString &strMessage) 54 60 { -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.h
r47108 r47209 72 72 const QMap<int, QString> &buttonDescriptions, 73 73 bool fProposeAutoConfirmation); 74 75 /* API: Recall stuff: */ 76 void recall(); 74 77 75 78 /* API: Text stuff: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneButtonPane.h
r47012 r47209 46 46 /* API: Button stuff: */ 47 47 void setButtons(const QMap<int, QString> &buttonDescriptions); 48 int defaultButton() const { return m_iDefaultButton; } 49 int escapeButton() const { return m_iEscapeButton; } 48 50 49 51 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStack.cpp
r47041 r47209 99 99 /* Get existing popup-pane: */ 100 100 UIPopupPane *pPopupPane = m_panes[strPopupPaneID]; 101 101 102 /* Update message and details: */ 102 103 pPopupPane->setMessage(strMessage); … … 111 112 sltAdjustGeometry(); 112 113 } 114 } 115 116 void UIPopupStack::recallPopupPane(const QString &strPopupPaneID) 117 { 118 /* Make sure there is such popup-pane already: */ 119 if (!m_panes.contains(strPopupPaneID)) 120 { 121 AssertMsgFailed(("Popup-pane doesn't exists!")); 122 return; 123 } 124 125 /* Get existing popup-pane: */ 126 UIPopupPane *pPopupPane = m_panes[strPopupPaneID]; 127 128 /* Recall popup-pane: */ 129 pPopupPane->recall(); 113 130 } 114 131 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStack.h
r47041 r47209 53 53 void updatePopupPane(const QString &strPopupPaneID, 54 54 const QString &strMessage, const QString &strDetails); 55 void recallPopupPane(const QString &strPopupPaneID); 55 56 56 57 /* API: Parent stuff: */
Note:
See TracChangeset
for help on using the changeset viewer.