Kexi API Documentation (2.0 alpha)

KexiTableView Class Reference

#include <kexitableview.h>

Inheritance diagram for KexiTableView:

QScrollView KexiRecordNavigatorHandler KexiSharedActionClient KexiDataAwareObjectInterface KexiDataTableView List of all members.

Detailed Description

KexiTableView class provides a widget for displaying data in a tabular view.

See also:
KexiFormScrollView

Definition at line 66 of file kexitableview.h.

Public Types

enum  ScrollDirection { ScrollUp, ScrollDown, ScrollLeft, ScrollRight }

Public Slots

virtual void setData (KexiTableViewData *data, bool owner=true)
virtual void clearColumnsInternal (bool repaint)
void adjustColumnWidthToContents (int colNum=-1)
void setColumnWidth (int col, int width)
 Sets width of column width to width.
void setColumnStretchEnabled (bool set, int colNum)
void maximizeColumnsWidth (const QValueList< int > &columnList)
void adjustHorizontalHeaderSize ()
void setHighlightedRow (int row)
void clearHighlightedRow ()
virtual void ensureCellVisible (int row, int col)
virtual void deleteCurrentRow ()
virtual KexiTableIteminsertEmptyRow (int row=-1)
virtual void startEditCurrentCell (const QString &setText=QString::null)
virtual void deleteAndStartEditCurrentCell ()
virtual bool cancelRowEdit ()
virtual bool acceptRowEdit ()
virtual void setAcceptsRowEditAfterCellAccepting (bool set)
virtual void setDropsAtRowEnabled (bool set)
virtual bool cancelEditor ()
virtual bool acceptEditor ()
 Accepst changes made to the currently active editor.

Signals

virtual void dataSet (KexiTableViewData *data)
virtual void itemSelected (KexiTableItem *)
virtual void cellSelected (int col, int row)
void itemReturnPressed (KexiTableItem *, int row, int col)
void itemDblClicked (KexiTableItem *, int row, int col)
void itemMouseReleased (KexiTableItem *, int row, int col)
void dragOverRow (KexiTableItem *item, int row, QDragMoveEvent *e)
void droppedAtRow (KexiTableItem *item, int row, QDropEvent *e, KexiTableItem *&newItem)
virtual void dataRefreshed ()
virtual void itemChanged (KexiTableItem *, int row, int col)
 signals
virtual void itemChanged (KexiTableItem *, int row, int col, QVariant oldValue)
virtual void itemDeleteRequest (KexiTableItem *, int row, int col)
virtual void currentItemDeleteRequest ()
virtual void newItemAppendedForAfterDeletingInSpreadSheetMode ()
 Emitted for spreadsheet mode when an item was deleted and a new item has been appended.
void sortedColumnChanged (int col)
void rowEditStarted (int row)
 emmited when row editing is started (for updating or inserting)
void rowEditTerminated (int row)
 emmited when row editing is terminated (for updating or inserting) no matter if accepted or not
void reloadActions ()
 Emitted in initActions() to force reload actions You should remove existing actions and add them again.

Public Member Functions

 KexiTableView (KexiTableViewData *data=0, QWidget *parent=0, const char *name=0)
virtual ~KexiTableView ()
const Appearanceappearance () const
void setAppearance (const Appearance &a)
QString columnCaption (int colNum) const
KexiDB::Fieldfield (int colNum) const
virtual void setSpreadSheetMode ()
virtual int rowsPerPage () const
QRect cellGeometry (int row, int col) const
int columnWidth (int col) const
int rowHeight () const
int columnPos (int col) const
int rowPos (int row) const
int columnAt (int pos) const
int rowAt (int pos, bool ignoreEnd=false) const
virtual int lastVisibleRow () const
virtual void updateCell (int row, int col)
virtual void updateCurrentCell ()
virtual void updateRow (int row)
bool editableOnDoubleClick () const
void setEditableOnDoubleClick (bool set)
bool verticalHeaderVisible () const
void setVerticalHeaderVisible (bool set)
 Sets vertical header's visibility.
