KWidgetsAddons
kpagewidgetmodel.cpp
431KPageWidgetItem *KPageWidgetModel::insertPage(KPageWidgetItem *before, QWidget *widget, const QString &name)
474KPageWidgetItem *KPageWidgetModel::addSubPage(KPageWidgetItem *parent, QWidget *widget, const QString &name)
KPageWidgetItem is used by KPageWidget and represents a page.
Definition kpagewidgetmodel.h:38
void setHeaderVisible(bool visible)
Set whether the page should show the header title.
Definition kpagewidgetmodel.cpp:95
void setName(const QString &name)
Sets the name of the item as shown in the navigation view of the page widget.
Definition kpagewidgetmodel.cpp:107
bool isEnabled() const
Returns whether the page widget item is enabled.
Definition kpagewidgetmodel.cpp:85
void setChecked(bool checked)
Sets whether the page widget item is checked.
Definition kpagewidgetmodel.cpp:155
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:150
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:163
void setIcon(const QIcon &icon)
Sets the icon of the page widget item.
Definition kpagewidgetmodel.cpp:131
QWidget * widget() const
Returns the widget of the page widget item.
Definition kpagewidgetmodel.cpp:102
void setEnabled(bool)
Sets whether the page widget item is enabled.
Definition kpagewidgetmodel.cpp:76
void setCheckable(bool checkable)
Sets whether the page widget item is checkable in the view.
Definition kpagewidgetmodel.cpp:143
bool isHeaderVisible() const
Returns whether the page will show the header title.
Definition kpagewidgetmodel.cpp:90
void setHeader(const QString &header)
Sets the header of the page widget item.
Definition kpagewidgetmodel.cpp:119
This page model is used by KPageWidget to provide a hierarchical layout of pages.
Definition kpagewidgetmodel.h:191
KPageWidgetItem * insertPage(KPageWidgetItem *before, QWidget *widget, const QString &name)
Inserts a new page in the model.
Definition kpagewidgetmodel.cpp:431
KPageWidgetItem * addPage(QWidget *widget, const QString &name)
Adds a new top level page to the model.
Definition kpagewidgetmodel.cpp:401
void removePage(KPageWidgetItem *item)
Removes the page associated with the given KPageWidgetItem.
Definition kpagewidgetmodel.cpp:516
int columnCount(const QModelIndex &parent=QModelIndex()) const override
These methods are reimplemented from QAbstractItemModel.
Definition kpagewidgetmodel.cpp:267
KPageWidgetModel(QObject *parent=nullptr)
Creates a new page widget model.
Definition kpagewidgetmodel.cpp:258
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:553
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:474
QString name(StandardShortcut id)
void beginInsertRows(const QModelIndex &parent, int first, int last)
void beginRemoveRows(const QModelIndex &parent, int first, int last)
QModelIndex createIndex(int row, int column, const void *ptr) const const
void endInsertRows()
void endRemoveRows()
void layoutAboutToBeChanged(const QList< QPersistentModelIndex > &parents, QAbstractItemModel::LayoutChangeHint hint)
void layoutChanged(const QList< QPersistentModelIndex > &parents, QAbstractItemModel::LayoutChangeHint hint)
void * internalPointer() const const
bool isValid() const const
int row() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
T findChild(const QString &name, Qt::FindChildOptions options) const const
QObject * parent() const const
T qobject_cast(QObject *object)
Checked
DisplayRole
typedef ItemFlags
QVariant fromValue(T &&value)
int toInt(bool *ok) const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.