summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/kbfxbutton.cpp142
-rw-r--r--src/kbfxbutton.h67
-rw-r--r--src/kbfxplasmacanvasabstractitem.cpp22
-rw-r--r--src/kbfxplasmacanvasabstractitem.h31
-rw-r--r--src/kbfxplasmacanvasgroup.cpp16
-rw-r--r--src/kbfxplasmacanvasgroup.h29
-rw-r--r--src/kbfxplasmacanvasgroupview.cpp16
-rw-r--r--src/kbfxplasmacanvasgroupview.h19
-rw-r--r--src/kbfxplasmacanvasitem.cpp84
-rw-r--r--src/kbfxplasmacanvasitem.h75
-rw-r--r--src/kbfxplasmacanvasitem_events.cpp12
-rw-r--r--src/kbfxplasmacanvasitemwrapper.cpp72
-rw-r--r--src/kbfxplasmacanvasitemwrapper.h13
-rw-r--r--src/kbfxplasmacanvasstack.cpp10
-rw-r--r--src/kbfxplasmacanvasstack.h29
-rw-r--r--src/kbfxplasmacanvasstackdata.h4
-rw-r--r--src/kbfxplasmacanvasview.cpp142
-rw-r--r--src/kbfxplasmacanvasview.h67
-rw-r--r--src/kbfxplasmaindexitem.cpp40
-rw-r--r--src/kbfxplasmaindexitem.h31
-rw-r--r--src/kbfxplasmaindexview.cpp90
-rw-r--r--src/kbfxplasmaindexview.h31
-rw-r--r--src/kbfxsignal.h6
-rw-r--r--src/kbfxspinx.cpp82
-rw-r--r--src/kbfxspinx.h27
-rw-r--r--src/kbfxspinxmenu.cpp270
-rw-r--r--src/kbfxspinxmenu.h67
-rw-r--r--src/kbfxspinxpopup.cpp10
-rw-r--r--src/kbfxspinxpopup.h11
-rw-r--r--src/kbfxspinxscrollbar.cpp38
-rw-r--r--src/kbfxspinxscrollbar.h39
-rw-r--r--src/kbfxspinxtoolbar.cpp10
-rw-r--r--src/kbfxspinxtoolbar.h19
-rw-r--r--src/kbfxspinxtoolbutton.cpp50
-rw-r--r--src/kbfxspinxtoolbutton.h61
-rw-r--r--src/kbfxspinxtop.cpp40
-rw-r--r--src/kbfxspinxtop.h37
-rw-r--r--src/kbfxspinxview.cpp2
-rw-r--r--src/kbfxspinxview.h7
-rw-r--r--src/kbfxtooltip.cpp158
-rw-r--r--src/kbfxtooltip.h69
41 files changed, 1034 insertions, 1011 deletions
diff --git a/src/kbfxbutton.cpp b/src/kbfxbutton.cpp
index 5d3f8fd..0fe018c 100644
--- a/src/kbfxbutton.cpp
+++ b/src/kbfxbutton.cpp
@@ -27,8 +27,8 @@
bool KbfxButton::m_sizeHeight = TRUE;
int KbfxButton::m_size = 0;
-KbfxButton::KbfxButton ( QWidget * parent, const char *name) :
- QLabel ( parent,name,Qt::WStaticContents | Qt::WNoAutoErase |Qt::WPaintDesktop )
+KbfxButton::KbfxButton ( TQWidget * tqparent, const char *name) :
+ TQLabel ( tqparent,name,TQt::WStaticContents | TQt::WNoAutoErase |TQt::WPaintDesktop )
{
setLineWidth ( 0 );
setScaledContents ( false );
@@ -43,12 +43,12 @@ KbfxButton::KbfxButton ( QWidget * parent, const char *name) :
m_kicker_auto_adjust = ConfigInit().m_ToolBarResize;
m_toggle = false;
- QTimer * timer = new QTimer ( this,"Update Timer" );
- connect ( timer,SIGNAL ( timeout() ),this,SLOT ( update() ) );
+ TQTimer * timer = new TQTimer ( this,"Update Timer" );
+ connect ( timer,TQT_SIGNAL ( timeout() ),this,TQT_SLOT ( update() ) );
timer->start ( 25,false );
- fade_timer = new QTimer ( this,"Fade Timer" );
- connect ( fade_timer,SIGNAL ( timeout() ),this,SLOT ( fade() ) );
+ fade_timer = new TQTimer ( this,"Fade Timer" );
+ connect ( fade_timer,TQT_SIGNAL ( timeout() ),this,TQT_SLOT ( fade() ) );
}
KbfxButton::~KbfxButton()
@@ -57,64 +57,64 @@ KbfxButton::~KbfxButton()
void KbfxButton::loadSkins()
{
- QImage _tmpHover, _tmpPressed, _tmpNormal;
+ TQImage _tmpHover, _tmpPressed, _tmpNormal;
_tmpHover = ( KbfxPlasmaPixmapProvider::PixmapPathCheck ( ConfigInit ().m_KbfxHoverButtonPath ) ) ?
- QImage ( ConfigInit ().m_KbfxHoverButtonPath )
- : QImage ( ConfigInit ().m_KbfxHoverButtonPathDefault );
+ TQImage ( ConfigInit ().m_KbfxHoverButtonPath )
+ : TQImage ( ConfigInit ().m_KbfxHoverButtonPathDefault );
_tmpPressed = ( KbfxPlasmaPixmapProvider::PixmapPathCheck ( ConfigInit ().m_KbfxPressedButtonPath ) ) ?
- QImage ( ConfigInit ().m_KbfxPressedButtonPath )
- : QImage ( ConfigInit ().m_KbfxPressedButtonPathDefault );
+ TQImage ( ConfigInit ().m_KbfxPressedButtonPath )
+ : TQImage ( ConfigInit ().m_KbfxPressedButtonPathDefault );
_tmpNormal = ( KbfxPlasmaPixmapProvider::PixmapPathCheck ( ConfigInit ().m_KbfxNormalButtonPath ) ) ?
- QImage ( ConfigInit ().m_KbfxNormalButtonPath )
- : QImage ( ConfigInit ().m_KbfxNormalButtonPathDefault );
+ TQImage ( ConfigInit ().m_KbfxNormalButtonPath )
+ : TQImage ( ConfigInit ().m_KbfxNormalButtonPathDefault );
- QSize _sizeNormal = _tmpNormal.size();
- _tmpHover = _tmpHover.smoothScale ( _sizeNormal, QImage::ScaleFree );
- _tmpPressed = _tmpPressed.smoothScale ( _sizeNormal, QImage::ScaleFree );
+ TQSize _sizeNormal = _tmpNormal.size();
+ _tmpHover = _tmpHover.smoothScale ( _sizeNormal, TQ_ScaleFree );
+ _tmpPressed = _tmpPressed.smoothScale ( _sizeNormal, TQ_ScaleFree );
if ( !m_kicker_auto_adjust )
{
if ( m_sizeHeight )
{
- _tmpHover = _tmpHover.smoothScale ( _tmpHover.width(), m_size, QImage::ScaleMin );
- _tmpPressed = _tmpPressed.smoothScale ( _tmpPressed.width(), m_size, QImage::ScaleMin );
- _tmpNormal = _tmpNormal.smoothScale ( _tmpNormal.width(), m_size, QImage::ScaleMin );
+ _tmpHover = _tmpHover.smoothScale ( _tmpHover.width(), m_size, TQ_ScaleMin );
+ _tmpPressed = _tmpPressed.smoothScale ( _tmpPressed.width(), m_size, TQ_ScaleMin );
+ _tmpNormal = _tmpNormal.smoothScale ( _tmpNormal.width(), m_size, TQ_ScaleMin );
}
else
{
- _tmpHover = _tmpHover.smoothScale ( m_size, _tmpHover.height(), QImage::ScaleMin );
- _tmpPressed = _tmpPressed.smoothScale ( m_size, _tmpPressed.height(), QImage::ScaleMin );
- _tmpNormal = _tmpNormal.smoothScale ( m_size, _tmpNormal.height(), QImage::ScaleMin );
+ _tmpHover = _tmpHover.smoothScale ( m_size, _tmpHover.height(), TQ_ScaleMin );
+ _tmpPressed = _tmpPressed.smoothScale ( m_size, _tmpPressed.height(), TQ_ScaleMin );
+ _tmpNormal = _tmpNormal.smoothScale ( m_size, _tmpNormal.height(), TQ_ScaleMin );
}
}
- m_over_skin = QPixmap ( _tmpHover );
- m_normal_skin = QPixmap ( _tmpNormal );
- m_pressed_skin = QPixmap ( _tmpPressed );
+ m_over_skin = TQPixmap ( _tmpHover );
+ m_normal_skin = TQPixmap ( _tmpNormal );
+ m_pressed_skin = TQPixmap ( _tmpPressed );
m_current_skin = m_normal_skin;
this->resize ( m_current_skin.width(),m_current_skin.height() );
- this->repaint();
+ this->tqrepaint();
}
-QCString KbfxButton::findPanel()
+TQCString KbfxButton::findPanel()
{
- QCString m_AppletPanel = QCString ("kicker");
+ TQCString m_AppletPanel = TQCString ("kicker");
QCStringList objects=m_dcopClient->remoteObjects("kicker");
for( QCStringList::ConstIterator it = objects.begin();
it != objects.end();
++it)
{
- if ( (*it).contains ( "Panel" ) > 0 )
+ if ( (*it).tqcontains ( "Panel" ) > 0 )
{
DCOPRef _dcop_obj ( "kicker", (*it) );
- QStringList _dcop_obj_applets =_dcop_obj.call ( "listApplets()" );
+ TQStringList _dcop_obj_applets =_dcop_obj.call ( "listApplets()" );
- for ( QStringList::Iterator _it = _dcop_obj_applets.begin();
+ for ( TQStringList::Iterator _it = _dcop_obj_applets.begin();
_it != _dcop_obj_applets.end();
_it++ )
{
- if ( ( *_it ).contains ( "kbfx" ) )
+ if ( ( *_it ).tqcontains ( "kbfx" ) )
{
m_AppletPanel = (*it);
break;
@@ -129,7 +129,7 @@ QCString KbfxButton::findPanel()
void KbfxButton::readjust( bool _how )
{
/* _how = TRUE is for height, _how = FALSE is for width readjust */
- QCString _panel = findPanel();
+ TQCString _panel = findPanel();
int _tmp_size;
if ( _how )
{
@@ -141,8 +141,8 @@ void KbfxButton::readjust( bool _how )
_tmp_size = this->width ();
kdDebug () << "Readjusting " << _panel << " to width: " << _tmp_size << endl;
}
- QByteArray data;
- QDataStream arg ( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg ( data, IO_WriteOnly );
arg << _tmp_size ;
if ( !m_dcopClient->send ( "kicker", _panel, "setPanelSize(int)", data ) )
kdWarning ()
@@ -151,7 +151,7 @@ void KbfxButton::readjust( bool _how )
<< endl;
}
-void KbfxButton::enterEvent ( QEvent * e )
+void KbfxButton::enterEvent ( TQEvent * e )
{
e = e;
if ( m_toggle == true )
@@ -177,8 +177,8 @@ void KbfxButton::fade ( )
}
else
{
- QImage _final = m_fadePix.convertToImage ();
- QImage _current = m_current_skin.convertToImage ();
+ TQImage _final = m_fadePix.convertToImage ();
+ TQImage _current = m_current_skin.convertToImage ();
if ( !fade_timer->isActive ())
{
@@ -190,13 +190,13 @@ void KbfxButton::fade ( )
m_opacity += 0.1;
KImageEffect::blend ( _final, _current, m_opacity);
- m_current_skin = QPixmap ( _current );
+ m_current_skin = TQPixmap ( _current );
}
this->resize ( m_current_skin.size() );
this->update();
}
-void KbfxButton::leaveEvent ( QEvent * e )
+void KbfxButton::leaveEvent ( TQEvent * e )
{
e = e;
@@ -234,10 +234,10 @@ void KbfxButton::toggleKMenu()
m_toggle = false;
}
-void KbfxButton::mousePressEvent ( QMouseEvent * e )
+void KbfxButton::mousePressEvent ( TQMouseEvent * e )
{
e->accept();
- if ( e->button() == QMouseEvent::LeftButton )
+ if ( e->button() == Qt::LeftButton )
{
if ( m_toggle == false )
{
@@ -264,23 +264,23 @@ void KbfxButton::mousePressEvent ( QMouseEvent * e )
emit clicked ();
}
- if ( e->button() == QMouseEvent::RightButton )
+ if ( e->button() == Qt::RightButton )
{
m_fadePix = m_normal_skin;
fade();
m_toggle = false;
- QPopupMenu *popup = new QPopupMenu();
+ TQPopupMenu *popup = new TQPopupMenu();
popup->insertItem ( SmallIcon ( "remove" ), i18n ( "Remove KBFX from Pannel" ),
- this, SLOT ( selfDeleter() ) );
+ this, TQT_SLOT ( selfDeleter() ) );
popup->insertItem ( SmallIcon ( "reload" ),i18n ( "Reload KBFX" ),
- this, SLOT ( reloadConfig() ) );
+ this, TQT_SLOT ( reloadConfig() ) );
popup->insertSeparator();
popup->insertItem ( SmallIcon ( "kbfxconfigapp" ), i18n ( "Configure KBFX" ),
- this, SLOT ( openConfigDialog() ) );
+ this, TQT_SLOT ( openConfigDialog() ) );
popup->insertItem ( SmallIcon ( "kmenuedit" ),i18n ( "Edit Applications Menu" ),
- this, SLOT ( openKmenuEdit() ) );
+ this, TQT_SLOT ( openKmenuEdit() ) );
popup->exec ( e->globalPos() );
delete popup;
}
@@ -301,14 +301,14 @@ void KbfxButton::reloadConfig()
void KbfxButton::selfDeleter()
{
DCOPRef m_kickerPanel ( "kicker", findPanel() );
- QStringList returnQStringList =m_kickerPanel.call ( "listApplets()" );
+ TQStringList returnTQStringList =m_kickerPanel.call ( "listApplets()" );
int _myIndex = 0;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
- for ( it = returnQStringList.begin();it != returnQStringList.end();it++ )
+ for ( it = returnTQStringList.begin();it != returnTQStringList.end();it++ )
{
- if ( ( *it ).contains ( "kbfx" ) )
+ if ( ( *it ).tqcontains ( "kbfx" ) )
{
break;
}
@@ -333,18 +333,18 @@ void KbfxButton::openConfigDialog()
KRun::runCommand ( "kbfxconfigapp" );
}
-void KbfxButton::paintEvent ( QPaintEvent * pe )
+void KbfxButton::paintEvent ( TQPaintEvent * pe )
{
- QPainter p;
+ TQPainter p;
if ( !m_current_skin.isNull () )
{
- QRect r = QRect ( pe->rect().x(),pe->rect().y(),m_current_skin.width(),m_current_skin.height() );
- m_buffer = new QPixmap();
+ TQRect r = TQRect ( pe->rect().x(),pe->rect().y(),m_current_skin.width(),m_current_skin.height() );
+ m_buffer = new TQPixmap();
m_buffer->resize ( r.size() );
m_buffer->fill ( this, r.topLeft() );
- p.begin ( m_buffer,this );
+ p.tqbegin ( m_buffer,this );
p.translate ( -r.x(), -r.y() );
p.drawPixmap ( r,m_current_skin );
p.end ();
@@ -354,37 +354,37 @@ void KbfxButton::paintEvent ( QPaintEvent * pe )
}
-void KbfxButton::dragEnterEvent ( QDragEnterEvent * e )
+void KbfxButton::dragEnterEvent ( TQDragEnterEvent * e )
{
- e->accept ( QUriDrag::canDecode ( e ) );
+ e->accept ( TQUriDrag::canDecode ( e ) );
kdDebug() << "Accepting KBFX button drag..." << endl;
}
-void KbfxButton::dropEvent ( QDropEvent * e )
+void KbfxButton::dropEvent ( TQDropEvent * e )
{
- QStringList filelist;
- QString _hover, _normal, _pressed, _tmp;
- QImage _hover_pix, _normal_pix, _pressed_pix;
- QUriDrag::decodeLocalFiles ( e, filelist );
+ TQStringList filelist;
+ TQString _hover, _normal, _pressed, _tmp;
+ TQImage _hover_pix, _normal_pix, _pressed_pix;
+ TQUriDrag::decodeLocalFiles ( e, filelist );
- for ( QStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it )
+ for ( TQStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it )
{
_tmp = ( *it );
kdDebug() << "KBFX button dropped file: " << _tmp << endl;
- if ( _tmp.contains ( "hover", FALSE ) > 0 )
+ if ( _tmp.tqcontains ( "hover", FALSE ) > 0 )
{
_hover = _tmp;
- _hover_pix = QImage ( _tmp );
+ _hover_pix = TQImage ( _tmp );
}
- if ( _tmp.contains ( "normal", FALSE ) > 0 )
+ if ( _tmp.tqcontains ( "normal", FALSE ) > 0 )
{
_normal = _tmp;
- _normal_pix = QImage ( _tmp );
+ _normal_pix = TQImage ( _tmp );
}
- if ( _tmp.contains ( "pressed", FALSE ) > 0 )
+ if ( _tmp.tqcontains ( "pressed", FALSE ) > 0 )
{
_pressed = _tmp;
- _pressed_pix = QImage ( _tmp );
+ _pressed_pix = TQImage ( _tmp );
}
}
diff --git a/src/kbfxbutton.h b/src/kbfxbutton.h
index d4ece12..a333b2d 100644
--- a/src/kbfxbutton.h
+++ b/src/kbfxbutton.h
@@ -22,12 +22,12 @@
#ifndef KBFX_BUTTON_H
#define KBFX_BUTTON_H
-#include <qdragobject.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qtimer.h>
+#include <tqdragobject.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -42,26 +42,27 @@
#include <kbfxplasmapixmapprovider.h>
-class QPixmap;
-class QLabel;
+class TQPixmap;
+class TQLabel;
-class KbfxButton:public QLabel
+class KbfxButton:public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- KbfxButton ( QWidget * parent, const char * name = 0 );
+ KbfxButton ( TQWidget * tqparent, const char * name = 0 );
~KbfxButton();
void kbfx_vista_button_setFx ( bool choice );
- virtual void paintEvent ( QPaintEvent *pe );
- virtual void enterEvent ( QEvent * e ) ;
- virtual void leaveEvent ( QEvent * e );
- virtual void mousePressEvent ( QMouseEvent * e );
- virtual void dropEvent ( QDropEvent *e );
- virtual void dragEnterEvent ( QDragEnterEvent *e );
+ virtual void paintEvent ( TQPaintEvent *pe );
+ virtual void enterEvent ( TQEvent * e ) ;
+ virtual void leaveEvent ( TQEvent * e );
+ virtual void mousePressEvent ( TQMouseEvent * e );
+ virtual void dropEvent ( TQDropEvent *e );
+ virtual void dragEnterEvent ( TQDragEnterEvent *e );
static bool m_sizeHeight;
static int m_size;
- QCString findPanel();
+ TQCString findPanel();
void readjust( bool );
public slots:
@@ -82,31 +83,31 @@ class KbfxButton:public QLabel
void showToolTip ();
protected:
- QPixmap m_over_skin;
- QPixmap m_pressed_skin;
- QPixmap m_release_skin;
- QPixmap m_normal_skin;
- QPixmap m_current_skin;
+ TQPixmap m_over_skin;
+ TQPixmap m_pressed_skin;
+ TQPixmap m_release_skin;
+ TQPixmap m_normal_skin;
+ TQPixmap m_current_skin;
// mng support ???
- QPixmap * m_buffer;
- QTimer * m_anime_timer;
- QMovie * m_normal_anime;
- QMovie * m_pressed_anime;
- QMovie * m_hover_anime;
- QMovie * m_current_anime;
- QString m_normal_path;
- QString m_over_path;
- QString m_pressed_path;
+ TQPixmap * m_buffer;
+ TQTimer * m_anime_timer;
+ TQMovie * m_normal_anime;
+ TQMovie * m_pressed_anime;
+ TQMovie * m_hover_anime;
+ TQMovie * m_current_anime;
+ TQString m_normal_path;
+ TQString m_over_path;
+ TQString m_pressed_path;
bool m_anime_on;
bool m_kicker_auto_adjust;
DCOPClient * m_dcopClient;
/* state of the button */
bool m_toggle;
- QTimer * fade_timer;
+ TQTimer * fade_timer;
float m_opacity;
- QPixmap m_fadePix;
+ TQPixmap m_fadePix;
int m_fadeTime;
};
diff --git a/src/kbfxplasmacanvasabstractitem.cpp b/src/kbfxplasmacanvasabstractitem.cpp
index 4655765..38e810e 100644
--- a/src/kbfxplasmacanvasabstractitem.cpp
+++ b/src/kbfxplasmacanvasabstractitem.cpp
@@ -35,8 +35,8 @@
#include "kbfxplasmacanvasabstractitem.h"
-KbfxPlasmaCanvasAbstractItem::KbfxPlasmaCanvasAbstractItem ( QCanvasPixmapArray * a, QCanvas * canvas )
- : QCanvasSprite ( a,canvas )
+KbfxPlasmaCanvasAbstractItem::KbfxPlasmaCanvasAbstractItem ( TQCanvasPixmapArray * a, TQCanvas * canvas )
+ : TQCanvasSprite ( a,canvas )
{
m_source=0;
@@ -65,24 +65,24 @@ KbfxPlasmaCanvasAbstractItem::isCurrent()
}
void
-KbfxPlasmaCanvasAbstractItem::mousePressEvent ( QMouseEvent * e )
+KbfxPlasmaCanvasAbstractItem::mousePressEvent ( TQMouseEvent * e )
{
e = e;
}
void
-KbfxPlasmaCanvasAbstractItem::mouseMoveEvent ( QMouseEvent * e )
+KbfxPlasmaCanvasAbstractItem::mouseMoveEvent ( TQMouseEvent * e )
{
e = e;
}
void
-KbfxPlasmaCanvasAbstractItem::enterEvent ( QEvent * e )
+KbfxPlasmaCanvasAbstractItem::enterEvent ( TQEvent * e )
{
e =e ;
}
-void KbfxPlasmaCanvasAbstractItem::mouseReleaseEvent ( QMouseEvent * e )
+void KbfxPlasmaCanvasAbstractItem::mouseReleaseEvent ( TQMouseEvent * e )
{
e =e ;
emit clicked();
@@ -104,25 +104,25 @@ void KbfxPlasmaCanvasAbstractItem::hideit()
}
void
-KbfxPlasmaCanvasAbstractItem::draw ( QPainter& pe )
+KbfxPlasmaCanvasAbstractItem::draw ( TQPainter& pe )
{
this->drawContent ( &pe );
}
-void KbfxPlasmaCanvasAbstractItem::setLabelText ( QString s )
+void KbfxPlasmaCanvasAbstractItem::setLabelText ( TQString s )
{
s = s;
}
-QPixmap
+TQPixmap
KbfxPlasmaCanvasAbstractItem::dragPixmap()
{
- return QPixmap();
+ return TQPixmap();
}
void
-KbfxPlasmaCanvasAbstractItem::drawContent ( QPainter * p )
+KbfxPlasmaCanvasAbstractItem::drawContent ( TQPainter * p )
{
p = p ;
}
diff --git a/src/kbfxplasmacanvasabstractitem.h b/src/kbfxplasmacanvasabstractitem.h
index 7110486..c1c8ac5 100644
--- a/src/kbfxplasmacanvasabstractitem.h
+++ b/src/kbfxplasmacanvasabstractitem.h
@@ -22,33 +22,34 @@
#ifndef KBFX_PLASMA_CANVAS_ABSTRACT_ITEM_H
#define KBFX_PLASMA_CANVAS_ABSTRACT_ITEM_H
-#include <qcanvas.h>
-#include <qpainter.h>
+#include <tqcanvas.h>
+#include <tqpainter.h>
#include "kbfxplasmacanvasrtti.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdesktopfile.h>
#include <kstandarddirs.h>
#include <kiconloader.h>
#include "kbfxdatasource.h"
#include <krun.h>
-class KbfxPlasmaCanvasAbstractItem:public QObject,public QCanvasSprite
+class KbfxPlasmaCanvasAbstractItem:public TQObject,public TQCanvasSprite
{
Q_OBJECT
+ TQ_OBJECT
public:
typedef enum {EXECUTABLE=0,SEPARATOR,INDEX,OTHER} Type;
// typedef enum {RASTER=0,VECTOR,NATIVE} SkinMode;
- KbfxPlasmaCanvasAbstractItem ( QCanvasPixmapArray * a, QCanvas * canvas );
+ KbfxPlasmaCanvasAbstractItem ( TQCanvasPixmapArray * a, TQCanvas * canvas );
virtual ~KbfxPlasmaCanvasAbstractItem ();
void setCurrent ( bool );
virtual Type type() { return m_type; }
virtual void setType ( Type t ) { m_type = t;}
- QString name() { if ( m_source != 0 ) return m_source->name(); else return QString ( "Not Set" );};
+ TQString name() { if ( m_source != 0 ) return m_source->name(); else return TQString ( "Not Set" );};
void setSource ( KbfxDataSource src );
bool isCurrent();
@@ -56,25 +57,25 @@ class KbfxPlasmaCanvasAbstractItem:public QObject,public QCanvasSprite
virtual int width() { return m_width;}
- virtual bool lookup ( QString str ) {str = str ; return false;}
+ virtual bool lookup ( TQString str ) {str = str ; return false;}
virtual int rtti() const { return CANVASITEM;}
- virtual void draw ( QPainter & pe );
+ virtual void draw ( TQPainter & pe );
- virtual void drawContent ( QPainter * pe );
+ virtual void drawContent ( TQPainter * pe );
- virtual QPixmap dragPixmap();
+ virtual TQPixmap dragPixmap();
//Event Handling
- virtual void mousePressEvent ( QMouseEvent * e );
- virtual void mouseMoveEvent ( QMouseEvent * e );
- virtual void enterEvent ( QEvent * e );
- virtual void mouseReleaseEvent ( QMouseEvent * e );
+ virtual void mousePressEvent ( TQMouseEvent * e );
+ virtual void mouseMoveEvent ( TQMouseEvent * e );
+ virtual void enterEvent ( TQEvent * e );
+ virtual void mouseReleaseEvent ( TQMouseEvent * e );
- virtual void setLabelText ( QString s );
+ virtual void setLabelText ( TQString s );
public slots:
virtual void hideit();
diff --git a/src/kbfxplasmacanvasgroup.cpp b/src/kbfxplasmacanvasgroup.cpp
index 044fc18..371e622 100644
--- a/src/kbfxplasmacanvasgroup.cpp
+++ b/src/kbfxplasmacanvasgroup.cpp
@@ -27,7 +27,7 @@ KbfxPlasmaCanvasGroup::KbfxPlasmaCanvasGroup ()
m_height = 0;
m_id = 0;
// m_count = 0;
- m_name = QString ( "Unknown" );
+ m_name = TQString ( "Unknown" );
// bool m_visible = true;
m_shaded = false;
}
@@ -96,7 +96,7 @@ KbfxPlasmaCanvasGroup::addItem ( KbfxPlasmaCanvasAbstractItem * it )
qDebug ( "Adding Failed bcos Name Missing" );
return false;
}
- ItemListMap::ConstIterator itn = itemListMap ().find ( it );
+ ItemListMap::ConstIterator itn = itemListMap ().tqfind ( it );
if ( itn != itemListMap ().end () )
{
qDebug ( "Adding Failed Due to Item not end" );
@@ -173,13 +173,13 @@ KbfxPlasmaCanvasGroup::hide()
}
void
-KbfxPlasmaCanvasGroup::setGroupName ( QString name )
+KbfxPlasmaCanvasGroup::setGroupName ( TQString name )
{
m_name = name;
delete [] name;
}
-QString
+TQString
KbfxPlasmaCanvasGroup::name()
{
return m_name;
@@ -271,13 +271,13 @@ KbfxPlasmaCanvasGroup::moveDown ( int y )
}
}
-QRect
+TQRect
KbfxPlasmaCanvasGroup::boundingRect ()
{
if ( this->count () == 0 )
- return QRect ( 0, 0, 0, 0 );
+ return TQRect ( 0, 0, 0, 0 );
- QRect r;
+ TQRect r;
for ( ItemListIter it ( m_itemList ); *it; ++it )
r |= ( *it )->boundingRect ();
return r;
@@ -308,7 +308,7 @@ KbfxPlasmaCanvasGroup::width ()
KbfxPlasmaCanvasGroup *
KbfxPlasmaCanvasGroup::groupContaining ( KbfxPlasmaCanvasAbstractItem * item )
{
- ItemListMap::ConstIterator it = itemListMap ().find ( item );
+ ItemListMap::ConstIterator it = itemListMap ().tqfind ( item );
if ( it == itemListMap ().end () )
return 0;
else
diff --git a/src/kbfxplasmacanvasgroup.h b/src/kbfxplasmacanvasgroup.h
index 1d6e2da..5ee60be 100644
--- a/src/kbfxplasmacanvasgroup.h
+++ b/src/kbfxplasmacanvasgroup.h
@@ -22,22 +22,23 @@
#ifndef KBFX_PLASMA_CANVAS_GROUP_H
#define KBFX_PLASMA_CANVAS_GROUP_H
-#include <qmap.h>
-#include <qptrlist.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
#include "kbfxplasmacanvasabstractitem.h"
-#include <qobject.h>
-class QCanvasItem;
-class QRect;
+#include <tqobject.h>
+class TQCanvasItem;
+class TQRect;
-class KbfxPlasmaCanvasGroup:public QObject
+class KbfxPlasmaCanvasGroup:public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- typedef QPtrList<KbfxPlasmaCanvasAbstractItem> ItemList;
- typedef QPtrListIterator<KbfxPlasmaCanvasAbstractItem> ItemListIter;
+ typedef TQPtrList<KbfxPlasmaCanvasAbstractItem> ItemList;
+ typedef TQPtrListIterator<KbfxPlasmaCanvasAbstractItem> ItemListIter;
//a Global mapof Groups
- typedef QMap<KbfxPlasmaCanvasAbstractItem*,KbfxPlasmaCanvasGroup*> ItemListMap;
+ typedef TQMap<KbfxPlasmaCanvasAbstractItem*,KbfxPlasmaCanvasGroup*> ItemListMap;
KbfxPlasmaCanvasGroup();
virtual ~KbfxPlasmaCanvasGroup();
@@ -46,15 +47,15 @@ class KbfxPlasmaCanvasGroup:public QObject
bool deleteItem ( KbfxPlasmaCanvasAbstractItem * );
void move ( int x,int y );
void moveBy ( int x,int y );
- QString name();
- QRect boundingRect();
+ TQString name();
+ TQRect boundingRect();
int count();
int height();
int width();
static KbfxPlasmaCanvasGroup * groupContaining ( KbfxPlasmaCanvasAbstractItem * );
- QString groupName();
+ TQString groupName();
uint groupID();
- void setGroupName ( QString name );
+ void setGroupName ( TQString name );
void setGroupID ( uint );
bool isShaded() {return m_shaded;};
virtual int rtti() { return 1005;}
@@ -82,7 +83,7 @@ class KbfxPlasmaCanvasGroup:public QObject
//state variables
bool m_shaded;
bool m_visible;
- QString m_name;
+ TQString m_name;
uint m_id;
int m_sepheight;
int m_count;
diff --git a/src/kbfxplasmacanvasgroupview.cpp b/src/kbfxplasmacanvasgroupview.cpp
index 04c7f8e..0f84605 100644
--- a/src/kbfxplasmacanvasgroupview.cpp
+++ b/src/kbfxplasmacanvasgroupview.cpp
@@ -27,7 +27,7 @@ KbfxPlasmaCanvasGroupView::KbfxPlasmaCanvasGroupView ()
m_count = 0;
m_height = 0;
m_width = 0;
- m_name = QString ( "Unkown" );
+ m_name = TQString ( "Unkown" );
m_fullExpand = false;
}
@@ -62,10 +62,10 @@ KbfxPlasmaCanvasGroupView::addGroup ( KbfxPlasmaCanvasGroup * gPtr )
// gPtr->show();
// qDebug("adding Groupy");
m_count++;
- connect ( gPtr, SIGNAL ( groupShade ( uint ) ), this,
- SLOT ( foldGroup ( uint ) ) );
- connect ( gPtr, SIGNAL ( groupUnShade ( uint ) ), this,
- SLOT ( unFoldGroup ( uint ) ) );
+ connect ( gPtr, TQT_SIGNAL ( groupShade ( uint ) ), this,
+ TQT_SLOT ( foldGroup ( uint ) ) );
+ connect ( gPtr, TQT_SIGNAL ( groupUnShade ( uint ) ), this,
+ TQT_SLOT ( unFoldGroup ( uint ) ) );
}
@@ -74,7 +74,7 @@ KbfxPlasmaCanvasGroupView::addGroup ( KbfxPlasmaCanvasGroup * gPtr )
}
KbfxPlasmaCanvasGroupView *
-KbfxPlasmaCanvasGroupView::contains ( KbfxPlasmaCanvasGroup * )
+KbfxPlasmaCanvasGroupView::tqcontains ( KbfxPlasmaCanvasGroup * )
{
//maybe I don't need this
return 0;
@@ -82,13 +82,13 @@ KbfxPlasmaCanvasGroupView::contains ( KbfxPlasmaCanvasGroup * )
}
void
-KbfxPlasmaCanvasGroupView::setName ( QString name )
+KbfxPlasmaCanvasGroupView::setName ( TQString name )
{
m_name = name;
//delete [] name;
}
-QString
+TQString
KbfxPlasmaCanvasGroupView::name()
{
return m_name;
diff --git a/src/kbfxplasmacanvasgroupview.h b/src/kbfxplasmacanvasgroupview.h
index 2f79e2c..779d813 100644
--- a/src/kbfxplasmacanvasgroupview.h
+++ b/src/kbfxplasmacanvasgroupview.h
@@ -22,8 +22,8 @@
#ifndef KBFX_PLASMA_CANVAS_GROUP_VIEW_H
#define KBFX_PLASMA_CANVAS_GROUP_VIEW_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "kbfxplasmacanvasgroup.h"
/**
@@ -31,20 +31,21 @@ This class will manager a list of Groups.
**/
-class KbfxPlasmaCanvasGroupView:public QObject
+class KbfxPlasmaCanvasGroupView:public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- typedef QPtrList<KbfxPlasmaCanvasGroup> groupPtrList;
+ typedef TQPtrList<KbfxPlasmaCanvasGroup> groupPtrList;
KbfxPlasmaCanvasGroupView();
virtual ~KbfxPlasmaCanvasGroupView();
void addGroup ( KbfxPlasmaCanvasGroup* );
void deleteGroup ( KbfxPlasmaCanvasGroup* );
- KbfxPlasmaCanvasGroupView* contains ( KbfxPlasmaCanvasGroup* );
+ KbfxPlasmaCanvasGroupView* tqcontains ( KbfxPlasmaCanvasGroup* );
virtual int rtti() {return 1006;}
void predend ( KbfxPlasmaCanvasGroup* );
void append ( KbfxPlasmaCanvasGroup * );
@@ -56,8 +57,8 @@ class KbfxPlasmaCanvasGroupView:public QObject
{
return m_width;
}
- void setName ( QString name );
- QString name();
+ void setName ( TQString name );
+ TQString name();
bool expanded() { return m_fullExpand;}
public slots:
void foldGroupAll();
@@ -75,8 +76,8 @@ class KbfxPlasmaCanvasGroupView:public QObject
int m_height;
int m_width;
bool m_fullExpand;
- QString m_name;
- QString m_iconPath;
+ TQString m_name;
+ TQString m_iconPath;
KbfxPlasmaCanvasGroup * m_current;
groupPtrList m_groupChain;
//state variables
diff --git a/src/kbfxplasmacanvasitem.cpp b/src/kbfxplasmacanvasitem.cpp
index 4a5824f..98173d2 100644
--- a/src/kbfxplasmacanvasitem.cpp
+++ b/src/kbfxplasmacanvasitem.cpp
@@ -21,18 +21,18 @@
#include "kbfxplasmacanvasitem.h"
-KbfxPlasmaCanvasItem::KbfxPlasmaCanvasItem ( QCanvasPixmapArray * a , QCanvas * canvas ) :KbfxPlasmaCanvasAbstractItem ( a, canvas )
+KbfxPlasmaCanvasItem::KbfxPlasmaCanvasItem ( TQCanvasPixmapArray * a , TQCanvas * canvas ) :KbfxPlasmaCanvasAbstractItem ( a, canvas )
{
this->setItemMode ( 1 );
setAnimated ( false );
m_desktopFile = 0L;
m_isCurrent = false;
// m_pixmapArray = a;
- QPixmap * _img = this->image ( 0 );
+ TQPixmap * _img = this->image ( 0 );
m_commentText ="No Comment Set By Plugin";
m_height =_img->height();
m_width =_img->width();
- connect ( this,SIGNAL ( clicked() ),this,SLOT ( exec() ) );
+ connect ( this,TQT_SIGNAL ( clicked() ),this,TQT_SLOT ( exec() ) );
m_type = OTHER;
// ConfigInit().read();
m_noComments = ConfigInit().m_noComments;
@@ -54,19 +54,19 @@ KbfxPlasmaCanvasItem::~KbfxPlasmaCanvasItem()
setCanvas ( 0L );
}
/*
-QCanvasPixmapArray * KbfxPlasmaCanvasItem::getPixmapArray()
+TQCanvasPixmapArray * KbfxPlasmaCanvasItem::getPixmapArray()
{
return m_pixmapArray;
}
*/
void
-KbfxPlasmaCanvasItem::setLabelText ( QString str )
+KbfxPlasmaCanvasItem::setLabelText ( TQString str )
{
- QFont * _font = new QFont ( m_fontAppNameFont );
+ TQFont * _font = new TQFont ( m_fontAppNameFont );
- QFontMetrics fm ( *_font );
+ TQFontMetrics fm ( *_font );
int _commentWidth = fm.width ( str+"..." );
int _strLen = str.length();
@@ -88,7 +88,7 @@ KbfxPlasmaCanvasItem::setLabelText ( QString str )
bool
-KbfxPlasmaCanvasItem::lookup ( QString str )
+KbfxPlasmaCanvasItem::lookup ( TQString str )
{
if ( str.isNull() )
@@ -97,11 +97,11 @@ KbfxPlasmaCanvasItem::lookup ( QString str )
if ( m_type == SEPARATOR || m_type == INDEX )
return false;
- if ( m_labelText.contains ( str,false ) > 0 )
+ if ( m_labelText.tqcontains ( str,false ) > 0 )
return true;
- if ( m_commentText.contains ( str,false ) > 0 )
+ if ( m_commentText.tqcontains ( str,false ) > 0 )
return true;
- if ( m_exec.contains ( str,false ) >0 )
+ if ( m_exec.tqcontains ( str,false ) >0 )
return true;
@@ -109,7 +109,7 @@ KbfxPlasmaCanvasItem::lookup ( QString str )
}
void
-KbfxPlasmaCanvasItem::setExec ( QString desktopfile )
+KbfxPlasmaCanvasItem::setExec ( TQString desktopfile )
{
m_desktopFile = new KDesktopFile ( desktopfile );
m_desktopFilePath = desktopfile;
@@ -130,12 +130,12 @@ KbfxPlasmaCanvasItem::setExec ( QString desktopfile )
}
void
-KbfxPlasmaCanvasItem::setIconPath ( QString str )
+KbfxPlasmaCanvasItem::setIconPath ( TQString str )
{
KIconLoader *iconload = KGlobal::iconLoader ();
m_iconPath = iconload->iconPath ( str, KIcon::Desktop, false );
// m_icon.load(m_iconPath);
- QImage _img ( m_iconPath );
+ TQImage _img ( m_iconPath );
if ( _img.height() > 128 )
{
@@ -148,7 +148,7 @@ KbfxPlasmaCanvasItem::setIconPath ( QString str )
}
void
-KbfxPlasmaCanvasItem::setIcon ( QPixmap pixmap )
+KbfxPlasmaCanvasItem::setIcon ( TQPixmap pixmap )
{
m_icon = pixmap;
@@ -206,7 +206,7 @@ KbfxPlasmaCanvasItem::setItemMode ( bool mode )
void
-KbfxPlasmaCanvasItem::drawBackDrop ( QPainter * pe,QRect & r )
+KbfxPlasmaCanvasItem::drawBackDrop ( TQPainter * pe,TQRect & r )
{
r = r ;
if ( pe == NULL )
@@ -218,7 +218,7 @@ KbfxPlasmaCanvasItem::drawBackDrop ( QPainter * pe,QRect & r )
/*
void
-KbfxPlasmaCanvasItem::drawText(QPainter * pe,QString str)
+KbfxPlasmaCanvasItem::drawText(TQPainter * pe,TQString str)
{
@@ -226,21 +226,21 @@ KbfxPlasmaCanvasItem::drawText(QPainter * pe,QString str)
*/
void
-KbfxPlasmaCanvasItem::draw ( QPainter & pe )
+KbfxPlasmaCanvasItem::draw ( TQPainter & pe )
{
drawContent ( &pe );
}
-QPixmap
+TQPixmap
KbfxPlasmaCanvasItem::dragPixmap()
{
double _x = x();
double _y = y();
setX ( 0.0 );
setY ( 0.0 );
- QPixmap dragpixmap ( this->width(),this->height() );
- dragpixmap.fill ( QColor ( 255,255,255 ) );
- QPainter p;
+ TQPixmap dragpixmap ( this->width(),this->height() );
+ dragpixmap.fill ( TQColor ( 255,255,255 ) );
+ TQPainter p;
p.begin ( &dragpixmap );
this->drawContent ( &p );
p.end();
@@ -251,7 +251,7 @@ KbfxPlasmaCanvasItem::dragPixmap()
}
void
-KbfxPlasmaCanvasItem::drawContent ( QPainter * pe )
+KbfxPlasmaCanvasItem::drawContent ( TQPainter * pe )
{
if ( m_isCurrent )
{
@@ -262,7 +262,7 @@ KbfxPlasmaCanvasItem::drawContent ( QPainter * pe )
this->setFrame ( 0 );
}
//int _currentFrame =
- QCanvasPixmap *cp = this->image ( this->frame () );
+ TQCanvasPixmap *cp = this->image ( this->frame () );
m_height = cp->height();
m_width = cp->width();
//Draw the Background
@@ -274,9 +274,9 @@ KbfxPlasmaCanvasItem::drawContent ( QPainter * pe )
}
else
{
- pe->setPen ( QColor ( 91,178,62 ) );
+ pe->setPen ( TQColor ( 91,178,62 ) );
pe->drawRect ( this->boundingRect() );
- pe->setPen ( QColor ( 0,10,0 ) );
+ pe->setPen ( TQColor ( 0,10,0 ) );
}
@@ -284,15 +284,15 @@ KbfxPlasmaCanvasItem::drawContent ( QPainter * pe )
We will split the Item box into two
**/
- QRect tmp ( 0,0,0,0 );
+ TQRect tmp ( 0,0,0,0 );
//TODO: Should be read from kbfxconfig.cpp
//
- QRect * rectTop = new QRect ( m_margin, ( int ) y(), cp->width() - m_margin, cp->height() /2 );
- QRect * rectBot = new QRect ( m_margin, ( int ) y() + rectTop->height(), cp->width() - m_margin, cp->height() /2 );
+ TQRect * rectTop = new TQRect ( m_margin, ( int ) y(), cp->width() - m_margin, cp->height() /2 );
+ TQRect * rectBot = new TQRect ( m_margin, ( int ) y() + rectTop->height(), cp->width() - m_margin, cp->height() /2 );
///Draw Icon
@@ -300,15 +300,15 @@ KbfxPlasmaCanvasItem::drawContent ( QPainter * pe )
//TODO::remover hard coded icon size : read from config
if ( !m_isCurrent )
- pe->drawPixmap ( QRect ( ( m_margin-m_iconSize ) /2, ( int ) y() + ( cp->height()-m_iconSize ) /2,m_iconSize,m_iconSize ),m_icon );
+ pe->drawPixmap ( TQRect ( ( m_margin-m_iconSize ) /2, ( int ) y() + ( cp->height()-m_iconSize ) /2,m_iconSize,m_iconSize ),m_icon );
else
- pe->drawPixmap ( QRect ( ( m_margin-m_iconSize ) /2, ( int ) y() + ( cp->height()-m_iconSize ) /2,m_iconSize+2,m_iconSize+2 ),m_icon );
+ pe->drawPixmap ( TQRect ( ( m_margin-m_iconSize ) /2, ( int ) y() + ( cp->height()-m_iconSize ) /2,m_iconSize+2,m_iconSize+2 ),m_icon );
//End of DrawIcon
- QFont * _font = new QFont ( m_fontAppNameFont );
- QFont * _font_comment = new QFont ( m_commentFont );
- QFont * _font_separator = new QFont ( m_sepNameFont );
+ TQFont * _font = new TQFont ( m_fontAppNameFont );
+ TQFont * _font_comment = new TQFont ( m_commentFont );
+ TQFont * _font_separator = new TQFont ( m_sepNameFont );
pe->setFont ( *_font );
if ( this->type() == EXECUTABLE )
@@ -317,17 +317,17 @@ KbfxPlasmaCanvasItem::drawContent ( QPainter * pe )
if ( m_noComments == false )
{
if ( m_isCurrent && m_boldFonts == true ) { _font->setBold ( true );pe->setFont ( *_font ); }
- pe->drawText ( *rectTop, Qt::AlignLeft| Qt::AlignBottom ,QString ( m_labelText ), -1, &tmp,0 );
+ pe->drawText ( *rectTop, TQt::AlignLeft| TQt::AlignBottom ,TQString ( m_labelText ), -1, &tmp );
pe->setPen ( m_lineColor );
pe->drawLine ( m_margin, ( int ) y() + rectTop->height(), ( int ) cp->width() - 2, ( int ) y() + rectTop->height() );
pe->setFont ( *_font_comment );
pe->setPen ( m_commentColor );
- pe->drawText ( *rectBot, Qt::AlignLeft| Qt::AlignTop ,QString ( m_commentText ), -1, &tmp,0 );
+ pe->drawText ( *rectBot, TQt::AlignLeft| TQt::AlignTop ,TQString ( m_commentText ), -1, &tmp );
}
else
{
- pe->drawText ( QRect ( m_margin+1, ( int ) y()+1,cp->width(),cp->height() ), Qt::AlignLeft | Qt::AlignVCenter ,QString ( m_labelText ), -1, &tmp,0 );
-// pe->drawText ( QRect ( m_margin, ( int ) y(),cp->width(),cp->height() ), Qt::AlignLeft | Qt::AlignVCenter ,QString ( m_labelText ), -1, &tmp,0 );
+ pe->drawText ( TQRect ( m_margin+1, ( int ) y()+1,cp->width(),cp->height() ), TQt::AlignLeft | TQt::AlignVCenter ,TQString ( m_labelText ), -1, &tmp );
+// pe->drawText ( TQRect ( m_margin, ( int ) y(),cp->width(),cp->height() ), TQt::AlignLeft | TQt::AlignVCenter ,TQString ( m_labelText ), -1, &tmp );
}
}
else
@@ -341,7 +341,7 @@ KbfxPlasmaCanvasItem::drawContent ( QPainter * pe )
{
pe->setPen ( m_fontAppNameColor );
}
- pe->drawText ( QRect ( ( int ) x(), ( int ) y(),cp->width(),cp->height() ), Qt::AlignCenter ,QString ( m_labelText ), -1, &tmp,0 );
+ pe->drawText ( TQRect ( ( int ) x(), ( int ) y(),cp->width(),cp->height() ), TQt::AlignCenter ,TQString ( m_labelText ), -1, &tmp );
}
@@ -356,13 +356,13 @@ KbfxPlasmaCanvasItem::drawContent ( QPainter * pe )
}
-void::KbfxPlasmaCanvasItem::setComment ( QString str )
+void::KbfxPlasmaCanvasItem::setComment ( TQString str )
{
- QFont * _font = new QFont ( m_commentFont );
+ TQFont * _font = new TQFont ( m_commentFont );
- QFontMetrics fm ( *_font );
+ TQFontMetrics fm ( *_font );
int _commentWidth = fm.width ( str+"..." );
int _strLen = str.length();
diff --git a/src/kbfxplasmacanvasitem.h b/src/kbfxplasmacanvasitem.h
index 92f1047..f240ef5 100644
--- a/src/kbfxplasmacanvasitem.h
+++ b/src/kbfxplasmacanvasitem.h
@@ -22,10 +22,10 @@
#ifndef KBFX_PLASMA_CANVAS_ITEM_H
#define KBFX_PLASMA_CANVAS_ITEM_H
-#include <qcanvas.h>
-#include <qfont.h>
-#include <qfontinfo.h>
-#include <qimage.h>
+#include <tqcanvas.h>
+#include <tqfont.h>
+#include <tqfontinfo.h>
+#include <tqimage.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -41,6 +41,7 @@ class KbfxPlasmaCanvasItem:public KbfxPlasmaCanvasAbstractItem
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -48,7 +49,7 @@ class KbfxPlasmaCanvasItem:public KbfxPlasmaCanvasAbstractItem
typedef enum {RASTER=0,VECTOR,NATIVE} SkinMode;
- KbfxPlasmaCanvasItem ( QCanvasPixmapArray * a, QCanvas * canvas );
+ KbfxPlasmaCanvasItem ( TQCanvasPixmapArray * a, TQCanvas * canvas );
KbfxPlasmaCanvasItem ( const KbfxPlasmaCanvasItem &t );
KbfxPlasmaCanvasItem &operator = ( const KbfxPlasmaCanvasItem &t );
virtual ~KbfxPlasmaCanvasItem ();
@@ -57,39 +58,39 @@ class KbfxPlasmaCanvasItem:public KbfxPlasmaCanvasAbstractItem
void setItemMode ( bool mode=true );
void setType ( Type );
void setCurrent ( bool );
- void setExec ( QString desktopfile );
- QString name() {return m_labelText;};
- QString desktopFile() { return m_desktopFilePath;}
+ void setExec ( TQString desktopfile );
+ TQString name() {return m_labelText;};
+ TQString desktopFile() { return m_desktopFilePath;}
KbfxDataSource * source() { return m_source;}
void setSource ( KbfxDataSource src );
- void setCommand ( QString cmd );
- void setComment ( QString comment );
- void setIcon ( QPixmap pixmap );
- void setIconPath ( QString path );
+ void setCommand ( TQString cmd );
+ void setComment ( TQString comment );
+ void setIcon ( TQPixmap pixmap );
+ void setIconPath ( TQString path );
bool isCurrent();
int height() { return m_height;}
int width() { return m_width;}
Type type() { return m_type;}
- bool lookup ( QString str );
+ bool lookup ( TQString str );
virtual void advance ( int phase );
virtual int rtti() const { return CANVASITEM;}
- virtual void draw ( QPainter & pe );
- virtual void drawContent ( QPainter * pe );
- virtual QPixmap dragPixmap();
+ virtual void draw ( TQPainter & pe );
+ virtual void drawContent ( TQPainter * pe );
+ virtual TQPixmap dragPixmap();
-// virtual void drawText(QPainter *pe,QString str);
- virtual void drawBackDrop ( QPainter * pe,QRect & rect );
+// virtual void drawText(TQPainter *pe,TQString str);
+ virtual void drawBackDrop ( TQPainter * pe,TQRect & rect );
/* Event Handling */
- virtual void mousePressEvent ( QMouseEvent * e );
- virtual void mouseMoveEvent ( QMouseEvent * e );
- virtual void enterEvent ( QEvent * e );
- virtual void mouseReleaseEvent ( QMouseEvent * e );
+ virtual void mousePressEvent ( TQMouseEvent * e );
+ virtual void mouseMoveEvent ( TQMouseEvent * e );
+ virtual void enterEvent ( TQEvent * e );
+ virtual void mouseReleaseEvent ( TQMouseEvent * e );
- void setLabelText ( QString s );
+ void setLabelText ( TQString s );
public slots:
void updateAngle() {}
@@ -102,32 +103,32 @@ class KbfxPlasmaCanvasItem:public KbfxPlasmaCanvasAbstractItem
private:
- void drawStar ( QPainter * pe );
+ void drawStar ( TQPainter * pe );
int m_frameCount;
int m_textWidth;
- QString m_exec;
- QString m_desktopFilePath;
- QString m_labelText;
- QString m_commentText;
- QPixmap m_icon;
- QString m_iconPath;
+ TQString m_exec;
+ TQString m_desktopFilePath;
+ TQString m_labelText;
+ TQString m_commentText;
+ TQPixmap m_icon;
+ TQString m_iconPath;
KDesktopFile * m_desktopFile;
KbfxDataSource * m_source;
/* Theming stuff */
- QColor m_fontAppNameColor;
- QFont m_fontAppNameFont;
- QColor m_commentColor;
- QFont m_commentFont;
- QColor m_lineColor;
- QFont m_sepNameFont;
+ TQColor m_fontAppNameColor;
+ TQFont m_fontAppNameFont;
+ TQColor m_commentColor;
+ TQFont m_commentFont;
+ TQColor m_lineColor;
+ TQFont m_sepNameFont;
bool m_boldFonts;
bool m_skined;
bool m_restricted ; //KDE kiosk
Type m_type;
bool m_hidden;
- QString m_error;
+ TQString m_error;
bool m_isCurrent;
bool m_noComments;
int m_margin;
diff --git a/src/kbfxplasmacanvasitem_events.cpp b/src/kbfxplasmacanvasitem_events.cpp
index d268a9e..1804ca7 100644
--- a/src/kbfxplasmacanvasitem_events.cpp
+++ b/src/kbfxplasmacanvasitem_events.cpp
@@ -24,7 +24,7 @@
#include <kdesktopfile.h>
#include <kiconeffect.h>
-void KbfxPlasmaCanvasItem::mousePressEvent ( QMouseEvent * e )
+void KbfxPlasmaCanvasItem::mousePressEvent ( TQMouseEvent * e )
{
e = e;
//TODO:
@@ -34,21 +34,21 @@ void KbfxPlasmaCanvasItem::mousePressEvent ( QMouseEvent * e )
}
void
-KbfxPlasmaCanvasItem::mouseReleaseEvent ( QMouseEvent * e )
+KbfxPlasmaCanvasItem::mouseReleaseEvent ( TQMouseEvent * e )
{
e = e;
- // QPixmap pix = labelIcon();
+ // TQPixmap pix = labelIcon();
emit clicked();
}
-void KbfxPlasmaCanvasItem::mouseMoveEvent ( QMouseEvent * e )
+void KbfxPlasmaCanvasItem::mouseMoveEvent ( TQMouseEvent * e )
{
e=e;
//qDebug("Item revices Mouse Event");
}
-void KbfxPlasmaCanvasItem::enterEvent ( QEvent * e )
+void KbfxPlasmaCanvasItem::enterEvent ( TQEvent * e )
{
e=e;
//qDebug("Mouse Enters");
@@ -62,7 +62,7 @@ KbfxPlasmaCanvasItem::exec()
return;
-// KIconEffect::visualActivate(new QWidget(), this->boundingRect());
+// KIconEffect::visualActivate(new TQWidget(), this->boundingRect());
m_source->exec();
}
diff --git a/src/kbfxplasmacanvasitemwrapper.cpp b/src/kbfxplasmacanvasitemwrapper.cpp
index 1c244f4..a39663c 100644
--- a/src/kbfxplasmacanvasitemwrapper.cpp
+++ b/src/kbfxplasmacanvasitemwrapper.cpp
@@ -20,10 +20,10 @@
*/
#include "kbfxplasmacanvasitemwrapper.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kbfxplasmapixmapprovider.h>
-KbfxPlasmaCanvasItemWrapper::KbfxPlasmaCanvasItemWrapper ( QCanvas * canvas )
+KbfxPlasmaCanvasItemWrapper::KbfxPlasmaCanvasItemWrapper ( TQCanvas * canvas )
{
m_canvas = canvas;
}
@@ -31,48 +31,48 @@ KbfxPlasmaCanvasItemWrapper::KbfxPlasmaCanvasItemWrapper ( QCanvas * canvas )
KbfxPlasmaCanvasItemWrapper::~KbfxPlasmaCanvasItemWrapper ()
{}
-QCanvasItem *
+TQCanvasItem *
KbfxPlasmaCanvasItemWrapper::item ( KbfxPlasmaCanvasItem::Type __type )
{
- QPixmap _img_sep = ( *KbfxPlasmaPixmapProvider::pixmap ( "separator" ) );
- QImage _tmp_img = _img_sep.convertToImage();
- _tmp_img = _tmp_img.smoothScale ( ConfigInit().m_itemView_w, _img_sep.height (),QImage::ScaleFree );
- _img_sep = QPixmap ( _tmp_img );
+ TQPixmap _img_sep = ( *KbfxPlasmaPixmapProvider::pixmap ( "separator" ) );
+ TQImage _tmp_img = _img_sep.convertToImage();
+ _tmp_img = _tmp_img.smoothScale ( ConfigInit().m_itemView_w, _img_sep.height (),TQ_ScaleFree );
+ _img_sep = TQPixmap ( _tmp_img );
- QPixmap _img_tnorm = ( *KbfxPlasmaPixmapProvider::pixmap ( "tilenormal" ) );
+ TQPixmap _img_tnorm = ( *KbfxPlasmaPixmapProvider::pixmap ( "tilenormal" ) );
_tmp_img = _img_tnorm.convertToImage();
- _tmp_img = _tmp_img.smoothScale ( ConfigInit().m_itemView_w, _img_tnorm.height (),QImage::ScaleFree );
- _img_tnorm = QPixmap ( _tmp_img );
+ _tmp_img = _tmp_img.smoothScale ( ConfigInit().m_itemView_w, _img_tnorm.height (),TQ_ScaleFree );
+ _img_tnorm = TQPixmap ( _tmp_img );
- QPixmap _img_thov = ( *KbfxPlasmaPixmapProvider::pixmap ( "tilehover" ) );
+ TQPixmap _img_thov = ( *KbfxPlasmaPixmapProvider::pixmap ( "tilehover" ) );
_tmp_img = _img_thov.convertToImage();
- _tmp_img = _tmp_img.smoothScale ( ConfigInit().m_itemView_w, _img_thov.height (),QImage::ScaleFree );
- _img_thov = QPixmap ( _tmp_img );
+ _tmp_img = _tmp_img.smoothScale ( ConfigInit().m_itemView_w, _img_thov.height (),TQ_ScaleFree );
+ _img_thov = TQPixmap ( _tmp_img );
if ( __type == KbfxPlasmaCanvasItem::SEPARATOR )
{
- QValueList<QPixmap> list;
+ TQValueList<TQPixmap> list;
list.append ( _img_sep );
KbfxPlasmaCanvasItem *_ret =
- new KbfxPlasmaCanvasItem ( new QCanvasPixmapArray ( list ),m_canvas );
+ new KbfxPlasmaCanvasItem ( new TQCanvasPixmapArray ( list ),m_canvas );
_ret->setType ( __type );
- return ( QCanvasItem * ) _ret;
+ return ( TQCanvasItem * ) _ret;
}
if ( __type == KbfxPlasmaCanvasItem::EXECUTABLE )
{
- QValueList<QPixmap> list;
+ TQValueList<TQPixmap> list;
list.append ( _img_tnorm );
list.append ( _img_thov );
- QCanvasPixmapArray * _pArray = new QCanvasPixmapArray ( list );
+ TQCanvasPixmapArray * _pArray = new TQCanvasPixmapArray ( list );
KbfxPlasmaCanvasItem *_ret = new KbfxPlasmaCanvasItem ( _pArray,
m_canvas );
_ret->setType ( __type );
- return ( QCanvasItem * ) _ret;
+ return ( TQCanvasItem * ) _ret;
}
@@ -80,43 +80,43 @@ KbfxPlasmaCanvasItemWrapper::item ( KbfxPlasmaCanvasItem::Type __type )
}
-QCanvasItem *
+TQCanvasItem *
KbfxPlasmaCanvasItemWrapper::itemIndex ( KbfxPlasmaCanvasItem::Type __type )
{
- QPixmap _img_isep = ( *KbfxPlasmaPixmapProvider::pixmap ( "indexseparator" ) );
- QImage _tmp_img = _img_isep.convertToImage();
- _tmp_img = _tmp_img.smoothScale ( ConfigInit().m_listBox_w, _img_isep.height (),QImage::ScaleFree );
- _img_isep = QPixmap ( _tmp_img );
+ TQPixmap _img_isep = ( *KbfxPlasmaPixmapProvider::pixmap ( "indexseparator" ) );
+ TQImage _tmp_img = _img_isep.convertToImage();
+ _tmp_img = _tmp_img.smoothScale ( ConfigInit().m_listBox_w, _img_isep.height (),TQ_ScaleFree );
+ _img_isep = TQPixmap ( _tmp_img );
- QPixmap _img_r = ( *KbfxPlasmaPixmapProvider::pixmap ( "rhstile" ) );
+ TQPixmap _img_r = ( *KbfxPlasmaPixmapProvider::pixmap ( "rhstile" ) );
_tmp_img = _img_r.convertToImage();
- _tmp_img = _tmp_img.smoothScale ( ConfigInit().m_listBox_w, _img_r.height (),QImage::ScaleFree );
- _img_r = QPixmap ( _tmp_img );
+ _tmp_img = _tmp_img.smoothScale ( ConfigInit().m_listBox_w, _img_r.height (),TQ_ScaleFree );
+ _img_r = TQPixmap ( _tmp_img );
- QPixmap _img_rhov = ( *KbfxPlasmaPixmapProvider::pixmap ( "rhshovertile" ) );
+ TQPixmap _img_rhov = ( *KbfxPlasmaPixmapProvider::pixmap ( "rhshovertile" ) );
_tmp_img = _img_rhov.convertToImage();
- _tmp_img = _tmp_img.smoothScale ( ConfigInit().m_listBox_w, _img_rhov.height (),QImage::ScaleFree );
- _img_rhov = QPixmap ( _tmp_img );
+ _tmp_img = _tmp_img.smoothScale ( ConfigInit().m_listBox_w, _img_rhov.height (),TQ_ScaleFree );
+ _img_rhov = TQPixmap ( _tmp_img );
if ( __type == KbfxPlasmaCanvasItem::SEPARATOR )
{
- QValueList<QPixmap> list;
+ TQValueList<TQPixmap> list;
list.append ( _img_isep );
KbfxPlasmaIndexItem *_ret =
- new KbfxPlasmaIndexItem ( new QCanvasPixmapArray ( list ),m_canvas );
+ new KbfxPlasmaIndexItem ( new TQCanvasPixmapArray ( list ),m_canvas );
_ret->setType ( __type );
- return ( QCanvasItem * ) _ret;
+ return ( TQCanvasItem * ) _ret;
}
if ( __type == KbfxPlasmaCanvasItem::INDEX )
{
- QValueList<QPixmap> list2;
+ TQValueList<TQPixmap> list2;
list2.append ( _img_r );
list2.append ( _img_rhov );
- KbfxPlasmaIndexItem *_ret = new KbfxPlasmaIndexItem ( new QCanvasPixmapArray ( list2 ),
+ KbfxPlasmaIndexItem *_ret = new KbfxPlasmaIndexItem ( new TQCanvasPixmapArray ( list2 ),
m_canvas );
_ret->setType ( __type );
- return ( QCanvasItem * ) _ret;
+ return ( TQCanvasItem * ) _ret;
}
return 0;
diff --git a/src/kbfxplasmacanvasitemwrapper.h b/src/kbfxplasmacanvasitemwrapper.h
index 54e70b2..ba1954b 100644
--- a/src/kbfxplasmacanvasitemwrapper.h
+++ b/src/kbfxplasmacanvasitemwrapper.h
@@ -24,23 +24,24 @@
#include "kbfxplasmacanvasitem.h"
#include "kbfxplasmaindexitem.h"
-#include <qcanvas.h>
+#include <tqcanvas.h>
-class KbfxPlasmaCanvasItemWrapper:public QObject
+class KbfxPlasmaCanvasItemWrapper:public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KbfxPlasmaCanvasItemWrapper ( QCanvas * canvas );
+ KbfxPlasmaCanvasItemWrapper ( TQCanvas * canvas );
~KbfxPlasmaCanvasItemWrapper();
- QCanvasItem* item ( KbfxPlasmaCanvasItem::Type __type );
- QCanvasItem* itemIndex ( KbfxPlasmaCanvasItem::Type __type );
+ TQCanvasItem* item ( KbfxPlasmaCanvasItem::Type __type );
+ TQCanvasItem* itemIndex ( KbfxPlasmaCanvasItem::Type __type );
private:
- QCanvas * m_canvas;
+ TQCanvas * m_canvas;
//none
diff --git a/src/kbfxplasmacanvasstack.cpp b/src/kbfxplasmacanvasstack.cpp
index bfe5b36..4ce38cb 100644
--- a/src/kbfxplasmacanvasstack.cpp
+++ b/src/kbfxplasmacanvasstack.cpp
@@ -81,10 +81,10 @@ KbfxPlasmaCanvasStack::raise ( uint id )
bool
-KbfxPlasmaCanvasStack::contains ( QString name )
+KbfxPlasmaCanvasStack::tqcontains ( TQString name )
{
//FIXME:Depricated Data Structure Needs fixing
- if ( m_dict.contains ( name ) == true )
+ if ( m_dict.tqcontains ( name ) == true )
return true;
else
return false;
@@ -131,7 +131,7 @@ KbfxPlasmaCanvasStack::hide()
void
-KbfxPlasmaCanvasStack::raiseByName ( QString name )
+KbfxPlasmaCanvasStack::raiseByName ( TQString name )
{
for ( uint i = 0; i < m_groupChain.count (); ++i )
{
@@ -154,7 +154,7 @@ KbfxPlasmaCanvasStack::raiseByName ( QString name )
KbfxPlasmaCanvasGroupView *
-KbfxPlasmaCanvasStack::activeViewByName ( QString name )
+KbfxPlasmaCanvasStack::activeViewByName ( TQString name )
{
@@ -170,7 +170,7 @@ KbfxPlasmaCanvasStack::activeViewByName ( QString name )
}
-QString
+TQString
KbfxPlasmaCanvasStack::getItemName ( int id )
{
return m_groupChain.at ( id )->name();
diff --git a/src/kbfxplasmacanvasstack.h b/src/kbfxplasmacanvasstack.h
index 91ad67c..386c9b5 100644
--- a/src/kbfxplasmacanvasstack.h
+++ b/src/kbfxplasmacanvasstack.h
@@ -22,8 +22,8 @@
#ifndef KBFX_PLASMA_CANVAS_STACK_H
#define KBFX_PLASMA_CANVAS_STACK_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include <kbfxplasmacanvasstackdata.h>
//#include "kbfxplasmacanvasgroup.h"
#include "kbfxplasmacanvasgroupview.h"
@@ -33,22 +33,23 @@ This class will manager a list of Grouplists.
**/
-class KbfxPlasmaCanvasStack:public QObject
+class KbfxPlasmaCanvasStack:public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- typedef QPtrList<KbfxPlasmaCanvasGroupView> groupPtrList;
- typedef QMap<QString,uint> Dict;//DEPRECATED
- typedef QMap<KbfxPlasmaCanvasStackData,uint> DataDict;
+ typedef TQPtrList<KbfxPlasmaCanvasGroupView> groupPtrList;
+ typedef TQMap<TQString,uint> Dict;//DEPRECATED
+ typedef TQMap<KbfxPlasmaCanvasStackData,uint> DataDict;
KbfxPlasmaCanvasStack();
virtual ~KbfxPlasmaCanvasStack();
void addGroup ( KbfxPlasmaCanvasGroupView* );
void deleteGroup ( KbfxPlasmaCanvasGroupView* );
- KbfxPlasmaCanvasStack* contains ( KbfxPlasmaCanvasGroupView* );
- QString getItemName ( int );
+ KbfxPlasmaCanvasStack* tqcontains ( KbfxPlasmaCanvasGroupView* );
+ TQString getItemName ( int );
virtual int rtti() {return 1006;}
void predend ( KbfxPlasmaCanvasGroupView* );
void append ( KbfxPlasmaCanvasGroupView* );
@@ -63,13 +64,13 @@ class KbfxPlasmaCanvasStack:public QObject
{
return m_width;
}
- QString name() {return m_name;}
- void setName ( QString name ) { m_name = name;}
- bool contains ( QString );
- KbfxPlasmaCanvasGroupView * activeViewByName ( QString name );
+ TQString name() {return m_name;}
+ void setName ( TQString name ) { m_name = name;}
+ bool tqcontains ( TQString );
+ KbfxPlasmaCanvasGroupView * activeViewByName ( TQString name );
public slots:
void raise ( uint id );
- void raiseByName ( QString name );
+ void raiseByName ( TQString name );
private:
int m_x;
int m_y;
@@ -81,7 +82,7 @@ class KbfxPlasmaCanvasStack:public QObject
groupPtrList m_groupChain;
Dict m_dict;
DataDict m_dataDict;
- QString m_name;
+ TQString m_name;
//state variables
};
diff --git a/src/kbfxplasmacanvasstackdata.h b/src/kbfxplasmacanvasstackdata.h
index 1783b77..4cbbb4b 100644
--- a/src/kbfxplasmacanvasstackdata.h
+++ b/src/kbfxplasmacanvasstackdata.h
@@ -29,8 +29,8 @@ class KbfxPlasmaCanvasStackData
public:
KbfxPlasmaCanvasStackData() {}
~KbfxPlasmaCanvasStackData() {}
- QString name;
- QString icon;
+ TQString name;
+ TQString icon;
int id;
};
diff --git a/src/kbfxplasmacanvasview.cpp b/src/kbfxplasmacanvasview.cpp
index 013458e..b1943db 100644
--- a/src/kbfxplasmacanvasview.cpp
+++ b/src/kbfxplasmacanvasview.cpp
@@ -21,16 +21,16 @@
#include "kbfxplasmacanvasview.h"
-KbfxPlasmaCanvasView::KbfxPlasmaCanvasView ( QWidget * parent,
+KbfxPlasmaCanvasView::KbfxPlasmaCanvasView ( TQWidget * tqparent,
const char *name, WFlags fl ) :
- QCanvasView ( parent, name,fl )
+ TQCanvasView ( tqparent, name,fl )
{
viewport ()->setMouseTracking ( TRUE );
viewport ()->setAcceptDrops ( true );
- this->setVScrollBarMode ( QScrollView::AlwaysOff );
- this->setHScrollBarMode ( QScrollView::AlwaysOff );
- setFrameShape ( QFrame::NoFrame );
+ this->setVScrollBarMode ( TQScrollView::AlwaysOff );
+ this->setHScrollBarMode ( TQScrollView::AlwaysOff );
+ setFrameShape ( TQFrame::NoFrame );
m_currentItem = 0L;
m_stack = 0;
m_currentView = new KbfxPlasmaCanvasGroupView ();
@@ -39,17 +39,17 @@ KbfxPlasmaCanvasView::KbfxPlasmaCanvasView ( QWidget * parent,
m_exeCandidate = 0;
m_findDone = true;
m_selectedItem = 0L;
- m_search = new QCanvas ( this->width (), this->height () );
+ m_search = new TQCanvas ( this->width (), this->height () );
m_scrollbar_top = new KbfxSpinxScrollBar ( this );
m_scrollbar_bot = new KbfxSpinxScrollBar ( this,"bottom",1);
m_scrollbar_top->setType ( KbfxSpinxScrollBar::UP );
m_scrollbar_bot->setType ( KbfxSpinxScrollBar::DOWN );
- connect ( m_scrollbar_top, SIGNAL ( scroll ( int, int ) ), this,
- SLOT ( scrollBy ( int, int ) ) );
- connect ( m_scrollbar_bot, SIGNAL ( scroll ( int, int ) ), this,
- SLOT ( scrollBy ( int, int ) ) );
+ connect ( m_scrollbar_top, TQT_SIGNAL ( scroll ( int, int ) ), this,
+ TQT_SLOT ( scrollBy ( int, int ) ) );
+ connect ( m_scrollbar_bot, TQT_SIGNAL ( scroll ( int, int ) ), this,
+ TQT_SLOT ( scrollBy ( int, int ) ) );
placeScrollBars ();
}
@@ -66,9 +66,9 @@ KbfxPlasmaCanvasView::~KbfxPlasmaCanvasView ()
}
void
-KbfxPlasmaCanvasView::keyPressEvent ( QKeyEvent * ke )
+KbfxPlasmaCanvasView::keyPressEvent ( TQKeyEvent * ke )
{
- qDebug ( "QCanvasView got Key events" );
+ qDebug ( "TQCanvasView got Key events" );
ke->ignore();
}
@@ -89,9 +89,9 @@ KbfxPlasmaCanvasView::clearAllButOne ( KbfxPlasmaCanvasItem * i )
{
i = i;
- QCanvasItemList list = canvas ()->allItems ();
+ TQCanvasItemList list = canvas ()->allItems ();
- QCanvasItemList::Iterator it = list.begin ();
+ TQCanvasItemList::Iterator it = list.begin ();
for ( ; it != list.end (); ++it )
{
if ( *it )
@@ -127,29 +127,29 @@ KbfxPlasmaCanvasView::execAt ( int i )
}
void
-KbfxPlasmaCanvasView::leaveEvent ( QEvent * e )
+KbfxPlasmaCanvasView::leaveEvent ( TQEvent * e )
{
e = e;
clearAllButOne ( m_currentItem );
}
void
-KbfxPlasmaCanvasView::enterEvent ( QEvent * e )
+KbfxPlasmaCanvasView::enterEvent ( TQEvent * e )
{
e = e;
clearAllButOne ( m_currentItem );
}
void
-KbfxPlasmaCanvasView::mouseMoveEvent ( QMouseEvent * me )
+KbfxPlasmaCanvasView::mouseMoveEvent ( TQMouseEvent * me )
{
- QPoint p = inverseWorldMatrix ().map ( viewportToContents ( me->pos () ) );
+ TQPoint p = inverseWorldMatrix ().map ( viewportToContents ( me->pos () ) );
if ( canvas () == NULL )
return;
// KbfxPlasmaCanvasGroup *tmp = 0;
- QCanvasItemList l = canvas ()->collisions ( p );
- for ( QCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
+ TQCanvasItemList l = canvas ()->collisions ( p );
+ for ( TQCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
{
if ( *it == 0 )
return;
@@ -169,25 +169,25 @@ KbfxPlasmaCanvasView::mouseMoveEvent ( QMouseEvent * me )
}
void
-KbfxPlasmaCanvasView::contentsMouseMoveEvent ( QMouseEvent * me )
+KbfxPlasmaCanvasView::contentsMouseMoveEvent ( TQMouseEvent * me )
{
if ( canvas () == NULL )
return;
- if ( me->state () & LeftButton )
+ if ( me->state () & Qt::LeftButton )
{
int distance = ( me->pos () - m_dragPos ).manhattanLength ();
- if ( distance > QApplication::startDragDistance () )
+ if ( distance > TQApplication::startDragDistance () )
this->startDrag ();
}
- QScrollView::contentsMouseMoveEvent ( me );
+ TQScrollView::contentsMouseMoveEvent ( me );
- QCanvasItemList l = canvas ()->collisions ( me->pos () );
+ TQCanvasItemList l = canvas ()->collisions ( me->pos () );
if ( l.count () <= 0 )
return;
- for ( QCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
+ for ( TQCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
{
if ( *it == 0 )
return;
@@ -201,7 +201,7 @@ KbfxPlasmaCanvasView::contentsMouseMoveEvent ( QMouseEvent * me )
}
m_currentItem = t;
t->setCurrent ( true );
- this->setCursor ( QCursor ( Qt::PointingHandCursor ) );
+ this->setCursor ( TQCursor ( TQt::PointingHandCursor ) );
}
}
canvas ()->update ();
@@ -209,11 +209,11 @@ KbfxPlasmaCanvasView::contentsMouseMoveEvent ( QMouseEvent * me )
void
-KbfxPlasmaCanvasView::contentsMousePressEvent ( QMouseEvent * me )
+KbfxPlasmaCanvasView::contentsMousePressEvent ( TQMouseEvent * me )
{
KbfxPlasmaCanvasGroup *tmp = 0;
- QCanvasItemList l = canvas ()->collisions ( me->pos () );
- for ( QCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
+ TQCanvasItemList l = canvas ()->collisions ( me->pos () );
+ for ( TQCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
{
if ( ( *it )->rtti () == CANVASITEM )
{
@@ -227,9 +227,9 @@ KbfxPlasmaCanvasView::contentsMousePressEvent ( QMouseEvent * me )
tmp->shade ();
m_clickPos = me->pos ();
- if ( me->button () == LeftButton )
+ if ( me->button () == Qt::LeftButton )
m_dragPos = me->pos ();
- QScrollView::contentsMousePressEvent ( me );
+ TQScrollView::contentsMousePressEvent ( me );
canvas ()->update ();
}
@@ -245,10 +245,10 @@ KbfxPlasmaCanvasView::startDrag ()
qDebug ( "null source" );
return;
}
- QUriDrag *drag =
- new QUriDrag ( QStrList ( src->contentPath () ), this,
+ TQUriDrag *drag =
+ new TQUriDrag ( TQStrList ( src->contentPath () ), this,
src->name ().ascii () );
- drag->setFileNames ( QStringList ( src->contentPath () ) );
+ drag->setFileNames ( TQStringList ( src->contentPath () ) );
drag->setPixmap ( m_currentItem->dragPixmap () );
drag->drag ();
emit clicked ();
@@ -256,24 +256,24 @@ KbfxPlasmaCanvasView::startDrag ()
}
void
-KbfxPlasmaCanvasView::resizeEvent ( QResizeEvent * )
+KbfxPlasmaCanvasView::resizeEvent ( TQResizeEvent * )
{
placeScrollBars ();
}
/*
void
-KbfxPlasmaCanvasView::enterEvent ( QEvent * e )
+KbfxPlasmaCanvasView::enterEvent ( TQEvent * e )
{
e = e;
if ( canvas () == 0 )
return;
// KbfxPlasmaCanvasGroup *tmp = 0;
- QPoint _mPos = QCursor::pos ();
- QCanvasItemList l = canvas ()->collisions ( this->mapFromGlobal ( _mPos ) );
+ TQPoint _mPos = TQCursor::pos ();
+ TQCanvasItemList l = canvas ()->collisions ( this->mapFromGlobal ( _mPos ) );
- for ( QCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
+ for ( TQCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
{
if ( *it == 0 )
break;
@@ -301,9 +301,9 @@ KbfxPlasmaCanvasView::clearAll ()
if ( canvas() != m_search )
return ;
- QCanvasItemList list = canvas ()->allItems ();
+ TQCanvasItemList list = canvas ()->allItems ();
- QCanvasItemList::Iterator it = list.begin ();
+ TQCanvasItemList::Iterator it = list.begin ();
for ( ; it != list.end (); ++it )
{
if ( *it )
@@ -318,18 +318,18 @@ KbfxPlasmaCanvasView::clearAll ()
}
void
-KbfxPlasmaCanvasView::setKbfxCanvas ( QCanvas * cnv )
+KbfxPlasmaCanvasView::setKbfxCanvas ( TQCanvas * cnv )
{
m_default = cnv;
setCanvas ( m_default );
// canvas ()->setBackgroundPixmap ( ( *KbfxPlasmaPixmapProvider::pixmap ( "appviewbg" )) );
- QPixmap * pixmap = KbfxPlasmaPixmapProvider::pixmap ( "middleboxbg" );
+ TQPixmap * pixmap = KbfxPlasmaPixmapProvider::pixmap ( "middleboxbg" );
if ( pixmap != NULL )
{
- QImage img = pixmap->convertToImage();
- img = img.smoothScale ( this->width(),pixmap->height(),QImage::ScaleFree );
+ TQImage img = pixmap->convertToImage();
+ img = img.smoothScale ( this->width(),pixmap->height(),TQ_ScaleFree );
pixmap->convertFromImage ( img );
- this->canvas ()->setBackgroundPixmap ( *pixmap );
+ this->canvas ()->tqsetBackgroundPixmap ( *pixmap );
}
}
@@ -347,7 +347,7 @@ KbfxPlasmaCanvasView::expandAll ()
void
KbfxPlasmaCanvasView::handleLoadRequest ( KbfxSignal signal )
{
- QString tm = signal.name ();
+ TQString tm = signal.name ();
KbfxDataStack *_stack = m_dataStack[signal.name () ];
if ( _stack == 0 )
@@ -356,7 +356,7 @@ KbfxPlasmaCanvasView::handleLoadRequest ( KbfxSignal signal )
return;
}
- QString _activateGroup = _stack->getSubGroupName ( signal.id () );
+ TQString _activateGroup = _stack->getSubGroupName ( signal.id () );
KbfxDataGroupList *_dataList = _stack->getStack ( _activateGroup );
KbfxPlasmaCanvasGroupView *gview = new KbfxPlasmaCanvasGroupView ();
@@ -376,7 +376,7 @@ KbfxPlasmaCanvasView::handleLoadRequest ( KbfxSignal signal )
( *it )->hide ();
}
- if ( m_appletMap[signal.name () ]->contains ( _activateGroup ) != true )
+ if ( m_appletMap[signal.name () ]->tqcontains ( _activateGroup ) != true )
{
loadGroup ( _dataList, gview );
m_currentView = gview;
@@ -391,7 +391,7 @@ KbfxPlasmaCanvasView::handleLoadRequest ( KbfxSignal signal )
else
canvas ()->resize ( v_stack->width (), this->visibleHeight () );
canvas()->update();
- repaint();
+ tqrepaint();
// return;
}
else
@@ -408,18 +408,18 @@ KbfxPlasmaCanvasView::handleLoadRequest ( KbfxSignal signal )
canvas ()->resize ( m_appletMap[signal.name () ]->width (),
this->visibleHeight () );
canvas()->update();
- repaint();
+ tqrepaint();
}
}
void
-KbfxPlasmaCanvasView::contentsMouseReleaseEvent ( QMouseEvent * me )
+KbfxPlasmaCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * me )
{
// KbfxPlasmaCanvasGroup *tmp = 0;
- QCanvasItemList l = canvas ()->collisions ( me->pos () );
- for ( QCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
+ TQCanvasItemList l = canvas ()->collisions ( me->pos () );
+ for ( TQCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
{
if ( ( *it )->rtti () == CANVASITEM )
{
@@ -445,7 +445,7 @@ KbfxPlasmaCanvasView::clearSearch ()
void
-KbfxPlasmaCanvasView::search_R ( const QString name )
+KbfxPlasmaCanvasView::search_R ( const TQString name )
{
gstack = new KbfxPlasmaCanvasStack ();
KbfxPlasmaCanvasGroup *visualGroup = new KbfxPlasmaCanvasGroup ();
@@ -457,16 +457,16 @@ KbfxPlasmaCanvasView::search_R ( const QString name )
this->setCanvas ( m_search );
- QPixmap * pixmap = KbfxPlasmaPixmapProvider::pixmap ( "middleboxbg" );
+ TQPixmap * pixmap = KbfxPlasmaPixmapProvider::pixmap ( "middleboxbg" );
if ( pixmap != NULL )
{
- QImage img = pixmap->convertToImage();
- img = img.smoothScale ( this->width(),pixmap->height(),QImage::ScaleFree );
+ TQImage img = pixmap->convertToImage();
+ img = img.smoothScale ( this->width(),pixmap->height(),TQ_ScaleFree );
pixmap->convertFromImage ( img );
- this->canvas ()->setBackgroundPixmap ( *pixmap );
+ this->canvas ()->tqsetBackgroundPixmap ( *pixmap );
}
- this->setCursor ( QCursor ( Qt::BusyCursor ) );
+ this->setCursor ( TQCursor ( TQt::BusyCursor ) );
clearAll ();
dataStack::Iterator sit;
@@ -516,7 +516,7 @@ KbfxPlasmaCanvasView::search_R ( const QString name )
for ( it = dat.begin(); it != dat.end (); it++ )
{
- qApp->processEvents ();
+ tqApp->processEvents ();
boxwrapper = new KbfxPlasmaCanvasItemWrapper ( m_search );
box =
( KbfxPlasmaCanvasItem * ) boxwrapper->
@@ -541,12 +541,12 @@ KbfxPlasmaCanvasView::search_R ( const QString name )
m_scrollbar_bot->height () );
m_search->update ();
- this->setCursor ( QCursor ( Qt::ArrowCursor ) );
+ this->setCursor ( TQCursor ( TQt::ArrowCursor ) );
}
void
-KbfxPlasmaCanvasView::search ( const QString & str )
+KbfxPlasmaCanvasView::search ( const TQString & str )
{
if ( str.isEmpty () )
return;
@@ -560,9 +560,9 @@ KbfxPlasmaCanvasView::search ( const QString & str )
void
-KbfxPlasmaCanvasView::addStack ( KbfxPlasmaCanvasStack * stak, QString name )
+KbfxPlasmaCanvasView::addStack ( KbfxPlasmaCanvasStack * stak, TQString name )
{
- if ( m_appletMap.contains ( name ) )
+ if ( m_appletMap.tqcontains ( name ) )
{
return;
}
@@ -570,9 +570,9 @@ KbfxPlasmaCanvasView::addStack ( KbfxPlasmaCanvasStack * stak, QString name )
}
void
-KbfxPlasmaCanvasView::addStack ( KbfxDataStack * stak, QString name )
+KbfxPlasmaCanvasView::addStack ( KbfxDataStack * stak, TQString name )
{
- if ( m_dataStack.contains ( name ) )
+ if ( m_dataStack.tqcontains ( name ) )
{
return;
}
@@ -592,7 +592,7 @@ KbfxPlasmaCanvasView::loadGroup ( KbfxDataGroupList * src,
KbfxPlasmaCanvasItem *box = 0;
KbfxPlasmaCanvasItemWrapper *boxwrapper = 0;
KbfxPlasmaCanvasGroup *appGroup = 0; //new KbfxPlasmaCanvasGroup ();
- QString l_lastAdd = "";
+ TQString l_lastAdd = "";
for ( int i = 0; i < src->count (); i++ )
{
if ( list.at ( i ) != 0 )
@@ -651,13 +651,13 @@ KbfxPlasmaCanvasView::loadGroup ( KbfxDataGroupList * src,
void
-KbfxPlasmaCanvasView::contentsDragLeaveEvent ( QDragEnterEvent * event )
+KbfxPlasmaCanvasView::contentsDragLeaveEvent ( TQDragEnterEvent * event )
{
event->accept ( true );
}
void
-KbfxPlasmaCanvasView::contentsDragEnterEvent ( QDragEnterEvent * event )
+KbfxPlasmaCanvasView::contentsDragEnterEvent ( TQDragEnterEvent * event )
{
event->accept ( true );
}
diff --git a/src/kbfxplasmacanvasview.h b/src/kbfxplasmacanvasview.h
index 80c8a99..4d7df00 100644
--- a/src/kbfxplasmacanvasview.h
+++ b/src/kbfxplasmacanvasview.h
@@ -22,10 +22,10 @@
#ifndef KBFX_PLASMA_CANVAS_VIEW_H
#define KBFX_PLASMA_CANVAS_VIEW_H
-#include <qcanvas.h>
-#include <qcursor.h>
-#include <qdragobject.h>
-#include <qpainter.h>
+#include <tqcanvas.h>
+#include <tqcursor.h>
+#include <tqdragobject.h>
+#include <tqpainter.h>
#include <kimageeffect.h>
@@ -46,45 +46,46 @@
#include "kbfxspinxscrollbar.h"
-class QCanvasView;
+class TQCanvasView;
-class KbfxPlasmaCanvasView : public QCanvasView
+class KbfxPlasmaCanvasView : public TQCanvasView
{
Q_OBJECT
+ TQ_OBJECT
public:
- typedef QMap<QString,KbfxPlasmaCanvasStack*> stackMap;
- typedef QMap<QString,KbfxDataStack*> dataStack;
- typedef QMap<int,KbfxPlasmaCanvasItem*> searchMap;
+ typedef TQMap<TQString,KbfxPlasmaCanvasStack*> stackMap;
+ typedef TQMap<TQString,KbfxDataStack*> dataStack;
+ typedef TQMap<int,KbfxPlasmaCanvasItem*> searchMap;
- KbfxPlasmaCanvasView ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+ KbfxPlasmaCanvasView ( TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0 );
virtual ~KbfxPlasmaCanvasView();
- void addStack ( KbfxPlasmaCanvasStack*stk,QString name );
- void addStack ( KbfxDataStack*stk,QString name );
+ void addStack ( KbfxPlasmaCanvasStack*stk,TQString name );
+ void addStack ( KbfxDataStack*stk,TQString name );
- void setKbfxCanvas ( QCanvas*cnv );
+ void setKbfxCanvas ( TQCanvas*cnv );
void loadGroup ( KbfxDataGroupList * src,KbfxPlasmaCanvasGroupView * dest );
- void contentsDragLeaveEvent ( QDragEnterEvent *event );
- void contentsDragEnterEvent ( QDragEnterEvent *event );
+ void contentsDragLeaveEvent ( TQDragEnterEvent *event );
+ void contentsDragEnterEvent ( TQDragEnterEvent *event );
public slots:
void clearAll();
- virtual void contentsMousePressEvent ( QMouseEvent * me );
- virtual void contentsMouseMoveEvent ( QMouseEvent * e );
- virtual void contentsMouseReleaseEvent ( QMouseEvent * e );
- virtual void mouseMoveEvent ( QMouseEvent * me );
- virtual void enterEvent ( QEvent * e );
- virtual void keyPressEvent ( QKeyEvent * ke );
- virtual void emulatedKeyPress ( QKeyEvent * k ) {keyPressEvent ( k );}
- virtual void resizeEvent ( QResizeEvent * ) ;
- virtual void leaveEvent ( QEvent * e );
-// virtual void leaveEvent(QEvent e );
+ virtual void contentsMousePressEvent ( TQMouseEvent * me );
+ virtual void contentsMouseMoveEvent ( TQMouseEvent * e );
+ virtual void contentsMouseReleaseEvent ( TQMouseEvent * e );
+ virtual void mouseMoveEvent ( TQMouseEvent * me );
+ virtual void enterEvent ( TQEvent * e );
+ virtual void keyPressEvent ( TQKeyEvent * ke );
+ virtual void emulatedKeyPress ( TQKeyEvent * k ) {keyPressEvent ( k );}
+ virtual void resizeEvent ( TQResizeEvent * ) ;
+ virtual void leaveEvent ( TQEvent * e );
+// virtual void leaveEvent(TQEvent e );
void handleLoadRequest ( KbfxSignal );
- void search ( const QString & );
- void search_R ( const QString key );
+ void search ( const TQString & );
+ void search_R ( const TQString key );
void execFirst();
void execAt ( int i );
void expandAll();
@@ -99,24 +100,24 @@ class KbfxPlasmaCanvasView : public QCanvasView
void startDrag();
void placeScrollBars();
- QPoint m_clickPos;
+ TQPoint m_clickPos;
KbfxPlasmaCanvasItem * m_currentItem;
KbfxPlasmaCanvasStack * m_currentStack;
KbfxPlasmaCanvasStack * m_stack;
- QString m_lastSignalData;
+ TQString m_lastSignalData;
stackMap m_appletMap;
dataStack m_dataStack;
searchMap m_searchMap;
KbfxPlasmaCanvasStack * gstack ;
KbfxPlasmaCanvasItem * m_exeCandidate;
- QCanvas * m_default;
- QCanvas * m_search;
+ TQCanvas * m_default;
+ TQCanvas * m_search;
bool m_findDone;
KbfxSpinxScrollBar * m_scrollbar_top;
KbfxSpinxScrollBar * m_scrollbar_bot;
- QPoint m_dragPos;
+ TQPoint m_dragPos;
KbfxPlasmaCanvasGroupView * m_currentView;
- QString m_currentViewName;
+ TQString m_currentViewName;
KbfxPlasmaCanvasItem * m_selectedItem;
};
diff --git a/src/kbfxplasmaindexitem.cpp b/src/kbfxplasmaindexitem.cpp
index cbbfe91..3c08d3c 100644
--- a/src/kbfxplasmaindexitem.cpp
+++ b/src/kbfxplasmaindexitem.cpp
@@ -24,13 +24,13 @@
#include <kapplication.h>
#include <kbfxconfig.h>
-KbfxPlasmaIndexItem::KbfxPlasmaIndexItem ( QCanvasPixmapArray * a, QCanvas * canvas ) :KbfxPlasmaCanvasAbstractItem ( a,canvas )
+KbfxPlasmaIndexItem::KbfxPlasmaIndexItem ( TQCanvasPixmapArray * a, TQCanvas * canvas ) :KbfxPlasmaCanvasAbstractItem ( a,canvas )
{
//this->setItemMode (1);
setAnimated ( false );
setCurrent ( false );
m_isSelected = false;
- QPixmap * _img = this->image ( 0 );
+ TQPixmap * _img = this->image ( 0 );
m_height =_img->height();
m_width= _img->width();
@@ -42,7 +42,7 @@ KbfxPlasmaIndexItem::~KbfxPlasmaIndexItem()
{}
void
-KbfxPlasmaIndexItem::setIcon ( QString str )
+KbfxPlasmaIndexItem::setIcon ( TQString str )
{
KIconLoader *iconload = KGlobal::iconLoader ();
m_iconPath = iconload->iconPath ( str, KIcon::Desktop, false );
@@ -51,7 +51,7 @@ KbfxPlasmaIndexItem::setIcon ( QString str )
}
void
-KbfxPlasmaIndexItem::setText ( QString text )
+KbfxPlasmaIndexItem::setText ( TQString text )
{
m_text = text;
}
@@ -71,7 +71,7 @@ KbfxPlasmaIndexItem::selected()
void
-KbfxPlasmaIndexItem::drawContent ( QPainter * pe )
+KbfxPlasmaIndexItem::drawContent ( TQPainter * pe )
{
if ( this->isCurrent() || m_isSelected )
@@ -83,17 +83,17 @@ KbfxPlasmaIndexItem::drawContent ( QPainter * pe )
this->setFrame ( 0 );
}
- QCanvasPixmap *cp = this->image ( this->frame () );
+ TQCanvasPixmap *cp = this->image ( this->frame () );
m_height = cp->height();
m_width = cp->width();
pe->drawPixmap ( this->boundingRect (), *cp );
- QRect r ( ( int ) x(), ( int ) y(), m_width, m_height );
- QRect textRect ( m_height+1, ( int ) y(), m_width,m_height );
+ TQRect r ( ( int ) x(), ( int ) y(), m_width, m_height );
+ TQRect textRect ( m_height+1, ( int ) y(), m_width,m_height );
- QFont * _font_plugin = new QFont ( ConfigInit().m_pluginNameFont );
- QFont * _font_index = new QFont ( ConfigInit().m_fontIndexFont );
+ TQFont * _font_plugin = new TQFont ( ConfigInit().m_pluginNameFont );
+ TQFont * _font_index = new TQFont ( ConfigInit().m_fontIndexFont );
if ( this->type() != KbfxPlasmaIndexItem::SEPARATOR )
{
@@ -106,8 +106,8 @@ KbfxPlasmaIndexItem::drawContent ( QPainter * pe )
pe->setPen ( ConfigInit().m_pluginNameColor);
}
- pe->drawText ( textRect, Qt::AlignVCenter | Qt::AlignLeft ,QString ( m_text ), -1, &r,0 );
- pe->drawPixmap ( QRect ( ( int ) x() +5 , ( int ) y() +6,m_height-12,m_height-12 ),m_icon );
+ pe->drawText ( textRect, TQt::AlignVCenter | TQt::AlignLeft ,TQString ( m_text ), -1, &r );
+ pe->drawPixmap ( TQRect ( ( int ) x() +5 , ( int ) y() +6,m_height-12,m_height-12 ),m_icon );
delete _font_plugin;
delete _font_index;
@@ -128,17 +128,17 @@ KbfxPlasmaIndexItem::setId ( int id )
void
-KbfxPlasmaIndexItem::draw ( QPainter & p )
+KbfxPlasmaIndexItem::draw ( TQPainter & p )
{
drawContent ( &p );
}
void
-KbfxPlasmaIndexItem::setLabelText ( QString str )
+KbfxPlasmaIndexItem::setLabelText ( TQString str )
{
- QFont * _font = new QFont(ConfigInit().m_fontIndexFont);
+ TQFont * _font = new TQFont(ConfigInit().m_fontIndexFont);
- QFontMetrics fm ( *_font );
+ TQFontMetrics fm ( *_font );
int _commentWidth = fm.width ( str+"..." );
int _strLen = str.length();
@@ -160,7 +160,7 @@ KbfxPlasmaIndexItem::setLabelText ( QString str )
}
-QString
+TQString
KbfxPlasmaIndexItem::belongsTo()
{
@@ -168,13 +168,13 @@ KbfxPlasmaIndexItem::belongsTo()
}
void
-KbfxPlasmaIndexItem::setBelongsTo ( QString parent )
+KbfxPlasmaIndexItem::setBelongsTo ( TQString tqparent )
{
- m_parent = parent;
+ m_parent = tqparent;
}
-void KbfxPlasmaIndexItem::mousePressEvent ( QMouseEvent * e )
+void KbfxPlasmaIndexItem::mousePressEvent ( TQMouseEvent * e )
{
e = e;
}
diff --git a/src/kbfxplasmaindexitem.h b/src/kbfxplasmaindexitem.h
index 9b68da8..cd58f81 100644
--- a/src/kbfxplasmaindexitem.h
+++ b/src/kbfxplasmaindexitem.h
@@ -27,35 +27,36 @@
class KbfxPlasmaIndexItem : public KbfxPlasmaCanvasAbstractItem
{
Q_OBJECT
+ TQ_OBJECT
public:
- KbfxPlasmaIndexItem ( QCanvasPixmapArray * a, QCanvas * canvas );
+ KbfxPlasmaIndexItem ( TQCanvasPixmapArray * a, TQCanvas * canvas );
virtual ~KbfxPlasmaIndexItem();
- void setIcon ( QString path );
- void setText ( QString text );
+ void setIcon ( TQString path );
+ void setText ( TQString text );
void setId ( int id );
- //void setName(QString name);
- void setLabelText ( QString text );
- void setBelongsTo ( QString parent );
- QString belongsTo();
+ //void setName(TQString name);
+ void setLabelText ( TQString text );
+ void setBelongsTo ( TQString tqparent );
+ TQString belongsTo();
int height();
void setSelected ( bool select );
bool selected();
int Id() { return m_id;}
- virtual void drawContent ( QPainter * pe );
- virtual void draw ( QPainter & pe );
- virtual void mousePressEvent ( QMouseEvent * e );
+ virtual void drawContent ( TQPainter * pe );
+ virtual void draw ( TQPainter & pe );
+ virtual void mousePressEvent ( TQMouseEvent * e );
private:
int m_id;
- QString m_name;
- QString m_text;
- QString m_iconPath;
- QPixmap m_icon;
- QString m_parent;
+ TQString m_name;
+ TQString m_text;
+ TQString m_iconPath;
+ TQPixmap m_icon;
+ TQString m_parent;
bool m_isCurrent;
int m_height;
int m_width;
diff --git a/src/kbfxplasmaindexview.cpp b/src/kbfxplasmaindexview.cpp
index ee50c9e..d7e80e1 100644
--- a/src/kbfxplasmaindexview.cpp
+++ b/src/kbfxplasmaindexview.cpp
@@ -21,9 +21,9 @@
#include "kbfxplasmaindexview.h"
-KbfxPlasmaIndexView::KbfxPlasmaIndexView ( QWidget * parent, const char *name,
+KbfxPlasmaIndexView::KbfxPlasmaIndexView ( TQWidget * tqparent, const char *name,
WFlags l ) :
- QCanvasView ( parent, name, l )
+ TQCanvasView ( tqparent, name, l )
{
m_itemGroup = new KbfxPlasmaCanvasGroup ();
m_itemGroupList = new KbfxPlasmaCanvasGroupView ();
@@ -32,19 +32,19 @@ KbfxPlasmaIndexView::KbfxPlasmaIndexView ( QWidget * parent, const char *name,
m_itemStack->addGroup ( m_itemGroupList );
viewport ()->setMouseTracking ( TRUE );
- m_currentPos = QPoint ( 0, 0 );
- m_mousePollTimer = new QTimer ( this );
+ m_currentPos = TQPoint ( 0, 0 );
+ m_mousePollTimer = new TQTimer ( this );
m_pluginList = KbfxPlasmaPluginLoader::scanPlugins ();
viewport ()->setAcceptDrops ( true );
- this->setVScrollBarMode ( QScrollView::AlwaysOff );
- this->setHScrollBarMode ( QScrollView::AlwaysOff );
- setFrameShape ( QFrame::NoFrame );
+ this->setVScrollBarMode ( TQScrollView::AlwaysOff );
+ this->setHScrollBarMode ( TQScrollView::AlwaysOff );
+ setFrameShape ( TQFrame::NoFrame );
m_currentItem = 0L;
m_selectedItem = 0L;
// m_pluginList = "";
- connect ( this, SIGNAL ( clicked ( KbfxPlasmaIndexItem * ) ), this,
- SLOT ( slotClicked ( KbfxPlasmaIndexItem * ) ) );
+ connect ( this, TQT_SIGNAL ( clicked ( KbfxPlasmaIndexItem * ) ), this,
+ TQT_SLOT ( slotClicked ( KbfxPlasmaIndexItem * ) ) );
m_currentView = 0;
setDragAutoScroll ( true );
}
@@ -58,16 +58,16 @@ void
KbfxPlasmaIndexView::checkMousePos ()
{
KbfxPlasmaCanvasGroup *tmp = 0;
- if ( QCursor::pos () == mapToGlobal ( contentsToViewport ( m_currentPos ) ) )
+ if ( TQCursor::pos () == mapToGlobal ( contentsToViewport ( m_currentPos ) ) )
{
- QMouseEvent me ( QEvent::MouseButtonPress,
+ TQMouseEvent me ( TQEvent::MouseButtonPress,
this->mapToGlobal ( m_currentPos ), Qt::LeftButton,
Qt::LeftButton );
clearAll ();
- QCanvasItemList l = canvas ()->collisions ( m_currentPos );
- for ( QCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
+ TQCanvasItemList l = canvas ()->collisions ( m_currentPos );
+ for ( TQCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
{
if ( ( *it )->rtti () == CANVASITEM )
{
@@ -107,9 +107,9 @@ KbfxPlasmaIndexView::clearAllButOne ( KbfxPlasmaIndexItem * i )
{
i = i;
- QCanvasItemList list = canvas ()->allItems ();
+ TQCanvasItemList list = canvas ()->allItems ();
- QCanvasItemList::Iterator it = list.begin ();
+ TQCanvasItemList::Iterator it = list.begin ();
for ( ; it != list.end (); ++it )
{
if ( *it )
@@ -127,9 +127,9 @@ KbfxPlasmaIndexView::clearAllButOne ( KbfxPlasmaIndexItem * i )
void
KbfxPlasmaIndexView::clearSelection ()
{
- QCanvasItemList list = canvas ()->allItems ();
+ TQCanvasItemList list = canvas ()->allItems ();
- QCanvasItemList::Iterator it = list.begin ();
+ TQCanvasItemList::Iterator it = list.begin ();
for ( ; it != list.end (); ++it )
{
if ( *it )
@@ -143,7 +143,7 @@ KbfxPlasmaIndexView::clearSelection ()
}
void
-KbfxPlasmaIndexView::leaveEvent ( QEvent * e )
+KbfxPlasmaIndexView::leaveEvent ( TQEvent * e )
{
e = e;
clearAllButOne ( m_currentItem );
@@ -162,18 +162,18 @@ KbfxPlasmaIndexView::contextMenuSlot ( int id )
}
void
-KbfxPlasmaIndexView::contentsContextMenuEvent ( QContextMenuEvent * event )
+KbfxPlasmaIndexView::contentsContextMenuEvent ( TQContextMenuEvent * event )
{
event = event;
/*
m_pluginMenu = new KPopupMenu ( this );;
- connect ( m_pluginMenu, SIGNAL ( activated ( int ) ), this,
- SLOT ( contextMenuSlot ( int ) ) );
+ connect ( m_pluginMenu, TQT_SIGNAL ( activated ( int ) ), this,
+ TQT_SLOT ( contextMenuSlot ( int ) ) );
m_pluginMenu->insertTitle ( "Insert Plugin", 0, 0 );
int _index = 1;
- for ( QStringList::Iterator it = m_pluginList.begin ();
+ for ( TQStringList::Iterator it = m_pluginList.begin ();
it != m_pluginList.end (); ++it )
{
@@ -246,7 +246,7 @@ KbfxPlasmaIndexView::loadList ( KbfxDataStack * stkPtr )
m_itemStack->raise ( 0 );
- for ( QStringList::Iterator it = m_pluginList.begin ();
+ for ( TQStringList::Iterator it = m_pluginList.begin ();
it != m_pluginList.end (); ++it )
{
if ( *it == stkPtr->name() )
@@ -258,20 +258,20 @@ KbfxPlasmaIndexView::loadList ( KbfxDataStack * stkPtr )
}
void
-KbfxPlasmaIndexView::setKbfxCanvas ( QCanvas * cnv )
+KbfxPlasmaIndexView::setKbfxCanvas ( TQCanvas * cnv )
{
setCanvas ( cnv );
- canvas ()->setBackgroundPixmap ( ( *KbfxPlasmaPixmapProvider::pixmap ( "listboxbg" )) );
+ canvas ()->tqsetBackgroundPixmap ( ( *KbfxPlasmaPixmapProvider::pixmap ( "listboxbg" )) );
canvas ()->update ();
}
void
-KbfxPlasmaIndexView::loadPlugin ( QString name, KbfxPlasmaCanvasView * view )
+KbfxPlasmaIndexView::loadPlugin ( TQString name, KbfxPlasmaCanvasView * view )
{
- if ( m_pluginList.contains ( name ) <= 0 )
+ if ( m_pluginList.tqcontains ( name ) <= 0 )
{
KbfxPlasmaPluginLoader *m_loader = new KbfxPlasmaPluginLoader ();
KbfxDataStack *m_stack_R = m_loader->getView ( name );
@@ -298,7 +298,7 @@ KbfxPlasmaIndexView::loadPlugin ( QString name, KbfxPlasmaCanvasView * view )
void
-KbfxPlasmaIndexView::mouseMoveEvent ( QMouseEvent * me )
+KbfxPlasmaIndexView::mouseMoveEvent ( TQMouseEvent * me )
{
me = me;
}
@@ -306,7 +306,7 @@ KbfxPlasmaIndexView::mouseMoveEvent ( QMouseEvent * me )
void
-KbfxPlasmaIndexView::contentsMouseMoveEvent ( QMouseEvent * me )
+KbfxPlasmaIndexView::contentsMouseMoveEvent ( TQMouseEvent * me )
{
if ( canvas () == NULL )
return;
@@ -315,9 +315,9 @@ KbfxPlasmaIndexView::contentsMouseMoveEvent ( QMouseEvent * me )
// TODO: Get wait time from config
- this->setCursor ( QCursor ( Qt::PointingHandCursor ) );
+ this->setCursor ( TQCursor ( TQt::PointingHandCursor ) );
- QTimer::singleShot ( 800, this, SLOT ( checkMousePos () ) );
+ TQTimer::singleShot ( 800, this, TQT_SLOT ( checkMousePos () ) );
if ( contentsToViewport ( me->pos () ).y () < this->height () / 5 )
{
@@ -328,16 +328,16 @@ KbfxPlasmaIndexView::contentsMouseMoveEvent ( QMouseEvent * me )
scrollBy ( 10, 10 );
}
- QScrollView::contentsMouseMoveEvent ( me );
+ TQScrollView::contentsMouseMoveEvent ( me );
// KbfxPlasmaCanvasGroup *tmp = 0;
- QCanvasItemList l = canvas ()->collisions ( me->pos () );
+ TQCanvasItemList l = canvas ()->collisions ( me->pos () );
if ( l.count () <= 0 )
return;
- for ( QCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
+ for ( TQCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
{
if ( *it == 0 )
return;
@@ -358,18 +358,18 @@ KbfxPlasmaIndexView::contentsMouseMoveEvent ( QMouseEvent * me )
}
void
-KbfxPlasmaIndexView::contentsMousePressEvent ( QMouseEvent * me )
+KbfxPlasmaIndexView::contentsMousePressEvent ( TQMouseEvent * me )
{
- if ( me->button () == RightButton )
+ if ( me->button () == Qt::RightButton )
return;
clearAll ();
- this->setCursor ( QCursor ( Qt::WaitCursor ) );
+ this->setCursor ( TQCursor ( TQt::WaitCursor ) );
KbfxPlasmaCanvasGroup *tmp = 0;
- QCanvasItemList l = canvas ()->collisions ( me->pos () );
- for ( QCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
+ TQCanvasItemList l = canvas ()->collisions ( me->pos () );
+ for ( TQCanvasItemList::Iterator it = l.begin (); it != l.end (); ++it )
{
if ( ( *it )->rtti () == CANVASITEM )
{
@@ -393,10 +393,10 @@ KbfxPlasmaIndexView::contentsMousePressEvent ( QMouseEvent * me )
// m_clickPos = me->pos ();
- QScrollView::contentsMousePressEvent ( me );
+ TQScrollView::contentsMousePressEvent ( me );
canvas ()->update ();
- this->setCursor ( QCursor ( Qt::PointingHandCursor ) );
+ this->setCursor ( TQCursor ( TQt::PointingHandCursor ) );
}
void
@@ -409,17 +409,17 @@ KbfxPlasmaIndexView::slotClicked ( KbfxPlasmaIndexItem * it )
KbfxSignal signal ( _it->belongsTo (), _it->Id () );
- this->setCursor ( QCursor ( Qt::WaitCursor ) );
+ this->setCursor ( TQCursor ( TQt::WaitCursor ) );
emit loadRequest ( signal );
- this->setCursor ( QCursor ( Qt::PointingHandCursor ) );
+ this->setCursor ( TQCursor ( TQt::PointingHandCursor ) );
}
void
KbfxPlasmaIndexView::clearAll ()
{
- QCanvasItemList list = canvas ()->allItems ();
+ TQCanvasItemList list = canvas ()->allItems ();
- QCanvasItemList::Iterator it = list.begin ();
+ TQCanvasItemList::Iterator it = list.begin ();
for ( ; it != list.end (); ++it )
{
if ( *it )
diff --git a/src/kbfxplasmaindexview.h b/src/kbfxplasmaindexview.h
index ebda368..59e44bf 100644
--- a/src/kbfxplasmaindexview.h
+++ b/src/kbfxplasmaindexview.h
@@ -22,7 +22,7 @@
#ifndef KBFX_PLASMA_INDEX_VIEW_H
#define KBFX_PLASMA_INDEX_VIEW_H
-#include <qcanvas.h>
+#include <tqcanvas.h>
#include <kdebug.h>
#include <kpopupmenu.h>
@@ -39,36 +39,37 @@
-class KbfxPlasmaIndexView : public QCanvasView
+class KbfxPlasmaIndexView : public TQCanvasView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KbfxPlasmaIndexView ( QWidget * parent = 0, const char * name = 0, WFlags l = 0 );
+ KbfxPlasmaIndexView ( TQWidget * tqparent = 0, const char * name = 0, WFlags l = 0 );
virtual ~KbfxPlasmaIndexView();
void loadList ( KbfxDataStack * stkPtr );
int count() { return m_itemGroup->count() ; }
void setView ( KbfxPlasmaCanvasView * view );
- virtual void contentsMouseMoveEvent ( QMouseEvent * e );
- virtual void contentsMousePressEvent ( QMouseEvent * me );
- virtual void contentsContextMenuEvent ( QContextMenuEvent * e ) ;
- virtual void mouseMoveEvent ( QMouseEvent * e );
- virtual void leaveEvent ( QEvent * e );
- void setKbfxCanvas ( QCanvas * cnv );
+ virtual void contentsMouseMoveEvent ( TQMouseEvent * e );
+ virtual void contentsMousePressEvent ( TQMouseEvent * me );
+ virtual void contentsContextMenuEvent ( TQContextMenuEvent * e ) ;
+ virtual void mouseMoveEvent ( TQMouseEvent * e );
+ virtual void leaveEvent ( TQEvent * e );
+ void setKbfxCanvas ( TQCanvas * cnv );
void clearAll();
public slots:
void slotClicked ( KbfxPlasmaIndexItem * );
void contextMenuSlot ( int id );
- void loadPlugin ( QString name,KbfxPlasmaCanvasView * );
+ void loadPlugin ( TQString name,KbfxPlasmaCanvasView * );
void checkMousePos();
void clearSelection();
signals:
void loadRequest ( KbfxSignal signal );
- void pluginRequest ( QString pluginName,KbfxPlasmaCanvasView * );
+ void pluginRequest ( TQString pluginName,KbfxPlasmaCanvasView * );
void clicked ( KbfxPlasmaIndexItem * item );
void expand();
void clearSelected();
@@ -83,12 +84,12 @@ class KbfxPlasmaIndexView : public QCanvasView
KbfxPlasmaCanvasStack * m_itemStack;
KbfxPlasmaIndexItem * m_currentItem;
KbfxPlasmaIndexItem * m_selectedItem;
- QStringList m_pluginList;
- QStringList m_pluginLoaded;
+ TQStringList m_pluginList;
+ TQStringList m_pluginLoaded;
KPopupMenu * m_pluginMenu;
KbfxPlasmaCanvasView * m_currentView;
- QPoint m_currentPos;
- QTimer * m_mousePollTimer;
+ TQPoint m_currentPos;
+ TQTimer * m_mousePollTimer;
};
#endif
diff --git a/src/kbfxsignal.h b/src/kbfxsignal.h
index 6f2dfd0..3931959 100644
--- a/src/kbfxsignal.h
+++ b/src/kbfxsignal.h
@@ -26,12 +26,12 @@ class KbfxSignal
{
public:
KbfxSignal() {m_name="";}
- KbfxSignal ( QString name,uint id ) { m_name = name;m_id = id;}
+ KbfxSignal ( TQString name,uint id ) { m_name = name;m_id = id;}
~KbfxSignal() {}
- QString name() {return m_name;}
+ TQString name() {return m_name;}
uint id() {return m_id;}
private:
- QString m_name;
+ TQString m_name;
uint m_id;
};
diff --git a/src/kbfxspinx.cpp b/src/kbfxspinx.cpp
index 4208b21..af0e65f 100644
--- a/src/kbfxspinx.cpp
+++ b/src/kbfxspinx.cpp
@@ -25,10 +25,10 @@
bool KbfxSpinx::m_horizontal_position = TRUE;
-KbfxSpinx::KbfxSpinx ( const QString& configFile, Type type, int actions, QWidget *parent, const char *name )
- : KPanelApplet ( configFile, type, actions, parent, name ),DCOPObject ( "KBFXInterface" )
+KbfxSpinx::KbfxSpinx ( const TQString& configFile, Type type, int actions, TQWidget *tqparent, const char *name )
+ : KPanelApplet ( configFile, type, actions, tqparent, name ),DCOPObject ( "KBFXInterface" )
{
- m_parent = parent;
+ m_parent = tqparent;
createKbfx();
}
@@ -36,9 +36,9 @@ KbfxSpinx::~KbfxSpinx()
{
}
-void KbfxSpinx::dirtyReaload(const QString & dir)
+void KbfxSpinx::dirtyReaload(const TQString & dir)
{
- QString _dir=dir;
+ TQString _dir=dir;
notifyConfigChange();
}
@@ -55,19 +55,19 @@ void KbfxSpinx::createKbfx()
if ( ConfigInit ().m_KbfxMenuType == "kmenu" )
{
kbfxBtn->show();
- kbfxBtn->repaint();
+ kbfxBtn->tqrepaint();
}
else
{
createRMenu();
- connect ( m_menu,SIGNAL ( aboutToHide () ),kbfxBtn,SLOT ( toggle() ) );
+ connect ( m_menu,TQT_SIGNAL ( aboutToHide () ),kbfxBtn,TQT_SLOT ( toggle() ) );
}
- kmenu_timer = new QTimer ( this,"Fade Timer" );
- connect ( kmenu_timer, SIGNAL ( timeout() ), kbfxBtn, SLOT ( toggleKMenu () ) );
+ kmenu_timer = new TQTimer ( this,"Fade Timer" );
+ connect ( kmenu_timer, TQT_SIGNAL ( timeout() ), kbfxBtn, TQT_SLOT ( toggleKMenu () ) );
- connect ( kbfxBtn , SIGNAL ( pressed() ),this,SLOT ( showKbfxMenu() ) );
- connect ( kbfxBtn , SIGNAL ( showToolTip() ),this,SLOT ( ToolTip() ) );
+ connect ( kbfxBtn , TQT_SIGNAL ( pressed() ),this,TQT_SLOT ( showKbfxMenu() ) );
+ connect ( kbfxBtn , TQT_SIGNAL ( showToolTip() ),this,TQT_SLOT ( ToolTip() ) );
if ( m_kicker_auto_adjust )
m_parent->resize ( m_parent->width(),kbfxBtn->height() );
@@ -75,15 +75,15 @@ void KbfxSpinx::createKbfx()
if (m_KbfxWatcher)
{
- l_watch = new KDirWatch(this,"SyscocaWatch");
+ l_watch = new KDirWatch(TQT_TQOBJECT(this),"SyscocaWatch");
KUser * l_user = new KUser();
- QString l_path("/var/tmp/kdecache-");
+ TQString l_path("/var/tmp/kdecache-");
l_path.append(l_user->loginName());
l_path.append("/");
l_watch->addDir(l_path);
l_watch->startScan( TRUE, FALSE);
- connect ( l_watch, SIGNAL ( dirty(const QString&) ),
- this, SLOT ( dirtyReaload(const QString&) ) );
+ connect ( l_watch, TQT_SIGNAL ( dirty(const TQString&) ),
+ this, TQT_SLOT ( dirtyReaload(const TQString&) ) );
delete l_user;
}
}
@@ -95,7 +95,7 @@ void KbfxSpinx::notifyConfigChange()
/*
FIXME
The delete here does not reload everything.
- Only the button and the parent menu.
+ Only the button and the tqparent menu.
Carefull memory de-allocation is needed before deleteing further :-(
Else be ready for a nice backtrace.
Memleak is obvious.
@@ -128,7 +128,7 @@ void KbfxSpinx::createRMenu()
m_menuWidget = new KbfxSpinxMenuWidget ( m_menu,"KbfxSpinxMenu" );
m_menu->addItem ( m_menuWidget,0 );
kbfxBtn->show();
- kbfxBtn->repaint();
+ kbfxBtn->tqrepaint();
menuPosition();
}
@@ -151,7 +151,7 @@ void KbfxSpinx::ToolTip ()
KbfxToolTip *tooltip = new KbfxToolTip ();
- QPoint xpoint = ( this->mapToGlobal ( QPoint ( 0, 0 ) ) );
+ TQPoint xpoint = ( this->mapToGlobal ( TQPoint ( 0, 0 ) ) );
int popx = xpoint.x ();
int popy = xpoint.y ();
@@ -172,8 +172,8 @@ void KbfxSpinx::ToolTip ()
popx -= tooltip->width();
}
- connect ( kbfxBtn, SIGNAL ( leave () ), tooltip, SLOT ( hideToolTip () ) );
- connect ( kbfxBtn, SIGNAL ( clicked () ), tooltip, SLOT ( hideToolTip () ) );
+ connect ( kbfxBtn, TQT_SIGNAL ( leave () ), tooltip, TQT_SLOT ( hideToolTip () ) );
+ connect ( kbfxBtn, TQT_SIGNAL ( clicked () ), tooltip, TQT_SLOT ( hideToolTip () ) );
tooltip->setStartPos ( popx, popy );
tooltip->show ();
}
@@ -186,40 +186,40 @@ void KbfxSpinx::showKmenu()
height of the K-menu
**/
- this->setCursor ( Qt::BlankCursor );
+ this->setCursor ( TQt::BlankCursor );
- QByteArray data, rdata;
- QDataStream arg ( data, IO_WriteOnly );
- QCString replytype;
- QPoint _tmp ( QCursor::pos () );
+ TQByteArray data, rdata;
+ TQDataStream arg ( data, IO_WriteOnly );
+ TQCString replytype;
+ TQPoint _tmp ( TQCursor::pos () );
if ( position () == pTop || position () == pBottom )
{
if ( _tmp.y () > 128 )
{
- QCursor::setPos ( this->mapToGlobal ( QPoint ( 0, 0 ) ) );
+ TQCursor::setPos ( this->mapToGlobal ( TQPoint ( 0, 0 ) ) );
}
else
{
- QCursor::setPos ( this->mapToGlobal ( this->geometry ().bottomLeft () ) );
+ TQCursor::setPos ( this->mapToGlobal ( this->tqgeometry ().bottomLeft () ) );
}
}
else
{
if ( _tmp.x () > 128 )
{
- QCursor::setPos ( this->mapToGlobal ( QPoint ( 0, 0 ) ) );
+ TQCursor::setPos ( this->mapToGlobal ( TQPoint ( 0, 0 ) ) );
}
else
{
- QCursor::setPos ( this->mapToGlobal ( this->geometry ().topRight () ) );
+ TQCursor::setPos ( this->mapToGlobal ( this->tqgeometry ().topRight () ) );
}
}
- arg << QPoint ( QCursor::pos () );
+ arg << TQPoint ( TQCursor::pos () );
if ( !m_dcopClient->
- call ( "kicker", "kicker", "popupKMenu(QPoint)", data, replytype, rdata,
+ call ( "kicker", "kicker", "popupKMenu(TQPoint)", data, replytype, rdata,
FALSE, -1 ) )
{
kdWarning ()
@@ -227,8 +227,8 @@ void KbfxSpinx::showKmenu()
<< endl;
}
- this->setCursor ( Qt::ArrowCursor );
- QCursor::setPos ( _tmp );
+ this->setCursor ( TQt::ArrowCursor );
+ TQCursor::setPos ( _tmp );
if ( !kmenu_timer->isActive ())
kmenu_timer->start(5000,true);
kdDebug () << "Kmenu Called" << endl;
@@ -287,27 +287,27 @@ int KbfxSpinx::heightForWidth ( int width ) const
return kbfxBtn->height();
}
-QPoint KbfxSpinx::menuPosition()
+TQPoint KbfxSpinx::menuPosition()
{
- QPoint xpoint = ( this->mapToGlobal ( QPoint ( 0, 0 ) ) );
+ TQPoint xpoint = ( this->mapToGlobal ( TQPoint ( 0, 0 ) ) );
int popx = xpoint.x ();
int popy = xpoint.y ();
if ( position () == pTop )
{
- return QPoint ( popx, ( popy + this->height() ) );
+ return TQPoint ( popx, ( popy + this->height() ) );
}
if ( position () == pBottom )
{
- return QPoint ( popx, ( popy - m_menuWidget->height() ) );
+ return TQPoint ( popx, ( popy - m_menuWidget->height() ) );
}
if ( position () == pLeft )
{
- return QPoint ( ( popx + this->width() ), popy );
+ return TQPoint ( ( popx + this->width() ), popy );
}
if ( position () == pRight )
{
- return QPoint ( ( popx - m_menuWidget->width() ), popy );
+ return TQPoint ( ( popx - m_menuWidget->width() ), popy );
}
return xpoint; // Should never be reached?
@@ -315,12 +315,12 @@ QPoint KbfxSpinx::menuPosition()
extern "C"
{
- KPanelApplet* init ( QWidget *parent, const QString& configFile )
+ KPanelApplet* init ( TQWidget *tqparent, const TQString& configFile )
{
KGlobal::locale()->insertCatalogue ( "KbfxSpinx" );
return new KbfxSpinx ( configFile, KPanelApplet::Normal,
KPanelApplet::About | KPanelApplet::Help | KPanelApplet::Preferences,
- parent, "KbfxSpinx" );
+ tqparent, "KbfxSpinx" );
}
}
diff --git a/src/kbfxspinx.h b/src/kbfxspinx.h
index 3111cb2..8e02421 100644
--- a/src/kbfxspinx.h
+++ b/src/kbfxspinx.h
@@ -26,13 +26,13 @@
#include <config.h>
-#include <qbitmap.h>
-#include <qlabel.h>
-#include <qlcdnumber.h>
-#include <qpoint.h>
-#include <qpopupmenu.h>
-#include <qstring.h>
-#include <qtimer.h>
+#include <tqbitmap.h>
+#include <tqlabel.h>
+#include <tqlcdnumber.h>
+#include <tqpoint.h>
+#include <tqpopupmenu.h>
+#include <tqstring.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <dcopobject.h>
@@ -63,10 +63,11 @@ class KbfxSpinx : public KPanelApplet,public DCOPObject
{
K_DCOP
Q_OBJECT
+// TQ_OBJECT
public:
- KbfxSpinx ( const QString& configFile, Type t = Normal, int actions = 0,
- QWidget *parent = 0, const char *name = 0 );
+ KbfxSpinx ( const TQString& configFile, Type t = Normal, int actions = 0,
+ TQWidget *tqparent = 0, const char *name = 0 );
~KbfxSpinx();
virtual int widthForHeight ( int height ) const;
@@ -74,7 +75,7 @@ class KbfxSpinx : public KPanelApplet,public DCOPObject
virtual void about();
virtual void help();
virtual void preferences();
- QPoint menuPosition();
+ TQPoint menuPosition();
void resizeRequest() { emit(updateLayout()); }
k_dcop:
ASYNC showMenu();
@@ -84,7 +85,7 @@ class KbfxSpinx : public KPanelApplet,public DCOPObject
void showKbfxMenu();
void showKmenu();
void ToolTip();
- void dirtyReaload(const QString&);
+ void dirtyReaload(const TQString&);
protected:
void createRMenu();
@@ -96,12 +97,12 @@ class KbfxSpinx : public KPanelApplet,public DCOPObject
KbfxButton * kbfxBtn;
KbfxSpinxMenuWidget * m_menuWidget;
KbfxSpinxPopUp * m_menu;
- QWidget * m_parent;
+ TQWidget * m_parent;
bool m_kicker_auto_adjust;
bool m_KbfxWatcher;
static bool m_horizontal_position;
DCOPClient * m_dcopClient;
- QTimer * kmenu_timer;
+ TQTimer * kmenu_timer;
KDirWatch * l_watch;
};
diff --git a/src/kbfxspinxmenu.cpp b/src/kbfxspinxmenu.cpp
index 0d016ac..6af42ef 100644
--- a/src/kbfxspinxmenu.cpp
+++ b/src/kbfxspinxmenu.cpp
@@ -21,13 +21,13 @@
#include "kbfxspinxmenu.h"
-KbfxSpinxMenuWidget::KbfxSpinxMenuWidget ( QWidget * parent, const char *name,
+KbfxSpinxMenuWidget::KbfxSpinxMenuWidget ( TQWidget * tqparent, const char *name,
WFlags fl ) :
- QWidget ( parent, "MenuWidget",
- fl | Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_StaysOnTop )
+ TQWidget ( tqparent, "MenuWidget",
+ fl | TQt::WStyle_Customize | TQt::WStyle_NoBorder | TQt::WStyle_StaysOnTop )
{
- m_parent = parent;
- QString _name=name;
+ m_parent = tqparent;
+ TQString _name=name;
init();
}
@@ -45,7 +45,7 @@ KbfxSpinxMenuWidget::init()
{
createMask ();
- QWidget *main = new QWidget ( this );
+ TQWidget *main = new TQWidget ( this );
m_kbfxSpinxTop = new KbfxSpinxTop ( main );
m_toolBarBot = new KbfxSpinxToolBar ( main );
@@ -54,11 +54,11 @@ KbfxSpinxMenuWidget::init()
m_kbfxSpinxTop->setMaximumHeight ( ConfigInit ().m_topBar_h );
m_kbfxSpinxTop->setMinimumHeight ( ConfigInit ().m_topBar_h );
- QWidget *middle = new QWidget ( main );
+ TQWidget *middle = new TQWidget ( main );
- middle->setPalette ( QPalette ( QColor ( 24, 233, 233 ) ) );
+ middle->setPalette ( TQPalette ( TQColor ( 24, 233, 233 ) ) );
-// m_middleFrame = new QHBoxLayout(middle);
+// m_middleFrame = new TQHBoxLayout(middle);
m_canvasView = new KbfxPlasmaCanvasView ( this );
m_indexView = new KbfxPlasmaIndexView ( this );
@@ -66,28 +66,28 @@ KbfxSpinxMenuWidget::init()
/* Search Box */
m_searchTag = new KbfxPixmapLabel ( this, "Search:" );
- QToolTip::add( m_searchTag, tr2i18n( "Double click to clear..." ) );
+ TQToolTip::add( m_searchTag, tr2i18n( "Double click to clear..." ) );
m_searchTag->normalize ();
m_searchTag->move ( ConfigInit ().m_searchBox_x,
ConfigInit ().m_searchBox_y );
- QPixmap m_searchPixmap = ( *KbfxPlasmaPixmapProvider::pixmap ( "find" ) );
+ TQPixmap m_searchPixmap = ( *KbfxPlasmaPixmapProvider::pixmap ( "tqfind" ) );
m_searchTag->setPixmap ( m_searchPixmap );
m_searchTag->resize ( m_searchPixmap.width (), ConfigInit ().m_searchBox_h );
- m_search = new QLineEdit ( this, "Search BOX" );
- QToolTip::add( m_search, tr2i18n( "Type here to search..." ) );
- m_search->setFrameShape ( QFrame::NoFrame );
- m_search->setFocusPolicy ( QWidget::StrongFocus );
+ m_search = new TQLineEdit ( this, "Search BOX" );
+ TQToolTip::add( m_search, tr2i18n( "Type here to search..." ) );
+ m_search->setFrameShape ( TQFrame::NoFrame );
+ m_search->setFocusPolicy ( TQ_StrongFocus );
m_search->move ( ConfigInit ().m_searchBox_x + m_searchTag->width (),
ConfigInit ().m_searchBox_y );
m_search->resize ( ConfigInit ().m_searchBox_w - m_searchTag->width (),
ConfigInit ().m_searchBox_h );
- connect (m_searchTag, SIGNAL (mouseDoubleClicked ( const ButtonState & )), this,
- SLOT (search_clear ( const ButtonState & )));
+ connect (m_searchTag, TQT_SIGNAL (mouseDoubleClicked ( const ButtonState & )), this,
+ TQT_SLOT (search_clear ( const ButtonState & )));
int frameHeight = ConfigInit().m_listBox_h;
@@ -101,7 +101,7 @@ KbfxSpinxMenuWidget::init()
m_canvasView->setMinimumHeight ( ConfigInit().m_itemView_h );
m_canvasView->setMaximumWidth ( ConfigInit ().m_itemView_w );
m_canvasView->setMinimumWidth ( ConfigInit ().m_itemView_w );
- m_appCanvas = new QCanvas ( m_canvasView->width (), m_canvasView->height () );
+ m_appCanvas = new TQCanvas ( m_canvasView->width (), m_canvasView->height () );
m_canvasView->setKbfxCanvas ( m_appCanvas );
m_appCanvas->setDoubleBuffering ( true );
@@ -109,7 +109,7 @@ KbfxSpinxMenuWidget::init()
m_indexView->setMinimumHeight ( frameHeight );
m_indexView->setMaximumWidth ( ConfigInit ().m_listBox_w );
m_indexView->setMinimumWidth ( ConfigInit ().m_listBox_w );
- m_indexCanvas = new QCanvas ( m_indexView->width (), m_indexView->height () );
+ m_indexCanvas = new TQCanvas ( m_indexView->width (), m_indexView->height () );
m_indexView->setKbfxCanvas ( m_indexCanvas );
m_indexCanvas->setDoubleBuffering ( true );
m_indexView->setView ( m_canvasView );
@@ -119,7 +119,7 @@ KbfxSpinxMenuWidget::init()
m_indexLeftView->setMaximumWidth ( ConfigInit ().m_listBox_w );
m_indexLeftView->setMinimumWidth ( ConfigInit ().m_listBox_w );
m_indexLeftCanvas =
- new QCanvas ( m_indexLeftView->width (), m_indexLeftView->height () );
+ new TQCanvas ( m_indexLeftView->width (), m_indexLeftView->height () );
m_indexLeftView->setKbfxCanvas ( m_indexLeftCanvas );
m_indexLeftCanvas->setDoubleBuffering ( true );
m_indexLeftView->setView ( m_canvasView );
@@ -130,8 +130,8 @@ KbfxSpinxMenuWidget::init()
m_indexLeftView->move ( ConfigInit ().m_listBox_w + ConfigInit ().m_itemView_w,
ConfigInit ().m_listBox_y );
- m_fixedFrame = new QVBoxLayout ( main );
- m_fixedFrame->setResizeMode ( QLayout::Minimum );
+ m_fixedFrame = new TQVBoxLayout ( main );
+ m_fixedFrame->setResizeMode ( TQLayout::Minimum );
m_fixedFrame->addWidget ( m_kbfxSpinxTop );
m_fixedFrame->addWidget ( middle );
m_fixedFrame->addWidget ( m_toolBarBot );
@@ -143,37 +143,37 @@ KbfxSpinxMenuWidget::init()
loadHistory ();
- connect ( m_indexView, SIGNAL ( loadRequest ( KbfxSignal ) ), m_canvasView,
- SLOT ( handleLoadRequest ( KbfxSignal ) ) );
+ connect ( m_indexView, TQT_SIGNAL ( loadRequest ( KbfxSignal ) ), m_canvasView,
+ TQT_SLOT ( handleLoadRequest ( KbfxSignal ) ) );
- connect ( m_indexLeftView, SIGNAL ( loadRequest ( KbfxSignal ) ), m_canvasView,
- SLOT ( handleLoadRequest ( KbfxSignal ) ) );
+ connect ( m_indexLeftView, TQT_SIGNAL ( loadRequest ( KbfxSignal ) ), m_canvasView,
+ TQT_SLOT ( handleLoadRequest ( KbfxSignal ) ) );
- connect ( m_canvasView, SIGNAL ( clicked () ), this, SLOT ( hideMenu () ) );
+ connect ( m_canvasView, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( hideMenu () ) );
- connect ( m_search, SIGNAL ( textChanged ( const QString & ) ), m_canvasView,
- SLOT ( search ( const QString & ) ) );
+ connect ( m_search, TQT_SIGNAL ( textChanged ( const TQString & ) ), m_canvasView,
+ TQT_SLOT ( search ( const TQString & ) ) );
connect ( m_indexView,
- SIGNAL ( pluginRequest ( QString, KbfxPlasmaCanvasView * ) ),
- m_indexView, SLOT ( loadPlugin ( QString, KbfxPlasmaCanvasView * ) ) );
+ TQT_SIGNAL ( pluginRequest ( TQString, KbfxPlasmaCanvasView * ) ),
+ m_indexView, TQT_SLOT ( loadPlugin ( TQString, KbfxPlasmaCanvasView * ) ) );
connect ( m_indexLeftView,
- SIGNAL ( pluginRequest ( QString, KbfxPlasmaCanvasView * ) ),
+ TQT_SIGNAL ( pluginRequest ( TQString, KbfxPlasmaCanvasView * ) ),
m_indexLeftView,
- SLOT ( loadPlugin ( QString, KbfxPlasmaCanvasView * ) ) );
+ TQT_SLOT ( loadPlugin ( TQString, KbfxPlasmaCanvasView * ) ) );
connect ( m_indexView,
- SIGNAL ( clearSelected() ),
- m_indexLeftView, SLOT ( clearSelection() ) );
+ TQT_SIGNAL ( clearSelected() ),
+ m_indexLeftView, TQT_SLOT ( clearSelection() ) );
connect ( m_indexLeftView,
- SIGNAL ( clearSelected() ),
+ TQT_SIGNAL ( clearSelected() ),
m_indexView,
- SLOT ( clearSelection() ) );
+ TQT_SLOT ( clearSelection() ) );
- connect (this,SIGNAL(refresh()),m_canvasView,SLOT(reload()));
- connect (this,SIGNAL(runItem()),m_canvasView,SLOT(execFirst()));
+ connect (this,TQT_SIGNAL(refresh()),m_canvasView,TQT_SLOT(reload()));
+ connect (this,TQT_SIGNAL(runItem()),m_canvasView,TQT_SLOT(execFirst()));
KbfxSpinxToolButton *logout = new KbfxSpinxToolButton ( m_toolBarBot );
KbfxSpinxToolButton *lock = new KbfxSpinxToolButton ( m_toolBarBot );
@@ -200,8 +200,8 @@ KbfxSpinxMenuWidget::init()
m_toolBarBot->addButton ( logout );
m_toolBarBot->addButton ( lock );
- connect ( logout,SIGNAL ( clicked() ),this , SLOT ( hideMenu() ) );
- connect ( lock ,SIGNAL ( clicked() ),this , SLOT ( hideMenu() ) );
+ connect ( logout,TQT_SIGNAL ( clicked() ),this , TQT_SLOT ( hideMenu() ) );
+ connect ( lock ,TQT_SIGNAL ( clicked() ),this , TQT_SLOT ( hideMenu() ) );
}
@@ -232,36 +232,36 @@ KbfxSpinxMenuWidget::changeHeight (int het)
void
KbfxSpinxMenuWidget::createMask ()
{
- QPixmap maskpng = ( *KbfxPlasmaPixmapProvider::pixmap ( "mask" ) );
- QImage rawimg = maskpng.convertToImage ();
+ TQPixmap tqmaskpng = ( *KbfxPlasmaPixmapProvider::pixmap ( "tqmask" ) );
+ TQImage rawimg = tqmaskpng.convertToImage ();
rawimg =
rawimg.smoothScale ( ConfigInit ().m_userMenuWidth,
ConfigInit ().m_userMenuHeight,
- QImage::ScaleFree );
+ TQ_ScaleFree );
- maskpng.convertFromImage ( rawimg );
+ tqmaskpng.convertFromImage ( rawimg );
- setMinimumWidth ( maskpng.width () );
- setMinimumHeight ( maskpng.height () );
-// setMaximumWidth ( maskpng.width () );
-// setMaximumHeight ( maskpng.height () );
- if ( !maskpng.mask () )
+ setMinimumWidth ( tqmaskpng.width () );
+ setMinimumHeight ( tqmaskpng.height () );
+// setMaximumWidth ( tqmaskpng.width () );
+// setMaximumHeight ( tqmaskpng.height () );
+ if ( !tqmaskpng.tqmask () )
if ( rawimg.hasAlphaBuffer () )
{
- QBitmap bm;
- bm = rawimg.createAlphaMask ();
- maskpng.setMask ( bm );
+ TQBitmap bm;
+ bm.convertFromImage(rawimg.createAlphaMask ());
+ tqmaskpng.setMask ( bm );
}
else
{
- QBitmap bm;
- bm = rawimg.createHeuristicMask ();
- // maskpng.setMask ( bm );
+ TQBitmap bm;
+ bm.convertFromImage(rawimg.createHeuristicMask ());
+ // tqmaskpng.setMask ( bm );
}
- if ( maskpng.mask () && m_parent )
- m_parent->setMask ( *maskpng.mask () );
+ if ( tqmaskpng.tqmask () && m_parent )
+ m_parent->setMask ( *tqmaskpng.tqmask () );
}
void
@@ -271,7 +271,7 @@ KbfxSpinxMenuWidget::resizeContent ()
void
KbfxSpinxMenuWidget::loadHistory ()
{
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = ConfigInit ().m_pluginsLeft.begin ();
it != ConfigInit ().m_pluginsLeft.end (); ++it )
{
@@ -294,7 +294,7 @@ KbfxSpinxMenuWidget::enterPressed ()
/*
void
-KbfxSpinxMenuWidget::propergateMove (QMouseEvent * me)
+KbfxSpinxMenuWidget::propergateMove (TQMouseEvent * me)
{
}
*/
@@ -308,19 +308,19 @@ KbfxSpinxMenuWidget::hideMenu ()
/*
void
-KbfxSpinxMenuWidget::mouseMoveEvent (QMouseEvent * me)
+KbfxSpinxMenuWidget::mouseMoveEvent (TQMouseEvent * me)
{
// m_listBox->setFocus();
}
*/
void
-KbfxSpinxMenuWidget::loadPluginLeft ( QString name )
+KbfxSpinxMenuWidget::loadPluginLeft ( TQString name )
{
if (name == NULL) {
return;
}
- if ( m_loadedListLeft.contains ( name ) <= 0 )
+ if ( m_loadedListLeft.tqcontains ( name ) <= 0 )
{
m_loader = new KbfxPlasmaPluginLoader ();
m_stack_R = m_loader->getView ( name );
@@ -342,9 +342,9 @@ KbfxSpinxMenuWidget::loadPluginLeft ( QString name )
}
void
-KbfxSpinxMenuWidget::loadPluginRight ( QString name )
+KbfxSpinxMenuWidget::loadPluginRight ( TQString name )
{
-if ( m_loadedListRight.contains ( name ) <= 0 )
+if ( m_loadedListRight.tqcontains ( name ) <= 0 )
{
m_loader = new KbfxPlasmaPluginLoader ();
m_stack_R = m_loader->getView ( name );
@@ -367,28 +367,28 @@ if ( m_loadedListRight.contains ( name ) <= 0 )
/*
void
-KbfxSpinxMenuWidget::focusInEvent (QFocusEvent * te)
+KbfxSpinxMenuWidget::focusInEvent (TQFocusEvent * te)
{
kdDebug() << "TODO: Handle Focus Event" << endl;
}
*/
void
-KbfxSpinxMenuWidget::keyPressEvent ( QKeyEvent * e )
+KbfxSpinxMenuWidget::keyPressEvent ( TQKeyEvent * e )
{
- if ( e->key () == Qt::Key_Backspace )
+ if ( e->key () == TQt::Key_Backspace )
{
m_search->backspace ();
return;
}
- else if ( e->key () == Qt::Key_Escape )
+ else if ( e->key () == TQt::Key_Escape )
{
hideMenu ();
return;
}
- else if ( e->key() == Qt::Key_Return )
+ else if ( e->key() == TQt::Key_Return )
{
hideMenu ();
m_canvasView->setFocus ();
@@ -396,77 +396,77 @@ KbfxSpinxMenuWidget::keyPressEvent ( QKeyEvent * e )
return;
}
- else if ( e->key () == Qt::Key_Up )
+ else if ( e->key () == TQt::Key_Up )
{
m_search->setFocus ();
return;
}
- else if ( e->key () == Qt::Key_Down )
+ else if ( e->key () == TQt::Key_Down )
{
m_canvasView->setFocus ();
return;
}
- else if ( e->key () == Qt::Key_Control
- || e->key () == Qt::Key_Alt
- || e->key () == Qt::Key_Pause
- || e->key () == Qt::Key_Print
- || e->key () == Qt::Key_SysReq
- || e->key () == Qt::Key_Meta
- || e->key () == Qt::Key_CapsLock
- || e->key () == Qt::Key_NumLock
- || e->key () == Qt::Key_ScrollLock
- || e->key () == Qt::Key_F1
- || e->key () == Qt::Key_F2
- || e->key () == Qt::Key_F3
- || e->key () == Qt::Key_F4
- || e->key () == Qt::Key_F5
- || e->key () == Qt::Key_F6
- || e->key () == Qt::Key_F7
- || e->key () == Qt::Key_F8
- || e->key () == Qt::Key_F9
- || e->key () == Qt::Key_F10
- || e->key () == Qt::Key_F11
- || e->key () == Qt::Key_F12
- || e->key () == Qt::Key_F13
- || e->key () == Qt::Key_F14
- || e->key () == Qt::Key_F15
- || e->key () == Qt::Key_F16
- || e->key () == Qt::Key_F17
- || e->key () == Qt::Key_F18
- || e->key () == Qt::Key_F19
- || e->key () == Qt::Key_F20
- || e->key () == Qt::Key_Super_L
- || e->key () == Qt::Key_Super_R
- || e->key () == Qt::Key_Menu
- || e->key () == Qt::Key_Hyper_L
- || e->key () == Qt::Key_Hyper_R
- || e->key () == Qt::Key_Help
- || e->key () == Qt::Key_Back
- || e->key () == Qt::Key_Forward
- || e->key () == Qt::Key_Stop
- || e->key () == Qt::Key_Refresh
- || e->key () == Qt::Key_VolumeDown
- || e->key () == Qt::Key_VolumeMute
- || e->key () == Qt::Key_VolumeUp
- || e->key () == Qt::Key_BassBoost
- || e->key () == Qt::Key_BassUp
- || e->key () == Qt::Key_BassDown
- || e->key () == Qt::Key_TrebleUp
- || e->key () == Qt::Key_TrebleDown
- || e->key () == Qt::Key_MediaPlay
- || e->key () == Qt::Key_MediaStop
- || e->key () == Qt::Key_MediaPrev
- || e->key () == Qt::Key_MediaNext
- || e->key () == Qt::Key_MediaRecord
- || e->key () == Qt::Key_HomePage
- || e->key () == Qt::Key_Favorites
- || e->key () == Qt::Key_Search
- || e->key () == Qt::Key_Standby
- || e->key () == Qt::Key_OpenUrl
- || e->key () == Qt::Key_LaunchMail
- || e->key () == Qt::Key_LaunchMedia
+ else if ( e->key () == TQt::Key_Control
+ || e->key () == TQt::Key_Alt
+ || e->key () == TQt::Key_Pause
+ || e->key () == TQt::Key_Print
+ || e->key () == TQt::Key_SysReq
+ || e->key () == TQt::Key_Meta
+ || e->key () == TQt::Key_CapsLock
+ || e->key () == TQt::Key_NumLock
+ || e->key () == TQt::Key_ScrollLock
+ || e->key () == TQt::Key_F1
+ || e->key () == TQt::Key_F2
+ || e->key () == TQt::Key_F3
+ || e->key () == TQt::Key_F4
+ || e->key () == TQt::Key_F5
+ || e->key () == TQt::Key_F6
+ || e->key () == TQt::Key_F7
+ || e->key () == TQt::Key_F8
+ || e->key () == TQt::Key_F9
+ || e->key () == TQt::Key_F10
+ || e->key () == TQt::Key_F11
+ || e->key () == TQt::Key_F12
+ || e->key () == TQt::Key_F13
+ || e->key () == TQt::Key_F14
+ || e->key () == TQt::Key_F15
+ || e->key () == TQt::Key_F16
+ || e->key () == TQt::Key_F17
+ || e->key () == TQt::Key_F18
+ || e->key () == TQt::Key_F19
+ || e->key () == TQt::Key_F20
+ || e->key () == TQt::Key_Super_L
+ || e->key () == TQt::Key_Super_R
+ || e->key () == TQt::Key_Menu
+ || e->key () == TQt::Key_Hyper_L
+ || e->key () == TQt::Key_Hyper_R
+ || e->key () == TQt::Key_Help
+ || e->key () == TQt::Key_Back
+ || e->key () == TQt::Key_Forward
+ || e->key () == TQt::Key_Stop
+ || e->key () == TQt::Key_Refresh
+ || e->key () == TQt::Key_VolumeDown
+ || e->key () == TQt::Key_VolumeMute
+ || e->key () == TQt::Key_VolumeUp
+ || e->key () == TQt::Key_BassBoost
+ || e->key () == TQt::Key_BassUp
+ || e->key () == TQt::Key_BassDown
+ || e->key () == TQt::Key_TrebleUp
+ || e->key () == TQt::Key_TrebleDown
+ || e->key () == TQt::Key_MediaPlay
+ || e->key () == TQt::Key_MediaStop
+ || e->key () == TQt::Key_MediaPrev
+ || e->key () == TQt::Key_MediaNext
+ || e->key () == TQt::Key_MediaRecord
+ || e->key () == TQt::Key_HomePage
+ || e->key () == TQt::Key_Favorites
+ || e->key () == TQt::Key_Search
+ || e->key () == TQt::Key_Standby
+ || e->key () == TQt::Key_OpenUrl
+ || e->key () == TQt::Key_LaunchMail
+ || e->key () == TQt::Key_LaunchMedia
)
{
hideMenu ();
@@ -475,7 +475,7 @@ KbfxSpinxMenuWidget::keyPressEvent ( QKeyEvent * e )
}
/*
- else if ( e->key() == Qt::Key_Alt )
+ else if ( e->key() == TQt::Key_Alt )
{
hideMenu ();
m_canvasView->setFocus ();
@@ -484,20 +484,20 @@ KbfxSpinxMenuWidget::keyPressEvent ( QKeyEvent * e )
}
- else if ( e->key () == Qt::Key_Tab )
+ else if ( e->key () == TQt::Key_Tab )
{
// m_listBox->setFocus ();
return;
}
- else if ( e->key () >= Qt::Key_0 && e->key () <= Qt::Key_9 )
+ else if ( e->key () >= TQt::Key_0 && e->key () <= TQt::Key_9 )
{
printf ( "%d \n", e->key () );
emit runItemAt ( e->key () );
return;
}
- else if ( e->key () == Qt::Key_Left )
+ else if ( e->key () == TQt::Key_Left )
{
m_canvasView->setFocus ();
m_canvasView->emulatedKeyPress ( e );
diff --git a/src/kbfxspinxmenu.h b/src/kbfxspinxmenu.h
index 19986cc..f897691 100644
--- a/src/kbfxspinxmenu.h
+++ b/src/kbfxspinxmenu.h
@@ -22,19 +22,19 @@
#ifndef KBFX_SPINX_MENU_WIDGET_H
#define KBFX_SPINX_MENU_WIDGET_H
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qcanvas.h>
-#include <qframe.h>
-#include <qhbox.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
-#include <qvbox.h>
-#include <qwidget.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqcanvas.h>
+#include <tqframe.h>
+#include <tqhbox.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
+#include <tqvbox.h>
+#include <tqwidget.h>
#include <kdebug.h>
#include <klocale.h>
@@ -59,24 +59,25 @@
#include "kbfxspinxview.h"
-class KbfxSpinxMenuWidget:public QWidget
+class KbfxSpinxMenuWidget:public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public :
- KbfxSpinxMenuWidget ( QWidget * parent = 0, const char * name = 0,WFlags fl =0 );
+ KbfxSpinxMenuWidget ( TQWidget * tqparent = 0, const char * name = 0,WFlags fl =0 );
virtual ~KbfxSpinxMenuWidget();
-// virtual void mouseMoveEvent(QMouseEvent * me);
-// virtual void focusInEvent ( QFocusEvent * ) ;
- virtual void keyPressEvent ( QKeyEvent * e ) ;
- void grabEvent ( QKeyEvent * e ) { keyPressEvent ( e );}
+// virtual void mouseMoveEvent(TQMouseEvent * me);
+// virtual void focusInEvent ( TQFocusEvent * ) ;
+ virtual void keyPressEvent ( TQKeyEvent * e ) ;
+ void grabEvent ( TQKeyEvent * e ) { keyPressEvent ( e );}
void loadHistory();
void resizeContent();
void reinit();
public slots:
void hideMenu();
-// void propergateMove(QMouseEvent * me);
- void loadPluginLeft ( QString name );
- void loadPluginRight ( QString name );
+// void propergateMove(TQMouseEvent * me);
+ void loadPluginLeft ( TQString name );
+ void loadPluginRight ( TQString name );
void enterPressed();
void search_clear ( const ButtonState & );
// void changeHeight(int h);
@@ -89,21 +90,21 @@ class KbfxSpinxMenuWidget:public QWidget
private:
void init();
- QPoint menuPosition();
+ TQPoint menuPosition();
void createMask();
KbfxPlasmaCanvasView * m_canvasView;
// KbfxPlasmaCanvasView * m_indexView;
- QCanvas * m_canvas ;
+ TQCanvas * m_canvas ;
// KbfxPlasmaListBox * m_listBox;
KbfxPlasmaPluginLoader * m_loader;
KbfxSpinxTop * m_menuTop;
- QString m_loadedListLeft;
- QString m_loadedListRight;
+ TQString m_loadedListLeft;
+ TQString m_loadedListRight;
// FIXME: canvasstack is depricated Interface
KbfxPlasmaCanvasStack * m_stack;
KbfxDataStack * m_stack_R;
- QWidget * m_parent;
- QLineEdit * m_search;
+ TQWidget * m_parent;
+ TQLineEdit * m_search;
KbfxPixmapLabel * m_searchTag;
KbfxSpinxToolBar * m_toolBarBot;
KbfxSpinxToolBar * m_toolBarSide;
@@ -111,11 +112,11 @@ class KbfxSpinxMenuWidget:public QWidget
/* SUPER NEW LAYOUT FIX HERE */
- QBoxLayout * m_fixedFrame;
- QBoxLayout * m_middleFrame;
- QCanvas * m_appCanvas;
- QCanvas * m_indexCanvas;
- QCanvas * m_indexLeftCanvas;
+ TQBoxLayout * m_fixedFrame;
+ TQBoxLayout * m_middleFrame;
+ TQCanvas * m_appCanvas;
+ TQCanvas * m_indexCanvas;
+ TQCanvas * m_indexLeftCanvas;
KbfxPlasmaIndexView * m_indexView;
diff --git a/src/kbfxspinxpopup.cpp b/src/kbfxspinxpopup.cpp
index 2270eb8..677687d 100644
--- a/src/kbfxspinxpopup.cpp
+++ b/src/kbfxspinxpopup.cpp
@@ -32,7 +32,7 @@
//
#include "kbfxspinxpopup.h"
-KbfxSpinxPopUp::KbfxSpinxPopUp ( QWidget * parent, const char * name ) :QPopupMenu ( parent,name )
+KbfxSpinxPopUp::KbfxSpinxPopUp ( TQWidget * tqparent, const char * name ) :TQPopupMenu ( tqparent,name )
{
m_mainItem = 0L;
}
@@ -43,14 +43,14 @@ KbfxSpinxPopUp::~KbfxSpinxPopUp()
}
void
-KbfxSpinxPopUp::keyPressEvent ( QKeyEvent * e )
+KbfxSpinxPopUp::keyPressEvent ( TQKeyEvent * e )
{
/*
- if ( e->key() == Qt::Key_Tab )
+ if ( e->key() == TQt::Key_Tab )
{
return ;
}
- if ( e->key() == Qt::Key_Up )
+ if ( e->key() == TQt::Key_Up )
{
m_mainItem->grabEvent ( e );
// e->ignore();
@@ -61,7 +61,7 @@ KbfxSpinxPopUp::keyPressEvent ( QKeyEvent * e )
}
void
-KbfxSpinxPopUp::addItem ( QWidget * item,int index )
+KbfxSpinxPopUp::addItem ( TQWidget * item,int index )
{
m_mainItem = ( KbfxSpinxMenuWidget* ) item;
this->insertItem ( item,index );
diff --git a/src/kbfxspinxpopup.h b/src/kbfxspinxpopup.h
index 882d665..821d829 100644
--- a/src/kbfxspinxpopup.h
+++ b/src/kbfxspinxpopup.h
@@ -33,7 +33,7 @@
#ifndef KBFX_SPINX_POP_UP_H
#define KBFX_SPINX_POP_UP_H
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include "kbfxspinxmenu.h"
@@ -41,16 +41,17 @@
/**
@author Siraj Razick <[email protected]>
*/
-class KbfxSpinxPopUp : public QPopupMenu
+class KbfxSpinxPopUp : public TQPopupMenu
{
Q_OBJECT
+ TQ_OBJECT
public:
- KbfxSpinxPopUp ( QWidget * parent = 0, const char * name = 0 ) ;
+ KbfxSpinxPopUp ( TQWidget * tqparent = 0, const char * name = 0 ) ;
~KbfxSpinxPopUp();
- virtual void keyPressEvent ( QKeyEvent * ke );
- void addItem ( QWidget * item,int index );
+ virtual void keyPressEvent ( TQKeyEvent * ke );
+ void addItem ( TQWidget * item,int index );
private:
KbfxSpinxMenuWidget * m_mainItem;
};
diff --git a/src/kbfxspinxscrollbar.cpp b/src/kbfxspinxscrollbar.cpp
index 6fcff50..c2f7d08 100644
--- a/src/kbfxspinxscrollbar.cpp
+++ b/src/kbfxspinxscrollbar.cpp
@@ -21,17 +21,17 @@
#include "kbfxspinxscrollbar.h"
-KbfxSpinxScrollBar::KbfxSpinxScrollBar ( QWidget * parent, const char *name, int type ) :
- QWidget ( parent, name )
+KbfxSpinxScrollBar::KbfxSpinxScrollBar ( TQWidget * tqparent, const char *name, int type ) :
+ TQWidget ( tqparent, name )
{
if (type == 0){
m_normal = ( *KbfxPlasmaPixmapProvider::pixmap ( "scrollnormal" ) );
} else {
m_normal = ( *KbfxPlasmaPixmapProvider::pixmap ( "scrollnormalbot" ) );
}
- QImage _tmp_img = m_normal.convertToImage();
- _tmp_img = _tmp_img.smoothScale ( ConfigInit().m_itemView_w, m_normal.height (),QImage::ScaleFree );
- m_normal = QPixmap ( _tmp_img );
+ TQImage _tmp_img = m_normal.convertToImage();
+ _tmp_img = _tmp_img.smoothScale ( ConfigInit().m_itemView_w, m_normal.height (),TQ_ScaleFree );
+ m_normal = TQPixmap ( _tmp_img );
this->resize ( m_normal.width (), m_normal.height () );
@@ -41,10 +41,10 @@ KbfxSpinxScrollBar::KbfxSpinxScrollBar ( QWidget * parent, const char *name, int
h = this->height () / 2;
_x += ( this->width () - w ) / 2;
_y += ( this->height () - h ) / 2;
- m_triAngle = QPointArray ( 3 );
+ m_triAngle = TQPointArray ( 3 );
m_dir = DOWN;
- m_timer = new QTimer ( this,"ScrollTimer" );
- connect ( m_timer,SIGNAL ( timeout() ),this,SLOT ( timeoutslot() ) );
+ m_timer = new TQTimer ( this,"ScrollTimer" );
+ connect ( m_timer,TQT_SIGNAL ( timeout() ),this,TQT_SLOT ( timeoutslot() ) );
m_pressed = false;
}
@@ -53,18 +53,18 @@ KbfxSpinxScrollBar::~KbfxSpinxScrollBar ()
{}
void
-KbfxSpinxScrollBar::paintEvent ( QPaintEvent * pe )
+KbfxSpinxScrollBar::paintEvent ( TQPaintEvent * pe )
{
- QRect r = pe->rect();
- QPainter p;
+ TQRect r = pe->rect();
+ TQPainter p;
p.begin ( this );
- p.drawPixmap ( QRect ( 0, 0, m_normal.width (), m_normal.height () ),
+ p.drawPixmap ( TQRect ( 0, 0, m_normal.width (), m_normal.height () ),
m_normal );
- p.setPen ( QColor ( 255,255,255 ) );
+ p.setPen ( TQColor ( 255,255,255 ) );
if ( m_pressed == false )
- p.setBrush ( QColor ( 255,255,255 ) );
+ p.setBrush ( TQColor ( 255,255,255 ) );
else
- p.setBrush ( QColor ( 0,0,0 ) );
+ p.setBrush ( TQColor ( 0,0,0 ) );
p.drawPolygon ( m_triAngle );
p.end ();
@@ -92,7 +92,7 @@ KbfxSpinxScrollBar::setType ( Direction dir )
void
-KbfxSpinxScrollBar::mousePressEvent ( QMouseEvent * me )
+KbfxSpinxScrollBar::mousePressEvent ( TQMouseEvent * me )
{
me = me;
m_pressed = true;
@@ -101,7 +101,7 @@ KbfxSpinxScrollBar::mousePressEvent ( QMouseEvent * me )
}
void
-KbfxSpinxScrollBar::mouseReleaseEvent ( QMouseEvent * me )
+KbfxSpinxScrollBar::mouseReleaseEvent ( TQMouseEvent * me )
{
me = me;
m_pressed = false;
@@ -111,7 +111,7 @@ KbfxSpinxScrollBar::mouseReleaseEvent ( QMouseEvent * me )
void
-KbfxSpinxScrollBar::enterEvent ( QEvent * e )
+KbfxSpinxScrollBar::enterEvent ( TQEvent * e )
{
e = e;
m_pressed = true;
@@ -120,7 +120,7 @@ KbfxSpinxScrollBar::enterEvent ( QEvent * e )
}
void
-KbfxSpinxScrollBar::leaveEvent ( QEvent *e )
+KbfxSpinxScrollBar::leaveEvent ( TQEvent *e )
{
e =e ;
m_pressed = false;
diff --git a/src/kbfxspinxscrollbar.h b/src/kbfxspinxscrollbar.h
index c159bc3..8ed7b73 100644
--- a/src/kbfxspinxscrollbar.h
+++ b/src/kbfxspinxscrollbar.h
@@ -22,31 +22,32 @@
#ifndef KBFX_SPINX_SCROLL_BAR_H
#define KBFX_SPINX_SCROLL_BAR_H
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpointarray.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpointarray.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <kbfxplasmapixmapprovider.h>
-class QWidget;
+class TQWidget;
-class KbfxSpinxScrollBar:public QWidget
+class KbfxSpinxScrollBar:public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
typedef enum {UP,DOWN,LEFT,RIGHT} Direction;
- KbfxSpinxScrollBar ( QWidget * parent = 0,const char * name = 0,int type = 0 );
+ KbfxSpinxScrollBar ( TQWidget * tqparent = 0,const char * name = 0,int type = 0 );
~KbfxSpinxScrollBar();
- virtual void paintEvent ( QPaintEvent * ev );
- virtual void mousePressEvent ( QMouseEvent * me );
- virtual void mouseReleaseEvent ( QMouseEvent * me );
- virtual void enterEvent ( QEvent * e );
- virtual void leaveEvent ( QEvent * e );
+ virtual void paintEvent ( TQPaintEvent * ev );
+ virtual void mousePressEvent ( TQMouseEvent * me );
+ virtual void mouseReleaseEvent ( TQMouseEvent * me );
+ virtual void enterEvent ( TQEvent * e );
+ virtual void leaveEvent ( TQEvent * e );
void setType ( Direction dir );
public slots:
void timeoutslot();
@@ -57,12 +58,12 @@ class KbfxSpinxScrollBar:public QWidget
void scroll ( int , int );
private:
- QPixmap m_normal;
- QPixmap m_hover;
- QPixmap m_presseod;
- QPointArray m_triAngle;
+ TQPixmap m_normal;
+ TQPixmap m_hover;
+ TQPixmap m_presseod;
+ TQPointArray m_triAngle;
Direction m_dir;
- QTimer * m_timer;
+ TQTimer * m_timer;
bool m_pressed;
diff --git a/src/kbfxspinxtoolbar.cpp b/src/kbfxspinxtoolbar.cpp
index 8a35f15..bd8b029 100644
--- a/src/kbfxspinxtoolbar.cpp
+++ b/src/kbfxspinxtoolbar.cpp
@@ -21,7 +21,7 @@
#include "kbfxspinxtoolbar.h"
-KbfxSpinxToolBar::KbfxSpinxToolBar ( QWidget * parent , const char * name , WFlags l ) :QWidget ( parent,name,l )
+KbfxSpinxToolBar::KbfxSpinxToolBar ( TQWidget * tqparent , const char * name , WFlags l ) :TQWidget ( tqparent,name,l )
{
_y = 0;
@@ -35,7 +35,7 @@ KbfxSpinxToolBar::~KbfxSpinxToolBar()
{}
void
-KbfxSpinxToolBar::setSize ( QSize size )
+KbfxSpinxToolBar::setSize ( TQSize size )
{
this->resize ( size );
_x = size.width();
@@ -54,12 +54,12 @@ void KbfxSpinxToolBar::addButton ( KbfxSpinxToolButton * btn )
btn->update();
}
-void KbfxSpinxToolBar::paintEvent ( QPaintEvent * pe )
+void KbfxSpinxToolBar::paintEvent ( TQPaintEvent * pe )
{
pe = pe ;
- QPainter p;
+ TQPainter p;
p.begin ( this );
- p.drawPixmap ( QRect ( 0,0,ConfigInit().m_botBar_w,ConfigInit().m_botBar_h ),m_bg );
+ p.drawPixmap ( TQRect ( 0,0,ConfigInit().m_botBar_w,ConfigInit().m_botBar_h ),m_bg );
p.end();
}
diff --git a/src/kbfxspinxtoolbar.h b/src/kbfxspinxtoolbar.h
index 7ad8539..802c137 100644
--- a/src/kbfxspinxtoolbar.h
+++ b/src/kbfxspinxtoolbar.h
@@ -22,34 +22,35 @@
#ifndef KBFX_SPINX_TOOL_BAR_H
#define KBFX_SPINX_TOOL_BAR_H
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include <kbfxconfig.h>
#include <kbfxplasmapixmapprovider.h>
#include "kbfxspinxtoolbutton.h"
-class KbfxSpinxToolBar:public QWidget
+class KbfxSpinxToolBar:public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KbfxSpinxToolBar ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+ KbfxSpinxToolBar ( TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0 );
virtual ~KbfxSpinxToolBar();
- virtual void paintEvent ( QPaintEvent * pe );
+ virtual void paintEvent ( TQPaintEvent * pe );
void addButton ( KbfxSpinxToolButton * btn );
- void setSize ( QSize s );
+ void setSize ( TQSize s );
private:
int _x;
int _y;
int m_buttonWidth;
int m_buttonHeight;
- QPixmap m_bg;
+ TQPixmap m_bg;
};
diff --git a/src/kbfxspinxtoolbutton.cpp b/src/kbfxspinxtoolbutton.cpp
index 3230e14..ec69685 100644
--- a/src/kbfxspinxtoolbutton.cpp
+++ b/src/kbfxspinxtoolbutton.cpp
@@ -21,14 +21,14 @@
#include "kbfxspinxtoolbutton.h"
-KbfxSpinxToolButton::KbfxSpinxToolButton ( QWidget * parent , const char * name ) :QLabel ( parent,name,Qt::WStaticContents | Qt::WNoAutoErase |Qt::WPaintDesktop )
+KbfxSpinxToolButton::KbfxSpinxToolButton ( TQWidget * tqparent , const char * name ) :TQLabel ( tqparent,name,TQt::WStaticContents | TQt::WNoAutoErase |TQt::WPaintDesktop )
{
m_dataSource = 0;
m_dataGroup = 0;
m_fadeTime = ConfigInit().m_fadeTime;
- fade_timer = new QTimer ( this,"Fade Timer" );
- connect ( fade_timer,SIGNAL ( timeout() ),this,SLOT ( fade() ) );
+ fade_timer = new TQTimer ( this,"Fade Timer" );
+ connect ( fade_timer,TQT_SIGNAL ( timeout() ),this,TQT_SLOT ( fade() ) );
}
@@ -43,8 +43,8 @@ void KbfxSpinxToolButton::fade ( )
}
else
{
- QImage _final = m_fadePix.convertToImage ();
- QImage _current = m_current.convertToImage ();
+ TQImage _final = m_fadePix.convertToImage ();
+ TQImage _current = m_current.convertToImage ();
if ( !fade_timer->isActive ())
{
@@ -56,43 +56,43 @@ void KbfxSpinxToolButton::fade ( )
m_opacity += 0.1;
KImageEffect::blend ( _final, _current, m_opacity);
- m_current = QPixmap ( _current );
+ m_current = TQPixmap ( _current );
}
this->resize ( m_current.size() );
this->update();
}
void
-KbfxSpinxToolButton::enterEvent ( QEvent * e )
+KbfxSpinxToolButton::enterEvent ( TQEvent * e )
{
e = e;
m_fadePix = m_hover;
fade();
- this->setCursor ( QCursor ( Qt::PointingHandCursor ) );
+ this->setCursor ( TQCursor ( TQt::PointingHandCursor ) );
}
void
-KbfxSpinxToolButton::leaveEvent ( QEvent * e )
+KbfxSpinxToolButton::leaveEvent ( TQEvent * e )
{
e = e;
m_fadePix = m_normal;
fade();
- this->setCursor ( QCursor ( Qt::ArrowCursor ) );
+ this->setCursor ( TQCursor ( TQt::ArrowCursor ) );
}
void
-KbfxSpinxToolButton::setPixmaps ( QPixmap normal, QPixmap hover )
+KbfxSpinxToolButton::setPixmaps ( TQPixmap normal, TQPixmap hover )
{
- QSize _sizeNormal = normal.size();
- QImage _tmpHover = hover.convertToImage ();
- _tmpHover = _tmpHover.smoothScale ( _sizeNormal, QImage::ScaleFree );
+ TQSize _sizeNormal = normal.size();
+ TQImage _tmpHover = hover.convertToImage ();
+ _tmpHover = _tmpHover.smoothScale ( _sizeNormal, TQ_ScaleFree );
m_normal = normal;
- m_hover = QPixmap ( _tmpHover );
+ m_hover = TQPixmap ( _tmpHover );
m_current = m_normal;
resize ( m_current.size () );
- this->repaint();
+ this->tqrepaint();
this->update();
}
@@ -106,26 +106,26 @@ KbfxSpinxToolButton::setDataSource ( KbfxDataSource * src )
m_dataSource = new KbfxDataSource();
*m_dataSource = *src; // copy
KIconLoader *iconload = KGlobal::iconLoader ();
- QString m_iconPath = iconload->iconPath ( m_icon, KIcon::Desktop, false );
- m_iconPixmap = QPixmap ( m_iconPath );
+ TQString m_iconPath = iconload->iconPath ( m_icon, KIcon::Desktop, false );
+ m_iconPixmap = TQPixmap ( m_iconPath );
}
void
-KbfxSpinxToolButton::paintEvent ( QPaintEvent * e )
+KbfxSpinxToolButton::paintEvent ( TQPaintEvent * e )
{
- QRect r = e->rect();
- QPainter p;
- QPixmap buffer ( m_current.size() );
+ TQRect r = e->rect();
+ TQPainter p;
+ TQPixmap buffer ( m_current.size() );
buffer.fill();
p.begin ( this );
- p.setPen ( QColor ( 255,255,255 ) );
- p.drawPixmap ( QRect ( 0, 0, m_current.width(), m_current.height() ), m_current );
+ p.setPen ( TQColor ( 255,255,255 ) );
+ p.drawPixmap ( TQRect ( 0, 0, m_current.width(), m_current.height() ), m_current );
p.end();
}
void
-KbfxSpinxToolButton::mouseReleaseEvent ( QMouseEvent * me )
+KbfxSpinxToolButton::mouseReleaseEvent ( TQMouseEvent * me )
{
me = me;
if ( m_dataSource == 0 )
diff --git a/src/kbfxspinxtoolbutton.h b/src/kbfxspinxtoolbutton.h
index 2c3d9bf..a8a73dd 100644
--- a/src/kbfxspinxtoolbutton.h
+++ b/src/kbfxspinxtoolbutton.h
@@ -22,14 +22,14 @@
#ifndef KBFX_SPINX_TOOL_BUTTON_H
#define KBFX_SPINX_TOOL_BUTTON_H
-#include <qcursor.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
-#include <qwidget.h>
+#include <tqcursor.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
+#include <tqwidget.h>
#include <kiconloader.h>
#include <kimageeffect.h>
@@ -40,30 +40,31 @@
#include <kbfxdatasource.h>
#include <kbfxplasmapixmapprovider.h>
-class KbfxSpinxToolButton:public QLabel
+class KbfxSpinxToolButton:public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
typedef enum{SINGLE=0,EXPANDABLE} ButtonType;
- KbfxSpinxToolButton ( QWidget * parent = 0, const char * name = 0 );
+ KbfxSpinxToolButton ( TQWidget * tqparent = 0, const char * name = 0 );
virtual ~KbfxSpinxToolButton();
- virtual void paintEvent ( QPaintEvent * pe );
+ virtual void paintEvent ( TQPaintEvent * pe );
- virtual void enterEvent ( QEvent * e );
- virtual void leaveEvent ( QEvent * l );
- virtual void mouseReleaseEvent ( QMouseEvent * me );
+ virtual void enterEvent ( TQEvent * e );
+ virtual void leaveEvent ( TQEvent * l );
+ virtual void mouseReleaseEvent ( TQMouseEvent * me );
/*
- virtual void mousePressEvent(QMouseEvent * me);
+ virtual void mousePressEvent(TQMouseEvent * me);
*/
void setDataSource ( KbfxDataSource * src );
// void setDataGroup(KbfxDataGroup * gsrc);
- void setName ( QString name ) {m_name =name;}
- void setExec ( QString cmd ) { m_exe = cmd;}
+ void setName ( TQString name ) {m_name =name;}
+ void setExec ( TQString cmd ) { m_exe = cmd;}
void setType ( KbfxSpinxToolButton::ButtonType type ) { m_type = type;}
- void setIcon ( QString path );
- void setPixmaps ( QPixmap , QPixmap );
+ void setIcon ( TQString path );
+ void setPixmaps ( TQPixmap , TQPixmap );
public slots:
void fade();
@@ -71,23 +72,23 @@ class KbfxSpinxToolButton:public QLabel
signals:
void clicked();
private:
- QString m_name;
- QString m_exe;
- QString m_icon;
- QString m_tooltip;
+ TQString m_name;
+ TQString m_exe;
+ TQString m_icon;
+ TQString m_tooltip;
- QPixmap m_normal;
- QPixmap m_pressed;
- QPixmap m_hover;
- QPixmap m_current;
- QPixmap m_iconPixmap;
+ TQPixmap m_normal;
+ TQPixmap m_pressed;
+ TQPixmap m_hover;
+ TQPixmap m_current;
+ TQPixmap m_iconPixmap;
KbfxDataSource * m_dataSource;
KbfxDataGroup * m_dataGroup;
ButtonType m_type;
bool m_statePressed;
- QTimer * fade_timer;
+ TQTimer * fade_timer;
float m_opacity;
- QPixmap m_fadePix;
+ TQPixmap m_fadePix;
int m_fadeTime;
};
diff --git a/src/kbfxspinxtop.cpp b/src/kbfxspinxtop.cpp
index 617e884..5a4fdf3 100644
--- a/src/kbfxspinxtop.cpp
+++ b/src/kbfxspinxtop.cpp
@@ -21,7 +21,7 @@
#include "kbfxspinxtop.h"
-KbfxSpinxTop::KbfxSpinxTop ( QWidget * parent,const char * name ) :QWidget ( parent,name,Qt::WNoAutoErase | WStaticContents | Qt::WPaintClever | Qt::WNoAutoErase )
+KbfxSpinxTop::KbfxSpinxTop ( TQWidget * tqparent,const char * name ) :TQWidget ( tqparent,name,TQt::WNoAutoErase | WStaticContents | TQt::WPaintClever | TQt::WNoAutoErase )
{
m_background = ( *KbfxPlasmaPixmapProvider::pixmap ( "topbg" ) );
@@ -39,7 +39,7 @@ KbfxSpinxTop::~KbfxSpinxTop()
{}
void
-KbfxSpinxTop::mousePressEvent ( QMouseEvent * e )
+KbfxSpinxTop::mousePressEvent ( TQMouseEvent * e )
{
e = e;
emit sizeChange ( 10 );
@@ -51,23 +51,23 @@ KbfxSpinxTop::createDudeBox()
m_dudeBox = ( *KbfxPlasmaPixmapProvider::pixmap ( "dudebox" ) );
// int padding = ((m_dudeBox.height()-m_faceIcon.height()))/2;
- QPainter p;
+ TQPainter p;
p.begin ( &m_dudeBox );
-// p.drawPixmap(QRect(padding,padding,m_faceIcon.width(),m_faceIcon.height()),m_faceIcon);
- p.drawPixmap ( QRect ( ConfigInit().m_faceIconX,ConfigInit().m_faceIconY,ConfigInit().m_faceIconW,ConfigInit().m_faceIconH ),m_faceIcon );
+// p.drawPixmap(TQRect(padding,padding,m_faceIcon.width(),m_faceIcon.height()),m_faceIcon);
+ p.drawPixmap ( TQRect ( ConfigInit().m_faceIconX,ConfigInit().m_faceIconY,ConfigInit().m_faceIconW,ConfigInit().m_faceIconH ),m_faceIcon );
p.end();
}
-QString
+TQString
KbfxSpinxTop::getUserName ()
{
KUser *user = new KUser ();
- QString logInName ( user->fullName () );
+ TQString logInName ( user->fullName () );
// Nookie says some might find it discriminating... We don't want that.
if ( logInName == "root" )
- logInName = QString ( "Administrator" );
+ logInName = TQString ( "Administrator" );
delete user;
return logInName.upper ();
}
@@ -77,36 +77,36 @@ KbfxSpinxTop::getUserName ()
void
KbfxSpinxTop::loadFaceIcon()
{
- QImage UserImage ( ConfigInit().m_SpinxDudeImage );
+ TQImage UserImage ( ConfigInit().m_SpinxDudeImage );
UserImage = UserImage.smoothScale ( 48, 48 );
- m_faceIcon = QPixmap ( UserImage );
+ m_faceIcon = TQPixmap ( UserImage );
}
void
-KbfxSpinxTop::paintEvent ( QPaintEvent * pe )
+KbfxSpinxTop::paintEvent ( TQPaintEvent * pe )
{
pe = pe;
- QRect * r = new QRect ( 0,0,ConfigInit().m_topBar_w,ConfigInit().m_topBar_h );
+ TQRect * r = new TQRect ( 0,0,ConfigInit().m_topBar_w,ConfigInit().m_topBar_h );
- m_pixmapbuff = new QPixmap();
+ m_pixmapbuff = new TQPixmap();
m_pixmapbuff->resize ( r->size() );
m_pixmapbuff->fill ( this, r->topLeft() );
- QPainter p;
- p.begin ( m_pixmapbuff,this );
+ TQPainter p;
+ p.tqbegin ( m_pixmapbuff,this );
// Draw commands are here
p.drawPixmap ( *r,m_background );
- p.setPen ( QColor ( ConfigInit().m_userNameColor ) );
+ p.setPen ( TQColor ( ConfigInit().m_userNameColor ) );
- p.drawPixmap ( QRect ( ConfigInit().m_facePos_x,ConfigInit().m_facePos_y,m_dudeBox.width(),m_dudeBox.height() ),m_dudeBox );
+ p.drawPixmap ( TQRect ( ConfigInit().m_facePos_x,ConfigInit().m_facePos_y,m_dudeBox.width(),m_dudeBox.height() ),m_dudeBox );
if ( !ConfigInit().m_faceBoxHideText )
{
- QFont * _font = new QFont(ConfigInit().m_userNameFont);
+ TQFont * _font = new TQFont(ConfigInit().m_userNameFont);
p.setFont ( *_font );
-// p.setPen(QColor(199,187,206));
+// p.setPen(TQColor(199,187,206));
// p.drawText(ConfigInit().m_userNamePos_x+1,ConfigInit().m_userNamePos_y+2,m_userName);
- p.setPen ( QColor ( ConfigInit().m_userNameColor ) );
+ p.setPen ( TQColor ( ConfigInit().m_userNameColor ) );
p.drawText ( ConfigInit().m_userNamePos_x,ConfigInit().m_userNamePos_y,m_userName );
delete _font;
}
diff --git a/src/kbfxspinxtop.h b/src/kbfxspinxtop.h
index b6cf811..cf5460e 100644
--- a/src/kbfxspinxtop.h
+++ b/src/kbfxspinxtop.h
@@ -22,10 +22,10 @@
#ifndef KBFX_SPINX_TOP_H
#define KBFX_SPINX_TOP_H
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qwidget.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqwidget.h>
#include <kiconloader.h>
#include <klineedit.h>
@@ -34,36 +34,37 @@
#include <kbfxconfig.h>
#include <kbfxplasmapixmapprovider.h>
-class KbfxSpinxTop:public QWidget
+class KbfxSpinxTop:public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KbfxSpinxTop ( QWidget * parent = 0,const char * name = 0 );
+ KbfxSpinxTop ( TQWidget * tqparent = 0,const char * name = 0 );
virtual ~KbfxSpinxTop();
- virtual void paintEvent ( QPaintEvent * );
- virtual void mousePressEvent ( QMouseEvent * e ) ;
+ virtual void paintEvent ( TQPaintEvent * );
+ virtual void mousePressEvent ( TQMouseEvent * e ) ;
public slots:
signals:
- void textChanged ( QString );
+ void textChanged ( TQString );
void sizeChange ( int );
private:
void loadFaceIcon();
void createDudeBox();
- QString getUserName();
+ TQString getUserName();
- QPixmap m_background;
- QPixmap * m_pixmapbuff;
- QPixmap m_faceIcon;
- QPixmap m_dudeBox;
- QString m_currentTextBuffer;
- QString m_userName;
- QPixmap m_iconPixmap;
- QTimer * m_fadeTimer;
+ TQPixmap m_background;
+ TQPixmap * m_pixmapbuff;
+ TQPixmap m_faceIcon;
+ TQPixmap m_dudeBox;
+ TQString m_currentTextBuffer;
+ TQString m_userName;
+ TQPixmap m_iconPixmap;
+ TQTimer * m_fadeTimer;
};
diff --git a/src/kbfxspinxview.cpp b/src/kbfxspinxview.cpp
index 65c01bc..5ff5776 100644
--- a/src/kbfxspinxview.cpp
+++ b/src/kbfxspinxview.cpp
@@ -21,7 +21,7 @@
#include "kbfxspinxview.h"
-KbfxSpinxView::KbfxSpinxView ( QWidget * parent , const char * name,WFlags flag ) :QFrame ( parent,name,flag )
+KbfxSpinxView::KbfxSpinxView ( TQWidget * tqparent , const char * name,WFlags flag ) :TQFrame ( tqparent,name,flag )
{
setMinimumWidth ( 300 );
setMinimumHeight ( 365 );
diff --git a/src/kbfxspinxview.h b/src/kbfxspinxview.h
index 42d1cb6..8ca1a7a 100644
--- a/src/kbfxspinxview.h
+++ b/src/kbfxspinxview.h
@@ -22,15 +22,16 @@
#ifndef KBFX_SPINX_VIEW_H
#define KBFX_SPINX_VIEW_H
-#include <qframe.h>
+#include <tqframe.h>
-class KbfxSpinxView:public QFrame
+class KbfxSpinxView:public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- KbfxSpinxView ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+ KbfxSpinxView ( TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0 );
~KbfxSpinxView();
public slots:
diff --git a/src/kbfxtooltip.cpp b/src/kbfxtooltip.cpp
index bce755c..28a4167 100644
--- a/src/kbfxtooltip.cpp
+++ b/src/kbfxtooltip.cpp
@@ -23,51 +23,51 @@
#include "kbfxtooltip.h"
-KbfxToolTip::KbfxToolTip ( QWidget * parent, const char *name, WFlags fl ) :
- QWidget ( parent, name,
+KbfxToolTip::KbfxToolTip ( TQWidget * tqparent, const char *name, WFlags fl ) :
+ TQWidget ( tqparent, name,
fl | WStyle_Customize | WRepaintNoErase | WStyle_NoBorder |
- WDestructiveClose | Qt::WPaintDesktop | Qt::WType_Popup | Qt::
- WPaintClever | Qt::WNoAutoErase | Qt::WResizeNoErase | Qt::
- WStaticContents | Qt::WNoAutoErase )
+ WDestructiveClose | TQt::WPaintDesktop | TQt::WType_Popup | TQt::
+ WPaintClever | TQt::WNoAutoErase | TQt::WResizeNoErase | TQt::
+ WStaticContents | TQt::WNoAutoErase )
{
_animate = ConfigInit ().m_ToolTipAnimation;
m_fontTooltipFont = ConfigInit ().m_fontTooltipFont;
logo = ( KbfxPlasmaPixmapProvider::PixmapPathCheck ( ConfigInit().m_SpinxTooltipLogo ) ) ?
- QImage ( ConfigInit().m_SpinxTooltipLogo )
- : QImage ( ConfigInit().m_SpinxTooltipLogoDefault );
+ TQImage ( ConfigInit().m_SpinxTooltipLogo )
+ : TQImage ( ConfigInit().m_SpinxTooltipLogoDefault );
tooltip_win = ( KbfxPlasmaPixmapProvider::PixmapPathCheck ( ConfigInit ().m_SpinxTooltipWindow ) ) ?
- QImage ( ConfigInit ().m_SpinxTooltipWindow )
- : QImage ( ConfigInit ().m_SpinxTooltipWindowDefault );
+ TQImage ( ConfigInit ().m_SpinxTooltipWindow )
+ : TQImage ( ConfigInit ().m_SpinxTooltipWindowDefault );
- tooltip_mask = ( KbfxPlasmaPixmapProvider::PixmapPathCheck ( ConfigInit().m_SpinxTooltipMask ) ) ?
- QImage ( ConfigInit().m_SpinxTooltipMask )
- : QImage ( ConfigInit().m_SpinxTooltipMaskDefault );
+ tooltip_tqmask = ( KbfxPlasmaPixmapProvider::PixmapPathCheck ( ConfigInit().m_SpinxTooltipMask ) ) ?
+ TQImage ( ConfigInit().m_SpinxTooltipMask )
+ : TQImage ( ConfigInit().m_SpinxTooltipMaskDefault );
dude_img = ( KbfxPlasmaPixmapProvider::PixmapPathCheck ( ConfigInit ().m_SpinxDudeImage ) ) ?
- QImage ( ConfigInit ().m_SpinxDudeImage )
- : QImage ( ConfigInit ().m_SpinxDudeImageDefault );
+ TQImage ( ConfigInit ().m_SpinxDudeImage )
+ : TQImage ( ConfigInit ().m_SpinxDudeImageDefault );
setUserImage ();
setBoundBox ();
- setBackground ( QPixmap () );
- setWindow ( QPixmap () );
+ setBackground ( TQPixmap () );
+ setWindow ( TQPixmap () );
KbfxPlasmaPixmapProvider::PixmapPathCheck ( ConfigInit ().m_ToolTipAvatar ) ?
setAnimationImage ( ConfigInit ().m_ToolTipAvatar )
: setAnimationImage ( ConfigInit ().m_ToolTipAvatarDefault );
- _hide_timer = new QTimer ( this );
- _update_timer = new QTimer ( this );
- _move_timer = new QTimer ( this );
+ _hide_timer = new TQTimer ( this );
+ _update_timer = new TQTimer ( this );
+ _move_timer = new TQTimer ( this );
- connect ( _hide_timer, SIGNAL ( timeout () ), this, SLOT ( hide () ) );
- connect ( _hide_timer, SIGNAL ( timeout () ), _agent, SLOT ( hide () ) );
- connect ( _update_timer, SIGNAL ( timeout () ), this, SLOT ( logoMove () ) );
+ connect ( _hide_timer, TQT_SIGNAL ( timeout () ), this, TQT_SLOT ( hide () ) );
+ connect ( _hide_timer, TQT_SIGNAL ( timeout () ), _agent, TQT_SLOT ( hide () ) );
+ connect ( _update_timer, TQT_SIGNAL ( timeout () ), this, TQT_SLOT ( logoMove () ) );
- QCursor kbfxCursor;
+ TQCursor kbfxCursor;
kbfxCursor.setShape ( Qt::PointingHandCursor );
- this->setCursor ( ( const QCursor ) kbfxCursor );
+ this->setCursor ( ( const TQCursor ) kbfxCursor );
}
KbfxToolTip::~KbfxToolTip ()
@@ -81,19 +81,21 @@ KbfxToolTip::~KbfxToolTip ()
}
void
-KbfxToolTip::setWindow ( QPixmap win )
+KbfxToolTip::setWindow ( TQPixmap win )
{
- QImage m_win_img;
+ TQImage m_win_img;
( win.isNull () ) ?
m_win_img = tooltip_win
: m_win_img = win.convertToImage ();
m_win_img = m_win_img.smoothScale ( _bg.width (), 13 );
-// _window = new QLabel (this, "", Qt::WStaticContents | Qt::WNoAutoErase);
- _window = new QLabel ( this, "" );
+// _window = new TQLabel (this, "", TQt::WStaticContents | TQt::WNoAutoErase);
+ _window = new TQLabel ( this, "" );
_window->resize ( _bg.width (), 13 );
- _window->setBackgroundPixmap ( m_win_img );
+ TQPixmap pm;
+ pm.convertFromImage(m_win_img);
+ _window->setBackgroundPixmap ( pm );
if ( _animate )
_window->show ();
else
@@ -101,22 +103,22 @@ KbfxToolTip::setWindow ( QPixmap win )
}
void
-KbfxToolTip::setAnimationImage ( QString path )
+KbfxToolTip::setAnimationImage ( TQString path )
{
/*
- _agent = new QLabel (this, "",
- Qt::WStaticContents |
- Qt::WNoAutoErase | Qt::WPaintDesktop);
+ _agent = new TQLabel (this, "",
+ TQt::WStaticContents |
+ TQt::WNoAutoErase | TQt::WPaintDesktop);
*/
- _agent = new QLabel ( this,"" );
+ _agent = new TQLabel ( this,"" );
_agent->resize ( 100, 100 );
- _agent_anim = new QMovie ( path );
- QPixmap agent_mask = _agent_anim->framePixmap ();
- _agent->setBackgroundPixmap ( agent_mask );
- if ( agent_mask.mask () )
- _agent->setMask ( *agent_mask.mask () );
- _agent->repaint ();
+ _agent_anim = new TQMovie ( path );
+ TQPixmap agent_tqmask = _agent_anim->framePixmap ();
+ _agent->setBackgroundPixmap ( agent_tqmask );
+ if ( agent_tqmask.tqmask () )
+ _agent->setMask ( *agent_tqmask.tqmask () );
+ _agent->tqrepaint ();
/*FIXME:Need to remove Hard Coded Values */
_agent->move ( 200, 0 );
@@ -129,25 +131,27 @@ KbfxToolTip::setAnimationImage ( QString path )
void
-KbfxToolTip::setBackground ( QPixmap bg )
+KbfxToolTip::setBackground ( TQPixmap bg )
{
( bg.isNull () ) ?
- _bg = tooltip_mask
+ _bg = tooltip_tqmask
: _bg = bg.convertToImage ();
/* animation check : Auto streatch */
if ( _animate )
{
- QImage m_tmp = _bg;
+ TQImage m_tmp = _bg;
_bg = m_tmp.smoothScale ( _bg.width () + 100, _bg.height () );
}
- this->setBackgroundPixmap ( _bg );
+ TQPixmap pm;
+ pm.convertFromImage(_bg);
+ this->setBackgroundPixmap ( pm );
- QPixmap m_tmp ( _bg );
- if ( m_tmp.mask () )
- this->setMask ( ( *m_tmp.mask () ) );
+ TQPixmap m_tmp ( _bg );
+ if ( m_tmp.tqmask () )
+ this->setMask ( ( *m_tmp.tqmask () ) );
this->resize ( _bg.width (), _bg.height () );
_maxW = _bg.width ();
}
@@ -172,31 +176,31 @@ KbfxToolTip::setStartPos ( int _x_, int _y_ )
void
KbfxToolTip::logoMove ()
{
- QPainter p;
+ TQPainter p;
if ( _logo_move_x < _bg.width () - 68 )
{
_logo_move_x += 1;
- _window->repaint ();
+ _window->tqrepaint ();
p.begin ( _window );
- p.drawPixmap ( QRect ( _logo_move_x, 0, logo.width (), logo.height () ),
- QPixmap ( logo ) );
+ p.drawPixmap ( TQRect ( _logo_move_x, 0, logo.width (), logo.height () ),
+ TQPixmap ( logo ) );
p.end ();
}
else
{
p.begin ( _window );
- p.drawPixmap ( QRect ( _bg.width () - 68, 0, logo.width (), logo.height () ),
- QPixmap ( logo ) );
+ p.drawPixmap ( TQRect ( _bg.width () - 68, 0, logo.width (), logo.height () ),
+ TQPixmap ( logo ) );
p.end ();
}
- QPixmap agent_mask = _agent_anim->framePixmap ();
- _agent->setBackgroundPixmap ( agent_mask );
- if ( agent_mask.mask () )
- _agent->setMask ( *agent_mask.mask () );
- _agent->repaint ();
+ TQPixmap agent_tqmask = _agent_anim->framePixmap ();
+ _agent->setBackgroundPixmap ( agent_tqmask );
+ if ( agent_tqmask.tqmask () )
+ _agent->setMask ( *agent_tqmask.tqmask () );
+ _agent->tqrepaint ();
}
void
@@ -207,19 +211,19 @@ KbfxToolTip::setAnimated ( bool b )
void
-KbfxToolTip::setLabelText ( QString str )
+KbfxToolTip::setLabelText ( TQString str )
{
_label_text = str;
}
void
-KbfxToolTip::setHeadingText ( QString str )
+KbfxToolTip::setHeadingText ( TQString str )
{
_heading_text = str;
}
void
-KbfxToolTip::setVersionText ( QString str )
+KbfxToolTip::setVersionText ( TQString str )
{
_version_text = str;
}
@@ -239,34 +243,34 @@ KbfxToolTip::hideToolTip ()
void
KbfxToolTip::setUserImage ()
{
- QImage userimage = dude_img;
+ TQImage userimage = dude_img;
userimage = userimage.smoothScale ( 48, 48 );
- _dude = QPixmap ( userimage );
+ _dude = TQPixmap ( userimage );
}
void
KbfxToolTip::setBoundBox ()
{
_dude_box = ( KbfxPlasmaPixmapProvider::PixmapPathCheck ( ConfigInit ().m_SpinxTooltipDudebox ) ) ?
- QPixmap ( ConfigInit ().m_SpinxTooltipDudebox )
- : QPixmap ( ConfigInit ().m_SpinxTooltipDudeboxDefault );
+ TQPixmap ( ConfigInit ().m_SpinxTooltipDudebox )
+ : TQPixmap ( ConfigInit ().m_SpinxTooltipDudeboxDefault );
}
void
-KbfxToolTip::paintEvent ( QPaintEvent * pe )
+KbfxToolTip::paintEvent ( TQPaintEvent * pe )
{
- const QRect r = pe->rect ();
- QFont *let = new QFont (m_fontTooltipFont);
+ const TQRect r = pe->rect ();
+ TQFont *let = new TQFont (m_fontTooltipFont);
- QPainter p;
+ TQPainter p;
p.begin ( this );
p.setBackgroundMode ( Qt::TransparentMode );
- p.drawPixmap ( QRect ( 7, 16, _dude_box.width (), _dude_box.height () ),
+ p.drawPixmap ( TQRect ( 7, 16, _dude_box.width (), _dude_box.height () ),
_dude_box );
int _paddingX = ( ( _dude_box.height () - _dude.height () ) / 2 ) + 16;
- p.drawPixmap ( QRect
+ p.drawPixmap ( TQRect
( _paddingX - ( 55 - 48 ), _paddingX, _dude.width (),
_dude.height () ), _dude );
@@ -275,22 +279,22 @@ KbfxToolTip::paintEvent ( QPaintEvent * pe )
else
{
- p.drawPixmap ( QRect ( 126, 0, logo.width (), logo.height () ),
- QPixmap ( QImage (ConfigInit ().m_SpinxTooltipLogo ) ) );
+ p.drawPixmap ( TQRect ( 126, 0, logo.width (), logo.height () ),
+ TQPixmap ( TQImage (ConfigInit ().m_SpinxTooltipLogo ) ) );
}
let->setBold ( TRUE );
let->setPointSize ( 10 );
p.setFont ( *let );
- p.setPen ( QColor ( 61, 94, 129 ) );
- p.drawText ( _dude_box.width () + 15, 30, "KBFX" );
+ p.setPen ( TQColor ( 61, 94, 129 ) );
+ p.drawText ( _dude_box.width () + 15, 30, TQString("KBFX") );
- p.setPen ( QColor ( 0, 0, 0 ) );
+ p.setPen ( TQColor ( 0, 0, 0 ) );
let->setBold ( FALSE );
let->setPointSize ( 8 );
p.setFont ( *let );
p.drawText ( ( _animate ) ? _dude_box.width () + 50 : _dude_box.width () + 4,
- _dude_box.height () + 30, QString ( "Version " ).append ( APPLICATION_VERSION ) );
+ _dude_box.height () + 30, TQString ( "Version " ).append ( APPLICATION_VERSION ) );
p.setPen ( ConfigInit ().m_fontTooltipColor );
let->setBold ( TRUE );
diff --git a/src/kbfxtooltip.h b/src/kbfxtooltip.h
index b358f5a..0bdd00c 100644
--- a/src/kbfxtooltip.h
+++ b/src/kbfxtooltip.h
@@ -22,14 +22,14 @@
#ifndef KBFX_TOOL_TIP
#define KBFX_TOOL_TIP
-#include <qcursor.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qmovie.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqcursor.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqmovie.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -42,18 +42,19 @@
#include <kbfxplasmapixmapprovider.h>
-class KbfxToolTip:public QWidget
+class KbfxToolTip:public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KbfxToolTip ( QWidget * parent=0,const char * name=0,WFlags fl=WType_TopLevel );
+ KbfxToolTip ( TQWidget * tqparent=0,const char * name=0,WFlags fl=WType_TopLevel );
~KbfxToolTip();
void setStartPos ( int x=0, int y=0 );
- virtual void paintEvent ( QPaintEvent *pe );
- void setBackground ( QPixmap bg );
- void setAnimationImage ( QString path );
- void setWindow ( QPixmap win );
+ virtual void paintEvent ( TQPaintEvent *pe );
+ void setBackground ( TQPixmap bg );
+ void setAnimationImage ( TQString path );
+ void setWindow ( TQPixmap win );
public slots:
void hideToolTip();
@@ -61,33 +62,33 @@ class KbfxToolTip:public QWidget
void setUserImage();
void setBoundBox();
void setAnimated ( bool );
- void setLabelText ( QString );
- void setHeadingText ( QString );
- void setVersionText ( QString );
+ void setLabelText ( TQString );
+ void setHeadingText ( TQString );
+ void setVersionText ( TQString );
private:
- QTimer * _hide_timer;
- QTimer * _move_timer;
- QTimer * _update_timer;
+ TQTimer * _hide_timer;
+ TQTimer * _move_timer;
+ TQTimer * _update_timer;
int _x,_y;
int _maxW;
int _width;
int _height;
int _logo_move_x;
- QPixmap _dude;
- QPixmap _dude_box;
- QImage _bg;
- QLabel * _window;
- QLabel * _agent;
- QMovie * _agent_anim;
+ TQPixmap _dude;
+ TQPixmap _dude_box;
+ TQImage _bg;
+ TQLabel * _window;
+ TQLabel * _agent;
+ TQMovie * _agent_anim;
bool _animate;
- QString _label_text;
- QString _heading_text;
- QString _version_text;
- QFont m_fontTooltipFont;
- QImage logo;
- QImage tooltip_win;
- QImage tooltip_mask;
- QImage dude_img;
+ TQString _label_text;
+ TQString _heading_text;
+ TQString _version_text;
+ TQFont m_fontTooltipFont;
+ TQImage logo;
+ TQImage tooltip_win;
+ TQImage tooltip_tqmask;
+ TQImage dude_img;
};
#endif