Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

linker.h 501 Bytes
Newer Older
Camilo Higuita's avatar
Camilo Higuita committed
1 2 3 4
#ifndef LINKER_H
#define LINKER_H

#include <QObject>
Camilo Higuita's avatar
Camilo Higuita committed
5 6 7
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QUrl>
Camilo Higuita's avatar
Camilo Higuita committed
8

Camilo Higuita's avatar
Camilo Higuita committed
9 10 11
typedef QVariantMap LINK;

class Linker : public QObject
Camilo Higuita's avatar
Camilo Higuita committed
12 13 14
{
    Q_OBJECT
public:
Camilo Higuita's avatar
Camilo Higuita committed
15 16 17 18 19 20
    explicit Linker(QObject *parent = nullptr);

    Q_INVOKABLE void extract(const QString &url);

private:
    QByteArray getUrl(const QString &url);
21
    QString query(const QByteArray &array, const QString &qq);
Camilo Higuita's avatar
Camilo Higuita committed
22 23

signals:
Camilo Higuita's avatar
Camilo Higuita committed
24
    void previewReady(LINK data);
Camilo Higuita's avatar
Camilo Higuita committed
25 26

public slots:
Camilo Higuita's avatar
Camilo Higuita committed
27

Camilo Higuita's avatar
Camilo Higuita committed
28 29
};

Camilo Higuita's avatar
Camilo Higuita committed
30
#endif // LINKER_H