KDEUI Macros
Defines | |
| #define | KDE_RESTORE_MAIN_WINDOWS_NUM_TEMPLATE_ARGS 3 |
| #define | RESTORE(type) |
Define Documentation
| #define KDE_RESTORE_MAIN_WINDOWS_NUM_TEMPLATE_ARGS 3 |
Returns the maximal number of arguments that are actually supported by kRestoreMainWindows().
Definition at line 736 of file kmainwindow.h.
| #define RESTORE | ( | type | ) |
Value:
{ int n = 1;\
while (KMainWindow::canBeRestored(n)){\
(new type)->restore(n);\
n++;}}
Restores the last session.
(To be used in your main function).
If your client has only one kind of toplevel widgets (which should be pretty usual) then you can use this macro, which is provided for backwards compatibility with 3.1 and 3.0 branches:
if (qApp->isSessionRestored()) RESTORE(childMW) else { // create default application as usual }
The macro expects the type of your toplevel widget as argument.
Since KDE4, you can also use kRestoreMainWindows(), which supports also clients with more than one kind of toplevel widgets.
Definition at line 725 of file kmainwindow.h.
KDE 4.6 API Reference