![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
A base class which can handle multiple pages. More...
Public Types | |
enum | FaceType { Auto , Plain , List , Tree , Tabbed } |
This enum is used to decide which type of navigation view shall be used in the page view. More... | |
Signals | |
void | signalCurrentPageChanged (const QModelIndex ¤t, const QModelIndex &previous) |
This signal is emitted whenever the current page changes. | |
Public Member Functions | |
DConfigDlgView (QWidget *const parent=nullptr) | |
Creates a page view with given parent. | |
~DConfigDlgView () override | |
Destroys the page view. | |
QModelIndex | currentIndex () const |
Returns the index for the current page or an invalid index if no current page exists. | |
FaceType | faceType () const |
Returns the face type of the page view. | |
QAbstractItemDelegate * | itemDelegate () const |
Returns the item delegate of the page view. | |
QAbstractItemModel * | model () const |
Returns the model of the page view. | |
void | setCurrentIndex (const QModelIndex &index) |
Sets the page with. | |
void | setDefaultWidget (QWidget *widget) |
Sets the widget which will be shown when a page is selected that has no own widget set. | |
void | setFaceType (FaceType faceType) |
Sets the face type of the page view. | |
void | setItemDelegate (QAbstractItemDelegate *delegate) |
Sets the item. | |
void | setModel (QAbstractItemModel *model) |
Sets the model of the page view. | |
Protected Member Functions | |
DConfigDlgView (DConfigDlgViewPrivate &dd, QWidget *const parent) | |
virtual QAbstractItemView * | createView () |
Returns the navigation view, depending on the current face type. | |
virtual bool | showPageHeader () const |
Returns whether the page header should be visible. | |
virtual Qt::Alignment | viewPosition () const |
Returns the position where the navigation view should be located according to the page stack. | |
Protected Attributes | |
DConfigDlgViewPrivate *const | d_ptr |
Properties | |
FaceType | faceType |
This class provides a widget 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.
|
protectedvirtual |
This method can be reimplemented to provide custom navigation views.
void Digikam::DConfigDlgView::setCurrentIndex | ( | const QModelIndex & | index | ) |
index | to be the current page and emits the |
void Digikam::DConfigDlgView::setItemDelegate | ( | QAbstractItemDelegate * | delegate | ) |
delegate | which can be used customize the page view. |
void Digikam::DConfigDlgView::setModel | ( | QAbstractItemModel * | model | ) |
The model has to provide data for the roles defined in DConfigDlgModel::Role.
|
protectedvirtual |
This method can be reimplemented for adapting custom views.
|
signal |
The previous page index is replaced by the current index.
|
protectedvirtual |
This method can be reimplemented for adapting custom views.