diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
commit | e654398e46e37abf457b2b1122ab898d2c51c49f (patch) | |
tree | d39ee6440f3c3663c3ead84a2d4cc2d034667e96 /juk/playlist.h | |
parent | e4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff) | |
download | tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'juk/playlist.h')
-rw-r--r-- | juk/playlist.h | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/juk/playlist.h b/juk/playlist.h index 26c11ff9..a221d20e 100644 --- a/juk/playlist.h +++ b/juk/playlist.h @@ -21,8 +21,8 @@ #include <kdebug.h> #include <kglobalsettings.h> -#include <qvaluevector.h> -#include <qfileinfo.h> +#include <tqvaluevector.h> +#include <tqfileinfo.h> #include "covermanager.h" #include "stringhash.h" @@ -41,7 +41,7 @@ class WebImageFetcher; class PlaylistToolTip; class UpcomingPlaylist; -typedef QValueList<PlaylistItem *> PlaylistItemList; +typedef TQValueList<PlaylistItem *> PlaylistItemList; class Playlist : public KListView, public PlaylistInterface { @@ -49,12 +49,12 @@ class Playlist : public KListView, public PlaylistInterface public: - Playlist(PlaylistCollection *collection, const QString &name = QString::null, - const QString &iconName = "midi"); + Playlist(PlaylistCollection *collection, const TQString &name = TQString::null, + const TQString &iconName = "midi"); Playlist(PlaylistCollection *collection, const PlaylistItemList &items, - const QString &name = QString::null, const QString &iconName = "midi"); - Playlist(PlaylistCollection *collection, const QFileInfo &playlistFile, - const QString &iconName = "midi"); + const TQString &name = TQString::null, const TQString &iconName = "midi"); + Playlist(PlaylistCollection *collection, const TQFileInfo &playlistFile, + const TQString &iconName = "midi"); /** * This constructor should generally only be used either by the cache @@ -68,7 +68,7 @@ public: // The following group of functions implement the PlaylistInterface API. - virtual QString name() const; + virtual TQString name() const; virtual FileHandle currentFile() const; virtual int count() const { return childCount(); } virtual int time() const; @@ -129,7 +129,7 @@ public: /** * All of the (media) files in the list. */ - QStringList files() const; + TQStringList files() const; /** * Returns a list of all of the items in the playlist. @@ -162,7 +162,7 @@ public: * both PlaylistItems and CollectionListItems. */ virtual PlaylistItem *createItem(const FileHandle &file, - QListViewItem *after = 0, + TQListViewItem *after = 0, bool emitChanged = true); /** @@ -174,7 +174,7 @@ public: */ template <class ItemType, class CollectionItemType, class CollectionListType> ItemType *createItem(const FileHandle &file, - QListViewItem *after = 0, + TQListViewItem *after = 0, bool emitChanged = true); virtual void createItems(const PlaylistItemList &siblings, PlaylistItem *after = 0); @@ -188,19 +188,19 @@ public: * items since it has the overhead of checking to see if the file is a playlist * or directory first. */ - virtual void addFiles(const QStringList &files, PlaylistItem *after = 0); + virtual void addFiles(const TQStringList &files, PlaylistItem *after = 0); /** * Returns the file name associated with this playlist (an m3u file) or - * QString::null if no such file exists. + * TQString::null if no such file exists. */ - QString fileName() const { return m_fileName; } + TQString fileName() const { return m_fileName; } /** * Sets the file name to be associated with this playlist; this file should * have the "m3u" extension. */ - void setFileName(const QString &n) { m_fileName = n; } + void setFileName(const TQString &n) { m_fileName = n; } /** * Hides column \a c. If \a updateSearch is true then a signal that the @@ -220,7 +220,7 @@ public: /** * This sets a name for the playlist that is \e different from the file name. */ - void setName(const QString &n); + void setName(const TQString &n); /** * Returns the KActionMenu that allows this to be embedded in menus outside @@ -318,7 +318,7 @@ public: */ void applySharedSettings(); - void read(QDataStream &s); + void read(TQDataStream &s); static void setShuttingDown() { m_shuttingDown = true; } @@ -417,26 +417,26 @@ protected: // the following are all reimplemented from base classes - virtual bool eventFilter(QObject *watched, QEvent *e); - virtual void keyPressEvent(QKeyEvent *e); - virtual QDragObject *dragObject(QWidget *parent); - virtual QDragObject *dragObject() { return dragObject(this); } - virtual bool canDecode(QMimeSource *s); - virtual void decode(QMimeSource *s, PlaylistItem *item = 0); - virtual void contentsDropEvent(QDropEvent *e); - virtual void contentsMouseDoubleClickEvent(QMouseEvent *e); - virtual void contentsDragEnterEvent(QDragEnterEvent *e); - virtual void showEvent(QShowEvent *e); - virtual bool acceptDrag(QDropEvent *e) const; - virtual void viewportPaintEvent(QPaintEvent *pe); - virtual void viewportResizeEvent(QResizeEvent *re); + virtual bool eventFilter(TQObject *watched, TQEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); + virtual TQDragObject *dragObject(TQWidget *parent); + virtual TQDragObject *dragObject() { return dragObject(this); } + virtual bool canDecode(TQMimeSource *s); + virtual void decode(TQMimeSource *s, PlaylistItem *item = 0); + virtual void contentsDropEvent(TQDropEvent *e); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent *e); + virtual void contentsDragEnterEvent(TQDragEnterEvent *e); + virtual void showEvent(TQShowEvent *e); + virtual bool acceptDrag(TQDropEvent *e) const; + virtual void viewportPaintEvent(TQPaintEvent *pe); + virtual void viewportResizeEvent(TQResizeEvent *re); - virtual void insertItem(QListViewItem *item); - virtual void takeItem(QListViewItem *item); + virtual void insertItem(TQListViewItem *item); + virtual void takeItem(TQListViewItem *item); - virtual bool hasItem(const QString &file) const { return m_members.contains(file); } + virtual bool hasItem(const TQString &file) const { return m_members.contains(file); } - void addColumn(const QString &label); + void addColumn(const TQString &label); /** * Here I'm using delayed setup of some things that aren't quite intuitive. @@ -470,7 +470,7 @@ protected: * ItemType should be a PlaylistItem subclass. */ template <class CollectionItemType, class ItemType, class SiblingType> - void createItems(const QValueList<SiblingType *> &siblings, ItemType *after = 0); + void createItems(const TQValueList<SiblingType *> &siblings, ItemType *after = 0); protected slots: void slotPopulateBackMenu() const; @@ -482,7 +482,7 @@ signals: * This is connected to the PlaylistBox::Item to let it know when the * playlist's name has changed. */ - void signalNameChanged(const QString &name); + void signalNameChanged(const TQString &name); /** * This signal is emitted just before a playlist item is removed from the @@ -513,13 +513,13 @@ private: * little awkward API-wise, but keeps us from throwing away useful * information. */ - void loadFile(const QString &fileName, const QFileInfo &fileInfo); + void loadFile(const TQString &fileName, const TQFileInfo &fileInfo); /** * Writes \a text to \a item in \a column. This is used by the inline tag * editor. Returns false if the tag update failed. */ - bool editTag(PlaylistItem *item, const QString &text, int column); + bool editTag(PlaylistItem *item, const TQString &text, int column); /** * Returns the index of the left most visible column in the playlist. @@ -536,14 +536,14 @@ private: * \see visibleItems() * \see selectedItems() */ - PlaylistItemList items(QListViewItemIterator::IteratorFlag flags); + PlaylistItemList items(TQListViewItemIterator::IteratorFlag flags); /** * Build the column "weights" for the weighted width mode. */ void calculateColumnWeights(); - void addFile(const QString &file, FileHandleList &files, bool importPlaylists, + void addFile(const TQString &file, FileHandleList &files, bool importPlaylists, PlaylistItem **after); void addFileHelper(FileHandleList &files, PlaylistItem **after, bool ignoreTimer = false); @@ -555,7 +555,7 @@ private: */ void refreshAlbums(const PlaylistItemList &items, coverKey id = CoverManager::NoMatch); - void refreshAlbum(const QString &artist, const QString &album); + void refreshAlbum(const TQString &artist, const TQString &album); /** * Returns the number of PlaylistItems in @p items that can be assigned a @@ -580,9 +580,9 @@ private slots: /** * Show the RMB menu. Matches the signature for the signal - * QListView::contextMenuRequested(). + * TQListView::contextMenuRequested(). */ - void slotShowRMBMenu(QListViewItem *item, const QPoint &point, int column); + void slotShowRMBMenu(TQListViewItem *item, const TQPoint &point, int column); /** * This slot is called when the inline tag editor has completed its editing @@ -590,7 +590,7 @@ private slots: * * \see editTag() */ - void slotInlineEditDone(QListViewItem *, const QString &, int column); + void slotInlineEditDone(TQListViewItem *, const TQString &, int column); /** * This starts the renaming process by displaying a line edit if the mouse is in @@ -606,7 +606,7 @@ private slots: /** * Moves the column \a from to the position \a to. This matches the signature - * for the signal QHeader::indexChange(). + * for the signal TQHeader::indexChange(). */ void slotColumnOrderChanged(int, int from, int to); @@ -657,7 +657,7 @@ private: bool m_applySharedSettings; bool m_columnWidthModeChanged; - QValueList<int> m_weightDirty; + TQValueList<int> m_weightDirty; bool m_disableColumnWidthUpdates; mutable int m_time; @@ -667,8 +667,8 @@ private: /** * The average minimum widths of columns to be used in balancing calculations. */ - QValueVector<int> m_columnWeights; - QValueVector<int> m_columnFixedWidths; + TQValueVector<int> m_columnWeights; + TQValueVector<int> m_columnFixedWidths; bool m_widthsDirty; static PlaylistItemList m_history; @@ -683,14 +683,14 @@ private: * we can know if something actually changed and as such if we need to save * the tag. */ - QString m_editText; + TQString m_editText; /** * This is only defined if the playlist name is something other than the * file name. */ - QString m_playlistName; - QString m_fileName; + TQString m_playlistName; + TQString m_fileName; KPopupMenu *m_rmbMenu; KPopupMenu *m_headerMenu; @@ -704,7 +704,7 @@ private: static bool m_visibleChanged; static bool m_shuttingDown; static int m_leftColumn; - static QMap<int, PlaylistItem *> m_backMenuItems; + static TQMap<int, PlaylistItem *> m_backMenuItems; bool m_blockDataChanged; }; @@ -714,17 +714,17 @@ bool processEvents(); class FocusUpEvent : public QCustomEvent { public: - FocusUpEvent() : QCustomEvent(id) {} + FocusUpEvent() : TQCustomEvent(id) {} static const int id = 999; }; -QDataStream &operator<<(QDataStream &s, const Playlist &p); -QDataStream &operator>>(QDataStream &s, Playlist &p); +TQDataStream &operator<<(TQDataStream &s, const Playlist &p); +TQDataStream &operator>>(TQDataStream &s, Playlist &p); // template method implementations template <class ItemType, class CollectionItemType, class CollectionListType> -ItemType *Playlist::createItem(const FileHandle &file, QListViewItem *after, +ItemType *Playlist::createItem(const FileHandle &file, TQListViewItem *after, bool emitChanged) { CollectionItemType *item = CollectionListType::instance()->lookup(file.absFilePath()); @@ -773,12 +773,12 @@ ItemType *Playlist::createItem(SiblingType *sibling, ItemType *after) } template <class CollectionItemType, class ItemType, class SiblingType> -void Playlist::createItems(const QValueList<SiblingType *> &siblings, ItemType *after) +void Playlist::createItems(const TQValueList<SiblingType *> &siblings, ItemType *after) { if(siblings.isEmpty()) return; - QValueListConstIterator<SiblingType *> it = siblings.begin(); + TQValueListConstIterator<SiblingType *> it = siblings.begin(); for(; it != siblings.end(); ++it) after = createItem(*it, after); |