summaryrefslogtreecommitdiffstats
path: root/amarok/src/playlistitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'amarok/src/playlistitem.cpp')
-rw-r--r--amarok/src/playlistitem.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/amarok/src/playlistitem.cpp b/amarok/src/playlistitem.cpp
index 74af7ca5..85888d75 100644
--- a/amarok/src/playlistitem.cpp
+++ b/amarok/src/playlistitem.cpp
@@ -48,8 +48,8 @@
#include "playlistitem.h"
double PlaylistItem::glowIntensity;
-TQColor PlaylistItem::glowText = Qt::white;
-TQColor PlaylistItem::glowBase = Qt::white;
+TQColor PlaylistItem::glowText = TQt::white;
+TQColor PlaylistItem::glowBase = TQt::white;
bool PlaylistItem::s_pixmapChanged = false;
@@ -213,7 +213,7 @@ bool PlaylistItem::isQueued() const
int PlaylistItem::queuePosition() const
{
- return listView()->m_nextTracks.findRef( this );
+ return listView()->m_nextTracks.tqfindRef( this );
}
void PlaylistItem::setEnabled()
@@ -379,12 +379,12 @@ int PlaylistItem::ratingColumnWidth() //static
void PlaylistItem::update() const
{
- listView()->repaintItem( this );
+ listView()->tqrepaintItem( this );
}
void PlaylistItem::updateColumn( int column ) const
{
- const TQRect r = listView()->itemRect( this );
+ const TQRect r = listView()->tqitemRect( this );
if( !r.isValid() )
return;
@@ -410,7 +410,7 @@ PlaylistItem::nextInAlbum() const
{
if( !m_album )
return 0;
- const int index = m_album->tracks.findRef( this );
+ const int index = m_album->tracks.tqfindRef( this );
if( index == int(m_album->tracks.count() - 1) )
return 0;
if( index != -1 )
@@ -434,7 +434,7 @@ PlaylistItem::prevInAlbum() const
{
if( !m_album )
return 0;
- const int index = m_album->tracks.findRef( this );
+ const int index = m_album->tracks.tqfindRef( this );
if( index == 0 )
return 0;
if( index != -1 )
@@ -507,9 +507,9 @@ PlaylistItem::compare( TQListViewItem *i, int col, bool ascending ) const
return compare( i, Album, ascending );
else
{
- if( a.startsWith( "the ", false ) )
+ if( a.tqstartsWith( "the ", false ) )
a = a.mid( 4 );
- if( b.startsWith( "the ", false ) )
+ if( b.tqstartsWith( "the ", false ) )
b = b.mid( 4 );
}
break;
@@ -529,7 +529,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
//TODO add spacing on either side of items
//p->translate( 2, 0 ); width -= 3;
- // Don't try to draw if width or height is 0, as this crashes Qt
+ // Don't try to draw if width or height is 0, as this crashes TQt
if( !painter || !listView() || width <= 0 || height() == 0 )
return;
@@ -575,8 +575,8 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
s_pixmapChanged = false;
}
- // Determine if we need to repaint the pixmap, or paint from cache
- if ( paintCache[column].map.find( colorKey ) == paintCache[column].map.end() )
+ // Determine if we need to tqrepaint the pixmap, or paint from cache
+ if ( paintCache[column].map.tqfind( colorKey ) == paintCache[column].map.end() )
{
// Update painting cache
paintCache[column].width = width;
@@ -588,7 +588,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
TQColor bg;
if( isSelected() )
- bg = listView()->colorGroup().highlight();
+ bg = listView()->tqcolorGroup().highlight();
else
bg = isAlternate() ? listView()->alternateBackground() :
listView()->viewport()->backgroundColor();
@@ -596,7 +596,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
buf.fill( bg );
// Draw column divider line
- p.setPen( listView()->viewport()->colorGroup().mid() );
+ p.setPen( listView()->viewport()->tqcolorGroup().mid() );
p.drawLine( width - 1, 0, width - 1, height() - 1 );
// Here we draw the background bar graphics for the current track:
@@ -613,7 +613,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
// Left part
if( column == listView()->m_firstColumn ) {
- TQImage tmpImage = currentTrackLeft.smoothScale( 1, height(), TQImage::ScaleMax );
+ TQImage tmpImage = currentTrackLeft.smoothScale( 1, height(), TQ_ScaleMax );
KIconEffect::colorize( tmpImage, glowBase, colorize );
imageTransparency( tmpImage, intensity );
p.drawImage( 0, 0, tmpImage, 0, 0, tmpImage.width() - 1 ); //HACK
@@ -625,7 +625,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
else
if( column == Playlist::instance()->mapToLogicalColumn( Playlist::instance()->numVisibleColumns() - 1 ) )
{
- TQImage tmpImage = currentTrackRight.smoothScale( 1, height(), TQImage::ScaleMax );
+ TQImage tmpImage = currentTrackRight.smoothScale( 1, height(), TQ_ScaleMax );
KIconEffect::colorize( tmpImage, glowBase, colorize );
imageTransparency( tmpImage, intensity );
p.drawImage( width - tmpImage.width(), 0, tmpImage );
@@ -649,8 +649,8 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
leftMargin += pixmap( column )->width() + 2;
}
- if( align != Qt::AlignCenter )
- align |= Qt::AlignVCenter;
+ if( align != TQt::AlignCenter )
+ align |= TQt::AlignVCenter;
if( column != Rating &&
moodbarType != 1 )
@@ -690,8 +690,8 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
else
{
const TQColorGroup _cg = ( !exists() || !isEnabled() )
- ? listView()->palette().disabled()
- : listView()->palette().active();
+ ? listView()->tqpalette().disabled()
+ : listView()->tqpalette().active();
TQColor bg = isSelected() ? _cg.highlight()
: isAlternate() ? listView()->alternateBackground()
@@ -703,7 +703,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
Copyright (C) 2000 Reginald Stadlbauer <reggie@kde.org>
Copyright (C) 2000,2003 Charles Samuels <charles@kde.org>
Copyright (C) 2000 Peter Putzer */
- if ( bg == Qt::black )
+ if ( bg == TQt::black )
bg = TQColor(55, 55, 55); // dark gray
else
{
@@ -724,7 +724,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
// Draw column divider line
if( !isSelected() )
{
- p.setPen( listView()->viewport()->colorGroup().mid() );
+ p.setPen( listView()->viewport()->tqcolorGroup().mid() );
p.drawLine( width - 1, 0, width - 1, height() - 1 );
}
@@ -735,8 +735,8 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
leftMargin += pixmap( column )->width();
}
- if( align != Qt::AlignCenter )
- align |= Qt::AlignVCenter;
+ if( align != TQt::AlignCenter )
+ align |= TQt::AlignVCenter;
if( column == Rating )
drawRating( &p );
@@ -762,7 +762,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
}
}
/// Track action symbols
- const int queue = listView()->m_nextTracks.findRef( this ) + 1;
+ const int queue = listView()->m_nextTracks.tqfindRef( this ) + 1;
const bool stop = ( this == listView()->m_stopAfterTrack );
const bool repeat = Amarok::repeatTrack() && isCurrent;
@@ -815,13 +815,13 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
//TODO the shadow is hard to do well when using a dark font color
//TODO it also looks cluttered for small font sizes
//p->setPen( cg.highlightedText().dark() );
- //p->drawText( width - w + 2, 3, w, h-1, Qt::AlignCenter, str );
+ //p->drawText( width - w + 2, 3, w, h-1, TQt::AlignCenter, str );
if( !multi )
tmp = -(qh / 2);
y += tmp;
p.setPen( cg.highlightedText() );
- p.drawText( x, y, -x + width, multi ? h/2 : qh, Qt::AlignCenter, str );
+ p.drawText( x, y, -x + width, multi ? h/2 : qh, TQt::AlignCenter, str );
y -= tmp;
if( isCurrent )
y -= height() / 2;
@@ -859,7 +859,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
if( this != listView()->currentTrack() && !isSelected() )
{
- p.setPen( TQPen( cg.mid(), 0, Qt::SolidLine ) );
+ p.setPen( TQPen( cg.mid(), 0, TQt::SolidLine ) );
p.drawLine( width - 1, 0, width - 1, height() - 1 );
}
@@ -934,7 +934,7 @@ void PlaylistItem::moodbarJobEvent( int newState )
{
(void) newState; // want to redraw nomatter what the new state is
if( AmarokConfig::showMoodbar() )
- repaint();
+ tqrepaint();
// Don't automatically resort because it's annoying
}
@@ -984,7 +984,7 @@ void PlaylistItem::imageTransparency( TQImage& image, float factor ) //static
// Process all pixels. Highly optimized.
for( int i = 0; i < pixels; ++i ) {
c = data[i]; // Memory access is slow, so do it only once
- data[i] = qRgba( qRed( c ), qGreen( c ), qBlue( c ), table[qAlpha( c )] );
+ data[i] = tqRgba( tqRed( c ), tqGreen( c ), tqBlue( c ), table[tqAlpha( c )] );
}
}
@@ -1001,7 +1001,7 @@ void PlaylistItem::refAlbum()
{
if( Amarok::entireAlbums() )
{
- if( listView()->m_albums[artist_album()].find( album() ) == listView()->m_albums[artist_album()].end() )
+ if( listView()->m_albums[artist_album()].tqfind( album() ) == listView()->m_albums[artist_album()].end() )
listView()->m_albums[artist_album()][album()] = new PlaylistAlbum;
m_album = listView()->m_albums[artist_album()][album()];
m_album->refcount++;
@@ -1049,14 +1049,14 @@ void PlaylistItem::incrementTotals()
m_album->tracks.insert( i, this );
break;
}
- const Q_INT64 prevTotal = m_album->total;
- Q_INT64 total = m_album->total * prevCount;
+ const TQ_INT64 prevTotal = m_album->total;
+ TQ_INT64 total = m_album->total * prevCount;
total += totalIncrementAmount();
- m_album->total = Q_INT64( double( total + 0.5 ) / m_album->tracks.count() );
- if( listView()->m_prevAlbums.findRef( m_album ) == -1 )
+ m_album->total = TQ_INT64( double( total + 0.5 ) / m_album->tracks.count() );
+ if( listView()->m_prevAlbums.tqfindRef( m_album ) == -1 )
listView()->m_total = listView()->m_total - prevTotal + m_album->total;
}
- else if( listView()->m_prevTracks.findRef( this ) == -1 )
+ else if( listView()->m_prevTracks.tqfindRef( this ) == -1 )
listView()->m_total += totalIncrementAmount();
}
@@ -1064,16 +1064,16 @@ void PlaylistItem::decrementTotals()
{
if( Amarok::entireAlbums() && m_album )
{
- const Q_INT64 prevTotal = m_album->total;
- Q_INT64 total = m_album->total * m_album->tracks.count();
+ const TQ_INT64 prevTotal = m_album->total;
+ TQ_INT64 total = m_album->total * m_album->tracks.count();
if (!m_album->tracks.removeRef( this ))
warning() << "Unable to remove myself from m_album" << endl;
total -= totalIncrementAmount();
- m_album->total = Q_INT64( double( total + 0.5 ) / m_album->tracks.count() );
- if( listView()->m_prevAlbums.findRef( m_album ) == -1 )
+ m_album->total = TQ_INT64( double( total + 0.5 ) / m_album->tracks.count() );
+ if( listView()->m_prevAlbums.tqfindRef( m_album ) == -1 )
listView()->m_total = listView()->m_total - prevTotal + m_album->total;
}
- else if( listView()->m_prevTracks.findRef( this ) == -1 )
+ else if( listView()->m_prevTracks.tqfindRef( this ) == -1 )
listView()->m_total -= totalIncrementAmount();
}