initial commit Base app, core lib, plugin system
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#include "person.h"
|
||||
|
||||
Person::Person()
|
||||
{
|
||||
}
|
||||
int Person::getId() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
void Person::setId(int value)
|
||||
{
|
||||
id = value;
|
||||
}
|
||||
QString Person::getFirstName() const
|
||||
{
|
||||
return firstName;
|
||||
}
|
||||
|
||||
void Person::setFirstName(const QString &value)
|
||||
{
|
||||
firstName = value;
|
||||
}
|
||||
QString Person::getLastName() const
|
||||
{
|
||||
return lastName;
|
||||
}
|
||||
|
||||
void Person::setLastName(const QString &value)
|
||||
{
|
||||
lastName = value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#ifndef PERSON_H
|
||||
#define PERSON_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include <odb/core.hxx>
|
||||
|
||||
#pragma db object
|
||||
class Person : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Person();
|
||||
|
||||
int getId() const;
|
||||
void setId(int value);
|
||||
|
||||
QString getFirstName() const;
|
||||
void setFirstName(const QString &value);
|
||||
|
||||
QString getLastName() const;
|
||||
void setLastName(const QString &value);
|
||||
|
||||
private:
|
||||
friend class odb::access;
|
||||
#pragma db id auto
|
||||
int id;
|
||||
QString firstName;
|
||||
QString lastName;
|
||||
|
||||
};
|
||||
|
||||
#endif // PERSON_H
|
||||
Reference in New Issue
Block a user