summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/cgotoline.cpp
Unidiff
Diffstat (limited to 'noncore/apps/tinykate/cgotoline.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/tinykate/cgotoline.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/noncore/apps/tinykate/cgotoline.cpp b/noncore/apps/tinykate/cgotoline.cpp
new file mode 100644
index 0000000..97f2ea5
--- a/dev/null
+++ b/noncore/apps/tinykate/cgotoline.cpp
@@ -0,0 +1,23 @@
1#include "cgotoline.h"
2#include <qspinbox.h>
3// copyright 2003 Craig Graham <cgraham@accessdevices.co.uk>
4
5CGotoLine::CGotoLine(int l) : CGotoBase(0,0,true)
6{
7 mLine->setValue(l+1);
8}
9
10int CGotoLine::line()
11{
12 return mLine->value()-1;
13}
14
15void CGotoLine::keyPressEvent(QKeyEvent *e)
16{
17 if((e->key()==Key_Return)||(e->key()==Key_Enter))
18 {
19 accept();
20 }else{
21 QDialog::keyPressEvent(e);
22 }
23}