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

Nepomuk

  • nepomuk
  • query
filequery.h
Go to the documentation of this file.
1/*
2 This file is part of the Nepomuk KDE project.
3 Copyright (C) 2009-2010 Sebastian Trueg <trueg@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18 */
19
20#ifndef _NEPOMUK_QUERY_FILE_QUERY_H_
21#define _NEPOMUK_QUERY_FILE_QUERY_H_
22
23#include "query.h"
24#include "nepomukquery_export.h"
25
26namespace Nepomuk {
27 namespace Query {
44 class NEPOMUKQUERY_EXPORT FileQuery : public Query
45 {
46 public:
50 FileQuery();
51
57 explicit FileQuery( const Term& term );
58
62 FileQuery( const Query& query );
63
67 ~FileQuery();
68
72 FileQuery& operator=( const Query& );
73
82 void addIncludeFolder( const KUrl& folder );
83
95 void addIncludeFolder( const KUrl& folder, bool recursive );
96
104 void setIncludeFolders( const KUrl::List& folders );
105
114 void setIncludeFolders( const QHash<KUrl, bool>& folders );
115
122 KUrl::List includeFolders() const;
123
132 QHash<KUrl, bool> allIncludeFolders() const;
133
142 void addExcludeFolder( const KUrl& folder );
143
151 void setExcludeFolders( const KUrl::List& folders );
152
159 KUrl::List excludeFolders() const;
160
167 enum FileModeFlags {
168 QueryFiles = 0x1,
169 QueryFolders = 0x2,
170 QueryFilesAndFolders = QueryFiles|QueryFolders
171 };
172 Q_DECLARE_FLAGS( FileMode, FileModeFlags )
173
174
183 void setFileMode( FileMode mode );
184
190 FileMode fileMode() const;
191 };
192 }
193}
194
195Q_DECLARE_OPERATORS_FOR_FLAGS( Nepomuk::Query::FileQuery::FileMode )
196
197#endif
Nepomuk::Query::FileQuery
A Nepomuk desktop query specialized for file searches.
Definition: filequery.h:45
Nepomuk::Query::FileQuery::setIncludeFolders
void setIncludeFolders(const KUrl::List &folders)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Nepomuk::Query::FileQuery::setIncludeFolders
void setIncludeFolders(const QHash< KUrl, bool > &folders)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Nepomuk::Query::FileQuery::FileQuery
FileQuery(const Query &query)
Copy constructor.
Nepomuk::Query::FileQuery::~FileQuery
~FileQuery()
Destructor.
Nepomuk::Query::FileQuery::allIncludeFolders
QHash< KUrl, bool > allIncludeFolders() const
The hash of include folders set via addIncludeFolder() and setIncludeFolders() including their recurs...
Nepomuk::Query::FileQuery::includeFolders
KUrl::List includeFolders() const
The list of include folders set via addIncludeFolder() and setIncludeFolders().
Nepomuk::Query::FileQuery::addIncludeFolder
void addIncludeFolder(const KUrl &folder)
Add a folder to include in the search.
Nepomuk::Query::FileQuery::addIncludeFolder
void addIncludeFolder(const KUrl &folder, bool recursive)
Add a folder to include in the search path.
Nepomuk::Query::FileQuery::FileQuery
FileQuery(const Term &term)
Create a file query with root term term.
Nepomuk::Query::FileQuery::addExcludeFolder
void addExcludeFolder(const KUrl &folder)
Add a folder to exclude from the search.
Nepomuk::Query::FileQuery::excludeFolders
KUrl::List excludeFolders() const
The list of exclude folders set via addExcludeFolder() and setExcludeFolders().
Nepomuk::Query::FileQuery::FileModeFlags
FileModeFlags
An enumeration used in setFileMode() to state wether the query should return files and folders or onl...
Definition: filequery.h:167
Nepomuk::Query::FileQuery::operator=
FileQuery & operator=(const Query &)
Assignment operator.
Nepomuk::Query::FileQuery::setExcludeFolders
void setExcludeFolders(const KUrl::List &folders)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Nepomuk::Query::FileQuery::FileQuery
FileQuery()
Create an empty invalid file query object.
Nepomuk::Query::Query
A Nepomuk desktop query.
Definition: query.h:77
Nepomuk::Query::Term
The base class for all term types.
Definition: term.h:65
Nepomuk
nepomukquery_export.h
query.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • 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
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