notes.h 806 Bytes
Newer Older
Camilo higuita's avatar
Camilo higuita committed
1 2 3 4
#ifndef NOTES_H
#define NOTES_H

#include <QObject>
5
#include "./../baselist.h"
6
#include "owl.h"
Camilo higuita's avatar
Camilo higuita committed
7

8
class DB;
Camilo higuita's avatar
Camilo higuita committed
9
class Tagging;
10

11
class Notes : public BaseList
Camilo higuita's avatar
Camilo higuita committed
12 13 14 15
{
    Q_OBJECT
public:
    explicit Notes(QObject *parent = nullptr);
16
    OWL::DB_LIST items() const override;
Camilo higuita's avatar
Camilo higuita committed
17 18 19

private:
    Tagging *tag;
20
    DB *db;
Camilo higuita's avatar
Camilo higuita committed
21
    OWL::DB_LIST notes;
22
    void sortList();
Camilo higuita's avatar
Camilo higuita committed
23 24 25 26

signals:

public slots:
27 28 29 30 31 32 33 34 35
    QVariantList getTags(const int &index);

    QVariantMap get(const int &index) const override;
    bool insert(const QVariantMap &note) override;
    bool update(const int &index, const QVariant &value, const int &role) override; //deprecrated
    bool update(const QVariantMap &data, const int &index) override;
    bool update(const OWL::DB &note) override;
    bool remove(const int &index) override;

36

Camilo higuita's avatar
Camilo higuita committed
37 38 39
};

#endif // NOTES_H