KWidgetsAddons
kpagewidgetmodel.h
305 bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
307 QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
KPageModel(QObject *parent=nullptr)
Constructs a page model with the given parent.
Definition kpagemodel.cpp:15
KPageWidgetItem is used by KPageWidget and represents a page.
Definition kpagewidgetmodel.h:39
void setHeaderVisible(bool visible)
Set whether the page should show the header title.
Definition kpagewidgetmodel.cpp:96
void setName(const QString &name)
Sets the name of the item as shown in the navigation view of the page widget.
Definition kpagewidgetmodel.cpp:108
bool isEnabled() const
Returns whether the page widget item is enabled.
Definition kpagewidgetmodel.cpp:86
void setChecked(bool checked)
Sets whether the page widget item is checked.
Definition kpagewidgetmodel.cpp:156
void changed()
This signal is emitted whenever the icon or header is changed.
bool isCheckable() const
Returns whether the page widget item is checkable.
Definition kpagewidgetmodel.cpp:151
void toggled(bool checked)
This signal is emitted whenever the user checks or unchecks the item of setChecked() is called.
bool isChecked() const
Returns whether the page widget item is checked.
Definition kpagewidgetmodel.cpp:164
void actionsChanged()
This signal is emitted whenever the actions associated to the page are changed.
void setIcon(const QIcon &icon)
Sets the icon of the page widget item.
Definition kpagewidgetmodel.cpp:132
QWidget * widget() const
Returns the widget of the page widget item.
Definition kpagewidgetmodel.cpp:103
void setActions(QList< QAction * > actions)
Set the actions associated to the page.
Definition kpagewidgetmodel.cpp:174
void setEnabled(bool)
Sets whether the page widget item is enabled.
Definition kpagewidgetmodel.cpp:77
QList< QAction * > actions
This property holds the actions associated to the page.
Definition kpagewidgetmodel.h:63
void setCheckable(bool checkable)
Sets whether the page widget item is checkable in the view.
Definition kpagewidgetmodel.cpp:144
bool isHeaderVisible() const
Returns whether the page will show the header title.
Definition kpagewidgetmodel.cpp:91
void setHeader(const QString &header)
Sets the header of the page widget item.
Definition kpagewidgetmodel.cpp:120
KPageWidgetItem * insertPage(KPageWidgetItem *before, QWidget *widget, const QString &name)
Inserts a new page in the model.
Definition kpagewidgetmodel.cpp:448
KPageWidgetItem * addPage(QWidget *widget, const QString &name)
Adds a new top level page to the model.
Definition kpagewidgetmodel.cpp:418
void removePage(KPageWidgetItem *item)
Removes the page associated with the given KPageWidgetItem.
Definition kpagewidgetmodel.cpp:533
int columnCount(const QModelIndex &parent=QModelIndex()) const override
These methods are reimplemented from QAbstractItemModel.
Definition kpagewidgetmodel.cpp:282
KPageWidgetModel(QObject *parent=nullptr)
Creates a new page widget model.
Definition kpagewidgetmodel.cpp:273
KPageWidgetItem * item(const QModelIndex &index) const
Returns the KPageWidgetItem for a given index or a null pointer if the index is invalid.
Definition kpagewidgetmodel.cpp:570
void toggled(KPageWidgetItem *page, bool checked)
This signal is emitted whenever a checkable page changes its state.
KPageWidgetItem * addSubPage(KPageWidgetItem *parent, QWidget *widget, const QString &name)
Inserts a new sub page in the model.
Definition kpagewidgetmodel.cpp:491
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
DisplayRole
typedef ItemFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:56:58 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:56:58 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.