KFortune Class Reference

[kfortune Index] [kfortune Hierarchy] [Headers]


Basic class for KFortune More...

#include <kfortune.h>

Inherits: KTMainWindow

Public Members

Public Slots

Protected Members

Protected Slots


Detailed Description

This is the class KFortune. The class is used only for the program kfortune.


KFortune( int argc, char **argv, const char *name=0 ) [public]

The constructor method for class KFortune

Parameters:
argv Arguments from command line
name Name for QWidget
parent Parent widget, used for QWidget
argc Argument counter
See Also:
KFortune

~KFortune() [public]

The destrucor method for class KFortune

void quitapp() [public slot]

Quit the application

Parameters:
save Saves the current configuration if true

void notImpl() [public slot]

Shows a message telling the user that a function has not been implemented yet.

void newfortune() [public slot]

Shows a new fortune. This means randomly choosing a, checking if it hasn't been displayed the time before, resizing the window and some other stuff.

void saveFortune() [public slot]

Saves the current fortune to a file

void setFortune( QString txt ) [public slot]

Sets a new fortune, this includes checking on html-code

Parameters:
txt The fortune text to be set

void configkeys() [public slot]

Shows a window for configuring the keybindings

void selectFont() [public slot]

Shows a window for choosing a new font.

void configdatabase() [public slot]

Configures the kfortune database.

void configmisc() [public slot]

Allows the user the select some options by creating a Misc() object.

See Also:
Misc

void about() [public slot]

Shows information about the program

void helpmenu() [public slot]

Show the online-help

void initKeys() [protected]

Handles the default keybindigs

See Also:
KKeyConfig

void createMenu() [protected]

Creates the menubar and connects the menu-entries to the appropriate functions

void initConfig() [protected]

Get the configuration from the config-file.

void saveConfig() [protected]

Save the current configuration to the config-file.

void setDisplay( int ) [protected]

This function is used enable or disable to menubar

void setButtons( int ) [protected]

This function is used enable or disable the buttons.

void setLaunch( int ) [protected]

This function is used to automaticaly start the program when KDE is started

void setOffensive( int ) [protected]

Sets whether the program should show offensive fortunes or not

void readData() [protected]

Reads the data from the different databases. Which databases are used is determined by the KConfig object.

void cacheUpdate() [protected]

Updates the cache files of the current used databases. This is done by calling DataFile::updateCache

See Also:
DataFile::updateCache

void rereadData() [protected]

Calls readData after having deleted some objects to save some memory.

void parseOptions(int argc, char **argv) [protected]

Evaluate the command line options.

Parameters:
argv The arguments itself
argc Number of arguments

double getRandom() [protected]

This method was created to solve some portability problems between Linux and solaris.

Returns:
a random number between 0 and 1

void mousePressEvent( QMouseEvent * ) [protected slot]

Used by the popup-menu

void resizeEvent( QResizeEvent * ) [protected slot]

Only calls the function resizeEvent()

See Also:
resizeEvent

void resizeEvent( bool all=true) [protected slot]

Handels all the resizing of the main window of KFortune

Parameters:
all If this is false the widgets won't be resized, but only the fortune text will be updated

void timerEvent( QTimerEvent * ) [protected slot]

Used to automaticly exit the program.


  • Author: Pieter Eendebak <pte@ddsw.nl>
  • Version: 1.0
  • Documentation generated by root@ziep on Tue Dec 29 15:38:56 CET 1998
Kdoc