digiKam
dconfigdlg.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2009-11-03
7  * Description : A dialog base class which can handle multiple pages.
8  *
9  * Copyright (C) 2009-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 1999-2001 by Mirko Boehm <mirko at kde dot org>
11  * Copyright (C) 1999-2001 by Espen Sand <espen at kde dot org>
12  * Copyright (C) 1999-2001 by Holger Freyther <freyther at kde dot org>
13  * Copyright (C) 2005-2006 by Olivier Goffart <ogoffart at kde dot org>
14  * Copyright (C) 2006 by Tobias Koenig <tokoe at kde dot org>
15  *
16  * This program is free software; you can redistribute it
17  * and/or modify it under the terms of the GNU General
18  * Public License as published by the Free Software Foundation;
19  * either version 2, or (at your option)
20  * any later version.
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU General Public License for more details.
26  *
27  * ============================================================ */
28 
29 #ifndef DIGIKAM_DCONFIG_DLG_H
30 #define DIGIKAM_DCONFIG_DLG_H
31 
32 // Qt includes
33 
34 #include <QDialog>
35 #include <QDialogButtonBox>
36 
37 // Local includes
38 
39 #include "dconfigdlgwidgets.h"
40 #include "digikam_export.h"
41 
42 namespace Digikam
43 {
44 
45 class DConfigDlgPrivate;
46 
58 class DIGIKAM_EXPORT DConfigDlg : public QDialog
59 {
60  Q_OBJECT
61  Q_DECLARE_PRIVATE(DConfigDlg)
62 
63 public:
64 
80  enum FaceType
81  {
86  Tabbed = DConfigDlgView::Tabbed
87  };
88 
89 public:
90 
94  explicit DConfigDlg(QWidget* const parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
95 
99  ~DConfigDlg() override;
100 
104  void setFaceType(FaceType faceType);
105 
114  DConfigDlgWdgItem* addPage(QWidget* const widget, const QString& name);
115 
121  void addPage(DConfigDlgWdgItem* const item);
122 
133  DConfigDlgWdgItem* insertPage(DConfigDlgWdgItem* const before, QWidget* const widget, const QString& name);
134 
143  void insertPage(DConfigDlgWdgItem* const before, DConfigDlgWdgItem* const item);
144 
154  DConfigDlgWdgItem* addSubPage(DConfigDlgWdgItem* const parent, QWidget* const widget, const QString& name);
155 
163  void addSubPage(DConfigDlgWdgItem* const parent, DConfigDlgWdgItem* const item);
164 
168  void removePage(DConfigDlgWdgItem* const item);
169 
174  void setCurrentPage(DConfigDlgWdgItem* const item);
175 
180  DConfigDlgWdgItem* currentPage() const;
181 
185  void setStandardButtons(QDialogButtonBox::StandardButtons buttons);
186 
191  QPushButton* button(QDialogButtonBox::StandardButton which) const;
192 
196  void addActionButton(QAbstractButton* const button);
197 
198 Q_SIGNALS:
199 
206 
213 
214 protected:
215 
222  DConfigDlg(DConfigDlgWdg* const widget, QWidget* const parent, Qt::WindowFlags flags = Qt::WindowFlags());
223  DConfigDlg(DConfigDlgPrivate& dd, DConfigDlgWdg* const widget, QWidget* const parent, Qt::WindowFlags flags = Qt::WindowFlags());
224 
228  DConfigDlgWdg* pageWidget();
229 
233  const DConfigDlgWdg* pageWidget() const;
234 
243  void setPageWidget(DConfigDlgWdg* const widget);
244 
248  QDialogButtonBox* buttonBox();
249 
253  const QDialogButtonBox* buttonBox() const;
254 
263  void setButtonBox(QDialogButtonBox* const box);
264 
265 protected:
266 
267  DConfigDlgPrivate* const d_ptr;
268 };
269 
270 } // namespace Digikam
271 
272 #endif // DIGIKAM_DCONFIG_DLG_H
@ Tree
Definition: dconfigdlgview.h:88
@ List
Definition: dconfigdlgview.h:87
@ Tabbed
Definition: dconfigdlgview.h:89
@ Auto
Definition: dconfigdlgview.h:85
@ Plain
Definition: dconfigdlgview.h:86
Definition: dconfigdlgmodels.h:105
Page widget with many layouts (faces).
Definition: dconfigdlgwidgets.h:48
A dialog base class which can handle multiple pages.
Definition: dconfigdlg.h:59
void currentPageChanged(DConfigDlgWdgItem *current, DConfigDlgWdgItem *before)
void pageRemoved(DConfigDlgWdgItem *page)
DConfigDlgPrivate *const d_ptr
Definition: dconfigdlg.h:267
FaceType
Definition: dconfigdlg.h:81
Definition: datefolderview.cpp:43