mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
d59e89e569
The current way that facebook works is terrible: it's scattered around tons of files ( at least 4 different files and classes ) this moves things around a bit, add a disconnect button that was missing, cleans tons of code and fix inconsistencies. I will also redo this part for 5.0, but it's too late for 4.5 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
49 lines
943 B
C++
49 lines
943 B
C++
#ifndef FACEBOOKMANAGER_H
|
|
#define FACEBOOKMANAGER_H
|
|
|
|
#include <QObject>
|
|
#include <QUrl>
|
|
#include <QDialog>
|
|
|
|
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;
|
|
};
|
|
|
|
namespace Ui {
|
|
class SocialnetworksDialog;
|
|
}
|
|
|
|
class SocialNetworkDialog : public QDialog {
|
|
Q_OBJECT
|
|
public:
|
|
SocialNetworkDialog(QWidget *parent);
|
|
QString text() const;
|
|
QString album() const;
|
|
public slots:
|
|
void selectionChanged();
|
|
void albumChanged();
|
|
private:
|
|
Ui::SocialnetworksDialog *ui;
|
|
};
|
|
#endif // FACEBOOKMANAGER_H
|