author | harlekin <harlekin> | 2002-10-14 19:01:58 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-14 19:01:58 (UTC) |
commit | 7d6fea084fc40160285fe3898bd56cec3902dca0 (patch) (unidiff) | |
tree | 071cdc8fc710557d4cfbde39e6bc7770e852c32b | |
parent | 678b36abe519019158765a1e57cd858dae55ca2f (diff) | |
download | opie-7d6fea084fc40160285fe3898bd56cec3902dca0.zip opie-7d6fea084fc40160285fe3898bd56cec3902dca0.tar.gz opie-7d6fea084fc40160285fe3898bd56cec3902dca0.tar.bz2 |
parity none added
-rw-r--r-- | noncore/apps/opie-console/btconfigwidget.cpp | 7 | ||||
-rw-r--r-- | noncore/apps/opie-console/emulation_widget.cpp | 32 | ||||
-rw-r--r-- | noncore/apps/opie-console/io_modem.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-console/iolayerbase.cpp | 13 | ||||
-rw-r--r-- | noncore/apps/opie-console/iolayerbase.h | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/irdaconfigwidget.cpp | 7 | ||||
-rw-r--r-- | noncore/apps/opie-console/modemconfigwidget.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/opie-console/profilemanager.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-console/serialconfigwidget.cpp | 7 |
9 files changed, 62 insertions, 23 deletions
diff --git a/noncore/apps/opie-console/btconfigwidget.cpp b/noncore/apps/opie-console/btconfigwidget.cpp index eac6a79..7673d0b 100644 --- a/noncore/apps/opie-console/btconfigwidget.cpp +++ b/noncore/apps/opie-console/btconfigwidget.cpp | |||
@@ -69,8 +69,10 @@ void BTConfigWidget::load( const Profile& prof ) { | |||
69 | 69 | ||
70 | if (rad_parity == 1) { | 70 | if (rad_parity == 1) { |
71 | m_base->setParity( IOLayerBase::Even ); | 71 | m_base->setParity( IOLayerBase::Even ); |
72 | } else { | 72 | } else if ( rad_parity == 2 ) { |
73 | m_base->setParity( IOLayerBase::Odd ); | 73 | m_base->setParity( IOLayerBase::Odd ); |
74 | } else { | ||
75 | m_base->setParity( IOLayerBase::NonePar ); | ||
74 | } | 76 | } |
75 | 77 | ||
76 | switch( speed ) { | 78 | switch( speed ) { |
@@ -125,6 +127,9 @@ void BTConfigWidget::save( Profile& prof ) { | |||
125 | case IOLayerBase::Even: | 127 | case IOLayerBase::Even: |
126 | parity = 1; | 128 | parity = 1; |
127 | break; | 129 | break; |
130 | case IOLayerBase::NonePar: | ||
131 | parity = 0; | ||
132 | break; | ||
128 | } | 133 | } |
129 | 134 | ||
130 | switch( m_base->speed() ) { | 135 | switch( m_base->speed() ) { |
diff --git a/noncore/apps/opie-console/emulation_widget.cpp b/noncore/apps/opie-console/emulation_widget.cpp index 9138f29..d8e342b 100644 --- a/noncore/apps/opie-console/emulation_widget.cpp +++ b/noncore/apps/opie-console/emulation_widget.cpp | |||
@@ -21,16 +21,16 @@ | |||
21 | static const ColorEntry color_table[TABLE_COLORS] = | 21 | static const ColorEntry color_table[TABLE_COLORS] = |
22 | { | 22 | { |
23 | ColorEntry(QColor(0x00,0x00,0x00), 0, 0 ), ColorEntry( QColor(0xB2,0xB2,0xB2), 1, 0 ), // Dfore, Dback | 23 | ColorEntry(QColor(0x00,0x00,0x00), 0, 0 ), ColorEntry( QColor(0xB2,0xB2,0xB2), 1, 0 ), // Dfore, Dback |
24 | ColorEntry(QColor(0x00,0x00,0x00), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0x18), 0, 0 ), // Black, Red | 24 | ColorEntry(QColor(0x00,0x00,0x00), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0x18), 0, 0 ), // Black, Red |
25 | ColorEntry(QColor(0x18,0xB2,0x18), 0, 0 ), ColorEntry( QColor(0xB2,0x68,0x18), 0, 0 ), // Green, Yellow | 25 | ColorEntry(QColor(0x18,0xB2,0x18), 0, 0 ), ColorEntry( QColor(0xB2,0x68,0x18), 0, 0 ), // Green, Yellow |
26 | ColorEntry(QColor(0x18,0x18,0xB2), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0xB2), 0, 0 ), // Blue, Magenta | 26 | ColorEntry(QColor(0x18,0x18,0xB2), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0xB2), 0, 0 ), // Blue, Magenta |
27 | ColorEntry(QColor(0x18,0xB2,0xB2), 0, 0 ), ColorEntry( QColor(0xB2,0xB2,0xB2), 0, 0 ), // Cyan, White | 27 | ColorEntry(QColor(0x18,0xB2,0xB2), 0, 0 ), ColorEntry( QColor(0xB2,0xB2,0xB2), 0, 0 ), // Cyan, White |
28 | // intensiv | 28 | // intensiv |
29 | ColorEntry(QColor(0x00,0x00,0x00), 0, 1 ), ColorEntry( QColor(0xFF,0xFF,0xFF), 1, 0 ), | 29 | ColorEntry(QColor(0x00,0x00,0x00), 0, 1 ), ColorEntry( QColor(0xFF,0xFF,0xFF), 1, 0 ), |
30 | ColorEntry(QColor(0x68,0x68,0x68), 0, 0 ), ColorEntry( QColor(0xFF,0x54,0x54), 0, 0 ), | 30 | ColorEntry(QColor(0x68,0x68,0x68), 0, 0 ), ColorEntry( QColor(0xFF,0x54,0x54), 0, 0 ), |
31 | ColorEntry(QColor(0x54,0xFF,0x54), 0, 0 ), ColorEntry( QColor(0xFF,0xFF,0x54), 0, 0 ), | 31 | ColorEntry(QColor(0x54,0xFF,0x54), 0, 0 ), ColorEntry( QColor(0xFF,0xFF,0x54), 0, 0 ), |
32 | ColorEntry(QColor(0x54,0x54,0xFF), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0xB2), 0, 0 ), | 32 | ColorEntry(QColor(0x54,0x54,0xFF), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0xB2), 0, 0 ), |
33 | ColorEntry(QColor(0x54,0xFF,0xFF), 0, 0 ), ColorEntry( QColor(0xFF,0xFF,0xFF), 0, 0 ) | 33 | ColorEntry(QColor(0x54,0xFF,0xFF), 0, 0 ), ColorEntry( QColor(0xFF,0xFF,0xFF), 0, 0 ) |
34 | }; | 34 | }; |
35 | 35 | ||
36 | EmulationWidget::EmulationWidget( const Profile& config, QWidget *parent, const char* name ) : WidgetLayer( config, parent, name ) | 36 | EmulationWidget::EmulationWidget( const Profile& config, QWidget *parent, const char* name ) : WidgetLayer( config, parent, name ) |
@@ -42,6 +42,7 @@ EmulationWidget::EmulationWidget( const Profile& config, QWidget *parent, const | |||
42 | f_width = fm.maxWidth(); | 42 | f_width = fm.maxWidth(); |
43 | f_ascent = fm.ascent(); | 43 | f_ascent = fm.ascent(); |
44 | 44 | ||
45 | |||
45 | // initialize scrollbar related vars | 46 | // initialize scrollbar related vars |
46 | m_scrollbar = new QScrollBar( this ); | 47 | m_scrollbar = new QScrollBar( this ); |
47 | m_scrollbar->setCursor( arrowCursor ); | 48 | m_scrollbar->setCursor( arrowCursor ); |
@@ -49,8 +50,8 @@ EmulationWidget::EmulationWidget( const Profile& config, QWidget *parent, const | |||
49 | // give reasonable defaults to m_columns, m_lines | 50 | // give reasonable defaults to m_columns, m_lines |
50 | calcGeometry(); | 51 | calcGeometry(); |
51 | 52 | ||
52 | // load config | 53 | // load config |
53 | reloadConfig( config ); | 54 | reloadConfig( config ); |
54 | 55 | ||
55 | m_resizing = false; | 56 | m_resizing = false; |
56 | } | 57 | } |
@@ -109,6 +110,7 @@ static QChar vt100extended(QChar c) | |||
109 | QSize EmulationWidget::calcSize( int cols, int lins ) const | 110 | QSize EmulationWidget::calcSize( int cols, int lins ) const |
110 | { | 111 | { |
111 | int frw = width() - contentsRect().width(); | 112 | int frw = width() - contentsRect().width(); |
113 | |||
112 | int frh = height() - contentsRect().height(); | 114 | int frh = height() - contentsRect().height(); |
113 | int scw = (scrollLoc == SCRNONE? 0 : m_scrollbar->width() ); | 115 | int scw = (scrollLoc == SCRNONE? 0 : m_scrollbar->width() ); |
114 | return QSize( f_width * cols + 2 * rimX + frw + scw, f_height * lins + 2 * rimY + frh ); | 116 | return QSize( f_width * cols + 2 * rimX + frw + scw, f_height * lins + 2 * rimY + frh ); |
@@ -233,7 +235,11 @@ void EmulationWidget::calcGeometry() | |||
233 | { | 235 | { |
234 | m_scrollbar->resize(QApplication::style().scrollBarExtent().width(), contentsRect().height() ); | 236 | m_scrollbar->resize(QApplication::style().scrollBarExtent().width(), contentsRect().height() ); |
235 | 237 | ||
236 | switch( scrollLoc ) | 238 | qDebug( QString(" TEST").arg( contentsRect().width() ) ); |
239 | qDebug( QString(" TEST").arg( contentsRect().height() ) ); | ||
240 | qDebug("NEUER TESTT!!!!!!!!"); | ||
241 | |||
242 | switch( scrollLoc ) | ||
237 | { | 243 | { |
238 | case SCRNONE : | 244 | case SCRNONE : |
239 | m_columns = ( contentsRect().width() -2 * rimX ) / f_width; | 245 | m_columns = ( contentsRect().width() -2 * rimX ) / f_width; |
diff --git a/noncore/apps/opie-console/io_modem.cpp b/noncore/apps/opie-console/io_modem.cpp index 28d1722..d93dc5a 100644 --- a/noncore/apps/opie-console/io_modem.cpp +++ b/noncore/apps/opie-console/io_modem.cpp | |||
@@ -37,6 +37,7 @@ bool IOModem::open() { | |||
37 | } | 37 | } |
38 | 38 | ||
39 | void IOModem::reload( const Profile &config ) { | 39 | void IOModem::reload( const Profile &config ) { |
40 | |||
40 | m_device = config.readEntry("Device", MODEM_DEFAULT_DEVICE); | 41 | m_device = config.readEntry("Device", MODEM_DEFAULT_DEVICE); |
41 | m_baud = config.readNumEntry("Baud", MODEM_DEFAULT_BAUD); | 42 | m_baud = config.readNumEntry("Baud", MODEM_DEFAULT_BAUD); |
42 | m_parity = config.readNumEntry("Parity", MODEM_DEFAULT_PARITY); | 43 | m_parity = config.readNumEntry("Parity", MODEM_DEFAULT_PARITY); |
diff --git a/noncore/apps/opie-console/iolayerbase.cpp b/noncore/apps/opie-console/iolayerbase.cpp index ec88b49..08acb75 100644 --- a/noncore/apps/opie-console/iolayerbase.cpp +++ b/noncore/apps/opie-console/iolayerbase.cpp | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | namespace { | 10 | namespace { |
11 | enum ParityIds { | 11 | enum ParityIds { |
12 | id_parity_none, | ||
12 | id_parity_odd, | 13 | id_parity_odd, |
13 | id_parity_even | 14 | id_parity_even |
14 | }; | 15 | }; |
@@ -42,6 +43,7 @@ IOLayerBase::IOLayerBase( QWidget* par, const char* name ) | |||
42 | m_flowNone = new QRadioButton( tr("None"), m_groupFlow ); | 43 | m_flowNone = new QRadioButton( tr("None"), m_groupFlow ); |
43 | 44 | ||
44 | m_groupParity = new QButtonGroup(tr("Parity"), this ); | 45 | m_groupParity = new QButtonGroup(tr("Parity"), this ); |
46 | m_parityNone = new QRadioButton(tr("None"), m_groupParity ); | ||
45 | m_parityOdd = new QRadioButton(tr("Odd"), m_groupParity ); | 47 | m_parityOdd = new QRadioButton(tr("Odd"), m_groupParity ); |
46 | m_parityEven = new QRadioButton(tr("Even"), m_groupParity ); | 48 | m_parityEven = new QRadioButton(tr("Even"), m_groupParity ); |
47 | 49 | ||
@@ -61,6 +63,7 @@ IOLayerBase::IOLayerBase( QWidget* par, const char* name ) | |||
61 | m_hboxPar = new QHBoxLayout( m_groupParity, 2 ); | 63 | m_hboxPar = new QHBoxLayout( m_groupParity, 2 ); |
62 | m_hboxPar->add(m_parityOdd ); | 64 | m_hboxPar->add(m_parityOdd ); |
63 | m_hboxPar->add(m_parityEven ); | 65 | m_hboxPar->add(m_parityEven ); |
66 | m_hboxPar->add(m_parityNone ); | ||
64 | m_lroot->add(m_groupParity ); | 67 | m_lroot->add(m_groupParity ); |
65 | m_lroot->setStretchFactor(m_groupParity, 2 ); | 68 | m_lroot->setStretchFactor(m_groupParity, 2 ); |
66 | 69 | ||
@@ -90,6 +93,9 @@ void IOLayerBase::setFlow( Flow flo ) { | |||
90 | 93 | ||
91 | void IOLayerBase::setParity( Parity par ) { | 94 | void IOLayerBase::setParity( Parity par ) { |
92 | switch( par ) { | 95 | switch( par ) { |
96 | case NonePar: | ||
97 | m_parityNone->setChecked( true ); | ||
98 | break; | ||
93 | case Odd: | 99 | case Odd: |
94 | m_parityOdd->setChecked( true ); | 100 | m_parityOdd->setChecked( true ); |
95 | break; | 101 | break; |
@@ -132,10 +138,13 @@ IOLayerBase::Flow IOLayerBase::flow()const { | |||
132 | } | 138 | } |
133 | } | 139 | } |
134 | IOLayerBase::Parity IOLayerBase::parity()const { | 140 | IOLayerBase::Parity IOLayerBase::parity()const { |
135 | if (m_parityOdd->isChecked() ) | 141 | if ( m_parityOdd->isChecked() ) { |
136 | return Odd; | 142 | return Odd; |
137 | else | 143 | } else if ( m_parityEven->isChecked() ) { |
138 | return Even; | 144 | return Even; |
145 | } else { | ||
146 | return NonePar; | ||
147 | } | ||
139 | 148 | ||
140 | } | 149 | } |
141 | IOLayerBase::Speed IOLayerBase::speed()const{ | 150 | IOLayerBase::Speed IOLayerBase::speed()const{ |
diff --git a/noncore/apps/opie-console/iolayerbase.h b/noncore/apps/opie-console/iolayerbase.h index d14f334..74de46a 100644 --- a/noncore/apps/opie-console/iolayerbase.h +++ b/noncore/apps/opie-console/iolayerbase.h | |||
@@ -11,10 +11,12 @@ class QButtonGroup; | |||
11 | class QRadioButton; | 11 | class QRadioButton; |
12 | class QHBoxLayout; | 12 | class QHBoxLayout; |
13 | class IOLayerBase : public QWidget { | 13 | class IOLayerBase : public QWidget { |
14 | |||
14 | Q_OBJECT | 15 | Q_OBJECT |
16 | |||
15 | public: | 17 | public: |
16 | enum Flow { Hardware, Software, None }; | 18 | enum Flow { Hardware, Software, None }; |
17 | enum Parity{ Odd =2 , Even =1 }; | 19 | enum Parity{ Odd =2 , Even =1, NonePar =0 }; |
18 | enum Speed{ Baud_115200, | 20 | enum Speed{ Baud_115200, |
19 | Baud_57600, | 21 | Baud_57600, |
20 | Baud_38400, | 22 | Baud_38400, |
@@ -38,7 +40,7 @@ private: | |||
38 | QRadioButton *m_flowHw, *m_flowSw, *m_flowNone; | 40 | QRadioButton *m_flowHw, *m_flowSw, *m_flowNone; |
39 | 41 | ||
40 | QButtonGroup* m_groupParity; | 42 | QButtonGroup* m_groupParity; |
41 | QRadioButton *m_parityOdd, *m_parityEven; | 43 | QRadioButton *m_parityOdd, *m_parityEven, *m_parityNone; |
42 | QHBoxLayout* m_hbox; | 44 | QHBoxLayout* m_hbox; |
43 | QHBoxLayout* m_hboxPar; | 45 | QHBoxLayout* m_hboxPar; |
44 | }; | 46 | }; |
diff --git a/noncore/apps/opie-console/irdaconfigwidget.cpp b/noncore/apps/opie-console/irdaconfigwidget.cpp index 2341fd4..72e99a1 100644 --- a/noncore/apps/opie-console/irdaconfigwidget.cpp +++ b/noncore/apps/opie-console/irdaconfigwidget.cpp | |||
@@ -59,8 +59,10 @@ void IrdaConfigWidget::load( const Profile& prof ) { | |||
59 | 59 | ||
60 | if (rad_parity == 1) { | 60 | if (rad_parity == 1) { |
61 | m_base->setParity( IOLayerBase::Even ); | 61 | m_base->setParity( IOLayerBase::Even ); |
62 | } else { | 62 | } else if ( rad_parity == 2 ) { |
63 | m_base->setParity( IOLayerBase::Odd ); | 63 | m_base->setParity( IOLayerBase::Odd ); |
64 | } else { | ||
65 | m_base->setParity( IOLayerBase::NonePar ); | ||
64 | } | 66 | } |
65 | 67 | ||
66 | switch( speed ) { | 68 | switch( speed ) { |
@@ -115,6 +117,9 @@ void IrdaConfigWidget::save( Profile& prof ) { | |||
115 | case IOLayerBase::Even: | 117 | case IOLayerBase::Even: |
116 | parity = 1; | 118 | parity = 1; |
117 | break; | 119 | break; |
120 | case IOLayerBase::NonePar: | ||
121 | parity = 0; | ||
122 | break; | ||
118 | } | 123 | } |
119 | 124 | ||
120 | switch( m_base->speed() ) { | 125 | switch( m_base->speed() ) { |
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp index ac62e45..0f0ce7c 100644 --- a/noncore/apps/opie-console/modemconfigwidget.cpp +++ b/noncore/apps/opie-console/modemconfigwidget.cpp | |||
@@ -83,10 +83,13 @@ void ModemConfigWidget::load( const Profile& prof ) { | |||
83 | m_base->setFlow( IOLayerBase::None ); | 83 | m_base->setFlow( IOLayerBase::None ); |
84 | } | 84 | } |
85 | 85 | ||
86 | |||
86 | if ( rad_parity == 1 ) { | 87 | if ( rad_parity == 1 ) { |
87 | m_base->setParity( IOLayerBase::Even ); | 88 | m_base->setParity( IOLayerBase::Even ); |
88 | } else { | 89 | } else if ( rad_parity == 2 ){ |
89 | m_base->setParity( IOLayerBase::Odd ); | 90 | m_base->setParity( IOLayerBase::Odd ); |
91 | } else { | ||
92 | m_base->setParity( IOLayerBase::NonePar ); | ||
90 | } | 93 | } |
91 | 94 | ||
92 | switch( speed ) { | 95 | switch( speed ) { |
@@ -145,6 +148,9 @@ void ModemConfigWidget::save( Profile& prof ) { | |||
145 | case IOLayerBase::Even: | 148 | case IOLayerBase::Even: |
146 | parity = 1; | 149 | parity = 1; |
147 | break; | 150 | break; |
151 | case IOLayerBase::NonePar: | ||
152 | parity = 0; | ||
153 | break; | ||
148 | } | 154 | } |
149 | 155 | ||
150 | switch( m_base->speed() ) { | 156 | switch( m_base->speed() ) { |
diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp index 113327c..e8bdb2e 100644 --- a/noncore/apps/opie-console/profilemanager.cpp +++ b/noncore/apps/opie-console/profilemanager.cpp | |||
@@ -78,10 +78,10 @@ Session* ProfileManager::fromProfile( const Profile& prof, QWidget* parent) { | |||
78 | session->setIOLayer(m_fact->newIOLayer( m_fact->external(prof.ioLayerName()) , | 78 | session->setIOLayer(m_fact->newIOLayer( m_fact->external(prof.ioLayerName()) , |
79 | prof) ); | 79 | prof) ); |
80 | 80 | ||
81 | QWidgetStack *stack = new QWidgetStack(parent); | 81 | QWidgetStack *stack = new QWidgetStack( parent ); |
82 | session->setWidgetStack( stack ); | 82 | session->setWidgetStack( stack ); |
83 | QWidget* dummy = new QWidget( stack ); | 83 | QWidget* dummy = new QWidget( stack ); |
84 | QHBoxLayout* lay = new QHBoxLayout(dummy ); | 84 | QHBoxLayout* lay = new QHBoxLayout( dummy ); |
85 | stack->addWidget( dummy, 0 ); | 85 | stack->addWidget( dummy, 0 ); |
86 | stack->raiseWidget( 0 ); | 86 | stack->raiseWidget( 0 ); |
87 | EmulationHandler* handler = new EmulationHandler(prof,dummy ); | 87 | EmulationHandler* handler = new EmulationHandler(prof,dummy ); |
diff --git a/noncore/apps/opie-console/serialconfigwidget.cpp b/noncore/apps/opie-console/serialconfigwidget.cpp index 89acc98..d216c92 100644 --- a/noncore/apps/opie-console/serialconfigwidget.cpp +++ b/noncore/apps/opie-console/serialconfigwidget.cpp | |||
@@ -61,8 +61,10 @@ void SerialConfigWidget::load( const Profile& prof ) { | |||
61 | 61 | ||
62 | if (rad_parity == 1) { | 62 | if (rad_parity == 1) { |
63 | m_base->setParity( IOLayerBase::Even ); | 63 | m_base->setParity( IOLayerBase::Even ); |
64 | } else { | 64 | } else if ( rad_parity == 2 ) { |
65 | m_base->setParity( IOLayerBase::Odd ); | 65 | m_base->setParity( IOLayerBase::Odd ); |
66 | } else { | ||
67 | m_base->setParity( IOLayerBase::NonePar ); | ||
66 | } | 68 | } |
67 | 69 | ||
68 | switch( speed ) { | 70 | switch( speed ) { |
@@ -116,6 +118,9 @@ void SerialConfigWidget::save( Profile& prof ) { | |||
116 | case IOLayerBase::Even: | 118 | case IOLayerBase::Even: |
117 | parity = 1; | 119 | parity = 1; |
118 | break; | 120 | break; |
121 | case IOLayerBase::NonePar: | ||
122 | parity = 0; | ||
123 | break; | ||
119 | } | 124 | } |
120 | 125 | ||
121 | switch( m_base->speed() ) { | 126 | switch( m_base->speed() ) { |