#include "QtDasherPlugin.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include QtDasherPlugin::QtDasherPlugin(QWidget* parent, const char* name, WFlags f) : QFrame(parent,name,f) { (new QHBoxLayout(this))->setAutoAdd(TRUE); interface = new CDasherInterface; interface->SetSystemLocation( QFile::encodeName(QPEApplication::qpeDir()+"share/dasher/").data() ); interface->Unpause(0); interface->Start(); d = new QtDasherScreen(240,100,interface,this,this); interface->ChangeMaxBitRate(2.5); d->show(); utf8_codec = new QUtf8Codec; } QSize QtDasherPlugin::sizeHint() const { return QSize(240,100); } QtDasherPlugin::~QtDasherPlugin() { delete interface; } void QtDasherPlugin::resetState() { flushcount=0; interface->Start(); interface->Redraw(); } void QtDasherPlugin::unflush() { if (flushcount==0) return; for (; flushcount>0; flushcount--) { deletetext(); } } void QtDasherPlugin::output(int Symbol) { std::string label = interface->GetEditText(Symbol); QString unicodestring = utf8_codec->toUnicode(label.c_str()); for (int i=0; i