Coding style
This commit is contained in:
		
					parent
					
						
							
								1de6786a9e
							
						
					
				
			
			
				commit
				
					
						bcecd30031
					
				
			
		
					 3 changed files with 548 additions and 548 deletions
				
			
		| 
						 | 
				
			
			@ -79,8 +79,6 @@ namespace Danbooru {
 | 
			
		|||
 | 
			
		||||
    public:
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     * @brief Ratings for a Danbooru item
 | 
			
		||||
     *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
				
			
			@ -22,64 +22,65 @@
 | 
			
		|||
 | 
			
		||||
#include "danboorutag.h"
 | 
			
		||||
 | 
			
		||||
namespace Danbooru {
 | 
			
		||||
namespace Danbooru
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    DanbooruTag::DanbooruTag(const QVariantMap& postData, QObject* parent):
 | 
			
		||||
                            QObject(parent)
 | 
			
		||||
    {
 | 
			
		||||
        m_id = postData.value("id").toInt();
 | 
			
		||||
        m_name = postData.value("name").toString();
 | 
			
		||||
        m_count = postData.value("count").toInt();
 | 
			
		||||
        m_ambiguous = postData.value("ambiguous").toBool();
 | 
			
		||||
DanbooruTag::DanbooruTag(const QVariantMap& postData, QObject* parent):
 | 
			
		||||
    QObject(parent)
 | 
			
		||||
{
 | 
			
		||||
    m_id = postData.value("id").toInt();
 | 
			
		||||
    m_name = postData.value("name").toString();
 | 
			
		||||
    m_count = postData.value("count").toInt();
 | 
			
		||||
    m_ambiguous = postData.value("ambiguous").toBool();
 | 
			
		||||
 | 
			
		||||
        int type = postData.value("type").toInt();
 | 
			
		||||
    int type = postData.value("type").toInt();
 | 
			
		||||
 | 
			
		||||
        switch (type) {
 | 
			
		||||
            case 0:
 | 
			
		||||
                m_tagType = General;
 | 
			
		||||
                break;
 | 
			
		||||
            case 1:
 | 
			
		||||
                m_tagType = Artist;
 | 
			
		||||
                break;
 | 
			
		||||
            case 2:
 | 
			
		||||
                m_tagType = Copyright;
 | 
			
		||||
                break;
 | 
			
		||||
            case 3:
 | 
			
		||||
                m_tagType = Character;
 | 
			
		||||
                break;
 | 
			
		||||
            case 4:
 | 
			
		||||
                m_tagType = Unknown;
 | 
			
		||||
                break;
 | 
			
		||||
            default:
 | 
			
		||||
                m_tagType = Unknown;
 | 
			
		||||
                break;
 | 
			
		||||
        }
 | 
			
		||||
    switch (type) {
 | 
			
		||||
    case 0:
 | 
			
		||||
        m_tagType = General;
 | 
			
		||||
        break;
 | 
			
		||||
    case 1:
 | 
			
		||||
        m_tagType = Artist;
 | 
			
		||||
        break;
 | 
			
		||||
    case 2:
 | 
			
		||||
        m_tagType = Copyright;
 | 
			
		||||
        break;
 | 
			
		||||
    case 3:
 | 
			
		||||
        m_tagType = Character;
 | 
			
		||||
        break;
 | 
			
		||||
    case 4:
 | 
			
		||||
        m_tagType = Unknown;
 | 
			
		||||
        break;
 | 
			
		||||
    default:
 | 
			
		||||
        m_tagType = Unknown;
 | 
			
		||||
        break;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
    int DanbooruTag::id() const
 | 
			
		||||
    {
 | 
			
		||||
        return m_id;
 | 
			
		||||
    }
 | 
			
		||||
int DanbooruTag::id() const
 | 
			
		||||
{
 | 
			
		||||
    return m_id;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
    int DanbooruTag::count() const
 | 
			
		||||
    {
 | 
			
		||||
        return m_count;
 | 
			
		||||
    }
 | 
			
		||||
int DanbooruTag::count() const
 | 
			
		||||
{
 | 
			
		||||
    return m_count;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
    const QString DanbooruTag::name() const
 | 
			
		||||
    {
 | 
			
		||||
        return m_name;
 | 
			
		||||
    }
 | 
			
		||||
const QString DanbooruTag::name() const
 | 
			
		||||
{
 | 
			
		||||
    return m_name;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
    bool DanbooruTag::ambiguous() const
 | 
			
		||||
    {
 | 
			
		||||
        return m_ambiguous;
 | 
			
		||||
    }
 | 
			
		||||
bool DanbooruTag::ambiguous() const
 | 
			
		||||
{
 | 
			
		||||
    return m_ambiguous;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
    TagType DanbooruTag::type() const
 | 
			
		||||
    {
 | 
			
		||||
        return m_tagType;
 | 
			
		||||
    }
 | 
			
		||||
TagType DanbooruTag::type() const
 | 
			
		||||
{
 | 
			
		||||
    return m_tagType;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}; // namespace Danbooru
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue