KexiBoolTableEdit Class Reference
#include <kexibooltableedit.h>
Inheritance diagram for KexiBoolTableEdit:

Detailed Description
Cell editor for boolean type.
Definition at line 30 of file kexibooltableedit.h.
Signals | |
| void | hintClicked () |
Public Member Functions | |
| KexiBoolTableEdit (KexiTableViewColumn &column, QWidget *parent=0) | |
| virtual | ~KexiBoolTableEdit () |
| virtual bool | valueIsNull () |
| virtual bool | valueIsEmpty () |
| virtual QVariant | value () |
| virtual bool | cursorAtStart () |
| virtual bool | cursorAtEnd () |
| virtual void | clear () |
| clears item's data, so the data will contain NULL data | |
| virtual void | setupContents (QPainter *p, bool focused, const QVariant &val, QString &txt, int &align, int &x, int &y_offset, int &w, int &h) |
| virtual void | clickedOnContents () |
| virtual void | handleAction (const QString &actionName) |
| virtual void | handleCopyAction (const QVariant &value, const QVariant &visibleValue) |
| virtual int | widthForValue (QVariant &val, const QFontMetrics &fm) |
Protected Member Functions | |
| virtual void | setValueInternal (const QVariant &add, bool removeOld) |
| initializes this editor with add value | |
| void | showHintButton () |
Protected Attributes | |
| QVariant | m_currentValue |
| We've no editor widget that would store current value, so we do this here. | |
Constructor & Destructor Documentation
|
||||||||||||
|
Definition at line 34 of file kexibooltableedit.cpp. References KexiTableEdit::field(), KexiDataItemInterface::m_acceptEditorAfterDeleteContents, KexiDataItemInterface::m_hasFocusableWidget, KexiDataItemInterface::m_origValue, and KexiTableEdit::m_usesSelectedTextColor. |
|
|
Definition at line 45 of file kexibooltableedit.cpp. |
Member Function Documentation
|
|
clears item's data, so the data will contain NULL data
Implements KexiDataItemInterface. Definition at line 71 of file kexibooltableedit.cpp. References KexiTableEdit::field(), and m_currentValue. |
|
|
Allows to define reaction for clicking on cell's contents. Currently it's used for editor of type boolean, where we want to toggle true/false on single mouse click.
Reimplemented from KexiDataItemInterface. Definition at line 120 of file kexibooltableedit.cpp. References KexiTableEdit::field(), and m_currentValue. |
|
|
Implements KexiDataItemInterface. Definition at line 84 of file kexibooltableedit.cpp. |
|
|
Implements KexiDataItemInterface. Definition at line 79 of file kexibooltableedit.cpp. |
|
|
Handles action having standard name actionName. Action could be: "edit_cut", "edit_paste", etc. Reimplemented from KexiDataItemInterface. Definition at line 133 of file kexibooltableedit.cpp. References KexiCSVExport::Clipboard, KexiTableEdit::editRequested(), KexiTableEdit::field(), handleCopyAction(), m_currentValue, KexiDataItemInterface::m_origValue, KexiTableEdit::repaintRelatedCell(), and value(). |
|
||||||||||||
|
Handles copy action for value. Copies empty string for null, "1" for true, "0" for false. visibleValue is unused here. Reimplemented after KexiTableEdit. Implements KexiTableEdit. Definition at line 160 of file kexibooltableedit.cpp. Referenced by handleAction(). |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||
|
For reimplementation. Sets up and paints cell's contents using context of val value. focused is true if the cell is focused. align is set using Qt::AlignmentFlags. Some additional things may be painted using p, but it is not needed to paint the text (this is done automatically outside of this method). Before calling, x, y_offset, w, h parameters are initialized, but you can tune these values depending on the context. You should set txt to a text representation of val, otherwise no text will be painted. p can be 0 - in this case no painting should be performed, becasue caller only expects that x, y_offset, w, h, txt parameters are tuned, if needed. p painter's pen is set to foreground color (usually black) that should be used to paint foreground information, if needed. For example boolean editor widget paints a rectangle using this color. Reimplemented from KexiTableEdit. Definition at line 89 of file kexibooltableedit.cpp. |
|
||||||||||||
|
initializes this editor with add value
Implements KexiDataItemInterface. Definition at line 49 of file kexibooltableedit.cpp. References m_currentValue, and KexiDataItemInterface::m_origValue. |
|
|
|
|
|
Implements KexiDataItemInterface. Definition at line 65 of file kexibooltableedit.cpp. References m_currentValue. Referenced by handleAction(). |
|
|
Implements KexiDataItemInterface. Definition at line 60 of file kexibooltableedit.cpp. References m_currentValue. |
|
|
Implements KexiDataItemInterface. Definition at line 55 of file kexibooltableedit.cpp. References m_currentValue. |
|
||||||||||||
|
Reimplemented from KexiTableEdit. Definition at line 169 of file kexibooltableedit.cpp. |
Member Data Documentation
|
|
We've no editor widget that would store current value, so we do this here.
Definition at line 79 of file kexibooltableedit.h. Referenced by clear(), clickedOnContents(), handleAction(), setValueInternal(), value(), valueIsEmpty(), and valueIsNull(). |
The documentation for this class was generated from the following files:
