summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/dub
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
commit395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch)
tree9829cadb79d2cc7c29a940627fadb28b11e54150 /noatun-plugins/dub
parent399f47c376fdf4d19192732a701ea9578d11619d (diff)
downloadtdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz
tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun-plugins/dub')
-rw-r--r--noatun-plugins/dub/dub/Makefile.am2
-rw-r--r--noatun-plugins/dub/dub/dub.cpp14
-rw-r--r--noatun-plugins/dub/dub/dub.h3
-rw-r--r--noatun-plugins/dub/dub/dubapp.cpp6
-rw-r--r--noatun-plugins/dub/dub/dubapp.h3
-rw-r--r--noatun-plugins/dub/dub/dubconfigmodule.cpp4
-rw-r--r--noatun-plugins/dub/dub/dubconfigmodule.h3
-rw-r--r--noatun-plugins/dub/dub/dubplaylistitem.cpp6
-rw-r--r--noatun-plugins/dub/dub/dubprefs.ui28
-rw-r--r--noatun-plugins/dub/dub/dubview.cpp6
-rw-r--r--noatun-plugins/dub/dub/dubview.h5
-rw-r--r--noatun-plugins/dub/dub/fileselectorwidget.cpp12
-rw-r--r--noatun-plugins/dub/dub/fileselectorwidget.h5
13 files changed, 51 insertions, 46 deletions
diff --git a/noatun-plugins/dub/dub/Makefile.am b/noatun-plugins/dub/dub/Makefile.am
index f49684c..6628217 100644
--- a/noatun-plugins/dub/dub/Makefile.am
+++ b/noatun-plugins/dub/dub/Makefile.am
@@ -1,6 +1,6 @@
kde_module_LTLIBRARIES = noatundub.la
-INCLUDES = $(all_includes)
+INCLUDES = $(all_includes) -I$(kde_includes)/kde
noatundub_la_SOURCES = dubprefs.ui dubplaylistitem.cpp dubplaylist.cpp \
fileselectorwidget.cpp dubview.cpp dubapp.cpp dub.cpp dubconfigmodule.cpp
diff --git a/noatun-plugins/dub/dub/dub.cpp b/noatun-plugins/dub/dub/dub.cpp
index 5de4104..e6b6c81 100644
--- a/noatun-plugins/dub/dub/dub.cpp
+++ b/noatun-plugins/dub/dub/dub.cpp
@@ -174,7 +174,7 @@ KFileItem* Dub::Linear_Seq::last(TQPtrList<KFileItem> & items)
return lastFile;
}
-bool Dub::Linear_Seq::find(TQPtrList<KFileItem> & items, KFileItem* a_file)
+bool Dub::Linear_Seq::tqfind(TQPtrList<KFileItem> & items, KFileItem* a_file)
{
// find file
for (KFileItem *file=items.first(); file; file=items.next() )
@@ -192,7 +192,7 @@ KFileItem* Dub::Linear_Seq::next(TQPtrList<KFileItem> & items,
assert(active_file);
bool found = false;
if (*active_file) {
- if (find(items, *active_file)) {
+ if (tqfind(items, *active_file)) {
KFileItem* next = items.next();
for (; next && !next->isFile(); next = items.next()) ; // find next file
if (next && next->isFile())
@@ -219,7 +219,7 @@ KFileItem* Dub::Linear_Seq::prev(TQPtrList<KFileItem> & items,
bool found = false;
if (*active_file) {
// locate current item
- if (find(items, *active_file)) {
+ if (tqfind(items, *active_file)) {
KFileItem* prev = items.prev();
for (; prev && !prev->isFile(); prev = items.prev()) ; // find prev file
if (prev && prev->isFile()) {
@@ -245,7 +245,7 @@ KFileItem* Dub::Linear_OneDir::first()
if (first)
set_file(&first_file, first);
else {
- if (first_file) { // invalidate first
+ if (first_file) { // tqinvalidate first
delete first_file;
first_file = 0;
}
@@ -281,8 +281,8 @@ Dub::Dir_Node::Dir_Node(TQString d, bool forward)
// process entry list, form a list of subdirs and normal files
file_items.setAutoDelete(true);
TQDir dir_obj(dir);
- QFileInfoList* entries =
- const_cast<QFileInfoList*>(dir_obj.entryInfoList());
+ TQFileInfoList* entries =
+ const_cast<TQFileInfoList*>(dir_obj.entryInfoList());
for ( TQFileInfo *file = entries->first(); file; file = entries->next() ) {
if (file->isDir() && file->absFilePath().length()>d.length()) {
kdDebug(90010) << "dub: dir " << file->absFilePath() << endl;
@@ -451,7 +451,7 @@ void Dub::Recursive_Seq::prev_preorder()
}
else {
TQString subdir = *top->current_subdir;
- kdDebug(90010) << "we have children, pushing now " << subdir << endl;
+ kdDebug(90010) << "we have tqchildren, pushing now " << subdir << endl;
push_dir(subdir, false); // push directory w/ backward iterators
}
}
diff --git a/noatun-plugins/dub/dub/dub.h b/noatun-plugins/dub/dub/dub.h
index da220e8..a114248 100644
--- a/noatun-plugins/dub/dub/dub.h
+++ b/noatun-plugins/dub/dub/dub.h
@@ -47,6 +47,7 @@ class DubPlaylist;
class Dub : public DubApp
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -110,7 +111,7 @@ private:
KFileItem* last(TQPtrList<KFileItem> & items);
KFileItem* next(TQPtrList<KFileItem> & items, KFileItem** active_file);
KFileItem* prev(TQPtrList<KFileItem> & items, KFileItem** active_file);
- bool find(TQPtrList<KFileItem> & items, KFileItem* a_file);
+ bool tqfind(TQPtrList<KFileItem> & items, KFileItem* a_file);
};
// sequencer that traverses current directory in view order
diff --git a/noatun-plugins/dub/dub/dubapp.cpp b/noatun-plugins/dub/dub/dubapp.cpp
index 4908382..2647203 100644
--- a/noatun-plugins/dub/dub/dubapp.cpp
+++ b/noatun-plugins/dub/dub/dubapp.cpp
@@ -34,8 +34,8 @@
#define ID_STATUS_MSG 1
-DubApp::DubApp(TQWidget* parent, const char* name)
- : KMainWindow(parent, name)
+DubApp::DubApp(TQWidget* tqparent, const char* name)
+ : KMainWindow(tqparent, name)
{
kdDebug(90010) << "cons dubapp" << endl;
config=kapp->config();
@@ -54,7 +54,7 @@ DubApp::~DubApp()
void DubApp::initActions()
{
- fileClose = KStdAction::close(this, TQT_SLOT(close()), actionCollection());
+ fileClose = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
setStandardToolBarMenuEnabled(true);
createStandardStatusBarAction();
diff --git a/noatun-plugins/dub/dub/dubapp.h b/noatun-plugins/dub/dub/dubapp.h
index 014d176..9b4f4b7 100644
--- a/noatun-plugins/dub/dub/dubapp.h
+++ b/noatun-plugins/dub/dub/dubapp.h
@@ -31,13 +31,14 @@ class DubView;
class DubApp : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
friend class DubView;
public:
/** construtor of DubApp, calls all init functions to create the application.
*/
- DubApp(TQWidget* parent, const char* name="Dub Playlist");
+ DubApp(TQWidget* tqparent, const char* name="Dub Playlist");
~DubApp();
void initActions();
diff --git a/noatun-plugins/dub/dub/dubconfigmodule.cpp b/noatun-plugins/dub/dub/dubconfigmodule.cpp
index 581bbf2..b227016 100644
--- a/noatun-plugins/dub/dub/dubconfigmodule.cpp
+++ b/noatun-plugins/dub/dub/dubconfigmodule.cpp
@@ -25,8 +25,8 @@
#include "dubconfigmodule.h"
-DubConfigModule::DubConfigModule(TQObject* parent)
- : CModule(i18n("Dub"), i18n("Folder-Based Playlist"), "noatun", parent)
+DubConfigModule::DubConfigModule(TQObject* tqparent)
+ : CModule(i18n("Dub"), i18n("Folder-Based Playlist"), "noatun", tqparent)
, playMode(oneDir)
, playOrder(normal)
{
diff --git a/noatun-plugins/dub/dub/dubconfigmodule.h b/noatun-plugins/dub/dub/dubconfigmodule.h
index 1793017..d2545cd 100644
--- a/noatun-plugins/dub/dub/dubconfigmodule.h
+++ b/noatun-plugins/dub/dub/dubconfigmodule.h
@@ -14,11 +14,12 @@
class DubConfigModule : public CModule
{
Q_OBJECT
+ TQ_OBJECT
public:
enum PlayOrder { normal, shuffle, repeat, single };
enum PlayMode { allFiles, oneDir, recursiveDir };
- DubConfigModule(TQObject *parent);
+ DubConfigModule(TQObject *tqparent);
~DubConfigModule();
diff --git a/noatun-plugins/dub/dub/dubplaylistitem.cpp b/noatun-plugins/dub/dub/dubplaylistitem.cpp
index 62d2e5c..db7a2f2 100644
--- a/noatun-plugins/dub/dub/dubplaylistitem.cpp
+++ b/noatun-plugins/dub/dub/dubplaylistitem.cpp
@@ -40,8 +40,8 @@ DubPlaylistItem::~DubPlaylistItem(){
TQString DubPlaylistItem::property(const TQString &key, const TQString &def) const {
// kdDebug(90010) << "property " << key << endl;
if (isProperty(key)) {
- kdDebug(90010) << key << " -> " << property_map.find(key).data() << endl;
- return property_map.find(key).data();
+ kdDebug(90010) << key << " -> " << property_map.tqfind(key).data() << endl;
+ return property_map.tqfind(key).data();
}
else
return def;
@@ -69,7 +69,7 @@ TQStringList DubPlaylistItem::properties() const {
bool DubPlaylistItem::isProperty(const TQString &key) const {
// kdDebug(90010) << "is property? " << key << endl;
- return (property_map.find(key) != property_map.end());
+ return (property_map.tqfind(key) != property_map.end());
}
KURL DubPlaylistItem::url() const {
diff --git a/noatun-plugins/dub/dub/dubprefs.ui b/noatun-plugins/dub/dub/dubprefs.ui
index 6b27195..c403ae0 100644
--- a/noatun-plugins/dub/dub/dubprefs.ui
+++ b/noatun-plugins/dub/dub/dubprefs.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>DubPrefs</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>DubPrefs</cstring>
</property>
@@ -27,15 +27,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -61,7 +61,7 @@
</widget>
</hbox>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>playMode</cstring>
</property>
@@ -72,7 +72,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>allFiles</cstring>
</property>
@@ -83,7 +83,7 @@
<string>All media files found under Media Home</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>oneDir</cstring>
</property>
@@ -94,7 +94,7 @@
<string>Play current folder only</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>recursiveDir</cstring>
</property>
@@ -110,7 +110,7 @@
</widget>
</vbox>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>playOrder</cstring>
</property>
@@ -121,7 +121,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>normal</cstring>
</property>
@@ -132,7 +132,7 @@
<string>Play files in normal order</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>shuffle</cstring>
</property>
@@ -146,7 +146,7 @@
<string>Randomized order</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>repeat</cstring>
</property>
@@ -160,7 +160,7 @@
<string>Repeat the same file forever</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>single</cstring>
</property>
@@ -178,7 +178,7 @@
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/noatun-plugins/dub/dub/dubview.cpp b/noatun-plugins/dub/dub/dubview.cpp
index 087e92e..1522918 100644
--- a/noatun-plugins/dub/dub/dubview.cpp
+++ b/noatun-plugins/dub/dub/dubview.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-// include files for Qt
+// include files for TQt
#include <tqprinter.h>
#include <tqpainter.h>
#include <kdebug.h>
@@ -26,12 +26,12 @@
#include "dub.h"
#include "fileselectorwidget.h"
-//DubView::DubView(TQWidget *parent, const char *name) : TQWidget(parent, name)
+//DubView::DubView(TQWidget *tqparent, const char *name) : TQWidget(tqparent, name)
//{
// setBackgroundMode(PaletteBase);
//}
-DubView::DubView(TQWidget *parent) : FileSelectorWidget(parent)
+DubView::DubView(TQWidget *tqparent) : FileSelectorWidget(tqparent)
{
kdDebug(90010) << "dub view cons" << endl;
setBackgroundMode(PaletteBase);
diff --git a/noatun-plugins/dub/dub/dubview.h b/noatun-plugins/dub/dub/dubview.h
index 079b833..a83d7cb 100644
--- a/noatun-plugins/dub/dub/dubview.h
+++ b/noatun-plugins/dub/dub/dubview.h
@@ -22,7 +22,7 @@
#include <config.h>
#endif
-// include files for Qt
+// include files for TQt
#include <tqwidget.h>
#include <fileselectorwidget.h>
@@ -31,9 +31,10 @@
class DubView : public FileSelectorWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor for the main view */
- DubView(TQWidget *parent = 0);
+ DubView(TQWidget *tqparent = 0);
/** Destructor for the main view */
~DubView();
diff --git a/noatun-plugins/dub/dub/fileselectorwidget.cpp b/noatun-plugins/dub/dub/fileselectorwidget.cpp
index c030040..f809629 100644
--- a/noatun-plugins/dub/dub/fileselectorwidget.cpp
+++ b/noatun-plugins/dub/dub/fileselectorwidget.cpp
@@ -36,11 +36,11 @@
#include "fileselectorwidget.h"
-FileSelectorWidget::FileSelectorWidget(TQWidget *parent)
- : TQWidget(parent, "file selector widget")
+FileSelectorWidget::FileSelectorWidget(TQWidget *tqparent)
+ : TQWidget(tqparent, "file selector widget")
{
- // widgets and layout
+ // widgets and tqlayout
TQVBoxLayout* lo = new TQVBoxLayout(this);
@@ -66,12 +66,12 @@ FileSelectorWidget::FileSelectorWidget(TQWidget *parent)
hlow->setMaximumHeight(up->height());
cmbPath = new KURLComboBox( KURLComboBox::Directories, true, this, "path combo" );
- cmbPath->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
+ cmbPath->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
KURLCompletion* cmpl = new KURLCompletion();
cmbPath->setCompletionObject( cmpl );
lo->addWidget(cmbPath);
- dir = new KDirOperator(TQString::null, this, "operator");
+ dir = new KDirOperator(TQString(), this, "operator");
dir->setView(KFile::Detail);
lo->addWidget(dir);
lo->setStretchFactor(dir, 2);
@@ -80,7 +80,7 @@ FileSelectorWidget::FileSelectorWidget(TQWidget *parent)
filterIcon = new TQLabel(filterBox);
filterIcon->setPixmap( BarIcon("filter") );
filter = new KHistoryCombo(filterBox, "filter");
- filter->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
+ filter->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
filterBox->setStretchFactor(filter, 2);
lo->addWidget(filterBox);
diff --git a/noatun-plugins/dub/dub/fileselectorwidget.h b/noatun-plugins/dub/dub/fileselectorwidget.h
index e31b721..516e3ce 100644
--- a/noatun-plugins/dub/dub/fileselectorwidget.h
+++ b/noatun-plugins/dub/dub/fileselectorwidget.h
@@ -31,14 +31,15 @@
class DubPlayListItem;
-class FileSelectorWidget : public QWidget
+class FileSelectorWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
friend class DubPlayListItem;
public:
- FileSelectorWidget(TQWidget *parent);
+ FileSelectorWidget(TQWidget *tqparent);
~FileSelectorWidget();
KDirOperator* dirOperator() {return dir;}