KPageDialog
#include <KPageDialog>
Public Types | |
enum | FaceType { Auto = KPageView::Auto , Plain = KPageView::Plain , List = KPageView::List , Tree = KPageView::Tree , Tabbed = KPageView::Tabbed , FlatList = KPageView::FlatList } |
Public Types inherited from QDialog | |
enum | DialogCode |
Public Types inherited from QWidget | |
enum | RenderFlag |
Public Types inherited from QPaintDevice | |
enum | PaintDeviceMetric |
Signals | |
void | currentPageChanged (KPageWidgetItem *current, KPageWidgetItem *before) |
void | pageRemoved (KPageWidgetItem *page) |
Protected Attributes | |
std::unique_ptr< class KPageDialogPrivate > 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 (cmp. KPageView).
By default a QDialogButtonBox is added to the dialog with two buttons, OK (QDialogButtonBox::Ok
) and Cancel (QDialogButtonBox::Cancel
). You can customize which buttons are added to the dialog by using any of the available buttons-related methods.
Note that if there is a QDialogButtonBox (either the one added by default, or one you added manually) some logical connections are created:
QDialogButtonBox::accepted()
is connected toQDialog::accept()
QDialogButtonBox::rejected()
is connected toQDialog::reject()
this means that you shouldn't create these connections again (otherwise you would end up receiving two duplicate accepted() signals for example).
Example:
Definition at line 77 of file kpagedialog.h.
Member Enumeration Documentation
◆ FaceType
The face types supported.
Definition at line 86 of file kpagedialog.h.
Constructor & Destructor Documentation
◆ KPageDialog() [1/3]
|
explicit |
Creates a new page dialog.
Definition at line 17 of file kpagedialog.cpp.
◆ ~KPageDialog()
|
overridedefault |
Destroys the page dialog.
◆ KPageDialog() [2/3]
|
protected |
This constructor can be used by subclasses to provide a custom page widget.
- Parameters
-
widget The 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 22 of file kpagedialog.cpp.
◆ KPageDialog() [3/3]
|
protected |
Definition at line 28 of file kpagedialog.cpp.
Member Function Documentation
◆ addActionButton()
void KPageDialog::addActionButton | ( | QAbstractButton * | button | ) |
Set an action button.
Definition at line 136 of file kpagedialog.cpp.
◆ addPage() [1/2]
void KPageDialog::addPage | ( | KPageWidgetItem * | item | ) |
Adds a new top level page to the dialog.
- Parameters
-
item The KPageWidgetItem which describes the page.
Definition at line 66 of file kpagedialog.cpp.
◆ addPage() [2/2]
KPageWidgetItem * KPageDialog::addPage | ( | QWidget * | widget, |
const QString & | name ) |
Adds a new top level page to the dialog.
- Parameters
-
widget The widget of the page. name The name which is displayed in the navigation view.
- Returns
- The associated KPageWidgetItem.
Definition at line 59 of file kpagedialog.cpp.
◆ addSubPage() [1/2]
void KPageDialog::addSubPage | ( | KPageWidgetItem * | parent, |
KPageWidgetItem * | item ) |
Inserts a new sub page in the dialog.
- Parameters
-
parent The new page will be insert as child of this KPageWidgetItem. item The KPageWidgetItem which describes the page.
Definition at line 94 of file kpagedialog.cpp.
◆ addSubPage() [2/2]
KPageWidgetItem * KPageDialog::addSubPage | ( | KPageWidgetItem * | parent, |
QWidget * | widget, | ||
const QString & | name ) |
Inserts a new sub page in the dialog.
- Parameters
-
parent The new page will be insert as child of this KPageWidgetItem. widget The widget of the page. name The name which is displayed in the navigation view.
- Returns
- The associated KPageWidgetItem.
Definition at line 87 of file kpagedialog.cpp.
◆ button()
QPushButton * KPageDialog::button | ( | QDialogButtonBox::StandardButton | which | ) | const |
Returns the QPushButton corresponding to the standard button which, or a null pointer if the standard button doesn't exist in this dialog.
Definition at line 129 of file kpagedialog.cpp.
◆ buttonBox() [1/2]
|
protected |
Returns the button box of the dialog or a null pointer if no button box is set.
Definition at line 166 of file kpagedialog.cpp.
◆ buttonBox() [2/2]
|
protected |
Returns the button box of the dialog or a null pointer if no button box is set.
Definition at line 173 of file kpagedialog.cpp.
◆ currentPage()
KPageWidgetItem * KPageDialog::currentPage | ( | ) | const |
Returns the KPageWidgetItem for the current page or a null pointer if there is no current page.
Definition at line 115 of file kpagedialog.cpp.
◆ currentPageChanged
|
signal |
This signal is emitted whenever the current page has changed.
- Parameters
-
current The new current page or a null pointer if no current page is available. before The page that was current before the new current page has changed.
◆ insertPage() [1/2]
void KPageDialog::insertPage | ( | KPageWidgetItem * | before, |
KPageWidgetItem * | item ) |
Inserts a new page in the dialog.
- Parameters
-
before The new page will be insert before this KPageWidgetItem on the same level in hierarchy. item The KPageWidgetItem which describes the page.
Definition at line 80 of file kpagedialog.cpp.
◆ insertPage() [2/2]
KPageWidgetItem * KPageDialog::insertPage | ( | KPageWidgetItem * | before, |
QWidget * | widget, | ||
const QString & | name ) |
Inserts a new page in the dialog.
- Parameters
-
before The new page will be insert before this KPageWidgetItem on the same level in hierarchy. widget The widget of the page. name The name which is displayed in the navigation view.
- Returns
- The associated KPageWidgetItem.
Definition at line 73 of file kpagedialog.cpp.
◆ pageRemoved
|
signal |
This signal is emitted whenever a page has been removed.
- Parameters
-
page The page which has been removed
◆ pageWidget() [1/2]
|
protected |
Returns the page widget of the dialog or a null pointer if no page widget is set.
Definition at line 143 of file kpagedialog.cpp.
◆ pageWidget() [2/2]
|
protected |
Returns the page widget of the dialog or a null pointer if no page widget is set.
Definition at line 159 of file kpagedialog.cpp.
◆ removePage()
void KPageDialog::removePage | ( | KPageWidgetItem * | item | ) |
Removes the page associated with the given KPageWidgetItem.
Definition at line 101 of file kpagedialog.cpp.
◆ setButtonBox()
|
protected |
Set the button box of the dialog.
- Note
- the previous buttonBox will be deleted.
- Parameters
-
box The QDialogButtonBox 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 180 of file kpagedialog.cpp.
◆ setCurrentPage()
void KPageDialog::setCurrentPage | ( | KPageWidgetItem * | item | ) |
Sets the page which is associated with the given KPageWidgetItem to be the current page and emits the currentPageChanged() signal.
Definition at line 108 of file kpagedialog.cpp.
◆ setFaceType()
Sets the face type of the dialog.
Definition at line 47 of file kpagedialog.cpp.
◆ setPageWidget()
|
protected |
Set the page widget of the dialog.
- Note
- the previous pageWidget will be deleted.
- Parameters
-
widget The 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 150 of file kpagedialog.cpp.
◆ setStandardButtons()
void KPageDialog::setStandardButtons | ( | QDialogButtonBox::StandardButtons | buttons | ) |
Sets the collection of standard buttons displayed by this dialog.
Definition at line 122 of file kpagedialog.cpp.
Member Data Documentation
◆ d_ptr
Definition at line 295 of file kpagedialog.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Apr 27 2024 22:08:27 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.