MauiKit Controls
mauimodel.cpp
86 qDebug() << "FILTERS" << filters << m_filters << m_filter << rx << filterCaseSensitivity() << ( filterCaseSensitivity() == Qt::CaseSensitivity::CaseSensitive);
87 QRegularExpression reg(rx, filterCaseSensitivity() == Qt::CaseSensitivity::CaseInsensitive ? QRegularExpression::CaseInsensitiveOption : QRegularExpression::NoPatternOption);
272 Q_EMIT this->dataChanged(this->m_model->index(index, 0), this->m_model->index(index, 0), roles);
364 if (role == FMH::MODEL_KEY::ADDDATE || role == FMH::MODEL_KEY::DATE || role == FMH::MODEL_KEY::MODIFIED || role == FMH::MODEL_KEY::RELEASEDATE) {
373bool MauiModel::PrivateAbstractListModel::setData(const QModelIndex &index, const QVariant &value, int role)
430bool MauiModel::moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) {
443bool MauiModel::moveRow(const QModelIndex &sourceParent, int sourceRow, const QModelIndex &destinationParent, int destinationChild) {
virtual void modelHooked()
This function is called once the MauiList has been hooked to the MauiModel, using the MauiModel::list...
Definition mauilist.h:221
void preItemAppendedAt(int index)
This signal should be emitted by the implementation before a new item has been inserted at a given in...
void preItemAppended()
This signal should be emitted by the implementation before appending a new item to the list data mode...
void updateModel(int index, QVector< int > roles)
This signal should be emitted by the implementation when changes have been done in the list data mode...
void postItemAppended()
This signal should be emitted by the implementation after one or multiple new items have finished bei...
void preItemRemoved(int index)
This signal should be emitted by the implementation before an item has been removed at the given inde...
void preItemsAppended(uint count)
This signal should be emitted by the implementation before appending a multiple new items to the list...
void itemMoved(int index, int to)
This signal should be emitted by the implementation when an item has been moved from one index positi...
void preListChanged()
This signal should be emitted by the implementation before the list data model has been assigned or p...
void postListChanged()
This signal should be emitted by the implementation after the list data model is set and done.
void postItemRemoved()
This signal should be emitted by the implementation after an item has been successfully removed from ...
void clearFilters()
Restores the model if filtered, and clears all the filters set with the filter and filters properties...
Definition mauimodel.cpp:98
int mappedFromSource(const int &index) const
Maps a given index from the base list to the model, in case the model has been filtered or sorted,...
Definition mauimodel.cpp:157
int mappedToSource(const int &) const
Given an index from the filtered or sorted model it returns the mapped index to the original list ind...
Definition mauimodel.cpp:162
bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override
ListModel::moveRows.
Definition mauimodel.cpp:430
QVariantList getAll() const
Returns all the items in the list represented as a QVariantList to be able to be used in QML.
Definition mauimodel.cpp:45
static const QHash< QString, MODEL_KEY > MODEL_NAME_KEY
The mapping of a string text into a FMH::MODEL_KEY.
Definition fmh.h:378
static const QHash< MODEL_KEY, QString > MODEL_NAME
The mapping of the FMH::MODEL_KEY enum values to its string representation.
Definition fmh.h:219
bool beginMoveRows(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild)
void beginResetModel()
void endMoveRows()
void endResetModel()
void rowsInserted(const QModelIndex &parent, int first, int last)
void rowsRemoved(const QModelIndex &parent, int first, int last)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
virtual QHash< int, QByteArray > roleNames() const const override
sourceModel
QDateTime fromString(QStringView string, QStringView format, QCalendar cal)
QList< Key > keys() const const
const_reference at(qsizetype i) const const
void clear()
qsizetype count() 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)
QObject * parent() const const
CaseInsensitiveOption
QString escape(QStringView str)
virtual QVariant data(const QModelIndex &index, int role) const const override
void setDynamicSortFilter(bool enable)
filterCaseSensitivity
void setFilterRegularExpression(const QRegularExpression ®ularExpression)
void setFilterRole(int role)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
void invalidateFilter()
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const const override
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const const override
virtual int rowCount(const QModelIndex &parent) const const override
void setFilterFixedString(const QString &pattern)
virtual void setSourceModel(QAbstractItemModel *sourceModel) override
void setSortRole(int role)
void clear()
QByteArray toUtf8() const const
DirectConnection
TextDate
DisplayRole
typedef ItemFlags
SortOrder
QFuture< void > filter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)
void * data()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.