summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-10-14 19:01:58 (UTC)
committer harlekin <harlekin>2002-10-14 19:01:58 (UTC)
commit7d6fea084fc40160285fe3898bd56cec3902dca0 (patch) (side-by-side diff)
tree071cdc8fc710557d4cfbde39e6bc7770e852c32b
parent678b36abe519019158765a1e57cd858dae55ca2f (diff)
downloadopie-7d6fea084fc40160285fe3898bd56cec3902dca0.zip
opie-7d6fea084fc40160285fe3898bd56cec3902dca0.tar.gz
opie-7d6fea084fc40160285fe3898bd56cec3902dca0.tar.bz2
parity none added
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/btconfigwidget.cpp7
-rw-r--r--noncore/apps/opie-console/emulation_widget.cpp6
-rw-r--r--noncore/apps/opie-console/io_modem.cpp1
-rw-r--r--noncore/apps/opie-console/iolayerbase.cpp13
-rw-r--r--noncore/apps/opie-console/iolayerbase.h6
-rw-r--r--noncore/apps/opie-console/irdaconfigwidget.cpp7
-rw-r--r--noncore/apps/opie-console/modemconfigwidget.cpp8
-rw-r--r--noncore/apps/opie-console/profilemanager.cpp0
-rw-r--r--noncore/apps/opie-console/serialconfigwidget.cpp7
9 files changed, 47 insertions, 8 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 ) {
if (rad_parity == 1) {
m_base->setParity( IOLayerBase::Even );
- } else {
+ } else if ( rad_parity == 2 ) {
m_base->setParity( IOLayerBase::Odd );
+ } else {
+ m_base->setParity( IOLayerBase::NonePar );
}
switch( speed ) {
@@ -125,6 +127,9 @@ void BTConfigWidget::save( Profile& prof ) {
case IOLayerBase::Even:
parity = 1;
break;
+ case IOLayerBase::NonePar:
+ parity = 0;
+ break;
}
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
@@ -42,6 +42,7 @@ EmulationWidget::EmulationWidget( const Profile& config, QWidget *parent, const
f_width = fm.maxWidth();
f_ascent = fm.ascent();
+
// initialize scrollbar related vars
m_scrollbar = new QScrollBar( this );
m_scrollbar->setCursor( arrowCursor );
@@ -109,6 +110,7 @@ static QChar vt100extended(QChar c)
QSize EmulationWidget::calcSize( int cols, int lins ) const
{
int frw = width() - contentsRect().width();
+
int frh = height() - contentsRect().height();
int scw = (scrollLoc == SCRNONE? 0 : m_scrollbar->width() );
return QSize( f_width * cols + 2 * rimX + frw + scw, f_height * lins + 2 * rimY + frh );
@@ -233,6 +235,10 @@ void EmulationWidget::calcGeometry()
{
m_scrollbar->resize(QApplication::style().scrollBarExtent().width(), contentsRect().height() );
+ qDebug( QString(" TEST").arg( contentsRect().width() ) );
+ qDebug( QString(" TEST").arg( contentsRect().height() ) );
+ qDebug("NEUER TESTT!!!!!!!!");
+
switch( scrollLoc )
{
case SCRNONE :
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() {
}
void IOModem::reload( const Profile &config ) {
+
m_device = config.readEntry("Device", MODEM_DEFAULT_DEVICE);
m_baud = config.readNumEntry("Baud", MODEM_DEFAULT_BAUD);
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 @@
namespace {
enum ParityIds {
+ id_parity_none,
id_parity_odd,
id_parity_even
};
@@ -42,6 +43,7 @@ IOLayerBase::IOLayerBase( QWidget* par, const char* name )
m_flowNone = new QRadioButton( tr("None"), m_groupFlow );
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 );
@@ -61,6 +63,7 @@ IOLayerBase::IOLayerBase( QWidget* par, const char* name )
m_hboxPar = new QHBoxLayout( m_groupParity, 2 );
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 );
@@ -90,6 +93,9 @@ 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 );
break;
@@ -132,10 +138,13 @@ 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;
+ }
}
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;
class QRadioButton;
class QHBoxLayout;
class IOLayerBase : public QWidget {
+
Q_OBJECT
+
public:
enum Flow { Hardware, Software, None };
- enum Parity{ Odd =2 , Even =1 };
+ enum Parity{ Odd =2 , Even =1, NonePar =0 };
enum Speed{ Baud_115200,
Baud_57600,
Baud_38400,
@@ -38,7 +40,7 @@ private:
QRadioButton *m_flowHw, *m_flowSw, *m_flowNone;
QButtonGroup* m_groupParity;
- QRadioButton *m_parityOdd, *m_parityEven;
+ QRadioButton *m_parityOdd, *m_parityEven, *m_parityNone;
QHBoxLayout* m_hbox;
QHBoxLayout* m_hboxPar;
};
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 ) {
if (rad_parity == 1) {
m_base->setParity( IOLayerBase::Even );
- } else {
+ } else if ( rad_parity == 2 ) {
m_base->setParity( IOLayerBase::Odd );
+ } else {
+ m_base->setParity( IOLayerBase::NonePar );
}
switch( speed ) {
@@ -115,6 +117,9 @@ void IrdaConfigWidget::save( Profile& prof ) {
case IOLayerBase::Even:
parity = 1;
break;
+ case IOLayerBase::NonePar:
+ parity = 0;
+ break;
}
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 ) {
m_base->setFlow( IOLayerBase::None );
}
+
if ( rad_parity == 1 ) {
m_base->setParity( IOLayerBase::Even );
- } else {
+ } else if ( rad_parity == 2 ){
m_base->setParity( IOLayerBase::Odd );
+ } else {
+ m_base->setParity( IOLayerBase::NonePar );
}
switch( speed ) {
@@ -145,6 +148,9 @@ void ModemConfigWidget::save( Profile& prof ) {
case IOLayerBase::Even:
parity = 1;
break;
+ case IOLayerBase::NonePar:
+ parity = 0;
+ break;
}
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
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 ) {
if (rad_parity == 1) {
m_base->setParity( IOLayerBase::Even );
- } else {
+ } else if ( rad_parity == 2 ) {
m_base->setParity( IOLayerBase::Odd );
+ } else {
+ m_base->setParity( IOLayerBase::NonePar );
}
switch( speed ) {
@@ -116,6 +118,9 @@ void SerialConfigWidget::save( Profile& prof ) {
case IOLayerBase::Even:
parity = 1;
break;
+ case IOLayerBase::NonePar:
+ parity = 0;
+ break;
}
switch( m_base->speed() ) {