summaryrefslogtreecommitdiffstats
path: root/kppp/conwindow.cpp
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 /kppp/conwindow.cpp
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 'kppp/conwindow.cpp')
-rw-r--r--kppp/conwindow.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/kppp/conwindow.cpp b/kppp/conwindow.cpp
index cc287bb9..e485d862 100644
--- a/kppp/conwindow.cpp
+++ b/kppp/conwindow.cpp
@@ -21,7 +21,7 @@
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include "conwindow.h"
#include "docking.h"
#include "pppdata.h"
@@ -31,9 +31,9 @@
extern PPPData gpppdata;
-ConWindow::ConWindow(QWidget *parent, const char *name,QWidget *mainwidget,
+ConWindow::ConWindow(TQWidget *parent, const char *name,TQWidget *mainwidget,
PPPStats *st)
- : QWidget(parent, name, 0),
+ : TQWidget(parent, name, 0),
minutes(0),
seconds(0),
hours(0),
@@ -43,34 +43,34 @@ ConWindow::ConWindow(QWidget *parent, const char *name,QWidget *mainwidget,
accountingEnabled(false),
volumeAccountingEnabled(false)
{
- info1 = new QLabel(i18n("Connected at:"), this);
- info2 = new QLabel("", this);
+ info1 = new TQLabel(i18n("Connected at:"), this);
+ info2 = new TQLabel("", this);
- timelabel1 = new QLabel(i18n("Time connected:"), this);
- timelabel2 = new QLabel("000:00:00", this);
+ timelabel1 = new TQLabel(i18n("Time connected:"), this);
+ timelabel2 = new TQLabel("000:00:00", this);
- vollabel = new QLabel(i18n("Volume:"), this);
- volinfo = new QLabel("", this);
+ vollabel = new TQLabel(i18n("Volume:"), this);
+ volinfo = new TQLabel("", this);
// now the stuff for accounting
- session_bill_l = new QLabel(i18n("Session bill:"), this);
- session_bill = new QLabel("", this);
- total_bill_l = new QLabel(i18n("Total bill:"), this);
- total_bill = new QLabel("", this);
+ session_bill_l = new TQLabel(i18n("Session bill:"), this);
+ session_bill = new TQLabel("", this);
+ total_bill_l = new TQLabel(i18n("Total bill:"), this);
+ total_bill = new TQLabel("", this);
setCaption("kppp");
- cancelbutton = new QPushButton(this);
+ cancelbutton = new TQPushButton(this);
cancelbutton->setText(i18n("&Disconnect"));
- connect(cancelbutton, SIGNAL(clicked()), mainwidget, SLOT(disconnect()));
+ connect(cancelbutton, TQT_SIGNAL(clicked()), mainwidget, TQT_SLOT(disconnect()));
- statsbutton = new QPushButton(this);
+ statsbutton = new TQPushButton(this);
statsbutton->setText(i18n("De&tails"));
statsbutton->setFocus();
- connect(statsbutton, SIGNAL(clicked()), mainwidget, SLOT(showStats()));
+ connect(statsbutton, TQT_SIGNAL(clicked()), mainwidget, TQT_SLOT(showStats()));
- clocktimer = new QTimer(this);
- connect(clocktimer, SIGNAL(timeout()), SLOT(timeclick()));
+ clocktimer = new TQTimer(this);
+ connect(clocktimer, TQT_SIGNAL(timeout()), TQT_SLOT(timeclick()));
// read window position from config file
int p_x, p_y;
@@ -83,20 +83,20 @@ ConWindow::~ConWindow() {
}
// save window position when window was closed
-bool ConWindow::event(QEvent *e) {
- if (e->type() == QEvent::Hide)
+bool ConWindow::event(TQEvent *e) {
+ if (e->type() == TQEvent::Hide)
{
gpppdata.setWinPosConWin(x(), y());
return true;
}
else
- return QWidget::event(e);
+ return TQWidget::event(e);
}
-QString ConWindow::prettyPrintVolume(unsigned int n) {
+TQString ConWindow::prettyPrintVolume(unsigned int n) {
int idx = 0;
- const QString quant[] = {i18n("Byte"), i18n("KB"),
- i18n("MB"), i18n("GB"), QString::null};
+ const TQString quant[] = {i18n("Byte"), i18n("KB"),
+ i18n("MB"), i18n("GB"), TQString::null};
float n1 = n;
while(n >= 1024 && !quant[idx].isNull()) {
@@ -108,7 +108,7 @@ QString ConWindow::prettyPrintVolume(unsigned int n) {
while(i--)
n1 = n1 / 1024.0;
- QString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
+ TQString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
s += " " + quant[idx];
return s;
}
@@ -123,21 +123,21 @@ void ConWindow::accounting(bool on) {
delete tl1;
// add layout now
- tl1 = new QVBoxLayout(this, 10, 10);
+ tl1 = new TQVBoxLayout(this, 10, 10);
tl1->addSpacing(5);
- QHBoxLayout *tl = new QHBoxLayout;
+ TQHBoxLayout *tl = new QHBoxLayout;
tl1->addLayout(tl);
tl->addSpacing(20);
- QGridLayout *l1;
+ TQGridLayout *l1;
int vol_lines = 0;
if(gpppdata.VolAcctEnabled())
vol_lines = 1;
if(accountingEnabled)
- l1 = new QGridLayout(4 + vol_lines, 2, 5);
+ l1 = new TQGridLayout(4 + vol_lines, 2, 5);
else
- l1 = new QGridLayout(2 + vol_lines, 2, 5);
+ l1 = new TQGridLayout(2 + vol_lines, 2, 5);
tl->addLayout(l1);
l1->setColStretch(0, 0);
l1->setColStretch(1, 1);
@@ -148,9 +148,9 @@ void ConWindow::accounting(bool on) {
total_bill->setAlignment(AlignRight|AlignVCenter);
volinfo->setAlignment(AlignRight|AlignVCenter);
// make sure that there's enough space for the bills
- QString s1 = session_bill->text();
- QString s2 = total_bill->text();
- QString s3 = volinfo->text();
+ TQString s1 = session_bill->text();
+ TQString s2 = total_bill->text();
+ TQString s3 = volinfo->text();
session_bill->setText("888888.88 XXX");
total_bill->setText("888888.88 XXX");
@@ -204,7 +204,7 @@ void ConWindow::accounting(bool on) {
}
tl->addSpacing(10);
- QVBoxLayout *l2 = new QVBoxLayout(5);
+ TQVBoxLayout *l2 = new TQVBoxLayout(5);
tl->addLayout(l2);
l2->addStretch(1);
l2->addWidget(statsbutton);
@@ -218,8 +218,8 @@ void ConWindow::accounting(bool on) {
/*
do not overwrite position read from config
// If this gets re-enabled, fix it for Xinerama before committing to CVS.
- setGeometry((QApplication::desktop()->width() - width()) / 2,
- (QApplication::desktop()->height() - height())/2,
+ setGeometry((TQApplication::desktop()->width() - width()) / 2,
+ (TQApplication::desktop()->height() - height())/2,
width(),
height());
*/
@@ -236,7 +236,7 @@ void ConWindow::startClock() {
minutes = 0;
seconds = 0;
hours = 0;
- QString title ;
+ TQString title ;
title = gpppdata.accname();
@@ -250,7 +250,7 @@ void ConWindow::startClock() {
}
-void ConWindow::setConnectionSpeed(const QString &speed) {
+void ConWindow::setConnectionSpeed(const TQString &speed) {
info2->setText(speed);
}
@@ -261,7 +261,7 @@ void ConWindow::stopClock() {
void ConWindow::timeclick() {
- QString tooltip = i18n("Connection: %1\n"
+ TQString tooltip = i18n("Connection: %1\n"
"Connected at: %2\n"
"Time connected: %3")
.arg(gpppdata.accname()).arg(info2->text())
@@ -317,11 +317,11 @@ void ConWindow::timeclick() {
setCaption(caption_string);
}
- QToolTip::add(DockWidget::dock_widget, tooltip);
+ TQToolTip::add(DockWidget::dock_widget, tooltip);
}
-void ConWindow::closeEvent( QCloseEvent *e ){
+void ConWindow::closeEvent( TQCloseEvent *e ){
// we don't want to lose the
// conwindow since this is our last connection kppp.
// if we lost it we could only kill the program by hand to get on with life.
@@ -332,7 +332,7 @@ void ConWindow::closeEvent( QCloseEvent *e ){
}
-void ConWindow::slotAccounting(QString total, QString session) {
+void ConWindow::slotAccounting(TQString total, TQString session) {
total_bill->setText(total);
session_bill->setText(session);
}