-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 @@ -70,6 +70,8 @@ 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 ); } @@ -126,4 +128,7 @@ void BTConfigWidget::save( Profile& prof ) { parity = 1; break; + case IOLayerBase::NonePar: + parity = 0; + break; } 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 @@ -22,14 +22,14 @@ static const ColorEntry color_table[TABLE_COLORS] = { ColorEntry(QColor(0x00,0x00,0x00), 0, 0 ), ColorEntry( QColor(0xB2,0xB2,0xB2), 1, 0 ), // Dfore, Dback - ColorEntry(QColor(0x00,0x00,0x00), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0x18), 0, 0 ), // Black, Red - ColorEntry(QColor(0x18,0xB2,0x18), 0, 0 ), ColorEntry( QColor(0xB2,0x68,0x18), 0, 0 ), // Green, Yellow - ColorEntry(QColor(0x18,0x18,0xB2), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0xB2), 0, 0 ), // Blue, Magenta - ColorEntry(QColor(0x18,0xB2,0xB2), 0, 0 ), ColorEntry( QColor(0xB2,0xB2,0xB2), 0, 0 ), // Cyan, White - // intensiv - ColorEntry(QColor(0x00,0x00,0x00), 0, 1 ), ColorEntry( QColor(0xFF,0xFF,0xFF), 1, 0 ), - ColorEntry(QColor(0x68,0x68,0x68), 0, 0 ), ColorEntry( QColor(0xFF,0x54,0x54), 0, 0 ), - ColorEntry(QColor(0x54,0xFF,0x54), 0, 0 ), ColorEntry( QColor(0xFF,0xFF,0x54), 0, 0 ), - ColorEntry(QColor(0x54,0x54,0xFF), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0xB2), 0, 0 ), - ColorEntry(QColor(0x54,0xFF,0xFF), 0, 0 ), ColorEntry( QColor(0xFF,0xFF,0xFF), 0, 0 ) + ColorEntry(QColor(0x00,0x00,0x00), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0x18), 0, 0 ), // Black, Red + ColorEntry(QColor(0x18,0xB2,0x18), 0, 0 ), ColorEntry( QColor(0xB2,0x68,0x18), 0, 0 ), // Green, Yellow + ColorEntry(QColor(0x18,0x18,0xB2), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0xB2), 0, 0 ), // Blue, Magenta + ColorEntry(QColor(0x18,0xB2,0xB2), 0, 0 ), ColorEntry( QColor(0xB2,0xB2,0xB2), 0, 0 ), // Cyan, White + // intensiv + ColorEntry(QColor(0x00,0x00,0x00), 0, 1 ), ColorEntry( QColor(0xFF,0xFF,0xFF), 1, 0 ), + ColorEntry(QColor(0x68,0x68,0x68), 0, 0 ), ColorEntry( QColor(0xFF,0x54,0x54), 0, 0 ), + ColorEntry(QColor(0x54,0xFF,0x54), 0, 0 ), ColorEntry( QColor(0xFF,0xFF,0x54), 0, 0 ), + ColorEntry(QColor(0x54,0x54,0xFF), 0, 0 ), ColorEntry( QColor(0xB2,0x18,0xB2), 0, 0 ), + ColorEntry(QColor(0x54,0xFF,0xFF), 0, 0 ), ColorEntry( QColor(0xFF,0xFF,0xFF), 0, 0 ) }; @@ -43,4 +43,5 @@ EmulationWidget::EmulationWidget( const Profile& config, QWidget *parent, const f_ascent = fm.ascent(); + // initialize scrollbar related vars m_scrollbar = new QScrollBar( this ); @@ -50,6 +51,6 @@ EmulationWidget::EmulationWidget( const Profile& config, QWidget *parent, const calcGeometry(); - // load config - reloadConfig( config ); + // load config + reloadConfig( config ); m_resizing = false; @@ -110,4 +111,5 @@ 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() ); @@ -234,5 +236,9 @@ void EmulationWidget::calcGeometry() m_scrollbar->resize(QApplication::style().scrollBarExtent().width(), contentsRect().height() ); - switch( scrollLoc ) + 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 @@ -38,4 +38,5 @@ 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); 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; + } } 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 @@ -12,8 +12,10 @@ 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, @@ -39,5 +41,5 @@ private: 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 @@ -60,6 +60,8 @@ 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 ); } @@ -116,4 +118,7 @@ void IrdaConfigWidget::save( Profile& prof ) { parity = 1; break; + case IOLayerBase::NonePar: + parity = 0; + break; } 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 @@ -84,8 +84,11 @@ void ModemConfigWidget::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 ); } @@ -146,4 +149,7 @@ void ModemConfigWidget::save( Profile& prof ) { parity = 1; break; + case IOLayerBase::NonePar: + parity = 0; + break; } 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 @@ -79,8 +79,8 @@ Session* ProfileManager::fromProfile( const Profile& prof, QWidget* parent) { prof) ); - QWidgetStack *stack = new QWidgetStack(parent); + QWidgetStack *stack = new QWidgetStack( parent ); session->setWidgetStack( stack ); QWidget* dummy = new QWidget( stack ); - QHBoxLayout* lay = new QHBoxLayout(dummy ); + QHBoxLayout* lay = new QHBoxLayout( dummy ); stack->addWidget( dummy, 0 ); stack->raiseWidget( 0 ); 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 @@ -62,6 +62,8 @@ 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 ); } @@ -117,4 +119,7 @@ void SerialConfigWidget::save( Profile& prof ) { parity = 1; break; + case IOLayerBase::NonePar: + parity = 0; + break; } |