MauiKit File Browsing
tagslist.cpp
27 this->list = std::accumulate(this->m_urls.constBegin(), this->m_urls.constEnd(), FMH::MODEL_LIST(), [this](FMH::MODEL_LIST &list, const QString &url) {
59void TagsList::updateToUrls(const QStringList &tags) //if there is only one url update the tags if there are more than one url then add the new tags
170 this->append(FMH::MODEL {{FMH::MODEL_KEY::TAG, tag}, {FMH::MODEL_KEY::ICON, QStringLiteral("tag")}});
void preItemAppended()
void postItemAppended()
void preItemRemoved(int index)
void preListChanged()
void postListChanged()
void postItemRemoved()
int indexOf(const FMH::MODEL_KEY &key, const QString &value) const
bool exists(const FMH::MODEL_KEY &key, const QString &value) const
void urlTagged(QString url, QString tag)
Emitted when a tag has been assigened to a file URL.
bool tagUrl(const QString &url, const QString &tag, const QString &color=QString(), const QString &comment=QString())
Adds a tag to a given file URL, if the given tag doesn't exists then it gets created.
Definition tagging.cpp:164
bool updateUrlTags(const QString &url, const QStringList &tags, const bool &strict=false)
Updates the tags associated to a file URL.
Definition tagging.cpp:193
bool removeUrlTag(const QString &url, const QString &tag)
Removes a given tag associated to a given file URL.
Definition tagging.cpp:257
void urlTagRemoved(QString tag, QString url)
Emitted when a tag has been dissociated from a file URL.
QML_ELEMENTbool strict
Whether the retrieved tags should be only associated to the current application or to any other app.
Definition tagslist.h:29
void updateToUrls(const QStringList &tags)
Updates a list of tags associated to the current file URLs.
Definition tagslist.cpp:59
bool remove(const int &index)
Removes a tag from the model at a given index.
Definition tagslist.cpp:103
void appendItem(const QVariantMap &tag)
Adds a given tag map to the model, if the tag map already exists in the model then nothing happens.
Definition tagslist.cpp:173
void removeFromUrls(const int &index)
Removes a tag at a given index in the model from the all the file URLs currently set.
Definition tagslist.cpp:79
bool contains(const QString &tag)
Checks whether a given tag name is already in the model list.
Definition tagslist.cpp:197
void removeFrom(const int &index, const QString &url)
Removes a tag at the given index in the model from the given file URL.
Definition tagslist.cpp:116
void insertToUrls(const QString &tag)
Associates a given tag to the current file URLs set to the URLs property.
Definition tagslist.cpp:50
void refresh()
Reloads the model, checking the tags from the given list of file URLs.
Definition tagslist.cpp:37
const FMH::MODEL_LIST toModelList(const QVariantList &list)
const QStringList modelToList(const MODEL_LIST &list, const MODEL_KEY &key)
const FMH::MODEL toModel(const QVariantMap &map)
void clear()
const_iterator constBegin() const const
T & first()
bool isEmpty() const const
void removeAt(qsizetype i)
qsizetype size() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QString trimmed() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
void start()
void timeout()
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 3 2025 11:50:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 3 2025 11:50:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.