MauiKit File Browsing
tagslist.h
14 * A model ready to be consumed by QML. Has basic support for browsing and handling, associating, adding and removing tags.
16 * 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.
29 * Whether the retrieved tags should be only associated to the current application or to any other app.
30 * 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.
76 * @brief Adds a given tag to the model, if the tag already exists in the model then nothing happens.
77 * @note This operation does not inserts the tag to the tagging data base. To insert a new tag see the insert function.
84 * @brief Adds a given tag map to the model, if the tag map already exists in the model then nothing happens.
86 * @param tag the tag map to be added to the model. The supported key values are: `tag`, `color`, `date`
91 * @brief Adds a given list of tags to the model. Tags that already exists in the model are ignored.
100 * @return if the tag already exists in the data base then it return false, if the operation is successful returns true otherwise false
111 * @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
117 * @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
118 * @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.
124 * @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
QML_ELEMENTbool strict
Whether the retrieved tags should be only associated to the current application or to any other app.
Definition tagslist.h:32
void updateToUrls(const QStringList &tags)
Updates a list of tags associated to the current file URLs.
Definition tagslist.cpp:53
bool remove(const int &index)
Removes a tag from the model at a given index.
Definition tagslist.cpp:99
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:169
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:75
bool contains(const QString &tag)
Checks whether a given tag name is already in the model list.
Definition tagslist.cpp:193
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:112
void insertToUrls(const QString &tag)
Associates a given tag to the current file URLs set to the URLs property.
Definition tagslist.cpp:42
void refresh()
Reloads the model, checking the tags from the given list of file URLs.
Definition tagslist.cpp:29
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-2024 The KDE developers.
Generated on Fri May 17 2024 11:51:27 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:51:27 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.