-rw-r--r-- | noncore/apps/opie-console/default.cpp | 5 | ||||
-rw-r--r-- | noncore/apps/opie-console/dialer.cpp | 3 | ||||
-rw-r--r-- | noncore/apps/opie-console/dialer.h | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/io_modem.cpp | 8 |
4 files changed, 13 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/default.cpp b/noncore/apps/opie-console/default.cpp index ce5c870..5c1c05a 100644 --- a/noncore/apps/opie-console/default.cpp +++ b/noncore/apps/opie-console/default.cpp @@ -1,7 +1,8 @@ #include "io_serial.h" #include "io_irda.h" #include "io_bt.h" +#include "io_modem.h" #include "filetransfer.h" #include "filereceive.h" #include "serialconfigwidget.h" #include "irdaconfigwidget.h" @@ -44,8 +45,11 @@ extern "C" { } IOLayer* newIrDaLayer( const Profile& prof ) { return new IOIrda( prof ); } + IOLayer* newModemLayer( const Profile& prof ) { + return new IOModem( prof ); + } // Connection Widgets ProfileDialogWidget* newSerialWidget( const QString& str, QWidget* wid ) { return new SerialConfigWidget( str, wid ); @@ -84,8 +88,9 @@ Default::Default( MetaFactory* fact ) { fact->addIOLayerFactory( "serial", QObject::tr("Serial"), newSerialLayer ); fact->addIOLayerFactory( "irda", QObject::tr("Infrared"), newIrDaLayer ); fact->addIOLayerFactory( "bt", QObject::tr("Bluetooth"), newBTLayer ); + fact->addIOLayerFactory( "modem", QObject::tr("Modem"), newModemLayer ); fact->addConnectionWidgetFactory( "serial", QObject::tr("Serial"), newSerialWidget ); fact->addConnectionWidgetFactory( "irda", QObject::tr("Infrared"), newIrDaWidget ); fact->addConnectionWidgetFactory( "modem", QObject::tr("Modem"), newModemWidget ); diff --git a/noncore/apps/opie-console/dialer.cpp b/noncore/apps/opie-console/dialer.cpp index d20965a..90e2b6c 100644 --- a/noncore/apps/opie-console/dialer.cpp +++ b/noncore/apps/opie-console/dialer.cpp @@ -44,15 +44,14 @@ //int speed = prof.readNumEntry("Speed"); //QString number = prof.readEntry("Number"); Dialer::Dialer(const Profile& profile, QWidget *parent, const char *name) -: QDialog(parent, name, true) +: QDialog(parent, name, true), m_profile(profile) { QVBoxLayout *vbox; QLabel *desc; usercancel = 0; - m_profile = profile; desc = new QLabel(QObject::tr("Dialing number: %1").arg(m_profile.readEntry("Number")), this); progress = new QProgressBar(this); status = new QLabel("", this); diff --git a/noncore/apps/opie-console/dialer.h b/noncore/apps/opie-console/dialer.h index 8c83bb6..09cc5ca 100644 --- a/noncore/apps/opie-console/dialer.h +++ b/noncore/apps/opie-console/dialer.h @@ -43,9 +43,9 @@ class Dialer : public QDialog QProgressBar *progress; QPushButton *cancel; int state; int usercancel; - Profile m_profile; + const Profile& m_profile; }; #endif diff --git a/noncore/apps/opie-console/io_modem.cpp b/noncore/apps/opie-console/io_modem.cpp index 56147d8..28d1722 100644 --- a/noncore/apps/opie-console/io_modem.cpp +++ b/noncore/apps/opie-console/io_modem.cpp @@ -19,12 +19,16 @@ void IOModem::close() { } bool IOModem::open() { - qWarning("IOModem::open"); - IOSerial::open(); + bool ret = IOSerial::open(); + if(!ret) return false; + + qWarning("IOModem::open continues..."); Dialer d(m_profile); + qWarning("dialer created"); + int result = d.exec(); if(result == QDialog::Accepted) { return true; |