diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /krdc | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-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')
45 files changed, 415 insertions, 402 deletions
diff --git a/krdc/events.h b/krdc/events.h index 7c211183..d9856449 100644 --- a/krdc/events.h +++ b/krdc/events.h @@ -1,5 +1,5 @@ /*************************************************************************** - events.h - QCustomEvents + events.h - TQCustomEvents ------------------- begin : Wed Jun 05 01:13:42 CET 2002 copyright : (C) 2002 by Tim Jansen @@ -33,10 +33,10 @@ * REMOTE_VIEW_DISCONNECTING * @li You can move from REMOTE_VIEW_DISCONNECTED to REMOTE_VIEW_CONNECTING * - * @ref KRemoteView::setStatus() will follow this rules for you. + * @ref KRemoteView::settqStatus() will follow this rules for you. * (If you add/remove a state here, you must adapt it) */ -enum RemoteViewStatus { +enum RemoteViewtqStatus { REMOTE_VIEW_CONNECTING = 0, REMOTE_VIEW_AUTHENTICATING = 1, REMOTE_VIEW_PREPARING = 2, @@ -59,7 +59,7 @@ enum ErrorCode { const int ScreenResizeEventType = 41001; -class ScreenResizeEvent : public QCustomEvent +class ScreenResizeEvent : public TQCustomEvent { private: int m_width, m_height; @@ -75,21 +75,21 @@ public: const int StatusChangeEventType = 41002; -class StatusChangeEvent : public QCustomEvent +class StatusChangeEvent : public TQCustomEvent { private: - RemoteViewStatus m_status; + RemoteViewtqStatus m_status; public: - StatusChangeEvent(RemoteViewStatus s) : + StatusChangeEvent(RemoteViewtqStatus s) : TQCustomEvent(StatusChangeEventType), m_status(s) {}; - RemoteViewStatus status() const { return m_status; }; + RemoteViewtqStatus status() const { return m_status; }; }; const int PasswordRequiredEventType = 41003; -class PasswordRequiredEvent : public QCustomEvent +class PasswordRequiredEvent : public TQCustomEvent { public: PasswordRequiredEvent() : @@ -99,7 +99,7 @@ public: const int FatalErrorEventType = 41004; -class FatalErrorEvent : public QCustomEvent +class FatalErrorEvent : public TQCustomEvent { ErrorCode m_error; public: @@ -113,7 +113,7 @@ public: const int DesktopInitEventType = 41005; -class DesktopInitEvent : public QCustomEvent +class DesktopInitEvent : public TQCustomEvent { public: DesktopInitEvent() : @@ -123,7 +123,7 @@ public: const int ScreenRepaintEventType = 41006; -class ScreenRepaintEvent : public QCustomEvent +class ScreenRepaintEvent : public TQCustomEvent { private: int m_x, m_y, m_width, m_height; @@ -143,7 +143,7 @@ public: const int BeepEventType = 41007; -class BeepEvent : public QCustomEvent +class BeepEvent : public TQCustomEvent { public: BeepEvent() : @@ -153,7 +153,7 @@ public: const int ServerCutEventType = 41008; -class ServerCutEvent : public QCustomEvent +class ServerCutEvent : public TQCustomEvent { private: char *m_bytes; @@ -173,7 +173,7 @@ public: const int MouseStateEventType = 41009; -class MouseStateEvent : public QCustomEvent +class MouseStateEvent : public TQCustomEvent { private: int m_x, m_y, m_buttonMask; @@ -193,7 +193,7 @@ public: const int WalletOpenEventType = 41010; -class WalletOpenEvent : public QCustomEvent +class WalletOpenEvent : public TQCustomEvent { public: WalletOpenEvent() : diff --git a/krdc/hostpreferences.cpp b/krdc/hostpreferences.cpp index dae9a09a..1307bd5f 100644 --- a/krdc/hostpreferences.cpp +++ b/krdc/hostpreferences.cpp @@ -61,7 +61,7 @@ TQString HostPref::prefix() const { } TQString HostPref::prefix(const TQString &host, const TQString &type) { - return TQString("PerHost-%1-%2-").arg(type).arg(host); + return TQString("PerHost-%1-%2-").tqarg(type).tqarg(host); } @@ -153,37 +153,37 @@ void HostPreferences::removeHostPref(HostPref *hostPref) { void HostPreferences::setShowBrowsingPanel( bool b ) { - m_config->setGroup( TQString::null ); + m_config->setGroup( TQString() ); m_config->writeEntry( "browsingPanel", b ); } void HostPreferences::setServerCompletions( const TQStringList &list ) { - m_config->setGroup( TQString::null ); + m_config->setGroup( TQString() ); m_config->writeEntry( "serverCompletions", list ); } void HostPreferences::setServerHistory( const TQStringList &list ) { - m_config->setGroup( TQString::null ); + m_config->setGroup( TQString() ); m_config->writeEntry( "serverHistory", list ); } bool HostPreferences::showBrowsingPanel() { - m_config->setGroup( TQString::null ); + m_config->setGroup( TQString() ); return m_config->readBoolEntry( "browsingPanel" ); } TQStringList HostPreferences::serverCompletions() { - m_config->setGroup( TQString::null ); + m_config->setGroup( TQString() ); return m_config->readListEntry( "serverCompletions" ); } TQStringList HostPreferences::serverHistory() { - m_config->setGroup( TQString::null ); + m_config->setGroup( TQString() ); return m_config->readListEntry( "serverHistory" ); } diff --git a/krdc/hostprofiles.ui b/krdc/hostprofiles.ui index 2b36919b..aca1c6d6 100644 --- a/krdc/hostprofiles.ui +++ b/krdc/hostprofiles.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>HostProfiles</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>HostProfiles</cstring> </property> @@ -82,14 +82,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>117</width> <height>21</height> </size> </property> </spacer> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>removeHostButton</cstring> </property> @@ -100,7 +100,7 @@ <string>Deletes the hosts that you have selected in the list above.</string> </property> </widget> - <widget class="QPushButton" row="1" column="2"> + <widget class="TQPushButton" row="1" column="2"> <property name="name"> <cstring>removeAllButton</cstring> </property> @@ -134,9 +134,9 @@ </connection> <connection> <sender>hostListView</sender> - <signal>doubleClicked(QListViewItem*,const QPoint&,int)</signal> + <signal>doubleClicked(TQListViewItem*,const QPoint&,int)</signal> <receiver>HostProfiles</receiver> - <slot>slotHostDoubleClicked(QListViewItem*)</slot> + <slot>slotHostDoubleClicked(TQListViewItem*)</slot> </connection> </connections> <includes> @@ -147,21 +147,21 @@ <variables> <variable>HostPrefPtrList deletedHosts;</variable> </variables> -<signals> +<Q_SIGNALS> <signal>hostDoubleClicked(HostPrefPtr)</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot>removeHost()</slot> <slot access="protected" specifier="non virtual">removeAllHosts()</slot> <slot access="protected" specifier="non virtual">selectionChanged()</slot> - <slot>slotHostDoubleClicked( QListViewItem * )</slot> -</slots> + <slot>slotHostDoubleClicked( TQListViewItem * )</slot> +</Q_SLOTS> <functions> <function specifier="non virtual">load()</function> <function specifier="non virtual">save()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>klistview.h</includehint> </includehints> diff --git a/krdc/hostprofiles.ui.h b/krdc/hostprofiles.ui.h index 2626bb78..a1577cc1 100644 --- a/krdc/hostprofiles.ui.h +++ b/krdc/hostprofiles.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/krdc/keycapturedialog.cpp b/krdc/keycapturedialog.cpp index 47f93455..7f394e40 100644 --- a/krdc/keycapturedialog.cpp +++ b/krdc/keycapturedialog.cpp @@ -46,14 +46,14 @@ const int XKeyRelease = KeyRelease; #endif -KeyCaptureDialog::KeyCaptureDialog(TQWidget *parent, const char *name) - : KDialogBase(parent, name, true, i18n( "Enter Key Combination" ), +KeyCaptureDialog::KeyCaptureDialog(TQWidget *tqparent, const char *name) + : KDialogBase(tqparent, name, true, i18n( "Enter Key Combination" ), Cancel, Cancel, true), m_grabbed(false) { TQFrame *main = makeMainWidget(); - TQVBoxLayout *layout = new TQVBoxLayout( main, 0, KDialog::spacingHint() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( main, 0, KDialog::spacingHint() ); m_captureWidget = new KeyCaptureWidget( main, "m_captureWidget" ); - layout->addWidget( m_captureWidget ); - layout->addStretch(); + tqlayout->addWidget( m_captureWidget ); + tqlayout->addStretch(); } KeyCaptureDialog::~KeyCaptureDialog() { diff --git a/krdc/keycapturedialog.h b/krdc/keycapturedialog.h index 1b45b234..5ee4c8d0 100644 --- a/krdc/keycapturedialog.h +++ b/krdc/keycapturedialog.h @@ -29,10 +29,11 @@ class KeyCaptureWidget; class KeyCaptureDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT bool m_grabbed; public: - KeyCaptureDialog(TQWidget * parent= 0, const char *name = 0); + KeyCaptureDialog(TQWidget * tqparent= 0, const char *name = 0); ~KeyCaptureDialog(); public slots: diff --git a/krdc/keycapturewidget.ui b/krdc/keycapturewidget.ui index aa2865ce..b9c9c375 100644 --- a/krdc/keycapturewidget.ui +++ b/krdc/keycapturewidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KeyCaptureWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KeyCaptureWidget</cstring> </property> @@ -19,14 +19,14 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>Enter a special key or key combination to send to the remote side:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -40,18 +40,18 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>112</width> <height>21</height> </size> </property> </spacer> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>keyLabel</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -77,21 +77,21 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>111</width> <height>21</height> </size> </property> </spacer> - <widget class="QLabel" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>textLabel1_2</cstring> </property> <property name="text"> <string>This function allows you to send a key combination like Ctrl+Alt+Del to the remote side. Press Esc to cancel.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -100,6 +100,6 @@ <includes> <include location="global" impldecl="in implementation">kdialogbase.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> </UI> diff --git a/krdc/kfullscreenpanel.cpp b/krdc/kfullscreenpanel.cpp index 0c85cfdd..a43cc96d 100644 --- a/krdc/kfullscreenpanel.cpp +++ b/krdc/kfullscreenpanel.cpp @@ -54,10 +54,10 @@ void Counter::timeout() { } -KFullscreenPanel::KFullscreenPanel(TQWidget* parent, +KFullscreenPanel::KFullscreenPanel(TQWidget* tqparent, const char *name, const TQSize &resolution) : - TQWidget(parent, name), + TQWidget(tqparent, name), m_child(0), m_layout(0), m_fsResolution(resolution), @@ -88,7 +88,7 @@ void KFullscreenPanel::setChild(TQWidget *child) { } void KFullscreenPanel::doLayout() { - TQSize s = sizeHint(); + TQSize s = tqsizeHint(); setFixedSize(s); setGeometry((m_fsResolution.width() - s.width())/2, 0, s.width(), s.height()); diff --git a/krdc/kfullscreenpanel.h b/krdc/kfullscreenpanel.h index 359a4d5c..4d714959 100644 --- a/krdc/kfullscreenpanel.h +++ b/krdc/kfullscreenpanel.h @@ -25,6 +25,7 @@ class Counter : public TQObject { Q_OBJECT + TQ_OBJECT private: TQTimer m_timer; float m_stopValue, m_currentValue, m_stepSize; @@ -45,7 +46,8 @@ signals: class KFullscreenPanel : public TQWidget { - Q_OBJECT + Q_OBJECT + TQ_OBJECT private: TQWidget *m_child; TQVBoxLayout *m_layout; @@ -55,7 +57,7 @@ private: void doLayout(); public: - KFullscreenPanel(TQWidget* parent, const char *name, + KFullscreenPanel(TQWidget* tqparent, const char *name, const TQSize &resolution); ~KFullscreenPanel(); diff --git a/krdc/krdc.cpp b/krdc/krdc.cpp index 6c08de5d..5719ad65 100644 --- a/krdc/krdc.cpp +++ b/krdc/krdc.cpp @@ -57,7 +57,7 @@ const int KRDC::TOOLBAR_FPS_1000 = 10000; const int KRDC::TOOLBAR_SPEED_DOWN = 34; const int KRDC::TOOLBAR_SPEED_UP = 20; -QScrollView2::QScrollView2(TQWidget *w, const char *name) : +TQScrollView2::TQScrollView2(TQWidget *w, const char *name) : TQScrollView(w, name) { setMouseTracking(true); viewport()->setMouseTracking(true); @@ -65,7 +65,7 @@ QScrollView2::QScrollView2(TQWidget *w, const char *name) : verticalScrollBar()->setMouseTracking(true); } -void QScrollView2::mouseMoveEvent( TQMouseEvent *e ) +void TQScrollView2::mouseMoveEvent( TQMouseEvent *e ) { e->ignore(); } @@ -79,7 +79,7 @@ KRDC::KRDC(WindowMode wm, const TQString &host, bool scale, bool localCursor, TQSize initialWindowSize) : - TQWidget(0, 0, Qt::WStyle_ContextHelp), + TQWidget(0, 0, TQt::WStyle_ContextHelp), m_layout(0), m_scrollView(0), m_view(0), @@ -161,11 +161,11 @@ bool KRDC::start() } } - setCaption(i18n("%1 - Remote Desktop Connection").arg(serverHost)); + setCaption(i18n("%1 - Remote Desktop Connection").tqarg(serverHost)); - m_scrollView = new QScrollView2(this, "remote scrollview"); + m_scrollView = new TQScrollView2(this, "remote scrollview"); m_scrollView->setFrameStyle(TQFrame::NoFrame); - m_scrollView->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, + m_scrollView->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); switch(m_protocol) @@ -198,8 +198,8 @@ bool KRDC::start() // note that the disconnectedError() will be disconnected when kremoteview // is completely initialized 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(statusChanged(RemoteViewtqStatus)), + TQT_SLOT(changeProgress(RemoteViewtqStatus))); connect(m_view, TQT_SIGNAL(showingPasswordDialog(bool)), TQT_SLOT(showingPasswordDialog(bool))); connect(m_keyCaptureDialog, TQT_SIGNAL(keyPressed(XEvent*)), @@ -210,9 +210,9 @@ bool KRDC::start() return ret_status; } -void KRDC::changeProgress(RemoteViewStatus s) { +void KRDC::changeProgress(RemoteViewtqStatus s) { if (!m_progressDialog) { - m_progressDialog = new KProgressDialog(0, 0, TQString::null, + m_progressDialog = new KProgressDialog(0, 0, TQString(), "1234567890", false); m_progressDialog->showCancelButton(true); m_progressDialog->setMinimumDuration(0x7fffffff);//disable effectively @@ -296,16 +296,16 @@ void KRDC::quit() { bool KRDC::parseHost(TQString &str, Protocol &prot, TQString &serverHost, int &serverPort, TQString &userName, TQString &password) { TQString s = str; - userName = TQString::null; - password = TQString::null; + userName = TQString(); + password = TQString(); if (prot == PROTOCOL_AUTO) { if(s.startsWith("smb:/")>0) { //we know it's more likely to be windows.. s = "rdp:/" + s.section("smb:/", 1); prot = PROTOCOL_RDP; - } else if(s.contains("://") > 0) { + } else if(s.tqcontains("://") > 0) { s = s.section("://",1); - } else if(s.contains(":/") > 0) { + } else if(s.tqcontains(":/") > 0) { s = s.section(":/", 1); } } @@ -340,15 +340,15 @@ bool KRDC::parseHost(TQString &str, Protocol &prot, TQString &serverHost, int &s if (url.port()) { if (url.hasUser()) - str = TQString("%1@%2:%3").arg(userName).arg(serverHost).arg(url.port()); + str = TQString("%1@%2:%3").tqarg(userName).tqarg(serverHost).tqarg(url.port()); else - str = TQString("%1:%2").arg(serverHost).arg(url.port()); + str = TQString("%1:%2").tqarg(serverHost).tqarg(url.port()); } else { if (url.hasUser()) - str = TQString("%1@%2").arg(userName).arg(serverHost); + str = TQString("%1@%2").tqarg(userName).tqarg(serverHost); else - str = TQString("%1").arg(serverHost); + str = TQString("%1").tqarg(serverHost); } return true; } @@ -373,10 +373,10 @@ void KRDC::enableFullscreen(bool on) m_view->switchFullscreen(on); } -TQSize KRDC::sizeHint() +TQSize KRDC::tqsizeHint() { if ((m_isFullscreen != WINDOW_MODE_FULLSCREEN) && m_toolbar) { - int dockHint = m_dockArea->sizeHint().height(); + int dockHint = m_dockArea->tqsizeHint().height(); dockHint = dockHint < 1 ? 1 : dockHint; // fix wrong size hint return TQSize(m_view->framebufferSize().width(), dockHint + m_view->framebufferSize().height()); @@ -385,8 +385,8 @@ TQSize KRDC::sizeHint() return m_view->framebufferSize(); } -TQPopupMenu *KRDC::createPopupMenu(TQWidget *parent) const { - KPopupMenu *pu = new KPopupMenu(parent); +TQPopupMenu *KRDC::createPopupMenu(TQWidget *tqparent) const { + KPopupMenu *pu = new KPopupMenu(tqparent); pu->insertItem(i18n("View Only"), this, TQT_SLOT(viewOnlyToggled()), 0, VIEW_ONLY_ID); pu->setCheckable(true); pu->setItemChecked(VIEW_ONLY_ID, m_view->viewOnly()); @@ -407,7 +407,7 @@ void KRDC::switchToFullscreen(bool scaling) bool fromFullscreen = (m_isFullscreen == WINDOW_MODE_FULLSCREEN); - TQWidget *desktop = TQApplication::desktop(); + TQWidget *desktop = TQT_TQWIDGET(TQApplication::desktop()); TQSize ds = desktop->size(); TQSize fbs = m_view->framebufferSize(); bool scalingPossible = m_view->supportsScaling() && @@ -479,14 +479,14 @@ void KRDC::switchToFullscreen(bool scaling) pinButton->setIconSet(pinIconSet); TQToolTip::add(pinButton, i18n("Autohide on/off")); t->setToggle(FS_AUTOHIDE_ID); - t->addConnection(FS_AUTOHIDE_ID, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setFsToolbarAutoHide(bool))); + t->addConnection(FS_AUTOHIDE_ID, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(setFsToolbarAutoHide(bool))); t->insertButton("window_nofullscreen", FS_FULLSCREEN_ID); KToolBarButton *fullscreenButton = t->getButton(FS_FULLSCREEN_ID); TQToolTip::add(fullscreenButton, i18n("Fullscreen")); t->setToggle(FS_FULLSCREEN_ID); t->setButton(FS_FULLSCREEN_ID, true); - t->addConnection(FS_FULLSCREEN_ID, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableFullscreen(bool))); + t->addConnection(FS_FULLSCREEN_ID, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(enableFullscreen(bool))); m_popup = createPopupMenu(t); t->insertButton("configure", FS_ADVANCED_ID, m_popup, true, i18n("Advanced options")); @@ -495,7 +495,7 @@ void KRDC::switchToFullscreen(bool scaling) TQLabel *hostLabel = new TQLabel(t); hostLabel->setName("kde toolbar widget"); - hostLabel->setAlignment(Qt::AlignCenter); + hostLabel->tqsetAlignment(TQt::AlignCenter); hostLabel->setText(" "+m_host+" "); t->insertWidget(FS_HOSTLABEL_ID, 150, hostLabel); t->setItemAutoSized(FS_HOSTLABEL_ID, true); @@ -506,18 +506,18 @@ void KRDC::switchToFullscreen(bool scaling) TQToolTip::add(scaleButton, i18n("Scale view")); t->setToggle(FS_SCALE_ID); t->setButton(FS_SCALE_ID, scaling); - t->addConnection(FS_SCALE_ID, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(switchToFullscreen(bool))); + t->addConnection(FS_SCALE_ID, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(switchToFullscreen(bool))); } t->insertButton("iconify", FS_ICONIFY_ID); KToolBarButton *iconifyButton = t->getButton(FS_ICONIFY_ID); TQToolTip::add(iconifyButton, i18n("Minimize")); - t->addConnection(FS_ICONIFY_ID, TQT_SIGNAL(clicked()), this, TQT_SLOT(iconify())); + t->addConnection(FS_ICONIFY_ID, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(iconify())); t->insertButton("close", FS_CLOSE_ID); KToolBarButton *closeButton = t->getButton(FS_CLOSE_ID); TQToolTip::add(closeButton, i18n("Close")); - t->addConnection(FS_CLOSE_ID, TQT_SIGNAL(clicked()), this, TQT_SLOT(quit())); + t->addConnection(FS_CLOSE_ID, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(quit())); m_fsToolbar->setChild(t); @@ -575,7 +575,7 @@ void KRDC::switchToNormal(bool scaling) if (!m_toolbar) { m_dockArea = new TQDockArea(Qt::Horizontal, TQDockArea::Normal, this); - m_dockArea->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, + m_dockArea->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed)); KToolBar *t = new KToolBar(m_dockArea); m_toolbar = t; @@ -587,7 +587,7 @@ void KRDC::switchToNormal(bool scaling) 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, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableFullscreen(bool))); + t->addConnection(0, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(enableFullscreen(bool))); if (m_view->supportsScaling()) { t->insertButton("viewmagfit", 1, true, i18n("Scale")); @@ -596,14 +596,14 @@ void KRDC::switchToNormal(bool scaling) 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, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(switchToNormal(bool))); + t->addConnection(1, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(switchToNormal(bool))); } t->insertButton("key_enter", 2, true, i18n("Special Keys")); KToolBarButton *skButton = t->getButton(2); 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())); + t->addConnection(2, TQT_SIGNAL(clicked()), TQT_TQOBJECT(m_keyCaptureDialog), TQT_SLOT(execute())); if (m_popup) { m_popup->deleteLater(); @@ -633,7 +633,7 @@ void KRDC::switchToNormal(bool scaling) m_view->resize(m_view->framebufferSize()); } - setMaximumSize(sizeHint()); + setMaximumSize(tqsizeHint()); repositionView(false); @@ -644,7 +644,7 @@ void KRDC::switchToNormal(bool scaling) m_initialWindowSize = TQSize(); } else if (!scalingChanged) - resize(sizeHint()); + resize(tqsizeHint()); show(); if (scalingChanged) m_view->update(); @@ -681,14 +681,14 @@ void KRDC::iconify() } void KRDC::toolbarChanged() { - setMaximumSize(sizeHint()); + setMaximumSize(tqsizeHint()); // resize window when toolbar is docked and it was maximized 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()); + resize(tqsizeHint()); } @@ -722,7 +722,7 @@ bool KRDC::event(TQEvent *e) { bool KRDC::eventFilter(TQObject *watched, TQEvent *e) { /* used to get events from TQScrollView on resize for scale mode*/ - if (watched != m_scrollView) + if (TQT_BASE_OBJECT(watched) != TQT_BASE_OBJECT(m_scrollView)) return false; if (e->type() != TQEvent::Resize) return false; @@ -736,7 +736,7 @@ void KRDC::setSize(int w, int h) { int dw, dh; - TQWidget *desktop = TQApplication::desktop(); + TQWidget *desktop = TQT_TQWIDGET(TQApplication::desktop()); dw = desktop->width(); dh = desktop->height(); diff --git a/krdc/krdc.h b/krdc/krdc.h index 08409b26..1cd5b739 100644 --- a/krdc/krdc.h +++ b/krdc/krdc.h @@ -52,20 +52,21 @@ enum Protocol { }; // Overloaded TQScrollView, to let mouse move events through to remote widget -class QScrollView2 : public TQScrollView { +class TQScrollView2 : public TQScrollView { public: - QScrollView2(TQWidget *w, const char *name); + TQScrollView2(TQWidget *w, const char *name); protected: virtual void mouseMoveEvent(TQMouseEvent *e); }; -class KRDC : public QWidget +class KRDC : public TQWidget { Q_OBJECT + TQ_OBJECT private: SmartPtr<KProgressDialog> m_progressDialog; // dialog, displayed while connecting - TQVBoxLayout *m_layout; // the layout for autosizing the scrollview + TQVBoxLayout *m_layout; // the tqlayout 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) @@ -120,20 +121,20 @@ private: static const int TOOLBAR_SPEED_DOWN; static const int TOOLBAR_SPEED_UP; void fsToolbarScheduleHidden(); - TQPopupMenu *createPopupMenu(TQWidget *parent) const; + TQPopupMenu *createPopupMenu(TQWidget *tqparent) const; protected: virtual void mouseMoveEvent(TQMouseEvent *e); virtual bool event(TQEvent *e); virtual bool eventFilter(TQObject *watched, TQEvent *e); - virtual TQSize sizeHint(); + virtual TQSize tqsizeHint(); public: KRDC(WindowMode wm = WINDOW_MODE_AUTO, - const TQString &host = TQString::null, - Quality q = QUALITY_UNKNOWN, - const TQString &encodings = TQString::null, - const TQString &password = TQString::null, + const TQString &host = TQString(), + Quality q = TQUALITY_UNKNOWN, + const TQString &encodings = TQString(), + const TQString &password = TQString(), bool scale = false, bool localCursor = false, TQSize initialWindowSize = TQSize()); @@ -144,7 +145,7 @@ public: static void setLastHost(const TQString &host); private slots: - void changeProgress(RemoteViewStatus s); + void changeProgress(RemoteViewtqStatus s); void showingPasswordDialog(bool b); void showProgressTimeout(); diff --git a/krdc/kremoteview.cpp b/krdc/kremoteview.cpp index 76ae6267..cd887299 100644 --- a/krdc/kremoteview.cpp +++ b/krdc/kremoteview.cpp @@ -17,18 +17,18 @@ #include "kremoteview.h" -KRemoteView::KRemoteView(TQWidget *parent, +KRemoteView::KRemoteView(TQWidget *tqparent, const char *name, WFlags f) : - TQWidget(parent, name, f), + TQWidget(tqparent, name, f), m_status(REMOTE_VIEW_DISCONNECTED) { } -enum RemoteViewStatus KRemoteView::status() { +enum RemoteViewtqStatus KRemoteView::status() { return m_status; } -void KRemoteView::setStatus(RemoteViewStatus s) { +void KRemoteView::settqStatus(RemoteViewtqStatus s) { if (m_status == s) return; @@ -49,8 +49,8 @@ void KRemoteView::setStatus(RemoteViewStatus s) { // smooth state transition int origState = (int)m_status; for (int i = origState; i < (int)s; i++) { - m_status = (RemoteViewStatus) i; - emit statusChanged((RemoteViewStatus) i); + m_status = (RemoteViewtqStatus) i; + emit statusChanged((RemoteViewtqStatus) i); } } } diff --git a/krdc/kremoteview.h b/krdc/kremoteview.h index 09b312c0..6aa68151 100644 --- a/krdc/kremoteview.h +++ b/krdc/kremoteview.h @@ -24,10 +24,10 @@ #include "events.h" typedef enum { - QUALITY_UNKNOWN=0, - QUALITY_HIGH=1, - QUALITY_MEDIUM=2, - QUALITY_LOW=3 + TQUALITY_UNKNOWN=0, + TQUALITY_HIGH=1, + TQUALITY_MEDIUM=2, + TQUALITY_LOW=3 } Quality; /** @@ -61,11 +61,12 @@ enum DotCursorState { * MotionNotify events will be forwarded. * */ -class KRemoteView : public QWidget +class KRemoteView : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KRemoteView(TQWidget *parent = 0, + KRemoteView(TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0); @@ -135,7 +136,7 @@ public: * The backend must also emit a @ref changeSize() * when the size of the framebuffer becomes available * for the first time or the size changed. - * @return the remote framebuffer size, a null QSize + * @return the remote framebuffer size, a null TQSize * if unknown */ virtual TQSize framebufferSize() = 0; @@ -151,7 +152,7 @@ public: * Checks whether the view is currently quitting. * @return true if it is quitting * @see startQuitting() - * @see setStatus() + * @see settqStatus() */ virtual bool isQuitting() = 0; @@ -172,7 +173,7 @@ public: * dialogs to the user) and start connecting. Should not block * without running the event loop (so displaying a dialog is ok). * When the view starts connecting the application must call - * @ref setStatus() with the status REMOTE_VIEW_CONNECTING. + * @ref settqStatus() with the status REMOTE_VIEW_CONNECTING. * @return true if successful (so far), false * otherwise * @see connected() @@ -185,9 +186,9 @@ public: /** * Returns the current status of the connection. * @return the status of the connection - * @see setStatus() + * @see settqStatus() */ - enum RemoteViewStatus status(); + enum RemoteViewtqStatus status(); public slots: /** @@ -252,7 +253,7 @@ signals: * Emitted when the status of the view changed. * @param s the new status */ - void statusChanged(RemoteViewStatus s); + void statusChanged(RemoteViewtqStatus s); /** * Emitted when the password dialog is shown or hidden. @@ -265,7 +266,7 @@ signals: * Emitted when the mouse on the remote side has been moved. * @param x the new x coordinate * @param y the new y coordinate - * @param buttonMask the mask of mouse buttons (bit 0 for first mouse + * @param buttonMask the tqmask of mouse buttons (bit 0 for first mouse * button, 1 for second button etc)a */ void mouseStateChanged(int x, int y, int buttonMask); @@ -274,21 +275,21 @@ protected: /** * The status of the remote view. */ - enum RemoteViewStatus m_status; + enum RemoteViewtqStatus m_status; /** * Set the status of the connection. * Emits a statusChanged() signal. * Note that the states need to be set in a certain order, - * see @ref RemoteViewStatus. setStatus() will try to do this + * see @ref RemoteViewtqStatus. settqStatus() will try to do this * transition automatically, so if you are in REMOTE_VIEW_CONNECTING - * and call setStatus(REMOTE_VIEW_PREPARING), setStatus() will + * and call settqStatus(REMOTE_VIEW_PREPARING), settqStatus() will * emit a REMOTE_VIEW_AUTHENTICATING and then REMOTE_VIEW_PREPARING. * If you transition backwards, it will emit a * REMOTE_VIEW_DISCONNECTED before doing the transition. * @param s the new status */ - virtual void setStatus(RemoteViewStatus s); + virtual void settqStatus(RemoteViewtqStatus s); }; #endif diff --git a/krdc/kservicelocator.cpp b/krdc/kservicelocator.cpp index 3b38ed9a..a14a4dc7 100644 --- a/krdc/kservicelocator.cpp +++ b/krdc/kservicelocator.cpp @@ -34,7 +34,7 @@ #endif const TQString KServiceLocator::DEFAULT_AUTHORITY = ""; -const TQString KServiceLocator::ALL_AUTHORITIES = TQString::null; +const TQString KServiceLocator::ALL_AUTHORITIES = TQString(); class AsyncThread; @@ -140,7 +140,7 @@ const int LastServiceTypeSignalEventType = 45001; const int LastServiceSignalEventType = 45002; const int LastAttributesSignalEventType = 45003; const int MaxLastSignalEventType = 45003; -class LastSignalEvent : public QCustomEvent +class LastSignalEvent : public TQCustomEvent { private: bool m_success; @@ -153,7 +153,7 @@ public: }; const int FoundServiceTypesEventType = 45012; -class FoundServiceTypesEvent : public QCustomEvent +class FoundServiceTypesEvent : public TQCustomEvent { private: TQString m_srvtypes; @@ -166,7 +166,7 @@ public: }; const int FoundServiceEventType = 45013; -class FoundServiceEvent : public QCustomEvent +class FoundServiceEvent : public TQCustomEvent { private: TQString m_srvUrl; @@ -182,7 +182,7 @@ public: }; const int FoundAttributesEventType = 45014; -class FoundAttributesEvent : public QCustomEvent +class FoundAttributesEvent : public TQCustomEvent { private: TQString m_attributes; @@ -195,7 +195,7 @@ public: }; const int FoundScopesEventType = 45015; -class FoundScopesEvent : public QCustomEvent +class FoundScopesEvent : public TQCustomEvent { private: TQString m_scopes; @@ -297,19 +297,19 @@ class AsyncThread : public TQThread { protected: SLPHandle m_handle; KServiceLocatorPrivate *m_parent; - AsyncThread(SLPHandle handle, KServiceLocatorPrivate *parent) : + AsyncThread(SLPHandle handle, KServiceLocatorPrivate *tqparent) : m_handle(handle), - m_parent(parent) { + m_parent(tqparent) { } }; class FindSrvTypesThread : public AsyncThread { TQString m_namingAuthority, m_scopeList; public: FindSrvTypesThread(SLPHandle handle, - KServiceLocatorPrivate *parent, + KServiceLocatorPrivate *tqparent, const char *namingAuthority, const char *scopeList) : - AsyncThread(handle, parent), + AsyncThread(handle, tqparent), m_namingAuthority(namingAuthority), m_scopeList(scopeList){ } @@ -330,11 +330,11 @@ class FindSrvsThread : public AsyncThread { TQString m_srvUrl, m_scopeList, m_filter; public: FindSrvsThread(SLPHandle handle, - KServiceLocatorPrivate *parent, + KServiceLocatorPrivate *tqparent, const char *srvUrl, const char *scopeList, const char *filter) : - AsyncThread(handle, parent), + AsyncThread(handle, tqparent), m_srvUrl(srvUrl), m_scopeList(scopeList), m_filter(filter) { @@ -358,11 +358,11 @@ class FindAttrsThread : public AsyncThread { TQString m_srvUrl, m_scopeList, m_attrIds; public: FindAttrsThread(SLPHandle handle, - KServiceLocatorPrivate *parent, + KServiceLocatorPrivate *tqparent, const char *srvUrl, const char *scopeList, const char *attrIds) : - AsyncThread(handle, parent), + AsyncThread(handle, tqparent), m_srvUrl(srvUrl), m_scopeList(scopeList), m_attrIds(attrIds) { @@ -384,8 +384,8 @@ public: class FindScopesThread : public AsyncThread { public: FindScopesThread(SLPHandle handle, - KServiceLocatorPrivate *parent) : - AsyncThread(handle, parent){ + KServiceLocatorPrivate *tqparent) : + AsyncThread(handle, tqparent){ } virtual void run() { SLPError e; @@ -638,7 +638,7 @@ TQString KServiceLocator::decodeAttributeValue(const TQString &value) { if (value.isNull()) return value; if (SLPUnescape(value.latin1(), &n, SLP_TRUE) != SLP_OK) - return TQString::null; + return TQString(); TQString r(n); SLPFree(n); return r; diff --git a/krdc/kservicelocator.h b/krdc/kservicelocator.h index c9439279..05e75f6e 100644 --- a/krdc/kservicelocator.h +++ b/krdc/kservicelocator.h @@ -41,6 +41,7 @@ class KServiceLocatorPrivate; */ class KServiceLocator : public TQObject { Q_OBJECT + TQ_OBJECT private: friend class KServiceLocatorPrivate; KServiceLocatorPrivate *d; @@ -48,12 +49,12 @@ class KServiceLocator : public TQObject { public: /** * Creates a new KServiceLocator. - * @param lang the language to search in, or TQString::null for the + * @param lang the language to search in, or TQString() for the * default language * @param async true to create the service locator in asynchronous * mode, false otherwise */ - KServiceLocator(const TQString &lang = TQString::null, + KServiceLocator(const TQString &lang = TQString(), bool async = true); virtual ~KServiceLocator(); @@ -78,15 +79,15 @@ class KServiceLocator : public TQObject { * 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 TQString::null or decoding - * failed, TQString::null will be returned + * @return the decoded value. If @p value was TQString() or decoding + * failed, TQString() will be returned */ 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 + * @return the items as a TQStringList */ static TQStringList parseCommaList(const TQString &list); @@ -150,8 +151,8 @@ class KServiceLocator : public TQObject { * scopes * @return true if the operation was successful */ - bool findServiceTypes(const TQString &namingAuthority = TQString::null, - const TQString &scopelist = TQString::null); + bool findServiceTypes(const TQString &namingAuthority = TQString(), + const TQString &scopelist = TQString()); /** * Finds all services in the given scope with the given service type. @@ -178,8 +179,8 @@ class KServiceLocator : public TQObject { * @return true if the operation was successful */ bool findServices(const TQString &srvtype, - const TQString &filter = TQString::null, - const TQString &scopelist = TQString::null); + const TQString &filter = TQString(), + const TQString &scopelist = TQString()); /** * Finds the attributes of the service with the given URL. @@ -193,12 +194,12 @@ class KServiceLocator : public TQObject { * * @param serviceURL the URL of the service to search * @param attributeIds a comma-separated list of attributes to - * retrieve, or TQString::null to retrieve all + * retrieve, or TQString() to retrieve all * attributes * @return true if the operation was successful */ bool findAttributes(const TQString &serviceUrl, - const TQString &attributeIds = TQString::null); + const TQString &attributeIds = TQString()); /** * Finds all scopes that can be searched. Always finds at least diff --git a/krdc/main.cpp b/krdc/main.cpp index 034643b4..95657483 100644 --- a/krdc/main.cpp +++ b/krdc/main.cpp @@ -97,12 +97,12 @@ int main(int argc, char *argv[]) KApplication a; - TQString host = TQString::null; - Quality quality = QUALITY_UNKNOWN; - TQString encodings = TQString::null; - TQString password = TQString::null; - TQString resolution = TQString::null; - TQString keymap = TQString::null; + TQString host = TQString(); + Quality quality = TQUALITY_UNKNOWN; + TQString encodings = TQString(); + TQString password = TQString(); + TQString resolution = TQString(); + TQString keymap = TQString(); WindowMode wm = WINDOW_MODE_AUTO; bool scale = false; bool localCursor = kapp->config()->readBoolEntry("alwaysShowLocalCursor", false); @@ -111,11 +111,11 @@ int main(int argc, char *argv[]) KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if (args->isSet("low-quality")) - quality = QUALITY_LOW; + quality = TQUALITY_LOW; else if (args->isSet("medium-quality")) - quality = QUALITY_MEDIUM; + quality = TQUALITY_MEDIUM; else if (args->isSet("high-quality")) - quality = QUALITY_HIGH; + quality = TQUALITY_HIGH; if (args->isSet("fullscreen")) wm = WINDOW_MODE_FULLSCREEN; @@ -135,7 +135,7 @@ int main(int argc, char *argv[]) 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)); + KMessageBox::error(0, i18n("The password file '%1' does not exist.").tqarg(passwordFile)); return 1; } password = TQTextStream(&f).readLine(); @@ -149,7 +149,7 @@ int main(int argc, char *argv[]) if (!is.isNull()) { TQRegExp re("([0-9]+)[xX]([0-9]+)"); if (!re.exactMatch(is)) - args->usage(i18n("Wrong geometry format, must be widthXheight")); + args->usage(i18n("Wrong tqgeometry format, must be widthXheight")); initialWindowSize = TQSize(re.cap(1).toInt(), re.cap(2).toInt()); } @@ -212,7 +212,7 @@ bool MainController::start() { void MainController::errorRestart() { if (!m_host.isEmpty()) KRDC::setLastHost(m_host); - m_host = TQString::null; // only auto-connect once + m_host = TQString(); // 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 6f6e68ba..ebea4b3f 100644 --- a/krdc/main.h +++ b/krdc/main.h @@ -27,6 +27,7 @@ class KApplication; class MainController : public TQObject { Q_OBJECT + TQ_OBJECT private: SmartPtr<KRDC> m_krdc; WindowMode m_windowMode; diff --git a/krdc/maindialog.cpp b/krdc/maindialog.cpp index c6d559a5..2e052200 100644 --- a/krdc/maindialog.cpp +++ b/krdc/maindialog.cpp @@ -25,8 +25,8 @@ #include <kguiitem.h> #include <klocale.h> -MainDialog::MainDialog( TQWidget *parent, const char *name ) - : KDialogBase( parent, name, true, i18n( "Remote Desktop Connection" ), +MainDialog::MainDialog( TQWidget *tqparent, const char *name ) + : KDialogBase( tqparent, name, true, i18n( "Remote Desktop Connection" ), Ok|Close|Help|User1, Ok, true, KGuiItem( i18n( "&Preferences" ), "configure" ) ) { diff --git a/krdc/maindialog.h b/krdc/maindialog.h index 79a3c932..240dc8b2 100644 --- a/krdc/maindialog.h +++ b/krdc/maindialog.h @@ -27,8 +27,9 @@ class MainDialogWidget; class MainDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - MainDialog( TQWidget *parent, const char *name=0 ); + MainDialog( TQWidget *tqparent, const char *name=0 ); ~MainDialog() {} void setRemoteHost( const TQString & ); diff --git a/krdc/maindialogbase.ui b/krdc/maindialogbase.ui index e2aab1fb..7072bb46 100644 --- a/krdc/maindialogbase.ui +++ b/krdc/maindialogbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>MainDialogBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>MainDialogBase</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_serverLabel</cstring> </property> @@ -48,7 +48,7 @@ <property name="name"> <cstring>m_serverInput</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>250</width> <height>0</height> @@ -103,7 +103,7 @@ Remote Desktop Connection only supports systems that use VNC.</string> <string>Enter the address of the computer to connect to, or browse the network and select one. VNC and RDP compatible servers will be supported. <a href="whatsthis:<h3>Examples</h3>for a computer called 'megan':<p><table><tr><td>megan:1</td><td>connect to the VNC server on 'megan' with display number 1</td></tr><tr><td>vnc:/megan:1</td><td>longer form for the same thing</td></tr><tr><td>rdp:/megan</td><td>connect to the RDP server on 'megan'</td></tr></table>">Examples</a></string> </property> </widget> - <widget class="QFrame" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQFrame" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_browsingPanel</cstring> </property> @@ -149,14 +149,14 @@ Remote Desktop Connection only supports systems that use VNC.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>34</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>TextLabel1_2</cstring> </property> @@ -188,14 +188,14 @@ Remote Desktop Connection only supports systems that use VNC.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>34</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="5"> + <widget class="TQLabel" row="0" column="5"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -226,7 +226,7 @@ Remote Desktop Connection only supports systems that use VNC.</string> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -318,9 +318,9 @@ Remote Desktop Connection only supports systems that use VNC.</string> </connection> <connection> <sender>m_serverInput</sender> - <signal>textChanged(const QString&)</signal> + <signal>textChanged(const TQString&)</signal> <receiver>MainDialogBase</receiver> - <slot>hostChanged(const QString&)</slot> + <slot>hostChanged(const TQString&)</slot> </connection> <connection> <sender>m_searchInput</sender> @@ -332,19 +332,19 @@ Remote Desktop Connection only supports systems that use VNC.</string> <includes> <include location="global" impldecl="in implementation">kdialog.h</include> </includes> -<slots> - <slot access="protected" specifier="pure virtual">hostChanged( const QString & text )</slot> +<Q_SLOTS> + <slot access="protected" specifier="pure virtual">hostChanged( const TQString & text )</slot> <slot access="protected" specifier="pure virtual">toggleBrowsingArea()</slot> - <slot access="protected" specifier="pure virtual">itemSelected( QListViewItem * item )</slot> - <slot access="protected" specifier="pure virtual">itemDoubleClicked( QListViewItem * item )</slot> - <slot access="protected" specifier="pure virtual">scopeSelected( const QString & scope )</slot> + <slot access="protected" specifier="pure virtual">itemSelected( TQListViewItem * item )</slot> + <slot access="protected" specifier="pure virtual">itemDoubleClicked( TQListViewItem * item )</slot> + <slot access="protected" specifier="pure virtual">scopeSelected( const TQString & scope )</slot> <slot access="protected" specifier="pure virtual">rescan()</slot> -</slots> +</Q_SLOTS> <functions> <function access="protected" specifier="non virtual">enableBrowsingArea( bool enable )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kcombobox.h</includehint> </includehints> diff --git a/krdc/maindialogwidget.cpp b/krdc/maindialogwidget.cpp index 09b0de52..c45f87e9 100644 --- a/krdc/maindialogwidget.cpp +++ b/krdc/maindialogwidget.cpp @@ -56,7 +56,7 @@ class UrlListViewItem : public KListViewItem if ( !desc.isNull() ) setText( 0, desc ); if ( ( !userid.isEmpty() ) && ( !fullname.isEmpty() ) ) - setText( 0, TQString( "%1 (%2)" ).arg( fullname ).arg( userid ) ); + setText( 0, TQString( "%1 (%2)" ).tqarg( fullname ).tqarg( userid ) ); else if ( !userid.isNull() ) setText( 0, userid ); else if ( !fullname.isNull() ) @@ -77,8 +77,8 @@ class UrlListViewItem : public KListViewItem TQString m_serviceid; }; -MainDialogWidget::MainDialogWidget( TQWidget *parent, const char *name ) - : MainDialogBase( parent, name ), +MainDialogWidget::MainDialogWidget( TQWidget *tqparent, const char *name ) + : MainDialogBase( tqparent, name ), m_scanning( false ) { HostPreferences *hp = HostPreferences::instance(); @@ -148,9 +148,9 @@ TQString MainDialogWidget::remoteHost() void MainDialogWidget::hostChanged( const TQString &text ) { - emit hostValid(text.contains(TQRegExp(":[0-9]+$")) || - text.contains(TQRegExp("^vnc:/.+")) || - text.contains(TQRegExp("^rdp:/.+"))); + emit hostValid(text.tqcontains(TQRegExp(":[0-9]+$")) || + text.tqcontains(TQRegExp("^vnc:/.+")) || + text.tqcontains(TQRegExp("^rdp:/.+"))); } void MainDialogWidget::toggleBrowsingArea() @@ -166,7 +166,7 @@ void MainDialogWidget::enableBrowsingArea( bool enable ) m_browsingPanel->show(); m_browsingPanel->setMaximumSize(1000, 1000); m_browsingPanel->setEnabled(true); - m_browseButton->setText(m_browseButton->text().replace(">>", "<<")); + m_browseButton->setText(m_browseButton->text().tqreplace(">>", "<<")); } else { @@ -174,12 +174,12 @@ void MainDialogWidget::enableBrowsingArea( bool enable ) m_browsingPanel->hide(); m_browsingPanel->setMaximumSize(0, 0); m_browsingPanel->setEnabled(false); - m_browseButton->setText(m_browseButton->text().replace("<<", ">>")); - int h = minimumSize().height()-hOffset; - setMinimumSize(minimumSize().width(), (h > 0) ? h : 0); + m_browseButton->setText(m_browseButton->text().tqreplace("<<", ">>")); + int h = tqminimumSize().height()-hOffset; + setMinimumSize(tqminimumSize().width(), (h > 0) ? h : 0); resize(width(), height()-hOffset); - TQTimer::singleShot( 0, parentWidget(), TQT_SLOT( adjustSize() ) ); + TQTimer::singleShot( 0, tqparentWidget(), TQT_SLOT( adjustSize() ) ); } if (enable) @@ -344,11 +344,11 @@ void MainDialogWidget::lastSignalServices( bool success ) void MainDialogWidget::foundScopes( TQStringList scopeList ) { - int di = scopeList.findIndex( DEFAULT_SCOPE ); + int di = scopeList.tqfindIndex( DEFAULT_SCOPE ); if ( di >= 0 ) scopeList[ di ] = i18n( "default" ); - int ct = scopeList.findIndex( m_scopeCombo->currentText() ); + int ct = scopeList.tqfindIndex( m_scopeCombo->currentText() ); m_scopeCombo->clear(); m_scopeCombo->insertStringList( scopeList ); if ( ct >= 0 ) diff --git a/krdc/maindialogwidget.h b/krdc/maindialogwidget.h index 4d7918b6..254cb755 100644 --- a/krdc/maindialogwidget.h +++ b/krdc/maindialogwidget.h @@ -30,9 +30,10 @@ class MainDialogWidget : public MainDialogBase { Q_OBJECT + TQ_OBJECT public: - MainDialogWidget( TQWidget *parent, const char *name ); + MainDialogWidget( TQWidget *tqparent, const char *name ); ~MainDialogWidget(); void setRemoteHost( const TQString & ); diff --git a/krdc/preferencesdialog.cpp b/krdc/preferencesdialog.cpp index b244c6ff..3129abf6 100644 --- a/krdc/preferencesdialog.cpp +++ b/krdc/preferencesdialog.cpp @@ -32,9 +32,9 @@ #include <klistview.h> #include <klocale.h> -PreferencesDialog::PreferencesDialog( TQWidget *parent, const char *name ) +PreferencesDialog::PreferencesDialog( TQWidget *tqparent, const char *name ) : KDialogBase( Tabbed, i18n( "Preferences" ), Ok|Cancel, Ok, - parent, name, true ) + tqparent, name, true ) { TQVBox *page; TQWidget *spacer; @@ -80,7 +80,7 @@ void PreferencesDialog::load() m_rdpPrefs->setShowPrefs( m_rdpDefaults->askOnConnect() ); m_rdpPrefs->setUseKWallet( m_rdpDefaults->useKWallet() ); m_rdpPrefs->setColorDepth( m_rdpDefaults->colorDepth() ); - m_rdpPrefs->setKbLayout( keymap2int( m_rdpDefaults->layout() )); + m_rdpPrefs->setKbLayout( keymap2int( m_rdpDefaults->tqlayout() )); m_rdpPrefs->setResolution(); } diff --git a/krdc/preferencesdialog.h b/krdc/preferencesdialog.h index 46e79024..fa927a39 100644 --- a/krdc/preferencesdialog.h +++ b/krdc/preferencesdialog.h @@ -33,9 +33,10 @@ class RdpPrefs; class PreferencesDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - PreferencesDialog( TQWidget *parent, const char *name=0 ); + PreferencesDialog( TQWidget *tqparent, const char *name=0 ); ~PreferencesDialog() {}; protected slots: diff --git a/krdc/rdp/krdpview.cpp b/krdc/rdp/krdpview.cpp index 2fdbdab8..4462cca3 100644 --- a/krdc/rdp/krdpview.cpp +++ b/krdc/rdp/krdpview.cpp @@ -45,8 +45,8 @@ extern KWallet::Wallet *wallet; static KRdpView *krdpview; -RdpContainer::RdpContainer(TQWidget *parent, const char *name, WFlags f) : - QXEmbed(parent, name, f), +RdpContainer::RdpContainer(TQWidget *tqparent, const char *name, WFlags f) : + QXEmbed(tqparent, name, f), m_viewOnly(false) { } @@ -82,12 +82,12 @@ bool RdpContainer::x11Event(XEvent *e) // constructor -KRdpView::KRdpView(TQWidget *parent, const char *name, +KRdpView::KRdpView(TQWidget *tqparent, 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), + KRemoteView(tqparent, name, TQt::WResizeNoErase | TQt::WRepaintNoErase | TQt::WStaticContents), m_name(name), m_host(host), m_port(port), @@ -120,13 +120,13 @@ KRdpView::~KRdpView() // returns the size of the framebuffer TQSize KRdpView::framebufferSize() { - return m_container->sizeHint(); + return m_container->tqsizeHint(); } // returns the suggested size -TQSize KRdpView::sizeHint() +TQSize KRdpView::tqsizeHint() { - return maximumSize(); + return tqmaximumSize(); } // start closing the connection @@ -164,12 +164,12 @@ bool KRdpView::editPreferences( HostPrefPtr host ) int wv = hp->width(); int hv = hp->height(); int cd = hp->colorDepth(); - TQString kl = hp->layout(); + TQString kl = hp->tqlayout(); bool kwallet = hp->useKWallet(); // show preferences dialog KDialogBase *dlg = new KDialogBase( 0L, "dlg", true, - i18n( "RDP Host Preferences for %1" ).arg( host->host() ), + i18n( "RDP Host Preferences for %1" ).tqarg( host->host() ), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ); TQVBox *vbox = dlg->makeVBoxMainWidget(); @@ -209,7 +209,7 @@ bool KRdpView::start() SmartPtr<RdpHostPref> hp, rdpDefaults; bool useKWallet = false; - TQWidget *desktop = TQApplication::desktop(); + TQWidget *desktop = TQT_TQWIDGET(TQApplication::desktop()); if(!rdpAppDataConfigured) { @@ -228,7 +228,7 @@ bool KRdpView::start() m_container->show(); - m_process = new KProcess(m_container); + m_process = new KProcess(TQT_TQOBJECT(m_container)); *m_process << "rdesktop"; // Check for fullscreen mode if ((hp->width() == 0) && (hp->height() == 0)) { @@ -243,7 +243,7 @@ bool KRdpView::start() *m_process << "-g" << (TQString::number(hp->width()) + "x" + TQString::number(hp->height())); } } - *m_process << "-k" << hp->layout(); + *m_process << "-k" << hp->tqlayout(); if(!m_user.isEmpty()) { *m_process << "-u" << m_user; } if(m_password.isEmpty() && useKWallet ) { @@ -303,7 +303,7 @@ bool KRdpView::start() return false; } - setStatus(REMOTE_VIEW_CONNECTING); + settqStatus(REMOTE_VIEW_CONNECTING); return true; } @@ -340,9 +340,9 @@ void KRdpView::setViewOnly(bool s) void KRdpView::connectionOpened(WId /*window*/) { - TQSize size = m_container->sizeHint(); + TQSize size = m_container->tqsizeHint(); - setStatus(REMOTE_VIEW_CONNECTED); + settqStatus(REMOTE_VIEW_CONNECTED); setFixedSize(size); m_container->setFixedSize(size); emit changeSize(size.width(), size.height()); @@ -353,7 +353,7 @@ void KRdpView::connectionOpened(WId /*window*/) void KRdpView::connectionClosed() { emit disconnected(); - setStatus(REMOTE_VIEW_DISCONNECTED); + settqStatus(REMOTE_VIEW_DISCONNECTED); m_quitFlag = true; } @@ -361,7 +361,7 @@ void KRdpView::processDied(KProcess */*proc*/) { if(m_status == REMOTE_VIEW_CONNECTING) { - setStatus(REMOTE_VIEW_DISCONNECTED); + settqStatus(REMOTE_VIEW_DISCONNECTED); if(m_clientVersion.isEmpty()) { KMessageBox::error(0, i18n("Connection attempt to host failed."), diff --git a/krdc/rdp/krdpview.h b/krdc/rdp/krdpview.h index b115bd18..c0df50e7 100644 --- a/krdc/rdp/krdpview.h +++ b/krdc/rdp/krdpview.h @@ -34,11 +34,12 @@ class KRdpView; class RdpContainer : public QXEmbed { Q_OBJECT + TQ_OBJECT friend class KRdpView; public: - RdpContainer(TQWidget *parent = 0, const char *name = 0, WFlags f = 0); + RdpContainer(TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0); ~RdpContainer(); signals: @@ -55,19 +56,20 @@ class RdpContainer : public QXEmbed class KRdpView : public KRemoteView { Q_OBJECT + TQ_OBJECT public: // constructor and destructor - 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); + KRdpView(TQWidget *tqparent = 0, const char *name = 0, + const TQString &host = TQString(), int port = TCP_PORT_RDP, + const TQString &user = TQString(), const TQString &password = TQString(), + int flags = RDP_LOGON_NORMAL, const TQString &domain = TQString(), + const TQString &shell = TQString(), const TQString &directory = TQString()); virtual ~KRdpView(); // functions regarding the window virtual TQSize framebufferSize(); // returns the size of the remote view - TQSize sizeHint(); // returns the suggested size + TQSize tqsizeHint(); // returns the suggested size virtual bool viewOnly(); virtual bool startFullscreen(); diff --git a/krdc/rdp/rdesktop.patch b/krdc/rdp/rdesktop.patch index a027799c..ddee1c86 100644 --- a/krdc/rdp/rdesktop.patch +++ b/krdc/rdp/rdesktop.patch @@ -68,9 +68,9 @@ + if ( g_embed_wnd ) + { -+ XReparentWindow(g_display, g_wnd, g_embed_wnd, 0, 0); ++ XRetqparentWindow(g_display, g_wnd, g_embed_wnd, 0, 0); + } + - input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | + input_tqmask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | VisibilityChangeMask | FocusChangeMask; diff --git a/krdc/rdp/rdphostpref.cpp b/krdc/rdp/rdphostpref.cpp index ba876146..00ce88d7 100644 --- a/krdc/rdp/rdphostpref.cpp +++ b/krdc/rdp/rdphostpref.cpp @@ -48,7 +48,7 @@ void RdpHostPref::save() m_config->writeEntry(p+"width", m_width); m_config->writeEntry(p+"height", m_height); m_config->writeEntry(p+"colorDepth", m_colorDepth); - m_config->writeEntry(p+"layout", m_layout); + m_config->writeEntry(p+"tqlayout", m_layout); m_config->writeEntry(p+"askOnConnect", m_askOnConnect); m_config->writeEntry(p+"useKWallet", m_useKWallet); } @@ -73,7 +73,7 @@ void RdpHostPref::load() m_width = m_config->readNumEntry(p+"width", 0); m_height = m_config->readNumEntry(p+"height", 0); m_colorDepth = m_config->readNumEntry(p+"colorDepth", 24); - m_layout = m_config->readEntry(p+"layout", "en-us"); + m_layout = m_config->readEntry(p+"tqlayout", "en-us"); m_askOnConnect = m_config->readBoolEntry(p+"askOnConnect", true); m_useKWallet = m_config->readBoolEntry(p+"useKWallet", true); } @@ -91,7 +91,7 @@ void RdpHostPref::remove() m_config->deleteEntry(p+"width"); m_config->deleteEntry(p+"height"); m_config->deleteEntry(p+"colorDepth"); - m_config->deleteEntry(p+"layout"); + m_config->deleteEntry(p+"tqlayout"); m_config->deleteEntry(p+"askOnConnect"); m_config->deleteEntry(p+"useKWallet"); } @@ -110,8 +110,8 @@ void RdpHostPref::setDefaults() 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) - .arg(m_colorDepth).arg(m_layout).arg(m_useKWallet ? i18n("yes") : i18n("no")); + .tqarg(m_askOnConnect ? i18n("yes") : i18n("no")).tqarg(m_width).tqarg(m_height) + .tqarg(m_colorDepth).tqarg(m_layout).tqarg(m_useKWallet ? i18n("yes") : i18n("no")); } void RdpHostPref::setWidth(int w) @@ -154,7 +154,7 @@ void RdpHostPref::setLayout(const TQString &l) save(); } -TQString RdpHostPref::layout() const +TQString RdpHostPref::tqlayout() const { return m_layout; } diff --git a/krdc/rdp/rdphostpref.h b/krdc/rdp/rdphostpref.h index 6044f261..11f490ec 100644 --- a/krdc/rdp/rdphostpref.h +++ b/krdc/rdp/rdphostpref.h @@ -60,29 +60,29 @@ static const int rdpDefaultKeymap = 6; // en-us inline int keymap2int(const TQString &keymap) { - int layout; - for(layout = 0; layout < rdpNumKeymaps; layout++) + int tqlayout; + for(tqlayout = 0; tqlayout < rdpNumKeymaps; tqlayout++) { - if(keymap == rdpKeymaps[layout]) + if(keymap == rdpKeymaps[tqlayout]) { break; } } - if(layout == rdpNumKeymaps) + if(tqlayout == rdpNumKeymaps) { - layout = rdpDefaultKeymap; + tqlayout = rdpDefaultKeymap; } - return layout; + return tqlayout; } -inline TQString int2keymap(int layout) +inline TQString int2keymap(int tqlayout) { - if(layout < 0 || layout >= rdpNumKeymaps) + if(tqlayout < 0 || tqlayout >= rdpNumKeymaps) { return rdpKeymaps[rdpDefaultKeymap]; } - return rdpKeymaps[layout]; + return rdpKeymaps[tqlayout]; } class RdpHostPref : public HostPref @@ -105,8 +105,8 @@ class RdpHostPref : public HostPref public: static const TQString RdpType; - RdpHostPref(KConfig *conf, const TQString &host=TQString::null, - const TQString &type=TQString::null); + RdpHostPref(KConfig *conf, const TQString &host=TQString(), + const TQString &type=TQString()); virtual ~RdpHostPref(); virtual TQString prefDescription() const; @@ -117,7 +117,7 @@ class RdpHostPref : public HostPref void setColorDepth(int depth); int colorDepth() const; void setLayout(const TQString &l); - TQString layout() const; + TQString tqlayout() const; void setAskOnConnect(bool ask); bool askOnConnect() const; bool useKWallet() const; diff --git a/krdc/rdp/rdpprefs.ui b/krdc/rdp/rdpprefs.ui index 0e607b90..6c05ee60 100644 --- a/krdc/rdp/rdpprefs.ui +++ b/krdc/rdp/rdpprefs.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>RdpPrefs</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>RdpPrefs</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>rdpGroupBox</cstring> </property> @@ -40,14 +40,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>21</height> </size> </property> </spacer> - <widget class="QComboBox" row="0" column="1" rowspan="1" colspan="4"> + <widget class="TQComboBox" row="0" column="1" rowspan="1" colspan="4"> <item> <property name="text"> <string>Small (640x480)</string> @@ -84,7 +84,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>280</width> <height>0</height> @@ -97,7 +97,7 @@ <string>Here you can specify the resolution of the remote desktop. This resolution determines the size of the desktop that will be presented to you.</string> </property> </widget> - <widget class="QSpinBox" row="1" column="2"> + <widget class="TQSpinBox" row="1" column="2"> <property name="name"> <cstring>spinWidth</cstring> </property> @@ -114,7 +114,7 @@ <string>This is the width of the remote desktop. You can only change this value manually if you select Custom as desktop resolution above.</string> </property> </widget> - <widget class="QLabel" row="1" column="3"> + <widget class="TQLabel" row="1" column="3"> <property name="name"> <cstring>heightLabel</cstring> </property> @@ -124,14 +124,14 @@ <property name="text"> <string>H&eight:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>spinHeight</cstring> </property> </widget> - <widget class="QSpinBox" row="1" column="4"> + <widget class="TQSpinBox" row="1" column="4"> <property name="name"> <cstring>spinHeight</cstring> </property> @@ -148,7 +148,7 @@ <string>This is the height of the remote desktop. You can only change this value manually if you select Custom as desktop resolution above.</string> </property> </widget> - <widget class="QComboBox" row="3" column="1" rowspan="1" colspan="4"> + <widget class="TQComboBox" row="3" column="1" rowspan="1" colspan="4"> <item> <property name="text"> <string>Arabic (ar)</string> @@ -325,7 +325,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>280</width> <height>0</height> @@ -338,12 +338,12 @@ <number>4</number> </property> <property name="whatsThis" stdset="0"> - <string>Use this to specify your keyboard layout. This layout setting is used to send the correct keyboard codes to the server.</string> + <string>Use this to specify your keyboard tqlayout. This tqlayout setting is used to send the correct keyboard codes to the server.</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> - <cstring>layoutLabel</cstring> + <cstring>tqlayoutLabel</cstring> </property> <property name="sizePolicy"> <sizepolicy> @@ -354,13 +354,13 @@ </sizepolicy> </property> <property name="text"> - <string>&Keyboard layout:</string> + <string>&Keyboard tqlayout:</string> </property> <property name="buddy" stdset="0"> <cstring>cmbKbLayout</cstring> </property> </widget> - <widget class="QCheckBox" row="4" column="0"> + <widget class="TQCheckBox" row="4" column="0"> <property name="name"> <cstring>cbUseKWallet</cstring> </property> @@ -374,7 +374,7 @@ <string>Enable this option to store your passwords with KWallet.</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>resolutionLabel</cstring> </property> @@ -393,7 +393,7 @@ <cstring>cmbResolution</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>colorDepthLabel</cstring> </property> @@ -412,7 +412,7 @@ <cstring>cmbKbLayout</cstring> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>widthLabel</cstring> </property> @@ -422,14 +422,14 @@ <property name="text"> <string>&Width:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>spinWidth</cstring> </property> </widget> - <widget class="QComboBox" row="2" column="1" rowspan="1" colspan="4"> + <widget class="TQComboBox" row="2" column="1" rowspan="1" colspan="4"> <item> <property name="text"> <string>Low Color (8 Bit)</string> @@ -451,7 +451,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>cbShowPrefs</cstring> </property> @@ -490,11 +490,11 @@ <include location="global" impldecl="in implementation">kdialog.h</include> <include location="local" impldecl="in implementation">rdpprefs.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot access="protected" specifier="non virtual">resolutionChanged( int selection )</slot> <slot returnType="int">colorDepth()</slot> <slot>setColorDepth( int depth )</slot> -</slots> +</Q_SLOTS> <functions> <function specifier="non virtual">setRdpWidth( int w )</function> <function specifier="non virtual" returnType="int">rdpWidth()</function> @@ -509,6 +509,6 @@ <function specifier="non virtual">setUseKWallet( bool b )</function> <function specifier="non virtual" returnType="bool">useKWallet()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> </UI> diff --git a/krdc/rdp/rdpprefs.ui.h b/krdc/rdp/rdpprefs.ui.h index 295ea5a8..8e091cf8 100644 --- a/krdc/rdp/rdpprefs.ui.h +++ b/krdc/rdp/rdpprefs.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/krdc/smartptr.h b/krdc/smartptr.h index 49fa25c2..53cbfeea 100644 --- a/krdc/smartptr.h +++ b/krdc/smartptr.h @@ -425,7 +425,7 @@ public: rcrcount = rc->refsToThis; } return TQString("SmartPtr: ptr=%1, refcounts=%2, ptrnum=%3") - .arg((int)ptr).arg(objrcount).arg(rcrcount); + .tqarg((int)ptr).tqarg(objrcount).tqarg(rcrcount); } }; diff --git a/krdc/vnc/desktop.c b/krdc/vnc/desktop.c index e60c67ee..2975e731 100644 --- a/krdc/vnc/desktop.c +++ b/krdc/vnc/desktop.c @@ -1,7 +1,7 @@ /* * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. * Copyright (C) 2002 Tim Jansen. All Rights Reserved. - * Copyright (C) 1999-2001 Anders Lindström + * Copyright (C) 1999-2001 Anders Lindstr�m * * * @@ -25,7 +25,7 @@ * - added FillRectangle and Sync methods to draw only on * the image * - added Zoom functionality, based on rotation funcs from - * SGE by Anders Lindström) + * SGE by Anders Lindstr�m) * - added support for softcursor encoding * */ @@ -626,7 +626,7 @@ void SyncScreenRegionX11Thread(int x, int y, int width, int height) { } /* - * ToplevelInitBeforeRealization sets the title, geometry and other resources + * ToplevelInitBeforeRealization sets the title, tqgeometry and other resources * on the toplevel window. */ @@ -1380,17 +1380,17 @@ static void _calcRect(Surface *src, Surface *dst, float xscale, float yscale, UintXX *dst_row; \ UintXX c1, c2, c3, c4;\ Uint32 R, G, B, A=0; \ - UintXX Rmask = image->red_mask;\ - UintXX Gmask = image->green_mask;\ - UintXX Bmask = image->blue_mask;\ - UintXX Amask = 0;\ + UintXX Rtqmask = image->red_mask;\ + UintXX Gtqmask = image->green_mask;\ + UintXX Btqmask = image->blue_mask;\ + UintXX Atqmask = 0;\ Uint32 wx, wy;\ Uint32 p1, p2, p3, p4;\ \ /* * Interpolation: * We calculate the distances from our point to the four nearest pixels, d1..d4. - * d(a,b) = sqrt(a²+b²) ~= 0.707(a+b) (Pythagoras (Taylor) expanded around (0.5;0.5)) + * d(a,b) = sqrt(a�+b�) ~= 0.707(a+b) (Pythagoras (Taylor) expanded around (0.5;0.5)) * * 1 wx 2 * *-|-* (+ = our point at (x,y)) @@ -1449,11 +1449,11 @@ static void _calcRect(Surface *src, Surface *dst, float xscale, float yscale, c4 = *(src_row + (ry+1)*src_pitch + rx+1);\ \ /* Calculate the average */\ - R = ((p1*(c1 & Rmask) + p2*(c2 & Rmask) + p3*(c3 & Rmask) + p4*(c4 & Rmask))>>7) & Rmask;\ - G = ((p1*(c1 & Gmask) + p2*(c2 & Gmask) + p3*(c3 & Gmask) + p4*(c4 & Gmask))>>7) & Gmask;\ - B = ((p1*(c1 & Bmask) + p2*(c2 & Bmask) + p3*(c3 & Bmask) + p4*(c4 & Bmask))>>7) & Bmask;\ - if(Amask)\ - A = ((p1*(c1 & Amask) + p2*(c2 & Amask) + p3*(c3 & Amask) + p4*(c4 & Amask))>>7) & Amask;\ + R = ((p1*(c1 & Rtqmask) + p2*(c2 & Rtqmask) + p3*(c3 & Rtqmask) + p4*(c4 & Rtqmask))>>7) & Rtqmask;\ + G = ((p1*(c1 & Gtqmask) + p2*(c2 & Gtqmask) + p3*(c3 & Gtqmask) + p4*(c4 & Gtqmask))>>7) & Gtqmask;\ + B = ((p1*(c1 & Btqmask) + p2*(c2 & Btqmask) + p3*(c3 & Btqmask) + p4*(c4 & Btqmask))>>7) & Btqmask;\ + if(Atqmask)\ + A = ((p1*(c1 & Atqmask) + p2*(c2 & Atqmask) + p3*(c3 & Atqmask) + p4*(c4 & Atqmask))>>7) & Atqmask;\ \ *(dst_row + x) = R | G | B | A;\ } \ 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; diff --git a/krdc/vnc/kvncview.h b/krdc/vnc/kvncview.h index a9de2378..3cd72a5c 100644 --- a/krdc/vnc/kvncview.h +++ b/krdc/vnc/kvncview.h @@ -27,11 +27,12 @@ #include "vnctypes.h" #include "threads.h" -class QClipBoard; +class TQClipBoard; class KVncView : public KRemoteView { Q_OBJECT + TQ_OBJECT private: ControllerThread m_cthread; WriterThread m_wthread; @@ -51,7 +52,7 @@ private: TQString m_host; int m_port; - QClipboard *m_cb; + TQClipboard *m_cb; bool m_dontSendCb; TQCursor m_cursor; DotCursorState m_cursorState; @@ -76,14 +77,14 @@ protected: bool x11Event(XEvent*); public: - KVncView(TQWidget* parent=0, const char *name=0, + KVncView(TQWidget* tqparent=0, const char *name=0, const TQString &host = TQString(""), int port = 5900, - const TQString &password = TQString::null, - Quality quality = QUALITY_UNKNOWN, + const TQString &password = TQString(), + Quality quality = TQUALITY_UNKNOWN, DotCursorState dotCursorState = DOT_CURSOR_AUTO, - const TQString &encodings = TQString::null); + const TQString &encodings = TQString()); ~KVncView(); - TQSize sizeHint(); + TQSize tqsizeHint(); void drawRegion(int x, int y, int w, int h); void lockFramebuffer(); void unlockFramebuffer(); @@ -94,7 +95,7 @@ public: virtual TQSize framebufferSize(); void setRemoteMouseTracking(bool s); bool remoteMouseTracking(); - void configureApp(Quality q, const TQString specialEncodings = TQString::null); + void configureApp(Quality q, const TQString specialEncodings = TQString()); void showDotCursor(DotCursorState state); DotCursorState dotCursorState() const; virtual void startQuitting(); diff --git a/krdc/vnc/rfbproto.c b/krdc/vnc/rfbproto.c index 63901a0f..371912a4 100644 --- a/krdc/vnc/rfbproto.c +++ b/krdc/vnc/rfbproto.c @@ -159,7 +159,7 @@ ConnectToRFBServer(const char *hostname, int port) * InitialiseRFBConnection. */ -enum InitStatus +enum InittqStatus InitialiseRFBConnection() { rfbProtocolVersionMsg pv; @@ -558,7 +558,7 @@ HandleSoftCursorSetImage(rfbSoftCursorSetImage *msg, rfbRectangle *rect) /* framebuffer must be locked when calling this!!! */ static Bool -PointerMove(unsigned int x, unsigned int y, unsigned int mask, +PointerMove(unsigned int x, unsigned int y, unsigned int tqmask, int ox, int oy, int ow, int oh) { int nx, ny, nw, nh; @@ -585,7 +585,7 @@ PointerMove(unsigned int x, unsigned int y, unsigned int mask, SyncScreenRegion(nx, ny, nw, nh); } - postMouseEvent(cursorX, cursorY, mask); + postMouseEvent(cursorX, cursorY, tqmask); return True; } @@ -734,12 +734,12 @@ static void *MakeSoftCursor(int bpp, int cursorWidth, int cursorHeight, /********************************************************************* - * HandleCursorShape(). Support for XCursor and RichCursor shape + * HandletqCursorShape(). Support for XCursor and RichCursor tqshape * updates. We emulate cursor operating on the frame buffer (that is * why we call it "software cursor"). ********************************************************************/ -static Bool HandleCursorShape(int xhot, int yhot, int width, int height, CARD32 enc) +static Bool HandletqCursorShape(int xhot, int yhot, int width, int height, CARD32 enc) { int bytesPerPixel; size_t bytesPerRow, bytesMaskData; @@ -759,7 +759,7 @@ static Bool HandleCursorShape(int xhot, int yhot, int width, int height, CARD32 if (width * height == 0) return True; - /* Allocate memory for pixel data and temporary mask data. */ + /* Allocate memory for pixel data and temporary tqmask data. */ rcSource = malloc(width * height * bytesPerPixel); if (rcSource == NULL) @@ -830,7 +830,7 @@ static Bool HandleCursorShape(int xhot, int yhot, int width, int height, CARD32 } } - /* Read mask data. */ + /* Read tqmask data. */ if (!ReadFromRFBServer((char*)rcMask, bytesMaskData)) { free(rcSource); @@ -910,9 +910,9 @@ HandleRFBServerMessage() xc.blue = Swap16IfLE(rgb[2]); xc.flags = DoRed|DoGreen|DoBlue; /* Disable colormaps - lockQt(); + lockTQt(); XStoreColor(dpy, cmap, &xc); - unlockQt(); + unlockTQt(); */ } @@ -956,7 +956,7 @@ HandleRFBServerMessage() if (rect.encoding == rfbEncodingXCursor || rect.encoding == rfbEncodingRichCursor) { - if (!HandleCursorShape(rect.r.x, rect.r.y, rect.r.w, rect.r.h, + if (!HandletqCursorShape(rect.r.x, rect.r.y, rect.r.w, rect.r.h, rect.encoding)) { return False; } diff --git a/krdc/vnc/rfbproto.h b/krdc/vnc/rfbproto.h index f08fe66a..9622eb2e 100644 --- a/krdc/vnc/rfbproto.h +++ b/krdc/vnc/rfbproto.h @@ -27,7 +27,7 @@ * * All multiple byte integers are in big endian (network) order (most * significant byte first). Unless noted otherwise there is no special - * alignment of protocol structures. + * tqalignment of protocol structures. * * * Once the initial handshaking is done, all messages start with a type byte, @@ -54,7 +54,7 @@ /*----------------------------------------------------------------------------- * Structure used to specify a rectangle. This structure is a multiple of 4 * bytes so that it can be interspersed with 32-bit pixel data without - * affecting alignment. + * affecting tqalignment. */ typedef struct { @@ -299,7 +299,7 @@ typedef struct { /* * Special encoding numbers: * 0xFFFFFF00 .. 0xFFFFFF0F -- encoding-specific compression levels; - * 0xFFFFFF10 .. 0xFFFFFF1F -- mouse cursor shape data; + * 0xFFFFFF10 .. 0xFFFFFF1F -- mouse cursor tqshape data; * 0xFFFFFF20 .. 0xFFFFFF2F -- various protocol extensions; * 0xFFFFFF30 .. 0xFFFFFFDF -- not allocated yet; * 0xFFFFFFE0 .. 0xFFFFFFEF -- quality level for JPEG compressor; @@ -350,7 +350,7 @@ typedef struct { * This message consists of a header giving the number of rectangles of pixel * data followed by the rectangles themselves. The header is padded so that * together with the type byte it is an exact multiple of 4 bytes (to help - * with alignment of 32-bit pixels): + * with tqalignment of 32-bit pixels): */ typedef struct { @@ -436,11 +436,11 @@ typedef struct { * the last tile in each row will be correspondingly smaller. Similarly if the * height is not an exact multiple of 16 then the height of each tile in the * final row will also be smaller. Each tile begins with a "subencoding" type - * byte, which is a mask made up of a number of bits. If the Raw bit is set + * byte, which is a tqmask made up of a number of bits. If the Raw bit is set * then the other bits are irrelevant; w*h pixel values follow (where w and h * are the width and height of the tile). Otherwise the tile is encoded in a * similar way to RRE, except that the position and size of each subrectangle - * can be specified in just two bytes. The other bits in the mask are as + * can be specified in just two bytes. The other bits in the tqmask are as * follows: * * BackgroundSpecified - if set, a pixel value follows which specifies @@ -633,7 +633,7 @@ typedef struct { /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * XCursor encoding. This is a special encoding used to transmit X-style - * cursor shapes from server to clients. Note that for this encoding, + * cursor tqshapes from server to clients. Note that for this encoding, * coordinates in rfbFramebufferUpdateRectHeader structure hold hotspot * position (r.x, r.y) and cursor size (r.w, r.h). If (w * h != 0), two RGB * samples are sent after header in the rfbXCursorColors structure. They @@ -664,7 +664,7 @@ typedef struct { /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * RichCursor encoding. This is a special encoding used to transmit cursor - * shapes from server to clients. It is similar to the XCursor encoding but + * tqshapes from server to clients. It is similar to the XCursor encoding but * uses client pixel format instead of two RGB colors to represent cursor * image. For this encoding, coordinates in rfbFramebufferUpdateRectHeader * structure hold hotspot position (r.x, r.y) and cursor size (r.w, r.h). @@ -706,10 +706,10 @@ typedef struct { CARD16 imageLength; /* * Followed by an image of the cursor in the client's image format - * with the following RLE mask compression. It begins with CARD8 that - * specifies the number of mask'ed pixels that will be NOT transmitted. - * Then follows a CARD8 that specified by the number of unmask'd pixels - * that will be transmitted next. Then a CARD8 with the number of mask'd + * with the following RLE tqmask compression. It begins with CARD8 that + * specifies the number of tqmask'ed pixels that will be NOT transmitted. + * Then follows a CARD8 that specified by the number of untqmask'd pixels + * that will be transmitted next. Then a CARD8 with the number of tqmask'd * pixels and so on. */ } rfbSoftCursorSetImage; diff --git a/krdc/vnc/threads.cpp b/krdc/vnc/threads.cpp index ec033388..f4e0eefe 100644 --- a/krdc/vnc/threads.cpp +++ b/krdc/vnc/threads.cpp @@ -31,11 +31,11 @@ static const int MAXIMUM_WAIT_PERIOD = 8000; // time to postpone incremental updates that have not been requested explicitly -static const int POSTPONED_INCRRQ_WAIT_PERIOD = 110; +static const int POSTPONED_INCRRTQ_WAIT_PERIOD = 110; -static const int MOUSEPRESS_QUEUE_SIZE = 5; -static const int MOUSEMOVE_QUEUE_SIZE = 3; -static const int KEY_QUEUE_SIZE = 8192; +static const int MOUSEPRESS_TQUEUE_SIZE = 5; +static const int MOUSEMOVE_TQUEUE_SIZE = 3; +static const int KEY_TQUEUE_SIZE = 8192; ControllerThread::ControllerThread(KVncView *v, WriterThread &wt, volatile bool &quitFlag) : @@ -47,7 +47,7 @@ ControllerThread::ControllerThread(KVncView *v, WriterThread &wt, volatile bool { } -void ControllerThread::changeStatus(RemoteViewStatus s) { +void ControllerThread::changetqStatus(RemoteViewtqStatus s) { m_status = s; TQApplication::postEvent(m_view, new StatusChangeEvent(s)); } @@ -86,13 +86,13 @@ void ControllerThread::run() { return; } if (m_quitFlag) { - changeStatus(REMOTE_VIEW_DISCONNECTED); + changetqStatus(REMOTE_VIEW_DISCONNECTED); return; } - changeStatus(REMOTE_VIEW_AUTHENTICATING); + changetqStatus(REMOTE_VIEW_AUTHENTICATING); - enum InitStatus s = InitialiseRFBConnection(); + enum InittqStatus s = InitialiseRFBConnection(); if (s != INIT_OK) { if (s == INIT_CONNECTION_FAILED) sendFatalError(ERROR_IO); @@ -103,7 +103,7 @@ void ControllerThread::run() { else if (s == INIT_AUTHENTICATION_FAILED) sendFatalError(ERROR_AUTHENTICATION); else if (s == INIT_ABORTED) - changeStatus(REMOTE_VIEW_DISCONNECTED); + changetqStatus(REMOTE_VIEW_DISCONNECTED); else sendFatalError(ERROR_INTERNAL); return; @@ -120,18 +120,18 @@ void ControllerThread::run() { m_waiter.wait(1000); if (m_quitFlag) { - changeStatus(REMOTE_VIEW_DISCONNECTED); + changetqStatus(REMOTE_VIEW_DISCONNECTED); return; } - changeStatus(REMOTE_VIEW_PREPARING); + changetqStatus(REMOTE_VIEW_PREPARING); if (!SetFormatAndEncodings()) { sendFatalError(ERROR_INTERNAL); return; } - changeStatus(REMOTE_VIEW_CONNECTED); + changetqStatus(REMOTE_VIEW_CONNECTED); m_wthread.start(); @@ -143,11 +143,11 @@ void ControllerThread::run() { } m_quitFlag = true; - changeStatus(REMOTE_VIEW_DISCONNECTED); + changetqStatus(REMOTE_VIEW_DISCONNECTED); m_wthread.kick(); } -enum RemoteViewStatus ControllerThread::status() { +enum RemoteViewtqStatus ControllerThread::status() { return m_status; } @@ -173,7 +173,7 @@ WriterThread::WriterThread(KVncView *v, volatile bool &quitFlag) : m_incrementalUpdateAnnounced(false), m_mouseEventNum(0), m_keyEventNum(0), - m_clientCut(TQString::null) + m_clientCut(TQString()) { writerThread = this; m_lastIncrUpdate.start(); @@ -185,7 +185,7 @@ bool WriterThread::sendIncrementalUpdateRequest() { } bool WriterThread::sendUpdateRequest(const TQRegion ®ion) { - TQMemArray<TQRect> r = region.rects(); + TQMemArray<TQRect> r = region.tqrects(); for (unsigned int i = 0; i < r.size(); i++) if (!SendFramebufferUpdateRequest(r[i].x(), r[i].y(), @@ -246,12 +246,12 @@ void WriterThread::queueMouseEvent(int x, int y, int buttonMask) { m_lock.unlock(); return; } - if (m_mouseEventNum >= MOUSEPRESS_QUEUE_SIZE) { + if (m_mouseEventNum >= MOUSEPRESS_TQUEUE_SIZE) { m_lock.unlock(); return; } if ((m_lastMouseEvent.buttons == buttonMask) && - (m_mouseEventNum >= MOUSEMOVE_QUEUE_SIZE)) { + (m_mouseEventNum >= MOUSEMOVE_TQUEUE_SIZE)) { m_lock.unlock(); return; } @@ -272,7 +272,7 @@ void WriterThread::queueKeyEvent(unsigned int k, bool down) { e.e.k.down = down; m_lock.lock(); - if (m_keyEventNum >= KEY_QUEUE_SIZE) { + if (m_keyEventNum >= KEY_TQUEUE_SIZE) { m_lock.unlock(); return; } @@ -317,7 +317,7 @@ void WriterThread::run() { (clientCut.isNull())) { if (!m_waiter.wait(&m_lock, m_lastIncrUpdatePostponed ? - POSTPONED_INCRRQ_WAIT_PERIOD : MAXIMUM_WAIT_PERIOD)) + POSTPONED_INCRRTQ_WAIT_PERIOD : MAXIMUM_WAIT_PERIOD)) m_incrementalUpdateRQ = true; m_lock.unlock(); } @@ -328,7 +328,7 @@ void WriterThread::run() { m_inputEvents.clear(); m_keyEventNum = 0; m_mouseEventNum = 0; - m_clientCut = TQString::null; + m_clientCut = TQString(); m_lock.unlock(); // always send incremental update, unless diff --git a/krdc/vnc/threads.h b/krdc/vnc/threads.h index 08ca4c20..4bb77ef3 100644 --- a/krdc/vnc/threads.h +++ b/krdc/vnc/threads.h @@ -102,18 +102,18 @@ protected: class ControllerThread : public TQThread { private: KVncView *m_view; - enum RemoteViewStatus m_status; + enum RemoteViewtqStatus m_status; WriterThread &m_wthread; volatile bool &m_quitFlag; volatile bool m_desktopInitialized; TQWaitCondition m_waiter; - void changeStatus(RemoteViewStatus s); + void changetqStatus(RemoteViewtqStatus s); void sendFatalError(ErrorCode s); public: ControllerThread(KVncView *v, WriterThread &wt, volatile bool &quitFlag); - enum RemoteViewStatus status(); + enum RemoteViewtqStatus status(); void desktopInit(); void kick(); diff --git a/krdc/vnc/vnchostpref.cpp b/krdc/vnc/vnchostpref.cpp index 7fea2889..3ae6ed92 100644 --- a/krdc/vnc/vnchostpref.cpp +++ b/krdc/vnc/vnchostpref.cpp @@ -96,7 +96,7 @@ TQString VncHostPref::prefDescription() const { Q_ASSERT(true); } return i18n("Show Preferences: %1, Quality: %2, KWallet: %3") - .arg(m_askOnConnect ? i18n("yes") : i18n("no")).arg(q).arg(m_useKWallet ? i18n("yes") : i18n("no")); + .tqarg(m_askOnConnect ? i18n("yes") : i18n("no")).tqarg(q).tqarg(m_useKWallet ? i18n("yes") : i18n("no")); } void VncHostPref::setQuality(int q) { diff --git a/krdc/vnc/vnchostpref.h b/krdc/vnc/vnchostpref.h index cfd91053..d6a2c97c 100644 --- a/krdc/vnc/vnchostpref.h +++ b/krdc/vnc/vnchostpref.h @@ -36,8 +36,8 @@ protected: public: static const TQString VncType; - VncHostPref(KConfig *conf, const TQString &host=TQString::null, - const TQString &type=TQString::null); + VncHostPref(KConfig *conf, const TQString &host=TQString(), + const TQString &type=TQString()); virtual ~VncHostPref(); virtual TQString prefDescription() const; diff --git a/krdc/vnc/vncprefs.ui b/krdc/vnc/vncprefs.ui index 034b2b1a..0522d324 100644 --- a/krdc/vnc/vncprefs.ui +++ b/krdc/vnc/vncprefs.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>VncPrefs</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>VncPrefs</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>cbUseEncryption</cstring> </property> @@ -44,7 +44,7 @@ <string>Enable this option to encrypt the connection. Only newer servers support this option. Encrypting prevents others from eavesdropping, but can slow down the connection considerably.</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>cbUseKWallet</cstring> </property> @@ -58,7 +58,7 @@ <string>Enable this option to store your passwords with KWallet.</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>connectionTypeLabel</cstring> </property> @@ -77,7 +77,7 @@ <cstring>cmbQuality</cstring> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <item> <property name="text"> <string>High Quality (LAN, direct connection)</string> @@ -104,7 +104,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>280</width> <height>0</height> @@ -124,7 +124,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>84</width> <height>16</height> @@ -133,7 +133,7 @@ </spacer> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>cbShowPrefs</cstring> </property> @@ -160,6 +160,6 @@ <function specifier="non virtual">setUseKWallet( bool b )</function> <function specifier="non virtual" returnType="bool">useKWallet()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> </UI> diff --git a/krdc/vnc/vncprefs.ui.h b/krdc/vnc/vncprefs.ui.h index a3438f05..e6cc9432 100644 --- a/krdc/vnc/vncprefs.ui.h +++ b/krdc/vnc/vncprefs.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/krdc/vnc/vnctypes.h b/krdc/vnc/vnctypes.h index fae12549..4dba9a5c 100644 --- a/krdc/vnc/vnctypes.h +++ b/krdc/vnc/vnctypes.h @@ -54,7 +54,7 @@ typedef struct { } AppData; -enum InitStatus { +enum InittqStatus { INIT_OK = 0, INIT_NAME_RESOLUTION_FAILURE = 1, INIT_PROTOCOL_FAILURE = 2, diff --git a/krdc/vnc/vncviewer.h b/krdc/vnc/vncviewer.h index 285357b9..4b1f6cb9 100644 --- a/krdc/vnc/vncviewer.h +++ b/krdc/vnc/vncviewer.h @@ -155,7 +155,7 @@ typedef struct { extern PointerImage pointerImages[]; extern int ConnectToRFBServer(const char *hostname, int port); -extern enum InitStatus InitialiseRFBConnection(void); +extern enum InittqStatus InitialiseRFBConnection(void); extern Bool SetFormatAndEncodings(void); extern Bool SendIncrementalFramebufferUpdateRequest(void); extern Bool SendFramebufferUpdateRequest(int x, int y, int w, int h, |