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

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
 
bool isSimpleKeywordSearch ()
 Checks if the XML is a simple keyword search, compatible with keywords(). More...
 
QStringList keywords ()
 Returns the keywords from this search, merged in a list. More...
 
 KeywordSearchReader (const QString &xml)
 
SearchXml::Element readNext ()
 
void readToEndOfElement ()
 
void readToFirstField ()
 
bool readToStartOfElement (const QString &name)
 
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

◆ KeywordSearchReader()

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

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::SearchXmlReader::fieldName ( ) const
inherited

◆ fieldOperator()

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

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 Digikam::SearchXmlReader::m_defaultFieldOperator, and Digikam::SearchXmlReader::readOperator().

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

◆ fieldRelation()

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

◆ groupCaption()

QString Digikam::SearchXmlReader::groupCaption ( ) const
inherited

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
inherited

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

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

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

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

◆ isSimpleKeywordSearch()

bool Digikam::KeywordSearchReader::isSimpleKeywordSearch ( )

Checks if the XML is a simple keyword search, compatible with keywords().

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

◆ keywords()

QStringList Digikam::KeywordSearchReader::keywords ( )

Returns the keywords from this search, merged in a list.

References Digikam::SearchXml::Group, 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()

QString Digikam::SearchXmlReader::value ( )
inherited

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

◆ valueToDateTimeList()

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

◆ valueToDouble()

double Digikam::SearchXmlReader::valueToDouble ( )
inherited

◆ valueToDoubleList()

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

◆ valueToDoubleOrDoubleList()

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

◆ valueToInt()

int Digikam::SearchXmlReader::valueToInt ( )
inherited

◆ valueToIntList()

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

◆ valueToIntOrIntList()

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

◆ valueToLongLong()

qlonglong Digikam::SearchXmlReader::valueToLongLong ( )
inherited

◆ valueToLongLongList()

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

◆ valueToStringList()

QStringList Digikam::SearchXmlReader::valueToStringList ( )
inherited

◆ valueToStringOrStringList()

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

Member Data Documentation

◆ m_defaultFieldOperator


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