digiKam
|
Public Slots | |
void | slotOauthAuthorized () |
void | slotOauthFailed () |
void | slotOauthRequestPin (const QUrl &url) |
void | slotReplyFinished () |
void | slotUploadProgress (qint64 sent, qint64 total) |
Signals | |
void | signalAuthError (const QString &msg) |
void | signalAuthorized (bool success, const QString &username) |
void | signalBusy (bool b) |
void | signalError (const QString &msg, const ImgurTalkerAction &action) |
void | signalProgress (unsigned int percent, const ImgurTalkerAction &action) |
void | signalRequestPin (const QUrl &url) |
void | signalSuccess (const ImgurTalkerResult &result) |
Public Member Functions | |
void | cancelAllWork () |
O2 & | getAuth () |
ImgurTalker (QObject *const parent=nullptr) | |
void | queueWork (const ImgurTalkerAction &action) |
unsigned int | workQueueLength () |
~ImgurTalker () override | |
Static Public Member Functions | |
static QUrl | urlForDeletehash (const QString &deletehash) |
Protected Member Functions | |
void | timerEvent (QTimerEvent *event) override |
Main class, handles the client side of the Imgur API v3.
|
explicit |
References slotOauthAuthorized(), slotOauthFailed(), and slotOauthRequestPin().
|
override |
References cancelAllWork().
void DigikamGenericImgUrPlugin::ImgurTalker::cancelAllWork | ( | ) |
Referenced by slotOauthFailed(), and ~ImgurTalker().
O2 & DigikamGenericImgUrPlugin::ImgurTalker::getAuth | ( | ) |
Use this method to read/write the access and refresh tokens.
void DigikamGenericImgUrPlugin::ImgurTalker::queueWork | ( | const ImgurTalkerAction & | action | ) |
|
signal |
Referenced by DigikamGenericImgUrPlugin::ImgurWindow::ImgurWindow(), and slotOauthFailed().
|
signal |
Called if authentication state changes.
Referenced by DigikamGenericImgUrPlugin::ImgurWindow::ImgurWindow(), and slotOauthAuthorized().
|
signal |
Emitted when the status changes.
Referenced by DigikamGenericImgUrPlugin::ImgurWindow::ImgurWindow(), slotOauthAuthorized(), and slotOauthRequestPin().
|
signal |
Referenced by DigikamGenericImgUrPlugin::ImgurWindow::ImgurWindow(), and slotReplyFinished().
|
signal |
Emitted on progress changes.
Referenced by DigikamGenericImgUrPlugin::ImgurWindow::ImgurWindow(), and slotUploadProgress().
|
signal |
Open url in a browser and let the user copy the pin. Call setPin(pin) to authorize.
Referenced by DigikamGenericImgUrPlugin::ImgurWindow::ImgurWindow(), and slotOauthRequestPin().
|
signal |
Referenced by DigikamGenericImgUrPlugin::ImgurWindow::ImgurWindow(), and slotReplyFinished().
|
slot |
Connected to O2 linkedChanged().
References signalAuthorized(), and signalBusy().
Referenced by ImgurTalker().
|
slot |
Connected to O2 linkingFailed().
References cancelAllWork(), and signalAuthError().
Referenced by ImgurTalker().
|
slot |
Connected to O2 openBrowser(QUrl).
References signalBusy(), and signalRequestPin().
Referenced by ImgurTalker().
|
slot |
HTTP 403 Forbidden -> Invalid token? That needs to be handled internally, so don't emit signalProgress and keep the action in the queue for later retries.
References DigikamGenericImgUrPlugin::ImgurTalkerResult::account, DigikamGenericImgUrPlugin::ACCT_INFO, DigikamGenericImgUrPlugin::ImgurTalkerResult::action, DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurImage::animated, DigikamGenericImgUrPlugin::ANON_IMG_UPLOAD, DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurImage::bandwidth, DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurImage::datetime, DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurImage::deletehash, DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurImage::description, DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurImage::hash, DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurImage::height, DigikamGenericImgUrPlugin::ImgurTalkerResult::image, DigikamGenericImgUrPlugin::IMG_UPLOAD, DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurImage::name, signalError(), signalSuccess(), DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurImage::size, DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurImage::title, DigikamGenericImgUrPlugin::ImgurTalkerAction::type, DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurImage::type, DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurImage::url, DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurAccount::username, DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurImage::views, and DigikamGenericImgUrPlugin::ImgurTalkerResult::ImgurImage::width.
|
slot |
Connected to the current QNetworkReply.
References signalProgress().
|
overrideprotected |
|
static |
Referenced by DigikamGenericImgUrPlugin::ImgurImagesList::slotSuccess().
unsigned int DigikamGenericImgUrPlugin::ImgurTalker::workQueueLength | ( | ) |