[kio Index] [kio Hierarchy] [Headers]
Common base for setup applications. More...
#include <kcontrol.h>
Inherits: KApplication (kdecore)
KControlApplication is the common base for setup applications.
It provides a tab dialog and functionality common to most setup programs.
[public]
Creates the setup application. The constructor scans the command line arguments. If there is a single argument, "-init", the function init() is called and the application terminates. Otherwise the setup dialog is created and inkoved.
argv | commandline arguments |
name | name of the application |
argc | number of commandline arguments |
[public]
Destructor. Cleans up.
[public]
Sets the title of the dialog. It's not possible to set the title within the constructor, because we need the application to get the translator and it would mean a lot of effort to do it without the one in kapp.
title | text to be shown in the dialogs titlebar |
[public]
Determines if the setup dialog has to be run. The setup dialog has to be run if the application has not been invoked with a single commandline argument containing "-init".
Due to the fact the QApplication::exec() is not virtual, this construction has to be used to execute a KControlApplication:
KControlApplication app(argc, argv, "name", "title"); app.createPages();
if (app.runGUI()) return app.exec(); else return 0;
Just running app.exec() will fail if "-init" has been requested.
[public]
Returns the tabbed dialog object.
[public]
Returns the list of pages to show.
[public]
Adds a new page to the dialog.
[public slot virtual]
This function is called at startup to initialize the settings. This function must be overriden by all setup application that want to have persistent settings.
[public slot virtual]
This function is called to apply the settings currently selected in the dialog. This function must be overriden by all setup applications.
[public slot virtual]
This function is called when the help button is pressed. The default behaviour is to call
kapp->invokeHTMLHelp("kcontrol/$(appname)/$(help_name).html","");
[public slot virtual]
This function is called when the user presses the default button. This function must be overriden by all setup application.
| Kdoc |