• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kiten/lib

  • sources
  • kde-4.14
  • kdeedu
  • kiten
  • lib
dictquery.cpp
Go to the documentation of this file.
1 /*****************************************************************************
2  * This file is part of Kiten, a KDE Japanese Reference Tool *
3  * Copyright (C) 2006 Joseph Kerian <jkerian@gmail.com> *
4  * Copyright (C) 2011 Daniel E. Moctezuma <democtezuma@gmail.com> *
5  * *
6  * This library is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU Library General Public *
8  * License as published by the Free Software Foundation; either *
9  * version 2 of the License, or (at your option) any later version. *
10  * *
11  * This library is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * Library General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Library General Public License *
17  * along with this library; see the file COPYING.LIB. If not, write to *
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
19  * Boston, MA 02110-1301, USA. *
20  *****************************************************************************/
21 
22 /*
23 TODO: Add features to limit the number of hits on a per-search basis.
24 
25  Add a mechanism (either through subclassing, or directly) for use
26  for marking "requested" fields for the dcop system.
27 */
28 
29 #include "dictquery.h"
30 
31 #include <KDebug>
32 
33 #include <QString>
34 #include <QStringList>
35 
36 class DictQuery::Private
37 {
38  public:
39  Private() : matchType( DictQuery::Exact )
40  , matchWordType( DictQuery::Any )
41  , filterType( DictQuery::NoFilter ) { }
42 
44  QString meaning;
46  QString pronunciation;
48  QString word;
50  QHash<QString,QString> extendedAttributes;
53  QStringList entryOrder;
55  QStringList targetDictionaries;
57  MatchType matchType;
59  MatchWordType matchWordType;
61  FilterType filterType;
62 
64  static const QString pronunciationMarker;
66  static const QString meaningMarker;
68  static const QString wordMarker;
69 };
70 
71 const QString DictQuery::Private::pronunciationMarker( "__@\\p" );
72 const QString DictQuery::Private::meaningMarker( "__@\\m" );
73 const QString DictQuery::Private::wordMarker( "_@\\w" );
74 
75 /*****************************************************************************
76 * Constructors, Destructors, Initilizers, and
77 * Global Status Indicators.
78 *****************************************************************************/
79 DictQuery::DictQuery()
80 : d( new Private )
81 { }
82 
83 DictQuery::DictQuery( const QString& str )
84 : d( new Private )
85 {
86  this->operator=( (QString)str );
87 }
88 
89 DictQuery::DictQuery( const DictQuery& orig )
90 : d( new Private )
91 {
92  this->operator=( (DictQuery&)orig );
93 }
94 
95 DictQuery *DictQuery::clone() const
96 {
97  return new DictQuery( *this );
98 }
99 
100 DictQuery::operator QString() const
101 {
102  //kDebug() << "DictQuery toString operator called!";
103  return toString();
104 }
105 
106 DictQuery::~DictQuery()
107 {
108  delete d;
109 }
110 
111 bool DictQuery::isEmpty() const
112 {
113  // We're only empty if the two strings are empty too
114  return d->extendedAttributes.isEmpty() && d->meaning.isEmpty()
115  && d->pronunciation.isEmpty() && d->word.isEmpty();
116 }
117 
118 void DictQuery::clear()
119 {
120  d->extendedAttributes.clear();
121  d->meaning = "";
122  d->pronunciation = "";
123  d->word = "";
124  d->entryOrder.clear();
125 }
126 
127 /*****************************************************************************
128 * Methods that involve multiple instances of the class
129 * (comparison, copy etc)
130 *****************************************************************************/
131 DictQuery &DictQuery::operator=( const DictQuery &old )
132 {
133  if ( &old == this )
134  {
135  return *this;
136  }
137 
138  clear();
139  d->matchType = old.d->matchType;
140  d->matchWordType = old.d->matchWordType;
141  d->filterType = old.d->filterType;
142  d->extendedAttributes = old.d->extendedAttributes;
143  d->meaning = old.d->meaning;
144  d->pronunciation = old.d->pronunciation;
145  d->word = old.d->word;
146  d->entryOrder = old.d->entryOrder;
147  return *this;
148 }
149 
150 DictQuery &DictQuery::operator+=( const DictQuery &old )
151 {
152  foreach( const QString &item, old.d->entryOrder )
153  {
154  if( item == d->meaningMarker )
155  {
156  if( d->entryOrder.removeAll( d->meaningMarker ) > 0 )
157  {
158  setMeaning( getMeaning() + mainDelimiter + old.getMeaning() );
159  }
160  else
161  {
162  setMeaning( old.getMeaning() );
163  }
164  }
165  else if( item == d->pronunciationMarker )
166  {
167  if( d->entryOrder.removeAll( d->pronunciationMarker ) > 0 )
168  {
169  setPronunciation( getPronunciation() + mainDelimiter + old.getPronunciation() );
170  }
171  else
172  {
173  setPronunciation( old.getPronunciation() );
174  }
175  }
176  else if( item == d->wordMarker )
177  {
178  d->entryOrder.removeAll( d->wordMarker );
179  //Only one of these allowed
180  setWord( old.getWord() );
181  }
182  else
183  {
184  setProperty( item, old.getProperty( item ) );
185  }
186  }
187 
188  return *this;
189 }
190 
191 DictQuery operator+( const DictQuery &a, const DictQuery &b )
192 {
193  DictQuery val( a );
194  val += b;
195  return val;
196 }
197 
198 bool operator==( const DictQuery &a, const DictQuery &b )
199 {
200  if( ( a.d->pronunciation != b.d->pronunciation )
201  || ( a.d->meaning != b.d->meaning )
202  || ( a.d->word != b.d->word )
203  || ( a.d->entryOrder != b.d->entryOrder )
204  || ( a.d->extendedAttributes != b.d->extendedAttributes )
205  || ( a.d->matchType != b.d->matchType )
206  || ( a.d->matchWordType != b.d->matchWordType )
207  || ( a.d->filterType != b.d->filterType ) )
208  {
209  return false;
210  }
211 
212  return true;
213 }
214 
215 bool operator!=( const DictQuery &a, const DictQuery &b )
216 {
217  return ! ( a == b );
218 }
219 
220 bool operator<( const DictQuery &a, const DictQuery &b )
221 {
222  QHash<QString,QString>::const_iterator it = a.d->extendedAttributes.constBegin();
223  QHash<QString,QString>::const_iterator it_end = a.d->extendedAttributes.constEnd();
224  for( ; it != it_end; ++it )
225  {
226  QString B_version = b.d->extendedAttributes.value( it.key() );
227  if( a.d->extendedAttributes[ it.key() ] != B_version )
228  {
229  if( ! B_version.contains( "," ) && ! B_version.contains( "-" ) )
230  {
231  return false;
232  }
233  //TODO: check for multi-values or ranges in DictQuery operator<
234  }
235  }
236 
237  if( ! a.d->pronunciation.isEmpty() )
238  {
239  QStringList aList = a.d->pronunciation.split( DictQuery::mainDelimiter );
240  QStringList bList = b.d->pronunciation.split( DictQuery::mainDelimiter );
241  foreach( const QString &str, aList )
242  {
243  if( bList.contains( str ) == 0 )
244  {
245  return false;
246  }
247  }
248  }
249 
250  if( ! a.d->meaning.isEmpty() )
251  {
252  QStringList aList = a.d->meaning.split( DictQuery::mainDelimiter );
253  QStringList bList = b.d->meaning.split( DictQuery::mainDelimiter );
254  foreach( const QString &str, aList )
255  {
256  if( bList.contains( str ) == 0 )
257  {
258  return false;
259  }
260  }
261  }
262 
263  //Assume only one entry for word
264  if( ! a.d->word.isEmpty() )
265  {
266  if( a.d->word != b.d->word )
267  {
268  return false;
269  }
270  }
271 
272  return true;
273 }
274 
275 /*****************************************************************************
276 * Methods to extract from QStrings and recreate QStrings
277 *
278 *****************************************************************************/
279 const QString DictQuery::toString() const
280 {
281  if( isEmpty() )
282  {
283  return QString();
284  }
285 
286  QString reply;
287  foreach( const QString &it, d->entryOrder )
288  {
289  if( it == d->pronunciationMarker )
290  {
291  reply += d->pronunciation+mainDelimiter;
292  }
293  else if( it == d->meaningMarker )
294  {
295  reply += d->meaning+mainDelimiter;
296  }
297  else if( it == d->wordMarker )
298  {
299  reply += d->word+mainDelimiter;
300  }
301  else
302  {
303  reply += it + propertySeperator + d->extendedAttributes.value( it )
304  + mainDelimiter;
305  }
306  }
307  reply.truncate( reply.length() - mainDelimiter.length() );
308 
309  return reply;
310 }
311 
312 DictQuery &DictQuery::operator=( const QString &str )
313 {
314  QStringList parts = str.split( mainDelimiter );
315  DictQuery result;
316  if( str.length() > 0 )
317  {
318  foreach( const QString &it, parts )
319  {
320  if( it.contains( propertySeperator ) )
321  {
322  QStringList prop = it.split( propertySeperator );
323  if( prop.count() != 2 )
324  {
325  break;
326  }
327  result.setProperty( prop[ 0 ], prop[ 1 ] );
328  //replace or throw an error with duplicates?
329  }
330  else
331  {
332  switch( stringTypeCheck( it ) )
333  {
334  case DictQuery::Latin:
335  if( result.d->entryOrder.removeAll( d->meaningMarker ) > 0 )
336  {
337  result.setMeaning( result.getMeaning() + mainDelimiter + it );
338  }
339  else
340  {
341  result.setMeaning( it );
342  }
343  break;
344 
345  case DictQuery::Kana:
346  if( result.d->entryOrder.removeAll( d->pronunciationMarker ) > 0 )
347  {
348  result.setPronunciation( result.getPronunciation() + mainDelimiter + it );
349  }
350  else
351  {
352  result.setPronunciation( it );
353  }
354  break;
355 
356  case DictQuery::Kanji:
357  result.d->entryOrder.removeAll( d->wordMarker );
358  result.setWord( it ); //Only one of these allowed
359  break;
360 
361  case DictQuery::Mixed:
362  kWarning() << "DictQuery: String parsing error - mixed type";
363  break;
364 
365  case DictQuery::ParseError:
366  kWarning() << "DictQuery: String parsing error";
367  break;
368  }
369  }
370  }
371  }
372  //kDebug() << "Query: ("<<result.getWord() << ") ["<<result.getPronunciation()<<"] :"<<
373  // result.getMeaning()<<endl;
374  this->operator=( result );
375  return *this;
376 }
377 
382 DictQuery::StringTypeEnum DictQuery::stringTypeCheck( const QString &in )
383 {
384  StringTypeEnum firstType;
385  //Split into individual characters
386  if( in.size() <= 0 )
387  {
388  return DictQuery::ParseError;
389  }
390 
391  firstType = charTypeCheck( in.at( 0 ) );
392  for( int i = 1; i < in.size(); i++ )
393  {
394  StringTypeEnum newType = charTypeCheck( in.at( i ) );
395  if( newType != firstType )
396  {
397  if( firstType == Kana && newType == Kanji )
398  {
399  firstType = Kanji;
400  }
401  else if( firstType == Kanji && newType == Kana )
402  ; //That's okay
403  else
404  {
405  return DictQuery::Mixed;
406  }
407  }
408  }
409 
410  return firstType;
411 }
412 
418 DictQuery::StringTypeEnum DictQuery::charTypeCheck( const QChar &ch )
419 {
420  if( ch.toLatin1() )
421  {
422  return Latin;
423  }
424  //The unicode character boundaries are:
425  // 3040 - 309F Hiragana
426  // 30A0 - 30FF Katakana
427  // 31F0 - 31FF Katakana phonetic expressions (wtf?)
428  if( 0x3040 <= ch.unicode() && ch.unicode() <= 0x30FF /*|| ch.unicode() & 0x31F0*/ )
429  {
430  return Kana;
431  }
432 
433  return Kanji;
434 }
435 
436 /*****************************************************************************
437 * An array of Property List accessors and mutators
438 *
439 *****************************************************************************/
440 QString DictQuery::getProperty( const QString &key ) const
441 {
442  return ( *this )[ key ];
443 }
444 
445 const QList<QString> DictQuery::listPropertyKeys() const
446 {
447  return d->extendedAttributes.keys();
448 }
449 
450 const QString DictQuery::operator[] ( const QString &key ) const
451 {
452  return d->extendedAttributes.value( key );
453 }
454 
455 QString DictQuery::operator[] ( const QString &key )
456 {
457  return d->extendedAttributes[ key ];
458 }
459 
460 bool DictQuery::hasProperty( const QString &key ) const
461 {
462  return d->entryOrder.contains( key ) > 0;
463 }
464 
465 //TODO: Add i18n handling and alternate versions of property names
466 //TODO: further break down the barrier between different types
467 bool DictQuery::setProperty( const QString& key, const QString& value )
468 {
469  if( key == d->pronunciationMarker || key == d->meaningMarker
470  || key.isEmpty() || value.isEmpty() )
471  {
472  return false;
473  }
474 
475  if ( ! d->extendedAttributes.contains( key ) )
476  {
477  d->entryOrder.append( key );
478  }
479 
480  d->extendedAttributes.insert( key, value );
481  return true;
482 }
483 
484 bool DictQuery::removeProperty( const QString &key )
485 {
486  if( d->extendedAttributes.contains( key ) )
487  {
488  return d->entryOrder.removeAll( key );
489  }
490  return false;
491 }
492 
493 QString DictQuery::takeProperty ( const QString & key )
494 {
495  d->entryOrder.removeAll( key );
496  return d->extendedAttributes.take( key );
497 }
498 
499 /*****************************************************************************
500 * Meaning and Pronunciation Accessors and Mutators
501 ****************************************************************************/
502 QString DictQuery::getMeaning() const
503 {
504  return d->meaning;
505 }
506 
507 bool DictQuery::setMeaning( const QString &newMeaning )
508 {
509  if ( newMeaning.isEmpty() )
510  {
511 #ifdef USING_QUERY_EXCEPTIONS
512  throw InvalidQueryException( newMeaning );
513 #else
514  return false;
515 #endif
516  }
517 
518  d->meaning = newMeaning;
519 
520  if( ! d->entryOrder.contains( d->meaningMarker ) )
521  {
522  d->entryOrder.append( d->meaningMarker );
523  }
524 
525  return true;
526 }
527 
528 QString DictQuery::getPronunciation() const
529 {
530  return d->pronunciation;
531 }
532 
533 bool DictQuery::setPronunciation( const QString &newPronunciation )
534 {
535  if( newPronunciation.isEmpty() )
536  {
537 #ifdef USING_QUERY_EXCEPTIONS
538  throw InvalidQueryException( newPro );
539 #else
540  return false;
541 #endif
542  }
543 
544  d->pronunciation = newPronunciation;
545 
546  if( ! d->entryOrder.contains( d->pronunciationMarker ) )
547  {
548  d->entryOrder.append( d->pronunciationMarker );
549  }
550 
551  return true;
552 }
553 
554 QString DictQuery::getWord() const
555 {
556  return d->word;
557 }
558 
559 bool DictQuery::setWord( const QString &newWord )
560 {
561  if( newWord.isEmpty() )
562  {
563 #ifdef USING_QUERY_EXCEPTIONS
564  throw InvalidQueryException( newWord );
565 #else
566  return false;
567 #endif
568  }
569 
570  d->word = newWord;
571 
572  if( ! d->entryOrder.contains( d->wordMarker ) )
573  {
574  d->entryOrder.append( d->wordMarker );
575  }
576 
577  return true;
578 }
579 
580 /*************************************************************
581  Handlers for getting and setting dictionary types
582  *************************************************************/
583 QStringList DictQuery::getDictionaries() const
584 {
585  return d->targetDictionaries;
586 }
587 
588 void DictQuery::setDictionaries( const QStringList &newDictionaries )
589 {
590  d->targetDictionaries = newDictionaries;
591 }
592 
593 /**************************************************************
594  Match Type Accessors and Mutators
595  ************************************************************/
596 DictQuery::FilterType DictQuery::getFilterType() const
597 {
598  return d->filterType;
599 }
600 
601 void DictQuery::setFilterType( FilterType newType )
602 {
603  d->filterType = newType;
604 }
605 
606 DictQuery::MatchType DictQuery::getMatchType() const
607 {
608  return d->matchType;
609 }
610 
611 void DictQuery::setMatchType( MatchType newType )
612 {
613  d->matchType = newType;
614 }
615 
616 DictQuery::MatchWordType DictQuery::getMatchWordType() const
617 {
618  return d->matchWordType;
619 }
620 
621 void DictQuery::setMatchWordType( MatchWordType newType )
622 {
623  d->matchWordType = newType;
624 }
625 
626 /**************************************************************
627 * Aliases to handle different forms of operator arguments
628 * Disabled at the moment
629 *************************************************************
630 bool operator==( const QString &other, const DictQuery &query ) {
631  DictQuery x(other); return x == query;
632 }
633 bool operator==( const DictQuery &query, const QString &other ) {
634  return other==query;
635 }
636 bool operator!=( const DictQuery &q1, const DictQuery &q2 ) {
637  return !(q1==q2);
638 }
639 bool operator!=( const QString &other, const DictQuery &query ) {
640  return !(other==query);
641 }
642 bool operator!=( const DictQuery &query, const QString &other ) {
643  return !(query==other);
644 }
645 inline bool operator<=( const DictQuery &a, const DictQuery &b) {
646  return (a<b || a==b);
647 }
648 bool operator>=( const DictQuery &a, const DictQuery &b) {
649  return (b>a || a==b);
650 }
651 bool operator>( const DictQuery &a, const DictQuery &b) {
652  return b < a;
653 }
654 DictQuery &operator+( const DictQuery &a, const QString &b) {
655  return (*(new DictQuery(a))) += b;
656 }
657 DictQuery &operator+( const QString &a, const DictQuery &b) {
658  return (*(new DictQuery(a))) += b;
659 }
660 DictQuery &DictQuery::operator+=(const QString &str) {
661  DictQuery x(str);
662  return operator+=(x);
663 }
664 #ifndef QT_NO_CAST_ASCII
665 DictQuery &DictQuery::operator=(const char *str) {
666  QString x(str);
667  return operator=(x);
668 }
669 DictQuery &DictQuery::operator+=(const char *str) {
670  DictQuery x(str);
671  return operator+=(x);
672 }
673 #endif
674 */
675 /**************************************************************
676 * Set our constants declared in the class
677 **************************************************************/
678 const QString DictQuery::mainDelimiter( " " );
679 const QString DictQuery::propertySeperator( ":" );
operator+
DictQuery operator+(const DictQuery &a, const DictQuery &b)
Definition: dictquery.cpp:191
DictQuery::Any
Definition: dictquery.h:307
operator==
bool operator==(const DictQuery &a, const DictQuery &b)
Definition: dictquery.cpp:198
DictQuery::ParseError
Definition: dictquery.h:351
DictQuery::setWord
bool setWord(const QString &newWord)
Mutator for the Word/Kanji field.
Definition: dictquery.cpp:559
QString::truncate
void truncate(int position)
QHash::key
const Key key(const T &value) const
DictQuery::isEmpty
bool isEmpty() const
Definition: dictquery.cpp:111
DictQuery::Kana
Definition: dictquery.h:348
QChar
QString::split
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
DictQuery::getPronunciation
QString getPronunciation() const
Accessor for the Pronunciation field (generally kana)
Definition: dictquery.cpp:528
DictQuery::setMatchType
void setMatchType(MatchType newType)
Set a match type.
Definition: dictquery.cpp:611
QString::size
int size() const
QStringList::contains
bool contains(const QString &str, Qt::CaseSensitivity cs) const
DictQuery::setMeaning
bool setMeaning(const QString &newMeaning)
Mutator for the Meaning field.
Definition: dictquery.cpp:507
DictQuery::MatchType
MatchType
This enum is used to define the type of matching this query is supposed to do.
Definition: dictquery.h:285
DictQuery::removeProperty
bool removeProperty(const QString &key)
Remove all instances of a property.
Definition: dictquery.cpp:484
DictQuery::getDictionaries
QStringList getDictionaries() const
Returns a list of the dictionaries that this particular query will target.
Definition: dictquery.cpp:583
DictQuery::MatchWordType
MatchWordType
This enum is used to define the type of matching this query is supposed to do.
Definition: dictquery.h:305
DictQuery::clone
DictQuery * clone() const
The clone method.
Definition: dictquery.cpp:95
DictQuery::Mixed
Definition: dictquery.h:350
DictQuery::clear
void clear()
Removes all text/entries from the DictQuery.
Definition: dictquery.cpp:118
DictQuery::operator=
DictQuery & operator=(const DictQuery &old)
The assignment copy operator.
Definition: dictquery.cpp:131
DictQuery::hasProperty
bool hasProperty(const QString &key) const
Verify if a given DictQuery object has a search parameter of a particular property.
Definition: dictquery.cpp:460
DictQuery::setFilterType
void setFilterType(FilterType newType)
Set whether or not the query should output results separated in common and uncommon sections...
Definition: dictquery.cpp:601
QList::count
int count(const T &value) const
DictQuery::charTypeCheck
static StringTypeEnum charTypeCheck(const QChar &ch)
This utility does the same thing for QChar as stringTypeCheck does for QString.
Definition: dictquery.cpp:418
QHash< QString, QString >
DictQuery::getMeaning
QString getMeaning() const
Accessor for the non-japanese meaning field.
Definition: dictquery.cpp:502
operator<
bool operator<(const DictQuery &a, const DictQuery &b)
Definition: dictquery.cpp:220
QString::isEmpty
bool isEmpty() const
DictQuery::getProperty
QString getProperty(const QString &key) const
Get a specific property by key (is the same as using operator[] const)
Definition: dictquery.cpp:440
DictQuery::DictQuery
DictQuery()
Normal constructor.
Definition: dictquery.cpp:79
DictQuery::getWord
QString getWord() const
Accessor for the Word/Kanji field (this is usually used for anything containing kanji).
Definition: dictquery.cpp:554
DictQuery::StringTypeEnum
StringTypeEnum
This enum is used as the return type for the two utility functions, stringTypeCheck and charTypeCheck...
Definition: dictquery.h:345
QString
QList< QString >
QChar::unicode
ushort unicode() const
QStringList
DictQuery::setMatchWordType
void setMatchWordType(MatchWordType newType)
Set a word type.
Definition: dictquery.cpp:621
QString::contains
bool contains(QChar ch, Qt::CaseSensitivity cs) const
DictQuery::Latin
Definition: dictquery.h:349
DictQuery::takeProperty
QString takeProperty(const QString &key)
Returns and removes the property.
Definition: dictquery.cpp:493
DictQuery::getMatchWordType
MatchWordType getMatchWordType() const
Get which word type is currently set on the DictQuery.
Definition: dictquery.cpp:616
QChar::toLatin1
char toLatin1() const
DictQuery::FilterType
FilterType
Definition: dictquery.h:325
DictQuery::toString
const QString toString() const
This returns a QString that represents the query.
Definition: dictquery.cpp:279
DictQuery::~DictQuery
~DictQuery()
Destructor.
Definition: dictquery.cpp:106
DictQuery::Kanji
Definition: dictquery.h:347
DictQuery::setPronunciation
bool setPronunciation(const QString &newPronunciation)
Mutator for the Pronunciation field.
Definition: dictquery.cpp:533
QString::at
const QChar at(int position) const
DictQuery::mainDelimiter
static const QString mainDelimiter
This is the main delimiter that the DictQuery uses when parsing strings.
Definition: dictquery.h:96
DictQuery
A class to allow users of libkiten to properly setup a database query.
Definition: dictquery.h:89
DictQuery::stringTypeCheck
static StringTypeEnum stringTypeCheck(const QString &in)
A simple utility routine to tell us what sort of string we have If the string contains only kanji...
Definition: dictquery.cpp:382
QString::length
int length() const
DictQuery::getMatchType
MatchType getMatchType() const
Get which match type is currently set on the DictQuery.
Definition: dictquery.cpp:606
DictQuery::setDictionaries
void setDictionaries(const QStringList &newDictionaries)
Set the list of dictionaries to search.
Definition: dictquery.cpp:588
DictQuery::operator+=
DictQuery & operator+=(const DictQuery &old)
This will append the properties and other elements of the added kanji onto the elements of the curren...
Definition: dictquery.cpp:150
dictquery.h
operator!=
bool operator!=(const DictQuery &a, const DictQuery &b)
Definition: dictquery.cpp:215
DictQuery::getFilterType
FilterType getFilterType() const
Get which filter is currently set on the DictQuery.
Definition: dictquery.cpp:596
DictQuery::propertySeperator
static const QString propertySeperator
This is the delimiter that DictQuery uses when parsing property strings of the form strokes:4...
Definition: dictquery.h:101
DictQuery::Exact
Definition: dictquery.h:287
DictQuery::NoFilter
Definition: dictquery.h:327
DictQuery::setProperty
bool setProperty(const QString &key, const QString &value)
Set a particular property...
Definition: dictquery.cpp:467
DictQuery::listPropertyKeys
const QList< QString > listPropertyKeys() const
Use this to get a list of all the property keys in the query.
Definition: dictquery.cpp:445
DictQuery::operator[]
const QString operator[](const QString &key) const
Returns a given extended attribute.
Definition: dictquery.cpp:450
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kiten/lib

Skip menu "kiten/lib"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal