2014-12-24 23:34:23 +00:00
|
|
|
#ifndef FACEBOOKMANAGER_H
|
|
|
|
#define FACEBOOKMANAGER_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QUrl>
|
2014-12-28 23:43:38 +00:00
|
|
|
#include <QDialog>
|
2014-12-24 23:34:23 +00:00
|
|
|
|
|
|
|
class FacebookManager : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
static FacebookManager *instance();
|
|
|
|
void requestAlbumId();
|
|
|
|
void requestUserId();
|
|
|
|
void sync();
|
|
|
|
QUrl connectUrl();
|
|
|
|
bool loggedIn();
|
|
|
|
signals:
|
2015-09-16 19:43:01 +00:00
|
|
|
void justLoggedIn(bool triggererd);
|
|
|
|
void justLoggedOut(bool triggered);
|
2014-12-24 23:34:23 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void tryLogin(const QUrl& loginResponse);
|
|
|
|
void logout();
|
|
|
|
void setDesiredAlbumName(const QString& albumName);
|
2014-12-28 23:06:07 +00:00
|
|
|
void sendDive();
|
2014-12-24 23:34:23 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
explicit FacebookManager(QObject *parent = 0);
|
|
|
|
QString albumName;
|
|
|
|
};
|
|
|
|
|
2014-12-28 23:43:38 +00:00
|
|
|
namespace Ui {
|
|
|
|
class SocialnetworksDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class SocialNetworkDialog : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
SocialNetworkDialog(QWidget *parent);
|
|
|
|
QString text() const;
|
|
|
|
QString album() const;
|
|
|
|
public slots:
|
|
|
|
void selectionChanged();
|
2014-12-29 19:59:21 +00:00
|
|
|
void albumChanged();
|
2014-12-28 23:43:38 +00:00
|
|
|
private:
|
|
|
|
Ui::SocialnetworksDialog *ui;
|
|
|
|
};
|
2014-12-24 23:34:23 +00:00
|
|
|
#endif // FACEBOOKMANAGER_H
|