| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Digikam::SearchXmlReader Class Reference
Inheritance diagram for Digikam::SearchXmlReader:

## Public Member Functions
| SearchXmlReader (const QString &xml)
SearchXml::Operator | defaultFieldOperator () const
| Returns the default field operator.
virtual QString | fieldName () const
virtual SearchXml::Operator | fieldOperator () const
| Returns the field attributes.
virtual SearchXml::Relation | fieldRelation () const
virtual QString | groupCaption () const
| Returns the (optional) group caption.
virtual SearchXml::Operator | groupOperator () const
| Returns the group operator.
bool | isFieldElement () const
| Returns if the current element is a field element (start or end element).
bool | isGroupElement () const
| Returns if the current element is a group element (start or end element).
virtual SearchXml::Element | readNext ()
| Continue parsing the document.
void | readToEndOfElement ()
| General helper method: Reads XML until the end element of the current start element in reached.
void | readToFirstField ()
| General helper method: Reads XML until the first field of the next or first found group is reached.
bool | readToStartOfElement (const QString &name)
| General helper method: Reads XML a start element with the given name is found.
virtual QString | value ()
| Returns the field values.
virtual QDateTime | valueToDateTime ()
virtual QList< QDateTime > | valueToDateTimeList ()
virtual double | valueToDouble ()
virtual QList< double > | valueToDoubleList ()
virtual QList< double > | valueToDoubleOrDoubleList ()
virtual int | valueToInt ()
virtual QList< int > | valueToIntList ()
virtual QList< int > | valueToIntOrIntList ()
virtual qlonglong | valueToLongLong ()
virtual QList< qlonglong > | valueToLongLongList ()
virtual QStringList | valueToStringList ()
virtual 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

## Member Function Documentation

## ◆ defaultFieldOperator()

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

This operator can be overridden by a specific fieldOperator().

## ◆ fieldOperator()

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

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

Reimplemented in Digikam::SearchXmlCachingReader.

## ◆ groupCaption()

QString Digikam::SearchXmlReader::groupCaption | ( |  | ) | const
| virtual

Only valid if the current element is a group.

Reimplemented in Digikam::SearchXmlCachingReader.

## ◆ groupOperator()

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

Only valid if the current element is a group.

Reimplemented in Digikam::SearchXmlCachingReader.

## ◆ readNext()

SearchXml::Element Digikam::SearchXmlReader::readNext | ( |  | ) |
| virtual

Returns the type of the current element.

Reimplemented in Digikam::SearchXmlCachingReader.

## ◆ readToStartOfElement()

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

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

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.

Reimplemented in Digikam::SearchXmlCachingReader.