digiKam
|
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 |
|
explicit |
References Digikam::SearchXml::And, m_defaultFieldOperator, and readNext().
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().
QString Digikam::SearchXmlReader::fieldName | ( | ) | const |
Referenced by Digikam::ItemLister::listHaarSearch(), and Digikam::SearchXmlCachingReader::readNext().
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().
SearchXml::Relation Digikam::SearchXmlReader::fieldRelation | ( | ) | const |
References readRelation(), and Digikam::SearchXml::standardFieldRelation().
Referenced by Digikam::SearchXmlCachingReader::readNext().
QString Digikam::SearchXmlReader::groupCaption | ( | ) | const |
Returns the (optional) group caption. Only valid if the current element is a group.
Referenced by Digikam::SearchXmlCachingReader::readNext().
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().
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().
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().
SearchXml::Element Digikam::SearchXmlReader::readNext | ( | ) |
Continue parsing the document. Returns the type of the current element.
References Digikam::SearchXml::End, Digikam::SearchXml::Field, Digikam::SearchXml::FieldEnd, Digikam::SearchXml::Group, Digikam::SearchXml::GroupEnd, isFieldElement(), isGroupElement(), m_defaultFieldOperator, readOperator(), Digikam::SearchXml::Search, and Digikam::SearchXml::standardFieldOperator().
Referenced by Digikam::KeywordSearchReader::isSimpleKeywordSearch(), Digikam::KeywordSearchReader::keywords(), Digikam::ItemLister::listHaarSearch(), Digikam::SearchXmlCachingReader::readNext(), readToFirstField(), SearchXmlReader(), valueToDoubleOrDoubleList(), valueToIntOrIntList(), and valueToStringOrStringList().
|
protected |
References Digikam::SearchXml::And, Digikam::SearchXml::AndNot, Digikam::SearchXml::Or, and Digikam::SearchXml::OrNot.
Referenced by fieldOperator(), groupOperator(), and readNext().
|
protected |
References Digikam::SearchXml::AllOf, Digikam::SearchXml::Equal, Digikam::SearchXml::GreaterThan, Digikam::SearchXml::GreaterThanOrEqual, Digikam::SearchXml::Inside, Digikam::SearchXml::Interval, Digikam::SearchXml::IntervalOpen, Digikam::SearchXml::InTree, Digikam::SearchXml::LessThan, Digikam::SearchXml::LessThanOrEqual, Digikam::SearchXml::Like, Digikam::SearchXml::Near, Digikam::SearchXml::NotInTree, Digikam::SearchXml::NotLike, Digikam::SearchXml::OneOf, and Digikam::SearchXml::Unequal.
Referenced by fieldRelation().
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().
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().
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.
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().
QDateTime Digikam::SearchXmlReader::valueToDateTime | ( | ) |
Referenced by Digikam::SearchXmlCachingReader::valueToDateTime().
QList< QDateTime > Digikam::SearchXmlReader::valueToDateTimeList | ( | ) |
double Digikam::SearchXmlReader::valueToDouble | ( | ) |
Referenced by Digikam::SearchXmlCachingReader::valueToDouble().
QList< double > Digikam::SearchXmlReader::valueToDoubleList | ( | ) |
QList< double > Digikam::SearchXmlReader::valueToDoubleOrDoubleList | ( | ) |
References readNext().
Referenced by Digikam::SearchXmlCachingReader::valueToDoubleOrDoubleList().
int Digikam::SearchXmlReader::valueToInt | ( | ) |
Referenced by Digikam::SearchXmlCachingReader::valueToInt().
QList< int > Digikam::SearchXmlReader::valueToIntList | ( | ) |
Referenced by Digikam::ItemLister::listHaarSearch().
QList< int > Digikam::SearchXmlReader::valueToIntOrIntList | ( | ) |
References readNext().
Referenced by Digikam::SearchXmlCachingReader::valueToIntOrIntList().
qlonglong Digikam::SearchXmlReader::valueToLongLong | ( | ) |
QList< qlonglong > Digikam::SearchXmlReader::valueToLongLongList | ( | ) |
QStringList Digikam::SearchXmlReader::valueToStringList | ( | ) |
Referenced by Digikam::SearchXmlCachingReader::valueToStringList().
QList< QString > Digikam::SearchXmlReader::valueToStringOrStringList | ( | ) |
References readNext().
Referenced by Digikam::SearchXmlCachingReader::valueToStringOrStringList().
|
protected |
Referenced by defaultFieldOperator(), fieldOperator(), readNext(), and SearchXmlReader().