Diffstat (limited to 'noncore/apps/opie-console/btconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/btconfigwidget.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/btconfigwidget.cpp b/noncore/apps/opie-console/btconfigwidget.cpp index acc4811..eac6a79 100644 --- a/noncore/apps/opie-console/btconfigwidget.cpp +++ b/noncore/apps/opie-console/btconfigwidget.cpp @@ -1,8 +1,9 @@ #include <qlabel.h> #include <qlayout.h> +#include <qlineedit.h> #include <qcombobox.h> #include "iolayerbase.h" #include "btconfigwidget.h" namespace { @@ -26,16 +27,22 @@ BTConfigWidget::BTConfigWidget( const QString& name, m_lay = new QVBoxLayout(this ); m_device = new QLabel(tr("Device"), this ); m_deviceCmb = new QComboBox(this ); m_deviceCmb->setEditable( TRUE ); + QLabel *macLabel = new QLabel( this ); + macLabel->setText( tr("Enter peer mac address here:") ); + m_mac = new QLineEdit( this ); + m_base = new IOLayerBase(this, "base"); m_lay->addWidget( m_device ); m_lay->addWidget( m_deviceCmb ); + m_lay->addWidget( macLabel ); + m_lay->addWidget( m_mac ); m_lay->addWidget( m_base ); m_deviceCmb->insertItem( "/dev/ttyU0" ); m_deviceCmb->insertItem( "/dev/ttyU1" ); } @@ -43,13 +50,17 @@ BTConfigWidget::~BTConfigWidget() { } void BTConfigWidget::load( const Profile& prof ) { int rad_flow = prof.readNumEntry("Flow"); int rad_parity = prof.readNumEntry("Parity"); int speed = prof.readNumEntry("Speed"); + QString mac = prof.readEntry("Mac"); + if (!mac.isEmpty() ) { + m_mac->setText( mac ); + } if (rad_flow == 1) { m_base->setFlow( IOLayerBase::Hardware ); } else if (rad_flow == 2) { m_base->setFlow( IOLayerBase::Software ); } else if (rad_flow == 0) { @@ -134,7 +145,8 @@ void BTConfigWidget::save( Profile& prof ) { break; } prof.writeEntry("Flow", flow); prof.writeEntry("Parity", parity); prof.writeEntry("Speed", speed); + prof.writeEntry("Mac", m_mac->text() ); } |