subsurface/desktop-widgets/plugins/facebook/facebookconnectwidget.h
Tomaz Canabrava 12eccda523 Settings update: Fix Facebook Widget to use the SettingsObjectWrapper
Fix facebook widget to use the SettingsObjectWrapper instead
of figthing our complementary Settings each call.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27 11:40:45 -07:00

60 lines
1.2 KiB
C++

#ifndef FACEBOOKCONNECTWIDGET_H
#define FACEBOOKCONNECTWIDGET_H
#include <QDialog>
class QWebView;
namespace Ui {
class FacebookConnectWidget;
class SocialnetworksDialog;
}
class FacebookManager : public QObject
{
Q_OBJECT
public:
static FacebookManager *instance();
void requestAlbumId();
void requestUserId();
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:
SocialNetworkDialog(QWidget *parent = 0);
QString text() const;
QString album() const;
public slots:
void selectionChanged();
void albumChanged();
private:
Ui::SocialnetworksDialog *ui;
};
#endif