author | ar <ar> | 2004-02-21 18:32:37 (UTC) |
---|---|---|
committer | ar <ar> | 2004-02-21 18:32:37 (UTC) |
commit | 536f271b1e6a1d1886e96a28524a3503c4c38c4e (patch) (side-by-side diff) | |
tree | 63b3c0ce472a89a0f9731195fececc701bf4ca67 /noncore/settings/networksettings/ppp/modeminfo.cpp | |
parent | db2afda83e495bff9fc19fa14a30072f1cd4c67a (diff) | |
download | opie-536f271b1e6a1d1886e96a28524a3503c4c38c4e.zip opie-536f271b1e6a1d1886e96a28524a3503c4c38c4e.tar.gz opie-536f271b1e6a1d1886e96a28524a3503c4c38c4e.tar.bz2 |
improve support for BigScreen
Diffstat (limited to 'noncore/settings/networksettings/ppp/modeminfo.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/modeminfo.cpp | 65 |
1 files changed, 42 insertions, 23 deletions
diff --git a/noncore/settings/networksettings/ppp/modeminfo.cpp b/noncore/settings/networksettings/ppp/modeminfo.cpp index dbb26db..df0bf9b 100644 --- a/noncore/settings/networksettings/ppp/modeminfo.cpp +++ b/noncore/settings/networksettings/ppp/modeminfo.cpp @@ -25,14 +25,18 @@ */ -#include <unistd.h> +#include "modeminfo.h" +#include "modem.h" + +/* OPIE */ +#include <qpe/qpeapplication.h> + +/* QT */ #include <qregexp.h> #include <qlayout.h> -// #include <kwin.h> -// #include <kmessagebox.h> -// #include <kapplication.h> #include <qmessagebox.h> #include <qapplication.h> -#include "modeminfo.h" -#include "modem.h" + +/* STD */ +#include <unistd.h> ModemTransfer::ModemTransfer(Modem *mo, QWidget *parent, const char *name) @@ -94,5 +98,6 @@ ModemTransfer::ModemTransfer(Modem *mo, QWidget *parent, const char *name) -void ModemTransfer::ati_done() { +void ModemTransfer::ati_done() +{ scripttimer->stop(); timeout_timer->stop(); @@ -105,6 +110,6 @@ void ModemTransfer::ati_done() { for(int i = 0; i < NUM_OF_ATI; i++) mi->setAtiString(i, ati_query_strings[i]); - mi->showMaximized(); - mi->exec(); + + QPEApplication::execDialog( mi ); delete mi; @@ -113,5 +118,6 @@ void ModemTransfer::ati_done() { -void ModemTransfer::time_out_slot() { +void ModemTransfer::time_out_slot() +{ timeout_timer->stop(); scripttimer->stop(); @@ -122,10 +128,12 @@ void ModemTransfer::time_out_slot() { -void ModemTransfer::init() { +void ModemTransfer::init() +{ qApp->processEvents(); int lock = _modem->lockdevice(); - if (lock == 1) { + if (lock == 1) + { statusBar->setText(QObject::tr("Modem device is locked.")); @@ -133,5 +141,6 @@ void ModemTransfer::init() { } - if (lock == -1) { + if (lock == -1) + { statusBar->setText(QObject::tr("Unable to create modem lock file.")); @@ -140,6 +149,8 @@ void ModemTransfer::init() { - if(_modem->opentty()) { - if(_modem->hangup()) { + if(_modem->opentty()) + { + if(_modem->hangup()) + { usleep(100000); // wait 0.1 secs _modem->writeLine("ATE0Q1V1"); // E0 don't echo the commands I send ... @@ -166,9 +177,11 @@ void ModemTransfer::init() { -void ModemTransfer::do_script() { +void ModemTransfer::do_script() +{ QString msg; QString query; - switch(step) { + switch(step) + { case 0: readtty(); @@ -200,10 +213,12 @@ void ModemTransfer::do_script() { } -void ModemTransfer::readChar(unsigned char c) { +void ModemTransfer::readChar(unsigned char c) +{ if(readbuffer.length() < 255) readbuffer += c; } -void ModemTransfer::readtty() { +void ModemTransfer::readtty() +{ if (step == 0) @@ -221,5 +236,6 @@ void ModemTransfer::readtty() { -void ModemTransfer::cancelbutton() { +void ModemTransfer::cancelbutton() +{ scripttimer->stop(); _modem->stop(); @@ -237,5 +253,6 @@ void ModemTransfer::cancelbutton() { -void ModemTransfer::closeEvent( QCloseEvent *e ) { +void ModemTransfer::closeEvent( QCloseEvent *e ) +{ cancelbutton(); e->accept(); @@ -255,5 +272,6 @@ ModemInfo::ModemInfo(QWidget *parent, const char* name) QGridLayout *l1 = new QGridLayout(NUM_OF_ATI, 2, 5); tl->addLayout(l1, 1); - for(int i = 0 ; i < NUM_OF_ATI ; i++) { + for(int i = 0 ; i < NUM_OF_ATI ; i++) + { label_text = ""; @@ -287,5 +305,6 @@ ModemInfo::ModemInfo(QWidget *parent, const char* name) -void ModemInfo::setAtiString(int i, QString s) { +void ModemInfo::setAtiString(int i, QString s) +{ if(i < NUM_OF_ATI) ati_label_result[i]->setText(s); |