kmymoneylineedit.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KMYMONEYLINEEDIT_H
00023 #define KMYMONEYLINEEDIT_H
00024
00025
00026
00027
00028
00029
00030
00031 #include <klineedit.h>
00032
00033
00034
00035
00045 class kMyMoneyLineEdit : public KLineEdit
00046 {
00047 Q_OBJECT
00048 public:
00057 kMyMoneyLineEdit(QWidget *w = 0, const char* name = 0, bool forceMonetaryDecimalSymbol = false, int alignment = (AlignLeft | AlignVCenter));
00058 ~kMyMoneyLineEdit();
00059
00064 void resetText(void);
00065
00069 void setHint(const QString& hint) { m_hint = hint; };
00070
00071
00072 public slots:
00073 void loadText(const QString& text);
00074
00075 signals:
00080 void lineChanged(const QString& str);
00081
00082 protected:
00083 void focusOutEvent(QFocusEvent *ev);
00084
00086 void drawContents( QPainter *);
00087
00099 void keyPressEvent(QKeyEvent* ev);
00100
00112 void keyReleaseEvent(QKeyEvent* ev);
00113
00114 private:
00121 QString m_text;
00122
00126 QString m_hint;
00127
00132 bool m_forceMonetaryDecimalSymbol;
00133 };
00134
00135 #endif