-rw-r--r-- | noncore/apps/opie-console/BUGS | 3 | ||||
-rw-r--r-- | noncore/apps/opie-console/dialdialog.cpp | 46 | ||||
-rw-r--r-- | noncore/apps/opie-console/dialdialog.h | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/modemconfigwidget.cpp | 2 |
4 files changed, 34 insertions, 23 deletions
diff --git a/noncore/apps/opie-console/BUGS b/noncore/apps/opie-console/BUGS index ffaceef..496e28a 100644 --- a/noncore/apps/opie-console/BUGS +++ b/noncore/apps/opie-console/BUGS @@ -2,8 +2,11 @@ Ok we all know we write perfect code but sometimes the compiler produces bad code and we need to work around some compiler bugs!! -zecke MyPty is broken in some ways if you do connect/disconnect/connect sh will be executed in the process of opie-console.... funny aye? OTabWidget seems to give us problems too + +Send/receive: lrzsz behaves strange when trying to use +--overwrite or --rename. diff --git a/noncore/apps/opie-console/dialdialog.cpp b/noncore/apps/opie-console/dialdialog.cpp index 0ace8f7..0d115bc 100644 --- a/noncore/apps/opie-console/dialdialog.cpp +++ b/noncore/apps/opie-console/dialdialog.cpp @@ -10,32 +10,38 @@ #include "dialdialog.h" DialDialog::DialDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { - m_number = 0; - setCaption( tr( "Enter number" ) ); QVBoxLayout *mainLayout = new QVBoxLayout( this ); QLabel *textLabel = new QLabel( this ); textLabel->setText( tr("Enter the number you want to dial. When finished, press ok") ); - LCD = new QLCDNumber( this, "LCD" ); - QFont LCD_font( LCD->font() ); - LCD_font.setPointSize( 7 ); - LCD->setFont( LCD_font ); - LCD->setNumDigits( 25 ); - LCD->setSegmentStyle( QLCDNumber::Flat ); - LCD->setMaximumHeight( 30 ); + LCD1 = new QLCDNumber( this, "LCD" ); + QFont LCD_font1( LCD1->font() ); + LCD_font1.setPointSize( 7 ); + LCD1->setFont( LCD_font1 ); + LCD1->setNumDigits( 8 ); + LCD1->setSegmentStyle( QLCDNumber::Flat ); + LCD1->setMaximumHeight( 30 ); + + LCD2 = new QLCDNumber( this, "LCD" ); + QFont LCD_font2( LCD2->font() ); + LCD_font2.setPointSize( 7 ); + LCD2->setFont( LCD_font2 ); + LCD2->setNumDigits( 8 ); + LCD2->setSegmentStyle( QLCDNumber::Flat ); + LCD2->setMaximumHeight( 30 ); QGridLayout *layout = new QGridLayout( this , 4, 3 ); QButtonGroup *dialButtons = new QButtonGroup( ); QPushButton *number0 = new QPushButton( this ); number0->setText( QString( "0" ) ); QFont number0_font( number0->font() ); @@ -63,41 +69,43 @@ DialDialog::DialDialog( QWidget* parent, const char* name, bool modal, WFlags f y = 0; } } connect( dialButtons, SIGNAL( clicked( int ) ), this, SLOT( slotEnterNumber( int ) ) ); mainLayout->addStretch( 0 ); mainLayout->addWidget( textLabel ); - mainLayout->addWidget( LCD ); + QHBoxLayout *lcdLayout = new QHBoxLayout(mainLayout); + lcdLayout->addWidget( LCD1 ); + lcdLayout->addWidget( LCD2 ); mainLayout->addStretch( 0 ); mainLayout->addLayout( layout ); mainLayout->addStretch( 0 ); - - } void DialDialog::slotEnterNumber( int number ) { // pretty stupid, just for testing .-) - m_number = ( m_number * 10 ) + number; - qDebug( QString("%1").arg( m_number ) ); - LCD->display( m_number ); + m_number.append(QString("%1").arg(number)); + setNumber(m_number); } DialDialog::~DialDialog() { } QString DialDialog::number() { - return QString( "%1").arg( m_number ); + return m_number; } -void DialDialog::setNumber( int number ) +void DialDialog::setNumber( QString number ) { - m_number = number; - LCD->display( m_number ); + QString n1; + if(number.length() > 8) n1 = number.left(number.length() - 8); + QString n2 = number.right(8); + LCD1->display( n1.toInt() ); + LCD2->display( n2.toInt() ); } diff --git a/noncore/apps/opie-console/dialdialog.h b/noncore/apps/opie-console/dialdialog.h index bec7b81..4a74b66 100644 --- a/noncore/apps/opie-console/dialdialog.h +++ b/noncore/apps/opie-console/dialdialog.h @@ -12,20 +12,20 @@ class DialDialog : public QDialog { public: DialDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~DialDialog(); QString number(); - void setNumber( int ); + void setNumber( QString number ); private: - float m_number; - QLCDNumber *LCD; + QString m_number; + QLCDNumber *LCD1, *LCD2; private slots: void slotEnterNumber( int ); }; #endif diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp index c0ab0fc..d3a23fa 100644 --- a/noncore/apps/opie-console/modemconfigwidget.cpp +++ b/noncore/apps/opie-console/modemconfigwidget.cpp @@ -186,15 +186,15 @@ void ModemConfigWidget::slotAT() { if ( atConf->exec() != QDialog::Accepted ) { // reload old settings } } void ModemConfigWidget::slotDial() { DialDialog dial( this, "DialConfig", true ); if(!m_telNumber->text().isEmpty()) { - dial.setNumber(m_telNumber->text().replace(QRegExp("[\\-\\/\\ ]"), "").toInt()); + dial.setNumber(m_telNumber->text().replace(QRegExp("[\\-\\/\\ \\.\\,]"), "")); } dial.showMaximized(); if ( dial.exec() == QDialog::Accepted ) { m_telNumber->setText( dial.number() ); } } |