#include "record.h" Record::Record() { } Record::~Record() { } Record::Record(int id, QString name, QString username, QString password, QString URL, QString note){ this->id = id; this->name = name; this->username = username; this->password = password; this->URL = URL; this->note = note; this->time = QDateTime::currentDateTime(); } Record::Record(int id, QString name, QString username, QString password, QString URL){ this->id = id; this->name = name; this->username = username; this->password = password; this->URL = URL; this->time = QDateTime::currentDateTime(); } Record::Record(QString name, QString username, QString password, QString URL, QString note){ this->name = name; this->username = username; this->password = password; this->URL = URL; this->note = note; this->time = QDateTime::currentDateTime(); } int 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; 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::setId(int i) { id = i; } 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; }