Logo Search packages:      
Sourcecode: qt4-x11 version File versions

template<class Key, class T>
Q_INLINE_TEMPLATE const T QMap< Key, T >::value ( const Key &  key  )  const [inline, inherited]

Returns the value associated with the key key.

If the map contains no item with key key, the function returns a {default-constructed value}. If there are multiple items for key in the map, the value of the most recently inserted one is returned.

See also:
key(), values(), contains(), operator[]()

Definition at line 440 of file qmap.h.

Referenced by QtVariantPropertyManager::attributes(), QtVariantPropertyManager::attributeType(), QtVariantPropertyManager::attributeValue(), QMultiMap< Key, T >::count(), QtEnumEditorFactory::createEditor(), QFormBuilder::createWidget(), Q3ButtonGroup::event(), QMultiMap< QString, QtSimpleXml * >::find(), Q3ButtonGroup::find(), AddressBook::findContact(), QGLWidget::fontDisplayListBase(), Q3ButtonGroup::id(), QtVariantPropertyManager::initializeProperty(), QSqlTableModel::insertRows(), AddressBook::loadFromFile(), MainWindow::metaStateChanged(), AddressBook::next(), QMap< Key, T >::operator[](), Q3TextEdit::optimDrawContents(), Q3TextEdit::optimInsert(), Q3TextEdit::optimPreviousLeftTag(), Q3TextEdit::optimText(), AddressBook::previous(), QtVariantPropertyManager::propertyType(), QMultiMap< Key, T >::remove(), Q3ButtonGroup::remove(), QSqlTableModel::rowCount(), Q3ButtonGroup::selected(), QSqlTableModel::submitAll(), QtBoolPropertyManager::valueIcon(), QMap< Key, T >::values(), QtBoolPropertyManager::valueText(), and QtVariantPropertyManager::variantProperty().

    QMapData::Node *node;
    if (d->size == 0 || (node = findNode(akey)) == e) {
        return T();
    } else {
        return concrete(node)->value;

Generated by  Doxygen 1.6.0   Back to index