author | llornkcor <llornkcor> | 2003-06-14 17:39:26 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-06-14 17:39:26 (UTC) |
commit | e2a1c237211e4009ce2b76d3adc3860fbb255732 (patch) (side-by-side diff) | |
tree | 6d76151c961368c111f478fe58cb367424c6e2c6 /noncore/apps/tinykate/cgotoline.cpp | |
parent | 437e389cc5cca518c5f26677f98c464f9255ec04 (diff) | |
download | opie-e2a1c237211e4009ce2b76d3adc3860fbb255732.zip opie-e2a1c237211e4009ce2b76d3adc3860fbb255732.tar.gz opie-e2a1c237211e4009ce2b76d3adc3860fbb255732.tar.bz2 |
changes by craig graham. please test to make sure nothing important was taken out.
Diffstat (limited to 'noncore/apps/tinykate/cgotoline.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/cgotoline.cpp | 23 |
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 @@ +#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); + } +} |