mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
* Replace a ton more old PNGs with new SVG icon-set.
This commit is contained in:
@@ -22,7 +22,7 @@ QRadioButton::indicator::unchecked {
|
||||
image: url(:/data/images/view-toggle-icon-list-inactive.svg);
|
||||
}
|
||||
QRadioButton::indicator::checked {
|
||||
background-image: url(:/data/images/view-toggle-active-centre.png);
|
||||
background-image: url(:/data/images/view-toggle-active-centre.svg);
|
||||
image: url(:/data/images/view-toggle-icon-list-active.svg);
|
||||
}
|
||||
QRadioButton::indicator::pressed {
|
||||
@@ -34,7 +34,7 @@ QRadioButton#radioNormal::indicator::unchecked {
|
||||
image: url(:/data/images/view-toggle-icon-artist-inactive.svg);
|
||||
}
|
||||
QRadioButton#radioNormal::indicator::checked {
|
||||
background-image: url(:/data/images/view-toggle-active-left.png);
|
||||
background-image: url(:/data/images/view-toggle-active-left.svg);
|
||||
image: url(:/data/images/view-toggle-icon-artist-active.svg);
|
||||
}
|
||||
QRadioButton#radioNormal::indicator::pressed {
|
||||
@@ -46,7 +46,7 @@ QRadioButton#radioCloud::indicator::unchecked {
|
||||
image: url(:/data/images/view-toggle-icon-grid-inactive.svg);
|
||||
}
|
||||
QRadioButton#radioCloud::indicator::checked {
|
||||
background-image: url(:/data/images/view-toggle-active-right.png);
|
||||
background-image: url(:/data/images/view-toggle-active-right.svg);
|
||||
image: url(:/data/images/view-toggle-icon-grid-active.svg);
|
||||
}
|
||||
QRadioButton#radioCloud::indicator::pressed {
|
||||
|
@@ -9,7 +9,6 @@
|
||||
<file>data/images/no-artist-image-placeholder.svg</file>
|
||||
<file>data/images/artist-placeholder-grid.svg</file>
|
||||
<file>data/images/album-placeholder-grid.svg</file>
|
||||
<file>data/images/track-placeholder.png</file>
|
||||
<file>data/images/track-placeholder-grid.svg</file>
|
||||
<file>data/images/now-playing-panel.png</file>
|
||||
<file>data/images/now-playing-speaker.svg</file>
|
||||
@@ -36,13 +35,11 @@
|
||||
<file>data/images/skip-pressed.svg</file>
|
||||
<file>data/images/skip-rest.svg</file>
|
||||
<file>data/images/user-avatar.svg</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-active-centre.svg</file>
|
||||
<file>data/images/view-toggle-active-left.svg</file>
|
||||
<file>data/images/view-toggle-active-right.svg</file>
|
||||
<file>data/images/view-toggle-icon-artist-active.svg</file>
|
||||
<file>data/images/view-toggle-icon-artist-inactive.svg</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-grid-active.svg</file>
|
||||
<file>data/images/view-toggle-icon-grid-inactive.svg</file>
|
||||
<file>data/images/view-toggle-icon-list-active.svg</file>
|
||||
@@ -67,31 +64,30 @@
|
||||
<file>data/images/info.svg</file>
|
||||
<file>data/images/back.svg</file>
|
||||
<file>data/images/forward.svg</file>
|
||||
<file>data/images/music-icon.png</file>
|
||||
<file>data/images/configure.svg</file>
|
||||
<file>data/images/private-listening.png</file>
|
||||
<file>data/images/add.png</file>
|
||||
<file>data/images/recently-played.png</file>
|
||||
<file>data/images/private-listening.svg</file>
|
||||
<file>data/images/add.svg</file>
|
||||
<file>data/images/recently-played.svg</file>
|
||||
<file>data/images/supercollection.svg</file>
|
||||
<file>data/images/sipplugin-online.png</file>
|
||||
<file>data/images/sipplugin-offline.png</file>
|
||||
<file>data/images/sipplugin-online.svg</file>
|
||||
<file>data/images/sipplugin-offline.svg</file>
|
||||
<file>data/images/advanced-settings.svg</file>
|
||||
<file>data/images/account-settings.svg</file>
|
||||
<file>data/images/music-settings.svg</file>
|
||||
<file>data/images/automatic-playlist.png</file>
|
||||
<file>data/images/automatic-playlist.svg</file>
|
||||
<file>data/images/station.svg</file>
|
||||
<file>data/images/new-additions.svg</file>
|
||||
<file>data/images/charts.svg</file>
|
||||
<file>data/images/new-releases.svg</file>
|
||||
<file>data/images/loved_playlist.svg</file>
|
||||
<file>data/images/dashboard.svg</file>
|
||||
<file>data/images/artist-icon.png</file>
|
||||
<file>data/images/artist-icon.svg</file>
|
||||
<file>data/images/album-icon.svg</file>
|
||||
<file>data/images/track-icon.svg</file>
|
||||
<file>data/images/search-icon.png</file>
|
||||
<file>data/images/star-hover.png</file>
|
||||
<file>data/images/starred.png</file>
|
||||
<file>data/images/star-unstarred.png</file>
|
||||
<file>data/images/search-icon.svg</file>
|
||||
<file>data/images/star-hover.svg</file>
|
||||
<file>data/images/starred.svg</file>
|
||||
<file>data/images/star-unstarred.svg</file>
|
||||
<file>data/images/apply-check.svg</file>
|
||||
<file>data/stylesheets/topbar-radiobuttons.css</file>
|
||||
<file>data/icons/tomahawk-icon-16x16.png</file>
|
||||
@@ -111,23 +107,23 @@
|
||||
<file>data/sql/dbmigrate-27_to_28.sql</file>
|
||||
<file>data/sql/dbmigrate-28_to_29.sql</file>
|
||||
<file>data/js/tomahawk.js</file>
|
||||
<file>data/images/drop-all-songs.png</file>
|
||||
<file>data/images/drop-local-songs.png</file>
|
||||
<file>data/images/drop-top-songs.png</file>
|
||||
<file>data/images/drop-song.png</file>
|
||||
<file>data/images/drop-album.png</file>
|
||||
<file>data/images/drop-all-songs.svg</file>
|
||||
<file>data/images/drop-local-songs.svg</file>
|
||||
<file>data/images/drop-top-songs.svg</file>
|
||||
<file>data/images/drop-song.svg</file>
|
||||
<file>data/images/drop-album.svg</file>
|
||||
<file>data/images/spotify-logo.png</file>
|
||||
<file>data/images/itunes.png</file>
|
||||
<file>data/images/uploading.svg</file>
|
||||
<file>data/images/downloading.svg</file>
|
||||
<file>data/images/headphones-off.png</file>
|
||||
<file>data/images/closed-padlock.png</file>
|
||||
<file>data/images/headphones-off.svg</file>
|
||||
<file>data/images/closed-padlock.svg</file>
|
||||
<file>data/images/open-padlock.svg</file>
|
||||
<file>data/images/headphones.svg</file>
|
||||
<file>data/images/no-album-no-case.svg</file>
|
||||
<file>data/images/rdio.png</file>
|
||||
<file>data/images/grooveshark.png</file>
|
||||
<file>data/images/lastfm-icon.png</file>
|
||||
<file>data/images/lastfm-icon.svg</file>
|
||||
<file>data/images/spotifycore-logo.png</file>
|
||||
<file>data/images/share.svg</file>
|
||||
<file>data/images/process-stop.svg</file>
|
||||
@@ -140,16 +136,16 @@
|
||||
<file>data/images/subscribe-on.svg</file>
|
||||
<file>data/images/subscribe-off.svg</file>
|
||||
<file>data/images/add-contact.svg</file>
|
||||
<file>data/images/account-none.png</file>
|
||||
<file>data/images/account-none.svg</file>
|
||||
<file>data/images/green-dot.svg</file>
|
||||
<file>data/images/exfm.png</file>
|
||||
<file>data/images/soundcloud.png</file>
|
||||
<file>data/images/soundcloud.svg</file>
|
||||
<file>data/images/resolver-default.svg</file>
|
||||
<file>data/images/spotify-sourceicon.png</file>
|
||||
<file>data/images/account-offline.png</file>
|
||||
<file>data/images/account-online.png</file>
|
||||
<file>data/images/spotify-sourceicon.svg</file>
|
||||
<file>data/images/account-offline.svg</file>
|
||||
<file>data/images/account-online.svg</file>
|
||||
<file>data/images/cancel.svg</file>
|
||||
<file>data/images/delete.svg</file>
|
||||
<file>data/images/ok.png</file>
|
||||
<file>data/images/ok.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@@ -67,7 +67,7 @@ SocialWidget::SocialWidget( QWidget* parent )
|
||||
ui->charsLeftLabel->setForegroundRole( QPalette::Text );
|
||||
ui->charsLeftLabel->setStyleSheet( "text: black" );
|
||||
ui->buttonBox->button( QDialogButtonBox::Ok )->setText( tr( "Tweet" ) );
|
||||
ui->buttonBox->button( QDialogButtonBox::Ok )->setIcon( ImageRegistry::instance()->icon( RESPATH "images/ok.png" ) );
|
||||
ui->buttonBox->button( QDialogButtonBox::Ok )->setIcon( ImageRegistry::instance()->icon( RESPATH "images/ok.svg" ) );
|
||||
ui->buttonBox->button( QDialogButtonBox::Cancel )->setIcon( ImageRegistry::instance()->icon( RESPATH "images/cancel.svg" ) );
|
||||
|
||||
ui->textEdit->setStyleSheet( "border: 1px solid " + TomahawkUtils::Colors::BORDER_LINE.name() );
|
||||
|
@@ -57,10 +57,10 @@ void
|
||||
ActionCollection::initActions()
|
||||
{
|
||||
QAction *latchOn = new QAction( tr( "&Listen Along" ), this );
|
||||
latchOn->setIcon( QIcon( RESPATH "images/headphones-sidebar.png" ) );
|
||||
latchOn->setIcon( ImageRegistry::instance()->icon( RESPATH "images/headphones.svg" ) );
|
||||
m_actionCollection[ "latchOn" ] = latchOn;
|
||||
QAction *latchOff = new QAction( tr( "Stop &Listening Along" ), this );
|
||||
latchOff->setIcon( QIcon( RESPATH "images/headphones-off.png" ) );
|
||||
latchOff->setIcon( ImageRegistry::instance()->icon( RESPATH "images/headphones-off.svg" ) );
|
||||
m_actionCollection[ "latchOff" ] = latchOff;
|
||||
|
||||
QAction *realtimeFollowingAlong = new QAction( tr( "&Follow in real-time" ), this );
|
||||
@@ -69,7 +69,7 @@ ActionCollection::initActions()
|
||||
|
||||
bool isPublic = TomahawkSettings::instance()->privateListeningMode() == TomahawkSettings::PublicListening;
|
||||
QAction *privacyToggle = new QAction( ( isPublic ? tr( "&Listen Privately" ) : tr( "&Listen Publicly" ) ), this );
|
||||
privacyToggle->setIcon( QIcon( RESPATH "images/private-listening.png" ) );
|
||||
privacyToggle->setIcon( ImageRegistry::instance()->icon( RESPATH "images/private-listening.svg" ) );
|
||||
privacyToggle->setIconVisibleInMenu( isPublic );
|
||||
m_actionCollection[ "togglePrivacy" ] = privacyToggle;
|
||||
connect( m_actionCollection[ "togglePrivacy" ], SIGNAL( triggered() ), SLOT( togglePrivateListeningMode() ), Qt::UniqueConnection );
|
||||
|
@@ -393,7 +393,7 @@ ViewManager::showRecentPlaysPage()
|
||||
if ( !m_recentPlaysWidget )
|
||||
{
|
||||
FlexibleView* pv = new FlexibleView( m_widget );
|
||||
pv->setPixmap( QPixmap( RESPATH "images/recently-played.png" ) );
|
||||
pv->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::RecentlyPlayed ) );
|
||||
|
||||
RecentlyPlayedModel* raModel = new RecentlyPlayedModel( pv );
|
||||
raModel->setTitle( tr( "Recently Played Tracks" ) );
|
||||
|
@@ -60,21 +60,6 @@ AccountDelegate::AccountDelegate( QObject* parent )
|
||||
, m_accountRowHeight( -1 )
|
||||
, m_model( 0 )
|
||||
{
|
||||
m_defaultCover.load( RESPATH "images/sipplugin-online.png" );
|
||||
m_ratingStarPositive.load( RESPATH "images/starred.png" );
|
||||
m_ratingStarNegative.load( RESPATH "images/star-unstarred.png" );
|
||||
m_onHoverStar.load( RESPATH "images/star-hover.png" );
|
||||
m_onlineIcon.load( RESPATH "images/sipplugin-online.png" );
|
||||
m_offlineIcon.load( RESPATH "images/sipplugin-offline.png" );
|
||||
|
||||
m_ratingStarPositive = m_ratingStarPositive.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
m_ratingStarNegative = m_ratingStarNegative.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
m_onlineIcon = m_onlineIcon.scaled( STATUS_ICON_SIZE, STATUS_ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
m_offlineIcon = m_offlineIcon.scaled( STATUS_ICON_SIZE, STATUS_ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
m_onHoverStar = m_onHoverStar.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
m_defaultCover = m_defaultCover.scaled( ICONSIZE, ICONSIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +171,7 @@ AccountDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
QPixmap p = index.data( Qt::DecorationRole ).value< QPixmap >();
|
||||
QRect pixmapRect( leftEdge + PADDING, center - ICONSIZE/2, ICONSIZE, ICONSIZE );
|
||||
if ( p.isNull() ) // default image... TODO
|
||||
p = m_defaultCover;
|
||||
p = TomahawkUtils::defaultPixmap( TomahawkUtils::SipPluginOnline, TomahawkUtils::Original, pixmapRect.size() );
|
||||
else
|
||||
p = p.scaled( pixmapRect.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
@@ -350,7 +335,7 @@ AccountDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
int starsTop = runningBottom + PADDING;
|
||||
for ( int i = 1; i < 6; i++ )
|
||||
{
|
||||
QRect r( runningEdge, starsTop, m_ratingStarPositive.width(), m_ratingStarPositive.height() );
|
||||
QRect r( runningEdge, starsTop, STAR_SIZE, STAR_SIZE );
|
||||
// QRect r( runningEdge, opt.rect.top() + PADDING, m_ratingStarPositive.width(), m_ratingStarPositive.height() );
|
||||
if ( i == 1 )
|
||||
m_cachedStarRects[ index ] = r;
|
||||
@@ -361,23 +346,23 @@ AccountDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
m_hoveringItem == index )
|
||||
{
|
||||
if ( i <= m_hoveringOver ) // positive star
|
||||
painter->drawPixmap( r, m_onHoverStar );
|
||||
painter->drawPixmap( r, TomahawkUtils::defaultPixmap( TomahawkUtils::StarHovered, TomahawkUtils::Original, r.size() ) );
|
||||
else
|
||||
painter->drawPixmap( r, m_ratingStarNegative );
|
||||
painter->drawPixmap( r, TomahawkUtils::defaultPixmap( TomahawkUtils::Unstarred, TomahawkUtils::Original, r.size() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( i <= rating ) // positive or rated star
|
||||
{
|
||||
if ( userHasRated )
|
||||
painter->drawPixmap( r, m_onHoverStar );
|
||||
painter->drawPixmap( r, TomahawkUtils::defaultPixmap( TomahawkUtils::StarHovered, TomahawkUtils::Original, r.size() ) );
|
||||
else
|
||||
painter->drawPixmap( r, m_ratingStarPositive );
|
||||
painter->drawPixmap( r, TomahawkUtils::defaultPixmap( TomahawkUtils::Starred, TomahawkUtils::Original, r.size() ) );
|
||||
}
|
||||
else
|
||||
painter->drawPixmap( r, m_ratingStarNegative );
|
||||
painter->drawPixmap( r, TomahawkUtils::defaultPixmap( TomahawkUtils::Unstarred, TomahawkUtils::Original, r.size() ) );
|
||||
}
|
||||
runningEdge += m_ratingStarPositive.width() + PADDING_BETWEEN_STARS;
|
||||
runningEdge += STAR_SIZE + PADDING_BETWEEN_STARS;
|
||||
}
|
||||
|
||||
// downloaded num times
|
||||
@@ -508,7 +493,7 @@ AccountDelegate::editorEvent( QEvent* event, QAbstractItemModel* model, const QS
|
||||
if ( m_cachedStarRects.contains( index ) )
|
||||
{
|
||||
QRect fullStars = m_cachedStarRects[ index ];
|
||||
const int starsWidth = 5 * ( m_ratingStarPositive.width() + PADDING_BETWEEN_STARS );
|
||||
const int starsWidth = 5 * ( STAR_SIZE + PADDING_BETWEEN_STARS );
|
||||
fullStars.setWidth( starsWidth );
|
||||
|
||||
QMouseEvent* me = static_cast< QMouseEvent* >( event );
|
||||
@@ -560,26 +545,26 @@ AccountDelegate::drawStatus( QPainter* painter, const QPointF& rightTopEdge, Acc
|
||||
QPixmap p;
|
||||
QString statusText;
|
||||
|
||||
const int yPos = rightTopEdge.y();
|
||||
const QRect connectIconRect( rightTopEdge.x() - STATUS_ICON_SIZE, yPos, STATUS_ICON_SIZE, STATUS_ICON_SIZE );
|
||||
const Account::ConnectionState state = acct->connectionState();
|
||||
|
||||
if ( state == Account::Connected )
|
||||
{
|
||||
p = m_onlineIcon;
|
||||
p = TomahawkUtils::defaultPixmap( TomahawkUtils::SipPluginOnline, TomahawkUtils::Original, connectIconRect.size() );
|
||||
statusText = tr( "Online" );
|
||||
}
|
||||
else if ( state == Account::Connecting )
|
||||
{
|
||||
p = m_offlineIcon;
|
||||
p = TomahawkUtils::defaultPixmap( TomahawkUtils::SipPluginOffline, TomahawkUtils::Original, connectIconRect.size() );
|
||||
statusText = tr( "Connecting..." );
|
||||
}
|
||||
else
|
||||
{
|
||||
p = m_offlineIcon;
|
||||
p = TomahawkUtils::defaultPixmap( TomahawkUtils::SipPluginOffline, TomahawkUtils::Original, connectIconRect.size() );
|
||||
statusText = tr( "Offline" );
|
||||
}
|
||||
|
||||
const int yPos = rightTopEdge.y();
|
||||
const QRect connectIconRect( rightTopEdge.x() - STATUS_ICON_SIZE, yPos, STATUS_ICON_SIZE, STATUS_ICON_SIZE );
|
||||
|
||||
if ( state == Account::Connecting )
|
||||
{
|
||||
if ( !m_connectingSpinners.contains( acct ) )
|
||||
|
@@ -70,7 +70,6 @@ private:
|
||||
|
||||
QRect checkRectForIndex( const QStyleOptionViewItem &option, const QModelIndex &idx ) const;
|
||||
|
||||
QPixmap m_offlineIcon, m_onlineIcon, m_defaultCover, m_onHoverStar, m_ratingStarPositive, m_ratingStarNegative;
|
||||
int m_hoveringOver;
|
||||
QPersistentModelIndex m_hoveringItem, m_configPressed;
|
||||
mutable QHash< QPersistentModelIndex, QRect > m_cachedButtonRects;
|
||||
@@ -85,6 +84,7 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // ACCOUNTDELEGATE_H
|
||||
|
@@ -34,16 +34,13 @@ using namespace Tomahawk::Accounts;
|
||||
#define CONFIG_WRENCH_SIZE 20
|
||||
#define PADDING 4
|
||||
|
||||
|
||||
AccountFactoryWrapperDelegate::AccountFactoryWrapperDelegate( QObject* parent )
|
||||
: QStyledItemDelegate( parent )
|
||||
{
|
||||
m_onlineIcon.load( RESPATH "images/sipplugin-online.png" );
|
||||
m_offlineIcon.load( RESPATH "images/sipplugin-offline.png" );
|
||||
|
||||
m_onlineIcon = m_onlineIcon.scaled( ICON_SIZE, ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
m_offlineIcon = m_offlineIcon.scaled( ICON_SIZE, ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AccountFactoryWrapperDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
|
||||
{
|
||||
@@ -98,23 +95,24 @@ AccountFactoryWrapperDelegate::paint(QPainter* painter, const QStyleOptionViewIt
|
||||
QPixmap p;
|
||||
QString statusText;
|
||||
Account::ConnectionState state = acc->connectionState();
|
||||
const QRect connectIconRect( confRect.left() - PADDING - ICON_SIZE, topIcon, ICON_SIZE, ICON_SIZE );
|
||||
|
||||
if ( state == Account::Connected )
|
||||
{
|
||||
p = m_onlineIcon;
|
||||
p = TomahawkUtils::defaultPixmap( TomahawkUtils::SipPluginOnline, TomahawkUtils::Original, connectIconRect.size() );
|
||||
statusText = tr( "Online" );
|
||||
}
|
||||
else if ( state == Account::Connecting )
|
||||
{
|
||||
p = m_offlineIcon;
|
||||
p = TomahawkUtils::defaultPixmap( TomahawkUtils::SipPluginOffline, TomahawkUtils::Original, connectIconRect.size() );
|
||||
statusText = tr( "Connecting..." );
|
||||
}
|
||||
else
|
||||
{
|
||||
p = m_offlineIcon;
|
||||
p = TomahawkUtils::defaultPixmap( TomahawkUtils::SipPluginOffline, TomahawkUtils::Original, connectIconRect.size() );
|
||||
statusText = tr( "Offline" );
|
||||
}
|
||||
|
||||
const QRect connectIconRect( confRect.left() - PADDING - ICON_SIZE, topIcon, ICON_SIZE, ICON_SIZE );
|
||||
painter->drawPixmap( connectIconRect, p );
|
||||
|
||||
int width = painter->fontMetrics().width( statusText );
|
||||
|
@@ -49,7 +49,6 @@ signals:
|
||||
void checkOrUncheck( const QModelIndex& row, Tomahawk::Accounts::Account* account, Qt::CheckState newState );
|
||||
|
||||
private:
|
||||
QPixmap m_removePixmap, m_offlineIcon, m_onlineIcon;
|
||||
QModelIndex m_configPressed;
|
||||
|
||||
mutable QHash< QPersistentModelIndex, QRect > m_cachedCheckRects;
|
||||
|
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "infosystem/InfoSystem.h"
|
||||
#include "LastFmInfoPlugin.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "resolvers/QtScriptResolver.h"
|
||||
#include "AtticaManager.h"
|
||||
#include "Pipeline.h"
|
||||
@@ -34,7 +34,6 @@ using namespace Accounts;
|
||||
|
||||
LastFmAccountFactory::LastFmAccountFactory()
|
||||
{
|
||||
m_icon.load( RESPATH "images/lastfm-icon.png" );
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +47,7 @@ LastFmAccountFactory::createAccount( const QString& accountId )
|
||||
QPixmap
|
||||
LastFmAccountFactory::icon() const
|
||||
{
|
||||
return m_icon;
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::LastfmIcon );
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +55,6 @@ LastFmAccount::LastFmAccount( const QString& accountId )
|
||||
: CustomAtticaAccount( accountId )
|
||||
{
|
||||
setAccountFriendlyName( "Last.Fm" );
|
||||
m_icon.load( RESPATH "images/lastfm-icon.png" );
|
||||
|
||||
AtticaManager::instance()->registerCustomAccount( "lastfm", this );
|
||||
|
||||
@@ -152,14 +150,14 @@ LastFmAccount::configurationWidget()
|
||||
Account::ConnectionState
|
||||
LastFmAccount::connectionState() const
|
||||
{
|
||||
return (!m_resolver.isNull() && m_resolver.data()->running()) ? Account::Connected : Account::Disconnected;
|
||||
return ( !m_resolver.isNull() && m_resolver.data()->running() ) ? Account::Connected : Account::Disconnected;
|
||||
}
|
||||
|
||||
|
||||
QPixmap
|
||||
LastFmAccount::icon() const
|
||||
{
|
||||
return m_icon;
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::LastfmIcon );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -28,14 +28,17 @@
|
||||
#include <QObject>
|
||||
#include <QSet>
|
||||
|
||||
namespace Tomahawk {
|
||||
class ExternalResolverGui;
|
||||
namespace Tomahawk
|
||||
{
|
||||
class ExternalResolverGui;
|
||||
|
||||
namespace InfoSystem {
|
||||
namespace InfoSystem
|
||||
{
|
||||
class LastFmInfoPlugin;
|
||||
}
|
||||
|
||||
namespace Accounts {
|
||||
namespace Accounts
|
||||
{
|
||||
|
||||
class LastFmConfig;
|
||||
|
||||
@@ -53,9 +56,6 @@ public:
|
||||
virtual bool allowUserCreation() const { return false; }
|
||||
virtual QPixmap icon() const;
|
||||
virtual bool isUnique() const { return true; }
|
||||
|
||||
private:
|
||||
QPixmap m_icon;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -107,11 +107,10 @@ private:
|
||||
QWeakPointer<Tomahawk::ExternalResolverGui> m_resolver;
|
||||
QWeakPointer<Tomahawk::InfoSystem::LastFmInfoPlugin> m_infoPlugin;
|
||||
QWeakPointer<LastFmConfig> m_configWidget;
|
||||
QPixmap m_icon;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // LASTFMACCOUNT_H
|
||||
|
@@ -20,7 +20,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>:/data/images/lastfm-icon.png</pixmap>
|
||||
<pixmap>:/data/images/lastfm-icon.svg</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
|
@@ -24,7 +24,7 @@
|
||||
#include "SpotifyAccountConfig.h"
|
||||
#include "SpotifyPlaylistUpdater.h"
|
||||
#include "resolvers/ScriptResolver.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "ActionCollection.h"
|
||||
#include "Pipeline.h"
|
||||
#include "accounts/AccountManager.h"
|
||||
@@ -218,7 +218,7 @@ SpotifyAccount::hookupResolver()
|
||||
// 0.4.x->0.5.x upgrade. So we do it manually for a while
|
||||
killExistingResolvers();
|
||||
m_spotifyResolver = QWeakPointer< ScriptResolver >( qobject_cast< ScriptResolver* >( Pipeline::instance()->addScriptResolver( path ) ) );
|
||||
m_spotifyResolver.data()->setIcon( QPixmap( RESPATH "images/spotify-sourceicon.png" ) );
|
||||
m_spotifyResolver.data()->setIcon( TomahawkUtils::defaultPixmap( TomahawkUtils::SpotifyIcon ) );
|
||||
|
||||
connect( m_spotifyResolver.data(), SIGNAL( changed() ), this, SLOT( resolverChanged() ) );
|
||||
connect( m_spotifyResolver.data(), SIGNAL( customMessage( QString,QVariantMap ) ), this, SLOT( resolverMessage( QString, QVariantMap ) ) );
|
||||
|
@@ -20,13 +20,12 @@
|
||||
|
||||
#include "PipelineStatusItem.h"
|
||||
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "Pipeline.h"
|
||||
#include "JobStatusModel.h"
|
||||
#include "JobStatusView.h"
|
||||
#include "Source.h"
|
||||
|
||||
QPixmap* PipelineStatusItem::s_pixmap = 0;
|
||||
|
||||
PipelineStatusItem::PipelineStatusItem( const Tomahawk::query_ptr& q )
|
||||
: JobStatusItem()
|
||||
@@ -69,12 +68,7 @@ PipelineStatusItem::idle()
|
||||
QPixmap
|
||||
PipelineStatusItem::icon() const
|
||||
{
|
||||
if ( !s_pixmap )
|
||||
{
|
||||
s_pixmap = new QPixmap( RESPATH"images/search-icon.png" );
|
||||
}
|
||||
|
||||
return *s_pixmap;
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Search );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -45,8 +45,6 @@ private slots:
|
||||
|
||||
private:
|
||||
QString m_latestQuery;
|
||||
|
||||
static QPixmap* s_pixmap;
|
||||
};
|
||||
|
||||
class PipelineStatusManager : public QObject
|
||||
|
@@ -774,7 +774,7 @@ TrackView::description() const
|
||||
QPixmap
|
||||
TrackView::pixmap() const
|
||||
{
|
||||
return QPixmap( RESPATH "images/music-icon.png" );
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::SuperCollection );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -31,7 +31,7 @@
|
||||
#include "database/Database.h"
|
||||
#include "AlbumPlaylistInterface.h"
|
||||
#include "PlayableItem.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
@@ -41,7 +41,7 @@ TreeModel::TreeModel( QObject* parent )
|
||||
: PlayableModel( parent )
|
||||
, m_mode( DatabaseMode )
|
||||
{
|
||||
setIcon( QPixmap( RESPATH "images/music-icon.png" ) );
|
||||
setIcon( TomahawkUtils::defaultPixmap( TomahawkUtils::SuperCollection ) );
|
||||
|
||||
connect( AudioEngine::instance(), SIGNAL( started( Tomahawk::result_ptr ) ), SLOT( onPlaybackStarted( Tomahawk::result_ptr ) ), Qt::DirectConnection );
|
||||
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ), Qt::DirectConnection );
|
||||
|
@@ -520,7 +520,7 @@ DynamicWidget::pixmap() const
|
||||
if ( m_playlist->mode() == OnDemand )
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Station );
|
||||
else if ( m_playlist->mode() == Static )
|
||||
return QPixmap( RESPATH "images/automatic-playlist.png" );
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::AutomaticPlaylist );
|
||||
else
|
||||
return QPixmap();
|
||||
}
|
||||
|
@@ -30,13 +30,11 @@
|
||||
#include "jobview/JobStatusModel.h"
|
||||
#include "jobview/JobStatusView.h"
|
||||
#include "utils/NetworkReply.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
QPixmap* ShortenedLinkParser::s_pixmap = 0;
|
||||
|
||||
|
||||
ShortenedLinkParser::ShortenedLinkParser ( const QStringList& urls, QObject* parent )
|
||||
: QObject( parent )
|
||||
@@ -125,10 +123,7 @@ ShortenedLinkParser::checkFinished()
|
||||
QPixmap
|
||||
ShortenedLinkParser::pixmap()
|
||||
{
|
||||
if ( !s_pixmap )
|
||||
s_pixmap = new QPixmap( RESPATH "images/add.png" );
|
||||
|
||||
return *s_pixmap;
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Add );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -66,7 +66,6 @@ private:
|
||||
|
||||
#ifndef ENABLE_HEADLESS
|
||||
static QPixmap pixmap();
|
||||
static QPixmap* s_pixmap;
|
||||
#endif
|
||||
|
||||
QStringList m_links;
|
||||
|
@@ -30,13 +30,11 @@
|
||||
#include "jobview/JobStatusModel.h"
|
||||
#include "jobview/ErrorStatusMessage.h"
|
||||
#include "utils/NetworkReply.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
QPixmap* SoundcloudParser::s_pixmap = 0;
|
||||
|
||||
|
||||
SoundcloudParser::SoundcloudParser( const QStringList& Urls, bool createNewPlaylist, QObject* parent )
|
||||
: QObject ( parent )
|
||||
@@ -236,8 +234,5 @@ SoundcloudParser::soundcloudBrowseFinished()
|
||||
QPixmap
|
||||
SoundcloudParser::pixmap() const
|
||||
{
|
||||
if ( !s_pixmap )
|
||||
s_pixmap = new QPixmap( RESPATH "images/soundcloud.png" );
|
||||
|
||||
return *s_pixmap;
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::SoundcloudIcon );
|
||||
}
|
||||
|
@@ -83,7 +83,6 @@ private:
|
||||
Tomahawk::playlist_ptr m_playlist;
|
||||
DropJobNotifier* m_browseJob;
|
||||
DropJob::DropType m_type;
|
||||
static QPixmap* s_pixmap;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -94,14 +94,32 @@ namespace TomahawkUtils
|
||||
LovedPlaylist,
|
||||
NewReleases,
|
||||
NewAdditions,
|
||||
RecentlyPlayed,
|
||||
AutomaticPlaylist,
|
||||
Charts,
|
||||
Station,
|
||||
Playlist,
|
||||
Search,
|
||||
ListRemove,
|
||||
ListAdd,
|
||||
AdvancedSettings,
|
||||
AccountSettings,
|
||||
MusicSettings,
|
||||
Add,
|
||||
DropSong,
|
||||
DropAlbum,
|
||||
DropAllSongs,
|
||||
DropLocalSongs,
|
||||
DropTopSongs,
|
||||
LastfmIcon,
|
||||
SpotifyIcon,
|
||||
SoundcloudIcon,
|
||||
AccountNone,
|
||||
Starred,
|
||||
Unstarred,
|
||||
StarHovered,
|
||||
SipPluginOnline,
|
||||
SipPluginOffline,
|
||||
Invalid
|
||||
};
|
||||
|
||||
|
@@ -433,7 +433,7 @@ defaultPixmap( ImageType type, ImageMode mode, const QSize& size )
|
||||
if ( mode == Grid )
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/artist-placeholder-grid.svg", size );
|
||||
else
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/artist-icon.png", size );
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/artist-icon.svg", size );
|
||||
break;
|
||||
|
||||
case DefaultTrackImage:
|
||||
@@ -582,11 +582,11 @@ defaultPixmap( ImageType type, ImageMode mode, const QSize& size )
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/headphones.svg", size );
|
||||
break;
|
||||
case HeadphonesOff:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/headphones-off.png", size );
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/headphones-off.svg", size );
|
||||
break;
|
||||
|
||||
case PadlockClosed:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/closed-padlock.png", size );
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/closed-padlock.svg", size );
|
||||
break;
|
||||
case PadlockOpen:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/open-padlock.svg", size );
|
||||
@@ -615,16 +615,28 @@ defaultPixmap( ImageType type, ImageMode mode, const QSize& size )
|
||||
case NewAdditions:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/new-additions.svg", size );
|
||||
break;
|
||||
case RecentlyPlayed:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/recently-played.svg", size );
|
||||
break;
|
||||
case Charts:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/charts.svg", size );
|
||||
break;
|
||||
case AutomaticPlaylist:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/automatic-playlist.svg", size );
|
||||
break;
|
||||
case Station:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/station.svg", size );
|
||||
break;
|
||||
case Playlist:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/playlist-icon.svg", size );
|
||||
break;
|
||||
case Search:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/search-icon.svg", size );
|
||||
break;
|
||||
|
||||
case Add:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/add.svg", size );
|
||||
break;
|
||||
case ListAdd:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/list-add.svg", size );
|
||||
break;
|
||||
@@ -642,6 +654,52 @@ defaultPixmap( ImageType type, ImageMode mode, const QSize& size )
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/music-settings.svg", size );
|
||||
break;
|
||||
|
||||
case DropSong:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/drop-song.svg", size );
|
||||
break;
|
||||
case DropAlbum:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/drop-album.svg", size );
|
||||
break;
|
||||
case DropAllSongs:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/drop-all-songs.svg", size );
|
||||
break;
|
||||
case DropLocalSongs:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/drop-local-songs.svg", size );
|
||||
break;
|
||||
case DropTopSongs:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/drop-top-songs.svg", size );
|
||||
break;
|
||||
|
||||
case Starred:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/starred.svg", size );
|
||||
break;
|
||||
case Unstarred:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/star-unstarred.svg", size );
|
||||
break;
|
||||
case StarHovered:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/star-hover.svg", size );
|
||||
break;
|
||||
|
||||
case SipPluginOnline:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/sipplugin-online.svg", size );
|
||||
break;
|
||||
case SipPluginOffline:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/sipplugin-offline.svg", size );
|
||||
break;
|
||||
|
||||
case AccountNone:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/account-none.svg", size );
|
||||
break;
|
||||
case LastfmIcon:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/lastfm-icon.svg", size );
|
||||
break;
|
||||
case SpotifyIcon:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/spotify-sourceicon.svg", size );
|
||||
break;
|
||||
case SoundcloudIcon:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/soundcloud.svg", size );
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -213,3 +213,10 @@ SearchWidget::sortAlbums()
|
||||
m_albumsModel->clear();
|
||||
m_albumsModel->appendAlbums( sortedAlbums );
|
||||
}
|
||||
|
||||
|
||||
QPixmap
|
||||
SearchWidget::pixmap() const
|
||||
{
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Search );
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ public:
|
||||
|
||||
virtual QString title() const { return QString( tr( "Search: %1" ) ).arg( m_search ); }
|
||||
virtual QString description() const { return tr( "Results for '%1'" ).arg( m_search ); }
|
||||
virtual QPixmap pixmap() const { return QPixmap( RESPATH "images/search-icon.png" ); }
|
||||
virtual QPixmap pixmap() const;
|
||||
|
||||
virtual bool isTemporaryPage() const { return true; }
|
||||
|
||||
|
@@ -310,7 +310,7 @@ PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
if ( type == RecentlyPlayedPlaylistsModel::StaticPlaylist )
|
||||
icon = TomahawkUtils::defaultPixmap( TomahawkUtils::Playlist, TomahawkUtils::Original, pixmapRect.size() );
|
||||
else if ( type == RecentlyPlayedPlaylistsModel::AutoPlaylist )
|
||||
icon = m_autoIcon;
|
||||
icon = TomahawkUtils::defaultPixmap( TomahawkUtils::AutomaticPlaylist, TomahawkUtils::Original, pixmapRect.size() );
|
||||
else if ( type == RecentlyPlayedPlaylistsModel::Station )
|
||||
icon = TomahawkUtils::defaultPixmap( TomahawkUtils::Station, TomahawkUtils::Original, pixmapRect.size() );
|
||||
|
||||
|
@@ -51,15 +51,11 @@ Q_OBJECT
|
||||
public:
|
||||
PlaylistDelegate()
|
||||
{
|
||||
m_autoIcon = QPixmap( RESPATH "images/automatic-playlist.png" );
|
||||
}
|
||||
|
||||
protected:
|
||||
void paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
|
||||
QSize sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const;
|
||||
|
||||
private:
|
||||
QPixmap m_autoIcon;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -60,12 +60,6 @@ SourceDelegate::SourceDelegate( QAbstractItemView* parent )
|
||||
m_dropTypeTextMap.insert( 3, tr( "Local" ) );
|
||||
m_dropTypeTextMap.insert( 4, tr( "Top 10" ) );
|
||||
|
||||
m_dropTypeImageMap.insert( 0, QPixmap( RESPATH "images/drop-song.png" ).scaledToWidth( 32, Qt::SmoothTransformation ) );
|
||||
m_dropTypeImageMap.insert( 1, QPixmap( RESPATH "images/drop-album.png" ).scaledToWidth( 32, Qt::SmoothTransformation ) );
|
||||
m_dropTypeImageMap.insert( 2, QPixmap( RESPATH "images/drop-all-songs.png" ).scaledToHeight( 32, Qt::SmoothTransformation ) );
|
||||
m_dropTypeImageMap.insert( 3, QPixmap( RESPATH "images/drop-local-songs.png" ).scaledToWidth( 32, Qt::SmoothTransformation ) );
|
||||
m_dropTypeImageMap.insert( 4, QPixmap( RESPATH "images/drop-top-songs.png" ).scaledToWidth( 32, Qt::SmoothTransformation ) );
|
||||
|
||||
m_dropMimeData = new QMimeData();
|
||||
}
|
||||
|
||||
@@ -516,7 +510,28 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
||||
if ( itemsRect.bottom() - textRect.height() - 2 > itemsRect.top() )
|
||||
{
|
||||
imageRect = itemsRect.adjusted( iconSpacing, verticalOffset, -iconSpacing, -textRect.height() - 2 );
|
||||
painter->drawPixmap( imageRect.x(), imageRect.y(), m_dropTypeImageMap.value( i ).copy( 0, 32 - imageRect.height(), 32, imageRect.height() ) );
|
||||
|
||||
QPixmap pixmap;
|
||||
switch ( i )
|
||||
{
|
||||
case 0:
|
||||
pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DropSong, TomahawkUtils::Original, imageRect.size() );
|
||||
break;
|
||||
case 1:
|
||||
pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DropAlbum, TomahawkUtils::Original, imageRect.size() );
|
||||
break;
|
||||
case 2:
|
||||
pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DropAllSongs, TomahawkUtils::Original, imageRect.size() );
|
||||
break;
|
||||
case 3:
|
||||
pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DropLocalSongs, TomahawkUtils::Original, imageRect.size() );
|
||||
break;
|
||||
case 4:
|
||||
pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DropTopSongs, TomahawkUtils::Original, imageRect.size() );
|
||||
break;
|
||||
}
|
||||
|
||||
painter->drawPixmap( imageRect, pixmap );
|
||||
}
|
||||
|
||||
count++;
|
||||
|
@@ -75,7 +75,6 @@ private:
|
||||
qint64 m_lastClicked;
|
||||
QMap< int, SourceTreeItem::DropType > m_dropTypeMap;
|
||||
QMap< int, QString > m_dropTypeTextMap;
|
||||
QMap< int, QPixmap > m_dropTypeImageMap;
|
||||
|
||||
mutable QPersistentModelIndex m_trackHovered;
|
||||
mutable QHash< QPersistentModelIndex, QRect > m_trackRects;
|
||||
|
@@ -297,7 +297,7 @@ SourcesModel::appendGroups()
|
||||
LovedTracksItem* loved = new LovedTracksItem( this, browse );
|
||||
loved->setSortValue( 2 );
|
||||
|
||||
GenericPageItem* recent = new GenericPageItem( this, browse, tr( "Recently Played" ), QIcon( RESPATH "images/recently-played.png" ),
|
||||
GenericPageItem* recent = new GenericPageItem( this, browse, tr( "Recently Played" ), ImageRegistry::instance()->icon( RESPATH "images/recently-played.svg" ),
|
||||
boost::bind( &ViewManager::showRecentPlaysPage, ViewManager::instance() ),
|
||||
boost::bind( &ViewManager::recentPlaysWidget, ViewManager::instance() ) );
|
||||
recent->setSortValue( 3 );
|
||||
|
@@ -19,22 +19,22 @@
|
||||
|
||||
#include "CategoryItems.h"
|
||||
|
||||
#include <QMimeData>
|
||||
|
||||
#include <echonest/Playlist.h>
|
||||
|
||||
#include "DropJob.h"
|
||||
#include "TomahawkApp.h"
|
||||
#include "ViewManager.h"
|
||||
#include "ViewPage.h"
|
||||
#include "SourceList.h"
|
||||
#include "SourceTreeView.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "widgets/NewPlaylistWidget.h"
|
||||
#include "TomahawkWindow.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "playlist/dynamic/GeneratorInterface.h"
|
||||
#include "widgets/NewPlaylistWidget.h"
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "DropJob.h"
|
||||
|
||||
#include <echonest/Playlist.h>
|
||||
|
||||
#include <QMimeData>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@@ -45,7 +45,6 @@ CategoryAddItem::CategoryAddItem( SourcesModel* model, SourceTreeItem* parent, S
|
||||
: SourceTreeItem( model, parent, SourcesModel::CategoryAdd )
|
||||
, m_categoryType( type )
|
||||
{
|
||||
m_icon = QIcon( RESPATH "images/add.png" );
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +106,7 @@ CategoryAddItem::flags() const
|
||||
QIcon
|
||||
CategoryAddItem::icon() const
|
||||
{
|
||||
return m_icon;
|
||||
return ImageRegistry::instance()->icon( RESPATH "images/add.svg" );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -46,8 +46,6 @@ private slots:
|
||||
|
||||
private:
|
||||
SourcesModel::CategoryType m_categoryType;
|
||||
QIcon m_icon;
|
||||
|
||||
};
|
||||
|
||||
class CategoryItem : public SourceTreeItem
|
||||
|
@@ -448,8 +448,6 @@ DynamicPlaylistItem::DynamicPlaylistItem( SourcesModel* mdl, SourceTreeItem* par
|
||||
connect( pl.data(), SIGNAL( dynamicRevisionLoaded( Tomahawk::DynamicPlaylistRevision ) ),
|
||||
SLOT( onDynamicPlaylistLoaded( Tomahawk::DynamicPlaylistRevision ) ), Qt::QueuedConnection );
|
||||
|
||||
m_automaticPlaylistIcon = QIcon( RESPATH "images/automatic-playlist.png" );
|
||||
|
||||
if ( ViewManager::instance()->pageForDynPlaylist( pl ) )
|
||||
model()->linkSourceItemToPage( this, ViewManager::instance()->pageForDynPlaylist( pl ) );
|
||||
}
|
||||
@@ -576,11 +574,11 @@ DynamicPlaylistItem::icon() const
|
||||
{
|
||||
if ( m_dynplaylist->mode() == OnDemand )
|
||||
{
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Station, TomahawkUtils::Original );
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Station );
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_automaticPlaylistIcon;
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::AutomaticPlaylist );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -99,8 +99,6 @@ private:
|
||||
void checkReparentHackNeeded( const Tomahawk::DynamicPlaylistRevision& rev );
|
||||
|
||||
Tomahawk::dynplaylist_ptr m_dynplaylist;
|
||||
|
||||
QIcon m_automaticPlaylistIcon;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -73,7 +73,7 @@ SourceItem::SourceItem( SourcesModel* mdl, SourceTreeItem* parent, const Tomahaw
|
||||
boost::bind( &SourceItem::latestAdditionsClicked, this ),
|
||||
boost::bind( &SourceItem::getLatestAdditionsPage, this ) );
|
||||
|
||||
m_recentPlaysItem = new GenericPageItem( model(), this, tr( "Recently Played" ), QIcon( RESPATH "images/recently-played.png" ),
|
||||
m_recentPlaysItem = new GenericPageItem( model(), this, tr( "Recently Played" ), ImageRegistry::instance()->icon( RESPATH "images/recently-played.svg" ),
|
||||
boost::bind( &SourceItem::recentPlaysClicked, this ),
|
||||
boost::bind( &SourceItem::getRecentPlaysPage, this ) );
|
||||
|
||||
@@ -559,7 +559,7 @@ SourceItem::recentPlaysClicked()
|
||||
if ( !m_recentPlaysPage )
|
||||
{
|
||||
FlexibleView* pv = new FlexibleView( ViewManager::instance()->widget() );
|
||||
pv->setPixmap( QPixmap( RESPATH "images/recently-played.png" ) );
|
||||
pv->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::RecentlyPlayed ) );
|
||||
|
||||
RecentlyPlayedModel* raModel = new RecentlyPlayedModel( pv );
|
||||
raModel->setTitle( tr( "Recently Played Tracks" ) );
|
||||
|
@@ -70,7 +70,7 @@ TemporaryPageItem::TemporaryPageItem ( SourcesModel* mdl, SourceTreeItem* parent
|
||||
}
|
||||
else if ( dynamic_cast< SearchWidget* >( page ) )
|
||||
{
|
||||
m_icon = QIcon( RESPATH "images/search-icon.png" );
|
||||
m_icon = ImageRegistry::instance()->icon( RESPATH "images/search-icon.svg" );
|
||||
}
|
||||
|
||||
if ( action )
|
||||
|
@@ -21,11 +21,13 @@
|
||||
#include "accounts/AccountModel.h"
|
||||
#include "accounts/AccountManager.h"
|
||||
#include "AccountWidget.h"
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QPushButton>
|
||||
|
||||
|
||||
AccountListWidget::AccountListWidget( AccountModelFactoryProxy* model, QWidget* parent )
|
||||
: QWidget( parent )
|
||||
, m_model( model )
|
||||
@@ -227,6 +229,7 @@ AccountListWidget::updateToggleOnlineStateButton()
|
||||
|
||||
m_toggleOnlineButton->setText( m_toggleOnlineButtonState ? tr( "Disconnect &All" )
|
||||
: tr( "Connect &All" ) );
|
||||
m_toggleOnlineButton->setIcon( m_toggleOnlineButtonState ? QIcon( RESPATH "images/account-online.png" )
|
||||
: QIcon( RESPATH "images/account-offline.png" ) );
|
||||
m_toggleOnlineButton->setIcon( m_toggleOnlineButtonState ?
|
||||
ImageRegistry::instance()->icon( RESPATH "images/account-online.svg" ) :
|
||||
ImageRegistry::instance()->icon( RESPATH "images/account-offline.svg" ) );
|
||||
}
|
||||
|
@@ -94,9 +94,6 @@ AccountsToolButton::AccountsToolButton( QWidget* parent )
|
||||
bottomLayout->addWidget( settingsButton );
|
||||
wMainLayout->addLayout( bottomLayout );
|
||||
|
||||
//ToolButton stuff
|
||||
m_defaultPixmap = QPixmap( RESPATH "images/account-none.png" ).scaled( iconSize(), Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
connect( m_proxy, SIGNAL( dataChanged( QModelIndex, QModelIndex ) ),
|
||||
this, SLOT( updateIcons() ) );
|
||||
connect( m_proxy, SIGNAL( rowsInserted ( QModelIndex, int, int ) ),
|
||||
@@ -137,7 +134,8 @@ AccountsToolButton::paintEvent( QPaintEvent* event )
|
||||
QRect pixmapRect( QPoint( width() / 2 - iconSize().width() / 2,
|
||||
height() / 2 - iconSize().height() / 2 ),
|
||||
iconSize() );
|
||||
painter.drawPixmap( pixmapRect, m_defaultPixmap );
|
||||
|
||||
painter.drawPixmap( pixmapRect, TomahawkUtils::defaultPixmap( TomahawkUtils::AccountNone, TomahawkUtils::Original, iconSize() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -51,7 +51,6 @@ private:
|
||||
Tomahawk::Accounts::AccountModel *m_model;
|
||||
AccountModelFactoryProxy *m_proxy;
|
||||
|
||||
QPixmap m_defaultPixmap;
|
||||
QList< QPixmap > m_factoryPixmaps;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user