KPropertySetIterator
#include <KPropertySet.h>
Public Types | |
enum class | Order { Insertion , Alphabetical , AlphabeticalByName } |
Public Member Functions | |
KPropertySetIterator (const KPropertySet &set) | |
KPropertySetIterator (const KPropertySet &set, const KPropertySelector &selector) | |
KPropertySetIterator (const KPropertySetIterator &set) | |
KProperty * | current () const |
bool | operator!= (const KPropertySetIterator &other) const |
KProperty * | operator* () const |
void | operator++ () |
KPropertySetIterator & | operator= (const KPropertySetIterator &other) |
bool | operator== (const KPropertySetIterator &other) const |
Order | order () const |
void | setOrder (Order order) |
Detailed Description
A class to iterate over a KPropertySet.
It behaves like a QList::ConstIterator. Usage:
Usage with selector:
Definition at line 57 of file KPropertySet.h.
Member Enumeration Documentation
◆ Order
|
strong |
Ordering options for properties.
- See also
- setOrder()
Enumerator | |
---|---|
Insertion | insertion order |
Alphabetical | alphabetical order (case-insensitively by captions) |
AlphabeticalByName | alphabetical order (case-insensitively by name) |
Definition at line 92 of file KPropertySet.h.
Constructor & Destructor Documentation
◆ KPropertySetIterator() [1/3]
|
explicit |
Creates iterator for set set of properties.
The properties are sorted by insertion order by default. Use setOrder(Iterator::Alphabetical) to have alphabetical order.
Definition at line 303 of file KPropertySet.cpp.
◆ KPropertySetIterator() [2/3]
KPropertySetIterator::KPropertySetIterator | ( | const KPropertySet & | set, |
const KPropertySelector & | selector ) |
Creates iterator for set set of properties.
selector functor is used to iterate only over specified properties. The properties are sorted by insertion order by default. Use setOrder(Iterator::Alphabetical) to have alphabetical order.
Definition at line 313 of file KPropertySet.cpp.
◆ KPropertySetIterator() [3/3]
KPropertySetIterator::KPropertySetIterator | ( | const KPropertySetIterator & | set | ) |
◆ ~KPropertySetIterator()
KPropertySetIterator::~KPropertySetIterator | ( | ) |
Definition at line 343 of file KPropertySet.cpp.
Member Function Documentation
◆ current()
KProperty * KPropertySetIterator::current | ( | ) | const |
Definition at line 396 of file KPropertySet.cpp.
◆ operator!=()
|
inline |
- Returns
- true if this iterator does not equal to other
- Since
- 3.1
Definition at line 88 of file KPropertySet.h.
◆ operator*()
|
inline |
Definition at line 106 of file KPropertySet.h.
◆ operator++()
void KPropertySetIterator::operator++ | ( | ) |
Definition at line 401 of file KPropertySet.cpp.
◆ operator=()
KPropertySetIterator & KPropertySetIterator::operator= | ( | const KPropertySetIterator & | other | ) |
Assigns other to this KPropertySetIterator.
- Since
- 3.1
Definition at line 330 of file KPropertySet.cpp.
◆ operator==()
bool KPropertySetIterator::operator== | ( | const KPropertySetIterator & | other | ) | const |
- Returns
- true if this iterator equals to other
- Since
- 3.1
Definition at line 338 of file KPropertySet.cpp.
◆ order()
KPropertySetIterator::Order KPropertySetIterator::order | ( | ) | const |
- Returns
- order for properties.
Definition at line 391 of file KPropertySet.cpp.
◆ setOrder()
void KPropertySetIterator::setOrder | ( | KPropertySetIterator::Order | order | ) |
Sets order for properties. Restarts the iterator.
Definition at line 348 of file KPropertySet.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:05:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.