00001 #ifndef KDE__LINEEDIT_H
00002 #define KDE__LINEEDIT_H
00003
00004 #include <faith/widget.h>
00005 #include <faith/ui.h>
00006
00007 namespace Faith
00008 {
00009
00010 class FAITH_UI_EXPORT LineEdit : public Faith::Widget
00011 {
00012 K_OBJECT
00013
00014 struct LineEditPrivate;
00015 LineEditPrivate *d;
00016
00017 public:
00018 LineEdit(Widget *parent, const char *name=0);
00019 LineEdit(const String &text, Widget *parent, const char *name=0);
00020 ~LineEdit();
00021
00022 virtual Size sizeHint() const;
00023
00024 String text() const;
00025
00030 int caratPosition(int ptx) const;
00031
00032 void setDrawFrame(bool f);
00033 bool drawFrame() const;
00034
00035 public slots:
00036 void setText(const Faith::String &);
00037 void moveCarat(int offset);
00038
00039
00040 signals:
00041 void changed();
00042 void changed(const Faith::String &);
00043 void returnPressed();
00044
00045 protected:
00046 void paintEvent(Faith::PaintEvent *e);
00047 void keyPressEvent(Faith::KeyPressEvent *e);
00048 void timerEvent(Faith::TimerEvent *e);
00049 void mousePressEvent(Faith::MouseEvent *e);
00050 void mouseMoveEvent(Faith::MouseEvent *e);
00051 void focusInEvent(Faith::FocusEvent *e);
00052 void focusOutEvent(Faith::FocusEvent *e);
00053
00054 private:
00055 void startBlinkenLights();
00056
00057
00058 };
00059
00060
00061 }
00062
00063
00064
00065 #endif