mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	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>
		
			
				
	
	
		
			60 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			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
 |