• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Macros
KDEUI Macros

Macros

#define KDE_RESTORE_MAIN_WINDOWS_NUM_TEMPLATE_ARGS   3
 
#define RESTORE(type)
 

Detailed Description

Macro Definition 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++;}}
KMainWindow::canBeRestored
static bool canBeRestored(int number)
If the session did contain so high a number, true is returned, else false.
Definition: kmainwindow.cpp:503

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.

See also
KMainWindow::restore()
kRestoreMainWindows()

Definition at line 725 of file kmainwindow.h.

This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal