[kdecore Index] [kdecore Hierarchy] [Headers]
A base class for all KDE applications. More...
#include <kapp.h>
Inherits: QApplication (qt)
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's constructor has run.
[public]
Constructor. Pass command-line arguments.
A KConfig object is created that contains an application-specific config file whose name is "~/." + argv[0] + "rc". This constructor should be considered obsolete. The state of the application-specific config file may be queried afterwards with getConfigState().
[public]
Constructor. 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().
[public virtual]
Destructor
[public virtual]
A global event filter for KApplication.Filters out Ctrl-Alt-F12 for KDebug.
[public static]
Return the current application object.
This is similar to the global QApplication pointer 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 pointer to it explicitly to every function that may require it.
[public]
Return the logical application name as set in the constructor.
[public]
Retrieve the application config object.
[public]
Retrieve the application session config object.
[public]
Is the application restored from the session manager?
[public]
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.
[public]
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=True.
[public]
Return a standard help menu
appAboutText | a little text about the application |
bAboutQtMenu | not used anymore |
[public]
Get an iconloader for the application. If it does not yet exist, create one.
[public]
Get a KLocale object for the application. If it does not yet exist, create one.
[public]
Get a KCharsets object for the application.
[public]
Get the icon for the application.
[public]
Get the mini-icon for the application.
[public]
Sets the top widget of the application . This widget willbe used for communication with the session manager. You must not call this function manually if you are using the KTopLevelWidget.
[public]
Possible return values for getConfigState().
[public]
Retrieve the state of the app-config object.
Possible return values are APPCONFIG_NONE (the application-specific config file could not be opened neither read-write nor read-only), APPCONFIG_READONLY (the application-specific config file is opened read-only, but not read-write) and APPCONFIG_READWRITE (the application-specific config file is opened read-write).
[public]
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. |
[public static]
Returns the directory where KDE stores its HTML documentation
The default for this directory is $KDEDIR/share/doc/HTML
[public static]
Returns the directory where KDE applications store their .kdelnk file
The default for this directory is $KDEDIR/share/applnk
[public static]
Returns the directory where KDE icons are stored
The default for this directory is $KDEDIR/share/icons
[public static]
Returns the directory where KDE applications store their specific data
The default for this directory is $KDEDIR/share/apps
[public static]
Returns the directory where locale-specific information (like translated on-screen messages are stored
The default for this directory is $KDEDIR/share/locale
[public static]
Returns the directory where cgi scripts are stored
The default for this directory is $KDEDIR/cgi-bin
[public static]
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
[public static]
Returns the directory where toolbar icons are stored
The default for this directory is $KDEDIR/share/toolbar
[public static]
Returns the directory where wallpapers are stored
The default for this directory is $KDEDIR/share/wallpapers
[public static]
Returns the directory where executable programs are stored
The default for this directory is $KDEDIR/bin
[public static]
Returns the directory where KParts are stored
The default for this directory is $KDEDIR/parts
[public static]
Returns the directory where config files are stored
The default for this directory is $KDEDIR/share/config
[public static]
Returns the directory where mimetypes are stored
The default for this directory is $KDEDIR/share/mimelnk
[public static]
Get the local KDE base dir
This is usually $HOME/.kde
[public static]
Get the local KDE config dir
This is usually $HOME/.kde/share/config
[public static]
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
[public]
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.
[public]
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.
[public]
Get a file name in order to make a temporary copy of yourdocument.
pFilename | The full path to the current file of your document. |
[public]
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. |
[public]
Returns true if the KLocale object for this application has already been constructed
[public]
An X11 atom used for IPC
[public]
An X11 atom used for IPC
[public]
An X11 atom used for IPC
[public]
An X11 atom used for IPC
[public]
An X11 atom used for IPC
[public]
Get the X11 display
[public virtual]
Used by KDNDDropZone to register
[public virtual]
Used by KDNDDropZone during shutdown
[public virtual]
Set the DropZone which receives root drop events.
[public]
for internal purposes only
[protected]
The last drop zone the mouse was over.
If we get a DndLeaveProtocol we must inform 'lastEnteredDropZone' that the mouse left the DropZone.
[protected]
The DropZone which receives root drop events.
[protected]
Used to catch X11 events
[protected]
Two X11 atoms used for session management
[protected]
X11 atoms used for IPC
[protected]
The X11 display
[protected]
Current application object.
[protected static]
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.
[signal]
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.
[signal]
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.
[signal]
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.
[signal]
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
[signal]
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 getSessionConfig KConfig 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
[signal]
Your application is killed. Either by kwm's killwindow function,xkill or (the usual case) by KDE's logout.
| Kdoc |