Move the tag types where they belong

This commit is contained in:
Luca Beltrame 2014-08-28 09:45:36 +02:00
parent fce61f8c9b
commit 1de6786a9e
2 changed files with 23 additions and 17 deletions

View file

@ -79,24 +79,7 @@ namespace Danbooru {
public:
/**
* @brief Types of tags
*
* A Danbooru tag is not simply a string, but carries some (limited)
* semantic information. In particular, tags are organized in what they
* refer to, either something related to the image itself, or to the
* artist that drew it, or the copyrights associated to the image, or even
* the characters that are represented in it.
*
**/
enum TagType {
General = 1, /**< Generic tags **/
Artist = 2, /**< Tags related to artists **/
Copyright = 4, /**<Tags related to copyrights **/
Character= 8, /**<Tags related to characters **/
Unknown = 16 /**< Unknown tags **/
};
/**
* @brief Ratings for a Danbooru item

View file

@ -35,6 +35,26 @@ namespace Danbooru {
{
Q_OBJECT
public:
/**
* @brief Types of tags
*
* A Danbooru tag is not simply a string, but carries some (limited)
* semantic information. In particular, tags are organized in what they
* refer to, either something related to the image itself, or to the
* artist that drew it, or the copyrights associated to the image, or even
* the characters that are represented in it.
*
**/
enum TagType {
General = 1, /**< Generic tags **/
Artist = 2, /**< Tags related to artists **/
Copyright = 4, /**<Tags related to copyrights **/
Character= 8, /**<Tags related to characters **/
Unknown = 16 /**< Unknown tags **/
};
private:
int m_id;
int m_count;
@ -52,6 +72,9 @@ namespace Danbooru {
};
Q_DECLARE_FLAGS(TagTypes, DanbooruTag::TagType)
Q_DECLARE_OPERATORS_FOR_FLAGS(TagTypes)
}; // namespace Danbooru
Q_DECLARE_METATYPE(Danbooru::DanbooruTag*)