summaryrefslogtreecommitdiff
authorzecke <zecke>2002-10-29 19:07:22 (UTC)
committer zecke <zecke>2002-10-29 19:07:22 (UTC)
commita575fd4c862693705018902b4482c5135a8cb6a2 (patch) (side-by-side diff)
treebcdfd7b2b8f62b2fb766b8b8808e17c96668563c
parent5ac67b8aece5aca20419f8953f88a36fd729adfc (diff)
downloadopie-a575fd4c862693705018902b4482c5135a8cb6a2.zip
opie-a575fd4c862693705018902b4482c5135a8cb6a2.tar.gz
opie-a575fd4c862693705018902b4482c5135a8cb6a2.tar.bz2
Make the Modem take custom Ats again
Supply default values set labels to richtext this way we achieve word wrap IO_Layer added a closed(IOLayer*) signal ProfileEditorDialog make Horizontal scrolling on the QScrollView possible. Once the Vertical Scrollbar is there the Modem dialog does not have enough space
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/atconfigdialog.cpp1
-rw-r--r--noncore/apps/opie-console/dialdialog.cpp1
-rw-r--r--noncore/apps/opie-console/dialer.cpp26
-rw-r--r--noncore/apps/opie-console/io_layer.h6
-rw-r--r--noncore/apps/opie-console/io_modem.h2
-rw-r--r--noncore/apps/opie-console/io_serial.cpp6
-rw-r--r--noncore/apps/opie-console/modemconfigwidget.cpp9
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp4
8 files changed, 30 insertions, 25 deletions
diff --git a/noncore/apps/opie-console/atconfigdialog.cpp b/noncore/apps/opie-console/atconfigdialog.cpp
index 5c02692..e683ab3 100644
--- a/noncore/apps/opie-console/atconfigdialog.cpp
+++ b/noncore/apps/opie-console/atconfigdialog.cpp
@@ -155,2 +155,3 @@ QWidget* ATConfigDialog::tab1( QWidget* parent ) {
void ATConfigDialog::readConfig( const Profile& config ) {
+ qWarning("config in atconfigdialog");
diff --git a/noncore/apps/opie-console/dialdialog.cpp b/noncore/apps/opie-console/dialdialog.cpp
index ac1e1db..b91727b 100644
--- a/noncore/apps/opie-console/dialdialog.cpp
+++ b/noncore/apps/opie-console/dialdialog.cpp
@@ -22,2 +22,3 @@ DialDialog::DialDialog( QWidget* parent, const char* name, bool modal, WFlags f
QLabel *textLabel = new QLabel( this );
+ textLabel->setTextFormat( QLabel::RichText );
textLabel->setText( tr("Enter the number you want to dial. When finished, press ok") );
diff --git a/noncore/apps/opie-console/dialer.cpp b/noncore/apps/opie-console/dialer.cpp
index 8524422..67ad10e 100644
--- a/noncore/apps/opie-console/dialer.cpp
+++ b/noncore/apps/opie-console/dialer.cpp
@@ -15,2 +15,4 @@
+#include "io_modem.h"
+
// State machine: | When an error occurs, we don't have to
@@ -55,5 +57,2 @@ Dialer::Dialer(const Profile& profile, int fd, QWidget *parent, const char *name
- //m_profile.writeEntry("InitString", "ATZ");
- //m_profile.writeEntry("DialPrefix1", "ATDT");
- //m_profile.writeEntry("Termination", "\n");
@@ -62,3 +61,2 @@ Dialer::Dialer(const Profile& profile, int fd, QWidget *parent, const char *name
-// fcntl(m_fd, F_SETFL, O_NONBLOCK);
@@ -91,3 +89,3 @@ void Dialer::setHangupOnly()
usercancel = 1;
- send("+++ATH\r");
+ send( m_profile.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING )+"\r" );
}
@@ -144,6 +142,4 @@ void Dialer::trydial(const QString& number)
{
- qWarning("HangupString " + m_profile.readEntry("HangupString"));
- //send(m_profile.readEntry("HangupString"));
- send("+++ATH\r");
- //send("");
+ qWarning("HangupString " + m_profile.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING));
+ send(m_profile.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING ) + "\r");
}
@@ -153,6 +149,4 @@ void Dialer::trydial(const QString& number)
switchState(state_init);
- //send("ATZ");
- qWarning("Init String " + m_profile.readEntry("InitString") );
-// send(m_profile.readEntry("InitString", "AT"));
- send("AT\r");
+// qWarning("Init String " + m_profile.readEntry("InitString") );
+ send(m_profile.readEntry("InitString",MODEM_DEFAULT_INIT_STRING ) + "\r");
QString response2 = receive();
@@ -189,4 +183,6 @@ void Dialer::trydial(const QString& number)
- send(QString("ATDT %1\r").arg(number));
-// send(QString("%1 %2").arg(m_profile.readEntry("DialPrefix1")).arg(number));
+// send(QString("ATDT %1\r").arg(number));
+ send(QString("%1 %2\r").arg(m_profile.readEntry("DialPrefix1", MODEM_DEFAULT_DIAL_PREFIX1 ))
+ .arg(number));
+
QString response5 = receive();
diff --git a/noncore/apps/opie-console/io_layer.h b/noncore/apps/opie-console/io_layer.h
index af61099..ed4478b 100644
--- a/noncore/apps/opie-console/io_layer.h
+++ b/noncore/apps/opie-console/io_layer.h
@@ -96,3 +96,9 @@ signals:
+
virtual void closed();
+
+ /* signal emitted for closure of the IOLayer
+ * for some reasons
+ */
+ virtual void closed(IOLayer*);
public slots:
diff --git a/noncore/apps/opie-console/io_modem.h b/noncore/apps/opie-console/io_modem.h
index 1328706..17228bd 100644
--- a/noncore/apps/opie-console/io_modem.h
+++ b/noncore/apps/opie-console/io_modem.h
@@ -15,3 +15,3 @@
-#define MODEM_DEFAULT_INIT_STRING "ATZ"
+#define MODEM_DEFAULT_INIT_STRING "AT"
#define MODEM_DEFAULT_RESET_STRING "ATZ~"
diff --git a/noncore/apps/opie-console/io_serial.cpp b/noncore/apps/opie-console/io_serial.cpp
index 03e92dd..ddd4994 100644
--- a/noncore/apps/opie-console/io_serial.cpp
+++ b/noncore/apps/opie-console/io_serial.cpp
@@ -168,7 +168,3 @@ void IOSerial::dataArrived() {
return;
- qWarning("got from layer");
- for (int i = 0; i < len; i++ ) {
- printf("%c", array[i] );
- }
- printf("\n");
+
array.resize( len );
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp
index 37eb184..f7fb6f3 100644
--- a/noncore/apps/opie-console/modemconfigwidget.cpp
+++ b/noncore/apps/opie-console/modemconfigwidget.cpp
@@ -134,4 +134,5 @@ void ModemConfigWidget::load( const Profile& prof ) {
-
+ atConf->readConfig( prof );
if ( prof.readEntry( "Device" ).isEmpty() ) {
+ qWarning("device empty!");
return;
@@ -140,3 +141,3 @@ void ModemConfigWidget::load( const Profile& prof ) {
- atConf->readConfig( prof );
+
}
@@ -236,2 +237,6 @@ void ModemConfigWidget::slotAT() {
// ATConfigDialog conf( this, "ATConfig", true );
+ // josef/Max I know why don't you create the stuff on the stack
+ // but making it a TopLevel Dialog and ignoring
+ // cancel is not fun either...
+ // what to do? FIXME!!! -zecke
atConf->showMaximized();
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp
index 36daaef..fd04b6b 100644
--- a/noncore/apps/opie-console/profileeditordialog.cpp
+++ b/noncore/apps/opie-console/profileeditordialog.cpp
@@ -68,3 +68,3 @@ void ProfileEditorDialog::initUI()
m_svCon->setResizePolicy( QScrollView::AutoOneFit );
- m_svCon->setHScrollBarMode( QScrollView::AlwaysOff );
+ //m_svCon->setHScrollBarMode( QScrollView::AlwaysOff );
m_svCon->setFrameShape( QFrame::NoFrame );
@@ -72,3 +72,3 @@ void ProfileEditorDialog::initUI()
m_svTerm->setResizePolicy( QScrollView::AutoOneFit );
- m_svTerm->setHScrollBarMode( QScrollView::AlwaysOff );
+ //m_svTerm->setHScrollBarMode( QScrollView::AlwaysOff );
m_svTerm->setFrameShape( QFrame::NoFrame );