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

Nepomuk

  • Nepomuk
  • Utils
Classes | Enumerations | Functions

Nepomuk::Utils Namespace Reference

The Utils namespace contains utility and convenience methods and classes that help the application developer with using Nepomuk. More...

Classes

class  DateFacet
 A Facet that provides a set of date ranges. More...
class  DynamicResourceFacet
 A facet that presents a dynamic lists of resources with the possibility to search for more. More...
class  Facet
 The base class for all facets used to create query filters. More...
class  FacetModel
 A FacetModel contains a list of facets that are provided in a tree structure. More...
class  FacetWidget
 A widget providing a list of facets to add filters to a query. More...
class  ProxyFacet
 A facet forwarding the filtered choices from another facet. More...
class  ResourceModel
 Base class for all models providing a plain list of resources. More...
class  SearchWidget
 Provides a GUI for searching files or resources of any type. More...
class  SimpleFacet
 A simple facet using a list of terms. More...
class  SimpleResourceModel
 A simple ResourceModel that handles a list of Resource instances which can be managed via the setResources(), addResource(), addResources(), and clear() methods. More...
class  TypeFacet

Enumerations

enum  PropertyFormatFlag { NoPropertyFormatFlags = 0x0, WithKioLinks = 0x1 }

Functions

NEPOMUKUTILS_EXPORT
Nepomuk::Resource 
createCopyEvent (const KUrl &src, const KUrl &dest, const QDateTime &startTime=QDateTime(), const KUrl &referrer=KUrl())
NEPOMUKUTILS_EXPORT void finishCopyEvent (Nepomuk::Resource &eventResource, const QDateTime &endTime)
NEPOMUKUTILS_EXPORT QString formatPropertyValue (const Nepomuk::Types::Property &property, const Nepomuk::Variant &value, const QList< Nepomuk::Resource > &resources=QList< Nepomuk::Resource >(), PropertyFormatFlags flags=NoPropertyFormatFlags)

Detailed Description

The Utils namespace contains utility and convenience methods and classes that help the application developer with using Nepomuk.

An essential part of the Utils is the The Facet API which allows developers to easily integrate a filter-based search interface into their applications.


Enumeration Type Documentation

enum Nepomuk::Utils::PropertyFormatFlag

Flags to change the behaviour of formatPropertyValue().

Since:
4.6
Enumerator:
NoPropertyFormatFlags 

No flags, ie.

default behaviour.

WithKioLinks 

Include html links to Nepomuk resources, files, and Nepomuk queries.

Definition at line 47 of file utils.h.


Function Documentation

NEPOMUKUTILS_EXPORT Nepomuk::Resource Nepomuk::Utils::createCopyEvent ( const KUrl &  src,
const KUrl &  dest,
const QDateTime &  startTime = QDateTime(),
const KUrl &  referrer = KUrl() 
)

Save a copy event in Nepomuk stating that src has been copied to dest with an optional download startTime and an optional referrer URL that indicates from which webpage a download was initiated.

Returns:
The download event resource. Use finishCopyEvent() to store the event's end time.
Since:
4.6
NEPOMUKUTILS_EXPORT void Nepomuk::Utils::finishCopyEvent ( Nepomuk::Resource &  eventResource,
const QDateTime &  endTime 
)

Save the end time of a copy event created via createCopyEvent().

Parameters:
eventResourceThe resource returned by createCopyEvent().
endTimeThe time the copy event ended to the saved.
Since:
4.6
NEPOMUKUTILS_EXPORT QString Nepomuk::Utils::formatPropertyValue ( const Nepomuk::Types::Property &  property,
const Nepomuk::Variant &  value,
const QList< Nepomuk::Resource > &  resources = QList< Nepomuk::Resource >(),
PropertyFormatFlags  flags = NoPropertyFormatFlags 
)

Format a property to be displayed to the user.

Parameters:
propertyThe actual property to which the value applies to.
valueThe actual value to be formatted.
flagsOptional flags to change the resulting string.
resourcesThe resources which the property applies to. Depending on the property the user readable representation might differ based on the resources' types. Using an empty list is perfectly valid.
Returns:
A user readable representation of the value which corresponds to resource and property. This string may contain Qt-style HTML tags for links and special formatting.
Since:
4.6

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