Commit f05a19ec authored by camilo higuita's avatar camilo higuita

set the boilerplate code to make it compile again

parent 4e429e7c
#include "booklet.h"
Booklet::Booklet()
Booklet::Booklet(QObject *parent) : MauiList(parent)
{
}
FMH::MODEL_LIST Booklet::items() const
{
return this->m_list;
}
void Booklet::setSortBy(const Booklet::SORTBY &sort)
{
}
Booklet::SORTBY Booklet::getSortBy() const
{
return this->sort;
}
void Booklet::setOrder(const Booklet::ORDER &order)
{
}
Booklet::ORDER Booklet::getOrder() const
{
return this->order;
}
void Booklet::sortList()
{
}
......@@ -15,6 +15,39 @@ FMH::MODEL_LIST Books::items() const
return this->m_list;
}
void Books::setSortBy(const Books::SORTBY &sort)
{
}
Books::SORTBY Books::getSortBy() const
{
return this->sort;
}
void Books::setOrder(const Books::ORDER &order)
{
}
Books::ORDER Books::getOrder() const
{
return this->order;
}
void Books::sortList()
{
}
QVariantMap Books::get(const int &index) const
{
if(index >= this->m_list.size() || index < 0)
return QVariantMap();
return FMH::toMap(this->m_list.at(index));
}
bool Books::insert(const QVariantMap &book)
{
emit this->preItemAppended();
......@@ -30,3 +63,13 @@ bool Books::insert(const QVariantMap &book)
emit this->postItemAppended();
return true;
}
bool Books::update(const QVariantMap &data, const int &index)
{
return false;
}
bool Books::remove(const int &index)
{
return false;
}
......@@ -71,7 +71,7 @@ public slots:
* @param note
* @return
*/
bool insert(const QVariantMap &note);
bool insert(const QVariantMap &book);
bool update(const QVariantMap &data, const int &index);
bool remove(const int &index);
};
......
......@@ -135,7 +135,7 @@ bool Notes::insert(const QVariantMap &note)
{
emit this->preItemAppended();
auto __note = FM::toModel(note);
auto __note = FMH::toModel(note);
__note[FMH::MODEL_KEY::MODIFIED] = QDateTime::currentDateTime().toString(Qt::TextDate);
__note[FMH::MODEL_KEY::ADDDATE] = QDateTime::currentDateTime().toString(Qt::TextDate);
......@@ -209,12 +209,5 @@ QVariantMap Notes::get(const int &index) const
{
if(index >= this->notes.size() || index < 0)
return QVariantMap();
QVariantMap res;
const auto note = this->notes.at(index);
for(auto key : note.keys())
res.insert(FMH::MODEL_NAME[key], note[key]);
return res;
return FMH::toMap(this->notes.at(index));
}
......@@ -12,7 +12,6 @@
#include <MauiKit/mauilist.h>
#endif
class Syncer;
class Notes : public MauiList
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment