KDE 4.2 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KSycoca Class Reference

from PyKDE4.kdecore import *

Inherits: QObject

Detailed Description

Internal:
Read-only SYstem COnfiguration CAche


Enumerations

DatabaseType { LocalDatabase, GlobalDatabase }

Signals

 databaseChanged ()

Methods

 __init__ (self, bool a0)
 __init__ (self)
 __init__ (self, KSycoca a0)
 addFactory (self, KSycocaFactory a0)
QStringList allResourceDirs (self)
 databaseChanged (self)
 disableAutoRebuild (self)
KSycocaFactoryList factories (self)
QDataStream findEntry (self, int offset, KSycocaType type)
QDataStream findFactory (self, KSycocaFactoryId id)
bool isBuilding (self)
QString kfsstnd_prefixes (self)
QString language (self)
long timeStamp (self)
long updateSignature (self)

Static Methods

QString absoluteFilePath (KSycoca.DatabaseType type=KSycoca.LocalDatabase)
 flagError ()
bool isAvailable ()
bool isChanged (QString type)
bool readError ()
KSycoca self ()
int version ()

Method Documentation

__init__ (  self,
bool  a0
)

Internal:
Building database

__init__ (   self )

Read-only database

__init__ (  self,
KSycoca  a0
)
QString absoluteFilePath ( KSycoca.DatabaseType  type=KSycoca.LocalDatabase
)

Internal:
- returns absolute file path of the database

for global database type the database is searched under the 'services' install path. Otherwise, the value from the environment variable KDESYCOCA is returned if set. If not set the path is build based on KStandardDirs cache save location.

addFactory (  self,
KSycocaFactory  a0
)

Internal:
- add a factory

QStringList allResourceDirs (   self )

Internal:
- returns all directories with information stored inside sycoca.

databaseChanged (   self )

Connect to this to get notified when the database changes (Usually apps showing icons do a 'refresh' to take into account the new mimetypes)

Signal syntax:
QObject.connect(source, SIGNAL("databaseChanged()"), target_slot)
disableAutoRebuild (   self )

Internal:
- disables launching of kbuildsycoca

KSycocaFactoryList factories (   self )
QDataStream findEntry (  self,
int  offset,
KSycocaType  type
)

Internal:
- called by factories in read-only mode This is how factories get a stream to an entry

QDataStream findFactory (  self,
KSycocaFactoryId  id
)

Internal:
- called by factories in read-only mode

flagError (   )

A read error occurs.

bool isAvailable (   )

Returns:
true if the ksycoca database is available This is usually the case, except if KDE isn't installed yet, or before kded is started.

bool isBuilding (   self )

Internal:
Returns:
true if building (i.e. if a KBuildSycoca);

bool isChanged ( QString  type
)

When you receive a "databaseChanged" signal, you can query here if a change has occurred in a specific resource type.

See also:
KStandardDirs for the various resource types.

QString kfsstnd_prefixes (   self )

Internal:
- returns kfsstnd stored inside database

QString language (   self )

Internal:
- returns language stored inside database

bool readError (   )

Returns read error status and clears flag.

KSycoca self (   )

Get or create the only instance of KSycoca (read-only)

long timeStamp (   self )

Internal:
- returns timestamp of database

The database contains all changes made _before_ this time and _might_ contain changes made after that.

long updateSignature (   self )

Internal:
- returns update signature of database

Signature that keeps track of changes to $KDEDIR/share/services/update_ksycoca

Touching this file causes the database to be recreated from scratch.

int version (   )

Returns:
the compiled-in version, i.e. the one used when writing a new ksycoca


Enumeration Documentation

DatabaseType

type of database

See also:
absoluteFilePath()

Enumerator:
LocalDatabase 
GlobalDatabase 

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal