KSycoca Class Reference
from PyKDE4.kdecore import *
Inherits: QObject
Detailed Description
- Internal:
- Read-only SYstem COnfiguration CAche
Enumerations | |
DatabaseType | { LocalDatabase, GlobalDatabase } |
Signals | |
databaseChanged () | |
databaseChanged (QStringList changedResources) | |
Methods | |
__init__ (self, bool a0) | |
__init__ (self) | |
__init__ (self, KSycoca a0) | |
addFactory (self, KSycocaFactory a0) | |
QStringList | allResourceDirs (self) |
databaseChanged (self) | |
databaseChanged (self, QStringList changedResources) | |
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) |
QDataStream | stream (self) |
long | timeStamp (self) |
long | updateSignature (self) |
Static Methods | |
QString | absoluteFilePath (KSycoca.DatabaseType type=KSycoca.LocalDatabase) |
disableAutoRebuild () | |
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
- Deprecated:
- use the databaseChanged(QStringList) signal
- Signal syntax:
QObject.connect(source, SIGNAL("databaseChanged()"), target_slot)
databaseChanged | ( | self, | ||
QStringList | changedResources | |||
) |
Connect to this to get notified when the database changes Example: when mimetype definitions have changed, applications showing files as icons refresh icons to take into account the new mimetypes. Another example: after creating a .desktop file in KOpenWithDialog, it must wait until kbuildsycoca4 finishes until the KService.Ptr is available.
- Signal syntax:
QObject.connect(source, SIGNAL("databaseChanged(const QStringList&)"), target_slot)
disableAutoRebuild | ( | ) |
- Internal:
- - disables launching of kbuildsycoca
disableAutoRebuild | ( | self ) |
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 Returns stream(), but positioned for reading this factory, 0 on error.
flagError | ( | ) |
A read error occurs.
- Internal:
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.
This method is meant to be called from the GUI thread only.
- Deprecated:
- use the signal databaseChanged(QStringList) instead.
QString kfsstnd_prefixes | ( | self ) |
- Internal:
- - returns kfsstnd stored inside database
QString language | ( | self ) |
- Internal:
- - returns language stored inside database
bool readError | ( | ) |
- Deprecated:
KSycoca self | ( | ) |
Get or create the only instance of KSycoca (read-only)
QDataStream stream | ( | self ) |
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