bool horizontalHeaderVisible () const
void setHorizontalHeaderVisible (bool set)
 Sets horizontal header's visibility.
void print (KPrinter &printer)
virtual QSizePolicy sizePolicy () const
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const
void setFont (const QFont &f)
virtual QSize tableSize () const
void emitSelected ()
void triggerUpdate ()
 single shot after 1ms for contents updatinh
virtual bool eventFilter (QObject *o, QEvent *e)
int highlightedRow () const
KexiTableItemhighlightedItem () const
virtual QScrollBar * verticalScrollBar () const

Static Public Member Functions

static void initCellEditorFactories ()
 Initializes standard editor cell editor factories. This is called internally, once.

Protected Slots

void slotSettingsChanged (int category)
virtual void slotDataDestroying ()
virtual void slotRowsDeleted (const QValueList< int > &)
void slotColumnWidthChanged (int col, int os, int ns)
 updates display after many rows deletion
void slotSectionHandleDoubleClicked (int section)
void slotUpdate ()
virtual void sortColumnInternal (int col, int order=0)
 implemented because we needed this as slot
void slotAutoScroll ()
void slotTopHeaderSizeChange (int section, int oldSize, int newSize)
 internal, used when top header's size changed
void slotEditRequested ()
 receives a signal from cell editors
virtual void reloadData ()
virtual void slotRowRepaintRequested (KexiTableItem &item)
 Handles KexiTableViewData::rowRepaintRequested() signal.
virtual void slotAboutToDeleteRow (KexiTableItem &item, KexiDB::ResultInfo *result, bool repaint)
 Handles KexiTableViewData::aboutToDeleteRow() signal. Prepares info for slotRowDeleted().
virtual void slotRowDeleted ()
 Handles KexiTableViewData::rowDeleted() signal to repaint when needed.
virtual void slotRowInserted (KexiTableItem *item, bool repaint)
 Handles KexiTableViewData::rowInserted() signal to repaint when needed.
virtual void slotRowInserted (KexiTableItem *item, uint row, bool repaint)
 Like above, not db-aware version.
virtual void vScrollBarValueChanged (int v)
virtual void vScrollBarSliderReleased ()
virtual void scrollBarTipTimeout ()

Protected Member Functions

virtual void initDataContents ()
virtual void updateWidgetContentsSize ()
virtual void clearVariables ()
virtual int currentLocalSortingOrder () const
virtual int currentLocalSortColumn () const
virtual void setLocalSortingOrder (int col, int order)
virtual void updateGUIAfterSorting ()
virtual void updateWidgetScrollBars ()
virtual void addHeaderColumn (const QString &caption, const QString &description, const QIconSet &icon, int size)
bool isDefaultValueDisplayed (KexiTableItem *item, int col, QVariant *value=0)
void drawContents (QPainter *p, int cx, int cy, int cw, int ch)
 painting and layout
void createBuffer (int width, int height)
void paintCell (QPainter *p, KexiTableItem *item, int col, int row, const QRect &cr, bool print=false)
void paintEmptyArea (QPainter *p, int cx, int cy, int cw, int ch)
void updateGeometries ()
QPoint contentsToViewport2 (const QPoint &p)
void contentsToViewport2 (int x, int y, int &vx, int &vy)
QPoint viewportToContents2 (const QPoint &vp)
virtual void contentsMousePressEvent (QMouseEvent *e)
virtual void contentsMouseReleaseEvent (QMouseEvent *e)
bool handleContentsMousePressOrRelease (QMouseEvent *e, bool release)
virtual void contentsMouseMoveEvent (QMouseEvent *e)
virtual void contentsMouseDoubleClickEvent (QMouseEvent *e)
virtual void keyPressEvent (QKeyEvent *e)
virtual void focusInEvent (QFocusEvent *e)
virtual void focusOutEvent (QFocusEvent *e)
 Call this from the subclass. */.
