summaryrefslogtreecommitdiffstats
path: root/krdc/vnc/kvncview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /krdc/vnc/kvncview.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krdc/vnc/kvncview.cpp')
-rw-r--r--krdc/vnc/kvncview.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/krdc/vnc/kvncview.cpp b/krdc/vnc/kvncview.cpp
index 8050a68b..e5add6c8 100644
--- a/krdc/vnc/kvncview.cpp
+++ b/krdc/vnc/kvncview.cpp
@@ -64,7 +64,7 @@ static TQWaitCondition passwordWaiter;
const unsigned int MAX_SELECTION_LENGTH = 4096;
-KVncView::KVncView(TQWidget *parent,
+KVncView::KVncView(TQWidget *tqparent,
const char *name,
const TQString &_host,
int _port,
@@ -72,7 +72,7 @@ KVncView::KVncView(TQWidget *parent,
Quality quality,
DotCursorState dotCursorState,
const TQString &encodings) :
- KRemoteView(parent, name, Qt::WResizeNoErase | Qt::WRepaintNoErase | Qt::WStaticContents),
+ KRemoteView(tqparent, name, TQt::WResizeNoErase | TQt::WRepaintNoErase | TQt::WStaticContents),
m_cthread(this, m_wthread, m_quitFlag),
m_wthread(this, m_quitFlag),
m_quitFlag(false),
@@ -90,9 +90,9 @@ KVncView::KVncView(TQWidget *parent,
password = _password.latin1();
dpy = qt_xdisplay();
setFixedSize(16,16);
- setFocusPolicy(TQWidget::StrongFocus);
+ setFocusPolicy(TQ_StrongFocus);
- m_cb = TQApplication::clipboard();
+ m_cb = TQApplication::tqclipboard();
connect(m_cb, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged()));
connect(m_cb, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clipboardChanged()));
@@ -100,10 +100,10 @@ KVncView::KVncView(TQWidget *parent,
TQBitmap cursorBitmap(dirs->findResource("appdata",
"pics/pointcursor.png"));
TQBitmap cursorMask(dirs->findResource("appdata",
- "pics/pointcursormask.png"));
+ "pics/pointcursortqmask.png"));
m_cursor = TQCursor(cursorBitmap, cursorMask);
- if ((quality != QUALITY_UNKNOWN) ||
+ if ((quality != TQUALITY_UNKNOWN) ||
!encodings.isNull())
configureApp(quality, encodings);
}
@@ -126,11 +126,11 @@ void KVncView::showDotCursorInternal() {
setCursor(m_cursor);
break;
case DOT_CURSOR_OFF:
- setCursor(TQCursor(Qt::BlankCursor));
+ setCursor(TQCursor(TQt::BlankCursor));
break;
case DOT_CURSOR_AUTO:
if (m_enableClientCursor)
- setCursor(TQCursor(Qt::BlankCursor));
+ setCursor(TQCursor(TQt::BlankCursor));
else
setCursor(m_cursor);
break;
@@ -160,21 +160,21 @@ void KVncView::configureApp(Quality q, const TQString specialEncodings) {
appData.shareDesktop = 1;
appData.viewOnly = 0;
- if (q == QUALITY_LOW) {
+ if (q == TQUALITY_LOW) {
appData.useBGR233 = 1;
appData.encodingsString = "background copyrect softcursor tight zlib hextile raw";
appData.compressLevel = -1;
appData.qualityLevel = 1;
appData.dotCursor = 1;
}
- else if (q == QUALITY_MEDIUM) {
+ else if (q == TQUALITY_MEDIUM) {
appData.useBGR233 = 0;
appData.encodingsString = "background copyrect softcursor tight zlib hextile raw";
appData.compressLevel = -1;
appData.qualityLevel = 7;
appData.dotCursor = 1;
}
- else if ((q == QUALITY_HIGH) || (q == QUALITY_UNKNOWN)) {
+ else if ((q == TQUALITY_HIGH) || (q == TQUALITY_UNKNOWN)) {
appData.useBGR233 = 0;
appData.encodingsString = "copyrect softcursor hextile raw";
appData.compressLevel = -1;
@@ -219,7 +219,7 @@ bool KVncView::checkLocalKRfb() {
if (m_port != portNum)
return true;
- setStatus(REMOTE_VIEW_DISCONNECTED);
+ settqStatus(REMOTE_VIEW_DISCONNECTED);
KMessageBox::error(0,
i18n("It is not possible to connect to a local desktop sharing service."),
i18n("Connection Failure"));
@@ -236,7 +236,7 @@ bool KVncView::editPreferences( HostPrefPtr host )
// show preferences dialog
KDialogBase *dlg = new KDialogBase( 0L, "dlg", true,
- i18n( "VNC Host Preferences for %1" ).arg( host->host() ),
+ i18n( "VNC Host Preferences for %1" ).tqarg( host->host() ),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true );
TQVBox *vbox = dlg->makeVBoxMainWidget();
@@ -281,11 +281,11 @@ bool KVncView::start() {
Quality quality;
if (ci == 0)
- quality = QUALITY_HIGH;
+ quality = TQUALITY_HIGH;
else if (ci == 1)
- quality = QUALITY_MEDIUM;
+ quality = TQUALITY_MEDIUM;
else if (ci == 2)
- quality = QUALITY_LOW;
+ quality = TQUALITY_LOW;
else {
kdDebug() << "Unknown quality";
return false;
@@ -295,10 +295,10 @@ bool KVncView::start() {
useKWallet = hp->useKWallet();
}
- setStatus(REMOTE_VIEW_CONNECTING);
+ settqStatus(REMOTE_VIEW_CONNECTING);
m_cthread.start();
- setBackgroundMode(Qt::NoBackground);
+ setBackgroundMode(TQt::NoBackground);
return true;
}
@@ -339,7 +339,7 @@ void KVncView::setViewOnly(bool s) {
m_viewOnly = s;
if (s)
- setCursor(Qt::ArrowCursor);
+ setCursor(TQt::ArrowCursor);
else
showDotCursorInternal();
}
@@ -390,7 +390,7 @@ void KVncView::customEvent(TQCustomEvent *e)
}
else if (e->type() == StatusChangeEventType) {
StatusChangeEvent *sce = (StatusChangeEvent*) e;
- setStatus(sce->status());
+ settqStatus(sce->status());
if (m_status == REMOTE_VIEW_CONNECTED) {
emit connected();
setFocus();
@@ -458,7 +458,7 @@ void KVncView::customEvent(TQCustomEvent *e)
}
else if (e->type() == FatalErrorEventType) {
FatalErrorEvent *fee = (FatalErrorEvent*) e;
- setStatus(REMOTE_VIEW_DISCONNECTED);
+ settqStatus(REMOTE_VIEW_DISCONNECTED);
switch (fee->errorCode()) {
case ERROR_CONNECTION:
KMessageBox::error(0,
@@ -514,8 +514,8 @@ void KVncView::customEvent(TQCustomEvent *e)
ServerCutEvent *sce = (ServerCutEvent*) e;
TQString ctext = TQString::fromUtf8(sce->bytes(), sce->length());
m_dontSendCb = true;
- m_cb->setText(ctext, QClipboard::Clipboard);
- m_cb->setText(ctext, QClipboard::Selection);
+ m_cb->setText(ctext, TQClipboard::Clipboard);
+ m_cb->setText(ctext, TQClipboard::Selection);
m_dontSendCb = false;
}
else if (e->type() == MouseStateEventType) {
@@ -536,19 +536,19 @@ void KVncView::mouseEvent(TQMouseEvent *e) {
if ( e->type() != TQEvent::MouseMove ) {
if ( (e->type() == TQEvent::MouseButtonPress) ||
(e->type() == TQEvent::MouseButtonDblClick)) {
- if ( e->button() & LeftButton )
+ if ( e->button() & Qt::LeftButton )
m_buttonMask |= 0x01;
- if ( e->button() & MidButton )
+ if ( e->button() & Qt::MidButton )
m_buttonMask |= 0x02;
- if ( e->button() & RightButton )
+ if ( e->button() & Qt::RightButton )
m_buttonMask |= 0x04;
}
else if ( e->type() == TQEvent::MouseButtonRelease ) {
- if ( e->button() & LeftButton )
+ if ( e->button() & Qt::LeftButton )
m_buttonMask &= 0xfe;
- if ( e->button() & MidButton )
+ if ( e->button() & Qt::MidButton )
m_buttonMask &= 0xfd;
- if ( e->button() & RightButton )
+ if ( e->button() & Qt::RightButton )
m_buttonMask &= 0xfb;
}
}
@@ -659,7 +659,7 @@ bool KVncView::x11Event(XEvent *e) {
case XK_Shift_R:
if (pressed)
m_mods[s] = true;
- else if (m_mods.contains(s))
+ else if (m_mods.tqcontains(s))
m_mods.remove(s);
else
unpressModifiers();
@@ -683,8 +683,8 @@ void KVncView::focusOutEvent(TQFocusEvent *) {
unpressModifiers();
}
-TQSize KVncView::sizeHint() {
- return maximumSize();
+TQSize KVncView::tqsizeHint() {
+ return tqmaximumSize();
}
void KVncView::setRemoteMouseTracking(bool s) {
@@ -702,7 +702,7 @@ void KVncView::clipboardChanged() {
if (m_cb->ownsClipboard() || m_dontSendCb)
return;
- TQString text = m_cb->text(QClipboard::Clipboard);
+ TQString text = m_cb->text(TQClipboard::Clipboard);
if (text.length() > MAX_SELECTION_LENGTH)
return;
@@ -716,7 +716,7 @@ void KVncView::selectionChanged() {
if (m_cb->ownsSelection() || m_dontSendCb)
return;
- TQString text = m_cb->text(QClipboard::Selection);
+ TQString text = m_cb->text(TQClipboard::Selection);
if (text.length() > MAX_SELECTION_LENGTH)
return;