digiKam
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
}
 

Signals

void currentPageChanged (const QModelIndex &current, 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
 

Detailed Description

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.

See also
DConfigDlgWdg

Member Enumeration Documentation

◆ FaceType

This enum is used to decide which type of navigation view shall be used in the page view.

  • 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.
Enumerator
Auto 
Plain 
List 
Tree 
Tabbed 

Constructor & Destructor Documentation

◆ DConfigDlgView() [1/2]

Digikam::DConfigDlgView::DConfigDlgView ( QWidget *const  parent = nullptr)
explicit

Creates a page view with given parent.

References d_ptr.

◆ ~DConfigDlgView()

Digikam::DConfigDlgView::~DConfigDlgView ( )
override

Destroys the page view.

References d_ptr.

◆ DConfigDlgView() [2/2]

Digikam::DConfigDlgView::DConfigDlgView ( DConfigDlgViewPrivate dd,
QWidget *const  parent 
)
protected

References d_ptr.

Member Function Documentation

◆ createView()

QAbstractItemView * Digikam::DConfigDlgView::createView ( )
protectedvirtual

Returns the navigation view, depending on the current face type.

This method can be reimplemented to provide custom navigation views.

References Auto, faceType, List, Plain, Tabbed, and Tree.

◆ currentPage()

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().

◆ currentPageChanged

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

This signal is emitted whenever the current page changes. The previous page index is replaced by the current index.

◆ faceType()

DConfigDlgView::FaceType Digikam::DConfigDlgView::faceType ( ) const

Returns the face type of the page view.

◆ itemDelegate()

QAbstractItemDelegate * Digikam::DConfigDlgView::itemDelegate ( ) const

Returns the item delegate of the page view.

◆ model()

QAbstractItemModel * Digikam::DConfigDlgView::model ( ) const

Returns the model of the page view.

Referenced by setModel().

◆ setCurrentPage()

void Digikam::DConfigDlgView::setCurrentPage ( const QModelIndex &  index)

Sets the page with

Parameters
indexto be the current page and emits the
See also
currentPageChanged signal.

Referenced by Digikam::DConfigDlgWdg::setCurrentPage().

◆ setDefaultWidget()

void Digikam::DConfigDlgView::setDefaultWidget ( QWidget *  widget)

Sets the widget which will be shown when a page is selected that has no own widget set.

◆ setFaceType()

void Digikam::DConfigDlgView::setFaceType ( FaceType  faceType)

Sets the face type of the page view.

References faceType.

◆ setItemDelegate()

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

Sets the item

Parameters
delegatewhich can be used customize the page view.

◆ setModel()

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().

◆ showPageHeader()

bool Digikam::DConfigDlgView::showPageHeader ( ) const
protectedvirtual

Returns whether the page header should be visible.

This method can be reimplemented for adapting custom views.

References Auto, faceType, and Tabbed.

◆ viewPosition()

Qt::Alignment Digikam::DConfigDlgView::viewPosition ( ) const
protectedvirtual

Returns the position where the navigation view should be located according to the page stack.

This method can be reimplemented for adapting custom views.

References Auto, faceType, Plain, and Tabbed.

Member Data Documentation

◆ d_ptr

DConfigDlgViewPrivate* const Digikam::DConfigDlgView::d_ptr
protected

Referenced by DConfigDlgView(), and ~DConfigDlgView().

Property Documentation

◆ faceType

FaceType Digikam::DConfigDlgView::faceType
readwrite

The documentation for this class was generated from the following files: