- Timestamp:
- Nov 15, 2007 6:10:55 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 26147
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/QIMessageBox.h
r4482 r5762 51 51 { 52 52 NoButton = 0, Ok = 1, Cancel = 2, Yes = 3, No = 4, Abort = 5, 53 Retry = 6, Ignore = 7, YesAll = 8, NoAll = 9, ButtonMask = 0xff, 54 Default = 0x100, Escape = 0x200, FlagMask = 0x300 53 Retry = 6, Ignore = 7, YesAll = 8, NoAll = 9, 54 ButtonMask = 0xFF, 55 56 Default = 0x100, Escape = 0x200, 57 FlagMask = 0x300 55 58 }; 56 59 … … 59 62 QWidget *aParent = 0, const char *aName = 0, bool aModal = TRUE, 60 63 WFlags aFlags = WStyle_DialogBorder); 64 65 QString buttonText (int aButton) const; 66 void setButtonText (int aButton, const QString &aText); 61 67 62 68 QString flagText() const { return mFlagCB->isShown() ? mFlagCB->text() : QString::null; } -
trunk/src/VBox/Frontends/VirtualBox/src/QIMessageBox.cpp
r4482 r5762 134 134 } 135 135 136 /** 137 * Returns the text of the given message box button. 138 * See QMessageBox::buttonText() for details. 139 * 140 * @param aButton Button index (0, 1 or 2). 141 */ 142 QString QIMessageBox::buttonText (int aButton) const 143 { 144 switch (aButton) 145 { 146 case 0: if (mButton0PB) return mButton0PB->text(); break; 147 case 1: if (mButton1PB) return mButton1PB->text(); break; 148 case 2: if (mButton2PB) return mButton2PB->text(); break; 149 default: break; 150 } 151 152 return QString::null; 153 } 154 155 /** 156 * Sets the text of the given message box button. 157 * See QMessageBox::setButtonText() for details. 158 * 159 * @param aButton Button index (0, 1 or 2). 160 * @param aText New button text. 161 */ 162 void QIMessageBox::setButtonText (int aButton, const QString &aText) 163 { 164 switch (aButton) 165 { 166 case 0: if (mButton0PB) mButton0PB->setText (aText); break; 167 case 1: if (mButton1PB) mButton1PB->setText (aText); break; 168 case 2: if (mButton2PB) mButton2PB->setText (aText); break; 169 default: break; 170 } 171 } 172 136 173 /** @fn QIMessageBox::flagText() const 137 174 *
Note:
See TracChangeset
for help on using the changeset viewer.