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

Public Member Functions

void finish ()
 
void finishField ()
 
void finishGroup ()
 
 KeywordSearchWriter ()
 
void setDefaultFieldOperator (SearchXml::Operator op)
 
void setFieldOperator (SearchXml::Operator op)
 
void setGroupCaption (const QString &caption)
 
void setGroupOperator (SearchXml::Operator op)
 
void writeField (const QString &name, SearchXml::Relation relation)
 
void writeGroup ()
 
void writeValue (const QDateTime &dateTime)
 
void writeValue (const QList< double > &valueList, int precision=8)
 
void writeValue (const QList< float > &valueList, int precision=6)
 
void writeValue (const QList< int > &valueList)
 
void writeValue (const QList< QDateTime > &valueList)
 
void writeValue (const QList< qlonglong > &valueList)
 
void writeValue (const QString &value)
 
void writeValue (const QStringList &valueList)
 
void writeValue (double value, int precision=8)
 
void writeValue (float value, int precision=6)
 
void writeValue (int value)
 
void writeValue (qlonglong value)
 
QString xml () const
 
QString xml (const QStringList &keywordList)
 

Static Public Member Functions

static QString keywordSearch (const QString &keyword)
 

Protected Member Functions

void writeOperator (const QString &, SearchXml::Operator)
 
void writeRelation (const QString &, SearchXml::Relation)
 

Protected Attributes

QString m_xml
 

Constructor & Destructor Documentation

◆ KeywordSearchWriter()

Digikam::KeywordSearchWriter::KeywordSearchWriter ( )
explicit

Member Function Documentation

◆ finish()

◆ finishField()

◆ finishGroup()

void Digikam::SearchXmlWriter::finishGroup ( )
inherited

Finish the current group. You cannot add anymore fields after calling this. Note that you will want to call this before writing another group if you want the group on the same level. You can as well add nested groups and call this to close the group afterwards.

Referenced by Digikam::ItemQueryBuilder::convertFromUrlToXml(), Digikam::SearchModificationHelper::createFuzzySearchFromDropped(), Digikam::SearchModificationHelper::createFuzzySearchFromImage(), Digikam::SearchModificationHelper::createFuzzySearchFromSketch(), Digikam::SearchXmlWriter::keywordSearch(), Digikam::SearchModificationHelper::slotCreateTimeLineSearch(), Digikam::ItemLister::tagSearchXml(), Digikam::SearchGroup::write(), and xml().

◆ keywordSearch()

QString Digikam::SearchXmlWriter::keywordSearch ( const QString &  keyword)
staticinherited

◆ setDefaultFieldOperator()

void Digikam::SearchXmlWriter::setDefaultFieldOperator ( SearchXml::Operator  op)
inherited

Sets the default operator for fields in this group "(field1 AND field2 AND ... fieldn)". The default operator can in each field be overridden. Default value is AND.

References Digikam::SearchXml::And, and Digikam::SearchXmlWriter::writeOperator().

Referenced by Digikam::ItemLister::tagSearchXml(), and Digikam::SearchGroup::write().

◆ setFieldOperator()

void Digikam::SearchXmlWriter::setFieldOperator ( SearchXml::Operator  op)
inherited

Adds an optional operator overriding the default field operator of the group.

References Digikam::SearchXmlWriter::writeOperator().

◆ setGroupCaption()

void Digikam::SearchXmlWriter::setGroupCaption ( const QString &  caption)
inherited

Sets an optional caption.

◆ setGroupOperator()

void Digikam::SearchXmlWriter::setGroupOperator ( SearchXml::Operator  op)
inherited

Sets the operator applied to the group as a whole "OR (field1 ... fieldn)". Default value is OR.

References Digikam::SearchXml::Or, and Digikam::SearchXmlWriter::writeOperator().

Referenced by Digikam::ItemQueryBuilder::convertFromUrlToXml(), and Digikam::SearchGroup::write().

◆ writeField()

◆ writeGroup()

◆ writeOperator()

◆ writeRelation()

◆ writeValue() [1/12]

void Digikam::SearchXmlWriter::writeValue ( const QDateTime &  dateTime)
inherited

◆ writeValue() [2/12]

void Digikam::SearchXmlWriter::writeValue ( const QList< double > &  valueList,
int  precision = 8 
)
inherited

◆ writeValue() [3/12]

void Digikam::SearchXmlWriter::writeValue ( const QList< float > &  valueList,
int  precision = 6 
)
inherited

◆ writeValue() [4/12]

void Digikam::SearchXmlWriter::writeValue ( const QList< int > &  valueList)
inherited

◆ writeValue() [5/12]

void Digikam::SearchXmlWriter::writeValue ( const QList< QDateTime > &  valueList)
inherited

◆ writeValue() [6/12]

void Digikam::SearchXmlWriter::writeValue ( const QList< qlonglong > &  valueList)
inherited

◆ writeValue() [7/12]

◆ writeValue() [8/12]

void Digikam::SearchXmlWriter::writeValue ( const QStringList &  valueList)
inherited

◆ writeValue() [9/12]

void Digikam::SearchXmlWriter::writeValue ( double  value,
int  precision = 8 
)
inherited

References value.

◆ writeValue() [10/12]

void Digikam::SearchXmlWriter::writeValue ( float  value,
int  precision = 6 
)
inherited

References value.

◆ writeValue() [11/12]

void Digikam::SearchXmlWriter::writeValue ( int  value)
inherited

References value.

◆ writeValue() [12/12]

void Digikam::SearchXmlWriter::writeValue ( qlonglong  value)
inherited

References value.

◆ xml() [1/2]

◆ xml() [2/2]

Member Data Documentation

◆ m_xml

QString Digikam::SearchXmlWriter::m_xml
protectedinherited

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