summaryrefslogtreecommitdiffstats
path: root/krdc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /krdc
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-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 'krdc')
-rw-r--r--krdc/events.h22
-rw-r--r--krdc/hostpreferences.cpp50
-rw-r--r--krdc/hostpreferences.h34
-rw-r--r--krdc/hostprofiles.ui.h12
-rw-r--r--krdc/keycapturedialog.cpp14
-rw-r--r--krdc/keycapturedialog.h2
-rw-r--r--krdc/kfullscreenpanel.cpp22
-rw-r--r--krdc/kfullscreenpanel.h30
-rw-r--r--krdc/krdc.cpp238
-rw-r--r--krdc/krdc.h78
-rw-r--r--krdc/kremoteview.cpp4
-rw-r--r--krdc/kremoteview.h12
-rw-r--r--krdc/kservicelocator.cpp142
-rw-r--r--krdc/kservicelocator.h74
-rw-r--r--krdc/main.cpp54
-rw-r--r--krdc/main.h18
-rw-r--r--krdc/maindialog.cpp10
-rw-r--r--krdc/maindialog.h6
-rw-r--r--krdc/maindialogwidget.cpp114
-rw-r--r--krdc/maindialogwidget.h20
-rw-r--r--krdc/preferencesdialog.cpp16
-rw-r--r--krdc/preferencesdialog.h2
-rw-r--r--krdc/rdp/krdpview.cpp62
-rw-r--r--krdc/rdp/krdpview.h34
-rw-r--r--krdc/rdp/rdphostpref.cpp16
-rw-r--r--krdc/rdp/rdphostpref.h20
-rw-r--r--krdc/smartptr.h6
-rw-r--r--krdc/vnc/kvncview.cpp132
-rw-r--r--krdc/vnc/kvncview.h52
-rw-r--r--krdc/vnc/pointerlatencyometer.h4
-rw-r--r--krdc/vnc/threads.cpp40
-rw-r--r--krdc/vnc/threads.h42
-rw-r--r--krdc/vnc/vnchostpref.cpp14
-rw-r--r--krdc/vnc/vnchostpref.h8
34 files changed, 702 insertions, 702 deletions
diff --git a/krdc/events.h b/krdc/events.h
index 7ac262a7..7c211183 100644
--- a/krdc/events.h
+++ b/krdc/events.h
@@ -20,7 +20,7 @@
#ifndef EVENTS_H
#define EVENTS_H
-#include <qevent.h>
+#include <tqevent.h>
/**
* State of the connection. The state of the connection is returned
@@ -65,7 +65,7 @@ private:
int m_width, m_height;
public:
ScreenResizeEvent(int w, int h) :
- QCustomEvent(ScreenResizeEventType),
+ TQCustomEvent(ScreenResizeEventType),
m_width(w),
m_height(h)
{};
@@ -81,7 +81,7 @@ private:
RemoteViewStatus m_status;
public:
StatusChangeEvent(RemoteViewStatus s) :
- QCustomEvent(StatusChangeEventType),
+ TQCustomEvent(StatusChangeEventType),
m_status(s)
{};
RemoteViewStatus status() const { return m_status; };
@@ -93,7 +93,7 @@ class PasswordRequiredEvent : public QCustomEvent
{
public:
PasswordRequiredEvent() :
- QCustomEvent(PasswordRequiredEventType)
+ TQCustomEvent(PasswordRequiredEventType)
{};
};
@@ -104,7 +104,7 @@ class FatalErrorEvent : public QCustomEvent
ErrorCode m_error;
public:
FatalErrorEvent(ErrorCode e) :
- QCustomEvent(FatalErrorEventType),
+ TQCustomEvent(FatalErrorEventType),
m_error(e)
{};
@@ -117,7 +117,7 @@ class DesktopInitEvent : public QCustomEvent
{
public:
DesktopInitEvent() :
- QCustomEvent(DesktopInitEventType)
+ TQCustomEvent(DesktopInitEventType)
{};
};
@@ -129,7 +129,7 @@ private:
int m_x, m_y, m_width, m_height;
public:
ScreenRepaintEvent(int x, int y, int w, int h) :
- QCustomEvent(ScreenRepaintEventType),
+ TQCustomEvent(ScreenRepaintEventType),
m_x(x),
m_y(y),
m_width(w),
@@ -147,7 +147,7 @@ class BeepEvent : public QCustomEvent
{
public:
BeepEvent() :
- QCustomEvent(BeepEventType)
+ TQCustomEvent(BeepEventType)
{};
};
@@ -160,7 +160,7 @@ private:
int m_length;
public:
ServerCutEvent(char *bytes, int length) :
- QCustomEvent(ServerCutEventType),
+ TQCustomEvent(ServerCutEventType),
m_bytes(bytes),
m_length(length)
{};
@@ -179,7 +179,7 @@ private:
int m_x, m_y, m_buttonMask;
public:
MouseStateEvent(int x, int y, int buttonMask) :
- QCustomEvent(MouseStateEventType),
+ TQCustomEvent(MouseStateEventType),
m_x(x),
m_y(y),
m_buttonMask(buttonMask)
@@ -197,7 +197,7 @@ class WalletOpenEvent : public QCustomEvent
{
public:
WalletOpenEvent() :
- QCustomEvent(WalletOpenEventType)
+ TQCustomEvent(WalletOpenEventType)
{};
};
diff --git a/krdc/hostpreferences.cpp b/krdc/hostpreferences.cpp
index 4b02191b..dae9a09a 100644
--- a/krdc/hostpreferences.cpp
+++ b/krdc/hostpreferences.cpp
@@ -24,8 +24,8 @@
#include <kconfig.h>
#include <kstaticdeleter.h>
-#include <qregexp.h>
-#include <qmap.h>
+#include <tqregexp.h>
+#include <tqmap.h>
HostPreferences *HostPreferences::m_instance = 0;
static KStaticDeleter<HostPreferences> sd;
@@ -38,7 +38,7 @@ HostPreferences *HostPreferences::instance()
return m_instance;
}
-HostPref::HostPref(KConfig *conf, const QString &host, const QString &type) :
+HostPref::HostPref(KConfig *conf, const TQString &host, const TQString &type) :
m_host(host),
m_type(type),
m_config(conf) {
@@ -48,20 +48,20 @@ HostPref::~HostPref() {
m_config->sync();
}
-QString HostPref::host() const {
+TQString HostPref::host() const {
return m_host;
}
-QString HostPref::type() const {
+TQString HostPref::type() const {
return m_type;
}
-QString HostPref::prefix() const {
+TQString HostPref::prefix() const {
return prefix(m_host, m_type);
}
-QString HostPref::prefix(const QString &host, const QString &type) {
- return QString("PerHost-%1-%2-").arg(type).arg(host);
+TQString HostPref::prefix(const TQString &host, const TQString &type) {
+ return TQString("PerHost-%1-%2-").arg(type).arg(host);
}
@@ -74,7 +74,7 @@ HostPreferences::~HostPreferences() {
sd.setObject( m_instance, 0, false );
}
-HostPrefPtr HostPreferences::getHostPref(const QString &host, const QString &type) {
+HostPrefPtr HostPreferences::getHostPref(const TQString &host, const TQString &type) {
m_config->setGroup("PerHostSettings");
if (!m_config->readBoolEntry(HostPref::prefix(host, type)+"exists"))
return 0;
@@ -93,7 +93,7 @@ HostPrefPtr HostPreferences::getHostPref(const QString &host, const QString &typ
return 0;
}
-HostPrefPtr HostPreferences::createHostPref(const QString &host, const QString &type) {
+HostPrefPtr HostPreferences::createHostPref(const TQString &host, const TQString &type) {
HostPrefPtr hp = getHostPref(host, type);
if (hp)
return hp;
@@ -128,13 +128,13 @@ HostPrefPtr HostPreferences::rdpDefaults()
HostPrefPtrList HostPreferences::getAllHostPrefs() {
HostPrefPtrList r;
- QMap<QString, QString> map = m_config->entryMap("PerHostSettings");
- QStringList keys = map.keys();
- QStringList::iterator it = keys.begin();
+ TQMap<TQString, TQString> map = m_config->entryMap("PerHostSettings");
+ TQStringList keys = map.keys();
+ TQStringList::iterator it = keys.begin();
while (it != keys.end()) {
- QString key = *it;
+ TQString key = *it;
if (key.endsWith("-exists")) {
- QRegExp re("PerHost-([^-]+)-(.*)-exists");
+ TQRegExp re("PerHost-([^-]+)-(.*)-exists");
if (re.exactMatch(key)) {
HostPrefPtr hp = getHostPref(re.cap(2), re.cap(1));
if (hp)
@@ -153,37 +153,37 @@ void HostPreferences::removeHostPref(HostPref *hostPref) {
void HostPreferences::setShowBrowsingPanel( bool b )
{
- m_config->setGroup( QString::null );
+ m_config->setGroup( TQString::null );
m_config->writeEntry( "browsingPanel", b );
}
-void HostPreferences::setServerCompletions( const QStringList &list )
+void HostPreferences::setServerCompletions( const TQStringList &list )
{
- m_config->setGroup( QString::null );
+ m_config->setGroup( TQString::null );
m_config->writeEntry( "serverCompletions", list );
}
-void HostPreferences::setServerHistory( const QStringList &list )
+void HostPreferences::setServerHistory( const TQStringList &list )
{
- m_config->setGroup( QString::null );
+ m_config->setGroup( TQString::null );
m_config->writeEntry( "serverHistory", list );
}
bool HostPreferences::showBrowsingPanel()
{
- m_config->setGroup( QString::null );
+ m_config->setGroup( TQString::null );
return m_config->readBoolEntry( "browsingPanel" );
}
-QStringList HostPreferences::serverCompletions()
+TQStringList HostPreferences::serverCompletions()
{
- m_config->setGroup( QString::null );
+ m_config->setGroup( TQString::null );
return m_config->readListEntry( "serverCompletions" );
}
-QStringList HostPreferences::serverHistory()
+TQStringList HostPreferences::serverHistory()
{
- m_config->setGroup( QString::null );
+ m_config->setGroup( TQString::null );
return m_config->readListEntry( "serverHistory" );
}
diff --git a/krdc/hostpreferences.h b/krdc/hostpreferences.h
index 09b4abe6..9b74b235 100644
--- a/krdc/hostpreferences.h
+++ b/krdc/hostpreferences.h
@@ -19,8 +19,8 @@
#ifndef HOSTPREFERENCES_H
#define HOSTPREFERENCES_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "smartptr.h"
class HostPreferences;
@@ -29,11 +29,11 @@ class KConfig;
class HostPref {
protected:
friend class HostPreferences;
- QString m_host;
- QString m_type;
+ TQString m_host;
+ TQString m_type;
KConfig *m_config;
- HostPref(KConfig *conf, const QString &host, const QString &type);
+ HostPref(KConfig *conf, const TQString &host, const TQString &type);
virtual void load() = 0;
virtual void setDefaults() = 0;
@@ -42,35 +42,35 @@ protected:
public:
virtual ~HostPref();
- virtual QString prefDescription() const = 0;
- QString host() const;
- QString type() const;
- QString prefix() const;
- static QString prefix(const QString &host, const QString &type);
+ virtual TQString prefDescription() const = 0;
+ TQString host() const;
+ TQString type() const;
+ TQString prefix() const;
+ static TQString prefix(const TQString &host, const TQString &type);
};
typedef SmartPtr<HostPref> HostPrefPtr;
-typedef QValueList<HostPrefPtr> HostPrefPtrList;
+typedef TQValueList<HostPrefPtr> HostPrefPtrList;
class HostPreferences {
public:
static HostPreferences *instance();
~HostPreferences();
- HostPrefPtr getHostPref(const QString &host, const QString &type);
- HostPrefPtr createHostPref(const QString &host, const QString &type);
+ HostPrefPtr getHostPref(const TQString &host, const TQString &type);
+ HostPrefPtr createHostPref(const TQString &host, const TQString &type);
HostPrefPtrList getAllHostPrefs();
HostPrefPtr vncDefaults();
HostPrefPtr rdpDefaults();
void removeHostPref(HostPref *hostPref);
void setShowBrowsingPanel( bool b );
- void setServerCompletions( const QStringList &list );
- void setServerHistory( const QStringList &list );
+ void setServerCompletions( const TQStringList &list );
+ void setServerHistory( const TQStringList &list );
bool showBrowsingPanel();
- QStringList serverCompletions();
- QStringList serverHistory();
+ TQStringList serverCompletions();
+ TQStringList serverHistory();
void sync();
diff --git a/krdc/hostprofiles.ui.h b/krdc/hostprofiles.ui.h
index 56c63f23..2626bb78 100644
--- a/krdc/hostprofiles.ui.h
+++ b/krdc/hostprofiles.ui.h
@@ -11,10 +11,10 @@ void HostProfiles::removeHost()
{
HostPreferences *hps = HostPreferences::instance();
- QListViewItemIterator it(hostListView);
+ TQListViewItemIterator it(hostListView);
while (it.current())
{
- QListViewItem *vi = it.current();
+ TQListViewItem *vi = it.current();
if (vi->isSelected())
{
HostPrefPtr hp = hps->getHostPref(vi->text(0), vi->text(1));
@@ -32,10 +32,10 @@ void HostProfiles::removeAllHosts()
{
HostPreferences *hps = HostPreferences::instance();
- QListViewItemIterator it(hostListView);
+ TQListViewItemIterator it(hostListView);
while (it.current())
{
- QListViewItem *vi = it.current();
+ TQListViewItem *vi = it.current();
HostPrefPtr hp = hps->getHostPref(vi->text(0), vi->text(1));
if (hp)
deletedHosts += hp;
@@ -48,7 +48,7 @@ void HostProfiles::removeAllHosts()
void HostProfiles::selectionChanged()
{
- QListViewItemIterator it(hostListView);
+ TQListViewItemIterator it(hostListView);
while (it.current())
{
if (it.current()->isSelected())
@@ -92,7 +92,7 @@ void HostProfiles::save()
hps->sync();
}
-void HostProfiles::slotHostDoubleClicked( QListViewItem *vi )
+void HostProfiles::slotHostDoubleClicked( TQListViewItem *vi )
{
HostPreferences *hps = HostPreferences::instance();
HostPrefPtr hp = hps->getHostPref(vi->text(0), vi->text(1));
diff --git a/krdc/keycapturedialog.cpp b/krdc/keycapturedialog.cpp
index 39a68304..47f93455 100644
--- a/krdc/keycapturedialog.cpp
+++ b/krdc/keycapturedialog.cpp
@@ -24,8 +24,8 @@
#include "keycapturedialog.h"
#include "keycapturewidget.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
@@ -46,11 +46,11 @@ const int XKeyRelease = KeyRelease;
#endif
-KeyCaptureDialog::KeyCaptureDialog(QWidget *parent, const char *name)
+KeyCaptureDialog::KeyCaptureDialog(TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n( "Enter Key Combination" ),
Cancel, Cancel, true), m_grabbed(false) {
- QFrame *main = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( main, 0, KDialog::spacingHint() );
+ TQFrame *main = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( main, 0, KDialog::spacingHint() );
m_captureWidget = new KeyCaptureWidget( main, "m_captureWidget" );
layout->addWidget( m_captureWidget );
layout->addStretch();
@@ -86,7 +86,7 @@ bool KeyCaptureDialog::x11Event(XEvent *pEvent)
default:
break;
}
- return QWidget::x11Event( pEvent );
+ return TQWidget::x11Event( pEvent );
}
void KeyCaptureDialog::x11EventKeyPress( XEvent *pEvent )
@@ -129,7 +129,7 @@ void KeyCaptureDialog::x11EventKeyPress( XEvent *pEvent )
else
keyModX = pEvent->xkey.state & ~keyModX;
- QString keyModStr;
+ TQString keyModStr;
if( keyModX & KKeyNative::modX(KKey::WIN) ) keyModStr += KKey::modFlagLabel(KKey::WIN) + "+";
if( keyModX & KKeyNative::modX(KKey::ALT) ) keyModStr += KKey::modFlagLabel(KKey::ALT) + "+";
if( keyModX & KKeyNative::modX(KKey::CTRL) ) keyModStr += KKey::modFlagLabel(KKey::CTRL) + "+";
diff --git a/krdc/keycapturedialog.h b/krdc/keycapturedialog.h
index 6f3aa312..1b45b234 100644
--- a/krdc/keycapturedialog.h
+++ b/krdc/keycapturedialog.h
@@ -32,7 +32,7 @@ class KeyCaptureDialog : public KDialogBase {
bool m_grabbed;
public:
- KeyCaptureDialog(QWidget * parent= 0, const char *name = 0);
+ KeyCaptureDialog(TQWidget * parent= 0, const char *name = 0);
~KeyCaptureDialog();
public slots:
diff --git a/krdc/kfullscreenpanel.cpp b/krdc/kfullscreenpanel.cpp
index 84067359..0c85cfdd 100644
--- a/krdc/kfullscreenpanel.cpp
+++ b/krdc/kfullscreenpanel.cpp
@@ -20,7 +20,7 @@
Counter::Counter(float start) :
m_currentValue(start) {
- connect(&m_timer, SIGNAL(timeout()), SLOT(timeout()));
+ connect(&m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(timeout()));
}
void Counter::count(float stop, float stepSize, float frequency) {
@@ -54,17 +54,17 @@ void Counter::timeout() {
}
-KFullscreenPanel::KFullscreenPanel(QWidget* parent,
+KFullscreenPanel::KFullscreenPanel(TQWidget* parent,
const char *name,
- const QSize &resolution) :
- QWidget(parent, name),
+ const TQSize &resolution) :
+ TQWidget(parent, name),
m_child(0),
m_layout(0),
m_fsResolution(resolution),
m_counter(0)
{
- connect(&m_counter, SIGNAL(countingDownFinished()), SLOT(hide()));
- connect(&m_counter, SIGNAL(counted(float)), SLOT(movePanel(float)));
+ connect(&m_counter, TQT_SIGNAL(countingDownFinished()), TQT_SLOT(hide()));
+ connect(&m_counter, TQT_SIGNAL(counted(float)), TQT_SLOT(movePanel(float)));
}
KFullscreenPanel::~KFullscreenPanel() {
@@ -76,19 +76,19 @@ void KFullscreenPanel::movePanel(float posY) {
show();
}
-void KFullscreenPanel::setChild(QWidget *child) {
+void KFullscreenPanel::setChild(TQWidget *child) {
if (m_layout)
delete m_layout;
m_child = child;
- m_layout = new QVBoxLayout(this);
+ m_layout = new TQVBoxLayout(this);
m_layout->addWidget(child);
doLayout();
}
void KFullscreenPanel::doLayout() {
- QSize s = sizeHint();
+ TQSize s = sizeHint();
setFixedSize(s);
setGeometry((m_fsResolution.width() - s.width())/2, 0,
s.width(), s.height());
@@ -102,11 +102,11 @@ void KFullscreenPanel::startHide() {
m_counter.count(-height(), -height()/12.0, 24);
}
-void KFullscreenPanel::enterEvent(QEvent*) {
+void KFullscreenPanel::enterEvent(TQEvent*) {
emit mouseEnter();
}
-void KFullscreenPanel::leaveEvent(QEvent*) {
+void KFullscreenPanel::leaveEvent(TQEvent*) {
emit mouseLeave();
}
diff --git a/krdc/kfullscreenpanel.h b/krdc/kfullscreenpanel.h
index 43b4944d..359a4d5c 100644
--- a/krdc/kfullscreenpanel.h
+++ b/krdc/kfullscreenpanel.h
@@ -18,15 +18,15 @@
#ifndef KFULLSCREENPANEL_H
#define KFULLSCREENPANEL_H
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qevent.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqevent.h>
+#include <tqtimer.h>
-class Counter : public QObject {
+class Counter : public TQObject {
Q_OBJECT
private:
- QTimer m_timer;
+ TQTimer m_timer;
float m_stopValue, m_currentValue, m_stepSize;
int m_timeoutMs;
@@ -44,28 +44,28 @@ signals:
};
-class KFullscreenPanel : public QWidget {
+class KFullscreenPanel : public TQWidget {
Q_OBJECT
private:
- QWidget *m_child;
- QVBoxLayout *m_layout;
- QSize m_fsResolution;
+ TQWidget *m_child;
+ TQVBoxLayout *m_layout;
+ TQSize m_fsResolution;
Counter m_counter;
void doLayout();
public:
- KFullscreenPanel(QWidget* parent, const char *name,
- const QSize &resolution);
+ KFullscreenPanel(TQWidget* parent, const char *name,
+ const TQSize &resolution);
~KFullscreenPanel();
- void setChild(QWidget *child);
+ void setChild(TQWidget *child);
void startShow();
void startHide();
protected:
- void enterEvent(QEvent *e);
- void leaveEvent(QEvent *e);
+ void enterEvent(TQEvent *e);
+ void leaveEvent(TQEvent *e);
private slots:
void movePanel(float posY);
diff --git a/krdc/krdc.cpp b/krdc/krdc.cpp
index 36939c91..6c08de5d 100644
--- a/krdc/krdc.cpp
+++ b/krdc/krdc.cpp
@@ -34,10 +34,10 @@
#include <kwin.h>
#include <kstartupinfo.h>
-#include <qdockarea.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqdockarea.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
#define BUMP_SCROLL_CONSTANT (200)
@@ -57,29 +57,29 @@ const int KRDC::TOOLBAR_FPS_1000 = 10000;
const int KRDC::TOOLBAR_SPEED_DOWN = 34;
const int KRDC::TOOLBAR_SPEED_UP = 20;
-QScrollView2::QScrollView2(QWidget *w, const char *name) :
- QScrollView(w, name) {
+QScrollView2::QScrollView2(TQWidget *w, const char *name) :
+ TQScrollView(w, name) {
setMouseTracking(true);
viewport()->setMouseTracking(true);
horizontalScrollBar()->setMouseTracking(true);
verticalScrollBar()->setMouseTracking(true);
}
-void QScrollView2::mouseMoveEvent( QMouseEvent *e )
+void QScrollView2::mouseMoveEvent( TQMouseEvent *e )
{
e->ignore();
}
-QString KRDC::m_lastHost = "";
+TQString KRDC::m_lastHost = "";
-KRDC::KRDC(WindowMode wm, const QString &host,
- Quality q, const QString &encodings,
- const QString &password,
+KRDC::KRDC(WindowMode wm, const TQString &host,
+ Quality q, const TQString &encodings,
+ const TQString &password,
bool scale,
bool localCursor,
- QSize initialWindowSize) :
- QWidget(0, 0, Qt::WStyle_ContextHelp),
+ TQSize initialWindowSize) :
+ TQWidget(0, 0, Qt::WStyle_ContextHelp),
m_layout(0),
m_scrollView(0),
m_view(0),
@@ -101,8 +101,8 @@ KRDC::KRDC(WindowMode wm, const QString &host,
m_localCursor(localCursor),
m_initialWindowSize(initialWindowSize)
{
- connect(&m_autoHideTimer, SIGNAL(timeout()), SLOT(hideFullscreenToolbarNow()));
- connect(&m_bumpScrollTimer, SIGNAL(timeout()), SLOT(bumpScroll()));
+ connect(&m_autoHideTimer, TQT_SIGNAL(timeout()), TQT_SLOT(hideFullscreenToolbarNow()));
+ connect(&m_bumpScrollTimer, TQT_SIGNAL(timeout()), TQT_SLOT(bumpScroll()));
m_pindown = UserIcon("pindown");
m_pinup = UserIcon("pinup");
@@ -116,8 +116,8 @@ KRDC::KRDC(WindowMode wm, const QString &host,
bool KRDC::start()
{
- QString userName, password;
- QString serverHost;
+ TQString userName, password;
+ TQString serverHost;
int serverPort = 5900;
int ret_status;
@@ -141,11 +141,11 @@ bool KRDC::start()
MainDialog mainDlg(this, "MainDialog");
mainDlg.setRemoteHost(m_lastHost);
- if (mainDlg.exec() == QDialog::Rejected) {
+ if (mainDlg.exec() == TQDialog::Rejected) {
return false;
}
- QString m_host = mainDlg.remoteHost();
+ TQString m_host = mainDlg.remoteHost();
m_lastHost = m_host;
if (m_host.startsWith("vnc:/"))
m_protocol = PROTOCOL_VNC;
@@ -164,9 +164,9 @@ bool KRDC::start()
setCaption(i18n("%1 - Remote Desktop Connection").arg(serverHost));
m_scrollView = new QScrollView2(this, "remote scrollview");
- m_scrollView->setFrameStyle(QFrame::NoFrame);
- m_scrollView->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Expanding));
+ m_scrollView->setFrameStyle(TQFrame::NoFrame);
+ m_scrollView->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,
+ TQSizePolicy::Expanding));
switch(m_protocol)
{
@@ -190,20 +190,20 @@ bool KRDC::start()
m_view->setViewOnly(kapp->config()->readBoolEntry("viewOnly", false));
m_scrollView->addChild(m_view);
- QWhatsThis::add(m_view, i18n("Here you can see the remote desktop. If the other side allows you to control it, you can also move the mouse, click or enter keystrokes. If the content does not fit your screen, click on the toolbar's full screen button or scale button. To end the connection, just close the window."));
+ TQWhatsThis::add(m_view, i18n("Here you can see the remote desktop. If the other side allows you to control it, you can also move the mouse, click or enter keystrokes. If the content does not fit your screen, click on the toolbar's full screen button or scale button. To end the connection, just close the window."));
- connect(m_view, SIGNAL(changeSize(int,int)), SLOT(setSize(int,int)));
- connect(m_view, SIGNAL(connected()), SLOT(show()));
- connect(m_view, SIGNAL(disconnected()), SIGNAL(disconnected()));
+ connect(m_view, TQT_SIGNAL(changeSize(int,int)), TQT_SLOT(setSize(int,int)));
+ connect(m_view, TQT_SIGNAL(connected()), TQT_SLOT(show()));
+ connect(m_view, TQT_SIGNAL(disconnected()), TQT_SIGNAL(disconnected()));
// note that the disconnectedError() will be disconnected when kremoteview
// is completely initialized
- connect(m_view, SIGNAL(disconnectedError()), SIGNAL(disconnectedError()));
- connect(m_view, SIGNAL(statusChanged(RemoteViewStatus)),
- SLOT(changeProgress(RemoteViewStatus)));
- connect(m_view, SIGNAL(showingPasswordDialog(bool)),
- SLOT(showingPasswordDialog(bool)));
- connect(m_keyCaptureDialog, SIGNAL(keyPressed(XEvent*)),
- m_view, SLOT(pressKey(XEvent*)));
+ connect(m_view, TQT_SIGNAL(disconnectedError()), TQT_SIGNAL(disconnectedError()));
+ connect(m_view, TQT_SIGNAL(statusChanged(RemoteViewStatus)),
+ TQT_SLOT(changeProgress(RemoteViewStatus)));
+ connect(m_view, TQT_SIGNAL(showingPasswordDialog(bool)),
+ TQT_SLOT(showingPasswordDialog(bool)));
+ connect(m_keyCaptureDialog, TQT_SIGNAL(keyPressed(XEvent*)),
+ m_view, TQT_SLOT(pressKey(XEvent*)));
ret_status = m_view->start();
@@ -212,15 +212,15 @@ bool KRDC::start()
void KRDC::changeProgress(RemoteViewStatus s) {
if (!m_progressDialog) {
- m_progressDialog = new KProgressDialog(0, 0, QString::null,
+ m_progressDialog = new KProgressDialog(0, 0, TQString::null,
"1234567890", false);
m_progressDialog->showCancelButton(true);
m_progressDialog->setMinimumDuration(0x7fffffff);//disable effectively
m_progress = m_progressDialog->progressBar();
m_progress->setTextEnabled(false);
m_progress->setTotalSteps(3);
- connect(m_progressDialog, SIGNAL(cancelClicked()),
- SIGNAL(disconnectedError()));
+ connect(m_progressDialog, TQT_SIGNAL(cancelClicked()),
+ TQT_SIGNAL(disconnectedError()));
}
if (s == REMOTE_VIEW_CONNECTING) {
@@ -243,10 +243,10 @@ void KRDC::changeProgress(RemoteViewStatus s) {
m_progress->setValue(3);
hideProgressDialog();
if (s == REMOTE_VIEW_CONNECTED) {
- QObject::disconnect(m_view, SIGNAL(disconnectedError()),
- this, SIGNAL(disconnectedError()));
- connect(m_view, SIGNAL(disconnectedError()),
- SIGNAL(disconnected()));
+ TQObject::disconnect(m_view, TQT_SIGNAL(disconnectedError()),
+ this, TQT_SIGNAL(disconnectedError()));
+ connect(m_view, TQT_SIGNAL(disconnectedError()),
+ TQT_SIGNAL(disconnected()));
if (m_view->startFullscreen()) {
// m_view instance is asking to start in fullscreen mode
enableFullscreen(true);
@@ -268,7 +268,7 @@ void KRDC::showingPasswordDialog(bool b) {
void KRDC::showProgressDialog() {
m_showProgress = true;
- QTimer::singleShot(400, this, SLOT(showProgressTimeout()));
+ TQTimer::singleShot(400, this, TQT_SLOT(showProgressTimeout()));
}
void KRDC::hideProgressDialog() {
@@ -293,11 +293,11 @@ void KRDC::quit() {
emit disconnected();
}
-bool KRDC::parseHost(QString &str, Protocol &prot, QString &serverHost, int &serverPort,
- QString &userName, QString &password) {
- QString s = str;
- userName = QString::null;
- password = QString::null;
+bool KRDC::parseHost(TQString &str, Protocol &prot, TQString &serverHost, int &serverPort,
+ TQString &userName, TQString &password) {
+ TQString s = str;
+ userName = TQString::null;
+ password = TQString::null;
if (prot == PROTOCOL_AUTO) {
if(s.startsWith("smb:/")>0) { //we know it's more likely to be windows..
@@ -340,15 +340,15 @@ bool KRDC::parseHost(QString &str, Protocol &prot, QString &serverHost, int &ser
if (url.port()) {
if (url.hasUser())
- str = QString("%1@%2:%3").arg(userName).arg(serverHost).arg(url.port());
+ str = TQString("%1@%2:%3").arg(userName).arg(serverHost).arg(url.port());
else
- str = QString("%1:%2").arg(serverHost).arg(url.port());
+ str = TQString("%1:%2").arg(serverHost).arg(url.port());
}
else {
if (url.hasUser())
- str = QString("%1@%2").arg(userName).arg(serverHost);
+ str = TQString("%1@%2").arg(userName).arg(serverHost);
else
- str = QString("%1").arg(serverHost);
+ str = TQString("%1").arg(serverHost);
}
return true;
}
@@ -373,26 +373,26 @@ void KRDC::enableFullscreen(bool on)
m_view->switchFullscreen(on);
}
-QSize KRDC::sizeHint()
+TQSize KRDC::sizeHint()
{
if ((m_isFullscreen != WINDOW_MODE_FULLSCREEN) && m_toolbar) {
int dockHint = m_dockArea->sizeHint().height();
dockHint = dockHint < 1 ? 1 : dockHint; // fix wrong size hint
- return QSize(m_view->framebufferSize().width(),
+ return TQSize(m_view->framebufferSize().width(),
dockHint + m_view->framebufferSize().height());
}
else
return m_view->framebufferSize();
}
-QPopupMenu *KRDC::createPopupMenu(QWidget *parent) const {
+TQPopupMenu *KRDC::createPopupMenu(TQWidget *parent) const {
KPopupMenu *pu = new KPopupMenu(parent);
- pu->insertItem(i18n("View Only"), this, SLOT(viewOnlyToggled()), 0, VIEW_ONLY_ID);
+ pu->insertItem(i18n("View Only"), this, TQT_SLOT(viewOnlyToggled()), 0, VIEW_ONLY_ID);
pu->setCheckable(true);
pu->setItemChecked(VIEW_ONLY_ID, m_view->viewOnly());
if (m_view->supportsLocalCursor()) {
pu->insertItem(i18n("Always Show Local Cursor"), this,
- SLOT(showLocalCursorToggled()), 0,
+ TQT_SLOT(showLocalCursorToggled()), 0,
SHOW_LOCAL_CURSOR_ID);
pu->setCheckable(true);
pu->setItemChecked(SHOW_LOCAL_CURSOR_ID,
@@ -407,9 +407,9 @@ void KRDC::switchToFullscreen(bool scaling)
bool fromFullscreen = (m_isFullscreen == WINDOW_MODE_FULLSCREEN);
- QWidget *desktop = QApplication::desktop();
- QSize ds = desktop->size();
- QSize fbs = m_view->framebufferSize();
+ TQWidget *desktop = TQApplication::desktop();
+ TQSize ds = desktop->size();
+ TQSize fbs = m_view->framebufferSize();
bool scalingPossible = m_view->supportsScaling() &&
((fbs.width() >= ds.width()) || (fbs.height() >= ds.height()));
@@ -421,9 +421,9 @@ void KRDC::switchToFullscreen(bool scaling)
fbs.height(),
x, y);
if (m_oldResolution.valid)
- m_fullscreenResolution = QSize(x, y);
+ m_fullscreenResolution = TQSize(x, y);
else
- m_fullscreenResolution = QApplication::desktop()->size();
+ m_fullscreenResolution = TQApplication::desktop()->size();
m_isFullscreen = WINDOW_MODE_FULLSCREEN;
if (!scalingPossible)
m_windowScaling = m_view->scaling();
@@ -449,7 +449,7 @@ void KRDC::switchToFullscreen(bool scaling)
if (m_layout)
delete m_layout;
- m_layout = new QVBoxLayout(this);
+ m_layout = new TQVBoxLayout(this);
m_layout->addWidget(m_scrollView);
if (scalingPossible) {
@@ -464,36 +464,36 @@ void KRDC::switchToFullscreen(bool scaling)
m_view->enableScaling(false);
m_fsToolbar = new KFullscreenPanel(this, "fstoolbar", m_fullscreenResolution);
- connect(m_fsToolbar, SIGNAL(mouseEnter()), SLOT(showFullscreenToolbar()));
- connect(m_fsToolbar, SIGNAL(mouseLeave()), SLOT(hideFullscreenToolbarDelayed()));
+ connect(m_fsToolbar, TQT_SIGNAL(mouseEnter()), TQT_SLOT(showFullscreenToolbar()));
+ connect(m_fsToolbar, TQT_SIGNAL(mouseLeave()), TQT_SLOT(hideFullscreenToolbarDelayed()));
KToolBar *t = new KToolBar(m_fsToolbar);
m_fsToolbarWidget = t;
t->setIconSize(KIcon::Panel);
- QIconSet pinIconSet;
- pinIconSet.setPixmap(m_pinup, QIconSet::Automatic, QIconSet::Normal, QIconSet::On);
- pinIconSet.setPixmap(m_pindown, QIconSet::Automatic, QIconSet::Normal, QIconSet::Off);
+ TQIconSet pinIconSet;
+ pinIconSet.setPixmap(m_pinup, TQIconSet::Automatic, TQIconSet::Normal, TQIconSet::On);
+ pinIconSet.setPixmap(m_pindown, TQIconSet::Automatic, TQIconSet::Normal, TQIconSet::Off);
t->insertButton("pinup", FS_AUTOHIDE_ID);
KToolBarButton *pinButton = t->getButton(FS_AUTOHIDE_ID);
pinButton->setIconSet(pinIconSet);
- QToolTip::add(pinButton, i18n("Autohide on/off"));
+ TQToolTip::add(pinButton, i18n("Autohide on/off"));
t->setToggle(FS_AUTOHIDE_ID);
- t->addConnection(FS_AUTOHIDE_ID, SIGNAL(toggled(bool)), this, SLOT(setFsToolbarAutoHide(bool)));
+ t->addConnection(FS_AUTOHIDE_ID, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setFsToolbarAutoHide(bool)));
t->insertButton("window_nofullscreen", FS_FULLSCREEN_ID);
KToolBarButton *fullscreenButton = t->getButton(FS_FULLSCREEN_ID);
- QToolTip::add(fullscreenButton, i18n("Fullscreen"));
+ TQToolTip::add(fullscreenButton, i18n("Fullscreen"));
t->setToggle(FS_FULLSCREEN_ID);
t->setButton(FS_FULLSCREEN_ID, true);
- t->addConnection(FS_FULLSCREEN_ID, SIGNAL(toggled(bool)), this, SLOT(enableFullscreen(bool)));
+ t->addConnection(FS_FULLSCREEN_ID, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableFullscreen(bool)));
m_popup = createPopupMenu(t);
t->insertButton("configure", FS_ADVANCED_ID, m_popup, true, i18n("Advanced options"));
KToolBarButton *advancedButton = t->getButton(FS_ADVANCED_ID);
- QToolTip::add(advancedButton, i18n("Advanced options"));
+ TQToolTip::add(advancedButton, i18n("Advanced options"));
- QLabel *hostLabel = new QLabel(t);
+ TQLabel *hostLabel = new TQLabel(t);
hostLabel->setName("kde toolbar widget");
hostLabel->setAlignment(Qt::AlignCenter);
hostLabel->setText(" "+m_host+" ");
@@ -503,21 +503,21 @@ void KRDC::switchToFullscreen(bool scaling)
if (scalingPossible) {
t->insertButton("viewmagfit", FS_SCALE_ID);
KToolBarButton *scaleButton = t->getButton(FS_SCALE_ID);
- QToolTip::add(scaleButton, i18n("Scale view"));
+ TQToolTip::add(scaleButton, i18n("Scale view"));
t->setToggle(FS_SCALE_ID);
t->setButton(FS_SCALE_ID, scaling);
- t->addConnection(FS_SCALE_ID, SIGNAL(toggled(bool)), this, SLOT(switchToFullscreen(bool)));
+ t->addConnection(FS_SCALE_ID, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(switchToFullscreen(bool)));
}
t->insertButton("iconify", FS_ICONIFY_ID);
KToolBarButton *iconifyButton = t->getButton(FS_ICONIFY_ID);
- QToolTip::add(iconifyButton, i18n("Minimize"));
- t->addConnection(FS_ICONIFY_ID, SIGNAL(clicked()), this, SLOT(iconify()));
+ TQToolTip::add(iconifyButton, i18n("Minimize"));
+ t->addConnection(FS_ICONIFY_ID, TQT_SIGNAL(clicked()), this, TQT_SLOT(iconify()));
t->insertButton("close", FS_CLOSE_ID);
KToolBarButton *closeButton = t->getButton(FS_CLOSE_ID);
- QToolTip::add(closeButton, i18n("Close"));
- t->addConnection(FS_CLOSE_ID, SIGNAL(clicked()), this, SLOT(quit()));
+ TQToolTip::add(closeButton, i18n("Close"));
+ t->addConnection(FS_CLOSE_ID, TQT_SIGNAL(clicked()), this, TQT_SLOT(quit()));
m_fsToolbar->setChild(t);
@@ -574,36 +574,36 @@ void KRDC::switchToNormal(bool scaling)
}
if (!m_toolbar) {
- m_dockArea = new QDockArea(Qt::Horizontal, QDockArea::Normal, this);
- m_dockArea->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,
- QSizePolicy::Fixed));
+ m_dockArea = new TQDockArea(Qt::Horizontal, TQDockArea::Normal, this);
+ m_dockArea->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Fixed));
KToolBar *t = new KToolBar(m_dockArea);
m_toolbar = t;
t->setIconText(KToolBar::IconTextRight);
- connect(t, SIGNAL(placeChanged(QDockWindow::Place)), SLOT(toolbarChanged()));
+ connect(t, TQT_SIGNAL(placeChanged(TQDockWindow::Place)), TQT_SLOT(toolbarChanged()));
t->insertButton("window_fullscreen", 0, true, i18n("Fullscreen"));
KToolBarButton *fullscreenButton = t->getButton(0);
- QToolTip::add(fullscreenButton, i18n("Fullscreen"));
- QWhatsThis::add(fullscreenButton, i18n("Switches to full screen. If the remote desktop has a different screen resolution, Remote Desktop Connection will automatically switch to the nearest resolution."));
+ TQToolTip::add(fullscreenButton, i18n("Fullscreen"));
+ TQWhatsThis::add(fullscreenButton, i18n("Switches to full screen. If the remote desktop has a different screen resolution, Remote Desktop Connection will automatically switch to the nearest resolution."));
t->setToggle(0);
t->setButton(0, false);
- t->addConnection(0, SIGNAL(toggled(bool)), this, SLOT(enableFullscreen(bool)));
+ t->addConnection(0, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableFullscreen(bool)));
if (m_view->supportsScaling()) {
t->insertButton("viewmagfit", 1, true, i18n("Scale"));
KToolBarButton *scaleButton = t->getButton(1);
- QToolTip::add(scaleButton, i18n("Scale view"));
- QWhatsThis::add(scaleButton, i18n("This option scales the remote screen to fit your window size."));
+ TQToolTip::add(scaleButton, i18n("Scale view"));
+ TQWhatsThis::add(scaleButton, i18n("This option scales the remote screen to fit your window size."));
t->setToggle(1);
t->setButton(1, scaling);
- t->addConnection(1, SIGNAL(toggled(bool)), this, SLOT(switchToNormal(bool)));
+ t->addConnection(1, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(switchToNormal(bool)));
}
t->insertButton("key_enter", 2, true, i18n("Special Keys"));
KToolBarButton *skButton = t->getButton(2);
- QToolTip::add(skButton, i18n("Enter special keys."));
- QWhatsThis::add(skButton, i18n("This option allows you to send special key combinations like Ctrl-Alt-Del to the remote host."));
- t->addConnection(2, SIGNAL(clicked()), m_keyCaptureDialog, SLOT(execute()));
+ TQToolTip::add(skButton, i18n("Enter special keys."));
+ TQWhatsThis::add(skButton, i18n("This option allows you to send special key combinations like Ctrl-Alt-Del to the remote host."));
+ t->addConnection(2, TQT_SIGNAL(clicked()), m_keyCaptureDialog, TQT_SLOT(execute()));
if (m_popup) {
m_popup->deleteLater();
@@ -613,14 +613,14 @@ void KRDC::switchToNormal(bool scaling)
m_popup = createPopupMenu(t);
t->insertButton("configure", 3, m_popup, true, i18n("Advanced"));
KToolBarButton *advancedButton = t->getButton(3);
- QToolTip::add(advancedButton, i18n("Advanced options"));
+ TQToolTip::add(advancedButton, i18n("Advanced options"));
if (m_layout)
delete m_layout;
- m_layout = new QVBoxLayout(this);
+ m_layout = new TQVBoxLayout(this);
m_layout->addWidget(m_dockArea);
m_layout->addWidget(m_scrollView);
- m_layout->setGeometry(QRect(0, 0, m_scrollView->width(),
+ m_layout->setGeometry(TQRect(0, 0, m_scrollView->width(),
m_dockArea->height() + m_scrollView->height()));
}
@@ -641,7 +641,7 @@ void KRDC::switchToNormal(bool scaling)
if (!fromFullscreen) {
if (m_initialWindowSize.isValid()) {
resize(m_initialWindowSize);
- m_initialWindowSize = QSize();
+ m_initialWindowSize = TQSize();
}
else if (!scalingChanged)
resize(sizeHint());
@@ -684,18 +684,18 @@ void KRDC::toolbarChanged() {
setMaximumSize(sizeHint());
// resize window when toolbar is docked and it was maximized
- QSize fs = m_view->framebufferSize();
- QSize cs = size();
- QSize cs1(cs.width(), cs.height()-1); // adjusted for QDockArea.height()==1
+ TQSize fs = m_view->framebufferSize();
+ TQSize cs = size();
+ TQSize cs1(cs.width(), cs.height()-1); // adjusted for TQDockArea.height()==1
if ((fs == cs) || (fs == cs1))
resize(sizeHint());
}
-bool KRDC::event(QEvent *e) {
+bool KRDC::event(TQEvent *e) {
/* used to change resolution when fullscreen was minimized */
- if ((!m_fullscreenMinimized) || (e->type() != QEvent::WindowActivate))
- return QWidget::event(e);
+ if ((!m_fullscreenMinimized) || (e->type() != TQEvent::WindowActivate))
+ return TQWidget::event(e);
m_fullscreenMinimized = false;
int x, y;
@@ -705,9 +705,9 @@ bool KRDC::event(QEvent *e) {
m_view->height(),
x, y);
if (m_oldResolution.valid)
- m_fullscreenResolution = QSize(x, y);
+ m_fullscreenResolution = TQSize(x, y);
else
- m_fullscreenResolution = QApplication::desktop()->size();
+ m_fullscreenResolution = TQApplication::desktop()->size();
showFullScreen();
setGeometry(0, 0, m_fullscreenResolution.width(),
@@ -717,17 +717,17 @@ bool KRDC::event(QEvent *e) {
m_view->switchFullscreen( true );
KWin::setState(winId(), NET::StaysOnTop);
- return QWidget::event(e);
+ return TQWidget::event(e);
}
-bool KRDC::eventFilter(QObject *watched, QEvent *e) {
-/* used to get events from QScrollView on resize for scale mode*/
+bool KRDC::eventFilter(TQObject *watched, TQEvent *e) {
+/* used to get events from TQScrollView on resize for scale mode*/
if (watched != m_scrollView)
return false;
- if (e->type() != QEvent::Resize)
+ if (e->type() != TQEvent::Resize)
return false;
- QResizeEvent *re = (QResizeEvent*) e;
+ TQResizeEvent *re = (TQResizeEvent*) e;
m_view->resize(re->size());
return false;
}
@@ -736,7 +736,7 @@ void KRDC::setSize(int w, int h)
{
int dw, dh;
- QWidget *desktop = QApplication::desktop();
+ TQWidget *desktop = TQApplication::desktop();
dw = desktop->width();
dh = desktop->height();
@@ -763,10 +763,10 @@ void KRDC::repositionView(bool fullscreen) {
if (!m_scrollView)
return;
- QSize s = m_view->size();
+ TQSize s = m_view->size();
if (fullscreen) {
- QSize d = m_fullscreenResolution;
+ TQSize d = m_fullscreenResolution;
bool margin = false;
if (d.width() > s.width())
ox = (d.width() - s.width()) / 2;
@@ -807,10 +807,10 @@ void KRDC::hideFullscreenToolbarNow() {
}
void KRDC::bumpScroll() {
- int x = QCursor::pos().x();
- int y = QCursor::pos().y();
- QSize s = m_view->size();
- QSize d = m_fullscreenResolution;
+ int x = TQCursor::pos().x();
+ int y = TQCursor::pos().y();
+ TQSize s = m_view->size();
+ TQSize d = m_fullscreenResolution;
if (d.width() < s.width()) {
if (x == 0)
@@ -838,7 +838,7 @@ void KRDC::hideFullscreenToolbarDelayed() {
m_autoHideTimer.start(TOOLBAR_AUTOHIDE_TIMEOUT, true);
}
-void KRDC::mouseMoveEvent(QMouseEvent *e) {
+void KRDC::mouseMoveEvent(TQMouseEvent *e) {
if (m_isFullscreen != WINDOW_MODE_FULLSCREEN)
return;
@@ -847,8 +847,8 @@ void KRDC::mouseMoveEvent(QMouseEvent *e) {
/* Bump Scrolling */
- QSize s = m_view->size();
- QSize d = m_fullscreenResolution;
+ TQSize s = m_view->size();
+ TQSize d = m_fullscreenResolution;
if ((d.width() < s.width()) || d.height() < s.height()) {
if ((x == 0) || (x >= d.width()-1) ||
(y == 0) || (y >= d.height()-1))
@@ -874,7 +874,7 @@ void KRDC::mouseMoveEvent(QMouseEvent *e) {
e->accept();
}
-void KRDC::setLastHost(const QString &lastHost) {
+void KRDC::setLastHost(const TQString &lastHost) {
m_lastHost = lastHost;
}
diff --git a/krdc/krdc.h b/krdc/krdc.h
index 5bf9a4bd..a5925540 100644
--- a/krdc/krdc.h
+++ b/krdc/krdc.h
@@ -19,12 +19,12 @@
#define KRDC_H
#include <kprogress.h>
-#include <qscrollview.h>
-#include <qlayout.h>
-#include <qsize.h>
-#include <qrect.h>
-#include <qtimer.h>
-#include <qdesktopwidget.h>
+#include <tqscrollview.h>
+#include <tqlayout.h>
+#include <tqsize.h>
+#include <tqrect.h>
+#include <tqtimer.h>
+#include <tqdesktopwidget.h>
#include "vnc/kvncview.h"
#include "rdp/krdpview.h"
@@ -51,12 +51,12 @@ enum Protocol {
PROTOCOL_RDP
};
-// Overloaded QScrollView, to let mouse move events through to remote widget
-class QScrollView2 : public QScrollView {
+// Overloaded TQScrollView, to let mouse move events through to remote widget
+class QScrollView2 : public TQScrollView {
public:
- QScrollView2(QWidget *w, const char *name);
+ QScrollView2(TQWidget *w, const char *name);
protected:
- virtual void mouseMoveEvent(QMouseEvent *e);
+ virtual void mouseMoveEvent(TQMouseEvent *e);
};
@@ -65,51 +65,51 @@ class KRDC : public QWidget
Q_OBJECT
private:
SmartPtr<KProgressDialog> m_progressDialog; // dialog, displayed while connecting
- QVBoxLayout *m_layout; // the layout for autosizing the scrollview
- QScrollView *m_scrollView; // scrollview that contains the remote widget
+ TQVBoxLayout *m_layout; // the layout for autosizing the scrollview
+ TQScrollView *m_scrollView; // scrollview that contains the remote widget
KProgress *m_progress; // progress bar for the dialog
KRemoteView *m_view; // the remote widget (e.g. KVncView)
SmartPtr<KeyCaptureDialog> m_keyCaptureDialog; // dialog for key capturing
KFullscreenPanel *m_fsToolbar; // toolbar for fullscreen (0 in normal mode)
- QWidget *m_fsToolbarWidget; // qt designer widget for fs toolbar
+ TQWidget *m_fsToolbarWidget; // qt designer widget for fs toolbar
// (invalid in normal mode)
- QPixmap m_pinup, m_pindown; // fs toolbar imaged for autohide button
+ TQPixmap m_pinup, m_pindown; // fs toolbar imaged for autohide button
KToolBar *m_toolbar; // toolbar in normal mode (0 in fs mode)
- QDockArea *m_dockArea; // dock area for toolbar in normal mode (0 in fs mode)
- QPopupMenu *m_popup; // advanced options popup (0 in fs mode)
- QDesktopWidget m_desktopWidget;
+ TQDockArea *m_dockArea; // dock area for toolbar in normal mode (0 in fs mode)
+ TQPopupMenu *m_popup; // advanced options popup (0 in fs mode)
+ TQDesktopWidget m_desktopWidget;
static const int TOOLBAR_AUTOHIDE_TIMEOUT;
bool m_ftAutoHide; // if true auto hide in fs is activated
- QTimer m_autoHideTimer; // timer for autohide
+ TQTimer m_autoHideTimer; // timer for autohide
- QTimer m_bumpScrollTimer; // timer for bump scrolling (in fs, when res too large)
+ TQTimer m_bumpScrollTimer; // timer for bump scrolling (in fs, when res too large)
bool m_showProgress; // can disable showing the progress dialog temporary
- QString m_host; // host string as given from user
+ TQString m_host; // host string as given from user
Protocol m_protocol; // the used protocol
Quality m_quality; // current quality setting
- QString m_encodings; // string containing the encodings, space separated,
+ TQString m_encodings; // string containing the encodings, space separated,
// used for config before connection
- QString m_password; // if not null, contains the password to use
- QString m_resolution;// contains an alternative resolution
- QString m_keymap; // keymap on the terminal server
+ TQString m_password; // if not null, contains the password to use
+ TQString m_resolution;// contains an alternative resolution
+ TQString m_keymap; // keymap on the terminal server
WindowMode m_isFullscreen; // fs/normal state
Resolution m_oldResolution; // conatins encoded res before fs
bool m_fullscreenMinimized; // true if window is currently minimized from fs
- QSize m_fullscreenResolution; // xvidmode size (valid only in fs)
+ TQSize m_fullscreenResolution; // xvidmode size (valid only in fs)
bool m_windowScaling; // used in startup and fullscreen to determine
// whether scaling should be enabled in norm mode.
// The current state is m_view->scaled().
bool m_localCursor; // show local cursor no matter what
- QSize m_initialWindowSize; // initial window size (windowed mode only),
+ TQSize m_initialWindowSize; // initial window size (windowed mode only),
// invalid after first use
- static QString m_lastHost; // remembers last value of host input
+ static TQString m_lastHost; // remembers last value of host input
- bool parseHost(QString &s, Protocol &prot, QString &serverHost, int &serverPort,
- QString &userName, QString &password);
+ bool parseHost(TQString &s, Protocol &prot, TQString &serverHost, int &serverPort,
+ TQString &userName, TQString &password);
void repositionView(bool fullscreen);
@@ -120,28 +120,28 @@ private:
static const int TOOLBAR_SPEED_DOWN;
static const int TOOLBAR_SPEED_UP;
void fsToolbarScheduleHidden();
- QPopupMenu *createPopupMenu(QWidget *parent) const;
+ TQPopupMenu *createPopupMenu(TQWidget *parent) const;
protected:
- virtual void mouseMoveEvent(QMouseEvent *e);
- virtual bool event(QEvent *e);
- virtual bool eventFilter(QObject *watched, QEvent *e);
- virtual QSize sizeHint();
+ virtual void mouseMoveEvent(TQMouseEvent *e);
+ virtual bool event(TQEvent *e);
+ virtual bool eventFilter(TQObject *watched, TQEvent *e);
+ virtual TQSize sizeHint();
public:
KRDC(WindowMode wm = WINDOW_MODE_AUTO,
- const QString &host = QString::null,
+ const TQString &host = TQString::null,
Quality q = QUALITY_UNKNOWN,
- const QString &encodings = QString::null,
- const QString &password = QString::null,
+ const TQString &encodings = TQString::null,
+ const TQString &password = TQString::null,
bool scale = false,
bool localCursor = false,
- QSize initialWindowSize = QSize());
+ TQSize initialWindowSize = TQSize());
~KRDC();
bool start();
- static void setLastHost(const QString &host);
+ static void setLastHost(const TQString &host);
private slots:
void changeProgress(RemoteViewStatus s);
diff --git a/krdc/kremoteview.cpp b/krdc/kremoteview.cpp
index fab9ed29..76ae6267 100644
--- a/krdc/kremoteview.cpp
+++ b/krdc/kremoteview.cpp
@@ -17,10 +17,10 @@
#include "kremoteview.h"
-KRemoteView::KRemoteView(QWidget *parent,
+KRemoteView::KRemoteView(TQWidget *parent,
const char *name,
WFlags f) :
- QWidget(parent, name, f),
+ TQWidget(parent, name, f),
m_status(REMOTE_VIEW_DISCONNECTED) {
}
diff --git a/krdc/kremoteview.h b/krdc/kremoteview.h
index a3dbe438..09b312c0 100644
--- a/krdc/kremoteview.h
+++ b/krdc/kremoteview.h
@@ -19,7 +19,7 @@
#define KREMOTEVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kkeynative.h>
#include "events.h"
@@ -55,7 +55,7 @@ enum DotCursorState {
* maximum size to the remote size and minimum size to the
* smallest resolution that your scaler can handle.
* @li if you override mouseMoveEvent()
- * you must ignore the QEvent, because the KRDC widget will
+ * you must ignore the TQEvent, because the KRDC widget will
* need it for stuff like toolbar auto-hide and bump
* scrolling. If you use x11Event(), make sure that
* MotionNotify events will be forwarded.
@@ -65,7 +65,7 @@ class KRemoteView : public QWidget
{
Q_OBJECT
public:
- KRemoteView(QWidget *parent = 0,
+ KRemoteView(TQWidget *parent = 0,
const char *name = 0,
WFlags f = 0);
@@ -130,7 +130,7 @@ public:
/**
* Returns the resolution of the remote framebuffer.
- * It should return a null @ref QSize when the size
+ * It should return a null @ref TQSize when the size
* is not known.
* The backend must also emit a @ref changeSize()
* when the size of the framebuffer becomes available
@@ -138,7 +138,7 @@ public:
* @return the remote framebuffer size, a null QSize
* if unknown
*/
- virtual QSize framebufferSize() = 0;
+ virtual TQSize framebufferSize() = 0;
/**
* Initiate the disconnection. This doesn't need to happen
@@ -159,7 +159,7 @@ public:
* Returns the host the view is connected to.
* @return the host the view is connected to
*/
- virtual QString host() = 0;
+ virtual TQString host() = 0;
/**
* Returns the port the view is connected to.
diff --git a/krdc/kservicelocator.cpp b/krdc/kservicelocator.cpp
index df97016d..3b38ed9a 100644
--- a/krdc/kservicelocator.cpp
+++ b/krdc/kservicelocator.cpp
@@ -24,17 +24,17 @@
#include "kservicelocator.h"
#include <kdebug.h>
-#include <qregexp.h>
-#include <qapplication.h>
+#include <tqregexp.h>
+#include <tqapplication.h>
#ifdef HAVE_SLP
#include <slp.h>
-#include <qevent.h>
-#include <qthread.h>
+#include <tqevent.h>
+#include <tqthread.h>
#endif
-const QString KServiceLocator::DEFAULT_AUTHORITY = "";
-const QString KServiceLocator::ALL_AUTHORITIES = QString::null;
+const TQString KServiceLocator::DEFAULT_AUTHORITY = "";
+const TQString KServiceLocator::ALL_AUTHORITIES = TQString::null;
class AsyncThread;
@@ -43,20 +43,20 @@ public:
KServiceLocator *m_ksl;
bool m_opened;
volatile bool m_abort;
- QString m_lang;
+ TQString m_lang;
bool m_async;
bool ensureOpen();
KServiceLocatorPrivate(KServiceLocator *ksl,
- const QString &lang,
+ const TQString &lang,
bool async);
~KServiceLocatorPrivate();
#ifdef HAVE_SLP
SLPHandle m_handle;
AsyncThread *m_thread;
- QString m_operationServiceUrl; // for findAttributes()/foundAttributes()
+ TQString m_operationServiceUrl; // for findAttributes()/foundAttributes()
friend class FindSrvTypesThread;
friend class FindSrvsThread;
@@ -107,14 +107,14 @@ public:
#endif
};
-KServiceLocator::KServiceLocator(const QString &lang, bool async) :
- QObject(0, "KServiceLocator") {
+KServiceLocator::KServiceLocator(const TQString &lang, bool async) :
+ TQObject(0, "KServiceLocator") {
d = new KServiceLocatorPrivate(this, lang, async);
}
KServiceLocatorPrivate::KServiceLocatorPrivate(KServiceLocator *ksl,
- const QString &lang,
+ const TQString &lang,
bool async) :
m_ksl(ksl),
m_opened(false),
@@ -146,7 +146,7 @@ private:
bool m_success;
public:
LastSignalEvent(int type, bool s) :
- QCustomEvent(type),
+ TQCustomEvent(type),
m_success(s)
{};
int success() const { return m_success; };
@@ -156,28 +156,28 @@ const int FoundServiceTypesEventType = 45012;
class FoundServiceTypesEvent : public QCustomEvent
{
private:
- QString m_srvtypes;
+ TQString m_srvtypes;
public:
FoundServiceTypesEvent(const char *srvtypes) :
- QCustomEvent(FoundServiceTypesEventType),
+ TQCustomEvent(FoundServiceTypesEventType),
m_srvtypes(srvtypes)
{};
- QString srvtypes() const { return m_srvtypes; };
+ TQString srvtypes() const { return m_srvtypes; };
};
const int FoundServiceEventType = 45013;
class FoundServiceEvent : public QCustomEvent
{
private:
- QString m_srvUrl;
+ TQString m_srvUrl;
unsigned short m_lifetime;
public:
FoundServiceEvent(const char *srvUrl, unsigned short lifetime) :
- QCustomEvent(FoundServiceEventType),
+ TQCustomEvent(FoundServiceEventType),
m_srvUrl(srvUrl),
m_lifetime(lifetime)
{};
- QString srvUrl() const { return m_srvUrl; };
+ TQString srvUrl() const { return m_srvUrl; };
unsigned short lifetime() const { return m_lifetime; };
};
@@ -185,26 +185,26 @@ const int FoundAttributesEventType = 45014;
class FoundAttributesEvent : public QCustomEvent
{
private:
- QString m_attributes;
+ TQString m_attributes;
public:
FoundAttributesEvent(const char *attributes) :
- QCustomEvent(FoundAttributesEventType),
+ TQCustomEvent(FoundAttributesEventType),
m_attributes(attributes)
{};
- QString attributes() const { return m_attributes; };
+ TQString attributes() const { return m_attributes; };
};
const int FoundScopesEventType = 45015;
class FoundScopesEvent : public QCustomEvent
{
private:
- QString m_scopes;
+ TQString m_scopes;
public:
FoundScopesEvent(const char *scopes) :
- QCustomEvent(FoundScopesEventType),
+ TQCustomEvent(FoundScopesEventType),
m_scopes(scopes)
{};
- QString scopes() const { return m_scopes; };
+ TQString scopes() const { return m_scopes; };
};
@@ -226,13 +226,13 @@ SLPBoolean srvTypeCallbackAsync(SLPHandle,
void* cookie) {
KServiceLocatorPrivate *ksl = (KServiceLocatorPrivate*) cookie;
if ((errcode != SLP_OK) || ksl->m_abort) {
- QApplication::postEvent(ksl->m_ksl, new LastSignalEvent(LastServiceTypeSignalEventType,
+ TQApplication::postEvent(ksl->m_ksl, new LastSignalEvent(LastServiceTypeSignalEventType,
(errcode == SLP_OK) ||
(errcode == SLP_LAST_CALL) ||
ksl->m_abort));
return SLP_FALSE;
}
- QApplication::postEvent(ksl->m_ksl, new FoundServiceTypesEvent(srvtypes));
+ TQApplication::postEvent(ksl->m_ksl, new FoundServiceTypesEvent(srvtypes));
return SLP_TRUE;
}
@@ -251,13 +251,13 @@ SLPBoolean srvUrlCallbackAsync(SLPHandle,
void* cookie) {
KServiceLocatorPrivate *ksl = (KServiceLocatorPrivate*) cookie;
if ((errcode != SLP_OK) || ksl->m_abort) {
- QApplication::postEvent(ksl->m_ksl, new LastSignalEvent(LastServiceSignalEventType,
+ TQApplication::postEvent(ksl->m_ksl, new LastSignalEvent(LastServiceSignalEventType,
(errcode == SLP_OK) ||
(errcode == SLP_LAST_CALL) ||
ksl->m_abort));
return SLP_FALSE;
}
- QApplication::postEvent(ksl->m_ksl,
+ TQApplication::postEvent(ksl->m_ksl,
new FoundServiceEvent(srvurl, lifetime));
return SLP_TRUE;
}
@@ -275,14 +275,14 @@ SLPBoolean srvAttrCallbackAsync(SLPHandle,
void* cookie) {
KServiceLocatorPrivate *ksl = (KServiceLocatorPrivate*) cookie;
if ((errcode != SLP_OK) || ksl->m_abort) {
- QApplication::postEvent(ksl->m_ksl,
+ TQApplication::postEvent(ksl->m_ksl,
new LastSignalEvent(LastAttributesSignalEventType,
(errcode == SLP_OK) ||
(errcode == SLP_LAST_CALL) ||
ksl->m_abort));
return SLP_FALSE;
}
- QApplication::postEvent(ksl->m_ksl,
+ TQApplication::postEvent(ksl->m_ksl,
new FoundAttributesEvent(attrlist));
return SLP_TRUE;
}
@@ -293,7 +293,7 @@ SLPBoolean srvAttrCallbackAsync(SLPHandle,
/* Threads for async events */
/* ****** *** ****** *** ****** */
-class AsyncThread : public QThread {
+class AsyncThread : public TQThread {
protected:
SLPHandle m_handle;
KServiceLocatorPrivate *m_parent;
@@ -303,7 +303,7 @@ protected:
}
};
class FindSrvTypesThread : public AsyncThread {
- QString m_namingAuthority, m_scopeList;
+ TQString m_namingAuthority, m_scopeList;
public:
FindSrvTypesThread(SLPHandle handle,
KServiceLocatorPrivate *parent,
@@ -321,13 +321,13 @@ public:
srvTypeCallbackAsync,
m_parent);
if (e != SLP_OK)
- QApplication::postEvent(m_parent->m_ksl,
+ TQApplication::postEvent(m_parent->m_ksl,
new LastSignalEvent(LastServiceTypeSignalEventType,
false));
}
};
class FindSrvsThread : public AsyncThread {
- QString m_srvUrl, m_scopeList, m_filter;
+ TQString m_srvUrl, m_scopeList, m_filter;
public:
FindSrvsThread(SLPHandle handle,
KServiceLocatorPrivate *parent,
@@ -349,13 +349,13 @@ public:
srvUrlCallbackAsync,
m_parent);
if (e != SLP_OK)
- QApplication::postEvent(m_parent->m_ksl,
+ TQApplication::postEvent(m_parent->m_ksl,
new LastSignalEvent(LastServiceSignalEventType,
false));
}
};
class FindAttrsThread : public AsyncThread {
- QString m_srvUrl, m_scopeList, m_attrIds;
+ TQString m_srvUrl, m_scopeList, m_attrIds;
public:
FindAttrsThread(SLPHandle handle,
KServiceLocatorPrivate *parent,
@@ -376,7 +376,7 @@ public:
srvAttrCallbackAsync,
m_parent);
if (e != SLP_OK)
- QApplication::postEvent(m_parent->m_ksl,
+ TQApplication::postEvent(m_parent->m_ksl,
new LastSignalEvent(LastAttributesSignalEventType,
false));
}
@@ -393,14 +393,14 @@ public:
e = SLPFindScopes(m_handle, &_scopelist);
if (e != SLP_OK) {
- QApplication::postEvent(m_parent->m_ksl,
+ TQApplication::postEvent(m_parent->m_ksl,
new FoundScopesEvent(""));
return;
}
- QString scopeList(_scopelist);
+ TQString scopeList(_scopelist);
SLPFree(_scopelist);
- QApplication::postEvent(m_parent->m_ksl,
+ TQApplication::postEvent(m_parent->m_ksl,
new FoundScopesEvent(scopeList.latin1()));
}
};
@@ -442,8 +442,8 @@ bool KServiceLocatorPrivate::ensureOpen() {
return true;
}
-bool KServiceLocator::findServiceTypes(const QString &namingAuthority,
- const QString &scopeList) {
+bool KServiceLocator::findServiceTypes(const TQString &namingAuthority,
+ const TQString &scopeList) {
if (!d->ensureOpen())
return false;
if (d->m_thread)
@@ -469,9 +469,9 @@ bool KServiceLocator::findServiceTypes(const QString &namingAuthority,
}
}
-bool KServiceLocator::findServices(const QString &srvtype,
- const QString &filter,
- const QString &scopeList) {
+bool KServiceLocator::findServices(const TQString &srvtype,
+ const TQString &filter,
+ const TQString &scopeList) {
if (!d->ensureOpen())
return false;
if (d->m_thread)
@@ -499,8 +499,8 @@ bool KServiceLocator::findServices(const QString &srvtype,
}
}
-bool KServiceLocator::findAttributes(const QString &serviceUrl,
- const QString &attributeIds) {
+bool KServiceLocator::findAttributes(const TQString &serviceUrl,
+ const TQString &attributeIds) {
if (!d->ensureOpen())
return false;
if (d->m_thread)
@@ -544,7 +544,7 @@ bool KServiceLocator::findScopes() {
else {
SLPError e;
char *_scopelist;
- QStringList scopeList;
+ TQStringList scopeList;
e = SLPFindScopes(d->m_handle, &_scopelist);
if (e != SLP_OK)
return false;
@@ -593,7 +593,7 @@ SLPBoolean KServiceLocatorPrivate::handleAttrCallback(const char* attrlist,
}
-void KServiceLocator::customEvent(QCustomEvent *e) {
+void KServiceLocator::customEvent(TQCustomEvent *e) {
if ((e->type() >= MinLastSignalEventType) &&
(e->type() <= MaxLastSignalEventType)){
bool s = true;
@@ -633,13 +633,13 @@ void KServiceLocator::customEvent(QCustomEvent *e) {
}
}
-QString KServiceLocator::decodeAttributeValue(const QString &value) {
+TQString KServiceLocator::decodeAttributeValue(const TQString &value) {
char *n;
if (value.isNull())
return value;
if (SLPUnescape(value.latin1(), &n, SLP_TRUE) != SLP_OK)
- return QString::null;
- QString r(n);
+ return TQString::null;
+ TQString r(n);
SLPFree(n);
return r;
}
@@ -654,21 +654,21 @@ bool KServiceLocator::available() {
}
void KServiceLocator::abortOperation() {
}
-bool KServiceLocator::findServiceTypes(const QString &,const QString &) {
+bool KServiceLocator::findServiceTypes(const TQString &,const TQString &) {
return false;
}
-bool KServiceLocator::findServices(const QString &,const QString &,const QString &) {
+bool KServiceLocator::findServices(const TQString &,const TQString &,const TQString &) {
return false;
}
-bool KServiceLocator::findAttributes(const QString &,const QString &) {
+bool KServiceLocator::findAttributes(const TQString &,const TQString &) {
return false;
}
bool KServiceLocator::findScopes() {
return false;
}
-void KServiceLocator::customEvent(QCustomEvent *) {
+void KServiceLocator::customEvent(TQCustomEvent *) {
}
-QString KServiceLocator::decodeAttributeValue(const QString &value) {
+TQString KServiceLocator::decodeAttributeValue(const TQString &value) {
return value;
}
@@ -677,18 +677,18 @@ QString KServiceLocator::decodeAttributeValue(const QString &value) {
/*** Private emit-helpers ***/
-void KServiceLocator::emitFoundServiceTypes(QString serviceTypes) {
+void KServiceLocator::emitFoundServiceTypes(TQString serviceTypes) {
emit foundServiceTypes(serviceTypes);
}
-void KServiceLocator::emitFoundService(QString serviceUrl,
+void KServiceLocator::emitFoundService(TQString serviceUrl,
int lifetime) {
emit foundService(serviceUrl, lifetime);
}
-void KServiceLocator::emitFoundAttributes(QString serviceUrl,
- QString attributes) {
+void KServiceLocator::emitFoundAttributes(TQString serviceUrl,
+ TQString attributes) {
emit foundAttributes(serviceUrl, attributes);
}
-void KServiceLocator::emitFoundScopes(QStringList scopeList) {
+void KServiceLocator::emitFoundScopes(TQStringList scopeList) {
emit foundScopes(scopeList);
}
void KServiceLocator::emitLastServiceTypeSignal(bool success) {
@@ -705,9 +705,9 @@ void KServiceLocator::emitLastAttributesSignal(bool success) {
/*** Static helpers ***/
-void KServiceLocator::parseAttributeList(const QString &attributes,
- QMap<QString,QString> &attributeMap) {
- QRegExp r("\\((.*)=(.*)\\)");
+void KServiceLocator::parseAttributeList(const TQString &attributes,
+ TQMap<TQString,TQString> &attributeMap) {
+ TQRegExp r("\\((.*)=(.*)\\)");
r.setMinimal(true);
int pos = 0;
while (pos >= 0) {
@@ -719,16 +719,16 @@ void KServiceLocator::parseAttributeList(const QString &attributes,
}
}
-QStringList KServiceLocator::parseCommaList(const QString &list) {
- return QStringList::split(QChar(','), list);
+TQStringList KServiceLocator::parseCommaList(const TQString &list) {
+ return TQStringList::split(TQChar(','), list);
}
-QString KServiceLocator::createCommaList(const QStringList &values) {
+TQString KServiceLocator::createCommaList(const TQStringList &values) {
return values.join(",");
}
-QString KServiceLocator::escapeFilter(const QString &str) {
- QString f;
+TQString KServiceLocator::escapeFilter(const TQString &str) {
+ TQString f;
int s = str.length();
for (int i = 0; i < s; i++) {
char c = str[i];
diff --git a/krdc/kservicelocator.h b/krdc/kservicelocator.h
index db247177..c9439279 100644
--- a/krdc/kservicelocator.h
+++ b/krdc/kservicelocator.h
@@ -21,9 +21,9 @@
#ifndef __KSERVICELOCATOR_H
#define __KSERVICELOCATOR_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
class KServiceLocatorPrivate;
@@ -39,7 +39,7 @@ class KServiceLocatorPrivate;
* @version $Id$
* @author Tim Jansen, tim@tjansen.de
*/
-class KServiceLocator : public QObject {
+class KServiceLocator : public TQObject {
Q_OBJECT
private:
friend class KServiceLocatorPrivate;
@@ -48,12 +48,12 @@ class KServiceLocator : public QObject {
public:
/**
* Creates a new KServiceLocator.
- * @param lang the language to search in, or QString::null for the
+ * @param lang the language to search in, or TQString::null for the
* default language
* @param async true to create the service locator in asynchronous
* mode, false otherwise
*/
- KServiceLocator(const QString &lang = QString::null,
+ KServiceLocator(const TQString &lang = TQString::null,
bool async = true);
virtual ~KServiceLocator();
@@ -69,8 +69,8 @@ class KServiceLocator : public QObject {
* @param attributes a list of encoded attributes
* @param attributeMap the attributes will be added to this map
*/
- static void parseAttributeList(const QString &attributes,
- QMap<QString,QString> &attributeMap);
+ static void parseAttributeList(const TQString &attributes,
+ TQMap<TQString,TQString> &attributeMap);
/**
* Decodes the value of an attribute (removes the escape codes). This
@@ -78,24 +78,24 @@ class KServiceLocator : public QObject {
* This function requires the presence of the SLP library, otherwise it
* will return the original value.
* @param value the attribute value to decode
- * @return the decoded value. If @p value was QString::null or decoding
- * failed, QString::null will be returned
+ * @return the decoded value. If @p value was TQString::null or decoding
+ * failed, TQString::null will be returned
*/
- static QString decodeAttributeValue(const QString &value);
+ static TQString decodeAttributeValue(const TQString &value);
/**
* Parses a comma-separated string of lists, as returned by many signals.
* @param list the comma-separated list
* @return the items as a QStringList
*/
- static QStringList parseCommaList(const QString &list);
+ static TQStringList parseCommaList(const TQString &list);
/**
* Creates a comma-separated string of lists, as required by many functions.
* @param map the items of this list will be converted
* @return the comma-separated list
*/
- static QString createCommaList(const QStringList &values);
+ static TQString createCommaList(const TQStringList &values);
/**
* Escapes a string for use as part of a filter, as described in
@@ -107,7 +107,7 @@ class KServiceLocator : public QObject {
* @param str the string to escape
* @return the escaped string
*/
- static QString escapeFilter(const QString &str);
+ static TQString escapeFilter(const TQString &str);
/**
* Returns true if service location is generally possible.
@@ -120,13 +120,13 @@ class KServiceLocator : public QObject {
* Use this constant for findServiceTypes()'s namingAuthority argument
* to get only services from the default (IANA) naming authority.
*/
- static const QString DEFAULT_AUTHORITY;
+ static const TQString DEFAULT_AUTHORITY;
/**
* Use this constant for findServiceTypes()'s namingAuthority argument
* to get all services,
*/
- static const QString ALL_AUTHORITIES;
+ static const TQString ALL_AUTHORITIES;
/**
* Finds all service types in the given scope with the given naming
@@ -146,12 +146,12 @@ class KServiceLocator : public QObject {
* argument has been omitted all service types
* will be returned.
* @param scopelist a comma-separated list of all scopes that will
- * be searched, or QString:null to search in all
+ * be searched, or TQString:null to search in all
* scopes
* @return true if the operation was successful
*/
- bool findServiceTypes(const QString &namingAuthority = QString::null,
- const QString &scopelist = QString::null);
+ bool findServiceTypes(const TQString &namingAuthority = TQString::null,
+ const TQString &scopelist = TQString::null);
/**
* Finds all services in the given scope with the given service type.
@@ -173,13 +173,13 @@ class KServiceLocator : public QObject {
* @param filter a filter in LDAP Search Filter syntax, as described
* in RFC 2254.
* @param scopelist a comma-separated list of all scopes that will
- * be searched, or QString:null to search in all
+ * be searched, or TQString:null to search in all
* scopes
* @return true if the operation was successful
*/
- bool findServices(const QString &srvtype,
- const QString &filter = QString::null,
- const QString &scopelist = QString::null);
+ bool findServices(const TQString &srvtype,
+ const TQString &filter = TQString::null,
+ const TQString &scopelist = TQString::null);
/**
* Finds the attributes of the service with the given URL.
@@ -193,12 +193,12 @@ class KServiceLocator : public QObject {
*
* @param serviceURL the URL of the service to search
* @param attributeIds a comma-separated list of attributes to
- * retrieve, or QString::null to retrieve all
+ * retrieve, or TQString::null to retrieve all
* attributes
* @return true if the operation was successful
*/
- bool findAttributes(const QString &serviceUrl,
- const QString &attributeIds = QString::null);
+ bool findAttributes(const TQString &serviceUrl,
+ const TQString &attributeIds = TQString::null);
/**
* Finds all scopes that can be searched. Always finds at least
@@ -229,7 +229,7 @@ class KServiceLocator : public QObject {
* types have been discovered.
* @param serviceTypes a comma-separated list of service types
*/
- void foundServiceTypes(QString serviceTypes);
+ void foundServiceTypes(TQString serviceTypes);
/**
* Called by findServices() each time a service has been
@@ -237,7 +237,7 @@ class KServiceLocator : public QObject {
* @param serviceUrl the service url
* @param lifetime the lifetime of the service in seconds
*/
- void foundService(QString serviceUrl,
+ void foundService(TQString serviceUrl,
int lifetime);
/**
@@ -247,15 +247,15 @@ class KServiceLocator : public QObject {
* @param attributes an attribute map (see parseAttributeList() and
* decodeAttributeValue())
*/
- void foundAttributes(QString serviceUrl,
- QString attributes);
+ void foundAttributes(TQString serviceUrl,
+ TQString attributes);
/**
* Called by findScopes() when the scopes have been discovered.
* @param scopeList a list of valid scopes, empty if an error
* occurred
*/
- void foundScopes(QStringList scopeList);
+ void foundScopes(TQStringList scopeList);
/**
@@ -292,15 +292,15 @@ class KServiceLocator : public QObject {
void lastAttributesSignal(bool success);
protected:
- virtual void customEvent(QCustomEvent *);
+ virtual void customEvent(TQCustomEvent *);
private:
- void emitFoundServiceTypes(QString serviceTypes);
- void emitFoundService(QString serviceUrl,
+ void emitFoundServiceTypes(TQString serviceTypes);
+ void emitFoundService(TQString serviceUrl,
int lifetime);
- void emitFoundAttributes(QString serviceUrl,
- QString attributes);
- void emitFoundScopes(QStringList scopeList);
+ void emitFoundAttributes(TQString serviceUrl,
+ TQString attributes);
+ void emitFoundScopes(TQStringList scopeList);
void emitLastServiceTypeSignal(bool success);
void emitLastServiceSignal(bool success);
void emitLastAttributesSignal(bool success);
diff --git a/krdc/main.cpp b/krdc/main.cpp
index 5c2423bd..034643b4 100644
--- a/krdc/main.cpp
+++ b/krdc/main.cpp
@@ -24,11 +24,11 @@
#include <kconfig.h>
#include <kdebug.h>
#include <kwallet.h>
-#include <qwindowdefs.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqwindowdefs.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include "../config.h"
#include "main.h"
@@ -97,16 +97,16 @@ int main(int argc, char *argv[])
KApplication a;
- QString host = QString::null;
+ TQString host = TQString::null;
Quality quality = QUALITY_UNKNOWN;
- QString encodings = QString::null;
- QString password = QString::null;
- QString resolution = QString::null;
- QString keymap = QString::null;
+ TQString encodings = TQString::null;
+ TQString password = TQString::null;
+ TQString resolution = TQString::null;
+ TQString keymap = TQString::null;
WindowMode wm = WINDOW_MODE_AUTO;
bool scale = false;
bool localCursor = kapp->config()->readBoolEntry("alwaysShowLocalCursor", false);
- QSize initialWindowSize;
+ TQSize initialWindowSize;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
@@ -132,25 +132,25 @@ int main(int argc, char *argv[])
encodings = args->getOption("encodings");
if (args->isSet("password-file")) {
- QString passwordFile = args->getOption("password-file");
- QFile f(passwordFile);
+ TQString passwordFile = args->getOption("password-file");
+ TQFile f(passwordFile);
if (!f.open(IO_ReadOnly)) {
KMessageBox::error(0, i18n("The password file '%1' does not exist.").arg(passwordFile));
return 1;
}
- password = QTextStream(&f).readLine();
+ password = TQTextStream(&f).readLine();
f.close();
}
if (args->count() > 0)
host = args->arg(0);
- QString is = a.geometryArgument();
+ TQString is = a.geometryArgument();
if (!is.isNull()) {
- QRegExp re("([0-9]+)[xX]([0-9]+)");
+ TQRegExp re("([0-9]+)[xX]([0-9]+)");
if (!re.exactMatch(is))
args->usage(i18n("Wrong geometry format, must be widthXheight"));
- initialWindowSize = QSize(re.cap(1).toInt(), re.cap(2).toInt());
+ initialWindowSize = TQSize(re.cap(1).toInt(), re.cap(2).toInt());
}
MainController mc(&a, wm, host, quality, encodings, password,
@@ -159,13 +159,13 @@ int main(int argc, char *argv[])
}
MainController::MainController(KApplication *app, WindowMode wm,
- const QString &host,
+ const TQString &host,
Quality quality,
- const QString &encodings,
- const QString &password,
+ const TQString &encodings,
+ const TQString &password,
bool scale,
bool localCursor,
- QSize initialWindowSize) :
+ TQSize initialWindowSize) :
m_windowMode(wm),
m_host(host),
m_encodings(encodings),
@@ -192,7 +192,7 @@ int MainController::main() {
}
void MainController::errorRestartRequested() {
- QTimer::singleShot(0, this, SLOT(errorRestart()));
+ TQTimer::singleShot(0, this, TQT_SLOT(errorRestart()));
}
bool MainController::start() {
@@ -201,10 +201,10 @@ bool MainController::start() {
m_scale, m_localCursor, m_initialWindowSize);
m_app->setMainWidget(m_krdc);
- QObject::connect(m_krdc, SIGNAL(disconnected()),
- m_app, SLOT(quit()));
- connect(m_krdc, SIGNAL(disconnectedError()),
- SLOT(errorRestartRequested()));
+ TQObject::connect(m_krdc, TQT_SIGNAL(disconnected()),
+ m_app, TQT_SLOT(quit()));
+ connect(m_krdc, TQT_SIGNAL(disconnectedError()),
+ TQT_SLOT(errorRestartRequested()));
return m_krdc->start();
}
@@ -212,7 +212,7 @@ bool MainController::start() {
void MainController::errorRestart() {
if (!m_host.isEmpty())
KRDC::setLastHost(m_host);
- m_host = QString::null; // only auto-connect once
+ m_host = TQString::null; // only auto-connect once
// unset KRDC as main widget, to avoid quit on delete
m_app->setMainWidget(0);
diff --git a/krdc/main.h b/krdc/main.h
index d95f079e..6f6e68ba 100644
--- a/krdc/main.h
+++ b/krdc/main.h
@@ -18,36 +18,36 @@
#ifndef MAIN_H
#define MAIN_H
-#include <qobject.h>
+#include <tqobject.h>
#include "krdc.h"
#include "kremoteview.h"
#include "smartptr.h"
class KApplication;
-class MainController : public QObject {
+class MainController : public TQObject {
Q_OBJECT
private:
SmartPtr<KRDC> m_krdc;
WindowMode m_windowMode;
- QString m_host, m_encodings, m_password, m_resolution;
+ TQString m_host, m_encodings, m_password, m_resolution;
bool m_scale;
bool m_localCursor;
- QSize m_initialWindowSize;
- QString m_keymap;
+ TQSize m_initialWindowSize;
+ TQString m_keymap;
Quality m_quality;
KApplication *m_app;
public:
MainController(KApplication *app, WindowMode wm,
- const QString &host,
+ const TQString &host,
Quality quality,
- const QString &encodings,
- const QString &password,
+ const TQString &encodings,
+ const TQString &password,
bool scale,
bool localCursor,
- QSize initialWindowSize);
+ TQSize initialWindowSize);
~MainController();
int main();
bool start();
diff --git a/krdc/maindialog.cpp b/krdc/maindialog.cpp
index c44bf235..c6d559a5 100644
--- a/krdc/maindialog.cpp
+++ b/krdc/maindialog.cpp
@@ -25,7 +25,7 @@
#include <kguiitem.h>
#include <klocale.h>
-MainDialog::MainDialog( QWidget *parent, const char *name )
+MainDialog::MainDialog( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "Remote Desktop Connection" ),
Ok|Close|Help|User1, Ok, true, KGuiItem( i18n( "&Preferences" ),
"configure" ) )
@@ -36,16 +36,16 @@ MainDialog::MainDialog( QWidget *parent, const char *name )
setButtonText( Ok, i18n( "Connect" ) );
enableButtonOK( false );
- connect( m_dialogWidget, SIGNAL( hostValid( bool ) ),
- SLOT( enableButtonOK( bool ) ) );
+ connect( m_dialogWidget, TQT_SIGNAL( hostValid( bool ) ),
+ TQT_SLOT( enableButtonOK( bool ) ) );
}
-void MainDialog::setRemoteHost( const QString &host )
+void MainDialog::setRemoteHost( const TQString &host )
{
m_dialogWidget->setRemoteHost( host );
}
-QString MainDialog::remoteHost()
+TQString MainDialog::remoteHost()
{
return m_dialogWidget->remoteHost();
}
diff --git a/krdc/maindialog.h b/krdc/maindialog.h
index a9a0dd70..79a3c932 100644
--- a/krdc/maindialog.h
+++ b/krdc/maindialog.h
@@ -28,11 +28,11 @@ class MainDialog : public KDialogBase
{
Q_OBJECT
public:
- MainDialog( QWidget *parent, const char *name=0 );
+ MainDialog( TQWidget *parent, const char *name=0 );
~MainDialog() {}
- void setRemoteHost( const QString & );
- QString remoteHost();
+ void setRemoteHost( const TQString & );
+ TQString remoteHost();
protected slots:
virtual void slotOk();
diff --git a/krdc/maindialogwidget.cpp b/krdc/maindialogwidget.cpp
index 076fc2f6..09b0de52 100644
--- a/krdc/maindialogwidget.cpp
+++ b/krdc/maindialogwidget.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kcombobox.h>
#include <kdebug.h>
@@ -32,15 +32,15 @@
#include "hostpreferences.h"
#include "maindialogwidget.h"
-static const QString DEFAULT_SCOPE = "default";
+static const TQString DEFAULT_SCOPE = "default";
class UrlListViewItem : public KListViewItem
{
public:
- UrlListViewItem( QListView *v, const QString &url, const QString &host,
- const QString &protocol, const QString &type, const QString &userid,
- const QString &fullname, const QString &desc,
- const QString &serviceid )
+ UrlListViewItem( TQListView *v, const TQString &url, const TQString &host,
+ const TQString &protocol, const TQString &type, const TQString &userid,
+ const TQString &fullname, const TQString &desc,
+ const TQString &serviceid )
: KListViewItem( v, host, i18n( "unknown" ), host, protocol ),
m_url( url ), m_serviceid( serviceid )
{
@@ -56,33 +56,33 @@ class UrlListViewItem : public KListViewItem
if ( !desc.isNull() )
setText( 0, desc );
if ( ( !userid.isEmpty() ) && ( !fullname.isEmpty() ) )
- setText( 0, QString( "%1 (%2)" ).arg( fullname ).arg( userid ) );
+ setText( 0, TQString( "%1 (%2)" ).arg( fullname ).arg( userid ) );
else if ( !userid.isNull() )
setText( 0, userid );
else if ( !fullname.isNull() )
setText( 0, fullname );
}
- QString url()
+ TQString url()
{
return m_url;
}
- const QString& serviceid() const
+ const TQString& serviceid() const
{
return m_serviceid;
}
protected:
- QString m_url;
- QString m_serviceid;
+ TQString m_url;
+ TQString m_serviceid;
};
-MainDialogWidget::MainDialogWidget( QWidget *parent, const char *name )
+MainDialogWidget::MainDialogWidget( TQWidget *parent, const char *name )
: MainDialogBase( parent, name ),
m_scanning( false )
{
HostPreferences *hp = HostPreferences::instance();
- QStringList list;
+ TQStringList list;
list = hp->serverCompletions();
m_serverInput->completionObject()->setItems( list );
@@ -92,26 +92,26 @@ MainDialogWidget::MainDialogWidget( QWidget *parent, const char *name )
m_searchInput->setTrapReturnKey( true );
connect( m_browsingView,
- SIGNAL( selectionChanged( QListViewItem * ) ),
- SLOT( itemSelected( QListViewItem * ) ) );
+ TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ TQT_SLOT( itemSelected( TQListViewItem * ) ) );
connect( m_browsingView,
- SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int ) ),
- SLOT( itemDoubleClicked( QListViewItem * ) ) );
+ TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int ) ),
+ TQT_SLOT( itemDoubleClicked( TQListViewItem * ) ) );
connect( m_scopeCombo,
- SIGNAL( activated( const QString & ) ),
- SLOT( scopeSelected( const QString & ) ) );
+ TQT_SIGNAL( activated( const TQString & ) ),
+ TQT_SLOT( scopeSelected( const TQString & ) ) );
connect( m_serverInput,
- SIGNAL( returnPressed( const QString & ) ),
- SLOT( rescan() ) );
+ TQT_SIGNAL( returnPressed( const TQString & ) ),
+ TQT_SLOT( rescan() ) );
bool showBrowse = hp->showBrowsingPanel();
enableBrowsingArea( showBrowse );
- m_locator_dnssd = new DNSSD::ServiceBrowser(QStringList::split(',',"_rfb._tcp,_rdp._tcp"),0,DNSSD::ServiceBrowser::AutoResolve);
- connect(m_locator_dnssd,SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),
- SLOT(addedService(DNSSD::RemoteService::Ptr)));
- connect(m_locator_dnssd,SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr)),
- SLOT(removedService(DNSSD::RemoteService::Ptr)));
+ m_locator_dnssd = new DNSSD::ServiceBrowser(TQStringList::split(',',"_rfb._tcp,_rdp._tcp"),0,DNSSD::ServiceBrowser::AutoResolve);
+ connect(m_locator_dnssd,TQT_SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),
+ TQT_SLOT(addedService(DNSSD::RemoteService::Ptr)));
+ connect(m_locator_dnssd,TQT_SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr)),
+ TQT_SLOT(removedService(DNSSD::RemoteService::Ptr)));
m_locator_dnssd->startBrowse();
adjustSize();
@@ -125,7 +125,7 @@ MainDialogWidget::~MainDialogWidget()
void MainDialogWidget::save()
{
HostPreferences *hp = HostPreferences::instance();
- QStringList list;
+ TQStringList list;
m_serverInput->addToHistory( m_serverInput->currentText() );
list = m_serverInput->completionObject()->items();
@@ -136,21 +136,21 @@ void MainDialogWidget::save()
hp->setShowBrowsingPanel( m_browsingPanel->isVisible() );
}
-void MainDialogWidget::setRemoteHost( const QString &host )
+void MainDialogWidget::setRemoteHost( const TQString &host )
{
m_serverInput->setEditText( host );
}
-QString MainDialogWidget::remoteHost()
+TQString MainDialogWidget::remoteHost()
{
return m_serverInput->currentText();
}
-void MainDialogWidget::hostChanged( const QString &text )
+void MainDialogWidget::hostChanged( const TQString &text )
{
- emit hostValid(text.contains(QRegExp(":[0-9]+$")) ||
- text.contains(QRegExp("^vnc:/.+")) ||
- text.contains(QRegExp("^rdp:/.+")));
+ emit hostValid(text.contains(TQRegExp(":[0-9]+$")) ||
+ text.contains(TQRegExp("^vnc:/.+")) ||
+ text.contains(TQRegExp("^rdp:/.+")));
}
void MainDialogWidget::toggleBrowsingArea()
@@ -179,31 +179,31 @@ void MainDialogWidget::enableBrowsingArea( bool enable )
setMinimumSize(minimumSize().width(), (h > 0) ? h : 0);
resize(width(), height()-hOffset);
- QTimer::singleShot( 0, parentWidget(), SLOT( adjustSize() ) );
+ TQTimer::singleShot( 0, parentWidget(), TQT_SLOT( adjustSize() ) );
}
if (enable)
rescan();
}
-void MainDialogWidget::itemSelected( QListViewItem *item )
+void MainDialogWidget::itemSelected( TQListViewItem *item )
{
UrlListViewItem *u = ( UrlListViewItem* ) item;
- QRegExp rx( "^service:remotedesktop\\.kde:([^;]*)" );
+ TQRegExp rx( "^service:remotedesktop\\.kde:([^;]*)" );
if ( rx.search( u->url() ) < 0 )
m_serverInput->setCurrentText( u->url());
else m_serverInput->setCurrentText( rx.cap( 1 ) );
}
-void MainDialogWidget::itemDoubleClicked( QListViewItem *item )
+void MainDialogWidget::itemDoubleClicked( TQListViewItem *item )
{
itemSelected( item );
emit accept();
}
-void MainDialogWidget::scopeSelected( const QString &scope )
+void MainDialogWidget::scopeSelected( const TQString &scope )
{
- QString s = scope;
+ TQString s = scope;
if ( s == i18n( "default" ) )
s = DEFAULT_SCOPE;
@@ -215,7 +215,7 @@ void MainDialogWidget::scopeSelected( const QString &scope )
void MainDialogWidget::rescan()
{
- QStringList scopeList;
+ TQStringList scopeList;
if ( m_scanning )
return;
@@ -227,9 +227,9 @@ void MainDialogWidget::rescan()
m_browsingView->clear();
- QString filter;
+ TQString filter;
if ( !m_searchInput->text().stripWhiteSpace().isEmpty() ) {
- QString ef = KServiceLocator::escapeFilter(
+ TQString ef = KServiceLocator::escapeFilter(
m_searchInput->text().stripWhiteSpace() );
filter = "(|(|(description=*"+ef+"*)(username=*"+ef+"*))(fullname=*"+ef+"*))";
}
@@ -259,12 +259,12 @@ bool MainDialogWidget::ensureLocatorOpen()
return false;
}
- connect( m_locator, SIGNAL( foundService( QString,int ) ),
- SLOT( foundService( QString,int ) ) );
- connect( m_locator, SIGNAL( lastServiceSignal( bool ) ),
- SLOT( lastSignalServices( bool ) ) );
- connect( m_locator, SIGNAL( foundScopes( QStringList ) ),
- SLOT( foundScopes( QStringList ) ) );
+ connect( m_locator, TQT_SIGNAL( foundService( TQString,int ) ),
+ TQT_SLOT( foundService( TQString,int ) ) );
+ connect( m_locator, TQT_SIGNAL( lastServiceSignal( bool ) ),
+ TQT_SLOT( lastSignalServices( bool ) ) );
+ connect( m_locator, TQT_SIGNAL( foundScopes( TQStringList ) ),
+ TQT_SLOT( foundScopes( TQStringList ) ) );
return true;
}
@@ -283,18 +283,18 @@ void MainDialogWidget::finishScanning()
m_scanning = false;
}
-void MainDialogWidget::foundService( QString url, int )
+void MainDialogWidget::foundService( TQString url, int )
{
- QRegExp rx( "^service:remotedesktop\\.kde:(\\w+)://([^;]+);(.*)$" );
+ TQRegExp rx( "^service:remotedesktop\\.kde:(\\w+)://([^;]+);(.*)$" );
if ( rx.search( url ) < 0 )
{
- rx = QRegExp( "^service:remotedesktop\\.kde:(\\w+)://(.*)$" );
+ rx = TQRegExp( "^service:remotedesktop\\.kde:(\\w+)://(.*)$" );
if ( rx.search( url ) < 0 )
return;
}
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
KServiceLocator::parseAttributeList( rx.cap( 3 ), map );
new UrlListViewItem( m_browsingView, url, rx.cap( 2 ), rx.cap( 1 ),
@@ -307,9 +307,9 @@ void MainDialogWidget::foundService( QString url, int )
void MainDialogWidget::addedService( DNSSD::RemoteService::Ptr service )
{
-QString type = service->type().mid(1,3);
+TQString type = service->type().mid(1,3);
if (type == "rfb") type = "vnc";
-QString url = type+"://"+service->hostName()+":"+QString::number(service->port());
+TQString url = type+"://"+service->hostName()+":"+TQString::number(service->port());
new UrlListViewItem( m_browsingView, url, service->serviceName(),
type.upper(),service->textData()["type"],
service->textData()["u"],service->textData()["fullname"],
@@ -318,7 +318,7 @@ new UrlListViewItem( m_browsingView, url, service->serviceName(),
void MainDialogWidget::removedService( DNSSD::RemoteService::Ptr service )
{
- QListViewItemIterator it( m_browsingView );
+ TQListViewItemIterator it( m_browsingView );
while ( it.current() ) {
if ( ((UrlListViewItem*)it.current())->serviceid() == service->serviceName()+service->domain() )
delete it.current();
@@ -342,7 +342,7 @@ void MainDialogWidget::lastSignalServices( bool success )
}
}
-void MainDialogWidget::foundScopes( QStringList scopeList )
+void MainDialogWidget::foundScopes( TQStringList scopeList )
{
int di = scopeList.findIndex( DEFAULT_SCOPE );
if ( di >= 0 )
diff --git a/krdc/maindialogwidget.h b/krdc/maindialogwidget.h
index c1fe5348..4d7918b6 100644
--- a/krdc/maindialogwidget.h
+++ b/krdc/maindialogwidget.h
@@ -32,11 +32,11 @@ class MainDialogWidget : public MainDialogBase
Q_OBJECT
public:
- MainDialogWidget( QWidget *parent, const char *name );
+ MainDialogWidget( TQWidget *parent, const char *name );
~MainDialogWidget();
- void setRemoteHost( const QString & );
- QString remoteHost();
+ void setRemoteHost( const TQString & );
+ TQString remoteHost();
void save();
protected:
@@ -50,22 +50,22 @@ class MainDialogWidget : public MainDialogBase
void accept();
protected slots:
- void hostChanged( const QString & );
+ void hostChanged( const TQString & );
void toggleBrowsingArea();
- void itemSelected( QListViewItem * );
- void itemDoubleClicked( QListViewItem * );
- void scopeSelected( const QString & );
+ void itemSelected( TQListViewItem * );
+ void itemDoubleClicked( TQListViewItem * );
+ void scopeSelected( const TQString & );
void rescan();
- void foundService( QString url, int );
+ void foundService( TQString url, int );
void lastSignalServices( bool success );
- void foundScopes( QStringList scopeList );
+ void foundScopes( TQStringList scopeList );
void addedService( DNSSD::RemoteService::Ptr );
void removedService( DNSSD::RemoteService::Ptr );
protected:
- QString m_scope;
+ TQString m_scope;
bool m_scanning;
SmartPtr<KServiceLocator> m_locator;
DNSSD::ServiceBrowser *m_locator_dnssd;
diff --git a/krdc/preferencesdialog.cpp b/krdc/preferencesdialog.cpp
index 4cdede44..b244c6ff 100644
--- a/krdc/preferencesdialog.cpp
+++ b/krdc/preferencesdialog.cpp
@@ -26,27 +26,27 @@
#include "rdp/krdpview.h"
#include "vnc/kvncview.h"
-#include <qcheckbox.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
#include <klistview.h>
#include <klocale.h>
-PreferencesDialog::PreferencesDialog( QWidget *parent, const char *name )
+PreferencesDialog::PreferencesDialog( TQWidget *parent, const char *name )
: KDialogBase( Tabbed, i18n( "Preferences" ), Ok|Cancel, Ok,
parent, name, true )
{
- QVBox *page;
- QWidget *spacer;
+ TQVBox *page;
+ TQWidget *spacer;
page = addVBoxPage( i18n( "&Host Profiles" ) );
m_hostProfiles = new HostProfiles( page, "m_hostProfiles" );
- connect( m_hostProfiles, SIGNAL( hostDoubleClicked(HostPrefPtr) ), this, SLOT( slotHostDoubleClicked(HostPrefPtr) ));
+ connect( m_hostProfiles, TQT_SIGNAL( hostDoubleClicked(HostPrefPtr) ), this, TQT_SLOT( slotHostDoubleClicked(HostPrefPtr) ));
page = addVBoxPage( i18n( "&VNC Defaults" ) );
m_vncPrefs = new VncPrefs( page, "m_vncPrefs" );
- spacer = new QWidget( page );
+ spacer = new TQWidget( page );
page->setStretchFactor( spacer, 10 );
m_vncPrefs->cbShowPrefs->setText( i18n( "Do not &show the preferences "
@@ -54,7 +54,7 @@ PreferencesDialog::PreferencesDialog( QWidget *parent, const char *name )
page = addVBoxPage( i18n( "RD&P Defaults" ) );
m_rdpPrefs = new RdpPrefs( page, "m_rdpPrefs" );
- spacer = new QWidget( page );
+ spacer = new TQWidget( page );
page->setStretchFactor( spacer, 10 );
m_rdpPrefs->cbShowPrefs->setText( i18n( "Do not &show the preferences "
diff --git a/krdc/preferencesdialog.h b/krdc/preferencesdialog.h
index b379d0ec..46e79024 100644
--- a/krdc/preferencesdialog.h
+++ b/krdc/preferencesdialog.h
@@ -35,7 +35,7 @@ class PreferencesDialog : public KDialogBase
Q_OBJECT
public:
- PreferencesDialog( QWidget *parent, const char *name=0 );
+ PreferencesDialog( TQWidget *parent, const char *name=0 );
~PreferencesDialog() {};
protected slots:
diff --git a/krdc/rdp/krdpview.cpp b/krdc/rdp/krdpview.cpp
index 3415ae14..2fdbdab8 100644
--- a/krdc/rdp/krdpview.cpp
+++ b/krdc/rdp/krdpview.cpp
@@ -27,7 +27,7 @@
#include <kwallet.h>
#include <kpassdlg.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include <qxembed.h>
#include <X11/Xlib.h>
@@ -45,7 +45,7 @@ extern KWallet::Wallet *wallet;
static KRdpView *krdpview;
-RdpContainer::RdpContainer(QWidget *parent, const char *name, WFlags f) :
+RdpContainer::RdpContainer(TQWidget *parent, const char *name, WFlags f) :
QXEmbed(parent, name, f),
m_viewOnly(false)
{
@@ -82,11 +82,11 @@ bool RdpContainer::x11Event(XEvent *e)
// constructor
-KRdpView::KRdpView(QWidget *parent, const char *name,
- const QString &host, int port,
- const QString &user, const QString &password,
- int flags, const QString &domain,
- const QString &shell, const QString &directory) :
+KRdpView::KRdpView(TQWidget *parent, const char *name,
+ const TQString &host, int port,
+ const TQString &user, const TQString &password,
+ int flags, const TQString &domain,
+ const TQString &shell, const TQString &directory) :
KRemoteView(parent, name, Qt::WResizeNoErase | Qt::WRepaintNoErase | Qt::WStaticContents),
m_name(name),
m_host(host),
@@ -118,13 +118,13 @@ KRdpView::~KRdpView()
}
// returns the size of the framebuffer
-QSize KRdpView::framebufferSize()
+TQSize KRdpView::framebufferSize()
{
return m_container->sizeHint();
}
// returns the suggested size
-QSize KRdpView::sizeHint()
+TQSize KRdpView::sizeHint()
{
return maximumSize();
}
@@ -146,7 +146,7 @@ bool KRdpView::isQuitting()
}
// return the host we're connected to
-QString KRdpView::host()
+TQString KRdpView::host()
{
return m_host;
}
@@ -164,7 +164,7 @@ bool KRdpView::editPreferences( HostPrefPtr host )
int wv = hp->width();
int hv = hp->height();
int cd = hp->colorDepth();
- QString kl = hp->layout();
+ TQString kl = hp->layout();
bool kwallet = hp->useKWallet();
// show preferences dialog
@@ -172,9 +172,9 @@ bool KRdpView::editPreferences( HostPrefPtr host )
i18n( "RDP Host Preferences for %1" ).arg( host->host() ),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true );
- QVBox *vbox = dlg->makeVBoxMainWidget();
+ TQVBox *vbox = dlg->makeVBoxMainWidget();
RdpPrefs *prefs = new RdpPrefs( vbox );
- QWidget *spacer = new QWidget( vbox );
+ TQWidget *spacer = new TQWidget( vbox );
vbox->setStretchFactor( spacer, 10 );
prefs->setRdpWidth( wv );
@@ -185,7 +185,7 @@ bool KRdpView::editPreferences( HostPrefPtr host )
prefs->setShowPrefs( true );
prefs->setUseKWallet(kwallet);
- if ( dlg->exec() == QDialog::Rejected )
+ if ( dlg->exec() == TQDialog::Rejected )
return false;
wv = prefs->rdpWidth();
@@ -209,7 +209,7 @@ bool KRdpView::start()
SmartPtr<RdpHostPref> hp, rdpDefaults;
bool useKWallet = false;
- QWidget *desktop = QApplication::desktop();
+ TQWidget *desktop = TQApplication::desktop();
if(!rdpAppDataConfigured)
{
@@ -233,21 +233,21 @@ bool KRdpView::start()
// Check for fullscreen mode
if ((hp->width() == 0) && (hp->height() == 0)) {
launch_Fullscreen_rdp = true;
- *m_process << "-g" << (QString::number(desktop->width()) + "x" + QString::number((desktop->height()-2)));
+ *m_process << "-g" << (TQString::number(desktop->width()) + "x" + TQString::number((desktop->height()-2)));
}
else {
if ((hp->height() > (desktop->height()-2)) && (hp->height() <= (desktop->height()))) {
- *m_process << "-g" << (QString::number(hp->width()) + "x" + QString::number(desktop->height()-2));
+ *m_process << "-g" << (TQString::number(hp->width()) + "x" + TQString::number(desktop->height()-2));
}
else {
- *m_process << "-g" << (QString::number(hp->width()) + "x" + QString::number(hp->height()));
+ *m_process << "-g" << (TQString::number(hp->width()) + "x" + TQString::number(hp->height()));
}
}
*m_process << "-k" << hp->layout();
if(!m_user.isEmpty()) { *m_process << "-u" << m_user; }
if(m_password.isEmpty() && useKWallet ) {
- QString krdc_folder = "KRDC-RDP";
+ TQString krdc_folder = "KRDC-RDP";
// Bugfix: Check if wallet has been closed by an outside source
if ( wallet && !wallet->isOpen() ) {
@@ -256,7 +256,7 @@ bool KRdpView::start()
// Do we need to open the wallet?
if ( !wallet ) {
- QString walletName = KWallet::Wallet::NetworkWallet();
+ TQString walletName = KWallet::Wallet::NetworkWallet();
wallet = KWallet::Wallet::openWallet(walletName);
}
@@ -275,7 +275,7 @@ bool KRdpView::start()
if ( m_password.isEmpty() ) {
//There must not be an existing entry. Let's make one.
- QCString newPassword;
+ TQCString newPassword;
if (KPasswordDialog::getPassword(newPassword, i18n("Please enter the password.")) == KPasswordDialog::Accepted) {
m_password = newPassword;
wallet->writePassword(m_host, m_password);
@@ -288,13 +288,13 @@ bool KRdpView::start()
*m_process << "-p" << m_password;
}
- *m_process << "-X" << ("0x" + QString::number(m_container->winId(), 16));
- *m_process << "-a" << QString::number(hp->colorDepth());
- *m_process << (m_host + ":" + QString::number(m_port));
- connect(m_process, SIGNAL(processExited(KProcess *)), SLOT(processDied(KProcess *)));
- connect(m_process, SIGNAL(receivedStderr(KProcess *, char *, int)), SLOT(receivedStderr(KProcess *, char *, int)));
- connect(m_container, SIGNAL(embeddedWindowDestroyed()), SLOT(connectionClosed()));
- connect(m_container, SIGNAL(newEmbeddedWindow(WId)), SLOT(connectionOpened(WId)));
+ *m_process << "-X" << ("0x" + TQString::number(m_container->winId(), 16));
+ *m_process << "-a" << TQString::number(hp->colorDepth());
+ *m_process << (m_host + ":" + TQString::number(m_port));
+ connect(m_process, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(processDied(KProcess *)));
+ connect(m_process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), TQT_SLOT(receivedStderr(KProcess *, char *, int)));
+ connect(m_container, TQT_SIGNAL(embeddedWindowDestroyed()), TQT_SLOT(connectionClosed()));
+ connect(m_container, TQT_SIGNAL(newEmbeddedWindow(WId)), TQT_SLOT(connectionOpened(WId)));
qDebug("Color depth: %d", hp->colorDepth());
if(!m_process->start(KProcess::NotifyOnExit, KProcess::Stderr))
{
@@ -340,7 +340,7 @@ void KRdpView::setViewOnly(bool s)
void KRdpView::connectionOpened(WId /*window*/)
{
- QSize size = m_container->sizeHint();
+ TQSize size = m_container->sizeHint();
setStatus(REMOTE_VIEW_CONNECTED);
setFixedSize(size);
@@ -373,8 +373,8 @@ void KRdpView::processDied(KProcess */*proc*/)
void KRdpView::receivedStderr(KProcess */*proc*/, char *buffer, int /*buflen*/)
{
- QString output(buffer);
- QString line;
+ TQString output(buffer);
+ TQString line;
int i = 0;
while(!(line = output.section('\n', i, i)).isEmpty())
{
diff --git a/krdc/rdp/krdpview.h b/krdc/rdp/krdpview.h
index 029336f2..b115bd18 100644
--- a/krdc/rdp/krdpview.h
+++ b/krdc/rdp/krdpview.h
@@ -38,7 +38,7 @@ class RdpContainer : public QXEmbed
friend class KRdpView;
public:
- RdpContainer(QWidget *parent = 0, const char *name = 0, WFlags f = 0);
+ RdpContainer(TQWidget *parent = 0, const char *name = 0, WFlags f = 0);
~RdpContainer();
signals:
@@ -58,23 +58,23 @@ class KRdpView : public KRemoteView
public:
// constructor and destructor
- KRdpView(QWidget *parent = 0, const char *name = 0,
- const QString &host = QString::null, int port = TCP_PORT_RDP,
- const QString &user = QString::null, const QString &password = QString::null,
- int flags = RDP_LOGON_NORMAL, const QString &domain = QString::null,
- const QString &shell = QString::null, const QString &directory = QString::null);
+ KRdpView(TQWidget *parent = 0, const char *name = 0,
+ const TQString &host = TQString::null, int port = TCP_PORT_RDP,
+ const TQString &user = TQString::null, const TQString &password = TQString::null,
+ int flags = RDP_LOGON_NORMAL, const TQString &domain = TQString::null,
+ const TQString &shell = TQString::null, const TQString &directory = TQString::null);
virtual ~KRdpView();
// functions regarding the window
- virtual QSize framebufferSize(); // returns the size of the remote view
- QSize sizeHint(); // returns the suggested size
+ virtual TQSize framebufferSize(); // returns the size of the remote view
+ TQSize sizeHint(); // returns the suggested size
virtual bool viewOnly();
virtual bool startFullscreen();
// functions regarding the connection
virtual void startQuitting(); // start closing the connection
virtual bool isQuitting(); // are we currently closing the connection?
- virtual QString host(); // return the host we're connected to
+ virtual TQString host(); // return the host we're connected to
virtual int port(); // return the port number we're connected on
virtual bool start(); // open a connection
@@ -87,19 +87,19 @@ class KRdpView : public KRemoteView
private:
// properties used for setting up the connection
- QString m_name; // name of the connection
- QString m_host; // the host to connect to
+ TQString m_name; // name of the connection
+ TQString m_host; // the host to connect to
int m_port; // the port on the host
- QString m_user; // the user to use to log in
- QString m_password; // the password to use
+ TQString m_user; // the user to use to log in
+ TQString m_password; // the password to use
int m_flags; // flags which determine how the connection is set up
- QString m_domain; // the domain where the host is on
- QString m_shell; // the shell to use
- QString m_directory; // the working directory on the server
+ TQString m_domain; // the domain where the host is on
+ TQString m_shell; // the shell to use
+ TQString m_directory; // the working directory on the server
// other properties
bool m_quitFlag; // if set: die
- QString m_clientVersion; // version number returned by rdesktop
+ TQString m_clientVersion; // version number returned by rdesktop
RdpContainer *m_container; // container for the rdesktop window
KProcess *m_process; // rdesktop process
diff --git a/krdc/rdp/rdphostpref.cpp b/krdc/rdp/rdphostpref.cpp
index d3854eb5..ba876146 100644
--- a/krdc/rdp/rdphostpref.cpp
+++ b/krdc/rdp/rdphostpref.cpp
@@ -21,9 +21,9 @@
#include <kconfig.h>
#include <klocale.h>
-const QString RdpHostPref::RdpType = "RDP";
+const TQString RdpHostPref::RdpType = "RDP";
-RdpHostPref::RdpHostPref(KConfig *conf, const QString &host, const QString &type) :
+RdpHostPref::RdpHostPref(KConfig *conf, const TQString &host, const TQString &type) :
HostPref(conf, host, type),
m_width(0),
m_height(0),
@@ -43,7 +43,7 @@ void RdpHostPref::save()
if ( !m_host.isEmpty() && !m_type.isEmpty() )
{
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_config->writeEntry(p+"exists", true);
m_config->writeEntry(p+"width", m_width);
m_config->writeEntry(p+"height", m_height);
@@ -69,7 +69,7 @@ void RdpHostPref::load()
if ( !m_host.isEmpty() && !m_type.isEmpty() )
{
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_width = m_config->readNumEntry(p+"width", 0);
m_height = m_config->readNumEntry(p+"height", 0);
m_colorDepth = m_config->readNumEntry(p+"colorDepth", 24);
@@ -86,7 +86,7 @@ void RdpHostPref::load()
void RdpHostPref::remove()
{
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_config->deleteEntry(p+"exists");
m_config->deleteEntry(p+"width");
m_config->deleteEntry(p+"height");
@@ -107,7 +107,7 @@ void RdpHostPref::setDefaults()
m_useKWallet = m_config->readBoolEntry("rdpUseKWallet", true);
}
-QString RdpHostPref::prefDescription() const
+TQString RdpHostPref::prefDescription() const
{
return i18n("Show Preferences: %1, Resolution: %2x%3, Color Depth: %4, Keymap: %5, KWallet: %6")
.arg(m_askOnConnect ? i18n("yes") : i18n("no")).arg(m_width).arg(m_height)
@@ -148,13 +148,13 @@ int RdpHostPref::colorDepth() const
}
-void RdpHostPref::setLayout(const QString &l)
+void RdpHostPref::setLayout(const TQString &l)
{
m_layout = l;
save();
}
-QString RdpHostPref::layout() const
+TQString RdpHostPref::layout() const
{
return m_layout;
}
diff --git a/krdc/rdp/rdphostpref.h b/krdc/rdp/rdphostpref.h
index bf96da02..6044f261 100644
--- a/krdc/rdp/rdphostpref.h
+++ b/krdc/rdp/rdphostpref.h
@@ -22,7 +22,7 @@
#include "hostpreferences.h"
-static const QString rdpKeymaps[] = { "ar",
+static const TQString rdpKeymaps[] = { "ar",
"cs",
"da",
"de",
@@ -58,7 +58,7 @@ static const QString rdpKeymaps[] = { "ar",
static const int rdpNumKeymaps = 33;
static const int rdpDefaultKeymap = 6; // en-us
-inline int keymap2int(const QString &keymap)
+inline int keymap2int(const TQString &keymap)
{
int layout;
for(layout = 0; layout < rdpNumKeymaps; layout++)
@@ -75,7 +75,7 @@ inline int keymap2int(const QString &keymap)
return layout;
}
-inline QString int2keymap(int layout)
+inline TQString int2keymap(int layout)
{
if(layout < 0 || layout >= rdpNumKeymaps)
{
@@ -93,7 +93,7 @@ class RdpHostPref : public HostPref
int m_width;
int m_height;
int m_colorDepth;
- QString m_layout;
+ TQString m_layout;
bool m_askOnConnect;
bool m_useKWallet;
@@ -103,21 +103,21 @@ class RdpHostPref : public HostPref
virtual void remove();
public:
- static const QString RdpType;
+ static const TQString RdpType;
- RdpHostPref(KConfig *conf, const QString &host=QString::null,
- const QString &type=QString::null);
+ RdpHostPref(KConfig *conf, const TQString &host=TQString::null,
+ const TQString &type=TQString::null);
virtual ~RdpHostPref();
- virtual QString prefDescription() const;
+ virtual TQString prefDescription() const;
void setWidth(int w);
int width() const;
void setHeight(int h);
int height() const;
void setColorDepth(int depth);
int colorDepth() const;
- void setLayout(const QString &l);
- QString layout() const;
+ void setLayout(const TQString &l);
+ TQString layout() const;
void setAskOnConnect(bool ask);
bool askOnConnect() const;
bool useKWallet() const;
diff --git a/krdc/smartptr.h b/krdc/smartptr.h
index d80f258e..49fa25c2 100644
--- a/krdc/smartptr.h
+++ b/krdc/smartptr.h
@@ -16,7 +16,7 @@
#ifndef SMARTPTR_H
#define SMARTPTR_H
-#include <qstring.h>
+#include <tqstring.h>
class WeakPtr;
@@ -416,7 +416,7 @@ public:
* Returns a string representation of the pointer.
* @return a string representation
*/
- QString toString() const {
+ TQString toString() const {
int objrcount = 1;
int rcrcount = 0;
@@ -424,7 +424,7 @@ public:
objrcount = rc->refsToObject;
rcrcount = rc->refsToThis;
}
- return QString("SmartPtr: ptr=%1, refcounts=%2, ptrnum=%3")
+ return TQString("SmartPtr: ptr=%1, refcounts=%2, ptrnum=%3")
.arg((int)ptr).arg(objrcount).arg(rcrcount);
}
diff --git a/krdc/vnc/kvncview.cpp b/krdc/vnc/kvncview.cpp
index f734845b..8050a68b 100644
--- a/krdc/vnc/kvncview.cpp
+++ b/krdc/vnc/kvncview.cpp
@@ -28,13 +28,13 @@
#include <kdialogbase.h>
#include <kwallet.h>
-#include <qdatastream.h>
+#include <tqdatastream.h>
#include <dcopclient.h>
-#include <qclipboard.h>
-#include <qbitmap.h>
-#include <qmutex.h>
-#include <qvbox.h>
-#include <qwaitcondition.h>
+#include <tqclipboard.h>
+#include <tqbitmap.h>
+#include <tqmutex.h>
+#include <tqvbox.h>
+#include <tqwaitcondition.h>
#include "vncviewer.h"
@@ -57,21 +57,21 @@ static KVncView *kvncview;
//Passwords and KWallet data
extern KWallet::Wallet *wallet;
bool useKWallet = false;
-static QCString password;
-static QMutex passwordLock;
-static QWaitCondition passwordWaiter;
+static TQCString password;
+static TQMutex passwordLock;
+static TQWaitCondition passwordWaiter;
const unsigned int MAX_SELECTION_LENGTH = 4096;
-KVncView::KVncView(QWidget *parent,
+KVncView::KVncView(TQWidget *parent,
const char *name,
- const QString &_host,
+ const TQString &_host,
int _port,
- const QString &_password,
+ const TQString &_password,
Quality quality,
DotCursorState dotCursorState,
- const QString &encodings) :
+ const TQString &encodings) :
KRemoteView(parent, name, Qt::WResizeNoErase | Qt::WRepaintNoErase | Qt::WStaticContents),
m_cthread(this, m_wthread, m_quitFlag),
m_wthread(this, m_quitFlag),
@@ -90,18 +90,18 @@ KVncView::KVncView(QWidget *parent,
password = _password.latin1();
dpy = qt_xdisplay();
setFixedSize(16,16);
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
- m_cb = QApplication::clipboard();
- connect(m_cb, SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));
- connect(m_cb, SIGNAL(dataChanged()), this, SLOT(clipboardChanged()));
+ m_cb = TQApplication::clipboard();
+ connect(m_cb, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged()));
+ connect(m_cb, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clipboardChanged()));
KStandardDirs *dirs = KGlobal::dirs();
- QBitmap cursorBitmap(dirs->findResource("appdata",
+ TQBitmap cursorBitmap(dirs->findResource("appdata",
"pics/pointcursor.png"));
- QBitmap cursorMask(dirs->findResource("appdata",
+ TQBitmap cursorMask(dirs->findResource("appdata",
"pics/pointcursormask.png"));
- m_cursor = QCursor(cursorBitmap, cursorMask);
+ m_cursor = TQCursor(cursorBitmap, cursorMask);
if ((quality != QUALITY_UNKNOWN) ||
!encodings.isNull())
@@ -126,18 +126,18 @@ void KVncView::showDotCursorInternal() {
setCursor(m_cursor);
break;
case DOT_CURSOR_OFF:
- setCursor(QCursor(Qt::BlankCursor));
+ setCursor(TQCursor(Qt::BlankCursor));
break;
case DOT_CURSOR_AUTO:
if (m_enableClientCursor)
- setCursor(QCursor(Qt::BlankCursor));
+ setCursor(TQCursor(Qt::BlankCursor));
else
setCursor(m_cursor);
break;
}
}
-QString KVncView::host() {
+TQString KVncView::host() {
return m_host;
}
@@ -155,7 +155,7 @@ bool KVncView::isQuitting() {
return m_quitFlag;
}
-void KVncView::configureApp(Quality q, const QString specialEncodings) {
+void KVncView::configureApp(Quality q, const TQString specialEncodings) {
appDataConfigured = true;
appData.shareDesktop = 1;
appData.viewOnly = 0;
@@ -203,17 +203,17 @@ bool KVncView::checkLocalKRfb() {
DCOPClient *d = KApplication::dcopClient();
int portNum;
- QByteArray sdata, rdata;
- QCString replyType;
- QDataStream arg(sdata, IO_WriteOnly);
- arg << QString("krfb");
- if (!d->call ("kded", "kinetd", "port(QString)", sdata, replyType, rdata))
+ TQByteArray sdata, rdata;
+ TQCString replyType;
+ TQDataStream arg(sdata, IO_WriteOnly);
+ arg << TQString("krfb");
+ if (!d->call ("kded", "kinetd", "port(TQString)", sdata, replyType, rdata))
return true;
if (replyType != "int")
return true;
- QDataStream answer(rdata, IO_ReadOnly);
+ TQDataStream answer(rdata, IO_ReadOnly);
answer >> portNum;
if (m_port != portNum)
@@ -239,16 +239,16 @@ bool KVncView::editPreferences( HostPrefPtr host )
i18n( "VNC Host Preferences for %1" ).arg( host->host() ),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true );
- QVBox *vbox = dlg->makeVBoxMainWidget();
+ TQVBox *vbox = dlg->makeVBoxMainWidget();
VncPrefs *prefs = new VncPrefs( vbox );
- QWidget *spacer = new QWidget( vbox );
+ TQWidget *spacer = new TQWidget( vbox );
vbox->setStretchFactor( spacer, 10 );
prefs->setQuality( ci );
prefs->setShowPrefs(true);
prefs->setUseKWallet(kwallet);
- if ( dlg->exec() == QDialog::Rejected )
+ if ( dlg->exec() == TQDialog::Rejected )
return false;
ci = prefs->quality();
@@ -331,7 +331,7 @@ bool KVncView::startFullscreen()
return launch_Fullscreen_vnc;
}
-QSize KVncView::framebufferSize() {
+TQSize KVncView::framebufferSize() {
return m_framebufferSize;
}
@@ -358,7 +358,7 @@ void KVncView::enableScaling(bool s) {
}
}
-void KVncView::paintEvent(QPaintEvent *e) {
+void KVncView::paintEvent(TQPaintEvent *e) {
drawRegion(e->rect().x(),
e->rect().y(),
e->rect().width(),
@@ -373,7 +373,7 @@ void KVncView::drawRegion(int x, int y, int w, int h) {
DrawScreenRegionX11Thread(winId(), x, y, w, h);
}
-void KVncView::customEvent(QCustomEvent *e)
+void KVncView::customEvent(TQCustomEvent *e)
{
if (e->type() == ScreenRepaintEventType) {
ScreenRepaintEvent *sre = (ScreenRepaintEvent*) e;
@@ -381,7 +381,7 @@ void KVncView::customEvent(QCustomEvent *e)
}
else if (e->type() == ScreenResizeEventType) {
ScreenResizeEvent *sre = (ScreenResizeEvent*) e;
- m_framebufferSize = QSize(sre->width(), sre->height());
+ m_framebufferSize = TQSize(sre->width(), sre->height());
setFixedSize(m_framebufferSize);
emit changeSize(sre->width(), sre->height());
}
@@ -412,7 +412,7 @@ void KVncView::customEvent(QCustomEvent *e)
emit showingPasswordDialog(true);
if (KPasswordDialog::getPassword(password, i18n("Access to the system requires a password.")) != KPasswordDialog::Accepted)
- password = QCString();
+ password = TQCString();
emit showingPasswordDialog(false);
@@ -421,7 +421,7 @@ void KVncView::customEvent(QCustomEvent *e)
passwordLock.unlock();
}
else if (e->type() == WalletOpenEventType) {
- QString krdc_folder = "KRDC-VNC";
+ TQString krdc_folder = "KRDC-VNC";
emit showingPasswordDialog(true); //Bad things happen if you don't do this.
// Bugfix: Check if wallet has been closed by an outside source
@@ -431,7 +431,7 @@ void KVncView::customEvent(QCustomEvent *e)
// Do we need to open the wallet?
if ( !wallet ) {
- QString walletName = KWallet::Wallet::NetworkWallet();
+ TQString walletName = KWallet::Wallet::NetworkWallet();
wallet = KWallet::Wallet::openWallet(walletName);
}
@@ -443,7 +443,7 @@ void KVncView::customEvent(QCustomEvent *e)
if (walletOK == true) {
wallet->setFolder(krdc_folder);
- QString newPass;
+ TQString newPass;
if ( wallet->hasEntry(kvncview->host()) && !wallet->readPassword(kvncview->host(), newPass) ) {
password=newPass.latin1();
}
@@ -508,11 +508,11 @@ void KVncView::customEvent(QCustomEvent *e)
emit disconnectedError();
}
else if (e->type() == BeepEventType) {
- QApplication::beep();
+ TQApplication::beep();
}
else if (e->type() == ServerCutEventType) {
ServerCutEvent *sce = (ServerCutEvent*) e;
- QString ctext = QString::fromUtf8(sce->bytes(), sce->length());
+ TQString ctext = TQString::fromUtf8(sce->bytes(), sce->length());
m_dontSendCb = true;
m_cb->setText(ctext, QClipboard::Clipboard);
m_cb->setText(ctext, QClipboard::Selection);
@@ -527,15 +527,15 @@ void KVncView::customEvent(QCustomEvent *e)
}
}
-void KVncView::mouseEvent(QMouseEvent *e) {
+void KVncView::mouseEvent(TQMouseEvent *e) {
if (m_status != REMOTE_VIEW_CONNECTED)
return;
if (m_viewOnly)
return;
- if ( e->type() != QEvent::MouseMove ) {
- if ( (e->type() == QEvent::MouseButtonPress) ||
- (e->type() == QEvent::MouseButtonDblClick)) {
+ if ( e->type() != TQEvent::MouseMove ) {
+ if ( (e->type() == TQEvent::MouseButtonPress) ||
+ (e->type() == TQEvent::MouseButtonDblClick)) {
if ( e->button() & LeftButton )
m_buttonMask |= 0x01;
if ( e->button() & MidButton )
@@ -543,7 +543,7 @@ void KVncView::mouseEvent(QMouseEvent *e) {
if ( e->button() & RightButton )
m_buttonMask |= 0x04;
}
- else if ( e->type() == QEvent::MouseButtonRelease ) {
+ else if ( e->type() == TQEvent::MouseButtonRelease ) {
if ( e->button() & LeftButton )
m_buttonMask &= 0xfe;
if ( e->button() & MidButton )
@@ -566,27 +566,27 @@ void KVncView::mouseEvent(QMouseEvent *e) {
DrawCursorX11Thread(x, y); // in rfbproto.c
}
-void KVncView::mousePressEvent(QMouseEvent *e) {
+void KVncView::mousePressEvent(TQMouseEvent *e) {
mouseEvent(e);
e->accept();
}
-void KVncView::mouseDoubleClickEvent(QMouseEvent *e) {
+void KVncView::mouseDoubleClickEvent(TQMouseEvent *e) {
mouseEvent(e);
e->accept();
}
-void KVncView::mouseReleaseEvent(QMouseEvent *e) {
+void KVncView::mouseReleaseEvent(TQMouseEvent *e) {
mouseEvent(e);
e->accept();
}
-void KVncView::mouseMoveEvent(QMouseEvent *e) {
+void KVncView::mouseMoveEvent(TQMouseEvent *e) {
mouseEvent(e);
e->ignore();
}
-void KVncView::wheelEvent(QWheelEvent *e) {
+void KVncView::wheelEvent(TQWheelEvent *e) {
if (m_status != REMOTE_VIEW_CONNECTED)
return;
if (m_viewOnly)
@@ -643,7 +643,7 @@ bool KVncView::x11Event(XEvent *e) {
else if (e->type == KeyRelease)
pressed = false;
else
- return QWidget::x11Event(e);
+ return TQWidget::x11Event(e);
if (!m_viewOnly) {
unsigned int s = KKeyNative(e).sym();
@@ -670,8 +670,8 @@ bool KVncView::x11Event(XEvent *e) {
}
void KVncView::unpressModifiers() {
- QValueList<unsigned int> keys = m_mods.keys();
- QValueList<unsigned int>::const_iterator it = keys.begin();
+ TQValueList<unsigned int> keys = m_mods.keys();
+ TQValueList<unsigned int>::const_iterator it = keys.begin();
while (it != keys.end()) {
m_wthread.queueKeyEvent(*it, false);
it++;
@@ -679,11 +679,11 @@ void KVncView::unpressModifiers() {
m_mods.clear();
}
-void KVncView::focusOutEvent(QFocusEvent *) {
+void KVncView::focusOutEvent(TQFocusEvent *) {
unpressModifiers();
}
-QSize KVncView::sizeHint() {
+TQSize KVncView::sizeHint() {
return maximumSize();
}
@@ -702,7 +702,7 @@ void KVncView::clipboardChanged() {
if (m_cb->ownsClipboard() || m_dontSendCb)
return;
- QString text = m_cb->text(QClipboard::Clipboard);
+ TQString text = m_cb->text(QClipboard::Clipboard);
if (text.length() > MAX_SELECTION_LENGTH)
return;
@@ -716,7 +716,7 @@ void KVncView::selectionChanged() {
if (m_cb->ownsSelection() || m_dontSendCb)
return;
- QString text = m_cb->text(QClipboard::Selection);
+ TQString text = m_cb->text(QClipboard::Selection);
if (text.length() > MAX_SELECTION_LENGTH)
return;
@@ -765,14 +765,14 @@ int getPassword(char *passwd, int pwlen) {
//Try #2: Is there something in the wallet?
if ( !retV && useKWallet ) {
- QApplication::postEvent(kvncview, new WalletOpenEvent());
+ TQApplication::postEvent(kvncview, new WalletOpenEvent());
passwordWaiter.wait(&passwordLock); //block
if (!password.isNull()) retV = 1; //got it!
}
//Last try: Ask the user
if (!retV) {
- QApplication::postEvent(kvncview, new PasswordRequiredEvent());
+ TQApplication::postEvent(kvncview, new PasswordRequiredEvent());
passwordWaiter.wait(&passwordLock); //block
if (!password.isNull()) retV = 1; //got it!
}
@@ -800,7 +800,7 @@ extern void DrawScreenRegion(int x, int y, int width, int height) {
kvncview->drawRegion(x, y, width, height);
KApplication::kApplication()->unlock();
*/
- QApplication::postEvent(kvncview, new ScreenRepaintEvent(x, y, width, height));
+ TQApplication::postEvent(kvncview, new ScreenRepaintEvent(x, y, width, height));
}
// call only from x11 thread!
@@ -821,15 +821,15 @@ extern void UnlockFramebuffer() {
}
extern void beep() {
- QApplication::postEvent(kvncview, new BeepEvent());
+ TQApplication::postEvent(kvncview, new BeepEvent());
}
extern void newServerCut(char *bytes, int length) {
- QApplication::postEvent(kvncview, new ServerCutEvent(bytes, length));
+ TQApplication::postEvent(kvncview, new ServerCutEvent(bytes, length));
}
extern void postMouseEvent(int x, int y, int buttonMask) {
- QApplication::postEvent(kvncview, new MouseStateEvent(x, y, buttonMask));
+ TQApplication::postEvent(kvncview, new MouseStateEvent(x, y, buttonMask));
}
#include "kvncview.moc"
diff --git a/krdc/vnc/kvncview.h b/krdc/vnc/kvncview.h
index c0f9fba3..a9de2378 100644
--- a/krdc/vnc/kvncview.h
+++ b/krdc/vnc/kvncview.h
@@ -19,8 +19,8 @@
#define KVNCVIEW_H
#include "kremoteview.h"
-#include <qcursor.h>
-#include <qmap.h>
+#include <tqcursor.h>
+#include <tqmap.h>
#include "pointerlatencyometer.h"
#include "hostpreferences.h"
@@ -36,54 +36,54 @@ private:
ControllerThread m_cthread;
WriterThread m_wthread;
volatile bool m_quitFlag; // if set: all threads should die ASAP
- QMutex m_framebufferLock;
+ TQMutex m_framebufferLock;
bool m_enableFramebufferLocking;
bool m_enableClientCursor;
- QSize m_framebufferSize;
+ TQSize m_framebufferSize;
bool m_scaling;
bool m_remoteMouseTracking;
bool m_viewOnly;
int m_buttonMask;
- QMap<unsigned int,bool> m_mods;
+ TQMap<unsigned int,bool> m_mods;
- QString m_host;
+ TQString m_host;
int m_port;
QClipboard *m_cb;
bool m_dontSendCb;
- QCursor m_cursor;
+ TQCursor m_cursor;
DotCursorState m_cursorState;
PointerLatencyOMeter m_plom;
- void mouseEvent(QMouseEvent*);
- unsigned long toKeySym(QKeyEvent *k);
+ void mouseEvent(TQMouseEvent*);
+ unsigned long toKeySym(TQKeyEvent *k);
bool checkLocalKRfb();
- void paintMessage(const QString &msg);
+ void paintMessage(const TQString &msg);
void showDotCursorInternal();
void unpressModifiers();
protected:
- void paintEvent(QPaintEvent*);
- void customEvent(QCustomEvent*);
- void mousePressEvent(QMouseEvent*);
- void mouseDoubleClickEvent(QMouseEvent*);
- void mouseReleaseEvent(QMouseEvent*);
- void mouseMoveEvent(QMouseEvent*);
- void wheelEvent(QWheelEvent *);
- void focusOutEvent(QFocusEvent *);
+ void paintEvent(TQPaintEvent*);
+ void customEvent(TQCustomEvent*);
+ void mousePressEvent(TQMouseEvent*);
+ void mouseDoubleClickEvent(TQMouseEvent*);
+ void mouseReleaseEvent(TQMouseEvent*);
+ void mouseMoveEvent(TQMouseEvent*);
+ void wheelEvent(TQWheelEvent *);
+ void focusOutEvent(TQFocusEvent *);
bool x11Event(XEvent*);
public:
- KVncView(QWidget* parent=0, const char *name=0,
- const QString &host = QString(""), int port = 5900,
- const QString &password = QString::null,
+ KVncView(TQWidget* parent=0, const char *name=0,
+ const TQString &host = TQString(""), int port = 5900,
+ const TQString &password = TQString::null,
Quality quality = QUALITY_UNKNOWN,
DotCursorState dotCursorState = DOT_CURSOR_AUTO,
- const QString &encodings = QString::null);
+ const TQString &encodings = TQString::null);
~KVncView();
- QSize sizeHint();
+ TQSize sizeHint();
void drawRegion(int x, int y, int w, int h);
void lockFramebuffer();
void unlockFramebuffer();
@@ -91,15 +91,15 @@ public:
virtual bool scaling() const;
virtual bool supportsScaling() const;
virtual bool supportsLocalCursor() const;
- virtual QSize framebufferSize();
+ virtual TQSize framebufferSize();
void setRemoteMouseTracking(bool s);
bool remoteMouseTracking();
- void configureApp(Quality q, const QString specialEncodings = QString::null);
+ void configureApp(Quality q, const TQString specialEncodings = TQString::null);
void showDotCursor(DotCursorState state);
DotCursorState dotCursorState() const;
virtual void startQuitting();
virtual bool isQuitting();
- virtual QString host();
+ virtual TQString host();
virtual int port();
virtual bool start();
diff --git a/krdc/vnc/pointerlatencyometer.h b/krdc/vnc/pointerlatencyometer.h
index 559536b2..c380431a 100644
--- a/krdc/vnc/pointerlatencyometer.h
+++ b/krdc/vnc/pointerlatencyometer.h
@@ -15,12 +15,12 @@
* *
***************************************************************************/
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdebug.h>
struct PointerState {
int x, y;
- QTime timestamp;
+ TQTime timestamp;
};
class PointerLatencyOMeter {
diff --git a/krdc/vnc/threads.cpp b/krdc/vnc/threads.cpp
index fe5a1d62..ec033388 100644
--- a/krdc/vnc/threads.cpp
+++ b/krdc/vnc/threads.cpp
@@ -23,7 +23,7 @@
#include "vncviewer.h"
#include "threads.h"
-#include <qcstring.h>
+#include <tqcstring.h>
// Maximum idle time for writer thread in ms. When it timeouts, it will request
// another incremental update. Must be smaller than the timeout of the server
@@ -49,12 +49,12 @@ ControllerThread::ControllerThread(KVncView *v, WriterThread &wt, volatile bool
void ControllerThread::changeStatus(RemoteViewStatus s) {
m_status = s;
- QApplication::postEvent(m_view, new StatusChangeEvent(s));
+ TQApplication::postEvent(m_view, new StatusChangeEvent(s));
}
void ControllerThread::sendFatalError(ErrorCode s) {
m_quitFlag = true;
- QApplication::postEvent(m_view, new FatalErrorEvent(s));
+ TQApplication::postEvent(m_view, new FatalErrorEvent(s));
m_wthread.kick();
}
@@ -109,13 +109,13 @@ void ControllerThread::run() {
return;
}
- QApplication::postEvent(m_view,
+ TQApplication::postEvent(m_view,
new ScreenResizeEvent(si.framebufferWidth,
si.framebufferHeight));
- m_wthread.queueUpdateRequest(QRegion(QRect(0,0,si.framebufferWidth,
+ m_wthread.queueUpdateRequest(TQRegion(TQRect(0,0,si.framebufferWidth,
si.framebufferHeight)));
- QApplication::postEvent(m_view, new DesktopInitEvent());
+ TQApplication::postEvent(m_view, new DesktopInitEvent());
while ((!m_quitFlag) && (!m_desktopInitialized))
m_waiter.wait(1000);
@@ -173,7 +173,7 @@ WriterThread::WriterThread(KVncView *v, volatile bool &quitFlag) :
m_incrementalUpdateAnnounced(false),
m_mouseEventNum(0),
m_keyEventNum(0),
- m_clientCut(QString::null)
+ m_clientCut(TQString::null)
{
writerThread = this;
m_lastIncrUpdate.start();
@@ -184,8 +184,8 @@ bool WriterThread::sendIncrementalUpdateRequest() {
return SendIncrementalFramebufferUpdateRequest();
}
-bool WriterThread::sendUpdateRequest(const QRegion &region) {
- QMemArray<QRect> r = region.rects();
+bool WriterThread::sendUpdateRequest(const TQRegion &region) {
+ TQMemArray<TQRect> r = region.rects();
for (unsigned int i = 0; i < r.size(); i++)
if (!SendFramebufferUpdateRequest(r[i].x(),
r[i].y(),
@@ -195,8 +195,8 @@ bool WriterThread::sendUpdateRequest(const QRegion &region) {
return true;
}
-bool WriterThread::sendInputEvents(const QValueList<InputEvent> &events) {
- QValueList<InputEvent>::const_iterator it = events.begin();
+bool WriterThread::sendInputEvents(const TQValueList<InputEvent> &events) {
+ TQValueList<InputEvent>::const_iterator it = events.begin();
while (it != events.end()) {
if ((*it).type == KeyEventType) {
if (!SendKeyEvent((*it).e.k.k, (*it).e.k.down ? True : False))
@@ -224,7 +224,7 @@ void WriterThread::announceIncrementalUpdateRequest() {
}
-void WriterThread::queueUpdateRequest(const QRegion &r) {
+void WriterThread::queueUpdateRequest(const TQRegion &r) {
m_lock.lock();
m_updateRegionRQ += r;
m_waiter.wakeAll();
@@ -283,7 +283,7 @@ void WriterThread::queueKeyEvent(unsigned int k, bool down) {
m_lock.unlock();
}
-void WriterThread::queueClientCut(const QString &text) {
+void WriterThread::queueClientCut(const TQString &text) {
m_lock.lock();
m_clientCut = text;
@@ -299,9 +299,9 @@ void WriterThread::kick() {
void WriterThread::run() {
bool incrementalUpdateRQ = false;
bool incrementalUpdateAnnounced = false;
- QRegion updateRegionRQ;
- QValueList<InputEvent> inputEvents;
- QString clientCut;
+ TQRegion updateRegionRQ;
+ TQValueList<InputEvent> inputEvents;
+ TQString clientCut;
while (!m_quitFlag) {
m_lock.lock();
@@ -324,11 +324,11 @@ void WriterThread::run() {
else {
m_incrementalUpdateRQ = false;
m_incrementalUpdateAnnounced = false;
- m_updateRegionRQ = QRegion();
+ m_updateRegionRQ = TQRegion();
m_inputEvents.clear();
m_keyEventNum = 0;
m_mouseEventNum = 0;
- m_clientCut = QString::null;
+ m_clientCut = TQString::null;
m_lock.unlock();
// always send incremental update, unless
@@ -373,7 +373,7 @@ void WriterThread::run() {
break;
}
if (!clientCut.isNull()) {
- QCString cutTextUtf8(clientCut.utf8());
+ TQCString cutTextUtf8(clientCut.utf8());
if (!SendClientCutText(cutTextUtf8.data(),
(int)cutTextUtf8.length())) {
sendFatalError(ERROR_IO);
@@ -387,6 +387,6 @@ void WriterThread::run() {
void WriterThread::sendFatalError(ErrorCode s) {
m_quitFlag = true;
- QApplication::postEvent(m_view, new FatalErrorEvent(s));
+ TQApplication::postEvent(m_view, new FatalErrorEvent(s));
}
diff --git a/krdc/vnc/threads.h b/krdc/vnc/threads.h
index 5f38b71f..08ca4c20 100644
--- a/krdc/vnc/threads.h
+++ b/krdc/vnc/threads.h
@@ -18,14 +18,14 @@
#ifndef THREADS_H
#define THREADS_H
-#include <qthread.h>
-#include <qregion.h>
-#include <qrect.h>
-#include <qmutex.h>
-#include <qwaitcondition.h>
-#include <qevent.h>
-#include <qvaluelist.h>
-#include <qdatetime.h>
+#include <tqthread.h>
+#include <tqregion.h>
+#include <tqrect.h>
+#include <tqmutex.h>
+#include <tqwaitcondition.h>
+#include <tqevent.h>
+#include <tqvaluelist.h>
+#include <tqdatetime.h>
#include <stdlib.h>
@@ -58,24 +58,24 @@ struct InputEvent {
};
-class WriterThread : public QThread {
+class WriterThread : public TQThread {
private:
- QMutex m_lock;
- QWaitCondition m_waiter;
+ TQMutex m_lock;
+ TQWaitCondition m_waiter;
volatile bool &m_quitFlag;
KVncView *m_view;
- QTime m_lastIncrUpdate; // start()ed when a incr update is sent
+ TQTime m_lastIncrUpdate; // start()ed when a incr update is sent
bool m_lastIncrUpdatePostponed;
// all things that can be send follow:
bool m_incrementalUpdateRQ; // for sending an incremental request
bool m_incrementalUpdateAnnounced; // set when a RQ will come soon
- QRegion m_updateRegionRQ; // for sending updates, null if it is done
- QValueList<InputEvent> m_inputEvents; // list of unsent input events
+ TQRegion m_updateRegionRQ; // for sending updates, null if it is done
+ TQValueList<InputEvent> m_inputEvents; // list of unsent input events
MouseEvent m_lastMouseEvent;
int m_mouseEventNum, m_keyEventNum;
- QString m_clientCut;
+ TQString m_clientCut;
void sendFatalError(ErrorCode s);
@@ -84,29 +84,29 @@ public:
void queueIncrementalUpdateRequest();
void announceIncrementalUpdateRequest();
- void queueUpdateRequest(const QRegion &r);
+ void queueUpdateRequest(const TQRegion &r);
void queueMouseEvent(int x, int y, int buttonMask);
void queueKeyEvent(unsigned int k, bool down);
- void queueClientCut(const QString &text);
+ void queueClientCut(const TQString &text);
void kick();
protected:
void run();
bool sendIncrementalUpdateRequest();
- bool sendUpdateRequest(const QRegion &r);
- bool sendInputEvents(const QValueList<InputEvent> &events);
+ bool sendUpdateRequest(const TQRegion &r);
+ bool sendInputEvents(const TQValueList<InputEvent> &events);
};
-class ControllerThread : public QThread {
+class ControllerThread : public TQThread {
private:
KVncView *m_view;
enum RemoteViewStatus m_status;
WriterThread &m_wthread;
volatile bool &m_quitFlag;
volatile bool m_desktopInitialized;
- QWaitCondition m_waiter;
+ TQWaitCondition m_waiter;
void changeStatus(RemoteViewStatus s);
void sendFatalError(ErrorCode s);
diff --git a/krdc/vnc/vnchostpref.cpp b/krdc/vnc/vnchostpref.cpp
index a17f8ea1..7fea2889 100644
--- a/krdc/vnc/vnchostpref.cpp
+++ b/krdc/vnc/vnchostpref.cpp
@@ -19,9 +19,9 @@
#include <kconfig.h>
#include <klocale.h>
-const QString VncHostPref::VncType = "VNC";
+const TQString VncHostPref::VncType = "VNC";
-VncHostPref::VncHostPref(KConfig *conf, const QString &host, const QString &type) :
+VncHostPref::VncHostPref(KConfig *conf, const TQString &host, const TQString &type) :
HostPref(conf, host, type),
m_quality(0),
m_useKWallet(true),
@@ -35,7 +35,7 @@ void VncHostPref::save() {
if ( !m_host.isEmpty() && !m_type.isEmpty() )
{
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_config->writeEntry(p+"exists", true);
m_config->writeEntry(p+"quality", m_quality);
m_config->writeEntry(p+"askOnConnect", m_askOnConnect);
@@ -54,7 +54,7 @@ void VncHostPref::load() {
if ( !m_host.isEmpty() && !m_type.isEmpty() )
{
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_quality = m_config->readNumEntry(p+"quality", 0);
m_askOnConnect = m_config->readBoolEntry(p+"askOnConnect", true);
m_useKWallet = m_config->readBoolEntry(p+"useKWallet", true);
@@ -67,7 +67,7 @@ void VncHostPref::load() {
void VncHostPref::remove() {
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_config->deleteEntry(p+"exists");
m_config->deleteEntry(p+"quality");
m_config->deleteEntry(p+"askOnConnect");
@@ -80,8 +80,8 @@ void VncHostPref::setDefaults() {
m_useKWallet = m_config->readBoolEntry("vncUseKWallet", true);
}
-QString VncHostPref::prefDescription() const {
- QString q;
+TQString VncHostPref::prefDescription() const {
+ TQString q;
switch(m_quality) {
case 0:
q = i18n("High");
diff --git a/krdc/vnc/vnchostpref.h b/krdc/vnc/vnchostpref.h
index 33a20600..cfd91053 100644
--- a/krdc/vnc/vnchostpref.h
+++ b/krdc/vnc/vnchostpref.h
@@ -34,13 +34,13 @@ protected:
virtual void remove();
public:
- static const QString VncType;
+ static const TQString VncType;
- VncHostPref(KConfig *conf, const QString &host=QString::null,
- const QString &type=QString::null);
+ VncHostPref(KConfig *conf, const TQString &host=TQString::null,
+ const TQString &type=TQString::null);
virtual ~VncHostPref();
- virtual QString prefDescription() const;
+ virtual TQString prefDescription() const;
void setQuality(int q);
int quality() const;
void setAskOnConnect(bool ask);