summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/btconfigwidget.cpp12
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp4
-rw-r--r--noncore/apps/opie-console/io_serial.h0
-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.cpp12
-rw-r--r--noncore/apps/opie-console/serialconfigwidget.cpp12
-rw-r--r--noncore/apps/opie-console/terminalwidget.cpp68
-rw-r--r--noncore/apps/opie-console/terminalwidget.h6
11 files changed, 121 insertions, 34 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
@@ -101,2 +101,8 @@ void BTConfigWidget::load( const Profile& prof ) {
break;
+ case 4800:
+ m_base->setSpeed( IOLayerBase::Baud_4800 );
+ break;
+ case 2400:
+ m_base->setSpeed( IOLayerBase::Baud_2400 );
+ break;
case 9600:
@@ -159,2 +165,8 @@ void BTConfigWidget::save( Profile& prof ) {
break;
+ case IOLayerBase::Baud_4800:
+ speed = 4800;
+ break;
+ case IOLayerBase::Baud_2400:
+ speed = 2400;
+ break;
default:
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
@@ -43,3 +43,5 @@ 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");
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
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
@@ -26,3 +26,5 @@ namespace {
id_baud_19200,
- id_baud_9600
+ id_baud_9600,
+ id_baud_4800,
+ id_baud_2400
};
@@ -88,3 +90,4 @@ IOLayerBase::IOLayerBase( QWidget* par, const char* name )
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 );
};
@@ -135,2 +138,8 @@ void IOLayerBase::setSpeed( Speed sp ) {
break;
+ case Baud_4800:
+ index = id_baud_4800;
+ break;
+ case Baud_2400:
+ index = id_baud_2400;
+ break;
default:
@@ -210,2 +219,8 @@ IOLayerBase::Speed IOLayerBase::speed()const{
break;
+ case id_baud_4800:
+ return Baud_4800;
+ break;
+ case id_baud_2400:
+ return Baud_2400;
+ break;
default:
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
@@ -23,3 +23,5 @@ public:
Baud_19200,
- Baud_9600 };
+ Baud_9600,
+ Baud_4800,
+ Baud_2400 };
enum Data { Data_Five =5, Data_Six =6, Data_Seven=7, Data_Eight=8 };
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
@@ -80,2 +80,8 @@ void IrdaConfigWidget::load( const Profile& prof ) {
break;
+ case 4800:
+ m_base->setSpeed( IOLayerBase::Baud_4800 );
+ break;
+ case 2400:
+ m_base->setSpeed( IOLayerBase::Baud_2400 );
+ break;
case 9600:
@@ -138,2 +144,8 @@ void IrdaConfigWidget::save( Profile& prof ) {
break;
+ case IOLayerBase::Baud_4800:
+ speed = 4800;
+ break;
+ case IOLayerBase::Baud_2400:
+ speed = 2400;
+ break;
default:
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
@@ -5,3 +5,3 @@
#include <signal.h>
-
+#include <qfile.h>
@@ -11,3 +11,3 @@
-//#define FSCKED_DISTRIBUTION 1
+#define FSCKED_DISTRIBUTION 1
#ifdef FSCKED_DISTRIBUTION
@@ -93,3 +93,3 @@ int main(int argc, char **argv) {
#ifdef FSCKED_DISTRIBUTION
- owarn << "fscked" << oendl;
+// owarn << "fscked" << oendl;
FixIt it;
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
@@ -112,2 +112,8 @@ void ModemConfigWidget::load( const Profile& prof ) {
break;
+ case 4800:
+ m_base->setSpeed( IOLayerBase::Baud_4800 );
+ break;
+ case 2400:
+ m_base->setSpeed( IOLayerBase::Baud_2400 );
+ break;
case 9600:
@@ -199,2 +205,8 @@ void ModemConfigWidget::save( Profile& prof ) {
break;
+ case IOLayerBase::Baud_4800:
+ speed = 4800;
+ break;
+ case IOLayerBase::Baud_2400:
+ speed = 2400;
+ break;
}
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
@@ -84,2 +84,8 @@ void SerialConfigWidget::load( const Profile& prof ) {
break;
+ case 4800:
+ m_base->setSpeed( IOLayerBase::Baud_4800 );
+ break;
+ case 2400:
+ m_base->setSpeed( IOLayerBase::Baud_2400 );
+ break;
case 9600:
@@ -159,2 +165,8 @@ void SerialConfigWidget::save( Profile& prof ) {
break;
+ case IOLayerBase::Baud_4800:
+ speed = 4800;
+ break;
+ case IOLayerBase::Baud_2400:
+ speed = 2400;
+ break;
default:
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
@@ -4,2 +4,3 @@
#include <opie2/odebug.h>
+
using namespace Opie::Core;
@@ -14,2 +15,3 @@ using namespace Opie::Core;
#include <qlayout.h>
+#include <qhbox.h>
@@ -46,6 +48,9 @@ TerminalWidget::TerminalWidget( const QString& name, QWidget* parent,
- 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 );
@@ -55,2 +60,3 @@ TerminalWidget::TerminalWidget( const QString& name, QWidget* parent,
+
m_groupOptions = new QHGroupBox( tr("Options"), this );
@@ -112,3 +118,3 @@ void TerminalWidget::load( const Profile& prof ) {
int color = prof.readNumEntry("Color");
- int fontsize = prof.readNumEntry("Font");
+// int fontsize = prof.readNumEntry("Font");
int opt_echo = prof.readNumEntry("Echo");
@@ -153,16 +159,19 @@ void TerminalWidget::load( const Profile& prof ) {
- 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;
+// };
@@ -213,9 +222,16 @@ void TerminalWidget::save( Profile& profile ) {
- 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 );
+// }
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
@@ -5,2 +5,4 @@
+#include <opie2/ofontselector.h>
+
class QComboBox;
@@ -15,2 +17,3 @@ class QHBox;
+
class TerminalWidget : public ProfileDialogTerminalWidget {
@@ -34,3 +37,3 @@ private:
- QButtonGroup* m_groupSize;
+ QHBox* m_groupSize;
@@ -45,2 +48,3 @@ private:
+ Opie::Ui::OFontSelector *m_fontSelector;
};