89 lines
1.8 KiB
C++
89 lines
1.8 KiB
C++
#include "account.h"
|
|
|
|
|
|
Account::Account()
|
|
{
|
|
|
|
}
|
|
Account::~Account()
|
|
{
|
|
|
|
}
|
|
Account::Account(int id,
|
|
QString title,
|
|
QString username,
|
|
QString password,
|
|
QString URL,
|
|
QString note) : Record(id, title){
|
|
this->username = username;
|
|
this->password = password;
|
|
this->URL = URL;
|
|
this->note = note;
|
|
}
|
|
Account::Account(int id,
|
|
QString title,
|
|
QString username,
|
|
QString password,
|
|
QString URL) : Record(id, title){
|
|
this->username = username;
|
|
this->password = password;
|
|
this->URL = URL;
|
|
}
|
|
Account::Account(QString title,
|
|
QString username,
|
|
QString password,
|
|
QString URL,
|
|
QString note) : Record(title){
|
|
this->username = username;
|
|
this->password = password;
|
|
this->URL = URL;
|
|
this->note = note;
|
|
}
|
|
QString Account::getUsername() const{
|
|
return username;
|
|
}
|
|
QString Account::getPassword() const
|
|
{
|
|
return password;
|
|
}
|
|
|
|
QString Account::getURL() const{
|
|
return URL;
|
|
}
|
|
QString Account::getNote() const{
|
|
return note;
|
|
}
|
|
|
|
QString Account::toString()const
|
|
{
|
|
// QString s = "";
|
|
// s+="id : " + this->id;
|
|
// s+="\ntitle : " + this->title;
|
|
// s+="\nusername : " + this->username;
|
|
// s+="\nurl : " + this->URL;
|
|
// s+="\nnote : " + this->note;
|
|
// s+="\ntime : " + this->time.toString();
|
|
// s+="\n";
|
|
// return s;
|
|
}
|
|
|
|
|
|
std::string Account::toStdString()const
|
|
{
|
|
return toString().toStdString();
|
|
}
|
|
void Account::setUsername(QString const username){
|
|
this->username = username;
|
|
}
|
|
void Account::setPassword(QString const password)
|
|
{
|
|
this->password = password;
|
|
}
|
|
|
|
void Account::setURL(QString const URL){
|
|
this->URL = URL;
|
|
}
|
|
void Account::setNote(QString const note){
|
|
this->note = note;
|
|
}
|