diff options
Diffstat (limited to 'krfb/krfb/rfbcontroller.cc')
-rw-r--r-- | krfb/krfb/rfbcontroller.cc | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/krfb/krfb/rfbcontroller.cc b/krfb/krfb/rfbcontroller.cc index 29f48278..51516683 100644 --- a/krfb/krfb/rfbcontroller.cc +++ b/krfb/krfb/rfbcontroller.cc @@ -42,18 +42,18 @@ #include <kmessagebox.h> #include <klocale.h> #include <kextsock.h> -#include <qstring.h> -#include <qcursor.h> -#include <qwindowdefs.h> -#include <qtimer.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qglobal.h> -#include <qlabel.h> -#include <qmutex.h> -#include <qdeepcopy.h> -#include <qclipboard.h> -#include <qdesktopwidget.h> +#include <tqstring.h> +#include <tqcursor.h> +#include <tqwindowdefs.h> +#include <tqtimer.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqglobal.h> +#include <tqlabel.h> +#include <tqmutex.h> +#include <tqdeepcopy.h> +#include <tqclipboard.h> +#include <tqdesktopwidget.h> #include <X11/Xutil.h> #include <X11/extensions/XTest.h> @@ -167,7 +167,7 @@ static void inetdDisconnectHook() static void clipboardHook(char* str,int len, rfbClientPtr) { - self->clipboardToServer(QString::fromUtf8(str, len)); + self->clipboardToServer(TQString::fromUtf8(str, len)); } VNCEvent::~VNCEvent() { @@ -290,7 +290,7 @@ PointerEvent::PointerEvent(int b, int _x, int _y) : } void PointerEvent::exec() { - QDesktopWidget *desktopWidget = QApplication::desktop(); + TQDesktopWidget *desktopWidget = TQApplication::desktop(); int screen = desktopWidget->screenNumber(); if (screen < 0) @@ -307,9 +307,9 @@ void PointerEvent::exec() { } -ClipboardEvent::ClipboardEvent(RFBController *c, const QString &ctext) : +ClipboardEvent::ClipboardEvent(RFBController *c, const TQString &ctext) : controller(c), - text(QDeepCopy<QString>(ctext)) { + text(TQDeepCopy<TQString>(ctext)) { } void ClipboardEvent::exec() { @@ -325,7 +325,7 @@ void ClipboardEvent::exec() { } -KNotifyEvent::KNotifyEvent(const QString &n, const QString &d) : +KNotifyEvent::KNotifyEvent(const TQString &n, const TQString &d) : name(n), desc(d) { } @@ -356,14 +356,14 @@ RFBController::RFBController(Configuration *c) : forcedClose(false) { self = this; - connect(&dialog, SIGNAL(okClicked()), SLOT(dialogAccepted())); - connect(&dialog, SIGNAL(cancelClicked()), SLOT(dialogRefused())); - connect(&initIdleTimer, SIGNAL(timeout()), SLOT(checkAsyncEvents())); - connect(&idleTimer, SIGNAL(timeout()), SLOT(idleSlot())); + connect(&dialog, TQT_SIGNAL(okClicked()), TQT_SLOT(dialogAccepted())); + connect(&dialog, TQT_SIGNAL(cancelClicked()), TQT_SLOT(dialogRefused())); + connect(&initIdleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAsyncEvents())); + connect(&idleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(idleSlot())); - clipboard = QApplication::clipboard(); - connect(clipboard, SIGNAL(selectionChanged()), this, SLOT(selectionChanged())); - connect(clipboard, SIGNAL(dataChanged()), this, SLOT(clipboardChanged())); + clipboard = TQApplication::clipboard(); + connect(clipboard, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged())); + connect(clipboard, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clipboardChanged())); asyncQueue.setAutoDelete(true); @@ -386,11 +386,11 @@ RFBController::~RFBController() void RFBController::startServer(int inetdFd, bool xtestGrab) { framebufferImage = XGetImage(qt_xdisplay(), - QApplication::desktop()->winId(), + TQApplication::desktop()->winId(), 0, 0, - QApplication::desktop()->width(), - QApplication::desktop()->height(), + TQApplication::desktop()->width(), + TQApplication::desktop()->height(), AllPlanes, ZPixmap); @@ -456,7 +456,7 @@ void RFBController::startServer(int inetdFd, bool xtestGrab) passwordChanged(); scanner = new XUpdateScanner(qt_xdisplay(), - QApplication::desktop()->winId(), + TQApplication::desktop()->winId(), (unsigned char*)fb, w, h, server->rfbServerFormat.bitsPerPixel, server->paddedWidthInBytes, @@ -484,7 +484,7 @@ void RFBController::stopServer(bool xtestUngrab) if (xtestUngrab) { disabler.disable = true; - QTimer::singleShot(0, &disabler, SLOT(exec())); + TQTimer::singleShot(0, &disabler, TQT_SLOT(exec())); } } @@ -613,9 +613,9 @@ void RFBController::idleSlot() rfbUndrawCursor(server); - QPtrList<Hint> v; + TQPtrList<Hint> v; v.setAutoDelete(true); - QPoint p = QCursor::pos(); + TQPoint p = TQCursor::pos(); scanner->searchUpdates(v, p.y()); Hint *h; @@ -647,7 +647,7 @@ void RFBController::dialogRefused() emit sessionRefused(); } -bool checkPassword(const QString &p, +bool checkPassword(const TQString &p, unsigned char *ochallenge, const char *response, int len) { @@ -680,7 +680,7 @@ bool RFBController::handleCheckPassword(rfbClientPtr cl, cl->authChallenge, response, len); if (!authd) { - QValueList<Invitation>::iterator it = + TQValueList<Invitation>::iterator it = configuration->invitations().begin(); while (it != configuration->invitations().end()) { if (checkPassword((*it).password(), @@ -719,7 +719,7 @@ enum rfbNewClientAction RFBController::handleNewClient(rfbClientPtr cl) int socket = cl->sock; cl->negotiationFinishedHook = negotiationFinishedHook; - QString host, port; + TQString host, port; KSocketAddress *ksa = KExtendedSocket::peerAddress(socket); if (ksa) { hostent *he = 0; @@ -730,7 +730,7 @@ enum rfbNewClientAction RFBController::handleNewClient(rfbClientPtr cl) AF_INET); if (he && he->h_name) - host = QString(he->h_name); + host = TQString(he->h_name); else host = ksa->nodeName(); delete ksa; @@ -799,7 +799,7 @@ void RFBController::handlePointerEvent(int button_mask, int x, int y) { } -void RFBController::clipboardToServer(const QString &ctext) { +void RFBController::clipboardToServer(const TQString &ctext) { if (!allowDesktopControl) return; @@ -814,7 +814,7 @@ void RFBController::clipboardChanged() { if (clipboard->ownsClipboard()) return; - QString text = clipboard->text(QClipboard::Clipboard); + TQString text = clipboard->text(QClipboard::Clipboard); // avoid ping-pong between client&server if ((lastClipboardDirection == LAST_SYNC_TO_SERVER) && @@ -825,7 +825,7 @@ void RFBController::clipboardChanged() { lastClipboardDirection = LAST_SYNC_TO_CLIENT; lastClipboardText = text; - QCString ctext = text.utf8(); + TQCString ctext = text.utf8(); rfbSendServerCutText(server, ctext.data(), ctext.length()); } @@ -835,7 +835,7 @@ void RFBController::selectionChanged() { if (clipboard->ownsSelection()) return; - QString text = clipboard->text(QClipboard::Selection); + TQString text = clipboard->text(QClipboard::Selection); // avoid ping-pong between client&server if ((lastClipboardDirection == LAST_SYNC_TO_SERVER) && (lastClipboardText == text)) @@ -845,7 +845,7 @@ void RFBController::selectionChanged() { lastClipboardDirection = LAST_SYNC_TO_CLIENT; lastClipboardText = text; - QCString ctext = text.utf8(); + TQCString ctext = text.utf8(); rfbSendServerCutText(server, ctext.data(), ctext.length()); } @@ -857,7 +857,7 @@ void RFBController::passwordChanged() { server->rfbAuthPasswdData = (void*) (authRequired ? 1 : 0); } -void RFBController::sendKNotifyEvent(const QString &n, const QString &d) +void RFBController::sendKNotifyEvent(const TQString &n, const TQString &d) { asyncMutex.lock(); asyncQueue.append(new KNotifyEvent(n, d)); |