summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dasher/QtDasherPlugin.cc2
-rw-r--r--inputmethods/dasher/QtDasherScreen.cc13
-rw-r--r--inputmethods/dasher/QtDasherScreen.h9
3 files changed, 15 insertions, 9 deletions
diff --git a/inputmethods/dasher/QtDasherPlugin.cc b/inputmethods/dasher/QtDasherPlugin.cc
index fe1712e..cf4fc2c 100644
--- a/inputmethods/dasher/QtDasherPlugin.cc
+++ b/inputmethods/dasher/QtDasherPlugin.cc
@@ -20,5 +20,5 @@ QtDasherPlugin::QtDasherPlugin(QWidget* parent, const char* name, WFlags f) : QF
(new QHBoxLayout(this))->setAutoAdd(TRUE);
interface = new CDasherInterface;
- interface->SetSystemLocation("/opt/QtPalmtop/share/dasher");
+ interface->SetSystemLocation("/opt/QtPalmtop/share/dasher/");
interface->Unpause(0);
interface->Start();
diff --git a/inputmethods/dasher/QtDasherScreen.cc b/inputmethods/dasher/QtDasherScreen.cc
index d05ef49..7d77511 100644
--- a/inputmethods/dasher/QtDasherScreen.cc
+++ b/inputmethods/dasher/QtDasherScreen.cc
@@ -17,12 +17,15 @@
#define MINFONTSIZE 8
+#include <iconv.h>
+#include <iostream>
+
QtDasherScreen::QtDasherScreen (int _width, int _height,
CDasherInterface *_interface,
QWidget * _parent, Dasher::CDashEditbox *edit):
QWidget(_parent), interface( _interface ),
- fontname( "fixed" ), // fontsize(12),
+ fontname( "fixed" ), fontsize(12),
Dasher::CDasherScreen(_width, _height)
{
- // font = new QFont (fontname, fontsize);
+ font = QFont (fontname.c_str(), fontsize);
painter = new QPainter ();
@@ -35,5 +38,5 @@ QtDasherScreen::QtDasherScreen (int _width, int _height,
interface->ChangeEdit(edit);
- interface->GetFontSizes(&FontSizes);
+/* interface->GetFontSizes(&FontSizes);
for (int i=0; i<FontSizes.size(); i++) {
@@ -41,7 +44,7 @@ QtDasherScreen::QtDasherScreen (int _width, int _height,
Fonts.resize((FontSizes[i])+1);
Fonts[FontSizes[i]]= QFont (fontname.c_str(), FontSizes[i]);
- Fonts[FontSizes[i]].setPixelSize(FontSizes[i]);
+// Fonts[FontSizes[i]].setPixelSize(FontSizes[i]);
}
-
+*/
interface->ChangeScreen(this);
diff --git a/inputmethods/dasher/QtDasherScreen.h b/inputmethods/dasher/QtDasherScreen.h
index c4d3b59..c029a60 100644
--- a/inputmethods/dasher/QtDasherScreen.h
+++ b/inputmethods/dasher/QtDasherScreen.h
@@ -22,4 +22,6 @@
#include "DasherInterface.h"
+#include <iconv.h>
+
using namespace Dasher;
@@ -50,5 +52,5 @@ class QtDasherScreen : public QWidget, public Dasher::CDasherScreen
{
// should probably use QPainter::boundingRect()
- *Width = *Height = Fonts[Size].pixelSize();
+ *Width = *Height = font.pixelSize();
}
@@ -59,5 +61,5 @@ class QtDasherScreen : public QWidget, public Dasher::CDasherScreen
QPoint point = QPoint(x1, y1+Size/2);
- painter->setFont (Fonts[Size]);
+ painter->setFont (font);
painter->drawText (point,
QString(interface->GetDisplayText(Character).c_str()));
@@ -72,5 +74,6 @@ class QtDasherScreen : public QWidget, public Dasher::CDasherScreen
std::vector<int> FontSizes;
std::vector<QFont> Fonts;
-
+ QFont font;
+ int fontsize;
void Blank() const {
painter->begin(pixmap);