diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-11-08 10:33:29 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-08 09:43:35 -0800 |
commit | 70e6840d51d876b4d906f3af0a4be71bd3233e48 (patch) | |
tree | f260b0f9d454099ea12202255e8a1e726bb187a4 /desktop-widgets/plugins/facebook/facebookconnectwidget.h | |
parent | 440423ff6476119e090798ae2d59dc59d5253a0a (diff) | |
download | subsurface-70e6840d51d876b4d906f3af0a4be71bd3233e48.tar.gz |
Convert most of the old code for FacebookPlugin to the new System
It should still not work correctly - but the plugin should be almost
ready - I'll do some papercuts on the next few commits.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/plugins/facebook/facebookconnectwidget.h')
-rw-r--r-- | desktop-widgets/plugins/facebook/facebookconnectwidget.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/desktop-widgets/plugins/facebook/facebookconnectwidget.h b/desktop-widgets/plugins/facebook/facebookconnectwidget.h new file mode 100644 index 000000000..4802b9f63 --- /dev/null +++ b/desktop-widgets/plugins/facebook/facebookconnectwidget.h @@ -0,0 +1,61 @@ +#ifndef FACEBOOKCONNECTWIDGET_H +#define FACEBOOKCONNECTWIDGET_H + +#include <QDialog> +class QWebView; +namespace Ui { + class FacebookConnectWidget; +} + +class FacebookManager : public QObject +{ + Q_OBJECT +public: + static FacebookManager *instance(); + void requestAlbumId(); + void requestUserId(); + void sync(); + QUrl connectUrl(); + bool loggedIn(); +signals: + void justLoggedIn(bool triggererd); + void justLoggedOut(bool triggered); + +public slots: + void tryLogin(const QUrl& loginResponse); + void logout(); + void setDesiredAlbumName(const QString& albumName); + void sendDive(); + +private: + explicit FacebookManager(QObject *parent = 0); + QString albumName; +}; + + +class FacebookConnectWidget : public QDialog { + Q_OBJECT +public: + explicit FacebookConnectWidget(QWidget* parent = 0); + void facebookLoggedIn(); + void facebookDisconnect(); +private: + Ui::FacebookConnectWidget *ui; + QWebView *facebookWebView; +}; + +class SocialNetworkDialog : public QDialog { + Q_OBJECT +public: + explicit SocialNetworkDialog(QWidget* parent = 0, Qt::WindowFlags f = 0); + QString album() const; + QString name() const; + QString text() const; + +private: + QString _album; + QString _name; + QString _text; +}; + +#endif
\ No newline at end of file |