KMyMoneyCombo Class Reference

#include <kmymoneycombo.h>

Inheritance diagram for KMyMoneyCombo:

KComboBox KMyMoneyActivityCombo KMyMoneyCashFlowCombo KMyMoneyCategory KMyMoneyComboAction KMyMoneyPayeeCombo KMyMoneyReconcileCombo KMyMoneySecurity
Collaboration diagram for KMyMoneyCombo:

Collaboration graph
[legend]

List of all members.

Signals

void itemSelected (const QString &id)
void objectCreation (bool)
void createItem (const QString &, QString &)

Public Member Functions

 KMyMoneyCombo (QWidget *w=0, const char *name=0)
 KMyMoneyCombo (bool rw, QWidget *w=0, const char *name=0)
void setHint (const QString &hint) const
void setEditable (bool editable)
kMyMoneyCompletioncompletion (void) const
KMyMoneySelectorselector (void) const
void selectedItems (QStringList &list) const
void selectedItem (QString &id) const KDE_DEPRECATED
const QString & selectedItem (void) const
void setSelectedItem (const QString &id)
bool isInArrowArea (const QPoint &pos) const
void setSuppressObjectCreation (bool suppress)
void setCurrentText (const QString &txt=QString())
void setPaletteBackgroundColor (const QColor &color)
QSize sizeHint () const

Protected Slots

virtual void slotItemSelected (const QString &id)

Protected Member Functions

void mousePressEvent (QMouseEvent *e)
void keyPressEvent (QKeyEvent *e)
void paintEvent (QPaintEvent *)
void focusOutEvent (QFocusEvent *)
virtual void setCurrentTextById (const QString &id)
void connectNotify (const char *signal)
void disconnectNotify (const char *signal)

Protected Attributes

kMyMoneyCompletionm_completion
kMyMoneyLineEditm_edit
QString m_id

Private Attributes

QTimer m_timer
QMutex m_focusMutex
bool m_canCreateObjects
bool m_inFocusOutEvent


Detailed Description

Author:
Thomas Baumgart

Constructor & Destructor Documentation

KMyMoneyCombo::KMyMoneyCombo ( QWidget w = 0,
const char *  name = 0 
)

KMyMoneyCombo::KMyMoneyCombo ( bool  rw,
QWidget w = 0,
const char *  name = 0 
)


Member Function Documentation

void KMyMoneyCombo::setHint ( const QString &  hint  )  const

This method is used to turn on/off the hint display and to setup the appropriate text. The hint text is shown in a lighter color if the field is otherwise empty and does not have the keyboard focus.

Parameters:
hint reference to text. If hint is empty, no hint will be shown.

void KMyMoneyCombo::setEditable ( bool  editable  ) 

overridden for internal reasons.

Parameters:
editable make combo box editable (true) or selectable only (false).

kMyMoneyCompletion* KMyMoneyCombo::completion ( void   )  const

This method returns a pointer to the completion object of the combo box.

Returns:
pointer to kMyMoneyCompletion or derivative.

KMyMoneySelector* KMyMoneyCombo::selector ( void   )  const

This method returns a pointer to the completion object's selector.

Returns:
pointer to KMyMoneySelector or derivative.

Reimplemented in KMyMoneyCategory.

void KMyMoneyCombo::selectedItems ( QStringList &  list  )  const

This method returns the ids of the currently selected items

void KMyMoneyCombo::selectedItem ( QString &  id  )  const

This method returns the id of the first selected item. Usage makes usually only sense when the selection mode of the associated KMyMoneySelector is QListView::Single.

See also:
KMyMoneySelector::setSelectionMode()
Parameters:
id reference to QString containing the id. If no item is selected id will be empty.

const QString& KMyMoneyCombo::selectedItem ( void   )  const [inline]

This method returns the id of the first selected item. Usage makes usually only sense when the selection mode of the associated KMyMoneySelector is QListView::Single.

See also:
KMyMoneySelector::setSelectionMode()
Returns:
reference to QString containing the id. If no item is selected the QString will be empty.

void KMyMoneyCombo::setSelectedItem ( const QString &  id  ) 

This method selects the item with the respective id.

Parameters:
id reference to QString containing the id

bool KMyMoneyCombo::isInArrowArea ( const QPoint &  pos  )  const

This method checks if the position pos is part of the area of the drop down arrow.

void KMyMoneyCombo::setSuppressObjectCreation ( bool  suppress  )  [inline]

void KMyMoneyCombo::setCurrentText ( const QString &  txt = QString()  )  [inline]

overridden for internal reasons, no API change

Reimplemented in KMyMoneyCategory, and KMyMoneySecurity.

void KMyMoneyCombo::setPaletteBackgroundColor ( const QColor &  color  ) 

overridden to set the background color of the lineedit as well

QSize KMyMoneyCombo::sizeHint (  )  const

Overridden to support our own completion box

virtual void KMyMoneyCombo::slotItemSelected ( const QString &  id  )  [protected, virtual, slot]

Reimplemented in KMyMoneyCategory.

void KMyMoneyCombo::mousePressEvent ( QMouseEvent *  e  )  [protected]

reimplemented to support our own popup widget

void KMyMoneyCombo::keyPressEvent ( QKeyEvent *  e  )  [protected]

reimplemented to support our own popup widget

void KMyMoneyCombo::paintEvent ( QPaintEvent *   )  [protected]

reimplemented to support our own popup widget

void KMyMoneyCombo::focusOutEvent ( QFocusEvent *   )  [protected]

reimplemented to support detection of new items

Reimplemented in KMyMoneyCategory.

virtual void KMyMoneyCombo::setCurrentTextById ( const QString &  id  )  [protected, virtual]

set the widgets text area based on the item with the given id.

Reimplemented in KMyMoneyCategory, and KMyMoneySecurity.

void KMyMoneyCombo::connectNotify ( const char *  signal  )  [protected]

Overridden for internal reasons, no API change

void KMyMoneyCombo::disconnectNotify ( const char *  signal  )  [protected]

Overridden for internal reasons, no API change

void KMyMoneyCombo::itemSelected ( const QString &  id  )  [signal]

void KMyMoneyCombo::objectCreation ( bool   )  [signal]

void KMyMoneyCombo::createItem ( const QString &  ,
QString &   
) [signal]


Member Data Documentation

This member keeps a pointer to the object's completion object

Use our own line edit to provide hint functionality

QString KMyMoneyCombo::m_id [protected]

The currently selected item

QTimer KMyMoneyCombo::m_timer [private]

QMutex KMyMoneyCombo::m_focusMutex [private]

Flag to control object creation. Use setSuppressObjectCreation() to modify it's setting. Defaults to false.

Flag to check whether a focusOutEvent processing is underway or not


The documentation for this class was generated from the following file:

Generated on Wed Jan 26 13:07:57 2011 for KMyMoney by  doxygen 1.5.6