Tags manager's interface.
More...
#include "itagsmanager.h"
|
virtual | ~ITagsManager () |
|
virtual tag_id | GetID (const QString &tag)=0 |
| Returns the ID of the given tag. More...
|
|
virtual QString | GetTag (tag_id id) const =0 |
| Returns the tag with the given id. More...
|
|
virtual QStringList | GetAllTags () const =0 |
|
virtual QStringList | Split (const QString &string) const =0 |
| Splits the given string with tags to the list of the tags. More...
|
|
virtual QStringList | SplitToIDs (const QString &string)=0 |
| Splits the given string with tags and returns tags IDs. More...
|
|
virtual QString | Join (const QStringList &tags) const =0 |
| Joins the given tags into one string that's suitable to display to the user. More...
|
|
virtual QString | JoinIDs (const QStringList &tagIDs) const =0 |
| Joins the given tag IDs into one human-readable string. More...
|
|
virtual QAbstractItemModel * | GetModel ()=0 |
| Returns the completion model for this. More...
|
|
virtual QObject * | GetQObject ()=0 |
| Returns the tags manager as a QObject to get access to all the meta-stuff. More...
|
|
Tags manager's interface.
This interface is for communication with the tags manager.
Object returned by the GetQObject() function emits these signals:
- tagsUpdated(const QStringList& tags) when the tags are updated.
Definition at line 43 of file itagsmanager.h.
virtual ITagsManager::~ITagsManager |
( |
| ) |
|
|
inlinevirtual |
virtual QStringList ITagsManager::GetAllTags |
( |
| ) |
const |
|
pure virtual |
Returns all tags existing in LeechCraft now.
- Returns
- List of all tags.
virtual tag_id ITagsManager::GetID |
( |
const QString & |
tag | ) |
|
|
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.
- Parameters
-
[in] | tag | The tag that should be identified. |
- Returns
- The ID of the tag.
- See Also
- GetTag
virtual QAbstractItemModel* ITagsManager::GetModel |
( |
| ) |
|
|
pure virtual |
Returns the completion model for this.
virtual QObject* ITagsManager::GetQObject |
( |
| ) |
|
|
pure virtual |
Returns the tags manager as a QObject to get access to all the meta-stuff.
virtual QString ITagsManager::GetTag |
( |
tag_id |
id | ) |
const |
|
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.
- Parameters
-
- Returns
- The tag.
- See Also
- GetID
Referenced by LeechCraft::Util::FlatToFoldersProxyModel::data().
virtual QString ITagsManager::Join |
( |
const QStringList & |
tags | ) |
const |
|
pure virtual |
Joins the given tags into one string that's suitable to display to the user.
- Parameters
-
- Returns
- The joined string with tags.
virtual QString ITagsManager::JoinIDs |
( |
const QStringList & |
tagIDs | ) |
const |
|
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.
- Parameters
-
[in] | tagIDs | List of tag IDs. |
- Returns
- The joined string with tags.
virtual QStringList ITagsManager::Split |
( |
const QString & |
string | ) |
const |
|
pure virtual |
Splits the given string with tags to the list of the tags.
- Parameters
-
[in] | string | String with tags. |
- Returns
- The list of the tags.
virtual QStringList ITagsManager::SplitToIDs |
( |
const QString & |
string | ) |
|
|
pure virtual |
Splits the given string with tags and returns tags IDs.
This function is essentially a combination of Split() and GetID(). First, the given string is split into human-readable tags, and then for each tag its ID is obtained.
- Parameters
-
[in] | string | String with tags. |
- Returns
- The list of the tags IDs.
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/leechcraft-0.6.0/src/interfaces/core/itagsmanager.h