Adam Bissen
28ab770b3e
Add encode stop button. Movie now searches when selected. First result in UI.
31 lines
608 B
C++
31 lines
608 B
C++
#ifndef QMOVIEDB_H
|
|
#define QMOVIEDB_H
|
|
|
|
#include <QObject>
|
|
#include <QNetworkAccessManager>
|
|
#include <QJsonObject>
|
|
|
|
class QMovieDB : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit QMovieDB(QString apiKey, QObject *parent = nullptr);
|
|
|
|
QNetworkAccessManager *netMan;
|
|
|
|
void searchMovieTitle(const QString title);
|
|
Q_INVOKABLE void searchMovieTitleFile(const QString file);
|
|
|
|
private:
|
|
QString movieDbApiKey;
|
|
|
|
private slots:
|
|
void receiveReply(QNetworkReply *reply);
|
|
void parseResults(QJsonObject json);
|
|
|
|
signals:
|
|
void searchResultReturned(QString fullTitle);
|
|
};
|
|
|
|
#endif // QMOVIEDB_H
|