virtual void resizeEvent (QResizeEvent *e)
virtual void viewportResizeEvent (QResizeEvent *e)
virtual void showEvent (QShowEvent *e)
virtual void contentsDragMoveEvent (QDragMoveEvent *e)
virtual void contentsDropEvent (QDropEvent *e)
virtual void viewportDragLeaveEvent (QDragLeaveEvent *e)
virtual void paletteChange (const QPalette &oldPalette)
virtual KexiDataItemInterfaceeditor (int col, bool ignoreMissingEditor=false)
KexiTableEdittableEditorWidget (int col, bool ignoreMissingEditor=false)
virtual void editorShowFocus (int row, int col)
virtual void createEditor (int row, int col, const QString &addText=QString::null, bool removeOld=false)
 Creates editors and shows it, what usually means the beginning of a cell editing.
bool focusNextPrevChild (bool next)
bool shortCutPressed (QKeyEvent *e, const QCString &action_name)
void showContextMenu (const QPoint &pos=QPoint(-1,-1))
void paintRow (KexiTableItem *item, QPainter *pb, int r, int rowp, int cx, int cy, int colfirst, int collast, int maxwc)
virtual void setHBarGeometry (QScrollBar &hbar, int x, int y, int w, int h)
void setupNavigator ()
 Setups navigator widget.
int validRowNumber (const QString &text)
 internal, to determine valid row number when navigator text changed
virtual void removeEditor ()
void updateFonts (bool repaint=false)
 Internal: updated sched fonts for painting.
void setBottomMarginInternal (int pixels)
virtual void updateWidgetContents ()
virtual void moveToRecordRequested (uint r)
 for navigator
virtual void moveToLastRecordRequested ()
virtual void moveToPreviousRecordRequested ()
virtual void moveToNextRecordRequested ()
virtual void moveToFirstRecordRequested ()
virtual void addNewRecordRequested ()
virtual void copySelection ()
 Copy current selection to a clipboard (e.g. cell).
virtual void cutSelection ()
 Cut current selection to a clipboard (e.g. cell).
virtual void paste ()
 Paste current clipboard contents (e.g. to a cell).
virtual void updateAllVisibleRowsBelow (int row)
void updateAfterCancelRowEdit ()
void updateAfterAcceptRowEdit ()
bool getVisibleLookupValue (QVariant &cellValue, KexiTableEdit *edit, KexiTableItem *item, KexiTableViewColumn *tvcol) const

Protected Attributes

KexiTableViewPrivated

Friends

class KexiTableItem
class WhatsThis
class KexiTableViewCellToolTip

Classes

class  Appearance


Member Enumeration Documentation

enum KexiTableView::ScrollDirection
 

Enumeration values:
ScrollUp 
ScrollDown 
ScrollLeft 
ScrollRight 

Definition at line 238 of file kexitableview.h.


Constructor & Destructor Documentation

KexiTableView::KexiTableView KexiTableViewData data = 0,
QWidget parent = 0,
const char *  name = 0
 

Definition at line 177 of file kexitableview.cpp.

References KexiTableViewPrivate::appearance, KexiTableView::Appearance::borderColor, KexiTableViewPrivate::cellToolTip, d, KexiTableViewPrivate::diagonalGrayPattern, KexiTableViewCellToolTip, KexiDataAwareObjectInterface::m_data, KexiDataAwareObjectInterface::m_horizontalHeader, KexiDataAwareObjectInterface::m_owner, KexiDataAwareObjectInterface::m_popupMenu, KexiDataAwareObjectInterface::m_verticalHeader, KexiTableViewPrivate::menu_id_addRecord, KexiTableViewPrivate::menu_id_removeRecord, KexiTableViewPrivate::pUpdateTimer, KexiTableViewPrivate::rowHeight, setAppearance(), KexiRecordMarker::setCellHeight(), KexiRecordMarker::setCurrentRow(), setData(), KexiRecordMarker::setSelectionBackgroundColor(), KexiTableViewHeader::setSelectionBackgroundColor(), setupNavigator(), slotAutoScroll(), slotColumnWidthChanged(), slotSectionHandleDoubleClicked(), slotSettingsChanged(), slotTopHeaderSizeChange(), slotUpdate(), sortColumnInternal(), verticalScrollBar(), and WhatsThis.

