21 #include "sklineedit.h" 25 SKLineEdit::SKLineEdit(TQWidget *w, Input *i) : TQLineEdit(w), m_input(i)
27 frameColor = TQt::gray;
28 setBackgroundColor(TQt::white);
31 SKLineEdit::~SKLineEdit()
35 void SKLineEdit::drawFrame(TQPainter *p)
37 p->setPen(frameColor);
38 p->drawRect(frameRect());
41 void SKLineEdit::drawContents(TQPainter *p)
43 TQLineEdit::drawContents(p);
46 void SKLineEdit::setFrameColor(TQColor c)
52 void SKLineEdit::setBackgroundColor(TQColor c)
54 TQLineEdit::setBackgroundColor(c);
58 TQColor SKLineEdit::getFrameColor()
const 63 void SKLineEdit::keyPressEvent(TQKeyEvent* e)
65 TQLineEdit::keyPressEvent(e);
67 if(!e->text().isEmpty())
69 karamba* k =
static_cast<karamba*
>(parent());
70 k->keyPressed(e->text(), m_input);
74 void SKLineEdit::keyReleaseEvent(TQKeyEvent* e)
76 TQLineEdit::keyReleaseEvent(e);
79 Input* SKLineEdit::getInput()