mirror of https://github.com/laurent22/joplin.git
51 lines
816 B
C++
Executable File
51 lines
816 B
C++
Executable File
#include "models/item.h"
|
|
#include "uuid.h"
|
|
|
|
using namespace jop;
|
|
|
|
Item::Item() {
|
|
isPartial_ = true;
|
|
}
|
|
|
|
void Item::fromSqlQuery(const QSqlQuery &q) {
|
|
int i_id = q.record().indexOf("id");
|
|
int i_title = q.record().indexOf("title");
|
|
int i_created_time = q.record().indexOf("created_time");
|
|
|
|
id_ = q.value(i_id).toInt();
|
|
title_ = q.value(i_title).toString();
|
|
createdTime_ = q.value(i_created_time).toInt();
|
|
}
|
|
|
|
int Item::id() const {
|
|
return id_;
|
|
}
|
|
|
|
QString Item::title() const {
|
|
return title_;
|
|
}
|
|
|
|
int Item::createdTime() const {
|
|
return createdTime_;
|
|
}
|
|
|
|
void Item::setId(int v) {
|
|
id_ = v;
|
|
}
|
|
|
|
void Item::setTitle(const QString &v) {
|
|
title_ = v;
|
|
}
|
|
|
|
void Item::setCreatedTime(int v) {
|
|
createdTime_ = v;
|
|
}
|
|
|
|
void Item::setIsPartial(bool v) {
|
|
isPartial_ = v;
|
|
}
|
|
|
|
bool Item::isPartial() const {
|
|
return isPartial_;
|
|
}
|