Nepomuk
standardqueries.h
Go to the documentation of this file.
00001 /* 00002 This file is part of the Nepomuk KDE project. 00003 Copyright (C) 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_STANDARD_QUERIES_H_ 00023 #define _NEPOMUK_STANDARD_QUERIES_H_ 00024 00025 #include "nepomukquery_export.h" 00026 #include "term.h" 00027 00028 class QDate; 00029 00030 namespace Nepomuk { 00031 namespace Query { 00032 class Query; 00033 00039 enum StandardQuery { 00046 LastModifiedFilesQuery, 00047 00055 MostImportantResourcesQuery, 00056 00061 NeverOpenedFilesQuery, 00062 00067 ResourcesForActivityQuery 00068 }; 00069 00070 00076 enum DateRangeFlag { 00080 ModificationDate = 0x1, 00081 00085 ContentDate = 0x2, 00086 00090 UsageDate = 0x4, 00091 00095 AllDates = ModificationDate|ContentDate|UsageDate 00096 }; 00097 Q_DECLARE_FLAGS( DateRangeFlags, DateRangeFlag ) 00098 00099 00123 NEPOMUKQUERY_EXPORT Query standardQuery( StandardQuery query, const Term& subterm = Term() ); 00124 00136 NEPOMUKQUERY_EXPORT Query dateRangeQuery( const QDate& start, const QDate& end, DateRangeFlags dateFlags = AllDates ); 00137 } 00138 } 00139 00140 Q_DECLARE_OPERATORS_FOR_FLAGS( Nepomuk::Query::DateRangeFlags ) 00141 00142 #endif
KDE 4.6 API Reference