summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/mainwindow/cgotoline.cpp
authormickeyl <mickeyl>2004-05-23 11:26:00 (UTC)
committer mickeyl <mickeyl>2004-05-23 11:26:00 (UTC)
commit163a07abb5fbf5346585bce5edf5e48d015b442a (patch) (side-by-side diff)
tree0ae95b1f32ded0e1766b240ccfcfec856dafea09 /noncore/apps/tinykate/mainwindow/cgotoline.cpp
parent6cd90404121a78f3181a35acc056d7feca3d6aeb (diff)
downloadopie-163a07abb5fbf5346585bce5edf5e48d015b442a.zip
opie-163a07abb5fbf5346585bce5edf5e48d015b442a.tar.gz
opie-163a07abb5fbf5346585bce5edf5e48d015b442a.tar.bz2
CLEANUP: sanitize tinykate's build structure
Diffstat (limited to 'noncore/apps/tinykate/mainwindow/cgotoline.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/tinykate/mainwindow/cgotoline.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/noncore/apps/tinykate/mainwindow/cgotoline.cpp b/noncore/apps/tinykate/mainwindow/cgotoline.cpp
new file mode 100644
index 0000000..97f2ea5
--- a/dev/null
+++ b/noncore/apps/tinykate/mainwindow/cgotoline.cpp
@@ -0,0 +1,23 @@
+#include "cgotoline.h"
+#include <qspinbox.h>
+// copyright 2003 Craig Graham <cgraham@accessdevices.co.uk>
+
+CGotoLine::CGotoLine(int l) : CGotoBase(0,0,true)
+{
+ mLine->setValue(l+1);
+}
+
+int CGotoLine::line()
+{
+ return mLine->value()-1;
+}
+
+void CGotoLine::keyPressEvent(QKeyEvent *e)
+{
+ if((e->key()==Key_Return)||(e->key()==Key_Enter))
+ {
+ accept();
+ }else{
+ QDialog::keyPressEvent(e);
+ }
+}