summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-10-24 20:52:03 (UTC)
committer harlekin <harlekin>2002-10-24 20:52:03 (UTC)
commit83bbc4077376e433f40f2632181a97e5ff8892b1 (patch) (side-by-side diff)
treeb663506b4621f351320adc097410de9d1492eda4
parent1a6931804e0b1d838f365f75385a462110da3972 (diff)
downloadopie-83bbc4077376e433f40f2632181a97e5ff8892b1.zip
opie-83bbc4077376e433f40f2632181a97e5ff8892b1.tar.gz
opie-83bbc4077376e433f40f2632181a97e5ff8892b1.tar.bz2
disable at config widget for now
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/modemconfigwidget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp
index c37fafd..da5db83 100644
--- a/noncore/apps/opie-console/modemconfigwidget.cpp
+++ b/noncore/apps/opie-console/modemconfigwidget.cpp
@@ -1,88 +1,89 @@
#include <qlabel.h>
#include <qlayout.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qhbox.h>
#include <qregexp.h>
#include "modemconfigwidget.h"
#include "dialdialog.h"
namespace {
void setCurrent( const QString& str, QComboBox* bo ) {
uint b = bo->count();
for (int i = 0; i < bo->count(); i++ ) {
if ( bo->text(i) == str ) {
bo->setCurrentItem( i );
return;
}
}
bo->insertItem( str );
bo->setCurrentItem( b );
}
}
ModemConfigWidget::ModemConfigWidget( const QString& name, QWidget* parent,
const char* na )
: ProfileDialogConnectionWidget( name, parent, na ) {
m_lay = new QVBoxLayout( this );
m_device = new QLabel(tr( "Modem is attached to:" ), this );
m_deviceCmb = new QComboBox(this );
m_deviceCmb->setEditable( TRUE );
QLabel* telLabel = new QLabel( this );
telLabel->setText( tr( "Enter telefon number here:" ) );
m_telNumber = new QLineEdit( this );
QHBox *buttonBox = new QHBox( this );
QPushButton *atButton = new QPushButton( buttonBox );
atButton->setText( tr( "AT commands" ) );
+ atButton->hide();
connect( atButton, SIGNAL( clicked() ), this, SLOT( slotAT() ) );
QPushButton *dialButton = new QPushButton( buttonBox );
dialButton->setText( tr( "Enter number" ) );
connect( dialButton, SIGNAL( clicked() ), this, SLOT( slotDial() ) );
m_base = new IOLayerBase( this, "base" );
m_lay->addWidget( m_device );
m_lay->addWidget( m_deviceCmb );
m_lay->addWidget( telLabel );
m_lay->addWidget( m_telNumber );
m_lay->addWidget( buttonBox );
m_lay->addWidget( m_base );
m_deviceCmb->insertItem( "/dev/ttyS0" );
m_deviceCmb->insertItem( "/dev/ttyS1" );
m_deviceCmb->insertItem( "/dev/ttyS2" );
atConf = new ATConfigDialog( this, "ATConfig", true );
}
ModemConfigWidget::~ModemConfigWidget() {
}
void ModemConfigWidget::load( const Profile& prof ) {
int rad_flow = prof.readNumEntry( "Flow" );
int rad_parity = prof.readNumEntry( "Parity" );
int speed = prof.readNumEntry( "Speed" );
QString number = prof.readEntry( "Number" );
if ( !number.isEmpty() ) {
m_telNumber->setText( number );
}
if ( rad_flow == 1 ) {
m_base->setFlow( IOLayerBase::Hardware );
} else if (rad_flow == 2) {
m_base->setFlow( IOLayerBase::Software );
} else if (rad_flow == 0) {
m_base->setFlow( IOLayerBase::None );
}
if ( rad_parity == 1 ) {
m_base->setParity( IOLayerBase::Even );