1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 03:10:12 +02:00

icon update

add zeroconf config too
This commit is contained in:
Leo Franchi
2011-05-03 23:21:00 -04:00
parent c854a090e6
commit f774ae4731
17 changed files with 163 additions and 120 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 757 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

View File

@@ -1,104 +1,108 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>./data/images/add-friend-button-pressed.png</file>
<file>./data/images/add-friend-button-rest.png</file>
<file>./data/images/avatar-dude-plus.png</file>
<file>./data/images/avatar-dude.png</file>
<file>./data/images/back-pressed.png</file>
<file>./data/images/back-rest.png</file>
<file>./data/images/cover-shadow.png</file>
<file>./data/images/magnifying-glass.png</file>
<file>./data/images/no-album-art-placeholder.png</file>
<file>./data/images/now-playing-panel.png</file>
<file>./data/images/now-playing-speaker.png</file>
<file>./data/images/pause-pressed.png</file>
<file>./data/images/pause-rest.png</file>
<file>./data/images/play-pressed.png</file>
<file>./data/images/play-rest.png</file>
<file>./data/images/playlist-icon.png</file>
<file>./data/images/repeat-1-on-pressed.png</file>
<file>./data/images/repeat-1-on-rest.png</file>
<file>./data/images/repeat-all-on-pressed.png</file>
<file>./data/images/repeat-all-on-rest.png</file>
<file>./data/images/repeat-off-pressed.png</file>
<file>./data/images/repeat-off-rest.png</file>
<file>./data/images/search-box-dismiss-x.png</file>
<file>./data/images/search-box.png</file>
<file>./data/images/seek-and-volume-knob-pressed.png</file>
<file>./data/images/seek-and-volume-knob-rest.png</file>
<file>./data/images/seek-slider-bkg.png</file>
<file>./data/images/seek-slider-level.png</file>
<file>./data/images/shuffle-off-pressed.png</file>
<file>./data/images/shuffle-off-rest.png</file>
<file>./data/images/shuffle-on-pressed.png</file>
<file>./data/images/shuffle-on-rest.png</file>
<file>./data/images/skip-pressed.png</file>
<file>./data/images/skip-rest.png</file>
<file>./data/images/source-info.png</file>
<file>./data/images/source-off-pressed.png</file>
<file>./data/images/source-off-rest.png</file>
<file>./data/images/source-on-pressed.png</file>
<file>./data/images/source-on-rest.png</file>
<file>./data/images/status-alert-icon.png</file>
<file>./data/images/status-bar-bkg.png</file>
<file>./data/images/status-dismiss-x.png</file>
<file>./data/images/user-avatar.png</file>
<file>./data/images/view-toggle-active-centre.png</file>
<file>./data/images/view-toggle-active-left.png</file>
<file>./data/images/view-toggle-active-right.png</file>
<file>./data/images/view-toggle-icon-artist-active.png</file>
<file>./data/images/view-toggle-icon-artist-inactive.png</file>
<file>./data/images/view-toggle-icon-cloud-active.png</file>
<file>./data/images/view-toggle-icon-cloud-inactive.png</file>
<file>./data/images/view-toggle-icon-list-active.png</file>
<file>./data/images/view-toggle-icon-list-inactive.png</file>
<file>./data/images/view-toggle-inactive-centre.png</file>
<file>./data/images/view-toggle-inactive-left.png</file>
<file>./data/images/view-toggle-inactive-right.png</file>
<file>./data/images/view-toggle-pressed-centre.png</file>
<file>./data/images/view-toggle-pressed-left.png</file>
<file>./data/images/view-toggle-pressed-right.png</file>
<file>./data/images/list-add.png</file>
<file>./data/images/list-remove.png</file>
<file>./data/images/arrow-up-double.png</file>
<file>./data/images/arrow-down-double.png</file>
<file>./data/images/volume-icon-full.png</file>
<file>./data/images/arrow-right-double.png</file>
<file>./data/images/view-refresh.png</file>
<file>./data/images/volume-icon-muted.png</file>
<file>./data/images/volume-slider-bkg.png</file>
<file>./data/images/volume-slider-level.png</file>
<file>./data/images/echonest_logo.png</file>
<file>./data/images/loading-animation.gif</file>
<file>./data/images/home.png</file>
<file>./data/images/back.png</file>
<file>./data/images/forward.png</file>
<file>./data/images/music-icon.png</file>
<file>./data/images/configure.png</file>
<file>./data/images/create-playlist.png</file>
<file>./data/images/add.png</file>
<file>./data/images/recently-played.png</file>
<file>./data/images/supercollection.png</file>
<file>./data/images/sipplugin-online.png</file>
<file>./data/images/sipplugin-offline.png</file>
<file>./data/images/advanced-settings.png</file>
<file>./data/images/account-settings.png</file>
<file>./data/images/music-settings.png</file>
<file>./data/images/resolvers-settings.png</file>
<file>./data/images/lastfm-settings.png</file>
<file>./data/topbar-radiobuttons.css</file>
<file>./data/icons/tomahawk-icon-16x16.png</file>
<file>./data/icons/tomahawk-icon-32x32.png</file>
<file>./data/icons/tomahawk-icon-64x64.png</file>
<file>./data/icons/tomahawk-icon-128x128.png</file>
<file>./data/icons/tomahawk-icon-256x256.png</file>
<file>./data/icons/tomahawk-icon-512x512.png</file>
<file>./data/icons/audio-x-generic-22x22.png</file>
<file>./data/icons/audio-x-generic-32x32.png</file>
<file>./data/icons/audio-x-generic-16x16.png</file>
<file>./data/www/auth.html</file>
<file>./data/www/auth.na.html</file>
<file>./data/www/tomahawk_banner_small.png</file>
<file>./data/sql/dbmigrate-22_to_23.sql</file>
</qresource>
<RCC>
<qresource>
<file>./data/images/add-friend-button-pressed.png</file>
<file>./data/images/add-friend-button-rest.png</file>
<file>./data/images/avatar-dude-plus.png</file>
<file>./data/images/avatar-dude.png</file>
<file>./data/images/back-pressed.png</file>
<file>./data/images/back-rest.png</file>
<file>./data/images/cover-shadow.png</file>
<file>./data/images/magnifying-glass.png</file>
<file>./data/images/no-album-art-placeholder.png</file>
<file>./data/images/now-playing-panel.png</file>
<file>./data/images/now-playing-speaker.png</file>
<file>./data/images/pause-pressed.png</file>
<file>./data/images/pause-rest.png</file>
<file>./data/images/play-pressed.png</file>
<file>./data/images/play-rest.png</file>
<file>data/images/sipplugin-add.png</file>
<file>data/images/seek-slider-level.png</file>
<file>data/images/shuffle-off-rest.png</file>
<file>data/images/sipplugin-remove.png</file>
<file>./data/images/playlist-icon.png</file>
<file>./data/images/repeat-1-on-pressed.png</file>
<file>./data/images/repeat-1-on-rest.png</file>
<file>./data/images/repeat-all-on-pressed.png</file>
<file>./data/images/repeat-all-on-rest.png</file>
<file>./data/images/repeat-off-pressed.png</file>
<file>./data/images/repeat-off-rest.png</file>
<file>./data/images/search-box-dismiss-x.png</file>
<file>./data/images/search-box.png</file>
<file>./data/images/seek-and-volume-knob-pressed.png</file>
<file>./data/images/seek-and-volume-knob-rest.png</file>
<file>./data/images/seek-slider-bkg.png</file>
<file>./data/images/seek-slider-level.png</file>
<file>./data/images/shuffle-off-pressed.png</file>
<file>./data/images/shuffle-off-rest.png</file>
<file>./data/images/shuffle-on-pressed.png</file>
<file>./data/images/shuffle-on-rest.png</file>
<file>./data/images/skip-pressed.png</file>
<file>./data/images/skip-rest.png</file>
<file>./data/images/source-info.png</file>
<file>./data/images/source-off-pressed.png</file>
<file>./data/images/source-off-rest.png</file>
<file>./data/images/source-on-pressed.png</file>
<file>./data/images/source-on-rest.png</file>
<file>./data/images/status-alert-icon.png</file>
<file>./data/images/status-bar-bkg.png</file>
<file>./data/images/status-dismiss-x.png</file>
<file>./data/images/user-avatar.png</file>
<file>./data/images/view-toggle-active-centre.png</file>
<file>./data/images/view-toggle-active-left.png</file>
<file>./data/images/view-toggle-active-right.png</file>
<file>./data/images/view-toggle-icon-artist-active.png</file>
<file>./data/images/view-toggle-icon-artist-inactive.png</file>
<file>./data/images/view-toggle-icon-cloud-active.png</file>
<file>./data/images/view-toggle-icon-cloud-inactive.png</file>
<file>./data/images/view-toggle-icon-list-active.png</file>
<file>./data/images/view-toggle-icon-list-inactive.png</file>
<file>./data/images/view-toggle-inactive-centre.png</file>
<file>./data/images/view-toggle-inactive-left.png</file>
<file>./data/images/view-toggle-inactive-right.png</file>
<file>./data/images/view-toggle-pressed-centre.png</file>
<file>./data/images/view-toggle-pressed-left.png</file>
<file>./data/images/view-toggle-pressed-right.png</file>
<file>./data/images/list-add.png</file>
<file>./data/images/list-remove.png</file>
<file>./data/images/arrow-up-double.png</file>
<file>./data/images/arrow-down-double.png</file>
<file>./data/images/volume-icon-full.png</file>
<file>./data/images/arrow-right-double.png</file>
<file>./data/images/view-refresh.png</file>
<file>./data/images/volume-icon-muted.png</file>
<file>./data/images/volume-slider-bkg.png</file>
<file>./data/images/volume-slider-level.png</file>
<file>./data/images/echonest_logo.png</file>
<file>./data/images/loading-animation.gif</file>
<file>./data/images/home.png</file>
<file>./data/images/back.png</file>
<file>./data/images/forward.png</file>
<file>./data/images/music-icon.png</file>
<file>./data/images/configure.png</file>
<file>./data/images/create-playlist.png</file>
<file>./data/images/add.png</file>
<file>./data/images/recently-played.png</file>
<file>./data/images/supercollection.png</file>
<file>./data/images/sipplugin-online.png</file>
<file>./data/images/sipplugin-offline.png</file>
<file>./data/images/advanced-settings.png</file>
<file>./data/images/account-settings.png</file>
<file>./data/images/music-settings.png</file>
<file>./data/images/resolvers-settings.png</file>
<file>./data/images/lastfm-settings.png</file>
<file>./data/topbar-radiobuttons.css</file>
<file>./data/icons/tomahawk-icon-16x16.png</file>
<file>./data/icons/tomahawk-icon-32x32.png</file>
<file>./data/icons/tomahawk-icon-64x64.png</file>
<file>./data/icons/tomahawk-icon-128x128.png</file>
<file>./data/icons/tomahawk-icon-256x256.png</file>
<file>./data/icons/tomahawk-icon-512x512.png</file>
<file>./data/icons/audio-x-generic-22x22.png</file>
<file>./data/icons/audio-x-generic-32x32.png</file>
<file>./data/icons/audio-x-generic-16x16.png</file>
<file>./data/www/auth.html</file>
<file>./data/www/auth.na.html</file>
<file>./data/www/tomahawk_banner_small.png</file>
<file>./data/sql/dbmigrate-22_to_23.sql</file>
</qresource>
</RCC>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -51,6 +51,7 @@ TwitterConfigWidget::TwitterConfigWidget( TwitterPlugin* plugin, QWidget *parent
ui->twitterTweetComboBox->setCurrentIndex( 0 );
ui->twitterUserTweetLineEdit->setReadOnly( true );
ui->twitterUserTweetLineEdit->setEnabled( false );
ui->autoConnectCheckbox->setChecked( m_plugin->twitterAutoConnect() );
if ( m_plugin->twitterOAuthToken().isEmpty() || m_plugin->twitterOAuthTokenSecret().isEmpty() || m_plugin->twitterScreenName().isEmpty() )
{

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>515</width>
<height>323</height>
<height>385</height>
</rect>
</property>
<property name="minimumSize">

View File

@@ -19,9 +19,10 @@ include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ..
${QT_INCLUDE_DIR}
)
qt4_wrap_ui( UI_SRCS configwidget.ui )
qt4_add_resources( RC_SRCS "resources.qrc" )
qt4_wrap_cpp( zeroconfMoc ${zeroconfHeaders} )
add_library( tomahawk_sipzeroconf SHARED ${zeroconfSources} ${zeroconfMoc} ${RC_SRCS} )
add_library( tomahawk_sipzeroconf SHARED ${zeroconfSources} ${zeroconfMoc} ${RC_SRCS} ${UI_SRCS} )
IF( WIN32 )
SET( OS_SPECIFIC_LINK_LIBRARIES

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@@ -18,6 +18,9 @@
#include "zeroconf.h"
#include "tomahawksettings.h"
#include "ui_configwidget.h"
#include <QtPlugin>
SipPlugin*
@@ -26,6 +29,21 @@ ZeroconfFactory::createPlugin( const QString& pluginId )
return new ZeroconfPlugin( pluginId.isEmpty() ? generateId() : pluginId );
}
ZeroconfPlugin::ZeroconfPlugin ( const QString& pluginId )
: SipPlugin( pluginId )
, m_zeroconf( 0 )
, m_state( Disconnected )
, m_cachedNodes()
{
qDebug() << Q_FUNC_INFO;
m_configWidget = QWeakPointer< QWidget >( new QWidget );
m_ui = new Ui_ZeroconfConfig;
m_ui->setupUi( m_configWidget.data() );
m_ui->autoConnectCheckbox->setChecked( autoConnect() );
m_configWidget.data()->setVisible( false );
}
const QString
ZeroconfPlugin::name() const
{
@@ -58,8 +76,11 @@ ZeroconfFactory::icon() const
bool
ZeroconfPlugin::connectPlugin( bool /*startup*/ )
ZeroconfPlugin::connectPlugin( bool startup )
{
if( startup && !autoConnect() )
return false;
delete m_zeroconf;
m_zeroconf = new TomahawkZeroconf( Servent::instance()->port(), this );
QObject::connect( m_zeroconf, SIGNAL( tomahawkHostFound( QString, int, QString, QString ) ),
@@ -116,4 +137,17 @@ ZeroconfPlugin::lanHostFound( const QString& host, int port, const QString& name
qDebug() << "Already connected to" << host;
}
void
ZeroconfPlugin::saveConfig()
{
TomahawkSettings::instance()->setValue( pluginId() + "/autoconnect", m_ui->autoConnectCheckbox->isChecked() );
}
bool
ZeroconfPlugin::autoConnect() const
{
return TomahawkSettings::instance()->value( pluginId() + "/autoconnect", true ).toBool();
}
Q_EXPORT_PLUGIN2( sipfactory, ZeroconfFactory )

View File

@@ -26,6 +26,8 @@
#define MYNAME "Local Network"
class Ui_ZeroconfConfig;
class SIPDLLEXPORT ZeroconfFactory : public SipPluginFactory
{
Q_OBJECT
@@ -39,6 +41,7 @@ public:
virtual bool isUnique() const { return true; }
virtual QIcon icon() const;
virtual SipPlugin* createPlugin ( const QString& pluginId = QString() );
};
@@ -47,14 +50,7 @@ class SIPDLLEXPORT ZeroconfPlugin : public SipPlugin
Q_OBJECT
public:
ZeroconfPlugin( const QString& pluginId )
: SipPlugin( pluginId )
, m_zeroconf( 0 )
, m_state( Disconnected )
, m_cachedNodes()
{
qDebug() << Q_FUNC_INFO;
}
ZeroconfPlugin( const QString& pluginId );
virtual ~ZeroconfPlugin()
{
@@ -67,6 +63,8 @@ public:
virtual ConnectionState connectionState() const;
virtual bool isValid() const { return true; };
virtual QIcon icon() const;
virtual QWidget* configWidget() { return m_configWidget.data(); }
virtual void saveConfig();
public slots:
virtual bool connectPlugin( bool startup );
@@ -94,9 +92,14 @@ private slots:
void lanHostFound( const QString& host, int port, const QString& name, const QString& nodeid );
private:
bool autoConnect() const;
TomahawkZeroconf* m_zeroconf;
ConnectionState m_state;
QVector<QStringList> m_cachedNodes;
Ui_ZeroconfConfig* m_ui; // so the google wrapper can change the config dialog a bit
QWeakPointer< QWidget > m_configWidget;
};
#endif

View File

@@ -164,7 +164,7 @@ SipConfigDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option
}
// draw the online/offline status
int statusIconSize = 10;
int statusIconSize = 18;
int statusX = confRect.left() - 2*PADDING - statusIconSize;
QFont statusF = opt.font;
statusF.setPointSize( statusF.pointSize() - 2 );
@@ -198,7 +198,7 @@ SipConfigDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option
width = itemRect.width() - textLeftEdge;
if( !index.data( SipModel::ErrorString ).toString().isEmpty() ) { // error, show that too
QRect errorRect( textLeftEdge, mid + top, width, mid - PADDING );
QRect errorRect( textLeftEdge, mid + top, width, mid - PADDING + 1 );
QFontMetrics errorFm( error );
QString str = errorFm.elidedText( index.data( SipModel::ErrorString ).toString(), Qt::ElideRight, errorRect.width() );
@@ -209,7 +209,7 @@ SipConfigDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option
}
QString nameStr = namefm.elidedText( index.data( Qt::DisplayRole ).toString(), Qt::ElideRight, width );
painter->setFont( name );
painter->drawText( QRect( textLeftEdge, pos + top, width, nameHeight ), nameStr );
painter->drawText( QRect( textLeftEdge, pos + top, width, nameHeight + 1 ), nameStr );
painter->restore();
}
}

View File

@@ -100,7 +100,7 @@
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<widget class="QWidget" name="accountsPage">
<layout class="QVBoxLayout" name="verticalLayout_11">
@@ -153,7 +153,7 @@
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/data/images/list-add.png</normaloff>:/data/images/list-add.png</iconset>
<normaloff>:/data/images/sipplugin-add.png</normaloff>:/data/images/sipplugin-add.png</iconset>
</property>
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
@@ -167,7 +167,7 @@
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/data/images/list-remove.png</normaloff>:/data/images/list-remove.png</iconset>
<normaloff>:/data/images/sipplugin-remove.png</normaloff>:/data/images/sipplugin-remove.png</iconset>
</property>
<property name="popupMode">
<enum>QToolButton::DelayedPopup</enum>