Diffstat (limited to 'inputmethods/dasher/QtDasherScreen.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/dasher/QtDasherScreen.cc | 13 |
1 files changed, 8 insertions, 5 deletions
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 @@ -1,69 +1,72 @@ // QtDasherScreen.cc // (c) 2003 Yann Dirson // Derived from GtkDasherCanvas.cc // (c) 2002 Philip Cowans #include <iostream> #include <string> #include <qpointarray.h> #include <qpoint.h> #include "QtDasherScreen.h" #include "DasherScreen.h" #include "SettingsStore.h" #define MAXFONTSIZE 25 #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 (); pixmap = new QPixmap (_width, _height); pixmap->setOptimization(QPixmap::BestOptim); interface->SetSettingsStore(new CSettingsStore); interface->ChangeLanguageModel(0); interface->ChangeView(0); interface->ChangeEdit(edit); - interface->GetFontSizes(&FontSizes); +/* interface->GetFontSizes(&FontSizes); for (int i=0; i<FontSizes.size(); i++) { if (FontSizes[i]>Fonts.size()) 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); paused=true; QTimer *tmr = new QTimer(this); connect (tmr, SIGNAL(timeout()), SLOT(timer())); tmr->start(200); } long QtDasherScreen::get_time() { long s_now; long ms_now; struct timeval tv; struct timezone tz; gettimeofday( &tv, &tz ); s_now = tv.tv_sec-1054487600; ms_now = tv.tv_usec / 1000; |