![]() |
LeechCraft 0.6.70-17609-g3dde4097dd
Modular cross-platform feature rich live environment.
|
Tags manager's interface. More...
#include "itagsmanager.h"
Public Types | |
typedef QString | tag_id |
Public Member Functions | |
virtual | ~ITagsManager () |
virtual tag_id | GetID (const QString &tag)=0 |
Returns the ID of the given tag. | |
QList< tag_id > | GetIDs (const QStringList &tags) |
Returns the IDs of the given tags. | |
virtual QString | GetTag (tag_id id) const =0 |
Returns the tag with the given id. | |
QStringList | GetTags (const QList< tag_id > &ids) const |
Returns the tags with the given ids. | |
virtual QStringList | GetAllTags () const =0 |
Returns all tags existing in LeechCraft now. | |
virtual QStringList | Split (const QString &string) const =0 |
Splits the given string with tags to the list of the tags. | |
virtual QList< tag_id > | SplitToIDs (const QString &string)=0 |
Splits the given string with tags and returns tags IDs. | |
virtual QString | Join (const QStringList &tags) const =0 |
Joins the given tags into one string that's suitable to display to the user. | |
virtual QString | JoinIDs (const QStringList &tagIDs) const =0 |
Joins the given tag IDs into one human-readable string. | |
virtual QAbstractItemModel * | GetModel ()=0 |
Returns the completion model for this tags manager. | |
virtual QObject * | GetQObject ()=0 |
Returns the tags manager as a QObject to get access to all the meta-stuff. | |
Tags manager's interface.
This interface is for communication with the tags manager.
Object returned by the GetQObject() function emits these signals:
Definition at line 22 of file itagsmanager.h.
typedef QString ITagsManager::tag_id |
Definition at line 25 of file itagsmanager.h.
|
inlinevirtual |
Definition at line 27 of file itagsmanager.h.
|
pure virtual |
Returns all tags existing in LeechCraft now.
|
pure virtual |
Returns the ID of the given tag.
If there is no such tag, it's added to the tag collection and the id of the new tag is returned.
[in] | tag | The tag that should be identified. |
Referenced by GetIDs().
Returns the IDs of the given tags.
This convenience function invokes GetID() for each tag in tags and returns the list of the corresponding tag IDs.
[in] | tags | The tags that should be identified. |
Definition at line 52 of file itagsmanager.h.
References GetID().
|
pure virtual |
Returns the completion model for this tags manager.
The returned completion model can be used in a QCompleter class. It uses the tags from this tags manager to provide completions as the user types.
|
pure virtual |
Returns the tags manager as a QObject to get access to all the meta-stuff.
|
pure virtual |
Returns the tag with the given id.
If there is no such tag, a null QString is returned. A sensible plugin would delete the given id from the list of assigned tags for all the items with this id.
[in] | id | The id of the tag. |
Referenced by GetTags().
Returns the tags with the given ids.
This convenience function invokes GetTag() for each tag ID in ids and returns the list of the corresponding tags.
[in] | ids | The ids of the tags. |
Definition at line 84 of file itagsmanager.h.
References GetTag().
|
pure virtual |
Joins the given tags into one string that's suitable to display to the user.
[in] | tags | List of tags. |
|
pure virtual |
Joins the given tag IDs into one human-readable string.
This function is essentially a combination of GetTag() and Join(). First, it converts all given tagIDs into tag names using GetTag() and then joins them using Join(). This function is provided for convenience.
[in] | tagIDs | List of tag IDs. |
|
pure virtual |
Splits the given string with tags to the list of the tags.
[in] | string | String with tags. |