diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
commit | b1057f437bf65300831a0ccb45b920787c6b318d (patch) | |
tree | f8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /juk | |
parent | 4ddfca384ced9ad654213aef9dc2c3973720b980 (diff) | |
download | tdemultimedia-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')
115 files changed, 1045 insertions, 981 deletions
diff --git a/juk/HACKING b/juk/HACKING index 2fb4d392..47ddf410 100644 --- a/juk/HACKING +++ b/juk/HACKING @@ -84,7 +84,7 @@ Spaces ================================================================================ Spaces should not be used between the conditional / loop type and the -conditional statement. They should also not be used after parenthesis. However +conditional statement. They should also not be used after tqparenthesis. However the should be to mark of mathematical or comparative operators. if ( foo == bar ) @@ -103,15 +103,15 @@ be inline in the headers. The organization of the members in a class should be roughly as follows: public: -public slots: +public Q_SLOTS: protected: -protected slots: -signals: +protected Q_SLOTS: +Q_SIGNALS: private: // member funtions -private slots: +private Q_SLOTS: private: // member variables -If there are no private slots there is no need for two private sections, however +If there are no private Q_SLOTS there is no need for two private sections, however private functions and private variables should be clearly separated. The implementations files -- .cpp files -- should follow (when possible) the diff --git a/juk/advancedsearchdialog.cpp b/juk/advancedsearchdialog.cpp index 711c1275..a7b73c65 100644 --- a/juk/advancedsearchdialog.cpp +++ b/juk/advancedsearchdialog.cpp @@ -36,9 +36,9 @@ AdvancedSearchDialog::AdvancedSearchDialog(const TQString &defaultName, const PlaylistSearch &defaultSearch, - TQWidget *parent, + TQWidget *tqparent, const char *name) : - KDialogBase(parent, name, true, i18n("Create Search Playlist"), Ok|Cancel) + KDialogBase(tqparent, name, true, i18n("Create Search Playlist"), Ok|Cancel) { makeVBoxMainWidget(); diff --git a/juk/advancedsearchdialog.h b/juk/advancedsearchdialog.h index 699d5eb8..65158273 100644 --- a/juk/advancedsearchdialog.h +++ b/juk/advancedsearchdialog.h @@ -27,6 +27,7 @@ class SearchLine; class AdvancedSearchDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: struct Result @@ -38,7 +39,7 @@ public: AdvancedSearchDialog(const TQString &defaultName, const PlaylistSearch &defaultSearch = PlaylistSearch(), - TQWidget *parent = 0, + TQWidget *tqparent = 0, const char *name = 0); virtual ~AdvancedSearchDialog(); diff --git a/juk/akodeplayer.h b/juk/akodeplayer.h index 07181ba5..fb78fb42 100644 --- a/juk/akodeplayer.h +++ b/juk/akodeplayer.h @@ -18,6 +18,10 @@ #include <config.h> +#ifdef Q_MOC_RUN +#define HAVE_AKODE +#endif // Q_MOC_RUN + #ifdef HAVE_AKODE #include <tqstring.h> @@ -33,6 +37,7 @@ namespace aKode { class KDE_EXPORT aKodePlayer : public Player { Q_OBJECT + TQ_OBJECT public: aKodePlayer(); diff --git a/juk/artsplayer.h b/juk/artsplayer.h index 73601b33..096074d9 100644 --- a/juk/artsplayer.h +++ b/juk/artsplayer.h @@ -21,6 +21,10 @@ #include <config.h> +#ifdef Q_MOC_RUN +#define HAVE_ARTS 1 +#endif // Q_MOC_RUN + #if HAVE_ARTS #include "player.h" @@ -43,6 +47,7 @@ namespace KDE { class ArtsPlayer : public Player { Q_OBJECT + TQ_OBJECT public: ArtsPlayer(); diff --git a/juk/cache.cpp b/juk/cache.cpp index ada9334b..6cfed63f 100644 --- a/juk/cache.cpp +++ b/juk/cache.cpp @@ -84,9 +84,9 @@ void Cache::save() TQDataStream fs(&f); - Q_INT32 checksum = qChecksum(data.data(), data.size()); + TQ_INT32 checksum = qChecksum(data.data(), data.size()); - fs << Q_INT32(m_currentVersion) + fs << TQ_INT32(m_currentVersion) << checksum << data; @@ -106,7 +106,7 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static TQDataStream fs(&f); - Q_INT32 version; + TQ_INT32 version; fs >> version; switch(version) { @@ -117,7 +117,7 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static // we want to get a byte array with just the checksummed data. TQByteArray data; - Q_UINT16 checksum; + TQ_UINT16 checksum; fs >> checksum >> data; if(checksum != qChecksum(data.data(), data.size())) @@ -129,7 +129,7 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static while(!s.atEnd()) { - Q_INT32 playlistType; + TQ_INT32 playlistType; s >> playlistType; Playlist *playlist = 0; @@ -175,7 +175,7 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static break; } if(version == 2) { - Q_INT32 sortColumn; + TQ_INT32 sortColumn; s >> sortColumn; if(playlist) playlist->setSorting(sortColumn); @@ -217,33 +217,33 @@ void Cache::savePlaylists(const PlaylistList &playlists) for(PlaylistList::ConstIterator it = playlists.begin(); it != playlists.end(); ++it) { if(*it) { if(dynamic_cast<HistoryPlaylist *>(*it)) { - s << Q_INT32(History) + s << TQ_INT32(History) << *static_cast<HistoryPlaylist *>(*it); } else if(dynamic_cast<SearchPlaylist *>(*it)) { - s << Q_INT32(Search) + s << TQ_INT32(Search) << *static_cast<SearchPlaylist *>(*it); } else if(dynamic_cast<UpcomingPlaylist *>(*it)) { if(!action<KToggleAction>("saveUpcomingTracks")->isChecked()) continue; - s << Q_INT32(Upcoming) + s << TQ_INT32(Upcoming) << *static_cast<UpcomingPlaylist *>(*it); } else if(dynamic_cast<FolderPlaylist *>(*it)) { - s << Q_INT32(Folder) + s << TQ_INT32(Folder) << *static_cast<FolderPlaylist *>(*it); } else { - s << Q_INT32(Normal) + s << TQ_INT32(Normal) << *(*it); } - s << Q_INT32((*it)->sortColumn()); + s << TQ_INT32((*it)->sortColumn()); } } TQDataStream fs(&f); - fs << Q_INT32(playlistCacheVersion); + fs << TQ_INT32(playlistCacheVersion); fs << qChecksum(data.data(), data.size()); fs << data; @@ -275,9 +275,9 @@ void Cache::load() if(!f.open(IO_ReadOnly)) return; - CacheDataStream s(&f); + CacheDataStream s(TQT_TQIODEVICE(&f)); - Q_INT32 version; + TQ_INT32 version; s >> version; TQBuffer buffer; @@ -288,7 +288,7 @@ void Cache::load() case 1: { s.setCacheVersion(1); - Q_INT32 checksum; + TQ_INT32 checksum; TQByteArray data; s >> checksum >> data; diff --git a/juk/cache.h b/juk/cache.h index 6d67f1fd..96fb83af 100644 --- a/juk/cache.h +++ b/juk/cache.h @@ -49,7 +49,7 @@ private: * version. */ -class CacheDataStream : public QDataStream +class CacheDataStream : public TQDataStream { public: CacheDataStream(TQIODevice *d) : TQDataStream(d), m_cacheVersion(0) {} diff --git a/juk/categoryreaderinterface.cpp b/juk/categoryreaderinterface.cpp index 3844fc21..103329b3 100644 --- a/juk/categoryreaderinterface.cpp +++ b/juk/categoryreaderinterface.cpp @@ -50,7 +50,7 @@ TQString CategoryReaderInterface::fixupTrack(const TQString &track, unsigned cat if(emptyAction(trackId) == TagRenamerOptions::UseReplacementValue) str = emptyText(trackId); else - return TQString::null; + return TQString(); } unsigned minimumWidth = trackWidth(categoryNum); diff --git a/juk/collectionlist.cpp b/juk/collectionlist.cpp index 5c06049a..2f005009 100644 --- a/juk/collectionlist.cpp +++ b/juk/collectionlist.cpp @@ -90,7 +90,7 @@ PlaylistItem *CollectionList::createItem(const FileHandle &file, TQListViewItem // It's probably possible to optimize the line below away, but, well, right // now it's more important to not load duplicate items. - if(m_itemsDict.find(file.absFilePath())) + if(m_itemsDict.tqfind(file.absFilePath())) return 0; PlaylistItem *item = new CollectionListItem(file); @@ -162,7 +162,7 @@ void CollectionList::slotRefreshItems(const KFileItemList &items) // If the item is no longer on disk, remove it from the collection. if(item->file().fileInfo().exists()) - item->repaint(); + item->tqrepaint(); else clearItem(item); } @@ -228,7 +228,7 @@ CollectionList::CollectionList(PlaylistCollection *collection) : m_itemsDict(5003), m_columnTags(15, 0) { - new KAction(i18n("Show Playing"), KShortcut(), actions(), "showPlaying"); + new KAction(i18n("Show Playing"), KShortcut(), ActionCollection::actions(), "showPlaying"); connect(action("showPlaying"), TQT_SIGNAL(activated()), this, TQT_SLOT(slotShowPlaying())); @@ -284,9 +284,9 @@ void CollectionList::contentsDragMoveEvent(TQDragMoveEvent *e) TQString CollectionList::addStringToDict(const TQString &value, unsigned column) { if(column > m_columnTags.count() || value.stripWhiteSpace().isEmpty()) - return TQString::null; + return TQString(); - int *refCountPtr = m_columnTags[column]->find(value); + int *refCountPtr = m_columnTags[column]->tqfind(value); if(refCountPtr) ++(*refCountPtr); else { @@ -336,7 +336,7 @@ void CollectionList::removeStringFromDict(const TQString &value, unsigned column if(column > m_columnTags.count() || value.isEmpty()) return; - int *refCountPtr = m_columnTags[column]->find(value); + int *refCountPtr = m_columnTags[column]->tqfind(value); if(refCountPtr) { --(*refCountPtr); if(*refCountPtr == 0) { @@ -392,13 +392,13 @@ void CollectionListItem::refresh() file().coverInfo()->setCover(); if(listView()->isVisible()) - repaint(); + tqrepaint(); - for(PlaylistItemList::Iterator it = m_children.begin(); it != m_children.end(); ++it) { + for(PlaylistItemList::Iterator it = m_tqchildren.begin(); it != m_tqchildren.end(); ++it) { (*it)->playlist()->update(); (*it)->playlist()->dataChanged(); if((*it)->listView()->isVisible()) - (*it)->repaint(); + (*it)->tqrepaint(); } CollectionList::instance()->dataChanged(); @@ -411,7 +411,7 @@ PlaylistItem *CollectionListItem::itemForPlaylist(const Playlist *playlist) return this; PlaylistItemList::ConstIterator it; - for(it = m_children.begin(); it != m_children.end(); ++it) + for(it = m_tqchildren.begin(); it != m_tqchildren.end(); ++it) if((*it)->playlist() == playlist) return *it; return 0; @@ -428,11 +428,11 @@ void CollectionListItem::updateCollectionDict(const TQString &oldPath, const TQS collection->addToDict(newPath, this); } -void CollectionListItem::repaint() const +void CollectionListItem::tqrepaint() const { - TQListViewItem::repaint(); - for(PlaylistItemList::ConstIterator it = m_children.begin(); it != m_children.end(); ++it) - (*it)->repaint(); + TQListViewItem::tqrepaint(); + for(PlaylistItemList::ConstIterator it = m_tqchildren.begin(); it != m_tqchildren.end(); ++it) + (*it)->tqrepaint(); } //////////////////////////////////////////////////////////////////////////////// @@ -468,8 +468,8 @@ CollectionListItem::~CollectionListItem() { m_shuttingDown = true; - for(PlaylistItemList::ConstIterator it = m_children.begin(); - it != m_children.end(); + for(PlaylistItemList::ConstIterator it = m_tqchildren.begin(); + it != m_tqchildren.end(); ++it) { (*it)->playlist()->clearItem(*it); @@ -486,13 +486,13 @@ CollectionListItem::~CollectionListItem() void CollectionListItem::addChildItem(PlaylistItem *child) { - m_children.append(child); + m_tqchildren.append(child); } void CollectionListItem::removeChildItem(PlaylistItem *child) { if(!m_shuttingDown) - m_children.remove(child); + m_tqchildren.remove(child); } bool CollectionListItem::checkCurrent() diff --git a/juk/collectionlist.h b/juk/collectionlist.h index 4143889c..82fa9c12 100644 --- a/juk/collectionlist.h +++ b/juk/collectionlist.h @@ -64,6 +64,7 @@ class CollectionList : public Playlist friend class CollectionListItem; Q_OBJECT + TQ_OBJECT public: /** @@ -80,7 +81,7 @@ public: */ TQStringList uniqueSet(UniqueSetType t) const; - CollectionListItem *lookup(const TQString &file) { return m_itemsDict.find(file); } + CollectionListItem *lookup(const TQString &file) { return m_itemsDict.tqfind(file); } virtual PlaylistItem *createItem(const FileHandle &file, TQListViewItem * = 0, @@ -95,7 +96,7 @@ public: virtual bool canReload() const { return true; } public slots: - virtual void paste() { decode(kapp->clipboard()->data()); } + virtual void paste() { decode(kapp->tqclipboard()->data()); } virtual void clear(); void slotCheckCache(); @@ -115,7 +116,7 @@ protected: // These methods are used by CollectionListItem, which is a friend class. - void addToDict(const TQString &file, CollectionListItem *item) { m_itemsDict.replace(file, item); } + void addToDict(const TQString &file, CollectionListItem *item) { m_itemsDict.tqreplace(file, item); } void removeFromDict(const TQString &file) { m_itemsDict.remove(file); } // These methods are also used by CollectionListItem, to manage the @@ -127,7 +128,7 @@ protected: void addWatched(const TQString &file) { m_dirWatch->addFile(file); } void removeWatched(const TQString &file) { m_dirWatch->removeFile(file); } - virtual bool hasItem(const TQString &file) const { return m_itemsDict.find(file); } + virtual bool hasItem(const TQString &file) const { return m_itemsDict.tqfind(file); } signals: void signalCollectionChanged(); @@ -171,8 +172,8 @@ public: virtual void refresh(); PlaylistItem *itemForPlaylist(const Playlist *playlist); void updateCollectionDict(const TQString &oldPath, const TQString &newPath); - void repaint() const; - PlaylistItemList children() const { return m_children; } + void tqrepaint() const; + PlaylistItemList tqchildren() const { return m_tqchildren; } protected: CollectionListItem(const FileHandle &file); @@ -191,7 +192,7 @@ protected: private: bool m_shuttingDown; - PlaylistItemList m_children; + PlaylistItemList m_tqchildren; }; #endif diff --git a/juk/coverdialog.cpp b/juk/coverdialog.cpp index 509f0695..2b04f3c1 100644 --- a/juk/coverdialog.cpp +++ b/juk/coverdialog.cpp @@ -34,8 +34,8 @@ using CoverUtility::CoverIconViewItem; class AllArtistsListViewItem : public KListViewItem { public: - AllArtistsListViewItem(TQListView *parent) : - KListViewItem(parent, i18n("<All Artists>")) + AllArtistsListViewItem(TQListView *tqparent) : + KListViewItem(tqparent, i18n("<All Artists>")) { } @@ -48,8 +48,8 @@ public: class CaseInsensitiveItem : public KListViewItem { public: - CaseInsensitiveItem(TQListView *parent, const TQString &text) : - KListViewItem(parent, text) + CaseInsensitiveItem(TQListView *tqparent, const TQString &text) : + KListViewItem(tqparent, text) { } @@ -60,8 +60,8 @@ public: } }; -CoverDialog::CoverDialog(TQWidget *parent) : - CoverDialogBase(parent, "juk_cover_dialog", WType_Dialog) +CoverDialog::CoverDialog(TQWidget *tqparent) : + CoverDialogBase(tqparent, "juk_cover_dialog", WType_Dialog) { m_covers->setResizeMode(TQIconView::Adjust); m_covers->setGridX(140); diff --git a/juk/coverdialog.h b/juk/coverdialog.h index 751f77c2..6bbbba4a 100644 --- a/juk/coverdialog.h +++ b/juk/coverdialog.h @@ -21,8 +21,9 @@ class CoverDialog : public CoverDialogBase { Q_OBJECT + TQ_OBJECT public: - CoverDialog(TQWidget *parent); + CoverDialog(TQWidget *tqparent); ~CoverDialog(); virtual void show(); diff --git a/juk/coverdialogbase.ui b/juk/coverdialogbase.ui index 180dc8b0..d220a5c9 100644 --- a/juk/coverdialogbase.ui +++ b/juk/coverdialogbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>CoverDialogBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>CoverDialogBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -50,7 +50,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>164</width> <height>0</height> @@ -63,23 +63,23 @@ <bool>false</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_clearSearch</cstring> </property> @@ -164,7 +164,7 @@ <verstretch>0</verstretch> </sizepolicy> <pixmap>image0</pixmap> - <signal>contextMenuRequested(QIconViewItem *item, const QPoint &pos)</signal> + <signal>contextMenuRequested(TQIconViewItem *item, const TQPoint &pos)</signal> <property type="Int">gridX</property> <property type="Int">gridY</property> </customwidget> @@ -177,9 +177,9 @@ <connections> <connection> <sender>m_artists</sender> - <signal>clicked(QListViewItem*)</signal> + <signal>clicked(TQListViewItem*)</signal> <receiver>CoverDialogBase</receiver> - <slot>slotArtistClicked(QListViewItem*)</slot> + <slot>slotArtistClicked(TQListViewItem*)</slot> </connection> <connection> <sender>m_clearSearch</sender> @@ -189,18 +189,18 @@ </connection> <connection> <sender>m_covers</sender> - <signal>contextMenuRequested(QIconViewItem*,const QPoint&)</signal> + <signal>contextMenuRequested(TQIconViewItem*,const TQPoint&)</signal> <receiver>CoverDialogBase</receiver> - <slot>slotContextRequested(QIconViewItem*,const QPoint&)</slot> + <slot>slotContextRequested(TQIconViewItem*,const TQPoint&)</slot> </connection> </connections> -<slots> - <slot>slotArtistClicked(QListViewItem *item)</slot> - <slot>slotContextRequested(QIconViewItem *, const QPoint &pt)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +<Q_SLOTS> + <slot>slotArtistClicked(TQListViewItem *item)</slot> + <slot>slotContextRequested(TQIconViewItem *, const TQPoint &pt)</slot> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <forwards> - <forward>class QIconViewItem;</forward> + <forward>class TQIconViewItem;</forward> </forwards> <includehints> <includehint>klistview.h</includehint> diff --git a/juk/covericonview.cpp b/juk/covericonview.cpp index fc400e78..2dd1260b 100644 --- a/juk/covericonview.cpp +++ b/juk/covericonview.cpp @@ -18,15 +18,15 @@ using CoverUtility::CoverIconViewItem; -CoverIconViewItem::CoverIconViewItem(coverKey id, TQIconView *parent) : - KIconViewItem(parent), m_id(id) +CoverIconViewItem::CoverIconViewItem(coverKey id, TQIconView *tqparent) : + KIconViewItem(tqparent), m_id(id) { CoverDataPtr data = CoverManager::coverInfo(id); - setText(TQString("%1 - %2").arg(data->artist, data->album)); + setText(TQString("%1 - %2").tqarg(data->artist, data->album)); setPixmap(data->thumbnail()); } -CoverIconView::CoverIconView(TQWidget *parent, const char *name) : KIconView(parent, name) +CoverIconView::CoverIconView(TQWidget *tqparent, const char *name) : KIconView(tqparent, name) { setResizeMode(Adjust); } diff --git a/juk/covericonview.h b/juk/covericonview.h index 42e44d66..a12f4354 100644 --- a/juk/covericonview.h +++ b/juk/covericonview.h @@ -29,7 +29,7 @@ namespace CoverUtility class CoverIconViewItem : public KIconViewItem { public: - CoverIconViewItem(coverKey id, TQIconView *parent); + CoverIconViewItem(coverKey id, TQIconView *tqparent); coverKey id() const { return m_id; } @@ -49,7 +49,7 @@ using CoverUtility::CoverIconViewItem; class CoverIconView : public KIconView { public: - CoverIconView(TQWidget *parent, const char *name); + CoverIconView(TQWidget *tqparent, const char *name); CoverIconViewItem *currentItem() const; diff --git a/juk/coverinfo.cpp b/juk/coverinfo.cpp index 67e8514a..49bf0f55 100644 --- a/juk/coverinfo.cpp +++ b/juk/coverinfo.cpp @@ -29,15 +29,15 @@ #include "coverinfo.h" #include "tag.h" -struct CoverPopup : public QWidget +struct CoverPopup : public TQWidget { CoverPopup(const TQPixmap &image, const TQPoint &p) : TQWidget(0, 0, WDestructiveClose | WX11BypassWM) { - TQHBoxLayout *layout = new TQHBoxLayout(this); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); TQLabel *label = new TQLabel(this); - layout->addWidget(label); + tqlayout->addWidget(label); label->setFrameStyle(TQFrame::Box | TQFrame::Raised); label->setLineWidth(1); label->setPixmap(image); @@ -225,9 +225,9 @@ void CoverInfo::popup() const TQString CoverInfo::coverLocation(CoverSize size) const { TQString fileName(TQFile::encodeName(m_file.tag()->artist() + " - " + m_file.tag()->album())); - TQRegExp maskedFileNameChars("[ /?:\"]"); + TQRegExp tqmaskedFileNameChars("[ /?:\"]"); - fileName.replace(maskedFileNameChars, "_"); + fileName.tqreplace(tqmaskedFileNameChars, "_"); fileName.append(".png"); TQString dataDir = KGlobal::dirs()->saveLocation("appdata"); @@ -267,7 +267,7 @@ bool CoverInfo::convertOldStyleCover() const applyCoverToWholeAlbum(); - // If we convert we need to remove the old cover otherwise we'll find + // If we convert we need to remove the old cover otherwise we'll tqfind // it later if the user un-sets the new cover. if(!TQFile::remove(oldLocation)) kdError(65432) << "Unable to remove converted cover at " << oldLocation << endl; diff --git a/juk/covermanager.cpp b/juk/covermanager.cpp index f7530daa..811f904f 100644 --- a/juk/covermanager.cpp +++ b/juk/covermanager.cpp @@ -42,13 +42,13 @@ typedef TQDict<coverKey> TrackLookupMap; static KStaticDeleter<CoverManagerPrivate> sd; const char *CoverDrag::mimetype = "application/x-juk-coverid"; -// Caches the QPixmaps for the covers so that the covers are not all kept in +// Caches the TQPixmaps for the covers so that the covers are not all kept in // memory for no reason. typedef TQCache<TQPixmap> CoverPixmapCache; CoverManagerPrivate *CoverManager::m_data = 0; -// Used to save and load CoverData from a QDataStream +// Used to save and load CoverData from a TQDataStream TQDataStream &operator<<(TQDataStream &out, const CoverData &data); TQDataStream &operator>>(TQDataStream &in, CoverData &data); @@ -156,20 +156,20 @@ void CoverManagerPrivate::saveCovers() const TQDataStream out(&file); // Write out the version and count - out << Q_UINT32(0) << Q_UINT32(covers.count()); + out << TQ_UINT32(0) << TQ_UINT32(covers.count()); // Write out the data for(CoverDataMap::ConstIterator it = covers.begin(); it != covers.end(); ++it) { - out << Q_UINT32(it.key()); + out << TQ_UINT32(it.key()); out << *it.data(); } // Now write out the track mapping. - out << Q_UINT32(tracks.count()); + out << TQ_UINT32(tracks.count()); TQDictIterator<coverKey> trackMapIt(tracks); while(trackMapIt.current()) { - out << trackMapIt.currentKey() << Q_UINT32(*trackMapIt.current()); + out << trackMapIt.currentKey() << TQ_UINT32(*trackMapIt.current()); ++trackMapIt; } } @@ -186,7 +186,7 @@ void CoverManagerPrivate::loadCovers() } TQDataStream in(&file); - Q_UINT32 count, version; + TQ_UINT32 count, version; // First thing we'll read in will be the version. // Only version 0 is defined for now. @@ -200,9 +200,9 @@ void CoverManagerPrivate::loadCovers() // Read in the count next, then the data. in >> count; - for(Q_UINT32 i = 0; i < count; ++i) { - // Read the id, and 3 QStrings for every 1 of the count. - Q_UINT32 id; + for(TQ_UINT32 i = 0; i < count; ++i) { + // Read the id, and 3 TQStrings for every 1 of the count. + TQ_UINT32 id; CoverDataPtr data(new CoverData); in >> id; @@ -213,9 +213,9 @@ void CoverManagerPrivate::loadCovers() } in >> count; - for(Q_UINT32 i = 0; i < count; ++i) { + for(TQ_UINT32 i = 0; i < count; ++i) { TQString path; - Q_UINT32 id; + TQ_UINT32 id; in >> path >> id; @@ -223,7 +223,7 @@ void CoverManagerPrivate::loadCovers() // don't do so again. Possible due to a coding error during 3.5 // development. - if(!tracks.find(path)) { + if(!tracks.tqfind(path)) { ++covers[(coverKey) id]->refCount; // Another track using this. tracks.insert(path, new coverKey(id)); } @@ -242,7 +242,7 @@ coverKey CoverManagerPrivate::nextId() const // Start from 1... coverKey key = 1; - while(covers.contains(key)) + while(covers.tqcontains(key)) ++key; return key; @@ -269,13 +269,13 @@ const char *CoverDrag::format(int i) const return 0; } -TQByteArray CoverDrag::encodedData(const char *mimetype) const +TQByteArray CoverDrag::tqencodedData(const char *mimetype) const { if(qstrcmp(CoverDrag::mimetype, mimetype) == 0) { TQByteArray data; TQDataStream ds(data, IO_WriteOnly); - ds << Q_UINT32(m_id); + ds << TQ_UINT32(m_id); return data; } else if(qstrcmp(mimetype, "image/png") == 0) { @@ -303,9 +303,9 @@ bool CoverDrag::decode(const TQMimeSource *e, coverKey &id) if(!canDecode(e)) return false; - TQByteArray data = e->encodedData(mimetype); + TQByteArray data = e->tqencodedData(mimetype); TQDataStream ds(data, IO_ReadOnly); - Q_UINT32 i; + TQ_UINT32 i; ds >> i; id = (coverKey) i; @@ -371,7 +371,7 @@ TQPixmap CoverManager::coverFromData(const CoverData &coverData, Size size) if(size == Thumbnail) { // Convert to image for smoothScale() TQImage image = pix->convertToImage(); - pix->convertFromImage(image.smoothScale(80, 80, TQImage::ScaleMin)); + pix->convertFromImage(image.smoothScale(80, 80, TQ_ScaleMin)); } TQPixmap returnValue = *pix; // Save it early. @@ -395,7 +395,7 @@ coverKey CoverManager::addCover(const TQPixmap &large, const TQString &artist, c // Save it to file first! - TQString ext = TQString("/coverdb/coverID-%1.png").arg(id); + TQString ext = TQString("/coverdb/coverID-%1.png").tqarg(id); coverData->path = KGlobal::dirs()->saveLocation("appdata") + ext; kdDebug() << "Saving pixmap to " << coverData->path << endl; @@ -413,8 +413,8 @@ coverKey CoverManager::addCover(const TQPixmap &large, const TQString &artist, c data()->covers[id] = coverData; // Make sure the new cover isn't inadvertently cached. - data()->pixmapCache.remove(TQString("f%1").arg(coverData->path)); - data()->pixmapCache.remove(TQString("t%1").arg(coverData->path)); + data()->pixmapCache.remove(TQString("f%1").tqarg(coverData->path)); + data()->pixmapCache.remove(TQString("t%1").tqarg(coverData->path)); return id; } @@ -426,7 +426,7 @@ coverKey CoverManager::addCover(const TQString &path, const TQString &artist, co bool CoverManager::hasCover(coverKey id) { - return data()->covers.contains(id); + return data()->covers.tqcontains(id); } bool CoverManager::removeCover(coverKey id) @@ -436,8 +436,8 @@ bool CoverManager::removeCover(coverKey id) // Remove cover from cache. CoverDataPtr coverData = coverInfo(id); - data()->pixmapCache.remove(TQString("f%1").arg(coverData->path)); - data()->pixmapCache.remove(TQString("t%1").arg(coverData->path)); + data()->pixmapCache.remove(TQString("f%1").tqarg(coverData->path)); + data()->pixmapCache.remove(TQString("t%1").tqarg(coverData->path)); // Remove references to files that had that track ID. TQDictIterator<coverKey> it(data()->tracks); @@ -462,8 +462,8 @@ bool CoverManager::replaceCover(coverKey id, const TQPixmap &large) CoverDataPtr coverData = coverInfo(id); // Empty old pixmaps from cache. - data()->pixmapCache.remove(TQString("%1%2").arg("t", coverData->path)); - data()->pixmapCache.remove(TQString("%1%2").arg("f", coverData->path)); + data()->pixmapCache.remove(TQString("%1%2").tqarg("t", coverData->path)); + data()->pixmapCache.remove(TQString("%1%2").tqarg("f", coverData->path)); large.save(coverData->path, "PNG"); return true; @@ -504,7 +504,7 @@ TQValueList<coverKey> CoverManager::keys() void CoverManager::setIdForTrack(const TQString &path, coverKey id) { - coverKey *oldId = data()->tracks.find(path); + coverKey *oldId = data()->tracks.tqfind(path); if(oldId && (id == *oldId)) return; // We're already done. @@ -526,7 +526,7 @@ void CoverManager::setIdForTrack(const TQString &path, coverKey id) coverKey CoverManager::idForTrack(const TQString &path) { - coverKey *coverPtr = data()->tracks.find(path); + coverKey *coverPtr = data()->tracks.tqfind(path); if(!coverPtr) return NoMatch; @@ -536,7 +536,7 @@ coverKey CoverManager::idForTrack(const TQString &path) CoverDataPtr CoverManager::coverInfo(coverKey id) { - if(data()->covers.contains(id)) + if(data()->covers.tqcontains(id)) return data()->covers[id]; return CoverDataPtr(0); diff --git a/juk/covermanager.h b/juk/covermanager.h index d7eda155..a984f01e 100644 --- a/juk/covermanager.h +++ b/juk/covermanager.h @@ -62,13 +62,13 @@ typedef TQMap<coverKey, CoverDataPtr> CoverDataMap; * * @author Michael Pyne <michael.pyne@kdemail.net> */ -class CoverDrag : public QDragObject +class CoverDrag : public TQDragObject { public: CoverDrag(coverKey id, TQWidget *src); virtual const char *format(int i) const; - virtual TQByteArray encodedData(const char *mimetype) const; + virtual TQByteArray tqencodedData(const char *mimetype) const; void setId(coverKey id) { m_id = id; } @@ -191,7 +191,7 @@ public: * Replaces the cover art for the cover identified by @p id with @p large. * Any other metadata such as artist and album is unchanged. * - * @param id The id of the cover to replace. + * @param id The id of the cover to tqreplace. * @param large The full size cover art for the new cover. */ static bool replaceCover(coverKey id, const TQPixmap &large); diff --git a/juk/deletedialog.cpp b/juk/deletedialog.cpp index e780eec0..688015c1 100644 --- a/juk/deletedialog.cpp +++ b/juk/deletedialog.cpp @@ -33,8 +33,8 @@ // DeleteWidget implementation ////////////////////////////////////////////////////////////////////////////// -DeleteWidget::DeleteWidget(TQWidget *parent, const char *name) - : DeleteDialogBase(parent, name) +DeleteWidget::DeleteWidget(TQWidget *tqparent, const char *name) + : DeleteDialogBase(tqparent, name) { KConfigGroup messageGroup(KGlobal::config(), "FileRemover"); @@ -69,8 +69,8 @@ void DeleteWidget::slotShouldDelete(bool shouldDelete) // DeleteDialog implementation ////////////////////////////////////////////////////////////////////////////// -DeleteDialog::DeleteDialog(TQWidget *parent, const char *name) : - KDialogBase(Swallow, WStyle_DialogBorder, parent, name, +DeleteDialog::DeleteDialog(TQWidget *tqparent, const char *name) : + KDialogBase(Swallow, WStyle_DialogBorder, tqparent, name, true /* modal */, i18n("About to delete selected files"), Ok | Cancel, Cancel /* Default */, true /* separator */), m_trashGuiItem(i18n("&Send to Trash"), "trashcan_full") diff --git a/juk/deletedialog.h b/juk/deletedialog.h index 34a98a6a..bc347f41 100644 --- a/juk/deletedialog.h +++ b/juk/deletedialog.h @@ -29,9 +29,10 @@ class TQWidgetStack; class DeleteWidget : public DeleteDialogBase { Q_OBJECT + TQ_OBJECT public: - DeleteWidget(TQWidget *parent = 0, const char *name = 0); + DeleteWidget(TQWidget *tqparent = 0, const char *name = 0); void setFiles(const TQStringList &files); @@ -42,9 +43,10 @@ protected slots: class DeleteDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - DeleteDialog(TQWidget *parent, const char *name = "delete_dialog"); + DeleteDialog(TQWidget *tqparent, const char *name = "delete_dialog"); bool confirmDeleteList(const TQStringList &condemnedFiles); void setFiles(const TQStringList &files); diff --git a/juk/deletedialogbase.ui b/juk/deletedialogbase.ui index f1054d79..992a6af5 100644 --- a/juk/deletedialogbase.ui +++ b/juk/deletedialogbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DeleteDialogBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DeleteDialogBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -12,7 +12,7 @@ <height>374</height> </rect> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>420</width> <height>320</height> @@ -22,15 +22,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>ddWarningIcon</cstring> </property> @@ -46,33 +46,33 @@ <string>Icon Placeholder, not in GUI</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>Are you sure that you want to remove these items?</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>ddDeleteText</cstring> </property> <property name="text"> <string>Deletion method placeholder, never shown to user.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignCenter</set> </property> </widget> @@ -94,18 +94,18 @@ <string>This is the list of items that are about to be deleted.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>ddNumFiles</cstring> </property> <property name="text"> <string>Placeholder for number of files, not in GUI</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>ddShouldDelete</cstring> </property> @@ -133,10 +133,10 @@ <slot>slotShouldDelete(bool)</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">slotShouldDelete(bool)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistbox.h</includehint> </includehints> diff --git a/juk/directorylist.cpp b/juk/directorylist.cpp index 43df3dda..23532370 100644 --- a/juk/directorylist.cpp +++ b/juk/directorylist.cpp @@ -28,8 +28,8 @@ //////////////////////////////////////////////////////////////////////////////// DirectoryList::DirectoryList(const TQStringList &directories, bool importPlaylists, - TQWidget *parent, const char *name) : - KDialogBase(parent, name, true, i18n("Folder List"), Ok | Cancel, Ok, true), + TQWidget *tqparent, const char *name) : + KDialogBase(tqparent, name, true, i18n("Folder List"), Ok | Cancel, Ok, true), m_dirList(directories), m_importPlaylists(importPlaylists) { @@ -50,9 +50,9 @@ DirectoryList::DirectoryList(const TQStringList &directories, bool importPlaylis m_base->importPlaylistsCheckBox->setChecked(importPlaylists); - TQSize sz = sizeHint(); + TQSize sz = tqsizeHint(); setMinimumSize(kMax(350, sz.width()), kMax(250, sz.height())); - resize(sizeHint()); + resize(tqsizeHint()); } DirectoryList::~DirectoryList() @@ -78,7 +78,7 @@ DirectoryList::Result DirectoryList::exec() void DirectoryList::slotAddDirectory() { TQString dir = KFileDialog::getExistingDirectory(); - if(!dir.isEmpty() && m_dirList.find(dir) == m_dirList.end()) { + if(!dir.isEmpty() && m_dirList.tqfind(dir) == m_dirList.end()) { m_dirList.append(dir); new KListViewItem(m_base->directoryListView, dir); m_result.addedDirs.append(dir); diff --git a/juk/directorylist.h b/juk/directorylist.h index d9b2a080..f25c21ae 100644 --- a/juk/directorylist.h +++ b/juk/directorylist.h @@ -22,6 +22,7 @@ class DirectoryListBase; class DirectoryList : public KDialogBase { Q_OBJECT + TQ_OBJECT public: struct Result @@ -33,7 +34,7 @@ public: }; DirectoryList(const TQStringList &directories, bool importPlaylists, - TQWidget *parent = 0, const char *name = 0); + TQWidget *tqparent = 0, const char *name = 0); virtual ~DirectoryList(); public slots: diff --git a/juk/directorylistbase.ui b/juk/directorylistbase.ui index 643417d3..62df27bd 100644 --- a/juk/directorylistbase.ui +++ b/juk/directorylistbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>DirectoryListBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DirectoryListBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -32,7 +32,7 @@ <cstring>directoryListView</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>rightColumnLayout</cstring> </property> @@ -56,14 +56,14 @@ <string>Remove Folder</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>informationLabel</cstring> </property> <property name="text"> <string>These folders will be scanned on startup for new files.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -77,14 +77,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> </size> </property> </spacer> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>importPlaylistsCheckBox</cstring> </property> @@ -102,8 +102,8 @@ <includes> <include location="global" impldecl="in implementation">kdialog.h</include> </includes> -<layoutdefaults spacing="6" margin="0"/> -<layoutfunctions spacing="KDialog::spacingHint"/> +<tqlayoutdefaults spacing="6" margin="0"/> +<tqlayoutfunctions spacing="KDialog::spacingHint"/> <includehints> <includehint>klistview.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/juk/dynamicplaylist.cpp b/juk/dynamicplaylist.cpp index 336d1e3e..a1ef1cd0 100644 --- a/juk/dynamicplaylist.cpp +++ b/juk/dynamicplaylist.cpp @@ -23,9 +23,9 @@ class PlaylistDirtyObserver : public PlaylistObserver { public: - PlaylistDirtyObserver(DynamicPlaylist *parent, Playlist *playlist) : + PlaylistDirtyObserver(DynamicPlaylist *tqparent, Playlist *playlist) : PlaylistObserver(playlist), - m_parent(parent) + m_parent(tqparent) { } diff --git a/juk/dynamicplaylist.h b/juk/dynamicplaylist.h index 20e496d0..f7c4f970 100644 --- a/juk/dynamicplaylist.h +++ b/juk/dynamicplaylist.h @@ -25,13 +25,14 @@ class DynamicPlaylist : public Playlist { Q_OBJECT + TQ_OBJECT public: /** * Creates a dynamic playlist based on lists. */ DynamicPlaylist(const PlaylistList &lists, PlaylistCollection *collection, - const TQString &name = TQString::null, + const TQString &name = TQString(), const TQString &iconName = "midi", bool setupPlaylist = true, bool synchronizePlaying = false); diff --git a/juk/exampleoptions.cpp b/juk/exampleoptions.cpp index e365546a..0f5bd862 100644 --- a/juk/exampleoptions.cpp +++ b/juk/exampleoptions.cpp @@ -21,8 +21,8 @@ #include "exampleoptions.h" -ExampleOptions::ExampleOptions(TQWidget *parent) : - ExampleOptionsBase(parent, "example options widget") +ExampleOptions::ExampleOptions(TQWidget *tqparent) : + ExampleOptionsBase(tqparent, "example options widget") { } @@ -44,8 +44,8 @@ void ExampleOptions::exampleFileChanged() emit fileChanged(); } -ExampleOptionsDialog::ExampleOptionsDialog(TQWidget *parent) : - TQDialog(parent, "example options dialog") +ExampleOptionsDialog::ExampleOptionsDialog(TQWidget *tqparent) : + TQDialog(tqparent, "example options dialog") { setCaption(i18n("JuK")); TQVBoxLayout *l = new TQVBoxLayout(this); diff --git a/juk/exampleoptions.h b/juk/exampleoptions.h index dca7a465..4d849b75 100644 --- a/juk/exampleoptions.h +++ b/juk/exampleoptions.h @@ -22,8 +22,9 @@ class ExampleOptions : public ExampleOptionsBase { Q_OBJECT + TQ_OBJECT public: - ExampleOptions(TQWidget *parent); + ExampleOptions(TQWidget *tqparent); protected slots: virtual void exampleSelectionChanged(); @@ -33,11 +34,12 @@ class ExampleOptions : public ExampleOptionsBase // We're not using KDialog(Base) because this dialog won't have any push // buttons to close it. It's just a little floating dialog. -class ExampleOptionsDialog : public QDialog +class ExampleOptionsDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - ExampleOptionsDialog(TQWidget *parent); + ExampleOptionsDialog(TQWidget *tqparent); const ExampleOptions *widget() const { return m_options; } diff --git a/juk/exampleoptionsbase.ui b/juk/exampleoptionsbase.ui index a2280ef4..1c17798c 100644 --- a/juk/exampleoptionsbase.ui +++ b/juk/exampleoptionsbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>ExampleOptionsBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ExampleOptionsBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup3</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_fileTagsButton</cstring> </property> @@ -60,7 +60,7 @@ <number>24</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_manualTagsButton</cstring> </property> @@ -71,7 +71,7 @@ <bool>true</bool> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_manualGroup</cstring> </property> @@ -85,7 +85,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>m_exampleArtist</cstring> </property> @@ -93,7 +93,7 @@ <string>Artist</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>m_exampleTitle</cstring> </property> @@ -101,7 +101,7 @@ <string>Title</string> </property> </widget> - <widget class="QLineEdit" row="2" column="1"> + <widget class="TQLineEdit" row="2" column="1"> <property name="name"> <cstring>m_exampleAlbum</cstring> </property> @@ -109,7 +109,7 @@ <string>Album</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -117,7 +117,7 @@ <string>Title:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -125,7 +125,7 @@ <string>Artist:</string> </property> </widget> - <widget class="QSpinBox" row="5" column="1"> + <widget class="TQSpinBox" row="5" column="1"> <property name="name"> <cstring>m_exampleYear</cstring> </property> @@ -139,7 +139,7 @@ <number>2004</number> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -147,7 +147,7 @@ <string>Album:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -155,7 +155,7 @@ <string>Genre:</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -163,7 +163,7 @@ <string>Track number:</string> </property> </widget> - <widget class="QSpinBox" row="4" column="1"> + <widget class="TQSpinBox" row="4" column="1"> <property name="name"> <cstring>m_exampleTrack</cstring> </property> @@ -171,7 +171,7 @@ <number>1</number> </property> </widget> - <widget class="QLineEdit" row="3" column="1"> + <widget class="TQLineEdit" row="3" column="1"> <property name="name"> <cstring>m_exampleGenre</cstring> </property> @@ -179,7 +179,7 @@ <string>Genre</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -267,16 +267,16 @@ <tabstop>m_exampleTrack</tabstop> <tabstop>m_exampleYear</tabstop> </tabstops> -<signals> +<Q_SIGNALS> <signal>dataChanged()</signal> <signal>fileChanged()</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot access="protected">exampleSelectionChanged()</slot> <slot access="protected">exampleDataChanged()</slot> <slot access="protected">exampleFileChanged()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/juk/filehandle.h b/juk/filehandle.h index bbfd6c67..12216bb2 100644 --- a/juk/filehandle.h +++ b/juk/filehandle.h @@ -36,7 +36,7 @@ class FileHandle public: FileHandle(); FileHandle(const FileHandle &f); - explicit FileHandle(const TQFileInfo &info, const TQString &path = TQString::null); + explicit FileHandle(const TQFileInfo &info, const TQString &path = TQString()); explicit FileHandle(const TQString &path); FileHandle(const TQString &path, CacheDataStream &s); ~FileHandle(); diff --git a/juk/filehandleproperties.h b/juk/filehandleproperties.h index 4fc31f92..a930ad87 100644 --- a/juk/filehandleproperties.h +++ b/juk/filehandleproperties.h @@ -61,7 +61,7 @@ namespace FileHandleProperties { virtual TQString value(const FileHandle &) const { - return TQString::null; + return TQString(); } }; @@ -75,7 +75,7 @@ namespace FileHandleProperties static TQString property(const FileHandle &file, const TQCString &key) { - return propertyMap.contains(key) ? propertyMap[key]->value(file) : TQString::null; + return propertyMap.tqcontains(key) ? propertyMap[key]->value(file) : TQString(); } static TQStringList properties() diff --git a/juk/filerenamer.cpp b/juk/filerenamer.cpp index c1acb2ce..2155d11c 100644 --- a/juk/filerenamer.cpp +++ b/juk/filerenamer.cpp @@ -60,8 +60,8 @@ class ConfirmationDialog : public KDialogBase { public: ConfirmationDialog(const TQMap<TQString, TQString> &files, - TQWidget *parent = 0, const char *name = 0) - : KDialogBase(parent, name, true, i18n("Warning"), Ok | Cancel) + TQWidget *tqparent = 0, const char *name = 0) + : KDialogBase(tqparent, name, true, i18n("Warning"), Ok | Cancel) { TQVBox *vbox = makeVBoxMainWidget(); TQHBox *hbox = new TQHBox(vbox); @@ -89,8 +89,8 @@ public: } lvHeight += lv->horizontalScrollBar()->height() + lv->header()->height(); - lv->setMinimumHeight(QMIN(lvHeight, 400)); - resize(QMIN(width(), 500), QMIN(minimumHeight(), 400)); + lv->setMinimumHeight(TQMIN(lvHeight, 400)); + resize(TQMIN(width(), 500), TQMIN(minimumHeight(), 400)); } }; @@ -140,7 +140,7 @@ ConfigCategoryReader::ConfigCategoryReader() : CategoryReaderInterface(), TQString ConfigCategoryReader::categoryValue(TagType type) const { if(!m_currentItem) - return TQString::null; + return TQString(); Tag *tag = m_currentItem->file().tag(); @@ -164,7 +164,7 @@ TQString ConfigCategoryReader::categoryValue(TagType type) const return tag->genre(); default: - return TQString::null; + return TQString(); } } @@ -224,15 +224,15 @@ bool ConfigCategoryReader::isDisabled(const CategoryID &category) const // Implementation of FileRenamerWidget // -FileRenamerWidget::FileRenamerWidget(TQWidget *parent) : - FileRenamerBase(parent), CategoryReaderInterface(), +FileRenamerWidget::FileRenamerWidget(TQWidget *tqparent) : + FileRenamerBase(tqparent), CategoryReaderInterface(), m_exampleFromFile(false) { TQLabel *temp = new TQLabel(0); m_exampleText->setPaletteBackgroundColor(temp->paletteBackgroundColor()); delete temp; - layout()->setMargin(0); // We'll be wrapped by KDialogBase + tqlayout()->setMargin(0); // We'll be wrapped by KDialogBase // This must be created before createTagRows() is called. @@ -348,23 +348,23 @@ unsigned FileRenamerWidget::addRowCategory(TagType category) row.downButton->setFlat(true); upMapper->connect(row.upButton, TQT_SIGNAL(clicked()), TQT_SLOT(map())); - upMapper->setMapping(row.upButton, id); + upMapper->setMapping(TQT_TQOBJECT(row.upButton), id); downMapper->connect(row.downButton, TQT_SIGNAL(clicked()), TQT_SLOT(map())); - downMapper->setMapping(row.downButton, id); + downMapper->setMapping(TQT_TQOBJECT(row.downButton), id); - TQString labelText = TQString("<b>%1</b>").arg(TagRenamerOptions::tagTypeText(category)); + TQString labelText = TQString("<b>%1</b>").tqarg(TagRenamerOptions::tagTypeText(category)); TQLabel *label = new TQLabel(labelText, frame); frame->setStretchFactor(label, 1); - label->setAlignment(AlignCenter); + label->tqsetAlignment(AlignCenter); TQVBox *options = new TQVBox(frame); row.enableButton = new KPushButton(i18n("Remove"), options); toggleMapper->connect(row.enableButton, TQT_SIGNAL(clicked()), TQT_SLOT(map())); - toggleMapper->setMapping(row.enableButton, id); + toggleMapper->setMapping(TQT_TQOBJECT(row.enableButton), id); row.optionsButton = new KPushButton(i18n("Options"), options); mapper->connect(row.optionsButton, TQT_SIGNAL(clicked()), TQT_SLOT(map())); - mapper->setMapping(row.optionsButton, id); + mapper->setMapping(TQT_TQOBJECT(row.optionsButton), id); row.widget->show(); m_rows.append(row); @@ -378,10 +378,10 @@ unsigned FileRenamerWidget::addRowCategory(TagType category) void FileRenamerWidget::moveSignalMappings(unsigned oldId, unsigned newId) { - mapper->setMapping(m_rows[oldId].optionsButton, newId); - downMapper->setMapping(m_rows[oldId].downButton, newId); - upMapper->setMapping(m_rows[oldId].upButton, newId); - toggleMapper->setMapping(m_rows[oldId].enableButton, newId); + mapper->setMapping(TQT_TQOBJECT(m_rows[oldId].optionsButton), newId); + downMapper->setMapping(TQT_TQOBJECT(m_rows[oldId].downButton), newId); + upMapper->setMapping(TQT_TQOBJECT(m_rows[oldId].upButton), newId); + toggleMapper->setMapping(TQT_TQOBJECT(m_rows[oldId].enableButton), newId); } bool FileRenamerWidget::removeRow(unsigned id) @@ -410,9 +410,9 @@ bool FileRenamerWidget::removeRow(unsigned id) if(m_rows[id].position > 0) checkboxPosition = m_rows[id].position - 1; - // The checkbox is contained within a layout widget, so the layout + // The checkbox is contained within a tqlayout widget, so the tqlayout // widget is the one the needs to die. - delete m_folderSwitches[checkboxPosition]->parent(); + delete m_folderSwitches[checkboxPosition]->tqparent(); m_folderSwitches.erase(&m_folderSwitches[checkboxPosition]); // Go through all the rows and if they have the same category and a @@ -480,10 +480,10 @@ void FileRenamerWidget::createTagRows() m_rows.reserve(categoryOrder.count()); m_folderSwitches.reserve(categoryOrder.count() - 1); - mapper = new TQSignalMapper(this, "signal mapper"); - toggleMapper = new TQSignalMapper(this, "toggle mapper"); - upMapper = new TQSignalMapper(this, "up button mapper"); - downMapper = new TQSignalMapper(this, "down button mapper"); + mapper = new TQSignalMapper(TQT_TQOBJECT(this), "signal mapper"); + toggleMapper = new TQSignalMapper(TQT_TQOBJECT(this), "toggle mapper"); + upMapper = new TQSignalMapper(TQT_TQOBJECT(this), "up button mapper"); + downMapper = new TQSignalMapper(TQT_TQOBJECT(this), "down button mapper"); connect(mapper, TQT_SIGNAL(mapped(int)), TQT_SLOT(showCategoryOption(int))); connect(toggleMapper, TQT_SIGNAL(mapped(int)), TQT_SLOT(slotRemoveRow(int))); @@ -578,7 +578,7 @@ TQString FileRenamerWidget::fileCategoryValue(TagType category) const return tag->genre(); default: - return TQString::null; + return TQString(); } } @@ -609,7 +609,7 @@ TQString FileRenamerWidget::categoryValue(TagType category) const return example->m_exampleGenre->text(); default: - return TQString::null; + return TQString(); } } @@ -675,17 +675,17 @@ void FileRenamerWidget::moveItem(unsigned id, MovementDirection direction) // Move the item two spaces above/below its previous position. It has to // be 2 spaces because of the checkbox. - TQBoxLayout *layout = dynamic_cast<TQBoxLayout *>(m_mainFrame->layout()); + TQBoxLayout *tqlayout = dynamic_cast<TQBoxLayout *>(m_mainFrame->tqlayout()); - layout->remove(l); - layout->insertWidget(2 * newPos, l); + tqlayout->remove(l); + tqlayout->insertWidget(2 * newPos, l); // Move the top item two spaces in the opposite direction, for a similar // reason. - layout->remove(w); - layout->insertWidget(2 * pos, w); - layout->invalidate(); + tqlayout->remove(w); + tqlayout->insertWidget(2 * pos, w); + tqlayout->tqinvalidate(); TQTimer::singleShot(0, this, TQT_SLOT(exampleTextChanged())); } @@ -778,7 +778,7 @@ void FileRenamerWidget::insertCategory() // Set its down button to be disabled. m_rows[id].downButton->setEnabled(false); - m_mainFrame->layout()->invalidate(); + m_mainFrame->tqlayout()->tqinvalidate(); m_mainView->update(); // Now update according to the code in loadConfig(). @@ -864,7 +864,7 @@ void FileRenamer::rename(const PlaylistItemList &items) if(itemMap.isEmpty() || ConfirmationDialog(map).exec() != TQDialog::Accepted) return; - KApplication::setOverrideCursor(Qt::waitCursor); + KApplication::setOverrideCursor(TQt::waitCursor); for(TQMap<TQString, TQString>::ConstIterator it = map.begin(); it != map.end(); ++it) { @@ -875,7 +875,7 @@ void FileRenamer::rename(const PlaylistItemList &items) setFolderIcon(it.data(), itemMap[it.key()]); } else - errorFiles << i18n("%1 to %2").arg(it.key()).arg(it.data()); + errorFiles << i18n("%1 to %2").tqarg(it.key()).tqarg(it.data()); processEvents(); } @@ -906,7 +906,7 @@ bool FileRenamer::moveFile(const TQString &src, const TQString &dest) // Get just the directory. KURL dir = dstURL; - dir.setFileName(TQString::null); + dir.setFileName(TQString()); // Create the directory. if(!KStandardDirs::exists(dir.path())) @@ -939,7 +939,7 @@ void FileRenamer::setFolderIcon(const KURL &dst, const PlaylistItem *item) path.append("/" + (*it)); kdDebug() << "Checking path: " << path << endl; - if((*it).find(item->file().tag()->album()) != -1 && + if((*it).tqfind(item->file().tag()->album()) != -1 && !TQFile::exists(path + "/.directory")) { // Seems to be a match, let's set the folder icon for the current @@ -952,7 +952,7 @@ void FileRenamer::setFolderIcon(const KURL &dst, const PlaylistItem *item) config.setGroup("Desktop Entry"); if(!config.hasKey("Icon")) { - config.writeEntry("Icon", TQString("%1/.juk-thumbnail.png").arg(path)); + config.writeEntry("Icon", TQString("%1/.juk-thumbnail.png").tqarg(path)); config.sync(); } @@ -1011,7 +1011,7 @@ TQString FileRenamer::fileName(const CategoryReaderInterface &interface) // The user can use the folder separator checkbox to add folders, so don't allow // slashes that slip in to accidentally create new folders. Should we filter this // back out when showing it in the GUI? - value.replace('/', "%2f"); + value.tqreplace('/', "%2f"); if(!pastLast && interface.hasFolderSeparator(i)) value.append(dirSeparator); diff --git a/juk/filerenamer.h b/juk/filerenamer.h index 0978a390..fe3a2a7c 100644 --- a/juk/filerenamer.h +++ b/juk/filerenamer.h @@ -61,7 +61,7 @@ struct Row /** * A list of rows, each of which may have its own category options and other * associated data. There is no relation between the order of rows in the vector and their - * GUI layout. Instead, each Row has a position member which indicates what GUI position it + * GUI tqlayout. Instead, each Row has a position member which indicates what GUI position it * takes up. The index into the vector is known as the row identifier (which is unique but * not necessarily constant). */ @@ -140,9 +140,10 @@ private: class FileRenamerWidget : public FileRenamerBase, public CategoryReaderInterface { Q_OBJECT + TQ_OBJECT public: - FileRenamerWidget(TQWidget *parent); + FileRenamerWidget(TQWidget *tqparent); ~FileRenamerWidget(); /// Maximum number of total categories the widget will allow. @@ -185,7 +186,7 @@ private: /** * This function adds a "Insert Folder separator" checkbox to the end of - * the current layout. The setting defaults to being unchecked. + * the current tqlayout. The setting defaults to being unchecked. */ void addFolderSeparatorCheckbox(); @@ -335,7 +336,7 @@ private: /** * This moves the widget \p l in the direction given by \p direction, taking * care to make sure that the checkboxes are not moved, and that they are - * enabled or disabled as appropriate for the new layout, and that the up and + * enabled or disabled as appropriate for the new tqlayout, and that the up and * down buttons are also adjusted as necessary. * * @param id the identifier of the row to move @@ -383,7 +384,7 @@ private: /** * This function returns the identifier of the row in the m_rows index that - * contains \p category and matches \p categoryNum. + * tqcontains \p category and matches \p categoryNum. * * @param category the category to find. * @return the identifier of the category, or MAX_CATEGORIES if it couldn't @@ -426,14 +427,14 @@ private slots: virtual void slotRemoveRow(int id); /** - * This function moves \p category up in the layout. + * This function moves \p category up in the tqlayout. * * @param id the unique id of the widget to move up. */ virtual void moveItemUp(int id); /** - * This function moves \p category down in the layout. + * This function moves \p category down in the tqlayout. * * @param id the unique id of the widget to move down. */ diff --git a/juk/filerenamerbase.ui b/juk/filerenamerbase.ui index 28370971..10a36f17 100644 --- a/juk/filerenamerbase.ui +++ b/juk/filerenamerbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>FileRenamerBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>FileRenamerBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -27,9 +27,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <grid> <property name="name"> @@ -58,7 +58,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_6</cstring> </property> @@ -66,15 +66,15 @@ <string>Music folder:</string> </property> </widget> - <widget class="QLayoutWidget" row="2" column="1"> + <widget class="TQLayoutWidget" row="2" column="1"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Album Tag</string> @@ -133,7 +133,7 @@ <number>26</number> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -144,7 +144,7 @@ <cstring>m_category</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_7</cstring> </property> @@ -168,7 +168,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QScrollView"> + <widget class="TQScrollView"> <property name="name"> <cstring>m_mainView</cstring> </property> @@ -195,7 +195,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -214,9 +214,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -232,7 +232,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -257,7 +257,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -266,7 +266,7 @@ </spacer> </hbox> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_exampleText</cstring> </property> @@ -295,7 +295,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> @@ -307,7 +307,7 @@ <customwidgets> <customwidget> <class>QScrollView</class> - <header location="global">qscrollview.h</header> + <header location="global">tqscrollview.h</header> <sizehint> <width>100</width> <height>30</height> @@ -330,13 +330,13 @@ <connections> <connection> <sender>m_separator</sender> - <signal>textChanged(const QString&)</signal> + <signal>textChanged(const TTQString&)</signal> <receiver>FileRenamerBase</receiver> <slot>exampleTextChanged()</slot> </connection> <connection> <sender>m_musicFolder</sender> - <signal>textChanged(const QString&)</signal> + <signal>textChanged(const TQString&)</signal> <receiver>FileRenamerBase</receiver> <slot>exampleTextChanged()</slot> </connection> @@ -360,12 +360,12 @@ <tabstop>m_insertCategory</tabstop> <tabstop>m_showExample</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot access="protected">exampleTextChanged()</slot> <slot access="protected">toggleExampleDialog()</slot> <slot access="protected">insertCategory()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>klineedit.h</includehint> @@ -373,7 +373,7 @@ <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> <includehint>kpushbutton.h</includehint> - <includehint>qscrollview.h</includehint> + <includehint>tqscrollview.h</includehint> <includehint>kpushbutton.h</includehint> </includehints> </UI> diff --git a/juk/filerenamerconfigdlg.cpp b/juk/filerenamerconfigdlg.cpp index 8a741d03..a1f43687 100644 --- a/juk/filerenamerconfigdlg.cpp +++ b/juk/filerenamerconfigdlg.cpp @@ -19,8 +19,8 @@ #include "filerenamer.h" #include "filerenamerconfigdlg.h" -FileRenamerConfigDlg::FileRenamerConfigDlg(TQWidget *parent) : - KDialogBase(parent, "file renamer dialog", true, +FileRenamerConfigDlg::FileRenamerConfigDlg(TQWidget *tqparent) : + KDialogBase(tqparent, "file renamer dialog", true, i18n("File Renamer Options"), Ok | Cancel), m_renamerWidget(new FileRenamerWidget(this)) { diff --git a/juk/filerenamerconfigdlg.h b/juk/filerenamerconfigdlg.h index 0c42ab54..fc953181 100644 --- a/juk/filerenamerconfigdlg.h +++ b/juk/filerenamerconfigdlg.h @@ -23,8 +23,9 @@ class FileRenamerWidget; class FileRenamerConfigDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - FileRenamerConfigDlg(TQWidget *parent); + FileRenamerConfigDlg(TQWidget *tqparent); protected slots: virtual void accept(); diff --git a/juk/filerenameroptions.cpp b/juk/filerenameroptions.cpp index d40fd81c..cc9ab7fa 100644 --- a/juk/filerenameroptions.cpp +++ b/juk/filerenameroptions.cpp @@ -25,32 +25,32 @@ #include "filerenameroptions.h" -FileRenamerTagOptions::FileRenamerTagOptions(TQWidget *parent, +FileRenamerTagOptions::FileRenamerTagOptions(TQWidget *tqparent, const TagRenamerOptions &options) : - FileRenamerTagOptionsBase(parent), m_options(options) + FileRenamerTagOptionsBase(tqparent), m_options(options) { - layout()->setSpacing(KDialog::spacingHint()); - layout()->setMargin(0); + tqlayout()->setSpacing(KDialog::spacingHint()); + tqlayout()->setMargin(0); - m_emptyTagGroup->layout()->setSpacing(KDialog::spacingHint()); - m_trackGroup->layout()->setSpacing(KDialog::spacingHint()); + m_emptyTagGroup->tqlayout()->setSpacing(KDialog::spacingHint()); + m_trackGroup->tqlayout()->setSpacing(KDialog::spacingHint()); m_emptyValueLayout->setSpacing(KDialog::spacingHint()); m_exampleLayout->setSpacing(KDialog::spacingHint()); m_spinLayout->setSpacing(KDialog::spacingHint()); m_widthLayout->setSpacing(KDialog::spacingHint()); m_tagLayout->setSpacing(KDialog::spacingHint()); - m_tagFormatGroup->layout()->setSpacing(KDialog::spacingHint()); + m_tagFormatGroup->tqlayout()->setSpacing(KDialog::spacingHint()); if(m_options.category() != Track) m_trackGroup->hide(); TQString tagText = m_options.tagTypeText(); - setCaption(caption().arg(tagText)); - m_tagFormatGroup->setTitle(m_tagFormatGroup->title().arg(tagText)); - m_emptyTagGroup->setTitle(m_emptyTagGroup->title().arg(tagText)); - m_description->setText(m_description->text().arg(tagText)); - m_tagLabel->setText(m_tagLabel->text().arg(tagText)); + setCaption(caption().tqarg(tagText)); + m_tagFormatGroup->setTitle(m_tagFormatGroup->title().tqarg(tagText)); + m_emptyTagGroup->setTitle(m_emptyTagGroup->title().tqarg(tagText)); + m_description->setText(m_description->text().tqarg(tagText)); + m_tagLabel->setText(m_tagLabel->text().tqarg(tagText)); m_prefixText->setText(options.prefix()); m_suffixText->setText(options.suffix()); @@ -115,10 +115,10 @@ void FileRenamerTagOptions::slotEmptyActionChanged() m_options.setEmptyAction(TagRenamerOptions::ForceEmptyInclude); } -TagOptionsDialog::TagOptionsDialog(TQWidget *parent, +TagOptionsDialog::TagOptionsDialog(TQWidget *tqparent, const TagRenamerOptions &options, unsigned categoryNumber) : - KDialogBase(parent, 0, true, i18n("File Renamer"), Ok | Cancel), + KDialogBase(tqparent, 0, true, i18n("File Renamer"), Ok | Cancel), m_options(options), m_categoryNumber(categoryNumber) { diff --git a/juk/filerenameroptions.h b/juk/filerenameroptions.h index 07408827..88248f65 100644 --- a/juk/filerenameroptions.h +++ b/juk/filerenameroptions.h @@ -28,9 +28,10 @@ class FileRenamerTagOptions : public FileRenamerTagOptionsBase { Q_OBJECT + TQ_OBJECT public: - FileRenamerTagOptions(TQWidget *parent, const TagRenamerOptions &options); + FileRenamerTagOptions(TQWidget *tqparent, const TagRenamerOptions &options); const TagRenamerOptions &options() const { return m_options; } @@ -51,9 +52,10 @@ class FileRenamerTagOptions : public FileRenamerTagOptionsBase class TagOptionsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - TagOptionsDialog(TQWidget *parent, const TagRenamerOptions &options, unsigned categoryNumber); + TagOptionsDialog(TQWidget *tqparent, const TagRenamerOptions &options, unsigned categoryNumber); const TagRenamerOptions &options() const { return m_options; } diff --git a/juk/filerenameroptionsbase.ui b/juk/filerenameroptionsbase.ui index 1e40ce60..be886990 100644 --- a/juk/filerenameroptionsbase.ui +++ b/juk/filerenameroptionsbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>FileRenamerTagOptionsBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>FileRenamerTagOptionsBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_tagFormatGroup</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_description</cstring> </property> @@ -40,11 +40,11 @@ <property name="textFormat"> <enum>RichText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignCenter</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>m_tagLayout</cstring> </property> @@ -65,22 +65,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_prefixText</cstring> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_tagLabel</cstring> </property> @@ -88,11 +88,11 @@ <string>%1</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_suffixText</cstring> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> </widget> @@ -106,7 +106,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -115,7 +115,7 @@ </spacer> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_substitution</cstring> </property> @@ -127,13 +127,13 @@ <property name="text"> <string>Substitution Example</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> </vbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_emptyTagGroup</cstring> </property> @@ -144,7 +144,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_includeEmptyButton</cstring> </property> @@ -152,7 +152,7 @@ <string>Include in the &filename anyways</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_ignoreTagButton</cstring> </property> @@ -163,7 +163,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>m_emptyValueLayout</cstring> </property> @@ -174,7 +174,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_useValueButton</cstring> </property> @@ -182,7 +182,7 @@ <string>Use &this value:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_emptyTagValue</cstring> </property> @@ -197,7 +197,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_trackGroup</cstring> </property> @@ -208,7 +208,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel10</cstring> </property> @@ -218,11 +218,11 @@ <property name="textFormat"> <enum>RichText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignCenter</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>m_widthLayout</cstring> </property> @@ -233,7 +233,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>m_spinLayout</cstring> </property> @@ -244,7 +244,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -271,7 +271,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>m_exampleLayout</cstring> </property> @@ -282,7 +282,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_doubleDigitExample</cstring> </property> @@ -295,7 +295,7 @@ <string>014</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_singleDigitExample</cstring> </property> @@ -308,25 +308,25 @@ <string>003</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_singleDigit</cstring> </property> <property name="text"> <string>3 -></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_doubleDigit</cstring> </property> <property name="text"> <string>14 -></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -346,7 +346,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> @@ -413,12 +413,12 @@ <slot>slotEmptyActionChanged()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">slotBracketsChanged()</slot> <slot access="protected">slotTrackWidthChanged()</slot> <slot access="protected">slotEmptyActionChanged()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> </includehints> diff --git a/juk/folderplaylist.h b/juk/folderplaylist.h index 4369a6fb..7e4557ff 100644 --- a/juk/folderplaylist.h +++ b/juk/folderplaylist.h @@ -20,10 +20,11 @@ class FolderPlaylist : public Playlist { Q_OBJECT + TQ_OBJECT public: - FolderPlaylist(PlaylistCollection *collection, const TQString &folder = TQString::null, - const TQString &name = TQString::null); + FolderPlaylist(PlaylistCollection *collection, const TQString &folder = TQString(), + const TQString &name = TQString()); virtual ~FolderPlaylist(); TQString folder() const; diff --git a/juk/gstreamerplayer.cpp b/juk/gstreamerplayer.cpp index 39f371a3..2c520128 100644 --- a/juk/gstreamerplayer.cpp +++ b/juk/gstreamerplayer.cpp @@ -107,18 +107,18 @@ bool GStreamerPlayer::paused() const int GStreamerPlayer::totalTime() const { - return time(GST_QUERY_TOTAL) / GST_SECOND; + return time(GST_TQUERY_TOTAL) / GST_SECOND; } int GStreamerPlayer::currentTime() const { - return time(GST_QUERY_POSITION) / GST_SECOND; + return time(GST_TQUERY_POSITION) / GST_SECOND; } int GStreamerPlayer::position() const { - long long total = time(GST_QUERY_TOTAL); - long long current = time(GST_QUERY_POSITION); + long long total = time(GST_TQUERY_TOTAL); + long long current = time(GST_TQUERY_POSITION); return total > 0 ? int((double(current) / double(total)) * double(1000) + 0.5) : 0; } @@ -130,7 +130,7 @@ void GStreamerPlayer::seek(int seekTime) void GStreamerPlayer::seekPosition(int position) { - long long total = time(GST_QUERY_TOTAL); + long long total = time(GST_TQUERY_TOTAL); if(total > 0) seek(int(double(position) / double(1000) * double(totalTime()) + 0.5)); } @@ -142,7 +142,7 @@ void GStreamerPlayer::seekPosition(int position) void GStreamerPlayer::readConfig() { KConfigGroup config(KGlobal::config(), "GStreamerPlayer"); - m_sinkName = config.readEntry("SinkName", TQString::null); + m_sinkName = config.readEntry("SinkName", TQString()); } void GStreamerPlayer::setupPipeline() diff --git a/juk/gstreamerplayer.h b/juk/gstreamerplayer.h index 6cc8ebfd..fe08c837 100644 --- a/juk/gstreamerplayer.h +++ b/juk/gstreamerplayer.h @@ -18,6 +18,10 @@ #include "config.h" +#ifdef Q_MOC_RUN +#define HAVE_GSTREAMER 1 +#endif // Q_MOC_RUN + #if HAVE_GSTREAMER #include <gst/gst.h> @@ -27,6 +31,7 @@ class GStreamerPlayer : public Player { Q_OBJECT + TQ_OBJECT public: GStreamerPlayer(); diff --git a/juk/historyplaylist.cpp b/juk/historyplaylist.cpp index 26758fd6..53aa927e 100644 --- a/juk/historyplaylist.cpp +++ b/juk/historyplaylist.cpp @@ -90,16 +90,16 @@ void HistoryPlaylist::slotCreateNewItem() // HistoryPlaylistItem public members //////////////////////////////////////////////////////////////////////////////// -HistoryPlaylistItem::HistoryPlaylistItem(CollectionListItem *item, Playlist *parent, TQListViewItem *after) : - PlaylistItem(item, parent, after), - m_dateTime(TQDateTime::currentDateTime()) +HistoryPlaylistItem::HistoryPlaylistItem(CollectionListItem *item, Playlist *tqparent, TQListViewItem *after) : + PlaylistItem(item, tqparent, after), + m_dateTime(TQDateTime::tqcurrentDateTime()) { setText(0, KGlobal::locale()->formatDateTime(m_dateTime)); } -HistoryPlaylistItem::HistoryPlaylistItem(CollectionListItem *item, Playlist *parent) : - PlaylistItem(item, parent), - m_dateTime(TQDateTime::currentDateTime()) +HistoryPlaylistItem::HistoryPlaylistItem(CollectionListItem *item, Playlist *tqparent) : + PlaylistItem(item, tqparent), + m_dateTime(TQDateTime::tqcurrentDateTime()) { setText(0, KGlobal::locale()->formatDateTime(m_dateTime)); } @@ -123,7 +123,7 @@ TQDataStream &operator<<(TQDataStream &s, const HistoryPlaylist &p) { PlaylistItemList l = const_cast<HistoryPlaylist *>(&p)->items(); - s << Q_INT32(l.count()); + s << TQ_INT32(l.count()); for(PlaylistItemList::ConstIterator it = l.begin(); it != l.end(); ++it) { const HistoryPlaylistItem *i = static_cast<HistoryPlaylistItem *>(*it); @@ -136,7 +136,7 @@ TQDataStream &operator<<(TQDataStream &s, const HistoryPlaylist &p) TQDataStream &operator>>(TQDataStream &s, HistoryPlaylist &p) { - Q_INT32 count; + TQ_INT32 count; s >> count; HistoryPlaylistItem *after = 0; diff --git a/juk/historyplaylist.h b/juk/historyplaylist.h index 5f2776d5..13cf5436 100644 --- a/juk/historyplaylist.h +++ b/juk/historyplaylist.h @@ -23,8 +23,8 @@ class HistoryPlaylistItem : public PlaylistItem { public: - HistoryPlaylistItem(CollectionListItem *item, Playlist *parent, TQListViewItem *after); - HistoryPlaylistItem(CollectionListItem *item, Playlist *parent); + HistoryPlaylistItem(CollectionListItem *item, Playlist *tqparent, TQListViewItem *after); + HistoryPlaylistItem(CollectionListItem *item, Playlist *tqparent); virtual ~HistoryPlaylistItem(); TQDateTime dateTime() const { return m_dateTime; } @@ -37,6 +37,7 @@ private: class HistoryPlaylist : public Playlist { Q_OBJECT + TQ_OBJECT public: HistoryPlaylist(PlaylistCollection *collection); diff --git a/juk/juk.cpp b/juk/juk.cpp index 35c08dff..47a94692 100644 --- a/juk/juk.cpp +++ b/juk/juk.cpp @@ -43,8 +43,8 @@ using namespace ActionCollection; // public members //////////////////////////////////////////////////////////////////////////////// -JuK::JuK(TQWidget *parent, const char *name) : - KMainWindow(parent, name, WDestructiveClose), +JuK::JuK(TQWidget *tqparent, const char *name) : + KMainWindow(tqparent, name, WDestructiveClose), m_player(PlayerManager::instance()), m_shuttingDown(false) { @@ -72,7 +72,7 @@ JuK::JuK(TQWidget *parent, const char *name) : SplashScreen::finishedLoading(); TQTimer::singleShot(0, CollectionList::instance(), TQT_SLOT(slotCheckCache())); - TQTimer::singleShot(0, this, TQT_SLOT(slotProcessArgs())); + TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(slotProcessArgs())); m_sliderAction->slotUpdateOrientation(); } @@ -112,52 +112,52 @@ void JuK::setupActions() { ActionCollection::actions()->setWidget(this); - KStdAction::quit(this, TQT_SLOT(slotQuit()), actions()); - KStdAction::undo(this, TQT_SLOT(slotUndo()), actions()); - KStdAction::cut(kapp, TQT_SLOT(cut()), actions()); - KStdAction::copy(kapp, TQT_SLOT(copy()), actions()); - KStdAction::paste(kapp, TQT_SLOT(paste()), actions()); - KStdAction::clear(kapp, TQT_SLOT(clear()), actions()); - KStdAction::selectAll(kapp, TQT_SLOT(selectAll()), actions()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), ActionCollection::actions()); + KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(slotUndo()), ActionCollection::actions()); + KStdAction::cut(TQT_TQOBJECT(kapp), TQT_SLOT(cut()), ActionCollection::actions()); + KStdAction::copy(TQT_TQOBJECT(kapp), TQT_SLOT(copy()), ActionCollection::actions()); + KStdAction::paste(TQT_TQOBJECT(kapp), TQT_SLOT(paste()), ActionCollection::actions()); + KStdAction::clear(TQT_TQOBJECT(kapp), TQT_SLOT(clear()), ActionCollection::actions()); + KStdAction::selectAll(TQT_TQOBJECT(kapp), TQT_SLOT(selectAll()), ActionCollection::actions()); - new KAction(i18n("Remove From Playlist"), "edit_remove", 0, kapp, TQT_SLOT(clear()), actions(), "removeFromPlaylist"); + new KAction(i18n("Remove From Playlist"), "edit_remove", 0, TQT_TQOBJECT(kapp), TQT_SLOT(clear()), ActionCollection::actions(), "removeFromPlaylist"); - KActionMenu *actionMenu = new KActionMenu(i18n("&Random Play"), "roll", actions(), "actionMenu"); + KActionMenu *actionMenu = new KActionMenu(i18n("&Random Play"), "roll", ActionCollection::actions(), "actionMenu"); actionMenu->setDelayed(false); - KRadioAction *ka = new KRadioAction(i18n("&Disable Random Play"), "player_playlist", 0, actions(), "disableRandomPlay"); + KRadioAction *ka = new KRadioAction(i18n("&Disable Random Play"), "player_playlist", 0, ActionCollection::actions(), "disableRandomPlay"); ka->setExclusiveGroup("randomPlayGroup"); actionMenu->insert(ka); - m_randomPlayAction = new KRadioAction(i18n("Use &Random Play"), "roll", 0, actions(), "randomPlay"); + m_randomPlayAction = new KRadioAction(i18n("Use &Random Play"), "roll", 0, ActionCollection::actions(), "randomPlay"); m_randomPlayAction->setExclusiveGroup("randomPlayGroup"); actionMenu->insert(m_randomPlayAction); - ka = new KRadioAction(i18n("Use &Album Random Play"), "roll", 0, actions(), "albumRandomPlay"); + ka = new KRadioAction(i18n("Use &Album Random Play"), "roll", 0, ActionCollection::actions(), "albumRandomPlay"); ka->setExclusiveGroup("randomPlayGroup"); connect(ka, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotCheckAlbumNextAction(bool))); actionMenu->insert(ka); - new KAction(i18n("&Play"), "player_play", 0, m_player, TQT_SLOT(play()), actions(), "play"); - new KAction(i18n("P&ause"), "player_pause", 0, m_player, TQT_SLOT(pause()), actions(), "pause"); - new KAction(i18n("&Stop"), "player_stop", 0, m_player, TQT_SLOT(stop()), actions(), "stop"); + new KAction(i18n("&Play"), "player_play", 0, TQT_TQOBJECT(m_player), TQT_SLOT(play()), ActionCollection::actions(), "play"); + new KAction(i18n("P&ause"), "player_pause", 0, TQT_TQOBJECT(m_player), TQT_SLOT(pause()), ActionCollection::actions(), "pause"); + new KAction(i18n("&Stop"), "player_stop", 0, TQT_TQOBJECT(m_player), TQT_SLOT(stop()), ActionCollection::actions(), "stop"); - new KToolBarPopupAction(i18n("previous track", "Previous"), "player_start", KShortcut(), m_player, TQT_SLOT(back()), actions(), "back"); - new KAction(i18n("next track", "&Next"), "player_end", KShortcut(), m_player, TQT_SLOT(forward()), actions(), "forward"); - new KToggleAction(i18n("&Loop Playlist"), 0, KShortcut(), actions(), "loopPlaylist"); + new KToolBarPopupAction(i18n("previous track", "Previous"), "player_start", KShortcut(), TQT_TQOBJECT(m_player), TQT_SLOT(back()), ActionCollection::actions(), "back"); + new KAction(i18n("next track", "&Next"), "player_end", KShortcut(), TQT_TQOBJECT(m_player), TQT_SLOT(forward()), ActionCollection::actions(), "forward"); + new KToggleAction(i18n("&Loop Playlist"), 0, KShortcut(), ActionCollection::actions(), "loopPlaylist"); KToggleAction *resizeColumnAction = new KToggleAction(i18n("&Resize Playlist Columns Manually"), - KShortcut(), actions(), "resizeColumnsManually"); + KShortcut(), ActionCollection::actions(), "resizeColumnsManually"); resizeColumnAction->setCheckedState(i18n("&Resize Column Headers Automatically")); // the following are not visible by default - new KAction(i18n("Mute"), "mute", 0, m_player, TQT_SLOT(mute()), actions(), "mute"); - new KAction(i18n("Volume Up"), "volumeUp", 0, m_player, TQT_SLOT(volumeUp()), actions(), "volumeUp"); - new KAction(i18n("Volume Down"), "volumeDown", 0, m_player, TQT_SLOT(volumeDown()), actions(), "volumeDown"); - new KAction(i18n("Play / Pause"), "playPause", 0, m_player, TQT_SLOT(playPause()), actions(), "playPause"); - new KAction(i18n("Seek Forward"), "seekForward", 0, m_player, TQT_SLOT(seekForward()), actions(), "seekForward"); - new KAction(i18n("Seek Back"), "seekBack", 0, m_player, TQT_SLOT(seekBack()), actions(), "seekBack"); + new KAction(i18n("Mute"), "mute", 0, TQT_TQOBJECT(m_player), TQT_SLOT(mute()), ActionCollection::actions(), "mute"); + new KAction(i18n("Volume Up"), "volumeUp", 0, TQT_TQOBJECT(m_player), TQT_SLOT(volumeUp()), ActionCollection::actions(), "volumeUp"); + new KAction(i18n("Volume Down"), "volumeDown", 0, TQT_TQOBJECT(m_player), TQT_SLOT(volumeDown()), ActionCollection::actions(), "volumeDown"); + new KAction(i18n("Play / Pause"), "playPause", 0, TQT_TQOBJECT(m_player), TQT_SLOT(playPause()), ActionCollection::actions(), "playPause"); + new KAction(i18n("Seek Forward"), "seekForward", 0, TQT_TQOBJECT(m_player), TQT_SLOT(seekForward()), ActionCollection::actions(), "seekForward"); + new KAction(i18n("Seek Back"), "seekBack", 0, TQT_TQOBJECT(m_player), TQT_SLOT(seekBack()), ActionCollection::actions(), "seekBack"); ////////////////////////////////////////////////// // settings menu @@ -165,42 +165,42 @@ void JuK::setupActions() m_toggleSplashAction = new KToggleAction(i18n("Show Splash Screen on Startup"), - KShortcut(), actions(), "showSplashScreen"); + KShortcut(), ActionCollection::actions(), "showSplashScreen"); m_toggleSplashAction->setCheckedState(i18n("Hide Splash Screen on Startup")); m_toggleSystemTrayAction = new KToggleAction(i18n("&Dock in System Tray"), - KShortcut(), actions(), "toggleSystemTray"); + KShortcut(), ActionCollection::actions(), "toggleSystemTray"); m_toggleDockOnCloseAction = new KToggleAction(i18n("&Stay in System Tray on Close"), - KShortcut(), actions(), "dockOnClose"); + KShortcut(), ActionCollection::actions(), "dockOnClose"); m_togglePopupsAction = new KToggleAction(i18n("Popup &Track Announcement"), - KShortcut(), this, 0, actions(), "togglePopups"); + KShortcut(), TQT_TQOBJECT(this), 0, ActionCollection::actions(), "togglePopups"); new KToggleAction(i18n("Save &Play Queue on Exit"), - KShortcut(), this, 0, actions(), "saveUpcomingTracks"); + KShortcut(), TQT_TQOBJECT(this), 0, ActionCollection::actions(), "saveUpcomingTracks"); connect(m_toggleSystemTrayAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggleSystemTray(bool))); - m_outputSelectAction = PlayerManager::playerSelectAction(actions()); + m_outputSelectAction = PlayerManager::playerSelectAction(ActionCollection::actions()); if(m_outputSelectAction) m_outputSelectAction->setCurrentItem(0); - new KAction(i18n("&Tag Guesser..."), 0, 0, this, TQT_SLOT(slotConfigureTagGuesser()), - actions(), "tagGuesserConfig"); + new KAction(i18n("&Tag Guesser..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotConfigureTagGuesser()), + ActionCollection::actions(), "tagGuesserConfig"); - new KAction(i18n("&File Renamer..."), 0, 0, this, TQT_SLOT(slotConfigureFileRenamer()), - actions(), "fileRenamerConfig"); + new KAction(i18n("&File Renamer..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotConfigureFileRenamer()), + ActionCollection::actions(), "fileRenamerConfig"); - KStdAction::keyBindings(this, TQT_SLOT(slotEditKeys()), actions()); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotEditKeys()), ActionCollection::actions()); ////////////////////////////////////////////////// // just in the toolbar ////////////////////////////////////////////////// - m_sliderAction = new SliderAction(i18n("Track Position"), actions(), + m_sliderAction = new SliderAction(i18n("Track Position"), ActionCollection::actions(), "trackPositionAction"); } @@ -213,7 +213,7 @@ void JuK::setupSystemTray() m_toggleDockOnCloseAction->setEnabled(true); m_togglePopupsAction->setEnabled(true); - connect(m_systemTray, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(slotAboutToQuit())); + connect(m_systemTray, TQT_SIGNAL(quitSelected()), TQT_TQOBJECT(this), TQT_SLOT(slotAboutToQuit())); } else { m_systemTray = 0; @@ -224,7 +224,7 @@ void JuK::setupSystemTray() void JuK::setupGlobalAccels() { - m_accel = new KGlobalAccel(this); + m_accel = new KGlobalAccel(TQT_TQOBJECT(this)); KeyDialog::insert(m_accel, "Play", i18n("Play"), action("play"), TQT_SLOT(activate())); KeyDialog::insert(m_accel, "PlayPause", i18n("Play / Pause"), action("playPause"), TQT_SLOT(activate())); @@ -236,7 +236,7 @@ void JuK::setupGlobalAccels() KeyDialog::insert(m_accel, "VolumeUp", i18n("Volume Up"), action("volumeUp"), TQT_SLOT(activate())); KeyDialog::insert(m_accel, "VolumeDown", i18n("Volume Down"), action("volumeDown"), TQT_SLOT(activate())); KeyDialog::insert(m_accel, "Mute", i18n("Mute"), action("mute"), TQT_SLOT(activate())); - KeyDialog::insert(m_accel, "ShowHide", i18n("Show / Hide"), this, TQT_SLOT(slotShowHide())); + KeyDialog::insert(m_accel, "ShowHide", i18n("Show / Hide"), TQT_TQOBJECT(this), TQT_SLOT(slotShowHide())); KeyDialog::insert(m_accel, "ForwardAlbum", i18n("Play Next Album"), action("forwardAlbum"), TQT_SLOT(activate())); m_accel->setConfigGroup("Shortcuts"); @@ -267,7 +267,7 @@ void JuK::createDirs() void JuK::keyPressEvent(TQKeyEvent *e) { - if (e->key() >= Qt::Key_Back && e->key() <= Qt::Key_MediaLast) + if (e->key() >= TQt::Key_Back && e->key() <= TQt::Key_MediaLast) e->accept(); KMainWindow::keyPressEvent(e); } @@ -446,7 +446,7 @@ void JuK::slotToggleSystemTray(bool enabled) void JuK::slotEditKeys() { - KeyDialog::configure(m_accel, actions(), this); + KeyDialog::configure(m_accel, ActionCollection::actions(), this); } void JuK::slotConfigureTagGuesser() @@ -37,9 +37,10 @@ class PlaylistSplitter; class JuK : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - JuK(TQWidget* parent = 0, const char *name = 0); + JuK(TQWidget* tqparent = 0, const char *name = 0); virtual ~JuK(); virtual KActionCollection *actionCollection() const; diff --git a/juk/k3bexporter.cpp b/juk/k3bexporter.cpp index d19021e6..a4e4a7c6 100644 --- a/juk/k3bexporter.cpp +++ b/juk/k3bexporter.cpp @@ -86,7 +86,7 @@ class PlaylistAction : public KAction return; // Invoke the slot using some trickery. - // XXX: Use the TQMetaObject to do this in Qt 4. + // XXX: Use the TQMetaObject to do this in TQt 4. connect(this, TQT_SIGNAL(activated()), recipient, m_slot); emit(activated()); disconnect(this, TQT_SIGNAL(activated()), recipient, m_slot); @@ -97,7 +97,7 @@ class PlaylistAction : public KAction PlaylistRecipientMap m_playlistRecipient; }; -K3bExporter::K3bExporter(Playlist *parent) : PlaylistExporter(parent), m_parent(parent) +K3bExporter::K3bExporter(Playlist *tqparent) : PlaylistExporter(tqparent), m_parent(tqparent) { } @@ -263,8 +263,8 @@ K3bExporter::K3bOpenMode K3bExporter::openMode() return Abort; } -K3bPlaylistExporter::K3bPlaylistExporter(PlaylistBox *parent) : K3bExporter(0), - m_playlistBox(parent) +K3bPlaylistExporter::K3bPlaylistExporter(PlaylistBox *tqparent) : K3bExporter(0), + m_playlistBox(tqparent) { } diff --git a/juk/k3bexporter.h b/juk/k3bexporter.h index 0c414107..fa49dc88 100644 --- a/juk/k3bexporter.h +++ b/juk/k3bexporter.h @@ -30,9 +30,10 @@ class PlaylistAction; class K3bExporter : public PlaylistExporter { Q_OBJECT + TQ_OBJECT public: - K3bExporter(Playlist *parent = 0); + K3bExporter(Playlist *tqparent = 0); /** * Returns a KAction that can be used to invoke the export. @@ -77,8 +78,9 @@ private: class K3bPlaylistExporter : public K3bExporter { Q_OBJECT + TQ_OBJECT public: - K3bPlaylistExporter(PlaylistBox *parent = 0); + K3bPlaylistExporter(PlaylistBox *tqparent = 0); virtual KAction *action(); diff --git a/juk/keydialog.cpp b/juk/keydialog.cpp index c8d24a5a..46455c37 100644 --- a/juk/keydialog.cpp +++ b/juk/keydialog.cpp @@ -28,44 +28,44 @@ const KeyDialog::KeyInfo KeyDialog::keyInfo[] = { { "PlayPause", { { KShortcut::null(), KShortcut::null() }, - { Qt::CTRL+Qt::ALT+Qt::Key_P, KKey::QtWIN+Qt::ALT+Qt::Key_P }, - { Qt::Key_MediaPlay, Qt::Key_MediaPlay } } }, + { TQt::CTRL+TQt::ALT+TQt::Key_P, KKey::QtWIN+TQt::ALT+TQt::Key_P }, + { TQt::Key_MediaPlay, TQt::Key_MediaPlay } } }, { "Stop", { { KShortcut::null(), KShortcut::null() }, - { Qt::CTRL+Qt::ALT+Qt::Key_S, KKey::QtWIN+Qt::ALT+Qt::Key_S }, - { Qt::Key_MediaStop, Qt::Key_MediaStop } } }, + { TQt::CTRL+TQt::ALT+TQt::Key_S, KKey::QtWIN+TQt::ALT+TQt::Key_S }, + { TQt::Key_MediaStop, TQt::Key_MediaStop } } }, { "Back", { { KShortcut::null(), KShortcut::null() }, - { Qt::CTRL+Qt::ALT+Qt::Key_Left, KKey::QtWIN+Qt::ALT+Qt::Key_Left }, - { Qt::Key_MediaPrev, Qt::Key_MediaPrev } } }, + { TQt::CTRL+TQt::ALT+TQt::Key_Left, KKey::QtWIN+TQt::ALT+TQt::Key_Left }, + { TQt::Key_MediaPrev, TQt::Key_MediaPrev } } }, { "Forward", { { KShortcut::null(), KShortcut::null() }, - { Qt::CTRL+Qt::ALT+Qt::Key_Right, KKey::QtWIN+Qt::ALT+Qt::Key_Right }, - { Qt::Key_MediaNext, Qt::Key_MediaNext } } }, + { TQt::CTRL+TQt::ALT+TQt::Key_Right, KKey::QtWIN+TQt::ALT+TQt::Key_Right }, + { TQt::Key_MediaNext, TQt::Key_MediaNext } } }, { "ForwardAlbum", { { KShortcut::null(), KShortcut::null() }, - { Qt::CTRL+Qt::ALT+Qt::Key_Up, KKey::QtWIN+Qt::ALT+Qt::Key_Up }, - { Qt::CTRL+Qt::Key_MediaNext, Qt::CTRL+Qt::Key_MediaNext } } }, + { TQt::CTRL+TQt::ALT+TQt::Key_Up, KKey::QtWIN+TQt::ALT+TQt::Key_Up }, + { TQt::CTRL+TQt::Key_MediaNext, TQt::CTRL+TQt::Key_MediaNext } } }, { "SeekBack", { { KShortcut::null(), KShortcut::null() }, - { Qt::CTRL+Qt::SHIFT+Qt::ALT+Qt::Key_Left, KKey::QtWIN+Qt::SHIFT+Qt::ALT+Qt::Key_Left }, - { Qt::SHIFT+Qt::Key_MediaPrev, Qt::SHIFT+Qt::Key_MediaPrev } } }, + { TQt::CTRL+TQt::SHIFT+TQt::ALT+TQt::Key_Left, KKey::QtWIN+TQt::SHIFT+TQt::ALT+TQt::Key_Left }, + { TQt::SHIFT+TQt::Key_MediaPrev, TQt::SHIFT+TQt::Key_MediaPrev } } }, { "SeekForward", { { KShortcut::null(), KShortcut::null() }, - { Qt::CTRL+Qt::SHIFT+Qt::ALT+Qt::Key_Right, KKey::QtWIN+Qt::SHIFT+Qt::ALT+Qt::Key_Right }, - { Qt::SHIFT+Qt::Key_MediaNext, Qt::SHIFT+Qt::Key_MediaNext } } }, + { TQt::CTRL+TQt::SHIFT+TQt::ALT+TQt::Key_Right, KKey::QtWIN+TQt::SHIFT+TQt::ALT+TQt::Key_Right }, + { TQt::SHIFT+TQt::Key_MediaNext, TQt::SHIFT+TQt::Key_MediaNext } } }, { "VolumeUp", { { KShortcut::null(), KShortcut::null() }, - { Qt::CTRL+Qt::ALT+Qt::SHIFT+Qt::Key_Up, KKey::QtWIN+Qt::ALT+Qt::SHIFT+Qt::Key_Up }, - { Qt::Key_VolumeUp, Qt::Key_VolumeUp } } }, + { TQt::CTRL+TQt::ALT+TQt::SHIFT+TQt::Key_Up, KKey::QtWIN+TQt::ALT+TQt::SHIFT+TQt::Key_Up }, + { TQt::Key_VolumeUp, TQt::Key_VolumeUp } } }, { "VolumeDown", { { KShortcut::null(), KShortcut::null() }, - { Qt::CTRL+Qt::ALT+Qt::SHIFT+Qt::Key_Down, KKey::QtWIN+Qt::ALT+Qt::SHIFT+Qt::Key_Down }, - { Qt::Key_VolumeDown, Qt::Key_VolumeDown } } }, + { TQt::CTRL+TQt::ALT+TQt::SHIFT+TQt::Key_Down, KKey::QtWIN+TQt::ALT+TQt::SHIFT+TQt::Key_Down }, + { TQt::Key_VolumeDown, TQt::Key_VolumeDown } } }, { "Mute", { { KShortcut::null(), KShortcut::null() }, - { Qt::CTRL+Qt::ALT+Qt::Key_M, KKey::QtWIN+Qt::ALT+Qt::Key_M }, - { Qt::Key_VolumeMute, Qt::Key_VolumeMute } } }, + { TQt::CTRL+TQt::ALT+TQt::Key_M, KKey::QtWIN+TQt::ALT+TQt::Key_M }, + { TQt::Key_VolumeMute, TQt::Key_VolumeMute } } }, { "ShowHide", { { KShortcut::null(), KShortcut::null() }, { KShortcut::null(), KShortcut::null() }, @@ -75,8 +75,8 @@ const KeyDialog::KeyInfo KeyDialog::keyInfo[] = { const uint KeyDialog::keyInfoCount = sizeof(KeyDialog::keyInfo) / sizeof(KeyDialog::keyInfo[0]); KeyDialog::KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection, - TQWidget *parent, const char *name) - : KDialogBase(parent, name, true, i18n("Configure Shortcuts"), Default | Ok | Cancel, Ok) + TQWidget *tqparent, const char *name) + : KDialogBase(tqparent, name, true, i18n("Configure Shortcuts"), Default | Ok | Cancel, Ok) { // Read key group from configuration @@ -172,11 +172,11 @@ void KeyDialog::slotDefault() } int KeyDialog::configure(KGlobalAccel *keys, KActionCollection *actionCollection, - TQWidget *parent) + TQWidget *tqparent) { // Create and show dialog - update connections if accepted - int retcode = KeyDialog(keys, actionCollection, parent).configure(); + int retcode = KeyDialog(keys, actionCollection, tqparent).configure(); if(retcode == Accepted) keys->updateConnections(); @@ -198,7 +198,7 @@ void KeyDialog::insert(KGlobalAccel *keys, const TQString &action, const TQStrin break; } } - keys->insert(action, label, TQString::null, def3, def4, objSlot, methodSlot); + keys->insert(action, label, TQString(), def3, def4, objSlot, methodSlot); } #include "keydialog.moc" diff --git a/juk/keydialog.h b/juk/keydialog.h index 13801ee1..83c14d9d 100644 --- a/juk/keydialog.h +++ b/juk/keydialog.h @@ -26,12 +26,13 @@ class KeyDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** - * Constructs a KeyDialog called @p name as a child of @p parent. + * Constructs a KeyDialog called @p name as a child of @p tqparent. */ - KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection, TQWidget *parent = 0, const char* name = 0); + KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection, TQWidget *tqparent = 0, const char* name = 0); /** * Destructor. Deletes all resources used by a KeyDialog object. @@ -43,7 +44,7 @@ public: * accelerators and actions. It behaves essentially like the functions * in KKeyDialog. */ - static int configure(KGlobalAccel *keys, KActionCollection *actionCollection, TQWidget *parent = 0); + static int configure(KGlobalAccel *keys, KActionCollection *actionCollection, TQWidget *tqparent = 0); /** * This is a member function, provided to create a global accelerator with diff --git a/juk/ktrm.cpp b/juk/ktrm.cpp index cb45c685..72519b96 100644 --- a/juk/ktrm.cpp +++ b/juk/ktrm.cpp @@ -43,7 +43,7 @@ class KTRMLookup; extern "C" { #if HAVE_MUSICBRAINZ >= 4 - static void TRMNotifyCallback(tunepimp_t pimp, void *data, TPCallbackEnum type, int fileId, TPFileStatus status); + static void TRMNotifyCallback(tunepimp_t pimp, void *data, TPCallbackEnum type, int fileId, TPFiletqStatus status); #else static void TRMNotifyCallback(tunepimp_t pimp, void *data, TPCallbackEnum type, int fileId); #endif @@ -69,7 +69,7 @@ public: { int id; - if(!m_fileMap.contains(lookup->file())) { + if(!m_fileMap.tqcontains(lookup->file())) { #if HAVE_MUSICBRAINZ >= 4 id = tp_AddFile(m_pimp, TQFile::encodeName(lookup->file()), 0); #else @@ -95,9 +95,9 @@ public: bool lookupMapContains(int fileId) const { m_lookupMapMutex.lock(); - bool contains = m_lookupMap.contains(fileId); + bool tqcontains = m_lookupMap.tqcontains(fileId); m_lookupMapMutex.unlock(); - return contains; + return tqcontains; } KTRMLookup *lookup(int fileId) const @@ -202,17 +202,17 @@ private: * A custom event type used for signalling that a TRM lookup is finished. */ -class KTRMEvent : public QCustomEvent +class KTRMEvent : public TQCustomEvent { public: - enum Status { + enum tqStatus { Recognized, Unrecognized, Collision, Error }; - KTRMEvent(int fileId, Status status) : + KTRMEvent(int fileId, tqStatus status) : TQCustomEvent(id), m_fileId(fileId), m_status(status) {} @@ -222,7 +222,7 @@ public: return m_fileId; } - Status status() const + tqStatus status() const { return m_status; } @@ -231,7 +231,7 @@ public: private: int m_fileId; - Status m_status; + tqStatus m_status; }; /** @@ -239,10 +239,10 @@ private: * thread) for the lookup. */ -class KTRMEventHandler : public QObject +class KTRMEventHandler : public TQObject { public: - static void send(int fileId, KTRMEvent::Status status) + static void send(int fileId, KTRMEvent::tqStatus status) { KApplication::postEvent(instance(), new KTRMEvent(fileId, status)); } @@ -303,7 +303,7 @@ protected: * Callback fuction for TunePimp lookup events. */ #if HAVE_MUSICBRAINZ >= 4 -static void TRMNotifyCallback(tunepimp_t /*pimp*/, void* /*data*/, TPCallbackEnum type, int fileId, TPFileStatus status) +static void TRMNotifyCallback(tunepimp_t /*pimp*/, void* /*data*/, TPCallbackEnum type, int fileId, TPFiletqStatus status) #else static void TRMNotifyCallback(tunepimp_t pimp, void *data, TPCallbackEnum type, int fileId) #endif @@ -313,7 +313,7 @@ static void TRMNotifyCallback(tunepimp_t pimp, void *data, TPCallbackEnum type, #if HAVE_MUSICBRAINZ < 4 track_t track = tp_GetTrack(pimp, fileId); - TPFileStatus status = tr_GetStatus(track); + TPFiletqStatus status = tr_GettqStatus(track); #endif switch(status) { @@ -496,7 +496,7 @@ void KTRMLookup::unrecognized() tr_Lock(track); tr_GetTRM(track, trm, 255); if ( !trm[0] ) { - tr_SetStatus(track, ePending); + tr_SettqStatus(track, ePending); tp_Wake(KTRMRequestHandler::instance()->tunePimp(), track); } else diff --git a/juk/mediafiles.cpp b/juk/mediafiles.cpp index 3752ec06..7a0eb6a2 100644 --- a/juk/mediafiles.cpp +++ b/juk/mediafiles.cpp @@ -45,9 +45,9 @@ namespace MediaFiles { static const char playlistExtension[] = ".m3u"; } -TQStringList MediaFiles::openDialog(TQWidget *parent) +TQStringList MediaFiles::openDialog(TQWidget *tqparent) { - KFileDialog dialog(TQString::null, TQString::null, parent, "filedialog", true); + KFileDialog dialog(TQString(), TQString(), tqparent, "filedialog", true); dialog.setOperationMode(KFileDialog::Opening); dialog.setCaption(i18n("Open")); @@ -60,11 +60,11 @@ TQStringList MediaFiles::openDialog(TQWidget *parent) return convertURLsToLocal(dialog.selectedFiles()); } -TQString MediaFiles::savePlaylistDialog(const TQString &playlistName, TQWidget *parent) +TQString MediaFiles::savePlaylistDialog(const TQString &playlistName, TQWidget *tqparent) { TQString fileName = KFileDialog::getSaveFileName(playlistName + playlistExtension, TQString("*").append(playlistExtension), - parent, + tqparent, i18n("Playlists")); if(!fileName.isEmpty() && !fileName.endsWith(playlistExtension)) fileName.append(playlistExtension); diff --git a/juk/mediafiles.h b/juk/mediafiles.h index 342739e7..ea6a4345 100644 --- a/juk/mediafiles.h +++ b/juk/mediafiles.h @@ -24,15 +24,15 @@ namespace MediaFiles { /** - * Creates a JuK specific KFileDialog with the specified parent. + * Creates a JuK specific KFileDialog with the specified tqparent. */ - TQStringList openDialog(TQWidget *parent = 0); + TQStringList openDialog(TQWidget *tqparent = 0); /** * Creates a JuK specific KFileDialog for saving a playlist with the name - * playlistName and the specified parent and returns the file name. + * playlistName and the specified tqparent and returns the file name. */ - TQString savePlaylistDialog(const TQString &playlistName, TQWidget *parent = 0); + TQString savePlaylistDialog(const TQString &playlistName, TQWidget *tqparent = 0); /** * Returns true if fileName is a supported media file. diff --git a/juk/musicbrainzquery.cpp b/juk/musicbrainzquery.cpp index 577e240f..6a6eb45e 100644 --- a/juk/musicbrainzquery.cpp +++ b/juk/musicbrainzquery.cpp @@ -68,7 +68,7 @@ void MusicBrainzLookup::error() void MusicBrainzLookup::message(const TQString &s) const { KMainWindow *w = static_cast<KMainWindow *>(kapp->mainWidget()); - w->statusBar()->message(TQString("%1 (%2)").arg(s).arg(m_file.fileInfo().fileName()), 3000); + w->statusBar()->message(TQString("%1 (%2)").tqarg(s).tqarg(m_file.fileInfo().fileName()), 3000); } void MusicBrainzLookup::confirmation() @@ -76,20 +76,20 @@ void MusicBrainzLookup::confirmation() // Here we do a bit of queuing to make sure that we don't pop up multiple // instances of the confirmation dialog at once. - static TQValueList< QPair<FileHandle, KTRMResultList> > queue; + static TQValueList< TQPair<FileHandle, KTRMResultList> > queue; if(results().isEmpty()) return; if(!queue.isEmpty()) { - queue.append(qMakePair(m_file, results())); + queue.append(tqMakePair(m_file, results())); return; } - queue.append(qMakePair(m_file, results())); + queue.append(tqMakePair(m_file, results())); while(!queue.isEmpty()) { - QPair<FileHandle, KTRMResultList> item = queue.first(); + TQPair<FileHandle, KTRMResultList> item = queue.first(); FileHandle file = item.first; KTRMResultList results = item.second; TrackPickerDialog dialog(file.fileInfo().fileName(), results); diff --git a/juk/musicbrainzquery.h b/juk/musicbrainzquery.h index d88b166f..195006e0 100644 --- a/juk/musicbrainzquery.h +++ b/juk/musicbrainzquery.h @@ -13,8 +13,8 @@ * * ***************************************************************************/ -#ifndef MUSICBRAINZQUERY_H -#define MUSICBRAINZQUERY_H +#ifndef MUSICBRAINZTQUERY_H +#define MUSICBRAINZTQUERY_H #include <config.h> diff --git a/juk/nowplaying.cpp b/juk/nowplaying.cpp index 4256ecff..ebf03b94 100644 --- a/juk/nowplaying.cpp +++ b/juk/nowplaying.cpp @@ -39,17 +39,17 @@ static const int imageSize = 64; -struct Line : public QFrame +struct Line : public TQFrame { - Line(TQWidget *parent) : TQFrame(parent) { setFrameShape(VLine); } + Line(TQWidget *tqparent) : TQFrame(tqparent) { setFrameShape(VLine); } }; //////////////////////////////////////////////////////////////////////////////// // NowPlaying //////////////////////////////////////////////////////////////////////////////// -NowPlaying::NowPlaying(TQWidget *parent, PlaylistCollection *collection, const char *name) : - TQHBox(parent, name), +NowPlaying::NowPlaying(TQWidget *tqparent, PlaylistCollection *collection, const char *name) : + TQHBox(tqparent, name), m_observer(this, collection), m_collection(collection) { @@ -58,9 +58,9 @@ NowPlaying::NowPlaying(TQWidget *parent, PlaylistCollection *collection, const c CollectionList::instance()->addObserver(&m_observer); - layout()->setMargin(5); - layout()->setSpacing(3); - setFixedHeight(imageSize + 2 + layout()->margin() * 2); + tqlayout()->setMargin(5); + tqlayout()->setSpacing(3); + setFixedHeight(imageSize + 2 + tqlayout()->margin() * 2); setStretchFactor(new CoverItem(this), 0); setStretchFactor(new TrackItem(this), 2); @@ -105,11 +105,11 @@ void NowPlaying::slotUpdate() // CoverItem //////////////////////////////////////////////////////////////////////////////// -CoverItem::CoverItem(NowPlaying *parent) : - TQLabel(parent, "CoverItem"), - NowPlayingItem(parent) +CoverItem::CoverItem(NowPlaying *tqparent) : + TQLabel(tqparent, "CoverItem"), + NowPlayingItem(tqparent) { - setFixedHeight(parent->height() - parent->layout()->margin() * 2); + setFixedHeight(tqparent->height() - tqparent->tqlayout()->margin() * 2); setFrameStyle(Box | Plain); setLineWidth(1); setMargin(1); @@ -123,7 +123,7 @@ void CoverItem::update(const FileHandle &file) if(file.coverInfo()->hasCover()) { show(); TQImage image = file.coverInfo()->pixmap(CoverInfo::Thumbnail).convertToImage(); - setPixmap(image.smoothScale(imageSize, imageSize, TQImage::ScaleMin)); + setPixmap(image.smoothScale(imageSize, imageSize, TQ_ScaleMin)); } else hide(); @@ -138,7 +138,7 @@ void CoverItem::mouseReleaseEvent(TQMouseEvent *event) if(event->x() >= 0 && event->y() >= 0 && event->x() < width() && event->y() < height() && - event->button() == LeftButton && + event->button() == Qt::LeftButton && m_file.coverInfo()->hasCover()) { m_file.coverInfo()->popup(); @@ -159,7 +159,7 @@ void CoverItem::mouseMoveEvent(TQMouseEvent *e) return; TQPoint diff = m_dragStart - e->globalPos(); - if(QABS(diff.x()) > 1 || QABS(diff.y()) > 1) { + if(TQABS(diff.x()) > 1 || TQABS(diff.y()) > 1) { // Start a drag. @@ -214,21 +214,21 @@ void CoverItem::dropEvent(TQDropEvent *e) // TrackItem //////////////////////////////////////////////////////////////////////////////// -TrackItem::TrackItem(NowPlaying *parent) : - TQWidget(parent, "TrackItem"), - NowPlayingItem(parent) +TrackItem::TrackItem(NowPlaying *tqparent) : + TQWidget(tqparent, "TrackItem"), + NowPlayingItem(tqparent) { - setFixedHeight(parent->height() - parent->layout()->margin() * 2); - setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); + setFixedHeight(tqparent->height() - tqparent->tqlayout()->margin() * 2); + tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); - TQVBoxLayout *layout = new TQVBoxLayout(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); m_label = new LinkLabel(this); m_label->setLinkUnderline(false); - layout->addStretch(); - layout->addWidget(m_label); - layout->addStretch(); + tqlayout->addStretch(); + tqlayout->addWidget(m_label); + tqlayout->addStretch(); connect(m_label, TQT_SIGNAL(linkClicked(const TQString &)), this, TQT_SLOT(slotOpenLink(const TQString &))); @@ -242,7 +242,7 @@ void TrackItem::update(const FileHandle &file) void TrackItem::slotOpenLink(const TQString &link) { - PlaylistCollection *collection = NowPlayingItem::parent()->collection(); + PlaylistCollection *collection = NowPlayingItem::tqparent()->collection(); if(link == "artist") collection->showMore(m_file.tag()->artist()); @@ -259,7 +259,7 @@ void TrackItem::slotUpdate() TQString title = TQStyleSheet::escape(m_file.tag()->title()); TQString artist = TQStyleSheet::escape(m_file.tag()->artist()); TQString album = TQStyleSheet::escape(m_file.tag()->album()); - TQString separator = (artist.isNull() || album.isNull()) ? TQString::null : TQString(" - "); + TQString separator = (artist.isNull() || album.isNull()) ? TQString() : TQString(" - "); // This block-o-nastiness makes the font smaller and smaller until it actually fits. @@ -269,32 +269,32 @@ void TrackItem::slotUpdate() "<br />" "<font size=\"+%3\"><b><a href=\"artist\">%4</a>%5<a href=\"album\">%6</a></b>"; - if(NowPlayingItem::parent()->collection()->showMoreActive()) - format.append(TQString(" (<a href=\"clear\">%1</a>)").arg(i18n("back to playlist"))); + if(NowPlayingItem::tqparent()->collection()->showMoreActive()) + format.append(TQString(" (<a href=\"clear\">%1</a>)").tqarg(i18n("back to playlist"))); format.append("</font>"); do { - m_label->setText(format.arg(size).arg(title).arg(size - 2) - .arg(artist).arg(separator).arg(album)); + m_label->setText(format.tqarg(size).tqarg(title).tqarg(size - 2) + .tqarg(artist).tqarg(separator).tqarg(album)); --size; } while(m_label->heightForWidth(m_label->width()) > imageSize && size >= 0); - m_label->setFixedHeight(QMIN(imageSize, m_label->heightForWidth(m_label->width()))); + m_label->setFixedHeight(TQMIN(imageSize, m_label->heightForWidth(m_label->width()))); } //////////////////////////////////////////////////////////////////////////////// // HistoryItem //////////////////////////////////////////////////////////////////////////////// -HistoryItem::HistoryItem(NowPlaying *parent) : - LinkLabel(parent, "HistoryItem"), - NowPlayingItem(parent) +HistoryItem::HistoryItem(NowPlaying *tqparent) : + LinkLabel(tqparent, "HistoryItem"), + NowPlayingItem(tqparent) { - setFixedHeight(parent->height() - parent->layout()->margin() * 2); - setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); + setFixedHeight(tqparent->height() - tqparent->tqlayout()->margin() * 2); + tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); setLinkUnderline(false); - setText(TQString("<b>%1</b>").arg(i18n("History"))); + setText(TQString("<b>%1</b>").tqarg(i18n("History"))); m_timer = new TQTimer(this); connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAddPlaying())); @@ -309,14 +309,14 @@ void HistoryItem::update(const FileHandle &file) m_history.remove(m_history.fromLast()); TQString format = "<br /><a href=\"%1\"><font size=\"-1\">%2</font></a>"; - TQString current = TQString("<b>%1</b>").arg(i18n("History")); + TQString current = TQString("<b>%1</b>").tqarg(i18n("History")); TQString previous; for(TQValueList<Item>::ConstIterator it = m_history.begin(); it != m_history.end(); ++it) { previous = current; - current.append(format.arg((*it).anchor).arg(TQStyleSheet::escape((*it).file.tag()->title()))); + current.append(format.tqarg((*it).anchor).tqarg(TQStyleSheet::escape((*it).file.tag()->title()))); setText(current); if(heightForWidth(width()) > imageSize) { setText(previous); @@ -342,7 +342,7 @@ void HistoryItem::openLink(const TQString &link) (*it).playlist->clearSelection(); (*it).playlist->setSelected(item, true); (*it).playlist->ensureItemVisible(item); - NowPlayingItem::parent()->collection()->raise((*it).playlist); + NowPlayingItem::tqparent()->collection()->raise((*it).playlist); } break; } diff --git a/juk/nowplaying.h b/juk/nowplaying.h index 0a60c278..bacc6582 100644 --- a/juk/nowplaying.h +++ b/juk/nowplaying.h @@ -37,12 +37,13 @@ class Playlist; * when the playing item changes. */ -class NowPlaying : public QHBox +class NowPlaying : public TQHBox { Q_OBJECT + TQ_OBJECT public: - NowPlaying(TQWidget *parent, PlaylistCollection *collection, + NowPlaying(TQWidget *tqparent, PlaylistCollection *collection, const char *name = 0); void addItem(NowPlayingItem *item); PlaylistCollection *collection() const; @@ -53,9 +54,9 @@ private slots: private: struct Observer : public PlaylistObserver { - Observer(NowPlaying *parent, PlaylistInterface *playlist) : + Observer(NowPlaying *tqparent, PlaylistInterface *playlist) : PlaylistObserver(playlist), - m_parent(parent) {} + m_parent(tqparent) {} virtual void updateCurrent() {} virtual void updateData() { m_parent->slotUpdate(); } NowPlaying *m_parent; @@ -75,9 +76,9 @@ class NowPlayingItem { public: virtual void update(const FileHandle &file) = 0; - NowPlaying *parent() const { return m_parent; } + NowPlaying *tqparent() const { return m_parent; } protected: - NowPlayingItem(NowPlaying *parent) : m_parent(parent) { parent->addItem(this); } + NowPlayingItem(NowPlaying *tqparent) : m_parent(tqparent) { tqparent->addItem(this); } private: NowPlaying *m_parent; }; @@ -90,7 +91,7 @@ private: class CoverItem : public TQLabel, public NowPlayingItem { public: - CoverItem(NowPlaying *parent); + CoverItem(NowPlaying *tqparent); virtual void update(const FileHandle &file); virtual void mouseReleaseEvent(TQMouseEvent *event); @@ -114,7 +115,7 @@ private: class LinkLabel : public KActiveLabel { public: - LinkLabel(TQWidget *parent, const char *name = 0) : KActiveLabel(parent, name) {} + LinkLabel(TQWidget *tqparent, const char *name = 0) : KActiveLabel(tqparent, name) {} virtual void openLink(const TQString &) {} }; @@ -126,9 +127,10 @@ public: class TrackItem : public TQWidget, public NowPlayingItem { Q_OBJECT + TQ_OBJECT public: - TrackItem(NowPlaying *parent); + TrackItem(NowPlaying *tqparent); virtual void update(const FileHandle &file); private slots: @@ -147,9 +149,10 @@ private: class HistoryItem : public LinkLabel, public NowPlayingItem { Q_OBJECT + TQ_OBJECT public: - HistoryItem(NowPlaying *parent); + HistoryItem(NowPlaying *tqparent); virtual void update(const FileHandle &file); virtual void openLink(const TQString &link); diff --git a/juk/player.h b/juk/player.h index 600e3db6..69910aaa 100644 --- a/juk/player.h +++ b/juk/player.h @@ -20,7 +20,7 @@ #include "filehandle.h" -class Player : public QObject +class Player : public TQObject { public: virtual ~Player() {} diff --git a/juk/playermanager.cpp b/juk/playermanager.cpp index 19647278..d62c84c4 100644 --- a/juk/playermanager.cpp +++ b/juk/playermanager.cpp @@ -46,7 +46,7 @@ using namespace ActionCollection; -enum PlayerManagerStatus { StatusStopped = -1, StatusPaused = 1, StatusPlaying = 2 }; +enum PlayerManagertqStatus { StatusStopped = -1, StatusPaused = 1, StatusPlaying = 2 }; //////////////////////////////////////////////////////////////////////////////// // helper functions @@ -194,7 +194,7 @@ TQStringList PlayerManager::trackProperties() TQString PlayerManager::trackProperty(const TQString &property) const { if(!playing() && !paused()) - return TQString::null; + return TQString(); return m_file.property(property); } @@ -220,7 +220,7 @@ FileHandle PlayerManager::playingFile() const TQString PlayerManager::playingString() const { if(!playing()) - return TQString::null; + return TQString(); TQString str = m_file.tag()->artist() + " - " + m_file.tag()->title(); if(m_file.tag()->artist().isEmpty()) @@ -239,10 +239,10 @@ void PlayerManager::setStatusLabel(StatusLabel *label) m_statusLabel = label; } -KSelectAction *PlayerManager::playerSelectAction(TQObject *parent) // static +KSelectAction *PlayerManager::playerSelectAction(TQObject *tqparent) // static { KSelectAction *action = 0; - action = new KSelectAction(i18n("&Output To"), 0, parent, "outputSelect"); + action = new KSelectAction(i18n("&Output To"), 0, tqparent, "outputSelect"); TQStringList l; #if HAVE_ARTS diff --git a/juk/playermanager.h b/juk/playermanager.h index c23c0752..3b384762 100644 --- a/juk/playermanager.h +++ b/juk/playermanager.h @@ -33,6 +33,7 @@ class PlaylistInterface; class PlayerManager : public Player, public PlayerIface { Q_OBJECT + TQ_OBJECT protected: PlayerManager(); @@ -61,7 +62,7 @@ public: TQString randomPlayMode() const; - static KSelectAction *playerSelectAction(TQObject *parent); + static KSelectAction *playerSelectAction(TQObject *tqparent); public slots: diff --git a/juk/playlist.cpp b/juk/playlist.cpp index fb218881..51cb5095 100644 --- a/juk/playlist.cpp +++ b/juk/playlist.cpp @@ -80,11 +80,11 @@ static bool manualResize() * A tooltip specialized to show full filenames over the file name column. */ -class PlaylistToolTip : public QToolTip +class PlaylistToolTip : public TQToolTip { public: - PlaylistToolTip(TQWidget *parent, Playlist *playlist) : - TQToolTip(parent), m_playlist(playlist) {} + PlaylistToolTip(TQWidget *tqparent, Playlist *playlist) : + TQToolTip(tqparent), m_playlist(playlist) {} virtual void maybeTip(const TQPoint &p) { @@ -102,7 +102,7 @@ public: (column == m_playlist->columnOffset() + PlaylistItem::CoverColumn && item->file().coverInfo()->hasCover())) { - TQRect r = m_playlist->itemRect(item); + TQRect r = m_playlist->tqitemRect(item); int headerPosition = m_playlist->header()->sectionPos(column); r.setLeft(headerPosition); r.setRight(headerPosition + m_playlist->header()->sectionSize(column)); @@ -312,7 +312,7 @@ Playlist::Playlist(PlaylistCollection *collection, const TQString &name, const TQString &iconName) : KListView(collection->playlistStack(), name.latin1()), m_collection(collection), - m_fetcher(new WebImageFetcher(this)), + m_fetcher(new WebImageFetcher(TQT_TQOBJECT(this))), m_selectedCount(0), m_allowDuplicates(false), m_polished(false), @@ -336,7 +336,7 @@ Playlist::Playlist(PlaylistCollection *collection, const PlaylistItemList &items const TQString &name, const TQString &iconName) : KListView(collection->playlistStack(), name.latin1()), m_collection(collection), - m_fetcher(new WebImageFetcher(this)), + m_fetcher(new WebImageFetcher(TQT_TQOBJECT(this))), m_selectedCount(0), m_allowDuplicates(false), m_polished(false), @@ -361,7 +361,7 @@ Playlist::Playlist(PlaylistCollection *collection, const TQFileInfo &playlistFil const TQString &iconName) : KListView(collection->playlistStack()), m_collection(collection), - m_fetcher(new WebImageFetcher(this)), + m_fetcher(new WebImageFetcher(TQT_TQOBJECT(this))), m_selectedCount(0), m_allowDuplicates(false), m_polished(false), @@ -385,7 +385,7 @@ Playlist::Playlist(PlaylistCollection *collection, const TQFileInfo &playlistFil Playlist::Playlist(PlaylistCollection *collection, bool delaySetup) : KListView(collection->playlistStack()), m_collection(collection), - m_fetcher(new WebImageFetcher(this)), + m_fetcher(new WebImageFetcher(TQT_TQOBJECT(this))), m_selectedCount(0), m_allowDuplicates(false), m_polished(false), @@ -543,7 +543,7 @@ void Playlist::save() TQFile file(m_fileName); if(!file.open(IO_WriteOnly)) - return KMessageBox::error(this, i18n("Could not save to file %1.").arg(m_fileName)); + return KMessageBox::error(this, i18n("Could not save to file %1.").tqarg(m_fileName)); TQTextStream stream(&file); @@ -727,12 +727,12 @@ void Playlist::synchronizePlayingItems(const PlaylistList &sources, bool setMast void Playlist::copy() { - kapp->clipboard()->setData(dragObject(0), QClipboard::Clipboard); + kapp->tqclipboard()->setData(dragObject(0), TQClipboard::Clipboard); } void Playlist::paste() { - decode(kapp->clipboard()->data(), static_cast<PlaylistItem *>(currentItem())); + decode(kapp->tqclipboard()->data(), static_cast<PlaylistItem *>(currentItem())); } void Playlist::clear() @@ -750,7 +750,7 @@ void Playlist::slotRefresh() if(l.isEmpty()) l = visibleItems(); - KApplication::setOverrideCursor(Qt::waitCursor); + KApplication::setOverrideCursor(TQt::waitCursor); for(PlaylistItemList::Iterator it = l.begin(); it != l.end(); ++it) { (*it)->refreshFromDisk(); @@ -800,7 +800,7 @@ void Playlist::slotRemoveCover() return; int button = KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to delete these covers?"), - TQString::null, + TQString(), i18n("&Delete Covers")); if(button == KMessageBox::Continue) refreshAlbums(items); @@ -877,7 +877,7 @@ void Playlist::slotCoverChanged(int coverId) void Playlist::slotGuessTagInfo(TagGuesser::Type type) { - KApplication::setOverrideCursor(Qt::waitCursor); + KApplication::setOverrideCursor(TQt::waitCursor); PlaylistItemList items = selectedItems(); setDynamicListsFrozen(true); @@ -922,7 +922,7 @@ void Playlist::slotWeightDirty(int column) return; } - if(m_weightDirty.find(column) == m_weightDirty.end()) + if(m_weightDirty.tqfind(column) == m_weightDirty.end()) m_weightDirty.append(column); } @@ -1015,7 +1015,7 @@ void Playlist::removeFromDisk(const PlaylistItemList &items) } } -TQDragObject *Playlist::dragObject(TQWidget *parent) +TQDragObject *Playlist::dragObject(TQWidget *tqparent) { PlaylistItemList items = selectedItems(); KURL::List urls; @@ -1025,7 +1025,7 @@ TQDragObject *Playlist::dragObject(TQWidget *parent) urls.append(url); } - KURLDrag *drag = new KURLDrag(urls, parent, "Playlist Items"); + KURLDrag *drag = new KURLDrag(urls, tqparent, "Playlist Items"); drag->setPixmap(BarIcon("sound")); return drag; @@ -1110,11 +1110,11 @@ void Playlist::decode(TQMimeSource *s, PlaylistItem *item) bool Playlist::eventFilter(TQObject *watched, TQEvent *e) { - if(watched == header()) { + if(TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(header())) { switch(e->type()) { case TQEvent::MouseMove: { - if((static_cast<TQMouseEvent *>(e)->state() & LeftButton) == LeftButton && + if((TQT_TQMOUSEEVENT(e)->state() & Qt::LeftButton) == Qt::LeftButton && !action<KToggleAction>("resizeColumnsManually")->isChecked()) { m_columnWidthModeChanged = true; @@ -1127,7 +1127,7 @@ bool Playlist::eventFilter(TQObject *watched, TQEvent *e) } case TQEvent::MouseButtonPress: { - if(static_cast<TQMouseEvent *>(e)->button() == RightButton) + if(TQT_TQMOUSEEVENT(e)->button() == Qt::RightButton) m_headerMenu->popup(TQCursor::pos()); break; @@ -1161,7 +1161,7 @@ void Playlist::keyPressEvent(TQKeyEvent *event) TQListViewItemIterator visible(this, TQListViewItemIterator::IteratorFlag( TQListViewItemIterator::Visible)); if(selected.current() == visible.current()) - KApplication::postEvent(parent(), new FocusUpEvent); + KApplication::postEvent(tqparent(), new FocusUpEvent); } } @@ -1247,7 +1247,7 @@ void Playlist::contentsMouseDoubleClickEvent(TQMouseEvent *e) // Filter out non left button double clicks, that way users don't have the // weird experience of switching songs from a double right-click. - if(e->button() == LeftButton) + if(e->button() == Qt::LeftButton) KListView::contentsMouseDoubleClickEvent(e); } @@ -1353,7 +1353,7 @@ void Playlist::addFiles(const TQStringList &files, PlaylistItem *after) if(!after) after = static_cast<PlaylistItem *>(lastItem()); - KApplication::setOverrideCursor(Qt::waitCursor); + KApplication::setOverrideCursor(TQt::waitCursor); m_blockDataChanged = true; @@ -1375,22 +1375,22 @@ void Playlist::addFiles(const TQStringList &files, PlaylistItem *after) void Playlist::refreshAlbums(const PlaylistItemList &items, coverKey id) { - TQValueList< QPair<TQString, TQString> > albums; + TQValueList< TQPair<TQString, TQString> > albums; bool setAlbumCovers = items.count() == 1; for(PlaylistItemList::ConstIterator it = items.begin(); it != items.end(); ++it) { TQString artist = (*it)->file().tag()->artist(); TQString album = (*it)->file().tag()->album(); - if(albums.find(qMakePair(artist, album)) == albums.end()) - albums.append(qMakePair(artist, album)); + if(albums.tqfind(tqMakePair(artist, album)) == albums.end()) + albums.append(tqMakePair(artist, album)); (*it)->file().coverInfo()->setCoverId(id); if(setAlbumCovers) (*it)->file().coverInfo()->applyCoverToWholeAlbum(true); } - for(TQValueList< QPair<TQString, TQString> >::ConstIterator it = albums.begin(); + for(TQValueList< TQPair<TQString, TQString> >::ConstIterator it = albums.begin(); it != albums.end(); ++it) { refreshAlbum((*it).first, (*it).second); @@ -1545,7 +1545,7 @@ void Playlist::polish() // setup header RMB menu ////////////////////////////////////////////////// - m_columnVisibleAction = new KActionMenu(i18n("&Show Columns"), this, "showColumns"); + m_columnVisibleAction = new KActionMenu(i18n("&Show Columns"), TQT_TQOBJECT(this), "showColumns"); m_headerMenu = m_columnVisibleAction->popupMenu(); m_headerMenu->insertTitle(i18n("Show")); @@ -1636,7 +1636,7 @@ void Playlist::slotPopulateBackMenu() const void Playlist::slotPlayFromBackMenu(int number) const { - if(!m_backMenuItems.contains(number)) + if(!m_backMenuItems.tqcontains(number)) return; TrackSequenceManager::instance()->setNextItem(m_backMenuItems[number]); @@ -1947,7 +1947,7 @@ void Playlist::slotUpdateColumnWidths() minimumWidth[column] = header()->fontMetrics().width(header()->label(column)) + 10; minimumWidthTotal += minimumWidth[column]; - minimumFixedWidth[column] = QMAX(minimumWidth[column], m_columnFixedWidths[column]); + minimumFixedWidth[column] = TQMAX(minimumWidth[column], m_columnFixedWidths[column]); minimumFixedWidthTotal += minimumFixedWidth[column]; } @@ -2127,7 +2127,7 @@ void Playlist::slotShowRMBMenu(TQListViewItem *item, const TQPoint &point, int c if(showEdit) m_rmbMenu->changeItem(m_rmbEditID, - i18n("Edit '%1'").arg(columnText(column + columnOffset()))); + i18n("Edit '%1'").tqarg(columnText(column + columnOffset()))); m_rmbMenu->setItemVisible(m_rmbEditID, showEdit); @@ -2239,7 +2239,7 @@ void Playlist::slotInlineEditDone(TQListViewItem *, const TQString &, int column (l.count() > 1 && KMessageBox::warningContinueCancel( 0, i18n("This will edit multiple files. Are you sure?"), - TQString::null, + TQString(), i18n("Edit"), "DontWarnMultipleTags") == KMessageBox::Cancel)) { diff --git a/juk/playlist.h b/juk/playlist.h index aa1e1d84..d9273834 100644 --- a/juk/playlist.h +++ b/juk/playlist.h @@ -46,13 +46,14 @@ typedef TQValueList<PlaylistItem *> PlaylistItemList; class Playlist : public KListView, public PlaylistInterface { Q_OBJECT + TQ_OBJECT public: - Playlist(PlaylistCollection *collection, const TQString &name = TQString::null, + Playlist(PlaylistCollection *collection, const TQString &name = TQString(), const TQString &iconName = "midi"); Playlist(PlaylistCollection *collection, const PlaylistItemList &items, - const TQString &name = TQString::null, const TQString &iconName = "midi"); + const TQString &name = TQString(), const TQString &iconName = "midi"); Playlist(PlaylistCollection *collection, const TQFileInfo &playlistFile, const TQString &iconName = "midi"); @@ -192,7 +193,7 @@ public: /** * Returns the file name associated with this playlist (an m3u file) or - * TQString::null if no such file exists. + * TQString() if no such file exists. */ TQString fileName() const { return m_fileName; } @@ -419,7 +420,7 @@ protected: virtual bool eventFilter(TQObject *watched, TQEvent *e); virtual void keyPressEvent(TQKeyEvent *e); - virtual TQDragObject *dragObject(TQWidget *parent); + virtual TQDragObject *dragObject(TQWidget *tqparent); virtual TQDragObject *dragObject() { return dragObject(this); } virtual bool canDecode(TQMimeSource *s); virtual void decode(TQMimeSource *s, PlaylistItem *item = 0); @@ -434,7 +435,7 @@ protected: virtual void insertItem(TQListViewItem *item); virtual void takeItem(TQListViewItem *item); - virtual bool hasItem(const TQString &file) const { return m_members.contains(file); } + virtual bool hasItem(const TQString &file) const { return m_members.tqcontains(file); } void addColumn(const TQString &label); @@ -456,7 +457,7 @@ protected: void setupItem(PlaylistItem *item); /** - * Forwards the call to the parent to enable or disable automatic deletion + * Forwards the call to the tqparent to enable or disable automatic deletion * of tree view playlists. Used by CollectionListItem. */ void setDynamicListsFrozen(bool frozen); @@ -711,7 +712,7 @@ private: bool processEvents(); -class FocusUpEvent : public QCustomEvent +class FocusUpEvent : public TQCustomEvent { public: FocusUpEvent() : TQCustomEvent(id) {} diff --git a/juk/playlistbox.cpp b/juk/playlistbox.cpp index 32e874b9..a0d8b5c8 100644 --- a/juk/playlistbox.cpp +++ b/juk/playlistbox.cpp @@ -46,9 +46,9 @@ using namespace ActionCollection; // PlaylistBox public methods //////////////////////////////////////////////////////////////////////////////// -PlaylistBox::PlaylistBox(TQWidget *parent, TQWidgetStack *playlistStack, +PlaylistBox::PlaylistBox(TQWidget *tqparent, TQWidgetStack *playlistStack, const char *name) : - KListView(parent, name), + KListView(tqparent, name), PlaylistCollection(playlistStack), m_viewModeIndex(0), m_hasSelection(false), @@ -91,7 +91,7 @@ PlaylistBox::PlaylistBox(TQWidget *parent, TQWidgetStack *playlistStack, // add the view modes stuff KSelectAction *viewModeAction = - new KSelectAction(i18n("View Modes"), "view_choose", KShortcut(), actions(), "viewModeMenu"); + new KSelectAction(i18n("View Modes"), "view_choose", KShortcut(), ActionCollection::actions(), "viewModeMenu"); m_viewModes.append(new ViewMode(this)); m_viewModes.append(new CompactViewMode(this)); @@ -171,7 +171,7 @@ void PlaylistBox::raise(Playlist *playlist) if(!playlist) return; - Item *i = m_playlistDict.find(playlist); + Item *i = m_playlistDict.tqfind(playlist); if(i) { clearSelection(); @@ -208,7 +208,7 @@ void PlaylistBox::duplicate() void PlaylistBox::paste() { Item *i = static_cast<Item *>(currentItem()); - decode(kapp->clipboard()->data(), i); + decode(kapp->tqclipboard()->data(), i); } //////////////////////////////////////////////////////////////////////////////// @@ -230,15 +230,15 @@ void PlaylistBox::setupPlaylist(Playlist *playlist, const TQString &iconName) setupPlaylist(playlist, iconName, 0); } -void PlaylistBox::setupPlaylist(Playlist *playlist, const TQString &iconName, Item *parentItem) +void PlaylistBox::setupPlaylist(Playlist *playlist, const TQString &iconName, Item *tqparentItem) { connect(playlist, TQT_SIGNAL(signalPlaylistItemsDropped(Playlist *)), TQT_SLOT(slotPlaylistItemsDropped(Playlist *))); PlaylistCollection::setupPlaylist(playlist, iconName); - if(parentItem) - new Item(parentItem, iconName, playlist->name(), playlist); + if(tqparentItem) + new Item(tqparentItem, iconName, playlist->name(), playlist); else new Item(this, iconName, playlist->name(), playlist); } @@ -289,7 +289,7 @@ void PlaylistBox::remove() if(!files.isEmpty()) { int remove = KMessageBox::warningYesNoCancelList( - this, i18n("Do you want to delete these files from the disk as well?"), files, TQString::null, KStdGuiItem::del(), i18n("Keep")); + this, i18n("Do you want to delete these files from the disk as well?"), files, TQString(), KStdGuiItem::del(), i18n("Keep")); if(remove == KMessageBox::Yes) { TQStringList couldNotDelete; @@ -445,7 +445,7 @@ void PlaylistBox::contentsDropEvent(TQDropEvent *e) if(m_dropItem) { Item *old = m_dropItem; m_dropItem = 0; - old->repaint(); + old->tqrepaint(); } } @@ -493,14 +493,14 @@ void PlaylistBox::contentsDragMoveEvent(TQDragMoveEvent *e) if(e->isAccepted()) { m_dropItem = target; - target->repaint(); + target->tqrepaint(); m_showTimer->start(1500, true); } else m_dropItem = 0; if(old) - old->repaint(); + old->tqrepaint(); } } else { @@ -517,21 +517,21 @@ void PlaylistBox::contentsDragLeaveEvent(TQDragLeaveEvent *e) if(m_dropItem) { Item *old = m_dropItem; m_dropItem = 0; - old->repaint(); + old->tqrepaint(); } KListView::contentsDragLeaveEvent(e); } void PlaylistBox::contentsMousePressEvent(TQMouseEvent *e) { - if(e->button() == LeftButton) + if(e->button() == Qt::LeftButton) m_doingMultiSelect = true; KListView::contentsMousePressEvent(e); } void PlaylistBox::contentsMouseReleaseEvent(TQMouseEvent *e) { - if(e->button() == LeftButton) { + if(e->button() == Qt::LeftButton) { m_doingMultiSelect = false; slotPlaylistChanged(); } @@ -692,8 +692,8 @@ PlaylistBox::Item::Item(PlaylistBox *listBox, const TQString &icon, const TQStri init(); } -PlaylistBox::Item::Item(Item *parent, const TQString &icon, const TQString &text, Playlist *l) - : TQObject(parent->listView()), KListViewItem(parent, text), +PlaylistBox::Item::Item(Item *tqparent, const TQString &icon, const TQString &text, Playlist *l) + : TQObject(tqparent->listView()), KListViewItem(tqparent, text), m_playlist(l), m_text(text), m_iconName(icon), m_sortedFirst(false) { init(); @@ -722,10 +722,10 @@ int PlaylistBox::Item::compare(TQListViewItem *i, int col, bool) const return text(col).lower().localeAwareCompare(i->text(col).lower()); } -void PlaylistBox::Item::paintCell(TQPainter *painter, const TQColorGroup &colorGroup, int column, int width, int align) +void PlaylistBox::Item::paintCell(TQPainter *painter, const TQColorGroup &tqcolorGroup, int column, int width, int align) { PlaylistBox *playlistBox = static_cast<PlaylistBox *>(listView()); - playlistBox->viewMode()->paintCell(this, painter, colorGroup, column, width, align); + playlistBox->viewMode()->paintCell(this, painter, tqcolorGroup, column, width, align); } void PlaylistBox::Item::setText(int column, const TQString &text) diff --git a/juk/playlistbox.h b/juk/playlistbox.h index 482f4771..cc8159a2 100644 --- a/juk/playlistbox.h +++ b/juk/playlistbox.h @@ -41,6 +41,7 @@ typedef TQValueList<Playlist *> PlaylistList; class PlaylistBox : public KListView, public PlaylistCollection { Q_OBJECT + TQ_OBJECT public: class Item; @@ -48,7 +49,7 @@ public: friend class Item; - PlaylistBox(TQWidget *parent, TQWidgetStack *playlistStack, + PlaylistBox(TQWidget *tqparent, TQWidgetStack *playlistStack, const char *name = 0); virtual ~PlaylistBox(); @@ -65,7 +66,7 @@ public: Item *dropItem() const { return m_dropItem; } - void setupPlaylist(Playlist *playlist, const TQString &iconName, Item *parentItem = 0); + void setupPlaylist(Playlist *playlist, const TQString &iconName, Item *tqparentItem = 0); public slots: void paste(); @@ -141,8 +142,9 @@ class PlaylistBox::Item : public TQObject, public KListViewItem friend class TreeViewMode; Q_OBJECT + TQ_OBJECT - // moc won't let me create private TQObject subclasses and Qt won't let me + // tqmoc won't let me create private TQObject subclasses and TQt won't let me // make the destructor protected, so here's the closest hack that will // compile. @@ -151,7 +153,7 @@ public: protected: Item(PlaylistBox *listBox, const TQString &icon, const TQString &text, Playlist *l = 0); - Item(Item *parent, const TQString &icon, const TQString &text, Playlist *l = 0); + Item(Item *tqparent, const TQString &icon, const TQString &text, Playlist *l = 0); Playlist *playlist() const { return m_playlist; } PlaylistBox *listView() const { return static_cast<PlaylistBox *>(KListViewItem::listView()); } @@ -160,7 +162,7 @@ protected: void setSortedFirst(bool first = true) { m_sortedFirst = first; } virtual int compare(TQListViewItem *i, int col, bool) const; - virtual void paintCell(TQPainter *p, const TQColorGroup &colorGroup, int column, int width, int align); + virtual void paintCell(TQPainter *p, const TQColorGroup &tqcolorGroup, int column, int width, int align); virtual void paintFocus(TQPainter *, const TQColorGroup &, const TQRect &) {} virtual void setText(int column, const TQString &text); diff --git a/juk/playlistcollection.cpp b/juk/playlistcollection.cpp index 2c30c692..6a248b39 100644 --- a/juk/playlistcollection.cpp +++ b/juk/playlistcollection.cpp @@ -158,7 +158,7 @@ TQStringList PlaylistCollection::playlists() const TQObjectList *childList = m_playlistStack->queryList("Playlist"); TQObject *obj; for(obj = childList->first(); obj; obj = childList->next()) { - Playlist *p = static_cast<Playlist *>(obj); + Playlist *p = static_cast<Playlist *>(TQT_TQWIDGET(obj)); l.append(p->name()); } @@ -223,7 +223,7 @@ void PlaylistCollection::showMore(const TQString &artist, const TQString &album) // so cache the value we want it to have now. Playlist *belowShowMore = visiblePlaylist(); - PlaylistCollection::setupPlaylist(m_showMorePlaylist, TQString::null); + PlaylistCollection::setupPlaylist(m_showMorePlaylist, TQString()); PlaylistCollection::raise(m_showMorePlaylist); m_belowShowMorePlaylist = belowShowMore; @@ -252,12 +252,12 @@ void PlaylistCollection::removeTrack(const TQString &playlist, const TQStringLis TQString PlaylistCollection::playlist() const { - return visiblePlaylist() ? visiblePlaylist()->name() : TQString::null; + return visiblePlaylist() ? visiblePlaylist()->name() : TQString(); } TQString PlaylistCollection::playingPlaylist() const { - return currentPlaylist() && m_playing ? currentPlaylist()->name() : TQString::null; + return currentPlaylist() && m_playing ? currentPlaylist()->name() : TQString(); } void PlaylistCollection::setPlaylist(const TQString &playlist) @@ -281,7 +281,7 @@ TQString PlaylistCollection::trackProperty(const TQString &file, const TQString CollectionList *l = CollectionList::instance(); CollectionListItem *item = l->lookup(file); - return item ? item->file().property(property) : TQString::null; + return item ? item->file().property(property) : TQString(); } TQPixmap PlaylistCollection::trackCover(const TQString &file, const TQString &size) const @@ -320,7 +320,7 @@ void PlaylistCollection::open(const TQStringList &l) KMessageBox::questionYesNo( widget, i18n("Do you want to add these items to the current list or to the collection list?"), - TQString::null, + TQString(), KGuiItem(i18n("Current")), KGuiItem(i18n("Collection"))) == KMessageBox::No) { @@ -509,7 +509,7 @@ void PlaylistCollection::createFolderPlaylist() if(folder.isEmpty()) return; - TQString name = uniquePlaylistName(folder.mid(folder.findRev('/') + 1)); + TQString name = uniquePlaylistName(folder.mid(folder.tqfindRev('/') + 1)); name = playlistNameDialog(i18n("Create Folder Playlist"), name); if(!name.isNull()) @@ -681,7 +681,7 @@ bool PlaylistCollection::importPlaylists() const bool PlaylistCollection::containsPlaylistFile(const TQString &file) const { - return m_playlistFiles.contains(file); + return m_playlistFiles.tqcontains(file); } bool PlaylistCollection::showMoreActive() const @@ -706,7 +706,7 @@ void PlaylistCollection::clearShowMore(bool raisePlaylist) void PlaylistCollection::enableDirWatch(bool enable) { - TQObject *collection = CollectionList::instance(); + TQObject *collection = TQT_TQOBJECT(CollectionList::instance()); m_dirLister.disconnect(object()); if(enable) { @@ -731,7 +731,7 @@ TQString PlaylistCollection::playlistNameDialog(const TQString &caption, forceUnique ? uniquePlaylistName(suggest) : suggest, &ok); - return ok ? uniquePlaylistName(name) : TQString::null; + return ok ? uniquePlaylistName(name) : TQString(); } @@ -740,18 +740,18 @@ TQString PlaylistCollection::uniquePlaylistName(const TQString &suggest) const if(suggest.isEmpty()) return uniquePlaylistName(); - if(!m_playlistNames.contains(suggest)) + if(!m_playlistNames.tqcontains(suggest)) return suggest; TQString base = suggest; base.remove(TQRegExp("\\s\\([0-9]+\\)$")); int count = 1; - TQString s = TQString("%1 (%2)").arg(base).arg(count); + TQString s = TQString("%1 (%2)").tqarg(base).tqarg(count); - while(m_playlistNames.contains(s)) { + while(m_playlistNames.tqcontains(s)) { count++; - s = TQString("%1 (%2)").arg(base).arg(count); + s = TQString("%1 (%2)").tqarg(base).tqarg(count); } return s; @@ -789,7 +789,7 @@ Playlist *PlaylistCollection::playlistByName(const TQString &name) const TQObject *obj; for(obj = l->first(); obj; obj = l->next()) { - Playlist *p = static_cast<Playlist*>(obj); + Playlist *p = static_cast<Playlist*>(TQT_TQWIDGET(obj)); if(p->name() == name) { list = p; break; @@ -845,14 +845,14 @@ PlaylistCollection::ActionHandler::ActionHandler(PlaylistCollection *collection) menu->insert(createAction(i18n("&Empty Playlist..."), TQT_SLOT(slotCreatePlaylist()), "newPlaylist", "window_new", "CTRL+n")); menu->insert(createAction(i18n("&Search Playlist..."), TQT_SLOT(slotCreateSearchPlaylist()), - "newSearchPlaylist", "find", "CTRL+f")); + "newSearchPlaylist", "tqfind", "CTRL+f")); menu->insert(createAction(i18n("Playlist From &Folder..."), TQT_SLOT(slotCreateFolderPlaylist()), "newDirectoryPlaylist", "fileopen", "CTRL+d")); // Guess tag info menu #if HAVE_MUSICBRAINZ - menu = new KActionMenu(i18n("&Guess Tag Information"), TQString::null, actions(), "guessTag"); + menu = new KActionMenu(i18n("&Guess Tag Information"), TQString(), actions(), "guessTag"); menu->setIconSet(SmallIconSet("wizard")); menu->insert(createAction(i18n("From &File Name"), TQT_SLOT(slotGuessTagFromFile()), @@ -882,7 +882,7 @@ PlaylistCollection::ActionHandler::ActionHandler(PlaylistCollection *collection) createAction(i18n("Refresh"), TQT_SLOT(slotRefreshItems()), "refresh", "reload"); createAction(i18n("&Rename File"), TQT_SLOT(slotRenameItems()), "renameFile", "filesaveas", "CTRL+r"); - menu = new KActionMenu(i18n("Cover Manager"), TQString::null, actions(), "coverManager"); + menu = new KActionMenu(i18n("Cover Manager"), TQString(), actions(), "coverManager"); menu->setIconSet(SmallIconSet("image")); menu->insert(createAction(i18n("&View Cover"), TQT_SLOT(slotViewCovers()), "viewCover", "viewmag")); diff --git a/juk/playlistcollection.h b/juk/playlistcollection.h index 3c7eecbd..92b5ea0d 100644 --- a/juk/playlistcollection.h +++ b/juk/playlistcollection.h @@ -66,7 +66,7 @@ public: virtual TQStringList playlists() const; virtual void createPlaylist(const TQString &name); virtual void createDynamicPlaylist(const PlaylistList &playlists); - virtual void showMore(const TQString &artist, const TQString &album = TQString::null); + virtual void showMore(const TQString &artist, const TQString &album = TQString()); virtual void removeTrack(const TQString &playlist, const TQStringList &files); virtual TQString playlist() const; @@ -166,7 +166,7 @@ protected: bool containsPlaylistFile(const TQString &file) const; TQString playlistNameDialog(const TQString &caption = i18n("Create New Playlist"), - const TQString &suggest = TQString::null, + const TQString &suggest = TQString(), bool forceUnique = true) const; TQString uniquePlaylistName(const TQString &suggest = i18n("Playlist")) const; @@ -207,9 +207,10 @@ private: * activations without requiring PlaylistCollection to be a TQObject. */ -class PlaylistCollection::ActionHandler : public QObject +class PlaylistCollection::ActionHandler : public TQObject { Q_OBJECT + TQ_OBJECT public: ActionHandler(PlaylistCollection *collection); @@ -217,7 +218,7 @@ private: KAction *createAction(const TQString &text, const char *slot, const char *name, - const TQString &icon = TQString::null, + const TQString &icon = TQString(), const KShortcut &shortcut = KShortcut()); private slots: void slotPlayFirst() { m_collection->playFirst(); } diff --git a/juk/playlistexporter.h b/juk/playlistexporter.h index de9f7fff..ca7d0dc6 100644 --- a/juk/playlistexporter.h +++ b/juk/playlistexporter.h @@ -28,10 +28,10 @@ class KActionCollection; * @author Michael Pyne <michael.pyne@kdemail.net> * @see K3bExporter */ -class PlaylistExporter : public QObject +class PlaylistExporter : public TQObject { public: - PlaylistExporter(TQWidget *parent = 0) : TQObject(parent) { } + PlaylistExporter(TQWidget *tqparent = 0) : TQObject(tqparent) { } virtual ~PlaylistExporter() { } /** 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 ℑ 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(); diff --git a/juk/playlistitem.h b/juk/playlistitem.h index 9b9cfa80..d8797208 100644 --- a/juk/playlistitem.h +++ b/juk/playlistitem.h @@ -156,13 +156,13 @@ protected: * Items should always be created using Playlist::createItem() or through a * subclss or friend class. */ - PlaylistItem(CollectionListItem *item, Playlist *parent); - PlaylistItem(CollectionListItem *item, Playlist *parent, TQListViewItem *after); + PlaylistItem(CollectionListItem *item, Playlist *tqparent); + PlaylistItem(CollectionListItem *item, Playlist *tqparent, TQListViewItem *after); /** * This is the constructor that shold be used by subclasses. */ - PlaylistItem(CollectionList *parent); + PlaylistItem(CollectionList *tqparent); /** * See the class documentation for an explanation of construction and deletion diff --git a/juk/playlistsearch.cpp b/juk/playlistsearch.cpp index 940c13e8..f0eb7a29 100644 --- a/juk/playlistsearch.cpp +++ b/juk/playlistsearch.cpp @@ -197,7 +197,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const for(ColumnList::Iterator it = m_columns.begin(); it != m_columns.end(); ++it) { if(m_re) { - if(item->text(*it).find(m_queryRe) > -1) + if(item->text(*it).tqfind(m_queryRe) > -1) return true; else break; @@ -205,7 +205,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const switch(m_mode) { case Contains: - if(item->text(*it).find(m_query, 0, m_caseSensitive) > -1) + if(item->text(*it).tqfind(m_query, 0, m_caseSensitive) > -1) return true; break; case Exact: @@ -221,7 +221,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const case ContainsWord: { TQString s = item->text(*it); - int i = s.find(m_query, 0, m_caseSensitive); + int i = s.tqfind(m_query, 0, m_caseSensitive); if(i >= 0) { @@ -270,7 +270,7 @@ bool PlaylistSearch::Component::operator==(const Component &v) const TQDataStream &operator<<(TQDataStream &s, const PlaylistSearch &search) { s << search.components() - << Q_INT32(search.searchMode()); + << TQ_INT32(search.searchMode()); return s; } @@ -287,7 +287,7 @@ TQDataStream &operator>>(TQDataStream &s, PlaylistSearch &search) for(; it != components.end(); ++it) search.addComponent(*it); - Q_INT32 mode; + TQ_INT32 mode; s >> mode; search.setSearchMode(PlaylistSearch::SearchMode(mode)); @@ -296,11 +296,11 @@ TQDataStream &operator>>(TQDataStream &s, PlaylistSearch &search) TQDataStream &operator<<(TQDataStream &s, const PlaylistSearch::Component &c) { - s << c.isPatternSearch() - << (c.isPatternSearch() ? c.pattern().pattern() : c.query()) - << c.isCaseSensitive() - << c.columns() - << Q_INT32(c.matchMode()); + s << c.isPatternSearch(); + s << (c.isPatternSearch() ? c.pattern().pattern() : c.query()); + s << c.isCaseSensitive(); + s << c.columns(); + s << TQ_INT32(c.matchMode()); return s; } @@ -311,7 +311,7 @@ TQDataStream &operator>>(TQDataStream &s, PlaylistSearch::Component &c) TQString pattern; bool caseSensitive; ColumnList columns; - Q_INT32 mode; + TQ_INT32 mode; s >> patternSearch >> pattern diff --git a/juk/playlistsearch.h b/juk/playlistsearch.h index 7281ba13..44e0b03c 100644 --- a/juk/playlistsearch.h +++ b/juk/playlistsearch.h @@ -17,6 +17,7 @@ #define PLAYLISTSEARCH_H #include <tqregexp.h> +#include <tqvaluelist.h> class Playlist; typedef TQValueList<Playlist *> PlaylistList; diff --git a/juk/playlistsplitter.cpp b/juk/playlistsplitter.cpp index 3454ee3d..8731c30f 100644 --- a/juk/playlistsplitter.cpp +++ b/juk/playlistsplitter.cpp @@ -34,8 +34,8 @@ using namespace ActionCollection; // public methods //////////////////////////////////////////////////////////////////////////////// -PlaylistSplitter::PlaylistSplitter(TQWidget *parent, const char *name) : - TQSplitter(Qt::Horizontal, parent, name), +PlaylistSplitter::PlaylistSplitter(TQWidget *tqparent, const char *name) : + TQSplitter(Qt::Horizontal, tqparent, name), m_newVisible(0), m_playlistBox(0), m_searchWidget(0), @@ -94,7 +94,7 @@ void PlaylistSplitter::slotFocusCurrentPlaylist() if(!item) return; - // A little bit of a hack to make TQListView repaint things properly. Switch + // A little bit of a hack to make TQListView tqrepaint things properly. Switch // to single selection mode, set the selection and then switch back. playlist->setSelectionMode(TQListView::Single); @@ -118,10 +118,10 @@ Playlist *PlaylistSplitter::visiblePlaylist() const void PlaylistSplitter::setupActions() { KToggleAction *showSearch = - new KToggleAction(i18n("Show &Search Bar"), "filefind", 0, actions(), "showSearch"); + new KToggleAction(i18n("Show &Search Bar"), "filetqfind", 0, ActionCollection::actions(), "showSearch"); showSearch->setCheckedState(i18n("Hide &Search Bar")); - new KAction(i18n("Edit Track Search"), "edit_clear", "F6", this, TQT_SLOT(setFocus()), actions(), "editTrackSearch"); + new KAction(i18n("Edit Track Search"), "edit_clear", "F6", TQT_TQOBJECT(this), TQT_SLOT(setFocus()), ActionCollection::actions(), "editTrackSearch"); } void PlaylistSplitter::setupLayout() diff --git a/juk/playlistsplitter.h b/juk/playlistsplitter.h index cc163640..4865fa22 100644 --- a/juk/playlistsplitter.h +++ b/juk/playlistsplitter.h @@ -30,7 +30,7 @@ class PlaylistInterface; class TagEditor; /** - * This is the main layout class of JuK. It should contain a PlaylistBox and + * This is the main tqlayout class of JuK. It should contain a PlaylistBox and * a TQWidgetStack of the Playlists. * * This class serves as a "mediator" (see "Design Patterns") between the JuK @@ -38,12 +38,13 @@ class TagEditor; * non-Playlist related classes should be through the public API of this class. */ -class PlaylistSplitter : public QSplitter +class PlaylistSplitter : public TQSplitter { Q_OBJECT + TQ_OBJECT public: - PlaylistSplitter(TQWidget *parent, const char *name = 0); + PlaylistSplitter(TQWidget *tqparent, const char *name = 0); virtual ~PlaylistSplitter(); PlaylistInterface *playlist() const { return m_playlistBox; } diff --git a/juk/searchplaylist.cpp b/juk/searchplaylist.cpp index ba1be917..da4f54ce 100644 --- a/juk/searchplaylist.cpp +++ b/juk/searchplaylist.cpp @@ -30,7 +30,7 @@ SearchPlaylist::SearchPlaylist(PlaylistCollection *collection, const TQString &name, bool setupPlaylist, bool synchronizePlaying) : - DynamicPlaylist(search.playlists(), collection, name, "find", + DynamicPlaylist(search.playlists(), collection, name, "tqfind", setupPlaylist, synchronizePlaying), m_search(search) { diff --git a/juk/searchplaylist.h b/juk/searchplaylist.h index 8152670a..5e22baaf 100644 --- a/juk/searchplaylist.h +++ b/juk/searchplaylist.h @@ -21,10 +21,11 @@ class SearchPlaylist : public DynamicPlaylist { Q_OBJECT + TQ_OBJECT public: SearchPlaylist(PlaylistCollection *collection, const PlaylistSearch &search = PlaylistSearch(), - const TQString &name = TQString::null, + const TQString &name = TQString(), bool setupPlaylist = true, bool synchronizePlaying = false); diff --git a/juk/searchwidget.cpp b/juk/searchwidget.cpp index a9b8d868..a0a110fa 100644 --- a/juk/searchwidget.cpp +++ b/juk/searchwidget.cpp @@ -1,6 +1,6 @@ /*************************************************************************** begin : Sun Mar 6 2003 - copyright : (C) 2003 by Richard Lärkäng + copyright : (C) 2003 by Richard L�rk�ng email : nouseforaname@home.se copyright : (C) 2003 - 2004 by Scott Wheeler @@ -39,8 +39,8 @@ using namespace ActionCollection; // SearchLine public methods //////////////////////////////////////////////////////////////////////////////// -SearchLine::SearchLine(TQWidget *parent, bool simple, const char *name) : - TQHBox(parent, name), +SearchLine::SearchLine(TQWidget *tqparent, bool simple, const char *name) : + TQHBox(tqparent, name), m_simple(simple), m_searchFieldsBox(0) { @@ -136,11 +136,11 @@ void SearchLine::setFocus() bool SearchLine::eventFilter(TQObject *watched, TQEvent *e) { - if(watched != m_lineEdit || e->type() != TQEvent::KeyPress) + if(TQT_BASE_OBJECT(watched) != TQT_BASE_OBJECT(m_lineEdit) || e->type() != TQEvent::KeyPress) return TQHBox::eventFilter(watched, e); - TQKeyEvent *key = static_cast<TQKeyEvent *>(e); - if(key->key() == Qt::Key_Down) + TQKeyEvent *key = TQT_TQKEYEVENT(e); + if(key->key() == TQt::Key_Down) emit signalDownPressed(); return TQHBox::eventFilter(watched, e); @@ -163,7 +163,7 @@ void SearchLine::updateColumns() TQStringList columnHeaders; - columnHeaders.append(TQString("<%1>").arg(i18n("All Visible"))); + columnHeaders.append(TQString("<%1>").tqarg(i18n("All Visible"))); Playlist *playlist = CollectionList::instance(); @@ -188,7 +188,7 @@ void SearchLine::updateColumns() // SearchWidget public methods //////////////////////////////////////////////////////////////////////////////// -SearchWidget::SearchWidget(TQWidget *parent, const char *name) : KToolBar(parent, name) +SearchWidget::SearchWidget(TQWidget *tqparent, const char *name) : KToolBar(tqparent, name) { setupLayout(); updateColumns(); diff --git a/juk/searchwidget.h b/juk/searchwidget.h index 604b289b..75f0c513 100644 --- a/juk/searchwidget.h +++ b/juk/searchwidget.h @@ -32,14 +32,15 @@ class KComboBox; class Playlist; -class SearchLine : public QHBox +class SearchLine : public TQHBox { Q_OBJECT + TQ_OBJECT public: enum Mode { Default = 0, CaseSensitive = 1, Pattern = 2 }; - SearchLine(TQWidget *parent, bool simple = false, const char *name = 0); + SearchLine(TQWidget *tqparent, bool simple = false, const char *name = 0); virtual ~SearchLine() {} PlaylistSearch::Component searchComponent() const; @@ -72,9 +73,10 @@ private: class SearchWidget : public KToolBar, public SearchIface { Q_OBJECT + TQ_OBJECT public: - SearchWidget(TQWidget *parent, const char *name = 0); + SearchWidget(TQWidget *tqparent, const char *name = 0); virtual ~SearchWidget(); PlaylistSearch search(const PlaylistList &playlists) const; diff --git a/juk/slideraction.cpp b/juk/slideraction.cpp index 22d8446b..a001fc31 100644 --- a/juk/slideraction.cpp +++ b/juk/slideraction.cpp @@ -36,24 +36,24 @@ * to the left mouse button. */ -class TrackPositionSlider : public QSlider +class TrackPositionSlider : public TQSlider { public: - TrackPositionSlider(TQWidget *parent, const char *name) : TQSlider(parent, name) + TrackPositionSlider(TQWidget *tqparent, const char *name) : TQSlider(tqparent, name) { - setFocusPolicy(NoFocus); + setFocusPolicy(TQ_NoFocus); } protected: virtual void mousePressEvent(TQMouseEvent *e) { - if(e->button() == LeftButton) { - TQMouseEvent reverse(TQEvent::MouseButtonPress, e->pos(), MidButton, e->state()); + if(e->button() == Qt::LeftButton) { + TQMouseEvent reverse(TQEvent::MouseButtonPress, e->pos(), Qt::MidButton, e->state()); TQSlider::mousePressEvent(&reverse); emit sliderPressed(); } - else if(e->button() == MidButton) { - TQMouseEvent reverse(TQEvent::MouseButtonPress, e->pos(), LeftButton, e->state()); + else if(e->button() == Qt::MidButton) { + TQMouseEvent reverse(TQEvent::MouseButtonPress, e->pos(), Qt::LeftButton, e->state()); TQSlider::mousePressEvent(&reverse); } } @@ -63,15 +63,15 @@ protected: // VolumeSlider implementation //////////////////////////////////////////////////////////////////////////////// -VolumeSlider::VolumeSlider(Orientation o, TQWidget *parent, const char *name) : - TQSlider(o, parent, name) +VolumeSlider::VolumeSlider(Qt::Orientation o, TQWidget *tqparent, const char *name) : + TQSlider(o, tqparent, name) { connect(this, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValueChanged(int))); } void VolumeSlider::wheelEvent(TQWheelEvent *e) { - if(orientation() == Horizontal) { + if(orientation() ==Qt::Horizontal) { TQWheelEvent transposed(e->pos(), -(e->delta()), e->state(), e->orientation()); TQSlider::wheelEvent(&transposed); } @@ -86,7 +86,7 @@ void VolumeSlider::focusInEvent(TQFocusEvent *) int VolumeSlider::volume() const { - if(orientation() == Horizontal) + if(orientation() ==Qt::Horizontal) return value(); else return maxValue() - value(); @@ -94,13 +94,13 @@ int VolumeSlider::volume() const void VolumeSlider::setVolume(int value) { - if(orientation() == Horizontal) + if(orientation() ==Qt::Horizontal) setValue(value); else setValue(maxValue() - value); } -void VolumeSlider::setOrientation(Orientation o) +void VolumeSlider::setOrientation(Qt::Orientation o) { if(o == orientation()) return; @@ -113,7 +113,7 @@ void VolumeSlider::setOrientation(Orientation o) void VolumeSlider::slotValueChanged(int value) { - if(orientation() == Horizontal) + if(orientation() ==Qt::Horizontal) emit signalVolumeChanged(value); else emit signalVolumeChanged(maxValue() - value); @@ -126,8 +126,8 @@ void VolumeSlider::slotValueChanged(int value) const int SliderAction::minPosition = 0; const int SliderAction::maxPosition = 1000; -SliderAction::SliderAction(const TQString &text, TQObject *parent, const char *name) - : KAction(text, 0, parent, name), +SliderAction::SliderAction(const TQString &text, TQObject *tqparent, const char *name) + : KAction(text, 0, tqparent, name), m_toolBar(0), m_layout(0), m_trackPositionSlider(0), @@ -143,9 +143,9 @@ SliderAction::~SliderAction() } -int SliderAction::plug(TQWidget *parent, int index) +int SliderAction::plug(TQWidget *tqparent, int index) { - TQWidget *w = createWidget(parent); + TQWidget *w = createWidget(tqparent); if(!w) return -1; @@ -153,8 +153,8 @@ int SliderAction::plug(TQWidget *parent, int index) // the check for null makes sure that there is only one toolbar that this is // "plugged" in to - if(parent->inherits("KToolBar") && !m_toolBar) { - m_toolBar = static_cast<KToolBar *>(parent); + if(tqparent->inherits("KToolBar") && !m_toolBar) { + m_toolBar = static_cast<KToolBar *>(tqparent); int id = KAction::getToolButtonID(); @@ -163,7 +163,7 @@ int SliderAction::plug(TQWidget *parent, int index) addContainer(m_toolBar, id); connect(m_toolBar, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotToolbarDestroyed())); - connect(m_toolBar, TQT_SIGNAL(orientationChanged(Orientation)), + connect(m_toolBar, TQT_SIGNAL(orientationChanged(Qt::Orientation)), this, TQT_SLOT(slotUpdateOrientation())); connect(m_toolBar, TQT_SIGNAL(placeChanged(TQDockWindow::Place)), this, TQT_SLOT(slotUpdateOrientation())); @@ -178,10 +178,10 @@ int SliderAction::plug(TQWidget *parent, int index) } -void SliderAction::unplug(TQWidget *parent) +void SliderAction::unplug(TQWidget *tqparent) { - if (parent->inherits("KToolBar")) { - m_toolBar = static_cast<KToolBar *>(parent); + if (tqparent->inherits("KToolBar")) { + m_toolBar = static_cast<KToolBar *>(tqparent); int index = findContainer(m_toolBar); if (index != -1) { @@ -205,13 +205,13 @@ void SliderAction::slotUpdateOrientation() return; if(m_toolBar->barPos() == KToolBar::Right || m_toolBar->barPos() == KToolBar::Left) { - m_trackPositionSlider->setOrientation(Vertical); - m_volumeSlider->setOrientation(Vertical); + m_trackPositionSlider->setOrientation(Qt::Vertical); + m_volumeSlider->setOrientation(Qt::Vertical); m_layout->setDirection(TQBoxLayout::TopToBottom); } else { - m_trackPositionSlider->setOrientation(Horizontal); - m_volumeSlider->setOrientation(Horizontal); + m_trackPositionSlider->setOrientation(Qt::Horizontal); + m_volumeSlider->setOrientation(Qt::Horizontal); m_layout->setDirection(TQBoxLayout::LeftToRight); } slotUpdateSize(); @@ -221,24 +221,24 @@ void SliderAction::slotUpdateOrientation() // private members //////////////////////////////////////////////////////////////////////////////// -TQWidget *SliderAction::createWidget(TQWidget *parent) // virtual -- used by base class +TQWidget *SliderAction::createWidget(TQWidget *tqparent) // virtual -- used by base class { - if(parent) { - TQWidget *base = new TQWidget(parent); - base->setBackgroundMode(parent->backgroundMode()); + if(tqparent) { + TQWidget *base = new TQWidget(tqparent); + base->setBackgroundMode(tqparent->backgroundMode()); base->setName("kde toolbar widget"); - KToolBar *toolBar = dynamic_cast<KToolBar *>(parent); + KToolBar *toolBar = dynamic_cast<KToolBar *>(tqparent); if(toolBar) toolBar->setStretchableWidget(base); - Orientation orientation; + Qt::Orientation orientation; if(toolBar && toolBar->barPos() == KToolBar::Right || toolBar->barPos() == KToolBar::Left) - orientation = Vertical; + orientation =Qt::Vertical; else - orientation = Horizontal; + orientation =Qt::Horizontal; m_layout = new TQBoxLayout(base, TQBoxLayout::TopToBottom, 5, 5); @@ -279,7 +279,7 @@ TQWidget *SliderAction::createWidget(TQWidget *parent) // virtual -- used by bas m_layout->setStretchFactor(m_trackPositionSlider, 4); m_layout->setStretchFactor(m_volumeSlider, 1); - connect(parent, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotUpdateSize())); + connect(tqparent, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotUpdateSize())); return base; } diff --git a/juk/slideraction.h b/juk/slideraction.h index 2b88c8e3..5577a481 100644 --- a/juk/slideraction.h +++ b/juk/slideraction.h @@ -22,17 +22,18 @@ class TQBoxLayout; class TQDockWindow; -class VolumeSlider : public QSlider +class VolumeSlider : public TQSlider { Q_OBJECT + TQ_OBJECT public: - VolumeSlider(Orientation o, TQWidget *parent, const char *name); + VolumeSlider(Qt::Orientation o, TQWidget *tqparent, const char *name); int volume() const; void setVolume(int value); - void setOrientation(Orientation o); + void setOrientation(Qt::Orientation o); signals: void signalVolumeChanged(int value); @@ -48,9 +49,10 @@ private slots: class SliderAction : public KAction { Q_OBJECT + TQ_OBJECT public: - SliderAction(const TQString &text, TQObject *parent, const char *name); + SliderAction(const TQString &text, TQObject *tqparent, const char *name); virtual ~SliderAction(); VolumeSlider *volumeSlider() const { return m_volumeSlider; } @@ -59,7 +61,7 @@ public: bool dragging() const { return m_dragging; } bool volumeDragging() const { return m_volumeDragging; } - virtual int plug(TQWidget *parent, int index = -1); + virtual int plug(TQWidget *tqparent, int index = -1); virtual void unplug(TQWidget *widget); static const int minPosition; @@ -73,7 +75,7 @@ signals: void signalVolumeChanged(int volume); private: - TQWidget *createWidget(TQWidget *parent); + TQWidget *createWidget(TQWidget *tqparent); private slots: void slotUpdateSize(); diff --git a/juk/sortedstringlist.cpp b/juk/sortedstringlist.cpp index 0886a88d..904c5f01 100644 --- a/juk/sortedstringlist.cpp +++ b/juk/sortedstringlist.cpp @@ -20,11 +20,11 @@ class SortedStringList::Node { public: - Node(const TQString &value) : key(value), parent(0), left(0), right(0) {} + Node(const TQString &value) : key(value), tqparent(0), left(0), right(0) {} ~Node() {} TQString key; - Node *parent; + Node *tqparent; Node *left; Node *right; }; @@ -44,9 +44,9 @@ bool SortedStringList::insert(const TQString &value) return BSTInsert(value); } -bool SortedStringList::contains(const TQString &value) const +bool SortedStringList::tqcontains(const TQString &value) const { - return find(value); + return tqfind(value); } SortedStringList::Node *SortedStringList::treeMinimum(Node *n) const @@ -61,11 +61,11 @@ SortedStringList::Node *SortedStringList::treeSuccessor(Node *n) const if(n->right) return treeMinimum(n->right); - Node *p = n->parent; + Node *p = n->tqparent; while(p && n == p->right) { n = p; - p = p->parent; + p = p->tqparent; } return p; @@ -73,7 +73,7 @@ SortedStringList::Node *SortedStringList::treeSuccessor(Node *n) const bool SortedStringList::remove(const TQString &value) { - Node *n = find(value); + Node *n = tqfind(value); if(!n) return false; @@ -92,15 +92,15 @@ bool SortedStringList::remove(const TQString &value) x = y->right; if(x) - x->parent = y->parent; + x->tqparent = y->tqparent; - if(!y->parent) + if(!y->tqparent) m_root = x; else { - if(y == y->parent->left) - y->parent->left = x; + if(y == y->tqparent->left) + y->tqparent->left = x; else - y->parent->right = x; + y->tqparent->right = x; } if(y != x) @@ -122,7 +122,7 @@ TQStringList SortedStringList::values() const // private methods //////////////////////////////////////////////////////////////////////////////// -SortedStringList::Node *SortedStringList::find(const TQString &value) const +SortedStringList::Node *SortedStringList::tqfind(const TQString &value) const { Node *n = m_root; while(n && value != n->key) { @@ -155,7 +155,7 @@ bool SortedStringList::BSTInsert(const TQString &value) Node *n = new Node(value); - n->parent = previousNode; + n->tqparent = previousNode; if(!m_root) m_root = n; diff --git a/juk/sortedstringlist.h b/juk/sortedstringlist.h index 01386262..1ef94a2b 100644 --- a/juk/sortedstringlist.h +++ b/juk/sortedstringlist.h @@ -29,7 +29,7 @@ public: * or false otherwise. */ bool insert(const TQString &value); - bool contains(const TQString &value) const; + bool tqcontains(const TQString &value) const; bool remove(const TQString &value); /** @@ -42,7 +42,7 @@ public: private: class Node; - Node *find(const TQString &value) const; + Node *tqfind(const TQString &value) const; /** * The insertion implementation. Returns true if the item was already * present in the list. diff --git a/juk/splashscreen.cpp b/juk/splashscreen.cpp index b8b69c87..21f037b0 100644 --- a/juk/splashscreen.cpp +++ b/juk/splashscreen.cpp @@ -70,14 +70,14 @@ void SplashScreen::update() // protected members //////////////////////////////////////////////////////////////////////////////// -SplashScreen::SplashScreen() : TQLabel(0 , "splashScreen", Qt::WStyle_Splash) +SplashScreen::SplashScreen() : TQLabel(0 , "splashScreen", TQt::WStyle_Splash) { TQPixmap background = UserIcon("splash"); resize(background.size()); setPaletteBackgroundPixmap(background); setMargin(7); - setAlignment(AlignLeft | AlignBottom); + tqsetAlignment(AlignLeft | AlignBottom); setPaletteForegroundColor(TQColor(107, 158, 194)); diff --git a/juk/splashscreen.h b/juk/splashscreen.h index eff0eec9..27ef3a73 100644 --- a/juk/splashscreen.h +++ b/juk/splashscreen.h @@ -29,7 +29,7 @@ * methods. */ -class SplashScreen : public QLabel +class SplashScreen : public TQLabel { public: static SplashScreen *instance(); diff --git a/juk/statuslabel.cpp b/juk/statuslabel.cpp index 81f066ea..4867c7ec 100644 --- a/juk/statuslabel.cpp +++ b/juk/statuslabel.cpp @@ -35,14 +35,14 @@ using namespace ActionCollection; // public methods //////////////////////////////////////////////////////////////////////////////// -StatusLabel::StatusLabel(PlaylistInterface *playlist, TQWidget *parent, const char *name) : - TQHBox(parent, name), +StatusLabel::StatusLabel(PlaylistInterface *playlist, TQWidget *tqparent, const char *name) : + TQHBox(tqparent, name), PlaylistObserver(playlist), m_showTimeRemaining(false) { TQFrame *trackAndPlaylist = new TQFrame(this); trackAndPlaylist->setFrameStyle(Box | Sunken); - trackAndPlaylist->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + trackAndPlaylist->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); // Make sure that we have enough of a margin to suffice for the borders, // hence the "lineWidth() * 2" @@ -53,23 +53,23 @@ StatusLabel::StatusLabel(PlaylistInterface *playlist, TQWidget *parent, const ch m_playlistLabel = new KSqueezedTextLabel(trackAndPlaylist, "playlistLabel"); trackAndPlaylistLayout->addWidget(m_playlistLabel); - m_playlistLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_playlistLabel->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_playlistLabel->setTextFormat(PlainText); - m_playlistLabel->setAlignment(AlignLeft | AlignVCenter); + m_playlistLabel->tqsetAlignment(AlignLeft | AlignVCenter); m_trackLabel = new KSqueezedTextLabel(trackAndPlaylist, "trackLabel"); trackAndPlaylistLayout->addWidget(m_trackLabel); - m_trackLabel->setAlignment(AlignRight | AlignVCenter); - m_trackLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_trackLabel->tqsetAlignment(AlignRight | AlignVCenter); + m_trackLabel->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_trackLabel->setTextFormat(PlainText); trackAndPlaylistLayout->addSpacing(5); m_itemTimeLabel = new TQLabel(this); TQFontMetrics fontMetrics(font()); - m_itemTimeLabel->setAlignment(AlignCenter); + m_itemTimeLabel->tqsetAlignment(AlignCenter); m_itemTimeLabel->setMinimumWidth(fontMetrics.boundingRect("000:00 / 000:00").width()); - m_itemTimeLabel->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding); + m_itemTimeLabel->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding); m_itemTimeLabel->setFrameStyle(Box | Sunken); m_itemTimeLabel->installEventFilter(this); @@ -78,7 +78,7 @@ StatusLabel::StatusLabel(PlaylistInterface *playlist, TQWidget *parent, const ch TQHBox *jumpBox = new TQHBox(this); jumpBox->setFrameStyle(Box | Sunken); - jumpBox->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Minimum); + jumpBox->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Minimum); TQPushButton *jumpButton = new TQPushButton(jumpBox); jumpButton->setPixmap(SmallIcon("up")); @@ -103,7 +103,7 @@ void StatusLabel::updateCurrent() FileHandle file = playlist()->currentFile(); TQString mid = file.tag()->artist().isEmpty() || file.tag()->title().isEmpty() - ? TQString::null : TQString(" - "); + ? TQString() : TQString(" - "); TQString text = file.tag()->artist() + mid + file.tag()->title(); @@ -175,11 +175,11 @@ bool StatusLabel::eventFilter(TQObject *o, TQEvent *e) if(!o || !e) return false; - TQMouseEvent *mouseEvent = static_cast<TQMouseEvent *>(e); + TQMouseEvent *mouseEvent = TQT_TQMOUSEEVENT(e); if(e->type() == TQEvent::MouseButtonRelease && - mouseEvent->button() == LeftButton) + mouseEvent->button() == Qt::LeftButton) { - if(o == m_itemTimeLabel) { + if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_itemTimeLabel)) { m_showTimeRemaining = !m_showTimeRemaining; updateTime(); } diff --git a/juk/statuslabel.h b/juk/statuslabel.h index f0a64393..a2411622 100644 --- a/juk/statuslabel.h +++ b/juk/statuslabel.h @@ -28,9 +28,10 @@ class FileHandle; class StatusLabel : public TQHBox, public PlaylistObserver { Q_OBJECT + TQ_OBJECT public: - StatusLabel(PlaylistInterface *playlist, TQWidget *parent = 0, const char *name = 0); + StatusLabel(PlaylistInterface *playlist, TQWidget *tqparent = 0, const char *name = 0); virtual ~StatusLabel(); virtual void updateCurrent(); diff --git a/juk/stringhash.h b/juk/stringhash.h index 0d3c43bb..11ac3d7b 100644 --- a/juk/stringhash.h +++ b/juk/stringhash.h @@ -42,7 +42,7 @@ public: /** * Returns true if the set contains the item \a value. */ - bool contains(T value) const; + bool tqcontains(T value) const; /** * Removes an item. Returns true if the item was present and false if not. @@ -118,7 +118,7 @@ protected: inline char hashStringAccess(const TQString &in, int index) { - return in.unicode()[index].cell(); + return in.tqunicode()[index].cell(); } inline char hashStringAccess(const TQCString &in, int index) @@ -126,7 +126,7 @@ inline char hashStringAccess(const TQCString &in, int index) return in[index]; } -// Based on QGDict's hash functions, Copyright (C) 1992-2000 Trolltech AS +// Based on TQGDict's hash functions, Copyright (C) 1992-2000 Trolltech AS template <typename StringType> inline int hashString(const StringType &s) @@ -227,7 +227,7 @@ bool Hash<T>::insert(T value) } template <class T> -bool Hash<T>::contains(T value) const +bool Hash<T>::tqcontains(T value) const { int h = hash(value); Node *i = m_table[h]; diff --git a/juk/stringshare.cpp b/juk/stringshare.cpp index 195fd64f..8cb07068 100644 --- a/juk/stringshare.cpp +++ b/juk/stringshare.cpp @@ -21,7 +21,7 @@ StringShare::Data* StringShare::s_data = 0; /** * We store the strings in two simple direct-mapped (i.e. no collision handling, - * just replace) hashes, which contain strings or null objects. This costs only + * just tqreplace) hashes, which contain strings or null objects. This costs only * 4 bytes per slot on 32-bit archs, so with the default constant size we only * really use 40K or so. * diff --git a/juk/systemtray.cpp b/juk/systemtray.cpp index 40cdd082..36c6874e 100644 --- a/juk/systemtray.cpp +++ b/juk/systemtray.cpp @@ -47,14 +47,14 @@ using namespace ActionCollection; static bool copyImage(TQImage &dest, TQImage &src, int x, int y); -class FlickerFreeLabel : public QLabel +class FlickerFreeLabel : public TQLabel { public: - FlickerFreeLabel(const TQString &text, TQWidget *parent, const char *name = 0) : - TQLabel(text, parent, name) + FlickerFreeLabel(const TQString &text, TQWidget *tqparent, const char *name = 0) : + TQLabel(text, tqparent, name) { m_textColor = paletteForegroundColor(); - m_bgColor = parentWidget()->paletteBackgroundColor(); + m_bgColor = tqparentWidget()->paletteBackgroundColor(); setBackgroundMode(NoBackground); } @@ -73,7 +73,7 @@ protected: { // We want to intercept the drawContents call and draw on a pixmap // instead of the window to keep flicker to an absolute minimum. - // Since Qt doesn't refresh the background, we need to do so + // Since TQt doesn't refresh the background, we need to do so // ourselves. TQPixmap pix(size()); @@ -90,8 +90,8 @@ protected: TQColor m_bgColor; }; -PassiveInfo::PassiveInfo(TQWidget *parent, const char *name) : - KPassivePopup(parent, name), m_timer(new TQTimer), m_justDie(false) +PassiveInfo::PassiveInfo(TQWidget *tqparent, const char *name) : + KPassivePopup(tqparent, name), m_timer(new TQTimer), m_justDie(false) { // I'm so sick and tired of KPassivePopup screwing this up // that I'll just handle the timeout myself, thank you very much. @@ -137,7 +137,7 @@ void PassiveInfo::leaveEvent(TQEvent *) // public methods //////////////////////////////////////////////////////////////////////////////// -SystemTray::SystemTray(TQWidget *parent, const char *name) : KSystemTray(parent, name), +SystemTray::SystemTray(TQWidget *tqparent, const char *name) : KSystemTray(tqparent, name), m_popup(0), m_fadeTimer(0), m_fade(true) @@ -162,8 +162,8 @@ SystemTray::SystemTray(TQWidget *parent, const char *name) : KSystemTray(parent, // Just create this here so that it show up in the DCOP interface and the key // bindings dialog. - new KAction(i18n("Redisplay Popup"), KShortcut(), this, - TQT_SLOT(slotPlay()), actions(), "showPopup"); + new KAction(i18n("Redisplay Popup"), KShortcut(), TQT_TQOBJECT(this), + TQT_SLOT(slotPlay()), ActionCollection::actions(), "showPopup"); KPopupMenu *cm = contextMenu(); @@ -181,7 +181,7 @@ SystemTray::SystemTray(TQWidget *parent, const char *name) : KSystemTray(parent, // Pity the actionCollection doesn't keep track of what sub-menus it has. - KActionMenu *menu = new KActionMenu(i18n("&Random Play"), this); + KActionMenu *menu = new KActionMenu(i18n("&Random Play"), TQT_TQOBJECT(this)); menu->insert(action("disableRandomPlay")); menu->insert(action("randomPlay")); menu->insert(action("albumRandomPlay")); @@ -299,7 +299,7 @@ void SystemTray::slotMouseInPopup() // private methods //////////////////////////////////////////////////////////////////////////////// -TQVBox *SystemTray::createPopupLayout(TQWidget *parent, const FileHandle &file) +TQVBox *SystemTray::createPopupLayout(TQWidget *tqparent, const FileHandle &file) { TQVBox *infoBox = 0; @@ -307,17 +307,17 @@ TQVBox *SystemTray::createPopupLayout(TQWidget *parent, const FileHandle &file) // They go to the left because JuK is on that side - createButtonBox(parent); - addSeparatorLine(parent); + createButtonBox(tqparent); + addSeparatorLine(tqparent); - infoBox = new TQVBox(parent); + infoBox = new TQVBox(tqparent); // Another line, and the cover, if there's a cover, and if // it's selected to be shown if(file.coverInfo()->hasCover()) { - addSeparatorLine(parent); - addCoverButton(parent, file.coverInfo()->pixmap(CoverInfo::Thumbnail)); + addSeparatorLine(tqparent); + addCoverButton(tqparent, file.coverInfo()->pixmap(CoverInfo::Thumbnail)); } } else { @@ -325,14 +325,14 @@ TQVBox *SystemTray::createPopupLayout(TQWidget *parent, const FileHandle &file) // Like above, but reversed. if(file.coverInfo()->hasCover()) { - addCoverButton(parent, file.coverInfo()->pixmap(CoverInfo::Thumbnail)); - addSeparatorLine(parent); + addCoverButton(tqparent, file.coverInfo()->pixmap(CoverInfo::Thumbnail)); + addSeparatorLine(tqparent); } - infoBox = new TQVBox(parent); + infoBox = new TQVBox(tqparent); - addSeparatorLine(parent); - createButtonBox(parent); + addSeparatorLine(tqparent); + createButtonBox(tqparent); } infoBox->setSpacing(3); @@ -370,7 +370,7 @@ void SystemTray::createPopup() for(unsigned i = 0; i < m_labels.capacity(); ++i) { m_labels[i] = new FlickerFreeLabel(" ", infoBox); - m_labels[i]->setAlignment(AlignRight | AlignVCenter); + m_labels[i]->tqsetAlignment(AlignRight | AlignVCenter); } // We don't want an autodelete popup. There are times when it will need @@ -385,7 +385,7 @@ void SystemTray::createPopup() int labelCount = 0; TQString title = TQStyleSheet::escape(playingInfo->title()); - m_labels[labelCount++]->setText(TQString("<qt><nobr><h2>%1</h2></nobr><qt>").arg(title)); + m_labels[labelCount++]->setText(TQString("<qt><nobr><h2>%1</h2></nobr><qt>").tqarg(title)); if(!playingInfo->artist().isEmpty()) m_labels[labelCount++]->setText(playingInfo->artist()); @@ -393,8 +393,8 @@ void SystemTray::createPopup() if(!playingInfo->album().isEmpty()) { TQString album = TQStyleSheet::escape(playingInfo->album()); TQString s = playingInfo->year() > 0 - ? TQString("<qt><nobr>%1 (%2)</nobr></qt>").arg(album).arg(playingInfo->year()) - : TQString("<qt><nobr>%1</nobr></qt>").arg(album); + ? TQString("<qt><nobr>%1 (%2)</nobr></qt>").tqarg(album).tqarg(playingInfo->year()) + : TQString("<qt><nobr>%1</nobr></qt>").tqarg(album); m_labels[labelCount++]->setText(s); } @@ -440,9 +440,9 @@ TQPixmap SystemTray::createPixmap(const TQString &pixName) return bgPix; } -void SystemTray::createButtonBox(TQWidget *parent) +void SystemTray::createButtonBox(TQWidget *tqparent) { - TQVBox *buttonBox = new TQVBox(parent); + TQVBox *buttonBox = new TQVBox(tqparent); buttonBox->setSpacing(3); @@ -472,9 +472,9 @@ void SystemTray::slotForward() m_fade = false; } -void SystemTray::addSeparatorLine(TQWidget *parent) +void SystemTray::addSeparatorLine(TQWidget *tqparent) { - TQFrame *line = new TQFrame(parent); + TQFrame *line = new TQFrame(tqparent); line->setFrameShape(TQFrame::VLine); // Cover art takes up 80 pixels, make sure we take up at least 80 pixels @@ -483,9 +483,9 @@ void SystemTray::addSeparatorLine(TQWidget *parent) line->setMinimumHeight(80); } -void SystemTray::addCoverButton(TQWidget *parent, const TQPixmap &cover) +void SystemTray::addCoverButton(TQWidget *tqparent, const TQPixmap &cover) { - TQPushButton *coverButton = new TQPushButton(parent); + TQPushButton *coverButton = new TQPushButton(tqparent); coverButton->setPixmap(cover); coverButton->setFixedSize(cover.size()); @@ -531,8 +531,8 @@ void SystemTray::setToolTip(const TQString &tip, const TQPixmap &cover) TQString html = i18n("%1 is Cover Art, %2 is the playing track, %3 is the appname", "<center><table cellspacing=\"2\"><tr><td valign=\"middle\">%1</td>" "<td valign=\"middle\">%2</td></tr></table><em>%3</em></center>"); - html = html.arg("<img valign=\"middle\" src=\"tipCover\""); - html = html.arg(TQString("<nobr>%1</nobr>").arg(tip), i18n("JuK")); + html = html.tqarg("<img valign=\"middle\" src=\"tipCover\""); + html = html.tqarg(TQString("<nobr>%1</nobr>").tqarg(tip), i18n("JuK")); TQToolTip::add(this, html); } @@ -540,7 +540,7 @@ void SystemTray::setToolTip(const TQString &tip, const TQPixmap &cover) void SystemTray::wheelEvent(TQWheelEvent *e) { - if(e->orientation() == Horizontal) + if(e->orientation() ==Qt::Horizontal) return; // I already know the type here, but this file doesn't (and I don't want it @@ -571,13 +571,13 @@ void SystemTray::wheelEvent(TQWheelEvent *e) void SystemTray::mousePressEvent(TQMouseEvent *e) { switch(e->button()) { - case LeftButton: - case RightButton: + case Qt::LeftButton: + case Qt::RightButton: default: KSystemTray::mousePressEvent(e); break; - case MidButton: - if(!rect().contains(e->pos())) + case Qt::MidButton: + if(!TQT_TQRECT_OBJECT(rect()).tqcontains(e->pos())) return; if(action("pause")->isEnabled()) action("pause")->activate(); @@ -589,7 +589,7 @@ void SystemTray::mousePressEvent(TQMouseEvent *e) /* * This function copies the entirety of src into dest, starting in - * dest at x and y. This function exists because I was unable to find + * dest at x and y. This function exists because I was unable to tqfind * a function like it in either TQImage or kdefx */ diff --git a/juk/systemtray.h b/juk/systemtray.h index 05b3c6dc..0dcb9676 100644 --- a/juk/systemtray.h +++ b/juk/systemtray.h @@ -38,8 +38,9 @@ class FileHandle; class PassiveInfo : public KPassivePopup { Q_OBJECT + TQ_OBJECT public: - PassiveInfo(TQWidget *parent = 0, const char *name = 0); + PassiveInfo(TQWidget *tqparent = 0, const char *name = 0); public slots: void setTimeout(int delay); @@ -64,9 +65,10 @@ private: class SystemTray : public KSystemTray { Q_OBJECT + TQ_OBJECT public: - SystemTray(TQWidget *parent = 0, const char *name = 0); + SystemTray(TQWidget *tqparent = 0, const char *name = 0); virtual ~SystemTray(); signals: @@ -78,7 +80,7 @@ private: virtual void wheelEvent(TQWheelEvent *e); void createPopup(); - void setToolTip(const TQString &tip = TQString::null, const TQPixmap &cover = TQPixmap()); + void setToolTip(const TQString &tip = TQString(), const TQPixmap &cover = TQPixmap()); void mousePressEvent(TQMouseEvent *e); TQPixmap createPixmap(const TQString &pixName); @@ -86,15 +88,15 @@ private: // (because the JuK icon is on the left side of the screen. bool buttonsToLeft() const; - void createButtonBox(TQWidget *parent); + void createButtonBox(TQWidget *tqparent); - // Creates the widget layout for the popup, returning the TQVBox that + // Creates the widget tqlayout for the popup, returning the TQVBox that // holds the text labels. Uses buttonsToLeft() to figure out which // order to create them in. @p file is used to grab the cover. - TQVBox *createPopupLayout(TQWidget *parent, const FileHandle &file); + TQVBox *createPopupLayout(TQWidget *tqparent, const FileHandle &file); - void addSeparatorLine(TQWidget *parent); - void addCoverButton(TQWidget *parent, const TQPixmap &cover); + void addSeparatorLine(TQWidget *tqparent); + void addCoverButton(TQWidget *tqparent, const TQPixmap &cover); // Interpolates from start color to end color. If @p step == 0, then // m_startColor is returned, while @p step == @steps returns diff --git a/juk/tag.cpp b/juk/tag.cpp index 802567dd..a9d37297 100644 --- a/juk/tag.cpp +++ b/juk/tag.cpp @@ -146,10 +146,10 @@ CacheDataStream &Tag::read(CacheDataStream &s) { switch(s.cacheVersion()) { case 1: { - Q_INT32 track; - Q_INT32 year; - Q_INT32 bitrate; - Q_INT32 seconds; + TQ_INT32 track; + TQ_INT32 year; + TQ_INT32 bitrate; + TQ_INT32 seconds; s >> m_title >> m_artist @@ -227,11 +227,11 @@ Tag::Tag(const TQString &fileName, bool) : void Tag::setup(TagLib::File *file) { - m_title = TStringToQString(file->tag()->title()).stripWhiteSpace(); - m_artist = TStringToQString(file->tag()->artist()).stripWhiteSpace(); - m_album = TStringToQString(file->tag()->album()).stripWhiteSpace(); - m_genre = TStringToQString(file->tag()->genre()).stripWhiteSpace(); - m_comment = TStringToQString(file->tag()->comment()).stripWhiteSpace(); + m_title = TQString(TStringToQString(file->tag()->title())).stripWhiteSpace(); + m_artist = TQString(TStringToQString(file->tag()->artist())).stripWhiteSpace(); + m_album = TQString(TStringToQString(file->tag()->album())).stripWhiteSpace(); + m_genre = TQString(TStringToQString(file->tag()->genre())).stripWhiteSpace(); + m_comment = TQString(TStringToQString(file->tag()->comment())).stripWhiteSpace(); m_track = file->tag()->track(); m_year = file->tag()->year(); @@ -245,8 +245,8 @@ void Tag::setup(TagLib::File *file) m_lengthString = TQString::number(minutes) + (seconds >= 10 ? ":" : ":0") + TQString::number(seconds); if(m_title.isEmpty()) { - int i = m_fileName.findRev('/'); - int j = m_fileName.findRev('.'); + int i = m_fileName.tqfindRev('/'); + int j = m_fileName.tqfindRev('.'); m_title = i > 0 ? m_fileName.mid(i + 1, j - i - 1) : m_fileName; } @@ -263,12 +263,12 @@ TQDataStream &operator<<(TQDataStream &s, const Tag &t) << t.artist() << t.album() << t.genre() - << Q_INT32(t.track()) - << Q_INT32(t.year()) + << TQ_INT32(t.track()) + << TQ_INT32(t.year()) << t.comment() - << Q_INT32(t.bitrate()) + << TQ_INT32(t.bitrate()) << t.lengthString() - << Q_INT32(t.seconds()); + << TQ_INT32(t.seconds()); return s; } @@ -24,7 +24,7 @@ class CacheDataStream; /*! * This should really be called "metadata" and may at some point be titled as - * such. Right now it's mostly a Qt wrapper around TagLib. + * such. Right now it's mostly a TQt wrapper around TagLib. */ class Tag diff --git a/juk/tageditor.cpp b/juk/tageditor.cpp index eb2dfa88..4e5299ae 100644 --- a/juk/tageditor.cpp +++ b/juk/tageditor.cpp @@ -46,11 +46,11 @@ using namespace ActionCollection; -class FileNameValidator : public QValidator +class FileNameValidator : public TQValidator { public: - FileNameValidator(TQObject *parent, const char *name = 0) : - TQValidator(parent, name) {} + FileNameValidator(TQObject *tqparent, const char *name = 0) : + TQValidator(tqparent, name) {} virtual void fixup(TQString &s) const { @@ -59,13 +59,13 @@ public: virtual State validate(TQString &s, int &) const { - if(s.find('/') != -1) + if(s.tqfind('/') != -1) return Invalid; return Acceptable; } }; -class FileBoxToolTip : public QToolTip +class FileBoxToolTip : public TQToolTip { public: FileBoxToolTip(TagEditor *editor, TQWidget *widget) : @@ -73,28 +73,28 @@ public: protected: virtual void maybeTip(const TQPoint &) { - tip(parentWidget()->rect(), m_editor->items().first()->file().absFilePath()); + tip(tqparentWidget()->rect(), m_editor->items().first()->file().absFilePath()); } private: TagEditor *m_editor; }; -class FixedHLayout : public QHBoxLayout +class FixedHLayout : public TQHBoxLayout { public: - FixedHLayout(TQWidget *parent, int margin = 0, int spacing = -1, const char *name = 0) : - TQHBoxLayout(parent, margin, spacing, name), + FixedHLayout(TQWidget *tqparent, int margin = 0, int spacing = -1, const char *name = 0) : + TQHBoxLayout(tqparent, margin, spacing, name), m_width(-1) {} - FixedHLayout(TQLayout *parentLayout, int spacing = -1, const char *name = 0) : - TQHBoxLayout(parentLayout, spacing, name), + FixedHLayout(TQLayout *tqparentLayout, int spacing = -1, const char *name = 0) : + TQHBoxLayout(tqparentLayout, spacing, name), m_width(-1) {} void setWidth(int w = -1) { - m_width = w == -1 ? TQHBoxLayout::minimumSize().width() : w; + m_width = w == -1 ? TQHBoxLayout::tqminimumSize().width() : w; } - virtual TQSize minimumSize() const + virtual TQSize tqminimumSize() const { - TQSize s = TQHBoxLayout::minimumSize(); + TQSize s = TQHBoxLayout::tqminimumSize(); s.setWidth(m_width); return s; } @@ -105,9 +105,9 @@ private: class CollectionObserver : public PlaylistObserver { public: - CollectionObserver(TagEditor *parent) : + CollectionObserver(TagEditor *tqparent) : PlaylistObserver(CollectionList::instance()), - m_parent(parent) + m_parent(tqparent) { } @@ -127,8 +127,8 @@ private: // public members //////////////////////////////////////////////////////////////////////////////// -TagEditor::TagEditor(TQWidget *parent, const char *name) : - TQWidget(parent, name), +TagEditor::TagEditor(TQWidget *tqparent, const char *name) : + TQWidget(tqparent, name), m_currentPlaylist(0), m_observer(0), m_performingSave(false) @@ -234,8 +234,8 @@ void TagEditor::slotRefresh() m_bitrateBox->setText(TQString::number(tag->bitrate())); m_lengthBox->setText(tag->lengthString()); - if(m_genreList.findIndex(tag->genre()) >= 0) - m_genreBox->setCurrentItem(m_genreList.findIndex(tag->genre()) + 1); + if(m_genreList.tqfindIndex(tag->genre()) >= 0) + m_genreBox->setCurrentItem(m_genreList.tqfindIndex(tag->genre()) + 1); else { m_genreBox->setCurrentItem(0); m_genreBox->setEditText(tag->genre()); @@ -287,43 +287,43 @@ void TagEditor::slotRefresh() if(tag) { if(m_artistNameBox->currentText() != tag->artist() && - m_enableBoxes.contains(m_artistNameBox)) + m_enableBoxes.tqcontains(m_artistNameBox)) { m_artistNameBox->lineEdit()->clear(); m_enableBoxes[m_artistNameBox]->setChecked(false); } if(m_trackNameBox->text() != tag->title() && - m_enableBoxes.contains(m_trackNameBox)) + m_enableBoxes.tqcontains(m_trackNameBox)) { m_trackNameBox->clear(); m_enableBoxes[m_trackNameBox]->setChecked(false); } if(m_albumNameBox->currentText() != tag->album() && - m_enableBoxes.contains(m_albumNameBox)) + m_enableBoxes.tqcontains(m_albumNameBox)) { m_albumNameBox->lineEdit()->clear(); m_enableBoxes[m_albumNameBox]->setChecked(false); } if(m_genreBox->currentText() != tag->genre() && - m_enableBoxes.contains(m_genreBox)) + m_enableBoxes.tqcontains(m_genreBox)) { m_genreBox->lineEdit()->clear(); m_enableBoxes[m_genreBox]->setChecked(false); } if(m_trackSpin->value() != tag->track() && - m_enableBoxes.contains(m_trackSpin)) + m_enableBoxes.tqcontains(m_trackSpin)) { m_trackSpin->setValue(0); m_enableBoxes[m_trackSpin]->setChecked(false); } if(m_yearSpin->value() != tag->year() && - m_enableBoxes.contains(m_yearSpin)) + m_enableBoxes.tqcontains(m_yearSpin)) { m_yearSpin->setValue(0); m_enableBoxes[m_yearSpin]->setChecked(false); } if(m_commentBox->text() != tag->comment() && - m_enableBoxes.contains(m_commentBox)) + m_enableBoxes.tqcontains(m_commentBox)) { m_commentBox->clear(); m_enableBoxes[m_commentBox]->setChecked(false); @@ -409,7 +409,7 @@ void TagEditor::updateCollection() m_genreList.sort(); m_genreBox->listBox()->clear(); - m_genreBox->listBox()->insertItem(TQString::null); + m_genreBox->listBox()->insertItem(TQString()); m_genreBox->listBox()->insertStringList(m_genreList); m_genreBox->completionObject()->setItems(m_genreList); } @@ -440,7 +440,7 @@ void TagEditor::readConfig() m_genreList.sort(); m_genreBox->clear(); - m_genreBox->insertItem(TQString::null); + m_genreBox->insertItem(TQString()); m_genreBox->insertStringList(m_genreList); m_genreBox->completionObject()->setItems(m_genreList); } @@ -469,11 +469,11 @@ void TagEditor::saveConfig() void TagEditor::setupActions() { - KToggleAction *show = new KToggleAction(i18n("Show &Tag Editor"), "edit", 0, actions(), "showEditor"); + KToggleAction *show = new KToggleAction(i18n("Show &Tag Editor"), "edit", 0, ActionCollection::actions(), "showEditor"); show->setCheckedState(i18n("Hide &Tag Editor")); connect(show, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setShown(bool))); - new KAction(i18n("&Save"), "filesave", "CTRL+t", this, TQT_SLOT(slotSave()), actions(), "saveItem"); + new KAction(i18n("&Save"), "filesave", "CTRL+t", TQT_TQOBJECT(this), TQT_SLOT(slotSave()), ActionCollection::actions(), "saveItem"); } void TagEditor::setupLayout() @@ -481,16 +481,16 @@ void TagEditor::setupLayout() static const int horizontalSpacing = 12; static const int verticalSpacing = 2; - TQHBoxLayout *layout = new TQHBoxLayout(this, 6, horizontalSpacing); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this, 6, horizontalSpacing); ////////////////////////////////////////////////////////////////////////////// - // define two columns of the bottem layout + // define two columns of the bottem tqlayout ////////////////////////////////////////////////////////////////////////////// - TQVBoxLayout *leftColumnLayout = new TQVBoxLayout(layout, verticalSpacing); - TQVBoxLayout *rightColumnLayout = new TQVBoxLayout(layout, verticalSpacing); + TQVBoxLayout *leftColumnLayout = new TQVBoxLayout(tqlayout, verticalSpacing); + TQVBoxLayout *rightColumnLayout = new TQVBoxLayout(tqlayout, verticalSpacing); - layout->setStretchFactor(leftColumnLayout, 2); - layout->setStretchFactor(rightColumnLayout, 3); + tqlayout->setStretchFactor(leftColumnLayout, 2); + tqlayout->setStretchFactor(rightColumnLayout, 3); ////////////////////////////////////////////////////////////////////////////// // put stuff in the left column -- all of the field names are class wide @@ -524,7 +524,7 @@ void TagEditor::setupLayout() horizontalSpacing); m_fileNameBox = new KLineEdit(this, "fileNameBox"); - m_fileNameBox->setValidator(new FileNameValidator(m_fileNameBox)); + m_fileNameBox->setValidator(new FileNameValidator(TQT_TQOBJECT(m_fileNameBox))); TQLabel *fileNameIcon = new TQLabel(this); fileNameIcon->setPixmap(SmallIcon("sound")); @@ -560,7 +560,7 @@ void TagEditor::setupLayout() // addItem(i18n("Length:"), m_lengthBox, trackRowLayout); m_lengthBox->setMinimumWidth(fontMetrics().width("00:00") + trackRowLayout->spacing()); m_lengthBox->setMaximumWidth(50); - m_lengthBox->setAlignment(Qt::AlignRight); + m_lengthBox->tqsetAlignment(TQt::AlignRight); m_lengthBox->setReadOnly(true); trackRowLayout->addWidget(addHidden(m_lengthBox)); @@ -572,7 +572,7 @@ void TagEditor::setupLayout() // addItem(i18n("Bitrate:"), m_bitrateBox, trackRowLayout); m_bitrateBox->setMinimumWidth(fontMetrics().width("000") + trackRowLayout->spacing()); m_bitrateBox->setMaximumWidth(50); - m_bitrateBox->setAlignment(Qt::AlignRight); + m_bitrateBox->tqsetAlignment(TQt::AlignRight); m_bitrateBox->setReadOnly(true); trackRowLayout->addWidget(addHidden(m_bitrateBox)); @@ -580,7 +580,7 @@ void TagEditor::setupLayout() } m_commentBox = new KEdit(this, "commentBox"); - m_commentBox->setTextFormat(Qt::PlainText); + m_commentBox->setTextFormat(TQt::PlainText); addItem(i18n("&Comment:"), m_commentBox, rightColumnLayout, "edit"); fileNameLabel->setMinimumHeight(m_trackSpin->height()); @@ -618,7 +618,7 @@ void TagEditor::save(const PlaylistItemList &list) { if(!list.isEmpty() && m_dataChanged) { - KApplication::setOverrideCursor(Qt::waitCursor); + KApplication::setOverrideCursor(TQt::waitCursor); m_dataChanged = false; m_performingSave = true; @@ -711,9 +711,9 @@ void TagEditor::saveChangesPrompt() } } -void TagEditor::addItem(const TQString &text, TQWidget *item, TQBoxLayout *layout, const TQString &iconName) +void TagEditor::addItem(const TQString &text, TQWidget *item, TQBoxLayout *tqlayout, const TQString &iconName) { - if(!item || !layout) + if(!item || !tqlayout) return; TQLabel *label = new TQLabel(item, text, this); @@ -727,14 +727,14 @@ void TagEditor::addItem(const TQString &text, TQWidget *item, TQBoxLayout *layou label->setMinimumHeight(enableBox->height()); - if(layout->direction() == TQBoxLayout::LeftToRight) { - layout->addWidget(iconLabel); - layout->addWidget(label); - layout->addWidget(item); - layout->addWidget(enableBox); + if(tqlayout->direction() == TQBoxLayout::LeftToRight) { + tqlayout->addWidget(iconLabel); + tqlayout->addWidget(label); + tqlayout->addWidget(item); + tqlayout->addWidget(enableBox); } else { - TQHBoxLayout *l = new TQHBoxLayout(layout); + TQHBoxLayout *l = new TQHBoxLayout(tqlayout); l->addWidget(iconLabel); l->addWidget(label); @@ -745,7 +745,7 @@ void TagEditor::addItem(const TQString &text, TQWidget *item, TQBoxLayout *layou l->addWidget(enableBox); l->setStretchFactor(enableBox, 0); - layout->addWidget(item); + tqlayout->addWidget(item); } enableBox->hide(); @@ -766,7 +766,7 @@ void TagEditor::showEvent(TQShowEvent *e) bool TagEditor::eventFilter(TQObject *watched, TQEvent *e) { - TQKeyEvent *ke = static_cast<TQKeyEvent*>(e); + TQKeyEvent *ke = TQT_TQKEYEVENT(e); if(watched->inherits(TQSPINBOX_OBJECT_NAME_STRING) && e->type() == TQEvent::KeyRelease && ke->state() == 0) slotDataChanged(); diff --git a/juk/tageditor.h b/juk/tageditor.h index c62df207..8a616f15 100644 --- a/juk/tageditor.h +++ b/juk/tageditor.h @@ -34,12 +34,13 @@ typedef TQValueList<PlaylistItem *> PlaylistItemList; class CollectionObserver; -class TagEditor : public QWidget +class TagEditor : public TQWidget { Q_OBJECT + TQ_OBJECT public: - TagEditor(TQWidget *parent = 0, const char *name = 0); + TagEditor(TQWidget *tqparent = 0, const char *name = 0); virtual ~TagEditor(); PlaylistItemList items() const { return m_items; } void setupObservers(); @@ -66,10 +67,10 @@ private: void save(const PlaylistItemList &list); void saveChangesPrompt(); /** - * Adds an item to JuK's tagging layout. This handles the creation and + * Adds an item to JuK's tagging tqlayout. This handles the creation and * placement of the "enable" box as well. */ - void addItem(const TQString &text, TQWidget *item, TQBoxLayout *layout, const TQString &iconName = TQString::null); + void addItem(const TQString &text, TQWidget *item, TQBoxLayout *tqlayout, const TQString &iconName = TQString()); /** * Adds a widget to m_hideList and returns that widget. diff --git a/juk/tagguesser.cpp b/juk/tagguesser.cpp index b540aaf1..a93b5996 100644 --- a/juk/tagguesser.cpp +++ b/juk/tagguesser.cpp @@ -23,7 +23,7 @@ FileNameScheme::FileNameScheme(const TQString &s) m_commentField(-1) { int fieldNumber = 1; - int i = s.find('%'); + int i = s.tqfind('%'); while (i > -1) { switch (s[ i + 1 ]) { case 't': m_titleField = fieldNumber++; @@ -39,7 +39,7 @@ FileNameScheme::FileNameScheme(const TQString &s) default: break; } - i = s.find('%', i + 1); + i = s.tqfind('%', i + 1); } m_regExp.setPattern(composeRegExp(s)); } @@ -50,42 +50,42 @@ bool FileNameScheme::matches(const TQString &fileName) const * does not work as a separator. */ TQString stripped = fileName; - stripped.truncate(stripped.findRev('.')); + stripped.truncate(stripped.tqfindRev('.')); return m_regExp.exactMatch(stripped); } TQString FileNameScheme::title() const { if(m_titleField == -1) - return TQString::null; + return TQString(); return m_regExp.capturedTexts()[ m_titleField ]; } TQString FileNameScheme::artist() const { if(m_artistField == -1) - return TQString::null; + return TQString(); return m_regExp.capturedTexts()[ m_artistField ]; } TQString FileNameScheme::album() const { if(m_albumField == -1) - return TQString::null; + return TQString(); return m_regExp.capturedTexts()[ m_albumField ]; } TQString FileNameScheme::track() const { if(m_trackField == -1) - return TQString::null; + return TQString(); return m_regExp.capturedTexts()[ m_trackField ]; } TQString FileNameScheme::comment() const { if(m_commentField == -1) - return TQString::null; + return TQString(); return m_regExp.capturedTexts()[ m_commentField ]; } @@ -103,7 +103,7 @@ TQString FileNameScheme::composeRegExp(const TQString &s) const TQString regExp = TQRegExp::escape(s.simplifyWhiteSpace()); regExp = ".*" + regExp; - regExp.replace(' ', "\\s+"); + regExp.tqreplace(' ', "\\s+"); regExp = KMacroExpander::expandMacros(regExp, substitutions); regExp += "[^/]*$"; return regExp; @@ -180,18 +180,18 @@ void TagGuesser::loadSchemes() void TagGuesser::guess(const TQString &absFileName) { - m_title = m_artist = m_album = m_track = m_comment = TQString::null; + m_title = m_artist = m_album = m_track = m_comment = TQString(); FileNameScheme::List::ConstIterator it = m_schemes.begin(); FileNameScheme::List::ConstIterator end = m_schemes.end(); for (; it != end; ++it) { const FileNameScheme schema(*it); if(schema.matches(absFileName)) { - m_title = capitalizeWords(schema.title().replace('_', " ")).stripWhiteSpace(); - m_artist = capitalizeWords(schema.artist().replace('_', " ")).stripWhiteSpace(); - m_album = capitalizeWords(schema.album().replace('_', " ")).stripWhiteSpace(); + m_title = capitalizeWords(schema.title().tqreplace('_', " ")).stripWhiteSpace(); + m_artist = capitalizeWords(schema.artist().tqreplace('_', " ")).stripWhiteSpace(); + m_album = capitalizeWords(schema.album().tqreplace('_', " ")).stripWhiteSpace(); m_track = schema.track().stripWhiteSpace(); - m_comment = schema.comment().replace('_', " ").stripWhiteSpace(); + m_comment = schema.comment().tqreplace('_', " ").stripWhiteSpace(); break; } } @@ -206,10 +206,10 @@ TQString TagGuesser::capitalizeWords(const TQString &s) result[ 0 ] = result[ 0 ].upper(); const TQRegExp wordRegExp("\\s\\w"); - int i = result.find( wordRegExp ); + int i = result.tqfind( wordRegExp ); while ( i > -1 ) { result[ i + 1 ] = result[ i + 1 ].upper(); - i = result.find( wordRegExp, ++i ); + i = result.tqfind( wordRegExp, ++i ); } return result; diff --git a/juk/tagguesserconfigdlg.cpp b/juk/tagguesserconfigdlg.cpp index 7caea019..f6f1c469 100644 --- a/juk/tagguesserconfigdlg.cpp +++ b/juk/tagguesserconfigdlg.cpp @@ -20,8 +20,8 @@ #include <tqtoolbutton.h> #include <tqevent.h> -TagGuesserConfigDlg::TagGuesserConfigDlg(TQWidget *parent, const char *name) - : KDialogBase(parent, name, true, i18n("Tag Guesser Configuration"), +TagGuesserConfigDlg::TagGuesserConfigDlg(TQWidget *tqparent, const char *name) + : KDialogBase(tqparent, name, true, i18n("Tag Guesser Configuration"), Ok | Cancel, Ok, true) { m_child = new TagGuesserConfigDlgWidget(this, "child"); diff --git a/juk/tagguesserconfigdlg.h b/juk/tagguesserconfigdlg.h index e0585f07..480e00f3 100644 --- a/juk/tagguesserconfigdlg.h +++ b/juk/tagguesserconfigdlg.h @@ -17,8 +17,9 @@ class TagGuesserConfigDlgWidget; class TagGuesserConfigDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - TagGuesserConfigDlg(TQWidget *parent, const char *name = 0); + TagGuesserConfigDlg(TQWidget *tqparent, const char *name = 0); protected slots: virtual void accept(); diff --git a/juk/tagguesserconfigdlgwidget.ui b/juk/tagguesserconfigdlgwidget.ui index 25d86c0b..23e1a37b 100644 --- a/juk/tagguesserconfigdlgwidget.ui +++ b/juk/tagguesserconfigdlgwidget.ui @@ -1,11 +1,11 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>TagGuesserConfigDlgWidget</class> <author>Frerich Raabe <raabe@kde.org></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Form1</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -70,7 +70,7 @@ Note that the order in which the schemes appear in the list is relevant, since t <string>Press this button to add a new file name scheme to the end of the list.</string> </property> </widget> - <widget class="QToolButton" row="0" column="1"> + <widget class="TQToolButton" row="0" column="1"> <property name="name"> <cstring>bMoveUp</cstring> </property> @@ -84,7 +84,7 @@ Note that the order in which the schemes appear in the list is relevant, since t <string>Press this button to move the currently selected scheme one step upwards.</string> </property> </widget> - <widget class="QToolButton" row="0" column="3"> + <widget class="TQToolButton" row="0" column="3"> <property name="name"> <cstring>bMoveDown</cstring> </property> @@ -136,7 +136,7 @@ Note that the order in which the schemes appear in the list is relevant, since t <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>130</height> @@ -148,8 +148,8 @@ Note that the order in which the schemes appear in the list is relevant, since t <includes> <include location="global" impldecl="in implementation">kdialog.h</include> </includes> -<layoutdefaults spacing="6" margin="0"/> -<layoutfunctions spacing="KDialog::spacingHint"/> +<tqlayoutdefaults spacing="6" margin="0"/> +<tqlayoutfunctions spacing="KDialog::spacingHint"/> <includehints> <includehint>klistview.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/juk/tagguessertest.cpp b/juk/tagguessertest.cpp index b94f9639..adba59db 100644 --- a/juk/tagguessertest.cpp +++ b/juk/tagguessertest.cpp @@ -35,7 +35,7 @@ using std::endl; void check( const TQString &filename, const TQString &title, const TQString &artist, const TQString &track, - const TQString &comment, const TQString &album = TQString::null ) + const TQString &comment, const TQString &album = TQString() ) { cout << "Checking " << filename.latin1() << "..."; TagGuesser guesser( filename ); @@ -72,57 +72,57 @@ int main( int argc, char **argv ) check( "/home/frerich/Chemical Brothers - (01) - Block rockin' beats (Live).mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/Chemical Brothers - (01) - Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null ); + "Block Rockin' Beats", "Chemical Brothers", "01", TQString() ); check( "/home/frerich/Chemical Brothers - [01] - Block rockin' beats [Live].mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/Chemical Brothers - [01] - Block rockin' beats (Live).mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/Chemical Brothers - [01] - Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null ); + "Block Rockin' Beats", "Chemical Brothers", "01", TQString() ); check( "/home/frerich/Chemical Brothers - 01 - Block rockin' beats [Live].mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/Chemical Brothers - 01 - Block rockin' beats (Live).mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/Chemical Brothers - 01 - Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null ); + "Block Rockin' Beats", "Chemical Brothers", "01", TQString() ); check( "/home/frerich/(01) Chemical Brothers - Block rockin' beats [Live].mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/(01) Chemical Brothers - Block rockin' beats (Live).mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/(01) Chemical Brothers - Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null ); + "Block Rockin' Beats", "Chemical Brothers", "01", TQString() ); check( "/home/frerich/[01] Chemical Brothers - Block rockin' beats [Live].mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/[01] Chemical Brothers - Block rockin' beats (Live).mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/[01] Chemical Brothers - Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null ); + "Block Rockin' Beats", "Chemical Brothers", "01", TQString() ); check( "/home/frerich/01 Chemical Brothers - Block rockin' beats [Live].mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/01 Chemical Brothers - Block rockin' beats (Live).mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/01 Chemical Brothers - Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null ); + "Block Rockin' Beats", "Chemical Brothers", "01", TQString() ); check( "/home/frerich/(Chemical Brothers) Block rockin' beats [Live].mp3", - "Block Rockin' Beats", "Chemical Brothers", TQString::null, "Live" ); + "Block Rockin' Beats", "Chemical Brothers", TQString(), "Live" ); check( "/home/frerich/(Chemical Brothers) Block rockin' beats (Live).mp3", - "Block Rockin' Beats", "Chemical Brothers", TQString::null, "Live" ); + "Block Rockin' Beats", "Chemical Brothers", TQString(), "Live" ); check( "/home/frerich/(Chemical Brothers) Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", TQString::null, TQString::null ); + "Block Rockin' Beats", "Chemical Brothers", TQString(), TQString() ); check( "/home/frerich/Chemical Brothers - Block rockin' beats [Live].mp3", - "Block Rockin' Beats", "Chemical Brothers", TQString::null, "Live" ); + "Block Rockin' Beats", "Chemical Brothers", TQString(), "Live" ); check( "/home/frerich/Chemical Brothers - Block rockin' beats (Live).mp3", - "Block Rockin' Beats", "Chemical Brothers", TQString::null, "Live" ); + "Block Rockin' Beats", "Chemical Brothers", TQString(), "Live" ); check( "/home/frerich/Chemical Brothers - Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", TQString::null, TQString::null ); + "Block Rockin' Beats", "Chemical Brothers", TQString(), TQString() ); check( "/home/frerich/mp3/Chemical Brothers/Dig your own hole/[01] Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null, "Dig Your Own Hole"); + "Block Rockin' Beats", "Chemical Brothers", "01", TQString(), "Dig Your Own Hole"); check( TQDir::homeDirPath() + "/[01] Randy - Religion, religion.mp3", - "Religion, Religion", "Randy", "01", TQString::null, TQString::null ); + "Religion, Religion", "Randy", "01", TQString(), TQString() ); check( TQDir::homeDirPath() + "/(3) Mr. Doe - Punk.mp3", - "Punk", "Mr. Doe", "3", TQString::null, TQString::null ); + "Punk", "Mr. Doe", "3", TQString(), TQString() ); check( "c:\\music\\mp3s\\(3) Mr. Doe - Punk.mp3", - "Punk", "Mr. Doe", "3", TQString::null, TQString::null ); + "Punk", "Mr. Doe", "3", TQString(), TQString() ); cout << "All OK" << endl; return 0; } diff --git a/juk/tagrenameroptions.cpp b/juk/tagrenameroptions.cpp index 50f7036d..fc97ac8e 100644 --- a/juk/tagrenameroptions.cpp +++ b/juk/tagrenameroptions.cpp @@ -69,12 +69,12 @@ TagRenamerOptions::TagRenamerOptions(const CategoryID &category) if(categoryNum > 0) typeKey.append(TQString::number(categoryNum)); - setSuffix(config.readEntry(TQString("%1Suffix").arg(typeKey))); - setPrefix(config.readEntry(TQString("%1Prefix").arg(typeKey))); + setSuffix(config.readEntry(TQString("%1Suffix").tqarg(typeKey))); + setPrefix(config.readEntry(TQString("%1Prefix").tqarg(typeKey))); // Default the emptyAction to ignoring the empty tag. - const TQString emptyAction = config.readEntry(TQString("%1EmptyAction").arg(typeKey)).lower(); + const TQString emptyAction = config.readEntry(TQString("%1EmptyAction").tqarg(typeKey)).lower(); setEmptyAction(IgnoreEmptyTag); if(emptyAction == "forceemptyinclude") @@ -82,9 +82,9 @@ TagRenamerOptions::TagRenamerOptions(const CategoryID &category) else if(emptyAction == "usereplacementvalue") setEmptyAction(UseReplacementValue); - setEmptyText(config.readEntry(TQString("%1EmptyText").arg(typeKey))); - setTrackWidth(config.readUnsignedNumEntry(TQString("%1TrackWidth").arg(typeKey))); - setDisabled(config.readBoolEntry(TQString("%1Disabled").arg(typeKey), disabled)); + setEmptyText(config.readEntry(TQString("%1EmptyText").tqarg(typeKey))); + setTrackWidth(config.readUnsignedNumEntry(TQString("%1TrackWidth").tqarg(typeKey))); + setDisabled(config.readBoolEntry(TQString("%1Disabled").tqarg(typeKey), disabled)); } TQString TagRenamerOptions::tagTypeText(TagType type, bool translate) @@ -104,7 +104,7 @@ TQString TagRenamerOptions::tagTypeText(TagType type, bool translate) return translate ? i18n("Unknown") : "Unknown"; } - return translate ? i18n(tags[type]) : tags[type]; + return translate ? TQString(i18n(tags[type])) : TQString(tags[type]); } void TagRenamerOptions::saveConfig(unsigned categoryNum) const @@ -117,8 +117,8 @@ void TagRenamerOptions::saveConfig(unsigned categoryNum) const KConfigGroup config(KGlobal::config(), "FileRenamer"); - config.writeEntry(TQString("%1Suffix").arg(typeKey), suffix()); - config.writeEntry(TQString("%1Prefix").arg(typeKey), prefix()); + config.writeEntry(TQString("%1Suffix").tqarg(typeKey), suffix()); + config.writeEntry(TQString("%1Prefix").tqarg(typeKey), prefix()); TQString emptyStr; @@ -136,12 +136,12 @@ void TagRenamerOptions::saveConfig(unsigned categoryNum) const break; } - config.writeEntry(TQString("%1EmptyAction").arg(typeKey), emptyStr); - config.writeEntry(TQString("%1EmptyText").arg(typeKey), emptyText()); - config.writeEntry(TQString("%1Disabled").arg(typeKey), disabled()); + config.writeEntry(TQString("%1EmptyAction").tqarg(typeKey), emptyStr); + config.writeEntry(TQString("%1EmptyText").tqarg(typeKey), emptyText()); + config.writeEntry(TQString("%1Disabled").tqarg(typeKey), disabled()); if(category() == Track) - config.writeEntry(TQString("%1TrackWidth").arg(typeKey), trackWidth()); + config.writeEntry(TQString("%1TrackWidth").tqarg(typeKey), trackWidth()); config.sync(); } diff --git a/juk/tagtransactionmanager.cpp b/juk/tagtransactionmanager.cpp index cc8b1c80..256b7041 100644 --- a/juk/tagtransactionmanager.cpp +++ b/juk/tagtransactionmanager.cpp @@ -123,7 +123,7 @@ bool TagTransactionManager::undo() return result; } -TagTransactionManager::TagTransactionManager(TQWidget *parent) : TQObject(parent, "tagmanager") +TagTransactionManager::TagTransactionManager(TQWidget *tqparent) : TQObject(tqparent, "tagmanager") { m_manager = this; } @@ -135,7 +135,7 @@ bool TagTransactionManager::renameFile(const TQFileInfo &from, const TQFileInfo if(!to.exists() || KMessageBox::warningContinueCancel( - static_cast<TQWidget *>(parent()), + TQT_TQWIDGET(tqparent()), i18n("This file already exists.\nDo you want to replace it?"), i18n("File Exists"),i18n("Replace")) == KMessageBox::Continue) { @@ -176,7 +176,7 @@ bool TagTransactionManager::processChangeList(bool undo) item->file().setFile(tag->fileName()); item->refreshFromDisk(); - item->repaint(); + item->tqrepaint(); item->playlist()->dataChanged(); item->playlist()->update(); } @@ -200,7 +200,7 @@ bool TagTransactionManager::processChangeList(bool undo) action("edit_undo")->setEnabled(false); if(!errorItems.isEmpty()) - KMessageBox::errorList(static_cast<TQWidget *>(parent()), + KMessageBox::errorList(TQT_TQWIDGET(tqparent()), i18n("The following files were unable to be changed."), errorItems, i18n("Error")); diff --git a/juk/tagtransactionmanager.h b/juk/tagtransactionmanager.h index 7f8ef8d0..7ea38f96 100644 --- a/juk/tagtransactionmanager.h +++ b/juk/tagtransactionmanager.h @@ -40,7 +40,7 @@ class TagTransactionAtom /** * Copy constructor. This takes ownership of the m_tag pointer, so the * object being copied no longer has access to the tag. This function also - * exists mainly for QValueList's benefit. + * exists mainly for TQValueList's benefit. * * @param other The TagTransactionAtom to copy. */ @@ -103,17 +103,18 @@ typedef TQValueList<TagTransactionAtom> TagAlterationList; * * @author Michael Pyne <michael.pyne@kdemail.net> */ -class TagTransactionManager : public QObject +class TagTransactionManager : public TQObject { Q_OBJECT + TQ_OBJECT public: /** - * Constructs a TagTransactionManager, owned by @p parent. + * Constructs a TagTransactionManager, owned by @p tqparent. * - * @param parent The parent TQWidget. + * @param tqparent The tqparent TQWidget. */ - TagTransactionManager(TQWidget *parent = 0); + TagTransactionManager(TQWidget *tqparent = 0); /** * Returns the global TagTransactionManager instance. @@ -137,13 +138,13 @@ class TagTransactionManager : public QObject * object doesn't have a decent copy constructor. * * @param tag The Tag to duplicate. - * @param fileName The filename to assign to the tag. If TQString::null + * @param fileName The filename to assign to the tag. If TQString() * (the default) is passed, the filename of the existing tag is * used. * @bug Tag should have a correct copy ctor and assignment operator. * @return The duplicate Tag. */ - static Tag *duplicateTag(const Tag *tag, const TQString &fileName = TQString::null); + static Tag *duplicateTag(const Tag *tag, const TQString &fileName = TQString()); /** * Commits the changes to the PlaylistItems. It is important that the diff --git a/juk/trackpickerdialog.cpp b/juk/trackpickerdialog.cpp index 407ffea2..ee70ebda 100644 --- a/juk/trackpickerdialog.cpp +++ b/juk/trackpickerdialog.cpp @@ -25,13 +25,13 @@ #include "trackpickerdialog.h" #include "trackpickerdialogbase.h" -#define NUMBER(x) (x == 0 ? TQString::null : TQString::number(x)) +#define NUMBER(x) (x == 0 ? TQString() : TQString::number(x)) class TrackPickerItem : public KListViewItem { public: - TrackPickerItem(KListView *parent, const KTRMResult &result) : - KListViewItem(parent, parent->lastChild(), + TrackPickerItem(KListView *tqparent, const KTRMResult &result) : + KListViewItem(tqparent, tqparent->lastChild(), result.title(), result.artist(), result.album(), NUMBER(result.track()), NUMBER(result.year())), m_result(result) {} @@ -47,8 +47,8 @@ private: TrackPickerDialog::TrackPickerDialog(const TQString &name, const KTRMResultList &results, - TQWidget *parent) : - KDialogBase(parent, name.latin1(), true, i18n("Internet Tag Guesser"), Ok | Cancel, Ok, true) + TQWidget *tqparent) : + KDialogBase(tqparent, name.latin1(), true, i18n("Internet Tag Guesser"), Ok | Cancel, Ok, true) { m_base = new TrackPickerDialogBase(this); setMainWidget(m_base); diff --git a/juk/trackpickerdialog.h b/juk/trackpickerdialog.h index 06450efa..9cc5f347 100644 --- a/juk/trackpickerdialog.h +++ b/juk/trackpickerdialog.h @@ -29,11 +29,12 @@ class TrackPickerDialogBase; class TrackPickerDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: TrackPickerDialog(const TQString &name, const KTRMResultList &results, - TQWidget *parent = 0); + TQWidget *tqparent = 0); virtual ~TrackPickerDialog(); diff --git a/juk/trackpickerdialogbase.ui b/juk/trackpickerdialogbase.ui index b938fb19..69119f46 100644 --- a/juk/trackpickerdialogbase.ui +++ b/juk/trackpickerdialogbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>TrackPickerDialogBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>trackPickerDialogBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>fileLayout</cstring> </property> @@ -24,21 +24,21 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>fileInfoGroup</cstring> </property> <property name="title"> <string>File Name</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>fileLabel</cstring> </property> @@ -50,7 +50,7 @@ <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> <property name="indent"> @@ -61,7 +61,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>trackLayout</cstring> </property> @@ -69,14 +69,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>trackInfoGroup</cstring> </property> <property name="title"> <string>Select Best Possible Match</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> <vbox> @@ -172,7 +172,7 @@ <tabstops> <tabstop>trackList</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> </includehints> diff --git a/juk/tracksequencemanager.h b/juk/tracksequencemanager.h index a83cd508..8d90f7d9 100644 --- a/juk/tracksequencemanager.h +++ b/juk/tracksequencemanager.h @@ -33,9 +33,10 @@ class Playlist; * @see TrackSequenceIterator * @author Michael Pyne <michael.pyne@kdemail.net> */ -class TrackSequenceManager : public QObject +class TrackSequenceManager : public TQObject { Q_OBJECT + TQ_OBJECT public: /** diff --git a/juk/treeviewitemplaylist.cpp b/juk/treeviewitemplaylist.cpp index 22872760..38f85f10 100644 --- a/juk/treeviewitemplaylist.cpp +++ b/juk/treeviewitemplaylist.cpp @@ -52,7 +52,7 @@ void TreeViewItemPlaylist::retag(const TQStringList &files, Playlist *) if(KMessageBox::warningContinueCancelList( this, - i18n("You are about to change the %1 on these files.").arg(changedTag), + i18n("You are about to change the %1 on these files.").tqarg(changedTag), files, i18n("Changing Track Tags"), KStdGuiItem::cont(), diff --git a/juk/treeviewitemplaylist.h b/juk/treeviewitemplaylist.h index be7337c9..de2c13d9 100644 --- a/juk/treeviewitemplaylist.h +++ b/juk/treeviewitemplaylist.h @@ -24,11 +24,12 @@ class TQStringList; class TreeViewItemPlaylist : public SearchPlaylist { Q_OBJECT + TQ_OBJECT public: TreeViewItemPlaylist(PlaylistCollection *collection, const PlaylistSearch &search = PlaylistSearch(), - const TQString &name = TQString::null); + const TQString &name = TQString()); virtual bool searchIsEditable() const { return false; } void retag(const TQStringList &files, Playlist *donorPlaylist); diff --git a/juk/upcomingplaylist.cpp b/juk/upcomingplaylist.cpp index f31e3144..52da900e 100644 --- a/juk/upcomingplaylist.cpp +++ b/juk/upcomingplaylist.cpp @@ -208,7 +208,7 @@ void UpcomingPlaylist::UpcomingSequenceIterator::setCurrent(PlaylistItem *curren } // If the upcoming playlist is playing something, clear it out since - // apparently the user didn't want to hear it. + // aptqparently the user didn't want to hear it. PlaylistItem *playingItem = m_playlist->playingItem(); if(playingItem && playingItem->playlist() == m_playlist && currentItem != playingItem) @@ -250,7 +250,7 @@ TQDataStream &operator<<(TQDataStream &s, const UpcomingPlaylist &p) { PlaylistItemList l = const_cast<UpcomingPlaylist *>(&p)->items(); - s << Q_INT32(l.count()); + s << TQ_INT32(l.count()); for(PlaylistItemList::ConstIterator it = l.begin(); it != l.end(); ++it) s << (*it)->file().absFilePath(); @@ -262,11 +262,11 @@ TQDataStream &operator>>(TQDataStream &s, UpcomingPlaylist &p) { TQString fileName; PlaylistItem *newItem = 0; - Q_INT32 count; + TQ_INT32 count; s >> count; - for(Q_INT32 i = 0; i < count; ++i) { + for(TQ_INT32 i = 0; i < count; ++i) { s >> fileName; newItem = p.createItem(FileHandle(fileName), newItem, false); } diff --git a/juk/upcomingplaylist.h b/juk/upcomingplaylist.h index 4bd7b712..a0a95083 100644 --- a/juk/upcomingplaylist.h +++ b/juk/upcomingplaylist.h @@ -180,7 +180,7 @@ public: /** * This function sets the currently playing item to @a currentItem. If the - * item doesn't belong to the parent UpcomingPlaylist, it will be added to + * item doesn't belong to the tqparent UpcomingPlaylist, it will be added to * the UpcomingPlaylist, replacing any track that may be playing. * Otherwise, it is moved up and set to play, replacing any track that may * be playing. @@ -196,7 +196,7 @@ public: /** * This function readies the UpcomingSequenceIterator for playback, by - * making sure the parent UpcomingPlaylist has items to play if it is + * making sure the tqparent UpcomingPlaylist has items to play if it is * empty. */ virtual void prepareToPlay(Playlist *); diff --git a/juk/viewmode.cpp b/juk/viewmode.cpp index 6c46278b..785f765b 100644 --- a/juk/viewmode.cpp +++ b/juk/viewmode.cpp @@ -49,7 +49,7 @@ ViewMode::~ViewMode() void ViewMode::paintCell(PlaylistBox::Item *item, TQPainter *painter, - const TQColorGroup &colorGroup, + const TQColorGroup &tqcolorGroup, int column, int width, int) { if(width < item->pixmap(column)->width()) @@ -71,7 +71,7 @@ void ViewMode::paintCell(PlaylistBox::Item *item, TQPen newPen = oldPen; newPen.setWidth(5); - newPen.setJoinStyle(RoundJoin); + newPen.setJoinStyle(Qt::RoundJoin); newPen.setColor(TQColorGroup::Highlight); painter->setPen(newPen); @@ -79,21 +79,21 @@ void ViewMode::paintCell(PlaylistBox::Item *item, painter->setPen(oldPen); painter->fillRect(border, border, width - border * 2, item->height() - border * 2 + 1, - colorGroup.brush(TQColorGroup::Highlight)); - painter->setPen(colorGroup.highlightedText()); + tqcolorGroup.brush(TQColorGroup::Highlight)); + painter->setPen(tqcolorGroup.highlightedText()); } else painter->eraseRect(0, 0, width, item->height()); if (!pm->isNull()) { int x = (width - pm->width()) / 2; - x = QMAX(x, item->listView()->itemMargin()); + x = TQMAX(x, item->listView()->itemMargin()); painter->drawPixmap(x, y, *pm); } y += pm->height() + fm.height() - fm.descent(); for(TQStringList::Iterator it = m_lines[item].begin(); it != m_lines[item].end(); ++it) { int x = (width - fm.width(*it)) / 2; - x = QMAX(x, item->listView()->itemMargin()); + x = TQMAX(x, item->listView()->itemMargin()); painter->drawText(x, y, *it); y += fm.height() - fm.descent(); } @@ -104,8 +104,8 @@ void ViewMode::paintCell(PlaylistBox::Item *item, bool ViewMode::eventFilter(TQObject *watched, TQEvent *e) { - if(m_visible && watched == m_playlistBox->viewport() && e->type() == TQEvent::Resize) { - TQResizeEvent *re = static_cast<TQResizeEvent *>(e); + if(m_visible && TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(m_playlistBox->viewport()) && e->type() == TQEvent::Resize) { + TQResizeEvent *re = TQT_TQRESIZEEVENT(e); if(re->size().width() != re->oldSize().width()) m_needsRefresh = true; } @@ -168,7 +168,7 @@ void ViewMode::paintDropIndicator(TQPainter *painter, int width, int height) // TQPen newPen = oldPen; newPen.setWidth(lineWidth); - newPen.setStyle(DotLine); + newPen.setStyle(Qt::DotLine); painter->setPen(newPen); painter->drawRect(border, border, width - border * 2, height - border * 2); @@ -195,7 +195,7 @@ TQStringList ViewMode::lines(const PlaylistBox::Item *item, fm.width(line.mid(0, textLength).stripWhiteSpace()) + item->listView()->itemMargin() * 2 > width) { - int i = line.findRev(TQRegExp( "\\W"), textLength - 1); + int i = line.tqfindRev(TQRegExp( "\\W"), textLength - 1); if(i > 0) textLength = i; else @@ -224,10 +224,10 @@ CompactViewMode::~CompactViewMode() void CompactViewMode::paintCell(PlaylistBox::Item *item, TQPainter *painter, - const TQColorGroup &colorGroup, + const TQColorGroup &tqcolorGroup, int column, int width, int align) { - item->KListViewItem::paintCell(painter, colorGroup, column, width, align); + item->KListViewItem::paintCell(painter, tqcolorGroup, column, width, align); if(item == item->listView()->dropItem()) paintDropIndicator(painter, width, item->height()); } @@ -313,7 +313,7 @@ void TreeViewMode::removeItem(const TQString &item, unsigned column) return; } - if(!m_treeViewItems.find(itemKey)) + if(!m_treeViewItems.tqfind(itemKey)) return; TreeViewItemPlaylist *itemPlaylist = m_treeViewItems[itemKey]; @@ -363,7 +363,7 @@ void TreeViewMode::addItems(const TQStringList &items, unsigned column) item = *it; itemKey = searchCategory + item; - if(m_treeViewItems.find(itemKey)) + if(m_treeViewItems.tqfind(itemKey)) continue; components.clear(); diff --git a/juk/viewmode.h b/juk/viewmode.h index 2f164177..2ef4f007 100644 --- a/juk/viewmode.h +++ b/juk/viewmode.h @@ -26,9 +26,10 @@ class TQColorGroup; class SearchPlaylist; -class ViewMode : public QObject +class ViewMode : public TQObject { Q_OBJECT + TQ_OBJECT public: ViewMode(PlaylistBox *b); @@ -39,7 +40,7 @@ public: virtual void paintCell(PlaylistBox::Item *item, TQPainter *painter, - const TQColorGroup &colorGroup, + const TQColorGroup &tqcolorGroup, int column, int width, int align); virtual bool eventFilter(TQObject *watched, TQEvent *e); @@ -105,7 +106,7 @@ public: virtual void paintCell(PlaylistBox::Item *item, TQPainter *painter, - const TQColorGroup &colorGroup, + const TQColorGroup &tqcolorGroup, int column, int width, int align); virtual void setupItem(PlaylistBox::Item *item) const { item->KListViewItem::setup(); } @@ -120,6 +121,7 @@ class TreeViewItemPlaylist; class TreeViewMode : public CompactViewMode { Q_OBJECT + TQ_OBJECT public: TreeViewMode(PlaylistBox *l); @@ -149,6 +151,7 @@ private: class CoverManagerMode : public ViewMode { Q_OBJECT + TQ_OBJECT public: CoverManagerMode(PlaylistBox *b); diff --git a/juk/webimagefetcher.cpp b/juk/webimagefetcher.cpp index 1e5bec83..f8445bc3 100644 --- a/juk/webimagefetcher.cpp +++ b/juk/webimagefetcher.cpp @@ -37,13 +37,13 @@ WebImage::WebImage(const TQString &imageURL, const TQString &thumbURL, int width, int height) : m_imageURL(imageURL), m_thumbURL(thumbURL), - m_size(TQString("\n%1 x %2").arg(width).arg(height)) + m_size(TQString("\n%1 x %2").tqarg(width).tqarg(height)) { } -WebImageFetcher::WebImageFetcher(TQObject *parent) - : TQObject(parent), +WebImageFetcher::WebImageFetcher(TQObject *tqparent) + : TQObject(tqparent), m_connection(new TQHttp(this)), m_connectionId(-1), m_dialog(0) diff --git a/juk/webimagefetcher.h b/juk/webimagefetcher.h index 803fd434..4c2aafef 100644 --- a/juk/webimagefetcher.h +++ b/juk/webimagefetcher.h @@ -52,12 +52,13 @@ private: typedef TQValueList<WebImage> WebImageList; -class WebImageFetcher : public QObject +class WebImageFetcher : public TQObject { Q_OBJECT + TQ_OBJECT public: - WebImageFetcher(TQObject *parent); + WebImageFetcher(TQObject *tqparent); ~WebImageFetcher(); void setFile(const FileHandle &file); diff --git a/juk/webimagefetcherdialog.cpp b/juk/webimagefetcherdialog.cpp index 5e9e0d0c..32cbbe9b 100644 --- a/juk/webimagefetcherdialog.cpp +++ b/juk/webimagefetcherdialog.cpp @@ -36,8 +36,8 @@ WebImageFetcherDialog::WebImageFetcherDialog(const WebImageList &imageList, const FileHandle &file, - TQWidget *parent) : - KDialogBase(parent, "internet_image_fetcher", true, TQString::null, + TQWidget *tqparent) : + KDialogBase(tqparent, "internet_image_fetcher", true, TQString(), Ok | Cancel | User1 , NoDefault, true), m_pixmap(TQPixmap()), m_imageList(imageList), @@ -86,15 +86,15 @@ void WebImageFetcherDialog::showCreditURL(const TQString &url) { // Don't use static member since I'm sure that someday knowing my luck // Yahoo will change their mimetype they serve. - (void) new KRun(KURL(url), topLevelWidget()); + (void) new KRun(KURL(url), tqtopLevelWidget()); } void WebImageFetcherDialog::setLayout() { setCaption(TQString("%1 - %2 (%3)") - .arg(m_file.tag()->artist()) - .arg(m_file.tag()->album()) - .arg(m_imageList.size())); + .tqarg(m_file.tag()->artist()) + .tqarg(m_file.tag()->album()) + .tqarg(m_imageList.size())); m_iconWidget->clear(); for(uint i = 0; i < m_imageList.size(); i++) @@ -184,8 +184,8 @@ TQPixmap WebImageFetcherDialog::pixmapFromURL(const KURL &url) const // CoverIconViewItem //////////////////////////////////////////////////////////////////////////////// -CoverIconViewItem::CoverIconViewItem(TQIconView *parent, const WebImage &image) : - TQObject(parent), KIconViewItem(parent, parent->lastItem(), image.size()), m_job(0) +CoverIconViewItem::CoverIconViewItem(TQIconView *tqparent, const WebImage &image) : + TQObject(tqparent), KIconViewItem(tqparent, tqparent->lastItem(), image.size()), m_job(0) { // Set up the iconViewItem @@ -218,7 +218,7 @@ CoverIconViewItem::~CoverIconViewItem() void CoverIconViewItem::imageData(KIO::Job *, const TQByteArray &data) { int currentSize = m_buffer.size(); - m_buffer.resize(currentSize + data.size(), TQGArray::SpeedOptim); + m_buffer.tqresize(currentSize + data.size(), TQGArray::SpeedOptim); memcpy(&(m_buffer.data()[currentSize]), data.data(), data.size()); } @@ -228,7 +228,7 @@ void CoverIconViewItem::imageResult(KIO::Job *job) return; TQPixmap iconImage(m_buffer); - iconImage = TQImage(iconImage.convertToImage()).smoothScale(80, 80, TQImage::ScaleMin); + iconImage = TQImage(iconImage.convertToImage()).smoothScale(80, 80, TQ_ScaleMin); setPixmap(iconImage, true, true); } diff --git a/juk/webimagefetcherdialog.h b/juk/webimagefetcherdialog.h index d418a947..bd9eb43e 100644 --- a/juk/webimagefetcherdialog.h +++ b/juk/webimagefetcherdialog.h @@ -27,11 +27,12 @@ class KURL; class WebImageFetcherDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: WebImageFetcherDialog(const WebImageList &urlList, const FileHandle &file, - TQWidget *parent = 0); + TQWidget *tqparent = 0); virtual ~WebImageFetcherDialog(); @@ -73,9 +74,10 @@ namespace KIO class CoverIconViewItem : public TQObject, public KIconViewItem { Q_OBJECT + TQ_OBJECT public: - CoverIconViewItem(TQIconView *parent, const WebImage &image); + CoverIconViewItem(TQIconView *tqparent, const WebImage &image); ~CoverIconViewItem(); private slots: |