1
//=========================================================
4
// $Id: nentry.h,v 1.2 2001/11/20 15:19:35 muse Exp $
5
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
6
//=========================================================
12
#include <qlineedit.h>
19
class NentryFilter : public QObject {
21
bool eventFilter(QObject* object, QEvent* event);
23
NentryFilter(QObject* parent);
26
//---------------------------------------------------------
28
// numerical entry widget with optional label
29
//---------------------------------------------------------
31
class Nentry : public QFrame {
41
int lPos; // label Position 0 - left, 1 - right
48
virtual void incValue(int x) = 0;
49
virtual void decValue(int x) = 0;
50
virtual bool setString(int, bool editable = false) = 0;
51
virtual bool setSValue(const QString&) = 0;
60
void valueChanged(int);
63
virtual void setValue(int);
66
Nentry(QWidget* parent, const QString& txt = "",
67
int lPos = 0, bool dark=false);
69
int value() const { return val; }
71
void setAlignment(int flag) { edit->setAlignment(flag); }
72
void setText(const QString& s);
76
void mousePress(QMouseEvent*);
77
void mouseMove(QMouseEvent*);
78
void mouseDoubleClick(QMouseEvent*);
79
void mouseRelease(QMouseEvent*);
80
void wheel(QWheelEvent*);
81
bool keyPress(QKeyEvent*);
82
void setFocusPolicy(FocusPolicy);