kalarm/lib
lineedit.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef LINEEDIT_H
00022 #define LINEEDIT_H
00023
00024 #include <klineedit.h>
00025
00026
00043 class LineEdit : public KLineEdit
00044 {
00045 Q_OBJECT
00046 public:
00061 enum Type { Text, Url, Emails };
00067 explicit LineEdit(Type type, QWidget* parent = 0, const char* name = 0);
00072 explicit LineEdit(QWidget* parent = 0, const char* name = 0);
00074 void setNoSelect() { mNoSelect = true; }
00078 void setCursorAtEnd(bool end = true) { mSetCursorAtEnd = end; }
00079 public slots:
00081 virtual void setText(const QString& str);
00082 protected:
00083 virtual void focusInEvent(QFocusEvent*);
00084 virtual void dragEnterEvent(QDragEnterEvent*);
00085 virtual void dropEvent(QDropEvent*);
00086 private:
00087 void init();
00088
00089 Type mType;
00090 bool mNoSelect;
00091 bool mSetCursorAtEnd;
00092 };
00093
00094 #endif // LINEEDIT_H
|