KWidgetsAddons

kpagedialog.h
1 /*
2  This file is part of the KDE Libraries
3  SPDX-FileCopyrightText: 1999-2001 Mirko Boehm <[email protected]>
4  SPDX-FileCopyrightText: 1999-2001 Espen Sand <[email protected]>
5  SPDX-FileCopyrightText: 1999-2001 Holger Freyther <[email protected]>
6  SPDX-FileCopyrightText: 2005-2006 Olivier Goffart <ogoffart at kde.org>
7  SPDX-FileCopyrightText: 2006 Tobias Koenig <[email protected]>
8 
9  SPDX-License-Identifier: LGPL-2.0-or-later
10 */
11 #ifndef KPAGEDIALOG_H
12 #define KPAGEDIALOG_H
13 
14 #include <QDialog>
15 #include <QDialogButtonBox>
16 #include <kpagewidget.h>
17 
18 class KPageDialogPrivate;
19 
54 class KWIDGETSADDONS_EXPORT KPageDialog : public QDialog
55 {
56  Q_OBJECT
57  Q_DECLARE_PRIVATE(KPageDialog)
58 
59 public:
60 
64  enum FaceType {
91  };
92 
93 public:
97  explicit KPageDialog(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
98 
102  ~KPageDialog();
103 
107  void setFaceType(FaceType faceType);
108 
117  KPageWidgetItem *addPage(QWidget *widget, const QString &name);
118 
124  void addPage(KPageWidgetItem *item);
125 
136  KPageWidgetItem *insertPage(KPageWidgetItem *before, QWidget *widget, const QString &name);
137 
146  void insertPage(KPageWidgetItem *before, KPageWidgetItem *item);
147 
157  KPageWidgetItem *addSubPage(KPageWidgetItem *parent, QWidget *widget, const QString &name);
158 
166  void addSubPage(KPageWidgetItem *parent, KPageWidgetItem *item);
167 
171  void removePage(KPageWidgetItem *item);
172 
177  void setCurrentPage(KPageWidgetItem *item);
178 
183  KPageWidgetItem *currentPage() const;
184 
188  void setStandardButtons(QDialogButtonBox::StandardButtons buttons);
189 
194  QPushButton *button(QDialogButtonBox::StandardButton which) const;
195 
199  void addActionButton(QAbstractButton *button);
200 
201 Q_SIGNALS:
208  void currentPageChanged(KPageWidgetItem *current, KPageWidgetItem *before);
209 
215  void pageRemoved(KPageWidgetItem *page);
216 
217 protected:
224  KPageDialog(KPageWidget *widget, QWidget *parent, Qt::WindowFlags flags = Qt::WindowFlags());
225  KPageDialog(KPageDialogPrivate &dd, KPageWidget *widget, QWidget *parent, Qt::WindowFlags flags = Qt::WindowFlags());
226 
230  KPageWidget *pageWidget();
231 
235  const KPageWidget *pageWidget() const;
236 
245  void setPageWidget(KPageWidget *widget);
246 
250  QDialogButtonBox *buttonBox();
251 
255  const QDialogButtonBox *buttonBox() const;
256 
265  void setButtonBox(QDialogButtonBox *box);
266 
267 protected:
268  KPageDialogPrivate *const d_ptr;
269 };
270 
271 #endif
A dialog base class which can handle multiple pages.
Definition: kpagedialog.h:54
FaceType
The face types supported.
Definition: kpagedialog.h:64
A tree list is used as navigation view.
Definition: kpageview.h:79
An icon list is used as navigation view.
Definition: kpageview.h:75
No navigation view will be visible and only the first page of the model will be shown.
Definition: kpageview.h:71
Page widget with many layouts (faces).
Definition: kpagewidget.h:24
A tab widget is used as navigation view.
Definition: kpageview.h:83
typedef StandardButtons
KPageWidgetItem is used by KPageWidget and represents a page.
Depending on the number of pages in the model, the Plain (one page), the List (several pages) or the ...
Definition: kpageview.h:66
typedef WindowFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jul 4 2020 22:44:23 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.