author | mjg59 <mjg59> | 2003-12-10 03:57:04 (UTC) |
---|---|---|
committer | mjg59 <mjg59> | 2003-12-10 03:57:04 (UTC) |
commit | becbcfae3bf3b5a714e7d3e39b924e08761739c2 (patch) (side-by-side diff) | |
tree | 7ec5f6f90a9d529858da340150b415d87e7936ba /inputmethods/dasher/QtDasherScreen.h | |
parent | 1f0b92e554b76852af210ceb277b3e9ecb09a43d (diff) | |
download | opie-becbcfae3bf3b5a714e7d3e39b924e08761739c2.zip opie-becbcfae3bf3b5a714e7d3e39b924e08761739c2.tar.gz opie-becbcfae3bf3b5a714e7d3e39b924e08761739c2.tar.bz2 |
Fix the search directory for the training file, remove the (non-working anyway) font size calculation code - with luck, this'll fix the failure to start under Opie
Diffstat (limited to 'inputmethods/dasher/QtDasherScreen.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/dasher/QtDasherScreen.h | 9 |
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 @@ -18,12 +18,14 @@ #include <qcursor.h> #include "DasherScreen.h" #include "DashEdit.h" #include "DasherInterface.h" +#include <iconv.h> + using namespace Dasher; class QtDasherScreen : public QWidget, public Dasher::CDasherScreen { Q_OBJECT @@ -46,35 +48,36 @@ class QtDasherScreen : public QWidget, public Dasher::CDasherScreen return (Dasher::Opts::Normal); } 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())); } void DrawRectangle(int x1, int y1, int x2, int y2, int Color, Opts::ColorSchemes ColorScheme) const; void Polyline(point* Points, int Number) const; void DrawPolygon(point* Points, int Number, int Color, 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, QColor(255,255,255)); } |