52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
#include "combactionitem.h"
|
|
|
|
CombActionItem::CombActionItem(QObject *parent) :
|
|
QObject(parent)
|
|
{
|
|
clean();
|
|
}
|
|
|
|
CombActionItem::~CombActionItem()
|
|
{
|
|
clean();
|
|
}
|
|
|
|
CombActionItem::CombActionItem(const CombActionItem & item) : QObject()
|
|
{
|
|
copyData(item);
|
|
}
|
|
|
|
CombActionItem & CombActionItem::operator= (const CombActionItem & item)
|
|
{
|
|
copyData(item);
|
|
return *this;
|
|
}
|
|
|
|
void CombActionItem::clean()
|
|
{
|
|
m_name.clear(); // 名称
|
|
m_mcNum = 1;
|
|
m_mcType = -1;
|
|
m_type = -1;
|
|
m_def = -1;
|
|
m_btnclickfun = -1;
|
|
m_btnprefun = -1;
|
|
m_btnrelfun = -1;
|
|
}
|
|
|
|
void CombActionItem::copyData(const CombActionItem & item)
|
|
{
|
|
if (this != &item)
|
|
{
|
|
this->m_mcNum = item.m_mcNum;
|
|
this->m_mcType = item.m_mcType;
|
|
this->m_type = item.m_type;
|
|
this->m_name = item.m_name; // 名称
|
|
this->m_def = item.m_def;
|
|
this->m_btnclickfun = item.m_btnclickfun;
|
|
this->m_btnprefun = item.m_btnprefun;
|
|
this->m_btnrelfun = item.m_btnrelfun;
|
|
}
|
|
}
|
|
|