210 lines
3.8 KiB
C++
210 lines
3.8 KiB
C++
#include "card.h"
|
|
|
|
Card::Card()
|
|
{
|
|
|
|
}
|
|
|
|
Card::~Card()
|
|
{
|
|
|
|
}
|
|
|
|
Card::Card(int id,
|
|
QString title,
|
|
QString number,
|
|
QString name,
|
|
QString month,
|
|
QString year,
|
|
QString cvv,
|
|
QString pin,
|
|
QString note)
|
|
{
|
|
this->id = id;
|
|
this->title = title;
|
|
this->time = QDateTime::currentDateTime();
|
|
this->number = number;
|
|
this->name = name;
|
|
this->month = month;
|
|
this->year = year;
|
|
this->cvv = cvv;
|
|
this->pin = pin;
|
|
this->note = note;
|
|
}
|
|
|
|
Card::Card(int id,
|
|
QString title,
|
|
QString number,
|
|
QString month,
|
|
QString year,
|
|
QString cvv,
|
|
QString pin,
|
|
QString note)
|
|
{
|
|
this->id = id;
|
|
this->title = title;
|
|
this->time = QDateTime::currentDateTime();
|
|
this->number = number;
|
|
this->month = month;
|
|
this->year = year;
|
|
this->cvv = cvv;
|
|
this->pin = pin;
|
|
this->note = note;
|
|
}
|
|
Card::Card(int id,
|
|
QString title,
|
|
QString number,
|
|
QString month,
|
|
QString year)
|
|
{
|
|
this->id = id;
|
|
this->title = title;
|
|
this->time = QDateTime::currentDateTime();
|
|
this->number = number;
|
|
this->month = month;
|
|
this->year = year;
|
|
}
|
|
Card::Card(QString title,
|
|
QString number,
|
|
QString name,
|
|
QString month,
|
|
QString year,
|
|
QString cvv,
|
|
QString pin,
|
|
QString note)
|
|
{
|
|
this->title = title;
|
|
this->time = QDateTime::currentDateTime();
|
|
this->number = number;
|
|
this->name = name;
|
|
this->month = month;
|
|
this->year = year;
|
|
this->cvv = cvv;
|
|
this->pin = pin;
|
|
this->note = note;
|
|
}
|
|
Card::Card(QString title,
|
|
QString number,
|
|
QString name,
|
|
QString month,
|
|
QString year,
|
|
QString cvv,
|
|
QString pin,
|
|
QString note,
|
|
QString status)
|
|
{
|
|
this->title = title;
|
|
this->time = QDateTime::currentDateTime();
|
|
this->number = number;
|
|
this->name = name;
|
|
this->month = month;
|
|
this->year = year;
|
|
this->cvv = cvv;
|
|
this->pin = pin;
|
|
this->note = note;
|
|
this->status = status;
|
|
}
|
|
int Card::getId() const
|
|
{
|
|
return id;
|
|
}
|
|
QString Card::getTitle() const
|
|
{
|
|
return title;
|
|
}
|
|
QDateTime Card::getTime() const
|
|
{
|
|
return time;
|
|
}
|
|
QString Card::getNumber() const
|
|
{
|
|
return number;
|
|
}
|
|
QString Card::getName() const
|
|
{
|
|
return name;
|
|
}
|
|
QString Card::getMonth() const
|
|
{
|
|
return month;
|
|
}
|
|
QString Card::getYear() const
|
|
{
|
|
return year;
|
|
}
|
|
QString Card::getCVV() const
|
|
{
|
|
return cvv;
|
|
}
|
|
QString Card::getPIN() const
|
|
{
|
|
return pin;
|
|
}
|
|
QString Card::Card::getNote() const
|
|
{
|
|
return note;
|
|
}
|
|
QString Card::getStatus() const
|
|
{
|
|
return status;
|
|
}
|
|
QString Card::toString()const
|
|
{
|
|
QString s = "";
|
|
s+="id : ";
|
|
s+="\ntitle : " + this->title;
|
|
s+="\nnumber : " + this->number;
|
|
s+="\nname : " + this->name;
|
|
s+="\nmonth : " + this->month;
|
|
s+="\nyear : " + this->year;
|
|
s+="\ncvv : " + this->cvv;
|
|
s+="\npin : " + this->pin;
|
|
s+="\ntime : " + this->time.toString();
|
|
s+="\n";
|
|
return s;
|
|
}
|
|
std::string Card::toStdString()const
|
|
{
|
|
return toString().toStdString();
|
|
}
|
|
void Card::setId(int i)
|
|
{
|
|
this->id = i;
|
|
}
|
|
void Card::setTitle(const QString title)
|
|
{
|
|
this->title = title;
|
|
}
|
|
void Card::setNumber(const QString number)
|
|
{
|
|
this->number = number;
|
|
}
|
|
void Card::setName(const QString name)
|
|
{
|
|
this->name = name;
|
|
}
|
|
void Card::setMonth(const QString month)
|
|
{
|
|
this->month = month;
|
|
}
|
|
void Card::setYear(const QString year)
|
|
{
|
|
this->year = year;
|
|
}
|
|
void Card::setCVV(const QString cvv)
|
|
{
|
|
this->cvv = cvv;
|
|
}
|
|
void Card::setPIN(const QString pin)
|
|
{
|
|
this->pin = pin;
|
|
}
|
|
void Card::setNote(const QString note)
|
|
{
|
|
this->note = note;
|
|
}
|
|
void Card::setStatus(const QString status)
|
|
{
|
|
this->status = status;
|
|
}
|