From e2a1c237211e4009ce2b76d3adc3860fbb255732 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Sat, 14 Jun 2003 17:39:26 +0000 Subject: changes by craig graham. please test to make sure nothing important was taken out. --- (limited to 'noncore/apps/tinykate/cgotoline.cpp') 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 +// copyright 2003 Craig Graham + +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); + } +} -- cgit v0.9.0.2