Record class created1
This commit is contained in:
parent
283eac9ad5
commit
0878f6005d
@ -22,6 +22,8 @@ set(PROJECT_SOURCES
|
||||
mainwindow.ui
|
||||
manager.h
|
||||
manager.cpp
|
||||
record.h
|
||||
record.cpp
|
||||
)
|
||||
|
||||
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
|
||||
|
||||
@ -4,3 +4,10 @@ Manager::Manager()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Manager::init(){}
|
||||
Record* Manager::get(){
|
||||
return nullptr;
|
||||
}
|
||||
void Manager::put(){}
|
||||
void Manager::update(){}
|
||||
|
||||
@ -3,11 +3,18 @@
|
||||
|
||||
#include <QtSql>
|
||||
|
||||
#include "record.h"
|
||||
|
||||
|
||||
class Manager
|
||||
{
|
||||
public:
|
||||
Manager();
|
||||
void init();
|
||||
Record* get();
|
||||
void put();
|
||||
void update();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
58
PasswordManager/record.cpp
Normal file
58
PasswordManager/record.cpp
Normal file
@ -0,0 +1,58 @@
|
||||
#include "record.h"
|
||||
|
||||
Record::Record()
|
||||
{
|
||||
|
||||
}
|
||||
Record::Record(QString name,
|
||||
QString username,
|
||||
QString URL,
|
||||
QString note,
|
||||
QDateTime time){
|
||||
this->name = name;
|
||||
this->username = username;
|
||||
this->URL = URL;
|
||||
this->note = note;
|
||||
this->time = time;
|
||||
}
|
||||
Record::Record(QString name,
|
||||
QString username,
|
||||
QString URL,
|
||||
QDateTime time){
|
||||
this->name = name;
|
||||
this->username = username;
|
||||
this->URL = URL;
|
||||
this->time = time;
|
||||
}
|
||||
QString Record::getName(){
|
||||
return name;
|
||||
}
|
||||
QString Record::getUsername(){
|
||||
return username;
|
||||
}
|
||||
QString Record::getURL(){
|
||||
return URL;
|
||||
}
|
||||
QString Record::getNote(){
|
||||
return note;
|
||||
}
|
||||
QDateTime Record::getTime(){
|
||||
return time;
|
||||
}
|
||||
|
||||
void Record::setName(QString name){
|
||||
this->name = name;
|
||||
}
|
||||
void Record::setUsername(QString username){
|
||||
this->username = username;
|
||||
}
|
||||
void Record::setURL(QString URL){
|
||||
this->URL = URL;
|
||||
}
|
||||
void Record::setNote(QString note){
|
||||
this->note = note;
|
||||
}
|
||||
void Record::setTime(QDateTime time){
|
||||
this->time = time;
|
||||
}
|
||||
|
||||
39
PasswordManager/record.h
Normal file
39
PasswordManager/record.h
Normal file
@ -0,0 +1,39 @@
|
||||
#ifndef RECORD_H
|
||||
#define RECORD_H
|
||||
|
||||
#include <QString>
|
||||
#include <QDateTime>
|
||||
|
||||
class Record
|
||||
{
|
||||
public:
|
||||
Record();
|
||||
Record(QString name,
|
||||
QString username,
|
||||
QString URL,
|
||||
QString note,
|
||||
QDateTime time);
|
||||
Record(QString name,
|
||||
QString username,
|
||||
QString URL,
|
||||
QDateTime time);
|
||||
QString getName();
|
||||
QString getUsername();
|
||||
QString getURL();
|
||||
QString getNote();
|
||||
QDateTime getTime();
|
||||
|
||||
void setName();
|
||||
void setUsername();
|
||||
void setURL();
|
||||
void setNote();
|
||||
void setTime();
|
||||
private:
|
||||
QString name;
|
||||
QString username;
|
||||
QString URL;
|
||||
QString note;
|
||||
QDateTime time;
|
||||
};
|
||||
|
||||
#endif // RECORD_H
|
||||
Loading…
Reference in New Issue
Block a user