102 lines
1.9 KiB
C++
102 lines
1.9 KiB
C++
#include "record.h"
|
|
|
|
|
|
|
|
Record::Record()
|
|
{
|
|
|
|
}
|
|
Record::~Record()
|
|
{
|
|
|
|
}
|
|
Record::Record(QString name,
|
|
QString username,
|
|
QString password,
|
|
QString URL,
|
|
QString note){
|
|
this->id = id.createUuid();
|
|
this->name = name;
|
|
this->username = username;
|
|
this->password = password;
|
|
this->URL = URL;
|
|
this->note = note;
|
|
this->time = QDateTime::currentDateTime();
|
|
}
|
|
Record::Record(QString name,
|
|
QString username,
|
|
QString password,
|
|
QString URL){
|
|
this->id = id.createUuid();
|
|
this->name = name;
|
|
this->username = username;
|
|
this->password = password;
|
|
this->URL = URL;
|
|
this->time = QDateTime::currentDateTime();
|
|
}
|
|
QUuid Record::getId() const{
|
|
return id;
|
|
}
|
|
QString Record::getName() const{
|
|
return name;
|
|
}
|
|
QString Record::getUsername() const{
|
|
return username;
|
|
}
|
|
QString Record::getPassword() const
|
|
{
|
|
return password;
|
|
}
|
|
|
|
QString Record::getURL() const{
|
|
return URL;
|
|
}
|
|
QString Record::getNote() const{
|
|
return note;
|
|
}
|
|
QDateTime Record::getTime() const{
|
|
return time;
|
|
}
|
|
|
|
QString Record::toString()const
|
|
{
|
|
QString s = "";
|
|
s+="id : " + this->id.toString();
|
|
s+="\nname : " + this->name;
|
|
s+="\nusername : " + this->username;
|
|
s+="\nurl : " + this->URL;
|
|
s+="\nnote : " + this->note;
|
|
s+="\ntime : " + this->time.toString();
|
|
s+="\n";
|
|
return s;
|
|
}
|
|
|
|
|
|
std::string Record::toStdString()const
|
|
{
|
|
return toString().toStdString();
|
|
}
|
|
|
|
|
|
void Record::setName(QString const name){
|
|
this->name = name;
|
|
}
|
|
void Record::setUsername(QString const username){
|
|
this->username = username;
|
|
}
|
|
void Record::setPassword(QString const password)
|
|
{
|
|
this->password = password;
|
|
}
|
|
|
|
void Record::setURL(QString const URL){
|
|
this->URL = URL;
|
|
}
|
|
void Record::setNote(QString const note){
|
|
this->note = note;
|
|
}
|
|
void Record::setTime(QDateTime const time){
|
|
this->time = time;
|
|
}
|
|
|