• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 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

◆ KDE_RESTORE_MAIN_WINDOWS_NUM_TEMPLATE_ARGS

#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.

◆ RESTORE

#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
}
RESTORE
#define RESTORE(type)
Restores the last session.
Definition: kmainwindow.h:725

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-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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