summaryrefslogtreecommitdiff
path: root/inputmethods/dasher/QtDasherScreen.h
Side-by-side diff
Diffstat (limited to 'inputmethods/dasher/QtDasherScreen.h') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/dasher/QtDasherScreen.h9
1 files changed, 6 insertions, 3 deletions
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
@@ -20,8 +20,10 @@
#include "DasherScreen.h"
#include "DashEdit.h"
#include "DasherInterface.h"
+#include <iconv.h>
+
using namespace Dasher;
class QtDasherScreen : public QWidget, public Dasher::CDasherScreen
@@ -48,18 +50,18 @@ class QtDasherScreen : public QWidget, public Dasher::CDasherScreen
void TextSize(symbol Character, int* Width, int* Height, int Size) const
{
// should probably use QPainter::boundingRect()
- *Width = *Height = Fonts[Size].pixelSize();
+ *Width = *Height = font.pixelSize();
}
void DrawText(symbol Character, int x1, int y1, int Size) const
{
// QFont font = QFont (fontname.c_str(), Size);
// font.setPixelSize(Size);
QPoint point = QPoint(x1, y1+Size/2);
- painter->setFont (Fonts[Size]);
+ painter->setFont (font);
painter->drawText (point,
QString(interface->GetDisplayText(Character).c_str()));
}
@@ -70,9 +72,10 @@ class QtDasherScreen : public QWidget, public Dasher::CDasherScreen
Opts::ColorSchemes ColorScheme) const;
std::vector<int> FontSizes;
std::vector<QFont> Fonts;
-
+ QFont font;
+ int fontsize;
void Blank() const {
painter->begin(pixmap);
painter->setPen (NoPen);
painter->fillRect(0, 0, m_iWidth, m_iHeight,