Kexi API Documentation (2.0 alpha)

KexiBlobTableEdit Class Reference

#include <kexiblobtableedit.h>

Inheritance diagram for KexiBlobTableEdit:

KexiTableEdit QWidget KexiDataItemInterface List of all members.

Public Member Functions

 KexiBlobTableEdit (KexiTableViewColumn &column, QWidget *parent=0)
virtual ~KexiBlobTableEdit ()
bool valueIsNull ()
bool valueIsEmpty ()
virtual QVariant value ()
virtual bool cursorAtStart ()
virtual bool cursorAtEnd ()
virtual void resize (int w, int h)
virtual void showFocus (const QRect &r, bool readOnly)
virtual void hideFocus ()
virtual QSize totalSize () const
virtual void paintFocusBorders (QPainter *p, QVariant &, int x, int y, int w, int h)
virtual bool handleKeyPress (QKeyEvent *ke, bool editorActive)
virtual bool handleDoubleClick ()
virtual void handleAction (const QString &actionName)
virtual void handleCopyAction (const QVariant &value, const QVariant &visibleValue)
virtual void setupContents (QPainter *p, bool focused, const QVariant &val, QString &txt, int &align, int &x, int &y_offset, int &w, int &h)

Protected Slots

void slotUpdateActionsAvailabilityRequested (bool &valueIsNull, bool &valueIsReadOnly)
void handleInsertFromFileAction (const KURL &url)
void handleAboutToSaveAsAction (QString &origFilename, QString &fileExtension, bool &dataIsEmpty)
void handleSaveAsAction (const QString &fileName)
void handleCutAction ()
void handleCopyAction ()
void handlePasteAction ()
virtual void clear ()
 clears item's data, so the data will contain NULL data
void handleShowPropertiesAction ()

Protected Member Functions

virtual void setValueInternal (const QVariant &add, bool removeOld)
 initializes this editor with add value
void updateFocus (const QRect &r)
void signalEditRequested ()
void executeCopyAction (const QByteArray &data)

Protected Attributes

Private * d

Constructor & Destructor Documentation

KexiBlobTableEdit::KexiBlobTableEdit KexiTableViewColumn column,
QWidget parent = 0
 

Todo:
pixmaplabel icon is hardcoded...

Definition at line 83 of file kexiblobtableedit.cpp.

References KexiDB::QueryColumnInfo::captionOrAliasOrName(), clear(), KexiTableViewColumn::columnInfo, d, handleCopyAction(), handleCutAction(), handleInsertFromFileAction(), handlePasteAction(), handleSaveAsAction(), handleShowPropertiesAction(), KexiDataItemInterface::m_hasFocusableWidget, slotUpdateActionsAvailabilityRequested(), and KexiImageContextMenu::updateTitle().

KexiBlobTableEdit::~KexiBlobTableEdit  )  [virtual]
 

Definition at line 124 of file kexiblobtableedit.cpp.

References d.


Member Function Documentation

void KexiBlobTableEdit::clear  )  [protected, virtual, slot]
 

clears item's data, so the data will contain NULL data

Implements KexiDataItemInterface.

Definition at line 499 of file kexiblobtableedit.cpp.

References KexiTableEdit::repaintRelatedCell(), setValueInternal(), and signalEditRequested().

Referenced by handleCutAction(), and KexiBlobTableEdit().

bool KexiBlobTableEdit::cursorAtEnd  )  [virtual]
 

Returns:
true if the item widget's cursor (whatever that means, eg. line edit cursor) is at the end of editor's contents. This can inform table/form view that after pressing "right arrow" key should stop editing and move to a field on the right hand.

Implements KexiDataItemInterface.

Definition at line 404 of file kexiblobtableedit.cpp.

bool KexiBlobTableEdit::cursorAtStart  )  [virtual]
 

Returns:
true if the item widget's cursor (whatever that means, eg. line edit cursor) is at the beginning of editor's contents. This can inform table/form view that after pressing "left arrow" key should stop editing and move to a field on the left hand.

Implements KexiDataItemInterface.

Definition at line 399 of file kexiblobtableedit.cpp.

void KexiBlobTableEdit::executeCopyAction const QByteArray &  data  )  [protected]
 

Definition at line 472 of file kexiblobtableedit.cpp.

References KexiCSVExport::Clipboard.

Referenced by handleCopyAction().

void KexiBlobTableEdit::handleAboutToSaveAsAction QString origFilename,
QString fileExtension,
bool &  dataIsEmpty
[protected, slot]
 

Todo:
no fname stored for now

Definition at line 435 of file kexiblobtableedit.cpp.

References valueIsEmpty().

void KexiBlobTableEdit::handleAction const QString actionName  )  [virtual]
 

Handles action having standard name actionName. Action could be: "edit_cut", "edit_paste", etc.

Reimplemented from KexiDataItemInterface.

Definition at line 608 of file kexiblobtableedit.cpp.

References d, and KexiTableEdit::editRequested().

void KexiBlobTableEdit::handleCopyAction  )  [protected, slot]
 

Definition at line 467 of file kexiblobtableedit.cpp.

References d, and executeCopyAction().

Referenced by handleCutAction(), and KexiBlobTableEdit().

void KexiBlobTableEdit::handleCopyAction const QVariant &  value,
const QVariant &  visibleValue
[virtual]
 

Handles copy action for value. The value is copied to clipboard in format appropriate for the editor's impementation, e.g. for image cell it can be a pixmap. visibleValue is unused here. Reimplemented after KexiTableEdit.

Implements KexiTableEdit.

Definition at line 602 of file kexiblobtableedit.cpp.

References executeCopyAction().

void KexiBlobTableEdit::handleCutAction  )  [protected, slot]
 

Definition at line 459 of file kexiblobtableedit.cpp.

References clear(), handleCopyAction(), and KexiDataItemInterface::isReadOnly().

Referenced by KexiBlobTableEdit().

bool KexiBlobTableEdit::handleDoubleClick  )  [virtual]
 

Handles double click request coming from the table view.

Returns:
true if it has been consumed. Reimplemented in KexiBlobTableEdit (to execute "insert file" action.

Reimplemented from KexiTableEdit.

Definition at line 596 of file kexiblobtableedit.cpp.

References d.

void KexiBlobTableEdit::handleInsertFromFileAction const KURL &  url  )  [protected, slot]
 

Todo:
download the file if remote, then set fileName properly
Todo:
err msg
Todo:
err msg

Definition at line 409 of file kexiblobtableedit.cpp.

References KexiDataItemInterface::isReadOnly(), setValueInternal(), and signalEditRequested().

Referenced by KexiBlobTableEdit().

bool KexiBlobTableEdit::handleKeyPress QKeyEvent *  ke,
bool  editorActive
[virtual]
 

Reimplemented to handle the key events.

Reimplemented from KexiTableEdit.

Definition at line 574 of file kexiblobtableedit.cpp.

References d.

void KexiBlobTableEdit::handlePasteAction  )  [protected, slot]
 

Definition at line 480 of file kexiblobtableedit.cpp.

References KexiCSVExport::Clipboard, KexiDataItemInterface::isReadOnly(), KexiTableEdit::repaintRelatedCell(), setValueInternal(), and signalEditRequested().

Referenced by KexiBlobTableEdit().

void KexiBlobTableEdit::handleSaveAsAction const QString fileName  )  [protected, slot]
 

Todo:
err msg
Todo:
err msg

Definition at line 443 of file kexiblobtableedit.cpp.

References d.

Referenced by KexiBlobTableEdit().

void KexiBlobTableEdit::handleShowPropertiesAction  )  [protected, slot]
 

Todo:

Definition at line 507 of file kexiblobtableedit.cpp.

Referenced by KexiBlobTableEdit().

void KexiBlobTableEdit::hideFocus  )  [virtual]
 

Hides additional elements that are needed for indicating that the current cell is selected. For reimplementation. By default does nothing.

Reimplemented from KexiDataItemInterface.

Definition at line 550 of file kexiblobtableedit.cpp.

References d.

void KexiBlobTableEdit::paintFocusBorders QPainter *  p,
QVariant &  ,
int  x,
int  y,
int  w,
int  h
[virtual]
 

Paints a border for the cell described by x, y, w, h on p painter. The cell's value is val (may be useful if you want to reimplement this method).

Reimplemented from KexiTableEdit.

Definition at line 247 of file kexiblobtableedit.cpp.

References d.

void KexiBlobTableEdit::resize int  w,
int  h
[virtual]
 

Reimplemented: resizes a view().

Reimplemented from KexiTableEdit.

Definition at line 524 of file kexiblobtableedit.cpp.

References d, KexiTableEdit::m_rightMargin, KexiTableEdit::m_rightMarginWhenFocused, KexiTableEdit::m_scrollView, and updateFocus().

void KexiBlobTableEdit::setupContents QPainter *  p,
bool  focused,
const QVariant &  val,
QString txt,
int &  align,
int &  x,
int &  y_offset,
int &  w,
int &  h
[virtual]
 

Todo:
optimize: load to m_pixmap, downsize

Reimplemented from KexiTableEdit.

Definition at line 256 of file kexiblobtableedit.cpp.

References KexiUtils::drawPixmap().

void KexiBlobTableEdit::setValueInternal const QVariant &  add,
bool  removeOld
[protected, virtual]
 

initializes this editor with add value

Implements KexiDataItemInterface.

Definition at line 140 of file kexiblobtableedit.cpp.

References d, KexiDataItemInterface::m_origValue, and KexiTableEdit::setViewWidget().

Referenced by clear(), handleInsertFromFileAction(), and handlePasteAction().

void KexiBlobTableEdit::showFocus const QRect &  r,
bool  readOnly
[virtual]
 

Displays additional elements that are needed for indicating that the current cell is selected. For example, combobox editor (KexiComboBoxTableEdit) moves and shows dropdown button. r is the rectangle for the cell. If readOnly is true, additional elements should be visually disabled, e.g. dropdown button of the combobox editor should be disabled. For reimplementation. By default does nothing.

Reimplemented from KexiDataItemInterface.

Definition at line 512 of file kexiblobtableedit.cpp.

References d, and updateFocus().

void KexiBlobTableEdit::signalEditRequested  )  [protected]
 

Definition at line 567 of file kexiblobtableedit.cpp.

References d, and KexiTableEdit::editRequested().

Referenced by clear(), handleInsertFromFileAction(), and handlePasteAction().

void KexiBlobTableEdit::slotUpdateActionsAvailabilityRequested bool &  valueIsNull,
bool &  valueIsReadOnly
[protected, slot]
 

Definition at line 560 of file kexiblobtableedit.cpp.

References d, KexiTableEdit::editRequested(), KexiDataItemInterface::isReadOnly(), and valueIsNull().

Referenced by KexiBlobTableEdit().

QSize KexiBlobTableEdit::totalSize  )  const [virtual]
 

Returns:
total size of this editor, including popup button.

Definition at line 555 of file kexiblobtableedit.cpp.

References d.

void KexiBlobTableEdit::updateFocus const QRect &  r  )  [protected]
 

Definition at line 540 of file kexiblobtableedit.cpp.

References d, and KexiTableEdit::moveChild().

Referenced by resize(), and showFocus().

QVariant KexiBlobTableEdit::value  )  [virtual]
 

Returns:
value currently represented by this item.

Implements KexiDataItemInterface.

Definition at line 222 of file kexiblobtableedit.cpp.

References d.

bool KexiBlobTableEdit::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 215 of file kexiblobtableedit.cpp.

References d.

Referenced by handleAboutToSaveAsAction().

bool KexiBlobTableEdit::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 208 of file kexiblobtableedit.cpp.

References d.

Referenced by slotUpdateActionsAvailabilityRequested().


Member Data Documentation

Private* KexiBlobTableEdit::d [protected]
 

Definition at line 110 of file kexiblobtableedit.h.

Referenced by handleAction(), handleCopyAction(), handleDoubleClick(), handleKeyPress(), handleSaveAsAction(), hideFocus(), KexiBlobTableEdit(), paintFocusBorders(), resize(), setValueInternal(), showFocus(), signalEditRequested(), slotUpdateActionsAvailabilityRequested(), totalSize(), updateFocus(), value(), valueIsEmpty(), valueIsNull(), and ~KexiBlobTableEdit().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:49:44 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003