mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-29 21:50:26 +00:00
f5f2c37184
But keep the Interface so it's still userfull to create a new SocialNetwork when needed, but it will be part of the code, and not a plugin. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
43 lines
816 B
C++
43 lines
816 B
C++
#include "facebook_integration.h"
|
|
#include "facebookconnectwidget.h"
|
|
|
|
#include <QDebug>
|
|
|
|
FacebookPlugin::FacebookPlugin(QObject* parent) :
|
|
fbConnectWidget(new FacebookConnectWidget()),
|
|
fbUploadDialog(new SocialNetworkDialog())
|
|
{
|
|
}
|
|
|
|
bool FacebookPlugin::isConnected()
|
|
{
|
|
FacebookManager *instance = FacebookManager::instance();
|
|
return instance->loggedIn();
|
|
}
|
|
|
|
void FacebookPlugin::requestLogin()
|
|
{
|
|
fbConnectWidget->exec();
|
|
}
|
|
|
|
void FacebookPlugin::requestLogoff()
|
|
{
|
|
FacebookManager::instance()->logout();
|
|
}
|
|
|
|
QString FacebookPlugin::socialNetworkIcon() const
|
|
{
|
|
return QString();
|
|
}
|
|
|
|
QString FacebookPlugin::socialNetworkName() const
|
|
{
|
|
return tr("Facebook");
|
|
}
|
|
|
|
void FacebookPlugin::requestUpload()
|
|
{
|
|
FacebookManager *instance = FacebookManager::instance();
|
|
if (instance->loggedIn())
|
|
fbUploadDialog->exec();
|
|
}
|