Changeset 80197 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 8, 2019 12:29:28 PM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/extensions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIComboBox.cpp
r80067 r80197 209 209 } 210 210 211 QString QIComboBox::currentText() const 212 { 213 /* Redirect to combo-box: */ 214 AssertPtrReturn(m_pComboBox, -1); 215 return m_pComboBox->currentText(); 216 } 217 218 void QIComboBox::addItems(const QStringList &items) const 219 { 220 /* Redirect to combo-box: */ 221 AssertPtrReturnVoid(m_pComboBox); 222 return m_pComboBox->addItems(items); 223 } 224 211 225 void QIComboBox::addItem(const QString &strText, const QVariant &userData /* = QVariant() */) const 212 226 { … … 258 272 AssertPtrReturn(m_pComboBox, -1); 259 273 return m_pComboBox->findData(data, iRole, flags); 274 } 275 276 int QIComboBox::findText(const QString &strText, 277 Qt::MatchFlags flags /* = static_cast<Qt::MatchFlags>(Qt::MatchExactly | Qt::MatchCaseSensitive) */) const 278 { 279 /* Redirect to combo-box: */ 280 AssertPtrReturn(m_pComboBox, -1); 281 return m_pComboBox->findData(strText, flags); 260 282 } 261 283 -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIComboBox.h
r79241 r80197 86 86 /** Returns the index of the current item in the combo-box. */ 87 87 int currentIndex() const; 88 /** Returns the text of the current item in the combo-box. */ 89 QString currentText() const; 88 90 91 /** Adds the @a items into the combo-box. */ 92 void addItems(const QStringList &items) const; 89 93 /** Adds the @a strText and userData (stored in the Qt::UserRole) into the combo-box. */ 90 94 void addItem(const QString &strText, const QVariant &userData = QVariant()) const; … … 105 109 int findData(const QVariant &data, int iRole = Qt::UserRole, 106 110 Qt::MatchFlags flags = static_cast<Qt::MatchFlags>(Qt::MatchExactly | Qt::MatchCaseSensitive)) const; 111 /** Returns the index of the item containing the given @a strText; otherwise returns -1. 112 * @param flags Specifies how the items in the combobox are searched. */ 113 int findText(const QString &strText, Qt::MatchFlags flags = static_cast<Qt::MatchFlags>(Qt::MatchExactly | Qt::MatchCaseSensitive)) const; 107 114 108 115 public slots:
Note:
See TracChangeset
for help on using the changeset viewer.