KexiTableView::~KexiTableView  )  [virtual]
 

Definition at line 306 of file kexitableview.cpp.

References cancelRowEdit(), d, KexiDataAwareObjectInterface::data(), KexiDataAwareObjectInterface::m_data, and KexiDataAwareObjectInterface::m_owner.


Member Function Documentation

virtual bool KexiTableView::acceptEditor  )  [inline, virtual, slot]
 

Accepst changes made to the currently active editor.

Returns:
true on success or false on failure (e.g. when editor does not exist or there is data validation error)

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 362 of file kexitableview.h.

References KexiDataAwareObjectInterface::acceptEditor().

Referenced by editor(), and keyPressEvent().

virtual bool KexiTableView::acceptRowEdit  )  [inline, virtual, slot]
 

Accepts row editing. All changes made to the editing row during this current session will be accepted (saved).

Returns:
true if accepting was successful, false otherwise (e.g. when current row contain data that does not meet given constraints).

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 345 of file kexitableview.h.

References KexiDataAwareObjectInterface::acceptRowEdit().

Referenced by KexiTableDesignerView::beforeSwitchTo(), KexiTableDesignerView::buildSchema(), KexiTableDesignerView::changeFieldPropertyForRow(), KexiTableDesignerView::changePropertyVisibility(), KexiTableDesignerView::clearRow(), KexiTableDesignerView::insertFieldInternal(), keyPressEvent(), and KFormDesigner::ConnectionDialog::newItem().

void KexiTableView::addHeaderColumn const QString caption,
const QString description,
const QIconSet &  icon,
int  size
[protected, virtual]
 

Implementation for KexiDataAwareObjectInterface. Adds another section within the horizontal header.

Implements KexiDataAwareObjectInterface.

Definition at line 348 of file kexitableview.cpp.

References KexiTableViewHeader::addLabel(), KexiDataAwareObjectInterface::m_horizontalHeader, and KexiTableViewHeader::setToolTip().

virtual void KexiTableView::addNewRecordRequested  )  [inline, protected, virtual]
 

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 604 of file kexitableview.h.

References KexiDataAwareObjectInterface::addNewRecordRequested().

void KexiTableView::adjustColumnWidthToContents int  colNum = -1  )  [slot]
 

Adjusts colNum column's width to its (current) contents. If colNum == -1, all columns' width is adjusted.

Definition at line 2151 of file kexitableview.cpp.

References KexiTableViewData::column(), KexiDataAwareObjectInterface::columns(), KexiDataAwareObjectInterface::columnType(), KexiDataAwareObjectInterface::currentColumn(), KexiDataAwareObjectInterface::hasData(), horizontalHeaderVisible(), KexiTableViewData::isEmpty(), KexiCellEditorFactory::item(), KexiTableViewData::iterator(), kexidbg, KEXITV_MINIMUM_COLUMN_WIDTH, KexiTableEdit::leftMargin(), KexiDataAwareObjectInterface::m_data, KexiDataAwareObjectInterface::m_horizontalHeader, KexiTableEdit::rightMargin(), setColumnWidth(), tableEditorWidget(), and KexiTableEdit::widthForValue().

Referenced by KFormDesigner::ConnectionDialog::ConnectionDialog(), KexiTableDesignerView::initData(), and slotSectionHandleDoubleClicked().

void KexiTableView::adjustHorizontalHeaderSize  )  [slot]
 

