From 163a07abb5fbf5346585bce5edf5e48d015b442a Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sun, 23 May 2004 11:26:00 +0000 Subject: CLEANUP: sanitize tinykate's build structure --- (limited to 'noncore/apps/tinykate/mainwindow/cgotoline.cpp') 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 +// 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