#include <kexidblabel.h>
Public Slots | |
| void | setDataSource (const TQString &ds) |
| void | setDataSourceMimeType (const TQCString &ds) |
| virtual void | setText (const TQString &text) |
| void | setShadowEnabled (bool state) |
| virtual void | setPalette (const TQPalette &pal) |
| virtual void | setFrameColor (const TQColor &color) |
Public Member Functions | |
| KexiDBLabel (TQWidget *parent, const char *name=0, WFlags f=0) | |
| KexiDBLabel (const TQString &text, TQWidget *parent, const char *name=0, WFlags f=0) | |
| TQString | dataSource () const |
| TQCString | dataSourceMimeType () const |
| virtual TQVariant | value () |
| bool | shadowEnabled () const |
| virtual void | setInvalidState (const TQString &displayText) |
| virtual bool | valueIsNull () |
| virtual bool | valueIsEmpty () |
| virtual bool | isReadOnly () const |
| virtual TQWidget * | widget () |
| virtual bool | cursorAtStart () |
| virtual bool | cursorAtEnd () |
| virtual void | clear () |
| virtual bool | setProperty (const char *name, const TQVariant &value) |
| virtual const TQColor & | frameColor () const |
Public Member Functions inherited from KexiFormDataItemInterface | |
| TQString | dataSource () const |
| void | setDataSource (const TQString &ds) |
| TQCString | dataSourceMimeType () const |
| void | setDataSourceMimeType (const TQCString &ds) |
| virtual void | setDisplayDefaultValue (TQWidget *widget, bool displayDefaultValue) |
| virtual bool | hasDisplayedDefaultValue () const |
| virtual void | setReadOnly (bool readOnly)=0 |
| virtual KexiDB::Field * | field () const |
| virtual KexiDB::QueryColumnInfo * | columnInfo () const |
| virtual void | setVisibleColumnInfo (KexiDB::QueryColumnInfo *cinfo) |
| virtual KexiDB::QueryColumnInfo * | visibleColumnInfo () const |
| virtual void | hideWidget () |
| virtual void | showWidget () |
| virtual void | undoChanges () |
| void | cancelEditor () |
| virtual bool | keyPressed (TQKeyEvent *ke) |
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 bool | valueIsValid () |
| virtual TQVariant | visibleValue () |
| virtual bool | valueChanged () |
| 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 |
| virtual void | handleAction (const TQString &actionName) |
Protected Slots | |
| virtual void | setReadOnly (bool readOnly) |
| void | updatePixmap () |
Protected Member Functions | |
| void | init () |
| virtual void | setColumnInfo (KexiDB::QueryColumnInfo *cinfo) |
| virtual void | paintEvent (TQPaintEvent *) |
| virtual void | resizeEvent (TQResizeEvent *e) |
| virtual void | setValueInternal (const TQVariant &add, bool removeOld) |
| virtual void | fontChange (const TQFont &font) |
| virtual void | styleChange (TQStyle &style) |
| virtual void | enabledChange (bool enabled) |
| virtual void | paletteChange (const TQPalette &oldPal) |
| virtual void | frameChanged () |
| virtual void | showEvent (TQShowEvent *e) |
| virtual void | drawFrame (TQPainter *) |
| void | updatePixmapLater () |
Protected Member Functions inherited from KexiDBTextWidgetInterface | |
| void | setColumnInfo (KexiDB::QueryColumnInfo *cinfo, TQWidget *w) |
| void | paint (TQFrame *w, TQPainter *p, bool textIsEmpty, int alignment, bool hasFocus) |
| void | event (TQEvent *e, TQWidget *w, bool textIsEmpty) |
Protected Member Functions inherited from KexiFormDataItemInterface | |
| TQString | dataSource () const |
| void | setDataSource (const TQString &ds) |
| TQCString | dataSourceMimeType () const |
| void | setDataSourceMimeType (const TQCString &ds) |
| virtual void | setDisplayDefaultValue (TQWidget *widget, bool displayDefaultValue) |
| virtual bool | hasDisplayedDefaultValue () const |
| virtual void | setReadOnly (bool readOnly)=0 |
| virtual KexiDB::Field * | field () const |
| virtual KexiDB::QueryColumnInfo * | columnInfo () const |
| virtual void | setVisibleColumnInfo (KexiDB::QueryColumnInfo *cinfo) |
| virtual KexiDB::QueryColumnInfo * | visibleColumnInfo () const |
| virtual void | hideWidget () |
| virtual void | showWidget () |
| virtual void | undoChanges () |
| void | cancelEditor () |
| virtual bool | keyPressed (TQKeyEvent *ke) |
Protected Member Functions inherited from KexiDataItemInterface | |
| virtual void | setVisibleValueInternal (const TQVariant &value) |
| virtual void | signalValueChanged () |
| virtual void | beforeSignalValueChanged () |
| KexiDataItemChangesListener * | listener () |
| void | setValue (const TQVariant &value, const TQVariant &add=TQVariant(), bool removeOld=false, const TQVariant *visibleValue=0) |
| virtual void | installListener (KexiDataItemChangesListener *listener) |
| virtual bool | valueIsValid () |
| virtual TQVariant | visibleValue () |
| virtual bool | valueChanged () |
| 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 |
| virtual void | handleAction (const TQString &actionName) |
Protected Attributes | |
| Private * | d |
Protected Attributes inherited from KexiDBTextWidgetInterface | |
| KexiDisplayUtils::DisplayParameters * | m_autonumberDisplayParameters |
Protected Attributes inherited from KexiFormDataItemInterface | |
| TQString | m_dataSource |
| TQCString | m_dataSourceMimeType |
| KexiDB::QueryColumnInfo * | m_columnInfo |
| KexiDisplayUtils::DisplayParameters * | m_displayParametersForEnteredValue |
| KexiDisplayUtils::DisplayParameters * | m_displayParametersForDefaultValue |
| bool | m_displayDefaultValue: 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 |
Detailed Description
An extended, data-aware, read-only text label.
It's text may have a drop-shadow.
Definition at line 42 of file kexidblabel.h.
Constructor & Destructor Documentation
◆ KexiDBLabel() [1/2]
| KexiDBLabel::KexiDBLabel | ( | TQWidget * | parent, |
| const char * | name = 0, |
||
| WFlags | f = 0 |
||
| ) |
Definition at line 398 of file kexidblabel.cpp.
◆ KexiDBLabel() [2/2]
| KexiDBLabel::KexiDBLabel | ( | const TQString & | text, |
| TQWidget * | parent, | ||
| const char * | name = 0, |
||
| WFlags | f = 0 |
||
| ) |
Definition at line 407 of file kexidblabel.cpp.
◆ ~KexiDBLabel()
|
virtual |
Definition at line 417 of file kexidblabel.cpp.
Member Function Documentation
◆ clear()
|
virtual |
clears item's data, so the data will contain NULL data
Implements KexiDataItemInterface.
Definition at line 549 of file kexidblabel.cpp.
◆ cursorAtEnd()
|
virtual |
◆ cursorAtStart()
|
virtual |
◆ dataSource()
|
inline |
Definition at line 58 of file kexidblabel.h.
◆ dataSourceMimeType()
|
inline |
Definition at line 59 of file kexidblabel.h.
◆ drawFrame()
|
protectedvirtual |
Reimplemented to paint using real frame color instead of froeground.
Also allows to paint more types of frame.
◆ enabledChange()
|
protectedvirtual |
Definition at line 601 of file kexidblabel.cpp.
◆ fontChange()
|
protectedvirtual |
Definition at line 590 of file kexidblabel.cpp.
◆ frameChanged()
|
protectedvirtual |
Definition at line 623 of file kexidblabel.cpp.
◆ init()
|
protected |
Definition at line 422 of file kexidblabel.cpp.
◆ isReadOnly()
|
virtual |
always true
Reimplemented from KexiDataItemInterface.
Definition at line 524 of file kexidblabel.cpp.
◆ paintEvent()
|
protectedvirtual |
If required, update the pixmap-cache.
If the part that should be redrawn intersects with our shadow, redraw the shadow where it intersects with e->rect(). Have to move the clipping rect around a bit because the shadow has to be drawn using an offset relative to the widgets border.
Definition at line 467 of file kexidblabel.cpp.
◆ paletteChange()
|
protectedvirtual |
Definition at line 607 of file kexidblabel.cpp.
◆ resizeEvent()
|
protectedvirtual |
Definition at line 583 of file kexidblabel.cpp.
◆ setColumnInfo()
|
protectedvirtual |
Used internally to set database column information. Reimplement if you need to do additional actions, e.g. set data validator based on field type. Don't forget about calling superclass implementation.
Reimplemented from KexiFormDataItemInterface.
Definition at line 569 of file kexidblabel.cpp.
◆ setDataSource
|
inlineslot |
Sets the datasource to ds.
Definition at line 93 of file kexidblabel.h.
◆ setDataSourceMimeType
|
inlineslot |
Definition at line 95 of file kexidblabel.h.
◆ setInvalidState()
|
virtual |
Sets 'invalid' state, e.g. a text editor widget should display text displayText and become read only to prevent entering data, because updating at the database backend is not available. displayText is usually set to something i18n'd like "#NAME?". Note: that even widgets that usualy do not display texts (e.g. pixmaps) should display displayText too.
Implements KexiFormDataItemInterface.
Definition at line 509 of file kexidblabel.cpp.
◆ setProperty()
|
virtual |
used to catch setIndent(), etc.
Definition at line 554 of file kexidblabel.cpp.
◆ setReadOnly
|
protectedvirtualslot |
empty
Definition at line 529 of file kexidblabel.cpp.
◆ setShadowEnabled
|
slot |
Enable/Disable the shadow effect. KexiDBLabel acts just like a normal TQLabel when shadow is disabled.
Definition at line 575 of file kexidblabel.cpp.
◆ setText
|
virtualslot |
Definition at line 634 of file kexidblabel.cpp.
◆ setValueInternal()
|
protectedvirtual |
Sets value value for a widget.
Implements KexiDataItemInterface.
Definition at line 498 of file kexidblabel.cpp.
◆ shadowEnabled()
| bool KexiDBLabel::shadowEnabled | ( | ) | const |
Definition at line 642 of file kexidblabel.cpp.
◆ showEvent()
|
protectedvirtual |
Definition at line 629 of file kexidblabel.cpp.
◆ styleChange()
|
protectedvirtual |
Definition at line 596 of file kexidblabel.cpp.
◆ updatePixmap
|
protectedslot |
Whatever has changed in KexiDBLabel, every parameter is set to our private-label. Just in case...
Definition at line 447 of file kexidblabel.cpp.
◆ updatePixmapLater()
|
protected |
Definition at line 432 of file kexidblabel.cpp.
◆ value()
|
virtual |
- Returns
- value currently represented by this item.
Implements KexiDataItemInterface.
Definition at line 505 of file kexidblabel.cpp.
◆ valueIsEmpty()
|
virtual |
- Returns
- true if editor's value is empty (not necessary null). Only few data types can accept "EMPTY" property (use KexiDB::Field::hasEmptyProperty() to check this). Used for checking if a given constraint within table of form is met.
Implements KexiDataItemInterface.
Definition at line 519 of file kexidblabel.cpp.
◆ valueIsNull()
|
virtual |
- Returns
- true if editor's value is null (not empty) Used for checking if a given constraint within table or form is met.
Implements KexiDataItemInterface.
Definition at line 514 of file kexidblabel.cpp.
◆ widget()
|
virtual |
Convenience function: casts this item to a TQWidget. Can return 0 if the item is not a TQWidget-derived object.
Reimplemented from KexiFormDataItemInterface.
Definition at line 534 of file kexidblabel.cpp.
Member Data Documentation
◆ d
|
protected |
Definition at line 138 of file kexidblabel.h.
The documentation for this class was generated from the following files:

Public Member Functions inherited from