summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog3
-rw-r--r--inputmethods/dvorak/dvorak.cpp13
-rw-r--r--inputmethods/keyboard/keyboard.cpp13
-rw-r--r--inputmethods/multikey/keyboard.cpp6
-rw-r--r--inputmethods/pickboard/pickboard.cpp15
-rw-r--r--inputmethods/unikeyboard/unikeyboard.cpp12
6 files changed, 45 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index ff579d5..8847714 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,32 +1,33 @@
2005-??-?? Opie 1.2.0
New Features
------------
Fixed Bugs
----------
- * #1501 - Fixing bug in todo sql backend (eilers)
+ * #1501 - Fixed bug in todo sql backend (eilers)
+ * n.a - Removed hard coded font sizes in a couple of inputmethods (mickeyl)
Internal
--------
* Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl)
2004-11-26 Opie 1.1.8
New Features
------------
* PackageManager supports installation of local ipkg files (drw)
* PackageManager supports linking of applications to root (drw)
* PackageManager supports src/gz feeds (drw,wimpie)
* Added a syslog information tab to sysinfo (mickeyl)
* Added new, more consistent, PIM icons + a GIMP teplate (ar)
Fixed Bugs
----------
* #1017 - Tetrix doesn't display correctly for high resolution screens (drw)
* #1269 - VCards were imported into personal area if it was activated (eilers)
* #1464 - Packagemanager dont set active filter after install a package (drw)
* #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers)
* #1493 - Fixed one column layout bug of the launcher (hrw)
* n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw)
* n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw)
diff --git a/inputmethods/dvorak/dvorak.cpp b/inputmethods/dvorak/dvorak.cpp
index 2137f22..3781e38 100644
--- a/inputmethods/dvorak/dvorak.cpp
+++ b/inputmethods/dvorak/dvorak.cpp
@@ -1,72 +1,79 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "dvorak.h"
#include <qpe/global.h>
-
+#include <qpe/config.h>
#include <qwindowsystem_qws.h>
#include <qpainter.h>
#include <qfontmetrics.h>
#include <qtimer.h>
#include <ctype.h>
#define USE_SMALL_BACKSPACE
using namespace Dvorak;
Keyboard::Keyboard(QWidget* parent, const char* name, WFlags f) :
QFrame(parent, name, f), shift(FALSE), lock(FALSE), ctrl(FALSE),
alt(FALSE), useLargeKeys(TRUE), useOptiKeys(0), pressedKey(-1),
unicode(-1), qkeycode(0), modifiers(0)
{
// setPalette(QPalette(QColor(240,240,230))); // Beige!
// setFont( QFont( "Helvetica", 8 ) );
// setPalette(QPalette(QColor(200,200,200))); // Gray
setPalette(QPalette(QColor(220,220,220))); // Gray
+ // get the default font
+ Config *config = new Config( "qpe" );
+ config->setGroup( "Appearance" );
+ QString familyStr = config->readEntry( "FontFamily", "smallsmooth" );
+ int fontSize = config->readNumEntry( "FontSize", 10 );
+ delete config;
+
picks = new KeyboardPicks( this );
- picks->setFont( QFont( "smallsmooth", 9 ) );
- setFont( QFont( "smallsmooth", 9 ) );
+ picks->setFont( QFont( familyStr, fontSize ) );
+ setFont( QFont( familyStr, fontSize ) );
picks->initialise();
QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ),
this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) );
repeatTimer = new QTimer( this );
connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) );
}
void Keyboard::resizeEvent(QResizeEvent*)
{
int ph = picks->sizeHint().height();
picks->setGeometry( 0, 0, width(), ph );
keyHeight = (height()-ph)/5;
int nk;
if ( useOptiKeys ) {
nk = 15;
} else if ( useLargeKeys ) {
nk = 15;
} else {
nk = 19;
}
defaultKeyWidth = width()/nk;
xoffs = (width()-defaultKeyWidth*nk)/2;
}
diff --git a/inputmethods/keyboard/keyboard.cpp b/inputmethods/keyboard/keyboard.cpp
index fb88f2a..39d44cd 100644
--- a/inputmethods/keyboard/keyboard.cpp
+++ b/inputmethods/keyboard/keyboard.cpp
@@ -1,73 +1,80 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "keyboard.h"
#include <qpe/global.h>
-
+#include <qpe/config.h>
#include <qwindowsystem_qws.h>
#include <qpainter.h>
#include <qfontmetrics.h>
#include <qtimer.h>
#include <ctype.h>
#include <sys/utsname.h>
using namespace KeyboardInput;
#define USE_SMALL_BACKSPACE
Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) :
QFrame(parent, _name, f), shift(FALSE), lock(FALSE), ctrl(FALSE),
alt(FALSE), useLargeKeys(TRUE), useOptiKeys(0), pressedKey(-1),
unicode(-1), qkeycode(0), modifiers(0)
{
// setPalette(QPalette(QColor(240,240,230))); // Beige!
// setFont( QFont( "Helvetica", 8 ) );
// setPalette(QPalette(QColor(200,200,200))); // Gray
setPalette(QPalette(QColor(220,220,220))); // Gray
+ // get the default font
+ Config *config = new Config( "qpe" );
+ config->setGroup( "Appearance" );
+ QString familyStr = config->readEntry( "FontFamily", "smallsmooth" );
+ int fontSize = config->readNumEntry( "FontSize", 10 );
+ delete config;
+
picks = new KeyboardPicks( this );
- picks->setFont( QFont( "smallsmooth", 9 ) );
- setFont( QFont( "smallsmooth", 9 ) );
+ picks->setFont( QFont( familyStr, fontSize ) );
+ setFont( QFont( familyStr, fontSize ) );
picks->initialise();
QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ),
this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) );
repeatTimer = new QTimer( this );
// temporary quick and dirty fix for the "sticky keyboard bug"
// on ipaq.
// struct utsname name;
// if (uname(&name) != -1)
// {
// QString release=name.release;
// qWarning("System release: %s\n", name.release);
// if(release.find("embedix",0,TRUE) !=-1)
// {
connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) );
// }
// }
}
void Keyboard::resizeEvent(QResizeEvent*)
{
int ph = picks->sizeHint().height();
picks->setGeometry( 0, 0, width(), ph );
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp
index f8cafd5..96fb484 100644
--- a/inputmethods/multikey/keyboard.cpp
+++ b/inputmethods/multikey/keyboard.cpp
@@ -45,61 +45,61 @@ static const char * const kb_config_xpm[] = {
". c #000000",
" ",
" . ",
" ... ",
" ..... ",
" . ",
" . ",
" "};
/* Keyboard::Keyboard {{{1 */
Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) :
QFrame(parent, _name, f), shift(0), lock(0), ctrl(0), alt(0),
meta(0), circumflex(0), diaeresis(0), baccent(0), accent(0),
useLargeKeys(TRUE), usePicks(0), useRepeat(0),
pressedKeyRow(-1), pressedKeyCol(-1),
unicode(-1), qkeycode(0), modifiers(0), schar(0), mchar(0), echar(0),
configdlg(0)
{
// get the default font
Config *config = new Config( "qpe" );
config->setGroup( "Appearance" );
QString familyStr = config->readEntry( "FontFamily", "smallsmooth" );
+ int fontSize = config->readNumEntry( "FontSize", 10 );
delete config;
config = new Config("multikey");
config->setGroup ("general");
usePicks = config->readBoolEntry ("usePickboard", 0); // default closed
useRepeat = config->readBoolEntry ("useRepeat", 1);
delete config;
-
- setFont( QFont( familyStr, 10 ) );
+ setFont( QFont( familyStr, fontSize ) );
picks = new KeyboardPicks( this );
- picks->setFont( QFont( familyStr, 10 ) );
+ picks->setFont( QFont( familyStr, fontSize ) );
picks->initialise();
if (usePicks) {
QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ),
this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) );
} else picks->hide();
loadKeyboardColors();
keys = new Keys();
repeatTimer = new QTimer( this );
connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) );
QCopChannel* kbdChannel = new QCopChannel("MultiKey/Keyboard", this);
connect(kbdChannel, SIGNAL(received(const QCString&,const QByteArray&)),
this, SLOT(receive(const QCString&,const QByteArray&)));
}
Keyboard::~Keyboard() {
if ( configdlg ) {
delete configdlg;
diff --git a/inputmethods/pickboard/pickboard.cpp b/inputmethods/pickboard/pickboard.cpp
index 1611cb0..e5365ba 100644
--- a/inputmethods/pickboard/pickboard.cpp
+++ b/inputmethods/pickboard/pickboard.cpp
@@ -1,49 +1,49 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "pickboard.h"
#include "pickboardpicks.h"
#include "pickboardcfg.h"
#include <qpe/global.h>
-
+#include <qpe/config.h>
#include <qpainter.h>
#include <qlist.h>
#include <qbitmap.h>
#include <qlayout.h>
#include <qvbox.h>
#include <qdialog.h>
#include <qscrollview.h>
#include <qpopupmenu.h>
#include <qhbuttongroup.h>
#include <qpushbutton.h>
#include <qmessagebox.h>
#ifdef QWS
#include <qwindowsystem_qws.h>
#endif
/*! \class Pickboard
\brief The Pickboard class provides an input method
based on a virtual keyboard combined with word-completion.
This version of Pickboard is Dual Licensed Software. However, for you to be
able to license the technology to others, you may require a T9(R) Text
Input license from Tegic Communications Corporation. More information can
be found at http://www.t9.com/.
@@ -71,40 +71,45 @@ static const char * const menu_xpm[]={
class PickboardPrivate {
public:
PickboardPrivate(Pickboard* parent)
{
picks = new PickboardPicks(parent);
picks->initialise();
menu = new QPushButton(parent);
menu->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Expanding));
menu->setPixmap(QPixmap((const char **)menu_xpm));
QObject::connect(menu,SIGNAL(clicked()),picks,SLOT(doMenu()));
QObject::connect(picks,SIGNAL(key(ushort,ushort,ushort,bool,bool)),
parent,SIGNAL(key(ushort,ushort,ushort,bool,bool)));
}
PickboardPicks* picks;
QPushButton* menu;
};
Pickboard::Pickboard(QWidget* parent, const char* name, WFlags f) :
QFrame(parent,name,f)
{
(new QHBoxLayout(this))->setAutoAdd(TRUE);
d = new PickboardPrivate(this);
-// under Win32 we may not have smallsmooth font
-#ifndef Q_OS_WIN32
- setFont( QFont( "smallsmooth", 9 ) );
-#endif
+
+ // get the default font
+ Config *config = new Config( "qpe" );
+ config->setGroup( "Appearance" );
+ QString familyStr = config->readEntry( "FontFamily", "smallsmooth" );
+ int fontSize = config->readNumEntry( "FontSize", 10 );
+ delete config;
+
+ setFont( QFont( familyStr, fontSize ) );
}
Pickboard::~Pickboard()
{
delete d;
}
void Pickboard::resetState()
{
d->picks->resetState();
}
diff --git a/inputmethods/unikeyboard/unikeyboard.cpp b/inputmethods/unikeyboard/unikeyboard.cpp
index aa74c66..23d96ad 100644
--- a/inputmethods/unikeyboard/unikeyboard.cpp
+++ b/inputmethods/unikeyboard/unikeyboard.cpp
@@ -1,48 +1,48 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "unikeyboard.h"
#include <qpe/fontmanager.h>
-
+#include <qpe/config.h>
#include <qpainter.h>
#include <qfontmetrics.h>
#include <qcombobox.h>
#if defined(Q_WS_QWS) || defined(_WS_QWS_)
#include <qwindowsystem_qws.h>
#endif
static const int nw = 8;
typedef struct BlockMap {
ushort start;
ushort stop;
const char *name;
};
//# Start Code; Block Name
static const BlockMap blockMap[] =
{
{0x0000, 0x007F, "Basic Latin"},
{0x0080, 0x00FF, "Latin-1 Supplement"},
{0x0100, 0x017F, "Latin Extended-A"},
{0x0180, 0x024F, "Latin Extended-B"},
{0x0250, 0x02AF, "IPA Extensions"},
@@ -114,49 +114,57 @@ static const BlockMap blockMap[] =
{0x4E00, 0x9FFF, "CJK Unified Ideographs"},
{0xA000, 0xA48F, "Yi Syllables"},
{0xA490, 0xA4CF, "Yi Radicals"},
{0xAC00, 0xD7A3, "Hangul Syllables"},
{0xD800, 0xDB7F, "High Surrogates"},
{0xDB80, 0xDBFF, "High Private Use Surrogates"},
{0xDC00, 0xDFFF, "Low Surrogates"},
{0xE000, 0xF8FF, "Private Use"},
{0xF900, 0xFAFF, "CJK Compatibility Ideographs"},
{0xFB00, 0xFB4F, "Alphabetic Presentation Forms"},
{0xFB50, 0xFDFF, "Arabic Presentation Forms-A"},
{0xFE20, 0xFE2F, "Combining Half Marks"},
{0xFE30, 0xFE4F, "CJK Compatibility Forms"},
{0xFE50, 0xFE6F, "Small Form Variants"},
{0xFE70, 0xFEFE, "Arabic Presentation Forms-B"},
{0xFF00, 0xFEFF, "Halfwidth and Fullwidth Forms"},
{0xFFF0, 0xFFEF, "Specials"},
{0xFFFF, 0xFFFF, 0} };
UniScrollview::UniScrollview(QWidget* parent, const char* name, int f) :
QScrollView(parent, name, f)
{
// smallFont.setRawName( "-adobe-courier-medium-r-normal--10-100-75-75-m-60-iso8859-1" ); //######
- smallFont = QFont( "Helvetica", 8 );
+
+ // get the default font
+ Config *config = new Config( "qpe" );
+ config->setGroup( "Appearance" );
+ QString familyStr = config->readEntry( "FontFamily", "Helvetica" );
+ int fontSize = config->readNumEntry( "FontSize", 8 ) - 2;
+ delete config;
+
+ smallFont = QFont( familyStr, fontSize );
QFontMetrics sfm( smallFont );
xoff = sfm.width( "AAA" );
setFont( FontManager::unicodeFont( FontManager::Fixed ) );
QFontMetrics fm( font() );
cellsize = fm.lineSpacing() + 2;
resizeContents( cellsize*nw, cellsize*65536/nw );
verticalScrollBar()->setLineStep(cellsize);
viewport()->setBackgroundMode( QWidget::PaletteBase );
}
void UniScrollview::contentsMousePressEvent(QMouseEvent* e)
{
if ( e->x() < xoff || e->x() > xoff + nw*cellsize )
return;
int row = e->y()/cellsize;
int col = (e->x()-xoff)/cellsize;
int u = row*nw+col;
#if defined(Q_WS_QWS) || defined(_WS_QWS_)
emit key( u, 0, 0, true, false );
emit key( u, 0, 0, false, false );
#endif