diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/libkopete | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/libkopete')
176 files changed, 3808 insertions, 3808 deletions
diff --git a/kopete/libkopete/avdevice/kxv.cpp b/kopete/libkopete/avdevice/kxv.cpp index 942a823b..f573bd50 100644 --- a/kopete/libkopete/avdevice/kxv.cpp +++ b/kopete/libkopete/avdevice/kxv.cpp @@ -21,8 +21,8 @@ #include <assert.h> -#include <qwindowdefs.h> -#include <qwidget.h> +#include <tqwindowdefs.h> +#include <tqwidget.h> #include <kdebug.h> @@ -177,7 +177,7 @@ bool KXv::init(Drawable d) #endif } -bool KXvDevice::grabStill(QImage* /*pix*/, int /*dw*/, int /*dh*/) +bool KXvDevice::grabStill(TQImage* /*pix*/, int /*dw*/, int /*dh*/) { #ifndef HAVE_LIBXV return false; @@ -186,14 +186,14 @@ bool KXvDevice::grabStill(QImage* /*pix*/, int /*dw*/, int /*dh*/) #endif } -int KXvDevice::displayImage(QWidget *widget, const unsigned char *const data, int w, int h, int dw, int dh) +int KXvDevice::displayImage(TQWidget *widget, const unsigned char *const data, int w, int h, int dw, int dh) { if (!widget) return -1; return displayImage(widget->winId(), data, w, h, 0, 0, w, h, dw, dh); } -int KXvDevice::displayImage(QWidget *widget, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh) +int KXvDevice::displayImage(TQWidget *widget, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh) { if (!widget) return -1; @@ -255,7 +255,7 @@ int KXvDevice::displayImage(Window win, const unsigned char *const data, int w, } -bool KXvDevice::startVideo(QWidget *w, int dw, int dh) +bool KXvDevice::startVideo(TQWidget *w, int dw, int dh) { if (!w) return false; return startVideo(w->winId(), dw, dh); @@ -338,7 +338,7 @@ KXvDevice::KXvDevice() xv_attr = NULL; xv_port = -1; xv_encoding = -1; - xv_name = QString::null; + xv_name = TQString::null; xv_type = -1; xv_adaptor = -1; _shm = false; @@ -443,7 +443,7 @@ bool KXvDevice::init() kdDebug() << "Image formats for port " << xv_port << endl; for (int i = 0; i < xv_formats; i++) { assert(fo); - QString imout; + TQString imout; imout.sprintf(" 0x%x (%c%c%c%c) %s", fo[i].id, fo[i].id & 0xff, @@ -463,7 +463,7 @@ bool KXvDevice::init() } -bool KXvDevice::supportsWidget(QWidget *w) +bool KXvDevice::supportsWidget(TQWidget *w) { #ifndef HAVE_LIBXV return false; @@ -509,7 +509,7 @@ const KXvDeviceAttributes& KXvDevice::attributes() } -bool KXvDevice::getAttributeRange(const QString& attribute, int *min, int *max) +bool KXvDevice::getAttributeRange(const TQString& attribute, int *min, int *max) { for (KXvDeviceAttribute *at = _attrs.first(); at != NULL; at = _attrs.next()) { if (at->name == attribute) { @@ -522,7 +522,7 @@ bool KXvDevice::getAttributeRange(const QString& attribute, int *min, int *max) } -bool KXvDevice::getAttribute(const QString& attribute, int *val) +bool KXvDevice::getAttribute(const TQString& attribute, int *val) { #ifndef HAVE_LIBXV return false; @@ -539,7 +539,7 @@ bool KXvDevice::getAttribute(const QString& attribute, int *val) } -bool KXvDevice::setAttribute(const QString& attribute, int val) +bool KXvDevice::setAttribute(const TQString& attribute, int val) { #ifndef HAVE_LIBXV return false; @@ -556,7 +556,7 @@ bool KXvDevice::setAttribute(const QString& attribute, int val) } -const QString& KXvDevice::name() const +const TQString& KXvDevice::name() const { return xv_name; } @@ -567,12 +567,12 @@ int KXvDevice::port() const return xv_port; } -const QStringList& KXvDevice::encodings() const +const TQStringList& KXvDevice::encodings() const { return _encodingList; } -bool KXvDevice::encoding(QString& encoding) +bool KXvDevice::encoding(TQString& encoding) { #ifndef HAVE_LIBXV return false; @@ -591,7 +591,7 @@ bool KXvDevice::encoding(QString& encoding) #endif } -bool KXvDevice::setEncoding(const QString& e) +bool KXvDevice::setEncoding(const TQString& e) { #ifdef HAVE_LIBXV for (unsigned int i = 0; i < xv_encodings; i++) { diff --git a/kopete/libkopete/avdevice/kxv.h b/kopete/libkopete/avdevice/kxv.h index 6f7602bf..8b3e14dd 100644 --- a/kopete/libkopete/avdevice/kxv.h +++ b/kopete/libkopete/avdevice/kxv.h @@ -24,9 +24,9 @@ #include <X11/X.h> #include <X11/Xlib.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqptrlist.h> class QWidget; class QImage; @@ -35,7 +35,7 @@ class KXvPrivate; class KXvDevice; class KXvDevicePrivate; -typedef QPtrList<KXvDevice> KXvDeviceList; +typedef TQPtrList<KXvDevice> KXvDeviceList; class KXv @@ -81,7 +81,7 @@ private: class KXvDeviceAttribute { public: - QString name; + TQString name; int min; int max; int flags; @@ -89,7 +89,7 @@ public: Atom atom(); }; -typedef QPtrList<KXvDeviceAttribute> KXvDeviceAttributes; +typedef TQPtrList<KXvDeviceAttribute> KXvDeviceAttributes; class KXvDevice @@ -108,41 +108,41 @@ public: /* * return the range for a given attribute */ - bool getAttributeRange(const QString& attribute, int *min, int *max); + bool getAttributeRange(const TQString& attribute, int *min, int *max); /* * get the current value of a given attribute */ - bool getAttribute(const QString& attribute, int *val); + bool getAttribute(const TQString& attribute, int *val); /* * set the current value of a given attribute */ - bool setAttribute(const QString& attribute, int val); + bool setAttribute(const TQString& attribute, int val); - bool grabStill(QImage *pix, int dw, int dh); + bool grabStill(TQImage *pix, int dw, int dh); /* * True if this device can operate on the given widget */ - bool supportsWidget(QWidget *w); + bool supportsWidget(TQWidget *w); /* * Display the given image with Xv. */ - int displayImage(QWidget *widget, const unsigned char *const data, int w, int h, int dw, int dh); + int displayImage(TQWidget *widget, const unsigned char *const data, int w, int h, int dw, int dh); int displayImage(Window win, const unsigned char *const data, int w, int h, int dw, int dh); /* * Display a portion of the given image with Xv. */ - int displayImage(QWidget *widget, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh); + int displayImage(TQWidget *widget, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh); int displayImage(Window win, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh); /* * Start a video stream in widget w, width dw, height dh */ - bool startVideo(QWidget *w, int dw, int dh); + bool startVideo(TQWidget *w, int dw, int dh); bool startVideo(Window w, int dw, int dh); /* @@ -168,7 +168,7 @@ public: /* * Name of the device */ - const QString& name() const; + const TQString& name() const; /* * The Xv port for this device @@ -178,17 +178,17 @@ public: /* * The list of encodings/norms available */ - const QStringList& encodings() const; + const TQStringList& encodings() const; /* * get encoding */ - bool encoding(QString& encoding); + bool encoding(TQString& encoding); /* * Set the encoding to the given one. This should be taken from the list. */ - bool setEncoding(const QString& e); + bool setEncoding(const TQString& e); /* * Set the image format. (ex YUV) @@ -218,7 +218,7 @@ protected: KXvDeviceAttributes _attrs; int xv_type, xv_adaptor; - QString xv_name; + TQString xv_name; int xv_port; unsigned int xv_encodings; int xv_encoding; @@ -228,7 +228,7 @@ protected: GC xv_gc; Window xv_last_win; - QStringList _encodingList; + TQStringList _encodingList; int xv_formats; void *xv_formatvalues; diff --git a/kopete/libkopete/avdevice/qvideo.cpp b/kopete/libkopete/avdevice/qvideo.cpp index 8d153e58..d8d91602 100644 --- a/kopete/libkopete/avdevice/qvideo.cpp +++ b/kopete/libkopete/avdevice/qvideo.cpp @@ -27,7 +27,7 @@ #include "qvideo.h" #include <kdebug.h> -#include <qpaintdevice.h> +#include <tqpaintdevice.h> #include <X11/Xlib.h> #include <X11/Xutil.h> @@ -71,7 +71,7 @@ bool QVideo::findDisplayProperties(ImageFormat& fmt, int& depth, unsigned int& b int bpp = 0; int d = 0; - vi_out.screen = QPaintDevice::x11AppScreen(); + vi_out.screen = TQPaintDevice::x11AppScreen(); vi_in = XGetVisualInfo(qt_xdisplay(), mask, &vi_out, &nvis); if (vi_in) { diff --git a/kopete/libkopete/avdevice/qvideostream.cpp b/kopete/libkopete/avdevice/qvideostream.cpp index 18773946..05bbf209 100644 --- a/kopete/libkopete/avdevice/qvideostream.cpp +++ b/kopete/libkopete/avdevice/qvideostream.cpp @@ -20,9 +20,9 @@ */ #include "qvideostream.h" -#include <qevent.h> -#include <qimage.h> -#include <qtimer.h> +#include <tqevent.h> +#include <tqimage.h> +#include <tqtimer.h> #include <kdebug.h> #include "kxv.h" @@ -43,30 +43,30 @@ extern "C" { class QVideoStreamGLWidget : public QGLWidget { public: - QVideoStreamGLWidget(QWidget* parent = 0, const char* name = 0); + QVideoStreamGLWidget(TQWidget* parent = 0, const char* name = 0); virtual ~QVideoStreamGLWidget(); - void setInputSize(const QSize& sz); + void setInputSize(const TQSize& sz); void display(const unsigned char *const img, int x, int y, int sw, int sh); private: virtual void resizeGL(int w, int h); void initializeGL(); - virtual bool eventFilter( QObject *o, QEvent *e ); - void calc(QPoint& p, QPoint& v); + virtual bool eventFilter( TQObject *o, TQEvent *e ); + void calc(TQPoint& p, TQPoint& v); - QSize _inputSize; + TQSize _inputSize; GLuint _tex; int _tw, _th; - QWidget* _w; + TQWidget* _w; int _maxGL; - QSize _sz; + TQSize _sz; bool _glfun; - QPoint _ul, _ur, _ll, _lr; - QPoint _vul, _vur, _vll, _vlr; - QTimer* _glfunTimer; + TQPoint _ul, _ur, _ll, _lr; + TQPoint _vul, _vur, _vll, _vlr; + TQTimer* _glfunTimer; }; #endif @@ -98,8 +98,8 @@ QVideoStreamPrivate::~QVideoStreamPrivate() delete xvHandle; } -QVideoStream::QVideoStream(QWidget *widget, const char* name) - : QObject(widget, name), +QVideoStream::QVideoStream(TQWidget *widget, const char* name) + : TQObject(widget, name), d(new QVideoStreamPrivate), _w(widget), _methods(METHOD_NONE), @@ -127,7 +127,7 @@ QVideoStream::QVideoStream(QWidget *widget, const char* name) } #ifdef HAVE_GL - if (QGLFormat::hasOpenGL()) { + if (TQGLFormat::hasOpenGL()) { _methods = (VideoMethod)(_methods | METHOD_GL); } #endif @@ -309,7 +309,7 @@ QVideo::VideoMethod QVideoStream::setMethod(VideoMethod method) return _method; } -QSize QVideoStream::maxSize() const +TQSize QVideoStream::maxSize() const { return _size; } @@ -324,7 +324,7 @@ int QVideoStream::maxHeight() const return _size.height(); } -QSize QVideoStream::size() const +TQSize QVideoStream::size() const { return _size; } @@ -339,7 +339,7 @@ int QVideoStream::height() const return _size.height(); } -QSize QVideoStream::setSize(const QSize& sz) +TQSize QVideoStream::setSize(const TQSize& sz) { _size = sz; return _size; @@ -365,7 +365,7 @@ int QVideoStream::setHeight(int height) return _size.height(); } -QSize QVideoStream::inputSize() const +TQSize QVideoStream::inputSize() const { return _inputSize; } @@ -380,7 +380,7 @@ int QVideoStream::inputHeight() const return _inputSize.height(); } -QSize QVideoStream::setInputSize(const QSize& sz) +TQSize QVideoStream::setInputSize(const TQSize& sz) { if (sz == _inputSize) return _inputSize; @@ -532,19 +532,19 @@ QVideoStream& QVideoStream::operator<<(const unsigned char *const img) // --------------------------------------------------------------------------------------- #ifdef HAVE_GL -QVideoStreamGLWidget::QVideoStreamGLWidget(QWidget* parent, const char* name) - : QGLWidget(QGLFormat(QGL::DoubleBuffer | QGL::Rgba | QGL::DirectRendering), parent, name), +QVideoStreamGLWidget::QVideoStreamGLWidget(TQWidget* parent, const char* name) + : TQGLWidget(TQGLFormat(TQGL::DoubleBuffer | TQGL::Rgba | TQGL::DirectRendering), parent, name), _tex(0), _w(parent), _glfun(false) { kdDebug() << "QVideoStreamGLWidget::QVideoStreamGLWidget()" << endl; - connect(_w, SIGNAL(resized(int, int)), - this, SLOT(resize(int, int))); + connect(_w, TQT_SIGNAL(resized(int, int)), + this, TQT_SLOT(resize(int, int))); topLevelWidget()->installEventFilter(this); - _glfunTimer = new QTimer(); + _glfunTimer = new TQTimer(); } QVideoStreamGLWidget::~QVideoStreamGLWidget() @@ -558,12 +558,12 @@ QVideoStreamGLWidget::~QVideoStreamGLWidget() } } -bool QVideoStreamGLWidget::eventFilter(QObject*, QEvent* e) +bool QVideoStreamGLWidget::eventFilter(TQObject*, TQEvent* e) { - // For some reason, KeyPress does not work (yields 2), QEvent::KeyPress is unknown... What the f...???? + // For some reason, KeyPress does not work (yields 2), TQEvent::KeyPress is unknown... What the f...???? // I am too lazy to scan the header files for the reason. if(e->type() == 6) { - QKeyEvent* ke = static_cast<QKeyEvent*>(e); + TQKeyEvent* ke = static_cast<TQKeyEvent*>(e); if(ke->key() == Qt::Key_Pause) { _glfunTimer->start(500, true); } else if (_glfunTimer->isActive() && (ke->key() == Qt::Key_Escape)) { @@ -578,7 +578,7 @@ void QVideoStreamGLWidget::initializeGL() kdDebug() << "QVideoStreamGLWidget::initializeGL()" << endl; setAutoBufferSwap(false); - QGLFormat f = format(); + TQGLFormat f = format(); glGetIntegerv(GL_MAX_TEXTURE_SIZE, &_maxGL); kdDebug() << "OpenGL capabilities (* = required):" << endl; kdDebug() << " Valid context*: " << isValid() << endl; @@ -598,15 +598,15 @@ void QVideoStreamGLWidget::initializeGL() glShadeModel(GL_FLAT); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - _vul = QPoint( 4, 10); - _vur = QPoint(-8, 4); - _vll = QPoint(10, -4); - _vlr = QPoint(-8, -10); + _vul = TQPoint( 4, 10); + _vur = TQPoint(-8, 4); + _vll = TQPoint(10, -4); + _vlr = TQPoint(-8, -10); } void QVideoStreamGLWidget::resizeGL(int w, int h) { - _sz = QSize(w, h); + _sz = TQSize(w, h); glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); @@ -615,13 +615,13 @@ void QVideoStreamGLWidget::resizeGL(int w, int h) glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - _ul = QPoint(0, 0); - _ur = QPoint(w, 0); - _ll = QPoint(0, h); - _lr = QPoint(w, h); + _ul = TQPoint(0, 0); + _ur = TQPoint(w, 0); + _ll = TQPoint(0, h); + _lr = TQPoint(w, h); } -void QVideoStreamGLWidget::setInputSize(const QSize& sz) +void QVideoStreamGLWidget::setInputSize(const TQSize& sz) { makeCurrent(); @@ -705,7 +705,7 @@ void QVideoStreamGLWidget::display(const unsigned char *const img, int x, int y, glDisable(GL_TEXTURE_2D); } -void QVideoStreamGLWidget::calc(QPoint& p, QPoint& v) +void QVideoStreamGLWidget::calc(TQPoint& p, TQPoint& v) { p += v; diff --git a/kopete/libkopete/avdevice/qvideostream.h b/kopete/libkopete/avdevice/qvideostream.h index f1b0ca24..24b7fb40 100644 --- a/kopete/libkopete/avdevice/qvideostream.h +++ b/kopete/libkopete/avdevice/qvideostream.h @@ -29,11 +29,11 @@ #endif #ifdef HAVE_GL -#include <qgl.h> +#include <tqgl.h> #include <GL/gl.h> #endif -#include <qwidget.h> +#include <tqwidget.h> #include "qvideo.h" class QVideoStreamPrivate; @@ -41,12 +41,12 @@ class QVideoStreamPrivate; /** * QT-style video stream driver. */ -class QVideoStream : public QObject, public QVideo +class QVideoStream : public TQObject, public QVideo { Q_OBJECT public: - QVideoStream(QWidget *widget, const char* name = 0); + QVideoStream(TQWidget *widget, const char* name = 0); ~QVideoStream(); /* output method */ @@ -55,25 +55,25 @@ public: VideoMethod setMethod(VideoMethod method); /* max output sizes */ - QSize maxSize() const; + TQSize maxSize() const; int maxWidth() const; int maxHeight() const; /* output sizes */ - QSize size() const; + TQSize size() const; int width() const; int height() const; - QSize setSize(const QSize& sz); + TQSize setSize(const TQSize& sz); int setWidth(int width); int setHeight(int height); /* input sizes */ - QSize inputSize() const; + TQSize inputSize() const; int inputWidth() const; int inputHeight() const; - QSize setInputSize(const QSize& sz); + TQSize setInputSize(const TQSize& sz); int setInputWidth(int width); int setInputHeight(int height); @@ -95,12 +95,12 @@ public slots: private: QVideoStreamPrivate* d; - QWidget* _w; + TQWidget* _w; VideoMethod _methods; // list of methods VideoMethod _method; // the current method ImageFormat _format; - QSize _size; - QSize _inputSize; + TQSize _size; + TQSize _inputSize; bool _init; ImageFormat _xFormat; diff --git a/kopete/libkopete/avdevice/videocontrol.h b/kopete/libkopete/avdevice/videocontrol.h index 2675be6e..c4db3b9d 100644 --- a/kopete/libkopete/avdevice/videocontrol.h +++ b/kopete/libkopete/avdevice/videocontrol.h @@ -30,9 +30,9 @@ #define __s64 long long #endif // __s64 -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> #include "kopete_export.h" namespace Kopete { @@ -67,7 +67,7 @@ public: protected: __u32 m_id; control_type m_type; - QString m_name; + TQString m_name; __s32 m_minimum; __s32 m_maximum; __s32 m_step; diff --git a/kopete/libkopete/avdevice/videodevice.cpp b/kopete/libkopete/avdevice/videodevice.cpp index ada02ae5..00ab8266 100644 --- a/kopete/libkopete/avdevice/videodevice.cpp +++ b/kopete/libkopete/avdevice/videodevice.cpp @@ -71,7 +71,7 @@ void VideoDevice::enumerateMenu (void) { if (0 == xioctl (VIDIOC_QUERYMENU, &querymenu)) { - kdDebug(14010) << k_funcinfo << " " << QString::fromLocal8Bit((const char*)querymenu.name) << endl; + kdDebug(14010) << k_funcinfo << " " << TQString::fromLocal8Bit((const char*)querymenu.name) << endl; } else { @@ -111,9 +111,9 @@ int VideoDevice::errnoReturn(const char* s) } /*! - \fn VideoDevice::setFileName(QString name) + \fn VideoDevice::setFileName(TQString name) */ -int VideoDevice::setFileName(QString filename) +int VideoDevice::setFileName(TQString filename) { /// @todo implement me full_filename=filename; @@ -133,7 +133,7 @@ int VideoDevice::open() kdDebug(14010) << k_funcinfo << "Device is already open" << endl; return EXIT_SUCCESS; } - descriptor = ::open (QFile::encodeName(full_filename), O_RDWR, 0); + descriptor = ::open (TQFile::encodeName(full_filename), O_RDWR, 0); if(isOpen()) { kdDebug(14010) << k_funcinfo << "File " << full_filename << " was opened successfuly" << endl; @@ -200,7 +200,7 @@ int VideoDevice::checkDevice() m_videocapture=true; kdDebug(14010) << k_funcinfo << "checkDevice(): " << full_filename << " is a V4L2 device." << endl; m_driver = VIDEODEV_DRIVER_V4L2; - m_model=QString::fromLocal8Bit((const char*)V4L2_capabilities.card); + m_model=TQString::fromLocal8Bit((const char*)V4L2_capabilities.card); // Detect maximum and minimum resolution supported by the V4L2 device @@ -259,7 +259,7 @@ int VideoDevice::checkDevice() if(inputisok==EXIT_SUCCESS) { VideoInput tempinput; - tempinput.name = QString::fromLocal8Bit((const char*)videoinput.name); + tempinput.name = TQString::fromLocal8Bit((const char*)videoinput.name); tempinput.hastuner = videoinput.type & V4L2_INPUT_TYPE_TUNER; tempinput.m_standards = videoinput.std; m_input.push_back(tempinput); @@ -300,8 +300,8 @@ for (currentid = V4L2_CID_BASE; currentid < V4L2_CID_LASTP1; currentid++) if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) continue; -//kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const char*)queryctrl.name) << endl; -kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const char*)queryctrl.name) << " Values from " << queryctrl.minimum << " to " << queryctrl.maximum << " with steps of " << queryctrl.step << ". Default: " << queryctrl.default_value << endl; +//kdDebug(14010) << k_funcinfo << " Control: " << TQString::fromLocal8Bit((const char*)queryctrl.name) << endl; +kdDebug(14010) << k_funcinfo << " Control: " << TQString::fromLocal8Bit((const char*)queryctrl.name) << " Values from " << queryctrl.minimum << " to " << queryctrl.maximum << " with steps of " << queryctrl.step << ". Default: " << queryctrl.default_value << endl; /* switch (queryctrl.type) { @@ -332,7 +332,7 @@ for (currentid = V4L2_CID_PRIVATE_BASE;; currentid++) if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) continue; -kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const char*)queryctrl.name) << " Values from " << queryctrl.minimum << " to " << queryctrl.maximum << " with steps of " << queryctrl.step << ". Default: " << queryctrl.default_value << endl; +kdDebug(14010) << k_funcinfo << " Control: " << TQString::fromLocal8Bit((const char*)queryctrl.name) << " Values from " << queryctrl.minimum << " to " << queryctrl.maximum << " with steps of " << queryctrl.step << ". Default: " << queryctrl.default_value << endl; if (queryctrl.type == V4L2_CTRL_TYPE_MENU) enumerateMenu (); @@ -376,7 +376,7 @@ kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const c { kdDebug(14010) << k_funcinfo << full_filename << " is a V4L device." << endl; m_driver = VIDEODEV_DRIVER_V4L; - m_model=QString::fromLocal8Bit((const char*)V4L_capabilities.name); + m_model=TQString::fromLocal8Bit((const char*)V4L_capabilities.name); if(V4L_capabilities.type & VID_TYPE_CAPTURE) m_videocapture=true; if(V4L_capabilities.type & VID_TYPE_CHROMAKEY) @@ -405,7 +405,7 @@ kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const c if(inputisok==EXIT_SUCCESS) { VideoInput tempinput; - tempinput.name = QString::fromLocal8Bit((const char*)videoinput.name); + tempinput.name = TQString::fromLocal8Bit((const char*)videoinput.name); tempinput.hastuner=videoinput.flags & VIDEO_VC_TUNER; // TODO: The routine to detect the appropriate video standards for V4L must be placed here m_input.push_back(tempinput); @@ -1190,15 +1190,15 @@ int VideoDevice::getFrame(imagebuffer *imgbuffer) } /*! - \fn Kopete::AV::VideoDevice::getImage(const QImage *qimage) + \fn Kopete::AV::VideoDevice::getImage(const TQImage *qimage) */ -int VideoDevice::getImage(QImage *qimage) +int VideoDevice::getImage(TQImage *qimage) { /// @todo implement me // do NOT delete qimage here, as it is received as a parameter if (qimage->width() != width() || qimage->height() != height()) - qimage->create(width(), height(),32, QImage::IgnoreEndian); + qimage->create(width(), height(),32, TQImage::IgnoreEndian); uchar *bits=qimage->bits(); // kDebug() << "Capturing in " << pixelFormatName(m_currentbuffer.pixelformat); @@ -2106,9 +2106,9 @@ int VideoDevice::pixelFormatDepth(pixel_format pixelformat) return 0; } -QString VideoDevice::pixelFormatName(pixel_format pixelformat) +TQString VideoDevice::pixelFormatName(pixel_format pixelformat) { - QString returnvalue; + TQString returnvalue; returnvalue = "None"; switch(pixelformat) { @@ -2156,9 +2156,9 @@ QString VideoDevice::pixelFormatName(pixel_format pixelformat) return returnvalue; } -QString VideoDevice::pixelFormatName(int pixelformat) +TQString VideoDevice::pixelFormatName(int pixelformat) { - QString returnvalue; + TQString returnvalue; returnvalue = "None"; switch(m_driver) { @@ -2410,9 +2410,9 @@ __u64 VideoDevice::signalStandardCode(signal_standard standard) return STANDARD_NONE; } -QString VideoDevice::signalStandardName(signal_standard standard) +TQString VideoDevice::signalStandardName(signal_standard standard) { - QString returnvalue; + TQString returnvalue; returnvalue = "None"; switch(standard) { @@ -2455,9 +2455,9 @@ QString VideoDevice::signalStandardName(signal_standard standard) return returnvalue; } -QString VideoDevice::signalStandardName(int standard) +TQString VideoDevice::signalStandardName(int standard) { - QString returnvalue; + TQString returnvalue; returnvalue = "None"; switch(m_driver) { diff --git a/kopete/libkopete/avdevice/videodevice.h b/kopete/libkopete/avdevice/videodevice.h index 982ab5f3..2482c183 100644 --- a/kopete/libkopete/avdevice/videodevice.h +++ b/kopete/libkopete/avdevice/videodevice.h @@ -61,10 +61,10 @@ #endif // __linux__ -#include <qstring.h> -#include <qfile.h> -#include <qimage.h> -#include <qvaluevector.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqimage.h> +#include <tqvaluevector.h> #include <kcombobox.h> #include "videoinput.h" @@ -191,7 +191,7 @@ struct imagebuffer int height; int width; pixel_format pixelformat; - QValueVector <uchar> data; // maybe it should be a rawbuffer instead of it? It could make us avoid a memory copy + TQValueVector <uchar> data; // maybe it should be a rawbuffer instead of it? It could make us avoid a memory copy }; struct rawbuffer // raw buffer { @@ -204,7 +204,7 @@ class VideoDevice{ public: VideoDevice(); ~VideoDevice(); - int setFileName(QString filename); + int setFileName(TQString filename); int open(); bool isOpen(); int checkDevice(); @@ -223,13 +223,13 @@ public: int pixelFormatCode(pixel_format pixelformat); pixel_format pixelFormatForPalette( int palette ); int pixelFormatDepth(pixel_format pixelformat); - QString pixelFormatName(pixel_format pixelformat); - QString pixelFormatName(int pixelformat); + TQString pixelFormatName(pixel_format pixelformat); + TQString pixelFormatName(int pixelformat); int detectPixelFormats(); __u64 signalStandardCode(signal_standard standard); - QString signalStandardName(signal_standard standard); - QString signalStandardName(int standard); + TQString signalStandardName(signal_standard standard); + TQString signalStandardName(int standard); int detectSignalStandards(); int currentInput(); @@ -238,7 +238,7 @@ public: int startCapturing(); int getFrame(); int getFrame(imagebuffer *imgbuffer); - int getImage(QImage *qimage); + int getImage(TQImage *qimage); int stopCapturing(); int close(); @@ -268,10 +268,10 @@ public: bool canAsyncIO(); bool canStream(); - QString m_model; - QString m_name; + TQString m_model; + TQString m_name; size_t m_modelindex; // Defines what's the number of a device when more than 1 device of a given model is present; - QString full_filename; + TQString full_filename; videodev_driver m_driver; int descriptor; @@ -292,16 +292,16 @@ void enumerateMenu (void); struct video_capability V4L_capabilities; struct video_buffer V4L_videobuffer; #endif - QValueVector<Kopete::AV::VideoInput> m_input; - QValueVector<Kopete::AV::VideoControl> m_control; -// QFile file; + TQValueVector<Kopete::AV::VideoInput> m_input; + TQValueVector<Kopete::AV::VideoControl> m_control; +// TQFile file; protected: int currentwidth, minwidth, maxwidth, currentheight, minheight, maxheight; bool m_disablemmap; bool m_workaroundbrokendriver; - QValueVector<rawbuffer> m_rawbuffers; + TQValueVector<rawbuffer> m_rawbuffers; unsigned int m_streambuffers; imagebuffer m_currentbuffer; int m_buffer_size; diff --git a/kopete/libkopete/avdevice/videodevicemodelpool.cpp b/kopete/libkopete/avdevice/videodevicemodelpool.cpp index c6fc533e..875d926b 100644 --- a/kopete/libkopete/avdevice/videodevicemodelpool.cpp +++ b/kopete/libkopete/avdevice/videodevicemodelpool.cpp @@ -40,7 +40,7 @@ size_t VideoDeviceModelPool::size() return m_devicemodel.size(); } -size_t VideoDeviceModelPool::addModel( QString newmodel ) +size_t VideoDeviceModelPool::addModel( TQString newmodel ) { VideoDeviceModel newdevicemodel; newdevicemodel.model=newmodel; diff --git a/kopete/libkopete/avdevice/videodevicemodelpool.h b/kopete/libkopete/avdevice/videodevicemodelpool.h index 54d801c4..76499033 100644 --- a/kopete/libkopete/avdevice/videodevicemodelpool.h +++ b/kopete/libkopete/avdevice/videodevicemodelpool.h @@ -18,8 +18,8 @@ #ifndef KOPETE_AVVIDEODEVICEMODELPOOL_H #define KOPETE_AVVIDEODEVICEMODELPOOL_H -#include <qstring.h> -#include <qvaluevector.h> +#include <tqstring.h> +#include <tqvaluevector.h> #include <kdebug.h> #include "kopete_export.h" @@ -34,16 +34,16 @@ class VideoDeviceModelPool{ struct VideoDeviceModel { - QString model; + TQString model; size_t count; }; - QValueVector<VideoDeviceModel> m_devicemodel; + TQValueVector<VideoDeviceModel> m_devicemodel; public: VideoDeviceModelPool(); ~VideoDeviceModelPool(); void clear(); size_t size(); - size_t addModel(QString newmodel); + size_t addModel(TQString newmodel); }; } diff --git a/kopete/libkopete/avdevice/videodevicepool.cpp b/kopete/libkopete/avdevice/videodevicepool.cpp index 2651addb..39f6a7c7 100644 --- a/kopete/libkopete/avdevice/videodevicepool.cpp +++ b/kopete/libkopete/avdevice/videodevicepool.cpp @@ -24,7 +24,7 @@ #include <kdebug.h> #include <klocale.h> -#include <qdir.h> +#include <tqdir.h> #include "videodevice.h" #include "videodevicepool.h" @@ -414,9 +414,9 @@ int VideoDevicePool::getFrame() } /*! - \fn VideoDevicePool::getQImage(QImage *qimage) + \fn VideoDevicePool::getQImage(TQImage *qimage) */ -int VideoDevicePool::getImage(QImage *qimage) +int VideoDevicePool::getImage(TQImage *qimage) { // kdDebug(14010) << k_funcinfo << "VideoDevicePool::getImage() called." << endl; if(m_videodevice.size()) @@ -424,7 +424,7 @@ int VideoDevicePool::getImage(QImage *qimage) else { kdDebug(14010) << k_funcinfo << "VideoDevicePool::getImage() fallback for no device." << endl; - qimage->create(m_buffer.width, m_buffer.height,32, QImage::IgnoreEndian); + qimage->create(m_buffer.width, m_buffer.height,32, TQImage::IgnoreEndian); uchar *bits=qimage->bits(); switch(m_buffer.pixelformat) { @@ -609,9 +609,9 @@ int VideoDevicePool::scanDevices() kdDebug(14010) << k_funcinfo << "called" << endl; #if defined(__linux__) && defined(ENABLE_AV) - QDir videodevice_dir; - const QString videodevice_dir_path=QString::fromLocal8Bit("/dev/v4l/"); - const QString videodevice_dir_filter=QString::fromLocal8Bit("video*"); + TQDir videodevice_dir; + const TQString videodevice_dir_path=TQString::fromLocal8Bit("/dev/v4l/"); + const TQString videodevice_dir_filter=TQString::fromLocal8Bit("video*"); VideoDevice videodevice; m_videodevice.clear(); @@ -619,8 +619,8 @@ int VideoDevicePool::scanDevices() videodevice_dir.setPath(videodevice_dir_path); videodevice_dir.setNameFilter(videodevice_dir_filter); - videodevice_dir.setFilter( QDir::System | QDir::NoSymLinks | QDir::Readable | QDir::Writable ); - videodevice_dir.setSorting( QDir::Name ); + videodevice_dir.setFilter( TQDir::System | TQDir::NoSymLinks | TQDir::Readable | TQDir::Writable ); + videodevice_dir.setSorting( TQDir::Name ); kdDebug(14010) << k_funcinfo << "Looking for devices in " << videodevice_dir_path << endl; const QFileInfoList *list = videodevice_dir.entryInfoList(); @@ -628,15 +628,15 @@ int VideoDevicePool::scanDevices() if (!list) { kdDebug(14010) << k_funcinfo << "Found no suitable devices in " << videodevice_dir_path << endl; - QDir videodevice_dir; - const QString videodevice_dir_path=QString::fromLocal8Bit("/dev/"); - const QString videodevice_dir_filter=QString::fromLocal8Bit("video*"); + TQDir videodevice_dir; + const TQString videodevice_dir_path=TQString::fromLocal8Bit("/dev/"); + const TQString videodevice_dir_filter=TQString::fromLocal8Bit("video*"); VideoDevice videodevice; videodevice_dir.setPath(videodevice_dir_path); videodevice_dir.setNameFilter(videodevice_dir_filter); - videodevice_dir.setFilter( QDir::System | QDir::NoSymLinks | QDir::Readable | QDir::Writable ); - videodevice_dir.setSorting( QDir::Name ); + videodevice_dir.setFilter( TQDir::System | TQDir::NoSymLinks | TQDir::Readable | TQDir::Writable ); + videodevice_dir.setSorting( TQDir::Name ); kdDebug(14010) << k_funcinfo << "Looking for devices in " << videodevice_dir_path << endl; const QFileInfoList *list = videodevice_dir.entryInfoList(); @@ -648,7 +648,7 @@ int VideoDevicePool::scanDevices() } QFileInfoListIterator fileiterator ( *list ); - QFileInfo *fileinfo; + TQFileInfo *fileinfo; kdDebug(14010) << k_funcinfo << "scanning devices in " << videodevice_dir_path << "..." << endl; while ( (fileinfo = fileiterator.current()) != 0 ) @@ -676,7 +676,7 @@ int VideoDevicePool::scanDevices() } QFileInfoListIterator fileiterator ( *list ); - QFileInfo *fileinfo; + TQFileInfo *fileinfo; kdDebug(14010) << k_funcinfo << "scanning devices in " << videodevice_dir_path << "..." << endl; while ( (fileinfo = fileiterator.current()) != 0 ) @@ -760,7 +760,7 @@ void VideoDevicePool::loadConfig() { KConfig *config = KGlobal::config(); config->setGroup("Video Device Settings"); - const QString currentdevice = config->readEntry("Current Device", QString::null); + const TQString currentdevice = config->readEntry("Current Device", TQString::null); kdDebug(14010) << k_funcinfo << "Current device: " << currentdevice << endl; // m_current_device = 0; // Must check this thing because of the fact that multiple loadConfig in other methodas can do bad things. Watch out! @@ -768,28 +768,28 @@ void VideoDevicePool::loadConfig() VideoDeviceVector::iterator vditerator; for( vditerator = m_videodevice.begin(); vditerator != m_videodevice.end(); ++vditerator ) { - const QString modelindex = QString::fromLocal8Bit ( "Model %1 Device %2") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex); + const TQString modelindex = TQString::fromLocal8Bit ( "Model %1 Device %2") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex); if(modelindex == currentdevice) { m_current_device = vditerator - m_videodevice.begin(); // kdDebug(14010) << k_funcinfo << "This place will be used to set " << modelindex << " as the current device ( " << (vditerator - m_videodevice.begin()) << " )." << endl; } - const QString name = config->readEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), (*vditerator).m_model); - const int currentinput = config->readNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), 0); + const TQString name = config->readEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), (*vditerator).m_model); + const int currentinput = config->readNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), 0); kdDebug(14010) << k_funcinfo << "Device name: " << name << endl; kdDebug(14010) << k_funcinfo << "Device current input: " << currentinput << endl; (*vditerator).selectInput(currentinput); for (size_t input = 0 ; input < (*vditerator).m_input.size(); input++) { - const float brightness = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const float contrast = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const float saturation = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const float whiteness = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const float hue = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const bool autobrightnesscontrast = config->readBoolEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); - const bool autocolorcorrection = config->readBoolEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); - const bool imageasmirror = config->readBoolEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 mageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); + const float brightness = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const float contrast = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const float saturation = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const float whiteness = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const float hue = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const bool autobrightnesscontrast = config->readBoolEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); + const bool autocolorcorrection = config->readBoolEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); + const bool imageasmirror = config->readBoolEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 mageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); (*vditerator).setBrightness(brightness); (*vditerator).setContrast(contrast); (*vditerator).setSaturation(saturation); @@ -833,7 +833,7 @@ void VideoDevicePool::saveConfig() } */ // Stores what is the current video device in use - const QString currentdevice = QString::fromLocal8Bit ( "Model %1 Device %2" ) .arg(m_videodevice[m_current_device].m_model) .arg(m_videodevice[m_current_device].m_modelindex); + const TQString currentdevice = TQString::fromLocal8Bit ( "Model %1 Device %2" ) .arg(m_videodevice[m_current_device].m_model) .arg(m_videodevice[m_current_device].m_modelindex); config->writeEntry( "Current Device", currentdevice); VideoDeviceVector::iterator vditerator; @@ -843,8 +843,8 @@ void VideoDevicePool::saveConfig() kdDebug(14010) << "Model:" << (*vditerator).m_model << ":Index:" << (*vditerator).m_modelindex << ":Current input:" << (*vditerator).currentInput() << endl; // Stores current input for the given video device - const QString name = QString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex); - const QString currentinput = QString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex); + const TQString name = TQString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex); + const TQString currentinput = TQString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex); config->writeEntry( name, (*vditerator).m_name); config->writeEntry( currentinput, (*vditerator).currentInput()); @@ -859,14 +859,14 @@ void VideoDevicePool::saveConfig() kdDebug(14010) << "Model:" << (*vditerator).m_model << ":Index:" << (*vditerator).m_modelindex << ":Input:" << input << ":Automatic color correction : " << (*vditerator).m_input[input].getAutoColorCorrection() << endl; // Stores configuration about each channel - const QString brightness = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString contrast = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString saturation = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString whiteness = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString hue = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString autobrightnesscontrast = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString autocolorcorrection = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString imageasmirror = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 ImageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString brightness = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString contrast = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString saturation = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString whiteness = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString hue = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString autobrightnesscontrast = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString autocolorcorrection = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString imageasmirror = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 ImageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); config->writeEntry( brightness, (*vditerator).m_input[input].getBrightness()); config->writeEntry( contrast, (*vditerator).m_input[input].getContrast()); config->writeEntry( saturation, (*vditerator).m_input[input].getSaturation()); diff --git a/kopete/libkopete/avdevice/videodevicepool.h b/kopete/libkopete/avdevice/videodevicepool.h index 1fbdb3e1..75ed9ed4 100644 --- a/kopete/libkopete/avdevice/videodevicepool.h +++ b/kopete/libkopete/avdevice/videodevicepool.h @@ -18,16 +18,16 @@ #ifndef KOPETE_AVVIDEODEVICE_H #define KOPETE_AVVIDEODEVICE_H -#include <qvaluevector.h> +#include <tqvaluevector.h> #include <iostream> #include "videoinput.h" #include "videodevicemodelpool.h" -#include <qstring.h> -#include <qimage.h> -#include <qvaluevector.h> -#include <qmutex.h> +#include <tqstring.h> +#include <tqimage.h> +#include <tqvaluevector.h> +#include <tqmutex.h> #include <kcombobox.h> #include "videodevice.h" #include "kopete_export.h" @@ -45,7 +45,7 @@ This class allows kopete to check for the existence, open, configure, test, set @author Cláudio da Silveira Pinheiro */ -typedef QValueVector<Kopete::AV::VideoDevice> VideoDeviceVector; +typedef TQValueVector<Kopete::AV::VideoDevice> VideoDeviceVector; class VideoDevicePoolPrivate; @@ -68,7 +68,7 @@ public: int startCapturing(); int stopCapturing(); int readFrame(); - int getImage(QImage *qimage); + int getImage(TQImage *qimage); int selectInput(int newinput); int setInputParameters(); int scanDevices(); @@ -113,7 +113,7 @@ protected: unsigned int m_current_device; struct imagebuffer m_buffer; // only used when no devices were found - QMutex m_ready; + TQMutex m_ready; private: VideoDevicePool(); static VideoDevicePool* s_self; diff --git a/kopete/libkopete/avdevice/videoinput.h b/kopete/libkopete/avdevice/videoinput.h index 3381663e..9fc109ad 100644 --- a/kopete/libkopete/avdevice/videoinput.h +++ b/kopete/libkopete/avdevice/videoinput.h @@ -28,9 +28,9 @@ #define __u64 unsigned long long #endif // __u64*/ -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> #include "kopete_export.h" #include "videocontrol.h" @@ -46,7 +46,7 @@ class KOPETE_EXPORT VideoInput{ public: VideoInput(); ~VideoInput(); - QString name; + TQString name; int hastuner; __u64 m_standards; @@ -69,7 +69,7 @@ public: bool setImageAsMirror(bool imageasmirror); protected: - QValueVector<VideoControl> m_control; + TQValueVector<VideoControl> m_control; float m_brightness; float m_contrast; float m_saturation; diff --git a/kopete/libkopete/clientiface.h b/kopete/libkopete/clientiface.h index 02162189..6a7229b7 100644 --- a/kopete/libkopete/clientiface.h +++ b/kopete/libkopete/clientiface.h @@ -10,31 +10,31 @@ class ClientIface : virtual public DCOPObject K_DCOP k_dcop: /** Get the set of networks that the daemon is aware of. Mostly for debug */ - virtual QStringList networks() = 0; + virtual TQStringList networks() = 0; /** * Get the status of the connection to the given host. * @param host * @return a NetworkStatus::EnumStatus representing the state of the connection to the given host */ - virtual int status( const QString & host = QString::null ) = 0; + virtual int status( const TQString & host = TQString::null ) = 0; /** * Request a connection to the named host, registering the application's usage of this connection * @param host The hostname the client wants to connect to. * @param userInitiated Indicates whether the connection is a direct result of a user action or is a background task. Used by the daemon to decide whether to create an on-demand connection. * @return An NetworkStatus::EnumRequestResult indicating whether the request was accepted */ - virtual int request( const QString & host, bool userInitiated ) = 0; + virtual int request( const TQString & host, bool userInitiated ) = 0; /** * Indicate that a previously registered connection to the given host is no longer needed by this client * @param host The hostname being relinquished. */ - virtual void relinquish( const QString & host ) = 0; + virtual void relinquish( const TQString & host ) = 0; /** * Indicate that a communication failure has occured for a given host * @param host The hostname for which the failure occurred. * @return True indicates the caller should try again to lookup the host, as the daemon has another IP address available. */ - virtual bool reportFailure( const QString & host ) = 0; + virtual bool reportFailure( const TQString & host ) = 0; /** * Utility method to check the daemon's status */ @@ -44,13 +44,13 @@ k_dcop_signals: * @param host The host which the application has indicated it is using * @param status The new status of the network used to reach host. */ - void statusChange( QString host, int status ); + void statusChange( TQString host, int status ); /** * The network would like to shut down - any clients using this host are to finish using it immediately and call * relinquish() when done. * @param host The host, registered as in use by applications, which is about to be disconnected. */ - void shutdownRequested( QString host ); + void shutdownRequested( TQString host ); }; #endif diff --git a/kopete/libkopete/compat/kpixmapregionselectordialog.cpp b/kopete/libkopete/compat/kpixmapregionselectordialog.cpp index ee9d185e..c394af0f 100644 --- a/kopete/libkopete/compat/kpixmapregionselectordialog.cpp +++ b/kopete/libkopete/compat/kpixmapregionselectordialog.cpp @@ -19,16 +19,16 @@ #include "kpixmapregionselectordialog.h" #include <kdialogbase.h> -#include <qdialog.h> -#include <qdesktopwidget.h> +#include <tqdialog.h> +#include <tqdesktopwidget.h> #include <klocale.h> #include <kdialog.h> -KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(QWidget *parent, +KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(TQWidget *parent, const char *name, bool modal ) : KDialogBase(parent, name, modal, i18n("Select Region of Image"), Help|Ok|Cancel, Ok, true ) { - QVBox *vbox=new QVBox(this); - new QLabel(i18n("Please click and drag on the image to select the region of interest:"), vbox); + TQVBox *vbox=new TQVBox(this); + new TQLabel(i18n("Please click and drag on the image to select the region of interest:"), vbox); m_pixmapSelectorWidget= new KPixmapRegionSelectorWidget(vbox); vbox->setSpacing( KDialog::spacingHint() ); @@ -40,86 +40,86 @@ KPixmapRegionSelectorDialog::~KPixmapRegionSelectorDialog() { } -QRect KPixmapRegionSelectorDialog::getSelectedRegion(const QPixmap &pixmap, QWidget *parent ) +TQRect KPixmapRegionSelectorDialog::getSelectedRegion(const TQPixmap &pixmap, TQWidget *parent ) { KPixmapRegionSelectorDialog dialog(parent); dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap); - QDesktopWidget desktopWidget; - QRect screen=desktopWidget.availableGeometry(); + TQDesktopWidget desktopWidget; + TQRect screen=desktopWidget.availableGeometry(); dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize( (int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5)); int result = dialog.exec(); - QRect rect; + TQRect rect; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) rect = dialog.pixmapRegionSelectorWidget()->unzoomedSelectedRegion(); return rect; } -QRect KPixmapRegionSelectorDialog::getSelectedRegion(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent ) +TQRect KPixmapRegionSelectorDialog::getSelectedRegion(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent ) { KPixmapRegionSelectorDialog dialog(parent); dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap); dialog.pixmapRegionSelectorWidget()->setSelectionAspectRatio(aspectRatioWidth,aspectRatioHeight); - QDesktopWidget desktopWidget; - QRect screen=desktopWidget.availableGeometry(); + TQDesktopWidget desktopWidget; + TQRect screen=desktopWidget.availableGeometry(); dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize( (int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5)); int result = dialog.exec(); - QRect rect; + TQRect rect; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) rect = dialog.pixmapRegionSelectorWidget()->unzoomedSelectedRegion(); return rect; } -QImage KPixmapRegionSelectorDialog::getSelectedImage(const QPixmap &pixmap, QWidget *parent ) +TQImage KPixmapRegionSelectorDialog::getSelectedImage(const TQPixmap &pixmap, TQWidget *parent ) { KPixmapRegionSelectorDialog dialog(parent); dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap); - QDesktopWidget desktopWidget; - QRect screen=desktopWidget.availableGeometry(); + TQDesktopWidget desktopWidget; + TQRect screen=desktopWidget.availableGeometry(); dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize( (int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5)); int result = dialog.exec(); - QImage image; + TQImage image; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) image = dialog.pixmapRegionSelectorWidget()->selectedImage(); return image; } -QImage KPixmapRegionSelectorDialog::getSelectedImage(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent ) +TQImage KPixmapRegionSelectorDialog::getSelectedImage(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent ) { KPixmapRegionSelectorDialog dialog(parent); dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap); dialog.pixmapRegionSelectorWidget()->setSelectionAspectRatio(aspectRatioWidth,aspectRatioHeight); - QDesktopWidget desktopWidget; - QRect screen=desktopWidget.availableGeometry(); + TQDesktopWidget desktopWidget; + TQRect screen=desktopWidget.availableGeometry(); dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize( (int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5)); int result = dialog.exec(); - QImage image; + TQImage image; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) image = dialog.pixmapRegionSelectorWidget()->selectedImage(); return image; diff --git a/kopete/libkopete/compat/kpixmapregionselectordialog.h b/kopete/libkopete/compat/kpixmapregionselectordialog.h index 1c15067e..ffc5551e 100644 --- a/kopete/libkopete/compat/kpixmapregionselectordialog.h +++ b/kopete/libkopete/compat/kpixmapregionselectordialog.h @@ -20,7 +20,7 @@ #ifndef __KPIXMAPREGIONSELECTORDIALOG_H__ #define __KPIXMAPREGIONSELECTORDIALOG_H__ -#include <qimage.h> +#include <tqimage.h> #include <kdialogbase.h> #include <kpixmapregionselectorwidget.h> @@ -47,7 +47,7 @@ public: * later the setPixmap method of the KPixmapRegionSelectorWidget widget of * the new object. */ - KPixmapRegionSelectorDialog(QWidget *parent=0L, const char *name=0L, + KPixmapRegionSelectorDialog(TQWidget *parent=0L, const char *name=0L, bool modal = false ); /** * The destructor of the dialog @@ -68,7 +68,7 @@ public: * @returns the selected rectangle, or an invalid rectangle if the user * pressed the Cancel button. */ - static QRect getSelectedRegion(const QPixmap &pixmap, QWidget *parent = 0L ); + static TQRect getSelectedRegion(const TQPixmap &pixmap, TQWidget *parent = 0L ); /** * Creates a modal dialog, lets the user to select a region of the @p pixmap @@ -78,7 +78,7 @@ public: * @returns the selected rectangle, or an invalid rectangle if the user * pressed the Cancel button. */ - static QRect getSelectedRegion(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent = 0L ); + static TQRect getSelectedRegion(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = 0L ); /** * Creates a modal dialog, lets the user to select a region of the @p pixmap @@ -87,7 +87,7 @@ public: * @returns the selected image, or an invalid image if the user * pressed the Cancel button. */ - static QImage getSelectedImage(const QPixmap &pixmap, QWidget *parent = 0L ); + static TQImage getSelectedImage(const TQPixmap &pixmap, TQWidget *parent = 0L ); /** * Creates a modal dialog, lets the user to select a region of the @p pixmap @@ -97,7 +97,7 @@ public: * @returns the selected image, or an invalid image if the user * pressed the Cancel button. */ - static QImage getSelectedImage(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent = 0L ); + static TQImage getSelectedImage(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = 0L ); protected: KPixmapRegionSelectorWidget *m_pixmapSelectorWidget; diff --git a/kopete/libkopete/compat/kpixmapregionselectorwidget.cpp b/kopete/libkopete/compat/kpixmapregionselectorwidget.cpp index da2be5f9..ada867bb 100644 --- a/kopete/libkopete/compat/kpixmapregionselectorwidget.cpp +++ b/kopete/libkopete/compat/kpixmapregionselectorwidget.cpp @@ -24,29 +24,29 @@ */ #include "kpixmapregionselectorwidget.h" -#include <qpainter.h> -#include <qcolor.h> -#include <qimage.h> -#include <qlayout.h> +#include <tqpainter.h> +#include <tqcolor.h> +#include <tqimage.h> +#include <tqlayout.h> #include <kimageeffect.h> #include <kdebug.h> #include <klocale.h> #include <kpopupmenu.h> #include <kaction.h> #include <stdlib.h> -#include <qcursor.h> -#include <qapplication.h> +#include <tqcursor.h> +#include <tqapplication.h> -KPixmapRegionSelectorWidget::KPixmapRegionSelectorWidget( QWidget *parent, - const char *name) : QWidget( parent, name) +KPixmapRegionSelectorWidget::KPixmapRegionSelectorWidget( TQWidget *parent, + const char *name) : TQWidget( parent, name) { - QHBoxLayout * hboxLayout=new QHBoxLayout( this ); + TQHBoxLayout * hboxLayout=new TQHBoxLayout( this ); hboxLayout->addStretch(); - QVBoxLayout * vboxLayout=new QVBoxLayout( hboxLayout ); + TQVBoxLayout * vboxLayout=new TQVBoxLayout( hboxLayout ); vboxLayout->addStretch(); - m_label = new QLabel(this, "pixmapHolder"); + m_label = new TQLabel(this, "pixmapHolder"); m_label->setBackgroundMode( Qt::NoBackground ); m_label->installEventFilter( this ); @@ -64,7 +64,7 @@ KPixmapRegionSelectorWidget::~KPixmapRegionSelectorWidget() { } -void KPixmapRegionSelectorWidget::setPixmap( const QPixmap &pixmap ) +void KPixmapRegionSelectorWidget::setPixmap( const TQPixmap &pixmap ) { Q_ASSERT(!pixmap.isNull()); //This class isn't designed to deal with null pixmaps. m_originalPixmap = pixmap; @@ -79,12 +79,12 @@ void KPixmapRegionSelectorWidget::resetSelection() updatePixmap(); } -QRect KPixmapRegionSelectorWidget::selectedRegion() const +TQRect KPixmapRegionSelectorWidget::selectedRegion() const { return m_selectedRegion; } -void KPixmapRegionSelectorWidget::setSelectedRegion(const QRect &rect) +void KPixmapRegionSelectorWidget::setSelectedRegion(const TQRect &rect) { if (!rect.isValid()) resetSelection(); else @@ -92,7 +92,7 @@ void KPixmapRegionSelectorWidget::setSelectedRegion(const QRect &rect) m_selectedRegion=rect; updatePixmap(); - QRect r=unzoomedSelectedRegion(); + TQRect r=unzoomedSelectedRegion(); } } @@ -102,7 +102,7 @@ void KPixmapRegionSelectorWidget::updatePixmap() if (m_selectedRegion.width()>m_originalPixmap.width()) m_selectedRegion.setWidth( m_originalPixmap.width() ); if (m_selectedRegion.height()>m_originalPixmap.height()) m_selectedRegion.setHeight( m_originalPixmap.height() ); - QPainter painter; + TQPainter painter; if (m_linedPixmap.isNull()) { m_linedPixmap = m_originalPixmap; @@ -110,21 +110,21 @@ void KPixmapRegionSelectorWidget::updatePixmap() painter.begin(&m_linedPixmap); painter.setRasterOp( Qt::XorROP ); painter.fillRect(0,0,m_linedPixmap.width(), m_linedPixmap.height(), - QBrush( QColor(255,255,255), Qt::BDiagPattern) ); + TQBrush( TQColor(255,255,255), Qt::BDiagPattern) ); painter.end(); - QImage image=m_linedPixmap.convertToImage(); - image=KImageEffect::fade(image, (float)0.4, QColor(0,0,0)); + TQImage image=m_linedPixmap.convertToImage(); + image=KImageEffect::fade(image, (float)0.4, TQColor(0,0,0)); m_linedPixmap.convertFromImage(image); } - QPixmap pixmap = m_linedPixmap; + TQPixmap pixmap = m_linedPixmap; painter.begin(&pixmap); painter.drawPixmap( m_selectedRegion.topLeft(), m_originalPixmap, m_selectedRegion ); - painter.setPen( QColor(255,255,255) ); + painter.setPen( TQColor(255,255,255) ); painter.setRasterOp( Qt::XorROP ); painter.drawRect( m_selectedRegion ); @@ -141,12 +141,12 @@ KPopupMenu *KPixmapRegionSelectorWidget::createPopupMenu() popup->insertTitle(i18n("Image Operations")); KAction *action = new KAction(i18n("&Rotate Clockwise"), "rotate_cw", - 0, this, SLOT(rotateClockwise()), + 0, this, TQT_SLOT(rotateClockwise()), popup, "rotateclockwise"); action->plug(popup); action = new KAction(i18n("Rotate &Counterclockwise"), "rotate_ccw", - 0, this, SLOT(rotateCounterclockwise()), + 0, this, TQT_SLOT(rotateCounterclockwise()), popup, "rotatecounterclockwise"); action->plug(popup); @@ -161,7 +161,7 @@ void KPixmapRegionSelectorWidget::rotate(KImageEffect::RotateDirection direction { int w=m_originalPixmap.width(); int h=m_originalPixmap.height(); - QImage img=m_unzoomedPixmap.convertToImage(); + TQImage img=m_unzoomedPixmap.convertToImage(); img= KImageEffect::rotate(img, direction); m_unzoomedPixmap.convertFromImage(img); @@ -169,7 +169,7 @@ void KPixmapRegionSelectorWidget::rotate(KImageEffect::RotateDirection direction img= KImageEffect::rotate(img, direction); m_originalPixmap.convertFromImage(img); - m_linedPixmap=QPixmap(); + m_linedPixmap=TQPixmap(); if (m_forcedAspectRatio>0 && m_forcedAspectRatio!=1) resetSelection(); @@ -206,12 +206,12 @@ void KPixmapRegionSelectorWidget::rotateCounterclockwise() rotate(KImageEffect::Rotate270); } -bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) +bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev) { - if ( ev->type() == QEvent::MouseButtonPress ) + if ( ev->type() == TQEvent::MouseButtonPress ) { - QMouseEvent *mev= (QMouseEvent *)(ev); - //kdDebug() << QString("click at %1,%2").arg( mev->x() ).arg( mev->y() ) << endl; + TQMouseEvent *mev= (TQMouseEvent *)(ev); + //kdDebug() << TQString("click at %1,%2").arg( mev->x() ).arg( mev->y() ) << endl; if ( mev->button() == RightButton ) { @@ -221,7 +221,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) return TRUE; }; - QCursor cursor; + TQCursor cursor; if ( m_selectedRegion.contains( mev->pos() ) && m_selectedRegion!=m_originalPixmap.rect() ) @@ -234,7 +234,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) m_state=Resizing; cursor.setShape( Qt::CrossCursor ); } - QApplication::setOverrideCursor(cursor); + TQApplication::setOverrideCursor(cursor); m_tempFirstClick=mev->pos(); @@ -242,11 +242,11 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) return TRUE; } - if ( ev->type() == QEvent::MouseMove ) + if ( ev->type() == TQEvent::MouseMove ) { - QMouseEvent *mev= (QMouseEvent *)(ev); + TQMouseEvent *mev= (TQMouseEvent *)(ev); - //kdDebug() << QString("move to %1,%2").arg( mev->x() ).arg( mev->y() ) << endl; + //kdDebug() << TQString("move to %1,%2").arg( mev->x() ).arg( mev->y() ) << endl; if ( m_state == Resizing ) { @@ -300,26 +300,26 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) return TRUE; } - if ( ev->type() == QEvent::MouseButtonRelease ) + if ( ev->type() == TQEvent::MouseButtonRelease ) { - QMouseEvent *mev= (QMouseEvent *)(ev); + TQMouseEvent *mev= (TQMouseEvent *)(ev); if ( m_state == Resizing && mev->pos() == m_tempFirstClick) resetSelection(); m_state=None; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); return TRUE; } - QWidget::eventFilter(obj, ev); + TQWidget::eventFilter(obj, ev); return FALSE; } -QRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const QPoint & startPoint, const QPoint & _endPoint ) +TQRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const TQPoint & startPoint, const TQPoint & _endPoint ) { - QPoint endPoint = _endPoint; + TQPoint endPoint = _endPoint; if ( endPoint.x() < 0 ) endPoint.setX(0); else if ( endPoint.x() > m_originalPixmap.width() ) endPoint.setX(m_originalPixmap.width()); if ( endPoint.y() < 0 ) endPoint.setY(0); @@ -382,20 +382,20 @@ QRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const QPoint & startP x=startPoint.x()-w; } - return QRect(x,y,w,h); + return TQRect(x,y,w,h); } -QRect KPixmapRegionSelectorWidget::unzoomedSelectedRegion() const +TQRect KPixmapRegionSelectorWidget::unzoomedSelectedRegion() const { - return QRect((int)(m_selectedRegion.x()/m_zoomFactor), + return TQRect((int)(m_selectedRegion.x()/m_zoomFactor), (int)(m_selectedRegion.y()/m_zoomFactor), (int)(m_selectedRegion.width()/m_zoomFactor), (int)(m_selectedRegion.height()/m_zoomFactor)); } -QImage KPixmapRegionSelectorWidget::selectedImage() const +TQImage KPixmapRegionSelectorWidget::selectedImage() const { - QImage origImage=m_unzoomedPixmap.convertToImage(); + TQImage origImage=m_unzoomedPixmap.convertToImage(); return origImage.copy(unzoomedSelectedRegion()); } @@ -415,25 +415,25 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height) m_maxHeight=height; m_originalPixmap=m_unzoomedPixmap; - if (m_selectedRegion == m_originalPixmap.rect()) m_selectedRegion=QRect(); + if (m_selectedRegion == m_originalPixmap.rect()) m_selectedRegion=TQRect(); -// kdDebug() << QString(" original Pixmap :") << m_originalPixmap.rect() << endl; -// kdDebug() << QString(" unzoomed Pixmap : %1 x %2 ").arg(m_unzoomedPixmap.width()).arg(m_unzoomedPixmap.height()) << endl; +// kdDebug() << TQString(" original Pixmap :") << m_originalPixmap.rect() << endl; +// kdDebug() << TQString(" unzoomed Pixmap : %1 x %2 ").arg(m_unzoomedPixmap.width()).arg(m_unzoomedPixmap.height()) << endl; if ( !m_originalPixmap.isNull() && ( m_originalPixmap.width() > m_maxWidth || m_originalPixmap.height() > m_maxHeight ) ) { /* We have to resize the pixmap to get it complete on the screen */ - QImage image=m_originalPixmap.convertToImage(); - m_originalPixmap.convertFromImage( image.smoothScale( width, height, QImage::ScaleMin ) ); + TQImage image=m_originalPixmap.convertToImage(); + m_originalPixmap.convertFromImage( image.smoothScale( width, height, TQImage::ScaleMin ) ); double oldZoomFactor = m_zoomFactor; m_zoomFactor=m_originalPixmap.width()/(double)m_unzoomedPixmap.width(); if (m_selectedRegion.isValid()) { m_selectedRegion= - QRect((int)(m_selectedRegion.x()*m_zoomFactor/oldZoomFactor), + TQRect((int)(m_selectedRegion.x()*m_zoomFactor/oldZoomFactor), (int)(m_selectedRegion.y()*m_zoomFactor/oldZoomFactor), (int)(m_selectedRegion.width()*m_zoomFactor/oldZoomFactor), (int)(m_selectedRegion.height()*m_zoomFactor/oldZoomFactor) ); @@ -442,7 +442,7 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height) if (!m_selectedRegion.isValid()) m_selectedRegion = m_originalPixmap.rect(); - m_linedPixmap=QPixmap(); + m_linedPixmap=TQPixmap(); updatePixmap(); resize(m_label->width(), m_label->height()); } diff --git a/kopete/libkopete/compat/kpixmapregionselectorwidget.h b/kopete/libkopete/compat/kpixmapregionselectorwidget.h index a4a9cfcf..6b0a319b 100644 --- a/kopete/libkopete/compat/kpixmapregionselectorwidget.h +++ b/kopete/libkopete/compat/kpixmapregionselectorwidget.h @@ -19,10 +19,10 @@ #ifndef __KPIXMAPREGIONSELECTORWIDGET_H__ #define __KPIXMAPREGIONSELECTORWIDGET_H__ -#include <qvbox.h> -#include <qpixmap.h> -#include <qrect.h> -#include <qlabel.h> +#include <tqvbox.h> +#include <tqpixmap.h> +#include <tqrect.h> +#include <tqlabel.h> #include <kimageeffect.h> class KPopupMenu; @@ -48,7 +48,7 @@ public: /** * Constructor for a KPixmapRegionSelectorWidget. */ - KPixmapRegionSelectorWidget( QWidget *parent = 0L, const char *name=0L); + KPixmapRegionSelectorWidget( TQWidget *parent = 0L, const char *name=0L); /** * Destructor for a KPixmapRegionSelectorWidget @@ -60,28 +60,28 @@ public: * @param pixmap The pixmap. Must be non-null. * */ - void setPixmap( const QPixmap &pixmap ); + void setPixmap( const TQPixmap &pixmap ); /** * @return the original whole pixmap that we're using in this widget as the * pixmap the user is selecting a region from. */ - QPixmap pixmap() const { return m_unzoomedPixmap; }; + TQPixmap pixmap() const { return m_unzoomedPixmap; }; /** * Sets the selected region to be @p rect (in zoomed pixmap coordinates) */ - void setSelectedRegion(const QRect &rect); + void setSelectedRegion(const TQRect &rect); /** * Returns the selected region ( in zoomed pixmap coordinates ) */ - QRect selectedRegion() const; + TQRect selectedRegion() const; /** * Returns the selected region ( in unzoomed, original pixmap coordinates ) */ - QRect unzoomedSelectedRegion() const; + TQRect unzoomedSelectedRegion() const; /** * Resets the selection to use the whole image @@ -89,10 +89,10 @@ public: void resetSelection(); /** - * @returns a QImage object with just the region the user selected from the + * @returns a TQImage object with just the region the user selected from the * image */ - QImage selectedImage() const; + TQImage selectedImage() const; /** * Sets the aspect ration that the selected subimage should have. The way to @@ -140,7 +140,7 @@ protected: virtual KPopupMenu *createPopupMenu(); private: - bool eventFilter(QObject *obj, QEvent *ev); + bool eventFilter(TQObject *obj, TQEvent *ev); /** * Recalculates the pixmap that is shown based on the current selected area, @@ -148,18 +148,18 @@ private: */ void updatePixmap(); - QRect calcSelectionRectangle( const QPoint &startPoint, const QPoint & endPoint ); + TQRect calcSelectionRectangle( const TQPoint &startPoint, const TQPoint & endPoint ); enum CursorState { None=0, Resizing, Moving }; CursorState m_state; - QPixmap m_unzoomedPixmap; - QPixmap m_originalPixmap; - QPixmap m_linedPixmap; - QRect m_selectedRegion; - QLabel *m_label; + TQPixmap m_unzoomedPixmap; + TQPixmap m_originalPixmap; + TQPixmap m_linedPixmap; + TQRect m_selectedRegion; + TQLabel *m_label; - QPoint m_tempFirstClick; + TQPoint m_tempFirstClick; double m_forcedAspectRatio; int m_maxWidth, m_maxHeight; diff --git a/kopete/libkopete/connectionmanager.cpp b/kopete/libkopete/connectionmanager.cpp index b2dd7825..dcfa0ee1 100644 --- a/kopete/libkopete/connectionmanager.cpp +++ b/kopete/libkopete/connectionmanager.cpp @@ -20,13 +20,13 @@ class ConnectionManagerPrivate }; // Connection manager itself -ConnectionManager::ConnectionManager( QObject * parent, const char * name ) : DCOPObject( "ConnectionManager" ),QObject( parent, name ) +ConnectionManager::ConnectionManager( TQObject * parent, const char * name ) : DCOPObject( "ConnectionManager" ),TQObject( parent, name ) { d = new ConnectionManagerPrivate; d->m_stub = new ClientIface_stub( kapp->dcopClient(), "kded", "networkstatus" ); - connectDCOPSignal( "kded", "networkstatus", "statusChange(QString,int)", "slotStatusChanged(QString,int)", false ); + connectDCOPSignal( "kded", "networkstatus", "statusChange(TQString,int)", "slotStatusChanged(TQString,int)", false ); d->m_userInitiatedOnly = false; initialise(); } @@ -50,7 +50,7 @@ void ConnectionManager::initialise() void ConnectionManager::updateStatus() { - NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status( QString::null ); + NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status( TQString::null ); kdDebug() << k_funcinfo << endl; switch ( daemonStatus ) { @@ -87,7 +87,7 @@ ConnectionManager::~ConnectionManager() delete d; } -NetworkStatus::EnumStatus ConnectionManager::status( const QString & host ) +NetworkStatus::EnumStatus ConnectionManager::status( const TQString & host ) { // need also to check that the daemon hasn't died updateStatus(); @@ -100,7 +100,7 @@ NetworkStatus::EnumStatus ConnectionManager::status( const QString & host ) return NetworkStatus::NoNetworks; } -NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( QWidget * mainWidget, const QString & host, bool userInitiated ) +NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( TQWidget * mainWidget, const TQString & host, bool userInitiated ) { kdDebug() << k_funcinfo << endl; NetworkStatus::EnumRequestResult result; @@ -123,12 +123,12 @@ NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( QWidget * return result; } -void ConnectionManager::relinquishConnection( const QString & host ) +void ConnectionManager::relinquishConnection( const TQString & host ) { d->m_stub->relinquish( host ); } -void ConnectionManager::slotStatusChanged( QString host, int status ) +void ConnectionManager::slotStatusChanged( TQString host, int status ) { kdDebug() << k_funcinfo << endl; updateStatus(); @@ -139,7 +139,7 @@ void ConnectionManager::slotStatusChanged( QString host, int status ) emit statusChanged( host, (NetworkStatus::EnumStatus)status ); } -bool ConnectionManager::askToConnect( QWidget * mainWidget ) +bool ConnectionManager::askToConnect( TQWidget * mainWidget ) { i18n( "A network connection was disconnected. The application is now in offline mode. Do you want the application to resume network operations when the network is available again?" ); i18n( "This application is currently in offline mode. Do you want to connect?" ); @@ -147,7 +147,7 @@ bool ConnectionManager::askToConnect( QWidget * mainWidget ) i18n("This application is currently in offline mode. Do you want to connect in order to carry out this operation?"), i18n("Leave Offline Mode?"), i18n("Connect"), i18n("Stay Offline"), - QString::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes ); + TQString::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes ); } #include "connectionmanager.moc" diff --git a/kopete/libkopete/connectionmanager.h b/kopete/libkopete/connectionmanager.h index b78df8d4..63217183 100644 --- a/kopete/libkopete/connectionmanager.h +++ b/kopete/libkopete/connectionmanager.h @@ -23,7 +23,7 @@ class ConnectionManagerPrivate; -class KOPETE_EXPORT ConnectionManager : public QObject, virtual public DCOPObject +class KOPETE_EXPORT ConnectionManager : public TQObject, virtual public DCOPObject { Q_OBJECT K_DCOP @@ -31,25 +31,25 @@ class KOPETE_EXPORT ConnectionManager : public QObject, virtual public DCOPObjec static ConnectionManager* self(); enum State { Inactive, Online, Offline, Pending }; virtual ~ConnectionManager(); - NetworkStatus::EnumStatus status( const QString & host ); + NetworkStatus::EnumStatus status( const TQString & host ); // check if a hostname is available. Ask user if offline. Request host - NetworkStatus::EnumRequestResult requestConnection( QWidget* mainWidget, const QString & host, bool userInitiated ); + NetworkStatus::EnumRequestResult requestConnection( TQWidget* mainWidget, const TQString & host, bool userInitiated ); // method to relinquish a connection - void relinquishConnection( const QString & host ); + void relinquishConnection( const TQString & host ); signals: // signal that the network for a hostname is up/down - void statusChanged( const QString & host, NetworkStatus::EnumStatus status ); + void statusChanged( const TQString & host, NetworkStatus::EnumStatus status ); protected: // sets up internal state void initialise(); // reread the desktop status from the daemon and update internal state void updateStatus(); // ask if the user would like to reconnect - bool askToConnect( QWidget * mainWidget ); + bool askToConnect( TQWidget * mainWidget ); k_dcop: - void slotStatusChanged( QString host, int status ); + void slotStatusChanged( TQString host, int status ); private: - ConnectionManager( QObject *parent, const char * name ); + ConnectionManager( TQObject *parent, const char * name ); ConnectionManagerPrivate *d; static ConnectionManager * s_self; }; diff --git a/kopete/libkopete/kabcpersistence.cpp b/kopete/libkopete/kabcpersistence.cpp index 527a99a4..93d55b35 100644 --- a/kopete/libkopete/kabcpersistence.cpp +++ b/kopete/libkopete/kabcpersistence.cpp @@ -15,8 +15,8 @@ ************************************************************************* */ -#include <qstring.h> -#include <qtimer.h> +#include <tqstring.h> +#include <tqtimer.h> #include <kabc/addressbook.h> #include <kabc/addressee.h> @@ -47,19 +47,19 @@ namespace Kopete /** * utility function to merge two QStrings containing individual elements separated by 0xE000 */ -static QString unionContents( QString arg1, QString arg2 ) +static TQString unionContents( TQString arg1, TQString arg2 ) { - QChar separator( 0xE000 ); - QStringList outList = QStringList::split( separator, arg1 ); - QStringList arg2List = QStringList::split( separator, arg2 ); - for ( QStringList::iterator it = arg2List.begin(); it != arg2List.end(); ++it ) + TQChar separator( 0xE000 ); + TQStringList outList = TQStringList::split( separator, arg1 ); + TQStringList arg2List = TQStringList::split( separator, arg2 ); + for ( TQStringList::iterator it = arg2List.begin(); it != arg2List.end(); ++it ) if ( !outList.contains( *it ) ) outList.append( *it ); - QString out = outList.join( separator ); + TQString out = outList.join( separator ); return out; } -KABCPersistence::KABCPersistence( QObject * parent, const char * name ) : QObject( parent, name ) +KABCPersistence::KABCPersistence( TQObject * parent, const char * name ) : TQObject( parent, name ) { s_pendingResources.setAutoDelete( false ); } @@ -72,7 +72,7 @@ KABCPersistence *KABCPersistence::s_self = 0L; bool KABCPersistence::s_addrBookWritePending = false; -QPtrList<KABC::Resource> KABCPersistence::s_pendingResources; +TQPtrList<KABC::Resource> KABCPersistence::s_pendingResources; KABC::AddressBook* KABCPersistence::s_addressBook = 0; @@ -112,29 +112,29 @@ void KABCPersistence::write( MetaContact * mc ) else { // collate the instant messaging data to be inserted into the address book - QMap<QString, QStringList> addressMap; - QPtrList<Contact> contacts = mc->contacts(); - QPtrListIterator<Contact> cIt( contacts ); + TQMap<TQString, TQStringList> addressMap; + TQPtrList<Contact> contacts = mc->contacts(); + TQPtrListIterator<Contact> cIt( contacts ); while ( Contact * c = cIt.current() ) { - QStringList addresses = addressMap[ c->protocol()->addressBookIndexField() ]; + TQStringList addresses = addressMap[ c->protocol()->addressBookIndexField() ]; addresses.append( c->contactId() ); addressMap.insert( c->protocol()->addressBookIndexField(), addresses ); ++cIt; } // insert a custom field for each protocol - QMap<QString, QStringList>::ConstIterator it = addressMap.begin(); + TQMap<TQString, TQStringList>::ConstIterator it = addressMap.begin(); for ( ; it != addressMap.end(); ++it ) { // read existing data for this key - QString currentCustomForProtocol = theAddressee.custom( it.key(), QString::fromLatin1( "All" ) ); + TQString currentCustomForProtocol = theAddressee.custom( it.key(), TQString::fromLatin1( "All" ) ); // merge without duplicating - QString toWrite = unionContents( currentCustomForProtocol, it.data().join( QChar( 0xE000 ) ) ); + TQString toWrite = unionContents( currentCustomForProtocol, it.data().join( TQChar( 0xE000 ) ) ); // Note if nothing ends up in the KABC data, this is because insertCustom does nothing if any param is empty. kdDebug( 14010 ) << k_funcinfo << "Writing: " << it.key() << ", " << "All" << ", " << toWrite << endl; - theAddressee.insertCustom( it.key(), QString::fromLatin1( "All" ), toWrite ); - QString check = theAddressee.custom( it.key(), QString::fromLatin1( "All" ) ); + theAddressee.insertCustom( it.key(), TQString::fromLatin1( "All" ), toWrite ); + TQString check = theAddressee.custom( it.key(), TQString::fromLatin1( "All" ) ); } ab->insertAddressee( theAddressee ); //kdDebug( 14010 ) << k_funcinfo << "dumping addressbook before write " << endl; @@ -150,16 +150,16 @@ void KABCPersistence::write( MetaContact * mc ) kdDebug( 14010 ) << k_funcinfo << "...FOUND ONE!" << endl; // Store address book fields - QMap<QString, QMap<QString, QString> >::ConstIterator appIt = d->addressBook.begin(); + TQMap<TQString, TQMap<TQString, TQString> >::ConstIterator appIt = d->addressBook.begin(); for( ; appIt != d->addressBook.end(); ++appIt ) { - QMap<QString, QString>::ConstIterator addrIt = appIt.data().begin(); + TQMap<TQString, TQString>::ConstIterator addrIt = appIt.data().begin(); for( ; addrIt != appIt.data().end(); ++addrIt ) { // read existing data for this key - QString currentCustom = theAddressee.custom( appIt.key(), addrIt.key() ); + TQString currentCustom = theAddressee.custom( appIt.key(), addrIt.key() ); // merge without duplicating - QString toWrite = unionContents( currentCustom, addrIt.data() ); + TQString toWrite = unionContents( currentCustom, addrIt.data() ); // write the result // Note if nothing ends up in the KABC data, this is because insertCustom does nothing if any param is empty. kdDebug( 14010 ) << k_funcinfo << "Writing: " << appIt.key() << ", " << addrIt.key() << ", " << toWrite << endl; @@ -178,7 +178,7 @@ void KABCPersistence::writeAddressBook( const KABC::Resource * res) if ( !s_addrBookWritePending ) { s_addrBookWritePending = true; - QTimer::singleShot( 2000, this, SLOT( slotWriteAddressBook() ) ); + TQTimer::singleShot( 2000, this, TQT_SLOT( slotWriteAddressBook() ) ); } } @@ -186,7 +186,7 @@ void KABCPersistence::slotWriteAddressBook() { //kdDebug( 14010 ) << k_funcinfo << endl; KABC::AddressBook* ab = addressBook(); - QPtrListIterator<KABC::Resource> it( s_pendingResources ); + TQPtrListIterator<KABC::Resource> it( s_pendingResources ); for ( ; it.current(); ++it ) { //kdDebug( 14010 ) << "Writing resource " << it.current()->resourceName() << endl; @@ -229,16 +229,16 @@ void KABCPersistence::removeKABC( MetaContact *) { // remove the link //kdDebug( 14010 ) << k_funcinfo << "...not found." << endl; - d->metaContactId=QString::null; + d->metaContactId=TQString::null; } else { //kdDebug( 14010 ) << k_funcinfo << "...FOUND ONE!" << endl; // Remove address book fields - QMap<QString, QMap<QString, QString> >::ConstIterator appIt = d->addressBook.begin(); + TQMap<TQString, TQMap<TQString, TQString> >::ConstIterator appIt = d->addressBook.begin(); for( ; appIt != d->addressBook.end(); ++appIt ) { - QMap<QString, QString>::ConstIterator addrIt = appIt.data().begin(); + TQMap<TQString, TQString>::ConstIterator addrIt = appIt.data().begin(); for( ; addrIt != appIt.data().end(); ++addrIt ) { // FIXME: This assumes Kopete is the only app writing these fields @@ -265,29 +265,29 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) if ( !addr.isEmpty() ) // if we are associated with KABC { // load the set of addresses from KABC - QStringList customs = addr.customs(); + TQStringList customs = addr.customs(); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = customs.begin(); it != customs.end(); ++it ) { - QString app, name, value; + TQString app, name, value; splitField( *it, app, name, value ); kdDebug( 14010 ) << "app=" << app << " name=" << name << " value=" << value << endl; - if ( app.startsWith( QString::fromLatin1( "messaging/" ) ) ) + if ( app.startsWith( TQString::fromLatin1( "messaging/" ) ) ) { - if ( name == QString::fromLatin1( "All" ) ) + if ( name == TQString::fromLatin1( "All" ) ) { kdDebug( 14010 ) << " syncing \"" << app << ":" << name << " with contactlist " << endl; // Get the protocol name from the custom field // by chopping the 'messaging/' prefix from the custom field app name - QString protocolName = app.right( app.length() - 10 ); + TQString protocolName = app.right( app.length() - 10 ); // munge Jabber hack - if ( protocolName == QString::fromLatin1( "xmpp" ) ) - protocolName = QString::fromLatin1( "jabber" ); + if ( protocolName == TQString::fromLatin1( "xmpp" ) ) + protocolName = TQString::fromLatin1( "jabber" ); // Check Kopete supports it - Protocol * proto = dynamic_cast<Protocol*>( PluginManager::self()->loadPlugin( QString::fromLatin1( "kopete_" ) + protocolName ) ); + Protocol * proto = dynamic_cast<Protocol*>( PluginManager::self()->loadPlugin( TQString::fromLatin1( "kopete_" ) + protocolName ) ); if ( !proto ) { KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, @@ -297,20 +297,20 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) } // See if we need to add each contact in this protocol - QStringList addresses = QStringList::split( QChar( 0xE000 ), value ); - QStringList::iterator end = addresses.end(); - for ( QStringList::iterator it = addresses.begin(); it != end; ++it ) + TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), value ); + TQStringList::iterator end = addresses.end(); + for ( TQStringList::iterator it = addresses.begin(); it != end; ++it ) { // check whether each one is present in Kopete // Is it in the contact list? // First discard anything after an 0xE120, this is used by IRC to separate nick and server group name, but // IRC doesn't support this properly yet, so the user will have to select an appropriate account manually - int separatorPos = (*it).find( QChar( 0xE120 ) ); + int separatorPos = (*it).find( TQChar( 0xE120 ) ); if ( separatorPos != -1 ) *it = (*it).left( separatorPos ); - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( proto ); - QDictIterator<Kopete::Account> acs(accounts); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( proto ); + TQDictIterator<Kopete::Account> acs(accounts); Kopete::MetaContact *otherMc = 0; for ( acs.toFirst(); acs.current(); ++acs ) { @@ -332,14 +332,14 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) } kdDebug( 14010 ) << *it << " already exists in OTHER metacontact, move here?" << endl; // find the Kopete::Contact and attempt to move it to this metacontact. - otherMc->findContact( proto->pluginId(), QString::null, *it )->setMetaContact( mc ); + otherMc->findContact( proto->pluginId(), TQString::null, *it )->setMetaContact( mc ); } else { // if not, prompt to add it kdDebug( 14010 ) << proto->pluginId() << "://" << *it << " was not found in the contact list. Prompting to add..." << endl; if ( KMessageBox::Yes == KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), - i18n( "<qt>An address was added to this contact by another application.<br>Would you like to use it in Kopete?<br><b>Protocol:</b> %1<br><b>Address:</b> %2</qt>" ).arg( proto->displayName() ).arg( *it ), i18n( "Import Address From Address Book" ), i18n("Use"), i18n("Do Not Use"), QString::fromLatin1( "ImportFromKABC" ) ) ) + i18n( "<qt>An address was added to this contact by another application.<br>Would you like to use it in Kopete?<br><b>Protocol:</b> %1<br><b>Address:</b> %2</qt>" ).arg( proto->displayName() ).arg( *it ), i18n( "Import Address From Address Book" ), i18n("Use"), i18n("Do Not Use"), TQString::fromLatin1( "ImportFromKABC" ) ) ) { // Check the accounts for this protocol are all connected // Most protocols do not allow you to add contacts while offline @@ -369,7 +369,7 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) AccountSelector *accSelector = new AccountSelector(proto, chooser, "accSelector"); chooser->setMainWidget(accSelector); - if ( chooser->exec() == QDialog::Rejected ) + if ( chooser->exec() == TQDialog::Rejected ) continue; chosen = accSelector->selectedItem(); @@ -418,11 +418,11 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) } // FIXME: Remove when IM address API is in KABC (KDE 4) -void KABCPersistence::splitField( const QString &str, QString &app, QString &name, QString &value ) +void KABCPersistence::splitField( const TQString &str, TQString &app, TQString &name, TQString &value ) { int colon = str.find( ':' ); if ( colon != -1 ) { - QString tmp = str.left( colon ); + TQString tmp = str.left( colon ); value = str.mid( colon + 1 ); int dash = tmp.find( '-' ); diff --git a/kopete/libkopete/kabcpersistence.h b/kopete/libkopete/kabcpersistence.h index fa02fb64..f827270f 100644 --- a/kopete/libkopete/kabcpersistence.h +++ b/kopete/libkopete/kabcpersistence.h @@ -54,7 +54,7 @@ class KOPETE_EXPORT KABCPersistence : public QObject */ static KABCPersistence* self(); - KABCPersistence( QObject * parent = 0, const char * name = 0 ); + KABCPersistence( TQObject * parent = 0, const char * name = 0 ); ~KABCPersistence(); /** * @brief Access Kopete's KDE address book instance @@ -86,7 +86,7 @@ class KOPETE_EXPORT KABCPersistence : public QObject void writeAddressBook( const KABC::Resource * res ); protected: - static void splitField( const QString &str, QString &app, QString &name, QString &value ); + static void splitField( const TQString &str, TQString &app, TQString &name, TQString &value ); void dumpAB(); protected slots: @@ -98,7 +98,7 @@ class KOPETE_EXPORT KABCPersistence : public QObject static KABCPersistence * s_self; static KABC::AddressBook* s_addressBook; static bool s_addrBookWritePending; - static QPtrList<KABC::Resource> s_pendingResources; + static TQPtrList<KABC::Resource> s_pendingResources; }; } // end namespace Kopete diff --git a/kopete/libkopete/kautoconfig.cpp b/kopete/libkopete/kautoconfig.cpp index a1885537..d54e3123 100644 --- a/kopete/libkopete/kautoconfig.cpp +++ b/kopete/libkopete/kautoconfig.cpp @@ -21,8 +21,8 @@ #include "kautoconfig.h" #include <kglobal.h> -#include <qsqlpropertymap.h> -#include <qobjectlist.h> +#include <tqsqlpropertymap.h> +#include <tqobjectlist.h> #include <kconfig.h> #include <kapplication.h> #include <kdeversion.h> @@ -63,12 +63,12 @@ public: { init(); } // Widgets to parse - QPtrList<QWidget> widgets; + TQPtrList<TQWidget> widgets; // Name of the group that KConfig should be set to for each widget. - QMap<QWidget*, QString> groups; + TQMap<TQWidget*, TQString> groups; // Child widgets of widgets to ignore - QPtrList<QWidget> ignore; + TQPtrList<TQWidget> ignore; // Reset to false after saveSettings returns true. bool changed; @@ -79,18 +79,18 @@ public: #endif // Known widgets that can be configured - QMap<QWidget*, QPtrList<QWidget> > autoWidgets; + TQMap<TQWidget*, TQPtrList<TQWidget> > autoWidgets; // Default values for the widgets. - QMap<QWidget*, QVariant> defaultValues; - // Widgets to not get properties on (QLabel etc) - QAsciiDict<int> ignoreTheseWidgets; + TQMap<TQWidget*, TQVariant> defaultValues; + // Widgets to not get properties on (TQLabel etc) + TQAsciiDict<int> ignoreTheseWidgets; void init(){ - ignoreTheseWidgets.insert("QLabel", new int(1)); - ignoreTheseWidgets.insert("QFrame", new int(2)); - ignoreTheseWidgets.insert("QGroupBox", new int(3)); - ignoreTheseWidgets.insert("QButtonGroup", new int(4)); - ignoreTheseWidgets.insert("QWidget", new int(5)); + ignoreTheseWidgets.insert("TQLabel", new int(1)); + ignoreTheseWidgets.insert("TQFrame", new int(2)); + ignoreTheseWidgets.insert("TQGroupBox", new int(3)); + ignoreTheseWidgets.insert("TQButtonGroup", new int(4)); + ignoreTheseWidgets.insert("TQWidget", new int(5)); ignoreTheseWidgets.setAutoDelete(true); static bool defaultKDEPropertyMapInstalled = false; @@ -101,13 +101,13 @@ public: } }; -KAutoConfig::KAutoConfig(KConfig *kconfig, QObject *parent, - const char *name) : QObject(parent, name), config(kconfig) { +KAutoConfig::KAutoConfig(KConfig *kconfig, TQObject *parent, + const char *name) : TQObject(parent, name), config(kconfig) { d = new KAutoConfigPrivate(); } -KAutoConfig::KAutoConfig(QObject *parent, const char *name) : - QObject(parent, name), config(KGlobal::config()) { +KAutoConfig::KAutoConfig(TQObject *parent, const char *name) : + TQObject(parent, name), config(KGlobal::config()) { d = new KAutoConfigPrivate(); } @@ -115,15 +115,15 @@ KAutoConfig::~KAutoConfig(){ delete d; } -void KAutoConfig::addWidget(QWidget *widget, const QString &group){ +void KAutoConfig::addWidget(TQWidget *widget, const TQString &group){ functionCallPostOrderCheck("addWidget",); d->groups.insert(widget, group); d->widgets.append(widget); - QPtrList<QWidget> newAutoConfigWidget; + TQPtrList<TQWidget> newAutoConfigWidget; d->autoWidgets.insert(widget, newAutoConfigWidget ); } -void KAutoConfig::ignoreSubWidget(QWidget *widget){ +void KAutoConfig::ignoreSubWidget(TQWidget *widget){ functionCallPostOrderCheck("ignoreSubWidget",); d->ignore.append(widget); } @@ -141,51 +141,51 @@ bool KAutoConfig::retrieveSettings(bool trackChanges){ if(trackChanges){ // QT - changedMap.insert(QString::fromLatin1("QButton"), SIGNAL(stateChanged(int))); - changedMap.insert(QString::fromLatin1("QCheckBox"), SIGNAL(stateChanged(int))); - changedMap.insert(QString::fromLatin1("QPushButton"), SIGNAL(stateChanged(int))); - changedMap.insert(QString::fromLatin1("QRadioButton"), SIGNAL(stateChanged(int))); - changedMap.insert(QString::fromLatin1("QComboBox"), SIGNAL(activated (int))); + changedMap.insert(TQString::fromLatin1("TQButton"), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1("TQCheckBox"), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1("TQPushButton"), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1("TQRadioButton"), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1("TQComboBox"), TQT_SIGNAL(activated (int))); //qsqlproperty map doesn't store the text, but the value! - //changedMap.insert(QString::fromLatin1("QComboBox"), SIGNAL(textChanged(const QString &))); - changedMap.insert(QString::fromLatin1("QDateEdit"), SIGNAL(valueChanged(const QDate &))); - changedMap.insert(QString::fromLatin1("QDateTimeEdit"), SIGNAL(valueChanged(const QDateTime &))); - changedMap.insert(QString::fromLatin1("QDial"), SIGNAL(valueChanged (int))); - changedMap.insert(QString::fromLatin1("QLineEdit"), SIGNAL(textChanged(const QString &))); - changedMap.insert(QString::fromLatin1("QSlider"), SIGNAL(valueChanged(int))); - changedMap.insert(QString::fromLatin1("QSpinBox"), SIGNAL(valueChanged(int))); - changedMap.insert(QString::fromLatin1("QTimeEdit"), SIGNAL(valueChanged(const QTime &))); - changedMap.insert(QString::fromLatin1("QTextEdit"), SIGNAL(textChanged())); - changedMap.insert(QString::fromLatin1("QTextBrowser"), SIGNAL(sourceChanged(const QString &))); - changedMap.insert(QString::fromLatin1("QMultiLineEdit"), SIGNAL(textChanged())); - changedMap.insert(QString::fromLatin1("QListBox"), SIGNAL(selectionChanged())); - changedMap.insert(QString::fromLatin1("QTabWidget"), SIGNAL(currentChanged(QWidget *))); + //changedMap.insert(TQString::fromLatin1("TQComboBox"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert(TQString::fromLatin1("QDateEdit"), TQT_SIGNAL(valueChanged(const TQDate &))); + changedMap.insert(TQString::fromLatin1("QDateTimeEdit"), TQT_SIGNAL(valueChanged(const TQDateTime &))); + changedMap.insert(TQString::fromLatin1("TQDial"), TQT_SIGNAL(valueChanged (int))); + changedMap.insert(TQString::fromLatin1("TQLineEdit"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert(TQString::fromLatin1("TQSlider"), TQT_SIGNAL(valueChanged(int))); + changedMap.insert(TQString::fromLatin1("TQSpinBox"), TQT_SIGNAL(valueChanged(int))); + changedMap.insert(TQString::fromLatin1("QTimeEdit"), TQT_SIGNAL(valueChanged(const TQTime &))); + changedMap.insert(TQString::fromLatin1("TQTextEdit"), TQT_SIGNAL(textChanged())); + changedMap.insert(TQString::fromLatin1("TQTextBrowser"), TQT_SIGNAL(sourceChanged(const TQString &))); + changedMap.insert(TQString::fromLatin1("TQMultiLineEdit"), TQT_SIGNAL(textChanged())); + changedMap.insert(TQString::fromLatin1("TQListBox"), TQT_SIGNAL(selectionChanged())); + changedMap.insert(TQString::fromLatin1("TQTabWidget"), TQT_SIGNAL(currentChanged(TQWidget *))); // KDE - changedMap.insert( QString::fromLatin1("KComboBox"), SIGNAL(activated (int))); - changedMap.insert( QString::fromLatin1("KFontCombo"), SIGNAL(activated (int))); - changedMap.insert( QString::fromLatin1("KFontRequester"), SIGNAL(fontSelected(const QFont &))); - changedMap.insert( QString::fromLatin1("KFontChooser"), SIGNAL(fontSelected(const QFont &))); - changedMap.insert( QString::fromLatin1("KHistoryCombo"), SIGNAL(activated (int))); - - changedMap.insert( QString::fromLatin1("KColorButton"), SIGNAL(changed(const QColor &))); - changedMap.insert( QString::fromLatin1("KDatePicker"), SIGNAL(dateSelected (QDate))); - changedMap.insert( QString::fromLatin1("KEditListBox"), SIGNAL(changed())); - changedMap.insert( QString::fromLatin1("KListBox"), SIGNAL(selectionChanged())); - changedMap.insert( QString::fromLatin1("KLineEdit"), SIGNAL(textChanged(const QString &))); - changedMap.insert( QString::fromLatin1("KPasswordEdit"), SIGNAL(textChanged(const QString &))); - changedMap.insert( QString::fromLatin1("KRestrictedLine"), SIGNAL(textChanged(const QString &))); - changedMap.insert( QString::fromLatin1("KTextBrowser"), SIGNAL(sourceChanged(const QString &))); - changedMap.insert( QString::fromLatin1("KTextEdit"), SIGNAL(textChanged())); - changedMap.insert( QString::fromLatin1("KURLRequester"), SIGNAL(textChanged (const QString& ))); - changedMap.insert( QString::fromLatin1("KIntNumInput"), SIGNAL(valueChanged (int))); - changedMap.insert( QString::fromLatin1("KIntSpinBox"), SIGNAL(valueChanged (int))); - changedMap.insert( QString::fromLatin1("KDoubleNumInput"), SIGNAL(valueChanged (double))); + changedMap.insert( TQString::fromLatin1("KComboBox"), TQT_SIGNAL(activated (int))); + changedMap.insert( TQString::fromLatin1("KFontCombo"), TQT_SIGNAL(activated (int))); + changedMap.insert( TQString::fromLatin1("KFontRequester"), TQT_SIGNAL(fontSelected(const TQFont &))); + changedMap.insert( TQString::fromLatin1("KFontChooser"), TQT_SIGNAL(fontSelected(const TQFont &))); + changedMap.insert( TQString::fromLatin1("KHistoryCombo"), TQT_SIGNAL(activated (int))); + + changedMap.insert( TQString::fromLatin1("KColorButton"), TQT_SIGNAL(changed(const TQColor &))); + changedMap.insert( TQString::fromLatin1("KDatePicker"), TQT_SIGNAL(dateSelected (TQDate))); + changedMap.insert( TQString::fromLatin1("KEditListBox"), TQT_SIGNAL(changed())); + changedMap.insert( TQString::fromLatin1("KListBox"), TQT_SIGNAL(selectionChanged())); + changedMap.insert( TQString::fromLatin1("KLineEdit"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KPasswordEdit"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KRestrictedLine"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KTextBrowser"), TQT_SIGNAL(sourceChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KTextEdit"), TQT_SIGNAL(textChanged())); + changedMap.insert( TQString::fromLatin1("KURLRequester"), TQT_SIGNAL(textChanged (const TQString& ))); + changedMap.insert( TQString::fromLatin1("KIntNumInput"), TQT_SIGNAL(valueChanged (int))); + changedMap.insert( TQString::fromLatin1("KIntSpinBox"), TQT_SIGNAL(valueChanged (int))); + changedMap.insert( TQString::fromLatin1("KDoubleNumInput"), TQT_SIGNAL(valueChanged (double))); } // Go through all of the children of the widgets and find all known widgets - QPtrListIterator<QWidget> it( d->widgets ); - QWidget *widget; + TQPtrListIterator<TQWidget> it( d->widgets ); + TQWidget *widget; bool usingDefaultValues = false; while ( (widget = it.current()) != 0 ) { ++it; @@ -198,30 +198,30 @@ bool KAutoConfig::retrieveSettings(bool trackChanges){ bool KAutoConfig::saveSettings() { functionCallPreOrderCheck("saveSettings", false); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator<QWidget> it( d->widgets ); - QWidget *widget; + TQPtrListIterator<TQWidget> it( d->widgets ); + TQWidget *widget; while ( (widget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[widget]); // Go through the known autowidgets of this widget and save - QPtrListIterator<QWidget> it( d->autoWidgets[widget] ); - QWidget *groupWidget; + TQPtrListIterator<TQWidget> it( d->autoWidgets[widget] ); + TQWidget *groupWidget; bool widgetChanged = false; while ( (groupWidget = it.current()) != 0 ){ ++it; - QVariant defaultValue = d->defaultValues[groupWidget]; - QVariant currentValue = propertyMap->property(groupWidget); + TQVariant defaultValue = d->defaultValues[groupWidget]; + TQVariant currentValue = propertyMap->property(groupWidget); #if KDE_IS_VERSION( 3, 1, 90 ) - if(!config->hasDefault(QString::fromLatin1(groupWidget->name())) && currentValue == defaultValue){ - config->revertToDefault(QString::fromLatin1(groupWidget->name())); + if(!config->hasDefault(TQString::fromLatin1(groupWidget->name())) && currentValue == defaultValue){ + config->revertToDefault(TQString::fromLatin1(groupWidget->name())); widgetChanged = true; } else{ #endif - QVariant savedValue = config->readPropertyEntry(groupWidget->name(), + TQVariant savedValue = config->readPropertyEntry(groupWidget->name(), defaultValue); if(savedValue != currentValue){ config->writeEntry(groupWidget->name(), currentValue); @@ -248,21 +248,21 @@ bool KAutoConfig::saveSettings() { bool KAutoConfig::hasChanged() const { functionCallPreOrderCheck("hasChanged", false); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator<QWidget> it( d->widgets ); - QWidget *widget; + TQPtrListIterator<TQWidget> it( d->widgets ); + TQWidget *widget; while ( (widget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[widget]); // Go through the known autowidgets of this widget and save - QPtrListIterator<QWidget> it( d->autoWidgets[widget] ); - QWidget *groupWidget; + TQPtrListIterator<TQWidget> it( d->autoWidgets[widget] ); + TQWidget *groupWidget; while ( (groupWidget = it.current()) != 0 ){ ++it; - QVariant defaultValue = d->defaultValues[groupWidget]; - QVariant currentValue = propertyMap->property(groupWidget); - QVariant savedValue = config->readPropertyEntry(groupWidget->name(), + TQVariant defaultValue = d->defaultValues[groupWidget]; + TQVariant currentValue = propertyMap->property(groupWidget); + TQVariant savedValue = config->readPropertyEntry(groupWidget->name(), defaultValue); // Return once just one item is found to have changed. @@ -277,20 +277,20 @@ bool KAutoConfig::hasChanged() const { bool KAutoConfig::isDefault() const { functionCallPreOrderCheck("isDefault", false); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator<QWidget> it( d->widgets ); - QWidget *widget; + TQPtrListIterator<TQWidget> it( d->widgets ); + TQWidget *widget; while ( (widget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[widget]); // Go through the known autowidgets of this widget and save - QPtrListIterator<QWidget> it( d->autoWidgets[widget] ); - QWidget *groupWidget; + TQPtrListIterator<TQWidget> it( d->autoWidgets[widget] ); + TQWidget *groupWidget; while ( (groupWidget = it.current()) != 0 ){ ++it; - QVariant defaultValue = d->defaultValues[groupWidget]; - QVariant currentValue = propertyMap->property(groupWidget); + TQVariant defaultValue = d->defaultValues[groupWidget]; + TQVariant currentValue = propertyMap->property(groupWidget); if(currentValue != defaultValue){ //qDebug("groupWidget %s, has changed: default: %s new: %s", groupWidget->name(), defaultValue.toString().latin1(), currentValue.toString().latin1()); return false; @@ -303,20 +303,20 @@ bool KAutoConfig::isDefault() const { void KAutoConfig::resetSettings() const { functionCallPreOrderCheck("resetSettings",); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator<QWidget> it( d->widgets ); - QWidget *widget; + TQPtrListIterator<TQWidget> it( d->widgets ); + TQWidget *widget; while ( (widget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[widget]); // Go through the known autowidgets of this widget and save - QPtrListIterator<QWidget> it( d->autoWidgets[widget] ); - QWidget *groupWidget; + TQPtrListIterator<TQWidget> it( d->autoWidgets[widget] ); + TQWidget *groupWidget; while ( (groupWidget = it.current()) != 0 ){ ++it; - QVariant defaultValue = d->defaultValues[groupWidget]; + TQVariant defaultValue = d->defaultValues[groupWidget]; if(defaultValue != propertyMap->property(groupWidget)){ propertyMap->setProperty(groupWidget, defaultValue); d->changed = true; @@ -328,21 +328,21 @@ void KAutoConfig::resetSettings() const { void KAutoConfig::reloadSettings() const { functionCallPreOrderCheck("reloadSettings", ); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator<QWidget> it( d->widgets ); - QWidget *pageWidget; + TQPtrListIterator<TQWidget> it( d->widgets ); + TQWidget *pageWidget; while ( (pageWidget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[pageWidget]); // Go through the known widgets of this page and reload - QPtrListIterator<QWidget> it( d->autoWidgets[pageWidget] ); - QWidget *widget; + TQPtrListIterator<TQWidget> it( d->autoWidgets[pageWidget] ); + TQWidget *widget; while ( (widget = it.current()) != 0 ){ ++it; - QVariant defaultSetting = d->defaultValues[widget]; - QVariant setting = + TQVariant defaultSetting = d->defaultValues[widget]; + TQVariant setting = config->readPropertyEntry(widget->name(), defaultSetting); propertyMap->setProperty(widget, setting); } @@ -350,23 +350,23 @@ void KAutoConfig::reloadSettings() const { d->changed = false; } -bool KAutoConfig::parseChildren(const QWidget *widget, - QPtrList<QWidget>& currentGroup, bool trackChanges){ +bool KAutoConfig::parseChildren(const TQWidget *widget, + TQPtrList<TQWidget>& currentGroup, bool trackChanges){ bool valueChanged = false; - const QPtrList<QObject> *listOfChildren = widget->children(); + const TQPtrList<TQObject> *listOfChildren = widget->children(); if(!listOfChildren) return valueChanged; - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); - QPtrListIterator<QObject> it( *listOfChildren ); - QObject *object; + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); + TQPtrListIterator<TQObject> it( *listOfChildren ); + TQObject *object; while ( (object = it.current()) != 0 ) { ++it; if(!object->isWidgetType()){ continue; } - QWidget *childWidget = (QWidget *)object; + TQWidget *childWidget = (TQWidget *)object; if(d->ignore.containsRef(childWidget)){ continue; } @@ -385,12 +385,12 @@ bool KAutoConfig::parseChildren(const QWidget *widget, if( d->ignoreTheseWidgets[childWidget->className()] == 0 && childWidget->name(0) != NULL ) { - QVariant defaultSetting = propertyMap->property(childWidget); + TQVariant defaultSetting = propertyMap->property(childWidget); if(defaultSetting.isValid()) { parseTheChildren = false; // Disable the widget if it is immutable? - if(config->entryIsImmutable( QString::fromLatin1(childWidget->name()))) + if(config->entryIsImmutable( TQString::fromLatin1(childWidget->name()))) childWidget->setEnabled(false); else { @@ -401,22 +401,22 @@ bool KAutoConfig::parseChildren(const QWidget *widget, d->defaultValues.insert(childWidget, defaultSetting); } // Get/Set settings and connect up the changed signal - QVariant setting = + TQVariant setting = config->readPropertyEntry(childWidget->name(), defaultSetting); if(setting != defaultSetting) { propertyMap->setProperty(childWidget, setting); valueChanged = true; } - if(trackChanges && changedMap.find(QString::fromLatin1(childWidget->className())) != + if(trackChanges && changedMap.find(TQString::fromLatin1(childWidget->className())) != changedMap.end()) { - connect(childWidget, changedMap[QString::fromLatin1(childWidget->className())], - this, SIGNAL(widgetModified())); + connect(childWidget, changedMap[TQString::fromLatin1(childWidget->className())], + this, TQT_SIGNAL(widgetModified())); } #ifndef NDEBUG else if(trackChanges && - changedMap.find(QString::fromLatin1(childWidget->className())) == changedMap.end()) + changedMap.find(TQString::fromLatin1(childWidget->className())) == changedMap.end()) { // Without a signal kautoconfigdialog could incorectly // enable/disable the buttons diff --git a/kopete/libkopete/kautoconfig.h b/kopete/libkopete/kautoconfig.h index a4cd243b..f3122fee 100644 --- a/kopete/libkopete/kautoconfig.h +++ b/kopete/libkopete/kautoconfig.h @@ -20,8 +20,8 @@ #ifndef KAUTOCONFIG_H #define KAUTOCONFIG_H -#include <qobject.h> -#include <qptrlist.h> +#include <tqobject.h> +#include <tqptrlist.h> #include "kopete_export.h" @@ -53,11 +53,11 @@ class QWidget; * If one of the widgets needs special treatment it can be specified to be * ignored using the ignoreSubWidget() function. * - * KAutoConfig uses the QSqlPropertyMap class to determine if it can do + * KAutoConfig uses the TQSqlPropertyMap class to determine if it can do * anything to a widget. Note that KAutoConfig doesn't require a database, * it simply uses the functionality that is built into the QSqlPropertyMap * class. New widgets can be added to the map using - * QSqlPropertyMap::installDefaultMap(). Note that you can't just add any + * TQSqlPropertyMap::installDefaultMap(). Note that you can't just add any * class. The class must have a matching Q_PROPERTY(...) macro defined. * * For example (note that KColorButton is already added and it doesn't need to @@ -65,18 +65,18 @@ class QWidget; * * kcolorbutton.h defines the following property: * \code - * Q_PROPERTY( QColor color READ color WRITE setColor ) + * Q_PROPERTY( TQColor color READ color WRITE setColor ) * \endcode * * To add KColorButton the following code would be inserted in the main. * * \code - * QSqlPropertyMap *map = QSqlPropertyMap::defaultMap(); + * TQSqlPropertyMap *map = TQSqlPropertyMap::defaultMap(); * map.insert("KColorButton", "color"); - * QSqlPropertyMap::installDefaultMap(map); + * TQSqlPropertyMap::installDefaultMap(map); * \endcode * - * If you add a new widget to the QSqlPropertyMap and wish to be notified when + * If you add a new widget to the TQSqlPropertyMap and wish to be notified when * it is modified you should add its signal using addWidgetChangedSignal(). * If the Apply and Default buttons and enabled/disabled by KAutoConfigDialog * automatically then this must be done. @@ -85,7 +85,7 @@ class QWidget; * @since 3.2 * @author Benjamin C Meyer <ben+kdelibs at meyerhome dot net> */ -class KOPETE_EXPORT KAutoConfig : public QObject { +class KOPETE_EXPORT KAutoConfig : public TQObject { Q_OBJECT @@ -103,7 +103,7 @@ signals: * contains the one or more modified setting. * @see settingsChanged() */ - void settingsChanged( QWidget *widget ); + void settingsChanged( TQWidget *widget ); /** * If retrieveSettings() was told to track changes then if @@ -123,7 +123,7 @@ public: * @param parent - Parent object. * @param name - Object name. */ - KAutoConfig( KConfig *kconfig, QObject *parent=0, const char *name=0 ); + KAutoConfig( KConfig *kconfig, TQObject *parent=0, const char *name=0 ); /** * Constructor. @@ -132,7 +132,7 @@ public: * @param parent - Parent object. * @param name - Object name. */ - KAutoConfig( QObject *parent=0, const char *name=0 ); + KAutoConfig( TQObject *parent=0, const char *name=0 ); /** * Destructor. Deletes private class. @@ -150,7 +150,7 @@ public: * group it should be added separately and also ignored. * @see ignoreSubWidget() */ - void addWidget( QWidget *widget, const QString &group ); + void addWidget( TQWidget *widget, const TQString &group ); /** * Ignore the specified child widget when performing an action. Doesn't @@ -159,7 +159,7 @@ public: * @param widget - Pointer to the widget that should be ignored. * Note: Widgets that don't have a name are ignored automatically. **/ - void ignoreSubWidget( QWidget *widget ); + void ignoreSubWidget( TQWidget *widget ); /** * Traverse the specified widgets to see if anything is different then the @@ -185,17 +185,17 @@ public: * * Example: * \code - * addWidgetChangedSignal( "QCheckbox", SIGNAL(stateChanged(int)) ); + * addWidgetChangedSignal( "QCheckbox", TQT_SIGNAL(stateChanged(int)) ); * \endcode * * This is generally used in conjunction with the addition of a class - * to QSqlPropertyMap so KAutoConfig can get/set its values. + * to TQSqlPropertyMap so KAutoConfig can get/set its values. * * @param widgetName - The class name of the widget (className()). - * @param signal - The signal (with "SIGNAL()" wrapper) that should be called. + * @param signal - The signal (with "TQT_SIGNAL()" wrapper) that should be called. */ - inline void addWidgetChangedSignal( const QString &widgetName, - const QCString &signal ){ + inline void addWidgetChangedSignal( const TQString &widgetName, + const TQCString &signal ){ changedMap.insert( widgetName, signal ); } @@ -248,7 +248,7 @@ protected: /** * Map of the classes and the signals that they emit when changed. */ - QMap<QString, QCString> changedMap; + TQMap<TQString, TQCString> changedMap; /** * Recursive function that finds all known children. @@ -262,8 +262,8 @@ protected: * @return bool - If a widget was set to something other then its default. * @see retrieveSettings() */ - bool parseChildren( const QWidget *widget, - QPtrList<QWidget>¤tGroup, bool trackChanges ); + bool parseChildren( const TQWidget *widget, + TQPtrList<TQWidget>¤tGroup, bool trackChanges ); private: class KAutoConfigPrivate; diff --git a/kopete/libkopete/kcautoconfigmodule.cpp b/kopete/libkopete/kcautoconfigmodule.cpp index 9ef34be1..122a3e7b 100644 --- a/kopete/libkopete/kcautoconfigmodule.cpp +++ b/kopete/libkopete/kcautoconfigmodule.cpp @@ -19,7 +19,7 @@ #include "kcautoconfigmodule.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kautoconfig.h> @@ -30,41 +30,41 @@ class KCAutoConfigModule::KCAutoConfigModulePrivate }; -KCAutoConfigModule::KCAutoConfigModule( QWidget * parent, const char * name, const QStringList & args ) +KCAutoConfigModule::KCAutoConfigModule( TQWidget * parent, const char * name, const TQStringList & args ) : KCModule( parent, name, args ) , d( new KCAutoConfigModulePrivate ) { d->kautoconfig = new KAutoConfig( this ); - connect(d->kautoconfig, SIGNAL(widgetModified()), SLOT(slotWidgetModified())); - connect(d->kautoconfig, SIGNAL(settingsChanged()), SLOT(widgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(widgetModified())); } -KCAutoConfigModule::KCAutoConfigModule( KInstance * instance, QWidget * parent, const QStringList & args ) +KCAutoConfigModule::KCAutoConfigModule( KInstance * instance, TQWidget * parent, const TQStringList & args ) : KCModule( instance, parent, args ) , d( new KCAutoConfigModulePrivate ) { d->kautoconfig = new KAutoConfig( this ); - connect(d->kautoconfig, SIGNAL(widgetModified()), SLOT(slotWidgetModified())); - connect(d->kautoconfig, SIGNAL(settingsChanged()), SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(slotWidgetModified())); } -KCAutoConfigModule::KCAutoConfigModule( KConfig *config,QWidget * parent, const char * name, const QStringList & args ) +KCAutoConfigModule::KCAutoConfigModule( KConfig *config,TQWidget * parent, const char * name, const TQStringList & args ) : KCModule( parent, name, args ) , d( new KCAutoConfigModulePrivate ) { d->kautoconfig = new KAutoConfig( config, this ); - connect(d->kautoconfig, SIGNAL(widgetModified()), SLOT(slotWidgetModified())); - connect(d->kautoconfig, SIGNAL(settingsChanged()), SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(slotWidgetModified())); } -KCAutoConfigModule::KCAutoConfigModule( KConfig *config , KInstance * instance, QWidget * parent, const QStringList & args ) +KCAutoConfigModule::KCAutoConfigModule( KConfig *config , KInstance * instance, TQWidget * parent, const TQStringList & args ) : KCModule( instance, parent, args ) , d( new KCAutoConfigModulePrivate ) { d->kautoconfig = new KAutoConfig( config, this ); - connect(d->kautoconfig, SIGNAL(widgetModified()), SLOT(slotWidgetModified())); - connect(d->kautoconfig, SIGNAL(settingsChanged()), SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(slotWidgetModified())); } @@ -99,9 +99,9 @@ KAutoConfig *KCAutoConfigModule::autoConfig() return d->kautoconfig; } -void KCAutoConfigModule::setMainWidget(QWidget *widget, const QString& group ) +void KCAutoConfigModule::setMainWidget(TQWidget *widget, const TQString& group ) { - QBoxLayout * l = new QVBoxLayout( this ); + TQBoxLayout * l = new TQVBoxLayout( this ); l->addWidget( widget ); d->kautoconfig->addWidget(widget,group); diff --git a/kopete/libkopete/kcautoconfigmodule.h b/kopete/libkopete/kcautoconfigmodule.h index 6076b211..fcca6047 100644 --- a/kopete/libkopete/kcautoconfigmodule.h +++ b/kopete/libkopete/kcautoconfigmodule.h @@ -36,10 +36,10 @@ class KConfig; * config page with QDesigner, and add it to the module * This can be done using the setMainWidget() method: * \code - * typedef KGenericFactory<MyPageConfig, QWidget> MyPageConfigFactory; + * typedef KGenericFactory<MyPageConfig, TQWidget> MyPageConfigFactory; * K_EXPORT_COMPONENT_FACTORY( kcm_mypageconfig, MyPageConfigFactory( "kcm_mypageconfig" ) ) * - * MyPageConfig( QWidget * parent, const char *, const QStringList & args ) + * MyPageConfig( TQWidget * parent, const char *, const TQStringList & args ) * : KCAutoConfigModule( MyPageConfigFactory::instance(), parent, args ) * { * setMainWidget( new MyPageConfigBase(this) , "MyGroup" ); @@ -57,12 +57,12 @@ class KOPETE_EXPORT KCAutoConfigModule : public KCModule /** * Standard KCModule constructor. Use KGlobal::config() */ - KCAutoConfigModule( QWidget * parent = 0, const char * name = 0, const QStringList & args = QStringList() ); + KCAutoConfigModule( TQWidget * parent = 0, const char * name = 0, const TQStringList & args = TQStringList() ); /** * Standard KCModule constructor. Use KGlobal::config() */ - KCAutoConfigModule( KInstance * instance, QWidget * parent = 0, const QStringList & args = QStringList() ); + KCAutoConfigModule( KInstance * instance, TQWidget * parent = 0, const TQStringList & args = TQStringList() ); /** * Constructor. @@ -73,7 +73,7 @@ class KOPETE_EXPORT KCAutoConfigModule : public KCModule * * @todo document what the args mean (inherited from KCModule?) */ - KCAutoConfigModule(KConfig* config, KInstance * instance, QWidget * parent = 0, const QStringList & args = QStringList() ); + KCAutoConfigModule(KConfig* config, KInstance * instance, TQWidget * parent = 0, const TQStringList & args = TQStringList() ); /** * Constructor, much like the one above, except with @@ -83,7 +83,7 @@ class KOPETE_EXPORT KCAutoConfigModule : public KCModule * @param name name of the object * @param args special arguments for this KCM */ - KCAutoConfigModule(KConfig* config, QWidget * parent = 0, const char * name=0 , const QStringList & args = QStringList() ); + KCAutoConfigModule(KConfig* config, TQWidget * parent = 0, const char * name=0 , const TQStringList & args = TQStringList() ); ~KCAutoConfigModule(); @@ -97,7 +97,7 @@ class KOPETE_EXPORT KCAutoConfigModule : public KCModule * @param widget the widget to place on the page and to add in the KAutoConfig * @param group the name of the group where settings are stored in the config file */ - void setMainWidget(QWidget *widget, const QString& group); + void setMainWidget(TQWidget *widget, const TQString& group); /** * @brief a reference to the KAutoConfig diff --git a/kopete/libkopete/knotification.cpp b/kopete/libkopete/knotification.cpp index 737fe102..4b41b48b 100644 --- a/kopete/libkopete/knotification.cpp +++ b/kopete/libkopete/knotification.cpp @@ -33,20 +33,20 @@ #include <kwin.h> -#include <qvbox.h> +#include <tqvbox.h> #include <dcopclient.h> -#include <qcstring.h> -#include <qguardedptr.h> -#include <qstylesheet.h> -#include <qlabel.h> -#include <qtimer.h> -#include <qtabwidget.h> +#include <tqcstring.h> +#include <tqguardedptr.h> +#include <tqstylesheet.h> +#include <tqlabel.h> +#include <tqtimer.h> +#include <tqtabwidget.h> //TODO, make the KNotification aware of the systemtray. #include "kopeteuiglobal.h" -static WId checkWinId( const QString &/*appName*/, WId senderWinId ) +static WId checkWinId( const TQString &/*appName*/, WId senderWinId ) { if(senderWinId==0) senderWinId=Kopete::UI::Global::sysTrayWId(); @@ -57,14 +57,14 @@ static WId checkWinId( const QString &/*appName*/, WId senderWinId ) struct KNotification::Private { - QWidget *widget; - QString text; - QStringList actions; + TQWidget *widget; + TQString text; + TQStringList actions; int level; }; -KNotification::KNotification(QObject *parent) : - QObject(parent) , d(new Private) +KNotification::KNotification(TQObject *parent) : + TQObject(parent) , d(new Private) { m_linkClicked = false; } @@ -75,20 +75,20 @@ KNotification::~KNotification() } -void KNotification::notifyByExecute(const QString &command, const QString& event, - const QString& fromApp, const QString& text, +void KNotification::notifyByExecute(const TQString &command, const TQString& event, + const TQString& fromApp, const TQString& text, int winId, int eventId) { if (!command.isEmpty()) { // kdDebug() << "executing command '" << command << "'" << endl; - QMap<QChar,QString> subst; + TQMap<TQChar,TQString> subst; subst.insert( 'e', event ); subst.insert( 'a', fromApp ); subst.insert( 's', text ); - subst.insert( 'w', QString::number( winId )); - subst.insert( 'i', QString::number( eventId )); - QString execLine = KMacroExpander::expandMacrosShellQuote( command, subst ); + subst.insert( 'w', TQString::number( winId )); + subst.insert( 'i', TQString::number( eventId )); + TQString execLine = KMacroExpander::expandMacrosShellQuote( command, subst ); if ( execLine.isEmpty() ) execLine = command; // fallback @@ -108,7 +108,7 @@ void KNotification::notifyByMessagebox() if ( d->text.isEmpty() ) return; - QString action=d->actions[0]; + TQString action=d->actions[0]; WId winId=d->widget ? d->widget->topLevelWidget()->winId() : 0; if( action.isEmpty()) @@ -134,21 +134,21 @@ void KNotification::notifyByMessagebox() else { //we may show the specific action button int result=0; - QGuardedPtr<KNotification> _this=this; //this can be deleted + TQGuardedPtr<KNotification> _this=this; //this can be deleted switch( d->level ) { default: case KNotifyClient::Notification: - result = KMessageBox::questionYesNo(d->widget, d->text, i18n( "Notification" ), action, KStdGuiItem::cancel(), QString::null, false ); + result = KMessageBox::questionYesNo(d->widget, d->text, i18n( "Notification" ), action, KStdGuiItem::cancel(), TQString::null, false ); break; case KNotifyClient::Warning: - result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Warning" ), action, KStdGuiItem::cancel(), QString::null, false ); + result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Warning" ), action, KStdGuiItem::cancel(), TQString::null, false ); break; case KNotifyClient::Error: - result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Error" ), action, KStdGuiItem::cancel(), QString::null, false ); + result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Error" ), action, KStdGuiItem::cancel(), TQString::null, false ); break; case KNotifyClient::Catastrophe: - result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Fatal" ), action, KStdGuiItem::cancel(), QString::null, false ); + result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Fatal" ), action, KStdGuiItem::cancel(), TQString::null, false ); break; } if(result==KMessageBox::Yes && _this) @@ -160,30 +160,30 @@ void KNotification::notifyByMessagebox() -void KNotification::notifyByPassivePopup(const QPixmap &pix ) +void KNotification::notifyByPassivePopup(const TQPixmap &pix ) { - QString appName = QString::fromAscii( KNotifyClient::instance()->instanceName() ); + TQString appName = TQString::fromAscii( KNotifyClient::instance()->instanceName() ); KIconLoader iconLoader( appName ); - KConfig eventsFile( QString::fromAscii( KNotifyClient::instance()->instanceName()+"/eventsrc" ), true, false, "data"); + KConfig eventsFile( TQString::fromAscii( KNotifyClient::instance()->instanceName()+"/eventsrc" ), true, false, "data"); KConfigGroup config( &eventsFile, "!Global!" ); - QString iconName = config.readEntry( "IconName", appName ); - QPixmap icon = iconLoader.loadIcon( iconName, KIcon::Small ); - QString title = config.readEntry( "Comment", appName ); + TQString iconName = config.readEntry( "IconName", appName ); + TQPixmap icon = iconLoader.loadIcon( iconName, KIcon::Small ); + TQString title = config.readEntry( "Comment", appName ); //KPassivePopup::message(title, text, icon, senderWinId); WId winId=d->widget ? d->widget->topLevelWidget()->winId() : 0; KPassivePopup *pop = new KPassivePopup( checkWinId(appName, winId) ); - QObject::connect(this, SIGNAL(closed()), pop, SLOT(deleteLater())); + TQObject::connect(this, TQT_SIGNAL(closed()), pop, TQT_SLOT(deleteLater())); - QVBox *vb = pop->standardView( title, pix.isNull() ? d->text: QString::null , icon ); - QVBox *vb2=vb; + TQVBox *vb = pop->standardView( title, pix.isNull() ? d->text: TQString::null , icon ); + TQVBox *vb2=vb; if(!pix.isNull()) { - QHBox *hb = new QHBox(vb); + TQHBox *hb = new TQHBox(vb); hb->setSpacing(KDialog::spacingHint()); - QLabel *pil=new QLabel(hb); + TQLabel *pil=new TQLabel(hb); pil->setPixmap(pix); pil->setScaledContents(true); if(pix.height() > 80 && pix.height() > pix.width() ) @@ -196,27 +196,27 @@ void KNotification::notifyByPassivePopup(const QPixmap &pix ) pil->setMaximumWidth(80); pil->setMaximumHeight(80*pix.height()/pix.width()); } - vb=new QVBox(hb); - QLabel *msg = new QLabel( d->text, vb, "msg_label" ); + vb=new TQVBox(hb); + TQLabel *msg = new TQLabel( d->text, vb, "msg_label" ); msg->setAlignment( AlignLeft ); } if ( !d->actions.isEmpty() ) { - QString linkCode=QString::fromLatin1("<p align=\"right\">"); + TQString linkCode=TQString::fromLatin1("<p align=\"right\">"); int i=0; - for ( QStringList::ConstIterator it = d->actions.begin() ; it != d->actions.end(); ++it ) + for ( TQStringList::ConstIterator it = d->actions.begin() ; it != d->actions.end(); ++it ) { i++; - linkCode+=QString::fromLatin1(" <a href=\"%1\">%2</a> ").arg( QString::number(i) , QStyleSheet::escape(*it) ); + linkCode+=TQString::fromLatin1(" <a href=\"%1\">%2</a> ").arg( TQString::number(i) , TQStyleSheet::escape(*it) ); } - linkCode+=QString::fromLatin1("</p>"); + linkCode+=TQString::fromLatin1("</p>"); KActiveLabel *link = new KActiveLabel(linkCode , vb ); //link->setAlignment( AlignRight ); - QObject::disconnect(link, SIGNAL(linkClicked(const QString &)), link, SLOT(openLink(const QString &))); - QObject::connect(link, SIGNAL(linkClicked(const QString &)), this, SLOT(slotPopupLinkClicked(const QString &))); - QObject::connect(link, SIGNAL(linkClicked(const QString &)), pop, SLOT(hide())); + TQObject::disconnect(link, TQT_SIGNAL(linkClicked(const TQString &)), link, TQT_SLOT(openLink(const TQString &))); + TQObject::connect(link, TQT_SIGNAL(linkClicked(const TQString &)), this, TQT_SLOT(slotPopupLinkClicked(const TQString &))); + TQObject::connect(link, TQT_SIGNAL(linkClicked(const TQString &)), pop, TQT_SLOT(hide())); } pop->setAutoDelete( true ); @@ -227,7 +227,7 @@ void KNotification::notifyByPassivePopup(const QPixmap &pix ) } -void KNotification::slotPopupLinkClicked(const QString &adr) +void KNotification::slotPopupLinkClicked(const TQString &adr) { m_linkClicked = true; unsigned int action=adr.toUInt(); @@ -236,7 +236,7 @@ void KNotification::slotPopupLinkClicked(const QString &adr) activate(action); - // since we've hidden the message (KNotification::notifyByPassivePopup(const QPixmap &pix )) + // since we've hidden the message (KNotification::notifyByPassivePopup(const TQPixmap &pix )) // we must now schedule overselves for deletion close(); } @@ -274,7 +274,7 @@ void KNotification::raiseWidget() } -void KNotification::raiseWidget(QWidget *w) +void KNotification::raiseWidget(TQWidget *w) { //TODO this funciton is far from finished. if(w->isTopLevel()) @@ -284,10 +284,10 @@ void KNotification::raiseWidget(QWidget *w) } else { - QWidget *pw=w->parentWidget(); + TQWidget *pw=w->parentWidget(); raiseWidget(pw); - if( QTabWidget *tab_widget=dynamic_cast<QTabWidget*>(pw)) + if( TQTabWidget *tab_widget=dynamic_cast<TQTabWidget*>(pw)) { tab_widget->showPage(w); } @@ -298,9 +298,9 @@ void KNotification::raiseWidget(QWidget *w) -KNotification *KNotification::event( const QString& message , const QString& text, - const QPixmap& pixmap, QWidget *widget, - const QStringList &actions, unsigned int flags) +KNotification *KNotification::event( const TQString& message , const TQString& text, + const TQPixmap& pixmap, TQWidget *widget, + const TQStringList &actions, unsigned int flags) { /* NOTE: this function still use the KNotifyClient, * in the future (KDE4) all the function of the knotifyclient will be moved there. @@ -308,15 +308,15 @@ KNotification *KNotification::event( const QString& message , const QString& tex */ int level=KNotifyClient::Default; - QString sound; - QString file; - QString commandline; + TQString sound; + TQString file; + TQString commandline; // get config file - KConfig eventsFile( QString::fromAscii( KNotifyClient::instance()->instanceName()+"/eventsrc" ), true, false, "data"); + KConfig eventsFile( TQString::fromAscii( KNotifyClient::instance()->instanceName()+"/eventsrc" ), true, false, "data"); eventsFile.setGroup(message); - KConfig configFile( QString::fromAscii( KNotifyClient::instance()->instanceName()+".eventsrc" ), true, false); + KConfig configFile( TQString::fromAscii( KNotifyClient::instance()->instanceName()+".eventsrc" ), true, false); configFile.setGroup(message); int present=KNotifyClient::getPresentation(message); @@ -327,7 +327,7 @@ KNotification *KNotification::event( const QString& message , const QString& tex // get sound file name if( present & KNotifyClient::Sound ) { - QString theSound = configFile.readPathEntry( "soundfile" ); + TQString theSound = configFile.readPathEntry( "soundfile" ); if ( theSound.isEmpty() ) theSound = eventsFile.readPathEntry( "default_sound" ); if ( !theSound.isEmpty() ) @@ -336,7 +336,7 @@ KNotification *KNotification::event( const QString& message , const QString& tex // get log file name if( present & KNotifyClient::Logfile ) { - QString theFile = configFile.readPathEntry( "logfile" ); + TQString theFile = configFile.readPathEntry( "logfile" ); if ( theFile.isEmpty() ) theFile = eventsFile.readPathEntry( "default_logfile" ); if ( !theFile.isEmpty() ) @@ -357,9 +357,9 @@ KNotification *KNotification::event( const QString& message , const QString& tex return userEvent( text, pixmap, widget, actions, present , level, sound, file, commandline, flags ); } -KNotification *KNotification::userEvent( const QString& text, const QPixmap& pixmap, QWidget *widget, - QStringList actions,int present, int level, const QString &sound, const QString &file, - const QString &commandline, unsigned int flags) +KNotification *KNotification::userEvent( const TQString& text, const TQPixmap& pixmap, TQWidget *widget, + TQStringList actions,int present, int level, const TQString &sound, const TQString &file, + const TQString &commandline, unsigned int flags) { /* NOTE: this function still use the KNotifyClient, @@ -391,17 +391,17 @@ KNotification *KNotification::userEvent( const QString& text, const QPixmap& pix } if ( present & KNotifyClient::Messagebox ) { - QTimer::singleShot(0,notify,SLOT(notifyByMessagebox())); + TQTimer::singleShot(0,notify,TQT_SLOT(notifyByMessagebox())); } else //not a message box (because closing the event when a message box is there is suicide) if(flags & CloseOnTimeout) { - QTimer::singleShot(6*1000, notify, SLOT(close())); + TQTimer::singleShot(6*1000, notify, TQT_SLOT(close())); } if ( present & KNotifyClient::Execute ) { - QString appname = QString::fromAscii( KNotifyClient::instance()->instanceName() ); - notify->notifyByExecute(commandline, QString::null,appname,text, winId, 0 ); + TQString appname = TQString::fromAscii( KNotifyClient::instance()->instanceName() ); + notify->notifyByExecute(commandline, TQString::null,appname,text, winId, 0 ); } return notify; @@ -422,10 +422,10 @@ KNotification *KNotification::userEvent( const QString& text, const QPixmap& pix #include "kopetenotifyevent.h" #include "kopetemetacontact.h" #include "kopeteuiglobal.h" -#include <qimage.h> +#include <tqimage.h> -static KNotification *performCustomNotifications( QWidget *widget, Kopete::MetaContact * mc, const QString &message, bool& suppress) +static KNotification *performCustomNotifications( TQWidget *widget, Kopete::MetaContact * mc, const TQString &message, bool& suppress) { KNotification *n=0L; //kdDebug( 14010 ) << k_funcinfo << endl; @@ -445,8 +445,8 @@ static KNotification *performCustomNotifications( QWidget *widget, Kopete::MetaC bool checkingMetaContact = true; Kopete::NotifyDataObject * dataObj = mc; do { - QString sound; - QString text; + TQString sound; + TQString text; if ( dataObj ) { @@ -479,7 +479,7 @@ static KNotification *performCustomNotifications( QWidget *widget, Kopete::MetaC evt->firePresentation( Kopete::EventPresentation::Chat ); } // fire the event - n=KNotification::userEvent( text, mc->photo(), widget, QStringList() , present, 0, sound, QString::null, QString::null , KNotification::CloseOnTimeout); + n=KNotification::userEvent( text, mc->photo(), widget, TQStringList() , present, 0, sound, TQString::null, TQString::null , KNotification::CloseOnTimeout); } } @@ -502,9 +502,9 @@ static KNotification *performCustomNotifications( QWidget *widget, Kopete::MetaC -KNotification *KNotification::event( Kopete::MetaContact *mc, const QString& message , - const QString& text, const QPixmap& pixmap, QWidget *widget, - const QStringList &actions, unsigned int flags) +KNotification *KNotification::event( Kopete::MetaContact *mc, const TQString& message , + const TQString& text, const TQPixmap& pixmap, TQWidget *widget, + const TQStringList &actions, unsigned int flags) { if (message.isEmpty()) return 0; diff --git a/kopete/libkopete/knotification.h b/kopete/libkopete/knotification.h index 83752f2f..a99f70d2 100644 --- a/kopete/libkopete/knotification.h +++ b/kopete/libkopete/knotification.h @@ -21,9 +21,9 @@ #define KNOTIFICATION_H -#include <qpixmap.h> -#include <qobject.h> -#include <qstringlist.h> +#include <tqpixmap.h> +#include <tqobject.h> +#include <tqstringlist.h> #include "kopete_export.h" class QWidget; @@ -91,7 +91,7 @@ public: * When the notification is activated, the widget might be raised. * Depending of the configuration, the taskbar entry of the window containing the widget may blink. */ - QWidget *widget(); + TQWidget *widget(); signals: /** @@ -139,21 +139,21 @@ public slots: private: struct Private; Private *d; - KNotification(QObject *parent=0L); + KNotification(TQObject *parent=0L); /** * recursive function that raise the widget. @p w * * @see raiseWidget() */ - static void raiseWidget(QWidget *w); + static void raiseWidget(TQWidget *w); bool m_linkClicked; private slots: void notifyByMessagebox(); - void notifyByPassivePopup(const QPixmap &pix); - void notifyByExecute(const QString &command, const QString& event,const QString& fromApp, const QString& text, int winId, int eventId); - void slotPopupLinkClicked(const QString &); + void notifyByPassivePopup(const TQPixmap &pix); + void notifyByExecute(const TQString &command, const TQString& event,const TQString& fromApp, const TQString& text, int winId, int eventId); + void slotPopupLinkClicked(const TQString &); public: @@ -168,7 +168,7 @@ public: * Make sure you use one of the CloseOnTimeOut or CloseWhenWidgetActivated, if not, * you have to close yourself the notification. * - * @note the text is shown in a QLabel, you should make sure to escape the html is needed. + * @note the text is shown in a TQLabel, you should make sure to escape the html is needed. * * @param eventId is the name of the event * @param text is the text of the notification to show in the popup. @@ -177,9 +177,9 @@ public: * @param actions is a list of action texts. * @param flags is a bitmask of NotificationsFlags */ - static KNotification *event( const QString& eventId , const QString& text=QString::null, - const QPixmap& pixmap=QPixmap(), QWidget *widget=0L, - const QStringList &actions=QStringList(), unsigned int flags=CloseOnTimeout); + static KNotification *event( const TQString& eventId , const TQString& text=TQString::null, + const TQPixmap& pixmap=TQPixmap(), TQWidget *widget=0L, + const TQStringList &actions=TQStringList(), unsigned int flags=CloseOnTimeout); /** @@ -196,19 +196,19 @@ public: * @param commandLine the command line to run if selected with @p parent * @param flags Indicates the way in which the notification should be handled */ - static KNotification *userEvent( const QString& text, const QPixmap& pixmap, - QWidget *widget, QStringList actions,int present, int level, - const QString &sound, const QString &file, - const QString &commandLine, unsigned int flags); + static KNotification *userEvent( const TQString& text, const TQPixmap& pixmap, + TQWidget *widget, TQStringList actions,int present, int level, + const TQString &sound, const TQString &file, + const TQString &commandLine, unsigned int flags); /** * @todo find a proper way to do context-dependent notifications */ - static KNotification *event( Kopete::MetaContact *mc, const QString& eventId , const QString& text=QString::null, - const QPixmap& pixmap=QPixmap(), QWidget *widget=0L, - const QStringList &actions=QStringList(),unsigned int flags=CloseOnTimeout); + static KNotification *event( Kopete::MetaContact *mc, const TQString& eventId , const TQString& text=TQString::null, + const TQPixmap& pixmap=TQPixmap(), TQWidget *widget=0L, + const TQStringList &actions=TQStringList(),unsigned int flags=CloseOnTimeout); }; diff --git a/kopete/libkopete/kopeteaccount.cpp b/kopete/libkopete/kopeteaccount.cpp index 52bb26bc..acce1da1 100644 --- a/kopete/libkopete/kopeteaccount.cpp +++ b/kopete/libkopete/kopeteaccount.cpp @@ -16,8 +16,8 @@ ************************************************************************* */ -#include <qapplication.h> -#include <qtimer.h> +#include <tqapplication.h> +#include <tqtimer.h> #include <kconfig.h> #include <kdebug.h> @@ -54,7 +54,7 @@ namespace Kopete class Account::Private { public: - Private( Protocol *protocol, const QString &accountId ) + Private( Protocol *protocol, const TQString &accountId ) : protocol( protocol ), id( accountId ) , excludeconnect( true ), priority( 0 ), myself( 0 ) , suppressStatusTimer( 0 ), suppressStatusNotification( false ) @@ -66,38 +66,38 @@ public: ~Private() { delete blackList; } Protocol *protocol; - QString id; - QString accountLabel; + TQString id; + TQString accountLabel; bool excludeconnect; uint priority; - QDict<Contact> contacts; - QColor color; + TQDict<Contact> contacts; + TQColor color; Contact *myself; - QTimer suppressStatusTimer; + TQTimer suppressStatusTimer; bool suppressStatusNotification; Kopete::BlackLister *blackList; KConfigGroup *configGroup; uint connectionTry; - QString customIcon; + TQString customIcon; Kopete::OnlineStatus restoreStatus; - QString restoreMessage; + TQString restoreMessage; }; -Account::Account( Protocol *parent, const QString &accountId, const char *name ) - : QObject( parent, name ), d( new Private( parent, accountId ) ) +Account::Account( Protocol *parent, const TQString &accountId, const char *name ) + : TQObject( parent, name ), d( new Private( parent, accountId ) ) { - d->configGroup=new KConfigGroup(KGlobal::config(), QString::fromLatin1( "Account_%1_%2" ).arg( d->protocol->pluginId(), d->id )); + d->configGroup=new KConfigGroup(KGlobal::config(), TQString::fromLatin1( "Account_%1_%2" ).arg( d->protocol->pluginId(), d->id )); d->excludeconnect = d->configGroup->readBoolEntry( "ExcludeConnect", false ); d->color = d->configGroup->readColorEntry( "Color", &d->color ); - d->customIcon = d->configGroup->readEntry( "Icon", QString() ); + d->customIcon = d->configGroup->readEntry( "Icon", TQString() ); d->priority = d->configGroup->readNumEntry( "Priority", 0 ); d->restoreStatus = Kopete::OnlineStatus::Online; d->restoreMessage = ""; - QObject::connect( &d->suppressStatusTimer, SIGNAL( timeout() ), - this, SLOT( slotStopSuppression() ) ); + TQObject::connect( &d->suppressStatusTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( slotStopSuppression() ) ); } Account::~Account() @@ -106,7 +106,7 @@ Account::~Account() // Delete all registered child contacts first while ( !d->contacts.isEmpty() ) - delete *QDictIterator<Contact>( d->contacts ); + delete *TQDictIterator<Contact>( d->contacts ); kdDebug( 14010 ) << k_funcinfo << " account '" << d->id << "' about to emit accountDestroyed " << endl; emit accountDestroyed(this); @@ -128,14 +128,14 @@ void Account::disconnected( DisconnectReason reason ) //reconnect if needed if(reason == BadPassword ) { - QTimer::singleShot(0, this, SLOT(reconnect())); + TQTimer::singleShot(0, this, TQT_SLOT(reconnect())); } else if ( KopetePrefs::prefs()->reconnectOnDisconnect() == true && reason > Manual ) { d->connectionTry++; //use a timer to allow the plugins to clean up after return if(d->connectionTry < 3) - QTimer::singleShot(10000, this, SLOT(reconnect())); // wait 10 seconds before reconnect + TQTimer::singleShot(10000, this, TQT_SLOT(reconnect())); // wait 10 seconds before reconnect } if(reason== OtherClient) { @@ -148,17 +148,17 @@ Protocol *Account::protocol() const return d->protocol; } -QString Account::accountId() const +TQString Account::accountId() const { return d->id; } -const QColor Account::color() const +const TQColor Account::color() const { return d->color; } -void Account::setColor( const QColor &color ) +void Account::setColor( const TQColor &color ) { d->color = color; if ( d->color.isValid() ) @@ -180,12 +180,12 @@ uint Account::priority() const } -QPixmap Account::accountIcon(const int size) const +TQPixmap Account::accountIcon(const int size) const { - QString icon= d->customIcon.isEmpty() ? d->protocol->pluginIcon() : d->customIcon; + TQString icon= d->customIcon.isEmpty() ? d->protocol->pluginIcon() : d->customIcon; // FIXME: this code is duplicated with OnlineStatus, can we merge it somehow? - QPixmap base = KGlobal::instance()->iconLoader()->loadIcon( + TQPixmap base = KGlobal::instance()->iconLoader()->loadIcon( icon, KIcon::Small, size ); if ( d->color.isValid() ) @@ -196,7 +196,7 @@ QPixmap Account::accountIcon(const int size) const if ( size > 0 && base.width() != size ) { - base = QPixmap( base.convertToImage().smoothScale( size, size ) ); + base = TQPixmap( base.convertToImage().smoothScale( size, size ) ); } return base; @@ -207,12 +207,12 @@ KConfigGroup* Kopete::Account::configGroup() const return d->configGroup; } -void Account::setAccountLabel( const QString &label ) +void Account::setAccountLabel( const TQString &label ) { d->accountLabel = label; } -QString Account::accountLabel() const +TQString Account::accountLabel() const { if( d->accountLabel.isNull() ) return d->id; @@ -233,8 +233,8 @@ bool Account::excludeConnect() const void Account::registerContact( Contact *c ) { d->contacts.insert( c->contactId(), c ); - QObject::connect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), - SLOT( contactDestroyed( Kopete::Contact * ) ) ); + TQObject::connect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), + TQT_SLOT( contactDestroyed( Kopete::Contact * ) ) ); } void Account::contactDestroyed( Contact *c ) @@ -243,13 +243,13 @@ void Account::contactDestroyed( Contact *c ) } -const QDict<Contact>& Account::contacts() +const TQDict<Contact>& Account::contacts() { return d->contacts; } -Kopete::MetaContact* Account::addContact( const QString &contactId, const QString &displayName , Group *group, AddMode mode ) +Kopete::MetaContact* Account::addContact( const TQString &contactId, const TQString &displayName , Group *group, AddMode mode ) { if ( contactId == d->myself->contactId() ) @@ -316,7 +316,7 @@ Kopete::MetaContact* Account::addContact( const QString &contactId, const QStrin return parentContact; } -bool Account::addContact(const QString &contactId , MetaContact *parent, AddMode mode ) +bool Account::addContact(const TQString &contactId , MetaContact *parent, AddMode mode ) { if ( contactId == myself()->contactId() ) { @@ -362,7 +362,7 @@ KActionMenu * Account::actionMenu() { //default implementation KActionMenu *menu = new KActionMenu( accountId(), myself()->onlineStatus().iconFor( this ), this ); - QString nick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString nick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(); menu->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ), nick.isNull() ? accountLabel() : i18n( "%2 <%1>" ).arg( accountLabel(), nick ) @@ -370,7 +370,7 @@ KActionMenu * Account::actionMenu() OnlineStatusManager::self()->createAccountStatusActions(this, menu); menu->popupMenu()->insertSeparator(); - menu->insert( new KAction ( i18n( "Properties" ), 0, this, SLOT( editAccount() ), menu, "actionAccountProperties" ) ); + menu->insert( new KAction ( i18n( "Properties" ), 0, this, TQT_SLOT( editAccount() ), menu, "actionAccountProperties" ) ); return menu; } @@ -397,20 +397,20 @@ void Account::setMyself( Contact *myself ) if ( d->myself ) { - QObject::disconnect( d->myself, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - QObject::disconnect( d->myself, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotContactPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ); + TQObject::disconnect( d->myself, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + TQObject::disconnect( d->myself, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotContactPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ); } d->myself = myself; // d->contacts.remove( myself->contactId() ); - QObject::connect( d->myself, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - QObject::connect( d->myself, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotContactPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ); + TQObject::connect( d->myself, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + TQObject::connect( d->myself, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotContactPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ); if ( isConnected() != wasConnected ) emit isConnectedChanged(); @@ -454,15 +454,15 @@ void Account::setAllContactsStatus( const Kopete::OnlineStatus &status ) d->suppressStatusNotification = true; d->suppressStatusTimer.start( 5000, true ); - for ( QDictIterator<Contact> it( d->contacts ); it.current(); ++it ) + for ( TQDictIterator<Contact> it( d->contacts ); it.current(); ++it ) if ( it.current() != d->myself ) it.current()->setOnlineStatus( status ); } void Account::slotContactPropertyChanged( Contact * /* contact */, - const QString &key, const QVariant &old, const QVariant &newVal ) + const TQString &key, const TQVariant &old, const TQVariant &newVal ) { - if ( key == QString::fromLatin1("awayMessage") && old != newVal && isConnected() ) + if ( key == TQString::fromLatin1("awayMessage") && old != newVal && isConnected() ) { d->restoreMessage = newVal.toString(); // kdDebug( 14010 ) << k_funcinfo << "account " << d->id << " restoreMessage " << d->restoreMessage << endl; @@ -493,22 +493,22 @@ BlackLister* Account::blackLister() return d->blackList; } -void Account::block( const QString &contactId ) +void Account::block( const TQString &contactId ) { d->blackList->addContact( contactId ); } -void Account::unblock( const QString &contactId ) +void Account::unblock( const TQString &contactId ) { d->blackList->removeContact( contactId ); } -bool Account::isBlocked( const QString &contactId ) +bool Account::isBlocked( const TQString &contactId ) { return d->blackList->isBlocked( contactId ); } -void Account::editAccount(QWidget *parent) +void Account::editAccount(TQWidget *parent) { KDialogBase *editDialog = new KDialogBase( parent, "KopeteAccountConfig::editDialog", true, i18n( "Edit Account" ), KDialogBase::Ok | KDialogBase::Cancel, @@ -521,15 +521,15 @@ void Account::editAccount(QWidget *parent) // FIXME: Why the #### is EditAccountWidget not a QWidget?!? This sideways casting // is braindead and error-prone. Looking at MSN the only reason I can see is // because it allows direct subclassing of designer widgets. But what is - // wrong with embedding the designer widget in an empty QWidget instead? + // wrong with embedding the designer widget in an empty TQWidget instead? // Also, if this REALLY has to be a pure class and not a widget, then the // class should at least be renamed to EditAccountIface instead - Martijn - QWidget *w = dynamic_cast<QWidget *>( m_accountWidget ); + TQWidget *w = dynamic_cast<TQWidget *>( m_accountWidget ); if ( !w ) return; editDialog->setMainWidget( w ); - if ( editDialog->exec() == QDialog::Accepted ) + if ( editDialog->exec() == TQDialog::Accepted ) { if( m_accountWidget->validateData() ) m_accountWidget->apply(); @@ -538,22 +538,22 @@ void Account::editAccount(QWidget *parent) editDialog->deleteLater(); } -void Account::setPluginData( Plugin* /*plugin*/, const QString &key, const QString &value ) +void Account::setPluginData( Plugin* /*plugin*/, const TQString &key, const TQString &value ) { configGroup()->writeEntry(key,value); } -QString Account::pluginData( Plugin* /*plugin*/, const QString &key ) const +TQString Account::pluginData( Plugin* /*plugin*/, const TQString &key ) const { return configGroup()->readEntry(key); } -void Account::setAway(bool away, const QString& reason) +void Account::setAway(bool away, const TQString& reason) { setOnlineStatus( OnlineStatusManager::self()->onlineStatus(protocol() , away ? OnlineStatusManager::Away : OnlineStatusManager::Online) , reason ); } -void Account::setCustomIcon( const QString & i) +void Account::setCustomIcon( const TQString & i) { d->customIcon = i; if(!i.isEmpty()) @@ -563,7 +563,7 @@ void Account::setCustomIcon( const QString & i) emit colorChanged( color() ); } -QString Account::customIcon() const +TQString Account::customIcon() const { return d->customIcon; } diff --git a/kopete/libkopete/kopeteaccount.h b/kopete/libkopete/kopeteaccount.h index f3c2d338..4e905d31 100644 --- a/kopete/libkopete/kopeteaccount.h +++ b/kopete/libkopete/kopeteaccount.h @@ -23,8 +23,8 @@ #include "kopete_export.h" -#include <qobject.h> -#include <qdict.h> +#include <tqobject.h> +#include <tqdict.h> class QDomNode; class KActionMenu; @@ -68,10 +68,10 @@ class KOPETE_EXPORT Account : public QObject Q_OBJECT Q_ENUMS( AddMode ) - Q_PROPERTY( QString accountId READ accountId ) + Q_PROPERTY( TQString accountId READ accountId ) Q_PROPERTY( bool excludeConnect READ excludeConnect WRITE setExcludeConnect ) - Q_PROPERTY( QColor color READ color WRITE setColor ) - Q_PROPERTY( QPixmap accountIcon READ accountIcon ) + Q_PROPERTY( TQColor color READ color WRITE setColor ) + Q_PROPERTY( TQPixmap accountIcon READ accountIcon ) Q_PROPERTY( bool isConnected READ isConnected ) Q_PROPERTY( bool isAway READ isAway ) Q_PROPERTY( bool suppressStatusNotification READ suppressStatusNotification ) @@ -100,9 +100,9 @@ public: * @param parent the protocol for this account. The account is a child object of the * protocol, so it will be automatically deleted when the protocol is. * @param accountID the unique ID of this account. - * @param name the name of this QObject. + * @param name the name of this TQObject. */ - Account(Protocol *parent, const QString &accountID, const char *name=0L); + Account(Protocol *parent, const TQString &accountID, const char *name=0L); ~Account(); /** @@ -113,12 +113,12 @@ public: /** * \return the unique ID of this account used as the login */ - QString accountId() const; + TQString accountId() const; /** * \return The label of this account, for the GUI */ - QString accountLabel() const; + TQString accountLabel() const; /** * \brief Get the priority of this account. @@ -157,7 +157,7 @@ public: * * \return the user color for this account */ - const QColor color() const; + const TQColor color() const; /** * \brief Set the color for this account. @@ -166,7 +166,7 @@ public: * * @sa @ref color() */ - void setColor( const QColor &color); + void setColor( const TQColor &color); /** * \brief Get the icon for this account. @@ -176,23 +176,23 @@ public: * @param size the size of the icon. If the size is 0, the default size is used. * @return the icon for this account, colored if needed */ - QPixmap accountIcon( const int size = 0 ) const; + TQPixmap accountIcon( const int size = 0 ) const; /** * \brief change the account icon. * by default the icon of an account is the protocol one, but it may be overide it. - * Set QString::null to go back to the default (the protocol icon) + * Set TQString::null to go back to the default (the protocol icon) * * this call will emit colorChanged() */ - void setCustomIcon( const QString& ); + void setCustomIcon( const TQString& ); /** * \brief return the icon base * This is the custom account icon set with setIcon. if this icon is null, then the protocol icon is used * don't use this funciton to get the icon that need to be displayed, use accountIcon */ - QString customIcon() const; + TQString customIcon() const; @@ -229,7 +229,7 @@ public: * so you can safely use static_cast to your own derived contact class * if needed. */ - const QDict<Contact>& contacts(); + const TQDict<Contact>& contacts(); /** * Indicates whether or not we should suppress status notifications @@ -264,13 +264,13 @@ public: * If @p mode is @c DontChangeKABC, no additional action is carried out. * * @param contactId the @ref Contact::contactId of the contact to create - * @param displayName the displayname (alias) of the new metacontact. Leave as QString::null if + * @param displayName the displayname (alias) of the new metacontact. Leave as TQString::null if * no alias is known, then by default, the nick will be taken as alias and tracked if changed. * @param group the group to add the created metacontact to, or 0 for the top-level group. * @param mode the mode used to add the contact. Use DontChangeKABC when deserializing. * @return the new created metacontact or 0L if the operation failed */ - MetaContact* addContact( const QString &contactId, const QString &displayName = QString::null, Group *group = 0, AddMode mode = DontChangeKABC ) ; + MetaContact* addContact( const TQString &contactId, const TQString &displayName = TQString::null, Group *group = 0, AddMode mode = DontChangeKABC ) ; /** * @brief Create a new contact, adding it to an existing metacontact @@ -280,12 +280,12 @@ public: * * @param contactId the @ref Contact::contactId of the contact to create * @param parent the parent metacontact (must not be 0) - * @param mode the mode used to add the contact. See addContact(const QString&,const QString&,Group*,AddMode) for details. + * @param mode the mode used to add the contact. See addContact(const TQString&,const TQString&,Group*,AddMode) for details. * * @return @c true if creation of the contact succeeded or the contact was already in the list, * @c false otherwise. */ - bool addContact( const QString &contactId, MetaContact *parent, AddMode mode = DontChangeKABC ); + bool addContact( const TQString &contactId, MetaContact *parent, AddMode mode = DontChangeKABC ); /** * @brief Indicate whether the account is connected at all. @@ -338,7 +338,7 @@ public: /** * \return @c true if the contact with ID @p contactId is in the blacklist, @c false otherwise. */ - virtual bool isBlocked( const QString &contactId ); + virtual bool isBlocked( const TQString &contactId ); protected: /** @@ -372,7 +372,7 @@ protected: * @param parentContact the metacontact to add this contact to * @return @c true if creating the contact succeeded, @c false on failure. */ - virtual bool createContact( const QString &contactId, MetaContact *parentContact ) =0; + virtual bool createContact( const TQString &contactId, MetaContact *parentContact ) =0; /** @@ -380,7 +380,7 @@ protected: * * @param label The label to set */ - void setAccountLabel( const QString &label ); + void setAccountLabel( const TQString &label ); protected slots: /** @@ -417,7 +417,7 @@ signals: * also emited when the icon change * @todo probably rename to accountIconChanged */ - void colorChanged( const QColor & ); + void colorChanged( const TQColor & ); /** * Emitted when the account is deleted. @@ -470,7 +470,7 @@ public slots: * * @todo change ; make use of setOnlineStatus */ - virtual void setAway( bool away, const QString &reason = QString::null ); + virtual void setAway( bool away, const TQString &reason = TQString::null ); /** * Reimplement this function to set the online status @@ -478,12 +478,12 @@ public slots: * @param reason is the away message to set. * @note If needed, you need to connect. if the offline status is given, you should disconnect */ - virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null ) = 0; + virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null ) = 0; /** * Display the edit account widget for the account */ - void editAccount( QWidget* parent = 0L ); + void editAccount( TQWidget* parent = 0L ); /** * Add a user to the blacklist. The default implementation calls @@ -491,7 +491,7 @@ public slots: * * @param contactId the contact to be added to the blacklist */ - virtual void block( const QString &contactId ); + virtual void block( const TQString &contactId ); /** * Remove a user from the blacklist. The default implementation calls @@ -499,7 +499,7 @@ public slots: * * @param contactId the contact to be removed from the blacklist */ - virtual void unblock( const QString &contactId ); + virtual void unblock( const TQString &contactId ); private slots: /** @@ -520,7 +520,7 @@ private slots: /** * The @ref myself() contact's property changed. */ - void slotContactPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ); + void slotContactPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ); /** * Stop the suppression of status notification (connected to a timer) @@ -539,13 +539,13 @@ public: * @todo remove * @deprecated use configGroup */ - void setPluginData( Plugin* /*plugin*/, const QString &key, const QString &value ) KDE_DEPRECATED; + void setPluginData( Plugin* /*plugin*/, const TQString &key, const TQString &value ) KDE_DEPRECATED; /** * @todo remove * @deprecated use configGroup */ - QString pluginData( Plugin* /*plugin*/, const QString &key ) const KDE_DEPRECATED; + TQString pluginData( Plugin* /*plugin*/, const TQString &key ) const KDE_DEPRECATED; }; } //END namespace Kopete diff --git a/kopete/libkopete/kopeteaccountmanager.cpp b/kopete/libkopete/kopeteaccountmanager.cpp index b00f080e..d12aa7ce 100644 --- a/kopete/libkopete/kopeteaccountmanager.cpp +++ b/kopete/libkopete/kopeteaccountmanager.cpp @@ -18,9 +18,9 @@ #include "kopeteaccountmanager.h" -#include <qapplication.h> -#include <qregexp.h> -#include <qtimer.h> +#include <tqapplication.h> +#include <tqregexp.h> +#include <tqtimer.h> #include <kconfig.h> #include <kdebug.h> @@ -44,7 +44,7 @@ class AccountManager::Private { public: - class AccountPtrList : public QPtrList<Account> + class AccountPtrList : public TQPtrList<Account> { protected: int compareItems( AccountPtrList::Item a, AccountPtrList::Item b ) @@ -75,7 +75,7 @@ AccountManager * AccountManager::self() AccountManager::AccountManager() -: QObject( qApp, "KopeteAccountManager" ) +: TQObject( qApp, "KopeteAccountManager" ) { d = new Private; } @@ -90,7 +90,7 @@ AccountManager::~AccountManager() bool AccountManager::isAnyAccountConnected() { - for ( QPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) { if(it.current()->isConnected()) return true; @@ -100,17 +100,17 @@ bool AccountManager::isAnyAccountConnected() void AccountManager::connectAll() { - for ( QPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) if(!it.current()->excludeConnect()) it.current()->connect(); } -void AccountManager::setAvailableAll( const QString &awayReason ) +void AccountManager::setAvailableAll( const TQString &awayReason ) { Away::setGlobalAway( false ); bool anyConnected = isAnyAccountConnected(); - for ( QPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) { if ( anyConnected ) { @@ -125,16 +125,16 @@ void AccountManager::setAvailableAll( const QString &awayReason ) void AccountManager::disconnectAll() { - for ( QPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) it.current()->disconnect(); } -void AccountManager::setAwayAll( const QString &awayReason, bool away ) +void AccountManager::setAwayAll( const TQString &awayReason, bool away ) { Away::setGlobalAway( true ); bool anyConnected = isAnyAccountConnected(); - for ( QPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) { // FIXME: ICQ's invisible online should be set to invisible away Contact *self = it.current()->myself(); @@ -152,12 +152,12 @@ void AccountManager::setAwayAll( const QString &awayReason, bool away ) } } -void AccountManager::setOnlineStatus( uint category , const QString& awayMessage, uint flags ) +void AccountManager::setOnlineStatus( uint category , const TQString& awayMessage, uint flags ) { OnlineStatusManager::Categories katgor=(OnlineStatusManager::Categories)category; bool anyConnected = isAnyAccountConnected(); - for ( QPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) { Account *account = it.current(); Kopete::OnlineStatus status = OnlineStatusManager::self()->onlineStatus(account->protocol() , katgor); @@ -175,25 +175,25 @@ void AccountManager::setOnlineStatus( uint category , const QString& awayMessage } -QColor AccountManager::guessColor( Protocol *protocol ) const +TQColor AccountManager::guessColor( Protocol *protocol ) const { // In a perfect wold, we should check if the color is actually not used by the account. // Anyway, this is not really required, It would be a difficult job for about nothing more. // -- Olivier int protocolCount = 0; - for ( QPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) { if ( it.current()->protocol()->pluginId() == protocol->pluginId() ) protocolCount++; } // let's figure a color - QColor color; + TQColor color; switch ( protocolCount % 7 ) { case 0: - color = QColor(); + color = TQColor(); break; case 1: color = Qt::red; @@ -230,7 +230,7 @@ Account* AccountManager::registerAccount( Account *account ) } // If this account already exists, do nothing - for ( QPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) { if ( ( account->protocol() == it.current()->protocol() ) && ( account->accountId() == it.current()->accountId() ) ) { @@ -243,12 +243,12 @@ Account* AccountManager::registerAccount( Account *account ) d->accounts.sort(); // Connect to the account's status changed signal - connect(account->myself(), SIGNAL(onlineStatusChanged(Kopete::Contact *, + connect(account->myself(), TQT_SIGNAL(onlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &)), - this, SLOT(slotAccountOnlineStatusChanged(Kopete::Contact *, + this, TQT_SLOT(slotAccountOnlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &))); - connect(account, SIGNAL(accountDestroyed(const Kopete::Account *)) , this, SLOT( unregisterAccount(const Kopete::Account *) )); + connect(account, TQT_SIGNAL(accountDestroyed(const Kopete::Account *)) , this, TQT_SLOT( unregisterAccount(const Kopete::Account *) )); emit accountRegistered( account ); return account; @@ -261,15 +261,15 @@ void AccountManager::unregisterAccount( const Account *account ) emit accountUnregistered( account ); } -const QPtrList<Account>& AccountManager::accounts() const +const TQPtrList<Account>& AccountManager::accounts() const { return d->accounts; } -QDict<Account> AccountManager::accounts( const Protocol *protocol ) const +TQDict<Account> AccountManager::accounts( const Protocol *protocol ) const { - QDict<Account> dict; - for ( QPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) + TQDict<Account> dict; + for ( TQPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) { if ( it.current()->protocol() == protocol && !it.current()->accountId().isNull() ) dict.insert( it.current()->accountId(), it.current() ); @@ -278,9 +278,9 @@ QDict<Account> AccountManager::accounts( const Protocol *protocol ) const return dict; } -Account * AccountManager::findAccount( const QString &protocolId, const QString &accountId ) +Account * AccountManager::findAccount( const TQString &protocolId, const TQString &accountId ) { - for ( QPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) { if ( it.current()->protocol()->pluginId() == protocolId && it.current()->accountId() == accountId ) return it.current(); @@ -299,7 +299,7 @@ void AccountManager::removeAccount( Account *account ) KConfigGroup *configgroup = account->configGroup(); // Clean up the contact list - QDictIterator<Kopete::Contact> it( account->contacts() ); + TQDictIterator<Kopete::Contact> it( account->contacts() ); for ( ; it.current(); ++it ) { Contact* c = it.current(); @@ -312,7 +312,7 @@ void AccountManager::removeAccount( Account *account ) { //get the first group and it's members Group* group = mc->groups().first(); - QPtrList<MetaContact> groupMembers = group->members(); + TQPtrList<MetaContact> groupMembers = group->members(); ContactList::self()->removeMetaContact( mc ); if ( groupMembers.count() == 1 && groupMembers.findRef( mc ) != -1 ) ContactList::self()->removeGroup( group ); @@ -332,7 +332,7 @@ void AccountManager::removeAccount( Account *account ) { // FIXME: pluginId() should return the internal name and not the class name, so // we can get rid of this hack - Olivier/Martijn - QString protocolName = protocol->pluginId().remove( QString::fromLatin1( "Protocol" ) ).lower(); + TQString protocolName = protocol->pluginId().remove( TQString::fromLatin1( "Protocol" ) ).lower(); PluginManager::self()->setPluginEnabled( protocolName, false ); PluginManager::self()->unloadPlugin( protocolName ); @@ -344,7 +344,7 @@ void AccountManager::save() //kdDebug( 14010 ) << k_funcinfo << endl; d->accounts.sort(); - for ( QPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) { KConfigBase *config = it.current()->configGroup(); @@ -357,22 +357,22 @@ void AccountManager::save() void AccountManager::load() { - connect( PluginManager::self(), SIGNAL( pluginLoaded( Kopete::Plugin * ) ), - this, SLOT( slotPluginLoaded( Kopete::Plugin * ) ) ); + connect( PluginManager::self(), TQT_SIGNAL( pluginLoaded( Kopete::Plugin * ) ), + this, TQT_SLOT( slotPluginLoaded( Kopete::Plugin * ) ) ); // Iterate over all groups that start with "Account_" as those are accounts // and load the required protocols if the account is enabled. // Don't try to optimize duplicate calls out, the plugin queue is smart enough // (and fast enough) to handle that without adding complexity here KConfig *config = KGlobal::config(); - QStringList accountGroups = config->groupList().grep( QRegExp( QString::fromLatin1( "^Account_" ) ) ); - for ( QStringList::Iterator it = accountGroups.begin(); it != accountGroups.end(); ++it ) + TQStringList accountGroups = config->groupList().grep( TQRegExp( TQString::fromLatin1( "^Account_" ) ) ); + for ( TQStringList::Iterator it = accountGroups.begin(); it != accountGroups.end(); ++it ) { config->setGroup( *it ); - QString protocol = config->readEntry( "Protocol" ); - if ( protocol.endsWith( QString::fromLatin1( "Protocol" ) ) ) - protocol = QString::fromLatin1( "kopete_" ) + protocol.lower().remove( QString::fromLatin1( "protocol" ) ); + TQString protocol = config->readEntry( "Protocol" ); + if ( protocol.endsWith( TQString::fromLatin1( "Protocol" ) ) ) + protocol = TQString::fromLatin1( "kopete_" ) + protocol.lower().remove( TQString::fromLatin1( "protocol" ) ); if ( config->readBoolEntry( "Enabled", true ) ) PluginManager::self()->loadPlugin( protocol, PluginManager::LoadAsync ); @@ -388,8 +388,8 @@ void AccountManager::slotPluginLoaded( Plugin *plugin ) // Iterate over all groups that start with "Account_" as those are accounts // and parse them if they are from this protocol KConfig *config = KGlobal::config(); - QStringList accountGroups = config->groupList().grep( QRegExp( QString::fromLatin1( "^Account_" ) ) ); - for ( QStringList::Iterator it = accountGroups.begin(); it != accountGroups.end(); ++it ) + TQStringList accountGroups = config->groupList().grep( TQRegExp( TQString::fromLatin1( "^Account_" ) ) ); + for ( TQStringList::Iterator it = accountGroups.begin(); it != accountGroups.end(); ++it ) { config->setGroup( *it ); @@ -400,7 +400,7 @@ void AccountManager::slotPluginLoaded( Plugin *plugin ) if ( !config->readBoolEntry( "Enabled", true ) ) continue; - QString accountId = config->readEntry( "AccountId" ); + TQString accountId = config->readEntry( "AccountId" ); if ( accountId.isEmpty() ) { kdWarning( 14010 ) << k_funcinfo << diff --git a/kopete/libkopete/kopeteaccountmanager.h b/kopete/libkopete/kopeteaccountmanager.h index ed0c939a..75ebf667 100644 --- a/kopete/libkopete/kopeteaccountmanager.h +++ b/kopete/libkopete/kopeteaccountmanager.h @@ -19,9 +19,9 @@ #ifndef __kopeteaccountmanager_h__ #define __kopeteaccountmanager_h__ -#include <qobject.h> -#include <qptrlist.h> -#include <qdict.h> +#include <tqobject.h> +#include <tqptrlist.h> +#include <tqdict.h> #include "kopete_export.h" @@ -65,16 +65,16 @@ public: * \brief Retrieve the list of accounts * \return a list of all the accounts */ - const QPtrList<Account> & accounts() const; + const TQPtrList<Account> & accounts() const; /** - * \brief Retrieve a QDict of accounts for the given protocol + * \brief Retrieve a TQDict of accounts for the given protocol * * The list is guaranteed to contain only accounts for the specified * protocol * \param p is the Protocol object you want accounts for */ - QDict<Account> accounts( const Protocol *p ) const; + TQDict<Account> accounts( const Protocol *p ) const; /** * \brief Return the account asked @@ -82,7 +82,7 @@ public: * \param accountId is the ID for the account you want * \return the Account object found or NULL if no account was found */ - Account* findAccount( const QString &protocolId, const QString &accountId ); + Account* findAccount( const TQString &protocolId, const TQString &accountId ); /** * \brief Delete the account and clean the config data @@ -97,7 +97,7 @@ public: * Guesses a color for the next account of a given protocol based on the already registered colors * \return the color guessed for the account */ - QColor guessColor( Protocol *protocol ) const ; + TQColor guessColor( Protocol *protocol ) const ; /** * @brief Register the account. @@ -142,7 +142,7 @@ public slots: * @param flags is a bitmask of SetOnlineStatusFlag */ void setOnlineStatus( /*Kopete::OnlineStatusManager::Categories*/ uint category, - const QString& awayMessage = QString::null, uint flags=0); + const TQString& awayMessage = TQString::null, uint flags=0); /** * \brief Set all accounts to away at once. @@ -152,7 +152,7 @@ public slots: * @param awayReason is the away message that will be set. * @param away decides whether the message is away/non-away */ - void setAwayAll( const QString &awayReason = QString::null, bool away=true ); + void setAwayAll( const TQString &awayReason = TQString::null, bool away=true ); /** * \brief Connect or make available every account. @@ -162,7 +162,7 @@ public slots: * This is a slot, so you can connect directly to it from e.g. a KAction. * @param awayReason is the away(status) message that will be set. */ - void setAvailableAll( const QString &awayReason = QString::null ); + void setAvailableAll( const TQString &awayReason = TQString::null ); /** * \internal diff --git a/kopete/libkopete/kopeteaway.cpp b/kopete/libkopete/kopeteaway.cpp index fa500e0c..1c920f31 100644 --- a/kopete/libkopete/kopeteaway.cpp +++ b/kopete/libkopete/kopeteaway.cpp @@ -30,7 +30,7 @@ #include "kopeteprefs.h" #include <kconfig.h> -#include <qtimer.h> +#include <tqtimer.h> #include <kapplication.h> #include <dcopref.h> @@ -59,18 +59,18 @@ struct KopeteAwayPrivate { - QString awayMessage; - QString autoAwayMessage; + TQString awayMessage; + TQString autoAwayMessage; bool useAutoAwayMessage; bool globalAway; - QStringList awayMessageList; - QTime idleTime; - QTimer *timer; + TQStringList awayMessageList; + TQTime idleTime; + TQTimer *timer; bool autoaway; bool goAvailable; int awayTimeout; bool useAutoAway; - QPtrList<Kopete::Account> autoAwayAccounts; + TQPtrList<Kopete::Account> autoAwayAccounts; int mouse_x; int mouse_y; @@ -87,7 +87,7 @@ struct KopeteAwayPrivate Kopete::Away *Kopete::Away::instance = 0L; -Kopete::Away::Away() : QObject( kapp , "Kopete::Away") +Kopete::Away::Away() : TQObject( kapp , "Kopete::Away") { int dummy = 0; dummy = dummy; // shut up @@ -95,8 +95,8 @@ Kopete::Away::Away() : QObject( kapp , "Kopete::Away") d = new KopeteAwayPrivate; // Set up the away messages - d->awayMessage = QString::null; - d->autoAwayMessage = QString::null; + d->awayMessage = TQString::null; + d->autoAwayMessage = TQString::null; d->useAutoAwayMessage = false; d->globalAway = false; d->autoaway = false; @@ -143,7 +143,7 @@ Kopete::Away::Away() : QObject( kapp , "Kopete::Away") load(); - KSettings::Dispatcher::self()->registerInstance( KGlobal::instance(), this, SLOT( load() ) ); + KSettings::Dispatcher::self()->registerInstance( KGlobal::instance(), this, TQT_SLOT( load() ) ); // Set up the config object KConfig *config = KGlobal::config(); /* Load the saved away messages */ @@ -156,8 +156,8 @@ Kopete::Away::Away() : QObject( kapp , "Kopete::Away") } else if(config->hasKey("Titles")) // Old config format { - QStringList titles = config->readListEntry("Titles"); // Get the titles - for(QStringList::iterator i = titles.begin(); i != titles.end(); ++i) + TQStringList titles = config->readListEntry("Titles"); // Get the titles + for(TQStringList::iterator i = titles.begin(); i != titles.end(); ++i) { d->awayMessageList.append( config->readEntry(*i) ); // And add it to the list } @@ -188,8 +188,8 @@ Kopete::Away::Away() : QObject( kapp , "Kopete::Away") } // init the timer - d->timer = new QTimer(this, "AwayTimer"); - connect(d->timer, SIGNAL(timeout()), this, SLOT(slotTimerTimeout())); + d->timer = new TQTimer(this, "AwayTimer"); + connect(d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimerTimeout())); d->timer->start(4000); //init the time and other @@ -203,17 +203,17 @@ Kopete::Away::~Away() delete d; } -QString Kopete::Away::message() +TQString Kopete::Away::message() { return getInstance()->d->awayMessage; } -QString Kopete::Away::autoAwayMessage() +TQString Kopete::Away::autoAwayMessage() { return getInstance()->d->autoAwayMessage; } -void Kopete::Away::setGlobalAwayMessage(const QString &message) +void Kopete::Away::setGlobalAwayMessage(const TQString &message) { if( !message.isEmpty() ) { @@ -223,7 +223,7 @@ void Kopete::Away::setGlobalAwayMessage(const QString &message) } } -void Kopete::Away::setAutoAwayMessage(const QString &message) +void Kopete::Away::setAutoAwayMessage(const TQString &message) { if( !message.isEmpty() ) { @@ -275,17 +275,17 @@ void Kopete::Away::load() d->useAutoAwayMessage=config->readBoolEntry("UseAutoAwayMessage", false); } -QStringList Kopete::Away::getMessages() +TQStringList Kopete::Away::getMessages() { return d->awayMessageList; } -QString Kopete::Away::getMessage( uint messageNumber ) +TQString Kopete::Away::getMessage( uint messageNumber ) { - QStringList::iterator it = d->awayMessageList.at( messageNumber ); + TQStringList::iterator it = d->awayMessageList.at( messageNumber ); if( it != d->awayMessageList.end() ) { - QString str = *it; + TQString str = *it; d->awayMessageList.prepend( str ); d->awayMessageList.remove( it ); save(); @@ -293,11 +293,11 @@ QString Kopete::Away::getMessage( uint messageNumber ) } else { - return QString::null; + return TQString::null; } } -void Kopete::Away::addMessage(const QString &message) +void Kopete::Away::addMessage(const TQString &message) { d->awayMessageList.prepend( message ); if( (int)d->awayMessageList.count() > KopetePrefs::prefs()->rememberedMessages() ) @@ -496,7 +496,7 @@ void Kopete::Away::setAutoAway() // Set all accounts that are not away already to away. // We remember them so later we only set the accounts to // available that we set to away (and not the user). - QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *i=accounts.first() ; i; i=accounts.next() ) { if(i->myself()->onlineStatus().status() == Kopete::OnlineStatus::Online) diff --git a/kopete/libkopete/kopeteaway.h b/kopete/libkopete/kopeteaway.h index 544dff75..b907f024 100644 --- a/kopete/libkopete/kopeteaway.h +++ b/kopete/libkopete/kopeteaway.h @@ -19,9 +19,9 @@ #ifndef KOPETEAWAY_HI #define KOPETEAWAY_HI -#include <qstring.h> -#include <qobject.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqobject.h> +#include <tqvaluelist.h> #include "kopeteawaydialog.h" #include "kopete_export.h" @@ -72,13 +72,13 @@ public: * @brief Gets the current global away message * @return The global away message */ - static QString message(); + static TQString message(); /** * @brief Gets the current global auto away message * @return The global auto away message */ - static QString autoAwayMessage(); + static TQString autoAwayMessage(); /** * This method sets the global away message, @@ -86,7 +86,7 @@ public: * @brief Sets the global away message * @param message The message you want to set */ - void setGlobalAwayMessage(const QString &message); + void setGlobalAwayMessage(const TQString &message); /** * This method sets the global auto away message, @@ -94,7 +94,7 @@ public: * @brief Sets the global auto away message * @param message The message you want to set */ - void setAutoAwayMessage(const QString &message); + void setAutoAwayMessage(const TQString &message); /** * @brief Sets global away for all protocols @@ -111,11 +111,11 @@ public: * @brief Function to get the titles of user defined away messages * @return List of away message titles * - * This function can be used to retrieve a QStringList of the away message titles, - * these titles can be passed to getMessage(QString title) to retrieve the + * This function can be used to retrieve a TQStringList of the away message titles, + * these titles can be passed to getMessage(TQString title) to retrieve the * corresponding message. */ - QStringList getMessages(); + TQStringList getMessages(); /** * @brief Function to get an away message @@ -125,7 +125,7 @@ public: * This function retrieves the away message that corresponds to the ringbuffer index * passed in. */ - QString getMessage( uint messageNumber ); + TQString getMessage( uint messageNumber ); /** * @brief Adds an away message to the ringbuffer @@ -134,7 +134,7 @@ public: * This function will add an away message to the ringbuffer of user defined * away messages. */ - void addMessage(const QString &message); + void addMessage(const TQString &message); /** * time in seconds the user has been idle diff --git a/kopete/libkopete/kopeteawayaction.cpp b/kopete/libkopete/kopeteawayaction.cpp index 84622c7e..ded2a830 100644 --- a/kopete/libkopete/kopeteawayaction.cpp +++ b/kopete/libkopete/kopeteawayaction.cpp @@ -36,34 +36,34 @@ public: }; -AwayAction::AwayAction(const QString &text, const QIconSet &pix, const KShortcut &cut, - const QObject *receiver, const char *slot, QObject *parent, const char *name ) +AwayAction::AwayAction(const TQString &text, const TQIconSet &pix, const KShortcut &cut, + const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) : KSelectAction(text, pix, cut, parent, name ) , d(new Private( OnlineStatus() ) ) { - QObject::connect( Kopete::Away::getInstance(), SIGNAL( messagesChanged() ), - this, SLOT( slotAwayChanged() ) ); + TQObject::connect( Kopete::Away::getInstance(), TQT_SIGNAL( messagesChanged() ), + this, TQT_SLOT( slotAwayChanged() ) ); - QObject::connect( this, SIGNAL( awayMessageSelected( const QString & ) ), + TQObject::connect( this, TQT_SIGNAL( awayMessageSelected( const TQString & ) ), receiver, slot ); - QObject::connect( this, SIGNAL( activated( int ) ), - this, SLOT( slotSelectAway( int ) ) ); + TQObject::connect( this, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotSelectAway( int ) ) ); slotAwayChanged(); } -AwayAction::AwayAction( const OnlineStatus& status, const QString &text, const QIconSet &pix, const KShortcut &cut, - const QObject *receiver, const char *slot, QObject *parent, const char *name ) +AwayAction::AwayAction( const OnlineStatus& status, const TQString &text, const TQIconSet &pix, const KShortcut &cut, + const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) : KSelectAction(text, pix, cut, parent, name ) , d(new Private( status ) ) { - QObject::connect( Kopete::Away::getInstance(), SIGNAL( messagesChanged() ), - this, SLOT( slotAwayChanged() ) ); + TQObject::connect( Kopete::Away::getInstance(), TQT_SIGNAL( messagesChanged() ), + this, TQT_SLOT( slotAwayChanged() ) ); - QObject::connect( this, SIGNAL( awayMessageSelected( const Kopete::OnlineStatus &, const QString & ) ), + TQObject::connect( this, TQT_SIGNAL( awayMessageSelected( const Kopete::OnlineStatus &, const TQString & ) ), receiver, slot ); - QObject::connect( this, SIGNAL( activated( int ) ), - this, SLOT( slotSelectAway( int ) ) ); + TQObject::connect( this, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotSelectAway( int ) ) ); slotAwayChanged(); } @@ -75,16 +75,16 @@ AwayAction::~AwayAction() void AwayAction::slotAwayChanged() { - QStringList awayMessages = Kopete::Away::getInstance()->getMessages(); - for( QStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it ) + TQStringList awayMessages = Kopete::Away::getInstance()->getMessages(); + for( TQStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it ) { (*it) = KStringHandler::rsqueeze( *it ); } d->reasonCount = awayMessages.count(); - QStringList menu; + TQStringList menu; menu << i18n( "No Message" ); menu << i18n( "New Message..." ); - menu << QString::null ; //separator + menu << TQString::null ; //separator menu += awayMessages ; setItems( menu ); setCurrentItem( -1 ); @@ -96,7 +96,7 @@ void AwayAction::slotSelectAway( int index ) setCurrentItem( -1 ); Kopete::Away *mAway = Kopete::Away::getInstance(); - QString awayReason; + TQString awayReason; // Index == -1 means this is a result of Global Away all. // Use the last entered message (0) @@ -106,11 +106,11 @@ void AwayAction::slotSelectAway( int index ) switch(index) { case 0: - awayReason = QString::null; + awayReason = TQString::null; break; case 1: bool ok; - awayReason = KInputDialog::getText( i18n( "New Away Message" ), i18n( "Please enter your away reason:" ) , QString::null , &ok ); + awayReason = KInputDialog::getText( i18n( "New Away Message" ), i18n( "Please enter your away reason:" ) , TQString::null , &ok ); if(!ok) //the user canceled return; if( !awayReason.isEmpty() ) diff --git a/kopete/libkopete/kopeteawayaction.h b/kopete/libkopete/kopeteawayaction.h index f8ab9d64..c787e7e7 100644 --- a/kopete/libkopete/kopeteawayaction.h +++ b/kopete/libkopete/kopeteawayaction.h @@ -46,20 +46,20 @@ class KOPETE_EXPORT AwayAction : public KSelectAction * @p text, @p pix, @p cut, @p receiver, @p slot, @p parent and * @p name are all handled by KSelectAction. **/ - AwayAction(const QString &text, const QIconSet &pix, - const KShortcut &cut, const QObject *receiver, const char *slot, - QObject *parent, const char *name = 0); + AwayAction(const TQString &text, const TQIconSet &pix, + const KShortcut &cut, const TQObject *receiver, const char *slot, + TQObject *parent, const char *name = 0); /** * Constructor * @param status the OnlineStatus that appears in the signal - * @param slot must have the following signature: ( const OnlineStatus &, const QString & ) + * @param slot must have the following signature: ( const OnlineStatus &, const TQString & ) * @p text, @p pix, @p cut, @p receiver, @p slot, @p parent and * @p name are all handled by KSelectAction. **/ - AwayAction(const OnlineStatus &status, const QString &text, const QIconSet &pix, - const KShortcut &cut, const QObject *receiver, const char *slot, - QObject *parent, const char *name = 0); + AwayAction(const OnlineStatus &status, const TQString &text, const TQIconSet &pix, + const KShortcut &cut, const TQObject *receiver, const char *slot, + TQObject *parent, const char *name = 0); /** * Destructor. @@ -70,12 +70,12 @@ class KOPETE_EXPORT AwayAction : public KSelectAction /** * @brief Emits when the user selects an away message */ - void awayMessageSelected( const QString & ); + void awayMessageSelected( const TQString & ); /** * same as above, but with the saved status */ - void awayMessageSelected( const Kopete::OnlineStatus& , const QString & ); + void awayMessageSelected( const Kopete::OnlineStatus& , const TQString & ); private slots: void slotAwayChanged(); diff --git a/kopete/libkopete/kopeteawaydialog.cpp b/kopete/libkopete/kopeteawaydialog.cpp index 0dbb7023..19d9fb9c 100644 --- a/kopete/libkopete/kopeteawaydialog.cpp +++ b/kopete/libkopete/kopeteawaydialog.cpp @@ -33,7 +33,7 @@ public: KopeteAwayDialog_Base *base; }; -KopeteAwayDialog::KopeteAwayDialog( QWidget *parent, const char *name ) +KopeteAwayDialog::KopeteAwayDialog( TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n( "Global Away Message" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ) { @@ -44,7 +44,7 @@ KopeteAwayDialog::KopeteAwayDialog( QWidget *parent, const char *name ) d->base = new KopeteAwayDialog_Base( this ); setMainWidget( d->base ); - QObject::connect( d->base->cmbHistory, SIGNAL( activated( int ) ), this, SLOT( slotComboBoxSelection( int ) ) ); + TQObject::connect( d->base->cmbHistory, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotComboBoxSelection( int ) ) ); awayInstance = Kopete::Away::getInstance(); mExtendedAwayType = 0; @@ -99,8 +99,8 @@ void KopeteAwayDialog::cancelAway( int /* awayType */ ) void KopeteAwayDialog::init() { - QStringList awayMessages = awayInstance->getMessages(); - for( QStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it ) + TQStringList awayMessages = awayInstance->getMessages(); + for( TQStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it ) { *it = KStringHandler::rsqueeze( *it ); } @@ -113,7 +113,7 @@ void KopeteAwayDialog::init() d->base->txtOneShot->setCursorPosition( 0 ); } -QString KopeteAwayDialog::getSelectedAwayMessage() +TQString KopeteAwayDialog::getSelectedAwayMessage() { mLastUserAwayMessage = d->base->txtOneShot->text(); return mLastUserAwayMessage; diff --git a/kopete/libkopete/kopeteawaydialog.h b/kopete/libkopete/kopeteawaydialog.h index 313cafe2..517e419c 100644 --- a/kopete/libkopete/kopeteawaydialog.h +++ b/kopete/libkopete/kopeteawaydialog.h @@ -60,7 +60,7 @@ public: * @param parent The object that owns this * @param name Name for this object */ - KopeteAwayDialog( QWidget *parent = 0, const char *name = 0 ); + KopeteAwayDialog( TQWidget *parent = 0, const char *name = 0 ); /** * Destructor @@ -78,7 +78,7 @@ protected: * \brief Gets the last selected away message * @return An away message */ - QString getSelectedAwayMessage(); + TQString getSelectedAwayMessage(); /** * \brief Sets the user away @@ -178,13 +178,13 @@ private: * saved away message, whichever was * last chosen */ - QString mLastUserAwayMessage; + TQString mLastUserAwayMessage; /** * The last message that the user typed in the * line edit */ - QString mLastUserTypedMessage; + TQString mLastUserTypedMessage; /** * This is used to store the type of away that we're diff --git a/kopete/libkopete/kopeteblacklister.cpp b/kopete/libkopete/kopeteblacklister.cpp index 8ec5c54b..29dbf727 100644 --- a/kopete/libkopete/kopeteblacklister.cpp +++ b/kopete/libkopete/kopeteblacklister.cpp @@ -20,7 +20,7 @@ #include <kconfig.h> #include <kglobal.h> -#include <qstringlist.h> +#include <tqstringlist.h> namespace Kopete { @@ -28,21 +28,21 @@ namespace Kopete class BlackLister::Private { public: - QStringList blacklist; - QString owner; - QString protocol; + TQStringList blacklist; + TQString owner; + TQString protocol; }; -BlackLister::BlackLister(const QString &protocolId, const QString &accountId, QObject *parent, const char *name) - : QObject(parent, name), d( new Private ) +BlackLister::BlackLister(const TQString &protocolId, const TQString &accountId, TQObject *parent, const char *name) + : TQObject(parent, name), d( new Private ) { KConfig *config = KGlobal::config(); d->owner = accountId; d->protocol = protocolId; config->setGroup("BlackLister"); - d->blacklist = config->readListEntry( d->protocol + QString::fromLatin1("_") + d->owner ); + d->blacklist = config->readListEntry( d->protocol + TQString::fromLatin1("_") + d->owner ); } BlackLister::~BlackLister() @@ -51,7 +51,7 @@ BlackLister::~BlackLister() } -bool BlackLister::isBlocked(const QString &contactId) +bool BlackLister::isBlocked(const TQString &contactId) { return (d->blacklist.find( contactId ) != d->blacklist.end() ); } @@ -61,7 +61,7 @@ bool BlackLister::isBlocked(Contact *contact) return isBlocked(contact->contactId()); } -void BlackLister::addContact(const QString &contactId) +void BlackLister::addContact(const TQString &contactId) { if( !isBlocked(contactId) ) { @@ -73,14 +73,14 @@ void BlackLister::addContact(const QString &contactId) void BlackLister::addContact(Contact *contact) { - QString temp = contact->contactId(); + TQString temp = contact->contactId(); addContact( temp ); } void BlackLister::removeContact(Contact *contact) { - QString temp = contact->contactId(); + TQString temp = contact->contactId(); removeContact( temp ); } @@ -90,11 +90,11 @@ void BlackLister::saveToDisk() KConfig *config = KGlobal::config(); config->setGroup("BlackLister"); - config->writeEntry( d->protocol + QString::fromLatin1("_") + d->owner, d->blacklist ); + config->writeEntry( d->protocol + TQString::fromLatin1("_") + d->owner, d->blacklist ); config->sync(); } -void BlackLister::removeContact(const QString &contactId) +void BlackLister::removeContact(const TQString &contactId) { if( isBlocked(contactId) ) { diff --git a/kopete/libkopete/kopeteblacklister.h b/kopete/libkopete/kopeteblacklister.h index ed3e5566..c2df1bca 100644 --- a/kopete/libkopete/kopeteblacklister.h +++ b/kopete/libkopete/kopeteblacklister.h @@ -16,7 +16,7 @@ #ifndef KOPETEBLACKLISTER_H #define KOPETEBLACKLISTER_H -#include <qobject.h> +#include <tqobject.h> namespace Kopete { @@ -51,10 +51,10 @@ public: * Create an instance, and read the blacklist from disk if it exists. * @param protocolId is the ID of the protocol owning accountId * @param accountId is the ID of the owning Account. - * @param parent The QObject parent for this class. - * @param name The QObject name for this class. + * @param parent The TQObject parent for this class. + * @param name The TQObject name for this class. */ - BlackLister( const QString &protocolId, const QString &accountId, QObject *parent = 0, const char *name = 0 ); + BlackLister( const TQString &protocolId, const TQString &accountId, TQObject *parent = 0, const char *name = 0 ); ~BlackLister(); /** @@ -65,7 +65,7 @@ public: /** * \return @c true if the contact with ID @p contactId is blocked, @c false otherwise. */ - bool isBlocked( const QString &contactId ); + bool isBlocked( const TQString &contactId ); public slots: /** @@ -74,7 +74,7 @@ public slots: * This function emits the @ref contactAdded() signal. * @param contactId is the ID of the contact to be added to the list. */ - void addContact( const QString &contactId ); + void addContact( const TQString &contactId ); /** * @overload @@ -93,7 +93,7 @@ public slots: /** * @overload */ - void removeContact( const QString &contactId ); + void removeContact( const TQString &contactId ); signals: /** @@ -102,7 +102,7 @@ signals: * Connect to this signal if you want to perform additional actions, * and you prefer not to derive from this class. */ - void contactAdded( const QString &contactId ); + void contactAdded( const TQString &contactId ); /** * \brief A contact has been removed from the list @@ -110,7 +110,7 @@ signals: * Connect to this signal if you want to perform additional actions, * and you prefer not to derive from this class. */ - void contactRemoved( const QString &contactId ); + void contactRemoved( const TQString &contactId ); private: void saveToDisk(); diff --git a/kopete/libkopete/kopetechatsession.cpp b/kopete/libkopete/kopetechatsession.cpp index 9ebf1d07..91866cce 100644 --- a/kopete/libkopete/kopetechatsession.cpp +++ b/kopete/libkopete/kopetechatsession.cpp @@ -22,8 +22,8 @@ #include "kopetechatsession.h" -#include <qapplication.h> -#include <qregexp.h> +#include <tqapplication.h> +#include <tqregexp.h> #include <kdebug.h> #include <kdeversion.h> @@ -49,14 +49,14 @@ class KMMPrivate public: Kopete::ContactPtrList mContactList; const Kopete::Contact *mUser; - QMap<const Kopete::Contact *, Kopete::OnlineStatus> contactStatus; + TQMap<const Kopete::Contact *, Kopete::OnlineStatus> contactStatus; Kopete::Protocol *mProtocol; bool isEmpty; bool mCanBeDeleted; unsigned int refcount; bool customDisplayName; - QDateTime awayTime; - QString displayName; + TQDateTime awayTime; + TQString displayName; KopeteView *view; bool mayInvite; Kopete::MessageHandlerChain::Ptr chains[3]; @@ -64,7 +64,7 @@ public: Kopete::ChatSession::ChatSession( const Kopete::Contact *user, Kopete::ContactPtrList others, Kopete::Protocol *protocol, const char *name ) -: QObject( user->account(), name ) +: TQObject( user->account(), name ) { d = new KMMPrivate; d->mUser = user; @@ -79,11 +79,11 @@ Kopete::ChatSession::ChatSession( const Kopete::Contact *user, for ( Kopete::Contact *c = others.first(); c; c = others.next() ) addContact( c, true ); - connect( user, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), this, - SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + connect( user, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), this, + TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); if( user->metaContact() ) - connect( user->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) ); + connect( user->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) ); slotUpdateDisplayName(); } @@ -111,8 +111,8 @@ void Kopete::ChatSession::setContactOnlineStatus( const Kopete::Contact *contact { Kopete::OnlineStatus oldStatus = d->contactStatus[ contact ]; d->contactStatus[ contact ] = status; - disconnect( contact, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); + disconnect( contact, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); emit onlineStatusChanged( (Kopete::Contact*)contact, status, oldStatus ); } @@ -124,7 +124,7 @@ const Kopete::OnlineStatus Kopete::ChatSession::contactOnlineStatus( const Kopet return contact->onlineStatus(); } -const QString Kopete::ChatSession::displayName() +const TQString Kopete::ChatSession::displayName() { if ( d->displayName.isNull() ) { @@ -134,7 +134,7 @@ const QString Kopete::ChatSession::displayName() return d->displayName; } -void Kopete::ChatSession::setDisplayName( const QString &newName ) +void Kopete::ChatSession::setDisplayName( const TQString &newName ) { d->displayName = newName; d->customDisplayName = true; @@ -152,17 +152,17 @@ void Kopete::ChatSession::slotUpdateDisplayName() if ( !c ) return; - d->displayName=QString::null; + d->displayName=TQString::null; do { if(! d->displayName.isNull() ) - d->displayName.append( QString::fromLatin1( ", " ) ) ; + d->displayName.append( TQString::fromLatin1( ", " ) ) ; if ( c->metaContact() ) d->displayName.append( c->metaContact()->displayName() ); else { - QString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString(); d->displayName.append( nick.isEmpty() ? c->contactId() : nick ); } c=d->mContactList.next(); @@ -171,7 +171,7 @@ void Kopete::ChatSession::slotUpdateDisplayName() //If we have only 1 contact, add the status of him if ( d->mContactList.count() == 1 ) { - d->displayName.append( QString::fromLatin1( " (%1)" ).arg( d->mContactList.first()->onlineStatus().description() ) ); + d->displayName.append( TQString::fromLatin1( " (%1)" ).arg( d->mContactList.first()->onlineStatus().description() ) ); } emit displayNameChanged(); @@ -248,7 +248,7 @@ void Kopete::ChatSession::sendMessage( Kopete::Message &message ) emit messageSent( sentMessage, this ); if ( !account()->isAway() || KopetePrefs::prefs()->soundIfAway() ) { - KNotification::event(QString::fromLatin1( "kopete_outgoing" ), i18n( "Outgoing Message Sent" ) ); + KNotification::event(TQString::fromLatin1( "kopete_outgoing" ), i18n( "Outgoing Message Sent" ) ); } } else @@ -264,7 +264,7 @@ void Kopete::ChatSession::messageSucceeded() void Kopete::ChatSession::emitNudgeNotification() { - KNotification::event( QString::fromLatin1("buzz_nudge"), i18n("A contact sent you a buzz/nudge.") ); + KNotification::event( TQString::fromLatin1("buzz_nudge"), i18n("A contact sent you a buzz/nudge.") ); } void Kopete::ChatSession::appendMessage( Kopete::Message &msg ) @@ -273,9 +273,9 @@ void Kopete::ChatSession::appendMessage( Kopete::Message &msg ) if ( msg.direction() == Kopete::Message::Inbound ) { - QString nick=myself()->property(Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString nick=myself()->property(Kopete::Global::Properties::self()->nickName()).value().toString(); if ( KopetePrefs::prefs()->highlightEnabled() && !nick.isEmpty() && - msg.plainBody().contains( QRegExp( QString::fromLatin1( "\\b(%1)\\b" ).arg( nick ), false ) ) ) + msg.plainBody().contains( TQRegExp( TQString::fromLatin1( "\\b(%1)\\b" ).arg( nick ), false ) ) ) { msg.setImportance( Kopete::Message::Highlight ); } @@ -320,18 +320,18 @@ void Kopete::ChatSession::addContact( const Kopete::Contact *c, bool suppress ) d->mContactList.remove( old ); d->mContactList.append( c ); - disconnect( old, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); + disconnect( old, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); if ( old->metaContact() ) { - disconnect( old->metaContact(), SIGNAL( displayNameChanged( const QString &, const QString & ) ), this, SLOT( slotUpdateDisplayName() ) ); - disconnect( old->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) ); + disconnect( old->metaContact(), TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + disconnect( old->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) ); } else - disconnect( old, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), this, SLOT( slotUpdateDisplayName() ) ); + disconnect( old, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); emit contactAdded( c, suppress ); - emit contactRemoved( old, QString::null ); + emit contactRemoved( old, TQString::null ); } else { @@ -339,24 +339,24 @@ void Kopete::ChatSession::addContact( const Kopete::Contact *c, bool suppress ) emit contactAdded( c, suppress ); } - connect( c, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); + connect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); ; if ( c->metaContact() ) { - connect( c->metaContact(), SIGNAL( displayNameChanged( const QString &, const QString & ) ), this, SLOT( slotUpdateDisplayName() ) ); - connect( c->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) ); + connect( c->metaContact(), TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + connect( c->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) ); } else - connect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), this, SLOT( slotUpdateDisplayName() ) ); - connect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); + connect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + connect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, TQT_SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); slotUpdateDisplayName(); } d->isEmpty = false; } -void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const QString& reason, Kopete::Message::MessageFormat format, bool suppressNotification ) +void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const TQString& reason, Kopete::Message::MessageFormat format, bool suppressNotification ) { kdDebug( 14010 ) << k_funcinfo << endl; if ( !c || !d->mContactList.contains( c ) ) @@ -371,17 +371,17 @@ void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const QString { d->mContactList.remove( c ); - disconnect( c, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); + disconnect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); if ( c->metaContact() ) { - disconnect( c->metaContact(), SIGNAL( displayNameChanged( const QString &, const QString & ) ), this, SLOT( slotUpdateDisplayName() ) ); - disconnect( c->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) ); + disconnect( c->metaContact(), TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + disconnect( c->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) ); } else - disconnect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), this, SLOT( slotUpdateDisplayName() ) ); - disconnect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); + disconnect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + disconnect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, TQT_SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); slotUpdateDisplayName(); } @@ -396,7 +396,7 @@ void Kopete::ChatSession::receivedTypingMsg( const Kopete::Contact *c, bool t ) emit remoteTyping( c, t ); } -void Kopete::ChatSession::receivedTypingMsg( const QString &contactId, bool t ) +void Kopete::ChatSession::receivedTypingMsg( const TQString &contactId, bool t ) { for ( Kopete::Contact *it = d->mContactList.first(); it; it = d->mContactList.next() ) { @@ -413,7 +413,7 @@ void Kopete::ChatSession::typing( bool t ) emit myselfTyping( t ); } -void Kopete::ChatSession::receivedEventNotification( const QString& notificationText) +void Kopete::ChatSession::receivedEventNotification( const TQString& notificationText) { emit eventNotification( notificationText ); } @@ -436,14 +436,14 @@ void Kopete::ChatSession::deref () deleteLater(); } -KopeteView* Kopete::ChatSession::view( bool canCreate, const QString &requestedPlugin ) +KopeteView* Kopete::ChatSession::view( bool canCreate, const TQString &requestedPlugin ) { if ( !d->view && canCreate ) { d->view = Kopete::ChatSessionManager::self()->createView( this, requestedPlugin ); if ( d->view ) { - connect( d->view->mainWidget(), SIGNAL( closing( KopeteView * ) ), this, SLOT( slotViewDestroyed( ) ) ); + connect( d->view->mainWidget(), TQT_SIGNAL( closing( KopeteView * ) ), this, TQT_SLOT( slotViewDestroyed( ) ) ); } else { @@ -479,7 +479,7 @@ void Kopete::ChatSession::slotContactDestroyed( Kopete::Contact *contact ) // in the best case, we should ask the protocol to recreate a temporary contact. // (remember: the contact may be deleted when the users removes it from the contactlist, or when closing kopete ) d->mContactList.remove( contact ); - emit contactRemoved( contact, QString::null ); + emit contactRemoved( contact, TQString::null ); if ( d->mContactList.isEmpty() ) deleteLater(); @@ -490,7 +490,7 @@ bool Kopete::ChatSession::mayInvite() const return d->mayInvite; } -void Kopete::ChatSession::inviteContact(const QString& ) +void Kopete::ChatSession::inviteContact(const TQString& ) { //default implementation do nothing } diff --git a/kopete/libkopete/kopetechatsession.h b/kopete/libkopete/kopetechatsession.h index 86d5fa64..928ac7d5 100644 --- a/kopete/libkopete/kopetechatsession.h +++ b/kopete/libkopete/kopetechatsession.h @@ -23,9 +23,9 @@ #ifndef __KOPETECHATSESSION_H__ #define __KOPETECHATSESSION_H__ -#include <qobject.h> -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> #include <kxmlguiclient.h> @@ -51,8 +51,8 @@ class ChatSessionManager; class MessageHandlerChain; class TemporaryKMMCallbackAppendMessageHandler; -typedef QPtrList<Contact> ContactPtrList; -typedef QValueList<Message> MessageList; +typedef TQPtrList<Contact> ContactPtrList; +typedef TQValueList<Message> MessageList; /** @@ -71,7 +71,7 @@ typedef QValueList<Message> MessageList; * so plugins can add childClients of this client to add their own actions in the * chatwindow. */ -class KOPETE_EXPORT ChatSession : public QObject , public KXMLGUIClient +class KOPETE_EXPORT ChatSession : public TQObject , public KXMLGUIClient { // friend class so the object factory can access the protected constructor friend class ChatSessionManager; @@ -114,14 +114,14 @@ public: * * Used for named chats */ - const QString displayName(); + const TQString displayName(); /** * @brief change the displayname * * change the display name of the chat */ - void setDisplayName( const QString &displayName ); + void setDisplayName( const TQString &displayName ); /** * @brief set a specified KOS for specified contact in this KMM @@ -148,7 +148,7 @@ public: * @param requestedPlugin Specifies the view plugin to use if we have to create one. */ // FIXME: canCreate should definitely be an enum and not a bool - Martijn - KopeteView* view( bool canCreate = false, const QString &requestedPlugin = QString::null ); + KopeteView* view( bool canCreate = false, const TQString &requestedPlugin = TQString::null ); /** * says if you may invite contact from the same account to this chat with @ref inviteContact @@ -166,7 +166,7 @@ public: * * the default implementaiton do nothing */ - virtual void inviteContact(const QString &contactId); + virtual void inviteContact(const TQString &contactId); /** * Returns the message handler chain for the message direction @p dir. @@ -216,7 +216,7 @@ signals: /** * @brief a contact is no longer in this chat */ - void contactRemoved( const Kopete::Contact *contact, const QString &reason, Kopete::Message::MessageFormat format = Message::PlainText, bool contactRemoved = false ); + void contactRemoved( const Kopete::Contact *contact, const TQString &reason, Kopete::Message::MessageFormat format = Message::PlainText, bool contactRemoved = false ); /** * @brief a contact in this chat has changed his status @@ -248,7 +248,7 @@ signals: * Signals that a an event has to be displayed in the statusbar. * The chatwindow connects to this signal to update the statusbar. */ - void eventNotification( const QString& notificationText); + void eventNotification( const TQString& notificationText); /** * @brief A contact within the chat session changed his photo. @@ -264,17 +264,17 @@ public slots: /** * Got a typing notification from a user. This is a convenience version - * of the above method that takes a QString contactId instead of a full + * of the above method that takes a TQString contactId instead of a full * Kopete::Contact */ - void receivedTypingMsg( const QString &contactId, bool isTyping = true ); + void receivedTypingMsg( const TQString &contactId, bool isTyping = true ); /** * @brief Got an event notification from a user. * It will emit the signal eventNotification(). Use this slot in your protocols * and plugins to change chatwindow statusBar text. */ - void receivedEventNotification( const QString& notificationText ); + void receivedEventNotification( const TQString& notificationText ); /** * Show a message to the chatwindow, or append it to the queue. @@ -310,7 +310,7 @@ public slots: * @param format The format of the message * @param suppressNotification prevents a notification of the removal in the chat view. See note in @ref addContact */ - void removeContact( const Kopete::Contact *contact, const QString& reason = QString::null, Kopete::Message::MessageFormat format = Message::PlainText, bool suppressNotification = false ); + void removeContact( const Kopete::Contact *contact, const TQString& reason = TQString::null, Kopete::Message::MessageFormat format = Message::PlainText, bool suppressNotification = false ); /** * Set if the KMM will be deleted when the chatwindow is deleted. It is useful if you want diff --git a/kopete/libkopete/kopetechatsessionmanager.cpp b/kopete/libkopete/kopetechatsessionmanager.cpp index 9b7dd489..4805927b 100644 --- a/kopete/libkopete/kopetechatsessionmanager.cpp +++ b/kopete/libkopete/kopetechatsessionmanager.cpp @@ -29,7 +29,7 @@ namespace Kopete { class ChatSessionManager::Private { public: - QValueList <ChatSession*> sessions; + TQValueList <ChatSession*> sessions; // UI::ChatView *activeView; }; @@ -43,9 +43,9 @@ ChatSessionManager* ChatSessionManager::self() return s_self; } -ChatSessionManager::ChatSessionManager( QObject* parent, +ChatSessionManager::ChatSessionManager( TQObject* parent, const char* name ) - : QObject( parent, name ) + : TQObject( parent, name ) { d=new Private; s_self = this; @@ -54,7 +54,7 @@ ChatSessionManager::ChatSessionManager( QObject* parent, ChatSessionManager::~ChatSessionManager() { s_self = 0L; - QValueListIterator<ChatSession*> it; + TQValueListIterator<ChatSession*> it; for ( it=d->sessions.begin() ; it!=d->sessions.end() ; ++it ) { kdDebug( 14010 ) << k_funcinfo << "Unloading KMM: Why this KMM isn't yet unloaded?" << endl; @@ -67,13 +67,13 @@ ChatSession* ChatSessionManager::findChatSession(const Contact *user, ContactPtrList chatContacts, Protocol *protocol) { ChatSession *result = 0L; - QValueList<ChatSession*>::Iterator it; + TQValueList<ChatSession*>::Iterator it; for ( it= d->sessions.begin(); it!=d->sessions.end() && !result ; ++it ) { ChatSession* cs=(*it); if ( cs->protocol() == protocol && user == cs->myself() ) { - QPtrList<Contact> contactlist = cs->members(); + TQPtrList<Contact> contactlist = cs->members(); // set this to false if chatContacts doesn't contain current cs's contactlist bool halfMatch = true; @@ -128,15 +128,15 @@ void ChatSessionManager::registerChatSession(ChatSession * result) * There's no need for a slot here... just add a public remove() * method and call from KMM's destructor */ - connect( result, SIGNAL( messageAppended( Kopete::Message &, Kopete::ChatSession * ) ), - SIGNAL( aboutToDisplay( Kopete::Message & ) ) ); - connect( result, SIGNAL( messageSent( Kopete::Message &, Kopete::ChatSession * ) ), - SIGNAL( aboutToSend(Kopete::Message & ) ) ); - connect( result, SIGNAL( messageReceived( Kopete::Message &, Kopete::ChatSession * ) ), - SIGNAL( aboutToReceive(Kopete::Message & ) ) ); + connect( result, TQT_SIGNAL( messageAppended( Kopete::Message &, Kopete::ChatSession * ) ), + TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ) ); + connect( result, TQT_SIGNAL( messageSent( Kopete::Message &, Kopete::ChatSession * ) ), + TQT_SIGNAL( aboutToSend(Kopete::Message & ) ) ); + connect( result, TQT_SIGNAL( messageReceived( Kopete::Message &, Kopete::ChatSession * ) ), + TQT_SIGNAL( aboutToReceive(Kopete::Message & ) ) ); - connect( result, SIGNAL(messageAppended( Kopete::Message &, Kopete::ChatSession *) ), - SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ) ); + connect( result, TQT_SIGNAL(messageAppended( Kopete::Message &, Kopete::ChatSession *) ), + TQT_SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ) ); emit chatSessionCreated(result); } @@ -148,12 +148,12 @@ void ChatSessionManager::removeSession( ChatSession *session) d->sessions.remove( session ); } -QValueList<ChatSession*> ChatSessionManager::sessions( ) +TQValueList<ChatSession*> ChatSessionManager::sessions( ) { return d->sessions; } -KopeteView * ChatSessionManager::createView( ChatSession *kmm , const QString &requestedPlugin ) +KopeteView * ChatSessionManager::createView( ChatSession *kmm , const TQString &requestedPlugin ) { KopeteView *newView = KopeteViewManager::viewManager()->view(kmm,requestedPlugin); if(!newView) @@ -162,17 +162,17 @@ KopeteView * ChatSessionManager::createView( ChatSession *kmm , const QString &r return 0L; } - QObject *viewObject = dynamic_cast<QObject *>(newView); + TQObject *viewObject = dynamic_cast<TQObject *>(newView); if(viewObject) { - connect(viewObject, SIGNAL(activated(KopeteView *)), - this, SIGNAL(viewActivated(KopeteView *))); - connect(viewObject, SIGNAL(closing(KopeteView *)), - this, SIGNAL(viewClosing(KopeteView *))); + connect(viewObject, TQT_SIGNAL(activated(KopeteView *)), + this, TQT_SIGNAL(viewActivated(KopeteView *))); + connect(viewObject, TQT_SIGNAL(closing(KopeteView *)), + this, TQT_SIGNAL(viewClosing(KopeteView *))); } else { - kdWarning(14010) << "Failed to cast view to QObject *" << endl; + kdWarning(14010) << "Failed to cast view to TQObject *" << endl; } emit viewCreated( newView ) ; diff --git a/kopete/libkopete/kopetechatsessionmanager.h b/kopete/libkopete/kopetechatsessionmanager.h index e41eb14d..efabd604 100644 --- a/kopete/libkopete/kopetechatsessionmanager.h +++ b/kopete/libkopete/kopetechatsessionmanager.h @@ -18,10 +18,10 @@ #ifndef KOPETEMESSAGEMANAGERFACTORY_H #define KOPETEMESSAGEMANAGERFACTORY_H -#include <qobject.h> -#include <qptrlist.h> -#include <qintdict.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqptrlist.h> +#include <tqintdict.h> +#include <tqvaluelist.h> #include "kopetechatsession.h" #include "kopetemessage.h" @@ -37,8 +37,8 @@ class Contact; class Protocol; class MessageEvent; -typedef QPtrList<Contact> ContactPtrList; -typedef QValueList<Message> MessageList; +typedef TQPtrList<Contact> ContactPtrList; +typedef TQValueList<Message> MessageList; /** * @author Duncan Mac-Vicar Prett <duncan@kde.org> @@ -85,7 +85,7 @@ public: /** * Get a list of all open sessions. */ - QValueList<ChatSession*> sessions(); + TQValueList<ChatSession*> sessions(); /** * @internal @@ -97,7 +97,7 @@ public: * create a new view for the manager. * only the manager should call this function */ - KopeteView *createView( Kopete::ChatSession * , const QString &requestedPlugin = QString::null ); + KopeteView *createView( Kopete::ChatSession * , const TQString &requestedPlugin = TQString::null ); /** * Post a new event. this will emit the @ref newEvent signal @@ -175,7 +175,7 @@ public slots: void slotReadMessage(); private: - ChatSessionManager( QObject* parent = 0, const char* name = 0 ); + ChatSessionManager( TQObject* parent = 0, const char* name = 0 ); class Private; Private *d; diff --git a/kopete/libkopete/kopetecommandhandler.cpp b/kopete/libkopete/kopetecommandhandler.cpp index b761ec08..cd4dcd8c 100644 --- a/kopete/libkopete/kopetecommandhandler.cpp +++ b/kopete/libkopete/kopetecommandhandler.cpp @@ -15,14 +15,14 @@ */ #include <kapplication.h> -#include <qregexp.h> +#include <tqregexp.h> #include <kdebug.h> #include <klocale.h> #include <kprocess.h> #include <kdeversion.h> #include <kxmlguiclient.h> #include <kaction.h> -#include <qdom.h> +#include <tqdom.h> #include "kopetechatsessionmanager.h" #include "kopeteprotocol.h" @@ -36,36 +36,36 @@ using Kopete::CommandList; -typedef QMap<QObject*, CommandList> PluginCommandMap; -typedef QMap<QString,QString> CommandMap; +typedef TQMap<TQObject*, CommandList> PluginCommandMap; +typedef TQMap<TQString,TQString> CommandMap; typedef QPair<Kopete::ChatSession*, Kopete::Message::MessageDirection> ManagerPair; -class KopeteCommandGUIClient : public QObject, public KXMLGUIClient +class KopeteCommandGUIClient : public TQObject, public KXMLGUIClient { public: - KopeteCommandGUIClient( Kopete::ChatSession *manager ) : QObject(manager), KXMLGUIClient(manager) + KopeteCommandGUIClient( Kopete::ChatSession *manager ) : TQObject(manager), KXMLGUIClient(manager) { - setXMLFile( QString::fromLatin1("kopetecommandui.rc") ); + setXMLFile( TQString::fromLatin1("kopetecommandui.rc") ); - QDomDocument doc = domDocument(); - QDomNode menu = doc.documentElement().firstChild().firstChild().firstChild(); + TQDomDocument doc = domDocument(); + TQDomNode menu = doc.documentElement().firstChild().firstChild().firstChild(); CommandList mCommands = Kopete::CommandHandler::commandHandler()->commands( manager->protocol() ); - for( QDictIterator<Kopete::Command> it( mCommands ); it.current(); ++it ) + for( TQDictIterator<Kopete::Command> it( mCommands ); it.current(); ++it ) { KAction *a = static_cast<KAction*>( it.current() ); actionCollection()->insert( a ); - QDomElement newNode = doc.createElement( QString::fromLatin1("Action") ); - newNode.setAttribute( QString::fromLatin1("name"), - QString::fromLatin1( a->name() ) ); + TQDomElement newNode = doc.createElement( TQString::fromLatin1("Action") ); + newNode.setAttribute( TQString::fromLatin1("name"), + TQString::fromLatin1( a->name() ) ); bool added = false; - for( QDomElement n = menu.firstChild().toElement(); + for( TQDomElement n = menu.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { - if( QString::fromLatin1(a->name()) < n.attribute(QString::fromLatin1("name"))) + if( TQString::fromLatin1(a->name()) < n.attribute(TQString::fromLatin1("name"))) { menu.insertBefore( newNode, n ); added = true; @@ -87,14 +87,14 @@ struct CommandHandlerPrivate { PluginCommandMap pluginCommands; Kopete::CommandHandler *s_handler; - QMap<KProcess*,ManagerPair> processMap; + TQMap<KProcess*,ManagerPair> processMap; bool inCommand; - QPtrList<KAction> m_commands; + TQPtrList<KAction> m_commands; }; CommandHandlerPrivate *Kopete::CommandHandler::p = 0L; -Kopete::CommandHandler::CommandHandler() : QObject( qApp ) +Kopete::CommandHandler::CommandHandler() : TQObject( qApp ) { p->s_handler = this; p->inCommand = false; @@ -103,41 +103,41 @@ Kopete::CommandHandler::CommandHandler() : QObject( qApp ) mCommands.setAutoDelete( true ); p->pluginCommands.insert( this, mCommands ); - registerCommand( this, QString::fromLatin1("help"), SLOT( slotHelpCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("help"), TQT_SLOT( slotHelpCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /help [<command>] - Used to list available commands, or show help for a specified command." ), 0, 1 ); - registerCommand( this, QString::fromLatin1("close"), SLOT( slotCloseCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("close"), TQT_SLOT( slotCloseCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /close - Closes the current view." ) ); // FIXME: What's the difference with /close? The help doesn't explain it - Martijn - registerCommand( this, QString::fromLatin1("part"), SLOT( slotPartCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("part"), TQT_SLOT( slotPartCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /part - Closes the current view." ) ); - registerCommand( this, QString::fromLatin1("clear"), SLOT( slotClearCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("clear"), TQT_SLOT( slotClearCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /clear - Clears the active view's chat buffer." ) ); - //registerCommand( this, QString::fromLatin1("me"), SLOT( slotMeCommand( const QString &, Kopete::ChatSession * ) ), + //registerCommand( this, TQString::fromLatin1("me"), TQT_SLOT( slotMeCommand( const TQString &, Kopete::ChatSession * ) ), // i18n( "USAGE: /me <text> - Formats message as in '<nickname> went to the store'." ) ); - registerCommand( this, QString::fromLatin1("away"), SLOT( slotAwayCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("away"), TQT_SLOT( slotAwayCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /away [<reason>] - Marks you as away/back for the current account only." ) ); - registerCommand( this, QString::fromLatin1("awayall"), SLOT( slotAwayAllCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("awayall"), TQT_SLOT( slotAwayAllCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /awayall [<reason>] - Marks you as away/back for all accounts." ) ); - registerCommand( this, QString::fromLatin1("say"), SLOT( slotSayCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("say"), TQT_SLOT( slotSayCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /say <text> - Say text in this chat. This is the same as just typing a message, but is very " "useful for scripts." ), 1 ); - registerCommand( this, QString::fromLatin1("exec"), SLOT( slotExecCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("exec"), TQT_SLOT( slotExecCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /exec [-o] <command> - Executes the specified command and displays the output in the chat buffer. " "If -o is specified, the output is sent to all members of the chat."), 1 ); - connect( Kopete::PluginManager::self(), SIGNAL( pluginLoaded( Kopete::Plugin*) ), - this, SLOT(slotPluginLoaded(Kopete::Plugin*) ) ); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( pluginLoaded( Kopete::Plugin*) ), + this, TQT_SLOT(slotPluginLoaded(Kopete::Plugin*) ) ); - connect( Kopete::ChatSessionManager::self(), SIGNAL( viewCreated( KopeteView * ) ), - this, SLOT( slotViewCreated( KopeteView* ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( viewCreated( KopeteView * ) ), + this, TQT_SLOT( slotViewCreated( KopeteView* ) ) ); } Kopete::CommandHandler::~CommandHandler() @@ -156,45 +156,45 @@ Kopete::CommandHandler *Kopete::CommandHandler::commandHandler() return p->s_handler; } -void Kopete::CommandHandler::registerCommand( QObject *parent, const QString &command, const char* handlerSlot, - const QString &help, uint minArgs, int maxArgs, const KShortcut &cut, const QString &pix ) +void Kopete::CommandHandler::registerCommand( TQObject *parent, const TQString &command, const char* handlerSlot, + const TQString &help, uint minArgs, int maxArgs, const KShortcut &cut, const TQString &pix ) { - QString lowerCommand = command.lower(); + TQString lowerCommand = command.lower(); Kopete::Command *mCommand = new Kopete::Command( parent, lowerCommand, handlerSlot, help, - Normal, QString::null, minArgs, maxArgs, cut, pix); + Normal, TQString::null, minArgs, maxArgs, cut, pix); p->pluginCommands[ parent ].insert( lowerCommand, mCommand ); } -void Kopete::CommandHandler::unregisterCommand( QObject *parent, const QString &command ) +void Kopete::CommandHandler::unregisterCommand( TQObject *parent, const TQString &command ) { if( p->pluginCommands[ parent ].find(command) ) p->pluginCommands[ parent ].remove( command ); } -void Kopete::CommandHandler::registerAlias( QObject *parent, const QString &alias, const QString &formatString, - const QString &help, CommandType type, uint minArgs, int maxArgs, const KShortcut &cut, const QString &pix ) +void Kopete::CommandHandler::registerAlias( TQObject *parent, const TQString &alias, const TQString &formatString, + const TQString &help, CommandType type, uint minArgs, int maxArgs, const KShortcut &cut, const TQString &pix ) { - QString lowerAlias = alias.lower(); + TQString lowerAlias = alias.lower(); Kopete::Command *mCommand = new Kopete::Command( parent, lowerAlias, 0L, help, type, formatString, minArgs, maxArgs, cut, pix ); p->pluginCommands[ parent ].insert( lowerAlias, mCommand ); } -void Kopete::CommandHandler::unregisterAlias( QObject *parent, const QString &alias ) +void Kopete::CommandHandler::unregisterAlias( TQObject *parent, const TQString &alias ) { if( p->pluginCommands[ parent ].find(alias) ) p->pluginCommands[ parent ].remove( alias ); } -bool Kopete::CommandHandler::processMessage( const QString &msg, Kopete::ChatSession *manager ) +bool Kopete::CommandHandler::processMessage( const TQString &msg, Kopete::ChatSession *manager ) { if( p->inCommand ) return false; - QRegExp splitRx( QString::fromLatin1("^/([\\S]+)(.*)") ); - QString command; - QString args; + TQRegExp splitRx( TQString::fromLatin1("^/([\\S]+)(.*)") ); + TQString command; + TQString args; if(splitRx.search(msg) != -1) { command = splitRx.cap(1); @@ -222,21 +222,21 @@ bool Kopete::CommandHandler::processMessage( const QString &msg, Kopete::ChatSes bool Kopete::CommandHandler::processMessage( Kopete::Message &msg, Kopete::ChatSession *manager ) { - QString messageBody = msg.plainBody(); + TQString messageBody = msg.plainBody(); return processMessage( messageBody, manager ); } -void Kopete::CommandHandler::slotHelpCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotHelpCommand( const TQString &args, Kopete::ChatSession *manager ) { - QString output; + TQString output; if( args.isEmpty() ) { int commandCount = 0; output = i18n( "Available Commands:\n" ); CommandList mCommands = commands( manager->myself()->protocol() ); - QDictIterator<Kopete::Command> it( mCommands ); + TQDictIterator<Kopete::Command> it( mCommands ); for( ; it.current(); ++it ) { output.append( it.current()->command().upper() + '\t' ); @@ -250,7 +250,7 @@ void Kopete::CommandHandler::slotHelpCommand( const QString &args, Kopete::ChatS } else { - QString command = parseArguments( args ).front().lower(); + TQString command = parseArguments( args ).front().lower(); Kopete::Command *c = commands( manager->myself()->protocol() )[ command ]; if( c && !c->help().isNull() ) output = c->help(); @@ -262,7 +262,7 @@ void Kopete::CommandHandler::slotHelpCommand( const QString &args, Kopete::ChatS manager->appendMessage(msg); } -void Kopete::CommandHandler::slotSayCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotSayCommand( const TQString &args, Kopete::ChatSession *manager ) { //Just say whatever is passed Kopete::Message msg(manager->myself(), manager->members(), args, @@ -270,23 +270,23 @@ void Kopete::CommandHandler::slotSayCommand( const QString &args, Kopete::ChatSe manager->sendMessage(msg); } -void Kopete::CommandHandler::slotExecCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotExecCommand( const TQString &args, Kopete::ChatSession *manager ) { if( !args.isEmpty() ) { KProcess *proc = 0L; - if ( kapp->authorize( QString::fromLatin1( "shell_access" ) ) ) + if ( kapp->authorize( TQString::fromLatin1( "shell_access" ) ) ) proc = new KProcess(manager); if( proc ) { - *proc << QString::fromLatin1("sh") << QString::fromLatin1("-c"); + *proc << TQString::fromLatin1("sh") << TQString::fromLatin1("-c"); - QStringList argsList = parseArguments( args ); - if( argsList.front() == QString::fromLatin1("-o") ) + TQStringList argsList = parseArguments( args ); + if( argsList.front() == TQString::fromLatin1("-o") ) { p->processMap.insert( proc, ManagerPair(manager, Kopete::Message::Outbound) ); - *proc << args.section(QRegExp(QString::fromLatin1("\\s+")), 1); + *proc << args.section(TQRegExp(TQString::fromLatin1("\\s+")), 1); } else { @@ -294,8 +294,8 @@ void Kopete::CommandHandler::slotExecCommand( const QString &args, Kopete::ChatS *proc << args; } - connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(slotExecReturnedData(KProcess *, char *, int))); - connect(proc, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(slotExecReturnedData(KProcess *, char *, int))); + connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotExecReturnedData(KProcess *, char *, int))); + connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(slotExecReturnedData(KProcess *, char *, int))); proc->start( KProcess::NotifyOnExit, KProcess::AllOutput ); } else @@ -308,19 +308,19 @@ void Kopete::CommandHandler::slotExecCommand( const QString &args, Kopete::ChatS } } -void Kopete::CommandHandler::slotClearCommand( const QString &, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotClearCommand( const TQString &, Kopete::ChatSession *manager ) { if( manager->view() ) manager->view()->clear(); } -void Kopete::CommandHandler::slotPartCommand( const QString &, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotPartCommand( const TQString &, Kopete::ChatSession *manager ) { if( manager->view() ) manager->view()->closeView(); } -void Kopete::CommandHandler::slotAwayCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotAwayCommand( const TQString &args, Kopete::ChatSession *manager ) { bool goAway = !manager->account()->isAway(); @@ -330,7 +330,7 @@ void Kopete::CommandHandler::slotAwayCommand( const QString &args, Kopete::ChatS manager->account()->setAway( goAway, args ); } -void Kopete::CommandHandler::slotAwayAllCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotAwayAllCommand( const TQString &args, Kopete::ChatSession *manager ) { if( manager->account()->isAway() ) Kopete::AccountManager::self()->setAvailableAll(); @@ -344,7 +344,7 @@ void Kopete::CommandHandler::slotAwayAllCommand( const QString &args, Kopete::Ch } } -void Kopete::CommandHandler::slotCloseCommand( const QString &, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotCloseCommand( const TQString &, Kopete::ChatSession *manager ) { if( manager->view() ) manager->view()->closeView(); @@ -353,7 +353,7 @@ void Kopete::CommandHandler::slotCloseCommand( const QString &, Kopete::ChatSess void Kopete::CommandHandler::slotExecReturnedData(KProcess *proc, char *buff, int bufflen ) { kdDebug(14010) << k_funcinfo << endl; - QString buffer = QString::fromLocal8Bit( buff, bufflen ); + TQString buffer = TQString::fromLocal8Bit( buff, bufflen ); ManagerPair mgrPair = p->processMap[ proc ]; Kopete::Message msg( mgrPair.first->myself(), mgrPair.first->members(), buffer, mgrPair.second, Kopete::Message::PlainText ); if( mgrPair.second == Kopete::Message::Outbound ) @@ -368,10 +368,10 @@ void Kopete::CommandHandler::slotExecFinished(KProcess *proc) p->processMap.remove( proc ); } -QStringList Kopete::CommandHandler::parseArguments( const QString &args ) +TQStringList Kopete::CommandHandler::parseArguments( const TQString &args ) { - QStringList arguments; - QRegExp quotedArgs( QString::fromLatin1("\"(.*)\"") ); + TQStringList arguments; + TQRegExp quotedArgs( TQString::fromLatin1("\"(.*)\"") ); quotedArgs.setMinimal( true ); if ( quotedArgs.search( args ) != -1 ) @@ -380,14 +380,14 @@ QStringList Kopete::CommandHandler::parseArguments( const QString &args ) arguments.append( quotedArgs.cap(i) ); } - QStringList otherArgs = QStringList::split( QRegExp(QString::fromLatin1("\\s+")), args.section( quotedArgs, 0 ) ); - for( QStringList::Iterator it = otherArgs.begin(); it != otherArgs.end(); ++it ) + TQStringList otherArgs = TQStringList::split( TQRegExp(TQString::fromLatin1("\\s+")), args.section( quotedArgs, 0 ) ); + for( TQStringList::Iterator it = otherArgs.begin(); it != otherArgs.end(); ++it ) arguments.append( *it ); return arguments; } -bool Kopete::CommandHandler::commandHandled( const QString &command ) +bool Kopete::CommandHandler::commandHandled( const TQString &command ) { for( PluginCommandMap::Iterator it = p->pluginCommands.begin(); it != p->pluginCommands.end(); ++it ) { @@ -398,7 +398,7 @@ bool Kopete::CommandHandler::commandHandled( const QString &command ) return false; } -bool Kopete::CommandHandler::commandHandledByProtocol( const QString &command, Kopete::Protocol *protocol ) +bool Kopete::CommandHandler::commandHandledByProtocol( const TQString &command, Kopete::Protocol *protocol ) { // Make sure the protocol is not NULL if(!protocol) @@ -406,7 +406,7 @@ bool Kopete::CommandHandler::commandHandledByProtocol( const QString &command, K // Fetch the commands for the protocol CommandList commandList = commands( protocol ); - QDictIterator<Kopete::Command> it ( commandList ); + TQDictIterator<Kopete::Command> it ( commandList ); // Loop through commands and check if they match the supplied command for( ; it.current(); ++it ) @@ -453,7 +453,7 @@ CommandList Kopete::CommandHandler::commands( Kopete::Protocol *protocol ) void Kopete::CommandHandler::addCommands( CommandList &from, CommandList &to, CommandType type ) { - QDictIterator<Kopete::Command> itDict( from ); + TQDictIterator<Kopete::Command> itDict( from ); for( ; itDict.current(); ++itDict ) { if( !to[ itDict.currentKey() ] && @@ -469,17 +469,17 @@ void Kopete::CommandHandler::slotViewCreated( KopeteView *view ) void Kopete::CommandHandler::slotPluginLoaded( Kopete::Plugin *plugin ) { - connect( plugin, SIGNAL( destroyed( QObject * ) ), this, SLOT( slotPluginDestroyed( QObject * ) ) ); + connect( plugin, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( slotPluginDestroyed( TQObject * ) ) ); if( !p->pluginCommands.contains( plugin ) ) { - //Create a QDict optomized for a larger # of commands, and case insensitive + //Create a TQDict optomized for a larger # of commands, and case insensitive CommandList mCommands(31, false); mCommands.setAutoDelete( true ); p->pluginCommands.insert( plugin, mCommands ); } } -void Kopete::CommandHandler::slotPluginDestroyed( QObject *plugin ) +void Kopete::CommandHandler::slotPluginDestroyed( TQObject *plugin ) { p->pluginCommands.remove( static_cast<Kopete::Plugin*>(plugin) ); } diff --git a/kopete/libkopete/kopetecommandhandler.h b/kopete/libkopete/kopetecommandhandler.h index f763ace6..9632f872 100644 --- a/kopete/libkopete/kopetecommandhandler.h +++ b/kopete/libkopete/kopetecommandhandler.h @@ -17,7 +17,7 @@ #ifndef _KOPETECOMMANDHANDLER_H_ #define _KOPETECOMMANDHANDLER_H_ -#include <qdict.h> +#include <tqdict.h> #include <kshortcut.h> #include "kopetemessage.h" @@ -38,7 +38,7 @@ class Plugin; class Protocol; class Command; -typedef QDict<Command> CommandList; +typedef TQDict<Command> CommandList; /** * @author Jason Keirstead <jason@keirstead.org> @@ -76,7 +76,7 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param parent The plugin who owns this command * @param command The command we want to handle, not including the '/' * @param handlerSlot The slot used to handle the command. This slot must - * accept two parameters, a QString of arguments, and a Kopete::ChatSession + * accept two parameters, a TQString of arguments, and a Kopete::ChatSession * pointer to the manager under which the command was sent. * @param help An optional help string to be shown when the user uses * /help \<command\> @@ -85,9 +85,9 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param cut a default keyboard shortcut * @param pix icon name, the icon will be shown in menus */ - void registerCommand( QObject *parent, const QString &command, const char* handlerSlot, - const QString &help = QString::null, uint minArgs = 0, int maxArgs = -1, - const KShortcut &cut = 0, const QString &pix = QString::null ); + void registerCommand( TQObject *parent, const TQString &command, const char* handlerSlot, + const TQString &help = TQString::null, uint minArgs = 0, int maxArgs = -1, + const KShortcut &cut = 0, const TQString &pix = TQString::null ); /** * \brief Register a command alias. @@ -106,15 +106,15 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param cut a default keyboard shortcut * @param pix icon name, the icon will be shown in menus */ - void registerAlias( QObject *parent, - const QString &alias, - const QString &formatString, - const QString &help = QString::null, + void registerAlias( TQObject *parent, + const TQString &alias, + const TQString &formatString, + const TQString &help = TQString::null, CommandType = SystemAlias, uint minArgs = 0, int maxArgs = -1, const KShortcut &cut = 0, - const QString &pix = QString::null ); + const TQString &pix = TQString::null ); /** * \brief Unregister a command. @@ -126,16 +126,16 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param parent The plugin who owns this command * @param command The command to unload */ - void unregisterCommand( QObject *parent, const QString &command ); + void unregisterCommand( TQObject *parent, const TQString &command ); /** * \brief Unregister an alias. * - * \see unregisterCommand( QObject *parent, const QString &command ) + * \see unregisterCommand( TQObject *parent, const TQString &command ) * @param parent The plugin who owns this alias * @param alias The alais to unload */ - void unregisterAlias( QObject *parent, const QString &alias ); + void unregisterAlias( TQObject *parent, const TQString &alias ); /** * \brief Process a message to see if any commands should be handled @@ -150,17 +150,17 @@ class KOPETE_EXPORT CommandHandler : public QObject * \brief Process a message to see if any commands should be handled * * \see processMessage( Kopete::Message &msg, Kopete::ChatSession *manager) - * \param msg A QString contain the message + * \param msg A TQString contain the message * \param manager the Kopete::ChatSession who will own the message * \return true if the command was handled, false if the command was not handled. */ - bool processMessage( const QString &msg, ChatSession *manager ); + bool processMessage( const TQString &msg, ChatSession *manager ); /** - * Parses a string of command arguments into a QStringList. Quoted + * Parses a string of command arguments into a TQStringList. Quoted * blocks within the arguments string are treated as one argument. */ - static QStringList parseArguments( const QString &args ); + static TQStringList parseArguments( const TQString &args ); /** * \brief Check if a command is already handled @@ -168,7 +168,7 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param command The command to check * @return True if the command is already being handled, False if not */ - bool commandHandled( const QString &command ); + bool commandHandled( const TQString &command ); /** * \brief Check if a command is already handled by a spesific protocol @@ -177,24 +177,24 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param protocol The protocol to check * @return True if the command is already being handled, False if not */ - bool commandHandledByProtocol( const QString &command, Protocol *protocol); + bool commandHandledByProtocol( const TQString &command, Protocol *protocol); private slots: void slotPluginLoaded( Kopete::Plugin * ); - void slotPluginDestroyed( QObject * ); + void slotPluginDestroyed( TQObject * ); void slotExecReturnedData(KProcess *proc, char *buff, int bufflen ); void slotExecFinished(KProcess *proc); void slotViewCreated( KopeteView *view ); - void slotHelpCommand( const QString & args, Kopete::ChatSession *manager ); - void slotClearCommand( const QString & args, Kopete::ChatSession *manager ); - void slotPartCommand( const QString & args, Kopete::ChatSession *manager ); - void slotCloseCommand( const QString & args, Kopete::ChatSession *manager ); - //void slotMeCommand( const QString & args, Kopete::ChatSession *manager ); - void slotExecCommand( const QString & args, Kopete::ChatSession *manager ); - void slotAwayCommand( const QString & args, Kopete::ChatSession *manager ); - void slotAwayAllCommand( const QString & args, Kopete::ChatSession *manager ); - void slotSayCommand( const QString & args, Kopete::ChatSession *manager ); + void slotHelpCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotClearCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotPartCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotCloseCommand( const TQString & args, Kopete::ChatSession *manager ); + //void slotMeCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotExecCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotAwayCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotAwayAllCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotSayCommand( const TQString & args, Kopete::ChatSession *manager ); private: /** diff --git a/kopete/libkopete/kopetecontact.cpp b/kopete/libkopete/kopetecontact.cpp index 15cb27df..546958ef 100644 --- a/kopete/libkopete/kopetecontact.cpp +++ b/kopete/libkopete/kopetecontact.cpp @@ -19,7 +19,7 @@ #include "kopetecontact.h" -#include <qapplication.h> +#include <tqapplication.h> #include <kdebug.h> @@ -47,14 +47,14 @@ #include "kopeteemoticons.h" //For the moving to another metacontact dialog -#include <qlabel.h> -#include <qimage.h> -#include <qmime.h> -#include <qvbox.h> +#include <tqlabel.h> +#include <tqimage.h> +#include <tqmime.h> +#include <tqvbox.h> #include <klistview.h> -#include <qcheckbox.h> -#include <qwhatsthis.h> -#include <qstylesheet.h> +#include <tqcheckbox.h> +#include <tqwhatsthis.h> +#include <tqstylesheet.h> namespace Kopete { @@ -68,19 +68,19 @@ public: MetaContact *metaContact; - QString contactId; - QString icon; + TQString contactId; + TQString icon; - QTime idleTimer; + TQTime idleTimer; unsigned long int idleTime; Kopete::ContactProperty::Map properties; }; -Contact::Contact( Account *account, const QString &contactId, - MetaContact *parent, const QString &icon ) - : QObject( parent ) +Contact::Contact( Account *account, const TQString &contactId, + MetaContact *parent, const TQString &icon ) + : TQObject( parent ) { d = new Private; @@ -98,7 +98,7 @@ Contact::Contact( Account *account, const QString &contactId, if ( account ) { account->registerContact( this ); - connect( account, SIGNAL( isConnectedChanged() ), SLOT( slotAccountIsConnectedChanged() ) ); + connect( account, TQT_SIGNAL( isConnectedChanged() ), TQT_SLOT( slotAccountIsConnectedChanged() ) ); } // Need to check this because myself() may have no parent @@ -106,8 +106,8 @@ Contact::Contact( Account *account, const QString &contactId, // (ex: for unit tests or chat window style preview) if( parent && protocol() ) { - connect( parent, SIGNAL( aboutToSave( Kopete::MetaContact * ) ), - protocol(), SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); + connect( parent, TQT_SIGNAL( aboutToSave( Kopete::MetaContact * ) ), + protocol(), TQT_SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); parent->addContact( this ); } @@ -146,7 +146,7 @@ void Contact::setOnlineStatus( const OnlineStatus &status ) if( oldStatus.status() == OnlineStatus::Offline && status.status() != OnlineStatus::Offline ) { - setProperty( globalProps->onlineSince(), QDateTime::currentDateTime() ); + setProperty( globalProps->onlineSince(), TQDateTime::currentDateTime() ); /*kdDebug(14010) << k_funcinfo << "REMOVING lastSeen property for " << d->displayName << endl;*/ removeProperty( globalProps->lastSeen() ); @@ -158,7 +158,7 @@ void Contact::setOnlineStatus( const OnlineStatus &status ) removeProperty( globalProps->onlineSince() ); /*kdDebug(14010) << k_funcinfo << "SETTING lastSeen property for " << d->displayName << endl;*/ - setProperty( globalProps->lastSeen(), QDateTime::currentDateTime() ); + setProperty( globalProps->lastSeen(), TQDateTime::currentDateTime() ); } if ( this == account()->myself() || account()->isConnected() ) @@ -177,7 +177,7 @@ void Contact::slotAccountIsConnectedChanged() } -void Contact::sendFile( const KURL &, const QString &, uint ) +void Contact::sendFile( const KURL &, const TQString &, uint ) { kdWarning( 14010 ) << k_funcinfo << "Plugin " << protocol()->pluginId() << " has enabled file sending, " @@ -199,18 +199,18 @@ KPopupMenu* Contact::popupMenu( ChatSession *manager ) KPopupMenu *menu = new KPopupMenu(); // insert title - QString titleText; - QString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString titleText; + TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if( nick.isEmpty() ) - titleText = QString::fromLatin1( "%1 (%2)" ).arg( contactId(), onlineStatus().description() ); + titleText = TQString::fromLatin1( "%1 (%2)" ).arg( contactId(), onlineStatus().description() ); else - titleText = QString::fromLatin1( "%1 <%2> (%3)" ).arg( nick, contactId(), onlineStatus().description() ); + titleText = TQString::fromLatin1( "%1 <%2> (%3)" ).arg( nick, contactId(), onlineStatus().description() ); menu->insertTitle( titleText ); if( metaContact() && metaContact()->isTemporary() && contactId() != account()->myself()->contactId() ) { - KAction *actionAddContact = new KAction( i18n( "&Add to Your Contact List" ), QString::fromLatin1( "add_user" ), - 0, this, SLOT( slotAddContact() ), menu, "actionAddContact" ); + KAction *actionAddContact = new KAction( i18n( "&Add to Your Contact List" ), TQString::fromLatin1( "add_user" ), + 0, this, TQT_SLOT( slotAddContact() ), menu, "actionAddContact" ); actionAddContact->plug( menu ); menu->insertSeparator(); } @@ -219,15 +219,15 @@ KPopupMenu* Contact::popupMenu( ChatSession *manager ) bool reach = account()->isConnected() && isReachable(); bool myself = (this == account()->myself()); - KAction *actionSendMessage = KopeteStdAction::sendMessage( this, SLOT( sendMessage() ), menu, "actionSendMessage" ); + KAction *actionSendMessage = KopeteStdAction::sendMessage( this, TQT_SLOT( sendMessage() ), menu, "actionSendMessage" ); actionSendMessage->setEnabled( reach && !myself ); actionSendMessage->plug( menu ); - KAction *actionChat = KopeteStdAction::chat( this, SLOT( startChat() ), menu, "actionChat" ); + KAction *actionChat = KopeteStdAction::chat( this, TQT_SLOT( startChat() ), menu, "actionChat" ); actionChat->setEnabled( reach && !myself ); actionChat->plug( menu ); - KAction *actionSendFile = KopeteStdAction::sendFile( this, SLOT( sendFile() ), menu, "actionSendFile" ); + KAction *actionSendFile = KopeteStdAction::sendFile( this, TQT_SLOT( sendFile() ), menu, "actionSendFile" ); actionSendFile->setEnabled( reach && d->fileCapable && !myself ); actionSendFile->plug( menu ); @@ -235,7 +235,7 @@ KPopupMenu* Contact::popupMenu( ChatSession *manager ) // through the use of the customContextMenuActions() function // Get the custom actions from the protocols ( pure virtual function ) - QPtrList<KAction> *customActions = customContextMenuActions( manager ); + TQPtrList<KAction> *customActions = customContextMenuActions( manager ); if( customActions && !customActions->isEmpty() ) { menu->insertSeparator(); @@ -248,19 +248,19 @@ KPopupMenu* Contact::popupMenu( ChatSession *manager ) menu->insertSeparator(); if( metaContact() && !metaContact()->isTemporary() ) - KopeteStdAction::changeMetaContact( this, SLOT( changeMetaContact() ), menu, "actionChangeMetaContact" )->plug( menu ); + KopeteStdAction::changeMetaContact( this, TQT_SLOT( changeMetaContact() ), menu, "actionChangeMetaContact" )->plug( menu ); - KopeteStdAction::contactInfo( this, SLOT( slotUserInfo() ), menu, "actionUserInfo" )->plug( menu ); + KopeteStdAction::contactInfo( this, TQT_SLOT( slotUserInfo() ), menu, "actionUserInfo" )->plug( menu ); #if 0 //this is not fully implemented yet (and doesn't work). disable for now - Olivier 2005-01-11 if ( account()->isBlocked( d->contactId ) ) - KopeteStdAction::unblockContact( this, SLOT( slotUnblock() ), menu, "actionUnblockContact" )->plug( menu ); + KopeteStdAction::unblockContact( this, TQT_SLOT( slotUnblock() ), menu, "actionUnblockContact" )->plug( menu ); else - KopeteStdAction::blockContact( this, SLOT( slotBlock() ), menu, "actionBlockContact" )->plug( menu ); + KopeteStdAction::blockContact( this, TQT_SLOT( slotBlock() ), menu, "actionBlockContact" )->plug( menu ); #endif if( metaContact() && !metaContact()->isTemporary() ) - KopeteStdAction::deleteContact( this, SLOT( slotDelete() ), menu, "actionDeleteContact" )->plug( menu ); + KopeteStdAction::deleteContact( this, TQT_SLOT( slotDelete() ), menu, "actionDeleteContact" )->plug( menu ); return menu; } @@ -270,19 +270,19 @@ void Contact::changeMetaContact() KDialogBase *moveDialog = new KDialogBase( Kopete::UI::Global::mainWidget(), "moveDialog", true, i18n( "Move Contact" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ); - QVBox *w = new QVBox( moveDialog ); + TQVBox *w = new TQVBox( moveDialog ); w->setSpacing( KDialog::spacingHint() ); Kopete::UI::MetaContactSelectorWidget *selector = new Kopete::UI::MetaContactSelectorWidget(w); selector->setLabelMessage(i18n( "Select the meta contact to which you want to move this contact:" )); // exclude this metacontact as a target metacontact for the move selector->excludeMetaContact( metaContact() ); - QCheckBox *chkCreateNew = new QCheckBox( i18n( "Create a new metacontact for this contact" ), w ); - QWhatsThis::add( chkCreateNew , i18n( "If you select this option, a new metacontact will be created in the top-level group " + TQCheckBox *chkCreateNew = new TQCheckBox( i18n( "Create a new metacontact for this contact" ), w ); + TQWhatsThis::add( chkCreateNew , i18n( "If you select this option, a new metacontact will be created in the top-level group " "with the name of this contact and the contact will be moved to it." ) ); - QObject::connect( chkCreateNew , SIGNAL( toggled(bool) ) , selector , SLOT ( setDisabled(bool) ) ) ; + TQObject::connect( chkCreateNew , TQT_SIGNAL( toggled(bool) ) , selector , TQT_SLOT ( setDisabled(bool) ) ) ; moveDialog->setMainWidget(w); - if( moveDialog->exec() == QDialog::Accepted ) + if( moveDialog->exec() == TQDialog::Accepted ) { Kopete::MetaContact *mc = selector->metaContact(); if(chkCreateNew->isChecked()) @@ -314,14 +314,14 @@ void Contact::setMetaContact( MetaContact *m ) { //only one contact, including this one, that mean the contact will be empty efter the move result = KMessageBox::questionYesNoCancel( Kopete::UI::Global::mainWidget(), i18n( "You are moving the contact `%1' to the meta contact `%2'.\n" "`%3' will be empty afterwards. Do you want to delete this contact?" ) - .arg(contactId(), m ? m->displayName() : QString::null, old->displayName()) - , i18n( "Move Contact" ), KStdGuiItem::del(), i18n( "&Keep" ) , QString::fromLatin1("delete_old_contact_when_move") ); + .arg(contactId(), m ? m->displayName() : TQString::null, old->displayName()) + , i18n( "Move Contact" ), KStdGuiItem::del(), i18n( "&Keep" ) , TQString::fromLatin1("delete_old_contact_when_move") ); if(result==KMessageBox::Cancel) return; } old->removeContact( this ); - disconnect( old, SIGNAL( aboutToSave( Kopete::MetaContact * ) ), - protocol(), SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); + disconnect( old, TQT_SIGNAL( aboutToSave( Kopete::MetaContact * ) ), + protocol(), TQT_SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); if(result==KMessageBox::Yes) { @@ -346,19 +346,19 @@ void Contact::setMetaContact( MetaContact *m ) // between adding completely new contacts (which should be written to kabc) and restoring upon restart // (where no write is needed). KABCPersistence::self()->write( m ); - connect( d->metaContact, SIGNAL( aboutToSave( Kopete::MetaContact * ) ), - protocol(), SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); + connect( d->metaContact, TQT_SIGNAL( aboutToSave( Kopete::MetaContact * ) ), + protocol(), TQT_SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); } sync(); } -void Contact::serialize( QMap<QString, QString> &/*serializedData*/, - QMap<QString, QString> & /* addressBookData */ ) +void Contact::serialize( TQMap<TQString, TQString> &/*serializedData*/, + TQMap<TQString, TQString> & /* addressBookData */ ) { } -void Contact::serializeProperties(QMap<QString, QString> &serializedData) +void Contact::serializeProperties(TQMap<TQString, TQString> &serializedData) { Kopete::ContactProperty::Map::ConstIterator it;// = d->properties.ConstIterator; @@ -367,8 +367,8 @@ void Contact::serializeProperties(QMap<QString, QString> &serializedData) if (!it.data().tmpl().persistent()) continue; - QVariant val = it.data().value(); - QString key = QString::fromLatin1("prop_%1_%2").arg(QString::fromLatin1(val.typeName()), it.key()); + TQVariant val = it.data().value(); + TQString key = TQString::fromLatin1("prop_%1_%2").arg(TQString::fromLatin1(val.typeName()), it.key()); serializedData[key] = val.toString(); @@ -376,28 +376,28 @@ void Contact::serializeProperties(QMap<QString, QString> &serializedData) } // end serializeProperties() void Contact::deserializeProperties( - QMap<QString, QString> &serializedData ) + TQMap<TQString, TQString> &serializedData ) { - QMap<QString, QString>::ConstIterator it; + TQMap<TQString, TQString>::ConstIterator it; for ( it=serializedData.begin(); it != serializedData.end(); ++it ) { - QString key = it.key(); + TQString key = it.key(); - if ( !key.startsWith( QString::fromLatin1("prop_") ) ) // avoid parsing other serialized data + if ( !key.startsWith( TQString::fromLatin1("prop_") ) ) // avoid parsing other serialized data continue; - QStringList keyList = QStringList::split( QChar('_'), key, false ); + TQStringList keyList = TQStringList::split( TQChar('_'), key, false ); if( keyList.count() < 3 ) // invalid key, not enough parts in string "prop_X_Y" continue; key = keyList[2]; // overwrite key var with the real key name this property has - QString type( keyList[1] ); // needed for QVariant casting + TQString type( keyList[1] ); // needed for TQVariant casting - QVariant variant( it.data() ); - if( !variant.cast(QVariant::nameToType(type.latin1())) ) + TQVariant variant( it.data() ); + if( !variant.cast(TQVariant::nameToType(type.latin1())) ) { kdDebug(14010) << k_funcinfo << - "Casting QVariant to needed type FAILED" << + "Casting TQVariant to needed type FAILED" << "key=" << key << ", type=" << type << endl; continue; } @@ -425,14 +425,14 @@ bool Contact::isReachable() void Contact::startChat() { - KopeteView *v=manager( CanCreate )->view(true, QString::fromLatin1("kopete_chatwindow") ); + KopeteView *v=manager( CanCreate )->view(true, TQString::fromLatin1("kopete_chatwindow") ); if(v) v->raise(true); } void Contact::sendMessage() { - KopeteView *v=manager( CanCreate )->view(true, QString::fromLatin1("kopete_emailwindow") ); + KopeteView *v=manager( CanCreate )->view(true, TQString::fromLatin1("kopete_emailwindow") ); if(v) v->raise(true); } @@ -458,8 +458,8 @@ void Contact::slotDelete() { if ( KMessageBox::warningContinueCancel( Kopete::UI::Global::mainWidget(), i18n( "Are you sure you want to remove the contact '%1' from your contact list?" ). - arg( d->contactId ), i18n( "Remove Contact" ), KGuiItem(i18n("Remove"), QString::fromLatin1("delete_user") ), - QString::fromLatin1("askRemoveContact"), KMessageBox::Notify | KMessageBox::Dangerous ) + arg( d->contactId ), i18n( "Remove Contact" ), KGuiItem(i18n("Remove"), TQString::fromLatin1("delete_user") ), + TQString::fromLatin1("askRemoveContact"), KMessageBox::Notify | KMessageBox::Dangerous ) == KMessageBox::Continue ) { deleteContact(); @@ -478,7 +478,7 @@ MetaContact * Contact::metaContact() const return d->metaContact; } -QString Contact::contactId() const +TQString Contact::contactId() const { return d->contactId; } @@ -500,23 +500,23 @@ void Contact::sync(unsigned int) /* Default implementation does nothing */ } -QString& Contact::icon() const +TQString& Contact::icon() const { return d->icon; } -void Contact::setIcon( const QString& icon ) +void Contact::setIcon( const TQString& icon ) { d->icon = icon; return; } -QPtrList<KAction> *Contact::customContextMenuActions() +TQPtrList<KAction> *Contact::customContextMenuActions() { return 0L; } -QPtrList<KAction> *Contact::customContextMenuActions( ChatSession * /* manager */ ) +TQPtrList<KAction> *Contact::customContextMenuActions( ChatSession * /* manager */ ) { return customContextMenuActions(); } @@ -568,17 +568,17 @@ void Contact::setIdleTime( unsigned long int t ) } -QStringList Contact::properties() const +TQStringList Contact::properties() const { return d->properties.keys(); } -bool Contact::hasProperty(const QString &key) const +bool Contact::hasProperty(const TQString &key) const { return d->properties.contains(key); } -const ContactProperty &Contact::property(const QString &key) const +const ContactProperty &Contact::property(const TQString &key) const { if(hasProperty(key)) return d->properties[key]; @@ -597,7 +597,7 @@ const Kopete::ContactProperty &Contact::property( void Contact::setProperty(const Kopete::ContactPropertyTmpl &tmpl, - const QVariant &value) + const TQVariant &value) { if(tmpl.isNull() || tmpl.key().isEmpty()) { @@ -606,13 +606,13 @@ void Contact::setProperty(const Kopete::ContactPropertyTmpl &tmpl, return; } - if(value.isNull() || value.canCast(QVariant::String) && value.toString().isEmpty()) + if(value.isNull() || value.canCast(TQVariant::String) && value.toString().isEmpty()) { removeProperty(tmpl); } else { - QVariant oldValue = property(tmpl.key()).value(); + TQVariant oldValue = property(tmpl.key()).value(); if(oldValue != value) { @@ -629,29 +629,29 @@ void Contact::removeProperty(const Kopete::ContactPropertyTmpl &tmpl) if(!tmpl.isNull() && !tmpl.key().isEmpty()) { - QVariant oldValue = property(tmpl.key()).value(); + TQVariant oldValue = property(tmpl.key()).value(); d->properties.remove(tmpl.key()); - emit propertyChanged(this, tmpl.key(), oldValue, QVariant()); + emit propertyChanged(this, tmpl.key(), oldValue, TQVariant()); } } -QString Contact::toolTip() const +TQString Contact::toolTip() const { Kopete::ContactProperty p; - QString tip; - QStringList shownProps = KopetePrefs::prefs()->toolTipContents(); + TQString tip; + TQStringList shownProps = KopetePrefs::prefs()->toolTipContents(); // -------------------------------------------------------------------------- // Fixed part of tooltip - QString iconName = QString::fromLatin1("kopete-contact-icon:%1:%2:%3") + TQString iconName = TQString::fromLatin1("kopete-contact-icon:%1:%2:%3") .arg( KURL::encode_string( protocol()->pluginId() ), KURL::encode_string( account()->accountId() ), KURL::encode_string( contactId() ) ); // TODO: the nickname should be a configurable properties, like others. -Olivier - QString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if ( nick.isEmpty() ) { tip = i18n( "<b>DISPLAY NAME</b><br><img src=\"%2\"> CONTACT STATUS", @@ -671,39 +671,39 @@ QString Contact::toolTip() const // -------------------------------------------------------------------------- // Configurable part of tooltip - for(QStringList::Iterator it=shownProps.begin(); it!=shownProps.end(); ++it) + for(TQStringList::Iterator it=shownProps.begin(); it!=shownProps.end(); ++it) { - if((*it) == QString::fromLatin1("FormattedName")) + if((*it) == TQString::fromLatin1("FormattedName")) { - QString name = formattedName(); + TQString name = formattedName(); if(!name.isEmpty()) { tip += i18n("<br><b>Full Name:</b> FORMATTED NAME", - "<br><b>Full Name:</b> <nobr>%1</nobr>").arg(QStyleSheet::escape(name)); + "<br><b>Full Name:</b> <nobr>%1</nobr>").arg(TQStyleSheet::escape(name)); } } - else if ((*it) == QString::fromLatin1("FormattedIdleTime")) + else if ((*it) == TQString::fromLatin1("FormattedIdleTime")) { - QString time = formattedIdleTime(); + TQString time = formattedIdleTime(); if(!time.isEmpty()) { tip += i18n("<br><b>Idle:</b> FORMATTED IDLE TIME", "<br><b>Idle:</b> <nobr>%1</nobr>").arg(time); } } - else if ((*it) == QString::fromLatin1("homePage")) + else if ((*it) == TQString::fromLatin1("homePage")) { - QString url = property(*it).value().toString(); + TQString url = property(*it).value().toString(); if(!url.isEmpty()) { tip += i18n("<br><b>Home Page:</b> FORMATTED URL", "<br><b>Home Page:</b> <a href=\"%1\"><nobr>%2</nobr></a>"). - arg( KURL::encode_string( url ), Kopete::Message::escape( QStyleSheet::escape(url) ) ); + arg( KURL::encode_string( url ), Kopete::Message::escape( TQStyleSheet::escape(url) ) ); } } - else if ((*it) == QString::fromLatin1("awayMessage")) + else if ((*it) == TQString::fromLatin1("awayMessage")) { - QString awaymsg = property(*it).value().toString(); + TQString awaymsg = property(*it).value().toString(); if(!awaymsg.isEmpty()) { tip += i18n("<br><b>Away Message:</b> FORMATTED AWAY MESSAGE", @@ -715,20 +715,20 @@ QString Contact::toolTip() const p = property(*it); if(!p.isNull()) { - QVariant val = p.value(); - QString valueText; + TQVariant val = p.value(); + TQString valueText; switch(val.type()) { - case QVariant::DateTime: + case TQVariant::DateTime: valueText = KGlobal::locale()->formatDateTime(val.toDateTime()); valueText = Kopete::Message::escape( valueText ); break; - case QVariant::Date: + case TQVariant::Date: valueText = KGlobal::locale()->formatDate(val.toDate()); valueText = Kopete::Message::escape( valueText ); break; - case QVariant::Time: + case TQVariant::Time: valueText = KGlobal::locale()->formatTime(val.toTime()); valueText = Kopete::Message::escape( valueText ); break; @@ -745,7 +745,7 @@ QString Contact::toolTip() const tip += i18n("<br><b>PROPERTY LABEL:</b> PROPERTY VALUE", "<br><nobr><b>%2:</b></nobr> %1"). - arg( valueText, QStyleSheet::escape(p.tmpl().label()) ); + arg( valueText, TQStyleSheet::escape(p.tmpl().label()) ); } } } @@ -753,16 +753,16 @@ QString Contact::toolTip() const return tip; } -QString Kopete::Contact::formattedName() const +TQString Kopete::Contact::formattedName() const { - if( hasProperty(QString::fromLatin1("FormattedName")) ) - return property(QString::fromLatin1("FormattedName")).value().toString(); + if( hasProperty(TQString::fromLatin1("FormattedName")) ) + return property(TQString::fromLatin1("FormattedName")).value().toString(); - QString ret; + TQString ret; Kopete::ContactProperty first, last; - first = property(QString::fromLatin1("firstName")); - last = property(QString::fromLatin1("lastName")); + first = property(TQString::fromLatin1("firstName")); + last = property(TQString::fromLatin1("lastName")); if(!first.isNull()) { if(!last.isNull()) // contact has both first and last name @@ -784,9 +784,9 @@ QString Kopete::Contact::formattedName() const return ret; } -QString Kopete::Contact::formattedIdleTime() const +TQString Kopete::Contact::formattedIdleTime() const { - QString ret; + TQString ret; unsigned long int leftTime = idleTime(); if ( leftTime > 0 ) @@ -837,14 +837,14 @@ void Kopete::Contact::slotUnblock() account()->unblock( d->contactId ); } -void Kopete::Contact::setNickName( const QString &name ) +void Kopete::Contact::setNickName( const TQString &name ) { setProperty( Kopete::Global::Properties::self()->nickName(), name ); } -QString Kopete::Contact::nickName() const +TQString Kopete::Contact::nickName() const { - QString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if( !nick.isEmpty() ) return nick; diff --git a/kopete/libkopete/kopetecontact.h b/kopete/libkopete/kopetecontact.h index 8f02bfc2..e093c5eb 100644 --- a/kopete/libkopete/kopetecontact.h +++ b/kopete/libkopete/kopetecontact.h @@ -20,7 +20,7 @@ #ifndef __KOPETECONTACT_H__ #define __KOPETECONTACT_H__ -#include <qobject.h> +#include <tqobject.h> #include <kurl.h> #include <kdemacros.h> #include "kopeteglobal.h" @@ -41,7 +41,7 @@ class OnlineStatus; class Plugin; class Protocol; class Account; -typedef QPtrList<Group> GroupList; +typedef TQPtrList<Group> GroupList; /** * @author Duncan Mac-Vicar P. <duncan@kde.org> @@ -56,16 +56,16 @@ class KOPETE_EXPORT Contact : public QObject Q_OBJECT Q_ENUMS( CanCreateFlags ) - Q_PROPERTY( QString formattedName READ formattedName ) - Q_PROPERTY( QString formattedIdleTime READ formattedIdleTime ) + Q_PROPERTY( TQString formattedName READ formattedName ) + Q_PROPERTY( TQString formattedIdleTime READ formattedIdleTime ) Q_PROPERTY( bool isOnline READ isOnline ) Q_PROPERTY( bool fileCapable READ isFileCapable WRITE setFileCapable ) Q_PROPERTY( bool canAcceptFiles READ canAcceptFiles ) //Q_PROPERTY( bool isReachable READ isReachable ) - Q_PROPERTY( QString contactId READ contactId ) - Q_PROPERTY( QString icon READ icon WRITE setIcon ) - Q_PROPERTY( QString toolTip READ toolTip ) - Q_PROPERTY( QString nickName READ nickName WRITE setNickName ) + Q_PROPERTY( TQString contactId READ contactId ) + Q_PROPERTY( TQString icon READ icon WRITE setIcon ) + Q_PROPERTY( TQString toolTip READ toolTip ) + Q_PROPERTY( TQString nickName READ nickName WRITE setNickName ) //Q_PROPERTY( unsigned long idleTime READ idleTime WRITE setIdleTime ) public: @@ -86,8 +86,8 @@ public: * @param parent is the parent @ref MetaContact this Contact is part of * @param icon is an optional icon */ - Contact( Account *account, const QString &id, MetaContact *parent, - const QString &icon = QString::null ); + Contact( Account *account, const TQString &id, MetaContact *parent, + const TQString &icon = TQString::null ); ~Contact(); @@ -110,7 +110,7 @@ public: * * @return The unique id of the contact */ - QString contactId() const; + TQString contactId() const; /** * \brief Get the protocol that the contact belongs to. @@ -172,17 +172,17 @@ public: * * Most plugins don't need more than these fields, so they only need * to set the address book fields themselves. If you have nothing to - * save at all you can clear the QMap, an empty map is treated as + * save at all you can clear the TQMap, an empty map is treated as * 'nothing to save'. * - * The provided addressBookFields QMap contains the index field as + * The provided addressBookFields TQMap contains the index field as * marked with @ref Plugin::addAddressBookField() with the - * contact id as value. If no index field is available the QMap is + * contact id as value. If no index field is available the TQMap is * simply passed as an empty map. * * @sa Protocol::deserializeContact */ - virtual void serialize( QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData ); + virtual void serialize( TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &addressBookData ); /** * @brief Serialize the contacts persistent properties for storage in the contact list. @@ -192,12 +192,12 @@ public: * In contrary to @ref serialize() this does not need to be reimplemented. * */ - void serializeProperties(QMap<QString, QString> &serializedData); + void serializeProperties(TQMap<TQString, TQString> &serializedData); /** * @brief Deserialize the contacts persistent properties */ - void deserializeProperties(QMap<QString, QString> &serializedData); + void deserializeProperties(TQMap<TQString, TQString> &serializedData); /** * @brief Get the online status of the contact @@ -222,12 +222,12 @@ public: * @return Collection of menu items to be show on the context menu * @todo if possible, try to use KXMLGUI */ - virtual QPtrList<KAction> *customContextMenuActions(); + virtual TQPtrList<KAction> *customContextMenuActions(); /** * @todo What is this function for ? */ - virtual QPtrList<KAction> *customContextMenuActions( ChatSession *manager ); + virtual TQPtrList<KAction> *customContextMenuActions( ChatSession *manager ); /** * @brief Get the Context Menu for this contact @@ -288,7 +288,7 @@ public: * If null, the protocol icon need to be used. * The icon is not colored, nor has the status icon overloaded */ - QString& icon() const; + TQString& icon() const; /** * @brief Change the icon to use for this contact @@ -298,7 +298,7 @@ public: * * if you want to go back to the protocol icon, set a null string. */ - void setIcon( const QString& icon ); + void setIcon( const TQString& icon ); /** * \brief Get the time (in seconds) this contact has been idle @@ -322,25 +322,25 @@ public: void setIdleTime(unsigned long int); /** - * @return A QStringList containing all property keys + * @return A TQStringList containing all property keys **/ - QStringList properties() const; + TQStringList properties() const; /** * Check for existance of a certain property stored * using "key". * \param key the property to check for **/ - bool hasProperty(const QString &key) const; + bool hasProperty(const TQString &key) const; /** * \brief Get the value of a property with key "key". * - * If you don't know the type of the returned QVariant, you will need + * If you don't know the type of the returned TQVariant, you will need * to check for it. * \return the value of the property **/ - const Kopete::ContactProperty &property(const QString &key) const; + const Kopete::ContactProperty &property(const TQString &key) const; const Kopete::ContactProperty &property(const Kopete::ContactPropertyTmpl &tmpl) const; /** @@ -350,27 +350,27 @@ public: * taken from this one * @param value The value to store * - * \note Setting a NULL value or an empty QString castable value + * \note Setting a NULL value or an empty TQString castable value * removes the property if it already existed. * <b>Don't</b> abuse this for property-removal, instead use * @ref removeProperty() if you want to remove on purpose. * The Removal is done to clean up the list of properties and to purge them * from UI. **/ - void setProperty(const Kopete::ContactPropertyTmpl &tmpl, const QVariant &value); + void setProperty(const Kopete::ContactPropertyTmpl &tmpl, const TQVariant &value); /** * \brief Convenience method to set the nickName property to the specified value * @param name The nickname to set */ - void setNickName( const QString &name ); + void setNickName( const TQString &name ); /** * \brief Convenience method to retrieve the nickName property. * * This method will return the contactId if there has been no nickName property set */ - QString nickName() const; + TQString nickName() const; /** * \brief Remove a property if it exists @@ -384,20 +384,20 @@ public: * Makes use of formattedName() and formattedIdleTime(). * \return an RTF tooltip depending on KopetePrefs settings **/ - QString toolTip() const; + TQString toolTip() const; /** * Returns a formatted string of "firstName" and/or "lastName" properties * if present. * Suitable for GUI display **/ - QString formattedName() const; + TQString formattedName() const; /** * Returns a formatted string of idleTime(). * Suitable for GUI display **/ - QString formattedIdleTime() const; + TQString formattedIdleTime() const; /** * used in @ref sync() @@ -475,7 +475,7 @@ public slots: * file size (such as over asocket */ virtual void sendFile( const KURL &sourceURL = KURL(), - const QString &fileName = QString::null, uint fileSize = 0L ); + const TQString &fileName = TQString::null, uint fileSize = 0L ); private slots: @@ -532,11 +532,11 @@ signals: * One of the contact's properties has changed. * @param contact this contact, useful for listening to signals from more than one contact * @param key the key whose value has changed - * @param oldValue the value before the change, or an invalid QVariant if the property is new - * @param newValue the value after the change, or an invalid QVariant if the property was removed + * @param oldValue the value before the change, or an invalid TQVariant if the property is new + * @param newValue the value after the change, or an invalid TQVariant if the property was removed */ - void propertyChanged( Kopete::Contact *contact, const QString &key, - const QVariant &oldValue, const QVariant &newValue ); + void propertyChanged( Kopete::Contact *contact, const TQString &key, + const TQVariant &oldValue, const TQVariant &newValue ); protected: virtual void virtual_hook(uint id, void *data); diff --git a/kopete/libkopete/kopetecontactlist.cpp b/kopete/libkopete/kopetecontactlist.cpp index 9aab9f2f..6e33f257 100644 --- a/kopete/libkopete/kopetecontactlist.cpp +++ b/kopete/libkopete/kopetecontactlist.cpp @@ -20,9 +20,9 @@ #include "kopetecontactlist.h" -#include <qdir.h> -#include <qregexp.h> -#include <qtimer.h> +#include <tqdir.h> +#include <tqregexp.h> +#include <tqtimer.h> #include <kapplication.h> #include <kabc/stdaddressbook.h> @@ -51,12 +51,12 @@ class ContactList::Private /** Flag: do not save the contactlist until she is completely loaded */ bool loaded ; - QPtrList<MetaContact> contacts; - QPtrList<Group> groups; - QPtrList<MetaContact> selectedMetaContacts; - QPtrList<Group> selectedGroups; + TQPtrList<MetaContact> contacts; + TQPtrList<Group> groups; + TQPtrList<MetaContact> selectedMetaContacts; + TQPtrList<Group> selectedGroups; - QTimer *saveTimer; + TQTimer *saveTimer; MetaContact *myself; @@ -80,7 +80,7 @@ ContactList *ContactList::self() } ContactList::ContactList() - : QObject( kapp, "KopeteContactList" ) + : TQObject( kapp, "KopeteContactList" ) { d=new Private; @@ -92,14 +92,14 @@ ContactList::ContactList() d->loaded=false; // automatically save on changes to the list - d->saveTimer = new QTimer( this, "saveTimer" ); - connect( d->saveTimer, SIGNAL( timeout() ), SLOT ( save() ) ); - - connect( this, SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), SLOT( slotSaveLater() ) ); - connect( this, SIGNAL( metaContactRemoved( Kopete::MetaContact * ) ), SLOT( slotSaveLater() ) ); - connect( this, SIGNAL( groupAdded( Kopete::Group * ) ), SLOT( slotSaveLater() ) ); - connect( this, SIGNAL( groupRemoved( Kopete::Group * ) ), SLOT( slotSaveLater() ) ); - connect( this, SIGNAL( groupRenamed( Kopete::Group *, const QString & ) ), SLOT( slotSaveLater() ) ); + d->saveTimer = new TQTimer( this, "saveTimer" ); + connect( d->saveTimer, TQT_SIGNAL( timeout() ), TQT_SLOT ( save() ) ); + + connect( this, TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), TQT_SLOT( slotSaveLater() ) ); + connect( this, TQT_SIGNAL( metaContactRemoved( Kopete::MetaContact * ) ), TQT_SLOT( slotSaveLater() ) ); + connect( this, TQT_SIGNAL( groupAdded( Kopete::Group * ) ), TQT_SLOT( slotSaveLater() ) ); + connect( this, TQT_SIGNAL( groupRemoved( Kopete::Group * ) ), TQT_SLOT( slotSaveLater() ) ); + connect( this, TQT_SIGNAL( groupRenamed( Kopete::Group *, const TQString & ) ), TQT_SLOT( slotSaveLater() ) ); } ContactList::~ContactList() @@ -108,21 +108,21 @@ ContactList::~ContactList() delete d; } -QPtrList<MetaContact> ContactList::metaContacts() const +TQPtrList<MetaContact> ContactList::metaContacts() const { return d->contacts; } -QPtrList<Group> ContactList::groups() const +TQPtrList<Group> ContactList::groups() const { return d->groups; } -MetaContact *ContactList::metaContact( const QString &metaContactId ) const +MetaContact *ContactList::metaContact( const TQString &metaContactId ) const { - QPtrListIterator<MetaContact> it( d->contacts ); + TQPtrListIterator<MetaContact> it( d->contacts ); for( ; it.current(); ++it ) { @@ -146,8 +146,8 @@ Group * ContactList::group(unsigned int groupId) const } -Contact *ContactList::findContact( const QString &protocolId, - const QString &accountId, const QString &contactId ) const +Contact *ContactList::findContact( const TQString &protocolId, + const TQString &accountId, const TQString &contactId ) const { //Browsing metacontacts is too slow, better to uses the Dict of the account. Account *i=AccountManager::self()->findAccount(protocolId,accountId); @@ -160,9 +160,9 @@ Contact *ContactList::findContact( const QString &protocolId, } -MetaContact *ContactList::findMetaContactByDisplayName( const QString &displayName ) const +MetaContact *ContactList::findMetaContactByDisplayName( const TQString &displayName ) const { - QPtrListIterator<MetaContact> it( d->contacts ); + TQPtrListIterator<MetaContact> it( d->contacts ); for( ; it.current(); ++it ) { // kdDebug(14010) << "Display Name: " << it.current()->displayName() << "\n"; @@ -174,10 +174,10 @@ MetaContact *ContactList::findMetaContactByDisplayName( const QString &displayNa return 0L; } -MetaContact* ContactList::findMetaContactByContactId( const QString &contactId ) const +MetaContact* ContactList::findMetaContactByContactId( const TQString &contactId ) const { - QPtrList<Account> acts=AccountManager::self()->accounts(); - QPtrListIterator<Account> it( acts ); + TQPtrList<Account> acts=AccountManager::self()->accounts(); + TQPtrListIterator<Account> it( acts ); for ( ; it.current(); ++it ) { Contact *c=(*it)->contacts()[contactId]; @@ -187,7 +187,7 @@ MetaContact* ContactList::findMetaContactByContactId( const QString &contactId ) return 0L; } -Group * ContactList::findGroup(const QString& displayName, int type) +Group * ContactList::findGroup(const TQString& displayName, int type) { if( type == Group::Temporary ) return Group::temporary(); @@ -205,12 +205,12 @@ Group * ContactList::findGroup(const QString& displayName, int type) } -QPtrList<MetaContact> ContactList::selectedMetaContacts() const +TQPtrList<MetaContact> ContactList::selectedMetaContacts() const { return d->selectedMetaContacts; } -QPtrList<Group> ContactList::selectedGroups() const +TQPtrList<Group> ContactList::selectedGroups() const { return d->selectedGroups; } @@ -224,9 +224,9 @@ void ContactList::addMetaContact( MetaContact *mc ) d->contacts.append( mc ); emit metaContactAdded( mc ); - connect( mc, SIGNAL( persistentDataChanged( ) ), SLOT( slotSaveLater() ) ); - connect( mc, SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), SIGNAL( metaContactAddedToGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); - connect( mc, SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), SIGNAL( metaContactRemovedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); + connect( mc, TQT_SIGNAL( persistentDataChanged( ) ), TQT_SLOT( slotSaveLater() ) ); + connect( mc, TQT_SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), TQT_SIGNAL( metaContactAddedToGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); + connect( mc, TQT_SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), TQT_SIGNAL( metaContactRemovedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); } @@ -245,7 +245,7 @@ void ContactList::removeMetaContact(MetaContact *m) } //removes subcontact from server here and now. - QPtrList<Contact> cts=m->contacts(); + TQPtrList<Contact> cts=m->contacts(); for( Contact *c = cts.first(); c; c = cts.next() ) { c->deleteContact(); @@ -263,7 +263,7 @@ void ContactList::addGroup( Group * g ) { d->groups.append( g ); emit groupAdded( g ); - connect( g , SIGNAL ( displayNameChanged(Kopete::Group* , const QString & )) , this , SIGNAL ( groupRenamed(Kopete::Group* , const QString & )) ) ; + connect( g , TQT_SIGNAL ( displayNameChanged(Kopete::Group* , const TQString & )) , this , TQT_SIGNAL ( groupRenamed(Kopete::Group* , const TQString & )) ) ; } } @@ -281,7 +281,7 @@ void ContactList::removeGroup( Group *g ) } -void ContactList::setSelectedItems(QPtrList<MetaContact> metaContacts , QPtrList<Group> groups) +void ContactList::setSelectedItems(TQPtrList<MetaContact> metaContacts , TQPtrList<Group> groups) { kdDebug( 14010 ) << k_funcinfo << metaContacts.count() << " metacontacts, " << groups.count() << " groups selected" << endl; d->selectedMetaContacts=metaContacts; @@ -304,11 +304,11 @@ void ContactList::loadGlobalIdentity() if(Kopete::Config::enableGlobalIdentity()) { // Disconnect to make sure it will not cause duplicate calls. - disconnect(myself(), SIGNAL(displayNameChanged(const QString&, const QString&)), this, SLOT(slotDisplayNameChanged())); - disconnect(myself(), SIGNAL(photoChanged()), this, SLOT(slotPhotoChanged())); + disconnect(myself(), TQT_SIGNAL(displayNameChanged(const TQString&, const TQString&)), this, TQT_SLOT(slotDisplayNameChanged())); + disconnect(myself(), TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotPhotoChanged())); - connect(myself(), SIGNAL(displayNameChanged(const QString&, const QString&)), this, SLOT(slotDisplayNameChanged())); - connect(myself(), SIGNAL(photoChanged()), this, SLOT(slotPhotoChanged())); + connect(myself(), TQT_SIGNAL(displayNameChanged(const TQString&, const TQString&)), this, TQT_SLOT(slotDisplayNameChanged())); + connect(myself(), TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotPhotoChanged())); // Ensure that the myself metaContactId is always the KABC whoAmI KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI(); @@ -324,8 +324,8 @@ void ContactList::loadGlobalIdentity() } else { - disconnect(myself(), SIGNAL(displayNameChanged(const QString&, const QString&)), this, SLOT(slotDisplayNameChanged())); - disconnect(myself(), SIGNAL(photoChanged()), this, SLOT(slotPhotoChanged())); + disconnect(myself(), TQT_SIGNAL(displayNameChanged(const TQString&, const TQString&)), this, TQT_SLOT(slotDisplayNameChanged())); + disconnect(myself(), TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotPhotoChanged())); } } @@ -370,7 +370,7 @@ void ContactList::load() { loadXML(); // Apply the global identity when all the protocols plugins are loaded. - connect(PluginManager::self(), SIGNAL(allPluginsLoaded()), this, SLOT(loadGlobalIdentity())); + connect(PluginManager::self(), TQT_SIGNAL(allPluginsLoaded()), this, TQT_SLOT(loadGlobalIdentity())); } void ContactList::loadXML() @@ -378,25 +378,25 @@ void ContactList::loadXML() // don't save when we're in the middle of this... d->loaded = false; - QString filename = locateLocal( "appdata", QString::fromLatin1( "contactlist.xml" ) ); + TQString filename = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) ); if( filename.isEmpty() ) { d->loaded=true; return ; } - QDomDocument contactList( QString::fromLatin1( "kopete-contact-list" ) ); + TQDomDocument contactList( TQString::fromLatin1( "kopete-contact-list" ) ); - QFile contactListFile( filename ); + TQFile contactListFile( filename ); contactListFile.open( IO_ReadOnly ); contactList.setContent( &contactListFile ); - QDomElement list = contactList.documentElement(); + TQDomElement list = contactList.documentElement(); - QString versionString = list.attribute( QString::fromLatin1( "version" ), QString::null ); + TQString versionString = list.attribute( TQString::fromLatin1( "version" ), TQString::null ); uint version = 0; - if( QRegExp( QString::fromLatin1( "[0-9]+\\.[0-9]" ) ).exactMatch( versionString ) ) - version = versionString.replace( QString::fromLatin1( "." ), QString::null ).toUInt(); + if( TQRegExp( TQString::fromLatin1( "[0-9]+\\.[0-9]" ) ).exactMatch( versionString ) ) + version = versionString.replace( TQString::fromLatin1( "." ), TQString::null ).toUInt(); if( version < Private::ContactListVersion ) { @@ -410,7 +410,7 @@ void ContactList::loadXML() convertContactList( filename, version, Private::ContactListVersion ); - contactList = QDomDocument ( QString::fromLatin1( "kopete-contact-list" ) ); + contactList = TQDomDocument ( TQString::fromLatin1( "kopete-contact-list" ) ); contactListFile.open( IO_ReadOnly ); contactList.setContent( &contactListFile ); @@ -420,13 +420,13 @@ void ContactList::loadXML() addGroup( Kopete::Group::topLevel() ); - QDomElement element = list.firstChild().toElement(); + TQDomElement element = list.firstChild().toElement(); while( !element.isNull() ) { - if( element.tagName() == QString::fromLatin1("meta-contact") ) + if( element.tagName() == TQString::fromLatin1("meta-contact") ) { //TODO: id isn't used - //QString id = element.attribute( "id", QString::null ); + //TQString id = element.attribute( "id", TQString::null ); Kopete::MetaContact *metaContact = new Kopete::MetaContact(); if ( !metaContact->fromXML( element ) ) { @@ -439,7 +439,7 @@ void ContactList::loadXML() metaContact ); } } - else if( element.tagName() == QString::fromLatin1("kopete-group") ) + else if( element.tagName() == TQString::fromLatin1("kopete-group") ) { Kopete::Group *group = new Kopete::Group(); if( !group->fromXML( element ) ) @@ -453,7 +453,7 @@ void ContactList::loadXML() } } // Only load myself metacontact information when Global Identity is enabled. - else if( element.tagName() == QString::fromLatin1("myself-meta-contact") && Kopete::Config::enableGlobalIdentity() ) + else if( element.tagName() == TQString::fromLatin1("myself-meta-contact") && Kopete::Config::enableGlobalIdentity() ) { if( !myself()->fromXML( element ) ) { @@ -473,94 +473,94 @@ void ContactList::loadXML() d->loaded=true; } -void ContactList::convertContactList( const QString &fileName, uint /* fromVersion */, uint /* toVersion */ ) +void ContactList::convertContactList( const TQString &fileName, uint /* fromVersion */, uint /* toVersion */ ) { // For now, ignore fromVersion and toVersion. These are meant for future // changes to allow incremental (multi-pass) conversion so we don't have // to rewrite the whole conversion code for each change. - QDomDocument contactList( QString::fromLatin1( "messaging-contact-list" ) ); - QFile contactListFile( fileName ); + TQDomDocument contactList( TQString::fromLatin1( "messaging-contact-list" ) ); + TQFile contactListFile( fileName ); contactListFile.open( IO_ReadOnly ); contactList.setContent( &contactListFile ); - QDomElement oldList = contactList.documentElement(); + TQDomElement oldList = contactList.documentElement(); - QDomDocument newList( QString::fromLatin1( "kopete-contact-list" ) ); - newList.appendChild( newList.createProcessingInstruction( QString::fromLatin1( "xml" ), QString::fromLatin1( "version=\"1.0\"" ) ) ); + TQDomDocument newList( TQString::fromLatin1( "kopete-contact-list" ) ); + newList.appendChild( newList.createProcessingInstruction( TQString::fromLatin1( "xml" ), TQString::fromLatin1( "version=\"1.0\"" ) ) ); - QDomElement newRoot = newList.createElement( QString::fromLatin1( "kopete-contact-list" ) ); + TQDomElement newRoot = newList.createElement( TQString::fromLatin1( "kopete-contact-list" ) ); newList.appendChild( newRoot ); - newRoot.setAttribute( QString::fromLatin1( "version" ), QString::fromLatin1( "1.0" ) ); + newRoot.setAttribute( TQString::fromLatin1( "version" ), TQString::fromLatin1( "1.0" ) ); - QDomNode oldNode = oldList.firstChild(); + TQDomNode oldNode = oldList.firstChild(); while( !oldNode.isNull() ) { - QDomElement oldElement = oldNode.toElement(); + TQDomElement oldElement = oldNode.toElement(); if( !oldElement.isNull() ) { - if( oldElement.tagName() == QString::fromLatin1("meta-contact") ) + if( oldElement.tagName() == TQString::fromLatin1("meta-contact") ) { // Ignore ID, it is not used in the current list anyway - QDomElement newMetaContact = newList.createElement( QString::fromLatin1( "meta-contact" ) ); + TQDomElement newMetaContact = newList.createElement( TQString::fromLatin1( "meta-contact" ) ); newRoot.appendChild( newMetaContact ); // Plugin data is stored completely different, and requires // some bookkeeping to convert properly - QMap<QString, QDomElement> pluginData; - QStringList icqData; - QStringList gaduData; + TQMap<TQString, TQDomElement> pluginData; + TQStringList icqData; + TQStringList gaduData; // ICQ and Gadu can only be converted properly if the address book fields // are already parsed. Therefore, scan for those first and add the rest // afterwards - QDomNode oldContactNode = oldNode.firstChild(); + TQDomNode oldContactNode = oldNode.firstChild(); while( !oldContactNode.isNull() ) { - QDomElement oldContactElement = oldContactNode.toElement(); - if( !oldContactElement.isNull() && oldContactElement.tagName() == QString::fromLatin1("address-book-field") ) + TQDomElement oldContactElement = oldContactNode.toElement(); + if( !oldContactElement.isNull() && oldContactElement.tagName() == TQString::fromLatin1("address-book-field") ) { // Convert address book fields. // Jabber will be called "xmpp", Aim/Toc and Aim/Oscar both will // be called "aim". MSN, AIM, IRC, Oscar and SMS don't use address // book fields yet; Gadu and ICQ can be converted as-is. // As Yahoo is unfinished we won't try to convert at all. - QString id = oldContactElement.attribute( QString::fromLatin1( "id" ), QString::null ); - QString data = oldContactElement.text(); - - QString app, key, val; - QString separator = QString::fromLatin1( "," ); - if( id == QString::fromLatin1( "messaging/gadu" ) ) - separator = QString::fromLatin1( "\n" ); - else if( id == QString::fromLatin1( "messaging/icq" ) ) - separator = QString::fromLatin1( ";" ); - else if( id == QString::fromLatin1( "messaging/jabber" ) ) - id = QString::fromLatin1( "messaging/xmpp" ); - - if( id == QString::fromLatin1( "messaging/gadu" ) || id == QString::fromLatin1( "messaging/icq" ) || - id == QString::fromLatin1( "messaging/winpopup" ) || id == QString::fromLatin1( "messaging/xmpp" ) ) + TQString id = oldContactElement.attribute( TQString::fromLatin1( "id" ), TQString::null ); + TQString data = oldContactElement.text(); + + TQString app, key, val; + TQString separator = TQString::fromLatin1( "," ); + if( id == TQString::fromLatin1( "messaging/gadu" ) ) + separator = TQString::fromLatin1( "\n" ); + else if( id == TQString::fromLatin1( "messaging/icq" ) ) + separator = TQString::fromLatin1( ";" ); + else if( id == TQString::fromLatin1( "messaging/jabber" ) ) + id = TQString::fromLatin1( "messaging/xmpp" ); + + if( id == TQString::fromLatin1( "messaging/gadu" ) || id == TQString::fromLatin1( "messaging/icq" ) || + id == TQString::fromLatin1( "messaging/winpopup" ) || id == TQString::fromLatin1( "messaging/xmpp" ) ) { app = id; - key = QString::fromLatin1( "All" ); - val = data.replace( separator, QChar( 0xE000 ) ); + key = TQString::fromLatin1( "All" ); + val = data.replace( separator, TQChar( 0xE000 ) ); } if( !app.isEmpty() ) { - QDomElement addressBookField = newList.createElement( QString::fromLatin1( "address-book-field" ) ); + TQDomElement addressBookField = newList.createElement( TQString::fromLatin1( "address-book-field" ) ); newMetaContact.appendChild( addressBookField ); - addressBookField.setAttribute( QString::fromLatin1( "app" ), app ); - addressBookField.setAttribute( QString::fromLatin1( "key" ), key ); + addressBookField.setAttribute( TQString::fromLatin1( "app" ), app ); + addressBookField.setAttribute( TQString::fromLatin1( "key" ), key ); addressBookField.appendChild( newList.createTextNode( val ) ); // ICQ didn't store the contactId locally, only in the address // book fields, so we need to be able to access it later - if( id == QString::fromLatin1( "messaging/icq" ) ) - icqData = QStringList::split( QChar( 0xE000 ), val ); - else if( id == QString::fromLatin1("messaging/gadu") ) - gaduData = QStringList::split( QChar( 0xE000 ), val ); + if( id == TQString::fromLatin1( "messaging/icq" ) ) + icqData = TQStringList::split( TQChar( 0xE000 ), val ); + else if( id == TQString::fromLatin1("messaging/gadu") ) + gaduData = TQStringList::split( TQChar( 0xE000 ), val ); } } oldContactNode = oldContactNode.nextSibling(); @@ -570,172 +570,172 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi oldContactNode = oldNode.firstChild(); while( !oldContactNode.isNull() ) { - QDomElement oldContactElement = oldContactNode.toElement(); + TQDomElement oldContactElement = oldContactNode.toElement(); if( !oldContactElement.isNull() ) { - if( oldContactElement.tagName() == QString::fromLatin1("display-name") ) + if( oldContactElement.tagName() == TQString::fromLatin1("display-name") ) { - QDomElement displayName = newList.createElement( QString::fromLatin1( "display-name" ) ); + TQDomElement displayName = newList.createElement( TQString::fromLatin1( "display-name" ) ); displayName.appendChild( newList.createTextNode( oldContactElement.text() ) ); newMetaContact.appendChild( displayName ); } - else if( oldContactElement.tagName() == QString::fromLatin1("groups") ) + else if( oldContactElement.tagName() == TQString::fromLatin1("groups") ) { - QDomElement groups = newList.createElement( QString::fromLatin1( "groups" ) ); + TQDomElement groups = newList.createElement( TQString::fromLatin1( "groups" ) ); newMetaContact.appendChild( groups ); - QDomNode oldGroup = oldContactElement.firstChild(); + TQDomNode oldGroup = oldContactElement.firstChild(); while( !oldGroup.isNull() ) { - QDomElement oldGroupElement = oldGroup.toElement(); - if ( oldGroupElement.tagName() == QString::fromLatin1("group") ) + TQDomElement oldGroupElement = oldGroup.toElement(); + if ( oldGroupElement.tagName() == TQString::fromLatin1("group") ) { - QDomElement group = newList.createElement( QString::fromLatin1( "group" ) ); + TQDomElement group = newList.createElement( TQString::fromLatin1( "group" ) ); group.appendChild( newList.createTextNode( oldGroupElement.text() ) ); groups.appendChild( group ); } - else if ( oldGroupElement.tagName() == QString::fromLatin1("top-level") ) + else if ( oldGroupElement.tagName() == TQString::fromLatin1("top-level") ) { - QDomElement group = newList.createElement( QString::fromLatin1( "top-level" ) ); + TQDomElement group = newList.createElement( TQString::fromLatin1( "top-level" ) ); groups.appendChild( group ); } oldGroup = oldGroup.nextSibling(); } } - else if( oldContactElement.tagName() == QString::fromLatin1( "plugin-data" ) ) + else if( oldContactElement.tagName() == TQString::fromLatin1( "plugin-data" ) ) { // Convert the plugin data - QString id = oldContactElement.attribute( QString::fromLatin1( "plugin-id" ), QString::null ); - QString data = oldContactElement.text(); + TQString id = oldContactElement.attribute( TQString::fromLatin1( "plugin-id" ), TQString::null ); + TQString data = oldContactElement.text(); bool convertOldAim = false; uint fieldCount = 1; - QString addressBookLabel; - if( id == QString::fromLatin1("MSNProtocol") ) + TQString addressBookLabel; + if( id == TQString::fromLatin1("MSNProtocol") ) { fieldCount = 3; - addressBookLabel = QString::fromLatin1("msn"); + addressBookLabel = TQString::fromLatin1("msn"); } - else if( id == QString::fromLatin1("IRCProtocol") ) + else if( id == TQString::fromLatin1("IRCProtocol") ) { fieldCount = 3; - addressBookLabel = QString::fromLatin1("irc"); + addressBookLabel = TQString::fromLatin1("irc"); } - else if( id == QString::fromLatin1("OscarProtocol") ) + else if( id == TQString::fromLatin1("OscarProtocol") ) { fieldCount = 2; - addressBookLabel = QString::fromLatin1("aim"); + addressBookLabel = TQString::fromLatin1("aim"); } - else if( id == QString::fromLatin1("AIMProtocol") ) + else if( id == TQString::fromLatin1("AIMProtocol") ) { - id = QString::fromLatin1("OscarProtocol"); + id = TQString::fromLatin1("OscarProtocol"); convertOldAim = true; - addressBookLabel = QString::fromLatin1("aim"); + addressBookLabel = TQString::fromLatin1("aim"); } - else if( id == QString::fromLatin1("ICQProtocol") || id == QString::fromLatin1("WPProtocol") || id == QString::fromLatin1("GaduProtocol") ) + else if( id == TQString::fromLatin1("ICQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") ) { fieldCount = 1; } - else if( id == QString::fromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) { fieldCount = 4; } - else if( id == QString::fromLatin1("SMSProtocol") ) + else if( id == TQString::fromLatin1("SMSProtocol") ) { // SMS used a variable serializing using a dot as delimiter. // The minimal count is three though (id, name, delimiter). fieldCount = 2; - addressBookLabel = QString::fromLatin1("sms"); + addressBookLabel = TQString::fromLatin1("sms"); } if( pluginData[ id ].isNull() ) { - pluginData[ id ] = newList.createElement( QString::fromLatin1( "plugin-data" ) ); - pluginData[ id ].setAttribute( QString::fromLatin1( "plugin-id" ), id ); + pluginData[ id ] = newList.createElement( TQString::fromLatin1( "plugin-data" ) ); + pluginData[ id ].setAttribute( TQString::fromLatin1( "plugin-id" ), id ); newMetaContact.appendChild( pluginData[ id ] ); } // Do the actual conversion - if( id == QString::fromLatin1( "MSNProtocol" ) || id == QString::fromLatin1( "OscarProtocol" ) || - id == QString::fromLatin1( "AIMProtocol" ) || id == QString::fromLatin1( "IRCProtocol" ) || - id == QString::fromLatin1( "ICQProtocol" ) || id == QString::fromLatin1( "JabberProtocol" ) || - id == QString::fromLatin1( "SMSProtocol" ) || id == QString::fromLatin1( "WPProtocol" ) || - id == QString::fromLatin1( "GaduProtocol" ) ) + if( id == TQString::fromLatin1( "MSNProtocol" ) || id == TQString::fromLatin1( "OscarProtocol" ) || + id == TQString::fromLatin1( "AIMProtocol" ) || id == TQString::fromLatin1( "IRCProtocol" ) || + id == TQString::fromLatin1( "ICQProtocol" ) || id == TQString::fromLatin1( "JabberProtocol" ) || + id == TQString::fromLatin1( "SMSProtocol" ) || id == TQString::fromLatin1( "WPProtocol" ) || + id == TQString::fromLatin1( "GaduProtocol" ) ) { - QStringList strList = QStringList::split( QString::fromLatin1( "||" ), data ); + TQStringList strList = TQStringList::split( TQString::fromLatin1( "||" ), data ); // Unescape '||' - for( QStringList::iterator it = strList.begin(); it != strList.end(); ++it ) + for( TQStringList::iterator it = strList.begin(); it != strList.end(); ++it ) { - ( *it ).replace( QString::fromLatin1( "\\|;" ), QString::fromLatin1( "|" ) ). - replace( QString::fromLatin1( "\\\\" ), QString::fromLatin1( "\\" ) ); + ( *it ).replace( TQString::fromLatin1( "\\|;" ), TQString::fromLatin1( "|" ) ). + replace( TQString::fromLatin1( "\\\\" ), TQString::fromLatin1( "\\" ) ); } uint idx = 0; while( idx < strList.size() ) { - QDomElement dataField; + TQDomElement dataField; - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "contactId" ) ); - if( id == QString::fromLatin1("ICQProtocol") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "contactId" ) ); + if( id == TQString::fromLatin1("ICQProtocol") ) dataField.appendChild( newList.createTextNode( icqData[ idx ] ) ); - else if( id == QString::fromLatin1("GaduProtocol") ) + else if( id == TQString::fromLatin1("GaduProtocol") ) dataField.appendChild( newList.createTextNode( gaduData[ idx ] ) ); - else if( id == QString::fromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) dataField.appendChild( newList.createTextNode( strList[ idx + 1 ] ) ); else dataField.appendChild( newList.createTextNode( strList[ idx ] ) ); - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "displayName" ) ); - if( convertOldAim || id == QString::fromLatin1("ICQProtocol") || id == QString::fromLatin1("WPProtocol") || id == QString::fromLatin1("GaduProtocol") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "displayName" ) ); + if( convertOldAim || id == TQString::fromLatin1("ICQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") ) dataField.appendChild( newList.createTextNode( strList[ idx ] ) ); - else if( id == QString::fromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); else dataField.appendChild( newList.createTextNode( strList[ idx + 1 ] ) ); - if( id == QString::fromLatin1("MSNProtocol") ) + if( id == TQString::fromLatin1("MSNProtocol") ) { - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "groups" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "groups" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); } - else if( id == QString::fromLatin1("IRCProtocol") ) + else if( id == TQString::fromLatin1("IRCProtocol") ) { - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "serverName" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "serverName" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); } - else if( id == QString::fromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) { - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "accountId" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "accountId" ) ); dataField.appendChild( newList.createTextNode( strList[ idx ] ) ); - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "groups" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "groups" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 3 ] ) ); } - else if( id == QString::fromLatin1( "SMSProtocol" ) && - ( idx + 2 < strList.size() ) && strList[ idx + 2 ] != QString::fromLatin1( "." ) ) + else if( id == TQString::fromLatin1( "SMSProtocol" ) && + ( idx + 2 < strList.size() ) && strList[ idx + 2 ] != TQString::fromLatin1( "." ) ) { - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "serviceName" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "serviceName" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "servicePrefs" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "servicePrefs" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 3 ] ) ); // Add extra fields @@ -744,30 +744,30 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi // MSN, AIM, IRC, Oscar and SMS didn't store address book fields up // to now, so create one - if( id != QString::fromLatin1("ICQProtocol") && id != QString::fromLatin1("JabberProtocol") && id != QString::fromLatin1("WPProtocol") && id != QString::fromLatin1("GaduProtocol") ) + if( id != TQString::fromLatin1("ICQProtocol") && id != TQString::fromLatin1("JabberProtocol") && id != TQString::fromLatin1("WPProtocol") && id != TQString::fromLatin1("GaduProtocol") ) { - QDomElement addressBookField = newList.createElement( QString::fromLatin1( "address-book-field" ) ); + TQDomElement addressBookField = newList.createElement( TQString::fromLatin1( "address-book-field" ) ); newMetaContact.appendChild( addressBookField ); - addressBookField.setAttribute( QString::fromLatin1( "app" ), - QString::fromLatin1( "messaging/" ) + addressBookLabel ); - addressBookField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "All" ) ); + addressBookField.setAttribute( TQString::fromLatin1( "app" ), + TQString::fromLatin1( "messaging/" ) + addressBookLabel ); + addressBookField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "All" ) ); addressBookField.appendChild( newList.createTextNode( strList[ idx ] ) ); } idx += fieldCount; } } - else if( id == QString::fromLatin1("ContactNotesPlugin") || id == QString::fromLatin1("CryptographyPlugin") || id == QString::fromLatin1("TranslatorPlugin") ) + else if( id == TQString::fromLatin1("ContactNotesPlugin") || id == TQString::fromLatin1("CryptographyPlugin") || id == TQString::fromLatin1("TranslatorPlugin") ) { - QDomElement dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + TQDomElement dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - if( id == QString::fromLatin1("ContactNotesPlugin") ) - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "notes" ) ); - else if( id == QString::fromLatin1("CryptographyPlugin") ) - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "gpgKey" ) ); - else if( id == QString::fromLatin1("TranslatorPlugin") ) - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "languageKey" ) ); + if( id == TQString::fromLatin1("ContactNotesPlugin") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "notes" ) ); + else if( id == TQString::fromLatin1("CryptographyPlugin") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "gpgKey" ) ); + else if( id == TQString::fromLatin1("TranslatorPlugin") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "languageKey" ) ); dataField.appendChild( newList.createTextNode( data ) ); } @@ -776,48 +776,48 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi oldContactNode = oldContactNode.nextSibling(); } } - else if( oldElement.tagName() == QString::fromLatin1("kopete-group") ) + else if( oldElement.tagName() == TQString::fromLatin1("kopete-group") ) { - QDomElement newGroup = newList.createElement( QString::fromLatin1( "kopete-group" ) ); + TQDomElement newGroup = newList.createElement( TQString::fromLatin1( "kopete-group" ) ); newRoot.appendChild( newGroup ); - QDomNode oldGroupNode = oldNode.firstChild(); + TQDomNode oldGroupNode = oldNode.firstChild(); while( !oldGroupNode.isNull() ) { - QDomElement oldGroupElement = oldGroupNode.toElement(); + TQDomElement oldGroupElement = oldGroupNode.toElement(); - if( oldGroupElement.tagName() == QString::fromLatin1("display-name") ) + if( oldGroupElement.tagName() == TQString::fromLatin1("display-name") ) { - QDomElement displayName = newList.createElement( QString::fromLatin1( "display-name" ) ); + TQDomElement displayName = newList.createElement( TQString::fromLatin1( "display-name" ) ); displayName.appendChild( newList.createTextNode( oldGroupElement.text() ) ); newGroup.appendChild( displayName ); } - if( oldGroupElement.tagName() == QString::fromLatin1("type") ) + if( oldGroupElement.tagName() == TQString::fromLatin1("type") ) { - if( oldGroupElement.text() == QString::fromLatin1("Temporary") ) - newGroup.setAttribute( QString::fromLatin1( "type" ), QString::fromLatin1( "temporary" ) ); - else if( oldGroupElement.text() == QString::fromLatin1( "TopLevel" ) ) - newGroup.setAttribute( QString::fromLatin1( "type" ), QString::fromLatin1( "top-level" ) ); + if( oldGroupElement.text() == TQString::fromLatin1("Temporary") ) + newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "temporary" ) ); + else if( oldGroupElement.text() == TQString::fromLatin1( "TopLevel" ) ) + newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "top-level" ) ); else - newGroup.setAttribute( QString::fromLatin1( "type" ), QString::fromLatin1( "standard" ) ); + newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "standard" ) ); } - if( oldGroupElement.tagName() == QString::fromLatin1("view") ) + if( oldGroupElement.tagName() == TQString::fromLatin1("view") ) { - if( oldGroupElement.text() == QString::fromLatin1("collapsed") ) - newGroup.setAttribute( QString::fromLatin1( "view" ), QString::fromLatin1( "collapsed" ) ); + if( oldGroupElement.text() == TQString::fromLatin1("collapsed") ) + newGroup.setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "collapsed" ) ); else - newGroup.setAttribute( QString::fromLatin1( "view" ), QString::fromLatin1( "expanded" ) ); + newGroup.setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "expanded" ) ); } - else if( oldGroupElement.tagName() == QString::fromLatin1("plugin-data") ) + else if( oldGroupElement.tagName() == TQString::fromLatin1("plugin-data") ) { // Per-group plugin data // FIXME: This needs updating too, ideally, convert this in a later // contactlist.xml version - QDomElement groupPluginData = newList.createElement( QString::fromLatin1( "plugin-data" ) ); + TQDomElement groupPluginData = newList.createElement( TQString::fromLatin1( "plugin-data" ) ); newGroup.appendChild( groupPluginData ); - groupPluginData.setAttribute( QString::fromLatin1( "plugin-id" ), - oldGroupElement.attribute( QString::fromLatin1( "plugin-id" ), QString::null ) ); + groupPluginData.setAttribute( TQString::fromLatin1( "plugin-id" ), + oldGroupElement.attribute( TQString::fromLatin1( "plugin-id" ), TQString::null ) ); groupPluginData.appendChild( newList.createTextNode( oldGroupElement.text() ) ); } @@ -836,13 +836,13 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi // Close the file, and save the new file contactListFile.close(); - QDir().rename( fileName, fileName + QString::fromLatin1( ".bak" ) ); + TQDir().rename( fileName, fileName + TQString::fromLatin1( ".bak" ) ); // kdDebug( 14010 ) << k_funcinfo << "XML output:\n" << newList.toString( 2 ) << endl; contactListFile.open( IO_WriteOnly ); - QTextStream stream( &contactListFile ); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream stream( &contactListFile ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); stream << newList.toString( 2 ); contactListFile.flush(); @@ -862,12 +862,12 @@ void Kopete::ContactList::saveXML() return; } - QString contactListFileName = locateLocal( "appdata", QString::fromLatin1( "contactlist.xml" ) ); + TQString contactListFileName = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) ); KSaveFile contactListFile( contactListFileName ); if( contactListFile.status() == 0 ) { - QTextStream *stream = contactListFile.textStream(); - stream->setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream *stream = contactListFile.textStream(); + stream->setEncoding( TQTextStream::UnicodeUTF8 ); toXML().save( *stream, 4 ); if ( contactListFile.close() ) @@ -891,11 +891,11 @@ void Kopete::ContactList::saveXML() d->saveTimer->start( 60000, true /* single-shot: will get restarted by us next time if it's still failing */ ); } -const QDomDocument ContactList::toXML() +const TQDomDocument ContactList::toXML() { - QDomDocument doc; - doc.appendChild( doc.createElement( QString::fromLatin1("kopete-contact-list") ) ); - doc.documentElement().setAttribute( QString::fromLatin1("version"), QString::fromLatin1("1.0")); + TQDomDocument doc; + doc.appendChild( doc.createElement( TQString::fromLatin1("kopete-contact-list") ) ); + doc.documentElement().setAttribute( TQString::fromLatin1("version"), TQString::fromLatin1("1.0")); // Save group information. ie: Open/Closed, pehaps later icons? Who knows. for( Kopete::Group *g = d->groups.first(); g; g = d->groups.next() ) @@ -909,18 +909,18 @@ const QDomDocument ContactList::toXML() // Save myself metacontact information if( Kopete::Config::enableGlobalIdentity() ) { - QDomElement myselfElement = myself()->toXML(true); // Save minimal information. - myselfElement.setTagName( QString::fromLatin1("myself-meta-contact") ); + TQDomElement myselfElement = myself()->toXML(true); // Save minimal information. + myselfElement.setTagName( TQString::fromLatin1("myself-meta-contact") ); doc.documentElement().appendChild( doc.importNode( myselfElement, true ) ); } return doc; } -QStringList ContactList::contacts() const +TQStringList ContactList::contacts() const { - QStringList contacts; - QPtrListIterator<Kopete::MetaContact> it( d->contacts ); + TQStringList contacts; + TQPtrListIterator<Kopete::MetaContact> it( d->contacts ); for( ; it.current(); ++it ) { contacts.append( it.current()->displayName() ); @@ -928,22 +928,22 @@ QStringList ContactList::contacts() const return contacts; } -QStringList ContactList::contactStatuses() const +TQStringList ContactList::contactStatuses() const { - QStringList meta_contacts; - QPtrListIterator<Kopete::MetaContact> it( d->contacts ); + TQStringList meta_contacts; + TQPtrListIterator<Kopete::MetaContact> it( d->contacts ); for( ; it.current(); ++it ) { - meta_contacts.append( QString::fromLatin1( "%1 (%2)" ). + meta_contacts.append( TQString::fromLatin1( "%1 (%2)" ). arg( it.current()->displayName(), it.current()->statusString() )); } return meta_contacts; } -QStringList ContactList::reachableContacts() const +TQStringList ContactList::reachableContacts() const { - QStringList contacts; - QPtrListIterator<Kopete::MetaContact> it( d->contacts ); + TQStringList contacts; + TQPtrListIterator<Kopete::MetaContact> it( d->contacts ); for( ; it.current(); ++it ) { if ( it.current()->isReachable() ) @@ -952,16 +952,16 @@ QStringList ContactList::reachableContacts() const return contacts; } -QPtrList<Contact> ContactList::onlineContacts() const +TQPtrList<Contact> ContactList::onlineContacts() const { - QPtrList<Kopete::Contact> result; - QPtrListIterator<Kopete::MetaContact> it( d->contacts ); + TQPtrList<Kopete::Contact> result; + TQPtrListIterator<Kopete::MetaContact> it( d->contacts ); for( ; it.current(); ++it ) { if ( it.current()->isOnline() ) { - QPtrList<Kopete::Contact> contacts = it.current()->contacts(); - QPtrListIterator<Kopete::Contact> cit( contacts ); + TQPtrList<Kopete::Contact> contacts = it.current()->contacts(); + TQPtrListIterator<Kopete::Contact> cit( contacts ); for( ; cit.current(); ++cit ) { if ( cit.current()->isOnline() ) @@ -972,10 +972,10 @@ QPtrList<Contact> ContactList::onlineContacts() const return result; } -QPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts() const +TQPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts() const { - QPtrList<Kopete::MetaContact> result; - QPtrListIterator<Kopete::MetaContact> it( d->contacts ); + TQPtrList<Kopete::MetaContact> result; + TQPtrListIterator<Kopete::MetaContact> it( d->contacts ); for( ; it.current(); ++it ) { if ( it.current()->isOnline() ) @@ -984,17 +984,17 @@ QPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts() const return result; } -QPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts( const QString &protocolId ) const +TQPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts( const TQString &protocolId ) const { - QPtrList<Kopete::MetaContact> result; - QPtrListIterator<Kopete::MetaContact> it( d->contacts ); + TQPtrList<Kopete::MetaContact> result; + TQPtrListIterator<Kopete::MetaContact> it( d->contacts ); for( ; it.current(); ++it ) { // FIXME: This loop is not very efficient :( if ( it.current()->isOnline() ) { - QPtrList<Kopete::Contact> contacts = it.current()->contacts(); - QPtrListIterator<Kopete::Contact> cit( contacts ); + TQPtrList<Kopete::Contact> contacts = it.current()->contacts(); + TQPtrListIterator<Kopete::Contact> cit( contacts ); for( ; cit.current(); ++cit ) { if( cit.current()->isOnline() && cit.current()->protocol()->pluginId() == protocolId ) @@ -1005,17 +1005,17 @@ QPtrList<Kopete::MetaContact> Kopete::ContactList::onlineMetaContacts( const QSt return result; } -QPtrList<Kopete::Contact> Kopete::ContactList::onlineContacts( const QString &protocolId ) const +TQPtrList<Kopete::Contact> Kopete::ContactList::onlineContacts( const TQString &protocolId ) const { - QPtrList<Kopete::Contact> result; - QPtrListIterator<Kopete::MetaContact> it( d->contacts ); + TQPtrList<Kopete::Contact> result; + TQPtrListIterator<Kopete::MetaContact> it( d->contacts ); for( ; it.current(); ++it ) { // FIXME: This loop is not very efficient :( if ( it.current()->isOnline() ) { - QPtrList<Kopete::Contact> contacts = it.current()->contacts(); - QPtrListIterator<Kopete::Contact> cit( contacts ); + TQPtrList<Kopete::Contact> contacts = it.current()->contacts(); + TQPtrListIterator<Kopete::Contact> cit( contacts ); for( ; cit.current(); ++cit ) { if( cit.current()->isOnline() && cit.current()->protocol()->pluginId() == protocolId ) @@ -1026,10 +1026,10 @@ QPtrList<Kopete::Contact> Kopete::ContactList::onlineContacts( const QString &pr return result; } -QStringList Kopete::ContactList::fileTransferContacts() const +TQStringList Kopete::ContactList::fileTransferContacts() const { - QStringList contacts; - QPtrListIterator<Kopete::MetaContact> it( d->contacts ); + TQStringList contacts; + TQPtrListIterator<Kopete::MetaContact> it( d->contacts ); for( ; it.current(); ++it ) { if ( it.current()->canAcceptFiles() ) @@ -1038,8 +1038,8 @@ QStringList Kopete::ContactList::fileTransferContacts() const return contacts; } -void Kopete::ContactList::sendFile( const QString &displayName, const KURL &sourceURL, - const QString &altFileName, const long unsigned int fileSize) +void Kopete::ContactList::sendFile( const TQString &displayName, const KURL &sourceURL, + const TQString &altFileName, const long unsigned int fileSize) { // kdDebug(14010) << "Send To Display Name: " << displayName << "\n"; @@ -1048,7 +1048,7 @@ void Kopete::ContactList::sendFile( const QString &displayName, const KURL &sour c->sendFile( sourceURL, altFileName, fileSize ); } -void Kopete::ContactList::messageContact( const QString &contactId, const QString &messageText ) +void Kopete::ContactList::messageContact( const TQString &contactId, const TQString &messageText ) { Kopete::MetaContact *mc = findMetaContactByContactId( contactId ); if (!mc) return; @@ -1062,17 +1062,17 @@ void Kopete::ContactList::messageContact( const QString &contactId, const QStrin } -QStringList Kopete::ContactList::contactFileProtocols(const QString &displayName) +TQStringList Kopete::ContactList::contactFileProtocols(const TQString &displayName) { // kdDebug(14010) << "Get contacts for: " << displayName << "\n"; - QStringList protocols; + TQStringList protocols; Kopete::MetaContact *c = findMetaContactByDisplayName( displayName ); if( c ) { - QPtrList<Kopete::Contact> mContacts = c->contacts(); + TQPtrList<Kopete::Contact> mContacts = c->contacts(); kdDebug(14010) << mContacts.count() << endl; - QPtrListIterator<Kopete::Contact> jt( mContacts ); + TQPtrListIterator<Kopete::Contact> jt( mContacts ); for ( ; jt.current(); ++jt ) { kdDebug(14010) << "1" << jt.current()->protocol()->pluginId() << endl; @@ -1083,7 +1083,7 @@ QStringList Kopete::ContactList::contactFileProtocols(const QString &displayName } return protocols; } - return QStringList(); + return TQStringList(); } diff --git a/kopete/libkopete/kopetecontactlist.h b/kopete/libkopete/kopetecontactlist.h index fc6dd5f9..405abb79 100644 --- a/kopete/libkopete/kopetecontactlist.h +++ b/kopete/libkopete/kopetecontactlist.h @@ -19,8 +19,8 @@ #ifndef KOPETECONTACTLIST_H__ #define KOPETECONTACTLIST_H__ -#include <qobject.h> -#include <qptrlist.h> +#include <tqobject.h> +#include <tqptrlist.h> #include "kopete_export.h" @@ -62,7 +62,7 @@ public: /** * @brief return a list of all metacontact of the contactlist * Retrieve the list of all available meta contacts. - * The returned QPtrList is not the internally used variable, so changes + * The returned TQPtrList is not the internally used variable, so changes * to it won't propagate into the actual contact list. This can be * useful if you need a subset of the contact list, because you can * simply filter the result set as you wish without worrying about @@ -70,18 +70,18 @@ public: * The contained MetaContacts are obviously _not_ duplicates, so * changing those *will* have the expected result :-) */ - QPtrList<MetaContact> metaContacts() const; + TQPtrList<MetaContact> metaContacts() const; /** * @return all groups */ - QPtrList<Group> groups() const; + TQPtrList<Group> groups() const; /** * Return the metacontact referenced by the given id. is none is found, return 0L * @sa MetaContact::metaContactId() */ - MetaContact *metaContact( const QString &metaContactId ) const; + MetaContact *metaContact( const TQString &metaContactId ) const; /** * return the group with the given unique id. if none is found return 0L @@ -97,17 +97,17 @@ public: * @param contactId the @ref Contact::contactId() * @return the contact with the parameters, or 0L if not found. */ - Contact *findContact( const QString &protocolId, const QString &accountId, const QString &contactId ) const; + Contact *findContact( const TQString &protocolId, const TQString &accountId, const TQString &contactId ) const; /** * Find a contact by display name. Returns the first match. */ - MetaContact *findMetaContactByDisplayName( const QString &displayName ) const; + MetaContact *findMetaContactByDisplayName( const TQString &displayName ) const; /** * Find a meta contact by its contact id. Returns the first match. */ - MetaContact *findMetaContactByContactId( const QString &contactId ) const; + MetaContact *findMetaContactByContactId( const TQString &contactId ) const; /** * @brief find a group with his displayName @@ -117,17 +117,17 @@ public: * @param type is the Group::GroupType to search, the default value is group::Normal * @return always a valid Group */ - Group * findGroup( const QString &displayName, int type = 0/*Group::Normal*/ ); + Group * findGroup( const TQString &displayName, int type = 0/*Group::Normal*/ ); /** * return the list of metacontact actually selected in the contactlist UI */ - QPtrList<MetaContact> selectedMetaContacts() const; + TQPtrList<MetaContact> selectedMetaContacts() const; /** * return the list of groups actualy selected in the contactlist UI */ - QPtrList<Group> selectedGroups() const ; + TQPtrList<Group> selectedGroups() const ; /** * return the metacontact that represent the user itself. @@ -171,7 +171,7 @@ public slots: * This method has to be called by the contactlist UI side. * it stores the selected items, and emits signals */ - void setSelectedItems(QPtrList<MetaContact> metaContacts , QPtrList<Group> groups); + void setSelectedItems(TQPtrList<MetaContact> metaContacts , TQPtrList<Group> groups); /** * Apply the global identity. @@ -204,7 +204,7 @@ signals: /** * A group has just been renamed */ - void groupRenamed(Kopete::Group *, const QString & oldname); + void groupRenamed(Kopete::Group *, const TQString & oldname); /** * A contact has been added to a group @@ -217,7 +217,7 @@ signals: /** * This signal is emit when the selection has changed, it is emitted after the following slot - * Warning: Do not delete any contacts in slots connected to this signal. (it is the warning in the QListView::selectionChanged() doc) + * Warning: Do not delete any contacts in slots connected to this signal. (it is the warning in the TQListView::selectionChanged() doc) */ void selectionChanged(); /** @@ -231,7 +231,7 @@ signals: * This signal is emitted each time a global identity field change. * HOWTO use: * - * - Connect signal globalIdentityChanged(const QString &key, const QVariant + * - Connect signal globalIdentityChanged(const TQString &key, const TQVariant * &value) to a slot in your derivate Account class (the best * place to put it). * - In the slot: @@ -242,12 +242,12 @@ signals: * * Connect signal in your Account constructor: * @code - * connect(Kopete::ContactList::self(), SIGNAL(globalIdentityChanged(const QString&, const QVariant&)), SLOT(slotglobalIdentityChanged(const QString&, const QVariant&))); + * connect(Kopete::ContactList::self(), TQT_SIGNAL(globalIdentityChanged(const TQString&, const TQVariant&)), TQT_SLOT(slotglobalIdentityChanged(const TQString&, const TQVariant&))); * @endcode * * Example of a typical implemented slot: * @code - * void slotGlobalIdentityChanged(const QString &key, const QVariant &value) + * void slotGlobalIdentityChanged(const TQString &key, const TQVariant &value) * { * if(key == Kopete::Global::Properties::self()->nickName().key()) * { @@ -262,7 +262,7 @@ signals: * } * @endcode */ - void globalIdentityChanged( const QString &key, const QVariant &value ); + void globalIdentityChanged( const TQString &key, const TQVariant &value ); private slots: /** @@ -289,7 +289,7 @@ private: /** * Convert the contact list from an older version */ - void convertContactList( const QString &fileName, uint fromVersion, uint toVersion ); + void convertContactList( const TQString &fileName, uint fromVersion, uint toVersion ); /** @@ -305,41 +305,41 @@ public: //TODO I think all theses method should be moved to the decop interface. /** * Return all meta contacts */ - QStringList contacts() const; + TQStringList contacts() const; /** * Return all meta contacts that are reachable */ - QStringList reachableContacts() const; + TQStringList reachableContacts() const; /** * Return all contacts that are online */ - QPtrList<Contact> onlineContacts() const; + TQPtrList<Contact> onlineContacts() const; /** * Overloaded method of @ref onlineContacts() that only returns * the online contacts for a single protocol */ - QPtrList<Contact> onlineContacts( const QString &protocolId ) const; + TQPtrList<Contact> onlineContacts( const TQString &protocolId ) const; /** * Return all meta contacts that are online */ - QPtrList<MetaContact> onlineMetaContacts() const; + TQPtrList<MetaContact> onlineMetaContacts() const; /** * Overloaded method of @ref onlineMetaContacts() that only returns * the online meta contacts for a single protocol */ - QPtrList<MetaContact> onlineMetaContacts( const QString &protocolId ) const; + TQPtrList<MetaContact> onlineMetaContacts( const TQString &protocolId ) const; /** * Returns all contacts which can accept file transfers */ - QStringList fileTransferContacts() const; + TQStringList fileTransferContacts() const; - QStringList contactFileProtocols( const QString &displayName); + TQStringList contactFileProtocols( const TQString &displayName); /** * Return all meta contacts with their current status @@ -347,7 +347,7 @@ public: //TODO I think all theses method should be moved to the decop interface. * FIXME: Do we *need* this one? Sounds error prone to me, because * nicknames can contain parentheses too. - Martijn */ - QStringList contactStatuses() const; + TQStringList contactStatuses() const; /** @@ -361,13 +361,13 @@ public: //TODO I think all theses method should be moved to the decop interface. * @param altFileName (Optional) An alternate filename for the file we are sending * @param fileSize (Optional) The size of the file */ - void sendFile(const QString &displayName, const KURL &sourceURL, - const QString &altFileName = QString::null, const long unsigned int fileSize = 0L); + void sendFile(const TQString &displayName, const KURL &sourceURL, + const TQString &altFileName = TQString::null, const long unsigned int fileSize = 0L); /** * Open a chat to a contact, and optionally set some initial text */ - void messageContact( const QString &displayName, const QString &messageText = QString::null ); + void messageContact( const TQString &displayName, const TQString &messageText = TQString::null ); public slots: /** @@ -384,7 +384,7 @@ private: /** * Return a XML representation of the contact list */ - const QDomDocument toXML(); + const TQDomDocument toXML(); /** * Load the contact list from XML file diff --git a/kopete/libkopete/kopetecontactlistelement.cpp b/kopete/libkopete/kopetecontactlistelement.cpp index 2474d1af..5a51da80 100644 --- a/kopete/libkopete/kopetecontactlistelement.cpp +++ b/kopete/libkopete/kopetecontactlistelement.cpp @@ -29,19 +29,19 @@ namespace Kopete { class ContactListElement::Private { public: - QMap<QString, QMap<QString, QString> > pluginData; - QMap<ContactListElement::IconState, QString> icons; + TQMap<TQString, TQMap<TQString, TQString> > pluginData; + TQMap<ContactListElement::IconState, TQString> icons; bool useCustomIcon; }; -ContactListElement::ContactListElement( QObject *parent, const char *name ) -: QObject( parent, name ) +ContactListElement::ContactListElement( TQObject *parent, const char *name ) +: TQObject( parent, name ) { d = new Private; d->useCustomIcon = false; #if 0 //TODO - connect( Kopete::Global::onlineStatusIconCache(), SIGNAL( iconsChanged() ), SIGNAL( iconAppearanceChanged() ) ); + connect( Kopete::Global::onlineStatusIconCache(), TQT_SIGNAL( iconsChanged() ), TQT_SIGNAL( iconAppearanceChanged() ) ); #endif } @@ -50,7 +50,7 @@ ContactListElement::~ContactListElement() delete d; } -void ContactListElement::setPluginData( Plugin *plugin, const QMap<QString, QString> &pluginData ) +void ContactListElement::setPluginData( Plugin *plugin, const TQMap<TQString, TQString> &pluginData ) { if ( pluginData.isEmpty() ) { @@ -63,48 +63,48 @@ void ContactListElement::setPluginData( Plugin *plugin, const QMap<QString, QStr emit pluginDataChanged(); } -void ContactListElement::setPluginData( Plugin *p, const QString &key, const QString &value ) +void ContactListElement::setPluginData( Plugin *p, const TQString &key, const TQString &value ) { d->pluginData[ p->pluginId() ][ key ] = value; emit pluginDataChanged(); } -QMap<QString, QString> ContactListElement::pluginData( Plugin *plugin ) const +TQMap<TQString, TQString> ContactListElement::pluginData( Plugin *plugin ) const { if ( !d->pluginData.contains( plugin->pluginId() ) ) - return QMap<QString, QString>(); + return TQMap<TQString, TQString>(); return d->pluginData[ plugin->pluginId() ]; } -QString ContactListElement::pluginData( Plugin *plugin, const QString &key ) const +TQString ContactListElement::pluginData( Plugin *plugin, const TQString &key ) const { if ( !d->pluginData.contains( plugin->pluginId() ) || !d->pluginData[ plugin->pluginId() ].contains( key ) ) - return QString::null; + return TQString::null; return d->pluginData[ plugin->pluginId() ][ key ]; } -const QValueList<QDomElement> ContactListElement::toXML() +const TQValueList<TQDomElement> ContactListElement::toXML() { - QDomDocument pluginData; - QValueList<QDomElement> pluginNodes; - pluginData.appendChild( pluginData.createElement( QString::fromLatin1( "plugin-data" ) ) ); + TQDomDocument pluginData; + TQValueList<TQDomElement> pluginNodes; + pluginData.appendChild( pluginData.createElement( TQString::fromLatin1( "plugin-data" ) ) ); if ( !d->pluginData.isEmpty() ) { - QMap<QString, QMap<QString, QString> >::ConstIterator pluginIt; + TQMap<TQString, TQMap<TQString, TQString> >::ConstIterator pluginIt; for ( pluginIt = d->pluginData.begin(); pluginIt != d->pluginData.end(); ++pluginIt ) { - QDomElement pluginElement = pluginData.createElement( QString::fromLatin1( "plugin-data" ) ); - pluginElement.setAttribute( QString::fromLatin1( "plugin-id" ), pluginIt.key() ); + TQDomElement pluginElement = pluginData.createElement( TQString::fromLatin1( "plugin-data" ) ); + pluginElement.setAttribute( TQString::fromLatin1( "plugin-id" ), pluginIt.key() ); - QMap<QString, QString>::ConstIterator it; + TQMap<TQString, TQString>::ConstIterator it; for ( it = pluginIt.data().begin(); it != pluginIt.data().end(); ++it ) { - QDomElement pluginDataField = pluginData.createElement( QString::fromLatin1( "plugin-data-field" ) ); - pluginDataField.setAttribute( QString::fromLatin1( "key" ), it.key() ); + TQDomElement pluginDataField = pluginData.createElement( TQString::fromLatin1( "plugin-data-field" ) ); + pluginDataField.setAttribute( TQString::fromLatin1( "key" ), it.key() ); pluginDataField.appendChild( pluginData.createTextNode( it.data() ) ); pluginElement.appendChild( pluginDataField ); } @@ -115,39 +115,39 @@ const QValueList<QDomElement> ContactListElement::toXML() } if ( !d->icons.isEmpty() ) { - QDomElement iconsElement = pluginData.createElement( QString::fromLatin1( "custom-icons" ) ); - iconsElement.setAttribute( QString::fromLatin1( "use" ), d->useCustomIcon ? QString::fromLatin1( "1" ) : QString::fromLatin1( "0" ) ); + TQDomElement iconsElement = pluginData.createElement( TQString::fromLatin1( "custom-icons" ) ); + iconsElement.setAttribute( TQString::fromLatin1( "use" ), d->useCustomIcon ? TQString::fromLatin1( "1" ) : TQString::fromLatin1( "0" ) ); - for ( QMap<IconState, QString >::ConstIterator it = d->icons.begin(); it != d->icons.end(); ++it ) + for ( TQMap<IconState, TQString >::ConstIterator it = d->icons.begin(); it != d->icons.end(); ++it ) { - QDomElement iconElement = pluginData.createElement( QString::fromLatin1( "icon" ) ); - QString stateStr; + TQDomElement iconElement = pluginData.createElement( TQString::fromLatin1( "icon" ) ); + TQString stateStr; switch ( it.key() ) { case Open: - stateStr = QString::fromLatin1( "open" ); + stateStr = TQString::fromLatin1( "open" ); break; case Closed: - stateStr = QString::fromLatin1( "closed" ); + stateStr = TQString::fromLatin1( "closed" ); break; case Online: - stateStr = QString::fromLatin1( "online" ); + stateStr = TQString::fromLatin1( "online" ); break; case Away: - stateStr = QString::fromLatin1( "away" ); + stateStr = TQString::fromLatin1( "away" ); break; case Offline: - stateStr = QString::fromLatin1( "offline" ); + stateStr = TQString::fromLatin1( "offline" ); break; case Unknown: - stateStr = QString::fromLatin1( "unknown" ); + stateStr = TQString::fromLatin1( "unknown" ); break; case None: default: - stateStr = QString::fromLatin1( "none" ); + stateStr = TQString::fromLatin1( "none" ); break; } - iconElement.setAttribute( QString::fromLatin1( "state" ), stateStr ); + iconElement.setAttribute( TQString::fromLatin1( "state" ), stateStr ); iconElement.appendChild( pluginData.createTextNode( it.data() ) ); iconsElement.appendChild( iconElement ); } @@ -157,54 +157,54 @@ const QValueList<QDomElement> ContactListElement::toXML() return pluginNodes; } -bool ContactListElement::fromXML( const QDomElement& element ) +bool ContactListElement::fromXML( const TQDomElement& element ) { - if ( element.tagName() == QString::fromLatin1( "plugin-data" ) ) + if ( element.tagName() == TQString::fromLatin1( "plugin-data" ) ) { - QMap<QString, QString> pluginData; - QString pluginId = element.attribute( QString::fromLatin1( "plugin-id" ), QString::null ); + TQMap<TQString, TQString> pluginData; + TQString pluginId = element.attribute( TQString::fromLatin1( "plugin-id" ), TQString::null ); //in kopete 0.6 the AIM protocol was called OSCAR - if ( pluginId == QString::fromLatin1( "OscarProtocol" ) ) - pluginId = QString::fromLatin1( "AIMProtocol" ); + if ( pluginId == TQString::fromLatin1( "OscarProtocol" ) ) + pluginId = TQString::fromLatin1( "AIMProtocol" ); - QDomNode field = element.firstChild(); + TQDomNode field = element.firstChild(); while( !field.isNull() ) { - QDomElement fieldElement = field.toElement(); - if ( fieldElement.tagName() == QString::fromLatin1( "plugin-data-field" ) ) + TQDomElement fieldElement = field.toElement(); + if ( fieldElement.tagName() == TQString::fromLatin1( "plugin-data-field" ) ) { - pluginData.insert( fieldElement.attribute( QString::fromLatin1( "key" ), - QString::fromLatin1( "undefined-key" ) ), fieldElement.text() ); + pluginData.insert( fieldElement.attribute( TQString::fromLatin1( "key" ), + TQString::fromLatin1( "undefined-key" ) ), fieldElement.text() ); } field = field.nextSibling(); } d->pluginData.insert( pluginId, pluginData ); } - else if ( element.tagName() == QString::fromLatin1( "custom-icons" ) ) + else if ( element.tagName() == TQString::fromLatin1( "custom-icons" ) ) { - d->useCustomIcon= element.attribute( QString::fromLatin1( "use" ), QString::fromLatin1( "1" ) ) == QString::fromLatin1( "1" ); - QDomNode ic = element.firstChild(); + d->useCustomIcon= element.attribute( TQString::fromLatin1( "use" ), TQString::fromLatin1( "1" ) ) == TQString::fromLatin1( "1" ); + TQDomNode ic = element.firstChild(); while( !ic.isNull() ) { - QDomElement iconElement = ic.toElement(); - if ( iconElement.tagName() == QString::fromLatin1( "icon" ) ) + TQDomElement iconElement = ic.toElement(); + if ( iconElement.tagName() == TQString::fromLatin1( "icon" ) ) { - QString stateStr = iconElement.attribute( QString::fromLatin1( "state" ), QString::null ); - QString icon = iconElement.text(); + TQString stateStr = iconElement.attribute( TQString::fromLatin1( "state" ), TQString::null ); + TQString icon = iconElement.text(); IconState state = None; - if ( stateStr == QString::fromLatin1( "open" ) ) + if ( stateStr == TQString::fromLatin1( "open" ) ) state = Open; - if ( stateStr == QString::fromLatin1( "closed" ) ) + if ( stateStr == TQString::fromLatin1( "closed" ) ) state = Closed; - if ( stateStr == QString::fromLatin1( "online" ) ) + if ( stateStr == TQString::fromLatin1( "online" ) ) state = Online; - if ( stateStr == QString::fromLatin1( "offline" ) ) + if ( stateStr == TQString::fromLatin1( "offline" ) ) state = Offline; - if ( stateStr == QString::fromLatin1( "away" ) ) + if ( stateStr == TQString::fromLatin1( "away" ) ) state = Away; - if ( stateStr == QString::fromLatin1( "unknown" ) ) + if ( stateStr == TQString::fromLatin1( "unknown" ) ) state = Unknown; d->icons[ state ] = icon; @@ -220,7 +220,7 @@ bool ContactListElement::fromXML( const QDomElement& element ) return true; } -QString ContactListElement::icon( ContactListElement::IconState state ) const +TQString ContactListElement::icon( ContactListElement::IconState state ) const { if ( d->icons.contains( state ) ) return d->icons[state]; @@ -228,7 +228,7 @@ QString ContactListElement::icon( ContactListElement::IconState state ) const return d->icons[ None ]; } -void ContactListElement::setIcon( const QString& icon , ContactListElement::IconState state ) +void ContactListElement::setIcon( const TQString& icon , ContactListElement::IconState state ) { if ( icon.isNull() ) d->icons.remove( state ); diff --git a/kopete/libkopete/kopetecontactlistelement.h b/kopete/libkopete/kopetecontactlistelement.h index b0f2eb69..6e9d1816 100644 --- a/kopete/libkopete/kopetecontactlistelement.h +++ b/kopete/libkopete/kopetecontactlistelement.h @@ -19,8 +19,8 @@ #ifndef KOPETEPLUGINDATAOBJECT_H #define KOPETEPLUGINDATAOBJECT_H -#include <qobject.h> -#include <qdom.h> +#include <tqobject.h> +#include <tqdom.h> #include "kopete_export.h" @@ -41,12 +41,12 @@ class Plugin; * * It also allow to store an icon for this element. */ -class KOPETE_EXPORT ContactListElement : public QObject /* public KopeteNotifyDataObject */ +class KOPETE_EXPORT ContactListElement : public TQObject /* public KopeteNotifyDataObject */ { Q_OBJECT protected: - ContactListElement( QObject *parent = 0L, const char *name = 0L ); + ContactListElement( TQObject *parent = 0L, const char *name = 0L ); ~ContactListElement(); @@ -54,7 +54,7 @@ public: /** * Set the plugin-specific data. - * The data in the provided QMap is a set of key/value pairs. + * The data in the provided TQMap is a set of key/value pairs. * Note that protocol plugins usually shouldn't use this method, but * reimplement @ref Contact::serialize() instead. This method * is called by @ref Protocol for those classes. @@ -63,7 +63,7 @@ public: * You may want to consider the @ref setPluginData() overload * that takes a single field as parameter. */ - void setPluginData( Plugin *plugin, const QMap<QString, QString> &value ); + void setPluginData( Plugin *plugin, const TQMap<TQString, TQString> &value ); /** * Convenience method to store or change only a single field of the @@ -73,7 +73,7 @@ public: * * Note that you should save the file after adding data or it will get lost. */ - void setPluginData( Plugin *plugin, const QString &key, const QString &value ); + void setPluginData( Plugin *plugin, const TQString &key, const TQString &value ); /** * Get the settings as stored previously by calls to @ref setPluginData() @@ -81,7 +81,7 @@ public: * Note that calling this method for protocol plugins that use the * @ref Contact::serialize() API may yield unexpected results. */ - QMap<QString, QString> pluginData( Plugin *plugin ) const; + TQMap<TQString, TQString> pluginData( Plugin *plugin ) const; /** * Convenience method to retrieve only a single field from the plugin @@ -91,7 +91,7 @@ public: * from the XML file. Don't call this method before then (e.g. in * constructors). */ - QString pluginData( Plugin *plugin, const QString &key ) const; + TQString pluginData( Plugin *plugin, const TQString &key ) const; /** * The various icon states. Some state are reserved for Groups, @@ -105,13 +105,13 @@ public: * if there is no icon registered for this state, the None icon is used * if available */ - QString icon( IconState state = None ) const; + TQString icon( IconState state = None ) const; /** * Set the icon in the given state - * To clear an entry, set a QString::null + * To clear an entry, set a TQString::null */ - void setIcon( const QString &icon, IconState = None ); + void setIcon( const TQString &icon, IconState = None ); /** * return if yes or no the user wants to display some custom icon. @@ -134,7 +134,7 @@ signals: /** * The icon to use for some state has changed */ - void iconChanged( Kopete::ContactListElement::IconState, const QString & ); + void iconChanged( Kopete::ContactListElement::IconState, const TQString & ); /** * The visual appearance of some of our icons has changed @@ -150,14 +150,14 @@ protected: /** * Return a XML representation of plugin data */ - const QValueList<QDomElement> toXML(); + const TQValueList<TQDomElement> toXML(); /** * Load plugin data from one Dom Element: * It should be a <plugin-data> element or a <custom-icons> element. if not, nothing will happen * @return true if something has ben loaded. false if the element was not a fine */ - bool fromXML( const QDomElement &element ); + bool fromXML( const TQDomElement &element ); private: class Private; diff --git a/kopete/libkopete/kopetecontactproperty.cpp b/kopete/libkopete/kopetecontactproperty.cpp index 87e176af..e4478a27 100644 --- a/kopete/libkopete/kopetecontactproperty.cpp +++ b/kopete/libkopete/kopetecontactproperty.cpp @@ -25,9 +25,9 @@ namespace Kopete struct ContactPropertyTmplPrivate { - QString key; - QString label; - QString icon; + TQString key; + TQString label; + TQString icon; bool persistent; bool richText; bool privateProp; @@ -45,8 +45,8 @@ ContactPropertyTmpl::ContactPropertyTmpl() // Don't register empty template } -ContactPropertyTmpl::ContactPropertyTmpl(const QString &key, - const QString &label, const QString &icon, bool persistent, bool richText, bool privateProp) +ContactPropertyTmpl::ContactPropertyTmpl(const TQString &key, + const TQString &label, const TQString &icon, bool persistent, bool richText, bool privateProp) { ContactPropertyTmpl other = Kopete::Global::Properties::self()->tmpl(key); if(other.isNull()) @@ -124,17 +124,17 @@ bool ContactPropertyTmpl::operator!=(const ContactPropertyTmpl &other) const } -const QString &ContactPropertyTmpl::key() const +const TQString &ContactPropertyTmpl::key() const { return d->key; } -const QString &ContactPropertyTmpl::label() const +const TQString &ContactPropertyTmpl::label() const { return d->label; } -const QString &ContactPropertyTmpl::icon() const +const TQString &ContactPropertyTmpl::icon() const { return d->icon; } @@ -170,7 +170,7 @@ ContactProperty::ContactProperty() } ContactProperty::ContactProperty(const ContactPropertyTmpl &tmpl, - const QVariant &val) + const TQVariant &val) { mTemplate = tmpl; mValue = val; @@ -181,7 +181,7 @@ ContactProperty::~ContactProperty() //kdDebug(14000) << k_funcinfo << "this = " << (void *)this << endl; } -const QVariant &ContactProperty::value() const +const TQVariant &ContactProperty::value() const { return mValue; } diff --git a/kopete/libkopete/kopetecontactproperty.h b/kopete/libkopete/kopetecontactproperty.h index b5c8f060..f7213faa 100644 --- a/kopete/libkopete/kopetecontactproperty.h +++ b/kopete/libkopete/kopetecontactproperty.h @@ -19,7 +19,7 @@ #ifndef _KOPETECONTACTPROPERTY_H_ #define _KOPETECONTACTPROPERTY_H_ -#include <qvariant.h> +#include <tqvariant.h> #include "kopete_export.h" @@ -56,9 +56,9 @@ class KOPETE_EXPORT ContactPropertyTmpl * @param privateProp if true, properties based on this template won't be * visible to the user **/ - ContactPropertyTmpl( const QString &key, - const QString &label, - const QString &icon = QString::null, + ContactPropertyTmpl( const TQString &key, + const TQString &label, + const TQString &icon = TQString::null, bool persistent = false, bool richText = false, bool privateProp = false ); @@ -80,17 +80,17 @@ class KOPETE_EXPORT ContactPropertyTmpl * Getter for the unique key. Properties based on this template will be * stored with this key **/ - const QString &key() const; + const TQString &key() const; /** * Getter for i18ned label **/ - const QString &label() const; + const TQString &label() const; /** * Getter for icon to show aside or instead of @p label() **/ - const QString &icon() const; + const TQString &icon() const; /** * Returns true if properties based on this template should @@ -119,9 +119,9 @@ class KOPETE_EXPORT ContactPropertyTmpl bool isNull() const; /** - * A Map of QString and ContactPropertyTmpl objects, based on QMap + * A Map of TQString and ContactPropertyTmpl objects, based on QMap **/ - typedef QMap<QString, ContactPropertyTmpl> Map; + typedef TQMap<TQString, ContactPropertyTmpl> Map; private: ContactPropertyTmplPrivate *d; @@ -149,7 +149,7 @@ class KOPETE_EXPORT ContactProperty * @param tmpl The contact property template this property is based on * @param value The value this Property holds **/ - ContactProperty(const ContactPropertyTmpl &tmpl, const QVariant &value); + ContactProperty(const ContactPropertyTmpl &tmpl, const TQVariant &value); /** Destructor **/ ~ContactProperty(); @@ -162,7 +162,7 @@ class KOPETE_EXPORT ContactProperty /** * Getter for this properties value **/ - const QVariant &value() const; + const TQVariant &value() const; /** * The null, i.e. empty, ContactProperty @@ -183,10 +183,10 @@ class KOPETE_EXPORT ContactProperty /** * A map of key,ContactProperty items **/ - typedef QMap<QString, ContactProperty> Map; + typedef TQMap<TQString, ContactProperty> Map; private: - QVariant mValue; + TQVariant mValue; ContactPropertyTmpl mTemplate; }; diff --git a/kopete/libkopete/kopeteeventpresentation.cpp b/kopete/libkopete/kopeteeventpresentation.cpp index f90a19e5..659b1b41 100644 --- a/kopete/libkopete/kopeteeventpresentation.cpp +++ b/kopete/libkopete/kopeteeventpresentation.cpp @@ -23,7 +23,7 @@ Kopete::EventPresentation::EventPresentation( const PresentationType type ) } Kopete::EventPresentation::EventPresentation( const PresentationType type, - const QString &content, const bool singleShot, const bool enabled ) + const TQString &content, const bool singleShot, const bool enabled ) { m_type = type; m_content = content; @@ -40,7 +40,7 @@ Kopete::EventPresentation::PresentationType Kopete::EventPresentation::type() return m_type; } -QString Kopete::EventPresentation::content() +TQString Kopete::EventPresentation::content() { return m_content; } @@ -55,7 +55,7 @@ bool Kopete::EventPresentation::singleShot() return m_singleShot; } -void Kopete::EventPresentation::setContent( const QString &content ) +void Kopete::EventPresentation::setContent( const TQString &content ) { m_content = content; } @@ -70,21 +70,21 @@ void Kopete::EventPresentation::setSingleShot( const bool singleShot ) m_singleShot = singleShot; } -QString Kopete::EventPresentation::toString() +TQString Kopete::EventPresentation::toString() { - QString type; + TQString type; switch ( m_type ) { case Sound: - type= QString::fromLatin1("sound"); + type= TQString::fromLatin1("sound"); break; case Message: - type= QString::fromLatin1("message"); + type= TQString::fromLatin1("message"); break; case Chat: - type= QString::fromLatin1("chat"); + type= TQString::fromLatin1("chat"); break; } - QString stringRep = QString::fromLatin1( "Presentation; type=%1; content=%2; enabled=%3; single shot=%4\n" ).arg(type).arg(m_content).arg(m_enabled).arg(m_singleShot); + TQString stringRep = TQString::fromLatin1( "Presentation; type=%1; content=%2; enabled=%3; single shot=%4\n" ).arg(type).arg(m_content).arg(m_enabled).arg(m_singleShot); return stringRep; } diff --git a/kopete/libkopete/kopeteeventpresentation.h b/kopete/libkopete/kopeteeventpresentation.h index ea30cb5d..0576a9b1 100644 --- a/kopete/libkopete/kopeteeventpresentation.h +++ b/kopete/libkopete/kopeteeventpresentation.h @@ -18,7 +18,7 @@ #ifndef KOPETEEVENTPRESENTATION_H #define KOPETEEVENTPRESENTATION_H -#include <qstring.h> +#include <tqstring.h> #include "kopete_export.h" @@ -31,22 +31,22 @@ public: enum PresentationType { Sound, Message, Chat }; EventPresentation( const PresentationType type ); EventPresentation( const PresentationType type, - const QString &content = QString::null, + const TQString &content = TQString::null, const bool singleShot = false, const bool enabled = false ); ~EventPresentation(); PresentationType type(); - QString content(); + TQString content(); bool enabled(); bool singleShot(); - void setContent( const QString &content ); + void setContent( const TQString &content ); void setEnabled( const bool enabled ); void setSingleShot( const bool singleShot ); - QString toString(); + TQString toString(); private: PresentationType m_type; - QString m_content; + TQString m_content; bool m_enabled; bool m_singleShot; }; diff --git a/kopete/libkopete/kopeteglobal.cpp b/kopete/libkopete/kopeteglobal.cpp index a11dafdd..093be4df 100644 --- a/kopete/libkopete/kopeteglobal.cpp +++ b/kopete/libkopete/kopeteglobal.cpp @@ -67,7 +67,7 @@ Properties::~Properties() delete d; } -const ContactPropertyTmpl &Properties::tmpl(const QString &key) const +const ContactPropertyTmpl &Properties::tmpl(const TQString &key) const { if(d->mTemplates.contains(key)) { @@ -79,7 +79,7 @@ const ContactPropertyTmpl &Properties::tmpl(const QString &key) const return ContactPropertyTmpl::null; } -bool Properties::registerTemplate(const QString &key, +bool Properties::registerTemplate(const TQString &key, const ContactPropertyTmpl &tmpl) { if(d->mTemplates.contains(key)) @@ -95,104 +95,104 @@ bool Properties::registerTemplate(const QString &key, } } -void Properties::unregisterTemplate(const QString &key) +void Properties::unregisterTemplate(const TQString &key) { kdDebug(14000) << k_funcinfo << "called for key: '" << key << "'" << endl; d->mTemplates.remove(key); } -bool Properties::isRegistered(const QString &key) +bool Properties::isRegistered(const TQString &key) { return d->mTemplates.contains(key); } const ContactPropertyTmpl &Properties::fullName() const { - return createProp(QString::fromLatin1("FormattedName"), + return createProp(TQString::fromLatin1("FormattedName"), i18n("Full Name")); } const ContactPropertyTmpl &Properties::idleTime() const { - return createProp(QString::fromLatin1("idleTime"), + return createProp(TQString::fromLatin1("idleTime"), i18n("Idle Time")); } const ContactPropertyTmpl &Properties::onlineSince() const { - return createProp(QString::fromLatin1("onlineSince"), + return createProp(TQString::fromLatin1("onlineSince"), i18n("Online Since")); } const ContactPropertyTmpl &Properties::lastSeen() const { - return createProp(QString::fromLatin1("lastSeen"), - i18n("Last Seen"), QString::null, true); + return createProp(TQString::fromLatin1("lastSeen"), + i18n("Last Seen"), TQString::null, true); } const ContactPropertyTmpl &Properties::awayMessage() const { - return createProp(QString::fromLatin1("awayMessage"), + return createProp(TQString::fromLatin1("awayMessage"), i18n("Away Message")); } const ContactPropertyTmpl &Properties::firstName() const { - return createProp(QString::fromLatin1("firstName"), - i18n("First Name"), QString::null, true); + return createProp(TQString::fromLatin1("firstName"), + i18n("First Name"), TQString::null, true); } const ContactPropertyTmpl &Properties::lastName() const { - return createProp(QString::fromLatin1("lastName"), - i18n("Last Name"), QString::null, true); + return createProp(TQString::fromLatin1("lastName"), + i18n("Last Name"), TQString::null, true); } const ContactPropertyTmpl &Properties::privatePhone() const { - return createProp(QString::fromLatin1("privatePhoneNumber"), - i18n("Private Phone"), QString::null, true); + return createProp(TQString::fromLatin1("privatePhoneNumber"), + i18n("Private Phone"), TQString::null, true); } const ContactPropertyTmpl &Properties::privateMobilePhone() const { - return createProp(QString::fromLatin1("privateMobilePhoneNumber"), - i18n("Private Mobile Phone"), QString::null, true); + return createProp(TQString::fromLatin1("privateMobilePhoneNumber"), + i18n("Private Mobile Phone"), TQString::null, true); } const ContactPropertyTmpl &Properties::workPhone() const { - return createProp(QString::fromLatin1("workPhoneNumber"), - i18n("Work Phone"), QString::null, true); + return createProp(TQString::fromLatin1("workPhoneNumber"), + i18n("Work Phone"), TQString::null, true); } const ContactPropertyTmpl &Properties::workMobilePhone() const { - return createProp(QString::fromLatin1("workMobilePhoneNumber"), - i18n("Work Mobile Phone"), QString::null, true); + return createProp(TQString::fromLatin1("workMobilePhoneNumber"), + i18n("Work Mobile Phone"), TQString::null, true); } const ContactPropertyTmpl &Properties::emailAddress() const { - return createProp(QString::fromLatin1("emailAddress"), - i18n("Email Address"), QString::fromLatin1("mail_generic"), true); + return createProp(TQString::fromLatin1("emailAddress"), + i18n("Email Address"), TQString::fromLatin1("mail_generic"), true); } const ContactPropertyTmpl &Properties::nickName() const { - return createProp(QString::fromLatin1("nickName"), - i18n("Nick Name"), QString::null, true); + return createProp(TQString::fromLatin1("nickName"), + i18n("Nick Name"), TQString::null, true); } const ContactPropertyTmpl &Properties::photo() const { - return createProp(QString::fromLatin1("photo"), - i18n("Photo"), QString::null, true); + return createProp(TQString::fromLatin1("photo"), + i18n("Photo"), TQString::null, true); } -const ContactPropertyTmpl &Properties::createProp(const QString &key, - const QString &label, const QString &icon, bool persistent) const +const ContactPropertyTmpl &Properties::createProp(const TQString &key, + const TQString &label, const TQString &icon, bool persistent) const { /*kdDebug(14000) << k_funcinfo << "key = " << key << ", label = " << label << endl;*/ @@ -216,15 +216,15 @@ const ContactPropertyTmpl::Map &Properties::templateMap() const // ----------------------------------------------------------------------------- -void installEmoticonTheme(const QString &archiveName) +void installEmoticonTheme(const TQString &archiveName) { - QStringList foundThemes; + TQStringList foundThemes; KArchiveEntry *currentEntry = 0L; KArchiveDirectory* currentDir = 0L; KProgressDialog *progressDlg = 0L; KArchive *archive = 0L; - QString localThemesDir(locateLocal("emoticons", QString::null) ); + TQString localThemesDir(locateLocal("emoticons", TQString::null) ); if(localThemesDir.isEmpty()) { @@ -235,20 +235,20 @@ void installEmoticonTheme(const QString &archiveName) } progressDlg = new KProgressDialog(0 , "emoticonInstProgress", - i18n("Installing Emoticon Themes..."), QString::null, true); + i18n("Installing Emoticon Themes..."), TQString::null, true); progressDlg->progressBar()->setTotalSteps(foundThemes.count()); progressDlg->show(); kapp->processEvents(); - QString currentBundleMimeType = KMimeType::findByPath(archiveName, 0, false)->name(); - if( currentBundleMimeType == QString::fromLatin1("application/x-zip") ) + TQString currentBundleMimeType = KMimeType::findByPath(archiveName, 0, false)->name(); + if( currentBundleMimeType == TQString::fromLatin1("application/x-zip") ) archive = new KZip(archiveName); - else if( currentBundleMimeType == QString::fromLatin1("application/x-tgz") || - currentBundleMimeType == QString::fromLatin1("application/x-tbz") || - currentBundleMimeType == QString::fromLatin1("application/x-gzip") || - currentBundleMimeType == QString::fromLatin1("application/x-bzip2") ) + else if( currentBundleMimeType == TQString::fromLatin1("application/x-tgz") || + currentBundleMimeType == TQString::fromLatin1("application/x-tbz") || + currentBundleMimeType == TQString::fromLatin1("application/x-gzip") || + currentBundleMimeType == TQString::fromLatin1("application/x-bzip2") ) archive = new KTar(archiveName); - else if(archiveName.endsWith(QString::fromLatin1("jisp")) || archiveName.endsWith(QString::fromLatin1("zip")) ) + else if(archiveName.endsWith(TQString::fromLatin1("jisp")) || archiveName.endsWith(TQString::fromLatin1("zip")) ) archive = new KZip(archiveName); else archive = new KTar(archiveName); @@ -266,15 +266,15 @@ void installEmoticonTheme(const QString &archiveName) const KArchiveDirectory* rootDir = archive->directory(); // iterate all the dirs looking for an emoticons.xml file - QStringList entries = rootDir->entries(); - for (QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) + TQStringList entries = rootDir->entries(); + for (TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) { currentEntry = const_cast<KArchiveEntry*>(rootDir->entry(*it)); if (currentEntry->isDirectory()) { currentDir = dynamic_cast<KArchiveDirectory*>( currentEntry ); - if (currentDir && ( currentDir->entry(QString::fromLatin1("emoticons.xml")) != NULL || - currentDir->entry(QString::fromLatin1("icondef.xml")) != NULL ) ) + if (currentDir && ( currentDir->entry(TQString::fromLatin1("emoticons.xml")) != NULL || + currentDir->entry(TQString::fromLatin1("icondef.xml")) != NULL ) ) foundThemes.append(currentDir->name()); } } @@ -290,7 +290,7 @@ void installEmoticonTheme(const QString &archiveName) return; } - for (QStringList::ConstIterator it = foundThemes.begin(); it != foundThemes.end(); ++it) + for (TQStringList::ConstIterator it = foundThemes.begin(); it != foundThemes.end(); ++it) { progressDlg->setLabel( i18n("<qt>Installing <strong>%1</strong> emoticon theme</qt>") diff --git a/kopete/libkopete/kopeteglobal.h b/kopete/libkopete/kopeteglobal.h index aa6456f4..395d0eae 100644 --- a/kopete/libkopete/kopeteglobal.h +++ b/kopete/libkopete/kopeteglobal.h @@ -47,7 +47,7 @@ namespace Global * * TODO: If possible, port it to KIO instead of using ugly blocking KTar **/ - KOPETE_EXPORT void installEmoticonTheme(const QString &localPath); + KOPETE_EXPORT void installEmoticonTheme(const TQString &localPath); /** * \brief Global facility to query/store templates that are needed by KopeteContactProperty @@ -72,7 +72,7 @@ namespace Global * Return a template with defined by @p key, if no such template has * been registered ContactPropertyTmpl::null will be returned */ - const ContactPropertyTmpl &tmpl(const QString &key) const; + const ContactPropertyTmpl &tmpl(const TQString &key) const; /** * @return a ready-to-use template for a contact's full name. @@ -135,8 +135,8 @@ namespace Global /** * default template for a contact's photo. * - * It could be either a QString or a QImage. - * If it's a QString, it should points to the path the image is stored. + * It could be either a TQString or a TQImage. + * If it's a TQString, it should points to the path the image is stored. */ const ContactPropertyTmpl &photo() const; @@ -149,18 +149,18 @@ namespace Global * return true if a template with key @p key is already registered, * false otherwise */ - bool isRegistered(const QString &key); + bool isRegistered(const TQString &key); private: Properties(); ~Properties(); - bool registerTemplate(const QString &key, + bool registerTemplate(const TQString &key, const ContactPropertyTmpl &tmpl); - void unregisterTemplate(const QString &key); + void unregisterTemplate(const TQString &key); - const ContactPropertyTmpl &createProp(const QString &key, - const QString &label, const QString &icon=QString::null, + const ContactPropertyTmpl &createProp(const TQString &key, + const TQString &label, const TQString &icon=TQString::null, bool persistent = false) const; private: diff --git a/kopete/libkopete/kopetegroup.cpp b/kopete/libkopete/kopetegroup.cpp index f50eb08b..6206545a 100644 --- a/kopete/libkopete/kopetegroup.cpp +++ b/kopete/libkopete/kopetegroup.cpp @@ -30,7 +30,7 @@ namespace Kopete { class Group::Private { public: - QString displayName; + TQString displayName; Group::GroupType type; bool expanded; uint groupId; @@ -59,7 +59,7 @@ Group * Group::temporary() uint Group::Private::uniqueGroupId = 0; -Group::Group( const QString &_name, GroupType _type ) +Group::Group( const TQString &_name, GroupType _type ) : ContactListElement( ContactList::self() ) { d = new Private; @@ -87,9 +87,9 @@ Group::~Group() delete d; } -QPtrList<MetaContact> Group::members() const +TQPtrList<MetaContact> Group::members() const { - QPtrList<MetaContact> members = ContactList::self()->metaContacts(); + TQPtrList<MetaContact> members = ContactList::self()->metaContacts(); // members is a *copy* of the meta contacts, so using first(), next() and remove() is fine. for( members.first(); members.current(); ) { @@ -101,49 +101,49 @@ QPtrList<MetaContact> Group::members() const return members; } -const QDomElement Group::toXML() +const TQDomElement Group::toXML() { - QDomDocument group; - group.appendChild( group.createElement( QString::fromLatin1( "kopete-group" ) ) ); - group.documentElement().setAttribute( QString::fromLatin1( "groupId" ), QString::number( groupId() ) ); + TQDomDocument group; + group.appendChild( group.createElement( TQString::fromLatin1( "kopete-group" ) ) ); + group.documentElement().setAttribute( TQString::fromLatin1( "groupId" ), TQString::number( groupId() ) ); - QString type; + TQString type; switch ( d->type ) { case Temporary: - type = QString::fromLatin1( "temporary" ); + type = TQString::fromLatin1( "temporary" ); break; case TopLevel: - type = QString::fromLatin1( "top-level" ); + type = TQString::fromLatin1( "top-level" ); break; default: - type = QString::fromLatin1( "standard" ); // == Normal + type = TQString::fromLatin1( "standard" ); // == Normal break; } - group.documentElement().setAttribute( QString::fromLatin1( "type" ), type ); - group.documentElement().setAttribute( QString::fromLatin1( "view" ), QString::fromLatin1( d->expanded ? "expanded" : "collapsed" ) ); + group.documentElement().setAttribute( TQString::fromLatin1( "type" ), type ); + group.documentElement().setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( d->expanded ? "expanded" : "collapsed" ) ); - QDomElement displayName = group.createElement( QString::fromLatin1( "display-name" ) ); + TQDomElement displayName = group.createElement( TQString::fromLatin1( "display-name" ) ); displayName.appendChild( group.createTextNode( d->displayName ) ); group.documentElement().appendChild( displayName ); // Store other plugin data - QValueList<QDomElement> pluginData = ContactListElement::toXML(); - for ( QValueList<QDomElement>::Iterator it = pluginData.begin(); it != pluginData.end(); ++it ) + TQValueList<TQDomElement> pluginData = ContactListElement::toXML(); + for ( TQValueList<TQDomElement>::Iterator it = pluginData.begin(); it != pluginData.end(); ++it ) group.documentElement().appendChild( group.importNode( *it, true ) ); // Store custom notification data - QDomElement notifyData = Kopete::NotifyDataObject::notifyDataToXML(); + TQDomElement notifyData = Kopete::NotifyDataObject::notifyDataToXML(); if ( notifyData.hasChildNodes() ) group.documentElement().appendChild( group.importNode( notifyData, true ) ); return group.documentElement(); } -bool Group::fromXML( const QDomElement &data ) +bool Group::fromXML( const TQDomElement &data ) { - QString strGroupId = data.attribute( QString::fromLatin1( "groupId" ) ); + TQString strGroupId = data.attribute( TQString::fromLatin1( "groupId" ) ); if ( !strGroupId.isEmpty() ) { d->groupId = strGroupId.toUInt(); @@ -154,8 +154,8 @@ bool Group::fromXML( const QDomElement &data ) // Don't overwrite type for Temporary and TopLevel groups if ( d->type != Temporary && d->type != TopLevel ) { - QString type = data.attribute( QString::fromLatin1( "type" ), QString::fromLatin1( "standard" ) ); - if ( type == QString::fromLatin1( "temporary" ) ) + TQString type = data.attribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "standard" ) ); + if ( type == TQString::fromLatin1( "temporary" ) ) { if ( d->type != Temporary ) { @@ -163,7 +163,7 @@ bool Group::fromXML( const QDomElement &data ) return false; } } - else if ( type == QString::fromLatin1( "top-level" ) ) + else if ( type == TQString::fromLatin1( "top-level" ) ) { if ( d->type != TopLevel ) { @@ -177,20 +177,20 @@ bool Group::fromXML( const QDomElement &data ) } } - QString view = data.attribute( QString::fromLatin1( "view" ), QString::fromLatin1( "expanded" ) ); - d->expanded = ( view != QString::fromLatin1( "collapsed" ) ); + TQString view = data.attribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "expanded" ) ); + d->expanded = ( view != TQString::fromLatin1( "collapsed" ) ); - QDomNode groupData = data.firstChild(); + TQDomNode groupData = data.firstChild(); while ( !groupData.isNull() ) { - QDomElement groupElement = groupData.toElement(); - if ( groupElement.tagName() == QString::fromLatin1( "display-name" ) ) + TQDomElement groupElement = groupData.toElement(); + if ( groupElement.tagName() == TQString::fromLatin1( "display-name" ) ) { // Don't set display name for temporary or top-level items if ( d->type == Normal ) d->displayName = groupElement.text(); } - else if( groupElement.tagName() == QString::fromLatin1( "custom-notifications" ) ) + else if( groupElement.tagName() == TQString::fromLatin1( "custom-notifications" ) ) { Kopete::NotifyDataObject::notifyDataFromXML( groupElement ); } @@ -208,10 +208,10 @@ bool Group::fromXML( const QDomElement &data ) switch ( d->type ) { case Temporary: - d->displayName = QString::fromLatin1( "Temporary" ); + d->displayName = TQString::fromLatin1( "Temporary" ); break; case TopLevel: - d->displayName = QString::fromLatin1( "Top-Level" ); + d->displayName = TQString::fromLatin1( "Top-Level" ); break; default: d->displayName = i18n( "(Unnamed Group)" ); @@ -223,17 +223,17 @@ bool Group::fromXML( const QDomElement &data ) return ( d->type == Normal ); } -void Group::setDisplayName( const QString &s ) +void Group::setDisplayName( const TQString &s ) { if ( d->displayName != s ) { - QString oldname = d->displayName; + TQString oldname = d->displayName; d->displayName = s; emit displayNameChanged( this, oldname ); } } -QString Group::displayName() const +TQString Group::displayName() const { return d->displayName; } @@ -269,7 +269,7 @@ uint Group::groupId() const void Group::sendMessage() { - QPtrList<Kopete::MetaContact> list = onlineMembers(); + TQPtrList<Kopete::MetaContact> list = onlineMembers(); Kopete::MetaContact *mc = list.first(); Kopete::Contact *c; @@ -279,18 +279,18 @@ void Group::sendMessage() c->sendMessage(); if( c->manager( Contact::CanCreate ) ) { - connect( c->manager(), SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, SLOT( sendMessage( Kopete::Message& ) )); + connect( c->manager(), TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, TQT_SLOT( sendMessage( Kopete::Message& ) )); } } void Group::sendMessage( Message& msg ) { - QPtrList<MetaContact> list = onlineMembers(); + TQPtrList<MetaContact> list = onlineMembers(); Kopete::MetaContact *mc = list.first(); ChatSession *cs=msg.manager(); if( cs ) { - disconnect( cs, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, SLOT( sendMessage( Kopete::Message& ) ) ); + disconnect( cs, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, TQT_SLOT( sendMessage( Kopete::Message& ) ) ); } else return; @@ -314,9 +314,9 @@ void Group::sendMessage( Message& msg ) } } -QPtrList<MetaContact> Group::onlineMembers() const +TQPtrList<MetaContact> Group::onlineMembers() const { - QPtrList<MetaContact> list = members(); + TQPtrList<MetaContact> list = members(); for( list.first(); list.current(); ) if( list.current()->isReachable() && list.current()->isOnline() ) diff --git a/kopete/libkopete/kopetegroup.h b/kopete/libkopete/kopetegroup.h index 37b8572d..e832e955 100644 --- a/kopete/libkopete/kopetegroup.h +++ b/kopete/libkopete/kopetegroup.h @@ -24,7 +24,7 @@ #include "kopete_export.h" -#include <qptrlist.h> +#include <tqptrlist.h> class QDomElement; @@ -46,7 +46,7 @@ class Message; */ class KOPETE_EXPORT Group : public ContactListElement, public NotifyDataObject { - Q_PROPERTY( QString displayName READ displayName WRITE setDisplayName ) + Q_PROPERTY( TQString displayName READ displayName WRITE setDisplayName ) Q_PROPERTY( uint groupId READ groupId ) Q_PROPERTY( bool expanded READ isExpanded WRITE setExpanded ) @@ -69,7 +69,7 @@ public: * * Overloaded constructor to create a group with a display name of the specified type. */ - Group( const QString &displayName, GroupType type = Normal ); + Group( const TQString &displayName, GroupType type = Normal ); ~Group(); @@ -78,12 +78,12 @@ public: * * \return the display name of the group */ - QString displayName() const; + TQString displayName() const; /** * \brief Rename the group */ - void setDisplayName( const QString &newName ); + void setDisplayName( const TQString &newName ); /** * \return the group type @@ -105,7 +105,7 @@ public: * This function is not very efficient - it searches through all the metacontacts in the contact list * \return the members of this group */ - QPtrList<MetaContact> members() const; + TQPtrList<MetaContact> members() const; /** * \brief Set if the group is expanded. @@ -137,14 +137,14 @@ public: * @internal * Outputs the group data in XML */ - const QDomElement toXML(); + const TQDomElement toXML(); /** * @internal * Loads the group data from XML */ - bool fromXML( const QDomElement &data ); + bool fromXML( const TQDomElement &data ); @@ -160,7 +160,7 @@ signals: /** * \brief Emitted when the group has been renamed */ - void displayNameChanged( Kopete::Group *group , const QString &oldName ); + void displayNameChanged( Kopete::Group *group , const TQString &oldName ); private slots: @@ -177,7 +177,7 @@ private: /** * @internal used to get reachabe contact to send message to thom. */ - QPtrList<MetaContact> onlineMembers() const; + TQPtrList<MetaContact> onlineMembers() const; }; } //END namespace Kopete diff --git a/kopete/libkopete/kopetemessage.cpp b/kopete/libkopete/kopetemessage.cpp index 54761799..6f223748 100644 --- a/kopete/libkopete/kopetemessage.cpp +++ b/kopete/libkopete/kopetemessage.cpp @@ -18,18 +18,18 @@ #include <stdlib.h> -#include <qcolor.h> -#include <qbuffer.h> -#include <qimage.h> -#include <qstylesheet.h> -#include <qregexp.h> -#include <qtextcodec.h> +#include <tqcolor.h> +#include <tqbuffer.h> +#include <tqimage.h> +#include <tqstylesheet.h> +#include <tqregexp.h> +#include <tqtextcodec.h> #include <kdebug.h> #include <klocale.h> #include <kiconloader.h> #include <kstringhandler.h> #include <kmdcodec.h> -#include <qguardedptr.h> +#include <tqguardedptr.h> #include "kopetemessage.h" #include "kopetemetacontact.h" @@ -46,81 +46,81 @@ class Message::Private : public KShared { public: - Private( const QDateTime &timeStamp, const Contact *from, const ContactPtrList &to, - const QString &subject, MessageDirection direction, - const QString &requestedPlugin, MessageType type ); + Private( const TQDateTime &timeStamp, const Contact *from, const ContactPtrList &to, + const TQString &subject, MessageDirection direction, + const TQString &requestedPlugin, MessageType type ); - QGuardedPtr<const Contact> from; + TQGuardedPtr<const Contact> from; ContactPtrList to; ChatSession *manager; MessageDirection direction; MessageFormat format; MessageType type; - QString requestedPlugin; + TQString requestedPlugin; MessageImportance importance; bool bgOverride; bool fgOverride; bool rtfOverride; bool isRightToLeft; - QDateTime timeStamp; - QFont font; + TQDateTime timeStamp; + TQFont font; - QColor fgColor; - QColor bgColor; - QString body; - QString subject; + TQColor fgColor; + TQColor bgColor; + TQString body; + TQString subject; }; -Message::Private::Private( const QDateTime &timeStamp, const Contact *from, - const ContactPtrList &to, const QString &subject, - MessageDirection direction, const QString &requestedPlugin, MessageType type ) +Message::Private::Private( const TQDateTime &timeStamp, const Contact *from, + const ContactPtrList &to, const TQString &subject, + MessageDirection direction, const TQString &requestedPlugin, MessageType type ) : from( from ), to( to ), manager( 0 ), direction( direction ), format( PlainText ), type( type ), requestedPlugin( requestedPlugin ), importance( (to.count() <= 1) ? Normal : Low ), bgOverride( false ), fgOverride( false ), rtfOverride( false ), isRightToLeft( false ), - timeStamp( timeStamp ), body( QString::null ), subject( subject ) + timeStamp( timeStamp ), body( TQString::null ), subject( subject ) { } Message::Message() -: d( new Private( QDateTime::currentDateTime(), 0L, QPtrList<Contact>(), QString::null, Internal, - QString::null, TypeNormal ) ) +: d( new Private( TQDateTime::currentDateTime(), 0L, TQPtrList<Contact>(), TQString::null, Internal, + TQString::null, TypeNormal ) ) { } -Message::Message( const Contact *fromKC, const QPtrList<Contact> &toKC, const QString &body, - MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) -: d( new Private( QDateTime::currentDateTime(), fromKC, toKC, QString::null, direction, requestedPlugin, type ) ) +Message::Message( const Contact *fromKC, const TQPtrList<Contact> &toKC, const TQString &body, + MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) +: d( new Private( TQDateTime::currentDateTime(), fromKC, toKC, TQString::null, direction, requestedPlugin, type ) ) { doSetBody( body, f ); } -Message::Message( const Contact *fromKC, const Contact *toKC, const QString &body, - MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) +Message::Message( const Contact *fromKC, const Contact *toKC, const TQString &body, + MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) { - QPtrList<Contact> to; + TQPtrList<Contact> to; to.append(toKC); - d = new Private( QDateTime::currentDateTime(), fromKC, to, QString::null, direction, requestedPlugin, type ); + d = new Private( TQDateTime::currentDateTime(), fromKC, to, TQString::null, direction, requestedPlugin, type ); doSetBody( body, f ); } -Message::Message( const Contact *fromKC, const QPtrList<Contact> &toKC, const QString &body, - const QString &subject, MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) - : d( new Private( QDateTime::currentDateTime(), fromKC, toKC, subject, direction, requestedPlugin, type ) ) +Message::Message( const Contact *fromKC, const TQPtrList<Contact> &toKC, const TQString &body, + const TQString &subject, MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) + : d( new Private( TQDateTime::currentDateTime(), fromKC, toKC, subject, direction, requestedPlugin, type ) ) { doSetBody( body, f ); } -Message::Message( const QDateTime &timeStamp, const Contact *fromKC, const QPtrList<Contact> &toKC, - const QString &body, MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) - : d( new Private( timeStamp, fromKC, toKC, QString::null, direction, requestedPlugin, type ) ) +Message::Message( const TQDateTime &timeStamp, const Contact *fromKC, const TQPtrList<Contact> &toKC, + const TQString &body, MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) + : d( new Private( timeStamp, fromKC, toKC, TQString::null, direction, requestedPlugin, type ) ) { doSetBody( body, f ); } -Message::Message( const QDateTime &timeStamp, const Contact *fromKC, const QPtrList<Contact> &toKC, - const QString &body, const QString &subject, MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) +Message::Message( const TQDateTime &timeStamp, const Contact *fromKC, const TQPtrList<Contact> &toKC, + const TQString &body, const TQString &subject, MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) : d( new Private( timeStamp, fromKC, toKC, subject, direction, requestedPlugin, type ) ) { doSetBody( body, f ); @@ -172,47 +172,47 @@ void Message::setRtfOverride( bool enabled ) d->rtfOverride = enabled; } -void Message::setFg( const QColor &color ) +void Message::setFg( const TQColor &color ) { detach(); d->fgColor=color; } -void Message::setBg( const QColor &color ) +void Message::setBg( const TQColor &color ) { detach(); d->bgColor=color; } -void Message::setFont( const QFont &font ) +void Message::setFont( const TQFont &font ) { detach(); d->font = font; } -void Message::doSetBody( const QString &_body, Message::MessageFormat f ) +void Message::doSetBody( const TQString &_body, Message::MessageFormat f ) { - QString body = _body; + TQString body = _body; //TODO: move that in ChatTextEditPart::contents if( f == RichText ) { //This is coming from the RichTextEditor component. //Strip off the containing HTML document - body.replace( QRegExp( QString::fromLatin1(".*<body[^>]*>(.*)</body>.*") ), QString::fromLatin1("\\1") ); + body.replace( TQRegExp( TQString::fromLatin1(".*<body[^>]*>(.*)</body>.*") ), TQString::fromLatin1("\\1") ); //Strip <p> tags - body.replace( QString::fromLatin1("<p>"), QString::null ); + body.replace( TQString::fromLatin1("<p>"), TQString::null ); //Replace </p> with a <br/> - body.replace( QString::fromLatin1("</p>"), QString::fromLatin1("<br/>") ); + body.replace( TQString::fromLatin1("</p>"), TQString::fromLatin1("<br/>") ); //Remove trailing </br> - if ( body.endsWith( QString::fromLatin1("<br/>") ) ) + if ( body.endsWith( TQString::fromLatin1("<br/>") ) ) body.truncate( body.length() - 5 ); - body.remove( QString::fromLatin1("\n") ); - body.replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( " " ) ); + body.remove( TQString::fromLatin1("\n") ); + body.replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( " " ) ); } /* else if( f == ParsedHTML ) @@ -229,7 +229,7 @@ void Message::doSetBody( const QString &_body, Message::MessageFormat f ) d->isRightToLeft = ( f & RichText ? unescape( d->body ).isRightToLeft() : d->body.isRightToLeft() ); } -void Message::setBody( const QString &body, MessageFormat f ) +void Message::setBody( const TQString &body, MessageFormat f ) { detach(); @@ -247,9 +247,9 @@ void Message::setImportance(Message::MessageImportance i) d->importance = i; } -QString Message::unescape( const QString &xml ) +TQString Message::unescape( const TQString &xml ) { - QString data = xml; + TQString data = xml; // Remove linebreak and multiple spaces. First return nbsp's to normal spaces :) data.simplifyWhiteSpace(); @@ -263,13 +263,13 @@ QString Message::unescape( const QString &xml ) // Take the part between < and >, and extract the element name from that int matchWidth = endPos - pos + 1; - QString match = data.mid( pos + 1, matchWidth - 2 ).simplifyWhiteSpace(); + TQString match = data.mid( pos + 1, matchWidth - 2 ).simplifyWhiteSpace(); int elemEndPos = match.find( ' ' ); - QString elem = ( elemEndPos == -1 ? match.lower() : match.left( elemEndPos ).lower() ); - if ( elem == QString::fromLatin1( "img" ) ) + TQString elem = ( elemEndPos == -1 ? match.lower() : match.left( elemEndPos ).lower() ); + if ( elem == TQString::fromLatin1( "img" ) ) { // Replace smileys with their original text' - const QString attrTitle = QString::fromLatin1( "title=\"" ); + const TQString attrTitle = TQString::fromLatin1( "title=\"" ); int titlePos = match.find( attrTitle, elemEndPos ); int titleEndPos = match.find( '"', titlePos + attrTitle.length() ); if( titlePos == -1 || titleEndPos == -1 ) @@ -280,14 +280,14 @@ QString Message::unescape( const QString &xml ) } else { - QString orig = match.mid( titlePos + attrTitle.length(), + TQString orig = match.mid( titlePos + attrTitle.length(), titleEndPos - titlePos - attrTitle.length() ); data.replace( pos, matchWidth, orig ); pos += orig.length(); } } - else if ( elem == QString::fromLatin1( "/p" ) || elem == QString::fromLatin1( "/div" ) || - elem == QString::fromLatin1( "br" ) ) + else if ( elem == TQString::fromLatin1( "/p" ) || elem == TQString::fromLatin1( "/div" ) || + elem == TQString::fromLatin1( "br" ) ) { // Replace paragraph, div and line breaks with a newline data.replace( pos, matchWidth, '\n' ); @@ -302,36 +302,36 @@ QString Message::unescape( const QString &xml ) } // Replace stuff starting with '&' - data.replace( QString::fromLatin1( ">" ), QString::fromLatin1( ">" ) ); - data.replace( QString::fromLatin1( "<" ), QString::fromLatin1( "<" ) ); - data.replace( QString::fromLatin1( """ ), QString::fromLatin1( "\"" ) ); - data.replace( QString::fromLatin1( " " ), QString::fromLatin1( " " ) ); - data.replace( QString::fromLatin1( "&" ), QString::fromLatin1( "&" ) ); - data.replace( QString::fromLatin1( " " ), QString::fromLatin1( " " ) ); //this one is used in jabber: note, we should escape all &#xx; + data.replace( TQString::fromLatin1( ">" ), TQString::fromLatin1( ">" ) ); + data.replace( TQString::fromLatin1( "<" ), TQString::fromLatin1( "<" ) ); + data.replace( TQString::fromLatin1( """ ), TQString::fromLatin1( "\"" ) ); + data.replace( TQString::fromLatin1( " " ), TQString::fromLatin1( " " ) ); + data.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&" ) ); + data.replace( TQString::fromLatin1( " " ), TQString::fromLatin1( " " ) ); //this one is used in jabber: note, we should escape all &#xx; return data; } -QString Message::escape( const QString &text ) +TQString Message::escape( const TQString &text ) { - QString html = QStyleSheet::escape( text ); + TQString html = TQStyleSheet::escape( text ); //Replace carriage returns inside the text - html.replace( QString::fromLatin1( "\n" ), QString::fromLatin1( "<br />" ) ); + html.replace( TQString::fromLatin1( "\n" ), TQString::fromLatin1( "<br />" ) ); //Replace a tab with 4 spaces - html.replace( QString::fromLatin1( "\t" ), QString::fromLatin1( " " ) ); + html.replace( TQString::fromLatin1( "\t" ), TQString::fromLatin1( " " ) ); //Replace multiple spaces with //do not replace every space so we break the linebreak - html.replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( " " ) ); + html.replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( " " ) ); return html; } -QString Message::plainBody() const +TQString Message::plainBody() const { - QString body=d->body; + TQString body=d->body; if( d->format & RichText ) { body = unescape( body ); @@ -339,9 +339,9 @@ QString Message::plainBody() const return body; } -QString Message::escapedBody() const +TQString Message::escapedBody() const { - QString escapedBody=d->body; + TQString escapedBody=d->body; // kdDebug(14000) << k_funcinfo << escapedBody << " " << d->rtfOverride << endl; if( d->format & PlainText ) @@ -357,7 +357,7 @@ QString Message::escapedBody() const return escapedBody; } -QString Message::parsedBody() const +TQString Message::parsedBody() const { //kdDebug(14000) << k_funcinfo << "messageformat: " << d->format << endl; @@ -371,16 +371,16 @@ QString Message::parsedBody() const } } -static QString makeRegExp( const char *pattern ) +static TQString makeRegExp( const char *pattern ) { - const QString urlChar = QString::fromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); - const QString boundaryStart = QString::fromLatin1( "(^|[^%1])(" ).arg( urlChar ); - const QString boundaryEnd = QString::fromLatin1( ")([^%1]|$)" ).arg( urlChar ); + const TQString urlChar = TQString::fromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); + const TQString boundaryStart = TQString::fromLatin1( "(^|[^%1])(" ).arg( urlChar ); + const TQString boundaryEnd = TQString::fromLatin1( ")([^%1]|$)" ).arg( urlChar ); - return boundaryStart + QString::fromLatin1(pattern) + boundaryEnd; + return boundaryStart + TQString::fromLatin1(pattern) + boundaryEnd; } -QString Message::parseLinks( const QString &message, MessageFormat format ) +TQString Message::parseLinks( const TQString &message, MessageFormat format ) { if ( format == ParsedHTML ) return message; @@ -388,9 +388,9 @@ QString Message::parseLinks( const QString &message, MessageFormat format ) if ( format & RichText ) { // < in HTML *always* means start-of-tag - QStringList entries = QStringList::split( QChar('<'), message, true ); + TQStringList entries = TQStringList::split( TQChar('<'), message, true ); - QStringList::Iterator it = entries.begin(); + TQStringList::Iterator it = entries.begin(); // first one is different: it doesn't start with an HTML tag. if ( it != entries.end() ) @@ -401,55 +401,55 @@ QString Message::parseLinks( const QString &message, MessageFormat format ) for ( ; it != entries.end(); ++it ) { - QString curr = *it; + TQString curr = *it; // > in HTML means start-of-tag if and only if it's the first one after a < - int tagclose = curr.find( QChar('>') ); + int tagclose = curr.find( TQChar('>') ); // no >: the HTML is broken, but we can cope if ( tagclose == -1 ) continue; - QString tag = curr.left( tagclose + 1 ); - QString body = curr.mid( tagclose + 1 ); + TQString tag = curr.left( tagclose + 1 ); + TQString body = curr.mid( tagclose + 1 ); *it = tag + parseLinks( body, PlainText ); } - return entries.join(QString::fromLatin1("<")); + return entries.join(TQString::fromLatin1("<")); } - QString result = message; + TQString result = message; // common subpatterns - may not contain matching parens! - const QString name = QString::fromLatin1( "[\\w\\+\\-=_\\.]+" ); - const QString userAndPassword = QString::fromLatin1( "(?:%1(?::%1)?\\@)" ).arg( name ); - const QString urlChar = QString::fromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); - const QString urlSection = QString::fromLatin1( "[%1]+" ).arg( urlChar ); - const QString domain = QString::fromLatin1( "[\\-\\w_]+(?:\\.[\\-\\w_]+)+" ); + const TQString name = TQString::fromLatin1( "[\\w\\+\\-=_\\.]+" ); + const TQString userAndPassword = TQString::fromLatin1( "(?:%1(?::%1)?\\@)" ).arg( name ); + const TQString urlChar = TQString::fromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); + const TQString urlSection = TQString::fromLatin1( "[%1]+" ).arg( urlChar ); + const TQString domain = TQString::fromLatin1( "[\\-\\w_]+(?:\\.[\\-\\w_]+)+" ); //Replace http/https/ftp links: // Replace (stuff)://[user:password@](linkstuff) with a link result.replace( - QRegExp( makeRegExp("\\w+://%1?\\w%2").arg( userAndPassword, urlSection ) ), - QString::fromLatin1("\\1<a href=\"\\2\" title=\"\\2\">\\2</a>\\3" ) ); + TQRegExp( makeRegExp("\\w+://%1?\\w%2").arg( userAndPassword, urlSection ) ), + TQString::fromLatin1("\\1<a href=\"\\2\" title=\"\\2\">\\2</a>\\3" ) ); // Replace www.X.Y(linkstuff) with a http: link result.replace( - QRegExp( makeRegExp("%1?www\\.%2%3").arg( userAndPassword, domain, urlSection ) ), - QString::fromLatin1("\\1<a href=\"http://\\2\" title=\"http://\\2\">\\2</a>\\3" ) ); + TQRegExp( makeRegExp("%1?www\\.%2%3").arg( userAndPassword, domain, urlSection ) ), + TQString::fromLatin1("\\1<a href=\"http://\\2\" title=\"http://\\2\">\\2</a>\\3" ) ); //Replace Email Links // Replace user@domain with a mailto: link result.replace( - QRegExp( makeRegExp("%1@%2").arg( name, domain ) ), - QString::fromLatin1("\\1<a href=\"mailto:\\2\" title=\"mailto:\\2\">\\2</a>\\3") ); + TQRegExp( makeRegExp("%1@%2").arg( name, domain ) ), + TQString::fromLatin1("\\1<a href=\"mailto:\\2\" title=\"mailto:\\2\">\\2</a>\\3") ); //Workaround for Bug 85061: Highlighted URLs adds a ' ' after the URL itself // the trailing is included in the url. - result.replace( QRegExp( QString::fromLatin1("(<a href=\"[^\"]+)( )(\")") ) , QString::fromLatin1("\\1\\3") ); + result.replace( TQRegExp( TQString::fromLatin1("(<a href=\"[^\"]+)( )(\")") ) , TQString::fromLatin1("\\1\\3") ); return result; } -QDateTime Message::timestamp() const +TQDateTime Message::timestamp() const { return d->timeStamp; } @@ -459,7 +459,7 @@ const Contact *Message::from() const return d->from; } -QPtrList<Contact> Message::to() const +TQPtrList<Contact> Message::to() const { return d->to; } @@ -469,29 +469,29 @@ Message::MessageType Message::type() const return d->type; } -QString Message::requestedPlugin() const +TQString Message::requestedPlugin() const { return d->requestedPlugin; } -QColor Message::fg() const +TQColor Message::fg() const { return d->fgColor; } -QColor Message::bg() const +TQColor Message::bg() const { return d->bgColor; } -QFont Message::font() const +TQFont Message::font() const { - //QDomElement bodyNode = d->xmlDoc.elementsByTagName( QString::fromLatin1("body") ).item(0).toElement(); - //return QFont( bodyNode.attribute( QString::fromLatin1("font") ), bodyNode.attribute( QString::fromLatin1("fontsize") ).toInt() ); + //TQDomElement bodyNode = d->xmlDoc.elementsByTagName( TQString::fromLatin1("body") ).item(0).toElement(); + //return TQFont( bodyNode.attribute( TQString::fromLatin1("font") ), bodyNode.attribute( TQString::fromLatin1("fontsize") ).toInt() ); return d->font; } -QString Message::subject() const +TQString Message::subject() const { return d->subject; } @@ -522,47 +522,47 @@ void Message::setManager(ChatSession *kmm) d->manager=kmm; } -QString Message::getHtmlStyleAttribute() const +TQString Message::getHtmlStyleAttribute() const { - QString styleAttribute; + TQString styleAttribute; - styleAttribute = QString::fromUtf8("style=\""); + styleAttribute = TQString::fromUtf8("style=\""); // Affect foreground(color) and background color to message. if( !d->fgOverride && d->fgColor.isValid() ) { - styleAttribute += QString::fromUtf8("color: %1; ").arg(d->fgColor.name()); + styleAttribute += TQString::fromUtf8("color: %1; ").arg(d->fgColor.name()); } if( !d->bgOverride && d->bgColor.isValid() ) { - styleAttribute += QString::fromUtf8("background-color: %1; ").arg(d->bgColor.name()); + styleAttribute += TQString::fromUtf8("background-color: %1; ").arg(d->bgColor.name()); } // Affect font parameters. - if( !d->rtfOverride && d->font!=QFont() ) + if( !d->rtfOverride && d->font!=TQFont() ) { - QString fontstr; + TQString fontstr; if(!d->font.family().isNull()) - fontstr+=QString::fromLatin1("font-family: ")+d->font.family()+QString::fromLatin1("; "); + fontstr+=TQString::fromLatin1("font-family: ")+d->font.family()+TQString::fromLatin1("; "); if(d->font.italic()) - fontstr+=QString::fromLatin1("font-style: italic; "); + fontstr+=TQString::fromLatin1("font-style: italic; "); if(d->font.strikeOut()) - fontstr+=QString::fromLatin1("text-decoration: line-through; "); + fontstr+=TQString::fromLatin1("text-decoration: line-through; "); if(d->font.underline()) - fontstr+=QString::fromLatin1("text-decoration: underline; "); + fontstr+=TQString::fromLatin1("text-decoration: underline; "); if(d->font.bold()) - fontstr+=QString::fromLatin1("font-weight: bold;"); + fontstr+=TQString::fromLatin1("font-weight: bold;"); styleAttribute += fontstr; } - styleAttribute += QString::fromUtf8("\""); + styleAttribute += TQString::fromUtf8("\""); return styleAttribute; } // KDE4: Move that to a utils class/namespace -QString Message::decodeString( const QCString &message, const QTextCodec *providedCodec, bool *success ) +TQString Message::decodeString( const TQCString &message, const TQTextCodec *providedCodec, bool *success ) { /* Note to everyone. This function is not the most efficient, that is for sure. @@ -575,7 +575,7 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid // Avoid heavy codec tests on empty message. if( message.isEmpty() ) - return QString::fromAscii( message ); + return TQString::fromAscii( message ); //Check first 128 chars int charsToCheck = message.length(); @@ -592,11 +592,11 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid if( KStringHandler::isUtf8(message) ) { //We have a UTF string almost for sure. At least we know it will be decoded. - return QString::fromUtf8( message ); + return TQString::fromUtf8( message ); } //Try codecForContent - exact match - QTextCodec *testCodec = QTextCodec::codecForContent(message, charsToCheck); + TQTextCodec *testCodec = TQTextCodec::codecForContent(message, charsToCheck); if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= 0 ) { //All chars decodable. @@ -610,7 +610,7 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid //We don't have any clues here. //Try local codec - testCodec = QTextCodec::codecForLocale(); + testCodec = TQTextCodec::codecForLocale(); if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= 0 ) { //All chars decodable. @@ -619,7 +619,7 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid } //Try latin1 codec - testCodec = QTextCodec::codecForMib(4); + testCodec = TQTextCodec::codecForMib(4); if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= 0 ) { //All chars decodable. @@ -629,7 +629,7 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid kdDebug(14000) << k_funcinfo << "Using latin1 and cleaning string" << endl; //No codec decoded. Just decode latin1, and clean out any junk. - QString result = QString::fromLatin1( message ); + TQString result = TQString::fromLatin1( message ); const uint length = message.length(); for( uint i = 0; i < length; ++i ) { diff --git a/kopete/libkopete/kopetemessage.h b/kopete/libkopete/kopetemessage.h index 0737d2ae..03a09bd9 100644 --- a/kopete/libkopete/kopetemessage.h +++ b/kopete/libkopete/kopetemessage.h @@ -23,13 +23,13 @@ #include <ksharedptr.h> -#include <qptrlist.h> -#include <qstring.h> -#include <qdom.h> -#include <qcolor.h> -#include <qfont.h> -#include <qdatetime.h> -#include <qvaluelist.h> +#include <tqptrlist.h> +#include <tqstring.h> +#include <tqdom.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqdatetime.h> +#include <tqvaluelist.h> #include "kopete_export.h" @@ -117,9 +117,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const Contact *fromKC, const QPtrList<Contact> &toKC, const QString &body, + Message( const Contact *fromKC, const TQPtrList<Contact> &toKC, const TQString &body, MessageDirection direction, MessageFormat format = PlainText, - const QString &requestedPlugin = QString::null, MessageType type = TypeNormal ); + const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** * Constructs a new message. See @ref setBody() to more information about the format @@ -131,9 +131,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const Contact *fromKC, const Contact *toKC, const QString &body, + Message( const Contact *fromKC, const Contact *toKC, const TQString &body, MessageDirection direction, MessageFormat format = PlainText, - const QString &requestedPlugin = QString::null, MessageType type = TypeNormal ); + const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** * Constructs a new message. See @ref setBody() to more information about the format @@ -146,9 +146,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const Contact *fromKC, const QPtrList<Contact> &toKC, const QString &body, - const QString &subject, MessageDirection direction, MessageFormat format = PlainText, - const QString &requestedPlugin = QString::null, MessageType type = TypeNormal ); + Message( const Contact *fromKC, const TQPtrList<Contact> &toKC, const TQString &body, + const TQString &subject, MessageDirection direction, MessageFormat format = PlainText, + const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** * Constructs a new message. See @ref setBody() to more information about the format @@ -161,9 +161,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const QDateTime &timeStamp, const Contact *fromKC, const QPtrList<Contact> &toKC, - const QString &body, MessageDirection direction, MessageFormat format = PlainText, - const QString &requestedPlugin = QString::null, MessageType type = TypeNormal ); + Message( const TQDateTime &timeStamp, const Contact *fromKC, const TQPtrList<Contact> &toKC, + const TQString &body, MessageDirection direction, MessageFormat format = PlainText, + const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** * Constructs a new message. See @ref setBody() to more information about the format @@ -177,9 +177,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const QDateTime &timeStamp, const Contact *fromKC, const QPtrList<Contact> &toKC, - const QString &body, const QString &subject, MessageDirection direction, - MessageFormat format = PlainText, const QString &requestedPlugin = QString::null, + Message( const TQDateTime &timeStamp, const Contact *fromKC, const TQPtrList<Contact> &toKC, + const TQString &body, const TQString &subject, MessageDirection direction, + MessageFormat format = PlainText, const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** @@ -198,7 +198,7 @@ public: * Accessor method for the timestamp of the message * @return The message's timestamp */ - QDateTime timestamp() const; + TQDateTime timestamp() const; /** * Accessor method for the Contact that sent this message @@ -210,7 +210,7 @@ public: * Accessor method for the Contacts that this message was sent to * @return Pointer list of the Contacts this message was sent to */ - QPtrList<Contact> to() const; + TQPtrList<Contact> to() const; /** * @return the @ref MessageType of this message @@ -221,31 +221,31 @@ public: * @return the view plugin you would prefer to use to read this message. If * null, Kopete will use the user's preferred plugin. */ - QString requestedPlugin() const; + TQString requestedPlugin() const; /** * Accessor method for the foreground color * @return The message's foreground color */ - QColor fg() const; + TQColor fg() const; /** * Accessor method for the background color of the message * @return The message's background color */ - QColor bg() const; + TQColor bg() const; /** * Accessor method for the font of the message * @return The message's font */ - QFont font() const; + TQFont font() const; /** * Accessor method for the subject of the message * @return The message subject */ - QString subject() const; + TQString subject() const; /** * Accessor method for the format of the message @@ -276,19 +276,19 @@ public: * Sets the foreground color for the message * @param color The color */ - void setFg( const QColor &color ); + void setFg( const TQColor &color ); /** * Sets the background color for the message * @param color The color */ - void setBg( const QColor &color ); + void setBg( const TQColor &color ); /** * Sets the font for the message * @param font The font */ - void setFont( const QFont &font ); + void setFont( const TQFont &font ); /** * @brief Sets the body of the message @@ -296,13 +296,13 @@ public: * @param body The body * @param format The format of the message, @see MessageFormat */ - void setBody( const QString &body, MessageFormat format = PlainText ); + void setBody( const TQString &body, MessageFormat format = PlainText ); /** * Get the message body back as plain text * @return The message body as plain text */ - QString plainBody() const; + TQString plainBody() const; /** * Get the message body as escaped (X)HTML format. @@ -310,14 +310,14 @@ public: * and newlines (\\n) are converted to \<br /\> * @return The message body as escaped text */ - QString escapedBody() const; + TQString escapedBody() const; /** * Get the message body as parsed HTML with Emoticons, and URL parsed * this should be ready to be shown in the chatwindow. * @return The HTML and Emoticon parsed message body */ - QString parsedBody() const; + TQString parsedBody() const; /** * Get the related message manager. @@ -356,7 +356,7 @@ public: * Return HTML style attribute for this message. * @return A string formatted like this: "style=attr" */ - QString getHtmlStyleAttribute() const; + TQString getHtmlStyleAttribute() const; public: /* static helpers */ @@ -368,7 +368,7 @@ public: /* static helpers */ * * @param xml The string you want to unescape */ - static QString unescape( const QString &xml ); + static TQString unescape( const TQString &xml ); /** * Indicate whether the string is right-to-left (Arabic or Hebrew are bidi locales) @@ -381,7 +381,7 @@ public: /* static helpers */ * @brief Transform a pleintext message to an html. * it escape main entity like > < add some <br /> or &nbsp; */ - static QString escape( const QString & ); + static TQString escape( const TQString & ); /** @@ -394,8 +394,8 @@ public: /* static helpers */ * is defined as a successfull decoding using either UTF8 or the codec you * provided. If a guess has to be taken, success will be false. */ - static QString decodeString( const QCString &message, - const QTextCodec *providedCodec = 0L, bool *success = 0L ); + static TQString decodeString( const TQCString &message, + const TQTextCodec *providedCodec = 0L, bool *success = 0L ); private: /** @@ -408,12 +408,12 @@ private: * Called internally by @ref setBody() and the constructor * Basically @ref setBody() without detach */ - void doSetBody( const QString &body, MessageFormat format = PlainText ); + void doSetBody( const TQString &body, MessageFormat format = PlainText ); class Private; KSharedPtr<Private> d; - static QString parseLinks( const QString &message, MessageFormat format ); + static TQString parseLinks( const TQString &message, MessageFormat format ); }; } diff --git a/kopete/libkopete/kopetemessageevent.cpp b/kopete/libkopete/kopetemessageevent.cpp index fb129837..d50c85e9 100644 --- a/kopete/libkopete/kopetemessageevent.cpp +++ b/kopete/libkopete/kopetemessageevent.cpp @@ -37,14 +37,14 @@ public: EventState state; }; -MessageEvent::MessageEvent( const Message& m, QObject *parent, const char *name ) - : QObject(parent,name), d( new Private ) +MessageEvent::MessageEvent( const Message& m, TQObject *parent, const char *name ) + : TQObject(parent,name), d( new Private ) { d->message = m; d->state = Nothing; const Contact *c=m.from(); if(c) - connect(c,SIGNAL(contactDestroyed( Kopete::Contact* )),this,SLOT(discard())); + connect(c,TQT_SIGNAL(contactDestroyed( Kopete::Contact* )),this,TQT_SLOT(discard())); } MessageEvent::~MessageEvent() diff --git a/kopete/libkopete/kopetemessageevent.h b/kopete/libkopete/kopetemessageevent.h index 7beb1aa2..9cfa1ea5 100644 --- a/kopete/libkopete/kopetemessageevent.h +++ b/kopete/libkopete/kopetemessageevent.h @@ -21,7 +21,7 @@ #ifndef KOPETEMESSAGEEVENT_H #define KOPETEMESSAGEEVENT_H -#include <qobject.h> +#include <tqobject.h> #include "kopetemessage.h" @@ -44,7 +44,7 @@ class KOPETE_EXPORT MessageEvent : public QObject Q_OBJECT public: - MessageEvent(const Kopete::Message& , QObject* parent=0L, const char *name=0L); + MessageEvent(const Kopete::Message& , TQObject* parent=0L, const char *name=0L); ~MessageEvent(); /** diff --git a/kopete/libkopete/kopetemessagehandler.cpp b/kopete/libkopete/kopetemessagehandler.cpp index 89628d4f..28ef01bf 100644 --- a/kopete/libkopete/kopetemessagehandler.cpp +++ b/kopete/libkopete/kopetemessagehandler.cpp @@ -30,7 +30,7 @@ public: }; MessageHandler::MessageHandler() - : QObject( 0 ), d( new Private ) + : TQObject( 0 ), d( new Private ) { } @@ -56,7 +56,7 @@ int MessageHandler::capabilities() void MessageHandler::handleMessageInternal( MessageEvent *event ) { - connect( event, SIGNAL( accepted(Kopete::MessageEvent*) ), this, SLOT( messageAccepted(Kopete::MessageEvent*) ) ); + connect( event, TQT_SIGNAL( accepted(Kopete::MessageEvent*) ), this, TQT_SLOT( messageAccepted(Kopete::MessageEvent*) ) ); handleMessage( event ); } @@ -67,7 +67,7 @@ void MessageHandler::handleMessage( MessageEvent *event ) void MessageHandler::messageAccepted( MessageEvent *event ) { - disconnect( event, SIGNAL( accepted(Kopete::MessageEvent*) ), this, SLOT( messageAccepted(Kopete::MessageEvent*) ) ); + disconnect( event, TQT_SIGNAL( accepted(Kopete::MessageEvent*) ), this, TQT_SLOT( messageAccepted(Kopete::MessageEvent*) ) ); d->next->handleMessageInternal( event ); } diff --git a/kopete/libkopete/kopetemessagehandler.h b/kopete/libkopete/kopetemessagehandler.h index ba16184c..fa9c1f31 100644 --- a/kopete/libkopete/kopetemessagehandler.h +++ b/kopete/libkopete/kopetemessagehandler.h @@ -17,7 +17,7 @@ #ifndef KOPETEMESSAGEHANDLER_H #define KOPETEMESSAGEHANDLER_H -#include <qobject.h> +#include <tqobject.h> //#include <kdemacros.h> #include "kopete_export.h" @@ -25,7 +25,7 @@ // to avoid this being included everywhere #include "kopetemessage.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> namespace Kopete { @@ -78,7 +78,7 @@ public: * handler in the chain. * * @note If you store @p event, be aware that it could be deleted at any time, and either - * connect to the its discarded(Kopete::MessageEvent*) signal or store it in a QGuardedPtr. + * connect to the its discarded(Kopete::MessageEvent*) signal or store it in a TQGuardedPtr. */ virtual void handleMessage( MessageEvent *event ); @@ -124,7 +124,7 @@ public: */ virtual ~MessageHandlerFactory(); - typedef QValueList<MessageHandlerFactory*> FactoryList; + typedef TQValueList<MessageHandlerFactory*> FactoryList; /** * @return the list of registered message handler factories */ diff --git a/kopete/libkopete/kopetemessagehandlerchain.cpp b/kopete/libkopete/kopetemessagehandlerchain.cpp index fe1e96ab..ce119df0 100644 --- a/kopete/libkopete/kopetemessagehandlerchain.cpp +++ b/kopete/libkopete/kopetemessagehandlerchain.cpp @@ -21,9 +21,9 @@ #include <kdebug.h> -#include <qmap.h> -#include <qtimer.h> -#include <qvaluelist.h> +#include <tqmap.h> +#include <tqtimer.h> +#include <tqvaluelist.h> namespace Kopete { @@ -62,8 +62,8 @@ MessageHandlerChain::Ptr MessageHandlerChain::create( ChatSession *manager, Mess FactoryList factories = MessageHandlerFactory::messageHandlerFactories(); // create a sorted list of handlers - typedef QValueList<MessageHandler*> HandlerList; - typedef QMap<int,HandlerList> HandlerMap; + typedef TQValueList<MessageHandler*> HandlerList; + typedef TQMap<int,HandlerList> HandlerMap; HandlerMap handlers; uint count = 0; for( FactoryList::Iterator it = factories.begin(); it != factories.end(); ++it ) @@ -107,7 +107,7 @@ MessageHandlerChain::Ptr MessageHandlerChain::create( ChatSession *manager, Mess } MessageHandlerChain::MessageHandlerChain() - : QObject( 0 ), d( new Private ) + : TQObject( 0 ), d( new Private ) { } @@ -151,8 +151,8 @@ public: ProcessMessageTask::ProcessMessageTask( MessageHandlerChain::Ptr chain, MessageEvent *event ) : d( new Private(chain, event) ) { - QTimer::singleShot( 0, this, SLOT( slotStart() ) ); - connect( event, SIGNAL( done( Kopete::MessageEvent* ) ), this, SLOT( slotDone() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotStart() ) ); + connect( event, TQT_SIGNAL( done( Kopete::MessageEvent* ) ), this, TQT_SLOT( slotDone() ) ); event->message().manager()->ref(); } diff --git a/kopete/libkopete/kopetemessagehandlerchain.h b/kopete/libkopete/kopetemessagehandlerchain.h index 5852c2da..a53e0600 100644 --- a/kopete/libkopete/kopetemessagehandlerchain.h +++ b/kopete/libkopete/kopetemessagehandlerchain.h @@ -17,7 +17,7 @@ #ifndef KOPETEFILTERCHAIN_H #define KOPETEFILTERCHAIN_H -#include <qobject.h> +#include <tqobject.h> #include <kdemacros.h> #include <ksharedptr.h> #include "kopetemessage.h" @@ -41,7 +41,7 @@ class ProcessMessageTask; * * @author Richard Smith <kde@metafoo.co.uk> */ -class MessageHandlerChain : public QObject, private KShared +class MessageHandlerChain : public TQObject, private KShared { Q_OBJECT public: diff --git a/kopete/libkopete/kopetemetacontact.cpp b/kopete/libkopete/kopetemetacontact.cpp index e181f52e..9a908f32 100644 --- a/kopete/libkopete/kopetemetacontact.cpp +++ b/kopete/libkopete/kopetemetacontact.cpp @@ -46,12 +46,12 @@ namespace Kopete { // this is just to save typing -const QString NSCID_ELEM = QString::fromUtf8("nameSourceContactId" ); -const QString NSPID_ELEM = QString::fromUtf8( "nameSourcePluginId" ); -const QString NSAID_ELEM = QString::fromUtf8( "nameSourceAccountId" ); -const QString PSCID_ELEM = QString::fromUtf8( "photoSourceContactId" ); -const QString PSPID_ELEM = QString::fromUtf8( "photoSourcePluginId" ); -const QString PSAID_ELEM = QString::fromUtf8( "photoSourceAccountId" ); +const TQString NSCID_ELEM = TQString::fromUtf8("nameSourceContactId" ); +const TQString NSPID_ELEM = TQString::fromUtf8( "nameSourcePluginId" ); +const TQString NSAID_ELEM = TQString::fromUtf8( "nameSourceAccountId" ); +const TQString PSCID_ELEM = TQString::fromUtf8( "photoSourceContactId" ); +const TQString PSPID_ELEM = TQString::fromUtf8( "photoSourcePluginId" ); +const TQString PSAID_ELEM = TQString::fromUtf8( "photoSourceAccountId" ); class MetaContact::Private { public: @@ -64,7 +64,7 @@ class MetaContact::Private ~Private() {} - QPtrList<Contact> contacts; + TQPtrList<Contact> contacts; // property sources PropertySource photoSource; @@ -75,22 +75,22 @@ class MetaContact::Private Contact *photoSourceContact; // used when source is kabc - QString metaContactId; + TQString metaContactId; // used when source is custom - QString displayName; + TQString displayName; KURL photoUrl; - QPtrList<Group> groups; - QMap<QString, QMap<QString, QString> > addressBook; + TQPtrList<Group> groups; + TQMap<TQString, TQMap<TQString, TQString> > addressBook; bool temporary; OnlineStatus::StatusType onlineStatus; bool photoSyncedWithKABC; // Used to set contact source at load. - QString nameSourcePID, nameSourceAID, nameSourceCID; - QString photoSourcePID, photoSourceAID, photoSourceCID; + TQString nameSourcePID, nameSourceAID, nameSourceCID; + TQString photoSourcePID, photoSourceAID, photoSourceCID; // The photo cache. Reduce disk access and CPU usage. Picture customPicture, contactPicture, kabcPicture; @@ -101,18 +101,18 @@ MetaContact::MetaContact() { d = new Private; - connect( this, SIGNAL( pluginDataChanged() ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( iconChanged( Kopete::ContactListElement::IconState, const QString & ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( useCustomIconChanged( bool ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( displayNameChanged( const QString &, const QString & ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( movedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( contactAdded( Kopete::Contact * ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( contactRemoved( Kopete::Contact * ) ), SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( pluginDataChanged() ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( iconChanged( Kopete::ContactListElement::IconState, const TQString & ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( useCustomIconChanged( bool ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( movedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( contactAdded( Kopete::Contact * ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( contactRemoved( Kopete::Contact * ) ), TQT_SIGNAL( persistentDataChanged() ) ); // Update the KABC picture when the KDE Address book change. - connect(KABCPersistence::self()->addressBook(), SIGNAL(addressBookChanged(AddressBook *)), this, SLOT(slotUpdateAddressBookPicture())); + connect(KABCPersistence::self()->addressBook(), TQT_SIGNAL(addressBookChanged(AddressBook *)), this, TQT_SLOT(slotUpdateAddressBookPicture())); // make sure MetaContact is at least in one group addToGroup( Group::topLevel() ); @@ -135,17 +135,17 @@ void MetaContact::addContact( Contact *c ) { d->contacts.append( c ); - connect( c, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + connect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - connect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + connect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; - connect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), - this, SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); + connect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), + this, TQT_SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); - connect( c, SIGNAL( idleStateChanged( Kopete::Contact * ) ), - this, SIGNAL( contactIdleStateChanged( Kopete::Contact * ) ) ); + connect( c, TQT_SIGNAL( idleStateChanged( Kopete::Contact * ) ), + this, TQT_SIGNAL( contactIdleStateChanged( Kopete::Contact * ) ) ); emit contactAdded(c); @@ -174,7 +174,7 @@ void MetaContact::updateOnlineStatus() Kopete::OnlineStatus::StatusType newStatus = Kopete::OnlineStatus::Unknown; Kopete::OnlineStatus mostSignificantStatus; - for ( QPtrListIterator<Contact> it( d->contacts ); it.current(); ++it ) + for ( TQPtrListIterator<Contact> it( d->contacts ); it.current(); ++it ) { // find most significant status if ( it.current()->onlineStatus() > mostSignificantStatus ) @@ -203,7 +203,7 @@ void MetaContact::removeContact(Contact *c, bool deleted) bool wasTrackingName = ( !displayNameSourceContact() && (displayNameSource() == SourceContact) ); bool wasTrackingPhoto = ( !photoSourceContact() && (photoSource() == SourceContact) ); // save for later use - QString currDisplayName = displayName(); + TQString currDisplayName = displayName(); d->contacts.remove( c ); @@ -258,14 +258,14 @@ void MetaContact::removeContact(Contact *c, bool deleted) if(!deleted) { //If this function is tell by slotContactRemoved, c is maybe just a QObject - disconnect( c, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - disconnect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; - disconnect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), - this, SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); - disconnect( c, SIGNAL( idleStateChanged( Kopete::Contact * ) ), - this, SIGNAL( contactIdleStateChanged( Kopete::Contact *) ) ); + disconnect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + disconnect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; + disconnect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), + this, TQT_SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); + disconnect( c, TQT_SIGNAL( idleStateChanged( Kopete::Contact * ) ), + this, TQT_SIGNAL( contactIdleStateChanged( Kopete::Contact *) ) ); kdDebug( 14010 ) << k_funcinfo << "Contact disconnected" << endl; @@ -280,10 +280,10 @@ void MetaContact::removeContact(Contact *c, bool deleted) updateOnlineStatus(); } -Contact *MetaContact::findContact( const QString &protocolId, const QString &accountId, const QString &contactId ) +Contact *MetaContact::findContact( const TQString &protocolId, const TQString &accountId, const TQString &contactId ) { //kdDebug( 14010 ) << k_funcinfo << "Num contacts: " << d->contacts.count() << endl; - QPtrListIterator<Contact> it( d->contacts ); + TQPtrListIterator<Contact> it( d->contacts ); for( ; it.current(); ++it ) { //kdDebug( 14010 ) << k_funcinfo << "Trying " << it.current()->contactId() << ", proto " @@ -307,9 +307,9 @@ Contact *MetaContact::findContact( const QString &protocolId, const QString &acc void MetaContact::setDisplayNameSource(PropertySource source) { - QString oldName = displayName(); + TQString oldName = displayName(); d->displayNameSource = source; - QString newName = displayName(); + TQString newName = displayName(); if ( oldName != newName) emit displayNameChanged( oldName, newName ); } @@ -386,7 +386,7 @@ Contact *MetaContact::preferredContact() Contact *contact = 0; bool hasOpenView=false; //has the selected contact already an open chatwindow - for ( QPtrListIterator<Contact> it( d->contacts ); it.current(); ++it ) + for ( TQPtrListIterator<Contact> it( d->contacts ); it.current(); ++it ) { Contact *c=it.current(); @@ -451,7 +451,7 @@ Contact *MetaContact::execute() unsigned long int MetaContact::idleTime() const { unsigned long int time = 0; - QPtrListIterator<Contact> it( d->contacts ); + TQPtrListIterator<Contact> it( d->contacts ); for( ; it.current(); ++it ) { unsigned long int i = it.current()->idleTime(); @@ -463,7 +463,7 @@ unsigned long int MetaContact::idleTime() const return time; } -QString MetaContact::statusIcon() const +TQString MetaContact::statusIcon() const { switch( status() ) { @@ -471,31 +471,31 @@ QString MetaContact::statusIcon() const if( useCustomIcon() ) return icon( ContactListElement::Online ); else - return QString::fromUtf8( "metacontact_online" ); + return TQString::fromUtf8( "metacontact_online" ); case OnlineStatus::Away: if( useCustomIcon() ) return icon( ContactListElement::Away ); else - return QString::fromUtf8( "metacontact_away" ); + return TQString::fromUtf8( "metacontact_away" ); case OnlineStatus::Unknown: if( useCustomIcon() ) return icon( ContactListElement::Unknown ); if ( d->contacts.isEmpty() ) - return QString::fromUtf8( "metacontact_unknown" ); + return TQString::fromUtf8( "metacontact_unknown" ); else - return QString::fromUtf8( "metacontact_offline" ); + return TQString::fromUtf8( "metacontact_offline" ); case OnlineStatus::Offline: default: if( useCustomIcon() ) return icon( ContactListElement::Offline ); else - return QString::fromUtf8( "metacontact_offline" ); + return TQString::fromUtf8( "metacontact_offline" ); } } -QString MetaContact::statusString() const +TQString MetaContact::statusString() const { switch( status() ) { @@ -518,7 +518,7 @@ OnlineStatus::StatusType MetaContact::status() const bool MetaContact::isOnline() const { - QPtrListIterator<Contact> it( d->contacts ); + TQPtrListIterator<Contact> it( d->contacts ); for( ; it.current(); ++it ) { if( it.current()->isOnline() ) @@ -532,7 +532,7 @@ bool MetaContact::isReachable() const if ( isOnline() ) return true; - for ( QPtrListIterator<Contact> it( d->contacts ); it.current(); ++it ) + for ( TQPtrListIterator<Contact> it( d->contacts ); it.current(); ++it ) { if ( it.current()->account()->isConnected() && it.current()->isReachable() ) return true; @@ -546,7 +546,7 @@ bool MetaContact::canAcceptFiles() const if( !isOnline() ) return false; - QPtrListIterator<Contact> it( d->contacts ); + TQPtrListIterator<Contact> it( d->contacts ); for( ; it.current(); ++it ) { if( it.current()->canAcceptFiles() ) @@ -556,7 +556,7 @@ bool MetaContact::canAcceptFiles() const } //Slot for sending files -void MetaContact::sendFile( const KURL &sourceURL, const QString &altFileName, unsigned long fileSize ) +void MetaContact::sendFile( const KURL &sourceURL, const TQString &altFileName, unsigned long fileSize ) { //If we can't send any files then exit if( d->contacts.isEmpty() || !canAcceptFiles() ) @@ -564,7 +564,7 @@ void MetaContact::sendFile( const KURL &sourceURL, const QString &altFileName, u //Find the highest ranked protocol that can accept files Contact *contact = d->contacts.first(); - for( QPtrListIterator<Contact> it( d->contacts ) ; it.current(); ++it ) + for( TQPtrListIterator<Contact> it( d->contacts ) ; it.current(); ++it ) { if( ( *it )->onlineStatus() > contact->onlineStatus() && ( *it )->canAcceptFiles() ) contact = *it; @@ -581,7 +581,7 @@ void MetaContact::slotContactStatusChanged( Contact * c, const OnlineStatus &sta emit contactStatusChanged( c, status ); } -void MetaContact::setDisplayName( const QString &name ) +void MetaContact::setDisplayName( const TQString &name ) { /*kdDebug( 14010 ) << k_funcinfo << "Change displayName from " << d->displayName << " to " << name << ", d->trackChildNameChanges=" << d->trackChildNameChanges << endl; @@ -590,22 +590,22 @@ void MetaContact::setDisplayName( const QString &name ) if( name == d->displayName ) return; - const QString old = d->displayName; + const TQString old = d->displayName; d->displayName = name; emit displayNameChanged( old , name ); - for( QPtrListIterator<Kopete::Contact> it( d->contacts ) ; it.current(); ++it ) + for( TQPtrListIterator<Kopete::Contact> it( d->contacts ) ; it.current(); ++it ) ( *it )->sync(Contact::DisplayNameChanged); } -QString MetaContact::customDisplayName() const +TQString MetaContact::customDisplayName() const { return d->displayName; } -QString MetaContact::displayName() const +TQString MetaContact::displayName() const { PropertySource source = displayNameSource(); if ( source == SourceKABC ) @@ -637,7 +637,7 @@ QString MetaContact::displayName() const return d->displayName; } -QString nameFromKABC( const QString &id ) /*const*/ +TQString nameFromKABC( const TQString &id ) /*const*/ { KABC::AddressBook* ab = KABCPersistence::self()->addressBook(); if ( ! id.isEmpty() && !id.contains(':') ) @@ -653,20 +653,20 @@ QString nameFromKABC( const QString &id ) /*const*/ } } // no kabc association, return null image - return QString::null; + return TQString::null; } -QString nameFromContact( Kopete::Contact *c) /*const*/ +TQString nameFromContact( Kopete::Contact *c) /*const*/ { if ( !c ) - return QString::null; + return TQString::null; - QString contactName; + TQString contactName; if ( c->hasProperty( Kopete::Global::Properties::self()->nickName().key() ) ) contactName = c->property( Global::Properties::self()->nickName()).value().toString(); //the replace is there to workaround the Bug 95444 - return contactName.isEmpty() ? c->contactId() : contactName.replace('\n',QString::fromUtf8("")); + return contactName.isEmpty() ? c->contactId() : contactName.replace('\n',TQString::fromUtf8("")); } KURL MetaContact::customPhoto() const @@ -685,12 +685,12 @@ void MetaContact::setPhoto( const KURL &url ) } } -QImage MetaContact::photo() const +TQImage MetaContact::photo() const { if( picture().image().width() > 96 && picture().image().height() > 96 ) { kdDebug( 14010 ) << k_funcinfo << "Resizing image from " << picture().image().width() << " x " << picture().image().height() << endl; - return picture().image().smoothScale(96,96,QImage::ScaleMin); + return picture().image().smoothScale(96,96,TQImage::ScaleMin); } else return picture().image(); @@ -710,33 +710,33 @@ Picture &MetaContact::picture() const return d->customPicture; } -QImage MetaContact::photoFromCustom() const +TQImage MetaContact::photoFromCustom() const { return d->customPicture.image(); } -QImage photoFromContact( Kopete::Contact *contact) /*const*/ +TQImage photoFromContact( Kopete::Contact *contact) /*const*/ { if ( contact == 0L ) - return QImage(); + return TQImage(); - QVariant photoProp; + TQVariant photoProp; if ( contact->hasProperty( Kopete::Global::Properties::self()->photo().key() ) ) photoProp = contact->property( Kopete::Global::Properties::self()->photo().key() ).value(); - QImage img; - if(photoProp.canCast( QVariant::Image )) + TQImage img; + if(photoProp.canCast( TQVariant::Image )) img=photoProp.toImage(); - else if(photoProp.canCast( QVariant::Pixmap )) + else if(photoProp.canCast( TQVariant::Pixmap )) img=photoProp.toPixmap().convertToImage(); else if(!photoProp.asString().isEmpty()) { - img=QPixmap( photoProp.toString() ).convertToImage(); + img=TQPixmap( photoProp.toString() ).convertToImage(); } return img; } -QImage photoFromKABC( const QString &id ) /*const*/ +TQImage photoFromKABC( const TQString &id ) /*const*/ { KABC::AddressBook* ab = KABCPersistence::self()->addressBook(); if ( ! id.isEmpty() && !id.contains(':') ) @@ -758,12 +758,12 @@ QImage photoFromKABC( const QString &id ) /*const*/ } else { - return QPixmap( pic.url() ).convertToImage(); + return TQPixmap( pic.url() ).convertToImage(); } } } // no kabc association, return null image - return QImage(); + return TQImage(); } Contact *MetaContact::displayNameSourceContact() const @@ -793,13 +793,13 @@ void MetaContact::setPhotoSourceContact( Contact *contact ) // Create a cache for the contact photo. if(d->photoSourceContact != 0L) { - QVariant photoProp; + TQVariant photoProp; if ( contact->hasProperty( Kopete::Global::Properties::self()->photo().key() ) ) photoProp = contact->property( Kopete::Global::Properties::self()->photo().key() ).value(); - if(photoProp.canCast( QVariant::Image )) + if(photoProp.canCast( TQVariant::Image )) d->contactPicture.setPicture(photoProp.toImage()); - else if(photoProp.canCast( QVariant::Pixmap )) + else if(photoProp.canCast( TQVariant::Pixmap )) d->contactPicture.setPicture(photoProp.toPixmap().convertToImage()); else if(!photoProp.asString().isEmpty()) { @@ -813,8 +813,8 @@ void MetaContact::setPhotoSourceContact( Contact *contact ) } } -void MetaContact::slotPropertyChanged( Contact* subcontact, const QString &key, - const QVariant &oldValue, const QVariant &newValue ) +void MetaContact::slotPropertyChanged( Contact* subcontact, const TQString &key, + const TQVariant &oldValue, const TQVariant &newValue ) { if ( displayNameSource() == SourceContact ) { @@ -932,7 +932,7 @@ void MetaContact::addToGroup( Group *to ) emit addedToGroup( this, to ); } -QPtrList<Group> MetaContact::groups() const +TQPtrList<Group> MetaContact::groups() const { return d->groups; } @@ -942,36 +942,36 @@ void MetaContact::slotContactDestroyed( Contact *contact ) removeContact(contact,true); } -const QDomElement MetaContact::toXML(bool minimal) +const TQDomElement MetaContact::toXML(bool minimal) { // This causes each Kopete::Protocol subclass to serialise its contacts' data into the metacontact's plugin data and address book data emit aboutToSave(this); - QDomDocument metaContact; - metaContact.appendChild( metaContact.createElement( QString::fromUtf8( "meta-contact" ) ) ); - metaContact.documentElement().setAttribute( QString::fromUtf8( "contactId" ), metaContactId() ); + TQDomDocument metaContact; + metaContact.appendChild( metaContact.createElement( TQString::fromUtf8( "meta-contact" ) ) ); + metaContact.documentElement().setAttribute( TQString::fromUtf8( "contactId" ), metaContactId() ); // the custom display name, used for the custom name source - QDomElement displayName = metaContact.createElement( QString::fromUtf8("display-name" ) ); + TQDomElement displayName = metaContact.createElement( TQString::fromUtf8("display-name" ) ); displayName.appendChild( metaContact.createTextNode( d->displayName ) ); metaContact.documentElement().appendChild( displayName ); - QDomElement photo = metaContact.createElement( QString::fromUtf8("photo" ) ); + TQDomElement photo = metaContact.createElement( TQString::fromUtf8("photo" ) ); KURL photoUrl = d->photoUrl; photo.appendChild( metaContact.createTextNode( photoUrl.url() ) ); metaContact.documentElement().appendChild( photo ); // Property sources - QDomElement propertySources = metaContact.createElement( QString::fromUtf8("property-sources" ) ); - QDomElement _nameSource = metaContact.createElement( QString::fromUtf8("name") ); - QDomElement _photoSource = metaContact.createElement( QString::fromUtf8("photo") ); + TQDomElement propertySources = metaContact.createElement( TQString::fromUtf8("property-sources" ) ); + TQDomElement _nameSource = metaContact.createElement( TQString::fromUtf8("name") ); + TQDomElement _photoSource = metaContact.createElement( TQString::fromUtf8("photo") ); // set the contact source for display name - _nameSource.setAttribute(QString::fromUtf8("source"), sourceToString(displayNameSource())); + _nameSource.setAttribute(TQString::fromUtf8("source"), sourceToString(displayNameSource())); // set contact source metadata if (displayNameSourceContact()) { - QDomElement contactNameSource = metaContact.createElement( QString::fromUtf8("contact-source") ); + TQDomElement contactNameSource = metaContact.createElement( TQString::fromUtf8("contact-source") ); contactNameSource.setAttribute( NSCID_ELEM, displayNameSourceContact()->contactId() ); contactNameSource.setAttribute( NSPID_ELEM, displayNameSourceContact()->protocol()->pluginId() ); contactNameSource.setAttribute( NSAID_ELEM, displayNameSourceContact()->account()->accountId() ); @@ -979,16 +979,16 @@ const QDomElement MetaContact::toXML(bool minimal) } // set the contact source for photo - _photoSource.setAttribute(QString::fromUtf8("source"), sourceToString(photoSource())); + _photoSource.setAttribute(TQString::fromUtf8("source"), sourceToString(photoSource())); if( !d->metaContactId.isEmpty() ) - photo.setAttribute( QString::fromUtf8("syncWithKABC") , QString::fromUtf8( d->photoSyncedWithKABC ? "true" : "false" ) ); + photo.setAttribute( TQString::fromUtf8("syncWithKABC") , TQString::fromUtf8( d->photoSyncedWithKABC ? "true" : "false" ) ); if (photoSourceContact()) { //kdDebug(14010) << k_funcinfo << "serializing photo source " << nameFromContact(photoSourceContact()) << endl; // set contact source metadata for photo - QDomElement contactPhotoSource = metaContact.createElement( QString::fromUtf8("contact-source") ); + TQDomElement contactPhotoSource = metaContact.createElement( TQString::fromUtf8("contact-source") ); contactPhotoSource.setAttribute( NSCID_ELEM, photoSourceContact()->contactId() ); contactPhotoSource.setAttribute( NSPID_ELEM, photoSourceContact()->protocol()->pluginId() ); contactPhotoSource.setAttribute( NSAID_ELEM, photoSourceContact()->account()->accountId() ); @@ -1006,31 +1006,31 @@ const QDomElement MetaContact::toXML(bool minimal) // Store groups if ( !d->groups.isEmpty() ) { - QDomElement groups = metaContact.createElement( QString::fromUtf8("groups") ); + TQDomElement groups = metaContact.createElement( TQString::fromUtf8("groups") ); Group *g; for ( g = d->groups.first(); g; g = d->groups.next() ) { - QDomElement group = metaContact.createElement( QString::fromUtf8("group") ); - group.setAttribute( QString::fromUtf8("id"), g->groupId() ); + TQDomElement group = metaContact.createElement( TQString::fromUtf8("group") ); + group.setAttribute( TQString::fromUtf8("id"), g->groupId() ); groups.appendChild( group ); } metaContact.documentElement().appendChild( groups ); } // Store other plugin data - QValueList<QDomElement> pluginData = Kopete::ContactListElement::toXML(); - for( QValueList<QDomElement>::Iterator it = pluginData.begin(); it != pluginData.end(); ++it ) + TQValueList<TQDomElement> pluginData = Kopete::ContactListElement::toXML(); + for( TQValueList<TQDomElement>::Iterator it = pluginData.begin(); it != pluginData.end(); ++it ) metaContact.documentElement().appendChild( metaContact.importNode( *it, true ) ); // Store custom notification data - QDomElement notifyData = NotifyDataObject::notifyDataToXML(); + TQDomElement notifyData = NotifyDataObject::notifyDataToXML(); if ( notifyData.hasChildNodes() ) metaContact.documentElement().appendChild( metaContact.importNode( notifyData, true ) ); } return metaContact.documentElement(); } -bool MetaContact::fromXML( const QDomElement& element ) +bool MetaContact::fromXML( const TQDomElement& element ) { if( !element.hasChildNodes() ) return false; @@ -1038,7 +1038,7 @@ bool MetaContact::fromXML( const QDomElement& element ) bool oldPhotoTracking = false; bool oldNameTracking = false; - QString strContactId = element.attribute( QString::fromUtf8("contactId") ); + TQString strContactId = element.attribute( TQString::fromUtf8("contactId") ); if( !strContactId.isEmpty() ) { d->metaContactId = strContactId; @@ -1046,11 +1046,11 @@ bool MetaContact::fromXML( const QDomElement& element ) slotUpdateAddressBookPicture(); } - QDomElement contactElement = element.firstChild().toElement(); + TQDomElement contactElement = element.firstChild().toElement(); while( !contactElement.isNull() ) { - if( contactElement.tagName() == QString::fromUtf8( "display-name" ) ) + if( contactElement.tagName() == TQString::fromUtf8( "display-name" ) ) { // custom display name, used for the custom name source // WTF, why were we not loading the metacontact if nickname was empty. @@ -1058,7 +1058,7 @@ bool MetaContact::fromXML( const QDomElement& element ) // return false; //the replace is there to workaround the Bug 95444 - d->displayName = contactElement.text().replace('\n',QString::fromUtf8("")); + d->displayName = contactElement.text().replace('\n',TQString::fromUtf8("")); if ( contactElement.hasAttribute(NSCID_ELEM) && contactElement.hasAttribute(NSPID_ELEM) && contactElement.hasAttribute(NSAID_ELEM)) { @@ -1073,12 +1073,12 @@ bool MetaContact::fromXML( const QDomElement& element ) // else // kdDebug(14010) << k_funcinfo << "no old name tracking" << endl; } - else if( contactElement.tagName() == QString::fromUtf8( "photo" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "photo" ) ) { // custom photo, used for custom photo source setPhoto( KURL(contactElement.text()) ); - d->photoSyncedWithKABC = (contactElement.attribute(QString::fromUtf8("syncWithKABC")) == QString::fromUtf8("1")) || (contactElement.attribute(QString::fromUtf8("syncWithKABC")) == QString::fromUtf8("true")); + d->photoSyncedWithKABC = (contactElement.attribute(TQString::fromUtf8("syncWithKABC")) == TQString::fromUtf8("1")) || (contactElement.attribute(TQString::fromUtf8("syncWithKABC")) == TQString::fromUtf8("true")); // retrieve deprecated data (now stored in property-sources) // save temporarely, we will find a Contact* with this later @@ -1093,23 +1093,23 @@ bool MetaContact::fromXML( const QDomElement& element ) // else // kdDebug(14010) << k_funcinfo << "no old photo tracking" << endl; } - else if( contactElement.tagName() == QString::fromUtf8( "property-sources" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "property-sources" ) ) { - QDomNode property = contactElement.firstChild(); + TQDomNode property = contactElement.firstChild(); while( !property.isNull() ) { - QDomElement propertyElement = property.toElement(); + TQDomElement propertyElement = property.toElement(); - if( propertyElement.tagName() == QString::fromUtf8( "name" ) ) + if( propertyElement.tagName() == TQString::fromUtf8( "name" ) ) { - QString source = propertyElement.attribute( QString::fromUtf8("source") ); + TQString source = propertyElement.attribute( TQString::fromUtf8("source") ); setDisplayNameSource(stringToSource(source)); // find contact sources now. - QDomNode propertyParam = propertyElement.firstChild(); + TQDomNode propertyParam = propertyElement.firstChild(); while( !propertyParam.isNull() ) { - QDomElement propertyParamElement = propertyParam.toElement(); - if( propertyParamElement.tagName() == QString::fromUtf8( "contact-source" ) ) + TQDomElement propertyParamElement = propertyParam.toElement(); + if( propertyParamElement.tagName() == TQString::fromUtf8( "contact-source" ) ) { d->nameSourceCID = propertyParamElement.attribute( NSCID_ELEM ); d->nameSourcePID = propertyParamElement.attribute( NSPID_ELEM ); @@ -1118,16 +1118,16 @@ bool MetaContact::fromXML( const QDomElement& element ) propertyParam = propertyParam.nextSibling(); } } - if( propertyElement.tagName() == QString::fromUtf8( "photo" ) ) + if( propertyElement.tagName() == TQString::fromUtf8( "photo" ) ) { - QString source = propertyElement.attribute( QString::fromUtf8("source") ); + TQString source = propertyElement.attribute( TQString::fromUtf8("source") ); setPhotoSource(stringToSource(source)); // find contact sources now. - QDomNode propertyParam = propertyElement.firstChild(); + TQDomNode propertyParam = propertyElement.firstChild(); while( !propertyParam.isNull() ) { - QDomElement propertyParamElement = propertyParam.toElement(); - if( propertyParamElement.tagName() == QString::fromUtf8( "contact-source" ) ) + TQDomElement propertyParamElement = propertyParam.toElement(); + if( propertyParamElement.tagName() == TQString::fromUtf8( "contact-source" ) ) { d->photoSourceCID = propertyParamElement.attribute( NSCID_ELEM ); d->photoSourcePID = propertyParamElement.attribute( NSPID_ELEM ); @@ -1139,39 +1139,39 @@ bool MetaContact::fromXML( const QDomElement& element ) property = property.nextSibling(); } } - else if( contactElement.tagName() == QString::fromUtf8( "groups" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "groups" ) ) { - QDomNode group = contactElement.firstChild(); + TQDomNode group = contactElement.firstChild(); while( !group.isNull() ) { - QDomElement groupElement = group.toElement(); + TQDomElement groupElement = group.toElement(); - if( groupElement.tagName() == QString::fromUtf8( "group" ) ) + if( groupElement.tagName() == TQString::fromUtf8( "group" ) ) { - QString strGroupId = groupElement.attribute( QString::fromUtf8("id") ); + TQString strGroupId = groupElement.attribute( TQString::fromUtf8("id") ); if( !strGroupId.isEmpty() ) addToGroup( Kopete::ContactList::self()->group( strGroupId.toUInt() ) ); else //kopete 0.6 contactlist addToGroup( Kopete::ContactList::self()->findGroup( groupElement.text() ) ); } - else if( groupElement.tagName() == QString::fromUtf8( "top-level" ) ) //kopete 0.6 contactlist + else if( groupElement.tagName() == TQString::fromUtf8( "top-level" ) ) //kopete 0.6 contactlist addToGroup( Kopete::Group::topLevel() ); group = group.nextSibling(); } } - else if( contactElement.tagName() == QString::fromUtf8( "address-book-field" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "address-book-field" ) ) { - QString app = contactElement.attribute( QString::fromUtf8( "app" ), QString::null ); - QString key = contactElement.attribute( QString::fromUtf8( "key" ), QString::null ); - QString val = contactElement.text(); + TQString app = contactElement.attribute( TQString::fromUtf8( "app" ), TQString::null ); + TQString key = contactElement.attribute( TQString::fromUtf8( "key" ), TQString::null ); + TQString val = contactElement.text(); d->addressBook[ app ][ key ] = val; } - else if( contactElement.tagName() == QString::fromUtf8( "custom-notifications" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "custom-notifications" ) ) { Kopete::NotifyDataObject::notifyDataFromXML( contactElement ); } - else //if( groupElement.tagName() == QString::fromUtf8( "plugin-data" ) || groupElement.tagName() == QString::fromUtf8("custom-icons" )) + else //if( groupElement.tagName() == TQString::fromUtf8( "plugin-data" ) || groupElement.tagName() == TQString::fromUtf8("custom-icons" )) { Kopete::ContactListElement::fromXML(contactElement); } @@ -1215,16 +1215,16 @@ bool MetaContact::fromXML( const QDomElement& element ) } // If a plugin is loaded, load data cached - connect( Kopete::PluginManager::self(), SIGNAL( pluginLoaded(Kopete::Plugin*) ), - this, SLOT( slotPluginLoaded(Kopete::Plugin*) ) ); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( pluginLoaded(Kopete::Plugin*) ), + this, TQT_SLOT( slotPluginLoaded(Kopete::Plugin*) ) ); // All plugins are already loaded, call manually the contact setting slot. if( Kopete::PluginManager::self()->isAllPluginsLoaded() ) slotAllPluginsLoaded(); else // When all plugins are loaded, set the source contact. - connect( Kopete::PluginManager::self(), SIGNAL( allPluginsLoaded() ), - this, SLOT( slotAllPluginsLoaded() ) ); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( allPluginsLoaded() ), + this, TQT_SLOT( slotAllPluginsLoaded() ) ); // track changes only works if ONE Contact is inside the MetaContact // if (d->contacts.count() > 1) // Does NOT work as intended @@ -1234,36 +1234,36 @@ bool MetaContact::fromXML( const QDomElement& element ) return true; } -QString MetaContact::sourceToString(PropertySource source) const +TQString MetaContact::sourceToString(PropertySource source) const { if ( source == SourceCustom ) - return QString::fromUtf8("custom"); + return TQString::fromUtf8("custom"); else if ( source == SourceKABC ) - return QString::fromUtf8("addressbook"); + return TQString::fromUtf8("addressbook"); else if ( source == SourceContact ) - return QString::fromUtf8("contact"); + return TQString::fromUtf8("contact"); else // recovery return sourceToString(SourceCustom); } -MetaContact::PropertySource MetaContact::stringToSource(const QString &name) const +MetaContact::PropertySource MetaContact::stringToSource(const TQString &name) const { - if ( name == QString::fromUtf8("custom") ) + if ( name == TQString::fromUtf8("custom") ) return SourceCustom; - else if ( name == QString::fromUtf8("addressbook") ) + else if ( name == TQString::fromUtf8("addressbook") ) return SourceKABC; - else if ( name == QString::fromUtf8("contact") ) + else if ( name == TQString::fromUtf8("contact") ) return SourceContact; else // recovery return SourceCustom; } -QString MetaContact::addressBookField( Kopete::Plugin * /* p */, const QString &app, const QString & key ) const +TQString MetaContact::addressBookField( Kopete::Plugin * /* p */, const TQString &app, const TQString & key ) const { return d->addressBook[ app ][ key ]; } -void Kopete::MetaContact::setAddressBookField( Kopete::Plugin * /* p */, const QString &app, const QString &key, const QString &value ) +void Kopete::MetaContact::setAddressBookField( Kopete::Plugin * /* p */, const TQString &app, const TQString &key, const TQString &value ) { d->addressBook[ app ][ key ] = value; } @@ -1273,7 +1273,7 @@ void MetaContact::slotPluginLoaded( Plugin *p ) if( !p ) return; - QMap<QString, QString> map= pluginData( p ); + TQMap<TQString, TQString> map= pluginData( p ); if(!map.isEmpty()) { p->deserialize(this,map); @@ -1290,7 +1290,7 @@ void MetaContact::slotAllPluginsLoaded() void MetaContact::slotUpdateAddressBookPicture() { KABC::AddressBook* ab = KABCPersistence::self()->addressBook(); - QString id = metaContactId(); + TQString id = metaContactId(); if ( !id.isEmpty() && !id.contains(':') ) { KABC::Addressee theAddressee = ab->findByUid(id); @@ -1332,19 +1332,19 @@ void MetaContact::setTemporary( bool isTemporary, Group *group ) moveToGroup(temporaryGroup, group ? group : Group::topLevel()); } -QString MetaContact::metaContactId() const +TQString MetaContact::metaContactId() const { if(d->metaContactId.isEmpty()) { Contact *c=d->contacts.first(); if(!c) - return QString::null; - return c->protocol()->pluginId()+QString::fromUtf8(":")+c->account()->accountId()+QString::fromUtf8(":") + c->contactId() ; + return TQString::null; + return c->protocol()->pluginId()+TQString::fromUtf8(":")+c->account()->accountId()+TQString::fromUtf8(":") + c->contactId() ; } return d->metaContactId; } -void MetaContact::setMetaContactId( const QString& newMetaContactId ) +void MetaContact::setMetaContactId( const TQString& newMetaContactId ) { if(newMetaContactId == d->metaContactId) return; @@ -1374,7 +1374,7 @@ void MetaContact::setPhotoSyncedWithKABC(bool b) d->photoSyncedWithKABC=b; if(b) { - QVariant newValue; + TQVariant newValue; switch( photoSource() ) { @@ -1402,10 +1402,10 @@ void MetaContact::setPhotoSyncedWithKABC(bool b) if ( !theAddressee.isEmpty() ) { - QImage img; - if(newValue.canCast( QVariant::Image )) + TQImage img; + if(newValue.canCast( TQVariant::Image )) img=newValue.toImage(); - else if(newValue.canCast( QVariant::Pixmap )) + else if(newValue.canCast( TQVariant::Pixmap )) img=newValue.toPixmap().convertToImage(); if(img.isNull()) @@ -1415,7 +1415,7 @@ void MetaContact::setPhotoSyncedWithKABC(bool b) // to sync with kabc but try first to embed the // photo data in the kabc addressee, because it could // be remote resource and the local url makes no sense - QImage fallBackImage = QImage(newValue.toString()); + TQImage fallBackImage = TQImage(newValue.toString()); if(fallBackImage.isNull()) theAddressee.setPhoto(newValue.toString()); else @@ -1431,7 +1431,7 @@ void MetaContact::setPhotoSyncedWithKABC(bool b) } } -QPtrList<Contact> MetaContact::contacts() const +TQPtrList<Contact> MetaContact::contacts() const { return d->contacts; } diff --git a/kopete/libkopete/kopetemetacontact.h b/kopete/libkopete/kopetemetacontact.h index 3bdaa33a..07be08ef 100644 --- a/kopete/libkopete/kopetemetacontact.h +++ b/kopete/libkopete/kopetemetacontact.h @@ -22,8 +22,8 @@ #define kopetemetacontact_h__ #include "kopetecontactlistelement.h" -#include <qptrlist.h> -#include <qstring.h> +#include <tqptrlist.h> +#include <tqstring.h> #include <kdemacros.h> #include "kopete_export.h" @@ -58,15 +58,15 @@ class KOPETE_EXPORT MetaContact : public ContactListElement, public NotifyDataOb { Q_OBJECT - Q_PROPERTY( QString displayName READ displayName WRITE setDisplayName ) - Q_PROPERTY( QString statusString READ statusString ) - Q_PROPERTY( QString statusIcon READ statusIcon ) + Q_PROPERTY( TQString displayName READ displayName WRITE setDisplayName ) + Q_PROPERTY( TQString statusString READ statusString ) + Q_PROPERTY( TQString statusIcon READ statusIcon ) Q_PROPERTY( bool isOnline READ isOnline ) Q_PROPERTY( bool isReachable READ isReachable ) Q_PROPERTY( bool isTemporary READ isTemporary ) Q_PROPERTY( bool canAcceptFiles READ canAcceptFiles ) //Q_PROPERTY( ulong idleTime READ idleTime ) - Q_PROPERTY( QString metaContactId READ metaContactId WRITE setMetaContactId ) + Q_PROPERTY( TQString metaContactId READ metaContactId WRITE setMetaContactId ) Q_PROPERTY( bool photoSyncedWithKABC READ isPhotoSyncedWithKABC WRITE setPhotoSyncedWithKABC ) public: @@ -95,30 +95,30 @@ public: * Every metacontact has a unique id, set by when creating the contact, or reading the contactlist * TODO: make it real */ - QString metaContactId() const; + TQString metaContactId() const; /** * @brief Add or change the link to a KDE addressbook (KABC) Addressee. * FIXME: Use with care. You could create 1 to many relationships with the current implementation */ - void setMetaContactId( const QString& newMetaContactId ); + void setMetaContactId( const TQString& newMetaContactId ); /** * @brief Retrieve the list of contacts that are part of the meta contact */ - QPtrList<Contact> contacts() const; + TQPtrList<Contact> contacts() const; /** * @brief The groups the contact is stored in */ - QPtrList<Group> groups() const; + TQPtrList<Group> groups() const; /** * Find the Contact to a given contact. If contact * is not found, a null pointer is returned. * if @p protocolId or @p accountId are null, it is searched over all protocols/accounts */ - Contact *findContact( const QString &protocolId, const QString &accountId, const QString &contactId ); + Contact *findContact( const TQString &protocolId, const TQString &accountId, const TQString &contactId ); /** * @brief Set the source of metacontact displayName @@ -174,7 +174,7 @@ public: * * This displayName is obtained from the source set with @ref setDisplayNameSource */ - QString displayName() const; + TQString displayName() const; /** * @brief the photo showed in the contactlist window @@ -185,7 +185,7 @@ public: * * This photo is obtained from the source set with @ref setPhotoSource */ - QImage photo() const; + TQImage photo() const; /** * Return the correct Kopete::Picture object depending of the metacontact photo source. @@ -206,7 +206,7 @@ public: * @see displayName() * @see displayNameSource() */ - void setDisplayName( const QString &name ); + void setDisplayName( const TQString &name ); /** * @brief Returns the custom display name @@ -214,7 +214,7 @@ public: * @see displayName() * @see displayNameSource() */ - QString customDisplayName() const; + TQString customDisplayName() const; /** * @brief Returns the custom display photo @@ -305,7 +305,7 @@ public: * @brief The name of the icon associated with the contact's status * @todo improve with OnlineStatus */ - QString statusIcon() const; + TQString statusIcon() const; /** * @brief The status string of the contact @@ -313,7 +313,7 @@ public: * @see @ref status() * @todo improve with OnlineStatus */ - QString statusString() const; + TQString statusString() const; /** * Returns whether this contact can be reached online for at least one @@ -355,7 +355,7 @@ public: * @param minimal When true, it doesn't save the * plugins, groups and notification data. False by default. */ - const QDomElement toXML(bool minimal = false); + const TQDomElement toXML(bool minimal = false); /** * Creates a metacontact from XML @@ -364,7 +364,7 @@ public: * discarded. * @internal */ - bool fromXML( const QDomElement& cnode ); + bool fromXML( const TQDomElement& cnode ); /** * Get or set a field for the KDE address book backend. Fields not @@ -385,7 +385,7 @@ public: * Probably it requires once more some rewrites to get it working * properly :( - Martijn */ - QString addressBookField( Plugin *p, const QString &app, const QString &key ) const; + TQString addressBookField( Plugin *p, const TQString &app, const TQString &key ) const; /** * @brief set an address book field @@ -396,7 +396,7 @@ public: * @param key The name of the address book field to set * @param value The value of the address book field to set */ - void setAddressBookField( Plugin *p, const QString &app, const QString &key, const QString &value ); + void setAddressBookField( Plugin *p, const TQString &app, const TQString &key, const TQString &value ); public slots: @@ -414,7 +414,7 @@ public slots: * file size (such as over a socket) * */ - void sendFile( const KURL &sourceURL, const QString &altFileName = QString::null, + void sendFile( const KURL &sourceURL, const TQString &altFileName = TQString::null, unsigned long fileSize = 0L ); signals: /** @@ -507,7 +507,7 @@ signals: /** * @brief The meta contact's display name changed */ - void displayNameChanged( const QString &oldName, const QString &newName ); + void displayNameChanged( const TQString &oldName, const TQString &newName ); /** * @brief The meta contact's photo changed @@ -563,7 +563,7 @@ private slots: /** * One of the child contact's property changed */ - void slotPropertyChanged( Kopete::Contact *contact, const QString &key, const QVariant &oldValue, const QVariant &newValue ); + void slotPropertyChanged( Kopete::Contact *contact, const TQString &key, const TQVariant &oldValue, const TQVariant &newValue ); /** * A child contact was deleted, remove it from the list, if it's still @@ -587,24 +587,24 @@ private slots: void slotUpdateAddressBookPicture(); protected: - //QImage photoFromContact( Kopete::Contact *c) const; - //QImage photoFromKABC( const QString &id ) const; - QImage photoFromCustom() const; - //QString nameFromContact( Kopete::Contact *c) const; - //QString nameFromKABC( const QString &id ) const; - - QString sourceToString(PropertySource source) const; - PropertySource stringToSource(const QString &name) const; + //TQImage photoFromContact( Kopete::Contact *c) const; + //TQImage photoFromKABC( const TQString &id ) const; + TQImage photoFromCustom() const; + //TQString nameFromContact( Kopete::Contact *c) const; + //TQString nameFromKABC( const TQString &id ) const; + + TQString sourceToString(PropertySource source) const; + PropertySource stringToSource(const TQString &name) const; private: class Private; Private *d; }; // util functions shared with metacontact property dialog -KOPETE_EXPORT QImage photoFromContact( Kopete::Contact *c) /*const*/; -KOPETE_EXPORT QImage photoFromKABC( const QString &id ) /*const*/; -KOPETE_EXPORT QString nameFromContact( Kopete::Contact *c) /*const*/; -KOPETE_EXPORT QString nameFromKABC( const QString &id ) /*const*/; +KOPETE_EXPORT TQImage photoFromContact( Kopete::Contact *c) /*const*/; +KOPETE_EXPORT TQImage photoFromKABC( const TQString &id ) /*const*/; +KOPETE_EXPORT TQString nameFromContact( Kopete::Contact *c) /*const*/; +KOPETE_EXPORT TQString nameFromKABC( const TQString &id ) /*const*/; } //END namespace Kopete diff --git a/kopete/libkopete/kopetemimesourcefactory.cpp b/kopete/libkopete/kopetemimesourcefactory.cpp index a34d8aee..f21d875a 100644 --- a/kopete/libkopete/kopetemimesourcefactory.cpp +++ b/kopete/libkopete/kopetemimesourcefactory.cpp @@ -26,9 +26,9 @@ #include <kdebug.h> #include <kiconloader.h> -#include <qdragobject.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqdragobject.h> +#include <tqstring.h> +#include <tqstringlist.h> namespace Kopete { @@ -38,7 +38,7 @@ class MimeSourceFactory::Private public: Private() : lastMimeSource( 0 ) {} ~Private() { delete lastMimeSource; } - mutable QMimeSource *lastMimeSource; + mutable TQMimeSource *lastMimeSource; }; MimeSourceFactory::MimeSourceFactory() @@ -51,17 +51,17 @@ MimeSourceFactory::~MimeSourceFactory() delete d; } -const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const +const TQMimeSource *MimeSourceFactory::data( const TQString &abs_name ) const { // flag used to signal something went wrong when creating a mimesource bool completed = false; // extract and decode arguments - QStringList parts = QStringList::split( QChar(':'), abs_name ); - for ( QStringList::Iterator it = parts.begin(); it != parts.end(); ++it ) + TQStringList parts = TQStringList::split( TQChar(':'), abs_name ); + for ( TQStringList::Iterator it = parts.begin(); it != parts.end(); ++it ) *it = KURL::decode_string( *it ); - QPixmap img; - if ( parts[0] == QString::fromLatin1("kopete-contact-icon") ) + TQPixmap img; + if ( parts[0] == TQString::fromLatin1("kopete-contact-icon") ) { if ( parts.size() >= 4 ) { @@ -84,7 +84,7 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-contact-icon: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == QString::fromLatin1("kopete-account-icon") ) + if ( parts[0] == TQString::fromLatin1("kopete-account-icon") ) { if ( parts.size() >= 3 ) { @@ -101,7 +101,7 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-account-icon: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == QString::fromLatin1("kopete-metacontact-icon") ) + if ( parts[0] == TQString::fromLatin1("kopete-metacontact-icon") ) { if ( parts.size() >= 2 ) { @@ -116,16 +116,16 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-metacontact-icon: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == QString::fromLatin1("kopete-metacontact-photo") ) + if ( parts[0] == TQString::fromLatin1("kopete-metacontact-photo") ) { if ( parts.size() >= 2 ) { MetaContact *mc = ContactList::self()->metaContact( parts[1] ); if ( mc ) { - QImage photo = mc->photo(); + TQImage photo = mc->photo(); delete d->lastMimeSource; - d->lastMimeSource = new QImageDrag( photo ); + d->lastMimeSource = new TQImageDrag( photo ); return d->lastMimeSource; } } @@ -133,7 +133,7 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-metacontact-photo: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == QString::fromLatin1("kopete-onlinestatus-icon") ) + if ( parts[0] == TQString::fromLatin1("kopete-onlinestatus-icon") ) { if ( parts.size() >= 2 ) { @@ -164,7 +164,7 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const delete d->lastMimeSource; if ( completed ) - d->lastMimeSource = new QImageDrag( img.convertToImage() ); + d->lastMimeSource = new TQImageDrag( img.convertToImage() ); else d->lastMimeSource = 0; return d->lastMimeSource; diff --git a/kopete/libkopete/kopetemimesourcefactory.h b/kopete/libkopete/kopetemimesourcefactory.h index 76c2f188..e9df5994 100644 --- a/kopete/libkopete/kopetemimesourcefactory.h +++ b/kopete/libkopete/kopetemimesourcefactory.h @@ -18,7 +18,7 @@ #ifndef KOPETEMIMESOURCEFACTORY_H #define KOPETEMIMESOURCEFACTORY_H -#include <qmime.h> +#include <tqmime.h> #include "kopete_export.h" @@ -42,7 +42,7 @@ public: MimeSourceFactory(); ~MimeSourceFactory(); - const QMimeSource *data( const QString &abs_name ) const; + const TQMimeSource *data( const TQString &abs_name ) const; private: class Private; diff --git a/kopete/libkopete/kopetemimetypehandler.cpp b/kopete/libkopete/kopetemimetypehandler.cpp index 04c4939b..5f336a6b 100644 --- a/kopete/libkopete/kopetemimetypehandler.cpp +++ b/kopete/libkopete/kopetemimetypehandler.cpp @@ -19,7 +19,7 @@ #include "kopeteglobal.h" #include "kopeteuiglobal.h" -#include <qwidget.h> +#include <tqwidget.h> #include <kapplication.h> #include <kdebug.h> @@ -36,8 +36,8 @@ namespace Kopete namespace { - static QDict<Kopete::MimeTypeHandler> g_mimeHandlers; - static QDict<Kopete::MimeTypeHandler> g_protocolHandlers; + static TQDict<Kopete::MimeTypeHandler> g_mimeHandlers; + static TQDict<Kopete::MimeTypeHandler> g_protocolHandlers; } class MimeTypeHandler::Private @@ -45,8 +45,8 @@ class MimeTypeHandler::Private public: Private( bool carf ) : canAcceptRemoteFiles( carf ) {} bool canAcceptRemoteFiles; - QStringList mimeTypes; - QStringList protocols; + TQStringList mimeTypes; + TQStringList protocols; }; MimeTypeHandler::MimeTypeHandler( bool canAcceptRemoteFiles ) @@ -56,16 +56,16 @@ MimeTypeHandler::MimeTypeHandler( bool canAcceptRemoteFiles ) MimeTypeHandler::~MimeTypeHandler() { - for( QStringList::iterator it = d->mimeTypes.begin(); it != d->mimeTypes.end(); ++it ) + for( TQStringList::iterator it = d->mimeTypes.begin(); it != d->mimeTypes.end(); ++it ) g_mimeHandlers.remove( *it ); - for( QStringList::iterator it = d->protocols.begin(); it != d->protocols.end(); ++it ) + for( TQStringList::iterator it = d->protocols.begin(); it != d->protocols.end(); ++it ) g_protocolHandlers.remove( *it ); delete d; } -bool MimeTypeHandler::registerAsMimeHandler( const QString &mimeType ) +bool MimeTypeHandler::registerAsMimeHandler( const TQString &mimeType ) { if( g_mimeHandlers[ mimeType ] ) { @@ -80,7 +80,7 @@ bool MimeTypeHandler::registerAsMimeHandler( const QString &mimeType ) return true; } -bool MimeTypeHandler::registerAsProtocolHandler( const QString &protocol ) +bool MimeTypeHandler::registerAsProtocolHandler( const TQString &protocol ) { if( g_protocolHandlers[ protocol ] ) { @@ -95,12 +95,12 @@ bool MimeTypeHandler::registerAsProtocolHandler( const QString &protocol ) return true; } -const QStringList MimeTypeHandler::mimeTypes() const +const TQStringList MimeTypeHandler::mimeTypes() const { return d->mimeTypes; } -const QStringList MimeTypeHandler::protocols() const +const TQStringList MimeTypeHandler::protocols() const { return d->protocols; } @@ -115,7 +115,7 @@ bool MimeTypeHandler::dispatchURL( const KURL &url ) if( url.isEmpty() ) return false; - QString type = KMimeType::findByURL( url )->name(); + TQString type = KMimeType::findByURL( url )->name(); MimeTypeHandler *mimeHandler = g_mimeHandlers[ type ]; @@ -140,14 +140,14 @@ bool MimeTypeHandler::dispatchURL( const KURL &url ) } } -bool MimeTypeHandler::dispatchToHandler( const KURL &url, const QString &mimeType, MimeTypeHandler *handler ) +bool MimeTypeHandler::dispatchToHandler( const KURL &url, const TQString &mimeType, MimeTypeHandler *handler ) { if( !handler->canAcceptRemoteFiles() ) { - QString file; + TQString file; if( !KIO::NetAccess::download( url, file, Kopete::UI::Global::mainWidget() ) ) { - QString sorryText; + TQString sorryText; if ( url.isLocalFile() ) { sorryText = i18n( "Unable to find the file %1." ); @@ -190,7 +190,7 @@ void MimeTypeHandler::handleURL( const KURL &url ) const Q_UNUSED( url ); } -void MimeTypeHandler::handleURL( const QString &mimeType, const KURL &url ) const +void MimeTypeHandler::handleURL( const TQString &mimeType, const KURL &url ) const { Q_UNUSED( mimeType ); Q_UNUSED( url ); @@ -200,12 +200,12 @@ void MimeTypeHandler::handleURL( const QString &mimeType, const KURL &url ) cons EmoticonMimeTypeHandler::EmoticonMimeTypeHandler() : MimeTypeHandler( false ) { - registerAsMimeHandler( QString::fromLatin1("application/x-kopete-emoticons") ); - registerAsMimeHandler( QString::fromLatin1("application/x-tgz") ); - registerAsMimeHandler( QString::fromLatin1("application/x-tbz") ); + registerAsMimeHandler( TQString::fromLatin1("application/x-kopete-emoticons") ); + registerAsMimeHandler( TQString::fromLatin1("application/x-tgz") ); + registerAsMimeHandler( TQString::fromLatin1("application/x-tbz") ); } -void EmoticonMimeTypeHandler::handleURL( const QString &, const KURL &url ) const +void EmoticonMimeTypeHandler::handleURL( const TQString &, const KURL &url ) const { Global::installEmoticonTheme( url.path() ); } diff --git a/kopete/libkopete/kopetemimetypehandler.h b/kopete/libkopete/kopetemimetypehandler.h index 8f3235f0..206bcffa 100644 --- a/kopete/libkopete/kopetemimetypehandler.h +++ b/kopete/libkopete/kopetemimetypehandler.h @@ -51,12 +51,12 @@ public: /** * Returns a list of mime types this object is registered to handle */ - const QStringList mimeTypes() const; + const TQStringList mimeTypes() const; /** * Returns a list of protocols this object is registered to handle */ - const QStringList protocols() const; + const TQStringList protocols() const; /** * Returns true if this handler can accept remote files direcltly; @@ -78,7 +78,7 @@ public: * @param mimeType The mime type of the URL * @param url The url to handle */ - virtual void handleURL( const QString &mimeType, const KURL &url ) const; + virtual void handleURL( const TQString &mimeType, const KURL &url ) const; protected: /** @@ -87,7 +87,7 @@ protected: * @return true if registration succeeded, false if another handler is * already set for this mime type. */ - bool registerAsMimeHandler( const QString &mimeType ); + bool registerAsMimeHandler( const TQString &mimeType ); /** * Register this object as the handler of type @p protocol. @@ -95,7 +95,7 @@ protected: * @return true if registration succeeded, false if another handler is * already set for this protocol. */ - bool registerAsProtocolHandler( const QString &protocol ); + bool registerAsProtocolHandler( const TQString &protocol ); private: /** @@ -108,7 +108,7 @@ private: * * @return true if a handler was able to process the URL, false otherwise */ - static bool dispatchToHandler( const KURL &url, const QString &mimeType, MimeTypeHandler *handler ); + static bool dispatchToHandler( const KURL &url, const TQString &mimeType, MimeTypeHandler *handler ); class Private; Private *d; @@ -122,9 +122,9 @@ class KOPETE_EXPORT EmoticonMimeTypeHandler : public MimeTypeHandler public: EmoticonMimeTypeHandler(); - const QStringList mimeTypes() const; + const TQStringList mimeTypes() const; - void handleURL( const QString &mimeType, const KURL &url ) const; + void handleURL( const TQString &mimeType, const KURL &url ) const; }; } // Kopete diff --git a/kopete/libkopete/kopetenotifydataobject.cpp b/kopete/libkopete/kopetenotifydataobject.cpp index 9a0de544..7ba7ab80 100644 --- a/kopete/libkopete/kopetenotifydataobject.cpp +++ b/kopete/libkopete/kopetenotifydataobject.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include <qdom.h> +#include <tqdom.h> #include <kdebug.h> #include "kopetenotifydataobject.h" #include "kopetenotifyevent.h" @@ -23,7 +23,7 @@ class Kopete::NotifyDataObject::Private { public: - QDict<Kopete::NotifyEvent> events; + TQDict<Kopete::NotifyEvent> events; }; Kopete::NotifyDataObject::NotifyDataObject() @@ -37,40 +37,40 @@ Kopete::NotifyDataObject::~NotifyDataObject() delete d; } -Kopete::NotifyEvent * Kopete::NotifyDataObject::notifyEvent( const QString &event ) const +Kopete::NotifyEvent * Kopete::NotifyDataObject::notifyEvent( const TQString &event ) const { Kopete::NotifyEvent *evt = d->events.find( event ); return evt; } -void Kopete::NotifyDataObject::setNotifyEvent( const QString& event, Kopete::NotifyEvent *notifyEvent ) +void Kopete::NotifyDataObject::setNotifyEvent( const TQString& event, Kopete::NotifyEvent *notifyEvent ) { d->events.replace( event, notifyEvent ); } -bool Kopete::NotifyDataObject::removeNotifyEvent( const QString &event ) +bool Kopete::NotifyDataObject::removeNotifyEvent( const TQString &event ) { return d->events.remove( event ); } -QDomElement Kopete::NotifyDataObject::notifyDataToXML() +TQDomElement Kopete::NotifyDataObject::notifyDataToXML() { - QDomDocument notify; - QDomElement notifications; + TQDomDocument notify; + TQDomElement notifications; if ( !d->events.isEmpty() ) { //<custom-notifications> - notifications = notify.createElement( QString::fromLatin1( "custom-notifications" ) ); - QDictIterator<Kopete::NotifyEvent> it( d->events ); + notifications = notify.createElement( TQString::fromLatin1( "custom-notifications" ) ); + TQDictIterator<Kopete::NotifyEvent> it( d->events ); for ( ; it.current(); ++it ) { //<event name="..." suppress-common="true|false"> - QDomElement event = notify.createElement( QString::fromLatin1( "event" ) ); - event.setAttribute( QString::fromLatin1( "name" ), it.currentKey() ); - event.setAttribute( QString::fromLatin1( "suppress-common" ), QString::fromLatin1( it.current()->suppressCommon() ? "true" : "false" ) ); - QValueList<QDomElement> presentations = it.current()->toXML(); + TQDomElement event = notify.createElement( TQString::fromLatin1( "event" ) ); + event.setAttribute( TQString::fromLatin1( "name" ), it.currentKey() ); + event.setAttribute( TQString::fromLatin1( "suppress-common" ), TQString::fromLatin1( it.current()->suppressCommon() ? "true" : "false" ) ); + TQValueList<TQDomElement> presentations = it.current()->toXML(); //<sound-notification enabled="true|false" src="..." single-shot=""> - for ( QValueList<QDomElement>::Iterator it = presentations.begin(); it != presentations.end(); ++it ) + for ( TQValueList<TQDomElement>::Iterator it = presentations.begin(); it != presentations.end(); ++it ) event.appendChild( notify.importNode( *it, true ) ); notifications.appendChild( event ); } @@ -78,59 +78,59 @@ QDomElement Kopete::NotifyDataObject::notifyDataToXML() return notifications; } -bool Kopete::NotifyDataObject::notifyDataFromXML( const QDomElement& element ) +bool Kopete::NotifyDataObject::notifyDataFromXML( const TQDomElement& element ) { - if ( element.tagName() == QString::fromLatin1( "custom-notifications" ) ) + if ( element.tagName() == TQString::fromLatin1( "custom-notifications" ) ) { - QDomNode field = element.firstChild(); + TQDomNode field = element.firstChild(); while( !field.isNull() ) { //read an event - QDomElement fieldElement = field.toElement(); - if ( fieldElement.tagName() == QString::fromLatin1( "event" ) ) + TQDomElement fieldElement = field.toElement(); + if ( fieldElement.tagName() == TQString::fromLatin1( "event" ) ) { // get its attributes - QString name = fieldElement.attribute( QString::fromLatin1( "name" ), QString::null ); - QString suppress = fieldElement.attribute( QString::fromLatin1( "suppress-common" ), QString::null ); - Kopete::NotifyEvent *evt = new Kopete::NotifyEvent( suppress == QString::fromLatin1( "true" ) ); + TQString name = fieldElement.attribute( TQString::fromLatin1( "name" ), TQString::null ); + TQString suppress = fieldElement.attribute( TQString::fromLatin1( "suppress-common" ), TQString::null ); + Kopete::NotifyEvent *evt = new Kopete::NotifyEvent( suppress == TQString::fromLatin1( "true" ) ); // get its children - QDomNode child = fieldElement.firstChild(); + TQDomNode child = fieldElement.firstChild(); while( !child.isNull() ) { - QDomElement childElement = child.toElement(); - if ( childElement.tagName() == QString::fromLatin1( "sound-presentation" ) ) + TQDomElement childElement = child.toElement(); + if ( childElement.tagName() == TQString::fromLatin1( "sound-presentation" ) ) { // kdDebug(14010) << k_funcinfo << "read: sound" << endl; - QString src = childElement.attribute( QString::fromLatin1( "src" ) ); - QString enabled = childElement.attribute( QString::fromLatin1( "enabled" ) ); - QString singleShot = childElement.attribute( QString::fromLatin1( "single-shot" ) ); + TQString src = childElement.attribute( TQString::fromLatin1( "src" ) ); + TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) ); + TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) ); Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Sound, src, - ( singleShot == QString::fromLatin1( "true" ) ), - ( enabled == QString::fromLatin1( "true" ) ) ); + ( singleShot == TQString::fromLatin1( "true" ) ), + ( enabled == TQString::fromLatin1( "true" ) ) ); evt->setPresentation( Kopete::EventPresentation::Sound, pres ); // kdDebug(14010) << k_funcinfo << "after sound: " << evt->toString() << endl; } - if ( childElement.tagName() == QString::fromLatin1( "message-presentation" ) ) + if ( childElement.tagName() == TQString::fromLatin1( "message-presentation" ) ) { // kdDebug(14010) << k_funcinfo << "read: msg" << endl; - QString src = childElement.attribute( QString::fromLatin1( "src" ) ); - QString enabled = childElement.attribute( QString::fromLatin1( "enabled" ) ); - QString singleShot = childElement.attribute( QString::fromLatin1( "single-shot" ) ); + TQString src = childElement.attribute( TQString::fromLatin1( "src" ) ); + TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) ); + TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) ); Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Message, src, - ( singleShot == QString::fromLatin1( "true" ) ), - ( enabled == QString::fromLatin1( "true" ) ) ); + ( singleShot == TQString::fromLatin1( "true" ) ), + ( enabled == TQString::fromLatin1( "true" ) ) ); evt->setPresentation( Kopete::EventPresentation::Message, pres ); // kdDebug(14010) << k_funcinfo << "after message: " << evt->toString() << endl; } - if ( childElement.tagName() == QString::fromLatin1( "chat-presentation" ) ) + if ( childElement.tagName() == TQString::fromLatin1( "chat-presentation" ) ) { // kdDebug(14010) << k_funcinfo << "read: chat" << endl; - QString enabled = childElement.attribute( QString::fromLatin1( "enabled" ) ); - QString singleShot = childElement.attribute( QString::fromLatin1( "single-shot" ) ); - Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Chat, QString::null, - ( singleShot == QString::fromLatin1( "true" ) ), - ( enabled == QString::fromLatin1( "true" ) ) ); + TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) ); + TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) ); + Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Chat, TQString::null, + ( singleShot == TQString::fromLatin1( "true" ) ), + ( enabled == TQString::fromLatin1( "true" ) ) ); evt->setPresentation( Kopete::EventPresentation::Chat, pres ); // kdDebug(14010) << k_funcinfo << "after chat: " << evt->toString() << endl; } diff --git a/kopete/libkopete/kopetenotifydataobject.h b/kopete/libkopete/kopetenotifydataobject.h index db253c60..298d542f 100644 --- a/kopete/libkopete/kopetenotifydataobject.h +++ b/kopete/libkopete/kopetenotifydataobject.h @@ -17,9 +17,9 @@ #ifndef KOPETENOTIFYDATAOBJECT_H #define KOPETENOTIFYDATAOBJECT_H -#include <qdict.h> -#include <qstring.h> -#include <qvaluelist.h> +#include <tqdict.h> +#include <tqstring.h> +#include <tqvaluelist.h> #include "kopete_export.h" @@ -40,14 +40,14 @@ class KOPETE_EXPORT NotifyDataObject NotifyDataObject(); ~NotifyDataObject(); // Notify events - NotifyEvent *notifyEvent( const QString &event ) const; - void setNotifyEvent( const QString &event, + NotifyEvent *notifyEvent( const TQString &event ) const; + void setNotifyEvent( const TQString &event, NotifyEvent *notifyEvent ); - bool removeNotifyEvent( const QString &event ); + bool removeNotifyEvent( const TQString &event ); // Serialization protected: - QDomElement notifyDataToXML(); - bool notifyDataFromXML( const QDomElement& element ); + TQDomElement notifyDataToXML(); + bool notifyDataFromXML( const TQDomElement& element ); private: class Private; NotifyDataObject::Private* d; diff --git a/kopete/libkopete/kopetenotifyevent.cpp b/kopete/libkopete/kopetenotifyevent.cpp index 28c4ab15..4bd9fad7 100644 --- a/kopete/libkopete/kopetenotifyevent.cpp +++ b/kopete/libkopete/kopetenotifyevent.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include <qdom.h> +#include <tqdom.h> #include <kdebug.h> #include "kopetenotifyevent.h" #include "kopeteeventpresentation.h" @@ -138,39 +138,39 @@ void Kopete::NotifyEvent::setSuppressCommon( const bool suppress ) m_suppressCommon = suppress; } -const QValueList<QDomElement> Kopete::NotifyEvent::toXML() const +const TQValueList<TQDomElement> Kopete::NotifyEvent::toXML() const { - QDomDocument eventData; - QValueList<QDomElement> eventNodes; + TQDomDocument eventData; + TQValueList<TQDomElement> eventNodes; if ( m_sound && !m_sound->content().isEmpty() ) { - QDomElement soundElmt = eventData.createElement( QString::fromLatin1( "sound-presentation" ) ); - soundElmt.setAttribute( QString::fromLatin1( "enabled" ), QString::fromLatin1( m_sound->enabled() ? "true" : "false" ) ); - soundElmt.setAttribute( QString::fromLatin1( "single-shot" ), QString::fromLatin1( m_sound->singleShot() ? "true" : "false" ) ); - soundElmt.setAttribute( QString::fromLatin1( "src" ), m_sound->content() ); + TQDomElement soundElmt = eventData.createElement( TQString::fromLatin1( "sound-presentation" ) ); + soundElmt.setAttribute( TQString::fromLatin1( "enabled" ), TQString::fromLatin1( m_sound->enabled() ? "true" : "false" ) ); + soundElmt.setAttribute( TQString::fromLatin1( "single-shot" ), TQString::fromLatin1( m_sound->singleShot() ? "true" : "false" ) ); + soundElmt.setAttribute( TQString::fromLatin1( "src" ), m_sound->content() ); eventNodes.append( soundElmt ); } if ( m_message && !m_message->content().isEmpty() ) { - QDomElement msgElmt = eventData.createElement( QString::fromLatin1( "message-presentation" ) ); - msgElmt.setAttribute( QString::fromLatin1( "enabled" ), QString::fromLatin1( m_message->enabled() ? "true" : "false" ) ); - msgElmt.setAttribute( QString::fromLatin1( "single-shot" ), QString::fromLatin1( m_message->singleShot() ? "true" : "false" ) ); - msgElmt.setAttribute( QString::fromLatin1( "src" ), m_message->content() ); + TQDomElement msgElmt = eventData.createElement( TQString::fromLatin1( "message-presentation" ) ); + msgElmt.setAttribute( TQString::fromLatin1( "enabled" ), TQString::fromLatin1( m_message->enabled() ? "true" : "false" ) ); + msgElmt.setAttribute( TQString::fromLatin1( "single-shot" ), TQString::fromLatin1( m_message->singleShot() ? "true" : "false" ) ); + msgElmt.setAttribute( TQString::fromLatin1( "src" ), m_message->content() ); eventNodes.append( msgElmt ); } if ( m_chat && m_chat->enabled() ) { - QDomElement chatElmt = eventData.createElement( QString::fromLatin1( "chat-presentation" ) ); - chatElmt.setAttribute( QString::fromLatin1( "enabled" ), QString::fromLatin1( "true" ) ); - chatElmt.setAttribute( QString::fromLatin1( "single-shot" ), QString::fromLatin1( m_chat->singleShot() ? "true" : "false" ) ); + TQDomElement chatElmt = eventData.createElement( TQString::fromLatin1( "chat-presentation" ) ); + chatElmt.setAttribute( TQString::fromLatin1( "enabled" ), TQString::fromLatin1( "true" ) ); + chatElmt.setAttribute( TQString::fromLatin1( "single-shot" ), TQString::fromLatin1( m_chat->singleShot() ? "true" : "false" ) ); eventNodes.append( chatElmt ); } return eventNodes; } -QString Kopete::NotifyEvent::toString() +TQString Kopete::NotifyEvent::toString() { - QString stringRep = QString::fromLatin1("Event; Suppress common=%1").arg( QString::fromLatin1( suppressCommon() ? "true" : "false" ) ); + TQString stringRep = TQString::fromLatin1("Event; Suppress common=%1").arg( TQString::fromLatin1( suppressCommon() ? "true" : "false" ) ); if ( m_sound) stringRep += m_sound->toString(); if ( m_message) diff --git a/kopete/libkopete/kopetenotifyevent.h b/kopete/libkopete/kopetenotifyevent.h index b7acd3c1..85d03c66 100644 --- a/kopete/libkopete/kopetenotifyevent.h +++ b/kopete/libkopete/kopetenotifyevent.h @@ -18,8 +18,8 @@ #ifndef KOPETENOTIFYEVENT_H #define KOPETENOTIFYEVENT_H -#include <qstring.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqvaluelist.h> #include "kopeteeventpresentation.h" #include "kopete_export.h" @@ -45,10 +45,10 @@ public: bool firePresentation( const EventPresentation::PresentationType type ); void setSuppressCommon( bool suppress ); - const QValueList<QDomElement> toXML() const; - QString toString(); + const TQValueList<TQDomElement> toXML() const; + TQString toString(); private: - QString m_event; + TQString m_event; EventPresentation *m_sound; EventPresentation *m_message; EventPresentation *m_chat; diff --git a/kopete/libkopete/kopeteonlinestatus.cpp b/kopete/libkopete/kopeteonlinestatus.cpp index 8872f28b..da9bb5d5 100644 --- a/kopete/libkopete/kopeteonlinestatus.cpp +++ b/kopete/libkopete/kopeteonlinestatus.cpp @@ -43,13 +43,13 @@ public: unsigned weight; Protocol *protocol; unsigned internalStatus; - QStringList overlayIcons; - QString description; + TQStringList overlayIcons; + TQString description; unsigned refCount; - QString protocolIcon() const + TQString protocolIcon() const { - return protocol ? protocol->pluginIcon() : QString::fromLatin1( "unknown" ); + return protocol ? protocol->pluginIcon() : TQString::fromLatin1( "unknown" ); } }; @@ -71,7 +71,7 @@ static struct { OnlineStatus::Away, "Away" } }; OnlineStatus::OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, - unsigned internalStatus, const QStringList &overlayIcons, const QString &description ) + unsigned internalStatus, const TQStringList &overlayIcons, const TQString &description ) : d( new Private ) { d->status = status; @@ -83,7 +83,7 @@ OnlineStatus::OnlineStatus( StatusType status, unsigned weight, Protocol *protoc } OnlineStatus::OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, unsigned internalStatus, - const QStringList &overlayIcons, const QString &description, const QString &caption, unsigned int categories , unsigned int options ) + const TQStringList &overlayIcons, const TQString &description, const TQString &caption, unsigned int categories , unsigned int options ) : d( new Private ) { d->status = status; @@ -124,7 +124,7 @@ OnlineStatus::OnlineStatus( StatusType status ) case Unknown: default: d->description = i18n( "Unknown" ); - d->overlayIcons = QString::fromLatin1("status_unknown"); + d->overlayIcons = TQString::fromLatin1("status_unknown"); break; } @@ -137,7 +137,7 @@ OnlineStatus::OnlineStatus() d->internalStatus = 0; d->weight = 0; d->protocol = 0L; - d->overlayIcons = QString::fromLatin1( "status_unknown" ); + d->overlayIcons = TQString::fromLatin1( "status_unknown" ); } OnlineStatus::OnlineStatus( const OnlineStatus &other ) @@ -204,12 +204,12 @@ unsigned OnlineStatus::weight() const return d->weight; } -QStringList OnlineStatus::overlayIcons() const +TQStringList OnlineStatus::overlayIcons() const { return d->overlayIcons; } -QString OnlineStatus::description() const +TQString OnlineStatus::description() const { return d->description; } @@ -226,16 +226,16 @@ bool OnlineStatus::isDefinitelyOnline() const return true; } -QPixmap OnlineStatus::iconFor( const Contact *contact, int size ) const +TQPixmap OnlineStatus::iconFor( const Contact *contact, int size ) const { return OnlineStatusManager::self()->cacheLookupByMimeSource( mimeSourceFor( contact, size ) ); } -QString OnlineStatus::mimeSourceFor( const Contact *contact, int size ) const +TQString OnlineStatus::mimeSourceFor( const Contact *contact, int size ) const { // figure out what icon we should use for this contact - QString iconName = contact->icon(); + TQString iconName = contact->icon(); if ( iconName.isNull() ) iconName = contact->account()->customIcon(); if ( iconName.isNull() ) @@ -245,31 +245,31 @@ QString OnlineStatus::mimeSourceFor( const Contact *contact, int size ) const return mimeSource( iconName, size, contact->account()->color(),contact->idleTime() >= 10*60 ); } -QPixmap OnlineStatus::iconFor( const Account *account, int size ) const +TQPixmap OnlineStatus::iconFor( const Account *account, int size ) const { return OnlineStatusManager::self()->cacheLookupByMimeSource( mimeSourceFor( account, size ) ); } -QString OnlineStatus::mimeSourceFor( const Account *account, int size ) const +TQString OnlineStatus::mimeSourceFor( const Account *account, int size ) const { - QString iconName = account->customIcon(); + TQString iconName = account->customIcon(); if ( iconName.isNull() ) iconName = d->protocolIcon(); return mimeSource( iconName, size, account->color(), false ); } -QPixmap OnlineStatus::iconFor( const QString &mimeSource ) const +TQPixmap OnlineStatus::iconFor( const TQString &mimeSource ) const { return OnlineStatusManager::self()->cacheLookupByMimeSource( mimeSource ); } -QPixmap OnlineStatus::protocolIcon() const +TQPixmap OnlineStatus::protocolIcon() const { - return OnlineStatusManager::self()->cacheLookupByObject( *this, d->protocolIcon() , 16, QColor() ); + return OnlineStatusManager::self()->cacheLookupByObject( *this, d->protocolIcon() , 16, TQColor() ); } -QString OnlineStatus::mimeSource( const QString& icon, int size, QColor color, bool idle) const +TQString OnlineStatus::mimeSource( const TQString& icon, int size, TQColor color, bool idle) const { // make sure the item is in the cache OnlineStatusManager::self()->cacheLookupByObject( *this, icon, size, color, idle ); @@ -277,23 +277,23 @@ QString OnlineStatus::mimeSource( const QString& icon, int size, QColor color, b return OnlineStatusManager::self()->fingerprint( *this, icon, size, color, idle ); } -QString OnlineStatus::statusTypeToString(OnlineStatus::StatusType statusType) +TQString OnlineStatus::statusTypeToString(OnlineStatus::StatusType statusType) { const int size = sizeof(statusNames) / sizeof(statusNames[0]); for (int i=0; i< size; i++) if (statusNames[i].status == statusType) - return QString::fromLatin1(statusNames[i].name); + return TQString::fromLatin1(statusNames[i].name); - return QString::fromLatin1(statusNames[0].name); // Unknown + return TQString::fromLatin1(statusNames[0].name); // Unknown } -OnlineStatus::StatusType OnlineStatus::statusStringToType(QString& string) +OnlineStatus::StatusType OnlineStatus::statusStringToType(TQString& string) { int size = sizeof(statusNames) / sizeof(statusNames[0]); for (int i=0; i< size; i++) - if (QString::fromLatin1(statusNames[i].name) == string) + if (TQString::fromLatin1(statusNames[i].name) == string) return statusNames[i].status; return OnlineStatus::Unknown; diff --git a/kopete/libkopete/kopeteonlinestatus.h b/kopete/libkopete/kopeteonlinestatus.h index 2eed5164..8136b1da 100644 --- a/kopete/libkopete/kopeteonlinestatus.h +++ b/kopete/libkopete/kopeteonlinestatus.h @@ -26,7 +26,7 @@ #include <kdemacros.h> #include <ksharedptr.h> -#include <qobject.h> +#include <tqobject.h> class QString; class QPixmap; @@ -169,13 +169,13 @@ public: * by libkopete and should be unique per protocol. * @param overlayIcons is a list of QStrings which are the name of status * icons to be used by the KDE icon loader. (Statuses which don't have icons - * to overlay like Online and Offline should use QString::null as icon + * to overlay like Online and Offline should use TQString::null as icon * name ). NOTE if the string is a movie ( *.mng ) it must be the first string in the list. * TODO: KDE4 sort out movies and overlay icons. * @param description is a description in e.g. tooltips. */ OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, - unsigned internalStatus, const QStringList &overlayIcons, const QString &description ); + unsigned internalStatus, const TQStringList &overlayIcons, const TQString &description ); /** * Constructor. @@ -203,15 +203,15 @@ public: * by libkopete and should be unique per protocol. * @param overlayIcon is a string returning the name of the status icon to be * used by the KDE icon loader. (Status whiwh doesn't have icon to overlay like - * Online and Offline should use QString::null as icon string) + * Online and Offline should use TQString::null as icon string) * @param description is a description in e.g. tooltips. * @param caption is the text of the action in the menu * @param categories the categories this online status is in * @param options the options of this online status * @see Kopete::OnlineStatusManager::registerOnlineStatus for more info about the categories and options parameters */ - OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, unsigned internalStatus, const QStringList &overlayIcon, - const QString &description, const QString& caption, unsigned int categories=0x0 , unsigned int options=0x0 ); + OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, unsigned internalStatus, const TQStringList &overlayIcon, + const TQString &description, const TQString& caption, unsigned int categories=0x0 , unsigned int options=0x0 ); /** @@ -254,12 +254,12 @@ public: /** * \brief Return the list of overlay icons */ - QStringList overlayIcons() const; + TQStringList overlayIcons() const; /** * \brief Return the description */ - QString description() const; + TQString description() const; /** * \brief Return the protocol this applies to @@ -283,7 +283,7 @@ public: * @param contact is the contact the icon should apply to. * @param size is the size we the icon should be scaled to - 16 is default and so costs nothing */ - QPixmap iconFor( const Contact *contact, int size = 16 ) const; + TQPixmap iconFor( const Contact *contact, int size = 16 ) const; /** * \brief Return the mime source for a status icon generated for the given Contact @@ -297,7 +297,7 @@ public: * @param contact is the contact the icon should apply to. * @param size is the size we the icon should be scaled to - 16 is default and so costs nothing */ - QString mimeSourceFor( const Contact *contact, int size = 16 ) const; + TQString mimeSourceFor( const Contact *contact, int size = 16 ) const; /** * \brief Return a status icon generated for the given Account @@ -307,10 +307,10 @@ public: * over the base icon. * A cache is employed to reduce CPU and memory usage. * @param account is the account the icon should apply to. - * The account's color causes tinting, if it's plain QColor(), no tinting takes place. + * The account's color causes tinting, if it's plain TQColor(), no tinting takes place. * @param size is the size we the icon should be scaled to - 16 is default and so costs nothing */ - QPixmap iconFor( const Account *account, int size = 16 ) const; + TQPixmap iconFor( const Account *account, int size = 16 ) const; /** * \brief Return the mime source for a status icon generated for the given Account @@ -322,10 +322,10 @@ public: * so no assumptions should be made about long-time availability * of the referenced data. * @param account is the account the icon should apply to. - * The account's color causes tinting, if it's plain QColor(), no tinting takes place. + * The account's color causes tinting, if it's plain TQColor(), no tinting takes place. * @param size is the size we the icon should be scaled to - 16 is default and so costs nothing */ - QString mimeSourceFor( const Account *account, int size = 16 ) const; + TQString mimeSourceFor( const Account *account, int size = 16 ) const; /** * \brief Return a previously rendered status icon for a mime source key @@ -336,14 +336,14 @@ public: * requesting the key (thus rendering the icon) and trying to access the * icon by key, an invalid pixmap will be returned. */ - QPixmap iconFor( const QString &mimeSource ) const; + TQPixmap iconFor( const TQString &mimeSource ) const; /** * \brief Returns the status icon for the protocol. * * A cache is employed to reduce CPU and memory usage. */ - QPixmap protocolIcon() const; + TQPixmap protocolIcon() const; /** * Assignment operator @@ -381,20 +381,20 @@ public: bool operator<( const OnlineStatus &other ) const; /** - * \brief returns a QString from a StatusType + * \brief returns a TQString from a StatusType * * Static method to convert a Kopete::OnlineStatus::StatusType to a string to avoid * many issues when saving StatusType to disk */ - static QString statusTypeToString(OnlineStatus::StatusType status); + static TQString statusTypeToString(OnlineStatus::StatusType status); /** * \brief returns a StatusType from a QString * - * Static method to convert a QString representing a StatusType to a StatusType to avoid + * Static method to convert a TQString representing a StatusType to a StatusType to avoid * many issues when saving StatusType to disk */ - static OnlineStatus::StatusType statusStringToType(QString& string); + static OnlineStatus::StatusType statusStringToType(TQString& string); @@ -403,7 +403,7 @@ private: class Private; KSharedPtr<Private> d; - QString mimeSource( const QString& icon, int size, QColor color, bool idle) const; + TQString mimeSource( const TQString& icon, int size, TQColor color, bool idle) const; }; diff --git a/kopete/libkopete/kopeteonlinestatusmanager.cpp b/kopete/libkopete/kopeteonlinestatusmanager.cpp index 61c41b83..67364e6b 100644 --- a/kopete/libkopete/kopeteonlinestatusmanager.cpp +++ b/kopete/libkopete/kopeteonlinestatusmanager.cpp @@ -41,16 +41,16 @@ class OnlineStatusManager::Private struct RegisteredStatusStruct { - QString caption; + TQString caption; unsigned int categories; unsigned int options; }; - typedef QMap< OnlineStatus , RegisteredStatusStruct > ProtocolMap ; + typedef TQMap< OnlineStatus , RegisteredStatusStruct > ProtocolMap ; - QPixmap *nullPixmap; - QMap<Protocol* , ProtocolMap > registeredStatus; - QDict< QPixmap > iconCache; + TQPixmap *nullPixmap; + TQMap<Protocol* , ProtocolMap > registeredStatus; + TQDict< TQPixmap > iconCache; }; OnlineStatusManager *OnlineStatusManager::s_self=0L; @@ -68,7 +68,7 @@ OnlineStatusManager::OnlineStatusManager() { d->iconCache.setAutoDelete( true ); d->nullPixmap = new QPixmap; - connect( kapp, SIGNAL( iconChanged(int) ), this, SLOT( slotIconsChanged() ) ); + connect( kapp, TQT_SIGNAL( iconChanged(int) ), this, TQT_SLOT( slotIconsChanged() ) ); } OnlineStatusManager::~OnlineStatusManager() @@ -83,7 +83,7 @@ void OnlineStatusManager::slotIconsChanged() emit iconsChanged(); } -void OnlineStatusManager::registerOnlineStatus( const OnlineStatus &status, const QString & caption, unsigned int categories, unsigned int options) +void OnlineStatusManager::registerOnlineStatus( const OnlineStatus &status, const TQString & caption, unsigned int categories, unsigned int options) { Private::RegisteredStatusStruct s; s.caption=caption; @@ -133,25 +133,25 @@ OnlineStatus OnlineStatusManager::onlineStatus(Protocol * protocol, Categories c return OnlineStatus(); } -QString OnlineStatusManager::fingerprint( const OnlineStatus &statusFor, const QString& icon, int size, QColor color, bool idle) +TQString OnlineStatusManager::fingerprint( const OnlineStatus &statusFor, const TQString& icon, int size, TQColor color, bool idle) { // create a 'fingerprint' to use as a hash key // fingerprint consists of description/icon name/color/overlay name/size/idle state - return QString::fromLatin1("%1/%2/%3/%4/%5/%6") + return TQString::fromLatin1("%1/%2/%3/%4/%5/%6") .arg( statusFor.description() ) .arg( icon ) .arg( color.name() ) - .arg( statusFor.overlayIcons().join( QString::fromLatin1( "," ) ) ) + .arg( statusFor.overlayIcons().join( TQString::fromLatin1( "," ) ) ) .arg( size ) .arg( idle ? 'i' : 'a' ); } -QPixmap OnlineStatusManager::cacheLookupByObject( const OnlineStatus &statusFor, const QString& icon, int size, QColor color, bool idle) +TQPixmap OnlineStatusManager::cacheLookupByObject( const OnlineStatus &statusFor, const TQString& icon, int size, TQColor color, bool idle) { - QString fp = fingerprint( statusFor, icon, size, color, idle ); + TQString fp = fingerprint( statusFor, icon, size, color, idle ); // look it up in the cache - QPixmap *theIcon= d->iconCache.find( fp ); + TQPixmap *theIcon= d->iconCache.find( fp ); if ( !theIcon ) { // cache miss @@ -162,10 +162,10 @@ QPixmap OnlineStatusManager::cacheLookupByObject( const OnlineStatus &statusFor, return *theIcon; } -QPixmap OnlineStatusManager::cacheLookupByMimeSource( const QString &mimeSource ) +TQPixmap OnlineStatusManager::cacheLookupByMimeSource( const TQString &mimeSource ) { // look it up in the cache - const QPixmap *theIcon= d->iconCache.find( mimeSource ); + const TQPixmap *theIcon= d->iconCache.find( mimeSource ); if ( !theIcon ) { // need to return an invalid pixmap @@ -176,7 +176,7 @@ QPixmap OnlineStatusManager::cacheLookupByMimeSource( const QString &mimeSource // This code was forked from the broken KImageEffect::blendOnLower, but it's // been so heavily fixed and rearranged it's hard to recognise that now. -static void blendOnLower( const QImage &upper_, QImage &lower, const QPoint &offset ) +static void blendOnLower( const TQImage &upper_, TQImage &lower, const TQPoint &offset ) { if ( upper_.width() <= 0 || upper_.height() <= 0 ) return; @@ -187,7 +187,7 @@ static void blendOnLower( const QImage &upper_, QImage &lower, const QPoint &off if ( offset.y() < 0 || offset.y() >= lower.height() ) return; - QImage upper = upper_; + TQImage upper = upper_; if ( upper.depth() != 32 ) upper = upper.convertDepth( 32 ); if ( lower.depth() != 32 ) @@ -223,12 +223,12 @@ static void blendOnLower( const QImage &upper_, QImage &lower, const QPoint &off } // Get bounding box of image via alpha channel -static QRect getBoundingBox( const QImage& image ) +static TQRect getBoundingBox( const TQImage& image ) { const int width = image.width(); const int height = image.height(); if ( width <= 0 || height <= 0 ) - return QRect(); + return TQRect(); // scan image from left to right and top to bottom // to get upper left corner of bounding box @@ -267,39 +267,39 @@ static QRect getBoundingBox( const QImage& image ) } } } - return QRect( x1, y1, std::max( 0, x2-x1+1 ), std::max( 0, y2-y1+1 ) ); + return TQRect( x1, y1, std::max( 0, x2-x1+1 ), std::max( 0, y2-y1+1 ) ); } // Get offset for upperImage to blend it in the i%4-th corner of lowerImage: // bottom right, bottom left, top left, top right -static QPoint getOffsetForCorner( const QImage& upperImage, const QImage& lowerImage, const int i ) +static TQPoint getOffsetForCorner( const TQImage& upperImage, const TQImage& lowerImage, const int i ) { const int dX = lowerImage.width() - upperImage.width(); const int dY = lowerImage.height() - upperImage.height(); const int corner = i % 4; - QPoint offset; + TQPoint offset; switch( corner ) { case 0: // bottom right - offset = QPoint( dX, dY ); + offset = TQPoint( dX, dY ); break; case 1: // bottom left - offset = QPoint( 0, dY ); + offset = TQPoint( 0, dY ); break; case 2: // top left - offset = QPoint( 0, 0 ); + offset = TQPoint( 0, 0 ); break; case 3: // top right - offset = QPoint( dX, 0 ); + offset = TQPoint( dX, 0 ); break; } return offset; } -QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const QString& baseIcon, int size, QColor color, bool idle) const +TQPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const TQString& baseIcon, int size, TQColor color, bool idle) const { // create an icon suiting the status from the base icon // use reasonable defaults if not provided or protocol not set @@ -307,7 +307,7 @@ QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const Q if ( baseIcon == statusFor.overlayIcons().first() ) kdWarning( 14010 ) << "Base and overlay icons are the same - icon effects will not be visible." << endl; - QPixmap* basis = new QPixmap( SmallIcon( baseIcon ) ); + TQPixmap* basis = new TQPixmap( SmallIcon( baseIcon ) ); // Colorize if ( color.isValid() ) @@ -317,19 +317,19 @@ QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const Q // that to be colored in this case. if ( statusFor.internalStatus() == Kopete::OnlineStatus::AccountOffline || statusFor.status() == Kopete::OnlineStatus::Offline ) { - *basis = KIconEffect().apply( *basis, KIconEffect::ToGray , 0.85, QColor() , false ); + *basis = KIconEffect().apply( *basis, KIconEffect::ToGray , 0.85, TQColor() , false ); } //composite the iconOverlay for this status and the supplied baseIcon - QStringList overlays = statusFor.overlayIcons(); + TQStringList overlays = statusFor.overlayIcons(); if ( !( overlays.isEmpty() ) ) // otherwise leave the basis as-is { KIconLoader *loader = KGlobal::instance()->iconLoader(); int i = 0; - for( QStringList::iterator it = overlays.begin(), end = overlays.end(); it != end; ++it ) + for( TQStringList::iterator it = overlays.begin(), end = overlays.end(); it != end; ++it ) { - QPixmap overlay = loader->loadIcon(*it, KIcon::Small, 0 , + TQPixmap overlay = loader->loadIcon(*it, KIcon::Small, 0 , KIcon::DefaultState, 0L, /*canReturnNull=*/ true ); if ( !overlay.isNull() ) @@ -337,10 +337,10 @@ QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const Q // we want to preserve the alpha channels of both basis and overlay. // there's no way to do this in Qt. In fact, there's no way to do this // in KDE since KImageEffect is so badly broken. - QImage basisImage = basis->convertToImage(); - QImage overlayImage = overlay.convertToImage(); - QPoint offset; - if ( (*it).endsWith( QString::fromLatin1( "_overlay" ) ) ) + TQImage basisImage = basis->convertToImage(); + TQImage overlayImage = overlay.convertToImage(); + TQPoint offset; + if ( (*it).endsWith( TQString::fromLatin1( "_overlay" ) ) ) { // it is possible to have more than one overlay icon // to avoid overlapping we place them in different corners @@ -357,8 +357,8 @@ QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const Q // no need to scale if the icon is already of the required size (assuming height == width!) if ( basis->width() != size ) { - QImage scaledImg = basis->convertToImage().smoothScale( size, size ); - *basis = QPixmap( scaledImg ); + TQImage scaledImg = basis->convertToImage().smoothScale( size, size ); + *basis = TQPixmap( scaledImg ); } // if idle, apply effects @@ -379,27 +379,27 @@ void OnlineStatusManager::createAccountStatusActions( Account *account , KAction continue; OnlineStatus status=it.key(); - QString caption=it.data().caption; + TQString caption=it.data().caption; KAction *action; // Any existing actions owned by the account are reused by recovering them // from the parent's child list. // The description of the onlinestatus is used as the qobject name // This is safe as long as OnlineStatus are immutable - QCString actionName = status.description().ascii(); + TQCString actionName = status.description().ascii(); if ( !( action = static_cast<KAction*>( account->child( actionName ) ) ) ) { if(options & OnlineStatusManager::HasAwayMessage) { action = new AwayAction( status, caption, status.iconFor(account), 0, account, - SLOT( setOnlineStatus( const Kopete::OnlineStatus&, const QString& ) ), + TQT_SLOT( setOnlineStatus( const Kopete::OnlineStatus&, const TQString& ) ), account, actionName ); } else { action=new OnlineStatusAction( status, caption, status.iconFor(account) , account, actionName ); - connect(action,SIGNAL(activated(const Kopete::OnlineStatus&)) , - account, SLOT(setOnlineStatus(const Kopete::OnlineStatus&))); + connect(action,TQT_SIGNAL(activated(const Kopete::OnlineStatus&)) , + account, TQT_SLOT(setOnlineStatus(const Kopete::OnlineStatus&))); } } @@ -416,10 +416,10 @@ void OnlineStatusManager::createAccountStatusActions( Account *account , KAction } -OnlineStatusAction::OnlineStatusAction( const OnlineStatus& status, const QString &text, const QIconSet &pix, QObject *parent, const char *name) +OnlineStatusAction::OnlineStatusAction( const OnlineStatus& status, const TQString &text, const TQIconSet &pix, TQObject *parent, const char *name) : KAction( text, pix, KShortcut() , parent, name) , m_status(status) { - connect(this,SIGNAL(activated()),this,SLOT(slotActivated())); + connect(this,TQT_SIGNAL(activated()),this,TQT_SLOT(slotActivated())); } void OnlineStatusAction::slotActivated() diff --git a/kopete/libkopete/kopeteonlinestatusmanager.h b/kopete/libkopete/kopeteonlinestatusmanager.h index d3369403..926ef3fc 100644 --- a/kopete/libkopete/kopeteonlinestatusmanager.h +++ b/kopete/libkopete/kopeteonlinestatusmanager.h @@ -18,7 +18,7 @@ #ifndef kopeteonlinestatusmanager_h__ #define kopeteonlinestatusmanager_h__ -#include <qobject.h> +#include <tqobject.h> #include "kopeteonlinestatus.h" #include "kaction.h" @@ -102,11 +102,11 @@ public: * @param categories A bitflag of @ref Categories * @param options is a bitflag of @ref Options */ - void registerOnlineStatus(const OnlineStatus& status, const QString &caption, unsigned int categories=0x00 , unsigned int options=0x0); + void registerOnlineStatus(const OnlineStatus& status, const TQString &caption, unsigned int categories=0x00 , unsigned int options=0x0); /** * insert "setStatus" actions from the given account to the specified actionMenu. - * (actions have that menu as parent QObject) + * (actions have that menu as parent TQObject) * they are connected to the Account::setOnlineStatus signal * * Items are stored by status height. @@ -125,10 +125,10 @@ public: private: friend class OnlineStatus; - QPixmap cacheLookupByObject( const OnlineStatus &statusFor, const QString& icon, int size, QColor color, bool idle = false); - QPixmap cacheLookupByMimeSource( const QString &mimeSource ); - QString fingerprint( const OnlineStatus &statusFor, const QString& icon, int size, QColor color, bool idle = false); - QPixmap* renderIcon( const OnlineStatus &statusFor, const QString& baseicon, int size, QColor color, bool idle = false) const; + TQPixmap cacheLookupByObject( const OnlineStatus &statusFor, const TQString& icon, int size, TQColor color, bool idle = false); + TQPixmap cacheLookupByMimeSource( const TQString &mimeSource ); + TQString fingerprint( const OnlineStatus &statusFor, const TQString& icon, int size, TQColor color, bool idle = false); + TQPixmap* renderIcon( const OnlineStatus &statusFor, const TQString& baseicon, int size, TQColor color, bool idle = false) const; signals: void iconsChanged(); @@ -152,7 +152,7 @@ class OnlineStatusAction : public KAction { Q_OBJECT public: - OnlineStatusAction ( const OnlineStatus& status, const QString &text, const QIconSet &pix, QObject *parent=0, const char *name=0); + OnlineStatusAction ( const OnlineStatus& status, const TQString &text, const TQIconSet &pix, TQObject *parent=0, const char *name=0); signals: void activated( const Kopete::OnlineStatus& status ); private slots: diff --git a/kopete/libkopete/kopetepassword.cpp b/kopete/libkopete/kopetepassword.cpp index f0b788a9..5edc1b27 100644 --- a/kopete/libkopete/kopetepassword.cpp +++ b/kopete/libkopete/kopetepassword.cpp @@ -21,10 +21,10 @@ #include <kwallet.h> -#include <qapplication.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqapplication.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> #include <kactivelabel.h> #include <kapplication.h> @@ -40,7 +40,7 @@ class Kopete::Password::Private { public: - Private( const QString &group, uint maxLen, bool blanksAllowed ) + Private( const TQString &group, uint maxLen, bool blanksAllowed ) : refCount( 1 ), configGroup( group ), remembered( false ), maximumLength( maxLen ), isWrong( false ), allowBlankPassword( blanksAllowed ) { @@ -58,11 +58,11 @@ public: /** Reference count */ int refCount; /** Group to use for KConfig and KWallet */ - const QString configGroup; + const TQString configGroup; /** Is the password being remembered? */ bool remembered; - /** The current password in the KConfig file, or QString::null if no password there */ - QString passwordFromKConfig; + /** The current password in the KConfig file, or TQString::null if no password there */ + TQString passwordFromKConfig; /** The maximum length allowed for this password, or -1 if there is no limit */ uint maximumLength; /** Is the current password known to be wrong? */ @@ -70,7 +70,7 @@ public: /** Are we allowed to have blank passwords? */ bool allowBlankPassword; /** The cached password */ - QString cachedValue; + TQString cachedValue; }; /** @@ -81,8 +81,8 @@ public: class KopetePasswordRequest : public KopetePasswordRequestBase { public: - KopetePasswordRequest( QObject *owner, Kopete::Password &pass ) - : QObject( owner ), mPassword( pass ), mWallet( 0 ) + KopetePasswordRequest( TQObject *owner, Kopete::Password &pass ) + : TQObject( owner ), mPassword( pass ), mWallet( 0 ) { } @@ -92,7 +92,7 @@ public: void begin() { kdDebug( 14010 ) << k_funcinfo << endl; - Kopete::WalletManager::self()->openWallet( this, SLOT( walletReceived( KWallet::Wallet* ) ) ); + Kopete::WalletManager::self()->openWallet( this, TQT_SLOT( walletReceived( KWallet::Wallet* ) ) ); } void walletReceived( KWallet::Wallet *wallet ) @@ -123,16 +123,16 @@ protected: class KopetePasswordGetRequest : public KopetePasswordRequest { public: - KopetePasswordGetRequest( QObject *owner, Kopete::Password &pass ) + KopetePasswordGetRequest( TQObject *owner, Kopete::Password &pass ) : KopetePasswordRequest( owner, pass ) { } - QString grabPassword() + TQString grabPassword() { // Before trying to read from the wallet, check if the config file holds a password. // If so, remove it from the config and set it through KWallet instead. - QString pwd; + TQString pwd; if ( mPassword.d->remembered && !mPassword.d->passwordFromKConfig.isNull() ) { pwd = mPassword.d->passwordFromKConfig; @@ -146,10 +146,10 @@ public: if ( mPassword.d->remembered && !mPassword.d->passwordFromKConfig.isNull() ) return mPassword.d->passwordFromKConfig; - return QString::null; + return TQString::null; } - void finished( const QString &result ) + void finished( const TQString &result ) { mPassword.d->cachedValue = result; emit requestFinished( result ); @@ -160,14 +160,14 @@ public: class KopetePasswordGetRequestPrompt : public KopetePasswordGetRequest { public: - KopetePasswordGetRequestPrompt( QObject *owner, Kopete::Password &pass, const QPixmap &image, const QString &prompt, Kopete::Password::PasswordSource source ) + KopetePasswordGetRequestPrompt( TQObject *owner, Kopete::Password &pass, const TQPixmap &image, const TQString &prompt, Kopete::Password::PasswordSource source ) : KopetePasswordGetRequest( owner, pass ), mImage( image ), mPrompt( prompt ), mSource( source ), mView( 0 ) { } void processRequest() { - QString result = grabPassword(); + TQString result = grabPassword(); if ( mSource == Kopete::Password::FromUser || result.isNull() ) doPasswordDialog(); else @@ -198,15 +198,15 @@ public: mView->adjustSize(); passwdDialog->adjustSize(); - connect( passwdDialog, SIGNAL( okClicked() ), SLOT( slotOkPressed() ) ); - connect( passwdDialog, SIGNAL( cancelClicked() ), SLOT( slotCancelPressed() ) ); - connect( this, SIGNAL( destroyed() ), passwdDialog, SLOT( deleteLater() ) ); + connect( passwdDialog, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotOkPressed() ) ); + connect( passwdDialog, TQT_SIGNAL( cancelClicked() ), TQT_SLOT( slotCancelPressed() ) ); + connect( this, TQT_SIGNAL( destroyed() ), passwdDialog, TQT_SLOT( deleteLater() ) ); passwdDialog->show(); } void slotOkPressed() { - QString result = QString::fromLocal8Bit( mView->m_password->password() ); + TQString result = TQString::fromLocal8Bit( mView->m_password->password() ); if ( mView->m_save_passwd->isChecked() ) mPassword.set( result ); @@ -215,12 +215,12 @@ public: void slotCancelPressed() { - finished( QString::null ); + finished( TQString::null ); } private: - QPixmap mImage; - QString mPrompt; + TQPixmap mImage; + TQString mPrompt; Kopete::Password::PasswordSource mSource; unsigned int mMaxLength; KopetePasswordDialog *mView; @@ -229,7 +229,7 @@ private: class KopetePasswordGetRequestNoPrompt : public KopetePasswordGetRequest { public: - KopetePasswordGetRequestNoPrompt( QObject *owner, Kopete::Password &pass ) + KopetePasswordGetRequestNoPrompt( TQObject *owner, Kopete::Password &pass ) : KopetePasswordGetRequest( owner, pass ) { } @@ -248,7 +248,7 @@ public: class KopetePasswordSetRequest : public KopetePasswordRequest { public: - KopetePasswordSetRequest( Kopete::Password &pass, const QString &newPass ) + KopetePasswordSetRequest( Kopete::Password &pass, const TQString &newPass ) : KopetePasswordRequest( 0, pass ), mNewPass( newPass ) { if ( KApplication *app = KApplication::kApplication() ) @@ -276,7 +276,7 @@ public: if ( mWallet && mWallet->writePassword( mPassword.d->configGroup, mNewPass ) == 0 ) { mPassword.d->remembered = true; - mPassword.d->passwordFromKConfig = QString::null; + mPassword.d->passwordFromKConfig = TQString::null; mPassword.writeConfig(); return true; } @@ -288,13 +288,13 @@ public: //NOTE: This will start a nested event loop. However, this is fine; the only code we // call after this point is in Kopete::Password, so as long as we've not been deleted - // everything should work out OK. We have no parent QObject, so we should survive. + // everything should work out OK. We have no parent TQObject, so we should survive. if ( KMessageBox::warningContinueCancel( Kopete::UI::Global::mainWidget(), i18n( "<qt>Kopete is unable to save your password securely in your wallet;<br>" "do you want to save the password in the <b>unsafe</b> configuration file instead?</qt>" ), i18n( "Unable to Store Secure Password" ), - KGuiItem( i18n( "Store &Unsafe" ), QString::fromLatin1( "unlock" ) ), - QString::fromLatin1( "KWalletFallbackToKConfig" ) ) != KMessageBox::Continue ) + KGuiItem( i18n( "Store &Unsafe" ), TQString::fromLatin1( "unlock" ) ), + TQString::fromLatin1( "KWalletFallbackToKConfig" ) ) != KMessageBox::Continue ) { return false; } @@ -306,7 +306,7 @@ public: } private: - QString mNewPass; + TQString mNewPass; }; class KopetePasswordClearRequest : public KopetePasswordRequest @@ -329,7 +329,7 @@ public: if ( clearPassword() ) { mPassword.setWrong( true ); - mPassword.d->cachedValue = QString::null; + mPassword.d->cachedValue = TQString::null; } delete this; @@ -339,7 +339,7 @@ public: kdDebug( 14010 ) << k_funcinfo << " clearing password" << endl; mPassword.d->remembered = false; - mPassword.d->passwordFromKConfig = QString::null; + mPassword.d->passwordFromKConfig = TQString::null; mPassword.writeConfig(); if ( mWallet ) mWallet->removeEntry( mPassword.d->configGroup ); @@ -347,21 +347,21 @@ public: } }; -Kopete::Password::Password( const QString &configGroup, uint maximumLength, const char *name ) - : QObject( 0, name ), d( new Private( configGroup, maximumLength, false ) ) +Kopete::Password::Password( const TQString &configGroup, uint maximumLength, const char *name ) + : TQObject( 0, name ), d( new Private( configGroup, maximumLength, false ) ) { readConfig(); } -Kopete::Password::Password( const QString &configGroup, uint maximumLength, +Kopete::Password::Password( const TQString &configGroup, uint maximumLength, bool allowBlankPassword, const char *name ) - : QObject( 0, name ), d( new Private( configGroup, maximumLength, allowBlankPassword ) ) + : TQObject( 0, name ), d( new Private( configGroup, maximumLength, allowBlankPassword ) ) { readConfig(); } Kopete::Password::Password( Password &other, const char *name ) - : QObject( 0, name ), d( other.d->incRef() ) + : TQObject( 0, name ), d( other.d->incRef() ) { } @@ -383,9 +383,9 @@ void Kopete::Password::readConfig() KConfig *config = KGlobal::config(); config->setGroup( d->configGroup ); - QString passwordCrypted = config->readEntry( "Password" ); + TQString passwordCrypted = config->readEntry( "Password" ); if ( passwordCrypted.isNull() ) - d->passwordFromKConfig = QString::null; + d->passwordFromKConfig = TQString::null; else d->passwordFromKConfig = KStringHandler::obscure( passwordCrypted ); @@ -448,30 +448,30 @@ void Kopete::Password::setWrong( bool bWrong ) d->isWrong = bWrong; writeConfig(); - if ( bWrong ) d->cachedValue = QString::null; + if ( bWrong ) d->cachedValue = TQString::null; } -void Kopete::Password::requestWithoutPrompt( QObject *returnObj, const char *slot ) +void Kopete::Password::requestWithoutPrompt( TQObject *returnObj, const char *slot ) { KopetePasswordRequest *request = new KopetePasswordGetRequestNoPrompt( returnObj, *this ); // call connect on returnObj so we can still connect if 'slot' is protected/private - returnObj->connect( request, SIGNAL( requestFinished( const QString & ) ), slot ); + returnObj->connect( request, TQT_SIGNAL( requestFinished( const TQString & ) ), slot ); request->begin(); } -void Kopete::Password::request( QObject *returnObj, const char *slot, const QPixmap &image, const QString &prompt, Kopete::Password::PasswordSource source ) +void Kopete::Password::request( TQObject *returnObj, const char *slot, const TQPixmap &image, const TQString &prompt, Kopete::Password::PasswordSource source ) { KopetePasswordRequest *request = new KopetePasswordGetRequestPrompt( returnObj, *this, image, prompt, source ); - returnObj->connect( request, SIGNAL( requestFinished( const QString & ) ), slot ); + returnObj->connect( request, TQT_SIGNAL( requestFinished( const TQString & ) ), slot ); request->begin(); } -QString Kopete::Password::cachedValue() +TQString Kopete::Password::cachedValue() { return d->cachedValue; } -void Kopete::Password::set( const QString &pass ) +void Kopete::Password::set( const TQString &pass ) { // if we're being told to forget the password, and we aren't remembering one, // don't try to open the wallet. fixes bug #71804. diff --git a/kopete/libkopete/kopetepassword.h b/kopete/libkopete/kopetepassword.h index 149db6f6..de2f96c1 100644 --- a/kopete/libkopete/kopetepassword.h +++ b/kopete/libkopete/kopetepassword.h @@ -17,7 +17,7 @@ #ifndef KOPETEPASSWORD_H #define KOPETEPASSWORD_H -#include <qobject.h> +#include <tqobject.h> #include "kopete_export.h" namespace KWallet { class Wallet; } @@ -57,7 +57,7 @@ public: * * @deprecated Use the constructor that specifies if a blank password is allowed */ - explicit Password( const QString &configGroup, uint maxLength = 0, const char *name = 0 ); + explicit Password( const TQString &configGroup, uint maxLength = 0, const char *name = 0 ); /** * Create a new Kopete::Password object. @@ -67,7 +67,7 @@ public: * @param allowBlankPassword If this password is allowed to be blank * @param name The name for this object */ - explicit Password( const QString &configGroup, uint maxLength = 0, + explicit Password( const TQString &configGroup, uint maxLength = 0, bool allowBlankPassword = false, const char *name = 0 ); /** @@ -126,27 +126,27 @@ public: * * @param receiver The object to notify when the password request finishes * @param slot The slot on receiver to call at the end of the request. The signature - * of this function should be slot( const QString &password ). password will - * be the password if successful, or QString::null if failed. + * of this function should be slot( const TQString &password ). password will + * be the password if successful, or TQString::null if failed. * @param image The icon to display in the dialog when asking for the password * @param prompt The message to display to the user, asking for a * password. Can be any Qt RichText string. * @param source The source the password is taken from if a wrong or * invalid password is entered or the password could not be found in the wallet */ - void request( QObject *receiver, const char *slot, const QPixmap &image, - const QString &prompt, PasswordSource source = FromConfigOrUser ); + void request( TQObject *receiver, const char *slot, const TQPixmap &image, + const TQString &prompt, PasswordSource source = FromConfigOrUser ); /** * @brief Start an asynchronous password request without a prompt * * Starts an asynchronous password request. Does not pop up a password entry dialog * if there is no password. - * @see request(QObject*,const char*,const QPixmap&,const QString&,bool,unsigned int) + * @see request(TQObject*,const char*,const TQPixmap&,const TQString&,bool,unsigned int) * The password given to the provided slot will be NULL if no password could be retrieved for * some reason, such as the user declining to open the wallet, or no password being found. */ - void requestWithoutPrompt( QObject *receiver, const char *slot ); + void requestWithoutPrompt( TQObject *receiver, const char *slot ); /** * @return true if the password is remembered, false otherwise. @@ -163,21 +163,21 @@ public: /** * When a password request succeeds, the password is cached. This function - * returns the cached password, if there is one, or QString::null if there + * returns the cached password, if there is one, or TQString::null if there * is not. */ - QString cachedValue(); + TQString cachedValue(); public slots: /** * Set the password for this account. - * @param pass If set to QString::null, the password is forgotten unless you + * @param pass If set to TQString::null, the password is forgotten unless you * specified to allow blank passwords. Otherwise, sets the password to * this value. * * Note: this function is asynchronous; changes will not be instant. */ - void set( const QString &pass = QString::null ); + void set( const TQString &pass = TQString::null ); /** * Unconditionally clears the stored password @@ -208,7 +208,7 @@ class KopetePasswordRequestBase : public virtual QObject { Q_OBJECT signals: - void requestFinished( const QString &password ); + void requestFinished( const TQString &password ); public slots: virtual void walletReceived( KWallet::Wallet *wallet ) = 0; virtual void slotOkPressed() = 0; diff --git a/kopete/libkopete/kopetepasswordedaccount.cpp b/kopete/libkopete/kopetepasswordedaccount.cpp index 9fea5c66..cf0e2932 100644 --- a/kopete/libkopete/kopetepasswordedaccount.cpp +++ b/kopete/libkopete/kopetepasswordedaccount.cpp @@ -21,24 +21,24 @@ #include <klocale.h> -#include <qpixmap.h> +#include <tqpixmap.h> struct Kopete::PasswordedAccount::Private { - Private( const QString &group, uint maxLen, bool allowBlankPassword ) : + Private( const TQString &group, uint maxLen, bool allowBlankPassword ) : password( group, maxLen, allowBlankPassword, "mPassword" ) {} Kopete::Password password; Kopete::OnlineStatus initialStatus; }; -Kopete::PasswordedAccount::PasswordedAccount( Kopete::Protocol *parent, const QString &acctId, uint maxLen, const char *name ) - : Kopete::Account( parent, acctId, name ), d( new Private( QString::fromLatin1("Account_")+ parent->pluginId() + QString::fromLatin1("_") + acctId , maxLen, false ) ) +Kopete::PasswordedAccount::PasswordedAccount( Kopete::Protocol *parent, const TQString &acctId, uint maxLen, const char *name ) + : Kopete::Account( parent, acctId, name ), d( new Private( TQString::fromLatin1("Account_")+ parent->pluginId() + TQString::fromLatin1("_") + acctId , maxLen, false ) ) { } -Kopete::PasswordedAccount::PasswordedAccount( Kopete::Protocol *parent, const QString &acctId, uint maxLen, +Kopete::PasswordedAccount::PasswordedAccount( Kopete::Protocol *parent, const TQString &acctId, uint maxLen, bool allowBlankPassword, const char *name ) - : Kopete::Account( parent, acctId, name ), d( new Private( QString::fromLatin1("Account_")+ parent->pluginId() + QString::fromLatin1("_") + acctId , maxLen, allowBlankPassword ) ) + : Kopete::Account( parent, acctId, name ), d( new Private( TQString::fromLatin1("Account_")+ parent->pluginId() + TQString::fromLatin1("_") + acctId , maxLen, allowBlankPassword ) ) { } @@ -64,20 +64,20 @@ void Kopete::PasswordedAccount::connect( const Kopete::OnlineStatus& initialStat // warn user somewhere d->initialStatus = initialStatus; - QString cached = password().cachedValue(); + TQString cached = password().cachedValue(); if( !cached.isNull() || d->password.allowBlankPassword() ) { connectWithPassword( cached ); return; } - QString prompt = passwordPrompt(); + TQString prompt = passwordPrompt(); Kopete::Password::PasswordSource src = password().isWrong() ? Kopete::Password::FromUser : Kopete::Password::FromConfigOrUser; - password().request( this, SLOT( connectWithPassword( const QString & ) ), accountIcon( Kopete::Password::preferredImageSize() ), prompt, src ); + password().request( this, TQT_SLOT( connectWithPassword( const TQString & ) ), accountIcon( Kopete::Password::preferredImageSize() ), prompt, src ); } -QString Kopete::PasswordedAccount::passwordPrompt() +TQString Kopete::PasswordedAccount::passwordPrompt() { if ( password().isWrong() ) return i18n( "<b>The password was wrong;</b> please re-enter your password for %1 account <b>%2</b>" ).arg( protocol()->displayName(), accountId() ); @@ -92,7 +92,7 @@ Kopete::OnlineStatus Kopete::PasswordedAccount::initialStatus() bool Kopete::PasswordedAccount::removeAccount() { - password().set(QString::null); + password().set(TQString::null); return Kopete::Account::removeAccount(); } diff --git a/kopete/libkopete/kopetepasswordedaccount.h b/kopete/libkopete/kopetepasswordedaccount.h index 1534025d..d008bae4 100644 --- a/kopete/libkopete/kopetepasswordedaccount.h +++ b/kopete/libkopete/kopetepasswordedaccount.h @@ -49,7 +49,7 @@ public: * * @deprecated Use the constructor that specifies if a blank password is allowed */ - PasswordedAccount( Protocol *parent, const QString &acctId, uint maxPasswordLength = 0, const char *name = 0 ); + PasswordedAccount( Protocol *parent, const TQString &acctId, uint maxPasswordLength = 0, const char *name = 0 ); /** * KopetePasswordedAccount constructor @@ -60,7 +60,7 @@ public: * * @param name The name for this QObject */ - PasswordedAccount( Protocol *parent, const QString &acctId, uint maxPasswordLength = 0, + PasswordedAccount( Protocol *parent, const TQString &acctId, uint maxPasswordLength = 0, bool allowBlankPassword = false, const char *name = 0 ); virtual ~PasswordedAccount(); @@ -99,10 +99,10 @@ public: public slots: /** * Called when your account should attempt to connect. - * @param password The password to connect with, or QString::null + * @param password The password to connect with, or TQString::null * if the user wished to cancel the connection attempt. */ - virtual void connectWithPassword( const QString &password ) = 0; + virtual void connectWithPassword( const TQString &password ) = 0; protected: /** @@ -110,7 +110,7 @@ protected: * The default implementation should be adequate in most cases; override * if you have a custom message to show the user. */ - virtual QString passwordPrompt(); + virtual TQString passwordPrompt(); protected slots: /** diff --git a/kopete/libkopete/kopetepicture.cpp b/kopete/libkopete/kopetepicture.cpp index 1c586b40..05468c21 100644 --- a/kopete/libkopete/kopetepicture.cpp +++ b/kopete/libkopete/kopetepicture.cpp @@ -16,7 +16,7 @@ */ #include "kopetepicture.h" -#include <qbuffer.h> +#include <tqbuffer.h> #include <kabc/picture.h> @@ -33,9 +33,9 @@ public: Private() {} - QString pictureBase64; - QImage pictureImage; - QString picturePath; + TQString pictureBase64; + TQImage pictureImage; + TQString picturePath; }; Picture::Picture() @@ -43,13 +43,13 @@ Picture::Picture() { } -Picture::Picture(const QString &path) +Picture::Picture(const TQString &path) : d(new Private) { setPicture(path); } -Picture::Picture(const QImage &image) +Picture::Picture(const TQImage &image) : d(new Private) { setPicture(image); @@ -74,25 +74,25 @@ Picture &Picture::operator=(const Picture &other) return *this; } -QImage Picture::image() +TQImage Picture::image() { // Do the conversion if only needed. // If the image is null, the path is not empty then. if( d->pictureImage.isNull() ) { - d->pictureImage = QImage(d->picturePath); + d->pictureImage = TQImage(d->picturePath); } return d->pictureImage; } -QString Picture::base64() +TQString Picture::base64() { if( d->pictureBase64.isEmpty() ) { // Generate base64 cache for the picture. - QByteArray tempArray; - QBuffer tempBuffer( tempArray ); + TQByteArray tempArray; + TQBuffer tempBuffer( tempArray ); tempBuffer.open( IO_WriteOnly ); // Make sure it create a image cache. if( image().save( &tempBuffer, "PNG" ) ) @@ -104,23 +104,23 @@ QString Picture::base64() return d->pictureBase64; } -QString Picture::path() +TQString Picture::path() { if( d->picturePath.isEmpty() ) { // For a image source, finding a filename is tricky. // I decided to use MD5 Hash as the filename. - QString localPhotoPath; + TQString localPhotoPath; // Generate MD5 Hash for the image. - QByteArray tempArray; - QBuffer tempBuffer(tempArray); + TQByteArray tempArray; + TQBuffer tempBuffer(tempArray); tempBuffer.open( IO_WriteOnly ); image().save(&tempBuffer, "PNG"); KMD5 context(tempArray); // Save the image to a file. localPhotoPath = context.hexDigest() + ".png"; - localPhotoPath = locateLocal( "appdata", QString::fromUtf8("metacontactpicturecache/%1").arg( localPhotoPath) ); + localPhotoPath = locateLocal( "appdata", TQString::fromUtf8("metacontactpicturecache/%1").arg( localPhotoPath) ); if( image().save(localPhotoPath, "PNG") ) { d->picturePath = localPhotoPath; @@ -145,30 +145,30 @@ bool Picture::isNull() void Picture::clear() { detach(); - d->pictureBase64 = QString::null; - d->picturePath = QString::null; - d->pictureImage = QImage(); + d->pictureBase64 = TQString::null; + d->picturePath = TQString::null; + d->pictureImage = TQImage(); } -void Picture::setPicture(const QImage &image) +void Picture::setPicture(const TQImage &image) { detach(); d->pictureImage = image; // Clear the path and base64, it will call the update of then when "getted" - d->picturePath= QString::null; - d->pictureBase64 = QString::null; + d->picturePath= TQString::null; + d->pictureBase64 = TQString::null; } -void Picture::setPicture(const QString &path) +void Picture::setPicture(const TQString &path) { detach(); d->picturePath = path; // Clear the image and base64, it will call the update of then when "getted" - d->pictureImage = QImage(); - d->pictureBase64 = QString::null; + d->pictureImage = TQImage(); + d->pictureBase64 = TQString::null; } void Picture::setPicture(const KABC::Picture &picture) diff --git a/kopete/libkopete/kopetepicture.h b/kopete/libkopete/kopetepicture.h index 5631afc1..46e7a7c2 100644 --- a/kopete/libkopete/kopetepicture.h +++ b/kopete/libkopete/kopetepicture.h @@ -21,7 +21,7 @@ #include <ksharedptr.h> #include "kopete_export.h" -#include <qimage.h> +#include <tqimage.h> namespace KABC { @@ -33,12 +33,12 @@ namespace Kopete /** * @brief Represent a picture in Kopete context * - * It kept a cache of a QImage object, a base64 string and + * It kept a cache of a TQImage object, a base64 string and * a path to a image file. It ensure that all source are synced. * Interally, the image is stored in PNG format when possible. * It can happen that the image path do not return a PNG file. * - * You can only use an QImage and a image path to create/update + * You can only use an TQImage and a image path to create/update * the picture. * If the picture doesn't exist as a file, it generate a local * copy into ~/.kde/share/apps/kopete/metacontactpicturecache @@ -48,12 +48,12 @@ namespace Kopete * How to use this class: * @code * Kopete::Picture picture; - * picture.setPicture(QImage()); - * picture.setPicture(QString("/tmp/image.png")); + * picture.setPicture(TQImage()); + * picture.setPicture(TQString("/tmp/image.png")); * - * QString base64 = picture.base64(); - * QString path = picture.path(); - * QImage image = picture.image(); + * TQString base64 = picture.base64(); + * TQString path = picture.path(); + * TQImage image = picture.image(); * @endcode * * @author Michaël Larouche <michael.larouche@kdemail.net> @@ -68,11 +68,11 @@ public: /** * Create a picture from a local path. */ - Picture(const QString &path); + Picture(const TQString &path); /** - * Create a picture from a QImage. + * Create a picture from a TQImage. */ - Picture(const QImage &image); + Picture(const TQImage &image); /** * Create a picture from a KABC::Picture. */ @@ -92,21 +92,21 @@ public: Picture &operator=(const Picture &other); /** - * Return the current picture as QImage. - * QImage can used to draw the image on a context. + * Return the current picture as TQImage. + * TQImage can used to draw the image on a context. * - * @return the QImage cache of current picture. + * @return the TQImage cache of current picture. */ - QImage image(); + TQImage image(); /** * Return the current picture as a base64 string. * The base64 is used to include the picture into a XML/XHTML context. */ - QString base64(); + TQString base64(); /** * Return the local path of the current picture. */ - QString path(); + TQString path(); /** * Check if the picture is null. @@ -119,14 +119,14 @@ public: /** * Set the picture content. - * @param image the picture as a QImage. + * @param image the picture as a TQImage. */ - void setPicture(const QImage &image); + void setPicture(const TQImage &image); /** * Set the picture content. * @param path the path to the picture. */ - void setPicture(const QString &path); + void setPicture(const TQString &path); /** * Set the picture content. * @param picture a KABC Picture. diff --git a/kopete/libkopete/kopeteplugin.cpp b/kopete/libkopete/kopeteplugin.cpp index cec99179..3c31545a 100644 --- a/kopete/libkopete/kopeteplugin.cpp +++ b/kopete/libkopete/kopeteplugin.cpp @@ -28,15 +28,15 @@ namespace Kopete { class Plugin::Private { public: - QStringList addressBookFields; - QString indexField; + TQStringList addressBookFields; + TQString indexField; }; -Plugin::Plugin( KInstance *instance, QObject *parent, const char *name ) -: QObject( parent, name ), KXMLGUIClient(), d(new Private) +Plugin::Plugin( KInstance *instance, TQObject *parent, const char *name ) +: TQObject( parent, name ), KXMLGUIClient(), d(new Private) { setInstance( instance ); - KSettings::Dispatcher::self()->registerInstance( instance, this, SIGNAL( settingsChanged() ) ); + KSettings::Dispatcher::self()->registerInstance( instance, this, TQT_SIGNAL( settingsChanged() ) ); } Plugin::~Plugin() @@ -44,20 +44,20 @@ Plugin::~Plugin() delete d; } -QString Plugin::pluginId() const +TQString Plugin::pluginId() const { - return QString::fromLatin1( className() ); + return TQString::fromLatin1( className() ); } -QString Plugin::displayName() const +TQString Plugin::displayName() const { - return pluginInfo() ? pluginInfo()->name() : QString::null; + return pluginInfo() ? pluginInfo()->name() : TQString::null; } -QString Plugin::pluginIcon() const +TQString Plugin::pluginIcon() const { - return pluginInfo() ? pluginInfo()->icon() : QString::null; + return pluginInfo() ? pluginInfo()->icon() : TQString::null; } @@ -74,26 +74,26 @@ void Plugin::aboutToUnload() void Plugin::deserialize( MetaContact * /* metaContact */, - const QMap<QString, QString> & /* stream */ ) + const TQMap<TQString, TQString> & /* stream */ ) { // Do nothing in default implementation } -void Kopete::Plugin::addAddressBookField( const QString &field, AddressBookFieldAddMode mode ) +void Kopete::Plugin::addAddressBookField( const TQString &field, AddressBookFieldAddMode mode ) { d->addressBookFields.append( field ); if( mode == MakeIndexField ) d->indexField = field; } -QStringList Kopete::Plugin::addressBookFields() const +TQStringList Kopete::Plugin::addressBookFields() const { return d->addressBookFields; } -QString Kopete::Plugin::addressBookIndexField() const +TQString Kopete::Plugin::addressBookIndexField() const { return d->indexField; diff --git a/kopete/libkopete/kopeteplugin.h b/kopete/libkopete/kopeteplugin.h index 43a80849..eebad0d2 100644 --- a/kopete/libkopete/kopeteplugin.h +++ b/kopete/libkopete/kopeteplugin.h @@ -21,7 +21,7 @@ #define KOPETEPLUGIN_H #include <kxmlguiclient.h> -#include <qobject.h> +#include <tqobject.h> #include <kdemacros.h> #include "kopete_export.h" @@ -71,7 +71,7 @@ Comment=Plugin that do some nice stuff static const KAboutData aboutdata("kopete_myplugin", I18N_NOOP("MyPlugin") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( kopete_myplugin, MyPluginFactory( &aboutdata ) ) - MyPlugin::MyPlugin( QObject *parent, const char *name, const QStringList & args ) + MyPlugin::MyPlugin( TQObject *parent, const char *name, const TQStringList & args ) : Kopete::Plugin( MyPluginFactory::instance(), parent, name ) { //... @@ -87,12 +87,12 @@ Comment=Plugin that do some nice stuff * @author Duncan Mac-Vicar P. <duncan@kde.org> * @author Olivier Goffart <ogoffart @ tiscalinet.be> */ -class KOPETE_EXPORT Plugin : public QObject, public KXMLGUIClient +class KOPETE_EXPORT Plugin : public TQObject, public KXMLGUIClient { Q_OBJECT public: - Plugin( KInstance *instance, QObject *parent, const char *name ); + Plugin( KInstance *instance, TQObject *parent, const char *name ); virtual ~Plugin(); /** @@ -109,35 +109,35 @@ public: * * This is a convenience method that simply calls @ref pluginInfo()->icon(). */ - QString pluginIcon() const; + TQString pluginIcon() const; /** * Returns the display name of this plugin. * * This is a convenience method that simply calls @ref pluginInfo()->name(). */ - QString displayName() const; + TQString displayName() const; /** * @brief Get the plugin id - * @return the plugin's id which is gotten by calling QObject::className(). + * @return the plugin's id which is gotten by calling TQObject::className(). */ - QString pluginId() const; + TQString pluginId() const; /** * Return the list of all keys from the address book in which the plugin * is interested. Those keys are monitored for changes upon load and * during runtime. When the key actually changes, the plugin's - * addressBookKeyChanged( Kopete::MetaContact *mc, const QString &key ) + * addressBookKeyChanged( Kopete::MetaContact *mc, const TQString &key ) * is called. * You can add fields to the list using @ref addAddressBookField() */ - QStringList addressBookFields() const; + TQStringList addressBookFields() const; /** * Return the index field as set by @ref addAddressBookField() */ - QString addressBookIndexField() const; + TQString addressBookIndexField() const; /** * Mode for an address book field as used by @ref addAddressBookField() @@ -155,7 +155,7 @@ public: * Only one field can be index field. Calling this method multiple times * as index field will reset the value of index field! */ - void addAddressBookField( const QString &field, AddressBookFieldAddMode mode = AddOnly ); + void addAddressBookField( const TQString &field, AddressBookFieldAddMode mode = AddOnly ); /** * @brief Prepare for unloading a plugin @@ -199,7 +199,7 @@ public slots: * * @todo we probably should think to another way to save the contacltist. */ - virtual void deserialize( MetaContact *metaContact, const QMap<QString, QString> &data ); + virtual void deserialize( MetaContact *metaContact, const TQMap<TQString, TQString> &data ); protected: diff --git a/kopete/libkopete/kopetepluginmanager.cpp b/kopete/libkopete/kopetepluginmanager.cpp index 8f613a86..1aff9e9f 100644 --- a/kopete/libkopete/kopetepluginmanager.cpp +++ b/kopete/libkopete/kopetepluginmanager.cpp @@ -27,11 +27,11 @@ #include <valgrind/valgrind.h> #endif -#include <qapplication.h> -#include <qfile.h> -#include <qregexp.h> -#include <qtimer.h> -#include <qvaluestack.h> +#include <tqapplication.h> +#include <tqfile.h> +#include <tqregexp.h> +#include <tqtimer.h> +#include <tqvaluestack.h> #include <kapplication.h> #include <kdebug.h> @@ -56,11 +56,11 @@ public: Private() : shutdownMode( StartingUp ), isAllPluginsLoaded(false) {} // All available plugins, regardless of category, and loaded or not - QValueList<KPluginInfo *> plugins; + TQValueList<KPluginInfo *> plugins; // Dict of all currently loaded plugins, mapping the KPluginInfo to // a plugin - typedef QMap<KPluginInfo *, Plugin *> InfoToPluginMap; + typedef TQMap<KPluginInfo *, Plugin *> InfoToPluginMap; InfoToPluginMap loadedPlugins; // The plugin manager's mode. The mode is StartingUp until loadAllPlugins() @@ -71,7 +71,7 @@ public: ShutdownMode shutdownMode; // Plugins pending for loading - QValueStack<QString> pluginsToLoad; + TQValueStack<TQString> pluginsToLoad; static KStaticDeleter<PluginManager> deleter; @@ -89,10 +89,10 @@ PluginManager* PluginManager::self() return s_self; } -PluginManager::PluginManager() : QObject( qApp ), d( new Private ) +PluginManager::PluginManager() : TQObject( qApp ), d( new Private ) { - d->plugins = KPluginInfo::fromServices( KTrader::self()->query( QString::fromLatin1( "Kopete/Plugin" ), - QString::fromLatin1( "[X-Kopete-Version] == 1000900" ) ) ); + d->plugins = KPluginInfo::fromServices( KTrader::self()->query( TQString::fromLatin1( "Kopete/Plugin" ), + TQString::fromLatin1( "[X-Kopete-Version] == 1000900" ) ) ); // We want to add a reference to the application's event loop so we // can remain in control when all windows are removed. @@ -119,13 +119,13 @@ PluginManager::~PluginManager() delete d; } -QValueList<KPluginInfo *> PluginManager::availablePlugins( const QString &category ) const +TQValueList<KPluginInfo *> PluginManager::availablePlugins( const TQString &category ) const { if ( category.isEmpty() ) return d->plugins; - QValueList<KPluginInfo *> result; - QValueList<KPluginInfo *>::ConstIterator it; + TQValueList<KPluginInfo *> result; + TQValueList<KPluginInfo *>::ConstIterator it; for ( it = d->plugins.begin(); it != d->plugins.end(); ++it ) { if ( ( *it )->category() == category ) @@ -135,7 +135,7 @@ QValueList<KPluginInfo *> PluginManager::availablePlugins( const QString &catego return result; } -PluginList PluginManager::loadedPlugins( const QString &category ) const +PluginList PluginManager::loadedPlugins( const TQString &category ) const { PluginList result; @@ -205,17 +205,17 @@ void PluginManager::shutdown() kdDebug(14010) << k_funcinfo << "Running under valgrind, disabling plugin unload timeout guard" << endl; else #endif - QTimer::singleShot( 3000, this, SLOT( slotShutdownTimeout() ) ); + TQTimer::singleShot( 3000, this, TQT_SLOT( slotShutdownTimeout() ) ); } void PluginManager::slotPluginReadyForUnload() { - // Using QObject::sender() is on purpose here, because otherwise all + // Using TQObject::sender() is on purpose here, because otherwise all // plugins would have to pass 'this' as parameter, which makes the API // less clean for plugin authors // FIXME: I don't buy the above argument. Add a Kopete::Plugin::emitReadyForUnload(void), // and make readyForUnload be passed a plugin. - Richard - Plugin *plugin = dynamic_cast<Plugin *>( const_cast<QObject *>( sender() ) ); + Plugin *plugin = dynamic_cast<Plugin *>( const_cast<TQObject *>( sender() ) ); kdDebug( 14010 ) << k_funcinfo << plugin->pluginId() << "ready for unload" << endl; if ( !plugin ) { @@ -234,12 +234,12 @@ void PluginManager::slotShutdownTimeout() if ( d->shutdownMode == Private::DoneShutdown ) return; - QStringList remaining; + TQStringList remaining; for ( Private::InfoToPluginMap::ConstIterator it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it ) remaining.append( it.data()->pluginId() ); kdWarning( 14010 ) << k_funcinfo << "Some plugins didn't shutdown in time!" << endl - << "Remaining plugins: " << remaining.join( QString::fromLatin1( ", " ) ) << endl + << "Remaining plugins: " << remaining.join( TQString::fromLatin1( ", " ) ) << endl << "Forcing Kopete shutdown now." << endl; slotShutdownDone(); @@ -259,29 +259,29 @@ void PluginManager::loadAllPlugins() // FIXME: We need session management here - Martijn KConfig *config = KGlobal::config(); - if ( config->hasGroup( QString::fromLatin1( "Plugins" ) ) ) + if ( config->hasGroup( TQString::fromLatin1( "Plugins" ) ) ) { - QMap<QString, bool> pluginsMap; + TQMap<TQString, bool> pluginsMap; - QMap<QString, QString> entries = config->entryMap( QString::fromLatin1( "Plugins" ) ); - QMap<QString, QString>::Iterator it; + TQMap<TQString, TQString> entries = config->entryMap( TQString::fromLatin1( "Plugins" ) ); + TQMap<TQString, TQString>::Iterator it; for ( it = entries.begin(); it != entries.end(); ++it ) { - QString key = it.key(); - if ( key.endsWith( QString::fromLatin1( "Enabled" ) ) ) - pluginsMap.insert( key.left( key.length() - 7 ), (it.data() == QString::fromLatin1( "true" )) ); + TQString key = it.key(); + if ( key.endsWith( TQString::fromLatin1( "Enabled" ) ) ) + pluginsMap.insert( key.left( key.length() - 7 ), (it.data() == TQString::fromLatin1( "true" )) ); } - QValueList<KPluginInfo *> plugins = availablePlugins( QString::null ); - QValueList<KPluginInfo *>::ConstIterator it2 = plugins.begin(); - QValueList<KPluginInfo *>::ConstIterator end = plugins.end(); + TQValueList<KPluginInfo *> plugins = availablePlugins( TQString::null ); + TQValueList<KPluginInfo *>::ConstIterator it2 = plugins.begin(); + TQValueList<KPluginInfo *>::ConstIterator end = plugins.end(); for ( ; it2 != end; ++it2 ) { // Protocols are loaded automatically so they aren't always in Plugins group. (fixes bug 167113) - if ( (*it2)->category() == QString::fromLatin1( "Protocols" ) ) + if ( (*it2)->category() == TQString::fromLatin1( "Protocols" ) ) continue; - QString pluginName = (*it2)->pluginName(); + TQString pluginName = (*it2)->pluginName(); bool inMap = pluginsMap.contains( pluginName ); if ( (inMap && pluginsMap[pluginName]) || (!inMap && (*it2)->isPluginEnabledByDefault()) ) { @@ -301,9 +301,9 @@ void PluginManager::loadAllPlugins() else { // we had no config, so we load any plugins that should be loaded by default. - QValueList<KPluginInfo *> plugins = availablePlugins( QString::null ); - QValueList<KPluginInfo *>::ConstIterator it = plugins.begin(); - QValueList<KPluginInfo *>::ConstIterator end = plugins.end(); + TQValueList<KPluginInfo *> plugins = availablePlugins( TQString::null ); + TQValueList<KPluginInfo *>::ConstIterator it = plugins.begin(); + TQValueList<KPluginInfo *>::ConstIterator end = plugins.end(); for ( ; it != end; ++it ) { if ( (*it)->isPluginEnabledByDefault() ) @@ -311,7 +311,7 @@ void PluginManager::loadAllPlugins() } } // Schedule the plugins to load - QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) ); } void PluginManager::slotLoadNextPlugin() @@ -327,26 +327,26 @@ void PluginManager::slotLoadNextPlugin() return; } - QString key = d->pluginsToLoad.pop(); + TQString key = d->pluginsToLoad.pop(); loadPluginInternal( key ); // Schedule the next run unconditionally to avoid code duplication on the // allPluginsLoaded() signal's handling. This has the added benefit that // the signal is delayed one event loop, so the accounts are more likely // to be instantiated. - QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) ); } -Plugin * PluginManager::loadPlugin( const QString &_pluginId, PluginLoadMode mode /* = LoadSync */ ) +Plugin * PluginManager::loadPlugin( const TQString &_pluginId, PluginLoadMode mode /* = LoadSync */ ) { - QString pluginId = _pluginId; + TQString pluginId = _pluginId; // Try to find legacy code // FIXME: Find any cases causing this, remove them, and remove this too - Richard - if ( pluginId.endsWith( QString::fromLatin1( ".desktop" ) ) ) + if ( pluginId.endsWith( TQString::fromLatin1( ".desktop" ) ) ) { kdWarning( 14010 ) << "Trying to use old-style API!" << endl << kdBacktrace() << endl; - pluginId = pluginId.remove( QRegExp( QString::fromLatin1( ".desktop$" ) ) ); + pluginId = pluginId.remove( TQRegExp( TQString::fromLatin1( ".desktop$" ) ) ); } if ( mode == LoadSync ) @@ -356,12 +356,12 @@ Plugin * PluginManager::loadPlugin( const QString &_pluginId, PluginLoadMode mod else { d->pluginsToLoad.push( pluginId ); - QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) ); return 0L; } } -Plugin *PluginManager::loadPluginInternal( const QString &pluginId ) +Plugin *PluginManager::loadPluginInternal( const TQString &pluginId ) { //kdDebug( 14010 ) << k_funcinfo << pluginId << endl; @@ -376,16 +376,16 @@ Plugin *PluginManager::loadPluginInternal( const QString &pluginId ) return d->loadedPlugins[ info ]; int error = 0; - Plugin *plugin = KParts::ComponentFactory::createInstanceFromQuery<Plugin>( QString::fromLatin1( "Kopete/Plugin" ), - QString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ), this, 0, QStringList(), &error ); + Plugin *plugin = KParts::ComponentFactory::createInstanceFromQuery<Plugin>( TQString::fromLatin1( "Kopete/Plugin" ), + TQString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ), this, 0, TQStringList(), &error ); if ( plugin ) { d->loadedPlugins.insert( info, plugin ); info->setPluginEnabled( true ); - connect( plugin, SIGNAL( destroyed( QObject * ) ), this, SLOT( slotPluginDestroyed( QObject * ) ) ); - connect( plugin, SIGNAL( readyForUnload() ), this, SLOT( slotPluginReadyForUnload() ) ); + connect( plugin, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( slotPluginDestroyed( TQObject * ) ) ); + connect( plugin, TQT_SIGNAL( readyForUnload() ), this, TQT_SLOT( slotPluginReadyForUnload() ) ); kdDebug( 14010 ) << k_funcinfo << "Successfully loaded plugin '" << pluginId << "'" << endl; @@ -424,7 +424,7 @@ Plugin *PluginManager::loadPluginInternal( const QString &pluginId ) return plugin; } -bool PluginManager::unloadPlugin( const QString &spec ) +bool PluginManager::unloadPlugin( const TQString &spec ) { //kdDebug(14010) << k_funcinfo << spec << endl; if( Plugin *thePlugin = plugin( spec ) ) @@ -438,7 +438,7 @@ bool PluginManager::unloadPlugin( const QString &spec ) -void PluginManager::slotPluginDestroyed( QObject *plugin ) +void PluginManager::slotPluginDestroyed( TQObject *plugin ) { for ( Private::InfoToPluginMap::Iterator it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it ) @@ -454,14 +454,14 @@ void PluginManager::slotPluginDestroyed( QObject *plugin ) { // Use a timer to make sure any pending deleteLater() calls have // been handled first - QTimer::singleShot( 0, this, SLOT( slotShutdownDone() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotShutdownDone() ) ); } } -Plugin* PluginManager::plugin( const QString &_pluginId ) const +Plugin* PluginManager::plugin( const TQString &_pluginId ) const { // Hack for compatibility with Plugin::pluginId(), which returns // classname() instead of the internal name. Changing that is not easy @@ -470,9 +470,9 @@ Plugin* PluginManager::plugin( const QString &_pluginId ) const // For now, just transform FooProtocol to kopete_foo. // FIXME: In the future we'll need to change this nevertheless to unify // the handling - Martijn - QString pluginId = _pluginId; - if ( pluginId.endsWith( QString::fromLatin1( "Protocol" ) ) ) - pluginId = QString::fromLatin1( "kopete_" ) + _pluginId.lower().remove( QString::fromLatin1( "protocol" ) ); + TQString pluginId = _pluginId; + if ( pluginId.endsWith( TQString::fromLatin1( "Protocol" ) ) ) + pluginId = TQString::fromLatin1( "kopete_" ) + _pluginId.lower().remove( TQString::fromLatin1( "protocol" ) ); // End hack KPluginInfo *info = infoForPluginId( pluginId ); @@ -485,9 +485,9 @@ Plugin* PluginManager::plugin( const QString &_pluginId ) const return 0L; } -KPluginInfo * PluginManager::infoForPluginId( const QString &pluginId ) const +KPluginInfo * PluginManager::infoForPluginId( const TQString &pluginId ) const { - QValueList<KPluginInfo *>::ConstIterator it; + TQValueList<KPluginInfo *>::ConstIterator it; for ( it = d->plugins.begin(); it != d->plugins.end(); ++it ) { if ( ( *it )->pluginName() == pluginId ) @@ -498,21 +498,21 @@ KPluginInfo * PluginManager::infoForPluginId( const QString &pluginId ) const } -bool PluginManager::setPluginEnabled( const QString &_pluginId, bool enabled /* = true */ ) +bool PluginManager::setPluginEnabled( const TQString &_pluginId, bool enabled /* = true */ ) { - QString pluginId = _pluginId; + TQString pluginId = _pluginId; KConfig *config = KGlobal::config(); config->setGroup( "Plugins" ); // FIXME: What is this for? This sort of thing is kconf_update's job - Richard - if ( !pluginId.startsWith( QString::fromLatin1( "kopete_" ) ) ) - pluginId.prepend( QString::fromLatin1( "kopete_" ) ); + if ( !pluginId.startsWith( TQString::fromLatin1( "kopete_" ) ) ) + pluginId.prepend( TQString::fromLatin1( "kopete_" ) ); if ( !infoForPluginId( pluginId ) ) return false; - config->writeEntry( pluginId + QString::fromLatin1( "Enabled" ), enabled ); + config->writeEntry( pluginId + TQString::fromLatin1( "Enabled" ), enabled ); config->sync(); return true; diff --git a/kopete/libkopete/kopetepluginmanager.h b/kopete/libkopete/kopetepluginmanager.h index 815cf422..a250b091 100644 --- a/kopete/libkopete/kopetepluginmanager.h +++ b/kopete/libkopete/kopetepluginmanager.h @@ -19,11 +19,11 @@ #ifndef KOPETEPLUGINMANAGER_H #define KOPETEPLUGINMANAGER_H -#include <qmap.h> -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qvaluelist.h> +#include <tqmap.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqvaluelist.h> #include "kopete_export.h" @@ -34,7 +34,7 @@ namespace Kopete class Plugin; -typedef QValueList<Plugin*> PluginList; +typedef TQValueList<Plugin*> PluginList; /** * @author Duncan Mac-Vicar Prett <duncan@kde.org> @@ -63,14 +63,14 @@ public: * You can query all information on the plugins through the KPluginInfo * interface. */ - QValueList<KPluginInfo *> availablePlugins( const QString &category = QString::null ) const; + TQValueList<KPluginInfo *> availablePlugins( const TQString &category = TQString::null ) const; /** * Returns a list of all plugins that are actually loaded. * If you omit the category you get all, otherwise it's a filtered list. * See also @ref availablePlugins(). */ - PluginList loadedPlugins( const QString &category = QString::null ) const; + PluginList loadedPlugins( const TQString &category = TQString::null ) const; /** * @brief Search by plugin name. This is the key used as X-KDE-PluginInfo-Name in @@ -82,7 +82,7 @@ public: * If you want to also load the plugin you can better use @ref loadPlugin, which returns * the pointer to the plugin if it's already loaded. */ - Plugin *plugin( const QString &pluginName ) const; + Plugin *plugin( const TQString &pluginName ) const; /** * @return the KPluginInfo for the specified plugin @@ -117,7 +117,7 @@ public: * * Returns false when no appropriate plugin can be found. */ - bool setPluginEnabled( const QString &name, bool enabled = true ); + bool setPluginEnabled( const TQString &name, bool enabled = true ); /** * This method check if all the plugins are loaded. @@ -143,12 +143,12 @@ public slots: * * See also @ref plugin(). */ - Plugin *loadPlugin( const QString &pluginId, PluginLoadMode mode = LoadSync ); + Plugin *loadPlugin( const TQString &pluginId, PluginLoadMode mode = LoadSync ); /** * @brief Unload the plugin specified by @p pluginName */ - bool unloadPlugin( const QString &pluginName ); + bool unloadPlugin( const TQString &pluginName ); /** * @brief Loads all the enabled plugins. Also used to reread the @@ -187,7 +187,7 @@ private slots: /** * @brief Cleans up some references if the plugin is destroyed */ - void slotPluginDestroyed( QObject *plugin ); + void slotPluginDestroyed( TQObject *plugin ); /** * shutdown() starts a timer, when it fires we force all plugins @@ -221,7 +221,7 @@ private: * Called by @ref loadPlugin directly or through the queue for async plugin * loading. */ - Plugin * loadPluginInternal( const QString &pluginId ); + Plugin * loadPluginInternal( const TQString &pluginId ); /** * @internal @@ -230,7 +230,7 @@ private: * * Returns a null pointer when no plugin info is found. */ - KPluginInfo * infoForPluginId( const QString &pluginId ) const; + KPluginInfo * infoForPluginId( const TQString &pluginId ) const; PluginManager(); diff --git a/kopete/libkopete/kopeteprefs.cpp b/kopete/libkopete/kopeteprefs.cpp index e1148260..2c974f7f 100644 --- a/kopete/libkopete/kopeteprefs.cpp +++ b/kopete/libkopete/kopeteprefs.cpp @@ -16,9 +16,9 @@ #include "kopeteprefs.h" -#include <qfile.h> -#include <qfont.h> -#include <qmetaobject.h> +#include <tqfile.h> +#include <tqfont.h> +#include <tqmetaobject.h> #include <kapplication.h> #include <kglobalsettings.h> @@ -37,7 +37,7 @@ KopetePrefs *KopetePrefs::prefs() return s_prefs; } -KopetePrefs::KopetePrefs() : QObject( kapp, "KopetePrefs" ) +KopetePrefs::KopetePrefs() : TQObject( kapp, "KopetePrefs" ) { config = KGlobal::config(); load(); @@ -82,7 +82,7 @@ void KopetePrefs::load() mChatViewBufferSize = config->readNumEntry("ChatView BufferSize", 250); - QColor tmpColor = KGlobalSettings::highlightColor(); + TQColor tmpColor = KGlobalSettings::highlightColor(); mHighlightBackground = config->readColorEntry("Highlight Background Color", &tmpColor); tmpColor = KGlobalSettings::highlightedTextColor(); mHighlightForeground = config->readColorEntry("Highlight Foreground Color", &tmpColor); @@ -90,7 +90,7 @@ void KopetePrefs::load() mBgOverride = config->readBoolEntry("ChatView Override Background", false); mFgOverride = config->readBoolEntry("ChatView Override Foreground", false); mRtfOverride = config->readBoolEntry("ChatView Override RTF", false); - mInterfacePreference = config->readEntry("View Plugin", QString::fromLatin1("kopete_chatwindow") ); + mInterfacePreference = config->readEntry("View Plugin", TQString::fromLatin1("kopete_chatwindow") ); tmpColor = KGlobalSettings::textColor(); mTextColor = config->readColorEntry("Text Color", &tmpColor ); tmpColor = KGlobalSettings::baseColor(); @@ -112,31 +112,31 @@ void KopetePrefs::load() if(mToolTipContents.empty()) { mToolTipContents - << QString::fromLatin1("FormattedName") - << QString::fromLatin1("userInfo") - << QString::fromLatin1("server") - << QString::fromLatin1("channels") - << QString::fromLatin1("FormattedIdleTime") - << QString::fromLatin1("channelMembers") - << QString::fromLatin1("channelTopic") - << QString::fromLatin1("emailAddress") - << QString::fromLatin1("homePage") - << QString::fromLatin1("onlineSince") - << QString::fromLatin1("lastOnline") - << QString::fromLatin1("awayMessage"); + << TQString::fromLatin1("FormattedName") + << TQString::fromLatin1("userInfo") + << TQString::fromLatin1("server") + << TQString::fromLatin1("channels") + << TQString::fromLatin1("FormattedIdleTime") + << TQString::fromLatin1("channelMembers") + << TQString::fromLatin1("channelTopic") + << TQString::fromLatin1("emailAddress") + << TQString::fromLatin1("homePage") + << TQString::fromLatin1("onlineSince") + << TQString::fromLatin1("lastOnline") + << TQString::fromLatin1("awayMessage"); } config->setGroup("ContactList"); int n = metaObject()->findProperty( "contactListDisplayMode" ); - QString value = config->readEntry("DisplayMode",QString::fromLatin1("Default")); + TQString value = config->readEntry("DisplayMode",TQString::fromLatin1("Default")); mContactListDisplayMode = (ContactDisplayMode)metaObject()->property( n )->keyToValue( value.latin1() ); n = metaObject()->findProperty( "contactListIconMode" ); value = config->readEntry("IconMode", - QString::fromLatin1("IconDefault")); + TQString::fromLatin1("IconDefault")); mContactListIconMode = (IconDisplayMode) metaObject()->property( n )->keyToValue( value.latin1() ); mContactListIndentContacts = config->readBoolEntry("IndentContacts", false); mContactListUseCustomFonts = config->readBoolEntry("UseCustomFonts", false); - QFont font = KGlobalSettings::generalFont(); + TQFont font = KGlobalSettings::generalFont(); mContactListNormalFont = config->readFontEntry("NormalFont", &font); if ( font.pixelSize() != -1 ) font.setPixelSize( (font.pixelSize() * 3) / 4 ); @@ -273,7 +273,7 @@ void KopetePrefs::save() mStyleVariantChanged = false; } -void KopetePrefs::setIconTheme(const QString &value) +void KopetePrefs::setIconTheme(const TQString &value) { if( mIconTheme != value ) { @@ -414,51 +414,51 @@ void KopetePrefs::setSoundIfAway(bool value) mSoundIfAway = value; } -void KopetePrefs::setStylePath(const QString &stylePath) +void KopetePrefs::setStylePath(const TQString &stylePath) { if(mStylePath != stylePath) mStylePathChanged = true; _setStylePath(stylePath); } -void KopetePrefs::_setStylePath(const QString &stylePath) +void KopetePrefs::_setStylePath(const TQString &stylePath) { mStylePath = stylePath; // Fallback to default style if the directory doesn't exist // or the value is empty. - if( !QFile::exists(stylePath) || stylePath.isEmpty() ) + if( !TQFile::exists(stylePath) || stylePath.isEmpty() ) { - QString fallback; - fallback = QString(QString::fromLatin1("styles/%1/")).arg(QString::fromLatin1(KOPETE_DEFAULT_CHATSTYLE)); + TQString fallback; + fallback = TQString(TQString::fromLatin1("styles/%1/")).arg(TQString::fromLatin1(KOPETE_DEFAULT_CHATSTYLE)); mStylePath = locate("appdata", fallback); } } -void KopetePrefs::setStyleVariant(const QString &variantPath) +void KopetePrefs::setStyleVariant(const TQString &variantPath) { if(mStyleVariant != variantPath) mStyleVariantChanged = true; mStyleVariant = variantPath; } -void KopetePrefs::setFontFace( const QFont &value ) +void KopetePrefs::setFontFace( const TQFont &value ) { if( value != mFontFace ) mWindowAppearanceChanged = true; mFontFace = value; } -void KopetePrefs::setTextColor( const QColor &value ) +void KopetePrefs::setTextColor( const TQColor &value ) { if( value != mTextColor ) mWindowAppearanceChanged = true; mTextColor = value; } -void KopetePrefs::setBgColor( const QColor &value ) +void KopetePrefs::setBgColor( const TQColor &value ) { if( value != mBgColor ) mWindowAppearanceChanged = true; mBgColor = value; } -void KopetePrefs::setLinkColor( const QColor &value ) +void KopetePrefs::setLinkColor( const TQColor &value ) { if( value != mLinkColor ) mWindowAppearanceChanged = true; mLinkColor = value; @@ -479,7 +479,7 @@ void KopetePrefs::setMaxContactNameLength( int value ) mMaxContactNameLength = value; } -void KopetePrefs::setInterfacePreference(const QString &value) +void KopetePrefs::setInterfacePreference(const TQString &value) { mInterfacePreference = value; } @@ -489,13 +489,13 @@ void KopetePrefs::setChatViewBufferSize( int value ) mChatViewBufferSize = value; } -void KopetePrefs::setHighlightBackground(const QColor &value) +void KopetePrefs::setHighlightBackground(const TQColor &value) { if( value != mHighlightBackground ) mWindowAppearanceChanged = true; mHighlightBackground = value; } -void KopetePrefs::setHighlightForeground(const QColor &value) +void KopetePrefs::setHighlightForeground(const TQColor &value) { if( value != mHighlightForeground ) mWindowAppearanceChanged = true; mHighlightForeground = value; @@ -531,20 +531,20 @@ void KopetePrefs::setShowTray(bool value) } -QString KopetePrefs::fileContents(const QString &path) +TQString KopetePrefs::fileContents(const TQString &path) { - QString contents; - QFile file( path ); + TQString contents; + TQFile file( path ); if ( file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); contents = stream.read(); file.close(); } return contents; } -void KopetePrefs::setIdleContactColor(const QColor &value) +void KopetePrefs::setIdleContactColor(const TQColor &value) { if( value != mIdleContactColor ) mContactListAppearanceChanged = true; mIdleContactColor = value; @@ -555,7 +555,7 @@ void KopetePrefs::setRichText(bool value) mRichText=value; } -void KopetePrefs::setToolTipContents(const QStringList &value) +void KopetePrefs::setToolTipContents(const TQStringList &value) { mToolTipContents=value; } @@ -584,23 +584,23 @@ void KopetePrefs::setContactListUseCustomFonts( bool v ) mContactListUseCustomFonts = v; } -void KopetePrefs::setContactListCustomNormalFont( const QFont & v ) +void KopetePrefs::setContactListCustomNormalFont( const TQFont & v ) { if( v != mContactListNormalFont ) mContactListAppearanceChanged = true; mContactListNormalFont = v; } -void KopetePrefs::setContactListCustomSmallFont( const QFont & v ) +void KopetePrefs::setContactListCustomSmallFont( const TQFont & v ) { if( v != mContactListSmallFont ) mContactListAppearanceChanged = true; mContactListSmallFont = v; } -QFont KopetePrefs::contactListSmallFont() const +TQFont KopetePrefs::contactListSmallFont() const { if ( mContactListUseCustomFonts ) return contactListCustomSmallFont(); - QFont smallFont = KGlobalSettings::generalFont(); + TQFont smallFont = KGlobalSettings::generalFont(); if ( smallFont.pixelSize() != -1 ) smallFont.setPixelSize( (smallFont.pixelSize() * 3) / 4 ); else @@ -608,7 +608,7 @@ QFont KopetePrefs::contactListSmallFont() const return smallFont; } -void KopetePrefs::setContactListGroupNameColor( const QColor & v ) +void KopetePrefs::setContactListGroupNameColor( const TQColor & v ) { if( v != mContactListGroupNameColor ) mContactListAppearanceChanged = true; mContactListGroupNameColor = v; diff --git a/kopete/libkopete/kopeteprefs.h b/kopete/libkopete/kopeteprefs.h index 4a5162ff..4fb4a9e3 100644 --- a/kopete/libkopete/kopeteprefs.h +++ b/kopete/libkopete/kopeteprefs.h @@ -17,10 +17,10 @@ #ifndef __KOPETEPREFS_H__ #define __KOPETEPREFS_H__ -#include <qobject.h> +#include <tqobject.h> #include <kdeversion.h> -#include <qcolor.h> -#include <qfont.h> +#include <tqcolor.h> +#include <tqfont.h> #include "kopete_export.h" @@ -53,7 +53,7 @@ public: */ void save(); - QString iconTheme() const { return mIconTheme; } + TQString iconTheme() const { return mIconTheme; } bool useEmoticons() const { return mUseEmoticons; } bool showOffline() const { return mShowOffline; } bool showEmptyGroups() const { return mShowEmptyGroups; } @@ -79,19 +79,19 @@ public: bool soundIfAway() const { return mSoundIfAway; } int chatViewBufferSize() const { return mChatViewBufferSize; } int rememberedMessages() const { return mRememberedMessages; } - const QColor &highlightBackground() const { return mHighlightBackground; } - const QColor &highlightForeground() const { return mHighlightForeground; } - const QColor &textColor() const { return mTextColor; } - const QColor &bgColor() const { return mBgColor; } - const QColor &linkColor() const { return mLinkColor; } - const QFont &fontFace() const { return mFontFace; } - const QColor &idleContactColor() const { return mIdleContactColor; } + const TQColor &highlightBackground() const { return mHighlightBackground; } + const TQColor &highlightForeground() const { return mHighlightForeground; } + const TQColor &textColor() const { return mTextColor; } + const TQColor &bgColor() const { return mBgColor; } + const TQColor &linkColor() const { return mLinkColor; } + const TQFont &fontFace() const { return mFontFace; } + const TQColor &idleContactColor() const { return mIdleContactColor; } bool highlightEnabled() const { return mHighlightEnabled; } bool bgOverride() const { return mBgOverride; } bool fgOverride() const { return mFgOverride; } bool rtfOverride() const { return mRtfOverride; } - QString interfacePreference() const { return mInterfacePreference; } + TQString interfacePreference() const { return mInterfacePreference; } bool showTray() const { return mShowTray; } bool richText() const { return mRichText; } bool chatWShowSend() const { return mChatWShowSend; } @@ -100,12 +100,12 @@ public: int chatWindowPolicy() const { return mChatWindowPolicy; } //Styles - QString defaultTheme() const { return QString::fromLatin1("Default"); } + TQString defaultTheme() const { return TQString::fromLatin1("Default"); } //for Adium (xhtml+css) - QString stylePath() const { return mStylePath; } - QString styleVariant() const { return mStyleVariant; } + TQString stylePath() const { return mStylePath; } + TQString styleVariant() const { return mStyleVariant; } - QStringList toolTipContents() const { return mToolTipContents; } + TQStringList toolTipContents() const { return mToolTipContents; } /// enum ContactDisplayMode { Classic, RightAligned, Detailed, Yagami, Default = Classic }; @@ -115,10 +115,10 @@ public: ContactDisplayMode contactListDisplayMode() const { return mContactListDisplayMode; } IconDisplayMode contactListIconMode() const { return mContactListIconMode; } bool contactListUseCustomFonts() const { return mContactListUseCustomFonts; } - QFont contactListCustomNormalFont() const { return mContactListNormalFont; } - QFont contactListCustomSmallFont() const { return mContactListSmallFont; } - QFont contactListSmallFont() const; - QColor contactListGroupNameColor() const { return mContactListGroupNameColor; } + TQFont contactListCustomNormalFont() const { return mContactListNormalFont; } + TQFont contactListCustomSmallFont() const { return mContactListSmallFont; } + TQFont contactListSmallFont() const; + TQColor contactListGroupNameColor() const { return mContactListGroupNameColor; } bool contactListAnimation() const { return mContactListAnimation; } bool contactListFading() const { return mContactListFading; } bool contactListFolding() const { return mContactListFolding; } @@ -132,7 +132,7 @@ public: bool emoticonsRequireSpaces() const { return mEmoticonsRequireSpaces; } bool groupConsecutiveMessages() const { return mGroupConsecutiveMessages; } - void setIconTheme(const QString &value); + void setIconTheme(const TQString &value); void setUseEmoticons(bool value); void setShowOffline(bool value); void setShowEmptyGroups(bool value); @@ -156,32 +156,32 @@ public: void setSoundIfAway(bool); void setBeepNotify(bool); void setChatWindowPolicy(int); - void setStylePath(const QString &); - void setStyleVariant(const QString &); + void setStylePath(const TQString &); + void setStyleVariant(const TQString &); void setChatViewBufferSize(int); - void setHighlightBackground(const QColor &); - void setHighlightForeground(const QColor &); + void setHighlightBackground(const TQColor &); + void setHighlightForeground(const TQColor &); void setHighlightEnabled(bool); void setBgOverride(bool); void setFgOverride(bool); void setRtfOverride(bool); - void setInterfacePreference(const QString &viewPlugin); - void setTextColor(const QColor &); - void setBgColor(const QColor &); - void setLinkColor(const QColor &); - void setFontFace(const QFont &); - void setIdleContactColor(const QColor &); + void setInterfacePreference(const TQString &viewPlugin); + void setTextColor(const TQColor &); + void setBgColor(const TQColor &); + void setLinkColor(const TQColor &); + void setFontFace(const TQFont &); + void setIdleContactColor(const TQColor &); void setShowTray(bool); void setRichText(bool); void setRememberedMessages(int); - void setToolTipContents(const QStringList &); + void setToolTipContents(const TQStringList &); void setContactListIndentContacts( bool v ); void setContactListDisplayMode( ContactDisplayMode v ); void setContactListIconMode( IconDisplayMode v ); void setContactListUseCustomFonts( bool v ); - void setContactListCustomNormalFont( const QFont & v ); - void setContactListCustomSmallFont( const QFont & v ); - void setContactListGroupNameColor( const QColor & v ); + void setContactListCustomNormalFont( const TQFont & v ); + void setContactListCustomSmallFont( const TQFont & v ); + void setContactListGroupNameColor( const TQColor & v ); void setContactListAnimation( bool ); void setContactListFading( bool ); void setContactListFolding( bool ); @@ -213,12 +213,12 @@ signals: * Emitted when chat Window Style changed. * @param stylePath New stylePath */ - void styleChanged(const QString &stylePath); + void styleChanged(const TQString &stylePath); /** * Emitted when ChatWindowStyle variant changed. * @param variantPath New variant Path. */ - void styleVariantChanged(const QString &variantPath); + void styleVariantChanged(const TQString &variantPath); private: /** @@ -233,7 +233,7 @@ private: KConfig *config; - QString mIconTheme; + TQString mIconTheme; bool mUseEmoticons; bool mShowOffline; bool mShowEmptyGroups; @@ -258,15 +258,15 @@ private: int mBalloonCloseDelay; bool mSoundIfAway; int mRememberedMessages; - QString mInterfacePreference; + TQString mInterfacePreference; int mChatViewBufferSize; - QColor mHighlightBackground; - QColor mHighlightForeground; - QColor mTextColor; - QColor mBgColor; - QColor mLinkColor; - QFont mFontFace; - QColor mIdleContactColor; + TQColor mHighlightBackground; + TQColor mHighlightForeground; + TQColor mTextColor; + TQColor mBgColor; + TQColor mLinkColor; + TQFont mFontFace; + TQColor mIdleContactColor; bool mHighlightEnabled; bool mBgOverride; bool mFgOverride; @@ -287,20 +287,20 @@ private: // xhtml+css //for Adium (xhtml+css) - QString mStylePath; - QString mStyleVariant; + TQString mStylePath; + TQString mStyleVariant; bool mStylePathChanged; bool mStyleVariantChanged; - QStringList mToolTipContents; + TQStringList mToolTipContents; bool mContactListIndentContacts; ContactDisplayMode mContactListDisplayMode; IconDisplayMode mContactListIconMode; bool mContactListUseCustomFonts; - QFont mContactListNormalFont; - QFont mContactListSmallFont; - QColor mContactListGroupNameColor; + TQFont mContactListNormalFont; + TQFont mContactListSmallFont; + TQColor mContactListGroupNameColor; bool mContactListAnimation; bool mContactListFading; bool mContactListFolding; @@ -311,8 +311,8 @@ private: bool mEmoticonsRequireSpaces; bool mGroupConsecutiveMessages; - QString fileContents(const QString &path); - void _setStylePath (const QString &); + TQString fileContents(const TQString &path); + void _setStylePath (const TQString &); }; #endif // vim: set noet ts=4 sts=4 sw=4: diff --git a/kopete/libkopete/kopeteproperties.cpp b/kopete/libkopete/kopeteproperties.cpp index 9009cd07..3ed9d044 100644 --- a/kopete/libkopete/kopeteproperties.cpp +++ b/kopete/libkopete/kopeteproperties.cpp @@ -18,8 +18,8 @@ #include <kdebug.h> -#include <qdom.h> -#include <qvariant.h> +#include <tqdom.h> +#include <tqvariant.h> #include <typeinfo> namespace Kopete { @@ -34,15 +34,15 @@ void customPropertyDataIncorrectType( const char *name, const std::type_info &fo } template<> -int variantTo<int>(QVariant) { return 0; } +int variantTo<int>(TQVariant) { return 0; } //... -QVariant variantFromXML(const QDomElement&) +TQVariant variantFromXML(const TQDomElement&) { - return QVariant(); + return TQVariant(); } -void variantToXML(QVariant v, QDomElement &) +void variantToXML(TQVariant v, TQDomElement &) { } diff --git a/kopete/libkopete/kopeteproperties.h b/kopete/libkopete/kopeteproperties.h index bfeaedea..24b7536f 100644 --- a/kopete/libkopete/kopeteproperties.h +++ b/kopete/libkopete/kopeteproperties.h @@ -17,7 +17,7 @@ #ifndef KOPETEPROPERTIES_H #define KOPETEPROPERTIES_H -#include <qasciidict.h> +#include <tqasciidict.h> #include <typeinfo> @@ -77,8 +77,8 @@ public: * * \code * SomeParent *propertyContainer = ... - * Property<SomeParent,QString> &myProperty = ... - * QString value = propertyContainer->property(myProperty); + * Property<SomeParent,TQString> &myProperty = ... + * TQString value = propertyContainer->property(myProperty); * propertyContainer->setProperty(myProperty, "hello"); * \endcode * @@ -121,7 +121,7 @@ struct PropertyData */ class PropertyStorage { - typedef QAsciiDict<PropertyData> PropertyDict; + typedef TQAsciiDict<PropertyData> PropertyDict; // setCustomPropertyData can be called on a const object, allowing the // guarantee that DataProperty::data() never returns 0. mutable PropertyDict _storage; @@ -197,9 +197,9 @@ public: template<class Parent> struct UserVisible { - virtual QString userText( Parent * ) = 0; - virtual QString label() = 0; - virtual QString icon() = 0; + virtual TQString userText( Parent * ) = 0; + virtual TQString label() = 0; + virtual TQString icon() = 0; }; /** @@ -209,8 +209,8 @@ struct UserVisible template<class Parent> struct XMLSerializable { - virtual void fromXML( Parent *, const QDomElement & ) = 0; - virtual void toXML( const Parent *, QDomElement & ) = 0; + virtual void fromXML( Parent *, const TQDomElement & ) = 0; + virtual void toXML( const Parent *, TQDomElement & ) = 0; }; /** @@ -220,8 +220,8 @@ struct XMLSerializable template<class Parent> struct StringSerializable { - virtual void fromString( Parent *, const QString & ) = 0; - virtual QString toString( const Parent * ) = 0; + virtual void fromString( Parent *, const TQString & ) = 0; + virtual TQString toString( const Parent * ) = 0; }; //END interfaces @@ -297,12 +297,12 @@ public: */ /** - * Explicitly specialised for all types QVariant supports + * Explicitly specialised for all types TQVariant supports */ -template<class T> T variantTo(QVariant); +template<class T> T variantTo(TQVariant); -QVariant variantFromXML(const QDomElement&); -void variantToXML(QVariant v, QDomElement &); +TQVariant variantFromXML(const TQDomElement&); +void variantToXML(TQVariant v, TQDomElement &); /** * @} @@ -311,7 +311,7 @@ void variantToXML(QVariant v, QDomElement &); /** * @brief Convenience implementation of XMLSerializable in terms of QVariants * - * This class provides XML serialization for data that can be stored in a QVariant. You + * This class provides XML serialization for data that can be stored in a TQVariant. You * will need to multiply-inherit from this class and (usually indirectly) from @ref Property. * * You can combine this class with other convenience classes such as SimpleDataProperty @@ -319,8 +319,8 @@ void variantToXML(QVariant v, QDomElement &); * * \code * class ContactNickNameProperty - * : public SimpleDataProperty<Contact,QString> - * , XMLProperty<ContactNickNameProperty,Contact,QString> + * : public SimpleDataProperty<Contact,TQString> + * , XMLProperty<ContactNickNameProperty,Contact,TQString> * { * public: * const char *name() const { return "nickName"; } @@ -331,13 +331,13 @@ template<class Derived, class Parent, typename Type> class XMLProperty : public XMLSerializable<Parent> { public: - void fromXML( Parent *t, const QDomElement &e ) + void fromXML( Parent *t, const TQDomElement &e ) { static_cast<Derived*>(this)->set(t, variantTo<Type>(variantFromXML(e))); } - void toXML( const Parent *t, QDomElement &e ) + void toXML( const Parent *t, TQDomElement &e ) { - variantToXML(QVariant(static_cast<Derived*>(this)->get(t)),e); + variantToXML(TQVariant(static_cast<Derived*>(this)->get(t)),e); } }; diff --git a/kopete/libkopete/kopeteprotocol.cpp b/kopete/libkopete/kopeteprotocol.cpp index 7854a1a3..e361abf6 100644 --- a/kopete/libkopete/kopeteprotocol.cpp +++ b/kopete/libkopete/kopeteprotocol.cpp @@ -23,7 +23,7 @@ #include <kaction.h> #include <klocale.h> -#include <qdict.h> +#include <tqdict.h> #include "kopeteaccountmanager.h" #include "kopeteaccount.h" @@ -50,7 +50,7 @@ public: Kopete::OnlineStatus accountNotConnectedStatus; }; -Protocol::Protocol( KInstance *instance, QObject *parent, const char *name ) +Protocol::Protocol( KInstance *instance, TQObject *parent, const char *name ) : Plugin( instance, parent, name ) { d = new Private; @@ -58,18 +58,18 @@ Protocol::Protocol( KInstance *instance, QObject *parent, const char *name ) d->mStickFullName = Global::Properties::self()->fullName(); d->unloading = false; d->capabilities = 0; - d->accountNotConnectedStatus = Kopete::OnlineStatus( Kopete::OnlineStatus::Unknown, 0, this, Kopete::OnlineStatus::AccountOffline, QString::fromLatin1( "account_offline_overlay" ), i18n( "Account Offline" ) ); + d->accountNotConnectedStatus = Kopete::OnlineStatus( Kopete::OnlineStatus::Unknown, 0, this, Kopete::OnlineStatus::AccountOffline, TQString::fromLatin1( "account_offline_overlay" ), i18n( "Account Offline" ) ); } Protocol::~Protocol() { // Remove all active accounts - QDict<Account> accounts = AccountManager::self()->accounts( this ); + TQDict<Account> accounts = AccountManager::self()->accounts( this ); if ( !accounts.isEmpty() ) { kdWarning( 14010 ) << k_funcinfo << "Deleting protocol with existing accounts! Did the account unloading go wrong?" << endl; - for( QDictIterator<Account> it( accounts ); it.current() ; ++it ) + for( TQDictIterator<Account> it( accounts ); it.current() ; ++it ) delete *it; } @@ -99,15 +99,15 @@ void Protocol::slotAccountOnlineStatusChanged( Contact *self ) // some protocols change status several times during shutdown. We should only call deleteLater() once disconnect( self, 0, this, 0 ); - connect( self->account(), SIGNAL(accountDestroyed(const Kopete::Account* )), - this, SLOT( slotAccountDestroyed( ) ) ); + connect( self->account(), TQT_SIGNAL(accountDestroyed(const Kopete::Account* )), + this, TQT_SLOT( slotAccountDestroyed( ) ) ); self->account()->deleteLater(); } void Protocol::slotAccountDestroyed( ) { - QDict<Account> dict = AccountManager::self()->accounts( this ); + TQDict<Account> dict = AccountManager::self()->accounts( this ); if ( dict.isEmpty() ) { // While at this point we are still in a stack trace from the destroyed @@ -124,20 +124,20 @@ void Protocol::aboutToUnload() d->unloading = true; // Disconnect all accounts - QDict<Account> accounts = AccountManager::self()->accounts( this ); + TQDict<Account> accounts = AccountManager::self()->accounts( this ); if ( accounts.isEmpty() ) emit readyForUnload(); - else for ( QDictIterator<Account> it( accounts ); it.current() ; ++it ) + else for ( TQDictIterator<Account> it( accounts ); it.current() ; ++it ) { if ( it.current()->myself() && it.current()->myself()->isOnline() ) { kdDebug( 14010 ) << k_funcinfo << it.current()->accountId() << " is still connected, disconnecting..." << endl; - QObject::connect( it.current()->myself(), - SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotAccountOnlineStatusChanged( Kopete::Contact * ) ) ); + TQObject::connect( it.current()->myself(), + TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotAccountOnlineStatusChanged( Kopete::Contact * ) ) ); it.current()->disconnect(); } else @@ -146,8 +146,8 @@ void Protocol::aboutToUnload() kdDebug( 14010 ) << k_funcinfo << it.current()->accountId() << " is already disconnected, deleting..." << endl; - QObject::connect( it.current(), SIGNAL( accountDestroyed( const Kopete::Account* ) ), - this, SLOT( slotAccountDestroyed( ) ) ); + TQObject::connect( it.current(), TQT_SIGNAL( accountDestroyed( const Kopete::Account* ) ), + this, TQT_SLOT( slotAccountDestroyed( ) ) ); it.current()->deleteLater(); } } @@ -157,13 +157,13 @@ void Protocol::aboutToUnload() void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) { - QMap<QString, QString> serializedData, sd; - QMap<QString, QString> addressBookData, ad; - QMap<QString, QString>::Iterator it; + TQMap<TQString, TQString> serializedData, sd; + TQMap<TQString, TQString> addressBookData, ad; + TQMap<TQString, TQString>::Iterator it; //kdDebug( 14010 ) << "Protocol::metaContactAboutToSave: protocol " << pluginId() << ": serializing " << metaContact->displayName() << endl; - QPtrList<Contact> contacts=metaContact->contacts(); + TQPtrList<Contact> contacts=metaContact->contacts(); for (Contact *c=contacts.first() ; c ; c=contacts.next() ) { if( c->protocol()->pluginId() != pluginId() ) @@ -174,14 +174,14 @@ void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) // Preset the contactId and displayName, if the plugin doesn't want to save // them, or use its own format, it can call clear() on the provided list - sd[ QString::fromLatin1( "contactId" ) ] = c->contactId(); + sd[ TQString::fromLatin1( "contactId" ) ] = c->contactId(); //TODO(nick) remove - sd[ QString::fromLatin1( "displayName" ) ] = c->property(Global::Properties::self()->nickName()).value().toString(); + sd[ TQString::fromLatin1( "displayName" ) ] = c->property(Global::Properties::self()->nickName()).value().toString(); if(c->account()) - sd[ QString::fromLatin1( "accountId" ) ] = c->account()->accountId(); + sd[ TQString::fromLatin1( "accountId" ) ] = c->account()->accountId(); // If there's an index field preset it too - QString index = c->protocol()->addressBookIndexField(); + TQString index = c->protocol()->addressBookIndexField(); if( !index.isEmpty() ) ad[ index ] = c->contactId(); @@ -194,11 +194,11 @@ void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) // The Unicode chars E000-F800 are non-printable and reserved for // private use in applications. For more details, see also // http://www.unicode.org/charts/PDF/UE000.pdf. - // Inside libkabc the use of QChar( 0xE000 ) has been standardized + // Inside libkabc the use of TQChar( 0xE000 ) has been standardized // as separator for the string lists, use this also for the 'normal' // serialized data. if( serializedData.contains( it.key() ) ) - serializedData[ it.key() ] = serializedData[ it.key() ] + QChar( 0xE000 ) + it.data(); + serializedData[ it.key() ] = serializedData[ it.key() ] + TQChar( 0xE000 ) + it.data(); else serializedData[ it.key() ] = it.data(); } @@ -206,7 +206,7 @@ void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) for( it = ad.begin(); it != ad.end(); ++it ) { if( addressBookData.contains( it.key() ) ) - addressBookData[ it.key() ] = addressBookData[ it.key() ] + QChar( 0xE000 ) + it.data(); + addressBookData[ it.key() ] = addressBookData[ it.key() ] + TQChar( 0xE000 ) + it.data(); else addressBookData[ it.key() ] = it.data(); } @@ -226,48 +226,48 @@ void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) // we can devise a better API, but with the constantly changing // requirements every time I learn more about kabc I'd better no touch // the API yet - Martijn - if( it.key().startsWith( QString::fromLatin1( "messaging/" ) ) ) + if( it.key().startsWith( TQString::fromLatin1( "messaging/" ) ) ) { - metaContact->setAddressBookField( this, it.key(), QString::fromLatin1( "All" ), it.data() ); + metaContact->setAddressBookField( this, it.key(), TQString::fromLatin1( "All" ), it.data() ); // kdDebug(14010) << k_funcinfo << "metaContact->setAddressBookField( " << this << ", " << it.key() << ", \"All\", " << it.data() << " );" << endl; } else - metaContact->setAddressBookField( this, QString::fromLatin1( "kopete" ), it.key(), it.data() ); + metaContact->setAddressBookField( this, TQString::fromLatin1( "kopete" ), it.key(), it.data() ); } } -void Protocol::deserialize( MetaContact *metaContact, const QMap<QString, QString> &data ) +void Protocol::deserialize( MetaContact *metaContact, const TQMap<TQString, TQString> &data ) { /*kdDebug( 14010 ) << "Protocol::deserialize: protocol " << pluginId() << ": deserializing " << metaContact->displayName() << endl;*/ - QMap<QString, QStringList> serializedData; - QMap<QString, QStringList::Iterator> serializedDataIterators; - QMap<QString, QString>::ConstIterator it; + TQMap<TQString, TQStringList> serializedData; + TQMap<TQString, TQStringList::Iterator> serializedDataIterators; + TQMap<TQString, TQString>::ConstIterator it; for( it = data.begin(); it != data.end(); ++it ) { - serializedData[ it.key() ] = QStringList::split( QChar( 0xE000 ), it.data(), true ); + serializedData[ it.key() ] = TQStringList::split( TQChar( 0xE000 ), it.data(), true ); serializedDataIterators[ it.key() ] = serializedData[ it.key() ].begin(); } - uint count = serializedData[QString::fromLatin1("contactId")].count(); + uint count = serializedData[TQString::fromLatin1("contactId")].count(); // Prepare the independent entries to pass to the plugin's implementation for( uint i = 0; i < count ; i++ ) { - QMap<QString, QString> sd; - QMap<QString, QStringList::Iterator>::Iterator serializedDataIt; + TQMap<TQString, TQString> sd; + TQMap<TQString, TQStringList::Iterator>::Iterator serializedDataIt; for( serializedDataIt = serializedDataIterators.begin(); serializedDataIt != serializedDataIterators.end(); ++serializedDataIt ) { sd[ serializedDataIt.key() ] = *( serializedDataIt.data() ); ++( serializedDataIt.data() ); } - const QString& accountId=sd[ QString::fromLatin1( "accountId" ) ]; + const TQString& accountId=sd[ TQString::fromLatin1( "accountId" ) ]; // myself was allowed in the contactlist in old version of kopete. // But if one keep it on the contactlist now, it may conflict witht he myself metacontact. // So ignore it - if(accountId == sd[ QString::fromLatin1( "contactId" ) ] ) + if(accountId == sd[ TQString::fromLatin1( "contactId" ) ] ) { kdDebug( 14010 ) << k_funcinfo << "Myself contact was on the contactlist.xml for account " << accountId << ". Ignore it" << endl; continue; @@ -282,18 +282,18 @@ void Protocol::deserialize( MetaContact *metaContact, const QMap<QString, QStrin // never notice, since none of the plugins use the address // book data in the deserializer yet, only when serializing. // - Martijn - QMap<QString, QString> ad; - QStringList kabcFields = addressBookFields(); - for( QStringList::Iterator fieldIt = kabcFields.begin(); fieldIt != kabcFields.end(); ++fieldIt ) + TQMap<TQString, TQString> ad; + TQStringList kabcFields = addressBookFields(); + for( TQStringList::Iterator fieldIt = kabcFields.begin(); fieldIt != kabcFields.end(); ++fieldIt ) { // FIXME: This hack is even more ugly, and has the same reasons as the similar // hack in the serialize code. // Once this code is actually capable of talking to kabc this hack // should be removed ASAP! - Martijn - if( ( *fieldIt ).startsWith( QString::fromLatin1( "messaging/" ) ) ) - ad[ *fieldIt ] = metaContact->addressBookField( this, *fieldIt, QString::fromLatin1( "All" ) ); + if( ( *fieldIt ).startsWith( TQString::fromLatin1( "messaging/" ) ) ) + ad[ *fieldIt ] = metaContact->addressBookField( this, *fieldIt, TQString::fromLatin1( "All" ) ); else - ad[ *fieldIt ] = metaContact->addressBookField( this, QString::fromLatin1( "kopete" ), *fieldIt ); + ad[ *fieldIt ] = metaContact->addressBookField( this, TQString::fromLatin1( "kopete" ), *fieldIt ); } // Check if we have an account id. If not we're deserializing a Kopete 0.6 contact @@ -302,10 +302,10 @@ void Protocol::deserialize( MetaContact *metaContact, const QMap<QString, QStrin // who migrate from 0.6, as there's only one account in that case if( accountId.isNull() ) { - QDict<Account> accounts = AccountManager::self()->accounts( this ); + TQDict<Account> accounts = AccountManager::self()->accounts( this ); if ( accounts.count() > 0 ) { - sd[ QString::fromLatin1( "accountId" ) ] = QDictIterator<Account>( accounts ).currentKey(); + sd[ TQString::fromLatin1( "accountId" ) ] = TQDictIterator<Account>( accounts ).currentKey(); } else { @@ -326,8 +326,8 @@ void Protocol::deserialize( MetaContact *metaContact, const QMap<QString, QStrin Contact *Protocol::deserializeContact( MetaContact */*metaContact */, - const QMap<QString, QString> & /* serializedData */, - const QMap<QString, QString> & /* addressBookData */ ) + const TQMap<TQString, TQString> & /* serializedData */, + const TQMap<TQString, TQString> & /* addressBookData */ ) { /* Default implementation does nothing */ return 0; diff --git a/kopete/libkopete/kopeteprotocol.h b/kopete/libkopete/kopeteprotocol.h index 805e00c2..546247cf 100644 --- a/kopete/libkopete/kopeteprotocol.h +++ b/kopete/libkopete/kopeteprotocol.h @@ -62,7 +62,7 @@ class KOPETE_EXPORT Protocol : public Plugin public: /** - * @todo Ideally, the destructor should be protected. but we need it public to allow QPtrList<Protocol> + * @todo Ideally, the destructor should be protected. but we need it public to allow TQPtrList<Protocol> */ virtual ~Protocol(); @@ -78,14 +78,14 @@ public: * * @return The new @ref Account object created by this function */ - virtual Account *createNewAccount( const QString &accountId ) = 0; + virtual Account *createNewAccount( const TQString &accountId ) = 0; /** * @brief Create a new AddContactPage widget to be shown in the Add Contact Wizard. * * @return A new AddContactPage to be shown in the Add Contact Wizard */ - virtual AddContactPage *createAddContactWidget( QWidget *parent, Account *account ) = 0; + virtual AddContactPage *createAddContactWidget( TQWidget *parent, Account *account ) = 0; /** * @brief Create a new KopeteEditAccountWidget @@ -95,7 +95,7 @@ public: * @param account is the KopeteAccount to edit. If it's 0L, then we create a new account * @param parent The parent of the 'to be returned' widget */ - virtual KopeteEditAccountWidget * createEditAccountWidget( Account *account, QWidget *parent ) = 0; + virtual KopeteEditAccountWidget * createEditAccountWidget( Account *account, TQWidget *parent ) = 0; /** @@ -163,7 +163,7 @@ protected: * @param parent The protocol's parent object * @param name The protocol's name */ - Protocol( KInstance *instance, QObject *parent, const char *name ); + Protocol( KInstance *instance, TQObject *parent, const char *name ); /** * @brief Sets the capabilities of this protcol. @@ -224,7 +224,7 @@ public: * * @todo we probably should think to another way to save the contacltist. */ - virtual void deserialize( MetaContact *metaContact, const QMap<QString, QString> &serializedData ); + virtual void deserialize( MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData ); /** * @brief Deserialize a single contact. @@ -242,8 +242,8 @@ public: * @todo we probably should think to another way to save the contacltist. */ virtual Contact *deserializeContact( MetaContact *metaContact, - const QMap<QString, QString> &serializedData, - const QMap<QString, QString> &addressBookData ); + const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> &addressBookData ); diff --git a/kopete/libkopete/kopetesimplemessagehandler.cpp b/kopete/libkopete/kopetesimplemessagehandler.cpp index 3e44520c..a312c2a8 100644 --- a/kopete/libkopete/kopetesimplemessagehandler.cpp +++ b/kopete/libkopete/kopetesimplemessagehandler.cpp @@ -19,7 +19,7 @@ #include <kstaticdeleter.h> -#include <qguardedptr.h> +#include <tqguardedptr.h> namespace Kopete { @@ -31,12 +31,12 @@ class SimpleMessageHandlerFactory::Private public: Message::MessageDirection direction; int position; - QGuardedPtr<QObject> target; + TQGuardedPtr<TQObject> target; const char *slot; }; SimpleMessageHandlerFactory::SimpleMessageHandlerFactory( Message::MessageDirection direction, - int position, QObject *target, const char *slot ) + int position, TQObject *target, const char *slot ) : d( new Private ) { d->direction = direction; @@ -55,7 +55,7 @@ MessageHandler *SimpleMessageHandlerFactory::create( ChatSession */*manager*/, M if ( direction != d->direction ) return 0; MessageHandler *handler = new SimpleMessageHandler; - QObject::connect( handler, SIGNAL( handle( Kopete::Message & ) ), d->target, d->slot ); + TQObject::connect( handler, TQT_SIGNAL( handle( Kopete::Message & ) ), d->target, d->slot ); return handler; } diff --git a/kopete/libkopete/kopetesimplemessagehandler.h b/kopete/libkopete/kopetesimplemessagehandler.h index af6de4ab..9a5fd296 100644 --- a/kopete/libkopete/kopetesimplemessagehandler.h +++ b/kopete/libkopete/kopetesimplemessagehandler.h @@ -45,7 +45,7 @@ public: * @see Kopete::MessageHandlerFactory::filterPosition */ SimpleMessageHandlerFactory( Message::MessageDirection direction, int position, - QObject *target, const char *slot ); + TQObject *target, const char *slot ); ~SimpleMessageHandlerFactory(); /** diff --git a/kopete/libkopete/kopetetask.cpp b/kopete/libkopete/kopetetask.cpp index b7484116..fad469c8 100644 --- a/kopete/libkopete/kopetetask.cpp +++ b/kopete/libkopete/kopetetask.cpp @@ -18,7 +18,7 @@ #include <klocale.h> -#include <qptrlist.h> +#include <tqptrlist.h> namespace Kopete { @@ -33,8 +33,8 @@ public: } Task::Result result; - QString errorMessage; - QPtrList<Task> subtasks; + TQString errorMessage; + TQPtrList<Task> subtasks; }; Task::Task() @@ -52,7 +52,7 @@ bool Task::succeeded() const return d->result == ResultSucceeded; } -const QString &Task::errorString() const +const TQString &Task::errorString() const { return d->errorMessage; } @@ -72,24 +72,24 @@ void Task::abort( int flags ) void Task::addSubtask( Task *task ) { d->subtasks.append( task ); - connect( task, SIGNAL( result( Kopete::Task* ) ), - this, SLOT( slotResult( Kopete::Task* ) ) ); - connect( task, SIGNAL( statusMessage( Kopete::Task*, const QString & ) ), - this, SIGNAL( statusMessage( Kopete::Task*, const QString & ) ) ); + connect( task, TQT_SIGNAL( result( Kopete::Task* ) ), + this, TQT_SLOT( slotResult( Kopete::Task* ) ) ); + connect( task, TQT_SIGNAL( statusMessage( Kopete::Task*, const TQString & ) ), + this, TQT_SIGNAL( statusMessage( Kopete::Task*, const TQString & ) ) ); } void Task::removeSubtask( Task *task, RemoveSubtaskIfLast actionIfLast ) { - disconnect( task, SIGNAL( result( Kopete::Task* ) ), - this, SLOT( slotResult( Kopete::Task* ) ) ); - disconnect( task, SIGNAL( statusMessage( Kopete::Task*, const QString & ) ), - this, SIGNAL( statusMessage( Kopete::Task*, const QString & ) ) ); + disconnect( task, TQT_SIGNAL( result( Kopete::Task* ) ), + this, TQT_SLOT( slotResult( Kopete::Task* ) ) ); + disconnect( task, TQT_SIGNAL( statusMessage( Kopete::Task*, const TQString & ) ), + this, TQT_SIGNAL( statusMessage( Kopete::Task*, const TQString & ) ) ); d->subtasks.remove( task ); if ( d->subtasks.isEmpty() && actionIfLast == IfLastEmitResult ) emitResult( task->succeeded() ? ResultSucceeded : ResultFailed, task->errorString() ); } -void Task::emitResult( Result res, const QString &errorMessage ) +void Task::emitResult( Result res, const TQString &errorMessage ) { d->result = res; d->errorMessage = errorMessage; diff --git a/kopete/libkopete/kopetetask.h b/kopete/libkopete/kopetetask.h index 115e1ebe..5457e1ba 100644 --- a/kopete/libkopete/kopetetask.h +++ b/kopete/libkopete/kopetetask.h @@ -17,7 +17,7 @@ #ifndef KOPETETASK_H #define KOPETETASK_H -#include <qobject.h> +#include <tqobject.h> #include <kdemacros.h> namespace Kopete @@ -29,8 +29,8 @@ namespace Kopete * * \code * Kopete::Task *task = someobject->someoperation( some parameters ); - * connect( task, SIGNAL( result( Kopete::Task * ) ), - * this, SLOT( slotResult( Kopete::Task * ) ) ); + * connect( task, TQT_SIGNAL( result( Kopete::Task * ) ), + * this, TQT_SLOT( slotResult( Kopete::Task * ) ) ); * \endcode * (other connects, specific to the job) * @@ -73,7 +73,7 @@ public: * telling the user that the app is broken, so check with * succeeded() whether there is an error. */ - const QString &errorString() const; + const TQString &errorString() const; /** Flags for the abort() function */ enum AbortFlags { AbortNormal = 0, AbortEmitResult = 1 }; @@ -103,7 +103,7 @@ signals: * @param task the task that emitted this signal * @param message the info message */ - void statusMessage( Kopete::Task *task, const QString &message ); + void statusMessage( Kopete::Task *task, const TQString &message ); protected: /** @@ -135,7 +135,7 @@ protected: * Sets the stored result and error message to @p result and @p errorMessage. * You should call this instead of emitting the result() signal yourself. */ - void emitResult( Result result = ResultSucceeded, const QString &errorMessage = QString::null ); + void emitResult( Result result = ResultSucceeded, const TQString &errorMessage = TQString::null ); protected slots: /** diff --git a/kopete/libkopete/kopetetransfermanager.cpp b/kopete/libkopete/kopetetransfermanager.cpp index 1131cd90..67f2d04f 100644 --- a/kopete/libkopete/kopetetransfermanager.cpp +++ b/kopete/libkopete/kopetetransfermanager.cpp @@ -34,7 +34,7 @@ * Kopete::FileTransferInfo * ***************************/ -Kopete::FileTransferInfo::FileTransferInfo( Kopete::Contact *contact, const QString& file, const unsigned long size, const QString &recipient, KopeteTransferDirection di, const unsigned int id, QString internalId) +Kopete::FileTransferInfo::FileTransferInfo( Kopete::Contact *contact, const TQString& file, const unsigned long size, const TQString &recipient, KopeteTransferDirection di, const unsigned int id, TQString internalId) { mContact = contact; mFile = file; @@ -50,7 +50,7 @@ Kopete::FileTransferInfo::FileTransferInfo( Kopete::Contact *contact, const QSt ***************************/ -Kopete::Transfer::Transfer( const Kopete::FileTransferInfo &kfti, const QString &localFile, bool showProgressInfo) +Kopete::Transfer::Transfer( const Kopete::FileTransferInfo &kfti, const TQString &localFile, bool showProgressInfo) : KIO::Job(showProgressInfo), mInfo(kfti) { KURL targ; targ.setPath( localFile ); @@ -72,7 +72,7 @@ void Kopete::Transfer::init( const KURL &target, bool showProgressInfo ) if( showProgressInfo ) Observer::self()->slotCopying( this, sourceURL(), destinationURL() ); - connect( this, SIGNAL( result( KIO::Job* ) ), SLOT( slotResultEmitted() ) ); + connect( this, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( slotResultEmitted() ) ); setAutoErrorHandlingEnabled( true, 0 ); } @@ -81,14 +81,14 @@ Kopete::Transfer::~Transfer() { } -KURL Kopete::Transfer::displayURL( const Kopete::Contact *contact, const QString &file ) +KURL Kopete::Transfer::displayURL( const Kopete::Contact *contact, const TQString &file ) { KURL url; - url.setProtocol( QString::fromLatin1("kopete") ); + url.setProtocol( TQString::fromLatin1("kopete") ); - QString host; + TQString host; if( !contact ) - host = QString::fromLatin1("unknown origin"); + host = TQString::fromLatin1("unknown origin"); else if( contact->metaContact() ) host = contact->metaContact()->displayName(); else @@ -129,7 +129,7 @@ void Kopete::Transfer::slotComplete() emitResult(); } -void Kopete::Transfer::slotError( int error, const QString &errorText ) +void Kopete::Transfer::slotError( int error, const TQString &errorText ) { m_error = error; m_errorText = errorText; @@ -158,44 +158,44 @@ Kopete::TransferManager* Kopete::TransferManager::transferManager() return s_transferManager; } -Kopete::TransferManager::TransferManager( QObject *parent ) : QObject( parent ) +Kopete::TransferManager::TransferManager( TQObject *parent ) : TQObject( parent ) { nextID = 0; } -Kopete::Transfer* Kopete::TransferManager::addTransfer( Kopete::Contact *contact, const QString& file, const unsigned long size, const QString &recipient , Kopete::FileTransferInfo::KopeteTransferDirection di) +Kopete::Transfer* Kopete::TransferManager::addTransfer( Kopete::Contact *contact, const TQString& file, const unsigned long size, const TQString &recipient , Kopete::FileTransferInfo::KopeteTransferDirection di) { // if (nextID != 0) nextID++; Kopete::FileTransferInfo info(contact, file, size, recipient,di, nextID); Kopete::Transfer *trans = new Kopete::Transfer(info, contact); - connect(trans, SIGNAL(result(KIO::Job *)), this, SLOT(slotComplete(KIO::Job *))); + connect(trans, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotComplete(KIO::Job *))); mTransfersMap.insert(nextID, trans); return trans; } -void Kopete::TransferManager::slotAccepted(const Kopete::FileTransferInfo& info, const QString& filename) +void Kopete::TransferManager::slotAccepted(const Kopete::FileTransferInfo& info, const TQString& filename) { Kopete::Transfer *trans = new Kopete::Transfer(info, filename); - connect(trans, SIGNAL(result(KIO::Job *)), this, SLOT(slotComplete(KIO::Job *))); + connect(trans, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotComplete(KIO::Job *))); mTransfersMap.insert(info.transferId(), trans); emit accepted(trans,filename); } -int Kopete::TransferManager::askIncomingTransfer( Kopete::Contact *contact, const QString& file, const unsigned long size, const QString& description, QString internalId) +int Kopete::TransferManager::askIncomingTransfer( Kopete::Contact *contact, const TQString& file, const unsigned long size, const TQString& description, TQString internalId) { // if (nextID != 0) nextID++; - QString dn= contact ? (contact->metaContact() ? contact->metaContact()->displayName() : contact->contactId()) : i18n("<unknown>"); + TQString dn= contact ? (contact->metaContact() ? contact->metaContact()->displayName() : contact->contactId()) : i18n("<unknown>"); Kopete::FileTransferInfo info(contact, file, size, dn, Kopete::FileTransferInfo::Incoming , nextID , internalId); //FIXME!!! this will not be deleted if it's still open when kopete exits KopeteFileConfirmDialog *diag= new KopeteFileConfirmDialog(info, description , 0 ) ; - connect( diag, SIGNAL( accepted(const Kopete::FileTransferInfo&, const QString&)) , this, SLOT( slotAccepted(const Kopete::FileTransferInfo&, const QString&) ) ); - connect( diag, SIGNAL( refused(const Kopete::FileTransferInfo&)) , this, SIGNAL( refused(const Kopete::FileTransferInfo&) ) ); + connect( diag, TQT_SIGNAL( accepted(const Kopete::FileTransferInfo&, const TQString&)) , this, TQT_SLOT( slotAccepted(const Kopete::FileTransferInfo&, const TQString&) ) ); + connect( diag, TQT_SIGNAL( refused(const Kopete::FileTransferInfo&)) , this, TQT_SIGNAL( refused(const Kopete::FileTransferInfo&) ) ); diag->show(); return nextID; } @@ -214,7 +214,7 @@ void Kopete::TransferManager::slotComplete(KIO::Job *job) emit done(transfer); - for( QMap<unsigned, Kopete::Transfer*>::Iterator it = mTransfersMap.begin(); + for( TQMap<unsigned, Kopete::Transfer*>::Iterator it = mTransfersMap.begin(); it != mTransfersMap.end(); ++it ) { if( it.data() == transfer ) @@ -225,16 +225,16 @@ void Kopete::TransferManager::slotComplete(KIO::Job *job) } } -void Kopete::TransferManager::sendFile( const KURL &file, const QString &fname, unsigned long sz, - bool mustBeLocal, QObject *sendTo, const char *slot ) +void Kopete::TransferManager::sendFile( const KURL &file, const TQString &fname, unsigned long sz, + bool mustBeLocal, TQObject *sendTo, const char *slot ) { KURL url(file); - QString filename; + TQString filename; unsigned int size = 0; //If the file location is null, then get it from a file open dialog if( !url.isValid() ) - url = KFileDialog::getOpenURL( QString::null, QString::fromLatin1("*"), 0l, i18n( "Kopete File Transfer" )); + url = KFileDialog::getOpenURL( TQString::null, TQString::fromLatin1("*"), 0l, i18n( "Kopete File Transfer" )); else { filename = fname; @@ -260,9 +260,9 @@ void Kopete::TransferManager::sendFile( const KURL &file, const QString &fname, } else { - connect( this, SIGNAL(sendFile(const KURL&, const QString&, unsigned int)), sendTo, slot ); + connect( this, TQT_SIGNAL(sendFile(const KURL&, const TQString&, unsigned int)), sendTo, slot ); emit sendFile( url, filename, size ); - disconnect( this, SIGNAL(sendFile(const KURL&, const QString&, unsigned int)), sendTo, slot ); + disconnect( this, TQT_SIGNAL(sendFile(const KURL&, const TQString&, unsigned int)), sendTo, slot ); } } } diff --git a/kopete/libkopete/kopetetransfermanager.h b/kopete/libkopete/kopetetransfermanager.h index f4e7416f..53b2711f 100644 --- a/kopete/libkopete/kopetetransfermanager.h +++ b/kopete/libkopete/kopetetransfermanager.h @@ -19,9 +19,9 @@ #ifndef KOPETEFILETRANSFER_H #define KOPETEFILETRANSFER_H -#include <qobject.h> -#include <qstring.h> -#include <qmap.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqmap.h> #include "kopete_export.h" #include <kio/job.h> @@ -40,23 +40,23 @@ class KOPETE_EXPORT FileTransferInfo public: enum KopeteTransferDirection { Incoming, Outgoing }; - FileTransferInfo( Contact *, const QString&, const unsigned long size, const QString &, KopeteTransferDirection di, const unsigned int id, QString internalId=QString::null); + FileTransferInfo( Contact *, const TQString&, const unsigned long size, const TQString &, KopeteTransferDirection di, const unsigned int id, TQString internalId=TQString::null); ~FileTransferInfo() {} unsigned int transferId() const { return mId; } const Contact* contact() const { return mContact; } - QString file() const { return mFile; } - QString recipient() const { return mRecipient; } + TQString file() const { return mFile; } + TQString recipient() const { return mRecipient; } unsigned long size() const { return mSize; } - QString internalId() const { return m_intId; } + TQString internalId() const { return m_intId; } KopeteTransferDirection direction() const { return mDirection; } private: unsigned long mSize; - QString mRecipient; + TQString mRecipient; unsigned int mId; Contact *mContact; - QString mFile; - QString m_intId; + TQString mFile; + TQString m_intId; KopeteTransferDirection mDirection; }; @@ -77,8 +77,8 @@ public: /** * @brief Adds a file transfer to the Kopete::TransferManager */ - Transfer *addTransfer( Contact *contact, const QString& file, const unsigned long size, const QString &recipient , FileTransferInfo::KopeteTransferDirection di); - int askIncomingTransfer( Contact *contact, const QString& file, const unsigned long size, const QString& description=QString::null, QString internalId=QString::null); + Transfer *addTransfer( Contact *contact, const TQString& file, const unsigned long size, const TQString &recipient , FileTransferInfo::KopeteTransferDirection di); + int askIncomingTransfer( Contact *contact, const TQString& file, const unsigned long size, const TQString& description=TQString::null, TQString internalId=TQString::null); void removeTransfer( unsigned int id ); /** @@ -96,8 +96,8 @@ public: * @param sendTo The object to send the signal to * @param slot The slot to send the signal to. Signature: sendFile(const KURL &file) */ - void sendFile( const KURL &file, const QString &localFile, unsigned long fileSize, - bool mustBeLocal, QObject *sendTo, const char *slot ); + void sendFile( const KURL &file, const TQString &localFile, unsigned long fileSize, + bool mustBeLocal, TQObject *sendTo, const char *slot ); signals: /** @brief Signals the transfer is done. */ @@ -107,24 +107,24 @@ signals: void canceled( Kopete::Transfer* ); /** @brief Signals the transfer has been accepted */ - void accepted(Kopete::Transfer*, const QString &fileName); + void accepted(Kopete::Transfer*, const TQString &fileName); /** @brief Signals the transfer has been rejected */ void refused(const Kopete::FileTransferInfo& ); /** @brief Send a file */ - void sendFile(const KURL &file, const QString &localFile, unsigned int fileSize); + void sendFile(const KURL &file, const TQString &localFile, unsigned int fileSize); private slots: - void slotAccepted(const Kopete::FileTransferInfo&, const QString&); + void slotAccepted(const Kopete::FileTransferInfo&, const TQString&); void slotComplete(KIO::Job*); private: - TransferManager( QObject *parent ); + TransferManager( TQObject *parent ); static TransferManager *s_transferManager; int nextID; - QMap<unsigned int, Transfer *> mTransfersMap; + TQMap<unsigned int, Transfer *> mTransfersMap; }; /** @@ -139,7 +139,7 @@ public: /** * Constructor */ - Transfer( const FileTransferInfo &, const QString &localFile, bool showProgressInfo = true); + Transfer( const FileTransferInfo &, const TQString &localFile, bool showProgressInfo = true); /** * Constructor @@ -185,7 +185,7 @@ public slots: * @param error A member of the KIO::Error enumeration indicating what error occurred. * @param errorText A string to aid understanding of the error, often the offending URL. */ - void slotError( int error, const QString &errorText ); + void slotError( int error, const TQString &errorText ); signals: /** @@ -196,7 +196,7 @@ signals: private: void init( const KURL &, bool ); - static KURL displayURL( const Contact *contact, const QString &file ); + static KURL displayURL( const Contact *contact, const TQString &file ); FileTransferInfo mInfo; KURL mTarget; diff --git a/kopete/libkopete/kopeteuiglobal.cpp b/kopete/libkopete/kopeteuiglobal.cpp index 06c0dfa3..5921d467 100644 --- a/kopete/libkopete/kopeteuiglobal.cpp +++ b/kopete/libkopete/kopeteuiglobal.cpp @@ -17,7 +17,7 @@ #include "kopeteuiglobal.h" -#include <qguardedptr.h> +#include <tqguardedptr.h> namespace Kopete @@ -26,16 +26,16 @@ namespace Kopete namespace { - QGuardedPtr<QWidget> g_mainWidget; + TQGuardedPtr<TQWidget> g_mainWidget; int g_sysTrayWId; } -void UI::Global::setMainWidget( QWidget *widget ) +void UI::Global::setMainWidget( TQWidget *widget ) { g_mainWidget = widget; } -QWidget *UI::Global::mainWidget() +TQWidget *UI::Global::mainWidget() { return g_mainWidget; } diff --git a/kopete/libkopete/kopeteuiglobal.h b/kopete/libkopete/kopeteuiglobal.h index 4a79eb87..7db34189 100644 --- a/kopete/libkopete/kopeteuiglobal.h +++ b/kopete/libkopete/kopeteuiglobal.h @@ -18,7 +18,7 @@ #ifndef KOPETEUIGLOBAL_H #define KOPETEUIGLOBAL_H -#include <qwidget.h> +#include <tqwidget.h> #include "kopete_export.h" @@ -36,12 +36,12 @@ namespace Global /** * Set the main widget to widget */ - KOPETE_EXPORT void setMainWidget( QWidget *widget ); + KOPETE_EXPORT void setMainWidget( TQWidget *widget ); /** * Returns the main widget - this is the widget that message boxes * and KNotify stuff should use as a parent. */ - KOPETE_EXPORT QWidget *mainWidget(); + KOPETE_EXPORT TQWidget *mainWidget(); /** * \brief Returns the WId of the system tray. diff --git a/kopete/libkopete/kopeteutils.cpp b/kopete/libkopete/kopeteutils.cpp index d7d8eb0f..6fe46529 100644 --- a/kopete/libkopete/kopeteutils.cpp +++ b/kopete/libkopete/kopeteutils.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include <qmap.h> +#include <tqmap.h> #include <kmessagebox.h> #include <knotifyclient.h> @@ -35,22 +35,22 @@ #include "kopeteutils.h" #include "kopeteuiglobal.h" -static const QString notifyConnectionLost_DefaultMessage = i18n("You have been disconnected."); -static const QString notifyConnectionLost_DefaultCaption = i18n("Connection Lost."); -static const QString notifyConnectionLost_DefaultExplanation = i18n("Kopete lost the channel used to talk to the instant messaging system.\nThis can be because either your internet access went down, the service is experiencing problems, or the service disconnected you because you tried to connect with the same account from another location. Try connecting again later."); +static const TQString notifyConnectionLost_DefaultMessage = i18n("You have been disconnected."); +static const TQString notifyConnectionLost_DefaultCaption = i18n("Connection Lost."); +static const TQString notifyConnectionLost_DefaultExplanation = i18n("Kopete lost the channel used to talk to the instant messaging system.\nThis can be because either your internet access went down, the service is experiencing problems, or the service disconnected you because you tried to connect with the same account from another location. Try connecting again later."); -static const QString notifyCannotConnect_DefaultMessage = i18n("Can't connect with the instant messaging server or peers."); -static const QString notifyCannotConnect_DefaultCaption = i18n("Can't connect."); -static const QString notifyCannotConnect_DefaultExplanation = i18n("This means Kopete can't reach the instant messaging server or peers.\nThis can be because either your internet access is down or the server is experiencing problems. Try connecting again later."); +static const TQString notifyCannotConnect_DefaultMessage = i18n("Can't connect with the instant messaging server or peers."); +static const TQString notifyCannotConnect_DefaultCaption = i18n("Can't connect."); +static const TQString notifyCannotConnect_DefaultExplanation = i18n("This means Kopete can't reach the instant messaging server or peers.\nThis can be because either your internet access is down or the server is experiencing problems. Try connecting again later."); namespace Kopete { namespace Utils { -void notify( QPixmap pic, const QString &eventid, const QString &caption, const QString &message, const QString explanation, const QString debugInfo) +void notify( TQPixmap pic, const TQString &eventid, const TQString &caption, const TQString &message, const TQString explanation, const TQString debugInfo) { - QString action; + TQString action; if ( !explanation.isEmpty() ) action = i18n( "More Information..." ); kdDebug( 14010 ) << k_funcinfo << endl; @@ -60,63 +60,63 @@ void notify( QPixmap pic, const QString &eventid, const QString &caption, const info.debugInfo = debugInfo; NotifyHelper::self()->registerNotification(n, info); - QObject::connect( n, SIGNAL(activated(unsigned int )) , NotifyHelper::self() , SLOT( slotEventActivated(unsigned int) ) ); - QObject::connect( n, SIGNAL(closed()) , NotifyHelper::self() , SLOT( slotEventClosed() ) ); + TQObject::connect( n, TQT_SIGNAL(activated(unsigned int )) , NotifyHelper::self() , TQT_SLOT( slotEventActivated(unsigned int) ) ); + TQObject::connect( n, TQT_SIGNAL(closed()) , NotifyHelper::self() , TQT_SLOT( slotEventClosed() ) ); } -void notifyConnectionLost( const Account *account, const QString &caption, const QString &message, const QString &explanation, const QString &debugInfo ) +void notifyConnectionLost( const Account *account, const TQString &caption, const TQString &message, const TQString &explanation, const TQString &debugInfo ) { if (!account) return; - notify( account->accountIcon(32), QString::fromLatin1("connection_lost"), caption.isEmpty() ? notifyConnectionLost_DefaultCaption : caption, message.isEmpty() ? notifyConnectionLost_DefaultMessage : message, explanation.isEmpty() ? notifyConnectionLost_DefaultExplanation : explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("connection_lost"), caption.isEmpty() ? notifyConnectionLost_DefaultCaption : caption, message.isEmpty() ? notifyConnectionLost_DefaultMessage : message, explanation.isEmpty() ? notifyConnectionLost_DefaultExplanation : explanation, debugInfo); } -bool isHostReachable(const QString &host) +bool isHostReachable(const TQString &host) { const int NetWorkStatusUnknown = 1; const int NetWorkStatusOnline = 8; - QCString replyType; - QByteArray params; - QByteArray reply; + TQCString replyType; + TQByteArray params; + TQByteArray reply; - QDataStream stream(params, IO_WriteOnly); + TQDataStream stream(params, IO_WriteOnly); stream << host; - if ( KApplication::kApplication()->dcopClient()->call( "kded", "networkstatus", "status(QString)", params, replyType, reply ) && (replyType == "int") ) + if ( KApplication::kApplication()->dcopClient()->call( "kded", "networkstatus", "status(TQString)", params, replyType, reply ) && (replyType == "int") ) { int result; - QDataStream stream2( reply, IO_ReadOnly ); + TQDataStream stream2( reply, IO_ReadOnly ); stream2 >> result; return (result != NetWorkStatusUnknown) && (result != NetWorkStatusOnline); } return false; // On error, assume we are online } -void notifyCannotConnect( const Account *account, const QString &explanation, const QString &debugInfo) +void notifyCannotConnect( const Account *account, const TQString &explanation, const TQString &debugInfo) { if (!account) return; - notify( account->accountIcon(), QString::fromLatin1("cannot_connect"), notifyCannotConnect_DefaultCaption, notifyCannotConnect_DefaultMessage, notifyCannotConnect_DefaultExplanation, debugInfo); + notify( account->accountIcon(), TQString::fromLatin1("cannot_connect"), notifyCannotConnect_DefaultCaption, notifyCannotConnect_DefaultMessage, notifyCannotConnect_DefaultExplanation, debugInfo); } -void notifyConnectionError( const Account *account, const QString &caption, const QString &message, const QString &explanation, const QString &debugInfo ) +void notifyConnectionError( const Account *account, const TQString &caption, const TQString &message, const TQString &explanation, const TQString &debugInfo ) { if (!account) return; // TODO: Display a specific default connection error message, I don't want to introducte too many new strings - notify( account->accountIcon(32), QString::fromLatin1("connection_error"), caption, message, explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("connection_error"), caption, message, explanation, debugInfo); } -void notifyServerError( const Account *account, const QString &caption, const QString &message, const QString &explanation, const QString &debugInfo ) +void notifyServerError( const Account *account, const TQString &caption, const TQString &message, const TQString &explanation, const TQString &debugInfo ) { if (!account) return; // TODO: Display a specific default server error message, I don't want to introducte too many new strings - notify( account->accountIcon(32), QString::fromLatin1("server_error"), caption, message, explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("server_error"), caption, message, explanation, debugInfo); } } // end ns ErrorNotifier diff --git a/kopete/libkopete/kopeteutils.h b/kopete/libkopete/kopeteutils.h index 1cbcb4c3..c90ba054 100644 --- a/kopete/libkopete/kopeteutils.h +++ b/kopete/libkopete/kopeteutils.h @@ -18,9 +18,9 @@ #ifndef KOPETE_UTILS_H #define KOPETE_UTILS_H -#include "qobject.h" -#include "qstring.h" -#include "qpixmap.h" +#include "tqobject.h" +#include "tqstring.h" +#include "tqpixmap.h" #include "kopete_export.h" class KNotification; @@ -38,7 +38,7 @@ namespace Utils * * @param host The host to be cheked */ -bool isHostReachable( const QString &host ); +bool isHostReachable( const TQString &host ); /** * Notifies the user connection has been lost without coupling plugins with GUI code. @@ -53,10 +53,10 @@ bool isHostReachable( const QString &host ); * explanation, Kopete will use a default explanation. */ void KOPETE_EXPORT notifyConnectionLost( const Account *account, - const QString &caption = QString::null, - const QString &message = QString::null, - const QString &explanation = QString::null, - const QString &debugInfo = QString::null ); + const TQString &caption = TQString::null, + const TQString &message = TQString::null, + const TQString &explanation = TQString::null, + const TQString &debugInfo = TQString::null ); /** @@ -70,8 +70,8 @@ void KOPETE_EXPORT notifyConnectionLost( const Account *account, * explanation, Kopete will use a default explanation. */ void KOPETE_EXPORT notifyCannotConnect( const Account *account, - const QString &explanation = QString::null, - const QString &debugInfo = QString::null); + const TQString &explanation = TQString::null, + const TQString &debugInfo = TQString::null); /** * Notifies the user that an error on a connection occcured without coupling plugins with GUI code. @@ -86,10 +86,10 @@ void KOPETE_EXPORT notifyCannotConnect( const Account *account, * explanation, Kopete will use a default explanation. */ void KOPETE_EXPORT notifyConnectionError( const Account *account, - const QString &caption = QString::null, - const QString &message = QString::null, - const QString &explanation = QString::null, - const QString &debugInfo = QString::null ); + const TQString &caption = TQString::null, + const TQString &message = TQString::null, + const TQString &explanation = TQString::null, + const TQString &debugInfo = TQString::null ); /** * Notifies the user that an error on the server occcured without coupling plugins with GUI code. @@ -104,10 +104,10 @@ void KOPETE_EXPORT notifyConnectionError( const Account *account, * explanation, Kopete will use a default explanation. */ void KOPETE_EXPORT notifyServerError( const Account *account, - const QString &caption = QString::null, - const QString &message = QString::null, - const QString &explanation = QString::null, - const QString &debugInfo = QString::null ); + const TQString &caption = TQString::null, + const TQString &message = TQString::null, + const TQString &explanation = TQString::null, + const TQString &debugInfo = TQString::null ); } // end ns Utils } // end ns Kopete diff --git a/kopete/libkopete/kopetewalletmanager.cpp b/kopete/libkopete/kopetewalletmanager.cpp index e1d198fc..f17c73b8 100644 --- a/kopete/libkopete/kopetewalletmanager.cpp +++ b/kopete/libkopete/kopetewalletmanager.cpp @@ -22,13 +22,13 @@ #include <kstaticdeleter.h> #include <kwallet.h> -#include <qtimer.h> -#include <qwidget.h> -#include <qapplication.h> +#include <tqtimer.h> +#include <tqwidget.h> +#include <tqapplication.h> static WId mainWindowID() { - if ( QWidget *w = Kopete::UI::Global::mainWidget() ) + if ( TQWidget *w = Kopete::UI::Global::mainWidget() ) return w->winId(); return 0; } @@ -72,13 +72,13 @@ Kopete::WalletManager *Kopete::WalletManager::self() return s_self; } -void Kopete::WalletManager::openWallet( QObject *object, const char *slot ) +void Kopete::WalletManager::openWallet( TQObject *object, const char *slot ) { if ( !d->signal ) d->signal = new KopeteWalletSignal; // allow connecting to protected slots by calling object->connect - connect( d->signal, SIGNAL( walletOpened( KWallet::Wallet* ) ), object, slot ); - //object->connect( d->signal, SIGNAL( walletOpened( KWallet::Wallet* ) ), slot ); + connect( d->signal, TQT_SIGNAL( walletOpened( KWallet::Wallet* ) ), object, slot ); + //object->connect( d->signal, TQT_SIGNAL( walletOpened( KWallet::Wallet* ) ), slot ); openWalletInner(); } @@ -92,7 +92,7 @@ void Kopete::WalletManager::openWalletInner() if ( d->wallet->isOpen() ) { kdDebug(14010) << k_funcinfo << " wallet already open" << endl; - QTimer::singleShot( 0, this, SLOT( slotGiveExistingWallet() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotGiveExistingWallet() ) ); } else { @@ -107,7 +107,7 @@ void Kopete::WalletManager::openWalletInner() d->wallet = KWallet::Wallet::openWallet( KWallet::Wallet::NetworkWallet(), mainWindowID(), KWallet::Wallet::Asynchronous ); - connect( d->wallet, SIGNAL( walletOpened(bool) ), SLOT( slotWalletChangedStatus() ) ); + connect( d->wallet, TQT_SIGNAL( walletOpened(bool) ), TQT_SLOT( slotWalletChangedStatus() ) ); } void Kopete::WalletManager::slotWalletChangedStatus() @@ -116,13 +116,13 @@ void Kopete::WalletManager::slotWalletChangedStatus() if( d->wallet->isOpen() ) { - if ( !d->wallet->hasFolder( QString::fromLatin1( "Kopete" ) ) ) - d->wallet->createFolder( QString::fromLatin1( "Kopete" ) ); + if ( !d->wallet->hasFolder( TQString::fromLatin1( "Kopete" ) ) ) + d->wallet->createFolder( TQString::fromLatin1( "Kopete" ) ); - if ( d->wallet->setFolder( QString::fromLatin1( "Kopete" ) ) ) + if ( d->wallet->setFolder( TQString::fromLatin1( "Kopete" ) ) ) { // success! - QObject::connect( d->wallet, SIGNAL( walletClosed() ), this, SLOT( closeWallet() ) ); + TQObject::connect( d->wallet, TQT_SIGNAL( walletClosed() ), this, TQT_SLOT( closeWallet() ) ); } else { diff --git a/kopete/libkopete/kopetewalletmanager.h b/kopete/libkopete/kopetewalletmanager.h index fdd3a154..a9ed0971 100644 --- a/kopete/libkopete/kopetewalletmanager.h +++ b/kopete/libkopete/kopetewalletmanager.h @@ -17,7 +17,7 @@ #ifndef KOPETEWALLETMANAGER_H #define KOPETEWALLETMANAGER_H -#include <qobject.h> +#include <tqobject.h> #include <kdemacros.h> @@ -58,7 +58,7 @@ public: * For simplicity of client code, it is guaranteed that your slot * will not be called during a call to this function. */ - void openWallet( QObject *object, const char *slot ); + void openWallet( TQObject *object, const char *slot ); public slots: /** diff --git a/kopete/libkopete/managedconnectionaccount.cpp b/kopete/libkopete/managedconnectionaccount.cpp index 0f1625b2..cf14ed2f 100644 --- a/kopete/libkopete/managedconnectionaccount.cpp +++ b/kopete/libkopete/managedconnectionaccount.cpp @@ -24,17 +24,17 @@ namespace Kopete { -ManagedConnectionAccount::ManagedConnectionAccount( Protocol *parent, const QString &acctId, uint maxPasswordLength, const char *name ) +ManagedConnectionAccount::ManagedConnectionAccount( Protocol *parent, const TQString &acctId, uint maxPasswordLength, const char *name ) : PasswordedAccount( parent, acctId, maxPasswordLength, name ), m_waitingForConnection( false ) { - QObject::connect( ConnectionManager::self(), SIGNAL(statusChanged(const QString&, NetworkStatus::EnumStatus ) ), - SLOT(slotConnectionStatusChanged(const QString&, NetworkStatus::EnumStatus ) ) ); + TQObject::connect( ConnectionManager::self(), TQT_SIGNAL(statusChanged(const TQString&, NetworkStatus::EnumStatus ) ), + TQT_SLOT(slotConnectionStatusChanged(const TQString&, NetworkStatus::EnumStatus ) ) ); } -void ManagedConnectionAccount::connectWithPassword( const QString &password ) +void ManagedConnectionAccount::connectWithPassword( const TQString &password ) { m_password = password; - NetworkStatus::EnumStatus status = ConnectionManager::self()->status( QString::null ); + NetworkStatus::EnumStatus status = ConnectionManager::self()->status( TQString::null ); if ( status == NetworkStatus::NoNetworks ) performConnectWithPassword( password ); else @@ -42,7 +42,7 @@ void ManagedConnectionAccount::connectWithPassword( const QString &password ) m_waitingForConnection = true; // need to adapt libkopete so we know the hostname in this class and whether the connection was user initiated // for now, these are the default parameters to always bring up a connection to "the internet". - NetworkStatus::EnumRequestResult response = ConnectionManager::self()->requestConnection( Kopete::UI::Global::mainWidget(), QString::null, true ); + NetworkStatus::EnumRequestResult response = ConnectionManager::self()->requestConnection( Kopete::UI::Global::mainWidget(), TQString::null, true ); if ( response == NetworkStatus::Connected ) { m_waitingForConnection = false; @@ -53,7 +53,7 @@ void ManagedConnectionAccount::connectWithPassword( const QString &password ) } } -void ManagedConnectionAccount::slotConnectionStatusChanged( const QString & host, NetworkStatus::EnumStatus status ) +void ManagedConnectionAccount::slotConnectionStatusChanged( const TQString & host, NetworkStatus::EnumStatus status ) { Q_UNUSED(host); // as above, we didn't register a hostname, so treat any connection as our own. diff --git a/kopete/libkopete/managedconnectionaccount.h b/kopete/libkopete/managedconnectionaccount.h index ad29feed..7d864dfc 100644 --- a/kopete/libkopete/managedconnectionaccount.h +++ b/kopete/libkopete/managedconnectionaccount.h @@ -44,21 +44,21 @@ class KOPETE_EXPORT ManagedConnectionAccount : public PasswordedAccount * @param maxPasswordLength The maximum length for passwords for this account, or 0 for no limit * @param name The name for this QObject */ - ManagedConnectionAccount( Protocol *parent, const QString &acctId, uint maxPasswordLength = 0, const char *name = 0 ); + ManagedConnectionAccount( Protocol *parent, const TQString &acctId, uint maxPasswordLength = 0, const char *name = 0 ); public slots: /** * @brief Begin the connection process, by checking if the connection is available with the ConnectionManager. * This method is called by PasswordedAccount::connect() * @param password the password to connect with. */ - void connectWithPassword( const QString &password ); + void connectWithPassword( const TQString &password ); protected: /** * @brief Connect to the server, once the network is available. * This method is called by the ManagedConnectionAccount once the network is available. In this method you should set up your * network connection and connect to the server. */ - virtual void performConnectWithPassword( const QString & password ) = 0; + virtual void performConnectWithPassword( const TQString & password ) = 0; protected slots: /** * @brief Handle a change in the network connection @@ -68,9 +68,9 @@ class KOPETE_EXPORT ManagedConnectionAccount : public PasswordedAccount * @param host For future expansion. * @param status the new status of the network */ - virtual void slotConnectionStatusChanged( const QString & host, NetworkStatus::EnumStatus status ); + virtual void slotConnectionStatusChanged( const TQString & host, NetworkStatus::EnumStatus status ); private: - QString m_password; + TQString m_password; bool m_waitingForConnection; }; diff --git a/kopete/libkopete/networkstatuscommon.cpp b/kopete/libkopete/networkstatuscommon.cpp index 216752bd..87c18a14 100644 --- a/kopete/libkopete/networkstatuscommon.cpp +++ b/kopete/libkopete/networkstatuscommon.cpp @@ -1,7 +1,7 @@ #include "networkstatuscommon.h" #include <kdebug.h> -QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p ) +TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p ) { kdDebug() << k_funcinfo << "status is: " << (int)p.status << endl; s << (int)p.status; @@ -12,7 +12,7 @@ QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p ) return s; } -QDataStream & operator>> ( QDataStream & s, NetworkStatus::Properties &p ) +TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p ) { int status, onDemandPolicy, internet; s >> status; diff --git a/kopete/libkopete/networkstatuscommon.h b/kopete/libkopete/networkstatuscommon.h index e6906445..a243be43 100644 --- a/kopete/libkopete/networkstatuscommon.h +++ b/kopete/libkopete/networkstatuscommon.h @@ -1,7 +1,7 @@ #ifndef NETWORKSTATUS_COMMON_H #define NETWORKSTATUS_COMMON_H -#include <qstringlist.h> +#include <tqstringlist.h> namespace NetworkStatus { @@ -10,24 +10,24 @@ namespace NetworkStatus enum EnumOnDemandPolicy { All, User, None, Permanent }; struct Properties { - QString name; + TQString name; // status of the network EnumStatus status; // policy for on-demand usage as defined by the service EnumOnDemandPolicy onDemandPolicy; // identifier for the service - QCString service; + TQCString service; // indicate that the connection is to 'the internet' - similar to default gateway in routing bool internet; // list of netmasks that the network connects to - overridden by above internet - QStringList netmasks; + TQStringList netmasks; // for future expansion consider // EnumChargingModel - FlatRate, TimeCharge, VolumeCharged // EnumLinkStatus - for WLANs - VPOOR, POOR, AVERAGE, GOOD, EXCELLENT }; } -QDataStream & operator>> ( QDataStream & s, NetworkStatus::Properties &p ); -QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p ); +TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p ); +TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p ); #endif diff --git a/kopete/libkopete/private/kopetecommand.cpp b/kopete/libkopete/private/kopetecommand.cpp index 52588f2e..1f8969f6 100644 --- a/kopete/libkopete/private/kopetecommand.cpp +++ b/kopete/libkopete/private/kopetecommand.cpp @@ -13,7 +13,7 @@ ************************************************************************* */ -#include <qstringlist.h> +#include <tqstringlist.h> #include <kapplication.h> #include <kdebug.h> #include <kinputdialog.h> @@ -25,17 +25,17 @@ #include "kopetecommand.h" #include "kopeteuiglobal.h" -Kopete::Command::Command( QObject *parent, const QString &command, const char* handlerSlot, - const QString &help, Kopete::CommandHandler::CommandType type, const QString &formatString, - uint minArgs, int maxArgs, const KShortcut &cut, const QString &pix ) +Kopete::Command::Command( TQObject *parent, const TQString &command, const char* handlerSlot, + const TQString &help, Kopete::CommandHandler::CommandType type, const TQString &formatString, + uint minArgs, int maxArgs, const KShortcut &cut, const TQString &pix ) : KAction( command[0].upper() + command.right( command.length() - 1).lower(), pix, cut, parent, - ( command.lower() + QString::fromLatin1("_command") ).latin1() ) + ( command.lower() + TQString::fromLatin1("_command") ).latin1() ) { init( command, handlerSlot, help, type, formatString, minArgs, maxArgs ); } -void Kopete::Command::init( const QString &command, const char* slot, const QString &help, - Kopete::CommandHandler::CommandType type, const QString &formatString, uint minArgs, int maxArgs ) +void Kopete::Command::init( const TQString &command, const char* slot, const TQString &help, + Kopete::CommandHandler::CommandType type, const TQString &formatString, uint minArgs, int maxArgs ) { m_command = command; m_help = help; @@ -47,18 +47,18 @@ void Kopete::Command::init( const QString &command, const char* slot, const QStr if( m_type == Kopete::CommandHandler::Normal ) { - QObject::connect( this, SIGNAL( handleCommand( const QString &, Kopete::ChatSession *) ), + TQObject::connect( this, TQT_SIGNAL( handleCommand( const TQString &, Kopete::ChatSession *) ), parent(), slot ); } - QObject::connect( this, SIGNAL( activated() ), this, SLOT( slotAction() ) ); + TQObject::connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotAction() ) ); } void Kopete::Command::slotAction() { Kopete::ChatSession *manager = Kopete::ChatSessionManager::self()->activeView()->msgManager(); - QString args; + TQString args; if( m_minArgs > 0 ) { args = KInputDialog::getText( i18n("Enter Arguments"), i18n("Enter the arguments to %1:").arg(m_command) ); @@ -69,9 +69,9 @@ void Kopete::Command::slotAction() processCommand( args, manager, true ); } -void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession *manager, bool gui ) +void Kopete::Command::processCommand( const TQString &args, Kopete::ChatSession *manager, bool gui ) { - QStringList mArgs = Kopete::CommandHandler::parseArguments( args ); + TQStringList mArgs = Kopete::CommandHandler::parseArguments( args ); if( m_processing ) { printError( i18n("Alias \"%1\" expands to itself.").arg( text() ), manager, gui ); @@ -98,12 +98,12 @@ void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession * if( m_type == Kopete::CommandHandler::UserAlias || m_type == Kopete::CommandHandler::SystemAlias ) { - QString formatString = m_formatString; + TQString formatString = m_formatString; // Translate %s to the whole string and %n to current nickname - formatString.replace( QString::fromLatin1("%n"), manager->myself()->nickName() ); - formatString.replace( QString::fromLatin1("%s"), args ); + formatString.replace( TQString::fromLatin1("%n"), manager->myself()->nickName() ); + formatString.replace( TQString::fromLatin1("%s"), args ); // Translate %1..%N to word1..wordN @@ -115,7 +115,7 @@ void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession * kdDebug(14010) << "New Command after processing alias: " << formatString << endl; - Kopete::CommandHandler::commandHandler()->processMessage( QString::fromLatin1("/") + formatString, manager ); + Kopete::CommandHandler::commandHandler()->processMessage( TQString::fromLatin1("/") + formatString, manager ); } else { @@ -125,7 +125,7 @@ void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession * } } -void Kopete::Command::printError( const QString &error, Kopete::ChatSession *manager, bool gui ) const +void Kopete::Command::printError( const TQString &error, Kopete::ChatSession *manager, bool gui ) const { if( gui ) { diff --git a/kopete/libkopete/private/kopetecommand.h b/kopete/libkopete/private/kopetecommand.h index 298872db..6a686f1e 100644 --- a/kopete/libkopete/private/kopetecommand.h +++ b/kopete/libkopete/private/kopetecommand.h @@ -18,7 +18,7 @@ #ifndef __KOPETECOMMAND_H__ #define __KOPETECOMMAND_H__ -#include <qobject.h> +#include <tqobject.h> #include <kaction.h> #include "kopetecommandhandler.h" @@ -38,7 +38,7 @@ class Command : public KAction * @param parent The plugin who owns this command * @param command The command we want to handle, not including the '/' * @param handlerSlot The slot used to handle the command. This slot must - * accept two parameters, a QString of arguments, and a Kopete::ChatSession + * accept two parameters, a TQString of arguments, and a Kopete::ChatSession * pointer to the Manager under which the command was sent. * @param help An optional help string to be shown when the user uses * /help <i>command</i> @@ -49,25 +49,25 @@ class Command : public KAction * @param cut The shortcut for the command * @param pix The icon to use for the command */ - Command( QObject *parent, const QString &command, const char* handlerSlot, - const QString &help = QString::null, CommandHandler::CommandType type = CommandHandler::Normal, const QString &formatString = QString::null, + Command( TQObject *parent, const TQString &command, const char* handlerSlot, + const TQString &help = TQString::null, CommandHandler::CommandType type = CommandHandler::Normal, const TQString &formatString = TQString::null, uint minArgs = 0, int maxArgs = -1, const KShortcut &cut = 0, - const QString &pix = QString::null ); + const TQString &pix = TQString::null ); /** * Process this command */ - void processCommand( const QString &args, ChatSession *manager, bool gui = false ); + void processCommand( const TQString &args, ChatSession *manager, bool gui = false ); /** * Returns the command this object handles */ - const QString &command() const { return m_command; }; + const TQString &command() const { return m_command; }; /** * Returns the help string for this command */ - const QString &help() const { return m_help; }; + const TQString &help() const { return m_help; }; /** * Returns the type of the command @@ -80,7 +80,7 @@ class Command : public KAction * has been handled, all processing on it stops by the command handler * (a command cannot be handled twice) */ - void handleCommand( const QString &args, Kopete::ChatSession *manager ); + void handleCommand( const TQString &args, Kopete::ChatSession *manager ); private slots: /** @@ -89,15 +89,15 @@ class Command : public KAction void slotAction(); private: - void init( const QString &command, const char* slot, const QString &help, - CommandHandler::CommandType type, const QString &formatString, + void init( const TQString &command, const char* slot, const TQString &help, + CommandHandler::CommandType type, const TQString &formatString, uint minArgs, int maxArgs ); - void printError( const QString &error, ChatSession *manager, bool gui = false ) const; + void printError( const TQString &error, ChatSession *manager, bool gui = false ) const; - QString m_command; - QString m_help; - QString m_formatString; + TQString m_command; + TQString m_help; + TQString m_formatString; uint m_minArgs; int m_maxArgs; bool m_processing; diff --git a/kopete/libkopete/private/kopeteemoticons.cpp b/kopete/libkopete/private/kopeteemoticons.cpp index 0b234deb..a2d33341 100644 --- a/kopete/libkopete/private/kopeteemoticons.cpp +++ b/kopete/libkopete/private/kopeteemoticons.cpp @@ -21,11 +21,11 @@ #include "kopeteprefs.h" -#include <qdom.h> -#include <qfile.h> -#include <qstylesheet.h> -#include <qimage.h> -#include <qdatetime.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqstylesheet.h> +#include <tqimage.h> +#include <tqdatetime.h> #include <kapplication.h> #include <kdebug.h> @@ -50,10 +50,10 @@ struct Emoticons::Emoticon Emoticon(){} /* sort by longest to shortest matchText */ bool operator< (const Emoticon &e){ return matchText.length() > e.matchText.length(); } - QString matchText; - QString matchTextEscaped; + TQString matchText; + TQString matchTextEscaped; QString picPath; - QString picHTMLCode; + TQString picHTMLCode; }; /* This is the object we will store each emoticon match in */ @@ -67,13 +67,13 @@ struct Emoticons::EmoticonNode { class Emoticons::Private { public: - QMap<QChar, QValueList<Emoticon> > emoticonMap; - QMap<QString, QStringList> emoticonAndPicList; + TQMap<TQChar, TQValueList<Emoticon> > emoticonMap; + TQMap<TQString, TQStringList> emoticonAndPicList; /** * The current icon theme from KopetePrefs */ - QString theme; + TQString theme; }; @@ -89,19 +89,19 @@ Emoticons *Emoticons::self() } -QString Emoticons::parseEmoticons(const QString& message, ParseMode mode ) //static +TQString Emoticons::parseEmoticons(const TQString& message, ParseMode mode ) //static { return self()->parse( message, mode ); } -QValueList<Emoticons::Token> Emoticons::tokenizeEmoticons( const QString& message, ParseMode mode ) // static +TQValueList<Emoticons::Token> Emoticons::tokenizeEmoticons( const TQString& message, ParseMode mode ) // static { return self()->tokenize( message, mode ); } -QValueList<Emoticons::Token> Emoticons::tokenize( const QString& message, uint mode ) +TQValueList<Emoticons::Token> Emoticons::tokenize( const TQString& message, uint mode ) { - QValueList<Token> result; + TQValueList<Token> result; if ( !KopetePrefs::prefs()->useEmoticons() ) { result.append( Token( Text, message ) ); @@ -115,23 +115,23 @@ QValueList<Emoticons::Token> Emoticons::tokenize( const QString& message, uint m } /* previous char, in the firs iteration assume that it is space since we want - * to let emoticons at the beginning, the very first previous QChar must be a space. */ - QChar p = ' '; - QChar c; /* current char */ - QChar n; /* next character after a match candidate, if strict this should be QChar::null or space */ + * to let emoticons at the beginning, the very first previous TQChar must be a space. */ + TQChar p = ' '; + TQChar c; /* current char */ + TQChar n; /* next character after a match candidate, if strict this should be TQChar::null or space */ /* This is the EmoticonNode container, it will represent each matched emoticon */ - QValueList<EmoticonNode> foundEmoticons; - QValueList<EmoticonNode>::const_iterator found; + TQValueList<EmoticonNode> foundEmoticons; + TQValueList<EmoticonNode>::const_iterator found; /* First-pass, store the matched emoticon locations in foundEmoticons */ - QValueList<Emoticon> emoticonList; - QValueList<Emoticon>::const_iterator it; + TQValueList<Emoticon> emoticonList; + TQValueList<Emoticon>::const_iterator it; size_t pos; bool inHTMLTag = false; bool inHTMLLink = false; bool inHTMLEntity = false; - QString needle; // search for this + TQString needle; // search for this for ( pos = 0; pos < message.length(); pos++ ) { c = message[ pos ]; @@ -271,14 +271,14 @@ QValueList<Emoticons::Token> Emoticons::tokenize( const QString& message, uint m return result; } -Emoticons::Emoticons( const QString &theme ) : QObject( kapp, "KopeteEmoticons" ) +Emoticons::Emoticons( const TQString &theme ) : TQObject( kapp, "KopeteEmoticons" ) { // kdDebug(14010) << "KopeteEmoticons::KopeteEmoticons" << endl; d=new Private; if(theme.isNull()) { initEmoticons(); - connect( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(initEmoticons()) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(initEmoticons()) ); } else { @@ -294,32 +294,32 @@ Emoticons::~Emoticons( ) -void Emoticons::addIfPossible( const QString& filenameNoExt, const QStringList &emoticons ) +void Emoticons::addIfPossible( const TQString& filenameNoExt, const TQStringList &emoticons ) { KStandardDirs *dir = KGlobal::dirs(); - QString pic; + TQString pic; //maybe an extension was given, so try to find the exact file - pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt ); if( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt + QString::fromLatin1( ".mng" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".mng" ) ); if ( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt + QString::fromLatin1( ".png" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".png" ) ); if ( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt + QString::fromLatin1( ".gif" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".gif" ) ); if( !pic.isNull() ) // only add if we found one file { - QPixmap p; - QString result; + TQPixmap p; + TQString result; d->emoticonAndPicList.insert( pic, emoticons ); - for ( QStringList::const_iterator it = emoticons.constBegin(), end = emoticons.constEnd(); + for ( TQStringList::const_iterator it = emoticons.constBegin(), end = emoticons.constEnd(); it != end; ++it ) { - QString matchEscaped=QStyleSheet::escape(*it); + TQString matchEscaped=TQStyleSheet::escape(*it); Emoticon e; e.picPath = pic; @@ -328,15 +328,15 @@ void Emoticons::addIfPossible( const QString& filenameNoExt, const QStringList & // Unless we do so, ChatMessagePart::slotScrollView does not work properly and causing // HTMLPart not to be scrolled to the very last message. p.load( e.picPath ); - result = QString::fromLatin1( "<img align=\"center\" src=\"" ) + + result = TQString::fromLatin1( "<img align=\"center\" src=\"" ) + e.picPath + - QString::fromLatin1( "\" title=\"" ) + + TQString::fromLatin1( "\" title=\"" ) + matchEscaped + - QString::fromLatin1( "\" width=\"" ) + - QString::number( p.width() ) + - QString::fromLatin1( "\" height=\"" ) + - QString::number( p.height() ) + - QString::fromLatin1( "\" />" ); + TQString::fromLatin1( "\" width=\"" ) + + TQString::number( p.width() ) + + TQString::fromLatin1( "\" height=\"" ) + + TQString::number( p.height() ) + + TQString::fromLatin1( "\" />" ); e.picHTMLCode = result; e.matchTextEscaped = matchEscaped; @@ -347,7 +347,7 @@ void Emoticons::addIfPossible( const QString& filenameNoExt, const QStringList & } } -void Emoticons::initEmoticons( const QString &theme ) +void Emoticons::initEmoticons( const TQString &theme ) { if(theme.isNull()) { @@ -365,43 +365,43 @@ void Emoticons::initEmoticons( const QString &theme ) d->emoticonAndPicList.clear(); d->emoticonMap.clear(); - QString filename= KGlobal::dirs()->findResource( "emoticons", d->theme + QString::fromLatin1( "/emoticons.xml" ) ); + TQString filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::fromLatin1( "/emoticons.xml" ) ); if(!filename.isEmpty()) return initEmoticon_emoticonsxml( filename ); - filename= KGlobal::dirs()->findResource( "emoticons", d->theme + QString::fromLatin1( "/icondef.xml" ) ); + filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::fromLatin1( "/icondef.xml" ) ); if(!filename.isEmpty()) return initEmoticon_JEP0038( filename ); kdWarning(14010) << k_funcinfo << "emotiucon XML theme description not found" <<endl; } -void Emoticons::initEmoticon_emoticonsxml( const QString & filename) +void Emoticons::initEmoticon_emoticonsxml( const TQString & filename) { - QDomDocument emoticonMap( QString::fromLatin1( "messaging-emoticon-map" ) ); + TQDomDocument emoticonMap( TQString::fromLatin1( "messaging-emoticon-map" ) ); - QFile mapFile( filename ); + TQFile mapFile( filename ); mapFile.open( IO_ReadOnly ); emoticonMap.setContent( &mapFile ); - QDomElement list = emoticonMap.documentElement(); - QDomNode node = list.firstChild(); + TQDomElement list = emoticonMap.documentElement(); + TQDomNode node = list.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { - if( element.tagName() == QString::fromLatin1( "emoticon" ) ) + if( element.tagName() == TQString::fromLatin1( "emoticon" ) ) { - QString emoticon_file = element.attribute( - QString::fromLatin1( "file" ), QString::null ); - QStringList items; + TQString emoticon_file = element.attribute( + TQString::fromLatin1( "file" ), TQString::null ); + TQStringList items; - QDomNode emoticonNode = node.firstChild(); + TQDomNode emoticonNode = node.firstChild(); while( !emoticonNode.isNull() ) { - QDomElement emoticonElement = emoticonNode.toElement(); + TQDomElement emoticonElement = emoticonNode.toElement(); if( !emoticonElement.isNull() ) { - if( emoticonElement.tagName() == QString::fromLatin1( "string" ) ) + if( emoticonElement.tagName() == TQString::fromLatin1( "string" ) ) { items << emoticonElement.text(); } @@ -430,42 +430,42 @@ void Emoticons::initEmoticon_emoticonsxml( const QString & filename) } -void Emoticons::initEmoticon_JEP0038( const QString & filename) +void Emoticons::initEmoticon_JEP0038( const TQString & filename) { - QDomDocument emoticonMap( QString::fromLatin1( "icondef" ) ); + TQDomDocument emoticonMap( TQString::fromLatin1( "icondef" ) ); - QFile mapFile( filename ); + TQFile mapFile( filename ); mapFile.open( IO_ReadOnly ); emoticonMap.setContent( &mapFile ); - QDomElement list = emoticonMap.documentElement(); - QDomNode node = list.firstChild(); + TQDomElement list = emoticonMap.documentElement(); + TQDomNode node = list.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { - if( element.tagName() == QString::fromLatin1( "icon" ) ) + if( element.tagName() == TQString::fromLatin1( "icon" ) ) { - QStringList items; - QString emoticon_file; + TQStringList items; + TQString emoticon_file; - QDomNode emoticonNode = node.firstChild(); + TQDomNode emoticonNode = node.firstChild(); while( !emoticonNode.isNull() ) { - QDomElement emoticonElement = emoticonNode.toElement(); + TQDomElement emoticonElement = emoticonNode.toElement(); if( !emoticonElement.isNull() ) { - if( emoticonElement.tagName() == QString::fromLatin1( "text" ) ) + if( emoticonElement.tagName() == TQString::fromLatin1( "text" ) ) { //TODO xml:lang items << emoticonElement.text(); } - else if( emoticonElement.tagName() == QString::fromLatin1( "object" ) && emoticon_file.isEmpty() ) + else if( emoticonElement.tagName() == TQString::fromLatin1( "object" ) && emoticon_file.isEmpty() ) { - QString mime= emoticonElement.attribute( - QString::fromLatin1( "mime" ), QString::fromLatin1("image/*") ); - if(mime.startsWith(QString::fromLatin1("image/")) && !mime.endsWith(QString::fromLatin1("/svg+xml"))) + TQString mime= emoticonElement.attribute( + TQString::fromLatin1( "mime" ), TQString::fromLatin1("image/*") ); + if(mime.startsWith(TQString::fromLatin1("image/")) && !mime.endsWith(TQString::fromLatin1("/svg+xml"))) { emoticon_file = emoticonElement.text(); } @@ -503,11 +503,11 @@ void Emoticons::sortEmoticons() { /* sort strings in order of longest to shortest to provide convenient input for greedy matching in the tokenizer */ - QValueList<QChar> keys = d->emoticonMap.keys(); - for ( QValueList<QChar>::const_iterator it = keys.begin(); it != keys.end(); ++it ) + TQValueList<TQChar> keys = d->emoticonMap.keys(); + for ( TQValueList<TQChar>::const_iterator it = keys.begin(); it != keys.end(); ++it ) { - QChar key = (*it); - QValueList<Emoticon> keyValues = d->emoticonMap[key]; + TQChar key = (*it); + TQValueList<Emoticon> keyValues = d->emoticonMap[key]; qHeapSort(keyValues.begin(), keyValues.end()); d->emoticonMap[key] = keyValues; } @@ -516,21 +516,21 @@ void Emoticons::sortEmoticons() -QMap<QString, QStringList> Emoticons::emoticonAndPicList() +TQMap<TQString, TQStringList> Emoticons::emoticonAndPicList() { return d->emoticonAndPicList; } -QString Emoticons::parse( const QString &message, ParseMode mode ) +TQString Emoticons::parse( const TQString &message, ParseMode mode ) { if ( !KopetePrefs::prefs()->useEmoticons() ) return message; - QValueList<Token> tokens = tokenize( message, mode ); - QValueList<Token>::const_iterator token; - QString result; - QPixmap p; + TQValueList<Token> tokens = tokenize( message, mode ); + TQValueList<Token>::const_iterator token; + TQString result; + TQPixmap p; for ( token = tokens.begin(); token != tokens.end(); ++token ) { switch ( (*token).type ) diff --git a/kopete/libkopete/private/kopeteemoticons.h b/kopete/libkopete/private/kopeteemoticons.h index 84fd305a..762a02a0 100644 --- a/kopete/libkopete/private/kopeteemoticons.h +++ b/kopete/libkopete/private/kopeteemoticons.h @@ -18,9 +18,9 @@ #ifndef kopeteemoticons_h__ #define kopeteemoticons_h__ -#include <qobject.h> -#include <qvaluelist.h> -#include <qregexp.h> +#include <tqobject.h> +#include <tqvaluelist.h> +#include <tqregexp.h> #include "kopete_export.h" @@ -35,7 +35,7 @@ public: * chosen by the user. * Instead, use @ref Kopete::Emoticons::self() **/ - Emoticons( const QString &theme = QString::null ); + Emoticons( const TQString &theme = TQString::null ); ~Emoticons( ); @@ -63,10 +63,10 @@ public: * If nicks is provided, they will not be parsed if they * exist in message. */ - static QString parseEmoticons( const QString &message, ParseMode = SkipHTML ) ; + static TQString parseEmoticons( const TQString &message, ParseMode = SkipHTML ) ; - QString parse( const QString &message, ParseMode = SkipHTML ); + TQString parse( const TQString &message, ParseMode = SkipHTML ); /** * TokenType, a token might be an image ( emoticon ) or text. @@ -77,15 +77,15 @@ public: }; /** - * A token consists of a QString text which is either a regular text + * A token consists of a TQString text which is either a regular text * or a path to image depending on the type. * If type is Image the text refers to an image path. * If type is Text the text refers to a regular text. */ struct Token { Token() : type( Undefined ) {} - Token( TokenType t, const QString &m ) : type( t ), text(m) {} - Token( TokenType t, const QString &m, const QString &p, const QString &html ) + Token( TokenType t, const TQString &m ) : type( t ), text(m) {} + Token( TokenType t, const TQString &m, const TQString &p, const TQString &html ) : type( t ), text( m ), picPath( p ), picHTMLCode( html ) {} TokenType type; QString text; @@ -96,9 +96,9 @@ public: /** * Static function which will call tokenize - * @see tokenize( const QString& ) + * @see tokenize( const TQString& ) */ - static QValueList<Token> tokenizeEmoticons( const QString &message, ParseMode mode = DefaultParseMode ); + static TQValueList<Token> tokenizeEmoticons( const TQString &message, ParseMode mode = DefaultParseMode ); /** * Tokenizes an message. @@ -120,17 +120,17 @@ public: * Note: quotation marks are used to emphasize white spaces. * @param message is the message to tokenize * @param mode is a bitmask of ParseMode enum - * @return a QValueList which consiste of ordered tokens of the text. + * @return a TQValueList which consiste of ordered tokens of the text. * @author Engin AYDOGAN < engin@bzzzt.biz > * @since 23-03-05 */ - QValueList<Token> tokenize( const QString &message, uint mode = DefaultParseMode ); + TQValueList<Token> tokenize( const TQString &message, uint mode = DefaultParseMode ); /** * Return all emoticons and the corresponding icon. * (only one emoticon per image) */ - QMap<QString, QStringList> emoticonAndPicList(); + TQMap<TQString, TQStringList> emoticonAndPicList(); public slots: /** @@ -149,19 +149,19 @@ private: * add an emoticon to our mapping if * an animation/pixmap has been found for it **/ - void addIfPossible( const QString& filenameNoExt, const QStringList &emoticons ); + void addIfPossible( const TQString& filenameNoExt, const TQStringList &emoticons ); /** * uses the kopete's emoticons.xml for the theme * @see initEmoticons */ - void initEmoticon_emoticonsxml( const QString & filename); + void initEmoticon_emoticonsxml( const TQString & filename); /** * uses the JEP-0038 xml description for the theme * @see initEmoticons */ - void initEmoticon_JEP0038( const QString & filename); + void initEmoticon_JEP0038( const TQString & filename); /** * sorts emoticons for convenient parsing, which yields greedy matching on @@ -180,7 +180,7 @@ private slots: * Fills the map with paths and emoticons * This needs to be done on every emoticon-theme change **/ - void initEmoticons ( const QString &theme = QString::null ); + void initEmoticons ( const TQString &theme = TQString::null ); }; diff --git a/kopete/libkopete/private/kopeteutils_private.cpp b/kopete/libkopete/private/kopeteutils_private.cpp index 3746bcd3..933a5b11 100644 --- a/kopete/libkopete/private/kopeteutils_private.cpp +++ b/kopete/libkopete/private/kopeteutils_private.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include <qmap.h> +#include <tqmap.h> #include <kmessagebox.h> @@ -49,7 +49,7 @@ NotifyHelper* NotifyHelper::self() void NotifyHelper::slotEventActivated(unsigned int action) { - const KNotification *n = dynamic_cast<const KNotification *>(QObject::sender()); + const KNotification *n = dynamic_cast<const KNotification *>(TQObject::sender()); if (n) { ErrorNotificationInfo info = m_events[n]; @@ -64,7 +64,7 @@ void NotifyHelper::slotEventActivated(unsigned int action) void NotifyHelper::slotEventClosed() { - const KNotification *n = dynamic_cast<const KNotification *>(QObject::sender()); + const KNotification *n = dynamic_cast<const KNotification *>(TQObject::sender()); if (n) unregisterNotification(n); } diff --git a/kopete/libkopete/private/kopeteutils_private.h b/kopete/libkopete/private/kopeteutils_private.h index a684c965..8c780c2f 100644 --- a/kopete/libkopete/private/kopeteutils_private.h +++ b/kopete/libkopete/private/kopeteutils_private.h @@ -18,9 +18,9 @@ #ifndef KOPETE_UTILS_PRIVATE_H #define KOPETE_UTILS_PRIVATE_H -#include "qobject.h" -#include "qstring.h" -#include "qpixmap.h" +#include "tqobject.h" +#include "tqstring.h" +#include "tqpixmap.h" class KNotification; @@ -32,9 +32,9 @@ namespace Utils typedef struct { - QString caption; - QString explanation; - QString debugInfo; + TQString caption; + TQString explanation; + TQString debugInfo; } ErrorNotificationInfo; class NotifyHelper : public QObject @@ -50,7 +50,7 @@ public slots: private: NotifyHelper(); ~NotifyHelper(); - QMap<const KNotification*, ErrorNotificationInfo> m_events; + TQMap<const KNotification*, ErrorNotificationInfo> m_events; static NotifyHelper *s_self; }; diff --git a/kopete/libkopete/private/kopeteviewmanager.cpp b/kopete/libkopete/private/kopeteviewmanager.cpp index c6d295fd..2a6ccb84 100644 --- a/kopete/libkopete/private/kopeteviewmanager.cpp +++ b/kopete/libkopete/private/kopeteviewmanager.cpp @@ -19,8 +19,8 @@ #include <kconfig.h> #include <kdebug.h> #include <klocale.h> -#include <qptrlist.h> -#include <qstylesheet.h> +#include <tqptrlist.h> +#include <tqstylesheet.h> #include <kplugininfo.h> #include <knotification.h> #include <kglobal.h> @@ -39,8 +39,8 @@ #include "kopeteviewmanager.h" -typedef QMap<Kopete::ChatSession*,KopeteView*> ManagerMap; -typedef QPtrList<Kopete::MessageEvent> EventList; +typedef TQMap<Kopete::ChatSession*,KopeteView*> ManagerMap; +typedef TQPtrList<Kopete::MessageEvent> EventList; struct KopeteViewManagerPrivate { @@ -73,13 +73,13 @@ KopeteViewManager::KopeteViewManager() d->activeView = 0L; d->foreignMessage=false; - connect( KopetePrefs::prefs(), SIGNAL( saved() ), this, SLOT( slotPrefsChanged() ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL( saved() ), this, TQT_SLOT( slotPrefsChanged() ) ); - connect( Kopete::ChatSessionManager::self() , SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ), - this, SLOT ( messageAppended( Kopete::Message &, Kopete::ChatSession *) ) ); + connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ), + this, TQT_SLOT ( messageAppended( Kopete::Message &, Kopete::ChatSession *) ) ); - connect( Kopete::ChatSessionManager::self() , SIGNAL( readMessage() ), - this, SLOT ( nextEvent() ) ); + connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL( readMessage() ), + this, TQT_SLOT ( nextEvent() ) ); slotPrefsChanged(); } @@ -106,7 +106,7 @@ void KopeteViewManager::slotPrefsChanged() d->balloonNotifyIgnoreClosesChatView = KopetePrefs::prefs()->balloonNotifyIgnoreClosesChatView(); } -KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString &requestedPlugin ) +KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const TQString &requestedPlugin ) { // kdDebug(14000) << k_funcinfo << endl; @@ -119,7 +119,7 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString Kopete::PluginManager *pluginManager = Kopete::PluginManager::self(); Kopete::ViewPlugin *viewPlugin = 0L; - QString pluginName = requestedPlugin.isEmpty() ? KopetePrefs::prefs()->interfacePreference() : requestedPlugin; + TQString pluginName = requestedPlugin.isEmpty() ? KopetePrefs::prefs()->interfacePreference() : requestedPlugin; if( !pluginName.isEmpty() ) { viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( pluginName ); @@ -132,7 +132,7 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString } if( !viewPlugin ) - viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( QString::fromLatin1("kopete_chatwindow") ); + viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( TQString::fromLatin1("kopete_chatwindow") ); if( viewPlugin ) { @@ -141,8 +141,8 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString d->foreignMessage = false; d->managerMap.insert( session, newView ); - connect( session, SIGNAL( closing(Kopete::ChatSession *) ), - this, SLOT(slotChatSessionDestroyed(Kopete::ChatSession*)) ); + connect( session, TQT_SIGNAL( closing(Kopete::ChatSession *) ), + this, TQT_SLOT(slotChatSessionDestroyed(Kopete::ChatSession*)) ); return newView; } @@ -169,8 +169,8 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi bool appendMessageEvent = d->useQueueOrStack; - QWidget *w; - if( d->queueUnreadMessages && ( w = dynamic_cast<QWidget*>(view( manager )) ) ) + TQWidget *w; + if( d->queueUnreadMessages && ( w = dynamic_cast<TQWidget*>(view( manager )) ) ) { // append msg event to queue if chat window is active but not the chat view in it... appendMessageEvent = appendMessageEvent && !(w->isActiveWindow() && manager->view() == d->activeView); @@ -192,7 +192,7 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi { Kopete::MessageEvent *event=new Kopete::MessageEvent(msg,manager); d->eventList.append( event ); - connect(event, SIGNAL(done(Kopete::MessageEvent *)), this, SLOT(slotEventDeleted(Kopete::MessageEvent *))); + connect(event, TQT_SIGNAL(done(Kopete::MessageEvent *)), this, TQT_SLOT(slotEventDeleted(Kopete::MessageEvent *))); Kopete::ChatSessionManager::self()->postNewEvent(event); } } @@ -204,42 +204,42 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi if ( !outgoingMessage && ( !manager->account()->isAway() || KopetePrefs::prefs()->soundIfAway() ) && msg.direction() != Kopete::Message::Internal ) { - QWidget *w=dynamic_cast<QWidget*>(manager->view(false)); + TQWidget *w=dynamic_cast<TQWidget*>(manager->view(false)); KConfig *config = KGlobal::config(); config->setGroup("General"); if( (!manager->view(false) || !w || manager->view() != d->activeView || config->readBoolEntry("EventIfActive", true) || !w->isActiveWindow()) && msg.from()) { - QString msgFrom = QString::null; + TQString msgFrom = TQString::null; if( msg.from()->metaContact() ) msgFrom = msg.from()->metaContact()->displayName(); else msgFrom = msg.from()->contactId(); - QString msgText = msg.plainBody(); + TQString msgText = msg.plainBody(); if( msgText.length() > 90 ) - msgText = msgText.left(88) + QString::fromLatin1("..."); + msgText = msgText.left(88) + TQString::fromLatin1("..."); - QString event; - QString body =i18n( "<qt>Incoming message from %1<br>\"%2\"</qt>" ); + TQString event; + TQString body =i18n( "<qt>Incoming message from %1<br>\"%2\"</qt>" ); switch( msg.importance() ) { case Kopete::Message::Low: - event = QString::fromLatin1( "kopete_contact_lowpriority" ); + event = TQString::fromLatin1( "kopete_contact_lowpriority" ); break; case Kopete::Message::Highlight: - event = QString::fromLatin1( "kopete_contact_highlight" ); + event = TQString::fromLatin1( "kopete_contact_highlight" ); body = i18n( "<qt>A highlighted message arrived from %1<br>\"%2\"</qt>" ); break; default: - event = QString::fromLatin1( "kopete_contact_incoming" ); + event = TQString::fromLatin1( "kopete_contact_incoming" ); } - KNotification *notify=KNotification::event(msg.from()->metaContact() , event, body.arg( QStyleSheet::escape(msgFrom), QStyleSheet::escape(msgText) ), 0, /*msg.from()->metaContact(),*/ + KNotification *notify=KNotification::event(msg.from()->metaContact() , event, body.arg( TQStyleSheet::escape(msgFrom), TQStyleSheet::escape(msgText) ), 0, /*msg.from()->metaContact(),*/ w , i18n("View") ); - connect(notify,SIGNAL(activated(unsigned int )), manager , SLOT(raiseView()) ); + connect(notify,TQT_SIGNAL(activated(unsigned int )), manager , TQT_SLOT(raiseView()) ); } } } @@ -256,7 +256,7 @@ void KopeteViewManager::readMessages( Kopete::ChatSession *manager, bool outgoin else if( !thisView->isVisible() ) thisView->makeVisible(); - QPtrListIterator<Kopete::MessageEvent> it( d->eventList ); + TQPtrListIterator<Kopete::MessageEvent> it( d->eventList ); Kopete::MessageEvent* event; while ( ( event = it.current() ) != 0 ) { @@ -285,7 +285,7 @@ void KopeteViewManager::slotEventDeleted( Kopete::MessageEvent *event ) else if ( event->state() == Kopete::MessageEvent::Ignored && d->balloonNotifyIgnoreClosesChatView ) { bool bAnotherWithThisManager = false; - for( QPtrListIterator<Kopete::MessageEvent> it( d->eventList ); it; ++it ) + for( TQPtrListIterator<Kopete::MessageEvent> it( d->eventList ); it; ++it ) { Kopete::MessageEvent *event = it.current(); if ( event->message().manager() == kmm ) @@ -314,7 +314,7 @@ void KopeteViewManager::slotViewActivated( KopeteView *view ) // kdDebug( 14000 ) << k_funcinfo << endl; d->activeView = view; - QPtrListIterator<Kopete::MessageEvent> it ( d->eventList ); + TQPtrListIterator<Kopete::MessageEvent> it ( d->eventList ); Kopete::MessageEvent* event; while ( ( event = it.current() ) != 0 ) { diff --git a/kopete/libkopete/private/kopeteviewmanager.h b/kopete/libkopete/private/kopeteviewmanager.h index b1706906..f6b29e98 100644 --- a/kopete/libkopete/private/kopeteviewmanager.h +++ b/kopete/libkopete/private/kopeteviewmanager.h @@ -54,7 +54,7 @@ class KOPETE_EXPORT KopeteViewManager : public QObject * @param session The Kopete::ChatSession we are viewing. * @param requestedPlugin Specifies the view plugin to use. */ - KopeteView *view( Kopete::ChatSession *session, const QString &requestedPlugin = QString::null ); + KopeteView *view( Kopete::ChatSession *session, const TQString &requestedPlugin = TQString::null ); /** * Provide access to the list of KopeteChatWindow the class maintains. diff --git a/kopete/libkopete/tests/kopetecontactlist_test.cpp b/kopete/libkopete/tests/kopetecontactlist_test.cpp index 001f3f0d..7b21d407 100644 --- a/kopete/libkopete/tests/kopetecontactlist_test.cpp +++ b/kopete/libkopete/tests/kopetecontactlist_test.cpp @@ -15,8 +15,8 @@ ************************************************************************* */ -#include <qfile.h> -#include <qdir.h> +#include <tqfile.h> +#include <tqdir.h> #include <kstandarddirs.h> #include <kunittest/module.h> #include "kopetecontactlist_test.h" @@ -34,13 +34,13 @@ void KopeteContactList_Test::allTests() void KopeteContactList_Test::testSomething() { // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); - QString filename = locateLocal( "appdata", QString::fromLatin1( "contactlist.xml" ) ); + TQString filename = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) ); if( ! filename.isEmpty() ) { // previous test run, delete the previous contact list - bool removed = QFile::remove(filename); + bool removed = TQFile::remove(filename); // if we cant remove the file, abort test if (!removed) return; diff --git a/kopete/libkopete/tests/kopeteemoticontest.cpp b/kopete/libkopete/tests/kopeteemoticontest.cpp index e9a81c1d..a64aee99 100644 --- a/kopete/libkopete/tests/kopeteemoticontest.cpp +++ b/kopete/libkopete/tests/kopeteemoticontest.cpp @@ -18,9 +18,9 @@ #include <stdlib.h> -#include <qstring.h> -#include <qdir.h> -#include <qfile.h> +#include <tqstring.h> +#include <tqdir.h> +#include <tqfile.h> #include <kapplication.h> #include <kglobal.h> @@ -51,7 +51,7 @@ KUNITTEST_MODULE_REGISTER_TESTER( KopeteEmoticonTest ); void KopeteEmoticonTest::allTests() { // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); //KApplication::disableAutoDcopRegistration(); //KApplication app; @@ -62,19 +62,19 @@ void KopeteEmoticonTest::allTests() void KopeteEmoticonTest::testEmoticonParser() { Kopete::Emoticons emo("Default"); - QString basePath = QString::fromLatin1( SRCDIR ) + QString::fromLatin1("/emoticon-parser-testcases"); - QDir testCasesDir(basePath); + TQString basePath = TQString::fromLatin1( SRCDIR ) + TQString::fromLatin1("/emoticon-parser-testcases"); + TQDir testCasesDir(basePath); - QStringList inputFileNames = testCasesDir.entryList("*.input"); - for ( QStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) + TQStringList inputFileNames = testCasesDir.entryList("*.input"); + for ( TQStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) { - QString fileName = *it; + TQString fileName = *it; kdDebug() << "testcase: " << fileName << endl; - QString outputFileName = fileName; + TQString outputFileName = fileName; outputFileName.replace("input","output"); // open the input file - QFile inputFile(basePath + QString::fromLatin1("/") + fileName); - QFile expectedFile(basePath + QString::fromLatin1("/") + outputFileName); + TQFile inputFile(basePath + TQString::fromLatin1("/") + fileName); + TQFile expectedFile(basePath + TQString::fromLatin1("/") + outputFileName); // check if the expected output file exists // if it doesn't, skip the testcase if ( ! expectedFile.exists() ) @@ -84,29 +84,29 @@ void KopeteEmoticonTest::testEmoticonParser() } if ( inputFile.open( IO_ReadOnly ) && expectedFile.open( IO_ReadOnly )) { - QTextStream inputStream(&inputFile); - QTextStream expectedStream(&expectedFile); - QString inputData; - QString expectedData; + TQTextStream inputStream(&inputFile); + TQTextStream expectedStream(&expectedFile); + TQString inputData; + TQString expectedData; inputData = inputStream.read(); expectedData = expectedStream.read(); inputFile.close(); expectedFile.close(); - QString path = KGlobal::dirs()->findResource( "emoticons", "Default/smile.png" ).replace( "smile.png", QString::null ); + TQString path = KGlobal::dirs()->findResource( "emoticons", "Default/smile.png" ).replace( "smile.png", TQString::null ); Kopete::Emoticons::self(); - QString result = emo.parse( inputData ).replace( path, QString::null ); + TQString result = emo.parse( inputData ).replace( path, TQString::null ); // HACK to know the test case we applied, concatenate testcase name to both // input and expected string. WIll remove when I can add some sort of metadata // to a CHECK so debug its origin testcase - result = fileName + QString::fromLatin1(": ") + result; - expectedData = fileName + QString::fromLatin1(": ") + expectedData; + result = fileName + TQString::fromLatin1(": ") + result; + expectedData = fileName + TQString::fromLatin1(": ") + expectedData; // if the test case begins with broken, we expect it to fail, then use XFAIL // otherwise use CHECK - if ( fileName.section("-", 0, 0) == QString::fromLatin1("broken") ) + if ( fileName.section("-", 0, 0) == TQString::fromLatin1("broken") ) { kdDebug() << "checking known-broken testcase: " << fileName << endl; XFAIL(result, expectedData); diff --git a/kopete/libkopete/tests/kopetemessage_test.cpp b/kopete/libkopete/tests/kopetemessage_test.cpp index 1ca57123..3e4a85b3 100644 --- a/kopete/libkopete/tests/kopetemessage_test.cpp +++ b/kopete/libkopete/tests/kopetemessage_test.cpp @@ -19,8 +19,8 @@ #include <stdlib.h> -#include <qdir.h> -#include <qfile.h> +#include <tqdir.h> +#include <tqfile.h> #include <kapplication.h> #include <kstandarddirs.h> #include <kinstance.h> @@ -50,16 +50,16 @@ KUNITTEST_MODULE_REGISTER_TESTER( KopeteMessage_Test ); KopeteMessage_Test::KopeteMessage_Test() { // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); // create fake objects needed to build a reasonable testeable message - m_protocol = new Kopete::Test::Mock::Protocol( new KInstance(QCString("test-kopete-message")), 0L, "test-kopete-message"); + m_protocol = new Kopete::Test::Mock::Protocol( new KInstance(TQCString("test-kopete-message")), 0L, "test-kopete-message"); m_account = new Kopete::Test::Mock::Account(m_protocol, "testaccount"); m_metaContactMyself = new Kopete::Test::Mock::MetaContact(); m_metaContactOther = new Kopete::Test::Mock::MetaContact(); - m_contactFrom = new Kopete::Test::Mock::Contact(m_account, QString::fromLatin1("test-myself"), m_metaContactMyself, QString::null); - m_contactTo = new Kopete::Test::Mock::Contact(m_account, QString::fromLatin1("test-dest"), m_metaContactOther, QString::null); - m_message = new Kopete::Message( m_contactFrom, m_contactTo, QString::null, Kopete::Message::Outbound, Kopete::Message::PlainText); + m_contactFrom = new Kopete::Test::Mock::Contact(m_account, TQString::fromLatin1("test-myself"), m_metaContactMyself, TQString::null); + m_contactTo = new Kopete::Test::Mock::Contact(m_account, TQString::fromLatin1("test-dest"), m_metaContactOther, TQString::null); + m_message = new Kopete::Message( m_contactFrom, m_contactTo, TQString::null, Kopete::Message::Outbound, Kopete::Message::PlainText); } void KopeteMessage_Test::allTests() @@ -120,7 +120,7 @@ void KopeteMessage_Test::testPrimitives() CHECK(Kopete::Message::RichText, msg.format()); } { - QString m = "foobar"; + TQString m = "foobar"; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::RichText); msg.setBody(m, Kopete::Message::PlainText); @@ -142,64 +142,64 @@ void KopeteMessage_Test::testPrimitives() *********************************************/ { - QString m = "foobar"; + TQString m = "foobar"; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::RichText); msg.setBody("NEW", Kopete::Message::PlainText); - CHECK(QString("NEW"), msg.plainBody()); + CHECK(TQString("NEW"), msg.plainBody()); msg.setBody("NEW_NEW", Kopete::Message::RichText); - CHECK(QString("NEW_NEW"), msg.plainBody()); + CHECK(TQString("NEW_NEW"), msg.plainBody()); } { - QString m = "foobar"; + TQString m = "foobar"; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::PlainText); msg.setBody("NEW", Kopete::Message::PlainText); - CHECK(QString("NEW"), msg.plainBody()); + CHECK(TQString("NEW"), msg.plainBody()); msg.setBody("NEW_NEW", Kopete::Message::RichText); - CHECK(QString("NEW_NEW"), msg.plainBody()); + CHECK(TQString("NEW_NEW"), msg.plainBody()); } { - QString m = "<html><head></head><body foo=\"bar\"> <b>HELLO WORLD</b> </body></html>"; + TQString m = "<html><head></head><body foo=\"bar\"> <b>HELLO WORLD</b> </body></html>"; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::PlainText); CHECK(m, msg.plainBody()); msg.setBody("<simple> SIMPLE", Kopete::Message::PlainText); - CHECK(msg.plainBody(), QString("<simple> SIMPLE") ); - CHECK(msg.escapedBody(), QString("<simple> SIMPLE") ); + CHECK(msg.plainBody(), TQString("<simple> SIMPLE") ); + CHECK(msg.escapedBody(), TQString("<simple> SIMPLE") ); msg.setBody("<simple>SIMPLE</simple>", Kopete::Message::RichText); - CHECK(msg.plainBody(), QString("SIMPLE") ); - CHECK(msg.escapedBody(), QString("<simple>SIMPLE</simple>") ); + CHECK(msg.plainBody(), TQString("SIMPLE") ); + CHECK(msg.escapedBody(), TQString("<simple>SIMPLE</simple>") ); - CHECK(Kopete::Message::unescape( QString( "<simple>SIMPLE</simple>" ) ), QString("SIMPLE") ); - CHECK(Kopete::Message::unescape( QString( "Foo <img src=\"foo.png\" />" ) ), QString("Foo ") ); - CHECK(Kopete::Message::unescape( QString( "Foo <img src=\"foo.png\" title=\"Bar\" />" ) ), QString("Foo Bar") ); + CHECK(Kopete::Message::unescape( TQString( "<simple>SIMPLE</simple>" ) ), TQString("SIMPLE") ); + CHECK(Kopete::Message::unescape( TQString( "Foo <img src=\"foo.png\" />" ) ), TQString("Foo ") ); + CHECK(Kopete::Message::unescape( TQString( "Foo <img src=\"foo.png\" title=\"Bar\" />" ) ), TQString("Foo Bar") ); msg.setBody(m, Kopete::Message::RichText); // FIXME: Should setBody() also strip extra white space? - //CHECK(msg.plainBody(), QString("HELLO WORLD")); - //CHECK(msg.escapedBody(), QString("<b>HELLO WORLD</b>")); + //CHECK(msg.plainBody(), TQString("HELLO WORLD")); + //CHECK(msg.escapedBody(), TQString("<b>HELLO WORLD</b>")); - CHECK(msg.escapedBody(), QString(" <b>HELLO WORLD</b> ")); - CHECK(msg.plainBody(), QString(" HELLO WORLD ")); - CHECK(msg.plainBody().stripWhiteSpace(), QString("HELLO WORLD")); - CHECK(msg.escapedBody().stripWhiteSpace(), QString(" <b>HELLO WORLD</b> ")); + CHECK(msg.escapedBody(), TQString(" <b>HELLO WORLD</b> ")); + CHECK(msg.plainBody(), TQString(" HELLO WORLD ")); + CHECK(msg.plainBody().stripWhiteSpace(), TQString("HELLO WORLD")); + CHECK(msg.escapedBody().stripWhiteSpace(), TQString(" <b>HELLO WORLD</b> ")); } { Kopete::Message msg( m_contactFrom, m_contactTo, "foo", Kopete::Message::Inbound, Kopete::Message::PlainText); msg.setBody("<p>foo", Kopete::Message::RichText); - CHECK(msg.escapedBody(), QString("foo")); + CHECK(msg.escapedBody(), TQString("foo")); msg.setBody("<p>foo</p>", Kopete::Message::RichText); - CHECK(msg.escapedBody(), QString("foo")); + CHECK(msg.escapedBody(), TQString("foo")); msg.setBody("\n<p>foo</p>\n<br/>", Kopete::Message::RichText); - CHECK(msg.escapedBody(), QString("foo<br/>")); + CHECK(msg.escapedBody(), TQString("foo<br/>")); } /********************************************** @@ -214,8 +214,8 @@ void KopeteMessage_Test::testPrimitives() CHECK(msg1.escapedBody(), msg2.escapedBody()); msg1.setBody("NEW", Kopete::Message::PlainText); - CHECK(msg1.plainBody(), QString("NEW")); - CHECK(msg2.plainBody(), QString("foo")); + CHECK(msg1.plainBody(), TQString("NEW")); + CHECK(msg2.plainBody(), TQString("foo")); } /********************************************** @@ -227,7 +227,7 @@ void KopeteMessage_Test::testPrimitives() { Kopete::Message msg2; - CHECK(msg2.plainBody(), QString::null); + CHECK(msg2.plainBody(), TQString::null); msg2 = msg1; @@ -235,13 +235,13 @@ void KopeteMessage_Test::testPrimitives() CHECK(msg1.escapedBody(), msg2.escapedBody()); msg1.setBody("NEW", Kopete::Message::PlainText); - CHECK(msg1.plainBody(), QString("NEW")); - CHECK(msg2.plainBody(), QString("foo")); + CHECK(msg1.plainBody(), TQString("NEW")); + CHECK(msg2.plainBody(), TQString("foo")); } - CHECK(msg1.plainBody(), QString("NEW")); + CHECK(msg1.plainBody(), TQString("NEW")); msg1 = msg1; - CHECK(msg1.plainBody(), QString("NEW")); + CHECK(msg1.plainBody(), TQString("NEW")); } } @@ -251,18 +251,18 @@ void KopeteMessage_Test::setup() void KopeteMessage_Test::testLinkParser() { - QString basePath = QString::fromLatin1( SRCDIR ) + QString::fromLatin1("/link-parser-testcases"); - QDir testCasesDir(basePath); + TQString basePath = TQString::fromLatin1( SRCDIR ) + TQString::fromLatin1("/link-parser-testcases"); + TQDir testCasesDir(basePath); - QStringList inputFileNames = testCasesDir.entryList("*.input"); - for ( QStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) + TQStringList inputFileNames = testCasesDir.entryList("*.input"); + for ( TQStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) { - QString fileName = *it; - QString outputFileName = fileName; + TQString fileName = *it; + TQString outputFileName = fileName; outputFileName.replace("input","output"); // open the input file - QFile inputFile(basePath + QString::fromLatin1("/") + fileName); - QFile expectedFile(basePath + QString::fromLatin1("/") + outputFileName); + TQFile inputFile(basePath + TQString::fromLatin1("/") + fileName); + TQFile expectedFile(basePath + TQString::fromLatin1("/") + outputFileName); // check if the expected output file exists // if it doesn't, skip the testcase if ( ! expectedFile.exists() ) @@ -272,10 +272,10 @@ void KopeteMessage_Test::testLinkParser() } if ( inputFile.open( IO_ReadOnly ) && expectedFile.open( IO_ReadOnly )) { - QTextStream inputStream(&inputFile); - QTextStream expectedStream(&expectedFile); - QString inputData; - QString expectedData; + TQTextStream inputStream(&inputFile); + TQTextStream expectedStream(&expectedFile); + TQString inputData; + TQString expectedData; inputData = inputStream.read(); expectedData = expectedStream.read(); @@ -288,21 +288,21 @@ void KopeteMessage_Test::testLinkParser() // set message format for parsing according to textcase filename convention Kopete::Message::MessageFormat format; - if ( fileName.section("-", 1, 1) == QString::fromLatin1("plaintext") ) + if ( fileName.section("-", 1, 1) == TQString::fromLatin1("plaintext") ) format = Kopete::Message::PlainText; else format = Kopete::Message::RichText; - QString result = Kopete::Message::parseLinks( inputData, format ); + TQString result = Kopete::Message::parseLinks( inputData, format ); // HACK to know the test case we applied, concatenate testcase name to both // input and expected string. WIll remove when I can add some sort of metadata // to a CHECK so debug its origin testcase - result = fileName + QString::fromLatin1(": ") + result; - expectedData = fileName + QString::fromLatin1(": ") + expectedData; + result = fileName + TQString::fromLatin1(": ") + result; + expectedData = fileName + TQString::fromLatin1(": ") + expectedData; // if the test case begins with broken, we expect it to fail, then use XFAIL // otherwise use CHECK - if ( fileName.section("-", 0, 0) == QString::fromLatin1("broken") ) + if ( fileName.section("-", 0, 0) == TQString::fromLatin1("broken") ) { //kdDebug() << "checking known-broken testcase: " << fileName << endl; XFAIL(result, expectedData); diff --git a/kopete/libkopete/tests/kopetepasswordtest_program.cpp b/kopete/libkopete/tests/kopetepasswordtest_program.cpp index a1f3a50e..51b8908a 100644 --- a/kopete/libkopete/tests/kopetepasswordtest_program.cpp +++ b/kopete/libkopete/tests/kopetepasswordtest_program.cpp @@ -17,9 +17,9 @@ #include "kopetepasswordtest_program.h" #include "kopetepassword.h" -#include <qtextstream.h> -#include <qpixmap.h> -#include <qtimer.h> +#include <tqtextstream.h> +#include <tqpixmap.h> +#include <tqtimer.h> #include <kaboutdata.h> #include <kapplication.h> @@ -28,7 +28,7 @@ #include <kglobal.h> #include <kstandarddirs.h> -static QTextStream _out( stdout, IO_WriteOnly ); +static TQTextStream _out( stdout, IO_WriteOnly ); static KCmdLineOptions opts[] = { @@ -42,18 +42,18 @@ static KCmdLineOptions opts[] = using namespace Kopete; -QString retrieve( Password &pwd, const QPixmap &image, const QString &prompt ) +TQString retrieve( Password &pwd, const TQPixmap &image, const TQString &prompt ) { PasswordRetriever r; - pwd.request( &r, SLOT( gotPassword( const QString & ) ), image, prompt ); - QTimer tmr; - r.connect( &tmr, SIGNAL( timeout() ), SLOT( timer() ) ); + pwd.request( &r, TQT_SLOT( gotPassword( const TQString & ) ), image, prompt ); + TQTimer tmr; + r.connect( &tmr, TQT_SIGNAL( timeout() ), TQT_SLOT( timer() ) ); tmr.start( 1000 ); qApp->exec(); return r.password; } -void PasswordRetriever::gotPassword( const QString &pass ) +void PasswordRetriever::gotPassword( const TQString &pass ) { password = pass; qApp->quit(); @@ -74,11 +74,11 @@ int main( int argc, char *argv[] ) KApplication app( "kopetepasswordtest" ); bool setPassword = args->isSet("set"); - QString newPwd = args->getOption("set"); - QString passwordId = args->getOption("id"); + TQString newPwd = args->getOption("set"); + TQString passwordId = args->getOption("id"); bool error = args->isSet("error"); - QString prompt = args->getOption("prompt"); - QPixmap image = QString(args->getOption("image")); + TQString prompt = args->getOption("prompt"); + TQPixmap image = TQString(args->getOption("image")); _out << (image.isNull() ? "image is null" : "image is valid") << endl; @@ -87,7 +87,7 @@ int main( int argc, char *argv[] ) _out << "Cached value is null: " << pwd.cachedValue().isNull() << endl; - QString pass = retrieve( pwd, image, prompt ); + TQString pass = retrieve( pwd, image, prompt ); if ( !pass.isNull() ) _out << "Read password: " << pass << endl; @@ -101,7 +101,7 @@ int main( int argc, char *argv[] ) if ( newPwd.isEmpty() ) { _out << "Clearing password" << endl; - newPwd = QString::null; + newPwd = TQString::null; } else { @@ -112,7 +112,7 @@ int main( int argc, char *argv[] ) // without this, setting passwords will fail since they're // set asynchronously. - QTimer::singleShot( 0, &app, SLOT( deref() ) ); + TQTimer::singleShot( 0, &app, TQT_SLOT( deref() ) ); app.exec(); if ( setPassword ) diff --git a/kopete/libkopete/tests/kopetepasswordtest_program.h b/kopete/libkopete/tests/kopetepasswordtest_program.h index 507da2a1..47c17172 100644 --- a/kopete/libkopete/tests/kopetepasswordtest_program.h +++ b/kopete/libkopete/tests/kopetepasswordtest_program.h @@ -1,16 +1,16 @@ #ifndef KOPETEPASSWORDTEST_H #define KOPETEPASSWORDTEST_H -#include <qobject.h> +#include <tqobject.h> class PasswordRetriever : public QObject { Q_OBJECT public: - QString password; + TQString password; public slots: void timer(); - void gotPassword( const QString & ); + void gotPassword( const TQString & ); }; #endif diff --git a/kopete/libkopete/tests/kopetepropertiestest.cpp b/kopete/libkopete/tests/kopetepropertiestest.cpp index 1e60c77c..76b8ae79 100644 --- a/kopete/libkopete/tests/kopetepropertiestest.cpp +++ b/kopete/libkopete/tests/kopetepropertiestest.cpp @@ -20,8 +20,8 @@ #include "kopeteproperties.h" -#include <qstring.h> -#include <qtextstream.h> +#include <tqstring.h> +#include <tqtextstream.h> #include <kaboutdata.h> #include <kapplication.h> @@ -37,11 +37,11 @@ KUNITTEST_MODULE_REGISTER_TESTER( KopetePropertiesTest ); using namespace Kopete::Properties; -static QTextStream _out( stdout, IO_WriteOnly ); +static TQTextStream _out( stdout, IO_WriteOnly ); class PropertyHost : public WithProperties<PropertyHost> {}; -class FooProperty : public SimpleDataProperty<PropertyHost, QString> +class FooProperty : public SimpleDataProperty<PropertyHost, TQString> { public: const char *name() const { return "foo"; } @@ -51,8 +51,8 @@ void KopetePropertiesTest::allTests() { PropertyHost myPropertyHost; CHECK( myPropertyHost.property(fooProperty).isNull(), true); - myPropertyHost.setProperty( fooProperty, QString::fromLatin1("Foo!") ); - CHECK( myPropertyHost.property(fooProperty), QString::fromLatin1("Foo!") ); + myPropertyHost.setProperty( fooProperty, TQString::fromLatin1("Foo!") ); + CHECK( myPropertyHost.property(fooProperty), TQString::fromLatin1("Foo!") ); } diff --git a/kopete/libkopete/tests/kopetewallettest_program.cpp b/kopete/libkopete/tests/kopetewallettest_program.cpp index 29de1edc..cfc8b6e9 100644 --- a/kopete/libkopete/tests/kopetewallettest_program.cpp +++ b/kopete/libkopete/tests/kopetewallettest_program.cpp @@ -14,8 +14,8 @@ ************************************************************************* */ -#include <qtextstream.h> -#include <qtimer.h> +#include <tqtextstream.h> +#include <tqtimer.h> #include <kaboutdata.h> #include <kapplication.h> @@ -29,7 +29,7 @@ #include "kopetewalletmanager.h" #include "kopetewallettest_program.h" -static QTextStream _out( stdout, IO_WriteOnly ); +static TQTextStream _out( stdout, IO_WriteOnly ); void closeWallet() { @@ -38,7 +38,7 @@ void closeWallet() void delay() { - QTimer::singleShot( 3000, qApp, SLOT( quit() ) ); + TQTimer::singleShot( 3000, qApp, TQT_SLOT( quit() ) ); qApp->exec(); } @@ -46,7 +46,7 @@ void openWalletAsync() { WalletReciever *r = new WalletReciever; _out << "[ASYNC] About to open wallet, receiver: " << r << endl; - Kopete::WalletManager::self()->openWallet( r, SLOT( gotWallet( KWallet::Wallet* ) ) ); + Kopete::WalletManager::self()->openWallet( r, TQT_SLOT( gotWallet( KWallet::Wallet* ) ) ); } void WalletReciever::gotWallet( KWallet::Wallet *w ) @@ -74,22 +74,22 @@ int main( int argc, char *argv[] ) for( int i = 0; i < args->count(); ++i ) { - QString arg = args->arg( i ); + TQString arg = args->arg( i ); _out << "Processing " << arg << endl; - if( arg == QString::fromLatin1( "open" ) ) openWalletAsync(); - if( arg == QString::fromLatin1( "close" ) ) closeWallet(); - if( arg == QString::fromLatin1( "delay" ) ) delay(); + if( arg == TQString::fromLatin1( "open" ) ) openWalletAsync(); + if( arg == TQString::fromLatin1( "close" ) ) closeWallet(); + if( arg == TQString::fromLatin1( "delay" ) ) delay(); _out << "Done." << endl; } WalletReciever *r = new WalletReciever; - QTimer timer; - r->connect( &timer, SIGNAL( timeout() ), SLOT( timer() ) ); + TQTimer timer; + r->connect( &timer, TQT_SIGNAL( timeout() ), TQT_SLOT( timer() ) ); timer.start( 1000 ); _out << "About to start 30 second event loop" << endl; - QTimer::singleShot( 30000, qApp, SLOT( quit() ) ); + TQTimer::singleShot( 30000, qApp, TQT_SLOT( quit() ) ); return qApp->exec(); } diff --git a/kopete/libkopete/tests/kopetewallettest_program.h b/kopete/libkopete/tests/kopetewallettest_program.h index 58bdbb6e..b2e5d2fb 100644 --- a/kopete/libkopete/tests/kopetewallettest_program.h +++ b/kopete/libkopete/tests/kopetewallettest_program.h @@ -1,7 +1,7 @@ #ifndef KOPETEWALLETTEST_H #define KOPETEWALLETTEST_H -#include <qobject.h> +#include <tqobject.h> namespace KWallet { class Wallet; } diff --git a/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp b/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp index 8a8425bc..7d46fc34 100644 --- a/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp +++ b/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp @@ -26,7 +26,7 @@ namespace Test namespace Mock { -Account::Account(Kopete::Protocol *parent, const QString &accountID, const char *name) : Kopete::Account(parent, accountID, name) +Account::Account(Kopete::Protocol *parent, const TQString &accountID, const char *name) : Kopete::Account(parent, accountID, name) { } @@ -36,7 +36,7 @@ Account::~Account() } -bool Account::createContact( const QString &contactId, Kopete::MetaContact *parentContact ) +bool Account::createContact( const TQString &contactId, Kopete::MetaContact *parentContact ) { return true; } @@ -51,7 +51,7 @@ void Account::disconnect() // do nothing } -void Account::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason) +void Account::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason) { // do nothing } diff --git a/kopete/libkopete/tests/mock/kopeteaccount_mock.h b/kopete/libkopete/tests/mock/kopeteaccount_mock.h index 55ba15cc..053977a5 100644 --- a/kopete/libkopete/tests/mock/kopeteaccount_mock.h +++ b/kopete/libkopete/tests/mock/kopeteaccount_mock.h @@ -36,13 +36,13 @@ namespace Mock class Account : public Kopete::Account { public: - Account(Kopete::Protocol *parent, const QString &accountID, const char *name=0L); + Account(Kopete::Protocol *parent, const TQString &accountID, const char *name=0L); ~Account(); // pure virtual functions implementation - virtual bool createContact( const QString &contactId, MetaContact *parentContact ); + virtual bool createContact( const TQString &contactId, MetaContact *parentContact ); virtual void connect( const Kopete::OnlineStatus& initialStatus = OnlineStatus() ); virtual void disconnect(); - virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null ); + virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null ); }; } // end ns Kopete::Test::Mock diff --git a/kopete/libkopete/tests/mock/kopetecontact_mock.cpp b/kopete/libkopete/tests/mock/kopetecontact_mock.cpp index 19cfa7b0..ea90bee0 100644 --- a/kopete/libkopete/tests/mock/kopetecontact_mock.cpp +++ b/kopete/libkopete/tests/mock/kopetecontact_mock.cpp @@ -24,7 +24,7 @@ namespace Test namespace Mock { -Contact::Contact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent, const QString &icon) : Kopete::Contact( account, id, parent, icon) +Contact::Contact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent, const TQString &icon) : Kopete::Contact( account, id, parent, icon) { } diff --git a/kopete/libkopete/tests/mock/kopetecontact_mock.h b/kopete/libkopete/tests/mock/kopetecontact_mock.h index e445a571..a0b735d5 100644 --- a/kopete/libkopete/tests/mock/kopetecontact_mock.h +++ b/kopete/libkopete/tests/mock/kopetecontact_mock.h @@ -35,7 +35,7 @@ namespace Mock class Contact : public Kopete::Contact { public: - Contact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent, const QString &icon = QString::null ); + Contact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent, const TQString &icon = TQString::null ); ~Contact(); virtual Kopete::ChatSession* manager( CanCreateFlags canCreate = CannotCreate ); }; diff --git a/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp b/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp index d3bbd0e2..d9ae1d3a 100644 --- a/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp +++ b/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp @@ -24,22 +24,22 @@ namespace Test namespace Mock { -Protocol::Protocol( KInstance *instance, QObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name) +Protocol::Protocol( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name) { } -Account* Protocol::createNewAccount( const QString &accountId ) +Account* Protocol::createNewAccount( const TQString &accountId ) { return 0L; } -AddContactPage* Protocol::createAddContactWidget( QWidget *parent, Kopete::Account *account ) +AddContactPage* Protocol::createAddContactWidget( TQWidget *parent, Kopete::Account *account ) { return 0L; } -KopeteEditAccountWidget* Protocol::createEditAccountWidget( Kopete::Account *account, QWidget *parent ) +KopeteEditAccountWidget* Protocol::createEditAccountWidget( Kopete::Account *account, TQWidget *parent ) { return 0L; } diff --git a/kopete/libkopete/tests/mock/kopeteprotocol_mock.h b/kopete/libkopete/tests/mock/kopeteprotocol_mock.h index 189f7d79..97f0d7ad 100644 --- a/kopete/libkopete/tests/mock/kopeteprotocol_mock.h +++ b/kopete/libkopete/tests/mock/kopeteprotocol_mock.h @@ -37,11 +37,11 @@ namespace Mock class Protocol : public Kopete::Protocol { public: - Protocol( KInstance *instance, QObject *parent, const char *name ); + Protocol( KInstance *instance, TQObject *parent, const char *name ); // pure virtual functions implemented - virtual Account *createNewAccount( const QString &accountId ); - virtual AddContactPage *createAddContactWidget( QWidget *parent, Kopete::Account *account ); - virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, QWidget *parent ); + virtual Account *createNewAccount( const TQString &accountId ); + virtual AddContactPage *createAddContactWidget( TQWidget *parent, Kopete::Account *account ); + virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, TQWidget *parent ); }; } // end ns Kopete::Test::Mock diff --git a/kopete/libkopete/ui/accountselector.cpp b/kopete/libkopete/ui/accountselector.cpp index 2ea8e719..345e9ab4 100644 --- a/kopete/libkopete/ui/accountselector.cpp +++ b/kopete/libkopete/ui/accountselector.cpp @@ -19,9 +19,9 @@ #include "kopeteaccount.h" #include "kopeteaccountmanager.h" -#include <qheader.h> -#include <qlayout.h> -#include <qpixmap.h> +#include <tqheader.h> +#include <tqlayout.h> +#include <tqpixmap.h> #include <kdebug.h> #include <klistview.h> @@ -32,7 +32,7 @@ class AccountListViewItem : public KListViewItem Kopete::Account *mAccount; public: - AccountListViewItem(QListView *parent, Kopete::Account *acc) + AccountListViewItem(TQListView *parent, Kopete::Account *acc) : KListViewItem(parent) { if (acc==0) @@ -62,8 +62,8 @@ class AccountSelectorPrivate }; -AccountSelector::AccountSelector(QWidget *parent, const char *name) - : QWidget(parent, name) +AccountSelector::AccountSelector(TQWidget *parent, const char *name) + : TQWidget(parent, name) { //kdDebug(14010) << k_funcinfo << "for no special protocol" << endl; d = new AccountSelectorPrivate; @@ -72,8 +72,8 @@ AccountSelector::AccountSelector(QWidget *parent, const char *name) } -AccountSelector::AccountSelector(Kopete::Protocol *proto, QWidget *parent, - const char *name) : QWidget(parent, name) +AccountSelector::AccountSelector(Kopete::Protocol *proto, TQWidget *parent, + const char *name) : TQWidget(parent, name) { //kdDebug(14010) << k_funcinfo << " for protocol " << proto->pluginId() << endl; d = new AccountSelectorPrivate; @@ -92,17 +92,17 @@ AccountSelector::~AccountSelector() void AccountSelector::initUI() { kdDebug(14010) << k_funcinfo << endl; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); d->lv = new KListView(this); d->lv->setFullWidth(true); - d->lv->addColumn(QString::fromLatin1("")); + d->lv->addColumn(TQString::fromLatin1("")); d->lv->header()->hide(); if(d->proto != 0) { kdDebug(14010) << k_funcinfo << "creating list for a certain protocol" << endl; - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(d->proto); - QDictIterator<Kopete::Account> it(accounts); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(d->proto); + TQDictIterator<Kopete::Account> it(accounts); for(; Kopete::Account *account = it.current(); ++it) { new AccountListViewItem(d->lv, account); @@ -111,7 +111,7 @@ void AccountSelector::initUI() else { kdDebug(14010) << k_funcinfo << "creating list of all accounts" << endl; - QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(); Kopete::Account *account = 0; for(account = accounts.first(); account; account = accounts.next()) { @@ -119,8 +119,8 @@ void AccountSelector::initUI() } } - connect(d->lv, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT(slotSelectionChanged(QListViewItem *))); + connect(d->lv, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(slotSelectionChanged(TQListViewItem *))); } @@ -129,7 +129,7 @@ void AccountSelector::setSelected(Kopete::Account *account) if (account==0) return; - QListViewItemIterator it(d->lv); + TQListViewItemIterator it(d->lv); while (it.current()) { if(static_cast<AccountListViewItem *>(it.current())->account() == account) @@ -146,7 +146,7 @@ bool AccountSelector::isSelected(Kopete::Account *account) if (account==0) return false; - QListViewItemIterator it(d->lv); + TQListViewItemIterator it(d->lv); while (it.current()) { if(static_cast<AccountListViewItem *>(it.current())->account() == account) @@ -166,7 +166,7 @@ Kopete::Account *AccountSelector::selectedItem() } -void AccountSelector::slotSelectionChanged(QListViewItem *item) +void AccountSelector::slotSelectionChanged(TQListViewItem *item) { //kdDebug(14010) << k_funcinfo << endl; if (item != 0) diff --git a/kopete/libkopete/ui/accountselector.h b/kopete/libkopete/ui/accountselector.h index 4f5d50ac..518ac67f 100644 --- a/kopete/libkopete/ui/accountselector.h +++ b/kopete/libkopete/ui/accountselector.h @@ -18,7 +18,7 @@ #ifndef ACCOUNTSELECTOR_H #define ACCOUNTSELECTOR_H -#include <qwidget.h> +#include <tqwidget.h> #include <kopeteprotocol.h> #include "kopete_export.h" @@ -39,7 +39,7 @@ Q_OBJECT * The parameters @p parent and @p name are handled by * KListView. */ - AccountSelector(QWidget *parent=0, const char *name=0); + AccountSelector(TQWidget *parent=0, const char *name=0); /** * Constructor for a list of accounts for one protocol only @@ -48,7 +48,7 @@ Q_OBJECT * KListView. @p proto defines the protocol whose accounts are * shown in the list */ - AccountSelector(Kopete::Protocol *proto, QWidget *parent=0, const char *name=0); + AccountSelector(Kopete::Protocol *proto, TQWidget *parent=0, const char *name=0); /** * Destructor. @@ -79,7 +79,7 @@ Q_OBJECT void selectionChanged(Kopete::Account *acc); private slots: - void slotSelectionChanged(QListViewItem *item); + void slotSelectionChanged(TQListViewItem *item); private: void initUI(); diff --git a/kopete/libkopete/ui/addcontactpage.cpp b/kopete/libkopete/ui/addcontactpage.cpp index f308a7d4..846815f2 100644 --- a/kopete/libkopete/ui/addcontactpage.cpp +++ b/kopete/libkopete/ui/addcontactpage.cpp @@ -17,7 +17,7 @@ #include "addcontactpage.h" -AddContactPage::AddContactPage(QWidget *parent, const char *name ) : QWidget(parent,name) +AddContactPage::AddContactPage(TQWidget *parent, const char *name ) : TQWidget(parent,name) { } diff --git a/kopete/libkopete/ui/addcontactpage.h b/kopete/libkopete/ui/addcontactpage.h index 506c5bcc..d72e2fd1 100644 --- a/kopete/libkopete/ui/addcontactpage.h +++ b/kopete/libkopete/ui/addcontactpage.h @@ -18,7 +18,7 @@ #ifndef ADDCONTACTPAGE_H #define ADDCONTACTPAGE_H -#include <qwidget.h> +#include <tqwidget.h> #include <kopeteprotocol.h> #include "kopete_export.h" @@ -34,7 +34,7 @@ class KOPETE_EXPORT AddContactPage : public QWidget Q_OBJECT public: - AddContactPage(QWidget *parent=0, const char *name=0); + AddContactPage(TQWidget *parent=0, const char *name=0); virtual ~AddContactPage(); //Kopete::Protocol *protocol; diff --git a/kopete/libkopete/ui/addressbooklinkwidget.cpp b/kopete/libkopete/ui/addressbooklinkwidget.cpp index a6aff32b..0d544d27 100644 --- a/kopete/libkopete/ui/addressbooklinkwidget.cpp +++ b/kopete/libkopete/ui/addressbooklinkwidget.cpp @@ -21,7 +21,7 @@ ************************************************************************* */ -#include <qapplication.h> +#include <tqapplication.h> #include <klineedit.h> #include <klocale.h> #include <kpushbutton.h> @@ -38,11 +38,11 @@ namespace Kopete { namespace UI { -AddressBookLinkWidget::AddressBookLinkWidget( QWidget * parent, const char * name ) : AddressBookLinkWidgetBase( parent, name ), mMetaContact( 0 ) +AddressBookLinkWidget::AddressBookLinkWidget( TQWidget * parent, const char * name ) : AddressBookLinkWidgetBase( parent, name ), mMetaContact( 0 ) { - btnClear->setIconSet( SmallIconSet( QApplication::reverseLayout() ? QString::fromLatin1( "locationbar_erase" ) : QString::fromLatin1( "clear_left") ) ); - connect( btnClear, SIGNAL( clicked() ), this, SLOT( slotClearAddressee() ) ); - connect( btnSelectAddressee, SIGNAL( clicked() ), SLOT( slotSelectAddressee() ) ); + btnClear->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? TQString::fromLatin1( "locationbar_erase" ) : TQString::fromLatin1( "clear_left") ) ); + connect( btnClear, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClearAddressee() ) ); + connect( btnSelectAddressee, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSelectAddressee() ) ); } void AddressBookLinkWidget::setAddressee( const KABC::Addressee& addr ) @@ -56,7 +56,7 @@ void AddressBookLinkWidget::setMetaContact( const Kopete::MetaContact * mc ) mMetaContact = mc; } -QString AddressBookLinkWidget::uid() const +TQString AddressBookLinkWidget::uid() const { return mSelectedUid; } @@ -66,29 +66,29 @@ void AddressBookLinkWidget::slotClearAddressee() edtAddressee->clear(); btnClear->setEnabled( false ); KABC::Addressee mrEmpty; - mSelectedUid = QString::null; + mSelectedUid = TQString::null; emit addresseeChanged( mrEmpty ); } void AddressBookLinkWidget::slotSelectAddressee() { - QString message; + TQString message; if ( mMetaContact ) message = i18n("Choose the corresponding entry for '%1'" ).arg( mMetaContact->displayName() ); else message = i18n("Choose the corresponding entry in the address book" ); - Kopete::UI::AddressBookSelectorDialog dialog( i18n("Addressbook Association"), message, ( mMetaContact ? mMetaContact->metaContactId() : QString::null ), this ); + Kopete::UI::AddressBookSelectorDialog dialog( i18n("Addressbook Association"), message, ( mMetaContact ? mMetaContact->metaContactId() : TQString::null ), this ); int result = dialog.exec(); KABC::Addressee addr; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) { addr = dialog.addressBookSelectorWidget()->addressee(); edtAddressee->setText( addr.realName() ); btnClear->setEnabled( !addr.isEmpty() ); - mSelectedUid = ( addr.isEmpty() ? QString::null : addr.uid() ); + mSelectedUid = ( addr.isEmpty() ? TQString::null : addr.uid() ); emit addresseeChanged( addr ); } } diff --git a/kopete/libkopete/ui/addressbooklinkwidget.h b/kopete/libkopete/ui/addressbooklinkwidget.h index dff23c58..fa44d530 100644 --- a/kopete/libkopete/ui/addressbooklinkwidget.h +++ b/kopete/libkopete/ui/addressbooklinkwidget.h @@ -44,7 +44,7 @@ class AddressBookLinkWidget : public AddressBookLinkWidgetBase { Q_OBJECT public: - AddressBookLinkWidget( QWidget * parent, const char * name ); + AddressBookLinkWidget( TQWidget * parent, const char * name ); ~AddressBookLinkWidget() {} /** * Set the currently selected addressee @@ -57,7 +57,7 @@ public: /** * Return the selected addressbook UID. */ - QString uid() const; + TQString uid() const; signals: /** * Emitted when the selected addressee changed. addr is the KABC::Addressee that was selected. If addr.isEmpty() is empty, the clear button was clicked. @@ -66,7 +66,7 @@ signals: /** * Provided so you can perform your own actions instead of opening the AddressBookSelectorWidget. - * To do so, QObject::disconnect() btnSelectAddressee and connect your own slot to this signal + * To do so, TQObject::disconnect() btnSelectAddressee and connect your own slot to this signal */ void selectAddresseeClicked(); protected slots: @@ -74,7 +74,7 @@ protected slots: void slotSelectAddressee(); private: const Kopete::MetaContact * mMetaContact; - QString mSelectedUid; + TQString mSelectedUid; }; } // end namespace UI } // end namespace Kopete diff --git a/kopete/libkopete/ui/addressbookselectordialog.cpp b/kopete/libkopete/ui/addressbookselectordialog.cpp index 7d2e17ff..44f42e2a 100644 --- a/kopete/libkopete/ui/addressbookselectordialog.cpp +++ b/kopete/libkopete/ui/addressbookselectordialog.cpp @@ -19,9 +19,9 @@ #include "addressbookselectordialog.h" #include "addressbookselectorwidget.h" #include <kdialogbase.h> -#include <qdialog.h> -#include <qlistview.h> -#include <qvbox.h> +#include <tqdialog.h> +#include <tqlistview.h> +#include <tqvbox.h> #include <klocale.h> #include <kdialog.h> @@ -30,9 +30,9 @@ namespace Kopete namespace UI { -AddressBookSelectorDialog::AddressBookSelectorDialog(const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent, const char *name, bool modal ) : KDialogBase(parent, name, modal, title, Help|Ok|Cancel, Ok, true ) +AddressBookSelectorDialog::AddressBookSelectorDialog(const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent, const char *name, bool modal ) : KDialogBase(parent, name, modal, title, Help|Ok|Cancel, Ok, true ) { - QVBox *vbox=new QVBox(this); + TQVBox *vbox=new TQVBox(this); m_addressBookSelectorWidget= new AddressBookSelectorWidget(vbox); m_addressBookSelectorWidget->setLabelMessage(message); @@ -42,7 +42,7 @@ AddressBookSelectorDialog::AddressBookSelectorDialog(const QString &title, const enableButtonOK(false); //setHelp("linkaddressbook"); - connect(m_addressBookSelectorWidget, SIGNAL(addresseeListClicked( QListViewItem * )), SLOT(slotWidgetAddresseeListClicked( QListViewItem * ))); + connect(m_addressBookSelectorWidget, TQT_SIGNAL(addresseeListClicked( TQListViewItem * )), TQT_SLOT(slotWidgetAddresseeListClicked( TQListViewItem * ))); if ( !preSelectUid.isEmpty() ) m_addressBookSelectorWidget->selectAddressee(preSelectUid); @@ -52,19 +52,19 @@ AddressBookSelectorDialog::~AddressBookSelectorDialog() { } -KABC::Addressee AddressBookSelectorDialog::getAddressee( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent) +KABC::Addressee AddressBookSelectorDialog::getAddressee( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent) { AddressBookSelectorDialog dialog(title, message, preSelectUid, parent); int result = dialog.exec(); KABC::Addressee adr; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) adr = dialog.addressBookSelectorWidget()->addressee(); return adr; } -void AddressBookSelectorDialog::slotWidgetAddresseeListClicked( QListViewItem *addressee ) +void AddressBookSelectorDialog::slotWidgetAddresseeListClicked( TQListViewItem *addressee ) { // enable ok if a valid addressee is selected enableButtonOK( addressee ? addressee->isSelected() : false); @@ -72,12 +72,12 @@ void AddressBookSelectorDialog::slotWidgetAddresseeListClicked( QListViewItem *a void AddressBookSelectorDialog::accept() { - QDialog::accept(); + TQDialog::accept(); } void AddressBookSelectorDialog::reject() { - QDialog::reject(); + TQDialog::reject(); } } // namespace UI diff --git a/kopete/libkopete/ui/addressbookselectordialog.h b/kopete/libkopete/ui/addressbookselectordialog.h index f391aa3a..470f3407 100644 --- a/kopete/libkopete/ui/addressbookselectordialog.h +++ b/kopete/libkopete/ui/addressbookselectordialog.h @@ -51,7 +51,7 @@ public: /** * The constructor of an empty AddressBookSelectorWidget */ - AddressBookSelectorDialog( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent=0L, const char *name=0L, bool modal = false ); + AddressBookSelectorDialog( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent=0L, const char *name=0L, bool modal = false ); /** * The destructor of the dialog */ @@ -71,12 +71,12 @@ public: * @returns the selected contact, or a null addressee if the user * pressed the Cancel button. Optionally */ - static KABC::Addressee getAddressee( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent = 0L ); + static KABC::Addressee getAddressee( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent = 0L ); protected slots: virtual void accept(); virtual void reject(); - void slotWidgetAddresseeListClicked( QListViewItem *addressee ); + void slotWidgetAddresseeListClicked( TQListViewItem *addressee ); protected: AddressBookSelectorWidget *m_addressBookSelectorWidget; }; diff --git a/kopete/libkopete/ui/addressbookselectorwidget.cpp b/kopete/libkopete/ui/addressbookselectorwidget.cpp index 50c4a885..4b106315 100644 --- a/kopete/libkopete/ui/addressbookselectorwidget.cpp +++ b/kopete/libkopete/ui/addressbookselectorwidget.cpp @@ -25,7 +25,7 @@ ************************************************************************* */ -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <kapplication.h> #include <kconfig.h> #include <klocale.h> @@ -39,9 +39,9 @@ #include <kdebug.h> #include <klistview.h> #include <klistviewsearchline.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include "addressbookselectorwidget.h" #include <addresseeitem.h> @@ -54,39 +54,39 @@ namespace Kopete namespace UI { -AddressBookSelectorWidget::AddressBookSelectorWidget( QWidget *parent, const char *name ) +AddressBookSelectorWidget::AddressBookSelectorWidget( TQWidget *parent, const char *name ) : AddressBookSelectorWidget_Base( parent, name ) { m_addressBook = Kopete::KABCPersistence::self()->addressBook(); // Addressee validation connections - connect( addAddresseeButton, SIGNAL( clicked() ), SLOT( slotAddAddresseeClicked() ) ); - connect( addAddresseeButton, SIGNAL( clicked() ), SIGNAL( addAddresseeClicked() ) ); - - connect( addresseeListView, SIGNAL( clicked(QListViewItem * ) ), - SIGNAL( addresseeListClicked( QListViewItem * ) ) ); - connect( addresseeListView, SIGNAL( selectionChanged( QListViewItem * ) ), - SIGNAL( addresseeListClicked( QListViewItem * ) ) ); - connect( addresseeListView, SIGNAL( spacePressed( QListViewItem * ) ), - SIGNAL( addresseeListClicked( QListViewItem * ) ) ); + connect( addAddresseeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAddAddresseeClicked() ) ); + connect( addAddresseeButton, TQT_SIGNAL( clicked() ), TQT_SIGNAL( addAddresseeClicked() ) ); + + connect( addresseeListView, TQT_SIGNAL( clicked(TQListViewItem * ) ), + TQT_SIGNAL( addresseeListClicked( TQListViewItem * ) ) ); + connect( addresseeListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + TQT_SIGNAL( addresseeListClicked( TQListViewItem * ) ) ); + connect( addresseeListView, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), + TQT_SIGNAL( addresseeListClicked( TQListViewItem * ) ) ); - connect( m_addressBook, SIGNAL( addressBookChanged( AddressBook * ) ), this, SLOT( slotLoadAddressees() ) ); + connect( m_addressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ), this, TQT_SLOT( slotLoadAddressees() ) ); //We should add a clear KAction here. But we can't really do that with a designer file :\ this sucks - addresseeListView->setColumnText(2, SmallIconSet(QString::fromLatin1("email")), i18n("Email")); + addresseeListView->setColumnText(2, SmallIconSet(TQString::fromLatin1("email")), i18n("Email")); kListViewSearchLine->setListView(addresseeListView); slotLoadAddressees(); - addresseeListView->setColumnWidthMode(0, QListView::Manual); + addresseeListView->setColumnWidthMode(0, TQListView::Manual); addresseeListView->setColumnWidth(0, 63); //Photo is 60, and it's nice to have a small gap, imho } AddressBookSelectorWidget::~AddressBookSelectorWidget() { - disconnect( m_addressBook, SIGNAL( addressBookChanged( AddressBook * ) ), this, SLOT( slotLoadAddressees() ) ); + disconnect( m_addressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ), this, TQT_SLOT( slotLoadAddressees() ) ); } @@ -101,10 +101,10 @@ KABC::Addressee AddressBookSelectorWidget::addressee() return m_addressee; } -void AddressBookSelectorWidget::selectAddressee( const QString &uid ) +void AddressBookSelectorWidget::selectAddressee( const TQString &uid ) { // iterate trough list view - QListViewItemIterator it( addresseeListView ); + TQListViewItemIterator it( addresseeListView ); while( it.current() ) { AddresseeItem *addrItem = (AddresseeItem *) it.current(); @@ -136,7 +136,7 @@ void AddressBookSelectorWidget::slotLoadAddressees() } -void AddressBookSelectorWidget::setLabelMessage( const QString &msg ) +void AddressBookSelectorWidget::setLabelMessage( const TQString &msg ) { lblHeader->setText(msg); } @@ -144,7 +144,7 @@ void AddressBookSelectorWidget::setLabelMessage( const QString &msg ) void AddressBookSelectorWidget::slotAddAddresseeClicked() { // Pop up add addressee dialog - QString addresseeName = KInputDialog::getText( i18n( "New Address Book Entry" ), i18n( "Name the new entry:" ), QString::null, 0, this ); + TQString addresseeName = KInputDialog::getText( i18n( "New Address Book Entry" ), i18n( "Name the new entry:" ), TQString::null, 0, this ); if ( !addresseeName.isEmpty() ) { @@ -154,7 +154,7 @@ void AddressBookSelectorWidget::slotAddAddresseeClicked() Kopete::KABCPersistence::self()->writeAddressBook( 0 ); slotLoadAddressees(); // select the addressee we just added - QListViewItem * added = addresseeListView->findItem( addresseeName, 1 ); + TQListViewItem * added = addresseeListView->findItem( addresseeName, 1 ); kListViewSearchLine->clear(); kListViewSearchLine->updateSearch(); addresseeListView->setSelected( added, true ); diff --git a/kopete/libkopete/ui/addressbookselectorwidget.h b/kopete/libkopete/ui/addressbookselectorwidget.h index 3141f726..3b26cece 100644 --- a/kopete/libkopete/ui/addressbookselectorwidget.h +++ b/kopete/libkopete/ui/addressbookselectorwidget.h @@ -49,7 +49,7 @@ class KOPETE_EXPORT AddressBookSelectorWidget : public AddressBookSelectorWidget { Q_OBJECT public: - AddressBookSelectorWidget( QWidget *parent = 0, const char *name = 0 ); + AddressBookSelectorWidget( TQWidget *parent = 0, const char *name = 0 ); ~AddressBookSelectorWidget(); KABC::Addressee addressee(); /** @@ -57,11 +57,11 @@ public: * example: Please select a contact * or, Choose a contact to delete */ - void setLabelMessage( const QString &msg ); + void setLabelMessage( const TQString &msg ); /** * pre-selects a contact */ - void selectAddressee( const QString &uid ); + void selectAddressee( const TQString &uid ); /** * @return true if there is a contact selected */ @@ -78,7 +78,7 @@ protected slots: */ void slotLoadAddressees(); signals: - void addresseeListClicked( QListViewItem *addressee ); + void addresseeListClicked( TQListViewItem *addressee ); void addAddresseeClicked(); }; diff --git a/kopete/libkopete/ui/addresseeitem.cpp b/kopete/libkopete/ui/addresseeitem.cpp index 405d00d7..9fa9f023 100644 --- a/kopete/libkopete/ui/addresseeitem.cpp +++ b/kopete/libkopete/ui/addresseeitem.cpp @@ -17,17 +17,17 @@ Boston, MA 02110-1301, USA. */ -#include <qlayout.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qregexp.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqregexp.h> #include <klocale.h> #include <kdebug.h> #include "addresseeitem.h" -AddresseeItem::AddresseeItem( QListView *parent, const KABC::Addressee &addressee) : +AddresseeItem::AddresseeItem( TQListView *parent, const KABC::Addressee &addressee) : KListViewItem( parent ), mAddressee( addressee ) { @@ -37,7 +37,7 @@ AddresseeItem::AddresseeItem( QListView *parent, const KABC::Addressee &addresse pic = mAddressee.logo(); if(pic.isIntern()) { - QPixmap qpixmap( pic.data().scaleWidth(60) ); //60 pixels seems okay.. kmail uses 60 btw + TQPixmap qpixmap( pic.data().scaleWidth(60) ); //60 pixels seems okay.. kmail uses 60 btw setPixmap( Photo,qpixmap ); } @@ -45,11 +45,11 @@ AddresseeItem::AddresseeItem( QListView *parent, const KABC::Addressee &addresse setText( Email, addressee.preferredEmail() ); } -QString AddresseeItem::key( int column, bool ) const +TQString AddresseeItem::key( int column, bool ) const { if (column == Email) { - QString value = text(Email); - QRegExp emailRe(QString::fromLatin1("<\\S*>")); + TQString value = text(Email); + TQRegExp emailRe(TQString::fromLatin1("<\\S*>")); int match = emailRe.search(value); if (match > -1) value = value.mid(match + 1, emailRe.matchedLength() - 2); diff --git a/kopete/libkopete/ui/addresseeitem.h b/kopete/libkopete/ui/addresseeitem.h index c501d0a9..36d1d284 100644 --- a/kopete/libkopete/ui/addresseeitem.h +++ b/kopete/libkopete/ui/addresseeitem.h @@ -21,7 +21,7 @@ #ifndef KABC_ADDRESSEEDIALOG_H #define KABC_ADDRESSEEDIALOG_H -#include <qdict.h> +#include <tqdict.h> #include <kdialogbase.h> #include <klineedit.h> @@ -49,7 +49,7 @@ class AddresseeItem : public KListViewItem @param parent The parent listview. @param addressee The associated addressee. */ - AddresseeItem( QListView *parent, const KABC::Addressee &addressee ); + AddresseeItem( TQListView *parent, const KABC::Addressee &addressee ); /** Returns the addressee. @@ -57,9 +57,9 @@ class AddresseeItem : public KListViewItem KABC::Addressee addressee() const { return mAddressee; } /** - Method used by QListView to sort the items. + Method used by TQListView to sort the items. */ - virtual QString key( int column, bool ascending ) const; + virtual TQString key( int column, bool ascending ) const; private: KABC::Addressee mAddressee; diff --git a/kopete/libkopete/ui/contactaddednotifydialog.cpp b/kopete/libkopete/ui/contactaddednotifydialog.cpp index abcd4c7e..9084bd39 100644 --- a/kopete/libkopete/ui/contactaddednotifydialog.cpp +++ b/kopete/libkopete/ui/contactaddednotifydialog.cpp @@ -16,12 +16,12 @@ #include "contactaddednotifydialog.h" -#include <qvbox.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qstylesheet.h> -#include <qapplication.h> +#include <tqvbox.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqstylesheet.h> +#include <tqapplication.h> #include <klocale.h> #include <kcombobox.h> @@ -51,13 +51,13 @@ struct ContactAddedNotifyDialog::Private { ContactAddedNotifyWidget *widget; Account *account; - QString contactId; - QString addressbookId; + TQString contactId; + TQString addressbookId; }; -ContactAddedNotifyDialog::ContactAddedNotifyDialog(const QString& contactId, - const QString& contactNick, Kopete::Account *account, uint hide) +ContactAddedNotifyDialog::ContactAddedNotifyDialog(const TQString& contactId, + const TQString& contactNick, Kopete::Account *account, uint hide) : KDialogBase( Global::mainWidget(), "ContactAddedNotify", /*modal=*/false, i18n("Someone Has Added You"), Ok|Cancel ) { @@ -71,9 +71,9 @@ ContactAddedNotifyDialog::ContactAddedNotifyDialog(const QString& contactId, d->account=account; d->contactId=contactId; d->widget->m_label->setText(i18n("<qt><img src=\"kopete-account-icon:%1\" /> The contact <b>%2</b> has added you to his/her contactlist. (Account %3)</qt>") - .arg( KURL::encode_string( account->protocol()->pluginId() ) + QString::fromLatin1(":") + .arg( KURL::encode_string( account->protocol()->pluginId() ) + TQString::fromLatin1(":") + KURL::encode_string( account->accountId() ) , - contactNick.isEmpty() ? contactId : contactNick + QString::fromLatin1(" < ") + contactId + QString::fromLatin1(" >") , + contactNick.isEmpty() ? contactId : contactNick + TQString::fromLatin1(" < ") + contactId + TQString::fromLatin1(" >") , account->accountLabel() ) ); if( hide & InfoButton) d->widget->m_infoButton->hide() ; @@ -94,18 +94,18 @@ ContactAddedNotifyDialog::ContactAddedNotifyDialog(const QString& contactId, Kopete::GroupList groups=Kopete::ContactList::self()->groups(); for( Kopete::Group *it = groups.first(); it; it = groups.next() ) { - QString groupname = it->displayName(); + TQString groupname = it->displayName(); if ( it->type() == Group::Normal && !groupname.isEmpty() ) { d->widget->m_groupList->insertItem(groupname); } } - d->widget->m_groupList->setCurrentText(QString::null); //default to top-level + d->widget->m_groupList->setCurrentText(TQString::null); //default to top-level - connect( d->widget->widAddresseeLink, SIGNAL( addresseeChanged( const KABC::Addressee& ) ), this, SLOT( slotAddresseeSelected( const KABC::Addressee& ) ) ); - connect( d->widget->m_infoButton, SIGNAL( clicked() ), this, SLOT( slotInfoClicked() ) ); + connect( d->widget->widAddresseeLink, TQT_SIGNAL( addresseeChanged( const KABC::Addressee& ) ), this, TQT_SLOT( slotAddresseeSelected( const KABC::Addressee& ) ) ); + connect( d->widget->m_infoButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotInfoClicked() ) ); - connect( this, SIGNAL(okClicked()) , this , SLOT(slotFinished())); + connect( this, TQT_SIGNAL(okClicked()) , this , TQT_SLOT(slotFinished())); } @@ -125,14 +125,14 @@ bool ContactAddedNotifyDialog::authorized() const return d->widget->m_authorizeCb->isChecked(); } -QString ContactAddedNotifyDialog::displayName() const +TQString ContactAddedNotifyDialog::displayName() const { return d->widget->m_displayNameEdit->text(); } Group *ContactAddedNotifyDialog::group() const { - QString grpName=d->widget->m_groupList->currentText(); + TQString grpName=d->widget->m_groupList->currentText(); if(grpName.isEmpty()) return Group::topLevel(); diff --git a/kopete/libkopete/ui/contactaddednotifydialog.h b/kopete/libkopete/ui/contactaddednotifydialog.h index 96f8844c..be5349a4 100644 --- a/kopete/libkopete/ui/contactaddednotifydialog.h +++ b/kopete/libkopete/ui/contactaddednotifydialog.h @@ -43,9 +43,9 @@ namespace UI { * @code Kopete::UI::ContactAddedNotifyDialog *dialog = - new ContactAddedNotifyDialog(contactId, QString::null,account); - QObject::connect(dialog,SIGNAL(applyClicked(const QString&)),this,SLOT(contactAddedDialogApplied())); - QObject::connect(dialog,SIGNAL(infoClicked(const QString&)),this,SLOT(contactAddedDialogInfo())); + new ContactAddedNotifyDialog(contactId, TQString::null,account); + TQObject::connect(dialog,TQT_SIGNAL(applyClicked(const TQString&)),this,TQT_SLOT(contactAddedDialogApplied())); + TQObject::connect(dialog,TQT_SIGNAL(infoClicked(const TQString&)),this,TQT_SLOT(contactAddedDialogInfo())); dialog->show(); * @endcode @@ -93,7 +93,7 @@ public: * @param hide a bitmask of HideWidget used to hide some widget. By default, everything is shown. * */ - ContactAddedNotifyDialog(const QString& contactId, const QString& contactNick=QString::null, + ContactAddedNotifyDialog(const TQString& contactId, const TQString& contactNick=TQString::null, Kopete::Account *account=0L, uint hide=0x00); /** @@ -116,7 +116,7 @@ public: /** * @brief return the display name the user has entered */ - QString displayName() const; + TQString displayName() const; /** * @brief return the group the user has selected @@ -144,7 +144,7 @@ signals: * @brief the dialog has been applied * @param contactId is the id of the contact passed in the constructor. */ - void applyClicked(const QString &contactId); + void applyClicked(const TQString &contactId); /** * @brief the button "info" has been pressed @@ -155,7 +155,7 @@ signals: * hint: you can use sender() as parent of the new dialog * @param contactId is the id of the contact passed in the constructor. */ - void infoClicked(const QString &contactId); + void infoClicked(const TQString &contactId); private slots: diff --git a/kopete/libkopete/ui/editaccountwidget.h b/kopete/libkopete/ui/editaccountwidget.h index 533c90ff..a4345bae 100644 --- a/kopete/libkopete/ui/editaccountwidget.h +++ b/kopete/libkopete/ui/editaccountwidget.h @@ -36,7 +36,7 @@ class KopeteEditAccountWidgetPrivate; * in @ref apply(). * * Each protocol has to subclass this class, and the protocol's edit account page MUST inherits from - * QWidget too. + * TQWidget too. * * We suggest to put at least these fields in the page: * diff --git a/kopete/libkopete/ui/kopetecontactaction.cpp b/kopete/libkopete/ui/kopetecontactaction.cpp index d02c2ff2..cc6754d2 100644 --- a/kopete/libkopete/ui/kopetecontactaction.cpp +++ b/kopete/libkopete/ui/kopetecontactaction.cpp @@ -21,15 +21,15 @@ #include "kopetecontact.h" #include "kopeteonlinestatus.h" -KopeteContactAction::KopeteContactAction( Kopete::Contact *contact, const QObject *receiver, +KopeteContactAction::KopeteContactAction( Kopete::Contact *contact, const TQObject *receiver, const char *slot, KAction *parent ) -: KAction( contact->metaContact()->displayName(), QIconSet( contact->onlineStatus().iconFor( contact ) ), KShortcut(), +: KAction( contact->metaContact()->displayName(), TQIconSet( contact->onlineStatus().iconFor( contact ) ), KShortcut(), parent, contact->contactId().latin1() ) { m_contact = contact; - connect( this, SIGNAL( activated() ), SLOT( slotContactActionActivated() ) ); - connect( this, SIGNAL( activated( Kopete::Contact * ) ), receiver, slot ); + connect( this, TQT_SIGNAL( activated() ), TQT_SLOT( slotContactActionActivated() ) ); + connect( this, TQT_SIGNAL( activated( Kopete::Contact * ) ), receiver, slot ); } KopeteContactAction::~KopeteContactAction() diff --git a/kopete/libkopete/ui/kopetecontactaction.h b/kopete/libkopete/ui/kopetecontactaction.h index bb9d9f76..ba170ebb 100644 --- a/kopete/libkopete/ui/kopetecontactaction.h +++ b/kopete/libkopete/ui/kopetecontactaction.h @@ -37,7 +37,7 @@ public: /** * Create a new KopeteContactAction */ - KopeteContactAction( Kopete::Contact *contact, const QObject* receiver, const char* slot, KAction* parent ); + KopeteContactAction( Kopete::Contact *contact, const TQObject* receiver, const char* slot, KAction* parent ); ~KopeteContactAction(); Kopete::Contact * contact() const; diff --git a/kopete/libkopete/ui/kopetefileconfirmdialog.cpp b/kopete/libkopete/ui/kopetefileconfirmdialog.cpp index 01036a05..fffeec66 100644 --- a/kopete/libkopete/ui/kopetefileconfirmdialog.cpp +++ b/kopete/libkopete/ui/kopetefileconfirmdialog.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include <qtextedit.h> +#include <tqtextedit.h> #include <klineedit.h> #include <kconfig.h> @@ -31,7 +31,7 @@ #include "kopetemetacontact.h" #include "kopetecontact.h" -KopeteFileConfirmDialog::KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const QString& description,QWidget *parent, const char *name ) +KopeteFileConfirmDialog::KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const TQString& description,TQWidget *parent, const char *name ) : KDialogBase( parent, name, false, i18n( "A User Would Like to Send You a File" ), KDialogBase::User1 | KDialogBase::User2, KDialogBase::User1, true, i18n( "&Refuse" ), i18n( "&Accept" ) ), m_info( info ) @@ -40,19 +40,19 @@ KopeteFileConfirmDialog::KopeteFileConfirmDialog(const Kopete::FileTransferInfo m_emited=false; m_view=new FileConfirmBase(this, "FileConfirmView"); - m_view->m_from->setText( info.contact()->metaContact()->displayName() + QString::fromLatin1( " <" ) + - info.contact()->contactId() + QString::fromLatin1( "> " ) ); + m_view->m_from->setText( info.contact()->metaContact()->displayName() + TQString::fromLatin1( " <" ) + + info.contact()->contactId() + TQString::fromLatin1( "> " ) ); m_view->m_size->setText( KGlobal::locale()->formatNumber( long( info.size() ), 0 ) ); m_view->m_description->setText( description ); m_view->m_filename->setText( info.file() ); KGlobal::config()->setGroup("File Transfer"); - const QString defaultPath=KGlobal::config()->readEntry("defaultPath" , QDir::homeDirPath() ); - m_view->m_saveto->setText(defaultPath + QString::fromLatin1( "/" ) + info.file() ); + const TQString defaultPath=KGlobal::config()->readEntry("defaultPath" , TQDir::homeDirPath() ); + m_view->m_saveto->setText(defaultPath + TQString::fromLatin1( "/" ) + info.file() ); setMainWidget(m_view); - connect(m_view->cmdBrowse, SIGNAL(clicked()), this, SLOT(slotBrowsePressed())); + connect(m_view->cmdBrowse, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBrowsePressed())); } KopeteFileConfirmDialog::~KopeteFileConfirmDialog() @@ -61,7 +61,7 @@ KopeteFileConfirmDialog::~KopeteFileConfirmDialog() void KopeteFileConfirmDialog::slotBrowsePressed() { - QString saveFileName = KFileDialog::getSaveFileName( m_view->m_saveto->text(), QString::fromLatin1( "*" ), 0L , i18n( "File Transfer" ) ); + TQString saveFileName = KFileDialog::getSaveFileName( m_view->m_saveto->text(), TQString::fromLatin1( "*" ), 0L , i18n( "File Transfer" ) ); if ( !saveFileName.isNull()) { m_view->m_saveto->setText(saveFileName); @@ -74,14 +74,14 @@ void KopeteFileConfirmDialog::slotUser2() KURL url(m_view->m_saveto->text()); if(url.isValid() && url.isLocalFile() ) { - const QString directory=url.directory(); + const TQString directory=url.directory(); if(!directory.isEmpty()) { KGlobal::config()->setGroup("File Transfer"); KGlobal::config()->writeEntry("defaultPath" , directory ); } - if(QFile(m_view->m_saveto->text()).exists()) + if(TQFile(m_view->m_saveto->text()).exists()) { int ret=KMessageBox::warningContinueCancel(this, i18n("The file '%1' already exists.\nDo you want to overwrite it ?").arg(m_view->m_saveto->text()) , i18n("Overwrite File") , KStdGuiItem::save()); @@ -103,7 +103,7 @@ void KopeteFileConfirmDialog::slotUser1() close(); } -void KopeteFileConfirmDialog::closeEvent( QCloseEvent *e) +void KopeteFileConfirmDialog::closeEvent( TQCloseEvent *e) { if(!m_emited) { diff --git a/kopete/libkopete/ui/kopetefileconfirmdialog.h b/kopete/libkopete/ui/kopetefileconfirmdialog.h index 20d58d51..ac5d19a4 100644 --- a/kopete/libkopete/ui/kopetefileconfirmdialog.h +++ b/kopete/libkopete/ui/kopetefileconfirmdialog.h @@ -18,7 +18,7 @@ #ifndef KOPETEFILECONFIRMDIALOG_H #define KOPETEFILECONFIRMDIALOG_H -#include <qwidget.h> +#include <tqwidget.h> #include <kdialogbase.h> #include "kopetetransfermanager.h" @@ -33,7 +33,7 @@ class KopeteFileConfirmDialog : public KDialogBase Q_OBJECT public: - KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const QString& description=QString::null, QWidget *parent=0, const char* name=0); + KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const TQString& description=TQString::null, TQWidget *parent=0, const char* name=0); ~KopeteFileConfirmDialog(); private: @@ -47,10 +47,10 @@ public slots: protected slots: virtual void slotUser2(); virtual void slotUser1(); - virtual void closeEvent( QCloseEvent *e); + virtual void closeEvent( TQCloseEvent *e); signals: - void accepted(const Kopete::FileTransferInfo &info, const QString &filename); + void accepted(const Kopete::FileTransferInfo &info, const TQString &filename); void refused(const Kopete::FileTransferInfo &info); }; diff --git a/kopete/libkopete/ui/kopetelistview.cpp b/kopete/libkopete/ui/kopetelistview.cpp index 594f0920..9630592c 100644 --- a/kopete/libkopete/ui/kopetelistview.cpp +++ b/kopete/libkopete/ui/kopetelistview.cpp @@ -22,14 +22,14 @@ #include "kopeteglobal.h" #include "kopeteprefs.h" -#include <qapplication.h> +#include <tqapplication.h> #include <kglobal.h> #include <kconfig.h> #include <kdebug.h> -#include <qtimer.h> -#include <qtooltip.h> -#include <qstyle.h> +#include <tqtimer.h> +#include <tqtooltip.h> +#include <tqstyle.h> #include <utility> #include <memory> @@ -39,25 +39,25 @@ namespace UI { namespace ListView { /* - Custom QToolTip for the list view. + Custom TQToolTip for the list view. The decision whether or not to show tooltips is taken in - maybeTip(). See also the QListView sources from Qt itself. + maybeTip(). See also the TQListView sources from Qt itself. Delegates to the list view items. */ class ToolTip : public QToolTip { public: - ToolTip( QWidget *parent, ListView *lv ); + ToolTip( TQWidget *parent, ListView *lv ); virtual ~ToolTip(); - void maybeTip( const QPoint &pos ); + void maybeTip( const TQPoint &pos ); private: ListView *m_listView; }; -ToolTip::ToolTip( QWidget *parent, ListView *lv ) - : QToolTip( parent ) +ToolTip::ToolTip( TQWidget *parent, ListView *lv ) + : TQToolTip( parent ) { m_listView = lv; } @@ -66,14 +66,14 @@ ToolTip::~ToolTip() { } -void ToolTip::maybeTip( const QPoint &pos ) +void ToolTip::maybeTip( const TQPoint &pos ) { if( !parentWidget() || !m_listView ) return; if( Item *item = dynamic_cast<Item*>( m_listView->itemAt( pos ) ) ) { - QRect itemRect = m_listView->itemRect( item ); + TQRect itemRect = m_listView->itemRect( item ); uint leftMargin = m_listView->treeStepSize() * ( item->depth() + ( m_listView->rootIsDecorated() ? 1 : 0 ) ) + @@ -81,9 +81,9 @@ void ToolTip::maybeTip( const QPoint &pos ) uint xAdjust = itemRect.left() + leftMargin; uint yAdjust = itemRect.top(); - QPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust ); + TQPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust ); - std::pair<QString,QRect> toolTip = item->toolTip( relativePos ); + std::pair<TQString,TQRect> toolTip = item->toolTip( relativePos ); if ( toolTip.first.isEmpty() ) return; @@ -96,34 +96,34 @@ void ToolTip::maybeTip( const QPoint &pos ) struct ListView::Private { - QTimer sortTimer; + TQTimer sortTimer; std::auto_ptr<ToolTip> toolTip; //! C-tor Private() {} }; -ListView::ListView( QWidget *parent, const char *name ) +ListView::ListView( TQWidget *parent, const char *name ) : KListView( parent, name ), d( new Private ) { - connect( &d->sortTimer, SIGNAL( timeout() ), this, SLOT( slotSort() ) ); + connect( &d->sortTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotSort() ) ); - // We have our own tooltips, don't use the default QListView ones + // We have our own tooltips, don't use the default TQListView ones setShowToolTips( false ); d->toolTip.reset( new ToolTip( viewport(), this ) ); - connect( this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), - SLOT( slotContextMenu( KListView *, QListViewItem *, const QPoint & ) ) ); - connect( this, SIGNAL( doubleClicked( QListViewItem * ) ), - SLOT( slotDoubleClicked( QListViewItem * ) ) ); + connect( this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), + TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) ); + connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + TQT_SLOT( slotDoubleClicked( TQListViewItem * ) ) ); // set up flags for nicer painting clearWFlags( WStaticContents ); setWFlags( WNoAutoErase ); // clear the appropriate flags from the viewport - qt docs say we have to mask - // these flags out of the QListView to make weirdly painted list items work, but + // these flags out of the TQListView to make weirdly painted list items work, but // that doesn't do the job. masking them out of the viewport does. -// class MyWidget : public QWidget { public: using QWidget::clearWFlags; }; +// class MyWidget : public TQWidget { public: using TQWidget::clearWFlags; }; // static_cast<MyWidget*>( viewport() )->clearWFlags( WStaticContents ); // static_cast<MyWidget*>( viewport() )->setWFlags( WNoAutoErase ); @@ -139,7 +139,7 @@ ListView::~ListView() delete d; } -void ListView::slotDoubleClicked( QListViewItem *item ) +void ListView::slotDoubleClicked( TQListViewItem *item ) { kdDebug( 14000 ) << k_funcinfo << endl; @@ -148,7 +148,7 @@ void ListView::slotDoubleClicked( QListViewItem *item ) } void ListView::slotContextMenu( KListView * /*listview*/, - QListViewItem *item, const QPoint &/*point*/ ) + TQListViewItem *item, const TQPoint &/*point*/ ) { if ( item && !item->isSelected() ) { @@ -179,21 +179,21 @@ void ListView::setShowTreeLines( bool bShowAsTree ) /* This is a small hack ensuring that only F2 triggers inline * renaming. Won't win a beauty award, but whoever wrote it thinks - * relying on the fact that QListView intercepts and processes the + * relying on the fact that TQListView intercepts and processes the * F2 event through this event filter is sorta safe. * * Also use enter to execute the item since executed is not usually * called when enter is pressed. */ -void ListView::keyPressEvent( QKeyEvent *e ) +void ListView::keyPressEvent( TQKeyEvent *e ) { - QListViewItem *item = currentItem(); + TQListViewItem *item = currentItem(); if ( (e->key() == Qt::Key_F2) && item && item->isVisible() ) rename( item, 0 ); else if ( (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) && item && item->isVisible() ) { // must provide a point within the item; emitExecute checks for this - QPoint p = viewport()->mapToGlobal(itemRect(item).center()); + TQPoint p = viewport()->mapToGlobal(itemRect(item).center()); emitExecute( currentItem(), p, 0 ); } else diff --git a/kopete/libkopete/ui/kopetelistview.h b/kopete/libkopete/ui/kopetelistview.h index 8b2c579b..2e065212 100644 --- a/kopete/libkopete/ui/kopetelistview.h +++ b/kopete/libkopete/ui/kopetelistview.h @@ -34,7 +34,7 @@ class ListView : public KListView Q_OBJECT public: - ListView( QWidget *parent = 0, const char *name = 0 ); + ListView( TQWidget *parent = 0, const char *name = 0 ); ~ListView(); /** @@ -52,14 +52,14 @@ public: public slots: /** - * Calls QListView::sort() + * Calls TQListView::sort() */ void slotSort() { sort(); } protected: - virtual void keyPressEvent( QKeyEvent *e ); + virtual void keyPressEvent( TQKeyEvent *e ); private slots: - void slotContextMenu(KListView*,QListViewItem *item, const QPoint &point ); - void slotDoubleClicked( QListViewItem *item ); + void slotContextMenu(KListView*,TQListViewItem *item, const TQPoint &point ); + void slotDoubleClicked( TQListViewItem *item ); private: struct Private; Private *d; diff --git a/kopete/libkopete/ui/kopetelistviewitem.cpp b/kopete/libkopete/ui/kopetelistviewitem.cpp index fda2ff4c..888f9d5b 100644 --- a/kopete/libkopete/ui/kopetelistviewitem.cpp +++ b/kopete/libkopete/ui/kopetelistviewitem.cpp @@ -29,14 +29,14 @@ #include <kiconloader.h> #include <kstringhandler.h> -#include <qapplication.h> -#include <qpixmap.h> -#include <qpainter.h> -#include <qptrlist.h> -#include <qrect.h> -#include <qtimer.h> -#include <qheader.h> -#include <qstyle.h> +#include <tqapplication.h> +#include <tqpixmap.h> +#include <tqpainter.h> +#include <tqptrlist.h> +#include <tqrect.h> +#include <tqtimer.h> +#include <tqheader.h> +#include <tqstyle.h> #ifdef HAVE_XRENDER # include <X11/Xlib.h> @@ -54,7 +54,7 @@ namespace ListView { class ComponentBase::Private { public: - QPtrList<Component> components; + TQPtrList<Component> components; }; ComponentBase::ComponentBase() @@ -71,7 +71,7 @@ ComponentBase::~ComponentBase() uint ComponentBase::components() { return d->components.count(); } Component *ComponentBase::component( uint n ) { return d->components.at( n ); } -Component *ComponentBase::componentAt( const QPoint &pt ) +Component *ComponentBase::componentAt( const TQPoint &pt ) { for ( uint n = 0; n < components(); ++n ) { @@ -113,13 +113,13 @@ void ComponentBase::componentResized( Component * ) { } -std::pair<QString,QRect> ComponentBase::toolTip( const QPoint &relativePos ) +std::pair<TQString,TQRect> ComponentBase::toolTip( const TQPoint &relativePos ) { for ( uint n = 0; n < components(); ++n ) if ( component( n )->rect().contains( relativePos ) ) return component( n )->toolTip( relativePos ); - return std::make_pair( QString::null, QRect() ); + return std::make_pair( TQString::null, TQRect() ); } void ComponentBase::updateAnimationPosition( int p, int s ) @@ -127,9 +127,9 @@ void ComponentBase::updateAnimationPosition( int p, int s ) for ( uint n = 0; n < components(); ++n ) { Component *comp = component( n ); - QRect start = comp->startRect(); - QRect target = comp->targetRect(); - QRect rc( start.left() + ((target.left() - start.left()) * p) / s, + TQRect start = comp->startRect(); + TQRect target = comp->targetRect(); + TQRect rc( start.left() + ((target.left() - start.left()) * p) / s, start.top() + ((target.top() - start.top()) * p) / s, start.width() + ((target.width() - start.width()) * p) / s, start.height() + ((target.height() - start.height()) * p) / s ); @@ -150,8 +150,8 @@ public: { } ComponentBase *parent; - QRect rect; - QRect startRect, targetRect; + TQRect rect; + TQRect startRect, targetRect; int minWidth, minHeight; bool growHoriz, growVert; bool show; /** @since 23-03-2005 */ @@ -199,19 +199,19 @@ void Component::setToolTipSource( ToolTipSource *source ) d->tipSource = source; } -std::pair<QString,QRect> Component::toolTip( const QPoint &relativePos ) +std::pair<TQString,TQRect> Component::toolTip( const TQPoint &relativePos ) { if ( !d->tipSource ) return ComponentBase::toolTip( relativePos ); - QRect rc = rect(); - QString result = (*d->tipSource)( this, relativePos, rc ); + TQRect rc = rect(); + TQString result = (*d->tipSource)( this, relativePos, rc ); return std::make_pair(result, rc); } -QRect Component::rect() { return d->rect; } -QRect Component::startRect() { return d->startRect; } -QRect Component::targetRect() { return d->targetRect; } +TQRect Component::rect() { return d->rect; } +TQRect Component::startRect() { return d->startRect; } +TQRect Component::targetRect() { return d->targetRect; } int Component::minWidth() { return d->minWidth; } int Component::minHeight() { return d->minHeight; } @@ -235,22 +235,22 @@ bool Component::setMinHeight( int height ) return true; } -void Component::layout( const QRect &newRect ) +void Component::layout( const TQRect &newRect ) { if ( rect().isNull() ) - d->startRect = QRect( newRect.topLeft(), newRect.topLeft() ); + d->startRect = TQRect( newRect.topLeft(), newRect.topLeft() ); else d->startRect = rect(); d->targetRect = newRect; //kdDebug(14000) << k_funcinfo << "At " << rect << endl; } -void Component::setRect( const QRect &rect ) +void Component::setRect( const TQRect &rect ) { d->rect = rect; } -void Component::paint( QPainter *painter, const QColorGroup &cg ) +void Component::paint( TQPainter *painter, const TQColorGroup &cg ) { /*painter->setPen( Qt::red ); painter->drawRect( rect() );*/ @@ -378,7 +378,7 @@ void BoxComponent::calcMinSize() relayout(); } -void BoxComponent::layout( const QRect &rect ) +void BoxComponent::layout( const TQRect &rect ) { Component::layout( rect ); @@ -413,7 +413,7 @@ void BoxComponent::layout( const QRect &rect ) { Component *comp = component( n ); - QRect rc; + TQRect rc; if ( horiz ) { rc.setLeft( rect.left() + pos ); @@ -464,7 +464,7 @@ void BoxComponent::componentResized( Component *component ) class ImageComponent::Private { public: - QPixmap image; + TQPixmap image; }; ImageComponent::ImageComponent( ComponentBase *parent ) @@ -487,12 +487,12 @@ ImageComponent::~ImageComponent() delete d; } -QPixmap ImageComponent::pixmap() +TQPixmap ImageComponent::pixmap() { return d->image; } -void ImageComponent::setPixmap( const QPixmap &img, bool adjustSize) +void ImageComponent::setPixmap( const TQPixmap &img, bool adjustSize) { d->image = img; if ( adjustSize ) @@ -503,30 +503,30 @@ void ImageComponent::setPixmap( const QPixmap &img, bool adjustSize) repaint(); } -static QPoint operator+( const QPoint &pt, const QSize &sz ) +static TQPoint operator+( const TQPoint &pt, const TQSize &sz ) { - return QPoint( pt.x() + sz.width(), pt.y() + sz.height() ); + return TQPoint( pt.x() + sz.width(), pt.y() + sz.height() ); } -/*static QPoint operator+( const QSize &sz, const QPoint &pt ) +/*static TQPoint operator+( const TQSize &sz, const TQPoint &pt ) { return pt + sz; }*/ -void ImageComponent::paint( QPainter *painter, const QColorGroup & ) +void ImageComponent::paint( TQPainter *painter, const TQColorGroup & ) { - QRect ourRc = rect(); - QRect rc = d->image.rect(); + TQRect ourRc = rect(); + TQRect rc = d->image.rect(); // center rc within our rect rc.moveTopLeft( ourRc.topLeft() + (ourRc.size() - rc.size()) / 2 ); // paint, shrunk to be within our rect painter->drawPixmap( rc & ourRc, d->image ); } -void ImageComponent::scale( int w, int h, QImage::ScaleMode mode ) +void ImageComponent::scale( int w, int h, TQImage::ScaleMode mode ) { - QImage im = d->image.convertToImage(); - setPixmap( QPixmap( im.smoothScale( w, h, mode ) ) ); + TQImage im = d->image.convertToImage(); + setPixmap( TQPixmap( im.smoothScale( w, h, mode ) ) ); } // TextComponent @@ -534,13 +534,13 @@ class TextComponent::Private { public: Private() : customColor( false ) {} - QString text; + TQString text; bool customColor; - QColor color; - QFont font; + TQColor color; + TQFont font; }; -TextComponent::TextComponent( ComponentBase *parent, const QFont &font, const QString &text ) +TextComponent::TextComponent( ComponentBase *parent, const TQFont &font, const TQString &text ) : Component( parent ), d( new Private ) { setFont( font ); @@ -554,12 +554,12 @@ TextComponent::~TextComponent() delete d; } -QString TextComponent::text() +TQString TextComponent::text() { return d->text; } -void TextComponent::setText( const QString &text ) +void TextComponent::setText( const TQString &text ) { if ( text == d->text ) return; d->text = text; @@ -567,12 +567,12 @@ void TextComponent::setText( const QString &text ) calcMinSize(); } -QFont TextComponent::font() +TQFont TextComponent::font() { return d->font; } -void TextComponent::setFont( const QFont &font ) +void TextComponent::setFont( const TQFont &font ) { if ( font == d->font ) return; d->font = font; @@ -584,7 +584,7 @@ void TextComponent::calcMinSize() setMinWidth( 0 ); if ( !d->text.isEmpty() ) - setMinHeight( QFontMetrics( font() ).height() ); + setMinHeight( TQFontMetrics( font() ).height() ); else setMinHeight( 0 ); @@ -597,15 +597,15 @@ int TextComponent::widthForHeight( int ) // allegedly if this is not done the protocol icons overlap the text. // i however have never seen this problem (which would almost certainly // be a bug somewhere else). - return QFontMetrics( font() ).width( d->text ) + 2; + return TQFontMetrics( font() ).width( d->text ) + 2; } -QColor TextComponent::color() +TQColor TextComponent::color() { - return d->customColor ? d->color : QColor(); + return d->customColor ? d->color : TQColor(); } -void TextComponent::setColor( const QColor &color ) +void TextComponent::setColor( const TQColor &color ) { d->color = color; d->customColor = true; @@ -618,13 +618,13 @@ void TextComponent::setDefaultColor() repaint(); } -void TextComponent::paint( QPainter *painter, const QColorGroup &cg ) +void TextComponent::paint( TQPainter *painter, const TQColorGroup &cg ) { if ( d->customColor ) painter->setPen( d->color ); else painter->setPen( cg.text() ); - QString dispStr = KStringHandler::rPixelSqueeze( d->text, QFontMetrics( font() ), rect().width() ); + TQString dispStr = KStringHandler::rPixelSqueeze( d->text, TQFontMetrics( font() ), rect().width() ); painter->setFont( font() ); painter->drawText( rect(), Qt::SingleLine, dispStr ); } @@ -634,8 +634,8 @@ void TextComponent::paint( QPainter *painter, const QColorGroup &cg ) class DisplayNameComponent::Private { public: - QString text; - QFont font; + TQString text; + TQFont font; }; DisplayNameComponent::DisplayNameComponent( ComponentBase *parent ) @@ -650,12 +650,12 @@ DisplayNameComponent::~DisplayNameComponent() delete d; } -void DisplayNameComponent::layout( const QRect &rect ) +void DisplayNameComponent::layout( const TQRect &rect ) { Component::layout( rect ); // finally, lay everything out - QRect rc; + TQRect rc; int totalWidth = rect.width(); int usedWidth = 0; bool exceeded = false; @@ -671,7 +671,7 @@ void DisplayNameComponent::layout( const QRect &rect ) if ( comp->rtti() == Rtti_TextComponent ) { comp->show(); - comp->layout( QRect( usedWidth+ rect.left(), rect.top(), + comp->layout( TQRect( usedWidth+ rect.left(), rect.top(), totalWidth - usedWidth, comp->heightForWidth( totalWidth - usedWidth ) ) ); } else { @@ -681,7 +681,7 @@ void DisplayNameComponent::layout( const QRect &rect ) else { comp->show(); - comp->layout( QRect( usedWidth+ rect.left(), rect.top(), + comp->layout( TQRect( usedWidth+ rect.left(), rect.top(), comp->widthForHeight( rect.height() ), comp->heightForWidth( rect.width() ) ) ); } @@ -695,7 +695,7 @@ void DisplayNameComponent::layout( const QRect &rect ) } } -void DisplayNameComponent::setText( const QString& text ) +void DisplayNameComponent::setText( const TQString& text ) { if ( d->text == text ) return; @@ -706,15 +706,15 @@ void DisplayNameComponent::setText( const QString& text ) void DisplayNameComponent::redraw() { - QColor color; + TQColor color; for ( uint n = 0; n < components(); ++n ) if( component( n )->rtti() == Rtti_TextComponent ) { ((TextComponent*)component(n))->color(); } - QValueList<Kopete::Emoticons::Token> tokens; - QValueList<Kopete::Emoticons::Token>::const_iterator token; + TQValueList<Kopete::Emoticons::Token> tokens; + TQValueList<Kopete::Emoticons::Token>::const_iterator token; clear(); // clear childs @@ -722,7 +722,7 @@ void DisplayNameComponent::redraw() ImageComponent *ic; TextComponent *t; - QFontMetrics fontMetrics( d->font ); + TQFontMetrics fontMetrics( d->font ); int fontHeight = fontMetrics.height(); for ( token = tokens.begin(); token != tokens.end(); ++token ) { @@ -733,8 +733,8 @@ void DisplayNameComponent::redraw() break; case Kopete::Emoticons::Image: ic = new ImageComponent( this ); - ic->setPixmap( QPixmap( (*token).picPath ) ); - ic->scale( INT_MAX, fontHeight, QImage::ScaleMin ); + ic->setPixmap( TQPixmap( (*token).picPath ) ); + ic->scale( INT_MAX, fontHeight, TQImage::ScaleMin ); break; default: kdDebug( 14010 ) << k_funcinfo << "This should have not happened!" << endl; @@ -745,7 +745,7 @@ void DisplayNameComponent::redraw() setColor( color ); } -void DisplayNameComponent::setFont( const QFont& font ) +void DisplayNameComponent::setFont( const TQFont& font ) { for ( uint n = 0; n < components(); ++n ) if( component( n )->rtti() == Rtti_TextComponent ) @@ -753,7 +753,7 @@ void DisplayNameComponent::setFont( const QFont& font ) d->font = font; } -void DisplayNameComponent::setColor( const QColor& color ) +void DisplayNameComponent::setColor( const TQColor& color ) { for ( uint n = 0; n < components(); ++n ) if( component( n )->rtti() == Rtti_TextComponent ) @@ -767,7 +767,7 @@ void DisplayNameComponent::setDefaultColor() ((TextComponent*)component(n))->setDefaultColor(); } -QString DisplayNameComponent::text() +TQString DisplayNameComponent::text() { return d->text; } @@ -835,7 +835,7 @@ Kopete::Contact *ContactComponent::contact() } // we don't need to use a tooltip source here - this way is simpler -std::pair<QString,QRect> ContactComponent::toolTip( const QPoint &/*relativePos*/ ) +std::pair<TQString,TQRect> ContactComponent::toolTip( const TQPoint &/*relativePos*/ ) { return std::make_pair(d->contact->toolTip(),rect()); } @@ -860,16 +860,16 @@ class SharedTimer : private QTimer int users; public: SharedTimer( int period ) : period(period), users(0) {} - void attach( QObject *target, const char *slot ) + void attach( TQObject *target, const char *slot ) { - connect( this, SIGNAL(timeout()), target, slot ); + connect( this, TQT_SIGNAL(timeout()), target, slot ); if( users++ == 0 ) start( period ); //kdDebug(14000) << "SharedTimer::attach: users is now " << users << "\n"; } - void detach( QObject *target, const char *slot ) + void detach( TQObject *target, const char *slot ) { - disconnect( this, SIGNAL(timeout()), target, slot ); + disconnect( this, TQT_SIGNAL(timeout()), target, slot ); if( --users == 0 ) stop(); //kdDebug(14000) << "SharedTimer::detach: users is now " << users << "\n"; @@ -879,11 +879,11 @@ public: class SharedTimerRef { SharedTimer &timer; - QObject * const object; + TQObject * const object; const char * const slot; bool attached; public: - SharedTimerRef( SharedTimer &timer, QObject *obj, const char *slot ) + SharedTimerRef( SharedTimer &timer, TQObject *obj, const char *slot ) : timer(timer), object(obj), slot(slot), attached(false) { } @@ -909,16 +909,16 @@ class Item::Private { public: Private( Item *item ) - : layoutAnimateTimer( theLayoutAnimateTimer(), item, SLOT( slotLayoutAnimateItems() ) ) + : layoutAnimateTimer( theLayoutAnimateTimer(), item, TQT_SLOT( slotLayoutAnimateItems() ) ) , animateLayout( true ), opacity( 1.0 ) - , visibilityTimer( theVisibilityTimer(), item, SLOT( slotUpdateVisibility() ) ) + , visibilityTimer( theVisibilityTimer(), item, TQT_SLOT( slotUpdateVisibility() ) ) , visibilityLevel( 0 ), visibilityTarget( false ), searchMatch( true ) { } - QTimer layoutTimer; + TQTimer layoutTimer; - //QTimer layoutAnimateTimer; + //TQTimer layoutAnimateTimer; SharedTimerRef layoutAnimateTimer; SharedTimer &theLayoutAnimateTimer() { @@ -932,7 +932,7 @@ public: float opacity; - //QTimer visibilityTimer; + //TQTimer visibilityTimer; SharedTimerRef visibilityTimer; SharedTimer &theVisibilityTimer() { @@ -961,14 +961,14 @@ bool Item::Private::animateChanges = true; bool Item::Private::fadeVisibility = true; bool Item::Private::foldVisibility = true; -Item::Item( QListViewItem *parent, QObject *owner, const char *name ) - : QObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) +Item::Item( TQListViewItem *parent, TQObject *owner, const char *name ) + : TQObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) { initLVI(); } -Item::Item( QListView *parent, QObject *owner, const char *name ) - : QObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) +Item::Item( TQListView *parent, TQObject *owner, const char *name ) + : TQObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) { initLVI(); } @@ -987,10 +987,10 @@ void Item::setEffects( bool animation, bool fading, bool folding ) void Item::initLVI() { - connect( listView()->header(), SIGNAL( sizeChange( int, int, int ) ), SLOT( slotColumnResized() ) ); - connect( &d->layoutTimer, SIGNAL( timeout() ), SLOT( slotLayoutItems() ) ); - //connect( &d->layoutAnimateTimer, SIGNAL( timeout() ), SLOT( slotLayoutAnimateItems() ) ); - //connect( &d->visibilityTimer, SIGNAL( timeout() ), SLOT( slotUpdateVisibility() ) ); + connect( listView()->header(), TQT_SIGNAL( sizeChange( int, int, int ) ), TQT_SLOT( slotColumnResized() ) ); + connect( &d->layoutTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotLayoutItems() ) ); + //connect( &d->layoutAnimateTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotLayoutAnimateItems() ) ); + //connect( &d->visibilityTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotUpdateVisibility() ) ); setVisible( false ); setTargetVisibility( true ); } @@ -1023,7 +1023,7 @@ void Item::slotLayoutItems() } int height = component( n )->heightForWidth( width ); - component( n )->layout( QRect( 0, 0, width, height ) ); + component( n )->layout( TQRect( 0, 0, width, height ) ); //kdDebug(14000) << k_funcinfo << "Component " << n << " is " << width << " x " << height << endl; } @@ -1169,62 +1169,62 @@ void Item::setHeight( int ) KListViewItem::setHeight( minHeight ); } -int Item::width( const QFontMetrics &, const QListView *lv, int c ) const +int Item::width( const TQFontMetrics &, const TQListView *lv, int c ) const { // Qt computes the itemRect from this. we want the whole item to be // clickable, so we return the widest we could possibly be. return lv->header()->sectionSize( c ); } -void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ) +void Item::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) { - QPixmap back( width, height() ); - QPainter paint( &back ); + TQPixmap back( width, height() ); + TQPainter paint( &back ); //KListViewItem::paintCell( &paint, cg, column, width, align ); // PASTED FROM KLISTVIEWITEM: // set the alternate cell background colour if necessary - QColorGroup _cg = cg; + TQColorGroup _cg = cg; if (isAlternate()) if (listView()->viewport()->backgroundMode()==Qt::FixedColor) - _cg.setColor(QColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground()); + _cg.setColor(TQColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground()); else - _cg.setColor(QColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground()); + _cg.setColor(TQColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground()); // PASTED FROM QLISTVIEWITEM { - QPainter *p = &paint; + TQPainter *p = &paint; - QListView *lv = listView(); + TQListView *lv = listView(); if ( !lv ) return; - QFontMetrics fm( p->fontMetrics() ); + TQFontMetrics fm( p->fontMetrics() ); // any text we render is done by the Components, not by this class, so make sure we've nothing to write - QString t; + TQString t; // removed text truncating code from Qt - we do that differently, further on int marg = lv->itemMargin(); int r = marg; - // const QPixmap * icon = pixmap( column ); + // const TQPixmap * icon = pixmap( column ); const BackgroundMode bgmode = lv->viewport()->backgroundMode(); - const QColorGroup::ColorRole crole = QPalette::backgroundRoleFromMode( bgmode ); + const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); if ( _cg.brush( crole ) != lv->colorGroup().brush( crole ) ) p->fillRect( 0, 0, width, height(), _cg.brush( crole ) ); else { - // all copied from QListView::paintEmptyArea + // all copied from TQListView::paintEmptyArea - //lv->paintEmptyArea( p, QRect( 0, 0, width, height() ) ); - QStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in QListView and QHeader - QStyle::SFlags how = QStyle::Style_Default; + //lv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) ); + TQStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in TQListView and QHeader + TQStyle::SFlags how = TQStyle::Style_Default; if ( lv->isEnabled() ) - how |= QStyle::Style_Enabled; + how |= TQStyle::Style_Enabled; - lv->style().drawComplexControl( QStyle::CC_ListView, - p, lv, QRect( 0, 0, width, height() ), lv->colorGroup(), - how, QStyle::SC_ListView, QStyle::SC_None, + lv->style().drawComplexControl( TQStyle::CC_ListView, + p, lv, TQRect( 0, 0, width, height() ), lv->colorGroup(), + how, TQStyle::SC_ListView, TQStyle::SC_None, opt ); } @@ -1233,7 +1233,7 @@ void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, if ( isSelected() && (column == 0 || lv->allColumnsShowFocus()) ) { p->fillRect( r - marg, 0, width - r + marg, height(), - _cg.brush( QColorGroup::Highlight ) ); + _cg.brush( TQColorGroup::Highlight ) ); // removed text pen setting code from Qt } @@ -1242,16 +1242,16 @@ void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, // draw the tree gubbins if ( multiLinesEnabled() && column == 0 && isOpen() && childCount() ) { int textheight = fm.size( align, t ).height() + 2 * lv->itemMargin(); - textheight = QMAX( textheight, QApplication::globalStrut().height() ); + textheight = QMAX( textheight, TQApplication::globalStrut().height() ); if ( textheight % 2 > 0 ) textheight++; if ( textheight < height() ) { int w = lv->treeStepSize() / 2; - lv->style().drawComplexControl( QStyle::CC_ListView, p, lv, - QRect( 0, textheight, w + 1, height() - textheight + 1 ), _cg, - lv->isEnabled() ? QStyle::Style_Enabled : QStyle::Style_Default, - QStyle::SC_ListViewExpand, - (uint)QStyle::SC_All, QStyleOption( this ) ); + lv->style().drawComplexControl( TQStyle::CC_ListView, p, lv, + TQRect( 0, textheight, w + 1, height() - textheight + 1 ), _cg, + lv->isEnabled() ? TQStyle::Style_Enabled : TQStyle::Style_Default, + TQStyle::SC_ListViewExpand, + (uint)TQStyle::SC_All, TQStyleOption( this ) ); } } } @@ -1260,14 +1260,14 @@ void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, //do you see a better way to tell the TextComponent we are selected ? - Olivier 2004-09-02 if ( isSelected() ) - _cg.setColor(QColorGroup::Text , _cg.highlightedText() ); + _cg.setColor(TQColorGroup::Text , _cg.highlightedText() ); if ( Component *comp = component( column ) ) comp->paint( &paint, _cg ); paint.end(); #ifdef HAVE_XRENDER - QColor rgb = cg.base();//backgroundColor(); + TQColor rgb = cg.base();//backgroundColor(); float opac = 1.0; if ( d->visibilityTimer.isActive() && Private::fadeVisibility ) { diff --git a/kopete/libkopete/ui/kopetelistviewitem.h b/kopete/libkopete/ui/kopetelistviewitem.h index 5952c569..e57482d0 100644 --- a/kopete/libkopete/ui/kopetelistviewitem.h +++ b/kopete/libkopete/ui/kopetelistviewitem.h @@ -23,7 +23,7 @@ #include <kopetecontact.h> #include <utility> -#include <qimage.h> +#include <tqimage.h> class QPixmap; @@ -41,7 +41,7 @@ public: uint components(); Component *component( uint n ); - Component *componentAt( const QPoint &pt ); + Component *componentAt( const TQPoint &pt ); /** Repaint this item */ virtual void repaint() = 0; @@ -55,7 +55,7 @@ public: * @return a pair where the first element is the tooltip, and the second is * the rectangle within the item for which the tip should be displayed. */ - virtual std::pair<QString,QRect> toolTip( const QPoint &relativePos ); + virtual std::pair<TQString,TQRect> toolTip( const TQPoint &relativePos ); protected: /** A child item has been added to this item */ @@ -91,7 +91,7 @@ public: * @param rect The tip will be removed when the mouse leaves this rect. * Will initially be set to \p component's rect(). */ - virtual QString operator() ( ComponentBase *component, const QPoint &pt, QRect &rect ) = 0; + virtual TQString operator() ( ComponentBase *component, const TQPoint &pt, TQRect &rect ) = 0; }; /** @@ -112,13 +112,13 @@ public: * @param rect the new rectangle this component will paint in, relative to the painter * passed to the paint() function by the parent item. */ - virtual void layout( const QRect &rect ); + virtual void layout( const TQRect &rect ); /** * Paint this item, inside the rectangle returned by rect(). * The default implementation calls paint on all children. */ - virtual void paint( QPainter *painter, const QColorGroup &cg ); + virtual void paint( TQPainter *painter, const TQColorGroup &cg ); void repaint(); void relayout(); @@ -126,7 +126,7 @@ public: /** * @return the rect this component was allocated last time it was laid out */ - QRect rect(); + TQRect rect(); /** * Prevents this component to be drawn */ @@ -177,7 +177,7 @@ public: * @return a pair where the first element is the tooltip, and the second is * the rectangle within the item for which the tip should be displayed. */ - std::pair<QString,QRect> toolTip( const QPoint &relativePos ); + std::pair<TQString,TQRect> toolTip( const TQPoint &relativePos ); /** * RTTI: Runtime Type Information @@ -221,9 +221,9 @@ private: friend void ComponentBase::updateAnimationPosition( int p, int s ); // used for animation - void setRect( const QRect &rect ); - QRect startRect(); - QRect targetRect(); + void setRect( const TQRect &rect ); + TQRect startRect(); + TQRect targetRect(); class Private; Private *d; @@ -236,7 +236,7 @@ public: BoxComponent( ComponentBase *parent, Direction dir = Horizontal ); ~BoxComponent(); - void layout( const QRect &rect ); + void layout( const TQRect &rect ); virtual int widthForHeight( int height ); virtual int heightForWidth( int width ); @@ -259,22 +259,22 @@ private: class TextComponent : public Component { public: - TextComponent( ComponentBase *parent, const QFont &font = QFont(), const QString &text = QString::null ); + TextComponent( ComponentBase *parent, const TQFont &font = TQFont(), const TQString &text = TQString::null ); ~TextComponent(); - QString text(); - void setText( const QString &text ); + TQString text(); + void setText( const TQString &text ); - QFont font(); - void setFont( const QFont &font ); + TQFont font(); + void setFont( const TQFont &font ); - QColor color(); - void setColor( const QColor &color ); + TQColor color(); + void setColor( const TQColor &color ); void setDefaultColor(); int widthForHeight( int ); - void paint( QPainter *painter, const QColorGroup &cg ); + void paint( TQPainter *painter, const TQColorGroup &cg ); static int RTTI; virtual int rtti() const { return RTTI; } @@ -293,12 +293,12 @@ public: ImageComponent( ComponentBase *parent, int minW, int minH ); ~ImageComponent(); - void setPixmap( const QPixmap &img, bool adjustSize = true); - QPixmap pixmap( void ); + void setPixmap( const TQPixmap &img, bool adjustSize = true); + TQPixmap pixmap( void ); - void paint( QPainter *painter, const QColorGroup &cg ); + void paint( TQPainter *painter, const TQColorGroup &cg ); - void scale( int w, int h, QImage::ScaleMode ); + void scale( int w, int h, TQImage::ScaleMode ); static int RTTI; virtual int rtti() const { return RTTI; } private: @@ -316,7 +316,7 @@ public: ~ContactComponent(); void updatePixmap(); Kopete::Contact *contact(); - std::pair<QString,QRect> toolTip( const QPoint &relativePos ); + std::pair<TQString,TQRect> toolTip( const TQPoint &relativePos ); protected: class Private; Private *d; @@ -347,12 +347,12 @@ public: * Dtor */ ~DisplayNameComponent(); - void layout( const QRect& rect ); + void layout( const TQRect& rect ); - QString text(); - void setText( const QString& text ); - void setFont( const QFont& font ); - void setColor( const QColor& color ); + TQString text(); + void setText( const TQString& text ); + void setFont( const TQFont& font ); + void setColor( const TQColor& color ); void setDefaultColor(); static int RTTI; virtual int rtti() const { return RTTI; } @@ -392,19 +392,19 @@ public: * * @author Richard Smith <kde@metafoo.co.uk> */ -class Item : public QObject, public KListViewItem, public ComponentBase +class Item : public TQObject, public KListViewItem, public ComponentBase { Q_OBJECT public: - Item( QListView *parent, QObject *owner = 0, const char *name = 0 ); - Item( QListViewItem *parent, QObject *owner = 0, const char *name = 0 ); + Item( TQListView *parent, TQObject *owner = 0, const char *name = 0 ); + Item( TQListViewItem *parent, TQObject *owner = 0, const char *name = 0 ); ~Item(); void repaint(); void relayout(); void setup(); - virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ); + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); //TODO: startRename(...) float opacity(); @@ -421,7 +421,7 @@ public: */ static void setEffects( bool animation, bool fading, bool folding ); - int width( const QFontMetrics & fm, const QListView * lv, int c ) const; + int width( const TQFontMetrics & fm, const TQListView * lv, int c ) const; /** * Show or hide this item in a clean way depending on whether it matches diff --git a/kopete/libkopete/ui/kopetelistviewsearchline.cpp b/kopete/libkopete/ui/kopetelistviewsearchline.cpp index a71d86c0..edb63ffc 100644 --- a/kopete/libkopete/ui/kopetelistviewsearchline.cpp +++ b/kopete/libkopete/ui/kopetelistviewsearchline.cpp @@ -24,12 +24,12 @@ namespace Kopete { namespace UI { namespace ListView { -SearchLine::SearchLine( QWidget *parent, ListView *listView, const char *name ) +SearchLine::SearchLine( TQWidget *parent, ListView *listView, const char *name ) : KListViewSearchLine( parent, listView, name ) { } -SearchLine::SearchLine(QWidget *parent, const char *name) +SearchLine::SearchLine(TQWidget *parent, const char *name) : KListViewSearchLine( parent, 0, name ) { } @@ -39,7 +39,7 @@ SearchLine::~SearchLine() } -void SearchLine::updateSearch( const QString &s ) +void SearchLine::updateSearch( const TQString &s ) { // we copy a huge chunk of code here simply in order to override // the way items are shown/hidden. KSearchLine rudely @@ -54,7 +54,7 @@ void SearchLine::updateSearch( const QString &s ) // If there's a selected item that is visible, make sure that it's visible // when the search changes too (assuming that it still matches). - QListViewItem *currentItem = 0; + TQListViewItem *currentItem = 0; switch( listView()->selectionMode() ) { @@ -64,7 +64,7 @@ void SearchLine::updateSearch( const QString &s ) currentItem = listView()->selectedItem(); break; default: - for( QListViewItemIterator it(listView(), QListViewItemIterator::Selected | QListViewItemIterator::Visible); + for( TQListViewItemIterator it(listView(), TQListViewItemIterator::Selected | TQListViewItemIterator::Visible); it.current() && !currentItem; ++it ) { if( listView()->itemRect( it.current() ).isValid() ) @@ -85,10 +85,10 @@ void SearchLine::updateSearch( const QString &s ) void SearchLine::checkItemParentsNotVisible() { //BEGIN code from KSearchLine::checkItemParentsNotVisible - QListViewItemIterator it( listView() ); + TQListViewItemIterator it( listView() ); for( ; it.current(); ++it ) { - QListViewItem *item = it.current(); + TQListViewItem *item = it.current(); if( itemMatches( item, search ) ) setItemVisible( item, true ); else @@ -97,7 +97,7 @@ void SearchLine::checkItemParentsNotVisible() //END code from KSearchLine::checkItemParentsNotVisible } -bool SearchLine::checkItemParentsVisible( QListViewItem *item ) +bool SearchLine::checkItemParentsVisible( TQListViewItem *item ) { //BEGIN code from KSearchLine::checkItemParentsVisible bool visible = false; @@ -123,7 +123,7 @@ bool SearchLine::checkItemParentsVisible( QListViewItem *item ) //END code from KSearchLine::checkItemParentsVisible } -void SearchLine::setItemVisible( QListViewItem *it, bool b ) +void SearchLine::setItemVisible( TQListViewItem *it, bool b ) { if( Item *item = dynamic_cast<Item*>( it ) ) item->setSearchMatch( b ); diff --git a/kopete/libkopete/ui/kopetelistviewsearchline.h b/kopete/libkopete/ui/kopetelistviewsearchline.h index a453b844..be7fc317 100644 --- a/kopete/libkopete/ui/kopetelistviewsearchline.h +++ b/kopete/libkopete/ui/kopetelistviewsearchline.h @@ -37,26 +37,26 @@ public: * If \a listView is null then the widget will be disabled until a listview * is set with setListView(). */ - SearchLine( QWidget *parent, ListView *listView = 0, const char *name = 0 ); + SearchLine( TQWidget *parent, ListView *listView = 0, const char *name = 0 ); /** * Constructs a SearchLine without any ListView to filter. The * KListView object has to be set later with setListView(). */ - SearchLine(QWidget *parent, const char *name); + SearchLine(TQWidget *parent, const char *name); /** * Destroys the SearchLine. */ ~SearchLine(); - void updateSearch( const QString &s ); + void updateSearch( const TQString &s ); protected: virtual void checkItemParentsNotVisible(); - virtual bool checkItemParentsVisible( QListViewItem *it ); - virtual void setItemVisible( QListViewItem *it, bool visible ); + virtual bool checkItemParentsVisible( TQListViewItem *it ); + virtual void setItemVisible( TQListViewItem *it, bool visible ); private: - QString search; + TQString search; }; } // end namespace ListView diff --git a/kopete/libkopete/ui/kopetepasswordwidget.cpp b/kopete/libkopete/ui/kopetepasswordwidget.cpp index 2345f103..52921b16 100644 --- a/kopete/libkopete/ui/kopetepasswordwidget.cpp +++ b/kopete/libkopete/ui/kopetepasswordwidget.cpp @@ -20,7 +20,7 @@ #include <kpassdlg.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> class Kopete::UI::PasswordWidget::Private { @@ -28,7 +28,7 @@ public: uint maxLength; }; -Kopete::UI::PasswordWidget::PasswordWidget( QWidget *parent, const char *name, Kopete::Password *from ) +Kopete::UI::PasswordWidget::PasswordWidget( TQWidget *parent, const char *name, Kopete::Password *from ) : KopetePasswordWidgetBase( parent, name ), d( new Private ) { load( from ); @@ -41,15 +41,15 @@ Kopete::UI::PasswordWidget::~PasswordWidget() void Kopete::UI::PasswordWidget::load( Kopete::Password *source ) { - disconnect( mRemembered, SIGNAL( stateChanged( int ) ), this, SLOT( slotRememberChanged() ) ); - disconnect( mPassword, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) ); - disconnect( mRemembered, SIGNAL( stateChanged( int ) ), this, SIGNAL( changed() ) ); + disconnect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotRememberChanged() ) ); + disconnect( mPassword, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) ); + disconnect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SIGNAL( changed() ) ); if ( source && source->remembered() ) { mRemembered->setTristate(); mRemembered->setNoChange(); - source->requestWithoutPrompt( this, SLOT( receivePassword( const QString & ) ) ); + source->requestWithoutPrompt( this, TQT_SLOT( receivePassword( const TQString & ) ) ); } else { @@ -64,9 +64,9 @@ void Kopete::UI::PasswordWidget::load( Kopete::Password *source ) mPassword->setEnabled( false ); - connect( mRemembered, SIGNAL( stateChanged( int ) ), this, SLOT( slotRememberChanged() ) ); - connect( mPassword, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) ); - connect( mRemembered, SIGNAL( stateChanged( int ) ), this, SIGNAL( changed() ) ); + connect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotRememberChanged() ) ); + connect( mPassword, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) ); + connect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SIGNAL( changed() ) ); emit changed(); } @@ -77,11 +77,11 @@ void Kopete::UI::PasswordWidget::slotRememberChanged() mPassword->setEnabled( mRemembered->isChecked() ); } -void Kopete::UI::PasswordWidget::receivePassword( const QString &pwd ) +void Kopete::UI::PasswordWidget::receivePassword( const TQString &pwd ) { // pwd == null could mean user declined to open wallet // don't uncheck the remembered field in this case. - if ( !pwd.isNull() && mRemembered->state() == QButton::NoChange ) + if ( !pwd.isNull() && mRemembered->state() == TQButton::NoChange ) { mRemembered->setChecked( true ); setPassword( pwd ); @@ -90,7 +90,7 @@ void Kopete::UI::PasswordWidget::receivePassword( const QString &pwd ) void Kopete::UI::PasswordWidget::save( Kopete::Password *target ) { - if ( !target || mRemembered->state() == QButton::NoChange ) + if ( !target || mRemembered->state() == TQButton::NoChange ) return; if ( mRemembered->isChecked() ) @@ -106,17 +106,17 @@ bool Kopete::UI::PasswordWidget::validate() return password().length() <= d->maxLength; } -QString Kopete::UI::PasswordWidget::password() const +TQString Kopete::UI::PasswordWidget::password() const { - return QString::fromLocal8Bit( mPassword->password() ); + return TQString::fromLocal8Bit( mPassword->password() ); } bool Kopete::UI::PasswordWidget::remember() const { - return mRemembered->state() == QButton::On; + return mRemembered->state() == TQButton::On; } -void Kopete::UI::PasswordWidget::setPassword( const QString &pass ) +void Kopete::UI::PasswordWidget::setPassword( const TQString &pass ) { // switch out of 'waiting for wallet' mode if we're in it mRemembered->setTristate( false ); diff --git a/kopete/libkopete/ui/kopetepasswordwidget.h b/kopete/libkopete/ui/kopetepasswordwidget.h index b1c51a39..72834bff 100644 --- a/kopete/libkopete/ui/kopetepasswordwidget.h +++ b/kopete/libkopete/ui/kopetepasswordwidget.h @@ -45,7 +45,7 @@ public: * @param name The name of this QObject * @param from The password to load the data for this widget from, or 0 if none */ - PasswordWidget( QWidget *parent, const char *name = 0, Kopete::Password *from = 0 ); + PasswordWidget( TQWidget *parent, const char *name = 0, Kopete::Password *from = 0 ); ~PasswordWidget(); /** @@ -67,7 +67,7 @@ public: /** * Returns the string currently in the input box in the widget */ - QString password() const; + TQString password() const; /** * Returns a boolean indicating whether the Remember Password checkbox is checked. * Result is undefined if the Remember Password field is in the 'no change' state @@ -79,7 +79,7 @@ public: * Set the password stored in the widget. * @param pass The text to place in the password field. */ - void setPassword( const QString &pass ); + void setPassword( const TQString &pass ); signals: /** @@ -89,7 +89,7 @@ signals: public slots: /** @internal */ - void receivePassword( const QString & ); + void receivePassword( const TQString & ); private slots: void slotRememberChanged(); diff --git a/kopete/libkopete/ui/kopetestdaction.cpp b/kopete/libkopete/ui/kopetestdaction.cpp index e6731485..f1595f4e 100644 --- a/kopete/libkopete/ui/kopetestdaction.cpp +++ b/kopete/libkopete/ui/kopetestdaction.cpp @@ -18,7 +18,7 @@ #include "kopetestdaction.h" -#include <qapplication.h> +#include <tqapplication.h> #include <kdebug.h> #include <kdeversion.h> @@ -41,10 +41,10 @@ KopetePreferencesAction::KopetePreferencesAction( KActionCollection *parent, con : KAction( KStdGuiItem::configure(), 0, 0, 0, parent, name ) #else : KAction( KGuiItem( i18n( "&Configure Kopete..." ), - QString::fromLatin1( "configure" ) ), 0, 0, 0, parent, name ) + TQString::fromLatin1( "configure" ) ), 0, 0, 0, parent, name ) #endif { - connect( this, SIGNAL( activated() ), this, SLOT( slotShowPreferences() ) ); + connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotShowPreferences() ) ); } KopetePreferencesAction::~KopetePreferencesAction() @@ -68,59 +68,59 @@ KAction * KopeteStdAction::preferences( KActionCollection *parent, const char *n return new KopetePreferencesAction( parent, name ); } -KAction * KopeteStdAction::chat( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::chat( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Start &Chat..." ), QString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Start &Chat..." ), TQString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::sendMessage( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::sendMessage( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Send Single Message..." ), QString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Send Single Message..." ), TQString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::contactInfo( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::contactInfo( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "User &Info" ), QString::fromLatin1( "messagebox_info" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "User &Info" ), TQString::fromLatin1( "messagebox_info" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::sendFile( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::sendFile( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Send &File..." ), QString::fromLatin1( "attach" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Send &File..." ), TQString::fromLatin1( "attach" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::viewHistory( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::viewHistory( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "View &History..." ), QString::fromLatin1( "history" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "View &History..." ), TQString::fromLatin1( "history" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::addGroup( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::addGroup( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Create Group..." ), QString::fromLatin1( "folder" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Create Group..." ), TQString::fromLatin1( "folder" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::changeMetaContact( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::changeMetaContact( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Cha&nge Meta Contact..." ), QString::fromLatin1( "move" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Cha&nge Meta Contact..." ), TQString::fromLatin1( "move" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::deleteContact( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::deleteContact( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Delete Contact" ), QString::fromLatin1( "delete_user" ), Qt::Key_Delete, recvr, slot, parent, name ); + return new KAction( i18n( "&Delete Contact" ), TQString::fromLatin1( "delete_user" ), Qt::Key_Delete, recvr, slot, parent, name ); } -KAction * KopeteStdAction::changeAlias( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::changeAlias( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Change A&lias..." ), QString::fromLatin1( "signature" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Change A&lias..." ), TQString::fromLatin1( "signature" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::blockContact( const QObject *recvr, const char *slot, QObject* parent, const char *name ) +KAction * KopeteStdAction::blockContact( const TQObject *recvr, const char *slot, TQObject* parent, const char *name ) { - return new KAction( i18n( "&Block Contact" ), QString::fromLatin1( "player_pause" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Block Contact" ), TQString::fromLatin1( "player_pause" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::unblockContact( const QObject *recvr, const char *slot, QObject* parent, const char *name ) +KAction * KopeteStdAction::unblockContact( const TQObject *recvr, const char *slot, TQObject* parent, const char *name ) { - return new KAction( i18n( "Un&block Contact" ), QString::fromLatin1( "player_play" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Un&block Contact" ), TQString::fromLatin1( "player_play" ), 0, recvr, slot, parent, name ); } #include "kopetestdaction.moc" diff --git a/kopete/libkopete/ui/kopetestdaction.h b/kopete/libkopete/ui/kopetestdaction.h index 8f06d296..bd323943 100644 --- a/kopete/libkopete/ui/kopetestdaction.h +++ b/kopete/libkopete/ui/kopetestdaction.h @@ -21,7 +21,7 @@ #undef KDE_NO_COMPAT #include <kaction.h> -#include <qobject.h> +#include <tqobject.h> #include "kopete_export.h" @@ -34,58 +34,58 @@ public: /** * Standard action to start a chat */ - static KAction *chat( const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0 ); + static KAction *chat( const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0 ); /** * Standard action to send a single message */ - static KAction *sendMessage(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *sendMessage(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to open a user info dialog */ - static KAction *contactInfo(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *contactInfo(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to open a history dialog or something similar */ - static KAction *viewHistory(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *viewHistory(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to initiate sending a file to a contact */ - static KAction *sendFile(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *sendFile(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to change a contacts @ref Kopete::MetaContact */ - static KAction *changeMetaContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *changeMetaContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to add a group */ - static KAction *addGroup(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *addGroup(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to delete a contact */ - static KAction *deleteContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *deleteContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to change a contact alias/nickname in your contactlist */ - static KAction *changeAlias(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *changeAlias(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to block a contact */ - static KAction *blockContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *blockContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to unblock a contact */ - static KAction *unblockContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *unblockContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Return an action to change the Kopete preferences. diff --git a/kopete/libkopete/ui/kopeteview.cpp b/kopete/libkopete/ui/kopeteview.cpp index 91f1fa9c..111f1405 100644 --- a/kopete/libkopete/ui/kopeteview.cpp +++ b/kopete/libkopete/ui/kopeteview.cpp @@ -32,9 +32,9 @@ void KopeteView::clear() //Do nothing } -void KopeteView::appendMessages(QValueList<Kopete::Message> msgs) +void KopeteView::appendMessages(TQValueList<Kopete::Message> msgs) { - QValueList<Kopete::Message>::iterator it; + TQValueList<Kopete::Message>::iterator it; for ( it = msgs.begin(); it != msgs.end(); ++it ) { appendMessage(*it); diff --git a/kopete/libkopete/ui/kopeteview.h b/kopete/libkopete/ui/kopeteview.h index 47320546..c54b1dba 100644 --- a/kopete/libkopete/ui/kopeteview.h +++ b/kopete/libkopete/ui/kopeteview.h @@ -20,7 +20,7 @@ #define KOPETEVIEW_H #include "kopetemessage.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "kopete_export.h" namespace Kopete @@ -79,7 +79,7 @@ class KOPETE_EXPORT KopeteView * * The default implementation just call @ref appendMessage() X times */ - virtual void appendMessages( QValueList<Kopete::Message> ); + virtual void appendMessages( TQValueList<Kopete::Message> ); /** * @brief Raises the view above other windows @@ -115,12 +115,12 @@ class KOPETE_EXPORT KopeteView * * Can be reimplemented to return this if derived object is a widget */ - virtual QWidget *mainWidget() = 0; + virtual TQWidget *mainWidget() = 0; /** * @brief Inform the view the message was sent successfully * - * This should be reimplemented as a SLOT in any derived objects + * This should be reimplemented as a TQT_SLOT in any derived objects */ virtual void messageSentSuccessfully() = 0; @@ -135,10 +135,10 @@ class KOPETE_EXPORT KopeteView * A view does not need to implement this method unless they have context * menus that can be extended * - * @param target A target QObject for the contextMenuEvent signal of the view - * @param slot A slot that matches the signature ( QString&, KPopupMenu *) + * @param target A target TQObject for the contextMenuEvent signal of the view + * @param slot A slot that matches the signature ( TQString&, KPopupMenu *) */ - virtual void registerContextMenuHandler( QObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; + virtual void registerContextMenuHandler( TQObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; /** * @brief Register a handler for the tooltip @@ -151,10 +151,10 @@ class KOPETE_EXPORT KopeteView * A view does not need to impliment this method unless it has the ability * to show tooltips * - * @param target A target QObject for the contextMenuEvent signal of the view - * @param slot A slot that matches the signature ( QString&, KPopupMenu *) + * @param target A target TQObject for the contextMenuEvent signal of the view + * @param slot A slot that matches the signature ( TQString&, KPopupMenu *) */ - virtual void registerTooltipHandler( QObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; + virtual void registerTooltipHandler( TQObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; /** * @brief Returns the Kopete::ViewPlugin responsible for this view diff --git a/kopete/libkopete/ui/kopeteviewplugin.cpp b/kopete/libkopete/ui/kopeteviewplugin.cpp index b358e547..843fe939 100644 --- a/kopete/libkopete/ui/kopeteviewplugin.cpp +++ b/kopete/libkopete/ui/kopeteviewplugin.cpp @@ -16,7 +16,7 @@ #include "kopeteviewplugin.h" -Kopete::ViewPlugin::ViewPlugin( KInstance *instance, QObject *parent, const char *name ) : +Kopete::ViewPlugin::ViewPlugin( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Plugin( instance, parent, name ) { diff --git a/kopete/libkopete/ui/kopeteviewplugin.h b/kopete/libkopete/ui/kopeteviewplugin.h index e7797d56..25ce704b 100644 --- a/kopete/libkopete/ui/kopeteviewplugin.h +++ b/kopete/libkopete/ui/kopeteviewplugin.h @@ -41,7 +41,7 @@ class KOPETE_EXPORT ViewPlugin : public Plugin /** * @brief Create and initialize the plugin */ - ViewPlugin( KInstance *instance, QObject *parent = 0L, const char *name = 0L ); + ViewPlugin( KInstance *instance, TQObject *parent = 0L, const char *name = 0L ); /** * @brief Creates a view to be associated with the passed in session diff --git a/kopete/libkopete/ui/kopetewidgets.cpp b/kopete/libkopete/ui/kopetewidgets.cpp index 093ee48e..916b0faf 100644 --- a/kopete/libkopete/ui/kopetewidgets.cpp +++ b/kopete/libkopete/ui/kopetewidgets.cpp @@ -3,7 +3,7 @@ * The generated code in this file is licensed under the same license that the * input file. */ -#include <qwidgetplugin.h> +#include <tqwidgetplugin.h> #include <kinstance.h> #include <addressbooklinkwidget.h> @@ -20,92 +20,92 @@ public: virtual ~KopeteWidgets(); - virtual QStringList keys() const + virtual TQStringList keys() const { - QStringList result; + TQStringList result; for (WidgetInfos::ConstIterator it = m_widgets.begin(); it != m_widgets.end(); ++it) result << it.key(); return result; } - virtual QWidget *create(const QString &key, QWidget *parent = 0, const char *name = 0); + virtual TQWidget *create(const TQString &key, TQWidget *parent = 0, const char *name = 0); - virtual QIconSet iconSet(const QString &key) const + virtual TQIconSet iconSet(const TQString &key) const { #ifdef EMBED_IMAGES - QPixmap pix(m_widgets[key].iconSet); + TQPixmap pix(m_widgets[key].iconSet); #else - QPixmap pix(locate( "data", - QString::fromLatin1("kopetewidgets/pics/") + m_widgets[key].iconSet)); + TQPixmap pix(locate( "data", + TQString::fromLatin1("kopetewidgets/pics/") + m_widgets[key].iconSet)); #endif - return QIconSet(pix); + return TQIconSet(pix); } - virtual bool isContainer(const QString &key) const { return m_widgets[key].isContainer; } + virtual bool isContainer(const TQString &key) const { return m_widgets[key].isContainer; } - virtual QString group(const QString &key) const { return m_widgets[key].group; } + virtual TQString group(const TQString &key) const { return m_widgets[key].group; } - virtual QString includeFile(const QString &key) const { return m_widgets[key].includeFile; } + virtual TQString includeFile(const TQString &key) const { return m_widgets[key].includeFile; } - virtual QString toolTip(const QString &key) const { return m_widgets[key].toolTip; } + virtual TQString toolTip(const TQString &key) const { return m_widgets[key].toolTip; } - virtual QString whatsThis(const QString &key) const { return m_widgets[key].whatsThis; } + virtual TQString whatsThis(const TQString &key) const { return m_widgets[key].whatsThis; } private: struct WidgetInfo { - QString group; + TQString group; #ifdef EMBED_IMAGES - QPixmap iconSet; + TQPixmap iconSet; #else - QString iconSet; + TQString iconSet; #endif - QString includeFile; - QString toolTip; - QString whatsThis; + TQString includeFile; + TQString toolTip; + TQString whatsThis; bool isContainer; }; - typedef QMap<QString, WidgetInfo> WidgetInfos; + typedef TQMap<TQString, WidgetInfo> WidgetInfos; WidgetInfos m_widgets; }; KopeteWidgets::KopeteWidgets() { WidgetInfo widget; - widget.group = QString::fromLatin1("Input (Kopete)"); + widget.group = TQString::fromLatin1("Input (Kopete)"); #ifdef EMBED_IMAGES - widget.iconSet = QPixmap(kopete__ui__addressbooklinkwidget_xpm); + widget.iconSet = TQPixmap(kopete__ui__addressbooklinkwidget_xpm); #else - widget.iconSet = QString::fromLatin1("kopete__ui__addressbooklinkwidget.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__addressbooklinkwidget.png"); #endif - widget.includeFile = QString::fromLatin1("addressbooklinkwidget.h"); - widget.toolTip = QString::fromLatin1("Address Book Link Widget (Kopete)"); - widget.whatsThis = QString::fromLatin1("KABC::Addressee display/selector"); + widget.includeFile = TQString::fromLatin1("addressbooklinkwidget.h"); + widget.toolTip = TQString::fromLatin1("Address Book Link Widget (Kopete)"); + widget.whatsThis = TQString::fromLatin1("KABC::Addressee display/selector"); widget.isContainer = false; - m_widgets.insert(QString::fromLatin1("Kopete::UI::AddressBookLinkWidget"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::AddressBookLinkWidget"), widget); - widget.group = QString::fromLatin1("Views (Kopete)"); + widget.group = TQString::fromLatin1("Views (Kopete)"); #ifdef EMBED_IMAGES - widget.iconSet = QPixmap(kopete__ui__listview__listview_xpm); + widget.iconSet = TQPixmap(kopete__ui__listview__listview_xpm); #else - widget.iconSet = QString::fromLatin1("kopete__ui__listview__listview.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__listview__listview.png"); #endif - widget.includeFile = QString::fromLatin1("kopetelistview.h"); - widget.toolTip = QString::fromLatin1("List View (Kopete)"); - widget.whatsThis = QString::fromLatin1("A component capable list view widget."); + widget.includeFile = TQString::fromLatin1("kopetelistview.h"); + widget.toolTip = TQString::fromLatin1("List View (Kopete)"); + widget.whatsThis = TQString::fromLatin1("A component capable list view widget."); widget.isContainer = false; - m_widgets.insert(QString::fromLatin1("Kopete::UI::ListView::ListView"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::ListView::ListView"), widget); - widget.group = QString::fromLatin1("Input (Kopete)"); + widget.group = TQString::fromLatin1("Input (Kopete)"); #ifdef EMBED_IMAGES - widget.iconSet = QPixmap(kopete__ui__listview__searchline_xpm); + widget.iconSet = TQPixmap(kopete__ui__listview__searchline_xpm); #else - widget.iconSet = QString::fromLatin1("kopete__ui__listview__searchline.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__listview__searchline.png"); #endif - widget.includeFile = QString::fromLatin1("kopetelistviewsearchline.h"); - widget.toolTip = QString::fromLatin1("List View Search Line (Kopete)"); - widget.whatsThis = QString::fromLatin1("Search line able to use Kopete custom list View."); + widget.includeFile = TQString::fromLatin1("kopetelistviewsearchline.h"); + widget.toolTip = TQString::fromLatin1("List View Search Line (Kopete)"); + widget.whatsThis = TQString::fromLatin1("Search line able to use Kopete custom list View."); widget.isContainer = false; - m_widgets.insert(QString::fromLatin1("Kopete::UI::ListView::SearchLine"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::ListView::SearchLine"), widget); new KInstance("kopetewidgets"); } @@ -113,16 +113,16 @@ KopeteWidgets::~KopeteWidgets() { } -QWidget *KopeteWidgets::create(const QString &key, QWidget *parent, const char *name) +TQWidget *KopeteWidgets::create(const TQString &key, TQWidget *parent, const char *name) { - if (key == QString::fromLatin1("Kopete::UI::AddressBookLinkWidget")) + if (key == TQString::fromLatin1("Kopete::UI::AddressBookLinkWidget")) return new Kopete::UI::AddressBookLinkWidget(parent, name); - if (key == QString::fromLatin1("Kopete::UI::ListView::ListView")) + if (key == TQString::fromLatin1("Kopete::UI::ListView::ListView")) return new Kopete::UI::ListView::ListView(parent, name); - if (key == QString::fromLatin1("Kopete::UI::ListView::SearchLine")) + if (key == TQString::fromLatin1("Kopete::UI::ListView::SearchLine")) return new Kopete::UI::ListView::SearchLine(parent, 0, name); return 0; diff --git a/kopete/libkopete/ui/metacontactselectorwidget.cpp b/kopete/libkopete/ui/metacontactselectorwidget.cpp index d9c75308..1ab6646c 100644 --- a/kopete/libkopete/ui/metacontactselectorwidget.cpp +++ b/kopete/libkopete/ui/metacontactselectorwidget.cpp @@ -15,16 +15,16 @@ ************************************************************************* */ -#include <qcheckbox.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qvbox.h> -#include <qimage.h> -#include <qpixmap.h> -#include <qpainter.h> -#include <qlayout.h> -#include <qvaluelist.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqvbox.h> +#include <tqimage.h> +#include <tqpixmap.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqvaluelist.h> #include <kapplication.h> #include <kconfig.h> @@ -68,15 +68,15 @@ public: }; -MetaContactSelectorWidgetLVI::MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, QListView *parent, QObject *owner, const char *name) : Kopete::UI::ListView::Item(parent, owner, name) , d( new Private() ) +MetaContactSelectorWidgetLVI::MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, TQListView *parent, TQObject *owner, const char *name) : Kopete::UI::ListView::Item(parent, owner, name) , d( new Private() ) { d->metaContact = mc; d->photoSize = 60; - connect( d->metaContact, SIGNAL( photoChanged() ), - SLOT( slotPhotoChanged() ) ); - connect( d->metaContact, SIGNAL( displayNameChanged(const QString&, const QString&) ), - SLOT( slotDisplayNameChanged() ) ); + connect( d->metaContact, TQT_SIGNAL( photoChanged() ), + TQT_SLOT( slotPhotoChanged() ) ); + connect( d->metaContact, TQT_SIGNAL( displayNameChanged(const TQString&, const TQString&) ), + TQT_SLOT( slotDisplayNameChanged() ) ); buildVisualComponents(); } @@ -99,24 +99,24 @@ void MetaContactSelectorWidgetLVI::slotDisplayNameChanged() } } -QString MetaContactSelectorWidgetLVI::text ( int /* column */ ) const +TQString MetaContactSelectorWidgetLVI::text ( int /* column */ ) const { return d->metaContact->displayName(); } void MetaContactSelectorWidgetLVI::slotPhotoChanged() { - QPixmap photoPixmap; - QImage photoImg = d->metaContact->photo(); + TQPixmap photoPixmap; + TQImage photoImg = d->metaContact->photo(); if ( !photoImg.isNull() && (photoImg.width() > 0) && (photoImg.height() > 0) ) { int photoSize = d->photoSize; - photoImg = photoImg.smoothScale( photoSize, photoSize, QImage::ScaleMin ) ; + photoImg = photoImg.smoothScale( photoSize, photoSize, TQImage::ScaleMin ) ; // draw a 1 pixel black border photoPixmap = photoImg; - QPainter p(&photoPixmap); + TQPainter p(&photoPixmap); p.setPen(Qt::black); p.drawLine(0, 0, photoPixmap.width()-1, 0); p.drawLine(0, photoPixmap.height()-1, photoPixmap.width()-1, photoPixmap.height()-1); @@ -166,7 +166,7 @@ void MetaContactSelectorWidgetLVI::buildVisualComponents() void MetaContactSelectorWidgetLVI::slotUpdateContactBox() { - QPtrList<Kopete::Contact> contacts = d->metaContact->contacts(); + TQPtrList<Kopete::Contact> contacts = d->metaContact->contacts(); for(Kopete::Contact *c = contacts.first(); c; c = contacts.next()) { new ContactComponent(d->contactIconBox, c, IconSize( KIcon::Small )); @@ -177,37 +177,37 @@ class MetaContactSelectorWidget::Private { public: MetaContactSelectorWidget_Base *widget; - QValueList<Kopete::MetaContact *> excludedMetaContacts; + TQValueList<Kopete::MetaContact *> excludedMetaContacts; }; -MetaContactSelectorWidget::MetaContactSelectorWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ), d( new Private() ) +MetaContactSelectorWidget::MetaContactSelectorWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ), d( new Private() ) { - QBoxLayout *l = new QVBoxLayout(this); + TQBoxLayout *l = new TQVBoxLayout(this); d->widget = new MetaContactSelectorWidget_Base(this); l->addWidget(d->widget); - connect( d->widget->metaContactListView, SIGNAL( clicked(QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); - connect( d->widget->metaContactListView, SIGNAL( selectionChanged( QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); - connect( d->widget->metaContactListView, SIGNAL( spacePressed( QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( clicked(TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); - connect( Kopete::ContactList::self(), SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, SLOT( slotLoadMetaContacts() ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, TQT_SLOT( slotLoadMetaContacts() ) ); d->widget->kListViewSearchLine->setListView(d->widget->metaContactListView); d->widget->metaContactListView->setFullWidth( true ); d->widget->metaContactListView->header()->hide(); - d->widget->metaContactListView->setColumnWidthMode(0, QListView::Maximum); + d->widget->metaContactListView->setColumnWidthMode(0, TQListView::Maximum); slotLoadMetaContacts(); } MetaContactSelectorWidget::~MetaContactSelectorWidget() { - disconnect( Kopete::ContactList::self(), SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, SLOT( slotLoadMetaContacts() ) ); + disconnect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, TQT_SLOT( slotLoadMetaContacts() ) ); } @@ -225,7 +225,7 @@ Kopete::MetaContact* MetaContactSelectorWidget::metaContact() void MetaContactSelectorWidget::selectMetaContact( Kopete::MetaContact *mc ) { // iterate trough list view - QListViewItemIterator it( d->widget->metaContactListView ); + TQListViewItemIterator it( d->widget->metaContactListView ); while( it.current() ) { MetaContactSelectorWidgetLVI *item = (MetaContactSelectorWidgetLVI *) it.current(); @@ -261,7 +261,7 @@ void MetaContactSelectorWidget::slotLoadMetaContacts() { d->widget->metaContactListView->clear(); - QPtrList<Kopete::MetaContact> metaContacts = Kopete::ContactList::self()->metaContacts(); + TQPtrList<Kopete::MetaContact> metaContacts = Kopete::ContactList::self()->metaContacts(); for( Kopete::MetaContact *mc = metaContacts.first(); mc ; mc = metaContacts.next() ) { if( !mc->isTemporary() && (d->excludedMetaContacts.findIndex(mc) == -1) ) @@ -273,7 +273,7 @@ void MetaContactSelectorWidget::slotLoadMetaContacts() d->widget->metaContactListView->sort(); } -void MetaContactSelectorWidget::setLabelMessage( const QString &msg ) +void MetaContactSelectorWidget::setLabelMessage( const TQString &msg ) { d->widget->lblHeader->setText(msg); } diff --git a/kopete/libkopete/ui/metacontactselectorwidget.h b/kopete/libkopete/ui/metacontactselectorwidget.h index 1c0a21ff..a265f665 100644 --- a/kopete/libkopete/ui/metacontactselectorwidget.h +++ b/kopete/libkopete/ui/metacontactselectorwidget.h @@ -19,7 +19,7 @@ #define MetaContactSelectorWidget_H #include <kdemacros.h> -#include <qwidget.h> +#include <tqwidget.h> #include "kopetelistviewitem.h" #include "kopete_export.h" @@ -39,7 +39,7 @@ class KOPETE_EXPORT MetaContactSelectorWidget : public QWidget { Q_OBJECT public: - MetaContactSelectorWidget( QWidget *parent = 0, const char *name = 0 ); + MetaContactSelectorWidget( TQWidget *parent = 0, const char *name = 0 ); ~MetaContactSelectorWidget(); Kopete::MetaContact* metaContact(); /** @@ -47,7 +47,7 @@ public: * example: Please select a contact * or, Choose a contact to delete */ - void setLabelMessage( const QString &msg ); + void setLabelMessage( const TQString &msg ); /** * pre-selects a contact */ @@ -67,7 +67,7 @@ protected slots: */ void slotLoadMetaContacts(); signals: - void metaContactListClicked( QListViewItem *mc ); + void metaContactListClicked( TQListViewItem *mc ); private: class Private; Private *d; @@ -81,9 +81,9 @@ class MetaContactSelectorWidgetLVI : public Kopete::UI::ListView::Item { Q_OBJECT public: - MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, QListView *parent, QObject *owner = 0, const char *name = 0 ); + MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, TQListView *parent, TQObject *owner = 0, const char *name = 0 ); Kopete::MetaContact* metaContact(); - virtual QString text ( int column ) const; + virtual TQString text ( int column ) const; protected slots: void slotPhotoChanged(); void slotDisplayNameChanged(); diff --git a/kopete/libkopete/ui/userinfodialog.cpp b/kopete/libkopete/ui/userinfodialog.cpp index a25454a9..0ad7d9c2 100644 --- a/kopete/libkopete/ui/userinfodialog.cpp +++ b/kopete/libkopete/ui/userinfodialog.cpp @@ -25,25 +25,25 @@ #include <klocale.h> #include <kdebug.h> -#include <qlabel.h> -#include <qvbox.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqvbox.h> +#include <tqlayout.h> namespace Kopete { struct UserInfoDialog::UserInfoDialogPrivate { - QString name; - QString id; - QString awayMessage; - QString status; - QString warningLevel; - QString onlineSince; - QString info; - QString address; - QString phone; - QMap<QString,QString> customFields; - QVBoxLayout *topLayout; - QWidget *page; + TQString name; + TQString id; + TQString awayMessage; + TQString status; + TQString warningLevel; + TQString onlineSince; + TQString info; + TQString address; + TQString phone; + TQMap<TQString,TQString> customFields; + TQVBoxLayout *topLayout; + TQWidget *page; DialogStyle style; KHTMLPart *htmlPart; @@ -58,13 +58,13 @@ struct UserInfoDialog::UserInfoDialogPrivate { KTextBrowser *infoBrowser; }; -UserInfoDialog::UserInfoDialog( const QString& descr ) +UserInfoDialog::UserInfoDialog( const TQString& descr ) : KDialogBase( Kopete::UI::Global::mainWidget(), "userinfodialog", true, i18n( "User Info for %1" ).arg( descr ), KDialogBase::Ok ) { d = new UserInfoDialogPrivate; - d->page = new QWidget( this ); + d->page = new TQWidget( this ); setMainWidget( d->page ); - d->topLayout = new QVBoxLayout( d->page, 0, spacingHint() ); + d->topLayout = new TQVBoxLayout( d->page, 0, spacingHint() ); d->style = Widget; } @@ -78,65 +78,65 @@ void UserInfoDialog::setStyle( DialogStyle style ) d->style = style; } -void UserInfoDialog::setName( const QString& name ) +void UserInfoDialog::setName( const TQString& name ) { d->name = name; } -void UserInfoDialog::setId( const QString& id ) +void UserInfoDialog::setId( const TQString& id ) { d->id = id; } -void UserInfoDialog::setAwayMessage( const QString& msg ) +void UserInfoDialog::setAwayMessage( const TQString& msg ) { d->awayMessage = msg; } -void UserInfoDialog::setStatus( const QString& status ) +void UserInfoDialog::setStatus( const TQString& status ) { d->status = status; } -void UserInfoDialog::setWarningLevel(const QString& level ) +void UserInfoDialog::setWarningLevel(const TQString& level ) { d->warningLevel = level; } -void UserInfoDialog::setOnlineSince( const QString& since ) +void UserInfoDialog::setOnlineSince( const TQString& since ) { d->onlineSince = since; } -void UserInfoDialog::setInfo( const QString& info ) +void UserInfoDialog::setInfo( const TQString& info ) { d->info = info; } -void UserInfoDialog::setAddress( const QString& addr ) +void UserInfoDialog::setAddress( const TQString& addr ) { d->address = addr; } -void UserInfoDialog::setPhone( const QString& phone ) +void UserInfoDialog::setPhone( const TQString& phone ) { d->phone = phone; } -void UserInfoDialog::addCustomField( const QString& /*name*/, const QString& /*txt*/ ) +void UserInfoDialog::addCustomField( const TQString& /*name*/, const TQString& /*txt*/ ) { } -void UserInfoDialog::addHTMLText( const QString& /*str*/ ) +void UserInfoDialog::addHTMLText( const TQString& /*str*/ ) { } -QHBox* UserInfoDialog::addLabelEdit( const QString& label, const QString& text, KLineEdit*& edit ) +TQHBox* UserInfoDialog::addLabelEdit( const TQString& label, const TQString& text, KLineEdit*& edit ) { - QHBox *box = new QHBox( d->page ); - new QLabel( label, box ); + TQHBox *box = new TQHBox( d->page ); + new TQLabel( label, box ); edit = new KLineEdit( box ); edit->setAlignment( Qt::AlignHCenter ); edit->setText( text ); @@ -148,12 +148,12 @@ void UserInfoDialog::fillHTML() { d->htmlPart = new KHTMLPart( this ); - QString text; + TQString text; /* if ( d->name.isEmpty() ) { - text.append( QString("<div id=\"name\"><b>") + i18n("Name : ") + - QString("</b>") ); - text.append( d->name + QString("</div><br>") ); + text.append( TQString("<div id=\"name\"><b>") + i18n("Name : ") + + TQString("</b>") ); + text.append( d->name + TQString("</div><br>") ); } if ( d->id.isEmpty() ) { @@ -234,23 +234,23 @@ void UserInfoDialog::fillWidgets() } if ( !d->awayMessage.isEmpty() ) { - QVBox *awayBox = new QVBox( d->page ); - new QLabel( i18n("Away message:"), awayBox ); + TQVBox *awayBox = new TQVBox( d->page ); + new TQLabel( i18n("Away message:"), awayBox ); d->awayBrowser = new KTextBrowser( awayBox ); d->awayBrowser->setText( d->awayMessage ); d->topLayout->addWidget( awayBox ); } if ( !d->info.isEmpty() ) { - QVBox *infoBox = new QVBox( d->page ); - new QLabel( i18n("User info:"), infoBox ); + TQVBox *infoBox = new TQVBox( d->page ); + new TQLabel( i18n("User info:"), infoBox ); d->infoBrowser = new KTextBrowser( infoBox ); d->infoBrowser->setText( d->info ); d->topLayout->addWidget( infoBox ); } } -void UserInfoDialog::setStyleSheet( const QString& /*css*/ ) +void UserInfoDialog::setStyleSheet( const TQString& /*css*/ ) { } diff --git a/kopete/libkopete/ui/userinfodialog.h b/kopete/libkopete/ui/userinfodialog.h index 7df19f4f..246d15ec 100644 --- a/kopete/libkopete/ui/userinfodialog.h +++ b/kopete/libkopete/ui/userinfodialog.h @@ -19,7 +19,7 @@ #define USERINFODIALOG_H #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> #include "kopete_export.h" @@ -31,7 +31,7 @@ namespace Kopete { { Q_OBJECT public: - UserInfoDialog( const QString& descr ); + UserInfoDialog( const TQString& descr ); virtual ~UserInfoDialog(); @@ -46,18 +46,18 @@ namespace Kopete { // The functions below set elements as specified in the name. // If an element is not set it won't be displayed. - void setName( const QString& name ); - void setId( const QString& id ); - void setAwayMessage( const QString& msg ); - void setStatus( const QString& status ); - void setWarningLevel(const QString& level ); - void setOnlineSince( const QString& since ); - void setInfo( const QString& info ); - void setAddress( const QString& addr ); - void setPhone( const QString& phone ); - - void addCustomField( const QString& name, const QString& txt ); - void addHTMLText( const QString& str ); + void setName( const TQString& name ); + void setId( const TQString& id ); + void setAwayMessage( const TQString& msg ); + void setStatus( const TQString& status ); + void setWarningLevel(const TQString& level ); + void setOnlineSince( const TQString& since ); + void setInfo( const TQString& info ); + void setAddress( const TQString& addr ); + void setPhone( const TQString& phone ); + + void addCustomField( const TQString& name, const TQString& txt ); + void addHTMLText( const TQString& str ); ///Shows the dialog virtual void show(); @@ -78,9 +78,9 @@ namespace Kopete { * customized include : "name", "id", "warningLevel", "onlineSince", * "address", "phone", "status", "awayMessage" and "info". */ - void setStyleSheet( const QString& css ); + void setStyleSheet( const TQString& css ); - QHBox* addLabelEdit( const QString& label, const QString& text, KLineEdit*& edit ); + TQHBox* addLabelEdit( const TQString& label, const TQString& text, KLineEdit*& edit ); private: struct UserInfoDialogPrivate; diff --git a/kopete/libkopete/webcamwidget.cpp b/kopete/libkopete/webcamwidget.cpp index ae617ad5..ad701b8e 100644 --- a/kopete/libkopete/webcamwidget.cpp +++ b/kopete/libkopete/webcamwidget.cpp @@ -16,15 +16,15 @@ #include "webcamwidget.h" -#include <qcolor.h> -#include <qpainter.h> +#include <tqcolor.h> +#include <tqpainter.h> #include <kdebug.h> namespace Kopete { -WebcamWidget::WebcamWidget( QWidget* parent, const char* name ) -: QWidget( parent, name ) +WebcamWidget::WebcamWidget( TQWidget* parent, const char* name ) +: TQWidget( parent, name ) { clear(); } @@ -34,12 +34,12 @@ WebcamWidget::~WebcamWidget() // don't do anything either } -void WebcamWidget::updatePixmap(const QPixmap& pixmap) +void WebcamWidget::updatePixmap(const TQPixmap& pixmap) { mPixmap = pixmap; mText = ""; - QPaintEvent *ev = new QPaintEvent( rect(), true ); + TQPaintEvent *ev = new TQPaintEvent( rect(), true ); paintEvent( ev ); delete ev; } @@ -50,24 +50,24 @@ void WebcamWidget::clear() if (!mPixmap.isNull()) mPixmap.resize(0,0); - QPaintEvent *ev = new QPaintEvent( rect(), true ); + TQPaintEvent *ev = new TQPaintEvent( rect(), true ); paintEvent( ev ); delete ev; } -void WebcamWidget::setText(const QString& text) +void WebcamWidget::setText(const TQString& text) { mText = text; // for now redraw everything - QPaintEvent *ev = new QPaintEvent( rect(), true ); + TQPaintEvent *ev = new TQPaintEvent( rect(), true ); paintEvent( ev ); delete ev; } -void WebcamWidget::paintEvent( QPaintEvent* event ) +void WebcamWidget::paintEvent( TQPaintEvent* event ) { - QMemArray<QRect> rects = event->region().rects(); + TQMemArray<TQRect> rects = event->region().rects(); if (!mPixmap.isNull()) { @@ -80,23 +80,23 @@ void WebcamWidget::paintEvent( QPaintEvent* event ) { for (unsigned int i = 0; i < rects.count(); ++i) { - QColor bgColor = paletteBackgroundColor(); - QPainter p(this); + TQColor bgColor = paletteBackgroundColor(); + TQPainter p(this); p.fillRect(rects[i], bgColor); } } // TODO: draw the text - QPainter p(this); - QRect r = p.boundingRect(rect(), Qt::AlignCenter | Qt::WordBreak, mText ); + TQPainter p(this); + TQRect r = p.boundingRect(rect(), Qt::AlignCenter | Qt::WordBreak, mText ); if ( !mText.isEmpty() && event->rect().intersects(r)) { p.setPen(Qt::black); - QRect rec = rect(); - rec.moveTopLeft(QPoint(1,1)); + TQRect rec = rect(); + rec.moveTopLeft(TQPoint(1,1)); p.drawText(rec, Qt::AlignCenter | Qt::WordBreak, mText, -1); - rec.moveTopLeft(QPoint(-1,-1)); + rec.moveTopLeft(TQPoint(-1,-1)); p.setPen(Qt::white); p.drawText(rec, Qt::AlignCenter | Qt::WordBreak, mText, -1); } diff --git a/kopete/libkopete/webcamwidget.h b/kopete/libkopete/webcamwidget.h index 6458f60a..fdc60a6e 100644 --- a/kopete/libkopete/webcamwidget.h +++ b/kopete/libkopete/webcamwidget.h @@ -17,9 +17,9 @@ #ifndef WEBCAMWIDGET_H #define WEBCAMWIDGET_H -#include <qwidget.h> -#include <qpixmap.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqpixmap.h> +#include <tqstring.h> #include "kopete_export.h" @@ -37,14 +37,14 @@ public: * @param parent The parent widget of this widget * @param name The name for this QObject */ - WebcamWidget( QWidget* parent = 0, const char* name = 0 ); + WebcamWidget( TQWidget* parent = 0, const char* name = 0 ); ~WebcamWidget(); /** * @brief Updates the frame being displayed in the widget * @param pixmap The frame to be displayed */ - void updatePixmap(const QPixmap& pixmap); + void updatePixmap(const TQPixmap& pixmap); /** * @brief Clear the widget @@ -55,11 +55,11 @@ public: * @brief Set a text to be displayed in the widget * @param text The text to be displayed */ - void setText(const QString& text); + void setText(const TQString& text); protected slots: - void paintEvent( QPaintEvent* event ); - QPixmap mPixmap; - QString mText; + void paintEvent( TQPaintEvent* event ); + TQPixmap mPixmap; + TQString mText; }; } // end namespace Kopete |