summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/btconfigwidget.cpp12
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp12
-rw-r--r--noncore/apps/opie-console/io_serial.h2
-rw-r--r--noncore/apps/opie-console/iolayerbase.cpp19
-rw-r--r--noncore/apps/opie-console/iolayerbase.h4
-rw-r--r--noncore/apps/opie-console/irdaconfigwidget.cpp12
-rw-r--r--noncore/apps/opie-console/main.cpp6
-rw-r--r--noncore/apps/opie-console/modemconfigwidget.cpp14
-rw-r--r--noncore/apps/opie-console/serialconfigwidget.cpp12
-rw-r--r--noncore/apps/opie-console/terminalwidget.cpp70
-rw-r--r--noncore/apps/opie-console/terminalwidget.h6
11 files changed, 128 insertions, 41 deletions
diff --git a/noncore/apps/opie-console/btconfigwidget.cpp b/noncore/apps/opie-console/btconfigwidget.cpp
index 0ac337f..e1ff18a 100644
--- a/noncore/apps/opie-console/btconfigwidget.cpp
+++ b/noncore/apps/opie-console/btconfigwidget.cpp
@@ -99,6 +99,12 @@ void BTConfigWidget::load( const Profile& prof ) {
case 19200:
m_base->setSpeed( IOLayerBase::Baud_19200 );
break;
+ case 4800:
+ m_base->setSpeed( IOLayerBase::Baud_4800 );
+ break;
+ case 2400:
+ m_base->setSpeed( IOLayerBase::Baud_2400 );
+ break;
case 9600:
default:
m_base->setSpeed(IOLayerBase::Baud_9600 );
@@ -157,6 +163,12 @@ void BTConfigWidget::save( Profile& prof ) {
case IOLayerBase::Baud_19200:
speed = 19200;
break;
+ case IOLayerBase::Baud_4800:
+ speed = 4800;
+ break;
+ case IOLayerBase::Baud_2400:
+ speed = 2400;
+ break;
default:
case IOLayerBase::Baud_9600:
speed = 9600;
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index 89b70c6..1a0613f 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -41,7 +41,9 @@ EmulationHandler::~EmulationHandler() {
}
void EmulationHandler::load( const Profile& prof) {
- m_teWid->setVTFont( font( prof.readNumEntry("Font") ) );
+
+// m_teWid->setVTFont( font( prof.readNumEntry("Font") ) );
+ m_teWid->setVTFont( QFont( prof.readEntry("Font"), prof.readNumEntry( "FontSize" ), QFont::Normal ) );
int num = prof.readNumEntry("Color");
setColor( foreColor(num), backColor(num) );
m_teWid->setBackgroundColor(backColor(num) );
@@ -130,11 +132,11 @@ QColor EmulationHandler::foreColor(int col) {
co = Qt::black;
break;
case Profile::Green:
- owarn << "Foreground green" << oendl;
+ owarn << "Foreground green" << oendl;
co = Qt::green;
break;
case Profile::Orange:
- owarn << "Foreground orange" << oendl;
+ owarn << "Foreground orange" << oendl;
co.setRgb( 231, 184, 98 );
break;
}
@@ -154,11 +156,11 @@ QColor EmulationHandler::backColor(int col ) {
co = Qt::white;
break;
case Profile::Green:
- owarn << "Background black" << oendl;
+ owarn << "Background black" << oendl;
co = Qt::black;
break;
case Profile::Orange:
- owarn << "Background black" << oendl;
+ owarn << "Background black" << oendl;
co = Qt::black;
break;
}
diff --git a/noncore/apps/opie-console/io_serial.h b/noncore/apps/opie-console/io_serial.h
index 20c1ae1..f8b04e2 100644
--- a/noncore/apps/opie-console/io_serial.h
+++ b/noncore/apps/opie-console/io_serial.h
@@ -39,7 +39,7 @@ public:
void closeRawIO (int fd );
virtual QBitArray supports() const;
virtual bool isConnected();
-
+
/*signals:
void received(const QByteArray &);
void error(int, const QString &);
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
@@ -24,7 +24,9 @@ namespace {
id_baud_57600,
id_baud_38400,
id_baud_19200,
- id_baud_9600
+ id_baud_9600,
+ id_baud_4800,
+ id_baud_2400
};
enum DataIds {
@@ -86,7 +88,8 @@ IOLayerBase::IOLayerBase( QWidget* par, const char* name )
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() {
@@ -133,6 +136,12 @@ void IOLayerBase::setSpeed( Speed sp ) {
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;
@@ -208,6 +217,12 @@ IOLayerBase::Speed IOLayerBase::speed()const{
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;
diff --git a/noncore/apps/opie-console/iolayerbase.h b/noncore/apps/opie-console/iolayerbase.h
index e1b96df..214a35c 100644
--- a/noncore/apps/opie-console/iolayerbase.h
+++ b/noncore/apps/opie-console/iolayerbase.h
@@ -21,7 +21,9 @@ public:
Baud_57600,
Baud_38400,
Baud_19200,
- Baud_9600 };
+ Baud_9600,
+ Baud_4800,
+ Baud_2400 };
enum Data { Data_Five =5, Data_Six =6, Data_Seven=7, Data_Eight=8 };
enum Stop { Stop_One =1, Stop_OnePointFive=15, Stop_Two=2 };
diff --git a/noncore/apps/opie-console/irdaconfigwidget.cpp b/noncore/apps/opie-console/irdaconfigwidget.cpp
index 059530d..4ee770d 100644
--- a/noncore/apps/opie-console/irdaconfigwidget.cpp
+++ b/noncore/apps/opie-console/irdaconfigwidget.cpp
@@ -78,6 +78,12 @@ void IrdaConfigWidget::load( const Profile& prof ) {
case 19200:
m_base->setSpeed( IOLayerBase::Baud_19200 );
break;
+ case 4800:
+ m_base->setSpeed( IOLayerBase::Baud_4800 );
+ break;
+ case 2400:
+ m_base->setSpeed( IOLayerBase::Baud_2400 );
+ break;
case 9600:
default:
m_base->setSpeed(IOLayerBase::Baud_9600 );
@@ -136,6 +142,12 @@ void IrdaConfigWidget::save( Profile& prof ) {
case IOLayerBase::Baud_19200:
speed = 19200;
break;
+ case IOLayerBase::Baud_4800:
+ speed = 4800;
+ break;
+ case IOLayerBase::Baud_2400:
+ speed = 2400;
+ break;
default:
case IOLayerBase::Baud_9600:
speed = 9600;
diff --git a/noncore/apps/opie-console/main.cpp b/noncore/apps/opie-console/main.cpp
index 1bd4338..f61f44e 100644
--- a/noncore/apps/opie-console/main.cpp
+++ b/noncore/apps/opie-console/main.cpp
@@ -3,13 +3,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
-
+#include <qfile.h>
#include <qpe/qpeapplication.h>
#include "mainwindow.h"
-//#define FSCKED_DISTRIBUTION 1
+#define FSCKED_DISTRIBUTION 1
#ifdef FSCKED_DISTRIBUTION
/*
* The Zaurus rom
@@ -91,7 +91,7 @@ int main(int argc, char **argv) {
QPEApplication app( argc, argv );
#ifdef FSCKED_DISTRIBUTION
- owarn << "fscked" << oendl;
+// owarn << "fscked" << oendl;
FixIt it;
it.fixIt();
#endif
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp
index 9fdaf73..90d0b5b 100644
--- a/noncore/apps/opie-console/modemconfigwidget.cpp
+++ b/noncore/apps/opie-console/modemconfigwidget.cpp
@@ -110,6 +110,12 @@ void ModemConfigWidget::load( const Profile& prof ) {
case 19200:
m_base->setSpeed( IOLayerBase::Baud_19200 );
break;
+ case 4800:
+ m_base->setSpeed( IOLayerBase::Baud_4800 );
+ break;
+ case 2400:
+ m_base->setSpeed( IOLayerBase::Baud_2400 );
+ break;
case 9600:
default:
m_base->setSpeed( IOLayerBase::Baud_9600 );
@@ -138,7 +144,7 @@ void ModemConfigWidget::load( const Profile& prof ) {
atConf->readConfig( prof );
if ( prof.readEntry( "Device" ).isEmpty() ) {
- owarn << "device empty!" << oendl;
+ owarn << "device empty!" << oendl;
return;
}
setCurrent( prof.readEntry( "Device" ), m_deviceCmb );
@@ -197,6 +203,12 @@ void ModemConfigWidget::save( Profile& prof ) {
case IOLayerBase::Baud_9600:
speed = 9600;
break;
+ case IOLayerBase::Baud_4800:
+ speed = 4800;
+ break;
+ case IOLayerBase::Baud_2400:
+ speed = 2400;
+ break;
}
switch( m_base->data() ) {
diff --git a/noncore/apps/opie-console/serialconfigwidget.cpp b/noncore/apps/opie-console/serialconfigwidget.cpp
index 3edf723..5f3547a 100644
--- a/noncore/apps/opie-console/serialconfigwidget.cpp
+++ b/noncore/apps/opie-console/serialconfigwidget.cpp
@@ -82,6 +82,12 @@ void SerialConfigWidget::load( const Profile& prof ) {
case 19200:
m_base->setSpeed( IOLayerBase::Baud_19200 );
break;
+ case 4800:
+ m_base->setSpeed( IOLayerBase::Baud_4800 );
+ break;
+ case 2400:
+ m_base->setSpeed( IOLayerBase::Baud_2400 );
+ break;
case 9600:
default:
m_base->setSpeed(IOLayerBase::Baud_9600 );
@@ -157,6 +163,12 @@ void SerialConfigWidget::save( Profile& prof ) {
case IOLayerBase::Baud_19200:
speed = 19200;
break;
+ case IOLayerBase::Baud_4800:
+ speed = 4800;
+ break;
+ case IOLayerBase::Baud_2400:
+ speed = 2400;
+ break;
default:
case IOLayerBase::Baud_9600:
speed = 9600;
diff --git a/noncore/apps/opie-console/terminalwidget.cpp b/noncore/apps/opie-console/terminalwidget.cpp
index 087476b..3e3b8a6 100644
--- a/noncore/apps/opie-console/terminalwidget.cpp
+++ b/noncore/apps/opie-console/terminalwidget.cpp
@@ -2,6 +2,7 @@
/* OPIE */
#include <opie2/odebug.h>
+
using namespace Opie::Core;
/* QT */
@@ -12,6 +13,7 @@ using namespace Opie::Core;
#include <qhgroupbox.h>
#include <qhbuttongroup.h>
#include <qlayout.h>
+#include <qhbox.h>
namespace {
enum TermIds {
@@ -44,15 +46,19 @@ TerminalWidget::TerminalWidget( const QString& name, QWidget* parent,
m_colorLabel = new QLabel(tr("Color scheme"), this);
m_colorCmb = new QComboBox(this );
- m_groupSize = new QHButtonGroup(tr("Font size"), this );
- m_sizeSmall = new QRadioButton(tr("small"), m_groupSize );
- m_sizeMedium = new QRadioButton(tr("medium"), m_groupSize );
- m_sizeLarge = new QRadioButton(tr("large"), m_groupSize );
+// m_groupSize = new QHButtonGroup(tr("Font size"), this );
+ m_groupSize = new QHBox( this );
+ m_fontSelector = new Opie::Ui::OFontSelector( false, m_groupSize );
+
+// m_sizeSmall = new QRadioButton(tr("small"), m_groupSize );
+// m_sizeMedium = new QRadioButton(tr("medium"), m_groupSize );
+// m_sizeLarge = new QRadioButton(tr("large"), m_groupSize );
m_groupConv = new QHGroupBox( tr("Line-break conversions"), this );
m_convInbound = new QCheckBox( tr("Inbound"), m_groupConv );
m_convOutbound = new QCheckBox( tr("Outbound"), m_groupConv );
+
m_groupOptions = new QHGroupBox( tr("Options"), this );
m_optionEcho = new QCheckBox( tr("Local echo"), m_groupOptions );
m_optionWrap = new QCheckBox( tr("Line wrap"), m_groupOptions );
@@ -74,7 +80,7 @@ TerminalWidget::TerminalWidget( const QString& name, QWidget* parent,
m_lroot->addStretch( 0 );
// Fill in some options
- owarn << "Options for terminal box" << oendl;
+ owarn << "Options for terminal box" << oendl;
m_terminalBox->insertItem( tr("VT 100"), 0 ); // /*, id_term_vt100*/ );
m_terminalBox->insertItem( tr("VT 102"), 1 ); // /* , id_term_vt102 */);
m_terminalBox->insertItem( tr("Linux Console"), 2 ); //, id_term_linux );
@@ -110,7 +116,7 @@ TerminalWidget::~TerminalWidget() {
void TerminalWidget::load( const Profile& prof ) {
int term = prof.readNumEntry("Terminal");
int color = prof.readNumEntry("Color");
- int fontsize = prof.readNumEntry("Font");
+// int fontsize = prof.readNumEntry("Font");
int opt_echo = prof.readNumEntry("Echo");
int opt_wrap = prof.readNumEntry("Wrap");
int opt_inbound = prof.readNumEntry("Inbound");
@@ -151,20 +157,23 @@ void TerminalWidget::load( const Profile& prof ) {
break;
};
- switch( fontsize ) {
- case Profile::Micro:
- m_sizeSmall->setChecked(true );
- break;
- case Profile::Small:
- m_sizeMedium->setChecked(true );
- break;
- case Profile::Medium:
- m_sizeLarge->setChecked( true );
- break;
- default:
- m_sizeMedium->setChecked(true );
- break;
- };
+
+ m_fontSelector->setSelectedFont( prof.readEntry( "Font"), prof.readEntry( "FontStyle"), prof.readNumEntry( "FontSize" ), prof.readEntry( "FontCharset") );
+
+// switch( fontsize ) {
+// case Profile::Micro:
+// m_sizeSmall->setChecked(true );
+// break;
+// case Profile::Small:
+// m_sizeMedium->setChecked(true );
+// break;
+// case Profile::Medium:
+// m_sizeLarge->setChecked( true );
+// break;
+// default:
+// m_sizeMedium->setChecked(true );
+// break;
+// };
if (opt_echo) m_optionEcho->setChecked( true );
if (opt_wrap) m_optionWrap->setChecked( true );
@@ -211,13 +220,20 @@ void TerminalWidget::save( Profile& profile ) {
break;
};
- if (m_sizeSmall->isChecked() ) {
- profile.writeEntry("Font", Profile::Micro );
- }else if (m_sizeMedium->isChecked() ) {
- profile.writeEntry("Font", Profile::Small );
- }else {
- profile.writeEntry("Font", Profile::Medium );
- }
+
+ profile.writeEntry( "FontSize", m_fontSelector->fontSize() );
+ profile.writeEntry( "FontStyle", m_fontSelector->fontStyle() );
+ profile.writeEntry( "FontCharset", m_fontSelector->fontCharSet() );
+ profile.writeEntry( "Font", m_fontSelector->fontFamily() );
+
+
+// if (m_sizeSmall->isChecked() ) {
+// profile.writeEntry("Font", Profile::Micro );
+// }else if (m_sizeMedium->isChecked() ) {
+// profile.writeEntry("Font", Profile::Small );
+// }else {
+// profile.writeEntry("Font", Profile::Medium );
+// }
profile.writeEntry("Echo", m_optionEcho->isChecked() );
profile.writeEntry("Wrap", m_optionWrap->isChecked() );
diff --git a/noncore/apps/opie-console/terminalwidget.h b/noncore/apps/opie-console/terminalwidget.h
index 217fea7..2bd38d6 100644
--- a/noncore/apps/opie-console/terminalwidget.h
+++ b/noncore/apps/opie-console/terminalwidget.h
@@ -3,6 +3,8 @@
#include "profiledialogwidget.h"
+#include <opie2/ofontselector.h>
+
class QComboBox;
class QLabel;
class QVBoxLayout;
@@ -13,6 +15,7 @@ class QCheckBox;
class QHGroupBox;
class QHBox;
+
class TerminalWidget : public ProfileDialogTerminalWidget {
Q_OBJECT
@@ -32,7 +35,7 @@ private:
QComboBox* m_terminalBox, *m_colorCmb;
- QButtonGroup* m_groupSize;
+ QHBox* m_groupSize;
QRadioButton* m_sizeSmall, *m_sizeMedium,
*m_sizeLarge;
@@ -43,6 +46,7 @@ private:
*m_convOutbound, *m_optionEcho,
*m_optionWrap;
+ Opie::Ui::OFontSelector *m_fontSelector;
};
#endif