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

Nepomuk-Core

  • Nepomuk2
  • Query
  • FileQuery
Public Types | Public Member Functions | List of all members
Nepomuk2::Query::FileQuery Class Reference

#include <Nepomuk2/Query/FileQuery>

Inheritance diagram for Nepomuk2::Query::FileQuery:
Inheritance graph
[legend]

Public Types

enum  FileModeFlags { QueryFiles = 0x1, QueryFolders = 0x2, QueryFilesAndFolders = QueryFiles|QueryFolders }
 
- Public Types inherited from Nepomuk2::Query::Query
enum  QueryFlag { NoQueryFlags = 0x0, NoResultRestrictions = 0x1, WithFullTextExcerpt = 0x2 }
 
enum  SparqlFlag { NoFlags = 0x0, CreateCountQuery = 0x1, HandleInverseProperties = 0x2, CreateAskQuery = 0x4 }
 

Public Member Functions

 FileQuery ()
 
 FileQuery (const Term &term)
 
 FileQuery (const Query &query)
 
 ~FileQuery ()
 
void addExcludeFolder (const KUrl &folder)
 
void addIncludeFolder (const KUrl &folder)
 
void addIncludeFolder (const KUrl &folder, bool recursive)
 
QHash< KUrl, bool > allIncludeFolders () const
 
KUrl::List excludeFolders () const
 
FileMode fileMode () const
 
KUrl::List includeFolders () const
 
FileQuery & operator= (const Query &)
 
void setExcludeFolders (const KUrl::List &folders)
 
void setFileMode (FileMode mode)
 
void setIncludeFolders (const KUrl::List &folders)
 
void setIncludeFolders (const QHash< KUrl, bool > &folders)
 
- Public Member Functions inherited from Nepomuk2::Query::Query
 Query ()
 
 Query (const Term &term)
 
 Query (const Query &)
 
 ~Query ()
 
void addRequestProperty (const RequestProperty &property)
 
bool fullTextScoringEnabled () const
 
Qt::SortOrder fullTextScoringSortOrder () const
 
bool isFileQuery () const
 
bool isValid () const
 
int limit () const
 
int offset () const
 
bool operator!= (const Query &query) const
 
Query & operator= (const Query &)
 
Query & operator= (const Term &term)
 
bool operator== (const Query &query) const
 
Query optimized () const
 
QueryFlags queryFlags () const
 
QList< RequestProperty > requestProperties () const
 
RequestPropertyMap requestPropertyMap () const
 
void setFullTextScoringEnabled (bool enabled)
 
void setFullTextScoringSortOrder (Qt::SortOrder order)
 
void setLimit (int)
 
void setOffset (int offset)
 
void setQueryFlags (QueryFlags flags)
 
void setRequestProperties (const QList< RequestProperty > &properties)
 
void setTerm (const Term &)
 
Term term () const
 
FileQuery toFileQuery () const
 
KUrl toSearchUrl (SparqlFlags flags=NoFlags) const
 
KUrl toSearchUrl (const QString &customTitle, SparqlFlags flags=NoFlags) const
 
QString toSparqlQuery (SparqlFlags flags=NoFlags) const
 
QString toString () const
 

Additional Inherited Members

- Static Public Member Functions inherited from Nepomuk2::Query::Query
static Query fromQueryUrl (const KUrl &url)
 
static Query fromString (const QString &queryString)
 
static QString sparqlFromQueryUrl (const KUrl &url)
 
static QString titleFromQueryUrl (const KUrl &url)
 

Detailed Description

A Nepomuk desktop query specialized for file searches.

FileQuery is an extension to Query which adds some syntactic sugar for dealing with file queries. This includes a restriction of the results to files and the possibility to restrict the search to specific folders via setIncludeFolders() and setExcludeFolders().

Warning
FileQuery does only return files and folders as results.
Author
Sebastian Trueg trueg.nosp@m.@kde.nosp@m..org
Since
4.4

Definition at line 44 of file filequery.h.

Member Enumeration Documentation

enum Nepomuk2::Query::FileQuery::FileModeFlags

An enumeration used in setFileMode() to state wether the query should return files and folders or only files or only folders.

Since
4.5
Enumerator
QueryFiles 
QueryFolders 
QueryFilesAndFolders 

Definition at line 167 of file filequery.h.

Constructor & Destructor Documentation

