summaryrefslogtreecommitdiffstats
path: root/juk/playlistitem.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
commitb1057f437bf65300831a0ccb45b920787c6b318d (patch)
treef8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /juk/playlistitem.cpp
parent4ddfca384ced9ad654213aef9dc2c3973720b980 (diff)
downloadtdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz
tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'juk/playlistitem.cpp')
-rw-r--r--juk/playlistitem.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/juk/playlistitem.cpp b/juk/playlistitem.cpp
index bdb41395..951fdb41 100644
--- a/juk/playlistitem.cpp
+++ b/juk/playlistitem.cpp
@@ -53,7 +53,7 @@ PlaylistItem::~PlaylistItem()
m_collectionItem->removeChildItem(this);
- if(m_playingItems.find(this) != m_playingItems.end()) {
+ if(m_playingItems.tqfind(this) != m_playingItems.end()) {
m_playingItems.remove(this);
if(m_playingItems.isEmpty())
playlist()->setPlaying(0);
@@ -94,7 +94,7 @@ const TQPixmap *PlaylistItem::pixmap(int column) const
return &image;
if(column == playlist()->leftColumn() &&
- m_playingItems.contains(const_cast<PlaylistItem *>(this)))
+ m_playingItems.tqcontains(const_cast<PlaylistItem *>(this)))
return &playing;
return KListViewItem::pixmap(column);
@@ -103,7 +103,7 @@ const TQPixmap *PlaylistItem::pixmap(int column) const
TQString PlaylistItem::text(int column) const
{
if(!d->fileHandle.tag())
- return TQString::null;
+ return TQString();
int offset = playlist()->columnOffset();
@@ -115,17 +115,17 @@ TQString PlaylistItem::text(int column) const
case AlbumColumn:
return d->fileHandle.tag()->album();
case CoverColumn:
- return TQString::null;
+ return TQString();
case TrackNumberColumn:
return d->fileHandle.tag()->track() > 0
? TQString::number(d->fileHandle.tag()->track())
- : TQString::null;
+ : TQString();
case GenreColumn:
return d->fileHandle.tag()->genre();
case YearColumn:
return d->fileHandle.tag()->year() > 0
? TQString::number(d->fileHandle.tag()->year())
- : TQString::null;
+ : TQString();
case LengthColumn:
return d->fileHandle.tag()->lengthString();
case BitrateColumn:
@@ -145,7 +145,7 @@ void PlaylistItem::setText(int column, const TQString &text)
{
int offset = playlist()->columnOffset();
if(column - offset >= 0 && column + offset <= lastColumn()) {
- KListViewItem::setText(column, TQString::null);
+ KListViewItem::setText(column, TQString());
return;
}
@@ -239,16 +239,16 @@ void PlaylistItem::clear()
// PlaylistItem protected methods
////////////////////////////////////////////////////////////////////////////////
-PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent) :
- KListViewItem(parent),
+PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *tqparent) :
+ KListViewItem(tqparent),
d(0),
m_watched(0)
{
setup(item);
}
-PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent, TQListViewItem *after) :
- KListViewItem(parent, after),
+PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *tqparent, TQListViewItem *after) :
+ KListViewItem(tqparent, after),
d(0),
m_watched(0)
{
@@ -258,8 +258,8 @@ PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent, TQListVie
// This constructor should only be used by the CollectionList subclass.
-PlaylistItem::PlaylistItem(CollectionList *parent) :
- KListViewItem(parent),
+PlaylistItem::PlaylistItem(CollectionList *tqparent) :
+ KListViewItem(tqparent),
m_watched(0)
{
d = new Data;
@@ -269,13 +269,13 @@ PlaylistItem::PlaylistItem(CollectionList *parent) :
void PlaylistItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align)
{
- if(!m_playingItems.contains(this))
+ if(!m_playingItems.tqcontains(this))
return KListViewItem::paintCell(p, cg, column, width, align);
- TQColorGroup colorGroup = cg;
+ TQColorGroup tqcolorGroup = cg;
- TQColor base = colorGroup.base();
- TQColor selection = colorGroup.highlight();
+ TQColor base = tqcolorGroup.base();
+ TQColor selection = tqcolorGroup.highlight();
int r = (base.red() + selection.red()) / 2;
int b = (base.blue() + selection.blue()) / 2;
@@ -283,13 +283,13 @@ void PlaylistItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, i
TQColor c(r, g, b);
- colorGroup.setColor(TQColorGroup::Base, c);
- TQListViewItem::paintCell(p, colorGroup, column, width, align);
+ tqcolorGroup.setColor(TQColorGroup::Base, c);
+ TQListViewItem::paintCell(p, tqcolorGroup, column, width, align);
}
int PlaylistItem::compare(TQListViewItem *item, int column, bool ascending) const
{
- // reimplemented from QListViewItem
+ // reimplemented from TQListViewItem
int offset = playlist()->columnOffset();