linker.h 566 Bytes
Newer Older
1 2 3 4
#ifndef LINKER_H
#define LINKER_H

#include <QObject>
5

6 7
#include "qgumbodocument.h"
#include "qgumbonode.h"
8
#include <QVariantMap>
9

10 11 12
typedef QVariantMap LINK;

class Linker : public QObject
13 14 15
{
    Q_OBJECT
public:
16
    explicit Linker(QObject *parent = nullptr);
17
    static QByteArray getUrl(const QString &url);
18 19 20 21

    Q_INVOKABLE void extract(const QString &url);

private:
22 23
    QStringList query(const QByteArray &array, const HtmlTag &tag, const QString &attribute = QString());

24
signals:
25
    void previewReady(QVariantMap link);
26 27

public slots:
28

29 30
};

31
#endif // LINKER_H