Last active 1729664481

dylan revised this gist 1729664481. Go to revision

1 file changed, 28 insertions

gistfile1.txt(file created)

@@ -0,0 +1,28 @@
1 + #ifndef MEETOOTER_H
2 + #define MEETOOTER_H
3 +
4 + #include <QObject>
5 + #include <QNetworkAccessManager>
6 + #include <QNetworkRequest>
7 + #include <QNetworkReply>
8 + #include <QVariantList>
9 + #include <qjson/parser.h> // QJson 头文件
10 +
11 + class MeeTooter : public QObject {
12 + Q_OBJECT
13 +
14 + public:
15 + explicit MeeTooter(QObject *parent = nullptr);
16 + void fetchPublicTimeline(const QString &url);
17 +
18 + signals:
19 + void timelineFetched(const QVariantList &timeline);
20 +
21 + private slots:
22 + void onReplyFinished(QNetworkReply *reply);
23 +
24 + private:
25 + QNetworkAccessManager *networkManager;
26 + };
27 +
28 + #endif // MEETOOTER_H
Newer Older

Powered by Opengist Load: 10ms