summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/dub
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
commit7346aee26bf190a7e70333c40fab4caca847cd27 (patch)
tree4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /noatun-plugins/dub
parent23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff)
downloadtdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz
tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun-plugins/dub')
-rw-r--r--noatun-plugins/dub/dub/dub.cpp60
-rw-r--r--noatun-plugins/dub/dub/dub.h38
-rw-r--r--noatun-plugins/dub/dub/dubapp.cpp14
-rw-r--r--noatun-plugins/dub/dub/dubapp.h6
-rw-r--r--noatun-plugins/dub/dub/dubconfigmodule.cpp16
-rw-r--r--noatun-plugins/dub/dub/dubconfigmodule.h4
-rw-r--r--noatun-plugins/dub/dub/dubplaylistitem.cpp12
-rw-r--r--noatun-plugins/dub/dub/dubplaylistitem.h14
-rw-r--r--noatun-plugins/dub/dub/dubview.cpp16
-rw-r--r--noatun-plugins/dub/dub/dubview.h8
-rw-r--r--noatun-plugins/dub/dub/fileselectorwidget.cpp92
-rw-r--r--noatun-plugins/dub/dub/fileselectorwidget.h28
12 files changed, 154 insertions, 154 deletions
diff --git a/noatun-plugins/dub/dub/dub.cpp b/noatun-plugins/dub/dub/dub.cpp
index 4faf221..5de4104 100644
--- a/noatun-plugins/dub/dub/dub.cpp
+++ b/noatun-plugins/dub/dub/dub.cpp
@@ -16,9 +16,9 @@
***************************************************************************/
// include files for QT
-#include <qdir.h>
-#include <qprinter.h>
-#include <qpainter.h>
+#include <tqdir.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
// include files for KDE
#include <kiconloader.h>
@@ -62,17 +62,17 @@ Dub::Dub(DubPlaylist* plist)
, shuffle_recursive(this)
{
connect( view->dirOperator(),
- SIGNAL(fileSelected(const KFileItem*)),
+ TQT_SIGNAL(fileSelected(const KFileItem*)),
this,
- SLOT(fileSelected(const KFileItem*)) );
+ TQT_SLOT(fileSelected(const KFileItem*)) );
connect( dubconfig.prefs->mediaDirectory,
- SIGNAL( urlSelected (const QString &) ),
+ TQT_SIGNAL( urlSelected (const TQString &) ),
this,
- SLOT( mediaHomeSelected (const QString &) ) );
+ TQT_SLOT( mediaHomeSelected (const TQString &) ) );
connect( this,
- SIGNAL(setMediaHome(KURL)),
+ TQT_SIGNAL(setMediaHome(KURL)),
view,
- SLOT(setDir(KURL)) );
+ TQT_SLOT(setDir(KURL)) );
configure_sequencing();
emit setMediaHome(dubconfig.mediaDirectory);
}
@@ -84,7 +84,7 @@ void Dub::fileSelected(const KFileItem * file) {
playlist.setCurrent(file, true);
}
-void Dub::mediaHomeSelected(const QString& url) {
+void Dub::mediaHomeSelected(const TQString& url) {
kdDebug(90010) << "media home selected:" << endl;
emit setMediaHome( KURL(url) );
}
@@ -148,7 +148,7 @@ void Dub::Sequencer::set_file(KFileItem** file, KFileItem* val) {
kdDebug(90010) << "set_file to " << val->url() << endl;
}
-KFileItem* Dub::Linear_Seq::first(QPtrList<KFileItem> & items)
+KFileItem* Dub::Linear_Seq::first(TQPtrList<KFileItem> & items)
{
// find first file
KFileItem* firstFile = 0;
@@ -161,7 +161,7 @@ KFileItem* Dub::Linear_Seq::first(QPtrList<KFileItem> & items)
return firstFile;
}
-KFileItem* Dub::Linear_Seq::last(QPtrList<KFileItem> & items)
+KFileItem* Dub::Linear_Seq::last(TQPtrList<KFileItem> & items)
{
// find last file
KFileItem* lastFile = 0;
@@ -174,7 +174,7 @@ KFileItem* Dub::Linear_Seq::last(QPtrList<KFileItem> & items)
return lastFile;
}
-bool Dub::Linear_Seq::find(QPtrList<KFileItem> & items, KFileItem* a_file)
+bool Dub::Linear_Seq::find(TQPtrList<KFileItem> & items, KFileItem* a_file)
{
// find file
for (KFileItem *file=items.first(); file; file=items.next() )
@@ -185,7 +185,7 @@ bool Dub::Linear_Seq::find(QPtrList<KFileItem> & items, KFileItem* a_file)
return false;
}
-KFileItem* Dub::Linear_Seq::next(QPtrList<KFileItem> & items,
+KFileItem* Dub::Linear_Seq::next(TQPtrList<KFileItem> & items,
KFileItem** active_file)
{
KFileItem* ret = 0;
@@ -211,7 +211,7 @@ KFileItem* Dub::Linear_Seq::next(QPtrList<KFileItem> & items,
return ret;
}
-KFileItem* Dub::Linear_Seq::prev(QPtrList<KFileItem> & items,
+KFileItem* Dub::Linear_Seq::prev(TQPtrList<KFileItem> & items,
KFileItem** active_file)
{
KFileItem* ret = 0;
@@ -274,16 +274,16 @@ void Dub::Linear_OneDir::prev()
}
}
-Dub::Dir_Node::Dir_Node(QString d, bool forward)
+Dub::Dir_Node::Dir_Node(TQString d, bool forward)
: dir(d), past_begin(false)
{
kdDebug(90010) << "cons dir node " << d << endl;
// process entry list, form a list of subdirs and normal files
file_items.setAutoDelete(true);
- QDir dir_obj(dir);
+ TQDir dir_obj(dir);
QFileInfoList* entries =
const_cast<QFileInfoList*>(dir_obj.entryInfoList());
- for ( QFileInfo *file = entries->first(); file; file = entries->next() ) {
+ for ( TQFileInfo *file = entries->first(); file; file = entries->next() ) {
if (file->isDir() && file->absFilePath().length()>d.length()) {
kdDebug(90010) << "dub: dir " << file->absFilePath() << endl;
subdirs.append(file->absFilePath());
@@ -330,7 +330,7 @@ Dub::Recursive_Seq::Recursive_Seq()
void Dub::Recursive_Seq::init(const KURL & root)
{
- QString new_root = canonical_path(root.path());
+ TQString new_root = canonical_path(root.path());
if (recursion_root != new_root) {
// change recursion stack
recursion_root = new_root;
@@ -341,16 +341,16 @@ void Dub::Recursive_Seq::init(const KURL & root)
}
// get canonical path, we need this
-QString Dub::Recursive_Seq::canonical_path(QString dir)
+TQString Dub::Recursive_Seq::canonical_path(TQString dir)
{
// kdDebug(90010) << "canonical_path " << dir << endl;
//assert(dir.isLocalFile());
- QDir path(dir);
+ TQDir path(dir);
return path.canonicalPath();
}
// check if dir is contained in the stack
-bool Dub::Recursive_Seq::check_dir(QString dir)
+bool Dub::Recursive_Seq::check_dir(TQString dir)
{
kdDebug(90010) << "check_dir " << dir << endl;
bool found = false;
@@ -362,10 +362,10 @@ bool Dub::Recursive_Seq::check_dir(QString dir)
return found;
}
-bool Dub::Recursive_Seq::push_dir(QString dir, bool forward)
+bool Dub::Recursive_Seq::push_dir(TQString dir, bool forward)
{
kdDebug(90010) << "push_dir " << dir << ", forward?" << forward << endl;
- QString cpath = canonical_path(dir);
+ TQString cpath = canonical_path(dir);
if (check_dir(cpath)) // is it in stack?
return false; // avoid infinite recursion
else {
@@ -434,7 +434,7 @@ void Dub::Recursive_Seq::next_preorder()
pop_preorder(true); // pop if subtrees done
}
else {
- QString subdir = *top->current_subdir; // we have a subdir
+ TQString subdir = *top->current_subdir; // we have a subdir
push_dir(subdir, true); // push directory w/ forward iterators
}
}
@@ -450,7 +450,7 @@ void Dub::Recursive_Seq::prev_preorder()
pop_preorder(false);
}
else {
- QString subdir = *top->current_subdir;
+ TQString subdir = *top->current_subdir;
kdDebug(90010) << "we have children, pushing now " << subdir << endl;
push_dir(subdir, false); // push directory w/ backward iterators
}
@@ -478,7 +478,7 @@ void Dub::Linear_Recursive::next()
{
assert(!play_stack.isEmpty());
Dir_Node* top = top_dir();
- QString dir = top->dir;
+ TQString dir = top->dir;
top->current_file = top->file_items.next();
kdDebug(90010) << "dub current dir: " << dir << endl;
kdDebug(90010) << "dub current file: " << top->current_file << endl;
@@ -505,7 +505,7 @@ void Dub::Linear_Recursive::prev()
{
assert(!play_stack.isEmpty());
Dir_Node* top = top_dir();
- QString dir = top->dir;
+ TQString dir = top->dir;
top->current_file = top->file_items.prev();
kdDebug(90010) << "dub current dir: " << dir << endl;
kdDebug(90010) << "dub current file: " << top->current_file << endl;
@@ -528,7 +528,7 @@ void Dub::Linear_Recursive::prev()
}
}
-void Dub::Shuffle_OneDir::init(const QString& dir)
+void Dub::Shuffle_OneDir::init(const TQString& dir)
{
if (shuffle_dir != dir) {
kdDebug(90010) << "shuffle/onedir init" << endl;
@@ -537,7 +537,7 @@ void Dub::Shuffle_OneDir::init(const QString& dir)
// make a deep copy
items.clear();
- QPtrList<KFileItem> & view_items = dub.view->items(); //
+ TQPtrList<KFileItem> & view_items = dub.view->items(); //
for (KFileItem *file=view_items.first(); file; file=view_items.next() )
if (file->isFile()) // add only files
items.append(new KFileItem(*file));
diff --git a/noatun-plugins/dub/dub/dub.h b/noatun-plugins/dub/dub/dub.h
index 5317f86..da220e8 100644
--- a/noatun-plugins/dub/dub/dub.h
+++ b/noatun-plugins/dub/dub/dub.h
@@ -55,7 +55,7 @@ public:
public slots:
/** A file selected */
void fileSelected(const KFileItem*);
- void mediaHomeSelected(const QString& url);
+ void mediaHomeSelected(const TQString& url);
signals:
void setMediaHome(KURL);
@@ -106,11 +106,11 @@ private:
// linear sequencing subsystem
struct Linear_Seq : public Sequencer {
Linear_Seq(Dub* d) : Sequencer(d) {}
- KFileItem* first(QPtrList<KFileItem> & items);
- KFileItem* last(QPtrList<KFileItem> & items);
- KFileItem* next(QPtrList<KFileItem> & items, KFileItem** active_file);
- KFileItem* prev(QPtrList<KFileItem> & items, KFileItem** active_file);
- bool find(QPtrList<KFileItem> & items, KFileItem* a_file);
+ KFileItem* first(TQPtrList<KFileItem> & items);
+ 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);
};
// sequencer that traverses current directory in view order
@@ -127,11 +127,11 @@ private:
// directory node for recursive play
struct Dir_Node
{
- Dir_Node(QString dir, bool forward = true);
- QString dir;
- QStringList subdirs;
- QStringList::iterator current_subdir;
- QPtrList<KFileItem> file_items;
+ Dir_Node(TQString dir, bool forward = true);
+ TQString dir;
+ TQStringList subdirs;
+ TQStringList::iterator current_subdir;
+ TQPtrList<KFileItem> file_items;
KFileItem* current_file;
void init_traversal(bool forward);
bool past_begin; // stupid iterators
@@ -141,11 +141,11 @@ private:
struct Recursive_Seq {
Recursive_Seq();
void init(const KURL & root);
- QString canonical_path(QString dir);
- bool check_dir(QString dir);
+ TQString canonical_path(TQString dir);
+ bool check_dir(TQString dir);
Dir_Node* top_dir() { return play_stack.getLast(); }
Dir_Node* bottom_dir() { return play_stack.getFirst(); }
- bool push_dir(QString dir, bool forward = true);
+ bool push_dir(TQString dir, bool forward = true);
bool pop_dir();
bool advance(bool forward = true);
void pop_preorder(bool forward = true);
@@ -153,8 +153,8 @@ private:
void prev_preorder();
void print_stack();
- QString recursion_root;
- QPtrList<Dir_Node> play_stack;
+ TQString recursion_root;
+ TQPtrList<Dir_Node> play_stack;
};
// sequencer to make a preorder walk of the directory tree
@@ -175,7 +175,7 @@ private:
items.setAutoDelete(true);
}
virtual ~Shuffle_OneDir() {};
- void init(const QString& dir);
+ void init(const TQString& dir);
KFileItem* first();
void next();
void prev();
@@ -184,7 +184,7 @@ private:
int play_index;
std::vector<int> play_order;
KURL shuffle_dir;
- QPtrList<KFileItem> items;
+ TQPtrList<KFileItem> items;
};
Shuffle_OneDir shuffle_onedir;
@@ -198,7 +198,7 @@ private:
void next();
void prev();
- QString shuffle_root;
+ TQString shuffle_root;
};
Shuffle_Recursive shuffle_recursive;
diff --git a/noatun-plugins/dub/dub/dubapp.cpp b/noatun-plugins/dub/dub/dubapp.cpp
index 7097940..4908382 100644
--- a/noatun-plugins/dub/dub/dubapp.cpp
+++ b/noatun-plugins/dub/dub/dubapp.cpp
@@ -12,9 +12,9 @@
//
// include files for QT
-#include <qdir.h>
-#include <qprinter.h>
-#include <qpainter.h>
+#include <tqdir.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
// include files for KDE
#include <kiconloader.h>
@@ -34,7 +34,7 @@
#define ID_STATUS_MSG 1
-DubApp::DubApp(QWidget* parent, const char* name)
+DubApp::DubApp(TQWidget* parent, const char* name)
: KMainWindow(parent, name)
{
kdDebug(90010) << "cons dubapp" << endl;
@@ -54,7 +54,7 @@ DubApp::~DubApp()
void DubApp::initActions()
{
- fileClose = KStdAction::close(this, SLOT(close()), actionCollection());
+ fileClose = KStdAction::close(this, TQT_SLOT(close()), actionCollection());
setStandardToolBarMenuEnabled(true);
createStandardStatusBarAction();
@@ -83,7 +83,7 @@ void DubApp::initView()
// slots
-void DubApp::slotStatusMsg(const QString &text)
+void DubApp::slotStatusMsg(const TQString &text)
{
// change status message permanently
statusBar()->clear();
@@ -92,7 +92,7 @@ void DubApp::slotStatusMsg(const QString &text)
// events
-void DubApp::closeEvent(QCloseEvent*)
+void DubApp::closeEvent(TQCloseEvent*)
{
hide();
}
diff --git a/noatun-plugins/dub/dub/dubapp.h b/noatun-plugins/dub/dub/dubapp.h
index e06a2fe..014d176 100644
--- a/noatun-plugins/dub/dub/dubapp.h
+++ b/noatun-plugins/dub/dub/dubapp.h
@@ -37,7 +37,7 @@ class DubApp : public KMainWindow
public:
/** construtor of DubApp, calls all init functions to create the application.
*/
- DubApp(QWidget* parent, const char* name="Dub Playlist");
+ DubApp(TQWidget* parent, const char* name="Dub Playlist");
~DubApp();
void initActions();
@@ -55,7 +55,7 @@ public:
}
protected:
- virtual void closeEvent(QCloseEvent*e);
+ virtual void closeEvent(TQCloseEvent*e);
private:
KConfig *config;
@@ -75,7 +75,7 @@ public slots:
/** changes the statusbar contents for the standard label permanently, used to indicate current actions.
* @param text the text that is displayed in the statusbar
*/
- void slotStatusMsg(const QString &text);
+ void slotStatusMsg(const TQString &text);
/** get a pointer to view object */
};
diff --git a/noatun-plugins/dub/dub/dubconfigmodule.cpp b/noatun-plugins/dub/dub/dubconfigmodule.cpp
index ff1f3dd..581bbf2 100644
--- a/noatun-plugins/dub/dub/dubconfigmodule.cpp
+++ b/noatun-plugins/dub/dub/dubconfigmodule.cpp
@@ -18,19 +18,19 @@
#include <kurlrequester.h>
#include <kdebug.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
#include "dubconfigmodule.h"
-DubConfigModule::DubConfigModule(QObject* parent)
+DubConfigModule::DubConfigModule(TQObject* parent)
: CModule(i18n("Dub"), i18n("Folder-Based Playlist"), "noatun", parent)
, playMode(oneDir)
, playOrder(normal)
{
- QVBoxLayout *vbox = new QVBoxLayout(this);
+ TQVBoxLayout *vbox = new TQVBoxLayout(this);
vbox->setAutoAdd(true);
vbox->setSpacing( 0 );
vbox->setMargin( 0 );
@@ -52,7 +52,7 @@ void DubConfigModule::save(void)
mediaDirectory = prefs->mediaDirectory->url();
- QButton* selectedMode = prefs->playMode->selected();
+ TQButton* selectedMode = prefs->playMode->selected();
if (selectedMode==prefs->allFiles)
playMode = DubConfigModule::allFiles;
else
@@ -61,7 +61,7 @@ void DubConfigModule::save(void)
else
playMode = DubConfigModule::oneDir;
- QButton* selectedOrder = prefs->playOrder->selected();
+ TQButton* selectedOrder = prefs->playOrder->selected();
if (selectedOrder==prefs->shuffle)
playOrder = DubConfigModule::shuffle;
else
diff --git a/noatun-plugins/dub/dub/dubconfigmodule.h b/noatun-plugins/dub/dub/dubconfigmodule.h
index cfb662b..1793017 100644
--- a/noatun-plugins/dub/dub/dubconfigmodule.h
+++ b/noatun-plugins/dub/dub/dubconfigmodule.h
@@ -18,7 +18,7 @@ public:
enum PlayOrder { normal, shuffle, repeat, single };
enum PlayMode { allFiles, oneDir, recursiveDir };
- DubConfigModule(QObject *parent);
+ DubConfigModule(TQObject *parent);
~DubConfigModule();
@@ -28,7 +28,7 @@ public:
void apply();
/** The directory in which media files are stored */
- QString mediaDirectory;
+ TQString mediaDirectory;
PlayMode playMode;
PlayOrder playOrder;
diff --git a/noatun-plugins/dub/dub/dubplaylistitem.cpp b/noatun-plugins/dub/dub/dubplaylistitem.cpp
index d38eb24..62d2e5c 100644
--- a/noatun-plugins/dub/dub/dubplaylistitem.cpp
+++ b/noatun-plugins/dub/dub/dubplaylistitem.cpp
@@ -37,7 +37,7 @@ DubPlaylistItem::~DubPlaylistItem(){
PlaylistItemData::removeRef();
}
-QString DubPlaylistItem::property(const QString &key, const QString &def) const {
+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;
@@ -47,19 +47,19 @@ QString DubPlaylistItem::property(const QString &key, const QString &def) const
return def;
}
-void DubPlaylistItem::setProperty(const QString &key, const QString &val) {
+void DubPlaylistItem::setProperty(const TQString &key, const TQString &val) {
// kdDebug(90010) << "set property" << endl;
property_map[key] = val;
}
-void DubPlaylistItem::clearProperty(const QString &key) {
+void DubPlaylistItem::clearProperty(const TQString &key) {
// kdDebug(90010) << "clear property" << endl;
property_map.remove(key);
}
-QStringList DubPlaylistItem::properties() const {
+TQStringList DubPlaylistItem::properties() const {
// kdDebug(90010) << "properties" << endl;
- QStringList list;
+ TQStringList list;
for (Properties::const_iterator i=property_map.begin();
i!=property_map.end(); i++) {
list.append(i.data());
@@ -67,7 +67,7 @@ QStringList DubPlaylistItem::properties() const {
return list;
}
-bool DubPlaylistItem::isProperty(const QString &key) const {
+bool DubPlaylistItem::isProperty(const TQString &key) const {
// kdDebug(90010) << "is property? " << key << endl;
return (property_map.find(key) != property_map.end());
}
diff --git a/noatun-plugins/dub/dub/dubplaylistitem.h b/noatun-plugins/dub/dub/dubplaylistitem.h
index 6f7a96d..f61daaf 100644
--- a/noatun-plugins/dub/dub/dubplaylistitem.h
+++ b/noatun-plugins/dub/dub/dubplaylistitem.h
@@ -31,11 +31,11 @@ public:
DubPlaylistItem(const KFileItem&);
virtual ~DubPlaylistItem();
- virtual QString property(const QString &, const QString & = 0) const;
- virtual void setProperty(const QString &, const QString &);
- virtual void clearProperty(const QString &);
- virtual QStringList properties() const;
- virtual bool isProperty(const QString &) const;
+ virtual TQString property(const TQString &, const TQString & = 0) const;
+ virtual void setProperty(const TQString &, const TQString &);
+ virtual void clearProperty(const TQString &);
+ virtual TQStringList properties() const;
+ virtual bool isProperty(const TQString &) const;
virtual KURL url() const;
KFileItem& getFileItem() {
return fileItem;
@@ -45,10 +45,10 @@ public:
private:
KFileItem fileItem;
- typedef QMap<QString,QString> Properties;
+ typedef TQMap<TQString,TQString> Properties;
Properties property_map;
-// virtual QString file() const;
+// virtual TQString file() const;
};
diff --git a/noatun-plugins/dub/dub/dubview.cpp b/noatun-plugins/dub/dub/dubview.cpp
index e1e4713..087e92e 100644
--- a/noatun-plugins/dub/dub/dubview.cpp
+++ b/noatun-plugins/dub/dub/dubview.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
// include files for Qt
-#include <qprinter.h>
-#include <qpainter.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// application specific includes
@@ -26,12 +26,12 @@
#include "dub.h"
#include "fileselectorwidget.h"
-//DubView::DubView(QWidget *parent, const char *name) : QWidget(parent, name)
+//DubView::DubView(TQWidget *parent, const char *name) : TQWidget(parent, name)
//{
// setBackgroundMode(PaletteBase);
//}
-DubView::DubView(QWidget *parent) : FileSelectorWidget(parent)
+DubView::DubView(TQWidget *parent) : FileSelectorWidget(parent)
{
kdDebug(90010) << "dub view cons" << endl;
setBackgroundMode(PaletteBase);
@@ -41,9 +41,9 @@ DubView::~DubView()
{
}
-void DubView::print(QPrinter *pPrinter)
+void DubView::print(TQPrinter *pPrinter)
{
- QPainter printpainter;
+ TQPainter printpainter;
printpainter.begin(pPrinter);
// TODO: add your printing code here
@@ -51,9 +51,9 @@ void DubView::print(QPrinter *pPrinter)
printpainter.end();
}
/** Return item list of view */
-QPtrList<KFileItem>& DubView::items()
+TQPtrList<KFileItem>& DubView::items()
{
- return const_cast<QPtrList<KFileItem>&>( *dirOperator()->view()->items() );
+ return const_cast<TQPtrList<KFileItem>&>( *dirOperator()->view()->items() );
}
/** Select a file */
diff --git a/noatun-plugins/dub/dub/dubview.h b/noatun-plugins/dub/dub/dubview.h
index c768ca6..079b833 100644
--- a/noatun-plugins/dub/dub/dubview.h
+++ b/noatun-plugins/dub/dub/dubview.h
@@ -23,7 +23,7 @@
#endif
// include files for Qt
-#include <qwidget.h>
+#include <tqwidget.h>
#include <fileselectorwidget.h>
@@ -33,15 +33,15 @@ class DubView : public FileSelectorWidget
Q_OBJECT
public:
/** Constructor for the main view */
- DubView(QWidget *parent = 0);
+ DubView(TQWidget *parent = 0);
/** Destructor for the main view */
~DubView();
/** contains the implementation for printing functionality */
- void print(QPrinter *pPrinter);
+ void print(TQPrinter *pPrinter);
/** Return item list of view */
- QPtrList<KFileItem>& items();
+ TQPtrList<KFileItem>& items();
/** select a particular file */
void selectFile(KFileItem* file);
diff --git a/noatun-plugins/dub/dub/fileselectorwidget.cpp b/noatun-plugins/dub/dub/fileselectorwidget.cpp
index 153af20..c030040 100644
--- a/noatun-plugins/dub/dub/fileselectorwidget.cpp
+++ b/noatun-plugins/dub/dub/fileselectorwidget.cpp
@@ -14,12 +14,12 @@
* *
***************************************************************************/
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qstrlist.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqstrlist.h>
+#include <tqtooltip.h>
#include <kiconloader.h>
#include <kurlcombobox.h>
@@ -36,79 +36,79 @@
#include "fileselectorwidget.h"
-FileSelectorWidget::FileSelectorWidget(QWidget *parent)
- : QWidget(parent, "file selector widget")
+FileSelectorWidget::FileSelectorWidget(TQWidget *parent)
+ : TQWidget(parent, "file selector widget")
{
// widgets and layout
- QVBoxLayout* lo = new QVBoxLayout(this);
+ TQVBoxLayout* lo = new TQVBoxLayout(this);
- QHBox *hlow = new QHBox (this);
+ TQHBox *hlow = new TQHBox (this);
lo->addWidget(hlow);
- home = new QPushButton( hlow );
+ home = new TQPushButton( hlow );
home->setPixmap(SmallIcon("gohome"));
- QToolTip::add(home, i18n("Home folder"));
- up = new QPushButton( /*i18n("&Up"),*/ hlow );
+ TQToolTip::add(home, i18n("Home folder"));
+ up = new TQPushButton( /*i18n("&Up"),*/ hlow );
up->setPixmap(SmallIcon("up"));
- QToolTip::add(up, i18n("Up one level"));
- back = new QPushButton( /*i18n("&Back"),*/ hlow );
+ TQToolTip::add(up, i18n("Up one level"));
+ back = new TQPushButton( /*i18n("&Back"),*/ hlow );
back->setPixmap(SmallIcon("back"));
- QToolTip::add(back, i18n("Previous folder"));
- forward = new QPushButton( /*i18n("&Next"),*/ hlow );
+ TQToolTip::add(back, i18n("Previous folder"));
+ forward = new TQPushButton( /*i18n("&Next"),*/ hlow );
forward->setPixmap(SmallIcon("forward"));
- QToolTip::add(forward, i18n("Next folder"));
+ TQToolTip::add(forward, i18n("Next folder"));
// HACK
- QWidget* spacer = new QWidget(hlow);
+ TQWidget* spacer = new TQWidget(hlow);
hlow->setStretchFactor(spacer, 1);
hlow->setMaximumHeight(up->height());
cmbPath = new KURLComboBox( KURLComboBox::Directories, true, this, "path combo" );
- cmbPath->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+ cmbPath->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
KURLCompletion* cmpl = new KURLCompletion();
cmbPath->setCompletionObject( cmpl );
lo->addWidget(cmbPath);
- dir = new KDirOperator(QString::null, this, "operator");
+ dir = new KDirOperator(TQString::null, this, "operator");
dir->setView(KFile::Detail);
lo->addWidget(dir);
lo->setStretchFactor(dir, 2);
- QHBox* filterBox = new QHBox(this);
- filterIcon = new QLabel(filterBox);
+ TQHBox* filterBox = new TQHBox(this);
+ filterIcon = new TQLabel(filterBox);
filterIcon->setPixmap( BarIcon("filter") );
filter = new KHistoryCombo(filterBox, "filter");
- filter->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+ filter->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
filterBox->setStretchFactor(filter, 2);
lo->addWidget(filterBox);
// slots and signals
- connect( filter, SIGNAL( activated(const QString&) ), SLOT( slotFilterChange(const QString&) ) );
- connect( filter, SIGNAL( returnPressed(const QString&) ),filter, SLOT( addToHistory(const QString&) ) );
+ connect( filter, TQT_SIGNAL( activated(const TQString&) ), TQT_SLOT( slotFilterChange(const TQString&) ) );
+ connect( filter, TQT_SIGNAL( returnPressed(const TQString&) ),filter, TQT_SLOT( addToHistory(const TQString&) ) );
- connect( home, SIGNAL( clicked() ), dir, SLOT( home() ) );
- connect( up, SIGNAL( clicked() ), dir, SLOT( cdUp() ) );
- connect( back, SIGNAL( clicked() ), dir, SLOT( back() ) );
- connect( forward, SIGNAL( clicked() ), dir, SLOT( forward() ) );
+ connect( home, TQT_SIGNAL( clicked() ), dir, TQT_SLOT( home() ) );
+ connect( up, TQT_SIGNAL( clicked() ), dir, TQT_SLOT( cdUp() ) );
+ connect( back, TQT_SIGNAL( clicked() ), dir, TQT_SLOT( back() ) );
+ connect( forward, TQT_SIGNAL( clicked() ), dir, TQT_SLOT( forward() ) );
- connect( cmbPath, SIGNAL( urlActivated( const KURL& )),
- this, SLOT( cmbPathActivated( const KURL& ) ));
- connect( cmbPath, SIGNAL( returnPressed( const QString& )),
- this, SLOT( cmbPathReturnPressed( const QString& ) ));
- connect(dir, SIGNAL(urlEntered(const KURL&)),
- this, SLOT(dirUrlEntered(const KURL&)) );
+ connect( cmbPath, TQT_SIGNAL( urlActivated( const KURL& )),
+ this, TQT_SLOT( cmbPathActivated( const KURL& ) ));
+ connect( cmbPath, TQT_SIGNAL( returnPressed( const TQString& )),
+ this, TQT_SLOT( cmbPathReturnPressed( const TQString& ) ));
+ connect(dir, TQT_SIGNAL(urlEntered(const KURL&)),
+ this, TQT_SLOT(dirUrlEntered(const KURL&)) );
- connect(dir, SIGNAL(finishedLoading()),
- this, SLOT(dirFinishedLoading()) );
+ connect(dir, TQT_SIGNAL(finishedLoading()),
+ this, TQT_SLOT(dirFinishedLoading()) );
- connect(dir, SIGNAL(fileHighlighted(const KFileItem *)),
- SLOT(fileHighlighted(const KFileItem *)));
- connect(dir, SIGNAL(fileSelected(const KFileItem *)),
- SLOT(fileSelected(const KFileItem *)));
+ connect(dir, TQT_SIGNAL(fileHighlighted(const KFileItem *)),
+ TQT_SLOT(fileHighlighted(const KFileItem *)));
+ connect(dir, TQT_SIGNAL(fileSelected(const KFileItem *)),
+ TQT_SLOT(fileSelected(const KFileItem *)));
kdDebug(90010) << "connected stuff!" << endl;
}
@@ -122,7 +122,7 @@ KURL FileSelectorWidget::currentDirectory()
return dirLister()->url();
}
-void FileSelectorWidget::slotFilterChange( const QString & nf )
+void FileSelectorWidget::slotFilterChange( const TQString & nf )
{
dir->setNameFilter( nf );
dir->rereadDir();
@@ -133,7 +133,7 @@ void FileSelectorWidget::cmbPathActivated( const KURL& u )
dir->setURL( u, true );
}
-void FileSelectorWidget::cmbPathReturnPressed( const QString& u )
+void FileSelectorWidget::cmbPathReturnPressed( const TQString& u )
{
dir->setFocus();
dir->setURL( KURL(u), true );
@@ -143,7 +143,7 @@ void FileSelectorWidget::cmbPathReturnPressed( const QString& u )
void FileSelectorWidget::dirUrlEntered( const KURL& u )
{
cmbPath->removeURL( u );
- QStringList urls = cmbPath->urls();
+ TQStringList urls = cmbPath->urls();
urls.prepend( u.url() );
while ( urls.count() >= (uint)cmbPath->maxItems() )
urls.remove( urls.last() );
@@ -162,7 +162,7 @@ void FileSelectorWidget::dirFinishedLoading()
}
-void FileSelectorWidget::focusInEvent(QFocusEvent*)
+void FileSelectorWidget::focusInEvent(TQFocusEvent*)
{
dir->setFocus();
}
diff --git a/noatun-plugins/dub/dub/fileselectorwidget.h b/noatun-plugins/dub/dub/fileselectorwidget.h
index 724173a..e31b721 100644
--- a/noatun-plugins/dub/dub/fileselectorwidget.h
+++ b/noatun-plugins/dub/dub/fileselectorwidget.h
@@ -12,16 +12,16 @@
#ifndef _FILESELECTORWIDGET_H_
#define _FILESELECTORWIDGET_H_
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qstrlist.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqstrlist.h>
+#include <tqtooltip.h>
#include <klistview.h>
-#include <qvbox.h>
-#include <qwidget.h>
+#include <tqvbox.h>
+#include <tqwidget.h>
#include <kfile.h>
#include <kurlcombobox.h>
#include <kurlcompletion.h>
@@ -38,7 +38,7 @@ class FileSelectorWidget : public QWidget
friend class DubPlayListItem;
public:
- FileSelectorWidget(QWidget *parent);
+ FileSelectorWidget(TQWidget *parent);
~FileSelectorWidget();
KDirOperator* dirOperator() {return dir;}
@@ -46,12 +46,12 @@ public:
KURL currentDirectory();
public slots:
- void slotFilterChange(const QString&);
+ void slotFilterChange(const TQString&);
void setDir(KURL);
private slots:
void cmbPathActivated( const KURL& u );
- void cmbPathReturnPressed( const QString& u );
+ void cmbPathReturnPressed( const TQString& u );
void dirUrlEntered( const KURL& u );
void dirFinishedLoading();
void fileHighlighted(const KFileItem *);
@@ -59,15 +59,15 @@ private slots:
// void setCurrentDocDir();
protected:
- void focusInEvent(QFocusEvent*);
+ void focusInEvent(TQFocusEvent*);
private:
KURLComboBox *cmbPath;
KHistoryCombo * filter;
- QLabel* filterIcon;
+ TQLabel* filterIcon;
KDirOperator * dir;
- QPushButton *home, *up, *back, *forward, *cfdir;
+ TQPushButton *home, *up, *back, *forward, *cfdir;
};