mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-29 05:30:41 +00:00
70e6840d51
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>
61 lines
No EOL
1.2 KiB
C++
61 lines
No EOL
1.2 KiB
C++
#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 |