digiKam
|
A base class which can handle multiple pages. More...
Public Types | |
enum | FaceType { Auto , Plain , List , Tree , Tabbed } |
Signals | |
void | currentPageChanged (const QModelIndex ¤t, const QModelIndex &previous) |
Public Member Functions | |
QModelIndex | currentPage () const |
DConfigDlgView (QWidget *const parent=nullptr) | |
FaceType | faceType () const |
QAbstractItemDelegate * | itemDelegate () const |
QAbstractItemModel * | model () const |
void | setCurrentPage (const QModelIndex &index) |
void | setDefaultWidget (QWidget *widget) |
void | setFaceType (FaceType faceType) |
void | setItemDelegate (QAbstractItemDelegate *delegate) |
void | setModel (QAbstractItemModel *model) |
~DConfigDlgView () override | |
Protected Member Functions | |
virtual QAbstractItemView * | createView () |
DConfigDlgView (DConfigDlgViewPrivate &dd, QWidget *const parent) | |
virtual bool | showPageHeader () const |
virtual Qt::Alignment | viewPosition () const |
Protected Attributes | |
DConfigDlgViewPrivate *const | d_ptr |
Properties | |
FaceType | faceType |
A base class which can handle multiple pages.
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.
This enum is used to decide which type of navigation view shall be used in the page view.
Enumerator | |
---|---|
Auto | |
Plain | |
List | |
Tree | |
Tabbed |
|
explicit |
Creates a page view with given parent.
References d_ptr.
|
override |
Destroys the page view.
References d_ptr.
|
protected |
References d_ptr.
|
protectedvirtual |
QModelIndex Digikam::DConfigDlgView::currentPage | ( | ) | const |
Returns the index for the current page or an invalid index if no current page exists.
Referenced by Digikam::DConfigDlgWdg::currentPage().
|
signal |
This signal is emitted whenever the current page changes. The previous page index is replaced by the current index.
DConfigDlgView::FaceType Digikam::DConfigDlgView::faceType | ( | ) | const |
Returns the face type of the page view.
QAbstractItemDelegate * Digikam::DConfigDlgView::itemDelegate | ( | ) | const |
Returns the item delegate of the page view.
QAbstractItemModel * Digikam::DConfigDlgView::model | ( | ) | const |
Returns the model of the page view.
Referenced by setModel().
void Digikam::DConfigDlgView::setCurrentPage | ( | const QModelIndex & | index | ) |
Sets the page with
index | to be the current page and emits the |
Referenced by Digikam::DConfigDlgWdg::setCurrentPage().
void Digikam::DConfigDlgView::setDefaultWidget | ( | QWidget * | widget | ) |
Sets the widget
which will be shown when a page is selected that has no own widget set.
void Digikam::DConfigDlgView::setFaceType | ( | FaceType | faceType | ) |
Sets the face type of the page view.
References faceType.
void Digikam::DConfigDlgView::setItemDelegate | ( | QAbstractItemDelegate * | delegate | ) |
Sets the item
delegate | which can be used customize the page view. |
void Digikam::DConfigDlgView::setModel | ( | QAbstractItemModel * | model | ) |
Sets the model
of the page view.
The model has to provide data for the roles defined in DConfigDlgModel::Role.
References model().
Referenced by Digikam::DConfigDlgWdg::DConfigDlgWdg().
|
protectedvirtual |
|
protectedvirtual |
|
protected |
Referenced by DConfigDlgView(), and ~DConfigDlgView().
|
readwrite |
Referenced by createView(), setFaceType(), showPageHeader(), and viewPosition().