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

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)
 
 SearchXmlReader (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
 

Constructor & Destructor Documentation

◆ SearchXmlReader()

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

Member Function Documentation

◆ defaultFieldOperator()

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

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

References m_defaultFieldOperator.

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

◆ fieldName()

QString Digikam::SearchXmlReader::fieldName ( ) const

◆ fieldOperator()

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

Returns the field attributes. Only valid if the current element is a field. fieldOperator returns the default operator if the field has not specified any.

References m_defaultFieldOperator, and readOperator().

Referenced by Digikam::SearchXmlCachingReader::readNext().

◆ fieldRelation()

SearchXml::Relation Digikam::SearchXmlReader::fieldRelation ( ) const

◆ groupCaption()

QString Digikam::SearchXmlReader::groupCaption ( ) const

Returns the (optional) group caption. Only valid if the current element is a group.

Referenced by Digikam::SearchXmlCachingReader::readNext().

◆ groupOperator()

SearchXml::Operator Digikam::SearchXmlReader::groupOperator ( ) const

Returns the group operator. Only valid if the current element is a group.

References readOperator(), and Digikam::SearchXml::standardGroupOperator().

Referenced by Digikam::SearchXmlCachingReader::readNext().

◆ isFieldElement()

bool Digikam::SearchXmlReader::isFieldElement ( ) const

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

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

◆ isGroupElement()

bool Digikam::SearchXmlReader::isGroupElement ( ) const

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 readNext().

◆ readNext()

◆ readOperator()

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

◆ readRelation()

◆ readToEndOfElement()

void Digikam::SearchXmlReader::readToEndOfElement ( )

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 ( )

General helper method: Reads XML until the first field of the next or first found group is reached.

References Digikam::SearchXml::Field, Digikam::SearchXml::Group, and readNext().

Referenced by Digikam::FindDuplicatesAlbumItem::calculateInfos(), Digikam::FindDuplicatesAlbumItem::duplicatedItems(), and Digikam::ItemLister::listHaarSearch().

◆ readToStartOfElement()

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

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()

QString Digikam::SearchXmlReader::value ( )

Returns the field values. Only valid if the current element is a field. This reads to the end element of the field, and converts the found text/elements to the desired output.

Referenced by Digikam::ItemLister::listHaarSearch(), and Digikam::SearchXmlCachingReader::value().

◆ valueToDateTime()

QDateTime Digikam::SearchXmlReader::valueToDateTime ( )

◆ valueToDateTimeList()

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

◆ valueToDouble()

double Digikam::SearchXmlReader::valueToDouble ( )

◆ valueToDoubleList()

QList< double > Digikam::SearchXmlReader::valueToDoubleList ( )

◆ valueToDoubleOrDoubleList()

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

◆ valueToInt()

int Digikam::SearchXmlReader::valueToInt ( )

◆ valueToIntList()

QList< int > Digikam::SearchXmlReader::valueToIntList ( )

◆ valueToIntOrIntList()

QList< int > Digikam::SearchXmlReader::valueToIntOrIntList ( )

◆ valueToLongLong()

qlonglong Digikam::SearchXmlReader::valueToLongLong ( )

◆ valueToLongLongList()

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

◆ valueToStringList()

QStringList Digikam::SearchXmlReader::valueToStringList ( )

◆ valueToStringOrStringList()

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

Member Data Documentation

◆ m_defaultFieldOperator

SearchXml::Operator Digikam::SearchXmlReader::m_defaultFieldOperator
protected

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