summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/modemconfigwidget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-console/modemconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/modemconfigwidget.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp
index 3466e3a..9fdaf73 100644
--- a/noncore/apps/opie-console/modemconfigwidget.cpp
+++ b/noncore/apps/opie-console/modemconfigwidget.cpp
@@ -1,36 +1,39 @@
+#include "modemconfigwidget.h"
+#include "dialdialog.h"
+/* OPIE */
+#include <opie2/odebug.h>
#include <qpe/qpeapplication.h>
+using namespace Opie::Core;
+/* QT */
#include <qlabel.h>
#include <qlayout.h>
#include <qcombobox.h>
#include <qpushbutton.h>
#include <qhbox.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 );
@@ -114,49 +117,49 @@ void ModemConfigWidget::load( const Profile& prof ) {
}
if ( dbits == 5) {
m_base->setData( IOLayerBase::Data_Five );
} else if (rad_flow == 6) {
m_base->setData( IOLayerBase::Data_Six );
} else if (rad_flow == 7) {
m_base->setData( IOLayerBase::Data_Seven );
} else {
m_base->setData( IOLayerBase::Data_Eight );
}
if ( sbits == 2) {
m_base->setStop( IOLayerBase::Stop_Two );
} else if ( sbits == 15 ) {
m_base->setStop( IOLayerBase::Stop_OnePointFive );
} else {
m_base->setStop( IOLayerBase::Stop_One );
}
atConf->readConfig( prof );
if ( prof.readEntry( "Device" ).isEmpty() ) {
- qWarning("device empty!");
+ owarn << "device empty!" << oendl;
return;
}
setCurrent( prof.readEntry( "Device" ), m_deviceCmb );
}
/*
* save speed,
* flow,
* parity
*/
void ModemConfigWidget::save( Profile& prof ) {
int flow, parity, speed, data, stop;
flow = parity = speed = data = stop = 0;
prof.writeEntry( "Device", m_deviceCmb->currentText() );
switch( m_base->flow() ) {
case IOLayerBase::None:
flow = 0;
break;
case IOLayerBase::Software:
flow = 2;