digiKam
Digikam::DConfigDlgWdg Class Reference

Page widget with many layouts (faces). More...

+ Inheritance diagram for Digikam::DConfigDlgWdg:

Public Types

enum  FaceType {
  Auto , Plain , List , Tree ,
  Tabbed
}
 

Signals

void currentPageChanged (const QModelIndex &current, const QModelIndex &previous)
 
void currentPageChanged (DConfigDlgWdgItem *current, DConfigDlgWdgItem *before)
 
void pageRemoved (DConfigDlgWdgItem *page)
 
void pageToggled (DConfigDlgWdgItem *page, bool checked)
 

Public Member Functions

void addPage (DConfigDlgWdgItem *item)
 
DConfigDlgWdgItemaddPage (QWidget *widget, const QString &name)
 
void addSubPage (DConfigDlgWdgItem *parent, DConfigDlgWdgItem *item)
 
DConfigDlgWdgItemaddSubPage (DConfigDlgWdgItem *parent, QWidget *widget, const QString &name)
 
DConfigDlgWdgItemcurrentPage () const
 
 DConfigDlgWdg (QWidget *const parent=nullptr)
 
FaceType faceType () const
 
void insertPage (DConfigDlgWdgItem *before, DConfigDlgWdgItem *item)
 
DConfigDlgWdgIteminsertPage (DConfigDlgWdgItem *before, QWidget *widget, const QString &name)
 
QAbstractItemDelegate * itemDelegate () const
 
QAbstractItemModel * model () const
 
void removePage (DConfigDlgWdgItem *item)
 
void setCurrentPage (const QModelIndex &index)
 
void setCurrentPage (DConfigDlgWdgItem *item)
 
void setDefaultWidget (QWidget *widget)
 
void setFaceType (FaceType faceType)
 
void setItemDelegate (QAbstractItemDelegate *delegate)
 
void setModel (QAbstractItemModel *model)
 
 ~DConfigDlgWdg () override
 

Protected Member Functions

virtual QAbstractItemView * createView ()
 
 DConfigDlgWdg (DConfigDlgWdgPrivate &dd, QWidget *const parent)
 
virtual bool showPageHeader () const
 
virtual Qt::Alignment viewPosition () const
 

Protected Attributes

DConfigDlgViewPrivate *const d_ptr
 

Properties

FaceType faceType
 

Detailed Description

Page widget with many layouts (faces).

See also
DConfigDlgView with hierarchical page model.

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

◆ DConfigDlgWdg() [1/2]

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

Creates a new page widget.

Parameters
parentThe parent widget.

References currentPageChanged(), pageToggled(), Digikam::DConfigDlgView::setModel(), and Digikam::DConfigDlgWdgModel::toggled().

◆ ~DConfigDlgWdg()

Digikam::DConfigDlgWdg::~DConfigDlgWdg ( )
override

Destroys the page widget.

◆ DConfigDlgWdg() [2/2]

Digikam::DConfigDlgWdg::DConfigDlgWdg ( DConfigDlgWdgPrivate dd,
QWidget *const  parent 
)
protected

Member Function Documentation

◆ addPage() [1/2]

void Digikam::DConfigDlgWdg::addPage ( DConfigDlgWdgItem item)

Adds a new top level page to the widget.

Parameters
itemThe
See also
DConfigDlgWdgItem which describes the page.

◆ addPage() [2/2]

DConfigDlgWdgItem * Digikam::DConfigDlgWdg::addPage ( QWidget *  widget,
const QString &  name 
)

Adds a new top level page to the widget.

Parameters
widgetThe widget of the page.
nameThe name which is displayed in the navigation view.
Returns
The associated
See also
DConfigDlgWdgItem.

Referenced by DigikamGenericMetadataEditPlugin::EXIFEditWidget::EXIFEditWidget(), DigikamGenericMetadataEditPlugin::IPTCEditWidget::IPTCEditWidget(), and DigikamGenericMetadataEditPlugin::XMPEditWidget::XMPEditWidget().

◆ addSubPage() [1/2]

void Digikam::DConfigDlgWdg::addSubPage ( DConfigDlgWdgItem parent,
DConfigDlgWdgItem item 
)

Inserts a new sub page in the widget.

Parameters
parentThe new page will be insert as child of this
See also
DConfigDlgWdgItem.
Parameters
itemThe
See also
DConfigDlgWdgItem which describes the page.

◆ addSubPage() [2/2]

DConfigDlgWdgItem * Digikam::DConfigDlgWdg::addSubPage ( DConfigDlgWdgItem parent,
QWidget *  widget,
const QString &  name 
)

Inserts a new sub page in the widget.

Parameters
parentThe new page will be insert as child of this
See also
DConfigDlgWdgItem.
Parameters
widgetThe widget of the page.
nameThe name which is displayed in the navigation view.
Returns
The associated
See also
DConfigDlgWdgItem.

◆ createView()

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

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

This method can be reimplemented to provide custom navigation views.

References Digikam::DConfigDlgView::Auto, Digikam::DConfigDlgView::faceType, Digikam::DConfigDlgView::List, Digikam::DConfigDlgView::Plain, Digikam::DConfigDlgView::Tabbed, and Digikam::DConfigDlgView::Tree.

◆ currentPage()

DConfigDlgWdgItem * Digikam::DConfigDlgWdg::currentPage ( ) const

Returns the

See also
DConfigDlgWdgItem for the current page or 0 if there is no current page.

References Digikam::DConfigDlgView::currentPage().

◆ currentPageChanged [1/2]

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

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

◆ currentPageChanged [2/2]

void Digikam::DConfigDlgWdg::currentPageChanged ( DConfigDlgWdgItem current,
DConfigDlgWdgItem before 
)
signal

This signal is emitted whenever the current page has changed.

Parameters
currentThe new current page or 0 if no current page is available.

Referenced by DConfigDlgWdg().

◆ faceType()

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

Returns the face type of the page view.

◆ insertPage() [1/2]

void Digikam::DConfigDlgWdg::insertPage ( DConfigDlgWdgItem before,
DConfigDlgWdgItem item 
)

Inserts a new page in the widget.

Parameters
beforeThe new page will be insert before this
See also
DConfigDlgWdgItem on the same level in hierarchy.
Parameters
itemThe
See also
DConfigDlgWdgItem which describes the page.

◆ insertPage() [2/2]

DConfigDlgWdgItem * Digikam::DConfigDlgWdg::insertPage ( DConfigDlgWdgItem before,
QWidget *  widget,
const QString &  name 
)

Inserts a new page in the widget.

Parameters
beforeThe new page will be insert before this
See also
DConfigDlgWdgItem on the same level in hierarchy.
Parameters
widgetThe widget of the page.
nameThe name which is displayed in the navigation view.
Returns
The associated
See also
DConfigDlgWdgItem.

◆ itemDelegate()

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

Returns the item delegate of the page view.

◆ model()

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

Returns the model of the page view.

Referenced by Digikam::DConfigDlgView::setModel().

◆ pageRemoved

void Digikam::DConfigDlgWdg::pageRemoved ( DConfigDlgWdgItem page)
signal

This signal is emitted when a page is removed.

Parameters
pageThe page which is removed

Referenced by removePage().

◆ pageToggled

void Digikam::DConfigDlgWdg::pageToggled ( DConfigDlgWdgItem page,
bool  checked 
)
signal

This signal is emitted whenever a checkable page changes its state.

Parameters
checkedis true when the
pageis checked, or false if the
pageis unchecked.

Referenced by DConfigDlgWdg().

◆ removePage()

void Digikam::DConfigDlgWdg::removePage ( DConfigDlgWdgItem item)

Removes the page associated with the given

See also
DConfigDlgWdgItem.

References pageRemoved().

◆ setCurrentPage() [1/2]

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

Sets the page with

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

Referenced by setCurrentPage().

◆ setCurrentPage() [2/2]

void Digikam::DConfigDlgWdg::setCurrentPage ( DConfigDlgWdgItem item)

Sets the page which is associated with the given

See also
DConfigDlgWdgItem to be the current page and emits the currentPageChanged() signal.

References Digikam::DConfigDlgView::setCurrentPage().

◆ setDefaultWidget()

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

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)
inherited

Sets the face type of the page view.

References Digikam::DConfigDlgView::faceType.

◆ setItemDelegate()

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

Sets the item

Parameters
delegatewhich can be used customize the page view.

◆ setModel()

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

Sets the model of the page view.

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

References Digikam::DConfigDlgView::model().

Referenced by DConfigDlgWdg().

◆ showPageHeader()

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

Returns whether the page header should be visible.

This method can be reimplemented for adapting custom views.

References Digikam::DConfigDlgView::Auto, Digikam::DConfigDlgView::faceType, and Digikam::DConfigDlgView::Tabbed.

◆ viewPosition()

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

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 Digikam::DConfigDlgView::Auto, Digikam::DConfigDlgView::faceType, Digikam::DConfigDlgView::Plain, and Digikam::DConfigDlgView::Tabbed.

Member Data Documentation

◆ d_ptr

DConfigDlgViewPrivate* const Digikam::DConfigDlgView::d_ptr
protectedinherited

Property Documentation

◆ faceType


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