digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::DConfigDlgWdgModel Class Reference

This page model is used by. More...

Inheritance diagram for Digikam::DConfigDlgWdgModel:

Signals

void toggled (DConfigDlgWdgItem *page, bool checked)
 This signal is emitted whenever a checkable page changes its state.

Public Member Functions

 DConfigDlgWdgModel (QObject *const parent=nullptr)
 Creates a new page widget model.
 ~DConfigDlgWdgModel () override=default
 Destroys the page widget model.
void addPage (DConfigDlgWdgItem *item)
 Adds a new top level page to the model.
DConfigDlgWdgItem * addPage (QWidget *widget, const QString &name)
 Adds a new top level page to the model.
void addSubPage (DConfigDlgWdgItem *parent, DConfigDlgWdgItem *item)
 Inserts a new sub page in the model.
DConfigDlgWdgItem * addSubPage (DConfigDlgWdgItem *parent, QWidget *widget, const QString &name)
 Inserts a new sub page in the model.
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 These methods are reimplemented from QAbstractItemModel.
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
Qt::ItemFlags flags (const QModelIndex &index) const override
QModelIndex index (const DConfigDlgWdgItem *item) const
 Returns the index for a given.
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
void insertPage (DConfigDlgWdgItem *before, DConfigDlgWdgItem *item)
 Inserts a new page in the model.
DConfigDlgWdgItem * insertPage (DConfigDlgWdgItem *before, QWidget *widget, const QString &name)
 Inserts a new page in the model.
DConfigDlgWdgItem * item (const QModelIndex &index) const
 Returns the.
QModelIndex parent (const QModelIndex &index) const override
void removePage (DConfigDlgWdgItem *item)
 Removes the page associated with the given.
int rowCount (const QModelIndex &parent=QModelIndex()) const override
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Public Member Functions inherited from Digikam::DConfigDlgModel
 DConfigDlgModel (QObject *const parent=nullptr)
 Constructs a page model with the given parent.
 ~DConfigDlgModel () override
 Destroys the page model.

Additional Inherited Members

Public Types inherited from Digikam::DConfigDlgModel
enum  Role { HeaderRole = Qt::UserRole + 1 , WidgetRole }
 Additional roles that DConfigDlgView uses. More...
Protected Member Functions inherited from Digikam::DConfigDlgModel
 DConfigDlgModel (DConfigDlgModelPrivate &dd, QObject *const parent)
Protected Attributes inherited from Digikam::DConfigDlgModel
DConfigDlgModelPrivate *const d_ptr

Detailed Description

See also
DConfigDlgWdg to provide a hierarchical layout of pages.

Constructor & Destructor Documentation

◆ DConfigDlgWdgModel()

Digikam::DConfigDlgWdgModel::DConfigDlgWdgModel ( QObject *const parent = nullptr)
explicit
Parameters
parentThe parent object.

Member Function Documentation

◆ addPage() [1/2]

void Digikam::DConfigDlgWdgModel::addPage ( DConfigDlgWdgItem * item)
Parameters
itemThe
See also
DConfigDlgWdgItem which describes the page.

◆ addPage() [2/2]

DConfigDlgWdgItem * Digikam::DConfigDlgWdgModel::addPage ( QWidget * widget,
const QString & name )
Parameters
widgetThe widget of the page.
nameThe name which is displayed in the navigation view.
Returns
The associated
See also
DConfigDlgWdgItem.

◆ addSubPage() [1/2]

void Digikam::DConfigDlgWdgModel::addSubPage ( DConfigDlgWdgItem * parent,
DConfigDlgWdgItem * item )
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::DConfigDlgWdgModel::addSubPage ( DConfigDlgWdgItem * parent,
QWidget * widget,
const QString & name )
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.

◆ index()

QModelIndex Digikam::DConfigDlgWdgModel::index ( const DConfigDlgWdgItem * item) const
See also
DConfigDlgWdgItem. The index is invalid if the item cannot be found in the model.

◆ insertPage() [1/2]

void Digikam::DConfigDlgWdgModel::insertPage ( DConfigDlgWdgItem * before,
DConfigDlgWdgItem * item )
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::DConfigDlgWdgModel::insertPage ( DConfigDlgWdgItem * before,
QWidget * widget,
const QString & name )
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.

◆ item()

DConfigDlgWdgItem * Digikam::DConfigDlgWdgModel::item ( const QModelIndex & index) const
See also
DConfigDlgWdgItem for a given index or 0 if the index is invalid.

◆ removePage()

void Digikam::DConfigDlgWdgModel::removePage ( DConfigDlgWdgItem * item)

◆ toggled

void Digikam::DConfigDlgWdgModel::toggled ( DConfigDlgWdgItem * page,
bool checked )
signal
Parameters
checkedis true when the
pageis checked, or false if the
pageis unchecked.