#include <kexitimetableedit.h>
Public Member Functions | |
| KexiTimeTableEdit (KexiTableViewColumn &column, TQWidget *parent=0) | |
| virtual void | setupContents (TQPainter *p, bool focused, const TQVariant &val, TQString &txt, int &align, int &x, int &y_offset, int &w, int &h) |
| virtual TQVariant | value () |
| virtual bool | valueIsNull () |
| virtual bool | valueIsEmpty () |
| virtual bool | valueIsValid () |
| virtual void | handleAction (const TQString &actionName) |
| virtual void | handleCopyAction (const TQVariant &value, const TQVariant &visibleValue) |
| Public Member Functions inherited from KexiInputTableEdit | |
| KexiInputTableEdit (KexiTableViewColumn &column, TQWidget *parent=0) | |
| virtual bool | valueChanged () |
| virtual bool | cursorAtStart () |
| virtual bool | cursorAtEnd () |
| virtual void | clear () |
| virtual TQSize | totalSize () |
| virtual bool | showToolTipIfNeeded (const TQVariant &value, const TQRect &rect, const TQFontMetrics &fm, bool focused) |
| Public Member Functions inherited from KexiTableEdit | |
| KexiTableEdit (KexiTableViewColumn &column, TQWidget *parent=0) | |
| virtual KexiDB::Field * | field () const |
| virtual KexiDB::QueryColumnInfo * | columnInfo () const |
| virtual void | setColumnInfo (KexiDB::QueryColumnInfo *) |
| KexiTableViewColumn * | column () const |
| KexiDB::Field * | displayedField () const |
| virtual void | resize (int w, int h) |
| virtual TQWidget * | widget () |
| virtual void | hideWidget () |
| virtual void | showWidget () |
| virtual void | paintFocusBorders (TQPainter *p, TQVariant &cal, int x, int y, int w, int h) |
| bool | usesSelectedTextColor () const |
| virtual void | paintSelectionBackground (TQPainter *p, bool focused, const TQString &txt, int align, int x, int y_offset, int w, int h, const TQColor &fillColor, const TQFontMetrics &fm, bool readOnly, bool fullRowSelection) |
| int | leftMargin () const |
| int | rightMargin (bool focused) const |
| virtual bool | handleKeyPress (TQKeyEvent *ke, bool editorActive) |
| virtual bool | handleDoubleClick () |
| virtual int | widthForValue (TQVariant &val, const TQFontMetrics &fm) |
| virtual void | createInternalEditor (KexiDB::QuerySchema &schema) |
| Public Member Functions inherited from KexiDataItemInterface | |
| void | setValue (const TQVariant &value, const TQVariant &add=TQVariant(), bool removeOld=false, const TQVariant *visibleValue=0) |
| virtual void | installListener (KexiDataItemChangesListener *listener) |
| virtual TQVariant | visibleValue () |
| virtual bool | isReadOnly () const |
| virtual void | moveCursorToEnd () |
| virtual void | moveCursorToStart () |
| virtual void | selectAll () |
| bool | hasFocusableWidget () const |
| virtual void | showFocus (const TQRect &r, bool readOnly) |
| virtual void | hideFocus () |
| virtual void | clickedOnContents () |
| bool | acceptEditorAfterDeleteContents () const |
| virtual void | setFocus () |
| bool | cursorAtNewRow () |
| void | setParentDataItemInterface (KexiDataItemInterface *parentDataItemInterface) |
| KexiDataItemInterface * | parentInterface () const |
Protected Member Functions | |
| void | setValueInInternalEditor (const TQVariant &value) |
| virtual void | setValueInternal (const TQVariant &add, bool removeOld) |
| TQTime | timeValue () |
| Protected Member Functions inherited from KexiInputTableEdit | |
| void | showHintButton () |
| void | init () |
| virtual void | paintEvent (TQPaintEvent *e) |
| Protected Member Functions inherited from KexiTableEdit | |
| virtual bool | eventFilter (TQObject *watched, TQEvent *e) |
| void | setViewWidget (TQWidget *v) |
| void | moveChild (TQWidget *child, int x, int y) |
| void | repaintRelatedCell () |
| Protected Member Functions inherited from KexiDataItemInterface | |
| virtual void | setVisibleValueInternal (const TQVariant &value) |
| virtual void | signalValueChanged () |
| virtual void | beforeSignalValueChanged () |
| KexiDataItemChangesListener * | listener () |
Protected Attributes | |
| KexiTimeFormatter | m_formatter |
| Protected Attributes inherited from KexiInputTableEdit | |
| KexiTextFormatter | m_textFormatter |
| bool | m_calculatedCell |
| TQString | m_decsym |
| TQString | m_origText |
| KLineEdit * | m_lineedit |
| Protected Attributes inherited from KexiTableEdit | |
| KexiTableViewColumn * | m_column |
| int | m_leftMargin |
| int | m_rightMargin |
| int | m_rightMarginWhenFocused |
| TQScrollView * | m_scrollView |
| bool | m_usesSelectedTextColor: 1 |
| Protected Attributes inherited from KexiDataItemInterface | |
| TQGuardedPtr< TQObject > | m_listenerObject |
| KexiDataItemChangesListener * | m_listener |
| bool | m_listenerIsTQObject |
| TQVariant | m_origValue |
| KexiDataItemInterface * | m_parentDataItemInterface |
| bool | m_hasFocusableWidget: 1 |
| bool | m_disable_signalValueChanged: 1 |
| bool | m_acceptEditorAfterDeleteContents: 1 |
Additional Inherited Members | |
| Public Slots inherited from KexiInputTableEdit | |
| virtual void | moveCursorToEnd () |
| virtual void | moveCursorToStart () |
| virtual void | selectAll () |
| Signals inherited from KexiInputTableEdit | |
| void | hintClicked () |
| Signals inherited from KexiTableEdit | |
| void | editRequested () |
| void | cancelRequested () |
| void | acceptRequested () |
| Protected Slots inherited from KexiInputTableEdit | |
| void | setRestrictedCompletion () |
| void | completed (const TQString &) |
Detailed Description
Editor class for Time type. It is a replacement TQTimeEdit due to usability problems: people are accustomed to use single-character cursor. Time format is retrieved from the KDE global settings and input/output is performed using KLineEdit (from KexiInputTableEdit).
Definition at line 32 of file kexitimetableedit.h.
Constructor & Destructor Documentation
◆ KexiTimeTableEdit()
| KexiTimeTableEdit::KexiTimeTableEdit | ( | KexiTableViewColumn & | column, |
| TQWidget * | parent = 0 ) |
- Todo
- add TQValidator so time like "99:88:77" cannot be even entered
Definition at line 48 of file kexitimetableedit.cpp.
◆ ~KexiTimeTableEdit()
|
virtual |
Definition at line 58 of file kexitimetableedit.cpp.
Member Function Documentation
◆ handleAction()
|
virtual |
Reimplemented after KexiInputTableEdit.
Reimplemented from KexiInputTableEdit.
Definition at line 140 of file kexitimetableedit.cpp.
◆ handleCopyAction()
|
virtual |
Reimplemented after KexiInputTableEdit.
Reimplemented from KexiInputTableEdit.
Definition at line 131 of file kexitimetableedit.cpp.
◆ setupContents()
|
virtual |
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 TQt::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.
- Todo
- ADD OPTION to displaying NULL VALUES as e.g. "(null)"
Reimplemented from KexiTableEdit.
Definition at line 84 of file kexitimetableedit.cpp.
◆ setValueInInternalEditor()
|
protected |
helper
Definition at line 62 of file kexitimetableedit.cpp.
◆ setValueInternal()
|
protectedvirtual |
initializes this editor with add value
- Todo
- cut string if too long..
Reimplemented from KexiInputTableEdit.
Definition at line 70 of file kexitimetableedit.cpp.
◆ timeValue()
|
protected |
Definition at line 114 of file kexitimetableedit.cpp.
◆ value()
|
virtual |
- Returns
- value currently represented by this item.
js
- Todo
- PRESERVE PRECISION!
- Todo
- check constraints
Reimplemented from KexiInputTableEdit.
Definition at line 119 of file kexitimetableedit.cpp.
◆ valueIsEmpty()
|
virtual |
- Returns
- true if editor's value is empty (not null). Only few field types can accept "EMPTY" property (check this with KexiDB::Field::hasEmptyProperty()),
Reimplemented from KexiInputTableEdit.
Definition at line 109 of file kexitimetableedit.cpp.
◆ valueIsNull()
|
virtual |
- Returns
- true if editor's value is null (not empty)
Reimplemented from KexiInputTableEdit.
Definition at line 102 of file kexitimetableedit.cpp.
◆ valueIsValid()
|
virtual |
- Returns
- true if editor's value is valid for a given type Used for checking if an entered value is valid, E.g. a part of time value can be entered: "12:8" and this is invalid, not only null. Null time or date is valid in Kexi, so it is not enough to test value().isValid(). Default implementation just returns true.
Reimplemented from KexiDataItemInterface.
Definition at line 124 of file kexitimetableedit.cpp.
Member Data Documentation
◆ m_formatter
|
protected |
Used to format and convert time values.
Definition at line 60 of file kexitimetableedit.h.
The documentation for this class was generated from the following files:
