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

KDEUI

Public Types | Signals | Public Member Functions | Protected Member Functions | List of all members
KPageDialog Class Reference

#include <kpagedialog.h>

Inheritance diagram for KPageDialog:
Inheritance graph
[legend]

Public Types

enum  FaceType {
  Auto = KPageView::Auto, Plain = KPageView::Plain, List = KPageView::List, Tree = KPageView::Tree,
  Tabbed = KPageView::Tabbed
}
 
- Public Types inherited from KDialog
enum  ButtonCode {
  None = 0x00000000, Help = 0x00000001, Default = 0x00000002, Ok = 0x00000004,
  Apply = 0x00000008, Try = 0x00000010, Cancel = 0x00000020, Close = 0x00000040,
  No = 0x00000080, Yes = 0x00000100, Reset = 0x00000200, Details = 0x00000400,
  User1 = 0x00001000, User2 = 0x00002000, User3 = 0x00004000, NoDefault = 0x00008000
}
 
enum  ButtonPopupMode { InstantPopup = 0, DelayedPopup = 1 }
 
enum  CaptionFlag { NoCaptionFlags = 0, AppNameCaption = 1, ModifiedCaption = 2, HIGCompliantCaption = AppNameCaption }
 

Signals

void currentPageChanged (KPageWidgetItem *current, KPageWidgetItem *before)
 
void pageRemoved (KPageWidgetItem *page)
 
- Signals inherited from KDialog
void aboutToShowDetails ()
 
void applyClicked ()
 
void buttonClicked (KDialog::ButtonCode button)
 
void cancelClicked ()
 
void closeClicked ()
 
void defaultClicked ()
 
void finished ()
 
void helpClicked ()
 
void hidden ()
 
void layoutHintChanged ()
 
void noClicked ()
 
void okClicked ()
 
void resetClicked ()
 
void tryClicked ()
 
void user1Clicked ()
 
void user2Clicked ()
 
void user3Clicked ()
 
void yesClicked ()
 

Public Member Functions

 KPageDialog (QWidget *parent=0, Qt::WindowFlags flags=0)
 
 ~KPageDialog ()
 
KPageWidgetItem * addPage (QWidget *widget, const QString &name)
 
void addPage (KPageWidgetItem *item)
 
KPageWidgetItem * addSubPage (KPageWidgetItem *parent, QWidget *widget, const QString &name)
 
void addSubPage (KPageWidgetItem *parent, KPageWidgetItem *item)
 
KPageWidgetItem * currentPage () const
 
KPageWidgetItem * insertPage (KPageWidgetItem *before, QWidget *widget, const QString &name)
 
void insertPage (KPageWidgetItem *before, KPageWidgetItem *item)
 
void removePage (KPageWidgetItem *item)
 
void setCurrentPage (KPageWidgetItem *item)
 
void setFaceType (FaceType faceType)
 
- Public Member Functions inherited from KDialog
 KDialog (QWidget *parent=0, Qt::WindowFlags flags=0)
 
 ~KDialog ()
 
KPushButton * button (ButtonCode id) const
 
KIcon buttonIcon (ButtonCode id) const
 
QString buttonText (ButtonCode id) const
 
QString buttonToolTip (ButtonCode id) const
 
QString buttonWhatsThis (ButtonCode id) const
 
ButtonCode defaultButton () const
 
QString helpLinkText () const
 
void incrementInitialSize (const QSize &size)
 
bool isButtonEnabled (ButtonCode id) const
 
QWidget * mainWidget ()
 
virtual QSize minimumSizeHint () const
 
void restoreDialogSize (const KConfigGroup &config)
 
void saveDialogSize (KConfigGroup &config, KConfigGroup::WriteConfigFlags options=KConfigGroup::Normal) const
 
void setButtonFocus (ButtonCode id)
 
void setButtonGuiItem (ButtonCode id, const KGuiItem &item)
 
void setButtonIcon (ButtonCode id, const KIcon &icon)
 
void setButtonMenu (ButtonCode id, QMenu *menu, ButtonPopupMode popupmode=InstantPopup)
 
void setButtons (ButtonCodes buttonMask)
 
void setButtonsOrientation (Qt::Orientation orientation)
 
void setButtonText (ButtonCode id, const QString &text)
 
void setButtonToolTip (ButtonCode id, const QString &text)
 
void setButtonWhatsThis (ButtonCode id, const QString &text)
 
void setDefaultButton (ButtonCode id)
 
void setEscapeButton (ButtonCode id)
 
void setInitialSize (const QSize &size)
 
void setMainWidget (QWidget *widget)
 
void showButton (ButtonCode id, bool state)
 
void showButtonSeparator (bool state)
 
virtual QSize sizeHint () const
 

Protected Member Functions

 KPageDialog (KPageWidget *widget, QWidget *parent, Qt::WindowFlags flags=0)
 
 KPageDialog (KPageDialogPrivate &dd, KPageWidget *widget, QWidget *parent, Qt::WindowFlags flags=0)
 
KPageWidget * pageWidget ()
 
const KPageWidget * pageWidget () const
 
void setPageWidget (KPageWidget *widget)
 
- Protected Member Functions inherited from KDialog
 KDialog (KDialogPrivate &dd, QWidget *parent, Qt::WindowFlags flags=0)
 
virtual void closeEvent (QCloseEvent *e)
 
virtual void hideEvent (QHideEvent *)
 
virtual void keyPressEvent (QKeyEvent *)
 

Additional Inherited Members

- Public Slots inherited from KDialog
void delayedDestruct ()
 
void enableButton (ButtonCode id, bool state)
 
void enableButtonApply (bool state)
 
void enableButtonCancel (bool state)
 
void enableButtonOk (bool state)
 
void enableLinkedHelp (bool state)
 
bool isDetailsWidgetVisible () const
 
virtual void setCaption (const QString &caption)
 
virtual void setCaption (const QString &caption, bool modified)
 
void setDetailsWidget (QWidget *detailsWidget)
 
void setDetailsWidgetVisible (bool visible)
 
void setHelp (const QString &anchor, const QString &appname=QString())
 
void setHelpLinkText (const QString &text)
 
virtual void setPlainCaption (const QString &caption)
 
- Static Public Member Functions inherited from KDialog
static bool avoidArea (QWidget *widget, const QRect &area, int screen=-1)
 
static void centerOnScreen (QWidget *widget, int screen=-1)
 
static int groupSpacingHint ()
 
static QString makeStandardCaption (const QString &userCaption, QWidget *window=0, CaptionFlags flags=HIGCompliantCaption)
 
static int marginHint ()
 
static void resizeLayout (QWidget *widget, int margin, int spacing)
 
static void resizeLayout (QLayout *lay, int margin, int spacing)
 
static void setAllowEmbeddingInGraphicsView (bool allowEmbedding)
 
static int spacingHint ()
 
- Protected Slots inherited from KDialog
virtual void slotButtonClicked (int button)
 
void updateGeometry ()
 
- Protected Attributes inherited from KDialog
KDialogPrivate *const d_ptr
 

Detailed Description

A dialog base class which can handle multiple pages.

This class provides a dialog base class which handles multiple pages and allows the user to switch between these pages in different ways.

Currently, Auto, Plain, List, Tree and Tabbed face types are available (

See also
KPageView).

Example:

UrlDialog::UrlDialog( QWidget *parent )
: KPageDialog( parent )
{
setFaceType( List );
QLabel *label = new QLabel( "Test Page" );
addPage( label, i18n( "My Test Page" ) );
label = new QLabel( "Second Test Page" );
KPageWidgetItem *page = new KPageWidgetItem( label, i18n( "My Second Test Page" ) );
page->setHeader( i18n( "My header string" ) );
page->setIcon( KIcon( "file" ) );
addPage( page );
}
Author
Tobias Koenig (tokoe.nosp@m.@kde.nosp@m..org)

Definition at line 65 of file kpagedialog.h.

Member Enumeration Documentation

enum KPageDialog::FaceType
  • Auto - A dialog with a face based on the structure of the available pages. If only a single page is added, the dialog behaves like in Plain mode, with multiple pages without sub pages it behaves like in List mode and like in Tree mode otherwise.
  • Plain - A normal dialog.
  • List - A dialog with an icon list on the left side and a representation of the contents on the right side.
  • Tree - A dialog with a tree on the left side and a representation of the contents on the right side.
  • Tabbed - A dialog with a tab bar above the representation of the contents.
Enumerator
Auto 
Plain 
List 
Tree 
Tabbed 

Definition at line 87 of file kpagedialog.h.

Constructor & Destructor Documentation

KPageDialog::KPageDialog ( QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
)
explicit

Creates a new page dialog.

Definition at line 31 of file kpagedialog.cpp.

KPageDialog::~KPageDialog ( )

Destroys the page dialog.

Definition at line 64 of file kpagedialog.cpp.

KPageDialog::KPageDialog ( KPageWidget *  widget,
QWidget *  parent,
Qt::WindowFlags  flags = 0 
)
protected

This constructor can be used by subclasses to provide a custom page widget.

Parameters
widgetThe KPageWidget object will be reparented to this object, so you can create it without parent and you are not allowed to delete it.

Definition at line 40 of file kpagedialog.cpp.

KPageDialog::KPageDialog ( KPageDialogPrivate &  dd,
KPageWidget *  widget,
QWidget *  parent,
Qt::WindowFlags  flags = 0 
)
protected

Definition at line 51 of file kpagedialog.cpp.

Member Function Documentation

KPageWidgetItem * KPageDialog::addPage ( QWidget *  widget,
const QString &  name 
)

Adds a new top level page to the dialog.

Parameters
widgetThe widget of the page.
nameThe name which is displayed in the navigation view.
Returns
The associated
See also
KPageWidgetItem.

Definition at line 73 of file kpagedialog.cpp.

void KPageDialog::addPage ( KPageWidgetItem *  item)

Adds a new top level page to the dialog.

Parameters
itemThe
See also
KPageWidgetItem which describes the page.

Definition at line 78 of file kpagedialog.cpp.

KPageWidgetItem * KPageDialog::addSubPage ( KPageWidgetItem *  parent,
QWidget *  widget,
const QString &  name 
)

Inserts a new sub page in the dialog.

Parameters
parentThe new page will be insert as child of this
See also
KPageWidgetItem.
Parameters
widgetThe widget of the page.
nameThe name which is displayed in the navigation view.
Returns
The associated
See also
KPageWidgetItem.

Definition at line 93 of file kpagedialog.cpp.

void KPageDialog::addSubPage ( KPageWidgetItem *  parent,
KPageWidgetItem *  item 
)

Inserts a new sub page in the dialog.

Parameters
parentThe new page will be insert as child of this
See also
KPageWidgetItem.
Parameters
itemThe
See also
KPageWidgetItem which describes the page.

Definition at line 98 of file kpagedialog.cpp.

KPageWidgetItem * KPageDialog::currentPage ( ) const

Returns the.

See also
KPageWidgetItem for the current page or 0 if there is no current page.

Definition at line 113 of file kpagedialog.cpp.

void KPageDialog::currentPageChanged ( KPageWidgetItem *  current,
KPageWidgetItem *  before 
)
signal

This signal is emitted whenever the current page has changed.

Parameters
itemThe new current page or 0 if no current page is available.
KPageWidgetItem * KPageDialog::insertPage ( KPageWidgetItem *  before,
QWidget *  widget,
const QString &  name 
)

Inserts a new page in the dialog.

Parameters
beforeThe new page will be insert before this
See also
KPageWidgetItem on the same level in hierarchy.
Parameters
widgetThe widget of the page.
nameThe name which is displayed in the navigation view.
Returns
The associated
See also
KPageWidgetItem.

Definition at line 83 of file kpagedialog.cpp.

void KPageDialog::insertPage ( KPageWidgetItem *  before,
KPageWidgetItem *  item 
)

Inserts a new page in the dialog.

Parameters
beforeThe new page will be insert before this
See also
KPageWidgetItem on the same level in hierarchy.
Parameters
itemThe
See also
KPageWidgetItem which describes the page.

Definition at line 88 of file kpagedialog.cpp.

void KPageDialog::pageRemoved ( KPageWidgetItem *  page)
signal

This signal is emitted whenever a page has been removed.

Parameters
pageThe page which has been removed
KPageWidget * KPageDialog::pageWidget ( )
protected

Returns the page widget of the dialog or 0 if no page widget is set.

Definition at line 118 of file kpagedialog.cpp.

const KPageWidget * KPageDialog::pageWidget ( ) const
protected

Returns the page widget of the dialog or 0 if no page widget is set.

Definition at line 130 of file kpagedialog.cpp.

void KPageDialog::removePage ( KPageWidgetItem *  item)

Removes the page associated with the given.

See also
KPageWidgetItem.

Definition at line 103 of file kpagedialog.cpp.

void KPageDialog::setCurrentPage ( KPageWidgetItem *  item)

Sets the page which is associated with the given.

See also
KPageWidgetItem to be the current page and emits the currentPageChanged() signal.

Definition at line 108 of file kpagedialog.cpp.

void KPageDialog::setFaceType ( FaceType  faceType)

Sets the face type of the dialog.

Definition at line 68 of file kpagedialog.cpp.

void KPageDialog::setPageWidget ( KPageWidget *  widget)
protected

Set the page widget of the dialog.

Note
the previous pageWidget will be deleted.
Parameters
widgetThe KPageWidget object will be reparented to this object, so you can create it without parent and you are not allowed to delete it.

Definition at line 123 of file kpagedialog.cpp.


The documentation for this class was generated from the following files:
  • kpagedialog.h
  • kpagedialog.cpp
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