2015-11-08 12:33:29 +00:00
|
|
|
#ifndef FACEBOOKCONNECTWIDGET_H
|
|
|
|
#define FACEBOOKCONNECTWIDGET_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
class QWebView;
|
|
|
|
namespace Ui {
|
|
|
|
class FacebookConnectWidget;
|
2015-11-08 14:10:13 +00:00
|
|
|
class SocialnetworksDialog;
|
2015-11-08 12:33:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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:
|
2015-11-08 14:10:13 +00:00
|
|
|
SocialNetworkDialog(QWidget *parent = 0);
|
2015-11-08 12:33:29 +00:00
|
|
|
QString text() const;
|
2015-11-08 14:10:13 +00:00
|
|
|
QString album() const;
|
|
|
|
public slots:
|
|
|
|
void selectionChanged();
|
|
|
|
void albumChanged();
|
2015-11-08 12:33:29 +00:00
|
|
|
private:
|
2015-11-08 14:10:13 +00:00
|
|
|
Ui::SocialnetworksDialog *ui;
|
2015-11-08 12:33:29 +00:00
|
|
|
};
|
|
|
|
|
2016-08-26 18:17:49 +00:00
|
|
|
#endif
|