author | mjg59 <mjg59> | 2003-12-10 03:58:39 (UTC) |
---|---|---|
committer | mjg59 <mjg59> | 2003-12-10 03:58:39 (UTC) |
commit | 9754061378940cf1d7637262305239deedc732b7 (patch) (unidiff) | |
tree | 2263cbb1c298e1aea15e34399a5552562a42c36b /inputmethods/dasher/QtDasherScreen.h | |
parent | becbcfae3bf3b5a714e7d3e39b924e08761739c2 (diff) | |
download | opie-9754061378940cf1d7637262305239deedc732b7.zip opie-9754061378940cf1d7637262305239deedc732b7.tar.gz opie-9754061378940cf1d7637262305239deedc732b7.tar.bz2 |
Whoops, accidently added the includes back
Diffstat (limited to 'inputmethods/dasher/QtDasherScreen.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/dasher/QtDasherScreen.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/inputmethods/dasher/QtDasherScreen.h b/inputmethods/dasher/QtDasherScreen.h index c029a60..06689d6 100644 --- a/inputmethods/dasher/QtDasherScreen.h +++ b/inputmethods/dasher/QtDasherScreen.h | |||
@@ -1,73 +1,71 @@ | |||
1 | // QtDasherScreen.h | 1 | // QtDasherScreen.h |
2 | // (c) 2003 Yann Dirson | 2 | // (c) 2003 Yann Dirson |
3 | // Derived from GtkDasherCanvas.h | 3 | // Derived from GtkDasherCanvas.h |
4 | // (c) 2002 Philip Cowans | 4 | // (c) 2002 Philip Cowans |
5 | 5 | ||
6 | #ifndef QT_DASHER_SCREEN_H | 6 | #ifndef QT_DASHER_SCREEN_H |
7 | #define QT_DASHER_SCREEN_H | 7 | #define QT_DASHER_SCREEN_H |
8 | 8 | ||
9 | #include <string> | 9 | #include <string> |
10 | #include <sys/time.h> | 10 | #include <sys/time.h> |
11 | 11 | ||
12 | #include <qwidget.h> | 12 | #include <qwidget.h> |
13 | #include <qpainter.h> | 13 | #include <qpainter.h> |
14 | #include <qfont.h> | 14 | #include <qfont.h> |
15 | #include <qstring.h> | 15 | #include <qstring.h> |
16 | #include <qpixmap.h> | 16 | #include <qpixmap.h> |
17 | #include <qtimer.h> | 17 | #include <qtimer.h> |
18 | #include <qcursor.h> | 18 | #include <qcursor.h> |
19 | 19 | ||
20 | #include "DasherScreen.h" | 20 | #include "DasherScreen.h" |
21 | #include "DashEdit.h" | 21 | #include "DashEdit.h" |
22 | #include "DasherInterface.h" | 22 | #include "DasherInterface.h" |
23 | 23 | ||
24 | #include <iconv.h> | ||
25 | |||
26 | using namespace Dasher; | 24 | using namespace Dasher; |
27 | 25 | ||
28 | class QtDasherScreen : public QWidget, public Dasher::CDasherScreen | 26 | class QtDasherScreen : public QWidget, public Dasher::CDasherScreen |
29 | 27 | ||
30 | { | 28 | { |
31 | Q_OBJECT | 29 | Q_OBJECT |
32 | public: | 30 | public: |
33 | QtDasherScreen (int _width, int _height, | 31 | QtDasherScreen (int _width, int _height, |
34 | CDasherInterface *_interface, | 32 | CDasherInterface *_interface, |
35 | QWidget * _parent=0, Dasher::CDashEditbox* edit=0); | 33 | QWidget * _parent=0, Dasher::CDashEditbox* edit=0); |
36 | QtDasherScreen::~QtDasherScreen(); | 34 | QtDasherScreen::~QtDasherScreen(); |
37 | 35 | ||
38 | void SetFont(std::string Name) | 36 | void SetFont(std::string Name) |
39 | { fontname = Name; /* set_the_font(); */ } | 37 | { fontname = Name; /* set_the_font(); */ } |
40 | 38 | ||
41 | void SetFontSize(Dasher::Opts::FontSize fontsize) | 39 | void SetFontSize(Dasher::Opts::FontSize fontsize) |
42 | { | 40 | { |
43 | #warning QtDasherScreen::SetFontSize() not implemented | 41 | #warning QtDasherScreen::SetFontSize() not implemented |
44 | } | 42 | } |
45 | Dasher::Opts::FontSize GetFontSize() | 43 | Dasher::Opts::FontSize GetFontSize() |
46 | { | 44 | { |
47 | #warning QtDasherScreen::GetFontSize() not implemented | 45 | #warning QtDasherScreen::GetFontSize() not implemented |
48 | return (Dasher::Opts::Normal); | 46 | return (Dasher::Opts::Normal); |
49 | } | 47 | } |
50 | 48 | ||
51 | void TextSize(symbol Character, int* Width, int* Height, int Size) const | 49 | void TextSize(symbol Character, int* Width, int* Height, int Size) const |
52 | { | 50 | { |
53 | // should probably use QPainter::boundingRect() | 51 | // should probably use QPainter::boundingRect() |
54 | *Width = *Height = font.pixelSize(); | 52 | *Width = *Height = font.pixelSize(); |
55 | 53 | ||
56 | } | 54 | } |
57 | void DrawText(symbol Character, int x1, int y1, int Size) const | 55 | void DrawText(symbol Character, int x1, int y1, int Size) const |
58 | { | 56 | { |
59 | // QFont font = QFont (fontname.c_str(), Size); | 57 | // QFont font = QFont (fontname.c_str(), Size); |
60 | // font.setPixelSize(Size); | 58 | // font.setPixelSize(Size); |
61 | QPoint point = QPoint(x1, y1+Size/2); | 59 | QPoint point = QPoint(x1, y1+Size/2); |
62 | 60 | ||
63 | painter->setFont (font); | 61 | painter->setFont (font); |
64 | painter->drawText (point, | 62 | painter->drawText (point, |
65 | QString(interface->GetDisplayText(Character).c_str())); | 63 | QString(interface->GetDisplayText(Character).c_str())); |
66 | } | 64 | } |
67 | 65 | ||
68 | void DrawRectangle(int x1, int y1, int x2, int y2, | 66 | void DrawRectangle(int x1, int y1, int x2, int y2, |
69 | int Color, Opts::ColorSchemes ColorScheme) const; | 67 | int Color, Opts::ColorSchemes ColorScheme) const; |
70 | void Polyline(point* Points, int Number) const; | 68 | void Polyline(point* Points, int Number) const; |
71 | void DrawPolygon(point* Points, int Number, int Color, | 69 | void DrawPolygon(point* Points, int Number, int Color, |
72 | Opts::ColorSchemes ColorScheme) const; | 70 | Opts::ColorSchemes ColorScheme) const; |
73 | 71 | ||