mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
Extend sip_plugin api to support config widgets. Start with twitter.
This commit is contained in:
@@ -144,9 +144,7 @@ IF( UNIX )
|
|||||||
INCLUDE( "CMakeLists.unix.txt" )
|
INCLUDE( "CMakeLists.unix.txt" )
|
||||||
ENDIF( UNIX )
|
ENDIF( UNIX )
|
||||||
|
|
||||||
ADD_SUBDIRECTORY( sip/jabber )
|
ADD_SUBDIRECTORY( sip )
|
||||||
ADD_SUBDIRECTORY( sip/twitter )
|
|
||||||
ADD_SUBDIRECTORY( sip/zeroconf )
|
|
||||||
|
|
||||||
kde4_add_app_icon( tomahawkSources "${CMAKE_CURRENT_SOURCE_DIR}/../data/icons/tomahawk-icon-*.png" )
|
kde4_add_app_icon( tomahawkSources "${CMAKE_CURRENT_SOURCE_DIR}/../data/icons/tomahawk-icon-*.png" )
|
||||||
qt4_add_resources( RC_SRCS "../resources.qrc" )
|
qt4_add_resources( RC_SRCS "../resources.qrc" )
|
||||||
@@ -187,7 +185,6 @@ TARGET_LINK_LIBRARIES( tomahawk
|
|||||||
qjson
|
qjson
|
||||||
tag
|
tag
|
||||||
tomahawk_qtweetlib
|
tomahawk_qtweetlib
|
||||||
sip_twitter
|
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE( "CPack.txt" )
|
INCLUDE( "CPack.txt" )
|
||||||
|
@@ -4,4 +4,10 @@ QMenu*
|
|||||||
SipPlugin::menu()
|
SipPlugin::menu()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QWidget*
|
||||||
|
SipPlugin::configWidget()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@@ -15,11 +15,13 @@ public:
|
|||||||
enum SipErrorCode { AuthError, ConnectionError }; // Placeholder for errors, to be defined
|
enum SipErrorCode { AuthError, ConnectionError }; // Placeholder for errors, to be defined
|
||||||
|
|
||||||
virtual ~SipPlugin() {}
|
virtual ~SipPlugin() {}
|
||||||
|
|
||||||
virtual bool isValid() = 0;
|
virtual bool isValid() = 0;
|
||||||
virtual const QString name() = 0;
|
virtual const QString name() = 0;
|
||||||
|
virtual const QString friendlyName() = 0;
|
||||||
virtual const QString accountName() = 0;
|
virtual const QString accountName() = 0;
|
||||||
virtual QMenu *menu();
|
virtual QMenu* menu();
|
||||||
|
virtual QWidget* configWidget();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual bool connectPlugin( bool startup = false ) = 0;
|
virtual bool connectPlugin( bool startup = false ) = 0;
|
||||||
|
@@ -10,9 +10,6 @@
|
|||||||
#include <lastfm/XmlQuery>
|
#include <lastfm/XmlQuery>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <qtweetaccountverifycredentials.h>
|
|
||||||
#include <qtweetstatusupdate.h>
|
|
||||||
|
|
||||||
#include "settingsdialog.h"
|
#include "settingsdialog.h"
|
||||||
#include "ui_settingsdialog.h"
|
#include "ui_settingsdialog.h"
|
||||||
#include "ui_proxydialog.h"
|
#include "ui_proxydialog.h"
|
||||||
@@ -20,7 +17,6 @@
|
|||||||
#include "musicscanner.h"
|
#include "musicscanner.h"
|
||||||
#include "tomahawksettings.h"
|
#include "tomahawksettings.h"
|
||||||
#include "sip/SipHandler.h"
|
#include "sip/SipHandler.h"
|
||||||
#include "tomahawkoauthtwitter.h"
|
|
||||||
#include <database/database.h>
|
#include <database/database.h>
|
||||||
#include "scanmanager.h"
|
#include "scanmanager.h"
|
||||||
|
|
||||||
@@ -53,23 +49,20 @@ SettingsDialog::SettingsDialog( QWidget *parent )
|
|||||||
ui->jabberPassword->setText( s->jabberPassword() );
|
ui->jabberPassword->setText( s->jabberPassword() );
|
||||||
ui->jabberServer->setText( s->jabberServer() );
|
ui->jabberServer->setText( s->jabberServer() );
|
||||||
ui->jabberPort->setValue( s->jabberPort() );
|
ui->jabberPort->setValue( s->jabberPort() );
|
||||||
|
|
||||||
ui->staticHostName->setText( s->externalHostname() );
|
ui->staticHostName->setText( s->externalHostname() );
|
||||||
ui->staticPort->setValue( s->externalPort() );
|
ui->staticPort->setValue( s->externalPort() );
|
||||||
|
|
||||||
ui->proxyButton->setVisible( false );
|
ui->proxyButton->setVisible( false );
|
||||||
|
|
||||||
if ( s->twitterOAuthToken().isEmpty() || s->twitterOAuthTokenSecret().isEmpty() )
|
// SIP PLUGINS
|
||||||
|
foreach(SipPlugin *plugin, APP->sipHandler()->plugins())
|
||||||
{
|
{
|
||||||
ui->twitterStatusLabel->setText("Status: No saved credentials");
|
if(plugin->configWidget())
|
||||||
ui->twitterAuthenticateButton->setText( "Authenticate" );
|
{
|
||||||
ui->twitterInstructionsBox->setVisible( false );
|
qDebug() << "Adding configWidget for " << plugin->name();
|
||||||
}
|
ui->tabWidget->addTab(plugin->configWidget(), plugin->friendlyName());
|
||||||
else
|
}
|
||||||
{
|
|
||||||
ui->twitterStatusLabel->setText("Status: Credentials saved");
|
|
||||||
ui->twitterAuthenticateButton->setText( "Re-authenticate" );
|
|
||||||
ui->twitterInstructionsBox->setVisible( true );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MUSIC SCANNER
|
// MUSIC SCANNER
|
||||||
@@ -260,98 +253,6 @@ SettingsDialog::onLastFmFinished()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
SettingsDialog::authenticateTwitter()
|
|
||||||
{
|
|
||||||
TomahawkOAuthTwitter *twitAuth = new TomahawkOAuthTwitter( this );
|
|
||||||
twitAuth->setNetworkAccessManager( TomahawkUtils::nam() );
|
|
||||||
twitAuth->authorizePin();
|
|
||||||
if ( !twitAuth->oauthToken().isEmpty() && !twitAuth->oauthTokenSecret().isEmpty() )
|
|
||||||
{
|
|
||||||
TomahawkSettings* s = TomahawkSettings::instance();
|
|
||||||
s->setTwitterOAuthToken( twitAuth->oauthToken() );
|
|
||||||
s->setTwitterOAuthTokenSecret( twitAuth->oauthTokenSecret() );
|
|
||||||
ui->twitterStatusLabel->setText("Status: Credentials saved");
|
|
||||||
ui->twitterAuthenticateButton->setText( "Re-authenticate" );
|
|
||||||
ui->twitterInstructionsBox->setVisible( true );
|
|
||||||
TomahawkSettings::instance()->setTwitterCachedFriendsSinceId( 0 );
|
|
||||||
TomahawkSettings::instance()->setTwitterCachedMentionsSinceId( 0 );
|
|
||||||
TomahawkApp::instance()->sipHandler()->connectPlugins( false, "SIPTWITTER" );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TomahawkSettings* s = TomahawkSettings::instance();
|
|
||||||
s->setTwitterOAuthToken( QString() );
|
|
||||||
s->setTwitterOAuthTokenSecret( QString() );
|
|
||||||
ui->twitterStatusLabel->setText("Status: No saved credentials");
|
|
||||||
ui->twitterAuthenticateButton->setText( "Authenticate" );
|
|
||||||
ui->twitterInstructionsBox->setVisible( false );
|
|
||||||
QMessageBox::critical( 0, QString("Tweetin' Error"), QString("There was an error validating your authentication") );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
SettingsDialog::startPostGotTomahawkStatus()
|
|
||||||
{
|
|
||||||
qDebug() << "Posting Got Tomahawk status";
|
|
||||||
TomahawkSettings* s = TomahawkSettings::instance();
|
|
||||||
if ( s->twitterOAuthToken().isEmpty() || s->twitterOAuthTokenSecret().isEmpty() )
|
|
||||||
{
|
|
||||||
QMessageBox::critical( 0, QString("Tweetin' Error"), QString("Your saved credentials could not be loaded.\nYou may wish to try re-authenticating.") );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
TomahawkOAuthTwitter *twitAuth = new TomahawkOAuthTwitter( this );
|
|
||||||
twitAuth->setNetworkAccessManager( TomahawkUtils::nam() );
|
|
||||||
twitAuth->setOAuthToken( s->twitterOAuthToken().toLatin1() );
|
|
||||||
twitAuth->setOAuthTokenSecret( s->twitterOAuthTokenSecret().toLatin1() );
|
|
||||||
QTweetAccountVerifyCredentials *credVerifier = new QTweetAccountVerifyCredentials( twitAuth, this );
|
|
||||||
connect( credVerifier, SIGNAL( parsedUser(const QTweetUser &) ), SLOT( postGotTomahawkStatusAuthVerifyReply(const QTweetUser &) ) );
|
|
||||||
credVerifier->verify();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
SettingsDialog::postGotTomahawkStatusAuthVerifyReply( const QTweetUser &user )
|
|
||||||
{
|
|
||||||
if ( user.id() == 0 )
|
|
||||||
{
|
|
||||||
QMessageBox::critical( 0, QString("Tweetin' Error"), QString("Your saved credentials could not be verified.\nYou may wish to try re-authenticating.") );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
TomahawkSettings* s = TomahawkSettings::instance();
|
|
||||||
s->setTwitterScreenName( user.screenName() );
|
|
||||||
TomahawkOAuthTwitter *twitAuth = new TomahawkOAuthTwitter( this );
|
|
||||||
twitAuth->setNetworkAccessManager( TomahawkUtils::nam() );
|
|
||||||
twitAuth->setOAuthToken( s->twitterOAuthToken().toLatin1() );
|
|
||||||
twitAuth->setOAuthTokenSecret( s->twitterOAuthTokenSecret().toLatin1() );
|
|
||||||
QTweetStatusUpdate *statUpdate = new QTweetStatusUpdate( twitAuth, this );
|
|
||||||
connect( statUpdate, SIGNAL( postedStatus(const QTweetStatus &) ), SLOT( postGotTomahawkStatusUpdateReply(const QTweetStatus &) ) );
|
|
||||||
connect( statUpdate, SIGNAL( error(QTweetNetBase::ErrorCode, const QString&) ), SLOT( postGotTomahawkStatusUpdateError(QTweetNetBase::ErrorCode, const QString &) ) );
|
|
||||||
QString uuid = QUuid::createUuid();
|
|
||||||
statUpdate->post( QString( "Got Tomahawk? {" ) + Database::instance()->dbid() + QString( "} (" ) + uuid.mid( 1, 8 ) + QString( ")" ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
SettingsDialog::postGotTomahawkStatusUpdateReply( const QTweetStatus& status )
|
|
||||||
{
|
|
||||||
if ( status.id() == 0 )
|
|
||||||
QMessageBox::critical( 0, QString("Tweetin' Error"), QString("There was an error posting your status -- sorry!") );
|
|
||||||
else
|
|
||||||
QMessageBox::information( 0, QString("Tweeted!"), QString("Your tweet has been posted!") );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
SettingsDialog::postGotTomahawkStatusUpdateError( QTweetNetBase::ErrorCode code, const QString& errorMsg )
|
|
||||||
{
|
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
qDebug() << "Error posting Got Tomahawk message, error code is " << code << ", error message is " << errorMsg;
|
|
||||||
QMessageBox::critical( 0, QString("Tweetin' Error"), QString("There was an error posting your status -- sorry!") );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ProxyDialog::ProxyDialog( QWidget *parent )
|
ProxyDialog::ProxyDialog( QWidget *parent )
|
||||||
: QDialog( parent )
|
: QDialog( parent )
|
||||||
, ui( new Ui::ProxyDialog )
|
, ui( new Ui::ProxyDialog )
|
||||||
|
@@ -3,10 +3,6 @@
|
|||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
#include <qtweetstatus.h>
|
|
||||||
#include <qtweetuser.h>
|
|
||||||
#include <qtweetnetbase.h>
|
|
||||||
|
|
||||||
class QNetworkReply;
|
class QNetworkReply;
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
@@ -53,13 +49,7 @@ private slots:
|
|||||||
|
|
||||||
void testLastFmLogin();
|
void testLastFmLogin();
|
||||||
void onLastFmFinished();
|
void onLastFmFinished();
|
||||||
|
|
||||||
void authenticateTwitter();
|
|
||||||
void startPostGotTomahawkStatus();
|
|
||||||
void postGotTomahawkStatusAuthVerifyReply( const QTweetUser &user );
|
|
||||||
void postGotTomahawkStatusUpdateReply( const QTweetStatus &status );
|
|
||||||
void postGotTomahawkStatusUpdateError( QTweetNetBase::ErrorCode, const QString &errorMsg );
|
|
||||||
|
|
||||||
void addScriptResolver();
|
void addScriptResolver();
|
||||||
void scriptSelectionChanged();
|
void scriptSelectionChanged();
|
||||||
void removeScriptResolver();
|
void removeScriptResolver();
|
||||||
|
@@ -485,104 +485,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tabTwitter">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Twitter</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_10">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="twitterVertLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="twitterInfoLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Authenticating with Twitter allows you to discover and play music from your Twitter friends running Tomahawk.
|
|
||||||
|
|
||||||
This feature works best when you have set a static host name in the "Network" settings tab under Advanced Settings, but may work even if you do not. Please note: this discovery uses Direct Messages and will only work when both Twitter users have followed each other. Tomahawk will attempt to "clean up" after itself to keep your Direct Message inbox tidy, but may miss some.
|
|
||||||
|
|
||||||
When you press the button your web browser will launch and take you to Twitter.com to authenticate. You must copy and paste the PIN number into the dialog box that appears.</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="twitterHorizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="twitterStatusLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Status: No saved credentials</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::AutoText</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="twitterAuthenticateButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Authenticate with Twitter</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="twitterInstructionsBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Instructions</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_12">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="twitterInstructionsVLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="twitterInstructionsInfoLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>How it works is simple: just press the button below to tweet "Got Tomahawk?" and some necessary information. Then be (very) patient. Twitter is an asynchronous protocol so it can take a bit!
|
|
||||||
|
|
||||||
If connections to peers seem to have been lost, just press the button again to re-post a tweet for resynchronization.
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="twitterTweetGotTomahawkButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Press here to have Tomahawk post a tweet</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="twitterVertSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tabLastfm">
|
<widget class="QWidget" name="tabLastfm">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Last.fm</string>
|
<string>Last.fm</string>
|
||||||
@@ -811,37 +713,5 @@ If connections to peers seem to have been lost, just press the button again to r
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>twitterAuthenticateButton</sender>
|
|
||||||
<signal>pressed()</signal>
|
|
||||||
<receiver>SettingsDialog</receiver>
|
|
||||||
<slot>authenticateTwitter()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>459</x>
|
|
||||||
<y>205</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>310</x>
|
|
||||||
<y>216</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>twitterTweetGotTomahawkButton</sender>
|
|
||||||
<signal>pressed()</signal>
|
|
||||||
<receiver>SettingsDialog</receiver>
|
|
||||||
<slot>startPostGotTomahawkStatus()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>310</x>
|
|
||||||
<y>313</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>310</x>
|
|
||||||
<y>216</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
#include "tomahawksettings.h"
|
#include "tomahawksettings.h"
|
||||||
|
|
||||||
#include "tomahawk/tomahawkapp.h"
|
|
||||||
|
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
@@ -32,6 +30,12 @@ JabberPlugin::name()
|
|||||||
return QString( MYNAME );
|
return QString( MYNAME );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QString
|
||||||
|
JabberPlugin::friendlyName()
|
||||||
|
{
|
||||||
|
return QString( "Jabber" );
|
||||||
|
}
|
||||||
|
|
||||||
const QString
|
const QString
|
||||||
JabberPlugin::accountName()
|
JabberPlugin::accountName()
|
||||||
{
|
{
|
||||||
@@ -62,7 +66,7 @@ JabberPlugin::connectPlugin( bool startup )
|
|||||||
qDebug() << "JID did not have an @ in it, could not find a server part";
|
qDebug() << "JID did not have an @ in it, could not find a server part";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( server.isEmpty() )
|
if ( server.isEmpty() )
|
||||||
server = splitJid[1];
|
server = splitJid[1];
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ public:
|
|||||||
//FIXME: Make this more correct
|
//FIXME: Make this more correct
|
||||||
virtual bool isValid() { return true; }
|
virtual bool isValid() { return true; }
|
||||||
virtual const QString name();
|
virtual const QString name();
|
||||||
|
virtual const QString friendlyName();
|
||||||
virtual const QString accountName();
|
virtual const QString accountName();
|
||||||
virtual QMenu* menu();
|
virtual QMenu* menu();
|
||||||
|
|
||||||
|
@@ -8,20 +8,27 @@ add_definitions( -DSIPDLLEXPORT_PRO )
|
|||||||
|
|
||||||
set( twitterSources
|
set( twitterSources
|
||||||
twitter.cpp
|
twitter.cpp
|
||||||
|
twitterconfigwidget.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set( twitterHeaders
|
set( twitterHeaders
|
||||||
twitter.h
|
twitter.h
|
||||||
|
twitterconfigwidget.h
|
||||||
)
|
)
|
||||||
|
|
||||||
include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ..
|
set( twitterUI
|
||||||
|
twitterconfigwidget.ui
|
||||||
|
)
|
||||||
|
|
||||||
|
include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ..
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/qtweetlib/src
|
${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/qtweetlib/src
|
||||||
${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/tomahawk-custom
|
${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/tomahawk-custom
|
||||||
)
|
)
|
||||||
|
|
||||||
qt4_wrap_cpp( twitterMoc ${twitterHeaders} )
|
qt4_wrap_cpp( twitterMoc ${twitterHeaders} )
|
||||||
add_library( sip_twitter SHARED ${twitterSources} ${twitterMoc} )
|
qt4_wrap_ui( twitterUI_H ${twitterUI} )
|
||||||
|
add_library( sip_twitter SHARED ${twitterUI_H} ${twitterSources} ${twitterMoc} )
|
||||||
|
|
||||||
IF( WIN32 )
|
IF( WIN32 )
|
||||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
#include "twitter.h"
|
#include "twitter.h"
|
||||||
|
|
||||||
|
#include "twitterconfigwidget.h"
|
||||||
|
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
#include <QRegExp>
|
#include <QRegExp>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
@@ -33,6 +33,9 @@ public:
|
|||||||
virtual bool isValid();
|
virtual bool isValid();
|
||||||
virtual const QString name();
|
virtual const QString name();
|
||||||
virtual const QString accountName();
|
virtual const QString accountName();
|
||||||
|
virtual const QString friendlyName();
|
||||||
|
|
||||||
|
virtual QWidget* configWidget();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual bool connectPlugin( bool startup );
|
virtual bool connectPlugin( bool startup );
|
||||||
|
@@ -14,6 +14,12 @@ ZeroconfPlugin::accountName()
|
|||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QString
|
||||||
|
ZeroconfPlugin::friendlyName()
|
||||||
|
{
|
||||||
|
return QString( "Zeroconf" );
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ZeroconfPlugin::connectPlugin( bool /*startup*/ )
|
ZeroconfPlugin::connectPlugin( bool /*startup*/ )
|
||||||
{
|
{
|
||||||
|
@@ -24,6 +24,7 @@ public:
|
|||||||
|
|
||||||
virtual bool isValid() { return true; }
|
virtual bool isValid() { return true; }
|
||||||
virtual const QString name();
|
virtual const QString name();
|
||||||
|
virtual const QString friendlyName();
|
||||||
virtual const QString accountName();
|
virtual const QString accountName();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
Reference in New Issue
Block a user