mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-29 13:40:20 +00:00
529a4d499b
This removes all references to WebKit if cmake option USE_WEBKIT is enabled. For the user manual it changes it to WebEngine (seems to work for me). Similar for the Facebook connection (minus a reference to a cookie jar). This I could not test at the moment, as I wrote this on a train. Printing does not work, it is a null operation at the moment. Currently, large parts of of the printing code are commented out as there is no direct way to access page elements in WebEngine. It seems this needs to be done via Javascript (with a callback invoked). There is new functionality in WebEngine to render a view to a PDF file but this needs more work (and probably some thoughts towards page breaks). Signed-off-by: Robert C. Helling <helling@atdotde.de>
68 lines
1.3 KiB
C++
68 lines
1.3 KiB
C++
#ifndef FACEBOOKCONNECTWIDGET_H
|
|
#define FACEBOOKCONNECTWIDGET_H
|
|
|
|
#include <QDialog>
|
|
#ifdef USE_WEBENGINE
|
|
class QWebEngineView;
|
|
#else
|
|
class QWebView;
|
|
#endif
|
|
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;
|
|
#ifdef USE_WEBENGINE
|
|
QWebEngineView *facebookWebView;
|
|
#else
|
|
QWebView *facebookWebView;
|
|
#endif
|
|
};
|
|
|
|
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
|