[kfortune Index] [kfortune Hierarchy] [Headers]
A structure used by KFortune More...
#include <datafile.h>
Inherits: QObject
A DataFile is a structure which manages a file containing fortunes It is used by the KFortune program. The class creates a cache file in ~/.kde/share/apps/kfortune/ to speed up the program.
[public]
Give the database a new file to hanlde
file | The new fortune file |
dir | The directory which contains the fortune file |
[public]
This function is used to get a fortune.
n | Number of the fortune which has to be fetched |
[public]
This function adds a fortune the the database. Note : this function hasn't been implemented yet and will probably never be implemented.
fort | The fortune to be added to the database |
[public]
Rebuilds the cache-file from scratch
The format of the cache-file :
# "Comment line" Number of fortunes in database # "Comment line" Streamposition of fortune number x Streamposition of fortune number 2*x Streamposition of fortune number 3*x etc.where x is a constant defined in defines.h
[protected]
Get the number of fortunes from the fortune-file, not from the cache file.
[protected]
This function is used to get data from the cache file
x | Number of fortune * CACHENUMBER which streamposition has to be returned |
Documentation generated by root@ziep on Tue Dec 29 15:38:56 CET 1998 | Kdoc |