summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/default.cpp5
-rw-r--r--noncore/apps/opie-console/dialer.cpp3
-rw-r--r--noncore/apps/opie-console/dialer.h2
-rw-r--r--noncore/apps/opie-console/io_modem.cpp8
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 @@
1#include "io_serial.h" 1#include "io_serial.h"
2#include "io_irda.h" 2#include "io_irda.h"
3#include "io_bt.h" 3#include "io_bt.h"
4#include "io_modem.h"
4#include "filetransfer.h" 5#include "filetransfer.h"
5#include "filereceive.h" 6#include "filereceive.h"
6#include "serialconfigwidget.h" 7#include "serialconfigwidget.h"
7#include "irdaconfigwidget.h" 8#include "irdaconfigwidget.h"
@@ -44,8 +45,11 @@ extern "C" {
44 } 45 }
45 IOLayer* newIrDaLayer( const Profile& prof ) { 46 IOLayer* newIrDaLayer( const Profile& prof ) {
46 return new IOIrda( prof ); 47 return new IOIrda( prof );
47 } 48 }
49 IOLayer* newModemLayer( const Profile& prof ) {
50 return new IOModem( prof );
51 }
48 52
49 // Connection Widgets 53 // Connection Widgets
50 ProfileDialogWidget* newSerialWidget( const QString& str, QWidget* wid ) { 54 ProfileDialogWidget* newSerialWidget( const QString& str, QWidget* wid ) {
51 return new SerialConfigWidget( str, wid ); 55 return new SerialConfigWidget( str, wid );
@@ -84,8 +88,9 @@ Default::Default( MetaFactory* fact ) {
84 88
85 fact->addIOLayerFactory( "serial", QObject::tr("Serial"), newSerialLayer ); 89 fact->addIOLayerFactory( "serial", QObject::tr("Serial"), newSerialLayer );
86 fact->addIOLayerFactory( "irda", QObject::tr("Infrared"), newIrDaLayer ); 90 fact->addIOLayerFactory( "irda", QObject::tr("Infrared"), newIrDaLayer );
87 fact->addIOLayerFactory( "bt", QObject::tr("Bluetooth"), newBTLayer ); 91 fact->addIOLayerFactory( "bt", QObject::tr("Bluetooth"), newBTLayer );
92 fact->addIOLayerFactory( "modem", QObject::tr("Modem"), newModemLayer );
88 93
89 fact->addConnectionWidgetFactory( "serial", QObject::tr("Serial"), newSerialWidget ); 94 fact->addConnectionWidgetFactory( "serial", QObject::tr("Serial"), newSerialWidget );
90 fact->addConnectionWidgetFactory( "irda", QObject::tr("Infrared"), newIrDaWidget ); 95 fact->addConnectionWidgetFactory( "irda", QObject::tr("Infrared"), newIrDaWidget );
91 fact->addConnectionWidgetFactory( "modem", QObject::tr("Modem"), newModemWidget ); 96 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 @@
44//int speed = prof.readNumEntry("Speed"); 44//int speed = prof.readNumEntry("Speed");
45//QString number = prof.readEntry("Number"); 45//QString number = prof.readEntry("Number");
46 46
47Dialer::Dialer(const Profile& profile, QWidget *parent, const char *name) 47Dialer::Dialer(const Profile& profile, QWidget *parent, const char *name)
48: QDialog(parent, name, true) 48: QDialog(parent, name, true), m_profile(profile)
49{ 49{
50 QVBoxLayout *vbox; 50 QVBoxLayout *vbox;
51 QLabel *desc; 51 QLabel *desc;
52 52
53 usercancel = 0; 53 usercancel = 0;
54 m_profile = profile;
55 54
56 desc = new QLabel(QObject::tr("Dialing number: %1").arg(m_profile.readEntry("Number")), this); 55 desc = new QLabel(QObject::tr("Dialing number: %1").arg(m_profile.readEntry("Number")), this);
57 progress = new QProgressBar(this); 56 progress = new QProgressBar(this);
58 status = new QLabel("", this); 57 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
43 QProgressBar *progress; 43 QProgressBar *progress;
44 QPushButton *cancel; 44 QPushButton *cancel;
45 int state; 45 int state;
46 int usercancel; 46 int usercancel;
47 Profile m_profile; 47 const Profile& m_profile;
48}; 48};
49 49
50#endif 50#endif
51 51
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() {
19 19
20} 20}
21 21
22bool IOModem::open() { 22bool IOModem::open() {
23 qWarning("IOModem::open"); 23 bool ret = IOSerial::open();
24 IOSerial::open(); 24 if(!ret) return false;
25
26 qWarning("IOModem::open continues...");
25 27
26 Dialer d(m_profile); 28 Dialer d(m_profile);
29 qWarning("dialer created");
30
27 int result = d.exec(); 31 int result = d.exec();
28 if(result == QDialog::Accepted) 32 if(result == QDialog::Accepted)
29 { 33 {
30 return true; 34 return true;