Nepomuk2::Query::FileQuery::FileQuery ( )

Create an empty invalid file query object.

Definition at line 23 of file filequery.cpp.

Nepomuk2::Query::FileQuery::FileQuery ( const Term &  term)
explicit

Create a file query with root term term.

Since
4.6

Definition at line 30 of file filequery.cpp.

Nepomuk2::Query::FileQuery::FileQuery ( const Query &  query)

Copy constructor.

Definition at line 37 of file filequery.cpp.

Nepomuk2::Query::FileQuery::~FileQuery ( )

Destructor.

Definition at line 44 of file filequery.cpp.

Member Function Documentation

void Nepomuk2::Query::FileQuery::addExcludeFolder ( const KUrl &  folder)

Add a folder to exclude from the search.

If exclude folders are set the query will be restricted to files that are not in that folder and its subfolders.

Parameters
folderThe folder to exclude from the search.
See also
setExcludeFolders, excludeFolders, addIncludeFolder

Definition at line 96 of file filequery.cpp.

void Nepomuk2::Query::FileQuery::addIncludeFolder ( const KUrl &  folder)

Add a folder to include in the search.

If include folders are set the query will be restricted to files from that folders and their subfolders.

Parameters
folderThe folder to include in the search.
See also
setIncludeFolders, includeFolders, addExcludeFolder

Definition at line 57 of file filequery.cpp.

void Nepomuk2::Query::FileQuery::addIncludeFolder ( const KUrl &  folder,
bool  recursive 
)

Add a folder to include in the search path.

If include folders are set the query will be restricted to files from that folders and optionally their subfolders.

Parameters
folderThe folder to include in the search.
recursiveIf true subfolders of folder will be searched, too.
See also
setIncludeFolders, includeFolders, addExcludeFolder
Since
4.6

Definition at line 63 of file filequery.cpp.

QHash< KUrl, bool > Nepomuk2::Query::FileQuery::allIncludeFolders ( ) const

The hash of include folders set via addIncludeFolder() and setIncludeFolders() including their recursive flag.

See also
includeFolders, addIncludeFolder, setIncludeFolders, excludeFolders
Since
4.6

Definition at line 90 of file filequery.cpp.

KUrl::List Nepomuk2::Query::FileQuery::excludeFolders ( ) const

The list of exclude folders set via addExcludeFolder() and setExcludeFolders().

See also
addExcludeFolder, setExcludeFolders, includeFolders

Definition at line 108 of file filequery.cpp.

Nepomuk2::Query::FileQuery::FileMode Nepomuk2::Query::FileQuery::fileMode ( ) const
Returns
The file mode set in setFileMode()
Since
4.5

Definition at line 120 of file filequery.cpp.

KUrl::List Nepomuk2::Query::FileQuery::includeFolders ( ) const

The list of include folders set via addIncludeFolder() and setIncludeFolders().

See also
allIncludeFolders, addIncludeFolder, setIncludeFolders, excludeFolders

Definition at line 84 of file filequery.cpp.

Nepomuk2::Query::FileQuery & Nepomuk2::Query::FileQuery::operator= ( const Query &  query)

Assignment operator.

Definition at line 49 of file filequery.cpp.

void Nepomuk2::Query::FileQuery::setExcludeFolders ( const KUrl::List &  folders)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
foldersThe folders to exclude from the search.
See also
addExcludeFolder, excludeFolders, setIncludeFolders

Definition at line 102 of file filequery.cpp.

void Nepomuk2::Query::FileQuery::setFileMode ( FileMode  mode)

Set the file mode, i.e.

wether the query should return files and folders or only files or only folders. By default both files and folders are returned.

See also
fileMode()
Since
4.5

Definition at line 114 of file filequery.cpp.

void Nepomuk2::Query::FileQuery::setIncludeFolders ( const KUrl::List &  folders)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
foldersThe folders to include in the search.
See also
addIncludeFolder, includeFolders, setExcludeFolders

Definition at line 69 of file filequery.cpp.

void Nepomuk2::Query::FileQuery::setIncludeFolders ( const QHash< KUrl, bool > &  folders)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
foldersA hash of the folders to include in the search and their recursive flag.
Since
4.6

Definition at line 78 of file filequery.cpp.


The documentation for this class was generated from the following files:
  • filequery.h
  • filequery.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk-Core

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

kdelibs API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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