diff options
Diffstat (limited to 'juk/playlistitem.cpp')
-rw-r--r-- | juk/playlistitem.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/juk/playlistitem.cpp b/juk/playlistitem.cpp index a86737c0..bdb41395 100644 --- a/juk/playlistitem.cpp +++ b/juk/playlistitem.cpp @@ -70,9 +70,9 @@ void PlaylistItem::setFile(const FileHandle &file) refresh(); } -void PlaylistItem::setFile(const QString &file) +void PlaylistItem::setFile(const TQString &file) { - QString oldPath = d->fileHandle.absFilePath(); + TQString oldPath = d->fileHandle.absFilePath(); d->fileHandle.setFile(file); m_collectionItem->updateCollectionDict(oldPath, d->fileHandle.absFilePath()); refresh(); @@ -83,10 +83,10 @@ FileHandle PlaylistItem::file() const return d->fileHandle; } -const QPixmap *PlaylistItem::pixmap(int column) const +const TQPixmap *PlaylistItem::pixmap(int column) const { - static QPixmap image(SmallIcon("image")); - static QPixmap playing(UserIcon("playing")); + static TQPixmap image(SmallIcon("image")); + static TQPixmap playing(UserIcon("playing")); int offset = playlist()->columnOffset(); @@ -100,10 +100,10 @@ const QPixmap *PlaylistItem::pixmap(int column) const return KListViewItem::pixmap(column); } -QString PlaylistItem::text(int column) const +TQString PlaylistItem::text(int column) const { if(!d->fileHandle.tag()) - return QString::null; + return TQString::null; int offset = playlist()->columnOffset(); @@ -115,21 +115,21 @@ QString PlaylistItem::text(int column) const case AlbumColumn: return d->fileHandle.tag()->album(); case CoverColumn: - return QString::null; + return TQString::null; case TrackNumberColumn: return d->fileHandle.tag()->track() > 0 - ? QString::number(d->fileHandle.tag()->track()) - : QString::null; + ? TQString::number(d->fileHandle.tag()->track()) + : TQString::null; case GenreColumn: return d->fileHandle.tag()->genre(); case YearColumn: return d->fileHandle.tag()->year() > 0 - ? QString::number(d->fileHandle.tag()->year()) - : QString::null; + ? TQString::number(d->fileHandle.tag()->year()) + : TQString::null; case LengthColumn: return d->fileHandle.tag()->lengthString(); case BitrateColumn: - return QString::number(d->fileHandle.tag()->bitrate()); + return TQString::number(d->fileHandle.tag()->bitrate()); case CommentColumn: return d->fileHandle.tag()->comment(); case FileNameColumn: @@ -141,11 +141,11 @@ QString PlaylistItem::text(int column) const } } -void PlaylistItem::setText(int column, const QString &text) +void PlaylistItem::setText(int column, const TQString &text) { int offset = playlist()->columnOffset(); if(column - offset >= 0 && column + offset <= lastColumn()) { - KListViewItem::setText(column, QString::null); + KListViewItem::setText(column, TQString::null); return; } @@ -214,7 +214,7 @@ Playlist *PlaylistItem::playlist() const return static_cast<Playlist *>(listView()); } -QValueVector<int> PlaylistItem::cachedWidths() const +TQValueVector<int> PlaylistItem::cachedWidths() const { return d->cachedWidths; } @@ -247,7 +247,7 @@ PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent) : setup(item); } -PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent, QListViewItem *after) : +PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent, TQListViewItem *after) : KListViewItem(parent, after), d(0), m_watched(0) @@ -267,27 +267,27 @@ PlaylistItem::PlaylistItem(CollectionList *parent) : setDragEnabled(true); } -void PlaylistItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align) +void PlaylistItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) { if(!m_playingItems.contains(this)) return KListViewItem::paintCell(p, cg, column, width, align); - QColorGroup colorGroup = cg; + TQColorGroup colorGroup = cg; - QColor base = colorGroup.base(); - QColor selection = colorGroup.highlight(); + TQColor base = colorGroup.base(); + TQColor selection = colorGroup.highlight(); int r = (base.red() + selection.red()) / 2; int b = (base.blue() + selection.blue()) / 2; int g = (base.green() + selection.green()) / 2; - QColor c(r, g, b); + TQColor c(r, g, b); - colorGroup.setColor(QColorGroup::Base, c); - QListViewItem::paintCell(p, colorGroup, column, width, align); + colorGroup.setColor(TQColorGroup::Base, c); + TQListViewItem::paintCell(p, colorGroup, column, width, align); } -int PlaylistItem::compare(QListViewItem *item, int column, bool ascending) const +int PlaylistItem::compare(TQListViewItem *item, int column, bool ascending) const { // reimplemented from QListViewItem @@ -332,8 +332,8 @@ int PlaylistItem::compare(const PlaylistItem *firstItem, const PlaylistItem *sec return 0; if(column < offset) { - QString first = firstItem->text(column).lower(); - QString second = secondItem->text(column).lower(); + TQString first = firstItem->text(column).lower(); + TQString second = secondItem->text(column).lower(); return first.localeAwareCompare(second); } @@ -398,7 +398,7 @@ void PlaylistItem::setup(CollectionListItem *item) // PlaylistItem::Pointer implementation //////////////////////////////////////////////////////////////////////////////// -QMap<PlaylistItem *, QValueList<PlaylistItem::Pointer *> > PlaylistItem::Pointer::m_map; // static +TQMap<PlaylistItem *, TQValueList<PlaylistItem::Pointer *> > PlaylistItem::Pointer::m_map; // static PlaylistItem::Pointer::Pointer(PlaylistItem *item) : m_item(item) @@ -456,8 +456,8 @@ void PlaylistItem::Pointer::clear(PlaylistItem *item) // static if(!item) return; - QValueList<Pointer *> l = m_map[item]; - for(QValueList<Pointer *>::Iterator it = l.begin(); it != l.end(); ++it) + TQValueList<Pointer *> l = m_map[item]; + for(TQValueList<Pointer *>::Iterator it = l.begin(); it != l.end(); ++it) (*it)->m_item = 0; m_map.remove(item); item->m_watched = false; |