blob: 97f2ea5323e7cbfcd5fe635e1d8f868982e5916c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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);
}
}
|