summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/modeminfo.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings/ppp/modeminfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/modeminfo.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/noncore/settings/networksettings/ppp/modeminfo.cpp b/noncore/settings/networksettings/ppp/modeminfo.cpp
index 0bec186..dbb26db 100644
--- a/noncore/settings/networksettings/ppp/modeminfo.cpp
+++ b/noncore/settings/networksettings/ppp/modeminfo.cpp
@@ -31,20 +31,18 @@
// #include <kmessagebox.h>
// #include <kapplication.h>
#include <qmessagebox.h>
#include <qapplication.h>
#include "modeminfo.h"
#include "modem.h"
-//#include <klocale.h>
-#define i18n QObject::tr
ModemTransfer::ModemTransfer(Modem *mo, QWidget *parent, const char *name)
: QDialog(parent, name,TRUE, WStyle_Customize|WStyle_NormalBorder),
_modem(mo)
{
- setCaption(i18n("ATI Query"));
+ setCaption(QObject::tr("ATI Query"));
// KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
progressBar = new QProgressBar(this, "bar");
progressBar->setTotalSteps(8);
@@ -55,23 +53,23 @@ ModemTransfer::ModemTransfer(Modem *mo, QWidget *parent, const char *name)
// This is a rather complicated case. Since we do not know which
// message is the widest in the national language, we'd to
// search all these messages. This is a little overkill, so I take
// the longest english message, translate it and give it additional
// 20 percent space. Hope this is enough.
- statusBar->setText(i18n("Unable to create modem lock file."));
+ statusBar->setText(QObject::tr("Unable to create modem lock file."));
statusBar->setFixedWidth((statusBar->sizeHint().width() * 12) / 10);
statusBar->setFixedHeight(statusBar->sizeHint().height() + 4);
// set original text
- statusBar->setText(i18n("Looking for modem..."));
+ statusBar->setText(QObject::tr("Looking for modem..."));
progressBar->setFixedHeight(statusBar->minimumSize().height());
tl->addWidget(progressBar);
tl->addWidget(statusBar);
- cancel = new QPushButton(i18n("Cancel"), this);
+ cancel = new QPushButton(QObject::tr("Cancel"), this);
cancel->setFocus();
connect(cancel, SIGNAL(clicked()), SLOT(cancelbutton()));
QHBoxLayout *l1 = new QHBoxLayout;
tl->addLayout(l1);
l1->addStretch(1);
@@ -115,41 +113,41 @@ void ModemTransfer::ati_done() {
void ModemTransfer::time_out_slot() {
timeout_timer->stop();
scripttimer->stop();
- QMessageBox::warning(this, tr("Error"), i18n("Modem Query timed out."));
+ QMessageBox::warning(this, tr("Error"), QObject::tr("Modem Query timed out."));
reject();
}
void ModemTransfer::init() {
qApp->processEvents();
int lock = _modem->lockdevice();
if (lock == 1) {
- statusBar->setText(i18n("Modem device is locked."));
+ statusBar->setText(QObject::tr("Modem device is locked."));
return;
}
if (lock == -1) {
- statusBar->setText(i18n("Unable to create modem lock file."));
+ statusBar->setText(QObject::tr("Unable to create modem lock file."));
return;
}
if(_modem->opentty()) {
if(_modem->hangup()) {
usleep(100000); // wait 0.1 secs
_modem->writeLine("ATE0Q1V1"); // E0 don't echo the commands I send ...
- statusBar->setText(i18n("Modem Ready"));
+ statusBar->setText(QObject::tr("Modem Ready"));
qApp->processEvents();
usleep(100000); // wait 0.1 secs
qApp->processEvents();
scripttimer->start(1000); // this one does the ati query
// clear modem buffer
@@ -224,13 +222,13 @@ void ModemTransfer::readtty() {
void ModemTransfer::cancelbutton() {
scripttimer->stop();
_modem->stop();
timeout_timer->stop();
- statusBar->setText(i18n("One moment please..."));
+ statusBar->setText(QObject::tr("One moment please..."));
qApp->processEvents();
_modem->hangup();
_modem->closetty();
_modem->unlockdevice();
@@ -246,13 +244,13 @@ void ModemTransfer::closeEvent( QCloseEvent *e ) {
ModemInfo::ModemInfo(QWidget *parent, const char* name)
: QDialog(parent, name, TRUE, WStyle_Customize|WStyle_NormalBorder)
{
QString label_text;
- setCaption(i18n("Modem Query Results"));
+ setCaption(QObject::tr("Modem Query Results"));
// KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
QGridLayout *l1 = new QGridLayout(NUM_OF_ATI, 2, 5);
tl->addLayout(l1, 1);
@@ -271,13 +269,13 @@ ModemInfo::ModemInfo(QWidget *parent, const char* name)
ati_label_result[i]->setMinimumWidth(fontMetrics().width('H') * 24);
l1->addWidget(ati_label_result[i], i, 1);
}
//tl->addSpacing(1);
QHBoxLayout *l2 = new QHBoxLayout;
- QPushButton *ok = new QPushButton(i18n("Close"), this);
+ QPushButton *ok = new QPushButton(QObject::tr("Close"), this);
ok->setDefault(TRUE);
ok->setFocus();
tl->addLayout(l2);
l2->addStretch(1);