summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/btconfigwidget.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/btconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/btconfigwidget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/btconfigwidget.cpp b/noncore/apps/opie-console/btconfigwidget.cpp
index e1ff18a..7f82e06 100644
--- a/noncore/apps/opie-console/btconfigwidget.cpp
+++ b/noncore/apps/opie-console/btconfigwidget.cpp
@@ -84,48 +84,51 @@ void BTConfigWidget::load( const Profile& prof ) {
84 m_base->setParity( IOLayerBase::Odd ); 84 m_base->setParity( IOLayerBase::Odd );
85 } else { 85 } else {
86 m_base->setParity( IOLayerBase::NonePar ); 86 m_base->setParity( IOLayerBase::NonePar );
87 } 87 }
88 88
89 switch( speed ) { 89 switch( speed ) {
90 case 115200: 90 case 115200:
91 m_base->setSpeed(IOLayerBase::Baud_115200 ); 91 m_base->setSpeed(IOLayerBase::Baud_115200 );
92 break; 92 break;
93 case 57600: 93 case 57600:
94 m_base->setSpeed( IOLayerBase::Baud_57600 ); 94 m_base->setSpeed( IOLayerBase::Baud_57600 );
95 break; 95 break;
96 case 38400: 96 case 38400:
97 m_base->setSpeed(IOLayerBase::Baud_38400 ); 97 m_base->setSpeed(IOLayerBase::Baud_38400 );
98 break; 98 break;
99 case 19200: 99 case 19200:
100 m_base->setSpeed( IOLayerBase::Baud_19200 ); 100 m_base->setSpeed( IOLayerBase::Baud_19200 );
101 break; 101 break;
102 case 4800: 102 case 4800:
103 m_base->setSpeed( IOLayerBase::Baud_4800 ); 103 m_base->setSpeed( IOLayerBase::Baud_4800 );
104 break; 104 break;
105 case 2400: 105 case 2400:
106 m_base->setSpeed( IOLayerBase::Baud_2400 ); 106 m_base->setSpeed( IOLayerBase::Baud_2400 );
107 break; 107 break;
108 case 1200:
109 m_base->setSpeed( IOLayerBase::Baud_1200 );
110 break;
108 case 9600: 111 case 9600:
109 default: 112 default:
110 m_base->setSpeed(IOLayerBase::Baud_9600 ); 113 m_base->setSpeed(IOLayerBase::Baud_9600 );
111 break; 114 break;
112 } 115 }
113 116
114 if ( prof.readEntry("Device").isEmpty() ) return; 117 if ( prof.readEntry("Device").isEmpty() ) return;
115 setCurrent( prof.readEntry("Device"), m_deviceCmb ); 118 setCurrent( prof.readEntry("Device"), m_deviceCmb );
116 119
117} 120}
118/* 121/*
119 * save speed, 122 * save speed,
120 * flow, 123 * flow,
121 * parity 124 * parity
122 */ 125 */
123void BTConfigWidget::save( Profile& prof ) { 126void BTConfigWidget::save( Profile& prof ) {
124 int flow, parity, speed; 127 int flow, parity, speed;
125 flow = parity = speed = 0; 128 flow = parity = speed = 0;
126 prof.writeEntry("Device", m_deviceCmb->currentText() ); 129 prof.writeEntry("Device", m_deviceCmb->currentText() );
127 130
128 131
129 switch( m_base->flow() ) { 132 switch( m_base->flow() ) {
130 case IOLayerBase::None: 133 case IOLayerBase::None:
131 flow = 0; 134 flow = 0;
@@ -148,48 +151,51 @@ void BTConfigWidget::save( Profile& prof ) {
148 case IOLayerBase::NonePar: 151 case IOLayerBase::NonePar:
149 parity = 0; 152 parity = 0;
150 break; 153 break;
151 } 154 }
152 155
153 switch( m_base->speed() ) { 156 switch( m_base->speed() ) {
154 case IOLayerBase::Baud_115200: 157 case IOLayerBase::Baud_115200:
155 speed = 115200; 158 speed = 115200;
156 break; 159 break;
157 case IOLayerBase::Baud_57600: 160 case IOLayerBase::Baud_57600:
158 speed = 57600; 161 speed = 57600;
159 break; 162 break;
160 case IOLayerBase::Baud_38400: 163 case IOLayerBase::Baud_38400:
161 speed = 38400; 164 speed = 38400;
162 break; 165 break;
163 case IOLayerBase::Baud_19200: 166 case IOLayerBase::Baud_19200:
164 speed = 19200; 167 speed = 19200;
165 break; 168 break;
166 case IOLayerBase::Baud_4800: 169 case IOLayerBase::Baud_4800:
167 speed = 4800; 170 speed = 4800;
168 break; 171 break;
169 case IOLayerBase::Baud_2400: 172 case IOLayerBase::Baud_2400:
170 speed = 2400; 173 speed = 2400;
171 break; 174 break;
175 case IOLayerBase::Baud_1200;
176 speed = 1200;
177 break;
172 default: 178 default:
173 case IOLayerBase::Baud_9600: 179 case IOLayerBase::Baud_9600:
174 speed = 9600; 180 speed = 9600;
175 break; 181 break;
176 } 182 }
177 183
178 prof.writeEntry("Flow", flow); 184 prof.writeEntry("Flow", flow);
179 prof.writeEntry("Parity", parity); 185 prof.writeEntry("Parity", parity);
180 prof.writeEntry("Speed", speed); 186 prof.writeEntry("Speed", speed);
181 prof.writeEntry("Mac", m_mac->text() ); 187 prof.writeEntry("Mac", m_mac->text() );
182} 188}
183 189
184void BTConfigWidget::slotMacRadio( bool on ) { 190void BTConfigWidget::slotMacRadio( bool on ) {
185 if ( on ) { 191 if ( on ) {
186 m_devRadio->setChecked( false ); 192 m_devRadio->setChecked( false );
187 m_deviceCmb->setEnabled( false ); 193 m_deviceCmb->setEnabled( false );
188 m_mac->setEnabled( true ); 194 m_mac->setEnabled( true );
189 } else { 195 } else {
190 m_devRadio->setChecked( true ); 196 m_devRadio->setChecked( true );
191 } 197 }
192} 198}
193 199
194void BTConfigWidget::slotDevRadio( bool on ) { 200void BTConfigWidget::slotDevRadio( bool on ) {
195 if ( on ) { 201 if ( on ) {