MauiKit File Browsing
tagslist.h
11 * A model of the system tags, ready to be consumed by QML. This model has basic support for browsing, associating, adding and removing tags.
13 * This is a basic model for most actions supported by the MauiKit File Browsing Tagging system. For more details on supported actions and complete API documentation refer to the Tagging page.
26 * Whether the retrieved tags should be only associated to the current application or to any other app.
27 * By default this is set to `true`, so the lookup will be only matching tags associated to the given URLs that were created by the current application.
75 * @brief Adds a given tag to the model, if the tag already exists in the model then nothing happens.
76 * @note This operation does not inserts the tag to the tagging data base. To insert a new tag see the insert function.
83 * @brief Adds a given tag map to the model, if the tag map already exists in the model then nothing happens.
85 * @param tag the tag map to be added to the model. The supported key values are: `tag`, `color`, `date`
90 * @brief Adds a given list of tags to the model. Tags that already exists in the model are ignored.
99 * @return if the tag already exists in the data base then it return false, if the operation is successful returns true otherwise false
110 * @brief Updates a list of tags associated to the current file URLs. All the previous tags associated to each file URL are removed and replaced by the new ones
116 * @brief Removes a tag from the model at a given index. The tag is removed from the model but not from the tagging data base
117 * @param index index position of the tag in the model. If the model has been filtered or ordered using the MauiKit BaseModel then it should use the mapped index.
123 * @brief Removes a tag at the given index in the model from the given file URL. This removes the associated file URL from the tagging data base and the tag from the model
MauiList(QObject *parent=nullptr)
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
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Thu Jan 23 2025 18:53:41 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Thu Jan 23 2025 18:53:41 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.