summaryrefslogtreecommitdiffstats
path: root/juk/coverinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'juk/coverinfo.cpp')
-rw-r--r--juk/coverinfo.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/juk/coverinfo.cpp b/juk/coverinfo.cpp
index 243bc429..67e8514a 100644
--- a/juk/coverinfo.cpp
+++ b/juk/coverinfo.cpp
@@ -18,10 +18,10 @@
#include <kstandarddirs.h>
#include <kdebug.h>
-#include <qregexp.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcursor.h>
+#include <tqregexp.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcursor.h>
#include "collectionlist.h"
#include "playlistsearch.h"
@@ -31,22 +31,22 @@
struct CoverPopup : public QWidget
{
- CoverPopup(const QPixmap &image, const QPoint &p) :
- QWidget(0, 0, WDestructiveClose | WX11BypassWM)
+ CoverPopup(const TQPixmap &image, const TQPoint &p) :
+ TQWidget(0, 0, WDestructiveClose | WX11BypassWM)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
- QLabel *label = new QLabel(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
+ TQLabel *label = new TQLabel(this);
layout->addWidget(label);
- label->setFrameStyle(QFrame::Box | QFrame::Raised);
+ label->setFrameStyle(TQFrame::Box | TQFrame::Raised);
label->setLineWidth(1);
label->setPixmap(image);
setGeometry(p.x(), p.y(), label->width(), label->height());
show();
}
- virtual void leaveEvent(QEvent *) { close(); }
- virtual void mouseReleaseEvent(QMouseEvent *) { close(); }
+ virtual void leaveEvent(TQEvent *) { close(); }
+ virtual void mouseReleaseEvent(TQMouseEvent *) { close(); }
};
////////////////////////////////////////////////////////////////////////////////
@@ -85,7 +85,7 @@ bool CoverInfo::hasCover()
// We *still* don't have it? Check the old-style covers then.
if(!m_hasCover) {
- m_hasCover = QFile(coverLocation(FullSize)).exists();
+ m_hasCover = TQFile(coverLocation(FullSize)).exists();
if(m_hasCover)
m_needsConverting = true;
@@ -109,7 +109,7 @@ void CoverInfo::clearCover()
m_coverKey = CoverManager::NoMatch;
}
-void CoverInfo::setCover(const QImage &image)
+void CoverInfo::setCover(const TQImage &image)
{
if(image.isNull())
return;
@@ -118,7 +118,7 @@ void CoverInfo::setCover(const QImage &image)
m_needsConverting = false;
m_hasCover = true;
- QPixmap cover;
+ TQPixmap cover;
cover.convertFromImage(image);
// If we use replaceCover we'll change the cover for every other track
@@ -142,8 +142,8 @@ void CoverInfo::setCoverId(coverKey id)
void CoverInfo::applyCoverToWholeAlbum(bool overwriteExistingCovers) const
{
- QString artist = m_file.tag()->artist();
- QString album = m_file.tag()->album();
+ TQString artist = m_file.tag()->artist();
+ TQString album = m_file.tag()->album();
PlaylistSearch::ComponentList components;
ColumnList columns;
@@ -175,13 +175,13 @@ void CoverInfo::applyCoverToWholeAlbum(bool overwriteExistingCovers) const
}
}
-QPixmap CoverInfo::pixmap(CoverSize size) const
+TQPixmap CoverInfo::pixmap(CoverSize size) const
{
if(m_needsConverting)
convertOldStyleCover();
if(m_coverKey == CoverManager::NoMatch)
- return QPixmap();
+ return TQPixmap();
if(size == Thumbnail)
return CoverManager::coverFromId(m_coverKey, CoverManager::Thumbnail);
@@ -191,9 +191,9 @@ QPixmap CoverInfo::pixmap(CoverSize size) const
void CoverInfo::popup() const
{
- QPixmap image = pixmap(FullSize);
- QPoint mouse = QCursor::pos();
- QRect desktop = KApplication::desktop()->screenGeometry(mouse);
+ TQPixmap image = pixmap(FullSize);
+ TQPoint mouse = TQCursor::pos();
+ TQRect desktop = KApplication::desktop()->screenGeometry(mouse);
int x = mouse.x();
int y = mouse.y();
@@ -216,22 +216,22 @@ void CoverInfo::popup() const
else
y = (y - desktop.y() > desktop.height() - 10) ? desktop.height() - height + desktop.y() : (y - height + 10);
- new CoverPopup(image, QPoint(x, y));
+ new CoverPopup(image, TQPoint(x, y));
}
/**
* DEPRECATED
*/
-QString CoverInfo::coverLocation(CoverSize size) const
+TQString CoverInfo::coverLocation(CoverSize size) const
{
- QString fileName(QFile::encodeName(m_file.tag()->artist() + " - " + m_file.tag()->album()));
- QRegExp maskedFileNameChars("[ /?:\"]");
+ TQString fileName(TQFile::encodeName(m_file.tag()->artist() + " - " + m_file.tag()->album()));
+ TQRegExp maskedFileNameChars("[ /?:\"]");
fileName.replace(maskedFileNameChars, "_");
fileName.append(".png");
- QString dataDir = KGlobal::dirs()->saveLocation("appdata");
- QString subDir;
+ TQString dataDir = KGlobal::dirs()->saveLocation("appdata");
+ TQString subDir;
switch (size) {
case FullSize:
@@ -240,7 +240,7 @@ QString CoverInfo::coverLocation(CoverSize size) const
default:
break;
}
- QString fileLocation = dataDir + "covers/" + subDir + fileName.lower();
+ TQString fileLocation = dataDir + "covers/" + subDir + fileName.lower();
return fileLocation;
}
@@ -250,9 +250,9 @@ bool CoverInfo::convertOldStyleCover() const
// Ah, old-style cover. Let's transfer it to the new system.
kdDebug() << "Found old style cover for " << m_file.absFilePath() << endl;
- QString artist = m_file.tag()->artist();
- QString album = m_file.tag()->album();
- QString oldLocation = coverLocation(FullSize);
+ TQString artist = m_file.tag()->artist();
+ TQString album = m_file.tag()->album();
+ TQString oldLocation = coverLocation(FullSize);
m_coverKey = CoverManager::addCover(oldLocation, artist, album);
m_needsConverting = false;
@@ -269,7 +269,7 @@ bool CoverInfo::convertOldStyleCover() const
// If we convert we need to remove the old cover otherwise we'll find
// it later if the user un-sets the new cover.
- if(!QFile::remove(oldLocation))
+ if(!TQFile::remove(oldLocation))
kdError(65432) << "Unable to remove converted cover at " << oldLocation << endl;
return true;