summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/serialconfigwidget.cpp
authorharlekin <harlekin>2002-10-09 16:33:36 (UTC)
committer harlekin <harlekin>2002-10-09 16:33:36 (UTC)
commit205926ec86ffd582f795b649179291626e504830 (patch) (unidiff)
tree3a5759b98a1a263ade37dfb35cfd529a7bcafde9 /noncore/apps/opie-console/serialconfigwidget.cpp
parentf696c6248824166f3ac025d23ac66b46c93b440c (diff)
downloadopie-205926ec86ffd582f795b649179291626e504830.zip
opie-205926ec86ffd582f795b649179291626e504830.tar.gz
opie-205926ec86ffd582f795b649179291626e504830.tar.bz2
flow now has mode none too .-), irda config widget and beginning of layer, first sweep, rest later
Diffstat (limited to 'noncore/apps/opie-console/serialconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/serialconfigwidget.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/serialconfigwidget.cpp b/noncore/apps/opie-console/serialconfigwidget.cpp
index a427302..b1ec408 100644
--- a/noncore/apps/opie-console/serialconfigwidget.cpp
+++ b/noncore/apps/opie-console/serialconfigwidget.cpp
@@ -48,16 +48,19 @@ SerialConfigWidget::~SerialConfigWidget() {
48} 48}
49void SerialConfigWidget::load( const Profile& prof ) { 49void SerialConfigWidget::load( const Profile& prof ) {
50 int rad_flow = prof.readNumEntry("Flow"); 50 int rad_flow = prof.readNumEntry("Flow");
51 int rad_parity = prof.readNumEntry("Parity"); 51 int rad_parity = prof.readNumEntry("Parity");
52 int speed = prof.readNumEntry("Speed"); 52 int speed = prof.readNumEntry("Speed");
53 53
54 if (rad_flow == 0) 54 if (rad_flow == 1) {
55 m_base->setFlow( IOLayerBase::Hardware ); 55 m_base->setFlow( IOLayerBase::Hardware );
56 else 56 } else if (rad_flow == 2) {
57 m_base->setFlow( IOLayerBase::Software ); 57 m_base->setFlow( IOLayerBase::Software );
58 } else if (rad_flow == 0) {
59 m_base->setFlow( IOLayerBase::None );
60 }
58 61
59 if (rad_parity == 1) 62 if (rad_parity == 1)
60 m_base->setParity( IOLayerBase::Even ); 63 m_base->setParity( IOLayerBase::Even );
61 else 64 else
62 m_base->setParity( IOLayerBase::Odd ); 65 m_base->setParity( IOLayerBase::Odd );
63 66
@@ -91,17 +94,20 @@ void SerialConfigWidget::load( const Profile& prof ) {
91 */ 94 */
92void SerialConfigWidget::save( Profile& prof ) { 95void SerialConfigWidget::save( Profile& prof ) {
93 int flow, parity, speed; 96 int flow, parity, speed;
94 prof.writeEntry("Device", m_deviceCmb->currentText() ); 97 prof.writeEntry("Device", m_deviceCmb->currentText() );
95 98
96 switch( m_base->flow() ) { 99 switch( m_base->flow() ) {
100 case IOLayerBase::None:
101 flow = 0;
102 break;
97 case IOLayerBase::Software: 103 case IOLayerBase::Software:
98 flow = 1; 104 flow = 2;
99 break; 105 break;
100 case IOLayerBase::Hardware: 106 case IOLayerBase::Hardware:
101 flow = 0; 107 flow = 1;
102 break; 108 break;
103 } 109 }
104 110
105 switch( m_base->parity() ) { 111 switch( m_base->parity() ) {
106 case IOLayerBase::Odd: 112 case IOLayerBase::Odd:
107 parity = 2; 113 parity = 2;