#include "patternsetitem.h"

PatternSetItem::PatternSetItem(QObject *parent) : QObject(parent)
{
    clean();
}

PatternSetItem::~PatternSetItem()
{
    clean();
}

PatternSetItem::PatternSetItem(const PatternSetItem & item) : QObject()
{
    copyData(item);
}

PatternSetItem & PatternSetItem::operator= (const PatternSetItem & item)
{
    copyData(item);
    return *this;
}

void PatternSetItem::clean()
{
    m_macType = 0;
    m_showPriority = 0;
    m_name.clear();
    m_topImageName.clear();
    m_enumFunction = 0;
}

void PatternSetItem::copyData(const PatternSetItem &item)
{
    if (this != &item)
    {
        this->m_macType = item.m_macType;
        this->m_showPriority = item.m_showPriority;
        this->m_name = item.m_name;
        this->m_topImageName = item.m_topImageName;
        this->m_enumFunction = item.m_enumFunction;
    }
}
