author | harlekin <harlekin> | 2004-04-22 18:58:37 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2004-04-22 18:58:37 (UTC) |
commit | 5c6499c56cd5c00603634546e6ba8c4d9da9741d (patch) (side-by-side diff) | |
tree | 3ad98bb1a0150b1dd69c79fd58e6e59ce8556e51 /noncore/apps/opie-console/iolayerbase.cpp | |
parent | 53d6c4b8bfcb119635b26b78dee0ae4be8490b90 (diff) | |
download | opie-5c6499c56cd5c00603634546e6ba8c4d9da9741d.zip opie-5c6499c56cd5c00603634546e6ba8c4d9da9741d.tar.gz opie-5c6499c56cd5c00603634546e6ba8c4d9da9741d.tar.bz2 |
2400 and 4800 baud added, also free font selection
Diffstat (limited to 'noncore/apps/opie-console/iolayerbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/iolayerbase.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/iolayerbase.cpp b/noncore/apps/opie-console/iolayerbase.cpp index b434e66..0f64d6a 100644 --- a/noncore/apps/opie-console/iolayerbase.cpp +++ b/noncore/apps/opie-console/iolayerbase.cpp @@ -11,33 +11,35 @@ namespace { id_parity_none, id_parity_odd, id_parity_even }; enum FlowIds { id_flow_hw, id_flow_sw, id_flow_none, }; enum SpeedIds { id_baud_115200, id_baud_57600, id_baud_38400, id_baud_19200, - id_baud_9600 + id_baud_9600, + id_baud_4800, + id_baud_2400 }; enum DataIds { id_data_5, id_data_6, id_data_7, id_data_8 }; enum StopIds { id_stop_1, id_stop_1_5, id_stop_2 }; } @@ -73,33 +75,34 @@ IOLayerBase::IOLayerBase( QWidget* par, const char* name ) m_lroot = new QVBoxLayout( this ); m_lroot->add(m_speedLabel ); m_lroot->add(m_speedBox ); m_lroot->add(m_groupFlow ); m_lroot->add(m_groupParity ); m_lroot->add( m_groupData ); m_lroot->add( m_groupStop ); m_lroot->addStretch(2); // profiles m_speedBox->insertItem(tr("115200 baud"), id_baud_115200 ); m_speedBox->insertItem(tr("57600 baud"), id_baud_57600 ); m_speedBox->insertItem(tr("38400 baud"), id_baud_38400 ); m_speedBox->insertItem(tr("19200 baud"), id_baud_19200 ); m_speedBox->insertItem(tr("9600 baud"), id_baud_9600 ); - + m_speedBox->insertItem(tr("4800 baud"), id_baud_4800 ); + m_speedBox->insertItem(tr("2400 baud"), id_baud_2400 ); }; IOLayerBase::~IOLayerBase() { } void IOLayerBase::setFlow( Flow flo ) { switch ( flo ) { case Software: m_flowSw->setChecked( true ); break; case Hardware: m_flowHw->setChecked( true ); break; case None: m_flowNone->setChecked( true ); break; } @@ -120,32 +123,38 @@ void IOLayerBase::setParity( Parity par ) { } void IOLayerBase::setSpeed( Speed sp ) { int index = -1; switch( sp ) { case Baud_115200: index = id_baud_115200; break; case Baud_57600: index = id_baud_57600; break; case Baud_38400: index = id_baud_38400; break; case Baud_19200: index = id_baud_19200; break; + case Baud_4800: + index = id_baud_4800; + break; + case Baud_2400: + index = id_baud_2400; + break; default: case Baud_9600: index = id_baud_9600; break; } m_speedBox->setCurrentItem(index ); } void IOLayerBase::setData( Data data ) { switch( data ) { case Data_Five: m_data5->setChecked( true ); break; case Data_Six: m_data6->setChecked( true ); break; @@ -195,32 +204,38 @@ IOLayerBase::Parity IOLayerBase::parity()const { } IOLayerBase::Speed IOLayerBase::speed()const{ switch( m_speedBox->currentItem() ) { case id_baud_115200: return Baud_115200; break; case id_baud_57600: return Baud_57600; break; case id_baud_38400: return Baud_38400; break; case id_baud_19200: return Baud_19200; break; + case id_baud_4800: + return Baud_4800; + break; + case id_baud_2400: + return Baud_2400; + break; default: case id_baud_9600: return Baud_9600; break; } } IOLayerBase::Data IOLayerBase::data()const { if ( m_data5->isChecked() ) { return Data_Five; } else if ( m_data6->isChecked() ) { return Data_Six; } else if ( m_data7->isChecked() ) { return Data_Seven; } else { return Data_Eight; } |