QEverCloud
3.0.0
Unofficial Evernote Cloud API for Qt
|
The class is tailored specifically for OAuth authorization with Evernote. More...
#include <oauth.h>
Classes | |
struct | OAuthResult |
Signals | |
void | authenticationFinished (bool success) |
void | authenticationSuceeded () |
void | authenticationFailed () |
Public Member Functions | |
EvernoteOAuthWebView (QWidget *parent=Q_NULLPTR) | |
void | authenticate (QString host, QString consumerKey, QString consumerSecret) |
bool | isSucceeded () const |
QString | oauthError () const |
OAuthResult | oauthResult () const |
void | setSizeHint (QSize sizeHint) |
virtual QSize | sizeHint () const Q_DECL_OVERRIDE |
The class is tailored specifically for OAuth authorization with Evernote.
While it is functional by itself you probably will prefer to use EvernoteOAuthDialog.
Note that you have to include QEverCloudOAuth.h header.
By deafult EvernoteOAuthWebView uses qrand() for generating nonce so do not forget to call qsrand() in your application. See setNonceGenerator If you want more control over nonce generation.
qevercloud::EvernoteOAuthWebView::EvernoteOAuthWebView | ( | QWidget * | parent = Q_NULLPTR | ) |
void qevercloud::EvernoteOAuthWebView::authenticate | ( | QString | host, |
QString | consumerKey, | ||
QString | consumerSecret | ||
) |
This function starts the OAuth sequence. In the end of the sequence will be emitted one of the signals: authenticationSuceeded or authenticationFailed.
Do not call the function while its call is in effect, i.e. one of the signals is not emitted.
host | Evernote host to authorize with. You need one of this:
|
consumerKey | get it from the Evernote |
consumerSecret | along with this |
|
signal |
Emitted when the OAuth sequence is finished with a failure. Some error info may be availabe with errorText().
|
signal |
Emitted when the OAuth sequence started with authenticate() call is finished
|
signal |
Emitted when the OAuth sequence is succesfully finished. Call oauthResult() to get the data.
bool qevercloud::EvernoteOAuthWebView::isSucceeded | ( | ) | const |
QString qevercloud::EvernoteOAuthWebView::oauthError | ( | ) | const |
OAuthResult qevercloud::EvernoteOAuthWebView::oauthResult | ( | ) | const |
void qevercloud::EvernoteOAuthWebView::setSizeHint | ( | QSize | sizeHint | ) |
The method is useful to specify default size for a EverOAuthWebView.
|
virtual |