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

Nepomuk

comparisonterm.h

Go to the documentation of this file.
00001 /*
00002    This file is part of the Nepomuk KDE project.
00003    Copyright (C) 2009-2010 Sebastian Trueg <trueg@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) version 3, or any
00009    later version accepted by the membership of KDE e.V. (or its
00010    successor approved by the membership of KDE e.V.), which shall
00011    act as a proxy defined in Section 6 of version 3 of the license.
00012 
00013    This library is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016    Lesser General Public License for more details.
00017 
00018    You should have received a copy of the GNU Lesser General Public
00019    License along with this library.  If not, see <http://www.gnu.org/licenses/>.
00020 */
00021 
00022 #ifndef _NEPOMUK_QUERY_COMPARISON_TERM_H_
00023 #define _NEPOMUK_QUERY_COMPARISON_TERM_H_
00024 
00025 #include "simpleterm.h"
00026 
00027 #include "nepomukquery_export.h"
00028 
00029 namespace Nepomuk {
00030     namespace Types {
00031         class Property;
00032     }
00033 
00034     namespace Query {
00070         class NEPOMUKQUERY_EXPORT ComparisonTerm : public SimpleTerm
00071         {
00072         public:
00076             enum Comparator {
00081                 Contains,
00082 
00089                 Regexp,
00090 
00094                 Equal,
00095 
00099                 Greater,
00100 
00104                 Smaller,
00105 
00109                 GreaterOrEqual,
00110 
00114                 SmallerOrEqual
00115             };
00116 
00125             enum AggregateFunction {
00129                 NoAggregateFunction = 0,
00130 
00137                 Count,
00138 
00143                 DistinctCount,
00144 
00150                 Max,
00151 
00157                 Min,
00158 
00164                 Sum,
00165 
00170                 DistinctSum,
00171 
00177                 Average,
00178 
00183                 DistinctAverage
00184             };
00185 
00189             ComparisonTerm();
00190 
00194             ComparisonTerm( const ComparisonTerm& term );
00195 
00204             ComparisonTerm( const Types::Property& property, const Term& term, Comparator comparator = Contains );
00205 
00209             ~ComparisonTerm();
00210 
00214             ComparisonTerm& operator=( const ComparisonTerm& term );
00215 
00221             Comparator comparator() const;
00222 
00229             Types::Property property() const;
00230 
00234             void setComparator( Comparator );
00235 
00242             void setProperty( const Types::Property& );
00243 
00287             void setVariableName( const QString& name );
00288 
00297             QString variableName() const;
00298 
00309             void setAggregateFunction( AggregateFunction function );
00310 
00319             AggregateFunction aggregateFunction() const;
00320 
00341             void setSortWeight( int weight, Qt::SortOrder sortOrder = Qt::AscendingOrder );
00342 
00349             int sortWeight() const;
00350 
00356             Qt::SortOrder sortOrder() const;
00357 
00364             bool isInverted() const;
00365 
00394             void setInverted( bool invert );
00395 
00414             ComparisonTerm inverted() const;
00415         };
00416     }
00417 }
00418 
00419 #endif

Nepomuk

Skip menu "Nepomuk"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal