|
Krita Source Code Documentation
|
The KisTag loads a tag from a .tag file. A .tag file is a .desktop file. The following fields are important: More...
#include <KisTag.h>
Classes | |
| class | Private |
Public Member Functions | |
| bool | active () const |
| KisTagSP | clone () const |
| QString | comment (bool translated=true) const |
| The translated tooltips for the tag. | |
| QMap< QString, QString > | comments () const |
| QStringList | defaultResources () const |
| QString | filename () |
| int | id () const |
| KisTag () | |
| KisTag (const KisTag &rhs) | |
| bool | load (QIODevice &io) |
| QString | name (bool translated=true) const |
| The translated names of the tag. | |
| QMap< QString, QString > | names () const |
| KisTag & | operator= (const KisTag &rhs) |
| QString | resourceType () const |
| bool | save (QIODevice &io) |
| void | setComment (const QString comment) |
| void | setComments (const QMap< QString, QString > &comments) |
| void | setDefaultResources (const QStringList &defaultResources) |
| void | setFilename (const QString &fileName) |
| void | setName (const QString &name) |
| void | setNames (const QMap< QString, QString > &names) |
| void | setResourceType (const QString &resourceType) |
| void | setUrl (const QString &url) |
| QString | url () const |
| The unique identifier for the tag. Since tag urls are compared COLLATE NOCASE, tag urls must be ASCII only. | |
| bool | valid () const |
| virtual | ~KisTag () |
Static Public Member Functions | |
| static QString | currentLocale () |
Private Member Functions | |
| void | setActive (bool active) |
| void | setId (int id) |
| void | setValid (bool valid) |
Private Attributes | |
| QScopedPointer< Private > | d |
Static Private Attributes | |
| static const QString | s_comment {"Comment"} |
| static const QString | s_defaultResources {"Default Resources"} |
| static const QString | s_desktop {"[Desktop Entry]"} |
| static const QString | s_group {"Desktop Entry"} |
| static const QString | s_name {"Name"} |
| static const QString | s_resourceType {"ResourceType"} |
| static const QString | s_tag {"Tag"} |
| static const QString | s_type {"Type"} |
| static const QString | s_url {"URL"} |
Friends | |
| class | AbrTagIterator |
| class | BundleTagIterator |
| class | KisAllResourcesModel |
| class | KisAllTagResourceModel |
| class | KisAllTagsModel |
| class | KisResourceLocator |
| class | KisResourceModel |
| class | KisTagChooserWidget |
| class | KisTagModel |
| class | TestTagModel |
The KisTag loads a tag from a .tag file. A .tag file is a .desktop file. The following fields are important:
name: the name of the tag, which can be translated comment: a tooltip for the tag, which can be translated url: the untranslated name of the tag
| KisTag::KisTag | ( | ) |
Definition at line 47 of file KisTag.cpp.
|
virtual |
Definition at line 52 of file KisTag.cpp.
| KisTag::KisTag | ( | const KisTag & | rhs | ) |
Definition at line 56 of file KisTag.cpp.
| bool KisTag::active | ( | ) | const |
| KisTagSP KisTag::clone | ( | ) | const |
| QString KisTag::comment | ( | bool | translated = true | ) | const |
The translated tooltips for the tag.
Definition at line 146 of file KisTag.cpp.
References currentLocale(), and d.
| QMap< QString, QString > KisTag::comments | ( | ) | const |
|
static |
Definition at line 84 of file KisTag.cpp.
| QStringList KisTag::defaultResources | ( | ) | const |
| QString KisTag::filename | ( | ) |
| int KisTag::id | ( | ) | const |
| bool KisTag::load | ( | QIODevice & | io | ) |
Definition at line 200 of file KisTag.cpp.
References d, KIS_ASSERT, s_comment, s_defaultResources, s_desktop, s_name, s_resourceType, s_url, KisPortingUtils::setUtf8OnStream(), setValid(), and value().
| QString KisTag::name | ( | bool | translated = true | ) | const |
The translated names of the tag.
Definition at line 122 of file KisTag.cpp.
References currentLocale(), and d.
| QMap< QString, QString > KisTag::names | ( | ) | const |
Definition at line 62 of file KisTag.cpp.
| QString KisTag::resourceType | ( | ) | const |
| bool KisTag::save | ( | QIODevice & | io | ) |
Definition at line 276 of file KisTag.cpp.
References d, s_comment, s_defaultResources, s_desktop, s_name, s_resourceType, s_tag, s_type, s_url, and KisPortingUtils::setUtf8OnStream().
|
private |
Definition at line 308 of file KisTag.cpp.
| void KisTag::setComment | ( | const QString | comment | ) |
Definition at line 154 of file KisTag.cpp.
| void KisTag::setComments | ( | const QMap< QString, QString > & | comments | ) |
| void KisTag::setDefaultResources | ( | const QStringList & | defaultResources | ) |
| void KisTag::setFilename | ( | const QString & | fileName | ) |
Definition at line 117 of file KisTag.cpp.
References d, and filename().
|
private |
Definition at line 303 of file KisTag.cpp.
| void KisTag::setName | ( | const QString & | name | ) |
Definition at line 131 of file KisTag.cpp.
| void KisTag::setNames | ( | const QMap< QString, QString > & | names | ) |
Definition at line 141 of file KisTag.cpp.
| void KisTag::setResourceType | ( | const QString & | resourceType | ) |
| void KisTag::setUrl | ( | const QString & | url | ) |
Definition at line 164 of file KisTag.cpp.
|
private |
Definition at line 313 of file KisTag.cpp.
| QString KisTag::url | ( | ) | const |
The unique identifier for the tag. Since tag urls are compared COLLATE NOCASE, tag urls must be ASCII only.
Definition at line 159 of file KisTag.cpp.
References d.
| bool KisTag::valid | ( | ) | const |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |