#include <kmymoneyedit.h>


Public Slots | |
| void | loadText (const QString &text) |
| void | resetText (void) |
| void | clearText (void) |
| void | setText (const QString &txt) |
| void | setCalculatorButtonVisible (const bool show) |
| void | setResetButtonVisible (const bool show) |
| void | setReadOnly (bool readOnly) |
Signals | |
| void | valueChanged (const QString &text) |
| void | textChanged (const QString &text) |
Public Member Functions | |
| kMyMoneyEdit (QWidget *parent=0, const char *name=0, const int prec=-2) | |
| kMyMoneyEdit (const MyMoneySecurity &eq, QWidget *parent=0, const char *name=0) | |
| ~kMyMoneyEdit () | |
| MyMoneyMoney | value (void) const |
| void | setValue (const MyMoneyMoney &value) |
| bool | isValid (void) const |
| virtual bool | eventFilter (QObject *, QEvent *) |
| QString | text (void) const |
| void | setMinimumWidth (int w) |
| void | setPrecision (const int prec) |
| int | precision (void) |
| QWidget * | focusWidget (void) const |
| void | setAllowEmpty (bool allowed=true) |
| void | setValidator (const QValidator *v) |
| bool | isCalculatorButtonVisible (void) const |
| bool | isResetButtonVisible (void) const |
| bool | isEmptyAllowed (void) const |
| KLineEdit * | lineedit (void) const |
| void | setHint (const QString &hint) const |
| bool | isReadOnly (void) const |
Protected Slots | |
| void | theTextChanged (const QString &text) |
| void | slotCalculatorResult (void) |
| void | slotCalculatorOpen (void) |
Protected Member Functions | |
| void | ensureFractionalPart (void) |
| void | calculatorOpen (QKeyEvent *ev) |
| void | init (void) |
Properties | |
| bool | calculatorButtonVisibility |
| bool | resetButtonVisibility |
| bool | allowEmpty |
| bool | readOnly |
Private Member Functions | |
| void | ensureFractionalPart (QString &txt) const |
Private Attributes | |
| QString | previousText |
| QString | m_text |
| kMyMoneyCalculator * | m_calculator |
| QVBox * | m_calculatorFrame |
| kMyMoneyLineEdit * | m_edit |
| KPushButton * | m_calcButton |
| KPushButton * | m_resetButton |
| int | m_prec |
| kMyMoneyEdit::kMyMoneyEdit | ( | QWidget * | parent = 0, |
|
| const char * | name = 0, |
|||
| const int | prec = -2 | |||
| ) |
| kMyMoneyEdit::kMyMoneyEdit | ( | const MyMoneySecurity & | eq, | |
| QWidget * | parent = 0, |
|||
| const char * | name = 0 | |||
| ) |
| kMyMoneyEdit::~kMyMoneyEdit | ( | ) |
| void kMyMoneyEdit::ensureFractionalPart | ( | QString & | txt | ) | const [private] |
Internal helper function for value() and ensureFractionalPart(void).
| void kMyMoneyEdit::ensureFractionalPart | ( | void | ) | [protected] |
This method ensures that the text version contains a fractional part.
| void kMyMoneyEdit::calculatorOpen | ( | QKeyEvent * | ev | ) | [protected] |
This method opens the calculator and replays the key event pointed to by ev. If ev is 0, then no key event is replayed.
| ev | pointer to QKeyEvent that started the calculator. |
| void kMyMoneyEdit::init | ( | void | ) | [protected] |
Helper method for constructors.
| void kMyMoneyEdit::theTextChanged | ( | const QString & | text | ) | [protected, slot] |
| void kMyMoneyEdit::slotCalculatorResult | ( | void | ) | [protected, slot] |
| void kMyMoneyEdit::slotCalculatorOpen | ( | void | ) | [protected, slot] |
| MyMoneyMoney kMyMoneyEdit::value | ( | void | ) | const |
| void kMyMoneyEdit::setValue | ( | const MyMoneyMoney & | value | ) |
| bool kMyMoneyEdit::isValid | ( | void | ) | const |
| virtual bool kMyMoneyEdit::eventFilter | ( | QObject * | , | |
| QEvent * | ||||
| ) | [virtual] |
| QString kMyMoneyEdit::text | ( | void | ) | const [inline] |
This method returns the value of the edit field in "numerator/denominator" format. If you want to get the text of the edit field, use lineedit()->text() instead.
| void kMyMoneyEdit::setMinimumWidth | ( | int | w | ) | [inline] |
| void kMyMoneyEdit::setPrecision | ( | const int | prec | ) |
Set the number of fractional digits that should be shown
| prec | number of fractional digits. |
| int kMyMoneyEdit::precision | ( | void | ) | [inline] |
return the number of fractional digits
| QWidget* kMyMoneyEdit::focusWidget | ( | void | ) | const |
| void kMyMoneyEdit::setAllowEmpty | ( | bool | allowed = true |
) |
This method allows to modify the behavior of the widget such that it accepts an empty value (all blank) or not. The default is to not accept an emtpy input and to convert an empty field into 0.00 upon loss of focus.
| allowed | if true, empty input is allowed, if false emtpy input will be converted to 0.00 |
| void kMyMoneyEdit::setValidator | ( | const QValidator * | v | ) |
Overloaded for internal reasons. The API is not affected.
| bool kMyMoneyEdit::isCalculatorButtonVisible | ( | void | ) | const |
| bool kMyMoneyEdit::isResetButtonVisible | ( | void | ) | const |
| bool kMyMoneyEdit::isEmptyAllowed | ( | void | ) | const |
| KLineEdit* kMyMoneyEdit::lineedit | ( | void | ) | const |
| void kMyMoneyEdit::setHint | ( | const QString & | hint | ) | const |
| bool kMyMoneyEdit::isReadOnly | ( | void | ) | const |
| void kMyMoneyEdit::loadText | ( | const QString & | text | ) | [slot] |
| void kMyMoneyEdit::resetText | ( | void | ) | [slot] |
| void kMyMoneyEdit::clearText | ( | void | ) | [slot] |
| void kMyMoneyEdit::setText | ( | const QString & | txt | ) | [inline, slot] |
| void kMyMoneyEdit::setCalculatorButtonVisible | ( | const bool | show | ) | [slot] |
This method allows to show/hide the calculator button of the widget. The parameter show controls the behavior. Default is to show the button.
| show | if true, button is shown, if false it is hidden |
| void kMyMoneyEdit::setResetButtonVisible | ( | const bool | show | ) | [slot] |
| void kMyMoneyEdit::setReadOnly | ( | bool | readOnly | ) | [slot] |
| void kMyMoneyEdit::valueChanged | ( | const QString & | text | ) | [signal] |
This signal is sent, when the focus leaves this widget and the amount has been changed by user during this session.
| void kMyMoneyEdit::textChanged | ( | const QString & | text | ) | [signal] |
QString kMyMoneyEdit::previousText [private] |
QString kMyMoneyEdit::m_text [private] |
kMyMoneyCalculator* kMyMoneyEdit::m_calculator [private] |
QVBox* kMyMoneyEdit::m_calculatorFrame [private] |
kMyMoneyLineEdit* kMyMoneyEdit::m_edit [private] |
KPushButton* kMyMoneyEdit::m_calcButton [private] |
KPushButton* kMyMoneyEdit::m_resetButton [private] |
int kMyMoneyEdit::m_prec [private] |
bool kMyMoneyEdit::calculatorButtonVisibility [read, write] |
bool kMyMoneyEdit::resetButtonVisibility [read, write] |
bool kMyMoneyEdit::allowEmpty [read, write] |
bool kMyMoneyEdit::readOnly [read, write] |
1.5.6