summaryrefslogtreecommitdiffstats
path: root/krdc/rdp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /krdc/rdp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krdc/rdp')
-rw-r--r--krdc/rdp/krdpview.cpp62
-rw-r--r--krdc/rdp/krdpview.h34
-rw-r--r--krdc/rdp/rdphostpref.cpp16
-rw-r--r--krdc/rdp/rdphostpref.h20
4 files changed, 66 insertions, 66 deletions
diff --git a/krdc/rdp/krdpview.cpp b/krdc/rdp/krdpview.cpp
index 3415ae14..2fdbdab8 100644
--- a/krdc/rdp/krdpview.cpp
+++ b/krdc/rdp/krdpview.cpp
@@ -27,7 +27,7 @@
#include <kwallet.h>
#include <kpassdlg.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include <qxembed.h>
#include <X11/Xlib.h>
@@ -45,7 +45,7 @@ extern KWallet::Wallet *wallet;
static KRdpView *krdpview;
-RdpContainer::RdpContainer(QWidget *parent, const char *name, WFlags f) :
+RdpContainer::RdpContainer(TQWidget *parent, const char *name, WFlags f) :
QXEmbed(parent, name, f),
m_viewOnly(false)
{
@@ -82,11 +82,11 @@ bool RdpContainer::x11Event(XEvent *e)
// constructor
-KRdpView::KRdpView(QWidget *parent, const char *name,
- const QString &host, int port,
- const QString &user, const QString &password,
- int flags, const QString &domain,
- const QString &shell, const QString &directory) :
+KRdpView::KRdpView(TQWidget *parent, const char *name,
+ const TQString &host, int port,
+ const TQString &user, const TQString &password,
+ int flags, const TQString &domain,
+ const TQString &shell, const TQString &directory) :
KRemoteView(parent, name, Qt::WResizeNoErase | Qt::WRepaintNoErase | Qt::WStaticContents),
m_name(name),
m_host(host),
@@ -118,13 +118,13 @@ KRdpView::~KRdpView()
}
// returns the size of the framebuffer
-QSize KRdpView::framebufferSize()
+TQSize KRdpView::framebufferSize()
{
return m_container->sizeHint();
}
// returns the suggested size
-QSize KRdpView::sizeHint()
+TQSize KRdpView::sizeHint()
{
return maximumSize();
}
@@ -146,7 +146,7 @@ bool KRdpView::isQuitting()
}
// return the host we're connected to
-QString KRdpView::host()
+TQString KRdpView::host()
{
return m_host;
}
@@ -164,7 +164,7 @@ bool KRdpView::editPreferences( HostPrefPtr host )
int wv = hp->width();
int hv = hp->height();
int cd = hp->colorDepth();
- QString kl = hp->layout();
+ TQString kl = hp->layout();
bool kwallet = hp->useKWallet();
// show preferences dialog
@@ -172,9 +172,9 @@ bool KRdpView::editPreferences( HostPrefPtr host )
i18n( "RDP Host Preferences for %1" ).arg( host->host() ),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true );
- QVBox *vbox = dlg->makeVBoxMainWidget();
+ TQVBox *vbox = dlg->makeVBoxMainWidget();
RdpPrefs *prefs = new RdpPrefs( vbox );
- QWidget *spacer = new QWidget( vbox );
+ TQWidget *spacer = new TQWidget( vbox );
vbox->setStretchFactor( spacer, 10 );
prefs->setRdpWidth( wv );
@@ -185,7 +185,7 @@ bool KRdpView::editPreferences( HostPrefPtr host )
prefs->setShowPrefs( true );
prefs->setUseKWallet(kwallet);
- if ( dlg->exec() == QDialog::Rejected )
+ if ( dlg->exec() == TQDialog::Rejected )
return false;
wv = prefs->rdpWidth();
@@ -209,7 +209,7 @@ bool KRdpView::start()
SmartPtr<RdpHostPref> hp, rdpDefaults;
bool useKWallet = false;
- QWidget *desktop = QApplication::desktop();
+ TQWidget *desktop = TQApplication::desktop();
if(!rdpAppDataConfigured)
{
@@ -233,21 +233,21 @@ bool KRdpView::start()
// Check for fullscreen mode
if ((hp->width() == 0) && (hp->height() == 0)) {
launch_Fullscreen_rdp = true;
- *m_process << "-g" << (QString::number(desktop->width()) + "x" + QString::number((desktop->height()-2)));
+ *m_process << "-g" << (TQString::number(desktop->width()) + "x" + TQString::number((desktop->height()-2)));
}
else {
if ((hp->height() > (desktop->height()-2)) && (hp->height() <= (desktop->height()))) {
- *m_process << "-g" << (QString::number(hp->width()) + "x" + QString::number(desktop->height()-2));
+ *m_process << "-g" << (TQString::number(hp->width()) + "x" + TQString::number(desktop->height()-2));
}
else {
- *m_process << "-g" << (QString::number(hp->width()) + "x" + QString::number(hp->height()));
+ *m_process << "-g" << (TQString::number(hp->width()) + "x" + TQString::number(hp->height()));
}
}
*m_process << "-k" << hp->layout();
if(!m_user.isEmpty()) { *m_process << "-u" << m_user; }
if(m_password.isEmpty() && useKWallet ) {
- QString krdc_folder = "KRDC-RDP";
+ TQString krdc_folder = "KRDC-RDP";
// Bugfix: Check if wallet has been closed by an outside source
if ( wallet && !wallet->isOpen() ) {
@@ -256,7 +256,7 @@ bool KRdpView::start()
// Do we need to open the wallet?
if ( !wallet ) {
- QString walletName = KWallet::Wallet::NetworkWallet();
+ TQString walletName = KWallet::Wallet::NetworkWallet();
wallet = KWallet::Wallet::openWallet(walletName);
}
@@ -275,7 +275,7 @@ bool KRdpView::start()
if ( m_password.isEmpty() ) {
//There must not be an existing entry. Let's make one.
- QCString newPassword;
+ TQCString newPassword;
if (KPasswordDialog::getPassword(newPassword, i18n("Please enter the password.")) == KPasswordDialog::Accepted) {
m_password = newPassword;
wallet->writePassword(m_host, m_password);
@@ -288,13 +288,13 @@ bool KRdpView::start()
*m_process << "-p" << m_password;
}
- *m_process << "-X" << ("0x" + QString::number(m_container->winId(), 16));
- *m_process << "-a" << QString::number(hp->colorDepth());
- *m_process << (m_host + ":" + QString::number(m_port));
- connect(m_process, SIGNAL(processExited(KProcess *)), SLOT(processDied(KProcess *)));
- connect(m_process, SIGNAL(receivedStderr(KProcess *, char *, int)), SLOT(receivedStderr(KProcess *, char *, int)));
- connect(m_container, SIGNAL(embeddedWindowDestroyed()), SLOT(connectionClosed()));
- connect(m_container, SIGNAL(newEmbeddedWindow(WId)), SLOT(connectionOpened(WId)));
+ *m_process << "-X" << ("0x" + TQString::number(m_container->winId(), 16));
+ *m_process << "-a" << TQString::number(hp->colorDepth());
+ *m_process << (m_host + ":" + TQString::number(m_port));
+ connect(m_process, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(processDied(KProcess *)));
+ connect(m_process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), TQT_SLOT(receivedStderr(KProcess *, char *, int)));
+ connect(m_container, TQT_SIGNAL(embeddedWindowDestroyed()), TQT_SLOT(connectionClosed()));
+ connect(m_container, TQT_SIGNAL(newEmbeddedWindow(WId)), TQT_SLOT(connectionOpened(WId)));
qDebug("Color depth: %d", hp->colorDepth());
if(!m_process->start(KProcess::NotifyOnExit, KProcess::Stderr))
{
@@ -340,7 +340,7 @@ void KRdpView::setViewOnly(bool s)
void KRdpView::connectionOpened(WId /*window*/)
{
- QSize size = m_container->sizeHint();
+ TQSize size = m_container->sizeHint();
setStatus(REMOTE_VIEW_CONNECTED);
setFixedSize(size);
@@ -373,8 +373,8 @@ void KRdpView::processDied(KProcess */*proc*/)
void KRdpView::receivedStderr(KProcess */*proc*/, char *buffer, int /*buflen*/)
{
- QString output(buffer);
- QString line;
+ TQString output(buffer);
+ TQString line;
int i = 0;
while(!(line = output.section('\n', i, i)).isEmpty())
{
diff --git a/krdc/rdp/krdpview.h b/krdc/rdp/krdpview.h
index 029336f2..b115bd18 100644
--- a/krdc/rdp/krdpview.h
+++ b/krdc/rdp/krdpview.h
@@ -38,7 +38,7 @@ class RdpContainer : public QXEmbed
friend class KRdpView;
public:
- RdpContainer(QWidget *parent = 0, const char *name = 0, WFlags f = 0);
+ RdpContainer(TQWidget *parent = 0, const char *name = 0, WFlags f = 0);
~RdpContainer();
signals:
@@ -58,23 +58,23 @@ class KRdpView : public KRemoteView
public:
// constructor and destructor
- KRdpView(QWidget *parent = 0, const char *name = 0,
- const QString &host = QString::null, int port = TCP_PORT_RDP,
- const QString &user = QString::null, const QString &password = QString::null,
- int flags = RDP_LOGON_NORMAL, const QString &domain = QString::null,
- const QString &shell = QString::null, const QString &directory = QString::null);
+ KRdpView(TQWidget *parent = 0, const char *name = 0,
+ const TQString &host = TQString::null, int port = TCP_PORT_RDP,
+ const TQString &user = TQString::null, const TQString &password = TQString::null,
+ int flags = RDP_LOGON_NORMAL, const TQString &domain = TQString::null,
+ const TQString &shell = TQString::null, const TQString &directory = TQString::null);
virtual ~KRdpView();
// functions regarding the window
- virtual QSize framebufferSize(); // returns the size of the remote view
- QSize sizeHint(); // returns the suggested size
+ virtual TQSize framebufferSize(); // returns the size of the remote view
+ TQSize sizeHint(); // returns the suggested size
virtual bool viewOnly();
virtual bool startFullscreen();
// functions regarding the connection
virtual void startQuitting(); // start closing the connection
virtual bool isQuitting(); // are we currently closing the connection?
- virtual QString host(); // return the host we're connected to
+ virtual TQString host(); // return the host we're connected to
virtual int port(); // return the port number we're connected on
virtual bool start(); // open a connection
@@ -87,19 +87,19 @@ class KRdpView : public KRemoteView
private:
// properties used for setting up the connection
- QString m_name; // name of the connection
- QString m_host; // the host to connect to
+ TQString m_name; // name of the connection
+ TQString m_host; // the host to connect to
int m_port; // the port on the host
- QString m_user; // the user to use to log in
- QString m_password; // the password to use
+ TQString m_user; // the user to use to log in
+ TQString m_password; // the password to use
int m_flags; // flags which determine how the connection is set up
- QString m_domain; // the domain where the host is on
- QString m_shell; // the shell to use
- QString m_directory; // the working directory on the server
+ TQString m_domain; // the domain where the host is on
+ TQString m_shell; // the shell to use
+ TQString m_directory; // the working directory on the server
// other properties
bool m_quitFlag; // if set: die
- QString m_clientVersion; // version number returned by rdesktop
+ TQString m_clientVersion; // version number returned by rdesktop
RdpContainer *m_container; // container for the rdesktop window
KProcess *m_process; // rdesktop process
diff --git a/krdc/rdp/rdphostpref.cpp b/krdc/rdp/rdphostpref.cpp
index d3854eb5..ba876146 100644
--- a/krdc/rdp/rdphostpref.cpp
+++ b/krdc/rdp/rdphostpref.cpp
@@ -21,9 +21,9 @@
#include <kconfig.h>
#include <klocale.h>
-const QString RdpHostPref::RdpType = "RDP";
+const TQString RdpHostPref::RdpType = "RDP";
-RdpHostPref::RdpHostPref(KConfig *conf, const QString &host, const QString &type) :
+RdpHostPref::RdpHostPref(KConfig *conf, const TQString &host, const TQString &type) :
HostPref(conf, host, type),
m_width(0),
m_height(0),
@@ -43,7 +43,7 @@ void RdpHostPref::save()
if ( !m_host.isEmpty() && !m_type.isEmpty() )
{
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_config->writeEntry(p+"exists", true);
m_config->writeEntry(p+"width", m_width);
m_config->writeEntry(p+"height", m_height);
@@ -69,7 +69,7 @@ void RdpHostPref::load()
if ( !m_host.isEmpty() && !m_type.isEmpty() )
{
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_width = m_config->readNumEntry(p+"width", 0);
m_height = m_config->readNumEntry(p+"height", 0);
m_colorDepth = m_config->readNumEntry(p+"colorDepth", 24);
@@ -86,7 +86,7 @@ void RdpHostPref::load()
void RdpHostPref::remove()
{
m_config->setGroup("PerHostSettings");
- QString p = prefix();
+ TQString p = prefix();
m_config->deleteEntry(p+"exists");
m_config->deleteEntry(p+"width");
m_config->deleteEntry(p+"height");
@@ -107,7 +107,7 @@ void RdpHostPref::setDefaults()
m_useKWallet = m_config->readBoolEntry("rdpUseKWallet", true);
}
-QString RdpHostPref::prefDescription() const
+TQString RdpHostPref::prefDescription() const
{
return i18n("Show Preferences: %1, Resolution: %2x%3, Color Depth: %4, Keymap: %5, KWallet: %6")
.arg(m_askOnConnect ? i18n("yes") : i18n("no")).arg(m_width).arg(m_height)
@@ -148,13 +148,13 @@ int RdpHostPref::colorDepth() const
}
-void RdpHostPref::setLayout(const QString &l)
+void RdpHostPref::setLayout(const TQString &l)
{
m_layout = l;
save();
}
-QString RdpHostPref::layout() const
+TQString RdpHostPref::layout() const
{
return m_layout;
}
diff --git a/krdc/rdp/rdphostpref.h b/krdc/rdp/rdphostpref.h
index bf96da02..6044f261 100644
--- a/krdc/rdp/rdphostpref.h
+++ b/krdc/rdp/rdphostpref.h
@@ -22,7 +22,7 @@
#include "hostpreferences.h"
-static const QString rdpKeymaps[] = { "ar",
+static const TQString rdpKeymaps[] = { "ar",
"cs",
"da",
"de",
@@ -58,7 +58,7 @@ static const QString rdpKeymaps[] = { "ar",
static const int rdpNumKeymaps = 33;
static const int rdpDefaultKeymap = 6; // en-us
-inline int keymap2int(const QString &keymap)
+inline int keymap2int(const TQString &keymap)
{
int layout;
for(layout = 0; layout < rdpNumKeymaps; layout++)
@@ -75,7 +75,7 @@ inline int keymap2int(const QString &keymap)
return layout;
}
-inline QString int2keymap(int layout)
+inline TQString int2keymap(int layout)
{
if(layout < 0 || layout >= rdpNumKeymaps)
{
@@ -93,7 +93,7 @@ class RdpHostPref : public HostPref
int m_width;
int m_height;
int m_colorDepth;
- QString m_layout;
+ TQString m_layout;
bool m_askOnConnect;
bool m_useKWallet;
@@ -103,21 +103,21 @@ class RdpHostPref : public HostPref
virtual void remove();
public:
- static const QString RdpType;
+ static const TQString RdpType;
- RdpHostPref(KConfig *conf, const QString &host=QString::null,
- const QString &type=QString::null);
+ RdpHostPref(KConfig *conf, const TQString &host=TQString::null,
+ const TQString &type=TQString::null);
virtual ~RdpHostPref();
- virtual QString prefDescription() const;
+ virtual TQString prefDescription() const;
void setWidth(int w);
int width() const;
void setHeight(int h);
int height() const;
void setColorDepth(int depth);
int colorDepth() const;
- void setLayout(const QString &l);
- QString layout() const;
+ void setLayout(const TQString &l);
+ TQString layout() const;
void setAskOnConnect(bool ask);
bool askOnConnect() const;
bool useKWallet() const;