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

Nepomuk-Core

  • Nepomuk2
  • Utils
Enumerations | Functions
Nepomuk2::Utils Namespace Reference

Enumerations

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

Functions

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

Enumeration Type Documentation

enum Nepomuk2::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

Nepomuk2::Resource Nepomuk2::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

Definition at line 180 of file utils.cpp.

void Nepomuk2::Utils::finishCopyEvent ( Nepomuk2::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

Definition at line 231 of file utils.cpp.

QString Nepomuk2::Utils::formatPropertyValue ( const Nepomuk2::Types::Property &  property,
const Nepomuk2::Variant &  value,
const QList< Nepomuk2::Resource > &  resources = QList<Nepomuk2::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

Definition at line 50 of file utils.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