[Kangaroo Index] [Kangaroo Hierarchy] [Headers]
A base class for all KDE applications. More...
#include <kdeobjc/KApplication.h>
Inherits: QApplication (QtObjc)
A base class for all KDE applications.
KApplication provides the application with KDE defaults such as accelerators, common menu entries, a KConfig object etc. KApplication installs a signal handler for the SIGCHLD signal in order to avoid zombie children. If you want to catch this signal yourself or don't want it to be caught at all, you have set a new signal handler (or SIG_IGN) after KApplication has been initialized.
Header derived from the C++ header 'kapp.h'
by Matthias Kalle Dalheimer
Initializer. Pass command-line arguments.
A KConfig object is created that contains an application-specific config file whose name is "~/." + argv[0] + "rc". This initializer should be considered obsolete. The state of the application-specific config file may be queried afterwards with - getConfigState.
Initializer. Pass command-line arguments.
A KConfig object is created that contains an application-specific config file whose name is "~/." + rAppName + "rc". The state of the application-specific config file may be queried afterwards with - getConfigState.
Called at app termination time
A global event filter for KApplication.Filters out Ctrl-Alt-F12 for KDebug.
Return the current application object.
This is similar to +[QApplication qApp]. It allows access to the single global KApplication object, since more than one cannot be created in the same application. It saves the trouble of having to pass the reference to it explicitly to every function that may require it.
Return the logical application name as set in the initializer.
Retrieve the application config object.
Retrieve the application session config object.
Is the application restored from the session manager?
Enable session management
If userdefined = True then the WmCommand can be defined with setWmCommand. Note that you do not get an instance specific config object with getSessionConfig in this case!
Session management will apply to the top widget.
Set the WmCommand for the session manager.
This has an effect if either session management is disabled (then it is used for pseudo session management) or if session management is enabled with userdefined: YES.
Return a standard help menu
appAboutText | a little text about the application |
Get an iconloader for the application. If it does not yet exist, create one.
Get a KLocale object for the application. If it does not yet exist, create one.
Get a KCharsets object for the application.
Get the icon for the application.
Get the mini-icon for the application.
Sets the top widget of the application . This widget willbe used for communication with the session manager. You must not use this method if you are using the KTopLevelWidget.
Possible return values for -getConfigState.
Invoke the kdehelp HTML help viewer.
aTopic | This allows context-sensitive help. Its value will be appended to the filename, prefixed with a "#" (hash) character. |
aFilename | The filename that is to be loaded. Its location is computed automatically according to the KFSSTND. If aFilename is empty, the logical appname with .html appended to it is used. |
Returns the directory where KDE stores its HTML documentation
The default for this directory is $KDEDIR/share/doc/HTML
Returns the directory where KDE applications store their .kdelnk file
The default for this directory is $KDEDIR/share/applnk
Returns the directory where KDE icons are stored
The default for this directory is $KDEDIR/share/icons
Returns the directory where KDE applications store their specific data
The default for this directory is $KDEDIR/share/apps
Returns the directory where locale-specific information (like translated on-screen messages are stored
The default for this directory is $KDEDIR/share/locale
Returns the directory where cgi scripts are stored
The default for this directory is $KDEDIR/cgi-bin
Returns the directory where sound data are stored. This directory is for KDE specific sounds. Sound data of Applications should go into - kde_datadir
The default for this directory is $KDEDIR/share/sounds
Returns the directory where toolbar icons are stored
The default for this directory is $KDEDIR/share/toolbar
Returns the directory where wallpapers are stored
The default for this directory is $KDEDIR/share/wallpapers
Returns the directory where executable programs are stored
The default for this directory is $KDEDIR/bin
Returns the directory where KParts are stored
The default for this directory is $KDEDIR/parts
Returns the directory where config files are stored
The default for this directory is $KDEDIR/share/config
Returns the directory where mimetypes are stored
The default for this directory is $KDEDIR/share/mimelnk
Get the local KDE base dir
This is usually $HOME/.kde
Get the local KDE config dir
This is usually $HOME/.kde/share/config
Find a file using standard KDE search paths.
Possible search paths include $KDEDIR, $KDEPATH, and "[KDE Setup]:Path=" entry in a config file. If file is not found, - isEmpty will return True
Get the KDE font list.
This method allows you to get the KDE font list which was composed by the user with kfontmanager. Usually you should work only with those fonts in your kapplication.
Return a text for the window caption.
This would be set either by "-caption", otherwise it will be equivalent to the name of the executable.
Get a file name in order to make a temporary copy of yourdocument.
pFilename | The full path to the current file of your document. |
Check if there is an auto-save file for the document you want toopen.
bRecover | This gets set to true if there was a recover file. |
pFilename | The full path to the document you want to open. |
Returns YES if the KLocale object for this application has already been created
An X11 atom used for IPC
An X11 atom used for IPC
An X11 atom used for IPC
An X11 atom used for IPC
An X11 atom used for IPC
Used by KDNDDropZone to register
Used by KDNDDropZone during shutdown
Set the DropZone which receives root drop events.
Get the KDE base dir.
This is the value of the KDEDIR environment variable if it is set in the process' environment, the compile time default of, if this was not present, either, /usr/local/kde.
KApplication has changed its Palette due to a KDisplay request.
Normally, widgets will update their palettes automatically, but you should connect to this to program special behaviour.
KApplication has changed its GUI Style due to a KDisplay request.
Normally, widgets will update their styles automatically (as they would respond to an explicit -setGUIStyle: call), but you should connect to this to program special behaviour.
KApplication has changed its Font due to a KDisplay request.
Normally widgets will update their fonts automatically, but you should connect to this to monitor global font changes, especially if you are using explicit fonts.
KApplication has changed either its GUI style, its font or its palette due to a kdisplay request. Normally, widgets will update their styles automatically, but you should connect to this to program special
Session management is about to close your application. Connect to this signal in order to save your data. Do NOT manipulate the UI in that slot, it is blocked by kwm.
Use the KConfig::-getSessionConfig object to store all your instance specific datas.
Do not do any closing at this point! The user may still select "cancel" and then he wants to continue working with your application. Cleanups could be done after - shutDown: (see below)
Note: You should not use this if you are using the KTopLevelWidget. Overload KTopLevelWidget::-saveProperties and KTopLevelWidget::-readProperties in that case. This allows you to simply handle applications with multiple
Your application is killed. Either by kwm's killwindow function,xkill or (the usual case) by KDE's logout.
| Kdoc |