Qt 4.8
|
The QVector class is a template class that provides a dynamic array. More...
#include <qdatastream.h>
Public Types | |
typedef const T * | const_iterator |
The QVector::const_iterator typedef provides an STL-style const iterator for QVector and QStack. More... | |
typedef const value_type * | const_pointer |
Typedef for const T *. More... | |
typedef const value_type & | const_reference |
Typedef for T &. More... | |
typedef const_iterator | ConstIterator |
Qt-style synonym for QVector::const_iterator. More... | |
typedef qptrdiff | difference_type |
Typedef for ptrdiff_t. More... | |
typedef T * | iterator |
The QVector::iterator typedef provides an STL-style non-const iterator for QVector and QStack. More... | |
typedef iterator | Iterator |
Qt-style synonym for QVector::iterator. More... | |
typedef value_type * | pointer |
Typedef for T *. More... | |
typedef value_type & | reference |
Typedef for T &. More... | |
typedef int | size_type |
Typedef for int. More... | |
typedef T | value_type |
Typedef for T. More... | |
Public Functions | |
void | append (const T &t) |
Inserts value at the end of the vector. More... | |
const T & | at (int i) const |
Returns the item at index position i in the vector. More... | |
reference | back () |
This function is provided for STL compatibility. More... | |
const_reference | back () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
iterator | begin () |
Returns an STL-style iterator pointing to the first item in the vector. More... | |
const_iterator | begin () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
int | capacity () const |
Returns the maximum number of items that can be stored in the vector without forcing a reallocation. More... | |
void | clear () |
Removes all the elements from the vector and releases the memory used by the vector. More... | |
const_iterator | constBegin () const |
Returns a const STL-style iterator pointing to the first item in the vector. More... | |
const T * | constData () const |
Returns a const pointer to the data stored in the vector. More... | |
const_iterator | constEnd () const |
Returns a const STL-style iterator pointing to the imaginary item after the last item in the vector. More... | |
bool | contains (const T &t) const |
Returns true if the vector contains an occurrence of value; otherwise returns false. More... | |
int | count (const T &t) const |
Returns the number of occurrences of value in the vector. More... | |
int | count () const |
Same as size(). More... | |
T * | data () |
Returns a pointer to the data stored in the vector. More... | |
const T * | data () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | detach () |
bool | empty () const |
This function is provided for STL compatibility. More... | |
iterator | end () |
Returns an STL-style iterator pointing to the imaginary item after the last item in the vector. More... | |
const_iterator | end () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
bool | endsWith (const T &t) const |
Returns true if this vector is not empty and its last item is equal to value; otherwise returns false. More... | |
iterator | erase (iterator begin, iterator end) |
Removes all the items from begin up to (but not including) end. More... | |
iterator | erase (iterator pos) |
Removes the item pointed to by the iterator pos from the vector, and returns an iterator to the next item in the vector (which may be end()). More... | |
QVector< T > & | fill (const T &t, int size=-1) |
Assigns value to all items in the vector. More... | |
T & | first () |
Returns a reference to the first item in the vector. More... | |
const T & | first () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
T & | front () |
This function is provided for STL compatibility. More... | |
const_reference | front () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
int | indexOf (const T &t, int from=0) const |
Returns the index position of the first occurrence of value in the vector, searching forward from index position from. More... | |
void | insert (int i, const T &t) |
Inserts value at index position i in the vector. More... | |
void | insert (int i, int n, const T &t) |
Inserts count copies of value at index position i in the vector. More... | |
iterator | insert (iterator before, int n, const T &x) |
Inserts count copies of value in front of the item pointed to by the iterator before. More... | |
iterator | insert (iterator before, const T &x) |
Inserts value in front of the item pointed to by the iterator before. More... | |
bool | isDetached () const |
bool | isEmpty () const |
Returns true if the vector has size 0; otherwise returns false. More... | |
bool | isSharedWith (const QVector< T > &other) const |
T & | last () |
Returns a reference to the last item in the vector. More... | |
const T & | last () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
int | lastIndexOf (const T &t, int from=-1) const |
Returns the index position of the last occurrence of the value value in the vector, searching backward from index position from. More... | |
QVector< T > | mid (int pos, int length=-1) const |
Returns a vector whose elements are copied from this vector, starting at position pos. More... | |
bool | operator!= (const QVector< T > &v) const |
Returns true if other is not equal to this vector; otherwise returns false. More... | |
QVector< T > | operator+ (const QVector< T > &l) const |
Returns a vector that contains all the items in this vector followed by all the items in the other vector. More... | |
QVector< T > & | operator+= (const QVector< T > &l) |
Appends the items of the other vector to this vector and returns a reference to this vector. More... | |
QVector< T > & | operator+= (const T &t) |
Appends value to the vector. More... | |
QVector< T > & | operator<< (const QVector< T > &l) |
Appends other to the vector and returns a reference to the vector. More... | |
QVector< T > & | operator<< (const T &t) |
Appends value to the vector and returns a reference to this vector. More... | |
QVector< T > & | operator= (const QVector< T > &v) |
Assigns other to this vector and returns a reference to this vector. More... | |
bool | operator== (const QVector< T > &v) const |
Returns true if other is equal to this vector; otherwise returns false. More... | |
T & | operator[] (int i) |
Returns the item at index position i as a modifiable reference. More... | |
const T & | operator[] (int i) const |
Same as at(i). More... | |
void | pop_back () |
This function is provided for STL compatibility. More... | |
void | pop_front () |
This function is provided for STL compatibility. More... | |
void | prepend (const T &t) |
Inserts value at the beginning of the vector. More... | |
void | push_back (const T &t) |
This function is provided for STL compatibility. More... | |
void | push_front (const T &t) |
This function is provided for STL compatibility. More... | |
QVector () | |
Constructs an empty vector. More... | |
QVector (int size) | |
Constructs a vector with an initial size of size elements. More... | |
QVector (int size, const T &t) | |
Constructs a vector with an initial size of size elements. More... | |
QVector (const QVector< T > &v) | |
Constructs a copy of other. More... | |
void | remove (int i) |
Removes the element at index position i. More... | |
void | remove (int i, int n) |
Removes count elements from the middle of the vector, starting at index position i. More... | |
void | replace (int i, const T &t) |
Replaces the item at index position i with value. More... | |
void | reserve (int size) |
Attempts to allocate memory for at least size elements. More... | |
void | resize (int size) |
Sets the size of the vector to size. More... | |
void | setSharable (bool sharable) |
int | size () const |
Returns the number of items in the vector. More... | |
void | squeeze () |
Releases any memory not required to store the items. More... | |
bool | startsWith (const T &t) const |
Returns true if this vector is not empty and its first item is equal to value; otherwise returns false. More... | |
void | swap (QVector< T > &other) |
Swaps vector other with this vector. More... | |
QList< T > | toList () const |
Returns a QList object with the data contained in this QVector. More... | |
std::vector< T > | toStdVector () const |
Returns a std::vector object with the data contained in this QVector. More... | |
T | value (int i) const |
Returns the value at index position i in the vector. More... | |
T | value (int i, const T &defaultValue) const |
If the index i is out of bounds, the function returns defaultValue. More... | |
~QVector () | |
Destroys the vector. More... | |
Static Public Functions | |
static QVector< T > | fromList (const QList< T > &list) |
Returns a QVector object with the data contained in list. More... | |
static QVector< T > | fromStdVector (const std::vector< T > &vector) |
Returns a QVector object with the data contained in vector. More... | |
Private Types | |
typedef QVectorTypedData< T > | Data |
Private Functions | |
int | alignOfTypedData () const |
void | detach_helper () |
void | free (Data *d) |
QVectorData * | malloc (int alloc) |
void | realloc (int size, int alloc) |
int | sizeOfTypedData () |
Properties | |
union { | |
QVectorData * d | |
Data * p | |
}; | |
Friends | |
class | QRegion |
Related Functions | |
(Note that these are not member functions.) | |
QDataStream & | operator<< (QDataStream &out, const QVector< T > &vector) |
Writes the vector vector to stream out. More... | |
QDataStream & | operator>> (QDataStream &in, QVector< T > &vector) |
Reads a vector from stream in into vector. More... | |
The QVector class is a template class that provides a dynamic array.
QVector<T> is one of Qt's generic container classes. It stores its items in adjacent memory locations and provides fast index-based access.
QList<T>, QLinkedList<T>, and QVarLengthArray<T> provide similar functionality. Here's an overview:
Here's an example of a QVector that stores integers and a QVector that stores QString values:
QVector stores a vector (or array) of items. Typically, vectors are created with an initial size. For example, the following code constructs a QVector with 200 elements:
The elements are automatically initialized with a default-constructed value. If you want to initialize the vector with a different value, pass that value as the second argument to the constructor:
You can also call fill() at any time to fill the vector with a value.
QVector uses 0-based indexes, just like C++ arrays. To access the item at a particular index position, you can use operator[](). On non-const vectors, operator[]() returns a reference to the item that can be used on the left side of an assignment:
For read-only access, an alternative syntax is to use at():
at() can be faster than operator[](), because it never causes a deep copy to occur.
Another way to access the data stored in a QVector is to call data(). The function returns a pointer to the first item in the vector. You can use the pointer to directly access and modify the elements stored in the vector. The pointer is also useful if you need to pass a QVector to a function that accepts a plain C++ array.
If you want to find all occurrences of a particular value in a vector, use indexOf() or lastIndexOf(). The former searches forward starting from a given index position, the latter searches backward. Both return the index of the matching item if they found one; otherwise, they return -1. For example:
If you simply want to check whether a vector contains a particular value, use contains(). If you want to find out how many times a particular value occurs in the vector, use count().
QVector provides these basic functions to add, move, and remove items: insert(), replace(), remove(), prepend(), append(). With the exception of append() and replace(), these functions can be slow (linear time) for large vectors, because they require moving many items in the vector by one position in memory. If you want a container class that provides fast insertion/removal in the middle, use QList or QLinkedList instead.
Unlike plain C++ arrays, QVectors can be resized at any time by calling resize(). If the new size is larger than the old size, QVector might need to reallocate the whole vector. QVector tries to reduce the number of reallocations by preallocating up to twice as much memory as the actual data needs.
If you know in advance approximately how many items the QVector will contain, you can call reserve(), asking QVector to preallocate a certain amount of memory. You can also call capacity() to find out how much memory QVector actually allocated.
Note that using non-const operators and functions can cause QVector to do a deep copy of the data. This is due to implicit sharing.
QVector's value type must be an assignable data type. This covers most data types that are commonly used, but the compiler won't let you, for example, store a QWidget as a value; instead, store a QWidget *. A few functions have additional requirements; for example, indexOf() and lastIndexOf() expect the value type to support operator==()
. These requirements are documented on a per-function basis.
Like the other container classes, QVector provides Java-style iterators (QVectorIterator and QMutableVectorIterator) and STL-style iterators (QVector::const_iterator and QVector::iterator). In practice, these are rarely used, because you can use indexes into the QVector.
In addition to QVector, Qt also provides QVarLengthArray, a very low-level class with little functionality that is optimized for speed.
QVector does not support inserting, prepending, appending or replacing with references to its own values. Doing so will cause your application to abort with an error message.
Definition at line 64 of file qdatastream.h.
QVector< T >::const_iterator |
The QVector::const_iterator typedef provides an STL-style const iterator for QVector and QStack.
QVector provides both STL-style iterators and Java-style iterators. The STL-style const iterator is simply a typedef for "const T *" (pointer to const T).
QVector< T >::const_pointer |
QVector< T >::const_reference |
QVector< T >::ConstIterator |
Qt-style synonym for QVector::const_iterator.
|
private |
QVector< T >::difference_type |
The QVector::iterator typedef provides an STL-style non-const iterator for QVector and QStack.
QVector provides both STL-style iterators and Java-style iterators. The STL-style non-const iterator is simply a typedef for "T *" (pointer to T).
Qt-style synonym for QVector::iterator.
QVector< T >::value_type |
Constructs an empty vector.
Definition at line 120 of file qvector.h.
Referenced by QVector< QPoint >::QVector().
Constructs a vector with an initial size of size elements.
The elements are initialized with a default-constructed value.
Definition at line 411 of file qvector.h.
Constructs a copy of other.
This operation takes constant time, because QVector is implicitly shared. This makes returning a QVector from a function very fast. If a shared instance is modified, it will be copied (copy-on-write), and that takes linear time.
Definition at line 123 of file qvector.h.
|
inlineprivate |
void QVector< T >::append | ( | const T & | value | ) |
Inserts value at the end of the vector.
Example:
This is the same as calling resize(size() + 1) and assigning value to the new last element in the vector.
This operation is relatively fast, because QVector typically allocates more memory than necessary, so it can grow without reallocating the entire vector each time.
Definition at line 573 of file qvector.h.
Referenced by QFileSystemModelPrivate::_q_fileSystemChanged(), QSortFilterProxyModelPrivate::_q_sourceDataChanged(), QDeclarativeFastProperties::add(), QFontDatabasePrivate::addAppFont(), QPdfEnginePrivate::addBrushPattern(), QPdfEnginePrivate::addConstantAlphaObject(), QWidgetBackingStore::addDirtyWidget(), QPatternist::XsdStateMachine< XsdSchemaToken::NodeName >::addEpsilonTransition(), QIconModeViewBase::addLeaf(), QWindowsFileSystemWatcherEngine::addPaths(), ShaderEffect::addRenderTarget(), QScript::QObjectConnectionManager::addSignalHandler(), QSvgText::addText(), QBezier::addToPolygon(), QPatternist::XsdStateMachine< XsdSchemaToken::NodeName >::addTransition(), QRawFont::advancesForGlyphIndexes(), QRegExpEngine::anchorAlternation(), QDeclarativePropertyCache::append(), QWidgetBackingStore::appendDirtyOnScreenWidget(), QTextDocumentPrivate::appendUndoItem(), QDeclarativeBindingCompilerPrivate::buildSignalTable(), QTreeViewPrivate::calcLogicalIndices(), QScript::callQtMethod(), QPdfBaseEnginePrivate::closePrintDevice(), QTableModel::columnItems(), QAbstractItemModelPrivate::columnsAboutToBeInserted(), QAbstractItemModelPrivate::columnsAboutToBeRemoved(), QPatternist::IteratorVector::copy(), QSortFilterProxyModelPrivate::create_mapping(), QGraphicsAnchorLayoutPrivate::createItemEdges(), QPatternist::createReturnOrderBy(), createSequence(), QAbstractItemModel::decodeData(), dither_to_Mono(), QLineControl::draw(), QAlphaPaintEngine::drawPolygon(), QPdfEnginePrivate::drawTextItem(), QPdfBaseEnginePrivate::drawTextItem(), QTreeView::drawTree(), QAbstractTableModel::dropMimeData(), QAbstractListModel::dropMimeData(), QStandardItemModel::dropMimeData(), QPatternist::XsdSchemaDebugger::dumpWildcard(), QTableModel::ensureSorted(), QOleDataObject::EnumFormatEtc(), QPatternist::TargetNode::fieldItems(), findRealWindow(), QAlphaPaintEngine::flushAndInit(), QFontEngineMacMulti::fontIndexForFontID(), QXcbWindow::glContext(), QXlibWindow::glContext(), QRawFont::glyphIndexesForString(), QTextLine::glyphs(), QSortFilterProxyModelPrivate::handle_filter_changed(), QXmlStreamAttributes::hasAttribute(), QPatternist::OptimizationPasses::Coordinator::init(), QBspTree::insert(), QTreeModel::insertColumns(), QAbstractItemModelPrivate::itemsAboutToBeMoved(), QAbstractXmlNodeModel::iterate(), QTextDocumentLayoutPrivate::layoutFlow(), QTextDocumentLayoutPrivate::layoutTable(), QTextFormat::lengthVectorProperty(), Document::load(), QPatternist::loadPattern(), mergeIterators(), QPatternist::AccelTreeBuilder< true >::namespaceBinding(), QPatternist::AccelTree::namespaceBindings(), QPdfEnginePrivate::newPage(), QDesktopWidgetImplementation::onResize(), operator>>(), QPlainTextEdit::paintEvent(), QRegExpEngine::parse(), parseAnimateTransformNode(), parseBrushValue(), QSvgHandler::parseCSStoXMLAttrs(), QCss::Parser::parseExpr(), parseNumbersList(), parseNumberTriplet(), parsePercentageList(), QPdf::patternForBrush(), QListModeViewBase::perItemScrollingPageSteps(), QListModeViewBase::perItemScrollToValue(), QPainterReplayer::process(), QSortFilterProxyModelPrivate::proxy_intervals_for_source_items(), QSortFilterProxyModelPrivate::proxy_intervals_for_source_items_to_add(), QStack< State >::push(), q_configFromQPlatformWindowFormat(), q_createConfigAttributesFromFormat(), QDeclarativeGlobalScriptClass::QDeclarativeGlobalScriptClass(), QDirIteratorPrivate::QDirIteratorPrivate(), QTest::qExec(), QFontEngineMacMulti::QFontEngineMacMulti(), QOleEnumFmtEtc::QOleEnumFmtEtc(), QOpenKODEWindow::QOpenKODEWindow(), qt_watch_adopted_thread(), QThreadStorageData::QThreadStorageData(), QWaylandGLContext::QWaylandGLContext(), QWaylandReadbackEglContext::QWaylandReadbackEglContext(), QWaylandXCompositeEGLContext::QWaylandXCompositeEGLContext(), QWindowsFileSystemWatcherEngineThread::QWindowsFileSystemWatcherEngineThread(), QWinSettingsPrivate::QWinSettingsPrivate(), QXmlStreamAttributes::QXmlStreamAttributes(), QInternal::registerCallback(), QSettings::registerFormat(), QMetaType::registerType(), QMetaType::registerTypedef(), QSortFilterProxyModel::removeColumns(), QSortFilterProxyModel::removeRows(), QTextHtmlParser::resolveParent(), QAbstractItemModelPrivate::rowsAboutToBeInserted(), QAbstractItemModelPrivate::rowsAboutToBeRemoved(), QSvgPaintEngine::saveGradientStops(), QCss::Scanner::scan(), QTextHtmlImporter::scanTable(), QPatternist::XsdValidatingInstanceReader::selectNodeSets(), send_targets_selection(), QXlibClipboard::sendTargetsSelection(), QTreeModel::setColumnCount(), QListWidgetItem::setData(), QTableWidgetItem::setData(), QTreeWidgetItem::setData(), QStandardItemPrivate::setItemData(), QXcbWindow::setNetWmWindowTypes(), QWidgetPrivate::setNetWmWindowTypes(), QCoreGraphicsPaintEnginePrivate::setStrokePen(), QXlibWindow::setWindowFlags(), QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(), QTableModel::sort(), QStandardItemPrivate::sortChildren(), QSortFilterProxyModelPrivate::source_items_about_to_be_removed(), QSortFilterProxyModelPrivate::source_items_inserted(), splitPolygon(), QPdfPage::streamImage(), QStyleSheetStyle::styleRules(), QBezier::toPolygon(), QPolygonF::toPolygon(), QImage::transformed(), QPatternist::NamePool::unlockedAllocateLocalName(), QPatternist::NamePool::unlockedAllocateNamespace(), QPatternist::NamePool::unlockedAllocatePrefix(), QGraphicsItem::update(), QSortFilterProxyModelPrivate::updateChildrenMapping(), QDockAreaLayoutInfo::updateSeparatorWidgets(), QDockAreaLayout::updateSeparatorWidgets(), QMYSQLResult::virtual_hook(), QConfFileSettingsPrivate::writeIniFile(), QPatternist::yyparse(), and QPdfEnginePrivate::~QPdfEnginePrivate().
|
inline |
Returns the item at index position i in the vector.
i must be a valid index position in the vector (i.e., 0 <= i < size()).
Definition at line 350 of file qvector.h.
Referenced by QFileSystemModelPrivate::_q_fileSystemChanged(), QGraphicsScenePrivate::_q_polishItems(), QSortFilterProxyModelPrivate::_q_sourceDataChanged(), QSortFilterProxyModelPrivate::_q_sourceHeaderDataChanged(), QDeclarativeFastProperties::accessor(), QMenuPrivate::actionAt(), QMenuPrivate::actionRect(), QMetaObject::activate(), QRegExpEngine::Box::addAnchorsToEngine(), QFontDatabasePrivate::addAppFont(), QRegExpEngine::addCatTransitions(), QXmlStreamReader::addExtraNamespaceDeclarations(), QPixmapIconEngine::addFile(), QGridLayoutPrivate::addHfwData(), QPdfEnginePrivate::addImage(), QIconModeViewBase::addLeaf(), QRegExpEngine::addPlusTransitions(), QPainterPath::addPolygon(), QPainterPath::addRegion(), QMenuPrivate::adjustMenuSizeForScreen(), QTreeViewPrivate::adjustViewOptionsForIndex(), QImage::allGray(), QRegExpEngine::anchorAlternation(), QRegExpEngine::anchorConcatenation(), QTextHtmlParserNode::applyCssDeclarations(), QSyntaxHighlighterPrivate::applyFormatChanges(), QFormLayoutPrivate::arrangeWidgets(), QOCIResultPrivate::bindValues(), QAhiScreen::blit(), QTransformedScreen::blit(), blit_template(), QSortFilterProxyModelPrivate::build_source_to_proxy_mapping(), QPatternist::CachingIterator::CachingIterator(), QBoxLayoutPrivate::calcHfw(), QTreeViewPrivate::calcLogicalIndices(), QTextTableData::calcRowPosition(), QFormLayoutPrivate::calcSizeHints(), QScript::callQtMethod(), QSortFilterProxyModelPrivate::can_create_mapping(), QRegionPrivate::canPrepend(), QRegExpEngine::Box::cat(), QRegExpEngine::Box::catAnchor(), QTextTableData::cellPosition(), QGridLayoutPrivate::cellRect(), QTextTableData::cellWidth(), checkGrayscale(), QWinSettingsPrivate::children(), QDesktopWidgetPrivate::cleanup(), QWizardPage::cleanupPage(), QDeclarativePropertyCache::clear(), QTableModel::clear(), QTableModel::clearContents(), closestMatch(), QImage::color(), QTextTableCell::column(), QStandardItemModelPrivate::columnsRemoved(), QPaintBuffer::commandDescription(), QScreen::compose(), QMetaType::construct(), convert_indexed8_to_ARGB_PM_inplace(), convert_indexed8_to_RGB16_inplace(), convert_indexed8_to_RGB_inplace(), convert_Indexed8_to_X32(), convert_Mono_to_X32(), convert_RGB_to_Indexed8(), QPatternist::XsdTypeChecker::convertToQName(), QPatternist::CachingIterator::copy(), QDeclarativePropertyCache::copy(), QDockWidgetLayout::count(), QSqlRecordPrivate::createField(), createPolygonNode(), createPolylineNode(), createSequence(), QFontSubset::createToUnicodeMap(), cubicTo_clipped(), QSqlCachedResult::data(), QODBCResult::data(), QListWidgetItem::data(), QTableWidgetItem::data(), QTreeWidgetItem::data(), declarations(), QCss::StyleSelector::declarationsForNode(), QAbstractItemModel::decodeData(), QPatternist::AccelTree::depth(), QMetaType::destroy(), QWidgetBackingStore::dirtyOnScreenWidgetsRemoveAll(), QWidgetBackingStore::dirtyRegion(), QWidgetBackingStore::dirtyWidgetsRemoveAll(), QPatternist::NamePool::displayName(), QPatternist::NamePool::displayPrefix(), QGridLayoutPrivate::distribute(), distributeMultiBox(), dither_to_Mono(), QTextLayout::draw(), QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QPainter::drawChord(), QTextDocumentLayoutPrivate::drawFrame(), QGraphicsScenePrivate::drawItemHelper(), QBlitterPaintEngine::drawPixmap(), QTreeView::drawRow(), QTextDocumentLayoutPrivate::drawTableCell(), QPainter::drawText(), QTreeView::drawTree(), QAbstractTableModel::dropMimeData(), QAbstractListModel::dropMimeData(), QStandardItemModel::dropMimeData(), AnchorData::dump(), QGridLayoutEngine::dump(), QObject::dumpObjectInfo(), QPatternist::XsdSchemaDebugger::dumpWildcard(), QTextHtmlExporter::emitTable(), QRegion::ensureHandle(), QListModel::ensureSorted(), QTreeModel::ensureSorted(), QTableModel::ensureSorted(), QGLColormap::entryColor(), QGLColormap::entryRgb(), QPatternist::XsdStateMachine< XsdSchemaToken::NodeName >::epsilonClosure(), QPatternist::EvaluationCache< IsForGlobal >::evaluateSequence(), QDB2Result::exec(), QSQLiteResult::exec(), QSymSQLResult::exec(), QODBCResult::exec(), QSqlResult::execBatch(), QScript::QObjectConnectionManager::execute(), QCoreApplication::exit(), QProxyScreen::exposeRegion(), QDirectFBScreen::exposeRegion(), QScreen::exposeRegion(), QWinSettingsPrivate::fileName(), QGL2PaintEngineExPrivate::fill(), QImage::fill(), QVGCompositionHelper::fillBackground(), QX11PaintEnginePrivate::fillPath(), QBlitterPaintEngine::fillRect(), QBlitterPaintEnginePrivate::fillRect(), QVGPaintEngine::fillRegion(), fillRegion(), QGridLayoutEngine::fillRowData(), QGL2PaintEngineExPrivate::fillStencilWithVertexArray(), QSortFilterProxyModelPrivate::filter_changed(), QGLColormap::findNearest(), findRealWindow(), QPatternist::ApplyTemplate::findTemplate(), QRegExpEngine::finishAtom(), fix_color_table(), QDirectFBScreen::flipSurface(), QDirectFbWindowSurface::flush(), QXcbWindowSurface::flush(), QMacWindowSurface::flush(), QWidgetBackingStore::flush(), QGLWindowSurface::flush(), QRasterWindowSurface::flush(), QAlphaPaintEngine::flushAndInit(), QPSPrintEnginePrivate::flushPage(), QTextEngine::format(), QTextEngine::formatIndex(), QPdf::generateDashes(), QWinSettingsPrivate::get(), QVariantAnimationPrivate::getInterpolator(), QFontSubset::getReverseMap(), QGLEngineShaderManager::getUniformLocation(), QSortFilterProxyModelPrivate::handle_filter_changed(), QPathClipper::handleCrossingEdges(), QPatternist::XSLTTokenizer::handleStandardAttributes(), QPatternist::XSLTTokenizer::handleValidationAttributes(), QPatternist::AccelTree::hasChildren(), QPatternist::AccelTree::hasParent(), QPatternist::AccelTree::hasPrefix(), QStyleSheetStyle::hasStyleRule(), QTableModel::headerData(), QHeaderViewPrivate::headerLength(), QHeaderViewPrivate::headerSectionCount(), QRegExpEngine::heuristicallyChooseHeuristic(), QRegExpCharClass::in(), QTableModel::index(), QDesktopWidgetPrivate::init(), QStaticTextPrivate::init(), QConfFileSettingsPrivate::initFormat(), QClipData::initialize(), QTriangulator< T >::initialize(), QSortFilterProxyModelPrivate::insert_source_items(), QSortFilterProxyModel::insertColumns(), QSortFilterProxyModel::insertRows(), QPatternist::XSLTTokenizer::insideSequenceConstructor(), QDirModelPrivate::invalidate(), QFontDatabasePrivate::isApplicationFont(), QXmlSerializer::isBindingInScope(), QWizardPage::isComplete(), QPatternist::AccelTree::isCompressed(), QImage::isGrayscale(), QTreeViewPrivate::isItemHiddenOrDisabled(), QSqlCachedResult::isNull(), QODBCResult::isNull(), QBrush::isOpaque(), QMetaType::isRegistered(), QObjectPrivate::isSender(), QTableModel::item(), QDockWidgetLayout::itemAt(), QListModel::itemData(), QTreeModel::itemData(), QTableModel::itemData(), QDockWidgetLayout::itemForRole(), QPatternist::AccelTree::kind(), QTextDocumentLayoutPrivate::layoutCell(), QTextDocumentLayoutPrivate::layoutTable(), QMetaType::load(), QFontEngineMultiXLFD::loadEngine(), QFontEngineMultiFT::loadEngine(), QFontEngineMultiWin::loadEngine(), QFontEngineMultiQPA::loadEngine(), QFontEngineMultiQWS::loadEngine(), QHeaderViewPrivate::logicalIndex(), ShaderEffectItem::lookThroughShaderCode(), make_widget_eventUPP(), mapProjective(), QRegExpMatchState::matchHere(), QTextFormat::merge(), mergeInto(), QDeclarativePropertyCache::method(), QStandardItemModel::mimeData(), QVNCCursor::move(), QPatternist::XsdStateMachine< XsdSchemaToken::NodeName >::move(), QPatternist::AccelTree::name(), QPatternist::AccelTreeBuilder< true >::namespaceBinding(), QPatternist::AccelTree::namespaceBindings(), QAbstractXmlNodeModel::namespaceForPrefix(), QOleEnumFmtEtc::Next(), qLess< Item::List >::operator()(), operator<<(), operator>>(), QRegExpEngine::Box::orx(), QPatternist::XsdStateMachine< XsdSchemaToken::NodeName >::outputGraph(), QOCIResultPrivate::outValues(), QDeclarativePropertyCache::overrideData(), QDeclarativePaintedItem::paint(), QScreen::paintBackground(), QBlittablePixmapData::paintEngine(), QTableView::paintEvent(), QMdiArea::paintEvent(), QDirModel::parent(), QPatternist::AccelTree::parent(), QRegExpEngine::parse(), parseColorValue(), parseCoreNode(), parseCSStoXMLAttrs(), parseShorthandBackgroundProperty(), parseShorthandFontProperty(), parseStopNode(), QPdf::patternForBrush(), QListModeViewBase::perItemScrollingPageSteps(), QListModeViewBase::perItemScrollToValue(), QImage::pixel(), QStyleSheetStyle::polish(), populate_database(), QPatternist::AccelTree::postNumber(), QPaintBuffer::processCommands(), QDashStroker::processCurrentSubpath(), QDeclarativePropertyCache::property(), QSortFilterProxyModelPrivate::proxy_intervals_for_source_items(), QSortFilterProxyModelPrivate::proxy_intervals_for_source_items_to_add(), QSortFilterProxyModelPrivate::proxy_item_range(), QSortFilterProxyModelPrivate::proxy_to_source(), q_configFromQPlatformWindowFormat(), q_reduceConfigAttributes(), qBinarySearch(), qCreateParamString(), qDrawPlainRect(), QFontEngineMultiFT::QFontEngineMultiFT(), qGeomCalc(), qMetaTypeCustomType_unlocked(), QOleEnumFmtEtc::QOleEnumFmtEtc(), QPolygonF::QPolygonF(), QRenderRule::QRenderRule(), QSvgAttributes::QSvgAttributes(), qt_adopted_thread_watcher_function(), qt_fetchPixel< QImage::Format_Indexed8 >(), qt_fetchPixel< QImage::Format_Mono >(), qt_fetchPixel< QImage::Format_MonoLSB >(), qt_mac_desktopSize(), qt_mac_fill_background(), qt_mac_post_retranslateAppMenu(), qt_region_strictContains(), QThreadStorageData::QThreadStorageData(), query_colormap(), QPatternist::XSLTTokenizer::queueNamespaceDeclarations(), QVectorPathConverter::QVectorPathData::QVectorPathData(), qVectorToSet(), QRasterPaintEnginePrivate::rasterizeLine_dashed(), QOCICols::readPiecewise(), QGridLayoutPrivate::recalcHFW(), QFormLayoutPrivate::recalcHFW(), QObjectPrivate::receiverList(), QObject::receivers(), QSqlTableModelPrivate::record(), QStateMachinePrivate::registerSignalTransition(), QSortFilterProxyModelPrivate::remove_source_items(), QTableModel::removeColumns(), QSortFilterProxyModel::removeColumns(), QTableModel::removeRows(), QSortFilterProxyModel::removeRows(), QScript::QObjectConnectionManager::removeSignalHandler(), QHeaderViewPrivate::removeSpans(), QStyleSheetStyle::renderRule(), QDesktopWidget::resizeEvent(), QTextEngine::resolveAdditionalFormats(), QGraphicsAnchorLayoutPrivate::restoreSimplifiedAnchor(), QImage::rgbSwapped(), QTextTableCell::row(), QStandardItemModelPrivate::rowsRemoved(), QWindowsFileSystemWatcherEngineThread::run(), QMetaType::save(), QSvgPaintEngine::saveGradientStops(), QTextHtmlImporter::scanTable(), QDirectFbWindowSurface::scroll(), QXcbWindowSurface::scroll(), QXlibWindowSurface::scroll(), QRasterWindowSurface::scroll(), QWSMemorySurface::scroll(), QGraphicsItem::scroll(), QMenuPrivate::scrollMenu(), QWidgetPrivate::scrollRect(), QHeaderViewPrivate::sectionSpanIndex(), QTreeViewPrivate::select(), QPatternist::AccelTree::sendNamespaces(), QAbstractXmlNodeModel::sendNamespaces(), separatorMoveHelper(), QVNCCursor::set(), QClipData::setClipRegion(), QGradient::setColorAt(), QImage::setColorTable(), QPainterPathStroker::setDashPattern(), QListWidgetItem::setData(), QTableWidgetItem::setData(), QTreeWidgetItem::setData(), QMenuPrivate::setFirstActionActive(), setFontFamilyFromValues(), QBoxLayout::setGeometry(), QDockAreaLayout::setGrid(), QTableModel::setHeaderData(), QTableModel::setHorizontalHeaderItem(), QTableModel::setItem(), QTextHtmlParserNode::setListStyle(), QStandardItemPrivate::setModel(), QWizard::setPage(), QPatternist::NamespaceSupport::setPrefixes(), QStyleSheetStyle::setProperties(), QTextFormat::setProperty(), QGradient::setStops(), QCoreGraphicsPaintEnginePrivate::setStrokePen(), setTextDecorationFromValues(), QCosmeticStroker::setup(), QRegExpEngine::Box::setupHeuristics(), QGridLayoutPrivate::setupHfwLayoutData(), QFormLayoutPrivate::setupHfwLayoutData(), QGridLayoutPrivate::setupSpacings(), QTableModel::setVerticalHeaderItem(), QPainter::setViewTransformEnabled(), QPatternist::AccelTree::size(), QTreeView::sizeHintForColumn(), QAhiScreen::solidFill(), QDirectFBScreen::solidFill(), solidFill_template(), QTableModel::sort(), QStandardItemPrivate::sortChildren(), QSortFilterProxyModelPrivate::source_to_proxy(), splitPolygon(), QPatternist::DocumentProjector::startElement(), QWindowsFileSystemWatcherEngineThread::stop(), QPatternist::AccelTreeResourceLoader::streamToReceiver(), QPatternist::NamePool::stringForLocalName(), QPatternist::NamePool::stringForNamespace(), QPatternist::NamePool::stringForPrefix(), QRasterPaintEngine::stroke(), QWidgetBackingStore::sync(), QDockWidgetLayout::takeAt(), QTableModel::takeHorizontalHeaderItem(), QTableModel::takeVerticalHeaderItem(), QPainterPath::toFillPolygons(), QX11PixmapData::toImage(), QPatternist::NamePool::toLexical(), QApplicationPrivate::translateTouchEvent(), QPixmapIconEngine::tryMatch(), QMetaType::typeName(), QStateMachinePrivate::unregisterSignalTransition(), QMetaType::unregisterType(), QOpenGLPaintEngine::updateClipRegion(), QOpenGLPaintEnginePrivate::updateDepthClip(), updateRedirectedToGraphicsProxyWidget(), QGraphicsViewPrivate::updateRegion(), QGraphicsView::updateScene(), QDockAreaLayoutInfo::updateSeparatorWidgets(), QDockAreaLayout::updateSeparatorWidgets(), ShaderEffectItem::updateShaderProgram(), QPdfBaseEngine::updateState(), QDockAreaLayoutInfo::usedSeparatorWidgets(), QDockAreaLayout::usedSeparatorWidgets(), QObject::userData(), QPatternist::XsdValidatingInstanceReader::validateKeyIdentityConstraint(), QMYSQLResult::virtual_hook(), QHeaderViewPrivate::visualIndex(), QWindowsFileSystemWatcherEngineThread::wakeup(), QDockWidgetLayout::widgetForRole(), QTiffHandler::write(), QPixmapIconEngine::write(), QXmlStreamWriter::writeAttributes(), QXmlStreamWriter::writeCurrentToken(), QTextOdfWriter::writeFormats(), QWinSettingsPrivate::writeHandle(), QConfFileSettingsPrivate::writeIniFile(), QPdfEnginePrivate::writePage(), QPatternist::yyparse(), QFontEngineMacMulti::~QFontEngineMacMulti(), QOleEnumFmtEtc::~QOleEnumFmtEtc(), QPaintBufferPrivate::~QPaintBufferPrivate(), QPainterPrivate::~QPainterPrivate(), QPdfEnginePrivate::~QPdfEnginePrivate(), QWidgetBackingStore::~QWidgetBackingStore(), QWindowsFileSystemWatcherEngineThread::~QWindowsFileSystemWatcherEngineThread(), and QWinSettingsPrivate::~QWinSettingsPrivate().
|
inline |
This function is provided for STL compatibility.
It is equivalent to last().
Definition at line 289 of file qvector.h.
Referenced by QSvgText::addText(), QSvgText::draw(), QRBTree< int >::order(), parseStopNode(), and QSvgPaintEngine::saveGradientStops().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 290 of file qvector.h.
|
inline |
Returns an STL-style iterator pointing to the first item in the vector.
Definition at line 247 of file qvector.h.
Referenced by QFileSystemModelPrivate::_q_fileSystemChanged(), QSortFilterProxyModelPrivate::_q_sourceDataChanged(), QDBusAdaptorConnector::addAdaptor(), QXcbWindowSurface::beginPaint(), QXlibWindowSurface::beginPaint(), QX11WindowSurface::beginPaint(), QRasterWindowSurface::beginPaint(), QWSMemorySurface::beginPaint(), QListViewPrivate::closestIndex(), QPathClipper::doClip(), QTextDocumentLayoutPrivate::drawFlow(), QListModel::ensureSorted(), QTreeModel::ensureSorted(), QTableModel::ensureSorted(), QPatternist::TemplateMode::finalize(), QTextDocumentLayoutPrivate::frameIteratorForYPosition(), QPathClipper::handleCrossingEdges(), huntAndDestroy(), QIconModeViewBase::itemsRect(), QTextDocumentLayoutPrivate::layoutFlow(), QSortFilterProxyModelPrivate::proxy_intervals_for_source_items(), qtKey2CocoaKey(), QDBusConnection::registerObject(), QListViewPrivate::removeCurrentAndDisabled(), QSortFilterProxyModel::removeRows(), QListViewPrivate::selection(), QTableModel::setItem(), QVariantAnimationPrivate::setValueAt(), QTableModel::sort(), QSortFilterProxyModelPrivate::sort_source_rows(), QStandardItemPrivate::sortChildren(), splitPolygon(), QDBusConnection::unregisterObject(), QSortFilterProxyModelPrivate::updateChildrenMapping(), and QVariantAnimationPrivate::valueAt().
|
inline |
|
inline |
Returns the maximum number of items that can be stored in the vector without forcing a reallocation.
The sole purpose of this function is to provide a means of fine tuning QVector's memory usage. In general, you will rarely ever need to call this function. If you want to know how many items are in the vector, call size().
Definition at line 143 of file qvector.h.
Referenced by QGraphicsViewPrivate::allocStyleOptionsArray().
|
inline |
Removes all the elements from the vector and releases the memory used by the vector.
Definition at line 347 of file qvector.h.
Referenced by QGraphicsScenePrivate::_q_polishItems(), QDeclarativeTextLayout::beginLayout(), QSqlCachedResult::cacheNext(), QSqlCachedResultPrivate::cleanup(), QGraphicsSceneBspTree::clear(), QDeclarativePropertyCache::clear(), QDeclarativeTextLayout::clearLayout(), QTextEngine::clearLineData(), QShortcutMap::clearSequence(), QPatternist::ReturnOrderBy::compress(), QBspTree::destroy(), dither_to_Mono(), QGraphicsScenePrivate::drawItemHelper(), QODBCResult::exec(), QPicture::exec(), QSQLite2ResultPrivate::fetchNext(), QSQLiteResultPrivate::fetchNext(), QShortcutMap::find(), QWidgetBackingStore::flush(), QAlphaPaintEngine::flushAndInit(), QXlibWindow::getNetWmState(), getNetWmState(), QXmlSimpleReaderPrivate::init(), QXmlStreamReaderPrivate::init(), QXmlSimpleReaderPrivate::initData(), QXmlSimpleReaderPrivate::initIncrementalParsing(), QTextEngine::invalidate(), QTextDocumentLayoutPrivate::layoutFlow(), QTextDocumentLayoutPrivate::layoutTable(), QODBCResult::nextResult(), QDesktopWidgetImplementation::onResize(), operator>>(), QXmlStreamReaderPrivate::parse(), QRegExpEngine::parse(), QXmlSimpleReaderPrivate::parseBeginOrContinue(), QSortFilterProxyModelPrivate::proxy_intervals_for_source_items_to_add(), qDrawShadePanel(), qt_cleanup_painter_state(), QPixmapIconEngine::read(), QSyntaxHighlighterPrivate::reformatBlocks(), QODBCResult::reset(), ShaderEffectItem::reset(), QTextEngine::resolveAdditionalFormats(), QWizard::setPage(), QGlyphRun::setRawData(), QGradient::setStops(), QPen::setStyle(), QFormLayoutPrivate::setupHfwLayoutData(), QFormLayoutPrivate::setupVerticalLayoutData(), QComboBox::showPopup(), QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(), QWidgetBackingStore::sync(), QPainterPath::toFillPolygons(), QPainterPath::toSubpathPolygons(), QDBusConnection::unregisterObject(), QGraphicsItem::update(), QDockAreaLayoutInfo::updateSeparatorWidgets(), QDBusConnectionPrivate::~QDBusConnectionPrivate(), QFontEngineMacMulti::~QFontEngineMacMulti(), and QOleEnumFmtEtc::~QOleEnumFmtEtc().
|
inline |
Returns a const STL-style iterator pointing to the first item in the vector.
Definition at line 249 of file qvector.h.
Referenced by QDBusConnectionPrivate::activateObject(), QRegExpEngine::addPlusTransitions(), QAbstractItemModel::changePersistentIndexList(), QPaintEngineEx::clip(), QAbstractItemModelPrivate::columnsInserted(), QAbstractItemModelPrivate::columnsRemoved(), QTextDocumentLayoutPrivate::drawFrame(), QSortFilterProxyModelPrivate::filter_changed(), findObject(), QTextDocumentLayoutPrivate::hitTest(), huntAndEmit(), QRegion::intersects(), QDirIteratorPrivate::matchesFilters(), QAbstractItemModelPrivate::movePersistentIndexes(), QDBusConnection::objectRegisteredAt(), QListView::paintEvent(), qDBusIntrospectObject(), qDBusPropertyGet(), qDBusPropertyGetAll(), qDBusPropertySet(), QScript::QScriptMetaMethod::QScriptMetaMethod(), QVariantAnimationPrivate::recalculateCurrentInterval(), QAbstractItemModelPrivate::rowsInserted(), QAbstractItemModelPrivate::rowsRemoved(), QTextEngine::setBoundary(), QPatternist::variableByName(), and QStandardItemPrivate::~QStandardItemPrivate().
|
inline |
Returns a const pointer to the data stored in the vector.
The pointer can be used to access the items in the vector. The pointer remains valid as long as the vector isn't reallocated.
This function is mostly useful to pass a vector to a function that accepts a plain C++ array.
Definition at line 154 of file qvector.h.
Referenced by QRegionPrivate::append(), ShaderEffectItem::bindGeometry(), QTextEngine::boundingBox(), QDeclarativeBindingCompilerPrivate::buildSignalTable(), QRegionPrivate::canAppend(), QRegionPrivate::canPrepend(), QPaintBuffer::commandDescription(), QPainter::drawConvexPolygon(), QPainter::drawLines(), QPainter::drawPoints(), QPainter::drawPolygon(), QPainter::drawPolyline(), QPainter::drawRects(), EqualRegion(), QRasterPaintEngine::fillPolygon(), QGlyphRun::glyphIndexes(), QStaticTextPrivate::init(), isEmptyHelper(), QMatrix::map(), QTransform::map(), mergeInto(), miRegionOp(), miSetExtents(), parseShorthandBackgroundProperty(), QGlyphRun::positions(), QRegionPrivate::prepend(), QDeclarativeBindingCompiler::program(), q_configFromQPlatformWindowFormat(), QDeclarativeGlobalScriptClass::QDeclarativeGlobalScriptClass(), qglx_findConfig(), QOpenKODEWindow::QOpenKODEWindow(), QRegion::QRegion(), qt_adopted_thread_watcher_function(), qt_bitmapToRegion(), qt_regionToPath(), QWaylandGLContext::QWaylandGLContext(), QWaylandReadbackEglContext::QWaylandReadbackEglContext(), QWaylandXCompositeEGLContext::QWaylandXCompositeEGLContext(), RectInRegion(), QWSDisplay::repaintRegion(), QWizardField::resolve(), QWindowsFileSystemWatcherEngineThread::run(), QWSRegionEvent::setData(), QWSRegionCommand::setData(), QWSEmbedCommand::setData(), QOpenKODEWindow::setGeometry(), QGlyphRun::setGlyphIndexes(), QXcbWindow::setNetWmWindowTypes(), QWidgetPrivate::setNetWmWindowTypes(), QGlyphRun::setPositions(), QDBusPendingCallPrivate::setReplyCallback(), QPainter::testRenderHint(), QTextEngine::tightBoundingBox(), and QTextEngine::width().
|
inline |
Returns a const STL-style iterator pointing to the imaginary item after the last item in the vector.
Definition at line 252 of file qvector.h.
Referenced by QDBusConnectionPrivate::activateObject(), QRegExpEngine::addPlusTransitions(), QAbstractItemModel::changePersistentIndexList(), QPaintEngineEx::clip(), QAbstractItemModelPrivate::columnsInserted(), QAbstractItemModelPrivate::columnsRemoved(), QTextDocumentLayoutPrivate::drawFrame(), QSortFilterProxyModelPrivate::filter_changed(), findObject(), QTextDocumentLayoutPrivate::hitTest(), huntAndEmit(), QRegion::intersects(), QDirIteratorPrivate::matchesFilters(), QAbstractItemModelPrivate::movePersistentIndexes(), QDBusConnection::objectRegisteredAt(), QListView::paintEvent(), qDBusIntrospectObject(), qDBusPropertyGet(), qDBusPropertyGetAll(), qDBusPropertySet(), QScript::QScriptMetaMethod::QScriptMetaMethod(), QVariantAnimationPrivate::recalculateCurrentInterval(), QAbstractItemModelPrivate::rowsInserted(), QAbstractItemModelPrivate::rowsRemoved(), QTextEngine::setBoundary(), QVariantAnimationPrivate::valueAt(), QPatternist::variableByName(), and QStandardItemPrivate::~QStandardItemPrivate().
bool QVector< T >::contains | ( | const T & | value | ) | const |
Returns true if the vector contains an occurrence of value; otherwise returns false.
This function requires the value type to have an implementation of operator==()
.
Definition at line 731 of file qvector.h.
Referenced by QGraphicsAnchorLayoutPrivate::addAnchor(), ShaderEffect::addRenderTarget(), QPatternist::XsdStateMachine< XsdSchemaToken::NodeName >::addTransition(), QWidgetBackingStore::appendDirtyOnScreenWidget(), QPdfEnginePrivate::drawTextItem(), QPdfBaseEnginePrivate::drawTextItem(), QTreeView::drawTree(), QRegExpEngine::dump(), findRealWindow(), QPSPrintEnginePrivate::flushPage(), QPatternist::ComparisonIdentifier::matches(), PointInRegion(), QWindowsFileSystemWatcherEngineThread::run(), send_targets_selection(), QXlibClipboard::sendTargetsSelection(), QXlibWindow::setWindowFlags(), QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(), QGraphicsAnchorLayoutPrivate::simplifyVertices(), QPdfPage::streamImage(), ShaderEffectItem::updateProperties(), and ShaderEffectItem::updateShaderProgram().
int QVector< T >::count | ( | const T & | value | ) | const |
Returns the number of occurrences of value in the vector.
This function requires the value type to have an implementation of operator==()
.
Definition at line 742 of file qvector.h.
Referenced by QFileSystemModelPrivate::_q_fileSystemChanged(), QGraphicsScenePrivate::_q_polishItems(), QSortFilterProxyModelPrivate::_q_sourceDataChanged(), QMenuPrivate::actionAt(), QDeclarativeFastProperties::add(), QFontDatabasePrivate::addAppFont(), QObjectPrivate::addConnection(), QPixmapIconEngine::addFile(), QIconModeViewBase::addLeaf(), QWindowsFileSystemWatcherEngine::addPaths(), QDeclarativePropertyCache::append(), QTextHtmlParserNode::applyCssDeclarations(), QSyntaxHighlighterPrivate::applyFormatChanges(), QTreeViewPrivate::below(), QOCIResultPrivate::bindValues(), QDeclarativeBindingCompilerPrivate::buildSignalTable(), QBoxLayoutPrivate::calcHfw(), QTreeViewPrivate::calcLogicalIndices(), QTextEngine::calculateTabWidth(), cgColorForQColor(), QObjectPrivate::cleanConnectionLists(), QWizardPage::cleanupPage(), QDeclarativePropertyCache::clear(), QTableModel::clear(), QTableModel::clearContents(), QTableModel::columnCount(), QMetaObjectPrivate::connect(), QSqlRecordPrivate::contains(), QPatternist::XsdTypeChecker::convertToQName(), QVariantAnimationPrivate::convertValues(), QDeclarativePropertyCache::copy(), QDockWidgetLayout::count(), createPolygonNode(), createPolylineNode(), createSequence(), QPatternist::AccelTreeBuilder< true >::currentDepth(), QListWidgetItem::data(), QTableWidgetItem::data(), QTreeWidgetItem::data(), declarations(), QCss::StyleSelector::declarationsForNode(), QAbstractItemModel::decodeData(), QMetaObjectPrivate::disconnect(), QPatternist::DocumentProjector::DocumentProjector(), QListModeViewBase::dragMoveEvent(), ShaderEffect::draw(), QDeclarativeTextLayout::draw(), QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QTreeView::drawRow(), QTreeView::drawTree(), QStandardItemModel::dropMimeData(), QListModeViewBase::dropOn(), AnchorData::dump(), QGridLayoutEngine::dump(), QObject::dumpObjectInfo(), QTextHtmlExporter::emitTable(), QTableModel::ensureSorted(), QPatternist::XsdStateMachine< XsdSchemaToken::NodeName >::epsilonClosure(), QIBaseResult::exec(), QDB2Result::exec(), QSQLiteResult::exec(), QSymSQLResult::exec(), QODBCResult::exec(), QSqlResult::execBatch(), QOCICols::execBatch(), QSQLite2ResultPrivate::fetchNext(), QSQLiteResultPrivate::fetchNext(), QOpenGLPaintEnginePrivate::fillPath(), QGridLayoutEngine::fillRowData(), QPatternist::ApplyTemplate::findTemplate(), QFontEngineMacMulti::fontIndexForFontID(), QGradientCache::generateGradientColorTable(), QGLPathMaskGenerator::generateTrapezoids(), QSortFilterProxyModelPrivate::handle_filter_changed(), QPatternist::XSLTTokenizer::handleStandardAttributes(), QPatternist::XSLTTokenizer::handleValidationAttributes(), QSortFilterProxyModel::hasChildren(), QStyleSheetStyle::hasStyleRule(), QTableModel::headerData(), QHeaderViewPrivate::headerLength(), QHeaderViewPrivate::headerSectionCount(), ShaderEffect::hideOriginal(), QTableModel::index(), QHeaderViewPrivate::initializeIndexMapping(), QTableModel::insertColumns(), QSortFilterProxyModel::insertColumns(), insertOrRemoveItems(), QTableModel::insertRows(), QSortFilterProxyModel::insertRows(), QXmlSimpleReaderPrivate::insertXmlRef(), QPatternist::XSLTTokenizer::insideSequenceConstructor(), QListModeViewBase::intersectingSet(), QDirModelPrivate::invalidate(), QFontDatabasePrivate::isApplicationFont(), QWizardPage::isComplete(), QTreeViewPrivate::isItemHiddenOrDisabled(), QMetaType::isRegistered(), QTableModel::isValid(), QDockWidgetLayout::itemAt(), QListModel::itemData(), QTreeModel::itemData(), QTableModel::itemData(), QTextDocumentLayoutPrivate::layoutTable(), QBspTree::leafCount(), QPatternist::AccelTree::maximumPreNumber(), QTextFormat::merge(), QDeclarativePropertyCache::method(), QTreeWidget::mimeData(), QStandardItemModel::mimeData(), QPatternist::NamePool::NamePool(), QPatternist::AccelTreeBuilder< true >::namespaceBinding(), QOleEnumFmtEtc::Next(), qLess< Item::List >::operator()(), operator<<(), QPatternist::XsdStateMachine< XsdSchemaToken::NodeName >::outputGraph(), QOCIResultPrivate::outValues(), QDeclarativePaintedItem::paint(), QDirModel::parent(), QDeclarativeStyledTextPrivate::parse(), QRegExpEngine::parse(), parseColorValue(), parseCoreNode(), parseCSStoXMLAttrs(), parseShorthandBackgroundProperty(), parseShorthandFontProperty(), parseStopNode(), QListModeViewBase::perItemScrollingPageSteps(), QPixmapIconEngine::pixmap(), QStyleSheetStyle::polish(), QSvgHandler::popColor(), QDeclarativeTextLayout::prepare(), QDeclarativeBindingCompiler::program(), QDeclarativePropertyCache::property(), QSortFilterProxyModelPrivate::proxy_item_range(), QSvgHandler::pushColorCopy(), qCreateParamString(), qMetaTypeCustomType_unlocked(), QOleEnumFmtEtc::QOleEnumFmtEtc(), QRegion::QRegion(), QRenderRule::QRenderRule(), QSvgAttributes::QSvgAttributes(), qt_adopted_thread_watcher_function(), qt_bitmapToRegion(), qt_mac_post_retranslateAppMenu(), QThreadStorageData::QThreadStorageData(), QPatternist::XSLTTokenizer::queueNamespaceDeclarations(), rasterFallbackWarn(), QWSLinuxTPMouseHandlerPrivate::readMouseData(), QVariantAnimationPrivate::recalculateCurrentInterval(), QSqlTableModelPrivate::record(), QTableModel::removeColumns(), QTextTable::removeColumns(), QSortFilterProxyModel::removeColumns(), QTableModel::removeRows(), QSortFilterProxyModel::removeRows(), QStyleSheetStyle::renderRule(), QWSDisplay::repaintRegion(), QXmlSimpleReaderPrivate::reportEndEntities(), QFutureInterface< T >::reportResults(), QWizardField::resolve(), QTextEngine::resolveAdditionalFormats(), QGraphicsAnchorLayoutPrivate::restoreSimplifiedAnchor(), QTableModel::rowCount(), QWindowsFileSystemWatcherEngineThread::run(), QTextHtmlImporter::scanTable(), QTreeView::scrollContentsBy(), QMenuPrivate::scrollMenu(), QHeaderViewPrivate::sectionSpanIndex(), QTreeViewPrivate::select(), QPatternist::XsdValidatingInstanceReader::selectNodeSets(), QWSCalibratedMouseHandler::sendFiltered(), QPatternist::AccelTree::sendNamespaces(), separatorMoveHelper(), QSvgAnimateTransform::setArgs(), QTableModel::setColumnCount(), QListWidgetItem::setData(), QTableWidgetItem::setData(), QTreeWidgetItem::setData(), QWSRegionCommand::setData(), QWSEmbedCommand::setData(), setFontFamilyFromValues(), QBoxLayout::setGeometry(), QTableModel::setHorizontalHeaderItem(), QTableModel::setItem(), QTextHtmlParserNode::setListStyle(), QStandardItemPrivate::setModel(), QXcbWindow::setNetWmWindowTypes(), QWidgetPrivate::setNetWmWindowTypes(), QWizard::setPage(), QVGPaintEnginePrivate::setPenParams(), QPatternist::NamespaceSupport::setPrefixes(), QStyleSheetStyle::setProperties(), QGridLayoutEngine::setRowAlignment(), QTableModel::setRowCount(), QGridLayoutEngine::setRowSizeHint(), QGridLayoutEngine::setRowSpacing(), QGridLayoutEngine::setRowStretchFactor(), QVGCompositionHelper::setScissor(), setTextDecorationFromValues(), QTableModel::setVerticalHeaderItem(), QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(), QTreeView::sizeHintForColumn(), QOleEnumFmtEtc::Skip(), QTableModel::sort(), QStandardItemPrivate::sortChildren(), QSortFilterProxyModelPrivate::source_items_inserted(), QTransform::squareToQuad(), QStyleSheetStyle::styleRules(), QDockWidgetLayout::takeAt(), QTableModel::takeHorizontalHeaderItem(), QTableModel::takeVerticalHeaderItem(), QTextLine::textLength(), QApplicationPrivate::translateTouchEvent(), QPixmapIconEngine::tryMatch(), QPatternist::OrderBy::typeCheck(), QMetaType::typeName(), QPatternist::NamePool::unlockedAllocateLocalName(), QPatternist::NamePool::unlockedAllocateNamespace(), QPatternist::NamePool::unlockedAllocatePrefix(), QMetaType::unregisterType(), QGLContext::updatePaintDevice(), updateRedirectedToGraphicsProxyWidget(), ShaderEffect::updateRenderTargets(), QVGPaintEngine::updateScissor(), QDockAreaLayoutInfo::usedSeparatorWidgets(), QDockAreaLayout::usedSeparatorWidgets(), QPatternist::XsdValidatingInstanceReader::validateKeyIdentityConstraint(), QMYSQLResult::virtual_hook(), QPatternist::yyparse(), QFontEngineMacMulti::~QFontEngineMacMulti(), QObject::~QObject(), and QOleEnumFmtEtc::~QOleEnumFmtEtc().
|
inline |
|
inline |
Returns a pointer to the data stored in the vector.
The pointer can be used to access and modify the items in the vector.
Example:
The pointer remains valid as long as the vector isn't reallocated.
This function is mostly useful to pass a vector to a function that accepts a plain C++ array.
Definition at line 152 of file qvector.h.
Referenced by QRawFont::advancesForGlyphIndexes(), QGraphicsViewPrivate::allocStyleOptionsArray(), QRegionPrivate::append(), QScript::callQtMethod(), QX11PaintEnginePrivate::clipPolygon_dev(), QPixmap::clut(), QImageTextureGlyphCache::createTextureData(), QVertexIndexVector::data(), QPainter::drawChord(), QPaintEngine::drawEllipse(), QX11PaintEngine::drawPath(), QOCICols::execBatch(), QOpenGLPaintEnginePrivate::fillPath(), findRealWindow(), flushRow(), QGraphicsViewPrivate::freeStyleOptionsArray(), QX11PixmapData::fromImage(), QGLPathMaskGenerator::generateTrapezoids(), QXlibWindow::getNetWmState(), getNetWmState(), QXcbWindow::glContext(), QXlibWindow::glContext(), QGlyphRun::glyphIndexes(), QRegionPrivate::intersect(), QMatrix::map(), QTransform::map(), QTransformedScreen::mapFromDevice(), QTransformedScreen::mapToDevice(), QRegExpMatchState::matchHere(), mergeInto(), miCoalesce(), miIntersectO(), miRegionOp(), miSubtractNonO1(), miSubtractO(), miUnionNonO(), miUnionO(), OffsetRegion(), QStack< State >::pop(), QGlyphRun::positions(), QDeclarativeTextLayout::prepare(), QRegionPrivate::prepend(), PtsToRegion(), QOpenKODEWindow::QOpenKODEWindow(), qstring_to_xtp(), qt_mac_desktopSize(), send_targets_selection(), QXlibClipboard::sendTargetsSelection(), QWSEmbedEvent::setData(), QOpenKODEWindow::setGeometry(), QCoreGraphicsPaintEnginePrivate::setStrokePen(), QVGPaintEnginePrivate::setupColorRamp(), QPainter::setViewTransformEnabled(), QXlibWindow::setWindowFlags(), QGridLayoutEngine::sizeHint(), QStack< State >::top(), toSQLTCHAR(), QString::toUcs4(), QStringRef::toUcs4(), QApplicationPrivate::translateTouchEvent(), and WinMain().
|
inline |
|
inline |
Definition at line 147 of file qvector.h.
Referenced by QGLCmap::detach(), and QStack< State >::top().
|
private |
|
inline |
This function is provided for STL compatibility.
It is equivalent to isEmpty(), returning true if the vector is empty; otherwise returns false.
Definition at line 285 of file qvector.h.
Referenced by QSplitterPrivate::doResize(), QDockAreaLayout::getGrid(), QDirModelPrivate::invalidate(), QToolBarLayout::layoutActions(), QTabBarPrivate::layoutTabs(), QRBTree< int >::order(), qGeomCalc(), QBoxLayoutPrivate::setupGeom(), QFormLayoutPrivate::setupVerticalLayoutData(), and QPdfEnginePrivate::writePage().
|
inline |
Returns an STL-style iterator pointing to the imaginary item after the last item in the vector.
Definition at line 250 of file qvector.h.
Referenced by QFileSystemModelPrivate::_q_fileSystemChanged(), QWizardPrivate::_q_handleFieldObjectDestroyed(), QSortFilterProxyModelPrivate::_q_sourceDataChanged(), QDBusAdaptorConnector::addAdaptor(), QRegExpEngine::addPlusTransitions(), QXcbWindowSurface::beginPaint(), QXlibWindowSurface::beginPaint(), QX11WindowSurface::beginPaint(), QRasterWindowSurface::beginPaint(), QWSMemorySurface::beginPaint(), QListViewPrivate::closestIndex(), QPathClipper::doClip(), QTextDocumentLayoutPrivate::drawFlow(), QListModel::ensureSorted(), QTreeModel::ensureSorted(), QTableModel::ensureSorted(), QPatternist::TemplateMode::finalize(), QTextDocumentLayoutPrivate::frameIteratorForYPosition(), QPathClipper::handleCrossingEdges(), huntAndDestroy(), QIconModeViewBase::itemsRect(), QTextDocumentLayoutPrivate::layoutFlow(), QSortFilterProxyModelPrivate::proxy_intervals_for_source_items(), qDBusPropertySet(), qtKey2CocoaKey(), QDBusConnection::registerObject(), QListViewPrivate::removeCurrentAndDisabled(), QSortFilterProxyModel::removeRows(), QListViewPrivate::selection(), QTableModel::setItem(), QVariantAnimationPrivate::setValueAt(), QTableModel::sort(), QSortFilterProxyModelPrivate::sort_source_rows(), QStandardItemPrivate::sortChildren(), splitPolygon(), QDBusConnection::unregisterObject(), QSortFilterProxyModelPrivate::updateChildrenMapping(), and QVariantAnimationPrivate::valueAt().
|
inline |
|
inline |
Returns true if this vector is not empty and its last item is equal to value; otherwise returns false.
Definition at line 265 of file qvector.h.
Q_TYPENAME QVector< T >::iterator QVector< T >::erase | ( | iterator | begin, |
iterator | end | ||
) |
Removes all the items from begin up to (but not including) end.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns an iterator to the same item that end referred to before the call.
Definition at line 627 of file qvector.h.
Referenced by QWizardPrivate::_q_handleFieldObjectDestroyed(), QSortFilterProxyModelPrivate::_q_sourceDataChanged(), QListViewPrivate::removeCurrentAndDisabled(), QVariantAnimationPrivate::setValueAt(), and QSortFilterProxyModelPrivate::updateChildrenMapping().
|
inline |
Removes the item pointed to by the iterator pos from the vector, and returns an iterator to the next item in the vector (which may be end()).
Definition at line 256 of file qvector.h.
Referenced by QVector< QPoint >::erase().
Assigns value to all items in the vector.
If size is different from -1 (the default), the vector is resized to size size beforehand.
Example:
Definition at line 665 of file qvector.h.
Referenced by QRegExpCharClass::addCategories(), QRegExpCharClass::addRange(), QRegExpEngine::Box::Box(), QSortFilterProxyModelPrivate::build_source_to_proxy_mapping(), QTextHtmlExporter::emitTable(), QDB2Result::exec(), QGLEngineShaderManager::getUniformLocation(), QGraphicsSceneBspTree::initialize(), QTextDocumentLayoutPrivate::layoutTable(), QDB2Result::nextResult(), QRegExpCharClass::QRegExpCharClass(), qt_token_info::qt_token_info(), QSyntaxHighlighterPrivate::reformatBlock(), QDB2Result::reset(), QRegExpCharClass::setNegative(), QRegExpEngine::setup(), QRegExpEngine::Box::setupHeuristics(), and QMenuPrivate::updateActionRects().
|
inline |
Returns a reference to the first item in the vector.
This function assumes that the vector isn't empty.
Definition at line 260 of file qvector.h.
Referenced by QPainterPath::addPolygon(), QTextEngine::beginningOfLine(), QScript::callQtMethod(), QRegionPrivate::canPrepend(), QPdfBaseEnginePrivate::closePrintDevice(), QListModel::ensureSorted(), QTreeModel::ensureSorted(), QGL2GradientCache::generateGradientColorTable(), QGLGradientCache::generateGradientColorTable(), QGradientCache::generateGradientColorTable(), rasterFallbackWarn(), QFileInfoGatherer::run(), QPatternist::XsdValidatingInstanceReader::selectNodeSets(), SequentialAnchorData::SequentialAnchorData(), QVGPaintEnginePrivate::setupColorRamp(), QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(), QTreeModel::sortItems(), QPainterPath::toFillPolygon(), and QPainterPath::toFillPolygons().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 261 of file qvector.h.
Definition at line 458 of file qvector.h.
Returns a QVector object with the data contained in list.
Example:
Definition at line 789 of file qvector.h.
Referenced by QDBusPendingCallPrivate::setReplyCallback().
|
inlinestatic |
Returns a QVector object with the data contained in vector.
The order of the elements in the QVector is the same as in vector.
Example:
Definition at line 308 of file qvector.h.
|
inline |
This function is provided for STL compatibility.
It is equivalent to first().
Definition at line 287 of file qvector.h.
Referenced by QSvgText::draw().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 288 of file qvector.h.
int QVector< T >::indexOf | ( | const T & | value, |
int | from = 0 |
||
) | const |
Returns the index position of the first occurrence of value in the vector, searching forward from index position from.
Returns -1 if no item matched.
Example:
This function requires the value type to have an implementation of operator==()
.
Definition at line 698 of file qvector.h.
Referenced by QPdfEnginePrivate::addConstantAlphaObject(), QStandardItemPrivate::childIndex(), QGLColormap::find(), QTableModel::index(), QTableModel::itemChanged(), QStandardItemModelPrivate::itemChanged(), q_configFromQPlatformWindowFormat(), q_reduceConfigAttributes(), QBspTree::remove(), QGraphicsAnchorLayoutPrivate::removeAnchor(), QTableModel::removeItem(), QGraphicsScenePrivate::removeItemHelper(), QWindowsFileSystemWatcherEngine::removePaths(), ShaderEffect::removeRenderTarget(), and QWindowsFileSystemWatcherEngineThread::run().
|
inline |
Inserts value at index position i in the vector.
If i is 0, the value is prepended to the vector. If i is size(), the value is appended to the vector.
Example:
For large vectors, this operation can be slow (linear time), because it requires moving all the items at indexes i and above by one position further in memory. If you want a container class that provides a fast insert() function, use QLinkedList instead.
Definition at line 362 of file qvector.h.
Referenced by QStandardItemModelPrivate::columnsInserted(), convert_indexed8_to_ARGB_PM_inplace(), convert_indexed8_to_RGB_inplace(), QTableModel::ensureSorted(), QNetworkAuthenticationCache::insert(), QSortFilterProxyModelPrivate::insert_source_items(), QTableModel::insertColumns(), QTextTable::insertColumns(), QTreeModel::insertColumns(), insertOrRemoveItems(), QTableModel::insertRows(), ShaderEffectItem::lookThroughShaderCode(), operator>>(), QDBusConnection::registerObject(), QStandardItemModelPrivate::rowsInserted(), QGradient::setColorAt(), QTableModel::setItem(), QVariantAnimationPrivate::setValueAt(), QSortFilterProxyModelPrivate::source_items_inserted(), and QTextEngine::splitItem().
|
inline |
Inserts count copies of value at index position i in the vector.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Example:
Definition at line 366 of file qvector.h.
Q_TYPENAME QVector< T >::iterator QVector< T >::insert | ( | iterator | before, |
int | count, | ||
const T & | value | ||
) |
Inserts count copies of value in front of the item pointed to by the iterator before.
Returns an iterator pointing at the first of the inserted items.
Definition at line 593 of file qvector.h.
|
inline |
Inserts value in front of the item pointed to by the iterator before.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns an iterator pointing at the inserted item.
Definition at line 254 of file qvector.h.
Referenced by QVector< QPoint >::insert().
|
inline |
|
inline |
Returns true if the vector has size 0; otherwise returns false.
Definition at line 139 of file qvector.h.
Referenced by QGraphicsScenePrivate::_q_polishItems(), QSortFilterProxyModelPrivate::_q_sourceDataChanged(), QPainterPath::addPolygon(), QDirIteratorPrivate::advance(), QImage::allGray(), QProxyFontEngine::alphaMapForGlyph(), QTextDocumentPrivate::appendUndoItem(), QPaintBufferEngine::brushChanged(), QCss::StyleSheet::buildIndexes(), QScript::callQtMethod(), QSvgHandler::characters(), cleanupDeletedNodes(), QTextDocumentPrivate::clearUndoRedoStacks(), QTreeWidgetItem::clone(), QTextHtmlImporter::closeTag(), convert_indexed8_to_RGB16_inplace(), convert_RGB_to_Indexed8(), QPainterPathStroker::createStroke(), QSvgHandler::currentColor(), QPatternist::AccelTreeBuilder< true >::currentParent(), QPen::dashPattern(), QGraphicsSceneBspTree::debug(), QTextDocumentLayoutPrivate::drawFlow(), QGraphicsScenePrivate::drawItemHelper(), QTextHtmlExporter::emitTable(), QSvgHandler::endElement(), QCoreApplication::exec(), QOCICols::execBatch(), QWinSettingsPrivate::fileName(), findObject(), QWidgetBackingStore::flush(), QTextEngine::format(), QTextEngine::formatIndex(), QTextDocumentLayoutPrivate::frameIteratorForYPosition(), QWindowsAccessible::get_accSelection(), QXlibWindow::getNetWmState(), getNetWmState(), QGLEngineShaderManager::getUniformLocation(), QSortFilterProxyModelPrivate::handle_filter_changed(), QPathClipper::handleCrossingEdges(), QDirIterator::hasNext(), QCoreApplication::hasPendingEvents(), QStyleSheetStyle::hasStyleRule(), QSpanData::initTexture(), QTreeWidgetItem::insertChild(), QTreeWidgetItem::insertChildren(), QTextTable::insertColumns(), QTreeModel::insertColumns(), QPaintBuffer::isEmpty(), QDeclarativeBindingCompiler::isValid(), QTreeView::keyPressEvent(), QTextDocumentLayoutPrivate::layoutFlow(), Document::load(), QHeaderViewPrivate::logicalIndex(), QWidgetBackingStore::markDirty(), QStandardItemModel::mimeData(), miSetExtents(), QListView::moveCursor(), QPatternist::PullBridge::next(), StringSplitter::next(), QPatternist::XQueryTokenizer::nextToken(), QXmlSimpleReaderPrivate::parseAttlistDecl(), QXmlSimpleReaderPrivate::parseAttribute(), QXmlSimpleReaderPrivate::parseAttType(), QXmlSimpleReaderPrivate::parseAttValue(), QXmlSimpleReaderPrivate::parseBeginOrContinue(), QXmlSimpleReaderPrivate::parseChoiceSeq(), QXmlSimpleReaderPrivate::parseComment(), QXmlSimpleReaderPrivate::parseContent(), QXmlSimpleReaderPrivate::parseDoctype(), QXmlSimpleReaderPrivate::parseElement(), QXmlSimpleReaderPrivate::parseElementDecl(), QXmlSimpleReaderPrivate::parseEntityDecl(), QXmlSimpleReaderPrivate::parseEntityValue(), QXmlSimpleReaderPrivate::parseExternalID(), QXmlSimpleReaderPrivate::parseMarkupdecl(), QXmlSimpleReaderPrivate::parseMisc(), QXmlSimpleReaderPrivate::parseName(), QXmlSimpleReaderPrivate::parseNmtoken(), QXmlSimpleReaderPrivate::parseNotationDecl(), QXmlSimpleReaderPrivate::parsePEReference(), QXmlSimpleReaderPrivate::parsePI(), QXmlSimpleReaderPrivate::parseProlog(), QXmlSimpleReaderPrivate::parseReference(), QXmlSimpleReaderPrivate::parseString(), QPaintBufferEngine::penChanged(), QListModeViewBase::perItemScrollingPageSteps(), QPixmapIconEngine::pixmap(), QStack< State >::pop(), QPatternist::XQueryTokenizer::popState(), QTreeWidgetItemPrivate::propagateDisabled(), QSortFilterProxyModelPrivate::proxy_intervals_for_source_items(), QSortFilterProxyModelPrivate::proxy_intervals_for_source_items_to_add(), qCreateParamString(), qDrawPlainRect(), qLess< Item::List >::qLess(), qstring_to_xtp(), QPatternist::XSLTTokenizer::queueOnExit(), QWinSettingsPrivate::QWinSettingsPrivate(), QDBusConnection::registerObject(), QTextEngine::resolveAdditionalFormats(), QFileInfoGatherer::run(), QTreeViewPrivate::select(), QPatternist::AccelTree::sendNamespaces(), QAbstractXmlNodeModel::sendNamespaces(), QPen::setDashPattern(), QTreeWidgetItem::setFlags(), QStandardItemPrivate::setModel(), QWidgetPrivate::setNetWmWindowTypes(), QPdf::Stroker::setPen(), QListView::setSelection(), QCosmeticStroker::setup(), QXlibWindow::setWindowFlags(), QComboBox::showPopup(), QGraphicsAnchorLayoutPrivate::simplifyGraph(), QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(), QGraphicsAnchorLayoutPrivate::simplifyVertices(), QPatternist::SortTuple::SortTuple(), QSvgHandler::startElement(), QGradient::stops(), QPatternist::AccelTreeResourceLoader::streamToReceiver(), QTreeWidgetItem::takeChild(), QTreeWidgetItem::takeChildren(), QStack< State >::top(), QPaintBufferEngine::transformChanged(), QHeaderViewPrivate::visualIndex(), QFontSubset::widthArray(), and QWinSettingsPrivate::writeHandle().
|
inline |
Returns a reference to the last item in the vector.
This function assumes that the vector isn't empty.
Definition at line 262 of file qvector.h.
Referenced by QPaintBufferEngine::brushChanged(), createSequence(), QListModeViewBase::dragMoveEvent(), QTextDocumentLayoutPrivate::drawFlow(), QListModeViewBase::dropOn(), QTextEngine::endOfLine(), QTextDocumentLayoutPrivate::layoutFlow(), QTextDocumentLayoutPrivate::layoutTable(), QPaintBufferEngine::penChanged(), QListModeViewBase::perItemScrollingPageSteps(), QTextHtmlImporter::processBlockNode(), QTest::qExec(), SequentialAnchorData::SequentialAnchorData(), QListView::setSelection(), QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(), QPaintBufferEngine::transformChanged(), QPdfEnginePrivate::writePage(), and QPdfEnginePrivate::writeTail().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 263 of file qvector.h.
int QVector< T >::lastIndexOf | ( | const T & | value, |
int | from = -1 |
||
) | const |
Returns the index position of the last occurrence of the value value in the vector, searching backward from index position from.
If from is -1 (the default), the search starts at the last item. Returns -1 if no item matched.
Example:
This function requires the value type to have an implementation of operator==()
.
Definition at line 713 of file qvector.h.
Referenced by QStandardItemPrivate::childIndex().
|
inlineprivate |
Definition at line 403 of file qvector.h.
Q_OUTOFLINE_TEMPLATE QVector< T > QVector< T >::mid | ( | int | pos, |
int | length = -1 |
||
) | const |
Returns a vector whose elements are copied from this vector, starting at position pos.
If length is -1 (the default), all elements after pos are copied; otherwise length elements (or all remaining elements if there are less than length elements) are copied.
Definition at line 754 of file qvector.h.
Returns true if other is not equal to this vector; otherwise returns false.
Two vectors are considered equal if they contain the same values in the same order.
This function requires the value type to have an implementation of operator==()
.
|
inline |
Returns a vector that contains all the items in this vector followed by all the items in the other vector.
Definition at line 294 of file qvector.h.
Appends the items of the other vector to this vector and returns a reference to this vector.
Definition at line 679 of file qvector.h.
|
inline |
Appends value to the vector.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 296 of file qvector.h.
Appends value to the vector and returns a reference to this vector.
Definition at line 298 of file qvector.h.
Assigns other to this vector and returns a reference to this vector.
Definition at line 390 of file qvector.h.
Returns true if other is equal to this vector; otherwise returns false.
Two vectors are considered equal if they contain the same values in the same order.
This function requires the value type to have an implementation of operator==()
.
Definition at line 649 of file qvector.h.
|
inline |
Returns the item at index position i as a modifiable reference.
i must be a valid index position in the vector (i.e., 0 <= i < size()).
Note that using non-const operators can cause QVector to do a deep copy.
Definition at line 358 of file qvector.h.
Referenced by QObjectConnectionListVector::operator[]().
|
inline |
|
inline |
This function is provided for STL compatibility.
It is equivalent to erase(end() - 1).
Definition at line 283 of file qvector.h.
Referenced by QXmlSimpleReaderPrivate::next(), QRBTree< int >::order(), QXmlSimpleReaderPrivate::processElementEmptyTag(), and QXmlSimpleReaderPrivate::reportEndEntities().
|
inline |
This function is provided for STL compatibility.
It is equivalent to erase(begin()).
Definition at line 284 of file qvector.h.
Referenced by QFileInfoGatherer::run().
|
inline |
Inserts value at the beginning of the vector.
Example:
This is the same as vector.insert(0, value).
For large vectors, this operation can be slow (linear time), because it requires moving all the items in the vector by one position further in memory. If you want a container class that provides a fast prepend() function, use QList or QLinkedList instead.
Definition at line 378 of file qvector.h.
Referenced by QScript::callQtMethod(), QPatternist::XQueryTokenizer::nextToken(), QRegionPrivate::prepend(), and qt_watch_adopted_thread().
|
inline |
This function is provided for STL compatibility.
It is equivalent to append(value).
Definition at line 281 of file qvector.h.
Referenced by QTriangulator< T >::MonotoneToTriangles::decompose(), QSvgText::draw(), QSortFilterProxyModelPrivate::filter_changed(), QTriangulator< T >::initialize(), QTextEngine::insertionPointsForLine(), and QRBTree< int >::order().
|
inline |
This function is provided for STL compatibility.
It is equivalent to prepend(value).
Definition at line 282 of file qvector.h.
|
private |
Definition at line 472 of file qvector.h.
|
inline |
Removes the element at index position i.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 374 of file qvector.h.
Referenced by QGraphicsScenePrivate::_q_polishItems(), QTextDocumentPrivate::clearUndoRedoStacks(), QStandardItemModelPrivate::columnsRemoved(), QWidgetBackingStore::dirtyOnScreenWidgetsRemoveAll(), QWidgetBackingStore::dirtyWidgetsRemoveAll(), QTableModel::ensureSorted(), QSortFilterProxyModelPrivate::filter_changed(), insertOrRemoveItems(), QPixmapIconEngine::pixmap(), q_reduceConfigAttributes(), qt_adopted_thread_watcher_function(), QBspTree::remove(), QSortFilterProxyModelPrivate::remove_proxy_interval(), QTableModel::removeColumns(), QTextTable::removeColumns(), QWindowsFileSystemWatcherEngine::removePaths(), ShaderEffect::removeRenderTarget(), QTableModel::removeRows(), QScript::QObjectConnectionManager::removeSignalHandler(), QHeaderViewPrivate::removeSpans(), QStandardItemModelPrivate::rowsRemoved(), QWindowsFileSystemWatcherEngineThread::run(), QTableModel::setItem(), QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(), and QSortFilterProxyModelPrivate::source_items_removed().
|
inline |
Removes count elements from the middle of the vector, starting at index position i.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 370 of file qvector.h.
|
inline |
Replaces the item at index position i with value.
i must be a valid index position in the vector (i.e., 0 <= i < size()).
Definition at line 382 of file qvector.h.
Referenced by QDesktopWidgetPrivate::init(), q_reduceConfigAttributes(), and QGLColormap::setEntry().
void QVector< T >::reserve | ( | int | size | ) |
Attempts to allocate memory for at least size elements.
If you know in advance how large the vector will be, you can call this function, and if you call resize() often you are likely to get better performance. If size is an underestimate, the worst that will happen is that the QVector will be a bit slower.
The sole purpose of this function is to provide a means of fine tuning QVector's memory usage. In general, you will rarely ever need to call this function. If you want to change the size of the vector, call resize().
Definition at line 339 of file qvector.h.
Referenced by QWindowsMime::allFormatsForMime(), QAbstractItemModel::changePersistentIndexList(), QTableModel::columnItems(), QSortFilterProxyModelPrivate::create_mapping(), QPathClipper::doClip(), QCommonStyle::drawPrimitive(), QWindowsMobileStyle::drawPrimitive(), QPainterPath::ensureData_helper(), QTableModel::ensureSorted(), flushRow(), QVector< QPoint >::fromStdVector(), QXmlStreamReaderPrivate::init(), QTreeWidgetItem::insertChild(), QTextDocumentLayoutPrivate::layoutFlow(), QTextDocumentLayoutPrivate::layoutTable(), QVector< QPoint >::mid(), QStandardItemModel::mimeData(), QPatternist::NamePool::NamePool(), operator>>(), QSvgHandler::parseCSStoXMLAttrs(), parseNumbersList(), QListModeViewBase::perItemScrollingPageSteps(), QListModeViewBase::perItemScrollToValue(), QDirIteratorPrivate::QDirIteratorPrivate(), qDrawShadePanel(), QTest::qExec(), QGraphicsViewPrivate::QGraphicsViewPrivate(), QTreeWidgetItem::QTreeWidgetItem(), QWindowsFileSystemWatcherEngineThread::QWindowsFileSystemWatcherEngineThread(), QXmlSerializerPrivate::QXmlSerializerPrivate(), QTextHtmlImporter::scanTable(), QTableModel::sort(), QStandardItemPrivate::sortChildren(), splitPolygon(), QCss::StyleSelector::styleRulesForNode(), QPolygonF::toPolygon(), QPainterPath::toSubpathPolygons(), QDeclarativePropertyCache::update(), and QConfFileSettingsPrivate::writeIniFile().
void QVector< T >::resize | ( | int | size | ) |
Sets the size of the vector to size.
If size is greater than the current size, elements are added to the end; the new elements are initialized with a default-constructed value. If size is less than the current size, elements are removed from the end.
Definition at line 342 of file qvector.h.
Referenced by QObjectPrivate::addConnection(), addPoint(), QRegExpCharClass::addRange(), QPdfEnginePrivate::addXrefEntry(), QGraphicsViewPrivate::allocStyleOptionsArray(), QProxyFontEngine::alphaMapForGlyph(), QDeclarativePropertyCache::append(), QRegionPrivate::append(), QSqlCachedResult::cacheNext(), QStyleHelper::calcLines(), QTreeViewPrivate::calcLogicalIndices(), QScript::callQtMethod(), QRegExpCharClass::clear(), QTextDocumentPrivate::clearUndoRedoStacks(), QX11PaintEnginePrivate::clipPolygon_dev(), convert_indexed8_to_ARGB_PM_inplace(), convert_indexed8_to_RGB_inplace(), convert_Indexed8_to_X32(), convert_Mono_to_Indexed8(), convert_RGB_to_Indexed8(), convertWithPalette(), QImageData::create(), QBspTree::create(), QSortFilterProxyModelPrivate::create_mapping(), QShortcutMap::createNewSequences(), QPathClipper::doClip(), QWindowsStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QMotifStyle::drawPrimitive(), QTextHtmlExporter::emitTable(), enumCallback(), QPatternist::ReturnOrderBy::evaluateSingleton(), QDB2Result::exec(), QODBCResult::exec(), QSQLite2ResultPrivate::fetchNext(), QSQLiteResultPrivate::fetchNext(), find_trans_colors(), QWindowsAccessible::get_accSelection(), QDockAreaLayout::getGrid(), QXlibWindow::getNetWmState(), getNetWmState(), QFontSubset::getReverseMap(), QPatternist::GenericDynamicContext::globalItemCacheCell(), QPatternist::GenericDynamicContext::globalItemSequenceCacheCells(), QTextEngine::indexAdditionalFormats(), QDesktopWidgetPrivate::init(), QSqlCachedResultPrivate::init(), init_gray(), init_indexed(), QGraphicsSceneBspTree::initialize(), QHeaderViewPrivate::initializeIndexMapping(), QTableModel::insertColumns(), QTreeModel::insertColumns(), QTableModel::insertRows(), QTextDocumentLayoutPrivate::layoutFlow(), QTextDocumentLayoutPrivate::layoutTable(), QFontEngineMultiFT::loadEngine(), mergeInto(), miRegionOp(), QSqlCachedResultPrivate::nextIndex(), QDB2Result::nextResult(), QODBCResult::nextResult(), operator>>(), QXmlStreamReaderPrivate::parse(), PolygonRegion(), QTriangulator< T >::polyline(), QStack< State >::pop(), QRegionPrivate::prepend(), PtsToRegion(), Q_GLOBAL_STATIC_WITH_INITIALIZER(), qDrawPlainRect(), QImage::QImage(), qstring_to_xtp(), query_colormap(), qWinCmdLine(), QXmlSerializerPrivate::QXmlSerializerPrivate(), QInternal::registerCallback(), QStateMachinePrivate::registerSignalTransition(), QDB2Result::reset(), QODBCResult::reset(), QXmlStreamReaderPrivate::resolveDtd(), QXmlStreamReaderPrivate::resolvePublicNamespaces(), QXmlStreamReaderPrivate::resolveTag(), QTextHtmlImporter::scanTable(), QAccessibleListView::selection(), QAccessibleIconView::selection(), QAccessibleListBox::selection(), QRegExpEngine::Box::set(), QImage::setColorCount(), QTreeModel::setColumnCount(), QTreeWidgetItem::setData(), QWSCalibratedMouseHandler::setFilterSize(), QRegion::setRects(), QGridLayoutEngine::setRowAlignment(), QListModeViewBase::setRowCount(), QGridLayoutEngine::setRowSizeHint(), QGridLayoutEngine::setRowSpacing(), QGridLayoutEngine::setRowStretchFactor(), QRegExpEngine::setup(), QFormLayoutPrivate::setupHfwLayoutData(), QFormLayoutPrivate::setupVerticalLayoutData(), QObject::setUserData(), QGridLayoutEngine::sizeHint(), QSortFilterProxyModelPrivate::source_items_inserted(), QRegExpEngine::startAtom(), QPainterPath::toFillPolygons(), QFontSubset::toTruetype(), QString::toUcs4(), QStringRef::toUcs4(), QTriangulator< T >::triangulate(), QMenuPrivate::updateActionRects(), QDockAreaLayoutInfo::updateSeparatorWidgets(), QDockAreaLayout::updateSeparatorWidgets(), QRegionPrivate::vector(), QRegionPrivate::vectorize(), and QMYSQLResult::virtual_hook().
|
inline |
|
inline |
Returns the number of items in the vector.
Definition at line 137 of file qvector.h.
Referenced by QRegExpEngine::Box::addAnchorsToEngine(), QRegExpEngine::addCatTransitions(), QXmlStreamReader::addExtraNamespaceDeclarations(), QPdfEnginePrivate::addImage(), QRegExpEngine::addLookahead(), QRegExpEngine::addPlusTransitions(), addPoint(), QPainterPath::addPolygon(), QRegExpCharClass::addRange(), QPainterPath::addRegion(), QPainterPath::addText(), QPdfEnginePrivate::addXrefEntry(), QRawFont::advancesForGlyphIndexes(), QGraphicsViewPrivate::allocStyleOptionsArray(), QRegExpEngine::anchorAlternation(), QRegionPrivate::append(), QTextDocumentPrivate::appendUndoItem(), QSvgStrokeStyle::apply(), QTextEngine::attributes(), QTextEngine::beginningOfLine(), ShaderEffectItem::bindGeometry(), QAhiScreen::blit(), QTransformedScreen::blit(), blit_template(), QTextEngine::boundingBox(), QSortFilterProxyModelPrivate::build_source_to_proxy_mapping(), QScript::callQtMethod(), QRegExpEngine::Box::cat(), QRegExpEngine::Box::catAnchor(), QTextTableData::cellPosition(), checkGrayscale(), QWinSettingsPrivate::children(), QTextDocumentPrivate::clearUndoRedoStacks(), QPaintEngineEx::clip(), QX11PaintEnginePrivate::clipPolygon_dev(), QPdfBaseEnginePrivate::closePrintDevice(), closestMatch(), QImage::colorCount(), QScreen::compose(), convert_indexed8_to_ARGB_PM_inplace(), convert_indexed8_to_RGB16_inplace(), convert_indexed8_to_RGB_inplace(), convert_Indexed8_to_X32(), convert_Mono_to_Indexed8(), convert_Mono_to_X32(), convert_RGB_to_Indexed8(), QBBWindow::copyBack(), QRegExpEngine::createState(), cubicTo_clipped(), QTextLine::cursorToX(), QDB2Result::data(), QTreeWidgetItem::data(), QGraphicsSceneBspTree::debug(), QAbstractItemModel::decodeData(), QDBusMetaType::demarshall(), QWidgetBackingStore::dirtyRegion(), QWidgetBackingStore::dirtyWidgetsRemoveAll(), dither_to_Mono(), QPathClipper::doClip(), QLinuxFbScreen::doRedraw(), QVNCScreen::doRedraw(), QSvgTinyDocument::draw(), QTextLayout::draw(), QSvgText::draw(), QPainter::drawChord(), QPainter::drawConvexPolygon(), QPaintEngine::drawEllipse(), QGraphicsScenePrivate::drawItemHelper(), QPainter::drawLines(), QX11PaintEngine::drawPath(), QBlitterPaintEngine::drawPixmap(), QPainter::drawPoints(), QPainter::drawPolygon(), QPainter::drawPolyline(), QWindowsMobileStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), QPainter::drawRects(), QPainter::drawText(), QTreeView::drawTree(), QAbstractTableModel::dropMimeData(), QAbstractListModel::dropMimeData(), QStandardItemModel::dropMimeData(), QRegExpCharClass::dump(), QRegExpEngine::dump(), QRegExpEngine::Box::dump(), QTextEngine::elidedText(), QTextEngine::endOfLine(), QPatternist::InScopePrefixesFN::evaluateSequence(), QScript::QObjectConnectionManager::execute(), QCoreApplication::exit(), QProxyScreen::exposeRegion(), QScreen::exposeRegion(), QGL2PaintEngineExPrivate::fill(), QImage::fill(), QVGCompositionHelper::fillBackground(), QX11PaintEnginePrivate::fillPath(), QRasterPaintEngine::fillPolygon(), QBlitterPaintEngine::fillRect(), QBlitterPaintEnginePrivate::fillRect(), QVGPaintEngine::fillRegion(), fillRegion(), QGL2PaintEngineExPrivate::fillStencilWithVertexArray(), QSortFilterProxyModelPrivate::filter_changed(), QTextEngine::findItem(), findRealWindow(), fix_color_table(), QDirectFBScreen::flipSurface(), QDirectFbWindowSurface::flush(), QXcbWindowSurface::flush(), QMacWindowSurface::flush(), QWidgetBackingStore::flush(), QGLWindowSurface::flush(), QRasterWindowSurface::flush(), QAlphaPaintEngine::flushAndInit(), QPSPrintEnginePrivate::flushPage(), flushRow(), QPaintBuffer::frameEndIndex(), QTextEngine::freeMemory(), QPdf::generateDashes(), QGL2GradientCache::generateGradientColorTable(), QGLGradientCache::generateGradientColorTable(), QWinSettingsPrivate::get(), QWindowsAccessible::get_accSelection(), QGL2GradientCache::getBuffer(), QGLGradientCache::getBuffer(), QGradientCache::getBuffer(), QDockAreaLayout::getGrid(), QXlibWindow::getNetWmState(), getNetWmState(), QPatternist::GenericDynamicContext::globalItemCacheCell(), QPatternist::GenericDynamicContext::globalItemSequenceCacheCells(), QSortFilterProxyModelPrivate::handle_filter_changed(), QPathClipper::handleCrossingEdges(), QPatternist::AccelTree::hasPrefix(), QTextHtmlImporter::import(), QRegExpCharClass::in(), QStaticTextPrivate::init(), QClipData::initialize(), QTriangulator< T >::initialize(), QTextDocumentPrivate::insert(), QSortFilterProxyModelPrivate::insert_source_items(), QTextDocumentPrivate::insertBlock(), QTextEngine::insertionPointsForLine(), QXmlSerializer::isBindingInScope(), QGLColormap::isEmpty(), QDB2Result::isNull(), QODBCResult::isNull(), QBrush::isOpaque(), QTextEngine::itemize(), QTextLine::layout_helper(), QToolBarLayout::layoutActions(), QTextDocumentLayoutPrivate::layoutFlow(), QTextDocumentLayoutPrivate::layoutTable(), QTextEngine::lineNumberForTextPosition(), QFontEngineMultiXLFD::loadEngine(), QFontEngineMultiFT::loadEngine(), QFontEngineMultiWin::loadEngine(), QFontEngineMultiQPA::loadEngine(), QFontEngineMultiQWS::loadEngine(), make_widget_eventUPP(), QMatrix::map(), QTransform::map(), QTransformedScreen::mapFromDevice(), mapProjective(), QTransformedScreen::mapToDevice(), QScript::QObjectConnectionManager::mark(), QDBusMetaType::marshall(), QRegExpMatchState::matchHere(), QTextFormat::merge(), mergeInto(), QRasterPixmapData::metric(), QVGPaintEnginePrivate::modifyMask(), QVNCCursor::move(), QPatternist::XsdStateMachine< XsdSchemaToken::NodeName >::move(), QPatternist::AccelTree::namespaceBindings(), QAbstractXmlNodeModel::namespaceForPrefix(), QXmlSimpleReaderPrivate::next(), QSqlCachedResultPrivate::nextIndex(), QImage::numColors(), OffsetRegion(), operator<<(), operator>>(), QScreen::paintBackground(), QBlittablePixmapData::paintEngine(), QTableView::paintEvent(), QMdiArea::paintEvent(), QXmlStreamReaderPrivate::parse(), parseAnimateTransformNode(), parsePen(), parseStopNode(), QPdf::patternForBrush(), QStack< State >::pop(), QTextEngine::positionAfterVisualMovement(), QRasterBuffer::prepare(), QRegExpMatchState::prepareForMatch(), QRegionPrivate::prepend(), QDashStroker::processCurrentSubpath(), QSortFilterProxyModelPrivate::proxy_intervals_for_source_items(), QSortFilterProxyModelPrivate::proxy_intervals_for_source_items_to_add(), QSortFilterProxyModelPrivate::proxy_to_source(), PtsToRegion(), QDeclarativeGlobalScriptClass::QDeclarativeGlobalScriptClass(), qGeomCalc(), qglx_getProcAddress(), QPolygonF::QPolygonF(), QRegion::QRegion(), qstring_to_xtp(), qt_adopted_thread_watcher_function(), qt_bitmapToRegion(), qt_mac_clip_cg(), qt_mac_desktopSize(), qt_mac_fill_background(), qt_regionToPath(), qt_transparent_pixel(), query_colormap(), QVectorPathConverter::QVectorPathData::QVectorPathData(), qVectorToSet(), qWinCmdLine(), QRasterPaintEnginePrivate::rasterizeLine_dashed(), QSettings::registerFormat(), QStateMachinePrivate::registerSignalTransition(), QMetaType::registerType(), QSortFilterProxyModelPrivate::remove_source_items(), QGraphicsSceneBspTree::removeItems(), QScript::QObjectConnectionManager::removeSignalHandler(), ShaderEffectItem::renderEffect(), resolveColor(), QPatternist::ReturnOrderBy::ReturnOrderBy(), QImage::rgbSwapped(), rot(), QSvgPaintEngine::saveGradientStops(), QTextHtmlImporter::scanTable(), QDirectFbWindowSurface::scroll(), QXcbWindowSurface::scroll(), QXlibWindowSurface::scroll(), QRasterWindowSurface::scroll(), QWSMemorySurface::scroll(), QGraphicsItem::scroll(), QWidgetPrivate::scroll_sys(), QWidgetPrivate::scrollRect(), send_targets_selection(), QAbstractXmlNodeModel::sendNamespaces(), QXlibClipboard::sendTargetsSelection(), separatorMoveHelper(), QVNCCursor::set(), QVGPaintEnginePrivate::setBrush(), QPainter::setClipRegion(), QImage::setColor(), QGradient::setColorAt(), QImage::setColorCount(), QImage::setColorTable(), QSvgStrokeStyle::setDashArray(), QPen::setDashPattern(), QPainterPathStroker::setDashPattern(), QWSRegionEvent::setData(), QWSEmbedEvent::setData(), PvrEglWindowSurface::setDirectRegion(), QGLColormap::setEntries(), QGlyphRun::setGlyphIndexes(), QTableModel::setHeaderData(), QPdf::Stroker::setPen(), QImage::setPixel(), QGlyphRun::setPositions(), QTextFormat::setProperty(), QGradient::setStops(), QCoreGraphicsPaintEnginePrivate::setStrokePen(), QCosmeticStroker::setup(), QVGPaintEnginePrivate::setupColorRamp(), QRegExpEngine::setupState(), QObject::setUserData(), QPainter::setViewTransformEnabled(), QXlibWindow::setWindowFlags(), QGLColormap::size(), QVertexIndexVector::size(), QAhiScreen::solidFill(), solidFill_template(), QSortFilterProxyModelPrivate::source_items_about_to_be_removed(), QSortFilterProxyModelPrivate::source_items_inserted(), QSortFilterProxyModelPrivate::source_items_removed(), QSortFilterProxyModelPrivate::source_to_proxy(), splitPolygon(), QRegExpEngine::startAtom(), QPatternist::AccelTreeResourceLoader::streamToReceiver(), QRasterPaintEngine::stroke(), QEglContext::swapBuffersRegion2NOK(), QWidgetBackingStore::sync(), QRegExpMatchState::testAnchor(), QPainter::testRenderHint(), QTextEngine::tightBoundingBox(), QPainterPath::toFillPolygons(), QX11PixmapData::toImage(), QStack< State >::top(), QPainterPath::toSubpathPolygons(), QImage::transformed(), QSvgNode::transformedBounds(), QPainterPath::translate(), QDBusMetaType::typeToSignature(), QTextDocumentPrivate::undoRedo(), QStateMachinePrivate::unregisterSignalTransition(), QOpenGLPaintEngine::updateClipRegion(), QOpenGLPaintEnginePrivate::updateDepthClip(), QRasterPaintEngine::updatePen(), QGraphicsViewPrivate::updateRegion(), QGraphicsView::updateScene(), QVGPaintEngine::updateScissor(), QDockAreaLayoutInfo::updateSeparatorWidgets(), QDockAreaLayout::updateSeparatorWidgets(), ShaderEffectItem::updateShaderProgram(), QPdfBaseEngine::updateState(), QRegionPrivate::vector(), QRegionPrivate::vectorize(), QPixmapIconEngine::virtual_hook(), QTextEngine::width(), QTiffHandler::write(), QPixmapIconEngine::write(), QXmlStreamWriter::writeAttributes(), QXmlStreamWriter::writeCurrentToken(), QPdfEnginePrivate::writePage(), QPdfEnginePrivate::writePageRoot(), QPdfEnginePrivate::writeTail(), QTextLine::xToCursor(), QPaintBufferPrivate::~QPaintBufferPrivate(), QPainterPrivate::~QPainterPrivate(), QPdfEnginePrivate::~QPdfEnginePrivate(), QSvgText::~QSvgText(), QWidgetBackingStore::~QWidgetBackingStore(), and QWinSettingsPrivate::~QWinSettingsPrivate().
|
inlineprivate |
|
inline |
Releases any memory not required to store the items.
The sole purpose of this function is to provide a means of fine tuning QVector's memory usage. In general, you will rarely ever need to call this function.
Definition at line 145 of file qvector.h.
Referenced by QGraphicsScenePrivate::_q_polishItems().
|
inline |
Returns true if this vector is not empty and its first item is equal to value; otherwise returns false.
Definition at line 264 of file qvector.h.
Swaps vector other with this vector.
This operation is very fast and never fails.
Definition at line 130 of file qvector.h.
Referenced by QStack< State >::swap(), QPolygon::swap(), and QPolygonF::swap().
Q_OUTOFLINE_TEMPLATE QList< T > QVector< T >::toList | ( | ) | const |
Returns a QList object with the data contained in this QVector.
Example:
Definition at line 770 of file qvector.h.
Referenced by QList< QPostEvent >::fromVector(), operator<<(), and QPatternist::ListIterator< QXmlNodeModelIndexIteratorPointer, QVector< QXmlNodeModelIndexIteratorPointer > >::toList().
|
inline |
Returns a std::vector object with the data contained in this QVector.
Example:
Definition at line 310 of file qvector.h.
Q_OUTOFLINE_TEMPLATE T QVector< T >::value | ( | int | i | ) | const |
Returns the value at index position i in the vector.
If the index i is out of bounds, the function returns a default-constructed value. If you are certain that i is within bounds, you can use at() instead, which is slightly faster.
Definition at line 559 of file qvector.h.
Referenced by QGridLayoutRowData::calculateGeometries(), QRegExpEngine::dump(), QGridLayoutEngine::fillRowData(), QXmlStreamAttributes::hasAttribute(), QTableModel::horizontalHeaderItem(), QTableModel::item(), QPatternist::XsdStateMachine< XsdSchemaToken::NodeName >::outputGraph(), QXmlStreamAttributes::QXmlStreamAttributes(), QListWidgetItem::setData(), QTableWidgetItem::setData(), QTreeWidgetItem::setData(), QTableModel::takeItem(), and QTableModel::verticalHeaderItem().
Q_OUTOFLINE_TEMPLATE T QVector< T >::value | ( | int | i, |
const T & | defaultValue | ||
) | const |
|
related |
Writes the vector vector to stream out.
This function requires the value type to implement operator<<()
.
Definition at line 312 of file qdatastream.h.
|
related |
Reads a vector from stream in into vector.
This function requires the value type to implement operator>>()
.
Definition at line 297 of file qdatastream.h.
union { ... } |
QVectorData* QVector< T >::d |
Definition at line 109 of file qvector.h.
Referenced by QVector< QPoint >::isSharedWith(), QVector< QPoint >::operator+=(), QVector< QPoint >::operator=(), QVector< QPoint >::operator==(), QRegion::rects(), and QVector< QPoint >::swap().
Definition at line 113 of file qvector.h.
Referenced by QVector< QPoint >::operator+=(), and QVector< QPoint >::operator==().