summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dasher/QtDasherPlugin.cc2
-rw-r--r--inputmethods/dasher/QtDasherScreen.cc4
2 files changed, 2 insertions, 4 deletions
diff --git a/inputmethods/dasher/QtDasherPlugin.cc b/inputmethods/dasher/QtDasherPlugin.cc
index f491769..50d4539 100644
--- a/inputmethods/dasher/QtDasherPlugin.cc
+++ b/inputmethods/dasher/QtDasherPlugin.cc
@@ -22,33 +22,33 @@ QtDasherPlugin::QtDasherPlugin(QWidget* parent, const char* name, WFlags f) : QF
22 interface->SetSystemLocation("/opt/QtPalmtop/share/dasher/"); 22 interface->SetSystemLocation("/opt/QtPalmtop/share/dasher/");
23 interface->Unpause(0); 23 interface->Unpause(0);
24 interface->Start(); 24 interface->Start();
25 d = new QtDasherScreen(240,100,interface,this,this); 25 d = new QtDasherScreen(240,100,interface,this,this);
26 interface->ChangeMaxBitRate(2.5); 26 interface->ChangeMaxBitRate(2.5);
27 d->show(); 27 d->show();
28 utf8_codec = new QUtf8Codec; 28 utf8_codec = new QUtf8Codec;
29} 29}
30 30
31QSize QtDasherPlugin::sizeHint() const 31QSize QtDasherPlugin::sizeHint() const
32{ 32{
33 return QSize(240,100); 33 return QSize(240,100);
34} 34}
35 35
36QtDasherPlugin::~QtDasherPlugin() 36QtDasherPlugin::~QtDasherPlugin()
37{ 37{
38 delete d; 38 delete interface;
39} 39}
40 40
41void QtDasherPlugin::resetState() 41void QtDasherPlugin::resetState()
42{ 42{
43 flushcount=0; 43 flushcount=0;
44 interface->Start(); 44 interface->Start();
45 interface->Redraw(); 45 interface->Redraw();
46} 46}
47 47
48void QtDasherPlugin::unflush() 48void QtDasherPlugin::unflush()
49{ 49{
50 if (flushcount==0) 50 if (flushcount==0)
51 return; 51 return;
52 for (; flushcount>0; flushcount--) { 52 for (; flushcount>0; flushcount--) {
53 deletetext(); 53 deletetext();
54 } 54 }
diff --git a/inputmethods/dasher/QtDasherScreen.cc b/inputmethods/dasher/QtDasherScreen.cc
index 2179cfb..b8a554c 100644
--- a/inputmethods/dasher/QtDasherScreen.cc
+++ b/inputmethods/dasher/QtDasherScreen.cc
@@ -64,36 +64,34 @@ long QtDasherScreen::get_time()
64 long ms_now; 64 long ms_now;
65 65
66 struct timeval tv; 66 struct timeval tv;
67 struct timezone tz; 67 struct timezone tz;
68 68
69 gettimeofday( &tv, &tz ); 69 gettimeofday( &tv, &tz );
70 70
71 s_now = tv.tv_sec-1054487600; 71 s_now = tv.tv_sec-1054487600;
72 72
73 ms_now = tv.tv_usec / 1000; 73 ms_now = tv.tv_usec / 1000;
74 74
75 return( long(s_now*1000 + ms_now) ); 75 return( long(s_now*1000 + ms_now) );
76 76
77} 77}
78 78
79QtDasherScreen::~QtDasherScreen() 79QtDasherScreen::~QtDasherScreen()
80{ 80{
81 delete painter; 81 delete painter;
82 delete interface;
83 delete edit;
84} 82}
85 83
86QColor QtDasherScreen::getColor(int Color, const Opts::ColorSchemes ColorScheme) const 84QColor QtDasherScreen::getColor(int Color, const Opts::ColorSchemes ColorScheme) const
87{ 85{
88 switch (ColorScheme) { 86 switch (ColorScheme) {
89 case Dasher::Opts::Nodes1: 87 case Dasher::Opts::Nodes1:
90 switch (Color) { 88 switch (Color) {
91 case 0: return QColor (180, 245, 180); 89 case 0: return QColor (180, 245, 180);
92 case 1: return QColor (160, 200, 160); 90 case 1: return QColor (160, 200, 160);
93 case 2: return QColor (0, 255, 255); 91 case 2: return QColor (0, 255, 255);
94 default: abort (); 92 default: abort ();
95 } 93 }
96 case Dasher::Opts::Nodes2: 94 case Dasher::Opts::Nodes2:
97 switch (Color) { 95 switch (Color) {
98 case 0: return QColor (255, 185, 255); 96 case 0: return QColor (255, 185, 255);
99 case 1: return QColor (140, 200, 255); 97 case 1: return QColor (140, 200, 255);