Diffstat (limited to 'noncore/apps/opie-console/iolayerbase.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/iolayerbase.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
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 @@ -10,4 +10,5 @@ namespace { enum ParityIds { + id_parity_none, id_parity_odd, id_parity_even @@ -43,4 +44,5 @@ IOLayerBase::IOLayerBase( QWidget* par, const char* name ) m_groupParity = new QButtonGroup(tr("Parity"), this ); + m_parityNone = new QRadioButton(tr("None"), m_groupParity ); m_parityOdd = new QRadioButton(tr("Odd"), m_groupParity ); m_parityEven = new QRadioButton(tr("Even"), m_groupParity ); @@ -62,4 +64,5 @@ IOLayerBase::IOLayerBase( QWidget* par, const char* name ) m_hboxPar->add(m_parityOdd ); m_hboxPar->add(m_parityEven ); + m_hboxPar->add(m_parityNone ); m_lroot->add(m_groupParity ); m_lroot->setStretchFactor(m_groupParity, 2 ); @@ -91,4 +94,7 @@ void IOLayerBase::setFlow( Flow flo ) { void IOLayerBase::setParity( Parity par ) { switch( par ) { + case NonePar: + m_parityNone->setChecked( true ); + break; case Odd: m_parityOdd->setChecked( true ); @@ -133,8 +139,11 @@ IOLayerBase::Flow IOLayerBase::flow()const { } IOLayerBase::Parity IOLayerBase::parity()const { - if (m_parityOdd->isChecked() ) + if ( m_parityOdd->isChecked() ) { return Odd; - else + } else if ( m_parityEven->isChecked() ) { return Even; + } else { + return NonePar; + } } |