links.h 780 Bytes
Newer Older
1 2
#ifndef LINKS_H
#define LINKS_H
Camilo higuita's avatar
Camilo higuita committed
3 4

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

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

10
class Links : public BaseList
Camilo higuita's avatar
Camilo higuita committed
11 12 13 14
{
    Q_OBJECT

public:
15
    explicit Links(QObject *parent = nullptr);
16
    OWL::DB_LIST items() const override;
17

Camilo higuita's avatar
Camilo higuita committed
18 19
private:
    Tagging *tag;
20
    DB *db;
21
    OWL::DB_LIST links;
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
    QVariantMap get(const int &index) const override;
    bool insert(const QVariantMap &link) override;
    bool update(const int &index, const QVariant &value, const int &role) override; //deprecrated
    bool update(const QVariantMap &data, const int &index);
    bool update(const OWL::DB &link) override;
    bool remove(const int &index) override;

    QVariantList getTags(const int &index);
35

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

#endif // NOTES_H