#include <kexidbimagebox.h>
A data-aware, editable image box.
Can also act as a normal static image box.
Definition at line 35 of file kexidbimagebox.h.
◆ KexiDBImageBox()
| KexiDBImageBox::KexiDBImageBox |
( |
bool |
designMode, |
|
|
TQWidget * |
parent, |
|
|
const char * |
name = 0 |
|
) |
| |
◆ ~KexiDBImageBox()
| KexiDBImageBox::~KexiDBImageBox |
( |
| ) |
|
|
virtual |
◆ alignment()
| int KexiDBImageBox::alignment |
( |
| ) |
const |
|
inline |
◆ clear
| void KexiDBImageBox::clear |
( |
| ) |
|
|
protectedvirtualslot |
◆ contextMenu()
◆ contextMenuEvent()
| void KexiDBImageBox::contextMenuEvent |
( |
TQContextMenuEvent * |
e | ) |
|
|
protectedvirtual |
◆ cursorAtEnd()
| bool KexiDBImageBox::cursorAtEnd |
( |
| ) |
|
|
virtual |
◆ cursorAtStart()
| bool KexiDBImageBox::cursorAtStart |
( |
| ) |
|
|
virtual |
◆ data()
| TQByteArray KexiDBImageBox::data |
( |
| ) |
const |
|
protected |
- Returns
- data depending on the current mode (db-aware or static)
Definition at line 306 of file kexidbimagebox.cpp.
◆ dataSource()
| TQString KexiDBImageBox::dataSource |
( |
| ) |
const |
|
inline |
◆ dataSourceMimeType()
| TQCString KexiDBImageBox::dataSourceMimeType |
( |
| ) |
const |
|
inline |
◆ dropDownButtonVisible()
| bool KexiDBImageBox::dropDownButtonVisible |
( |
| ) |
const |
- Returns
- true id drop down button should be visible (the default).
Definition at line 813 of file kexidbimagebox.cpp.
◆ eventFilter()
| bool KexiDBImageBox::eventFilter |
( |
TQObject * |
watched, |
|
|
TQEvent * |
e |
|
) |
| |
|
protectedvirtual |
◆ focusPolicy()
| TQWidget::FocusPolicy KexiDBImageBox::focusPolicy |
( |
| ) |
const |
Overriden to change the policy behaviour a bit: NoFocus is returned regardless the real focus flag if the data source is empty (see dataSource()).
Definition at line 852 of file kexidbimagebox.cpp.
◆ focusPolicyInternal()
| TQWidget::FocusPolicy KexiDBImageBox::focusPolicyInternal |
( |
| ) |
const |
- Returns
- the internal focus policy value, i.e. the one unrelated to data source presence.
Definition at line 859 of file kexidbimagebox.cpp.
◆ handleAboutToSaveAsAction
| void KexiDBImageBox::handleAboutToSaveAsAction |
( |
TQString & |
origFilename, |
|
|
TQString & |
fileExtension, |
|
|
bool & |
dataIsEmpty |
|
) |
| |
|
protectedslot |
◆ handleCopyAction
| void KexiDBImageBox::handleCopyAction |
( |
| ) |
|
|
protectedslot |
◆ handleCutAction
| void KexiDBImageBox::handleCutAction |
( |
| ) |
|
|
protectedslot |
◆ handleInsertFromFileAction
| void KexiDBImageBox::handleInsertFromFileAction |
( |
const KURL & |
url | ) |
|
|
protectedslot |
◆ handlePasteAction
| void KexiDBImageBox::handlePasteAction |
( |
| ) |
|
|
protectedslot |
◆ handleSaveAsAction
| void KexiDBImageBox::handleSaveAsAction |
( |
const TQString & |
fileName | ) |
|
|
protectedslot |
◆ handleShowPropertiesAction
| void KexiDBImageBox::handleShowPropertiesAction |
( |
| ) |
|
|
protectedslot |
◆ hasScaledContents()
| bool KexiDBImageBox::hasScaledContents |
( |
| ) |
const |
◆ idChanged
| void KexiDBImageBox::idChanged |
( |
long |
id | ) |
|
|
signal |
Used for db-aware mode.
Emitted when value has been changed. Actual value can be obtained using value().
◆ insertFromFile
| void KexiDBImageBox::insertFromFile |
( |
| ) |
|
|
slot |
◆ isReadOnly()
| bool KexiDBImageBox::isReadOnly |
( |
| ) |
const |
|
virtual |
- Returns
- 'readOnly' flag for this item. The flag is usually taken from the item's widget, e.g. KLineEdit::isReadOnly(). By default, always returns false.
Reimplemented from KexiDataItemInterface.
Definition at line 211 of file kexidbimagebox.cpp.
◆ keepAspectRatio()
| bool KexiDBImageBox::keepAspectRatio |
( |
| ) |
const |
|
inline |
◆ keyPressed()
| bool KexiDBImageBox::keyPressed |
( |
TQKeyEvent * |
ke | ) |
|
|
protectedvirtual |
Called by top-level form on key press event. Used for Key_Escape to if the popup is visible, so the key press won't be consumed to perform "cancel editing".
Reimplemented from KexiFormDataItemInterface.
Definition at line 773 of file kexidbimagebox.cpp.
◆ lineWidth()
| int KexiDBImageBox::lineWidth |
( |
| ) |
const |
|
inline |
◆ paintEvent()
| void KexiDBImageBox::paintEvent |
( |
TQPaintEvent * |
pe | ) |
|
|
protectedvirtual |
◆ pixmap()
| TQPixmap KexiDBImageBox::pixmap |
( |
| ) |
const |
◆ pixmapId()
| uint KexiDBImageBox::pixmapId |
( |
| ) |
const |
◆ popupMenuAvailable()
| bool KexiDBImageBox::popupMenuAvailable |
( |
| ) |
|
|
protected |
- Todo:
- add kexi-global setting which anyway, allows to show this button (read-only actions like copy/save as/print can be available)
Definition at line 581 of file kexidbimagebox.cpp.
◆ realLineWidth()
| int KexiDBImageBox::realLineWidth |
( |
| ) |
const |
|
protected |
- Returns
- real line width, i.e. for Boxed sunken or Boxed raised frames returns doubled width value.
Definition at line 624 of file kexidbimagebox.cpp.
◆ resizeEvent()
| void KexiDBImageBox::resizeEvent |
( |
TQResizeEvent * |
e | ) |
|
|
protectedvirtual |
◆ setAlignment
| void KexiDBImageBox::setAlignment |
( |
int |
alignment | ) |
|
|
slot |
◆ setColumnInfo()
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 766 of file kexidbimagebox.cpp.
◆ setData()
◆ setDataSource
| void KexiDBImageBox::setDataSource |
( |
const TQString & |
ds | ) |
|
|
virtualslot |
Sets the datasource to ds.
- Todo:
- get default line width from global style settings
Definition at line 589 of file kexidbimagebox.cpp.
◆ setDataSourceMimeType
| void KexiDBImageBox::setDataSourceMimeType |
( |
const TQCString & |
ds | ) |
|
|
inlineslot |
◆ setDropDownButtonVisible
| void KexiDBImageBox::setDropDownButtonVisible |
( |
bool |
set | ) |
|
|
slot |
◆ setFocusPolicy()
| void KexiDBImageBox::setFocusPolicy |
( |
TQWidget::FocusPolicy |
policy | ) |
|
|
virtual |
Sets the internal focus policy value. "Internal" means that if there is no data source set, real policy becomes NoFocus.
Definition at line 864 of file kexidbimagebox.cpp.
◆ setInvalidState()
| void KexiDBImageBox::setInvalidState |
( |
const TQString & |
displayText | ) |
|
|
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.
- Todo:
- m_pixmapLabel->setText( displayText );
Implements KexiFormDataItemInterface.
Definition at line 182 of file kexidbimagebox.cpp.
◆ setKeepAspectRatio
| void KexiDBImageBox::setKeepAspectRatio |
( |
bool |
set | ) |
|
|
slot |
◆ setLineWidth()
| void KexiDBImageBox::setLineWidth |
( |
int |
width | ) |
|
|
virtual |
Reimplemented to override behaviour of "lineWidth" property.
- Returns
- original file name of image loaded from a file. This can be later reused for displaying the image within a collection (to be implemented) or on saving the image data back to file.
Definition at line 787 of file kexidbimagebox.cpp.
◆ setPalette()
| void KexiDBImageBox::setPalette |
( |
const TQPalette & |
pal | ) |
|
|
virtual |
Reimplemented to override behaviour of "paletteBackgroundColor" and "paletteForegroundColor" properties.
Reimplemented from KexiFrame.
Definition at line 793 of file kexidbimagebox.cpp.
◆ setPaletteBackgroundColor()
| void KexiDBImageBox::setPaletteBackgroundColor |
( |
const TQColor & |
color | ) |
|
|
virtual |
Reimplemented to override behaviour of "paletteBackgroundColor" property.
Definition at line 804 of file kexidbimagebox.cpp.
◆ setPixmapId
| void KexiDBImageBox::setPixmapId |
( |
uint |
id | ) |
|
|
slot |
◆ setReadOnly
| void KexiDBImageBox::setReadOnly |
( |
bool |
set | ) |
|
|
virtualslot |
◆ setScaledContents
| void KexiDBImageBox::setScaledContents |
( |
bool |
set | ) |
|
|
slot |
Sets pixmapData data for this widget.
If the widget has data source set, the pixmap will be also placed inside of the buffer and saved later.
Sets original file name of image loaded from a file. - See also
- originalFileName()
Definition at line 275 of file kexidbimagebox.cpp.
◆ setStoredPixmapId
| void KexiDBImageBox::setStoredPixmapId |
( |
uint |
id | ) |
|
|
slot |
◆ setValueInternal() [1/2]
| virtual void KexiDBImageBox::setValueInternal |
( |
const TQVariant & |
add, |
|
|
bool |
removeOld |
|
) |
| |
|
inlineprotectedvirtual |
◆ setValueInternal() [2/2]
| void KexiDBImageBox::setValueInternal |
( |
const TQVariant & |
add, |
|
|
bool |
removeOld, |
|
|
bool |
loadPixmap |
|
) |
| |
|
protected |
unused (m_valueMimeType is not available unless the px is inserted) TQString type( KImageIO::typeForMime(m_valueMimeType) ); ok = KImageIO::canRead( type );
- Todo:
- inform about error?
Definition at line 157 of file kexidbimagebox.cpp.
◆ sizeHint()
| TQSize KexiDBImageBox::sizeHint |
( |
| ) |
const |
|
virtual |
◆ slotUpdateActionsAvailabilityRequested
| void KexiDBImageBox::slotUpdateActionsAvailabilityRequested |
( |
bool & |
valueIsNull, |
|
|
bool & |
valueIsReadOnly |
|
) |
| |
|
protectedslot |
◆ storedPixmapId()
| uint KexiDBImageBox::storedPixmapId |
( |
| ) |
const |
◆ subwidgetStretchRequired()
| bool KexiDBImageBox::subwidgetStretchRequired |
( |
KexiDBAutoField * |
autoField | ) |
const |
|
protectedvirtual |
◆ updateActionStrings()
| void KexiDBImageBox::updateActionStrings |
( |
| ) |
|
|
protected |
Updates i18n'd action strings after datasource change.
- Todo:
- look at makeFirstCharacterUpperCaseInCaptions setting [bool] (see doc/dev/settings.txt)
Definition at line 544 of file kexidbimagebox.cpp.
◆ updatePixmap()
| void KexiDBImageBox::updatePixmap |
( |
| ) |
|
|
protected |
◆ value()
| TQVariant KexiDBImageBox::value |
( |
| ) |
|
|
virtual |
◆ valueIsEmpty()
| bool KexiDBImageBox::valueIsEmpty |
( |
| ) |
|
|
virtual |
◆ valueIsNull()
| bool KexiDBImageBox::valueIsNull |
( |
| ) |
|
|
virtual |
◆ widget()
| TQWidget * KexiDBImageBox::widget |
( |
| ) |
|
|
virtual |
◆ m_alignment
| int KexiDBImageBox::m_alignment |
|
protected |
◆ m_chooser
◆ m_data
◆ m_designMode
| bool KexiDBImageBox::m_designMode |
|
protected |
◆ m_dropDownButtonVisible
| bool KexiDBImageBox::m_dropDownButtonVisible |
|
protected |
◆ m_focusPolicyInternal
| TQWidget::FocusPolicy KexiDBImageBox::m_focusPolicyInternal |
|
protected |
◆ m_insideSetData
| bool KexiDBImageBox::m_insideSetData |
|
protected |
◆ m_insideSetPalette
| bool KexiDBImageBox::m_insideSetPalette |
|
protected |
◆ m_keepAspectRatio
| bool KexiDBImageBox::m_keepAspectRatio |
|
protected |
◆ m_lineWidthChanged
| bool KexiDBImageBox::m_lineWidthChanged |
|
protected |
◆ m_paintEventEnabled
| bool KexiDBImageBox::m_paintEventEnabled |
|
protected |
◆ m_paletteBackgroundColorChanged
| bool KexiDBImageBox::m_paletteBackgroundColorChanged |
|
protected |
◆ m_pixmap
| TQPixmap KexiDBImageBox::m_pixmap |
|
protected |
◆ m_popupMenu
◆ m_readOnly
| bool KexiDBImageBox::m_readOnly |
|
protected |
◆ m_scaledContents
| bool KexiDBImageBox::m_scaledContents |
|
protected |
◆ m_setFocusOnButtonAfterClosingPopup
| bool KexiDBImageBox::m_setFocusOnButtonAfterClosingPopup |
|
protected |
◆ m_value
| TQByteArray KexiDBImageBox::m_value |
|
protected |
◆ m_valueMimeType
| TQString KexiDBImageBox::m_valueMimeType |
|
protected |
The documentation for this class was generated from the following files:
|