summaryrefslogtreecommitdiffstats
path: root/amarok/src/mediabrowser.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-18 03:28:57 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-18 03:28:57 +0000
commit1d9d9f5ce46f0220f7b1b350f5ad4e6dc5079ac6 (patch)
tree728d80ad748a95d7aa27ee020706dbe985e0e8cb /amarok/src/mediabrowser.h
parente9db3e45ed0189bbe18125b120da394a5bc8a832 (diff)
downloadamarok-1d9d9f5ce46f0220f7b1b350f5ad4e6dc5079ac6.tar.gz
amarok-1d9d9f5ce46f0220f7b1b350f5ad4e6dc5079ac6.zip
Finish TQt4 porting of Amarok
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/amarok@1228394 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'amarok/src/mediabrowser.h')
-rw-r--r--amarok/src/mediabrowser.h58
1 files changed, 31 insertions, 27 deletions
diff --git a/amarok/src/mediabrowser.h b/amarok/src/mediabrowser.h
index d8837dea..bffb7616 100644
--- a/amarok/src/mediabrowser.h
+++ b/amarok/src/mediabrowser.h
@@ -46,10 +46,10 @@ class TQPalette;
class LIBAMAROK_EXPORT MediaItem : public KListViewItem
{
public:
- MediaItem( TQListView* parent );
- MediaItem( TQListViewItem* parent );
- MediaItem( TQListView* parent, TQListViewItem* after );
- MediaItem( TQListViewItem* parent, TQListViewItem* after );
+ MediaItem( TQListView* tqparent );
+ MediaItem( TQListViewItem* tqparent );
+ MediaItem( TQListView* tqparent, TQListViewItem* after );
+ MediaItem( TQListViewItem* tqparent, TQListViewItem* after );
void init();
virtual ~MediaItem();
@@ -125,9 +125,10 @@ class LIBAMAROK_EXPORT MediaItem : public KListViewItem
class MediaQueue : public KListView, public DropProxyTarget
{
Q_OBJECT
+ TQ_OBJECT
public:
- MediaQueue(MediaBrowser *parent);
+ MediaQueue(MediaBrowser *tqparent);
MediaItem *findPath( TQString path );
KIO::filesize_t totalSize() const; // total size of items to transfer in KB
@@ -142,9 +143,9 @@ class MediaQueue : public KListView, public DropProxyTarget
void save( const TQString &path );
void syncPlaylist( const TQString &playlistName, const TQString &sql, bool loading=false );
void syncPlaylist( const TQString &playlistName, const KURL &url, bool loading=false );
- void addURL( const KURL& url, MetaBundle *bundle=NULL, const TQString &playlistName=TQString::null );
+ void addURL( const KURL& url, MetaBundle *bundle=NULL, const TQString &playlistName=TQString() );
void addURL( const KURL& url, MediaItem *item );
- void addURLs( const KURL::List urls, const TQString &playlistName=TQString::null );
+ void addURLs( const KURL::List urls, const TQString &playlistName=TQString() );
void URLsAdded(); // call after finishing adding single urls
@@ -159,18 +160,19 @@ class MediaQueue : public KListView, public DropProxyTarget
private slots:
void selectAll() {TQListView::selectAll(true); }
void slotShowContextMenu( TQListViewItem* item, const TQPoint& point, int );
- void slotDropped (TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after);
+ void slotDropped (TQDropEvent* e, TQListViewItem* tqparent, TQListViewItem* after);
private:
void keyPressEvent( TQKeyEvent *e );
- MediaBrowser *m_parent;
+ MediaBrowser *m_tqparent;
mutable KIO::filesize_t m_totalSize;
};
-class MediaBrowser : public QVBox
+class MediaBrowser : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
friend class DeviceConfigureDialog;
friend class MediaDevice;
friend class MediaView;
@@ -278,6 +280,7 @@ class MediaBrowser : public QVBox
class MediaView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
friend class MediaBrowser;
friend class MediaDevice;
@@ -289,12 +292,12 @@ class MediaView : public KListView
OnlyPlayed = 2
};
- MediaView( TQWidget *parent, MediaDevice *device );
+ MediaView( TQWidget *tqparent, MediaDevice *device );
virtual ~MediaView();
LIBAMAROK_EXPORT KURL::List nodeBuildDragList( MediaItem* item, int flags=OnlySelected );
- int getSelectedLeaves(MediaItem *parent, TQPtrList<MediaItem> *list, int flags=OnlySelected );
- LIBAMAROK_EXPORT MediaItem *newDirectory( MediaItem* parent );
- bool setFilter( const TQString &filter, MediaItem *parent=NULL );
+ int getSelectedLeaves(MediaItem *tqparent, TQPtrList<MediaItem> *list, int flags=OnlySelected );
+ LIBAMAROK_EXPORT MediaItem *newDirectory( MediaItem* tqparent );
+ bool setFilter( const TQString &filter, MediaItem *tqparent=NULL );
private slots:
void rmbPressed( TQListViewItem*, const TQPoint&, int );
@@ -312,7 +315,7 @@ class MediaView : public KListView
bool acceptDrag( TQDropEvent *e ) const;
TQDragObject *dragObject();
- TQWidget *m_parent;
+ TQWidget *m_tqparent;
MediaDevice *m_device;
MediaItemTip *m_toolTip;
};
@@ -325,6 +328,7 @@ class MediaView : public KListView
class LIBAMAROK_EXPORT MediaDevice : public TQObject, public Amarok::Plugin
{
Q_OBJECT
+ TQ_OBJECT
friend class DeviceConfigureDialog;
friend class TransferDialog;
friend class MediaBrowser;
@@ -341,7 +345,7 @@ class LIBAMAROK_EXPORT MediaDevice : public TQObject, public Amarok::Plugin
};
MediaDevice();
- virtual void init( MediaBrowser* parent );
+ virtual void init( MediaBrowser* tqparent );
virtual ~MediaDevice();
MediaView *view();
@@ -378,7 +382,7 @@ class LIBAMAROK_EXPORT MediaDevice : public TQObject, public Amarok::Plugin
/**
* Adds particular tracks to a playlist
- * @param playlist parent playlist for tracks to be added to
+ * @param playlist tqparent playlist for tracks to be added to
* @param after insert following this item
* @param items tracks to add to playlist
*/
@@ -387,15 +391,15 @@ class LIBAMAROK_EXPORT MediaDevice : public TQObject, public Amarok::Plugin
/**
* Create a new playlist
* @param name playlist title
- * @param parent parent MediaItem of the new playlist
+ * @param tqparent tqparent MediaItem of the new playlist
* @param items tracks to add to the new playlist
* @return the newly created playlist
*/
- virtual MediaItem *newPlaylist(const TQString &name, MediaItem *parent, TQPtrList<MediaItem> items) { Q_UNUSED(name); Q_UNUSED(parent); Q_UNUSED(items); return 0; }
+ virtual MediaItem *newPlaylist(const TQString &name, MediaItem *tqparent, TQPtrList<MediaItem> items) { Q_UNUSED(name); Q_UNUSED(tqparent); Q_UNUSED(items); return 0; }
/**
* Move items to a directory
- * @param directory new parent of dropped items
+ * @param directory new tqparent of dropped items
* @param items tracks to add to the directory
*/
virtual void addToDirectory( MediaItem *directory, TQPtrList<MediaItem> items ) { Q_UNUSED(directory); Q_UNUSED(items); }
@@ -403,11 +407,11 @@ class LIBAMAROK_EXPORT MediaDevice : public TQObject, public Amarok::Plugin
/**
* Create a new directory
* @param name directory title
- * @param parent parent MediaItem of the new directory
+ * @param tqparent tqparent MediaItem of the new directory
* @param items tracks to add to the new directory
* @return the newly created directory
*/
- virtual MediaItem *newDirectory( const TQString &name, MediaItem *parent ) { Q_UNUSED(name); Q_UNUSED(parent); return 0; }
+ virtual MediaItem *newDirectory( const TQString &name, MediaItem *tqparent ) { Q_UNUSED(name); Q_UNUSED(tqparent); return 0; }
/**
* Notify device of changed tags
@@ -440,12 +444,12 @@ class LIBAMAROK_EXPORT MediaDevice : public TQObject, public Amarok::Plugin
*/
virtual bool needsManualConfig() { return true; }
- virtual void addConfigElements( TQWidget * /*parent*/ ) {}
- virtual void removeConfigElements( TQWidget * /*parent*/ ) {}
+ virtual void addConfigElements( TQWidget * /*tqparent*/ ) {}
+ virtual void removeConfigElements( TQWidget * /*tqparent*/ ) {}
virtual void applyConfig() {}
virtual void loadConfig();
- TQString configString( const TQString &name, const TQString &defValue = TQString::null );
+ TQString configString( const TQString &name, const TQString &defValue = TQString() );
void setConfigString( const TQString &name, const TQString &value );
bool configBool( const TQString &name, bool defValue=false );
void setConfigBool( const TQString &name, bool value );
@@ -528,7 +532,7 @@ class LIBAMAROK_EXPORT MediaDevice : public TQObject, public Amarok::Plugin
int sysCall(const TQString & command);
int runPreConnectCommand();
int runPostDisconnectCommand();
- TQString replaceVariables( const TQString &cmd ); // replace %m with mount point and %d with device node
+ TQString replaceVariables( const TQString &cmd ); // tqreplace %m with mount point and %d with device node
/**
* Find a particular track
@@ -626,7 +630,7 @@ class LIBAMAROK_EXPORT MediaDevice : public TQObject, public Amarok::Plugin
bool m_transcodeRemove;
KShellProcess *sysProc;
- MediaBrowser *m_parent;
+ MediaBrowser *m_tqparent;
MediaView *m_view;
Medium m_medium;
TQString m_transferDir;