summaryrefslogtreecommitdiffstats
path: root/sidebar
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-03-25 20:03:28 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-03-25 20:03:28 +0100
commit2ee99ab520931c5efe91123c85ba10064a45e95d (patch)
treea367666e410de28d0f258aed77b11e17cafb28e4 /sidebar
parentcfa36e1a95e82492c17225ff376911abb3688f62 (diff)
downloadtde-style-baghira-2ee99ab520931c5efe91123c85ba10064a45e95d.tar.gz
tde-style-baghira-2ee99ab520931c5efe91123c85ba10064a45e95d.zip
Initial TQt conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'sidebar')
-rw-r--r--sidebar/baghirasidebar.cpp16
-rw-r--r--sidebar/baghirasidebar.h12
-rw-r--r--sidebar/baghirasidebariface.h6
-rw-r--r--sidebar/dndlistbox.cpp220
-rw-r--r--sidebar/dndlistbox.h88
-rw-r--r--sidebar/linkconfig.ui14
-rw-r--r--sidebar/linkview.cpp84
-rw-r--r--sidebar/linkview.h12
-rw-r--r--sidebar/listboxlink.cpp30
-rw-r--r--sidebar/listboxlink.h44
10 files changed, 263 insertions, 263 deletions
diff --git a/sidebar/baghirasidebar.cpp b/sidebar/baghirasidebar.cpp
index 0969bad..e24ebdf 100644
--- a/sidebar/baghirasidebar.cpp
+++ b/sidebar/baghirasidebar.cpp
@@ -1,6 +1,6 @@
#include <kinstance.h>
-#include <qsplitter.h>
+#include <tqsplitter.h>
#include <kiconloader.h>
#include <stdlib.h>
#include "dndlistbox.h"
@@ -9,20 +9,20 @@
#include "baghirasidebar.h"
#include "baghirasidebar.moc"
-baghiraSidebar::baghiraSidebar(KInstance *inst,QObject *parent,QWidget *widgetParent, QString &desktopName, const char* name):
+baghiraSidebar::baghiraSidebar(KInstance *inst,TQObject *parent,TQWidget *widgetParent, TQString &desktopName, const char* name):
KonqSidebarPlugin(inst,parent,widgetParent,desktopName,name)
{
scrollView = new LinkView(widgetParent);
- scrollView->setHScrollBarMode(QScrollView::AlwaysOff);
- connect (scrollView->Hardware(), SIGNAL(clicked(QListBoxItem *)), this, SLOT(callURL(QListBoxItem *)));
- connect (scrollView->Locations(), SIGNAL(clicked(QListBoxItem *)), this, SLOT(callURL(QListBoxItem *)));
+ scrollView->setHScrollBarMode(TQScrollView::AlwaysOff);
+ connect (scrollView->Hardware(), SIGNAL(clicked(TQListBoxItem *)), this, SLOT(callURL(TQListBoxItem *)));
+ connect (scrollView->Locations(), SIGNAL(clicked(TQListBoxItem *)), this, SLOT(callURL(TQListBoxItem *)));
}
baghiraSidebar::~baghiraSidebar()
{
}
-void baghiraSidebar::callURL(QListBoxItem *item)
+void baghiraSidebar::callURL(TQListBoxItem *item)
{
emit openURLRequest(KURL(((ListBoxLink*)(item))->URL()), KParts::URLArgs(true,0,0));
}
@@ -46,7 +46,7 @@ void baghiraSidebar::handleURL(const KURL &url)
}
extern "C" {
- KDE_EXPORT bool add_konqsidebar_baghirasidebar(QString* fn, QString* param, QMap<QString,QString> *map) {
+ KDE_EXPORT bool add_konqsidebar_baghirasidebar(TQString* fn, TQString* param, TQMap<TQString,TQString> *map) {
Q_UNUSED(param);
map->insert("Type", "Link");
@@ -61,7 +61,7 @@ extern "C" {
extern "C"
{
- void* create_konqsidebar_baghirasidebar(KInstance *instance,QObject *par,QWidget *widp,QString &desktopname,const char *name)
+ void* create_konqsidebar_baghirasidebar(KInstance *instance,TQObject *par,TQWidget *widp,TQString &desktopname,const char *name)
{
return new baghiraSidebar(instance,par,widp,desktopname,name);
}
diff --git a/sidebar/baghirasidebar.h b/sidebar/baghirasidebar.h
index dae8fc5..d0b9929 100644
--- a/sidebar/baghirasidebar.h
+++ b/sidebar/baghirasidebar.h
@@ -11,7 +11,7 @@
class LinkView;
class KListBox;
-class QListBoxItem;
+class TQListBoxItem;
class baghiraSidebar : public KonqSidebarPlugin
{
@@ -25,22 +25,22 @@ public:
* @param parent The sidebar internal button info class responsible for this plugin.
* @param widgetParent The container which will contain the plugins widget.
* @param desktopName The filename of the configuration file.
- * @param name A Qt object name for your plugin.
+ * @param name A TQt object name for your plugin.
**/
- baghiraSidebar(KInstance *inst,QObject *parent, QWidget *widgetParent, QString &desktopName, const char* name=0);
+ baghiraSidebar(KInstance *inst,TQObject *parent, TQWidget *widgetParent, TQString &desktopName, const char* name=0);
/** destructor */
~baghiraSidebar();
- virtual QWidget *getWidget(){return scrollView;}
- virtual void *provides(const QString &) {return 0;}
+ virtual TQWidget *getWidget(){return scrollView;}
+ virtual void *provides(const TQString &) {return 0;}
protected:
LinkView *scrollView;
virtual void handleURL(const KURL &url);
private slots:
- void callURL(QListBoxItem *);
+ void callURL(TQListBoxItem *);
signals:
void openURLRequest(const KURL &url, const KParts::URLArgs &args);
diff --git a/sidebar/baghirasidebariface.h b/sidebar/baghirasidebariface.h
index c5e160d..9be73ad 100644
--- a/sidebar/baghirasidebariface.h
+++ b/sidebar/baghirasidebariface.h
@@ -27,9 +27,9 @@ class BaghiraSidebarIface : virtual public DCOPObject
{
K_DCOP
k_dcop:
- virtual void mediumAdded(const QString &name) = 0;
- virtual void mediumRemoved(const QString &name) = 0;
- virtual void mediumChanged(const QString &name) = 0;
+ virtual void mediumAdded(const TQString &name) = 0;
+ virtual void mediumRemoved(const TQString &name) = 0;
+ virtual void mediumChanged(const TQString &name) = 0;
};
#endif
diff --git a/sidebar/dndlistbox.cpp b/sidebar/dndlistbox.cpp
index 8fe78cf..4f8928d 100644
--- a/sidebar/dndlistbox.cpp
+++ b/sidebar/dndlistbox.cpp
@@ -1,9 +1,9 @@
#include <dcopclient.h>
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include <kurl.h>
-#include <qstrlist.h>
-#include <qtimer.h>
+#include <tqstrlist.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <klocale.h>
#include <kfileitem.h>
@@ -15,7 +15,7 @@
#include <kurlrequester.h>
#include <kstandarddirs.h>
#include <kwin.h>
-#include <qclipboard.h>
+#include <tqclipboard.h>
#include "listboxlink.h"
#include "linkconfig.h"
#include "dndlistbox.h"
@@ -37,11 +37,11 @@
#define MEDIA_PROPS 12
#define MEDIALIST_PROPS 13
-ResizingLinkBox::ResizingLinkBox( QWidget * parent, const char * name, WFlags f ) : KListBox( parent, name, f)
+ResizingLinkBox::ResizingLinkBox( TQWidget * parent, const char * name, WFlags f ) : KListBox( parent, name, f)
{
- KConfig config(QDir::homeDirPath() + "/.qt/baghirarc");
+ KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc");
config.setGroup("Sidebar");
- size_ = config.readNumEntry (QString(name) + "_IconSize", 48);
+ size_ = config.readNumEntry (TQString(name) + "_IconSize", 48);
popupMenu = new KPopupMenu;
popupMenu->insertTitle (i18n("Icon Size"),122,122);
popupMenu->insertItem("16x16", this, SLOT(setIconSize(int)),0,16,123);
@@ -52,14 +52,14 @@ ResizingLinkBox::ResizingLinkBox( QWidget * parent, const char * name, WFlags f
popupMenu->insertItem("128x128", this, SLOT(setIconSize(int)),0,128,128);
}
-void ResizingLinkBox::insertItem( const QListBoxItem *lbi, int index )
+void ResizingLinkBox::insertItem( const TQListBoxItem *lbi, int index )
{
KListBox::insertItem( lbi, index );
if (height() <= numRows()*itemHeight())
emit itemNumberChanged(TRUE);
}
-void ResizingLinkBox::insertItem( const QListBoxItem *lbi, const QListBoxItem *after )
+void ResizingLinkBox::insertItem( const TQListBoxItem *lbi, const TQListBoxItem *after )
{
KListBox::insertItem( lbi, after );
if (height() <= numRows()*itemHeight())
@@ -67,7 +67,7 @@ void ResizingLinkBox::insertItem( const QListBoxItem *lbi, const QListBoxItem *a
}
-void ResizingLinkBox::insertItem( const QString & icon, const QString & title, const QString & url )
+void ResizingLinkBox::insertItem( const TQString & icon, const TQString & title, const TQString & url )
{
insertItem( new ListBoxLink(icon, size_, title, url ) );
}
@@ -83,9 +83,9 @@ void ResizingLinkBox::removeItem( int index )
void ResizingLinkBox::setIconSize(int size)
{
size_ = size;
- KConfig *config = new KConfig(QDir::homeDirPath() + "/.qt/baghirarc");
+ KConfig *config = new KConfig(TQDir::homeDirPath() + "/.qt/baghirarc");
config->setGroup("Sidebar");
- config->writeEntry (QString(name()) + "_IconSize", size);
+ config->writeEntry (TQString(name()) + "_IconSize", size);
config->sync();
ListBoxLink *runner;
ListBoxDevice *current;
@@ -107,14 +107,14 @@ void ResizingLinkBox::setIconSize(int size)
blockSignals ( false );
}
-void ResizingLinkBox::mousePressEvent ( QMouseEvent *mpe )
+void ResizingLinkBox::mousePressEvent ( TQMouseEvent *mpe )
{
KListBox::mousePressEvent( mpe );
}
-void ResizingLinkBox::mouseReleaseEvent ( QMouseEvent *mpe )
+void ResizingLinkBox::mouseReleaseEvent ( TQMouseEvent *mpe )
{
- if (mpe->button() == Qt::LeftButton)
+ if (mpe->button() == TQt::LeftButton)
{
ListBoxLink *link = (ListBoxLink*)itemAt(mpe->pos());
if (isSelected(link)) emit clicked(link);
@@ -124,17 +124,17 @@ void ResizingLinkBox::mouseReleaseEvent ( QMouseEvent *mpe )
KListBox::mouseReleaseEvent( mpe );
}
-void ResizingLinkBox::contentsWheelEvent ( QWheelEvent * we )
+void ResizingLinkBox::contentsWheelEvent ( TQWheelEvent * we )
{
- if (we->state() == Qt::ControlButton)
+ if (we->state() == TQt::ControlButton)
KListBox::contentsWheelEvent ( we );
else
emit scrolled(0, -we->delta());
}
-MediaListBox::MediaListBox( QWidget * parent, const char * name, WFlags f ) : ResizingLinkBox(parent, name, f), DCOPObject("BaghiraSidebarIface")
+MediaListBox::MediaListBox( TQWidget * parent, const char * name, WFlags f ) : ResizingLinkBox(parent, name, f), DCOPObject("BaghiraSidebarIface")
{
- KConfig config(QDir::homeDirPath() + "/.qt/baghirarc");
+ KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc");
config.setGroup("Sidebar");
hiddenDevices = config.readListEntry("HiddenDevices");
currentFloppy = 0L;
@@ -150,24 +150,24 @@ MediaListBox::MediaListBox( QWidget * parent, const char * name, WFlags f ) : Re
insertItem(new ListBoxDevice("system", size_, i18n("My Computer"), "media:/", "", "", TRUE, FALSE, FALSE));
insertItem(new ListBoxDevice("network", size_, i18n("Network"), "lan:/localhost", "", "", TRUE, FALSE, FALSE));
#endif
- insertItem(new ListBoxDevice("hdd_mount", size_, i18n("Startvolume"), QDir::rootDirPath(), "", "", TRUE, FALSE, FALSE));
+ insertItem(new ListBoxDevice("hdd_mount", size_, i18n("Startvolume"), TQDir::rootDirPath(), "", "", TRUE, FALSE, FALSE));
client = KApplication::dcopClient();
- client->connectDCOPSignal("kded", "mediamanager", "mediumAdded(QString)", "BaghiraSidebarIface", "mediumAdded(QString)", FALSE);
- client->connectDCOPSignal("kded", "mediamanager", "mediumRemoved(QString)", "BaghiraSidebarIface", "mediumRemoved(const QString)", FALSE);
- client->connectDCOPSignal("kded", "mediamanager", "mediumChanged(QString)", "BaghiraSidebarIface", "mediumChanged(QString)", FALSE);
+ client->connectDCOPSignal("kded", "mediamanager", "mediumAdded(TQString)", "BaghiraSidebarIface", "mediumAdded(TQString)", FALSE);
+ client->connectDCOPSignal("kded", "mediamanager", "mediumRemoved(TQString)", "BaghiraSidebarIface", "mediumRemoved(const TQString)", FALSE);
+ client->connectDCOPSignal("kded", "mediamanager", "mediumChanged(TQString)", "BaghiraSidebarIface", "mediumChanged(TQString)", FALSE);
/* Get the media info - huhhh ;) */
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << ""; // ask for the full list
if (!client->call("kded", "mediamanager", "fullList()", data, replyType, replyData))
- qDebug("there was some error using DCOP.");
+ tqDebug("there was some error using DCOP.");
else
{
- QDataStream reply(replyData, IO_ReadOnly);
- if (replyType == "QStringList")
+ TQDataStream reply(replyData, IO_ReadOnly);
+ if (replyType == "TQStringList")
{
- QStringList result;
+ TQStringList result;
reply >> result;
blockSignals ( true );
for (uint i = 0; i < result.size()/MEDIALIST_PROPS; i++)
@@ -195,7 +195,7 @@ MediaListBox::MediaListBox( QWidget * parent, const char * name, WFlags f ) : Re
blockSignals ( false );
}
else
- qWarning("fullList() returned an unexpected type of reply!");
+ tqWarning("fullList() returned an unexpected type of reply!");
}
// setCurrentItem( 0 );
}
@@ -206,7 +206,7 @@ MediaListBox::~MediaListBox()
ListBoxDevice *runner;
for ( runner = deviceList.first(); runner; runner = deviceList.next() )
hiddenDevices.append(runner->name());
- KConfig config(QDir::homeDirPath() + "/.qt/baghirarc");
+ KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc");
config.setGroup("Sidebar");
config.writeEntry("HiddenDevices", hiddenDevices);
}
@@ -261,9 +261,9 @@ void MediaListBox::toggleDevice(int id)
}
}
-ListBoxDevice *MediaListBox::createListBoxDevice(QStringList & deviceProperties, uint n)
+ListBoxDevice *MediaListBox::createListBoxDevice(TQStringList & deviceProperties, uint n)
{
- QString icon;
+ TQString icon;
icon = deviceProperties[MEDIALIST_PROPS*n+ICON_NAME];
if (icon.isNull())
{
@@ -272,7 +272,7 @@ ListBoxDevice *MediaListBox::createListBoxDevice(QStringList & deviceProperties,
icon.truncate( icon.length()-2 );
if (icon.contains("floppy")) icon.prepend("3");
}
- QString label;
+ TQString label;
label = deviceProperties[MEDIALIST_PROPS*n+USER_LABEL];
if (label.isNull())
{
@@ -286,7 +286,7 @@ ListBoxDevice *MediaListBox::createListBoxDevice(QStringList & deviceProperties,
#endif
}
-int MediaListBox::index (const QString & name )
+int MediaListBox::index (const TQString & name )
{
ListBoxDevice *device;
for (uint i = 0; i < count(); i++)
@@ -297,20 +297,20 @@ int MediaListBox::index (const QString & name )
return -1;
}
-void MediaListBox::mediumAdded(const QString &name)
+void MediaListBox::mediumAdded(const TQString &name)
{
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << name; // ask for this item only
- if (!client->call("kded", "mediamanager", "properties(QString)", data, replyType, replyData))
- qDebug("there was some error using DCOP.");
+ if (!client->call("kded", "mediamanager", "properties(TQString)", data, replyType, replyData))
+ tqDebug("there was some error using DCOP.");
else
{
- QDataStream reply(replyData, IO_ReadOnly);
- if (replyType == "QStringList")
+ TQDataStream reply(replyData, IO_ReadOnly);
+ if (replyType == "TQStringList")
{
- QStringList result;
+ TQStringList result;
reply >> result;
ListBoxDevice *dev = createListBoxDevice(result);
if (hiddenDevices.contains(dev->name()))
@@ -325,24 +325,24 @@ void MediaListBox::mediumAdded(const QString &name)
}
}
else
- qWarning("properties() returned an unexpected type of reply!");
+ tqWarning("properties() returned an unexpected type of reply!");
}
}
-void MediaListBox::mediumRemoved(const QString &name)
+void MediaListBox::mediumRemoved(const TQString &name)
{
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << name; // ask for this item only
- if (!client->call("kded", "mediamanager", "properties(QString)", data, replyType, replyData))
- qDebug("there was some error using DCOP.");
+ if (!client->call("kded", "mediamanager", "properties(TQString)", data, replyType, replyData))
+ tqDebug("there was some error using DCOP.");
else
{
- QDataStream reply(replyData, IO_ReadOnly);
- if (replyType == "QStringList")
+ TQDataStream reply(replyData, IO_ReadOnly);
+ if (replyType == "TQStringList")
{
- QStringList result;
+ TQStringList result;
reply >> result;
int i = index(name);
if (i<0)
@@ -351,24 +351,24 @@ void MediaListBox::mediumRemoved(const QString &name)
removeItem(i);
}
else
- qWarning("properties() returned an unexpected type of reply!");
+ tqWarning("properties() returned an unexpected type of reply!");
}
}
-void MediaListBox::mediumChanged(const QString &name)
+void MediaListBox::mediumChanged(const TQString &name)
{
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << name; // ask for this item only
- if (!client->call("kded", "mediamanager", "properties(QString)", data, replyType, replyData))
- qDebug("there was some error using DCOP.");
+ if (!client->call("kded", "mediamanager", "properties(TQString)", data, replyType, replyData))
+ tqDebug("there was some error using DCOP.");
else
{
- QDataStream reply(replyData, IO_ReadOnly);
- if (replyType == "QStringList")
+ TQDataStream reply(replyData, IO_ReadOnly);
+ if (replyType == "TQStringList")
{
- QStringList result;
+ TQStringList result;
reply >> result;
int i = index(name);
if (i<0)
@@ -406,16 +406,16 @@ void MediaListBox::mediumChanged(const QString &name)
blockSignals(false);
}
else
- qWarning("properties() returned an unexpected type of reply!");
+ tqWarning("properties() returned an unexpected type of reply!");
}
}
#define _FLOPPYID_ 0
#define _FLOPPYINDEX_ 0
-void MediaListBox::mousePressEvent ( QMouseEvent *mpe )
+void MediaListBox::mousePressEvent ( TQMouseEvent *mpe )
{
- if (mpe->button() == Qt::RightButton)
+ if (mpe->button() == TQt::RightButton)
{
popupMenu->removeItem(_FLOPPYID_);
ListBoxDevice *device = (ListBoxDevice*)itemAt(mpe->pos());
@@ -427,7 +427,7 @@ void MediaListBox::mousePressEvent ( QMouseEvent *mpe )
popupMenu->popup(mpe->globalPos());
return;
}
- if (mpe->button() == Qt::LeftButton && mpe->x() > width()-22)
+ if (mpe->button() == TQt::LeftButton && mpe->x() > width()-22)
{
ListBoxDevice *device = (ListBoxDevice*)itemAt(mpe->pos());
int dy = itemRect(device).y();
@@ -445,7 +445,7 @@ void MediaListBox::mousePressEvent ( QMouseEvent *mpe )
ResizingLinkBox::mousePressEvent( mpe );
}
-void MediaListBox::resizeEvent ( QResizeEvent * re)
+void MediaListBox::resizeEvent ( TQResizeEvent * re)
{
if (width() != re->oldSize().width())
{
@@ -455,13 +455,13 @@ void MediaListBox::resizeEvent ( QResizeEvent * re)
ResizingLinkBox::resizeEvent(re);
}
-DnDListBox::DnDListBox( QWidget * parent, const char * name, WFlags f ):
+DnDListBox::DnDListBox( TQWidget * parent, const char * name, WFlags f ):
ResizingLinkBox( parent, name, f), _poof(0), _poofIndex(0), _poofAnimPix(0), _poofPix(0)
{
setAcceptDrops(true);
dialog = new LinkConfig();
connect(dialog->buttonOk, SIGNAL(clicked()), this, SLOT(updateLink()));
- setCursor(Qt::PointingHandCursor);
+ setCursor(TQt::PointingHandCursor);
}
DnDListBox::~DnDListBox()
@@ -471,18 +471,18 @@ DnDListBox::~DnDListBox()
void DnDListBox::poof(ListBoxLink *link)
{
_poofIndex = 0;
- _poofPix = new QPixmap(locateLocal("data", "baghira/poof.png"), "png");
- _poofAnimPix = new QPixmap(_poofPix->width(), _poofPix->width());
+ _poofPix = new TQPixmap(locateLocal("data", "baghira/poof.png"), "png");
+ _poofAnimPix = new TQPixmap(_poofPix->width(), _poofPix->width());
if (!_poof)
- _poof = new QWidget(0,0, Qt::WType_TopLevel | Qt::WStyle_NoBorder | Qt::WStyle_StaysOnTop | Qt::WX11BypassWM);
+ _poof = new TQWidget(0,0, TQt::WType_TopLevel | TQt::WStyle_NoBorder | TQt::WStyle_StaysOnTop | TQt::WX11BypassWM);
KWin::setShadowSize(_poof->winId(), 0);
_poof->setFixedSize(_poofPix->width(), _poofPix->width());
- int x = QCursor::pos().x() - _poof->width()/2;
- int y = QCursor::pos().y() - _poof->height()/2;
- QPixmap bgPix = QPixmap::grabWindow( qt_xrootwin(), x, y, _poofPix->width(), _poofPix->width());
+ int x = TQCursor::pos().x() - _poof->width()/2;
+ int y = TQCursor::pos().y() - _poof->height()/2;
+ TQPixmap bgPix = TQPixmap::grabWindow( tqt_xrootwin(), x, y, _poofPix->width(), _poofPix->width());
_poof->move(x,y);
_poof->show();
- _poof->setBackgroundOrigin(QWidget::WidgetOrigin);
+ _poof->setBackgroundOrigin(TQWidget::WidgetOrigin);
_poof->setPaletteBackgroundPixmap( bgPix );
runPoof();
removeItem ( index(link) );
@@ -503,30 +503,30 @@ void DnDListBox::runPoof()
return;
}
_poof->erase();
- bitBlt(_poof, 0 ,0, _poofPix, 0, _poofIndex * _poofPix->width(), _poofPix->width(), _poofPix->width(), Qt::AndROP);
+ bitBlt(_poof, 0 ,0, _poofPix, 0, _poofIndex * _poofPix->width(), _poofPix->width(), _poofPix->width(), TQt::AndROP);
++_poofIndex;
- QTimer::singleShot ( 70, this, SLOT(runPoof()) ); // around 15 fps
+ TQTimer::singleShot ( 70, this, SLOT(runPoof()) ); // around 15 fps
}
-void DnDListBox::dragEnterEvent ( QDragEnterEvent *dee )
+void DnDListBox::dragEnterEvent ( TQDragEnterEvent *dee )
{
// dragging_ = true;
- if (QUriDrag::canDecode(dee) || BaghiraLinkDrag::canDecode(dee) || QTextDrag::canDecode(dee))
+ if (TQUriDrag::canDecode(dee) || BaghiraLinkDrag::canDecode(dee) || TQTextDrag::canDecode(dee))
dee->accept(true);
}
-void DnDListBox::dropEvent ( QDropEvent *de )
+void DnDListBox::dropEvent ( TQDropEvent *de )
{
- QStrList list;
- QString title;
- QString command;
- QString icon;
+ TQStrList list;
+ TQString title;
+ TQString command;
+ TQString icon;
int oldIndex;
- QCString subtype;
+ TQCString subtype;
if (BaghiraLinkDrag::decode(de, &title, &command, &icon, &oldIndex)) // internal move
{
BaghiraLinkDrag::setAccepted();
- QListBoxItem *after = itemAt(de->pos());
+ TQListBoxItem *after = itemAt(de->pos());
int newIndex = index(after);
if (!dragging_ || oldIndex < 0 || oldIndex > count()-2)
insertItem (new ListBoxLink(icon, size_, title, command), after?newIndex:count());
@@ -536,16 +536,16 @@ void DnDListBox::dropEvent ( QDropEvent *de )
removeItem ( (newIndex < 0 || oldIndex < newIndex) ? oldIndex : oldIndex + 1 );
}
}
- else if ( QUriDrag::decode(de, list) )
+ else if ( TQUriDrag::decode(de, list) )
{
char *uri;
KURL url;
- QListBoxItem *after = itemAt(de->pos());
+ TQListBoxItem *after = itemAt(de->pos());
for ( uri = list.first(); uri; uri = list.next() )
{
url = KURL(uri);
if (url.protocol() == "http")
- insertItem(new ListBoxLink("html", size_, url.host()+(url.path()=="/"?QString(""):url.path()), uri), after?index(after):count());
+ insertItem(new ListBoxLink("html", size_, url.host()+(url.path()=="/"?TQString(""):url.path()), uri), after?index(after):count());
else
{
KFileItem item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url, true);
@@ -553,14 +553,14 @@ void DnDListBox::dropEvent ( QDropEvent *de )
}
}
}
- else if (QTextDrag::decode(de, command, subtype))
+ else if (TQTextDrag::decode(de, command, subtype))
{
KURL url(command);
if (url.isValid())
{
- QListBoxItem *after = itemAt(de->pos());
+ TQListBoxItem *after = itemAt(de->pos());
if (url.protocol() == "http")
- insertItem(new ListBoxLink("html", size_, url.host()+(url.path()=="/"?QString(""):url.path()), command), after?index(after):count());
+ insertItem(new ListBoxLink("html", size_, url.host()+(url.path()=="/"?TQString(""):url.path()), command), after?index(after):count());
else
{
KFileItem item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url, true);
@@ -569,13 +569,13 @@ void DnDListBox::dropEvent ( QDropEvent *de )
}
else if (command.contains('@'))
{
- QListBoxItem *after = itemAt(de->pos());
+ TQListBoxItem *after = itemAt(de->pos());
command.replace(" ","");
insertItem(new ListBoxLink("kmail", size_, command, "mailto:"+command), after?index(after):count());
}
else if (command.contains("'at'")) //last chance for anti-spam addy
{
- QListBoxItem *after = itemAt(de->pos());
+ TQListBoxItem *after = itemAt(de->pos());
command.replace(" ","");
command.replace("'at'","@");
insertItem(new ListBoxLink("kmail", size_, command, "mailto:"+command), after?index(after):count());
@@ -583,9 +583,9 @@ void DnDListBox::dropEvent ( QDropEvent *de )
}
}
-void DnDListBox::mousePressEvent ( QMouseEvent *mpe )
+void DnDListBox::mousePressEvent ( TQMouseEvent *mpe )
{
- if (mpe->button() == Qt::RightButton)
+ if (mpe->button() == TQt::RightButton)
{
currentItem = 0;
popupMenu->removeItem(0);
@@ -598,22 +598,22 @@ void DnDListBox::mousePressEvent ( QMouseEvent *mpe )
popupMenu->popup(mpe->globalPos());
return;
}
- if (mpe->button() == Qt::MidButton)
+ if (mpe->button() == TQt::MidButton)
{
- pasteURL(QClipboard::Selection, itemAt(mpe->pos()));
+ pasteURL(TQClipboard::Selection, itemAt(mpe->pos()));
return;
}
ResizingLinkBox::mousePressEvent( mpe );
}
-void DnDListBox::mouseReleaseEvent ( QMouseEvent *mre )
+void DnDListBox::mouseReleaseEvent ( TQMouseEvent *mre )
{
if (!dragging_) ResizingLinkBox::mouseReleaseEvent( mre );
}
-void DnDListBox::mouseMoveEvent ( QMouseEvent * mme )
+void DnDListBox::mouseMoveEvent ( TQMouseEvent * mme )
{
- if (mme->state() & Qt::LeftButton)
+ if (mme->state() & TQt::LeftButton)
{
if (!dragging_)
{
@@ -622,9 +622,9 @@ void DnDListBox::mouseMoveEvent ( QMouseEvent * mme )
{
dragging_ = true;
BaghiraLinkDrag *d = new BaghiraLinkDrag( link->text(), link->URL(), link->icon(), index(link), this );
- d->setPixmap(*link->pixmap(),QPoint(22,22));
+ d->setPixmap(*link->pixmap(),TQPoint(22,22));
d->drag();
- if (mme->state() & Qt::ControlButton || BaghiraLinkDrag::accepted())
+ if (mme->state() & TQt::ControlButton || BaghiraLinkDrag::accepted())
return;
poof(link);
// do NOT delete d.
@@ -635,14 +635,14 @@ void DnDListBox::mouseMoveEvent ( QMouseEvent * mme )
dragging_ = false;
}
-void DnDListBox::pasteURL(int mode, QListBoxItem *after)
+void DnDListBox::pasteURL(int mode, TQListBoxItem *after)
{
- QString string = qApp->clipboard()->text( (QClipboard::Mode)mode );
+ TQString string = tqApp->clipboard()->text( (TQClipboard::Mode)mode );
KURL url(string);
if (url.isValid())
{
if (url.protocol() == "http")
- insertItem(new ListBoxLink("html", size_, url.host()+(url.path()=="/"?QString(""):url.path()), string), after?index(after):count());
+ insertItem(new ListBoxLink("html", size_, url.host()+(url.path()=="/"?TQString(""):url.path()), string), after?index(after):count());
else
{
KFileItem item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url, true);
diff --git a/sidebar/dndlistbox.h b/sidebar/dndlistbox.h
index b84dbcc..25e6e85 100644
--- a/sidebar/dndlistbox.h
+++ b/sidebar/dndlistbox.h
@@ -7,50 +7,50 @@
#endif
#include <klistbox.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
#include "baghirasidebariface.h"
class DCOPClient;
-class QDragEnterEvent;
-class QDragMoveEvent;
-class QDragLeaveEvent;
-class QDropEvent;
-class QKeyEvent;
-class QPoint;
+class TQDragEnterEvent;
+class TQDragMoveEvent;
+class TQDragLeaveEvent;
+class TQDropEvent;
+class TQKeyEvent;
+class TQPoint;
class KPopupMenu;
class LinkConfig;
class ListBoxLink;
class ListBoxDevice;
-class QResizeEvent;
+class TQResizeEvent;
class ResizingLinkBox : public KListBox
{
Q_OBJECT
public:
- ResizingLinkBox( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+ ResizingLinkBox( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 );
~ResizingLinkBox(){};
- void insertItem( const QListBoxItem *, int index=-1 );
- void insertItem( const QListBoxItem *lbi, const QListBoxItem *after );
- void insertItem( const QString & icon, const QString & title, const QString & url );
- void insertItem( const QString &text, int index=-1 )
+ void insertItem( const TQListBoxItem *, int index=-1 );
+ void insertItem( const TQListBoxItem *lbi, const TQListBoxItem *after );
+ void insertItem( const TQString & icon, const TQString & title, const TQString & url );
+ void insertItem( const TQString &text, int index=-1 )
{
- insertItem( new QListBoxText(text), index );
+ insertItem( new TQListBoxText(text), index );
}
- void insertItem( const QPixmap &pixmap, int index=-1 )
+ void insertItem( const TQPixmap &pixmap, int index=-1 )
{
- insertItem( new QListBoxPixmap(pixmap), index );
+ insertItem( new TQListBoxPixmap(pixmap), index );
}
- void insertItem( const QPixmap &pixmap, const QString &text, int index=-1 ){
- insertItem( new QListBoxPixmap(pixmap, text), index );
+ void insertItem( const TQPixmap &pixmap, const TQString &text, int index=-1 ){
+ insertItem( new TQListBoxPixmap(pixmap, text), index );
}
void removeItem( int index );
protected:
- void mousePressEvent ( QMouseEvent * );
- void mouseReleaseEvent ( QMouseEvent * );
- void contentsWheelEvent ( QWheelEvent * );
+ void mousePressEvent ( TQMouseEvent * );
+ void mouseReleaseEvent ( TQMouseEvent * );
+ void contentsWheelEvent ( TQWheelEvent * );
KPopupMenu *popupMenu;
uint size_;
private slots:
@@ -64,24 +64,24 @@ class MediaListBox : public ResizingLinkBox, virtual public BaghiraSidebarIface
{
Q_OBJECT
public:
- MediaListBox( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+ MediaListBox( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 );
~MediaListBox();
- ListBoxDevice *createListBoxDevice(QStringList & deviceProperties, uint n = 0);
- void mediumAdded(const QString &name);
- void mediumRemoved(const QString &name);
- void mediumChanged(const QString &name);
- int index (const QString & name );
+ ListBoxDevice *createListBoxDevice(TQStringList & deviceProperties, uint n = 0);
+ void mediumAdded(const TQString &name);
+ void mediumRemoved(const TQString &name);
+ void mediumChanged(const TQString &name);
+ int index (const TQString & name );
void removeItem( int index );
protected:
- void mousePressEvent ( QMouseEvent * );
- void resizeEvent ( QResizeEvent * );
+ void mousePressEvent ( TQMouseEvent * );
+ void resizeEvent ( TQResizeEvent * );
private:
KPopupMenu *devicePopup;
DCOPClient *client;
ListBoxDevice *currentFloppy;
- typedef QPtrList<ListBoxDevice> DeviceList;
+ typedef TQPtrList<ListBoxDevice> DeviceList;
DeviceList deviceList;
- QStringList hiddenDevices;
+ TQStringList hiddenDevices;
private slots:
void kfloppy();
void toggleDevice(int id);
@@ -92,31 +92,31 @@ class DnDListBox : public ResizingLinkBox
Q_OBJECT
public:
- DnDListBox( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+ DnDListBox( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 );
/** destructor */
~DnDListBox();
void poof(ListBoxLink *link);
protected:
- void mousePressEvent ( QMouseEvent * );
- void mouseReleaseEvent ( QMouseEvent * );
- void mouseMoveEvent ( QMouseEvent * e );
- void dragEnterEvent ( QDragEnterEvent * );
-// void dragMoveEvent ( QDragMoveEvent * );
-// void dragLeaveEvent ( QDragLeaveEvent * );
- void dropEvent ( QDropEvent * );
+ void mousePressEvent ( TQMouseEvent * );
+ void mouseReleaseEvent ( TQMouseEvent * );
+ void mouseMoveEvent ( TQMouseEvent * e );
+ void dragEnterEvent ( TQDragEnterEvent * );
+// void dragMoveEvent ( TQDragMoveEvent * );
+// void dragLeaveEvent ( TQDragLeaveEvent * );
+ void dropEvent ( TQDropEvent * );
void startDrag();
private:
ListBoxLink *currentItem; //TODO: unshadow int KListBox::currentItem()
LinkConfig *dialog;
bool dragging_;
- void pasteURL(int mode, QListBoxItem *after = 0);
+ void pasteURL(int mode, TQListBoxItem *after = 0);
bool _draggedMe;
int _poofIndex;
- QPixmap *_poofPix;
- QPixmap *_poofAnimPix;
- QWidget *_poof;
+ TQPixmap *_poofPix;
+ TQPixmap *_poofAnimPix;
+ TQWidget *_poof;
private slots:
void configureLink();
void updateLink();
diff --git a/sidebar/linkconfig.ui b/sidebar/linkconfig.ui
index 14ccf55..db753bc 100644
--- a/sidebar/linkconfig.ui
+++ b/sidebar/linkconfig.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>LinkConfig</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>LinkConfig</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout11</cstring>
</property>
@@ -30,7 +30,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -43,7 +43,7 @@
<cstring>title</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -66,7 +66,7 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>layout10</cstring>
</property>
@@ -91,7 +91,7 @@
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -108,7 +108,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
diff --git a/sidebar/linkview.cpp b/sidebar/linkview.cpp
index 8becf29..fa9223b 100644
--- a/sidebar/linkview.cpp
+++ b/sidebar/linkview.cpp
@@ -1,54 +1,54 @@
#include <stdlib.h>
-#include <qcursor.h>
-#include <qsplitter.h>
+#include <tqcursor.h>
+#include <tqsplitter.h>
#include <klocale.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kconfig.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "dndlistbox.h"
#include "listboxlink.h"
#include "linkview.h"
#include "linkview.moc"
// internal class to eat invalid leave envents (i.e. leave that does not leave the rect but just enters the splitter, as styles (like baghira ;) may post install eventfilters that'd cause useless repaints and therefore flicker if the scroller appereance changes ;)
-class EventKiller : public QObject
+class EventKiller : public TQObject
{
protected:
- virtual bool eventFilter( QObject *o, QEvent *e)
+ virtual bool eventFilter( TQObject *o, TQEvent *e)
{
- if (e->type() == QEvent::Leave)
- return ((QScrollView*)o)->rect().contains(((QScrollView*)o)->mapFromGlobal (QCursor::pos()));
+ if (e->type() == TQEvent::Leave)
+ return ((TQScrollView*)o)->rect().contains(((TQScrollView*)o)->mapFromGlobal (TQCursor::pos()));
return false;
}
};
-LinkView::LinkView(QWidget * parent, const char * name, WFlags f):
- QScrollView(parent, name, f)
+LinkView::LinkView(TQWidget * parent, const char * name, WFlags f):
+ TQScrollView(parent, name, f)
{
- setFrameShape( QFrame::StyledPanel );
- setFrameShadow( QFrame::Sunken );
- setBackgroundMode(Qt::PaletteBase);
+ setFrameShape( TQFrame::StyledPanel );
+ setFrameShadow( TQFrame::Sunken );
+ setBackgroundMode(TQt::PaletteBase);
_blocked = FALSE;
- splitter = new QSplitter( Qt::Vertical, viewport() );
+ splitter = new TQSplitter( TQt::Vertical, viewport() );
addChild(splitter);
splitter->setMargin(5);
- splitter->setBackgroundMode(Qt::PaletteBase);
- splitter->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum);
- splitter->setFrameShape( QFrame::NoFrame );
+ splitter->setBackgroundMode(TQt::PaletteBase);
+ splitter->setSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum);
+ splitter->setFrameShape( TQFrame::NoFrame );
splitter->setChildrenCollapsible(TRUE);
splitter->setHandleWidth( 3 );
splitter->setOpaqueResize();
hardware = new MediaListBox(splitter, "hardware");
- splitter->setResizeMode( hardware, QSplitter::KeepSize );
- hardware->setFrameShape( QFrame::NoFrame );
- hardware->setHScrollBarMode(QScrollView::AlwaysOff);
- hardware->setVScrollBarMode(QScrollView::AlwaysOff);
+ splitter->setResizeMode( hardware, TQSplitter::KeepSize );
+ hardware->setFrameShape( TQFrame::NoFrame );
+ hardware->setHScrollBarMode(TQScrollView::AlwaysOff);
+ hardware->setVScrollBarMode(TQScrollView::AlwaysOff);
locations = new DnDListBox(splitter, "locations");
-// splitter->setResizeMode( locations, QSplitter::KeepSize );
- locations->setFrameShape( QFrame::NoFrame );
- locations->setHScrollBarMode(QScrollView::AlwaysOff);
- locations->setVScrollBarMode(QScrollView::AlwaysOff);
+// splitter->setResizeMode( locations, TQSplitter::KeepSize );
+ locations->setFrameShape( TQFrame::NoFrame );
+ locations->setHScrollBarMode(TQScrollView::AlwaysOff);
+ locations->setVScrollBarMode(TQScrollView::AlwaysOff);
// custom area, locations
loadLinks();
locations->setCurrentItem(0);
@@ -60,8 +60,8 @@ LinkView::LinkView(QWidget * parent, const char * name, WFlags f):
connect (locations, SIGNAL(scrolled(int,int)), this, SLOT(scrollBy(int,int)));
connect (hardware, SIGNAL(itemNumberChanged(bool)), this, SLOT(adjustSplitter2Hardware(bool)));
connect (locations, SIGNAL(itemNumberChanged(bool)), this, SLOT(adjustSplitter2Locations()));
- QTimer::singleShot(50, this, SLOT(adjustSplitter2Locations()));
- QTimer::singleShot(60, this, SLOT(postInstallEventFilter()));
+ TQTimer::singleShot(50, this, SLOT(adjustSplitter2Locations()));
+ TQTimer::singleShot(60, this, SLOT(postInstallEventFilter()));
}
static EventKiller *eventKiller = 0L;
@@ -79,13 +79,13 @@ void LinkView::postInstallEventFilter()
installEventFilter(eventKiller);
}
-bool LinkView::eventFilter(QObject *o, QEvent *e)
+bool LinkView::eventFilter(TQObject *o, TQEvent *e)
{
if (o != hardware)
- return QScrollView::eventFilter(o, e);
- if (_blocked || e->type() != QEvent::Resize)
+ return TQScrollView::eventFilter(o, e);
+ if (_blocked || e->type() != TQEvent::Resize)
return FALSE; // not a resize - non of our business
- QResizeEvent *rev = (QResizeEvent*)e;
+ TQResizeEvent *rev = (TQResizeEvent*)e;
if (rev->size().height() == rev->oldSize().height())
return FALSE; // height didn't change
int tmpH = rev->size().height() + locations->numRows()*locations->itemHeight()+20;
@@ -122,7 +122,7 @@ void LinkView::adjustSplitter2Hardware(bool added)
hardware->resize ( hardware->width(), hardware->numRows()*hardware->itemHeight() );
}
-void LinkView::viewportResizeEvent( QResizeEvent *rev )
+void LinkView::viewportResizeEvent( TQResizeEvent *rev )
{
int tmpH = hardware->height() + locations->numRows()*locations->itemHeight()+20;
if (tmpH < rev->size().height())
@@ -144,27 +144,27 @@ void LinkView::loadLinks()
{
if (!locations)
return;
- KConfig config(QDir::homeDirPath() + "/.qt/baghirarc");
+ KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc");
config.setGroup("Sidebar");
splitter->setSizes(config.readIntListEntry ("Sizes"));
loadedLinks = (uint)config.readNumEntry("NumLinks", 0);
locations->blockSignals ( true );
if (loadedLinks == 0) // no settings stored - load defaults
{
- locations->insertItem("desktop", i18n("Desktop"), QDir::homeDirPath()+"/Desktop");
- locations->insertItem("folder_home", getenv("USER"), QDir::homeDirPath());
+ locations->insertItem("desktop", i18n("Desktop"), TQDir::homeDirPath()+"/Desktop");
+ locations->insertItem("folder_home", getenv("USER"), TQDir::homeDirPath());
locations->insertItem("kmenu", i18n("Programs"), "programs:/");
}
- QString num;
+ TQString num;
for (uint i = 0; i < loadedLinks; i++)
{
- QString title;
- QString icon;
- QString url;
+ TQString title;
+ TQString icon;
+ TQString url;
num.setNum(i);
title = config.readEntry("Link_"+num+"_Title", "???");
icon = config.readEntry("Link_"+num+"_Icon", "empty");
- url = config.readEntry("Link_"+num+"_URL", QDir::homeDirPath());
+ url = config.readEntry("Link_"+num+"_URL", TQDir::homeDirPath());
locations->insertItem(icon, title, url);
}
locations->blockSignals ( false );
@@ -174,11 +174,11 @@ void LinkView::saveLinks()
{
if (!locations)
return;
- KConfig *config = new KConfig(QDir::homeDirPath() + "/.qt/baghirarc");
+ KConfig *config = new KConfig(TQDir::homeDirPath() + "/.qt/baghirarc");
config->setGroup("Sidebar");
config->writeEntry("Sizes", splitter->sizes());
config->writeEntry("NumLinks", (int)locations->count());
- QString num;
+ TQString num;
for (uint i = 0; i < locations->count(); i++)
{
num.setNum(i);
diff --git a/sidebar/linkview.h b/sidebar/linkview.h
index ebe54ef..8ea5577 100644
--- a/sidebar/linkview.h
+++ b/sidebar/linkview.h
@@ -6,18 +6,18 @@
#include <config.h>
#endif
-#include <qscrollview.h>
+#include <tqscrollview.h>
class ListBoxLink;
class DnDListBox;
class MediaListBox;
-class LinkView : public QScrollView
+class LinkView : public TQScrollView
{
Q_OBJECT
public:
- LinkView(QWidget * parent = 0, const char * name = 0, WFlags f = 0);
+ LinkView(TQWidget * parent = 0, const char * name = 0, WFlags f = 0);
/** destructor */
~LinkView();
@@ -27,12 +27,12 @@ public:
void saveLinks();
protected:
- void viewportResizeEvent( QResizeEvent * );
- bool eventFilter(QObject *, QEvent *);
+ void viewportResizeEvent( TQResizeEvent * );
+ bool eventFilter(TQObject *, TQEvent *);
private:
MediaListBox *hardware;
DnDListBox *locations;
- QSplitter *splitter;
+ TQSplitter *splitter;
bool _blocked;
uint loadedLinks;
private slots:
diff --git a/sidebar/listboxlink.cpp b/sidebar/listboxlink.cpp
index 47adb88..484fa12 100644
--- a/sidebar/listboxlink.cpp
+++ b/sidebar/listboxlink.cpp
@@ -1,23 +1,23 @@
#include <kiconloader.h>
#include "listboxlink.h"
-#include <qpainter.h>
-#include <qbitmap.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
#include "eject.xbm"
#include "lock.xbm"
-static QBitmap eject = QBitmap( eject_width, eject_height, eject_bits, true );
-static QBitmap locked = QBitmap( lock_width, lock_height, lock_bits, true );
+static TQBitmap eject = TQBitmap( eject_width, eject_height, eject_bits, true );
+static TQBitmap locked = TQBitmap( lock_width, lock_height, lock_bits, true );
-ListBoxLink::ListBoxLink( const QString & icon, uint size, const QString & title, const QString & url): QListBoxPixmap(KGlobal::iconLoader()->loadIcon(icon, KIcon::Desktop, size), title),url_(url),icon_(icon)
+ListBoxLink::ListBoxLink( const TQString & icon, uint size, const TQString & title, const TQString & url): TQListBoxPixmap(KGlobal::iconLoader()->loadIcon(icon, KIcon::Desktop, size), title),url_(url),icon_(icon)
{
}
-ListBoxLink::ListBoxLink( const QPixmap & pixmap, const QString & title, const QString & url) : QListBoxPixmap(pixmap, title), url_(url), icon_(0)
+ListBoxLink::ListBoxLink( const TQPixmap & pixmap, const TQString & title, const TQString & url) : TQListBoxPixmap(pixmap, title), url_(url), icon_(0)
{
}
-ListBoxLink::ListBoxLink(ListBoxLink & link) : QListBoxPixmap(*link.pixmap(), link.text()), url_(link.URL()), icon_(link.icon())
+ListBoxLink::ListBoxLink(ListBoxLink & link) : TQListBoxPixmap(*link.pixmap(), link.text()), url_(link.URL()), icon_(link.icon())
{
}
@@ -25,22 +25,22 @@ ListBoxLink::~ListBoxLink()
{
}
-void ListBoxLink::setURL(const QString & url)
+void ListBoxLink::setURL(const TQString & url)
{
url_ = url;
}
-void ListBoxLink::setIcon(const QString & icon)
+void ListBoxLink::setIcon(const TQString & icon)
{
icon_ = icon;
}
-int ListBoxLink::height ( const QListBox * lb ) const
+int ListBoxLink::height ( const TQListBox * lb ) const
{
- return (QListBoxPixmap::height ( lb ) + 4);
+ return (TQListBoxPixmap::height ( lb ) + 4);
}
-ListBoxDevice::ListBoxDevice(const QString & icon, uint size, const QString & title, const QString & url, const QString & name, const QString & mountPoint, bool mounted, bool ejectable, bool removable, int id) : ListBoxLink(icon, size, title, url), name_(name), mountPoint_(mountPoint), mounted_(mounted), ejectable_(ejectable), removable_(removable),id_(id)
+ListBoxDevice::ListBoxDevice(const TQString & icon, uint size, const TQString & title, const TQString & url, const TQString & name, const TQString & mountPoint, bool mounted, bool ejectable, bool removable, int id) : ListBoxLink(icon, size, title, url), name_(name), mountPoint_(mountPoint), mounted_(mounted), ejectable_(ejectable), removable_(removable),id_(id)
{
if (!eject.mask())
eject.setMask(eject);
@@ -48,7 +48,7 @@ ListBoxDevice::ListBoxDevice(const QString & icon, uint size, const QString & ti
locked.setMask(locked);
}
-ListBoxDevice::ListBoxDevice(const QPixmap & pixmap, const QString & title, const QString & url, const QString & name, const QString & mountPoint, bool mounted, bool ejectable, bool removable, int id) : ListBoxLink(pixmap, title, url), name_(name), mountPoint_(mountPoint), mounted_(mounted), ejectable_(ejectable), removable_(removable),id_(id)
+ListBoxDevice::ListBoxDevice(const TQPixmap & pixmap, const TQString & title, const TQString & url, const TQString & name, const TQString & mountPoint, bool mounted, bool ejectable, bool removable, int id) : ListBoxLink(pixmap, title, url), name_(name), mountPoint_(mountPoint), mounted_(mounted), ejectable_(ejectable), removable_(removable),id_(id)
{
if (!eject.mask())
eject.setMask(eject);
@@ -56,14 +56,14 @@ ListBoxDevice::ListBoxDevice(const QPixmap & pixmap, const QString & title, cons
locked.setMask(locked);
}
-int ListBoxDevice::width ( const QListBox * lb ) const
+int ListBoxDevice::width ( const TQListBox * lb ) const
{
if (ejectable_ && mounted_ && lb)
return lb->width();
return ListBoxLink::width(lb);
}
-void ListBoxDevice::paint( QPainter * p )
+void ListBoxDevice::paint( TQPainter * p )
{
if ((ejectable_ || removable_) && mounted_)
{
diff --git a/sidebar/listboxlink.h b/sidebar/listboxlink.h
index 6614920..f5664e0 100644
--- a/sidebar/listboxlink.h
+++ b/sidebar/listboxlink.h
@@ -6,55 +6,55 @@
#include <config.h>
#endif
-#include <qlistbox.h>
+#include <tqlistbox.h>
class KListBox;
-class QPainter;
-class QPixmap;
-class QStringList;
+class TQPainter;
+class TQPixmap;
+class TQStringList;
class KURL;
-class ListBoxLink : public QListBoxPixmap
+class ListBoxLink : public TQListBoxPixmap
{
friend class DnDListBox;
public:
- ListBoxLink(const QString & icon, uint size, const QString & title, const QString & url);
- ListBoxLink(const QPixmap & pixmap, const QString & title, const QString & url);
+ ListBoxLink(const TQString & icon, uint size, const TQString & title, const TQString & url);
+ ListBoxLink(const TQPixmap & pixmap, const TQString & title, const TQString & url);
ListBoxLink(ListBoxLink & link);
~ListBoxLink();
- QString & URL(){return url_;}
- void setURL(const QString & url);
- QString & icon(){return icon_;}
- void setIcon(const QString & icon);
- int height ( const QListBox * lb ) const;
+ TQString & URL(){return url_;}
+ void setURL(const TQString & url);
+ TQString & icon(){return icon_;}
+ void setIcon(const TQString & icon);
+ int height ( const TQListBox * lb ) const;
private:
- QString url_; //TODO: make this KURL?!
- QString icon_;
+ TQString url_; //TODO: make this KURL?!
+ TQString icon_;
};
class ListBoxDevice : public ListBoxLink
{
friend class MediaListBox;
public:
- ListBoxDevice(const QString & icon, uint size, const QString & title, const QString & url, const QString & name, const QString & mountPoint, bool mounted, bool ejectable = FALSE, bool removable = FALSE, int id = 0);
- ListBoxDevice(const QPixmap & pixmap, const QString & title, const QString & url, const QString & name, const QString & mountPoint, bool mounted, bool ejectable = FALSE, bool removable = FALSE, int id = 0);
+ ListBoxDevice(const TQString & icon, uint size, const TQString & title, const TQString & url, const TQString & name, const TQString & mountPoint, bool mounted, bool ejectable = FALSE, bool removable = FALSE, int id = 0);
+ ListBoxDevice(const TQPixmap & pixmap, const TQString & title, const TQString & url, const TQString & name, const TQString & mountPoint, bool mounted, bool ejectable = FALSE, bool removable = FALSE, int id = 0);
~ListBoxDevice(){};
- QString & name(){return name_;}
+ TQString & name(){return name_;}
bool mounted(){return mounted_;}
bool ejectable(){return ejectable_;}
bool removable(){return removable_;}
- QString & mountPoint(){return mountPoint_;}
+ TQString & mountPoint(){return mountPoint_;}
int id(){return id_;}
- int width ( const QListBox * lb ) const;
+ int width ( const TQListBox * lb ) const;
protected:
- void paint( QPainter * p );
+ void paint( TQPainter * p );
private:
- QString name_;
- QString mountPoint_;
+ TQString name_;
+ TQString mountPoint_;
bool mounted_;
bool ejectable_;
bool removable_;