digiKam
Digikam::SearchXmlCachingReader Class Reference
+ Inheritance diagram for Digikam::SearchXmlCachingReader:

Public Member Functions

SearchXml::Operator defaultFieldOperator () const
 
QString fieldName () const
 
SearchXml::Operator fieldOperator () const
 
SearchXml::Relation fieldRelation () const
 
QString groupCaption () const
 
SearchXml::Operator groupOperator () const
 
bool isFieldElement () const
 
bool isGroupElement () const
 
SearchXml::Element readNext ()
 
void readToEndOfElement ()
 
void readToFirstField ()
 
bool readToStartOfElement (const QString &name)
 
 SearchXmlCachingReader (const QString &xml)
 
QString value ()
 
QDateTime valueToDateTime ()
 
QList< QDateTime > valueToDateTimeList ()
 
double valueToDouble ()
 
QList< double > valueToDoubleList ()
 
QList< double > valueToDoubleOrDoubleList ()
 
int valueToInt ()
 
QList< int > valueToIntList ()
 
QList< int > valueToIntOrIntList ()
 
qlonglong valueToLongLong ()
 
QList< qlonglong > valueToLongLongList ()
 
QStringList valueToStringList ()
 
QList< QString > valueToStringOrStringList ()
 

Protected Member Functions

SearchXml::Operator readOperator (const QString &, SearchXml::Operator) const
 
SearchXml::Relation readRelation (const QString &, SearchXml::Relation) const
 

Protected Attributes

SearchXml::Operator m_defaultFieldOperator
 
QString m_fieldName
 
SearchXml::Operator m_fieldOperator
 
SearchXml::Relation m_fieldRelation
 
QString m_groupCaption
 
SearchXml::Operator m_groupOperator
 
bool m_readValue
 
QVariant m_value
 

Constructor & Destructor Documentation

◆ SearchXmlCachingReader()

Digikam::SearchXmlCachingReader::SearchXmlCachingReader ( const QString &  xml)
explicit

This class has the same semantics as SearchXmlReader, but performs some caching and is thus much more relaxed than SearchXmlReader about the calling order of methods: With this class, you can access properties of a group until the next group is read, access properties and the value of a field until the next field is read, with all calls possible multiple times.

Member Function Documentation

◆ defaultFieldOperator()

SearchXml::Operator Digikam::SearchXmlReader::defaultFieldOperator ( ) const
inherited

Returns the default field operator. This operator can be overridden by a specific fieldOperator().

References Digikam::SearchXmlReader::m_defaultFieldOperator.

Referenced by Digikam::SearchGroup::read().

◆ fieldName()

QString Digikam::SearchXmlCachingReader::fieldName ( ) const

◆ fieldOperator()

SearchXml::Operator Digikam::SearchXmlCachingReader::fieldOperator ( ) const

◆ fieldRelation()

◆ groupCaption()

QString Digikam::SearchXmlCachingReader::groupCaption ( ) const

References m_groupCaption.

◆ groupOperator()

◆ isFieldElement()

bool Digikam::SearchXmlReader::isFieldElement ( ) const
inherited

Returns if the current element is a field element (start or end element).

Referenced by Digikam::ItemQueryBuilder::buildGroup(), Digikam::SearchGroup::read(), and Digikam::SearchXmlReader::readNext().

◆ isGroupElement()

bool Digikam::SearchXmlReader::isGroupElement ( ) const
inherited

Returns if the current element is a group element (start or end element).

Referenced by Digikam::ItemQueryBuilder::buildGroup(), Digikam::ItemQueryBuilder::buildQueryFromXml(), Digikam::SearchGroup::read(), and Digikam::SearchXmlReader::readNext().

◆ readNext()

◆ readOperator()

SearchXml::Operator Digikam::SearchXmlReader::readOperator ( const QString &  attributeName,
SearchXml::Operator  defaultOperator 
) const
protectedinherited

◆ readRelation()

◆ readToEndOfElement()

void Digikam::SearchXmlReader::readToEndOfElement ( )
inherited

General helper method: Reads XML until the end element of the current start element in reached.

Referenced by Digikam::ItemQueryBuilder::buildField(), Digikam::SearchGroup::read(), and Digikam::SearchFieldCheckBox::read().

◆ readToFirstField()

void Digikam::SearchXmlReader::readToFirstField ( )
inherited

◆ readToStartOfElement()

bool Digikam::SearchXmlReader::readToStartOfElement ( const QString &  name)
inherited

General helper method: Reads XML a start element with the given name is found. The method goes to the next start element, and from there down the hierarchy, but not further up in the hierarchy. Returns false if the element is not found.

◆ value()

◆ valueToDateTime()

QDateTime Digikam::SearchXmlCachingReader::valueToDateTime ( )

◆ valueToDateTimeList()

QList< QDateTime > Digikam::SearchXmlCachingReader::valueToDateTimeList ( )

◆ valueToDouble()

◆ valueToDoubleList()

◆ valueToDoubleOrDoubleList()

QList< double > Digikam::SearchXmlCachingReader::valueToDoubleOrDoubleList ( )

◆ valueToInt()

◆ valueToIntList()

◆ valueToIntOrIntList()

◆ valueToLongLong()

qlonglong Digikam::SearchXmlCachingReader::valueToLongLong ( )

◆ valueToLongLongList()

QList< qlonglong > Digikam::SearchXmlCachingReader::valueToLongLongList ( )

◆ valueToStringList()

◆ valueToStringOrStringList()

QList< QString > Digikam::SearchXmlCachingReader::valueToStringOrStringList ( )

Member Data Documentation

◆ m_defaultFieldOperator

◆ m_fieldName

QString Digikam::SearchXmlCachingReader::m_fieldName
protected

Referenced by fieldName(), and readNext().

◆ m_fieldOperator

SearchXml::Operator Digikam::SearchXmlCachingReader::m_fieldOperator
protected

Referenced by fieldOperator(), and readNext().

◆ m_fieldRelation

SearchXml::Relation Digikam::SearchXmlCachingReader::m_fieldRelation
protected

Referenced by fieldRelation(), and readNext().

◆ m_groupCaption

QString Digikam::SearchXmlCachingReader::m_groupCaption
protected

Referenced by groupCaption(), and readNext().

◆ m_groupOperator

SearchXml::Operator Digikam::SearchXmlCachingReader::m_groupOperator
protected

Referenced by groupOperator(), and readNext().

◆ m_readValue

◆ m_value


The documentation for this class was generated from the following files: