| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Types | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
Digikam::DConfigDlgView Class Reference

A base class which can handle multiple pages. More...

Inheritance diagram for Digikam::DConfigDlgView:

## 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 &current, 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

## Detailed Description

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.

See also
  DConfigDlgWdg

## Member Enumeration Documentation

## ◆ FaceType

enum Digikam::DConfigDlgView::FaceType

- Auto - Depending on the number of pages in the model, the Plain (one page), the List (several pages) or the Tree face (nested pages) will be used. This is the default face type.
- Plain - No navigation view will be visible and only the first page of the model will be shown.

- List - An icon list is used as navigation view.

- Tree - A tree list is used as navigation view.

- Tabbed - A tab widget is used as navigation view.

## Member Function Documentation

## ◆ createView()

QAbstractItemView * Digikam::DConfigDlgView::createView | ( |  | ) |
| protected virtual

This method can be reimplemented to provide custom navigation views.

## ◆ setCurrentIndex()

void Digikam::DConfigDlgView::setCurrentIndex | ( | const QModelIndex & | index | ) |

Parameters

  index | to be the current page and emits the

See also
  currentPageChanged signal.

## ◆ setItemDelegate()

void Digikam::DConfigDlgView::setItemDelegate | ( | QAbstractItemDelegate * | delegate | ) |

Parameters

  delegate | which can be used customize the page view.

## ◆ setModel()

void Digikam::DConfigDlgView::setModel | ( | QAbstractItemModel * | model | ) |

The model has to provide data for the roles defined in DConfigDlgModel::Role.

## ◆ showPageHeader()

bool Digikam::DConfigDlgView::showPageHeader | ( |  | ) | const
| protected virtual

This method can be reimplemented for adapting custom views.

## ◆ signalCurrentPageChanged

void Digikam::DConfigDlgView::signalCurrentPageChanged | ( | const QModelIndex & | current,
|  | const QModelIndex & | previous
| ) |  |
| signal

The previous page index is replaced by the current index.

## ◆ viewPosition()

Qt::Alignment Digikam::DConfigDlgView::viewPosition | ( |  | ) | const
| protected virtual

This method can be reimplemented for adapting custom views.