#include "shortcutitem.h"

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

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

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

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

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

void ShortCutItem::copyData(const ShortCutItem &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;
    }
}