Adjusts the size of the sections to fit the size of the horizontal header as completely as possible. Only sections for which column stretch is enabled will be resized.

See also:
setColumnStretchEnabled() QHeader::adjustHeaderSize()

Definition at line 2245 of file kexitableview.cpp.

References KexiDataAwareObjectInterface::m_horizontalHeader.

const KexiTableView::Appearance & KexiTableView::appearance  )  const
 

Returns:
current appearance settings

Definition at line 2516 of file kexitableview.cpp.

References KexiTableViewPrivate::appearance, and d.

virtual bool KexiTableView::cancelEditor  )  [inline, virtual, slot]
 

Cancels changes made to the currently active editor. Reverts the editor's value to old one.

Returns:
true on success or false on failure (e.g. when editor does not exist)

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 361 of file kexitableview.h.

References KexiDataAwareObjectInterface::cancelEditor().

Referenced by editor(), and keyPressEvent().

virtual bool KexiTableView::cancelRowEdit  )  [inline, virtual, slot]
 

Cancels row editing All changes made to the editing row during this current session will be undone.

Returns:
true on success or false on failure (e.g. when editor does not exist)

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 339 of file kexitableview.h.

References KexiDataAwareObjectInterface::cancelRowEdit().

Referenced by editor(), keyPressEvent(), and ~KexiTableView().

QRect KexiTableView::cellGeometry int  row,
int  col
const
 

Definition at line 1915 of file kexitableview.cpp.

References columnPos(), columnWidth(), rowHeight(), and rowPos().

Referenced by editorShowFocus(), and updateCell().

virtual void KexiTableView::cellSelected int  col,
int  row
[virtual, signal]
 

for implementation as a signal

Implements KexiDataAwareObjectInterface.

void KexiTableView::clearColumnsInternal bool  repaint  )  [virtual, slot]
 

Called by clearColumns() to clear internals of the object. For example, KexiTableView removes contents of it's horizontal header.

Implements KexiDataAwareObjectInterface.

Definition at line 428 of file kexitableview.cpp.

References KexiDataAwareObjectInterface::m_horizontalHeader, and KexiTableViewHeader::removeLabel().

void KexiTableView::clearHighlightedRow  )  [inline, slot]
 

Sets no row that will be highlighted. Equivalent to setHighlightedRow(-1).

Definition at line 297 of file kexitableview.h.

void KexiTableView::clearVariables  )  [protected, virtual]
 

Reimplementation for KexiDataAwareObjectInterface

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 319 of file kexitableview.cpp.

References KexiTableViewPrivate::clearVariables(), KexiDataAwareObjectInterface::clearVariables(), and d.

int KexiTableView::columnAt int  pos  )  const
 

Definition at line 1889 of file kexitableview.cpp.

References KexiTableViewData::globalColumnID(), KexiDataAwareObjectInterface::hasData(), KexiDataAwareObjectInterface::m_data, and KexiDataAwareObjectInterface::m_horizontalHeader.

Referenced by contentsMouseMoveEvent(), contentsMousePressEvent(), contentsMouseReleaseEvent(), drawContents(), handleContentsMousePressOrRelease(), and KexiTableViewCellToolTip::maybeTip().

QString KexiTableView::columnCaption int  colNum  )  const
 

Returns:
string displayed for column's header colNum

Definition at line 2139 of file kexitableview.cpp.

References KexiDataAwareObjectInterface::m_horizontalHeader.

int KexiTableView::columnPos int  col  )  const
 

Definition at line 1869 of file kexitableview.cpp.

References KexiTableViewData::columnsCount(), KexiDataAwareObjectInterface::hasData(), KexiDataAwareObjectInterface::m_data, KexiDataAwareObjectInterface::m_horizontalHeader, and KexiTableViewData::visibleColumnID().

Referenced by cellGeometry(), contentsMousePressEvent(), createEditor(), drawContents(), ensureCellVisible(), KexiTableViewCellToolTip::maybeTip(), paintRow(), showContextMenu(), slotColumnWidthChanged(), tableSize(), updateAllVisibleRowsBelow(), and updateGUIAfterSorting().

int KexiTableView::columnWidth int  col  )  const
 

Definition at line 1856 of file kexitableview.cpp.

References KexiDataAwareObjectInterface::hasData(), KexiDataAwareObjectInterface::m_data, KexiDataAwareObjectInterface::m_horizontalHeader, and KexiTableViewData::visibleColumnID().

Referenced by cellGeometry(), contentsMousePressEvent(), createEditor(), drawContents(), editor(), ensureCellVisible(), KexiTableDesignerView::initData(), KexiTableViewCellToolTip::maybeTip(), minimumSizeHint(), paintRow(), print(), slotColumnWidthChanged(), tableSize(), and updateGUIAfterSorting().

void KexiTableView::contentsDragMoveEvent QDragMoveEvent *  e  )  [protected, virtual]
 

Definition at line 1690 of file kexitableview.cpp.

References KexiTableViewData::at(), d, dragOverRow(), KexiDataAwareObjectInterface::hasData(), KexiDataAwareObjectInterface::m_data, KexiDataAwareObjectInterface::m_dragIndicatorLine, KexiDataAwareObjectInterface::m_dropsAtRowEnabled, rowAt(), KexiTableViewPrivate::rowHeight, and updateRow().

void KexiTableView::contentsDropEvent QDropEvent *  e  )  [protected, virtual]
 

Definition at line 1736 of file kexitableview.cpp.

References KexiTableViewData::at(), d, droppedAtRow(), KexiDataAwareObjectInterface::hasData(), KexiDataAwareObjectInterface::insertItem(), KexiDataAwareObjectInterface::m_curRow, KexiDataAwareObjectInterface::m_data, KexiDataAwareObjectInterface::m_dragIndicatorLine, KexiDataAwareObjectInterface::m_dropsAtRowEnabled, rowAt(), KexiTableViewPrivate::rowHeight, KexiDataAwareObjectInterface::setCursorPosition(), and updateRow().

void KexiTableView::contentsMouseDoubleClickEvent QMouseEvent *  e  )  [protected, virtual]
 

Definition at line 974 of file kexitableview.cpp.

References KexiDB::Field::Boolean, KexiDataAwareObjectInterface::columnEditable(), KexiDataAwareObjectInterface::columnType(), contentsMousePressEvent(), d, KexiTableViewPrivate::editOnDoubleClick, KexiTableEdit::handleDoubleClick(), itemDblClicked(), KexiDataAwareObjectInterface::m_contentsMousePressEvent_dblClick, KexiDataAwareObjectInterface::m_curCol, KexiDataAwareObjectInterface::m_currentItem, KexiDataAwareObjectInterface::m_curRow, startEditCurrentCell(), and tableEditorWidget().

void KexiTableView::contentsMouseMoveEvent QMouseEvent *  e  )  [protected, virtual]
 

Definition at line 1143 of file kexitableview.cpp.

References KexiTableViewPrivate::appearance, columnAt(), contentsMousePressEvent(), d, KexiTableViewPrivate::highlightedRow, KexiDataAwareObjectInterface::isInsertingEnabled(), KexiDataAwareObjectInterface::m_curRow, KexiDataAwareObjectInterface::m_verticalHeader, KexiTableViewPrivate::needAutoScroll, rowAt(), KexiTableView::Appearance::rowMouseOverHighlightingEnabled, KexiDataAwareObjectInterface::rows(), KexiTableViewPrivate::scrollDirection, ScrollDown, ScrollLeft, ScrollRight, ScrollUp, KexiRecordMarker::setHighlightedRow(), and updateRow().

void KexiTableView::contentsMousePressEvent QMouseEvent *  e  )  [protected, virtual]
 

Definition at line 998 of file kexitableview.cpp.

References KexiDB::Field::Boolean, KexiDataAwareObjectInterface::boolToggled(), columnAt(), KexiDataAwareObjectInterface::columnEditable(), columnPos(), KexiDataAwareObjectInterface::columnType(), columnWidth(), KexiTableViewData::count(), createEditor(), d, handleContentsMousePressOrRelease(), KexiDataAwareObjectInterface::isInsertingEnabled(), KexiDataAwareObjectInterface::m_curCol, KexiDataAwareObjectInterface::m_curRow, KexiDataAwareObjectInterface::m_data, KexiTableViewPrivate::moveCursorOnMouseRelease, KexiTableViewPrivate::rowHeight, rowPos(), and showContextMenu().

Referenced by contentsMouseDoubleClickEvent(), and contentsMouseMoveEvent().

void KexiTableView::contentsMouseReleaseEvent QMouseEvent *  e  )  [protected, virtual]
 

Definition at line 1056 of file kexitableview.cpp.

References columnAt(), KexiTableViewData::count(), d, handleContentsMousePressOrRelease(), KexiDataAwareObjectInterface::isInsertingEnabled(), itemMouseReleased(), KexiDataAwareObjectInterface::m_curCol, KexiDataAwareObjectInterface::m_currentItem, KexiDataAwareObjectInterface::m_curRow, KexiDataAwareObjectInterface::m_data, KexiTableViewPrivate::moveCursorOnMouseRelease, and rowAt().

void KexiTableView::contentsToViewport2 int  x,
int  y,
int &  vx,
int &  vy
[protected]
 

Definition at line 911 of file kexitableview.cpp.

References contentsToViewport2().

QPoint KexiTableView::contentsToViewport2 const QPoint &  p  )  [protected]
 

Definition at line 906 of file kexitableview.cpp.

Referenced by contentsToViewport2(), and paintEmptyArea().

void KexiTableView::copySelection  )  [protected, virtual]
 

Copy current selection to a clipboard (e.g. cell).

Implements KexiDataAwareObjectInterface.

Definition at line 2375 of file kexitableview.cpp.

References KexiTableViewData::column(), getVisibleLookupValue(), KexiTableEdit::handleCopyAction(), isDefaultValueDisplayed(), KexiDataAwareObjectInterface::m_curCol, KexiDataAwareObjectInterface::m_currentItem, KexiDataAwareObjectInterface::m_data, and tableEditorWidget().

void KexiTableView::createBuffer int  width,
int  height
[protected]
 

Definition at line 527 of file kexitableview.cpp.

References d, and KexiTableViewPrivate::pBufferPm.

Referenced by drawContents().

void KexiTableView::createEditor int  row,
int  col,
const QString addText = QString::null,
bool  removeOld = false
[protected, virtual]
 

Creates editors and shows it, what usually means the beginning of a cell editing.

Implements KexiDataAwareObjectInterface.

Definition at line 1537 of file kexitableview.cpp.

References KexiRecordMarker::addLabel(), KexiTableViewData::append(), KexiDataAwareObjectInterface::bufferedValueAt(), KexiTableViewData::clearRowEditBuffer(), KexiTableViewData::column(), columnPos(), columnWidth(), KexiTableViewData::createItem(), d, KexiDataItemInterface::hasFocusableWidget(), KexiDataAwareObjectInterface::isInsertingEnabled(), KexiDataAwareObjectInterface::isReadOnly(), KexiDataAwareObjectInterface::m_curCol, KexiDataAwareObjectInterface::m_currentItem, KexiDataAwareObjectInterface::m_curRow, KexiDataAwareObjectInterface::m_data, KexiDataAwareObjectInterface::m_editor, KexiDataAwareObjectInterface::m_insertItem, KexiDataAwareObjectInterface::m_navPanel, KexiDataAwareObjectInterface::m_newRowEditing, KexiDataAwareObjectInterface::m_rowEditing, KexiDataAwareObjectInterface::m_verticalHeader, KexiDataAwareObjectInterface::m_verticalHeaderAlreadyAdded, rowEditStarted(), rowHeight(), KexiTableViewPrivate::rowHeight, rowPos(), KexiRecordMarker::setEditRow(), KexiDataItemInterface::setFocus(), KexiRecordMarker::setOffset(), KexiDataItemInterface::setValue(), KexiRecordNavigator::showEditingIndicator(), tableEditorWidget(), and updateWidgetContentsSize().

Referenced by contentsMousePressEvent(), keyPressEvent(), and slotEditRequested().

virtual void KexiTableView::currentItemDeleteRequest  )  [virtual, signal]
 

Implements KexiDataAwareObjectInterface.

int KexiTableView::currentLocalSortColumn  )  const [protected, virtual]
 

Implementation for KexiDataAwareObjectInterface

Implements KexiDataAwareObjectInterface.

Definition at line 471 of file kexitableview.cpp.

References KexiDataAwareObjectInterface::m_horizontalHeader.

int KexiTableView::currentLocalSortingOrder  )  const [protected, virtual]
 

Implementation for KexiDataAwareObjectInterface

Implements KexiDataAwareObjectInterface.

Definition at line 456 of file kexitableview.cpp.

References KexiDataAwareObjectInterface::m_horizontalHeader.

void KexiTableView::cutSelection  )  [protected, virtual]
 

Cut current selection to a clipboard (e.g. cell).

Implements KexiDataAwareObjectInterface.

Definition at line 2392 of file kexitableview.cpp.

References KexiDataItemInterface::handleAction(), and tableEditorWidget().

virtual void KexiTableView::dataRefreshed  )  [virtual, signal]
 

Data has been refreshed on-screen - emitted from initDataContents().

Implements KexiDataAwareObjectInterface.

virtual void KexiTableView::dataSet KexiTableViewData data  )  [virtual, signal]
 

Implements KexiDataAwareObjectInterface.

virtual void KexiTableView::deleteAndStartEditCurrentCell  )  [inline, virtual, slot]
 

Deletes currently selected cell's contents, if allowed. In most cases delete is not accepted immediately but "row editing" mode is just started.

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 333 of file kexitableview.h.

References KexiDataAwareObjectInterface::deleteAndStartEditCurrentCell().

Referenced by keyPressEvent().

virtual void KexiTableView::deleteCurrentRow  )  [inline, virtual, slot]
 

Deletes currently selected record; does nothing if no record is currently selected. If record is in edit mode, editing is cancelled before deleting.

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 310 of file kexitableview.h.

References KexiDataAwareObjectInterface::deleteCurrentRow().

Referenced by keyPressEvent().

void KexiTableView::dragOverRow KexiTableItem item,
int  row,
QDragMoveEvent *  e
[signal]
 

Referenced by contentsDragMoveEvent().

void KexiTableView::drawContents QPainter *  p,
int  cx,
int  cy,
int  cw,
int  ch
[protected]
 

painting and layout

Definition at line 604 of file kexitableview.cpp.

References KexiTableViewPrivate::appearance, KexiTableView::Appearance::baseColor, columnAt(), columnPos(), KexiDataAwareObjectInterface::columns(), columnWidth(), createBuffer(), d, KexiTableViewPrivate::disableDrawContents, KexiDataAwareObjectInterface::isInsertingEnabled(), KexiTableViewData::iterator(), KexiDataAwareObjectInterface::m_data, KexiDataAwareObjectInterface::m_insertItem, paintEmptyArea(), paintRow(), KexiTableViewPrivate::pBufferPm, rowAt(), rowHeight(), KexiTableViewPrivate::rowHeight, rowPos(), and KexiDataAwareObjectInterface::rows().

void KexiTableView::droppedAtRow KexiTableItem item,
int  row,
QDropEvent *  e,
KexiTableItem *&  newItem
[signal]
 

Referenced by contentsDropEvent().