author | zecke <zecke> | 2002-10-08 23:13:17 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-08 23:13:17 (UTC) |
commit | 8c353ec8b86ee8f82cc25172fb69dd5fee65e848 (patch) (unidiff) | |
tree | a4549bcba962689edb9c40efcb23114cae5fcda2 /noncore/apps/opie-console/iolayerbase.cpp | |
parent | ca0c224318a50c6618691fb30f39aa1d9b0b8a4f (diff) | |
download | opie-8c353ec8b86ee8f82cc25172fb69dd5fee65e848.zip opie-8c353ec8b86ee8f82cc25172fb69dd5fee65e848.tar.gz opie-8c353ec8b86ee8f82cc25172fb69dd5fee65e848.tar.bz2 |
default I dunno
IOLayerBase the return values for speed()/parity()/flow() added
MainWindow debug code :(
opie-console.pro addition of serialconfigwidget.*
ProfileManager fix removing of Profiles quite rude way of doing it
Configure stuff is done and roughly tested
The migration is done!
TO WAZLAF: you might want to adjust Parity stuff for your needs!
Diffstat (limited to 'noncore/apps/opie-console/iolayerbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/iolayerbase.cpp | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/iolayerbase.cpp b/noncore/apps/opie-console/iolayerbase.cpp index 1e164fe..99b6cc1 100644 --- a/noncore/apps/opie-console/iolayerbase.cpp +++ b/noncore/apps/opie-console/iolayerbase.cpp | |||
@@ -26,25 +26,25 @@ namespace { | |||
26 | id_baud_9600 | 26 | id_baud_9600 |
27 | }; | 27 | }; |
28 | 28 | ||
29 | } | 29 | } |
30 | 30 | ||
31 | 31 | ||
32 | IOLayerBase::IOLayerBase( QWidget* par, const char* name ) | 32 | IOLayerBase::IOLayerBase( QWidget* par, const char* name ) |
33 | : QWidget( par, name ) | 33 | : QWidget( par, name ) |
34 | { | 34 | { |
35 | m_speedLabel = new QLabel(tr("Speed"), this ); | 35 | m_speedLabel = new QLabel(tr("Speed"), this ); |
36 | m_speedBox = new QComboBox(this ); | 36 | m_speedBox = new QComboBox(this ); |
37 | 37 | ||
38 | m_groupFlow = new QButtonGroup(tr("Flow control") ); | 38 | m_groupFlow = new QButtonGroup(tr("Flow control"),this ); |
39 | m_flowHw = new QRadioButton(tr("Hardware"), m_groupFlow ); | 39 | m_flowHw = new QRadioButton(tr("Hardware"), m_groupFlow ); |
40 | m_flowSw = new QRadioButton(tr("Software"), m_groupFlow ); | 40 | m_flowSw = new QRadioButton(tr("Software"), m_groupFlow ); |
41 | 41 | ||
42 | m_groupParity = new QButtonGroup(tr("Parity"), this ); | 42 | m_groupParity = new QButtonGroup(tr("Parity"), this ); |
43 | m_parityOdd = new QRadioButton(tr("Odd"), m_groupParity ); | 43 | m_parityOdd = new QRadioButton(tr("Odd"), m_groupParity ); |
44 | m_parityEven = new QRadioButton(tr("Even"), m_groupParity ); | 44 | m_parityEven = new QRadioButton(tr("Even"), m_groupParity ); |
45 | 45 | ||
46 | m_lroot = new QVBoxLayout(this ); | 46 | m_lroot = new QVBoxLayout(this ); |
47 | m_lroot->add(m_speedLabel ); | 47 | m_lroot->add(m_speedLabel ); |
48 | m_lroot->add(m_speedBox ); | 48 | m_lroot->add(m_speedBox ); |
49 | m_lroot->setStretchFactor(m_speedLabel, 1); | 49 | m_lroot->setStretchFactor(m_speedLabel, 1); |
50 | m_lroot->setStretchFactor(m_speedBox, 1 ); | 50 | m_lroot->setStretchFactor(m_speedBox, 1 ); |
@@ -104,20 +104,46 @@ void IOLayerBase::setSpeed( Speed sp ) { | |||
104 | index = id_baud_38400; | 104 | index = id_baud_38400; |
105 | break; | 105 | break; |
106 | case Baud_19200: | 106 | case Baud_19200: |
107 | index = id_baud_19200; | 107 | index = id_baud_19200; |
108 | break; | 108 | break; |
109 | case Baud_9600: | 109 | case Baud_9600: |
110 | index = id_baud_9600; | 110 | index = id_baud_9600; |
111 | break; | 111 | break; |
112 | } | 112 | } |
113 | m_speedBox->setCurrentItem(index ); | 113 | m_speedBox->setCurrentItem(index ); |
114 | } | 114 | } |
115 | IOLayerBase::Flow IOLayerBase::flow()const { | 115 | IOLayerBase::Flow IOLayerBase::flow()const { |
116 | return Hardware; | 116 | if (m_flowHw->isChecked() ) { |
117 | qWarning("Hardware flow"); | ||
118 | return Hardware; | ||
119 | }else { | ||
120 | qWarning("Software"); | ||
121 | return Software; | ||
122 | } | ||
117 | } | 123 | } |
118 | IOLayerBase::Parity IOLayerBase::parity()const { | 124 | IOLayerBase::Parity IOLayerBase::parity()const { |
119 | return Odd; | 125 | if (m_parityOdd->isChecked() ) |
126 | return Odd; | ||
127 | else | ||
128 | return Even; | ||
129 | |||
120 | } | 130 | } |
121 | IOLayerBase::Speed IOLayerBase::speed()const{ | 131 | IOLayerBase::Speed IOLayerBase::speed()const{ |
122 | return Baud_9600; | 132 | switch( m_speedBox->currentItem() ) { |
133 | case id_baud_115200: | ||
134 | return Baud_115200; | ||
135 | break; | ||
136 | case id_baud_57600: | ||
137 | return Baud_57600; | ||
138 | break; | ||
139 | case id_baud_38400: | ||
140 | return Baud_38400; | ||
141 | break; | ||
142 | case id_baud_19200: | ||
143 | return Baud_19200; | ||
144 | break; | ||
145 | case id_baud_9600: | ||
146 | return Baud_9600; | ||
147 | break; | ||
148 | } | ||
123 | } | 149 | } |