Diffstat (limited to 'inputmethods/dasher/QtDasherScreen.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/dasher/QtDasherScreen.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/inputmethods/dasher/QtDasherScreen.cc b/inputmethods/dasher/QtDasherScreen.cc index 747b705..2179cfb 100644 --- a/inputmethods/dasher/QtDasherScreen.cc +++ b/inputmethods/dasher/QtDasherScreen.cc | |||
@@ -15,27 +15,32 @@ | |||
15 | 15 | ||
16 | #define MAXFONTSIZE 25 | 16 | #define MAXFONTSIZE 25 |
17 | #define MINFONTSIZE 8 | 17 | #define MINFONTSIZE 8 |
18 | 18 | ||
19 | QtDasherScreen::QtDasherScreen (int _width, int _height, | 19 | QtDasherScreen::QtDasherScreen (int _width, int _height, |
20 | CDasherInterface *_interface, | 20 | CDasherInterface *_interface, |
21 | QWidget * _parent, Dasher::CDashEditbox *edit): | 21 | QWidget * _parent, |
22 | QWidget(_parent), interface( _interface ), | 22 | Dasher::CDashEditbox *_edit): |
23 | fontname( "fixed" ), fontsize(12), | 23 | QWidget(_parent), |
24 | Dasher::CDasherScreen(_width, _height) | 24 | Dasher::CDasherScreen(_width, _height), |
25 | fontsize(12), | ||
26 | interface( _interface ), | ||
27 | fontname( "fixed" ) | ||
25 | { | 28 | { |
26 | font = QFont (fontname.c_str(), fontsize); | 29 | font = QFont (fontname.c_str(), fontsize); |
27 | painter = new QPainter (); | 30 | painter = new QPainter (); |
28 | 31 | ||
29 | pixmap = new QPixmap (_width, _height); | 32 | pixmap = new QPixmap (_width, _height); |
30 | pixmap->setOptimization(QPixmap::BestOptim); | 33 | pixmap->setOptimization(QPixmap::BestOptim); |
31 | interface->SetSettingsStore(new CSettingsStore); | 34 | interface->SetSettingsStore(new CSettingsStore); |
32 | 35 | ||
33 | interface->ChangeLanguageModel(0); | 36 | interface->ChangeLanguageModel(0); |
34 | interface->ChangeView(0); | 37 | interface->ChangeView(0); |
35 | interface->ChangeEdit(edit); | 38 | interface->ChangeEdit(_edit); |
39 | edit = _edit; | ||
40 | |||
36 | 41 | ||
37 | /* interface->GetFontSizes(&FontSizes); | 42 | /* interface->GetFontSizes(&FontSizes); |
38 | 43 | ||
39 | for (int i=0; i<FontSizes.size(); i++) { | 44 | for (int i=0; i<FontSizes.size(); i++) { |
40 | if (FontSizes[i]>Fonts.size()) | 45 | if (FontSizes[i]>Fonts.size()) |
41 | Fonts.resize((FontSizes[i])+1); | 46 | Fonts.resize((FontSizes[i])+1); |
@@ -140,13 +145,13 @@ void QtDasherScreen::DrawPolygon(point* Points, int Number, int Color, | |||
140 | painter->setBrush (getColor (Color, ColorScheme)); | 145 | painter->setBrush (getColor (Color, ColorScheme)); |
141 | QPointArray qpa(Number); | 146 | QPointArray qpa(Number); |
142 | Points_to_QPointArray (Points, Number, qpa); | 147 | Points_to_QPointArray (Points, Number, qpa); |
143 | painter->drawPolygon (qpa); | 148 | painter->drawPolygon (qpa); |
144 | } | 149 | } |
145 | 150 | ||
146 | void QtDasherScreen::mousePressEvent (QMouseEvent *e) | 151 | void QtDasherScreen::mousePressEvent (QMouseEvent *) |
147 | { | 152 | { |
148 | paused=false; | 153 | paused=false; |
149 | interface->Unpause(get_time()); | 154 | interface->Unpause(get_time()); |
150 | } | 155 | } |
151 | 156 | ||
152 | void QtDasherScreen::mouseReleaseEvent(QMouseEvent *e) | 157 | void QtDasherScreen::mouseReleaseEvent(QMouseEvent *e) |