digiKam
Loading...
Searching...
No Matches
dconfigdlgview.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 * SPDX-FileCopyrightText: 2009-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2006 by Tobias Koenig <tokoe at kde dot org>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16#pragma once
17
18// Qt includes
19
20#include <QWidget>
21
22// Local includes
23
24#include "digikam_export.h"
25
26class QAbstractItemDelegate;
27class QAbstractItemView;
28class QModelIndex;
29class QAbstractItemModel;
30
31namespace Digikam
32{
33
34class DConfigDlgViewPrivate;
35class DConfigDlgModel;
36
48class DIGIKAM_EXPORT DConfigDlgView : public QWidget
49{
50 Q_OBJECT
51 Q_PROPERTY(FaceType faceType READ faceType WRITE setFaceType)
52 Q_DECLARE_PRIVATE(DConfigDlgView)
53
54public:
55
74 {
79 Tabbed
80 };
81 Q_ENUM(FaceType)
82
83public:
84
88 explicit DConfigDlgView(QWidget* const parent = nullptr);
89
93 ~DConfigDlgView() override;
94
100 void setModel(QAbstractItemModel* model);
101
105 QAbstractItemModel* model() const;
106
110 void setFaceType(FaceType faceType);
111
115 FaceType faceType() const;
116
121 void setCurrentPage(const QModelIndex& index);
122
127 QModelIndex currentPage() const;
128
133 void setItemDelegate(QAbstractItemDelegate* delegate);
134
138 QAbstractItemDelegate* itemDelegate() const;
139
144 void setDefaultWidget(QWidget* widget);
145
146Q_SIGNALS:
147
152 void currentPageChanged(const QModelIndex& current, const QModelIndex& previous);
153
154protected:
155
163 virtual QAbstractItemView* createView();
164
171 virtual bool showPageHeader() const;
172
180 virtual Qt::Alignment viewPosition() const;
181
182 DConfigDlgView(DConfigDlgViewPrivate& dd, QWidget* const parent);
183
184protected:
185
187
188private:
189
190 Q_PRIVATE_SLOT(d_func(), void _k_rebuildGui())
191 Q_PRIVATE_SLOT(d_func(), void _k_modelChanged())
192 Q_PRIVATE_SLOT(d_func(), void _k_pageSelected(const QItemSelection&, const QItemSelection&))
193 Q_PRIVATE_SLOT(d_func(), void _k_dataChanged(const QModelIndex&, const QModelIndex&))
194};
195
196} // namespace Digikam
Definition dconfigdlgview_p.h:67
A base class which can handle multiple pages.
Definition dconfigdlgview.h:49
void currentPageChanged(const QModelIndex &current, const QModelIndex &previous)
DConfigDlgViewPrivate *const d_ptr
Definition dconfigdlgview.h:186
FaceType
Definition dconfigdlgview.h:74
@ Tree
Definition dconfigdlgview.h:78
@ List
Definition dconfigdlgview.h:77
@ Auto
Definition dconfigdlgview.h:75
@ Plain
Definition dconfigdlgview.h:76
Definition datefolderview.cpp:34