kmymoneylineedit.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           kmymoneylineedit.h  -  description
00003                              -------------------
00004     begin                : Wed May 9 2001
00005     copyright            : (C) 2001 by Michael Edwardes
00006                                2006 by Thomas Baumgart
00007     email                : mte@users.sourceforge.net
00008                            Javier Campos Morales <javi_c@ctv.es>
00009                            Felix Rodriguez <frodriguez@mail.wesleyan.edu>
00010                            Thomas Baumgart <ipwizard@users.sourceforge.net>
00011  ***************************************************************************/
00012 
00013 /***************************************************************************
00014  *                                                                         *
00015  *   This program is free software; you can redistribute it and/or modify  *
00016  *   it under the terms of the GNU General Public License as published by  *
00017  *   the Free Software Foundation; either version 2 of the License, or     *
00018  *   (at your option) any later version.                                   *
00019  *                                                                         *
00020  ***************************************************************************/
00021 
00022 #ifndef KMYMONEYLINEEDIT_H
00023 #define KMYMONEYLINEEDIT_H
00024 
00025 // ----------------------------------------------------------------------------
00026 // QT Includes
00027 
00028 // ----------------------------------------------------------------------------
00029 // KDE Includes
00030 
00031 #include <klineedit.h>
00032 
00033 // ----------------------------------------------------------------------------
00034 // Project Includes
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

Generated on Wed Jan 26 13:03:17 2011 for KMyMoney by  doxygen 1.5.6