kexi
KexiTableView Class Reference
#include <kexitableview.h>
Inheritance diagram for KexiTableView:

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) |
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 KexiTableItem * | insertEmptyRow (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 () |
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) |
virtual void | itemChanged (KexiTableItem *, int row, int col, QVariant oldValue) |
virtual void | itemDeleteRequest (KexiTableItem *, int row, int col) |
virtual void | currentItemDeleteRequest () |
virtual void | newItemAppendedForAfterDeletingInSpreadSheetMode () |
void | sortedColumnChanged (int col) |
void | rowEditStarted (int row) |
void | rowEditTerminated (int row) |
void | reloadActions () |
Public Member Functions | |
KexiTableView (KexiTableViewData *data=0, QWidget *parent=0, const char *name=0) | |
virtual | ~KexiTableView () |
const Appearance & | appearance () const |
void | setAppearance (const Appearance &a) |
QString | columnCaption (int colNum) const |
KexiDB::Field * | field (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) |
bool | horizontalHeaderVisible () const |
void | setHorizontalHeaderVisible (bool set) |
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 () |
virtual bool | eventFilter (QObject *o, QEvent *e) |
int | highlightedRow () const |
KexiTableItem * | highlightedItem () const |
virtual QScrollBar * | verticalScrollBar () const |
Static Public Member Functions | |
static void | initCellEditorFactories () |
Protected Slots | |
void | slotSettingsChanged (int category) |
virtual void | slotDataDestroying () |
virtual void | slotRowsDeleted (const QValueList< int > &) |
void | slotColumnWidthChanged (int col, int os, int ns) |
void | slotSectionHandleDoubleClicked (int section) |
void | slotUpdate () |
virtual void | sortColumnInternal (int col, int order=0) |
void | slotAutoScroll () |
void | slotTopHeaderSizeChange (int section, int oldSize, int newSize) |
void | slotEditRequested () |
virtual void | reloadData () |
virtual void | slotRowRepaintRequested (KexiTableItem &item) |
virtual void | slotAboutToDeleteRow (KexiTableItem &item, KexiDB::ResultInfo *result, bool repaint) |
virtual void | slotRowDeleted () |
virtual void | slotRowInserted (KexiTableItem *item, bool repaint) |
virtual void | slotRowInserted (KexiTableItem *item, uint row, bool repaint) |
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) |
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) |
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 KexiDataItemInterface * | editor (int col, bool ignoreMissingEditor=false) |
KexiTableEdit * | tableEditorWidget (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) |
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 () |
int | validRowNumber (const QString &text) |
virtual void | removeEditor () |
void | updateFonts (bool repaint=false) |
void | setBottomMarginInternal (int pixels) |
virtual void | updateWidgetContents () |
virtual void | moveToRecordRequested (uint r) |
virtual void | moveToLastRecordRequested () |
virtual void | moveToPreviousRecordRequested () |
virtual void | moveToNextRecordRequested () |
virtual void | moveToFirstRecordRequested () |
virtual void | addNewRecordRequested () |
virtual void | copySelection () |
virtual void | cutSelection () |
virtual void | paste () |
virtual void | updateAllVisibleRowsBelow (int row) |
void | updateAfterCancelRowEdit () |
void | updateAfterAcceptRowEdit () |
bool | getVisibleLookupValue (QVariant &cellValue, KexiTableEdit *edit, KexiTableItem *item, KexiTableViewColumn *tvcol) const |
Protected Attributes | |
KexiTableViewPrivate * | d |
Friends | |
class | KexiTableItem |
class | WhatsThis |
class | KexiTableViewCellToolTip |
Classes | |
class | Appearance |
Member Function Documentation
const KexiTableView::Appearance & KexiTableView::appearance | ( | ) | const |
void KexiTableView::setAppearance | ( | const Appearance & | a | ) |
Sets appearance settings. Table view is updated automatically.
- Todo:
- is setMouseTracking useful for other purposes?
Definition at line 2521 of file kexitableview.cpp.
QString KexiTableView::columnCaption | ( | int | colNum | ) | const |
- Returns:
- string displayed for column's header colNum
Definition at line 2139 of file kexitableview.cpp.
KexiDB::Field * KexiTableView::field | ( | int | colNum | ) | const |
Convenience function.
- Returns:
- field object that define column colNum or NULL if there is no such column
Definition at line 2144 of file kexitableview.cpp.
void KexiTableView::setSpreadSheetMode | ( | ) | [virtual] |
Reimplementation for KexiDataAwareObjectInterface
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 2323 of file kexitableview.cpp.
int KexiTableView::rowsPerPage | ( | ) | const [virtual] |
- Returns:
- maximum number of rows that can be displayed per one "page" for current table view's size.
Implements KexiDataAwareObjectInterface.
Definition at line 1467 of file kexitableview.cpp.
int KexiTableView::lastVisibleRow | ( | ) | const [virtual] |
- Returns:
- last row visible on the screen (counting from 0). The returned value is guaranteed to be smaller or equal to currentRow() or -1 if there are no rows.
Implements KexiDataAwareObjectInterface.
Definition at line 2601 of file kexitableview.cpp.
void KexiTableView::updateCell | ( | int | row, | |
int | col | |||
) | [virtual] |
Redraws specified cell.
Implements KexiDataAwareObjectInterface.
Definition at line 1779 of file kexitableview.cpp.
void KexiTableView::updateCurrentCell | ( | ) | [virtual] |
Redraws the current cell. Implemented after KexiDataAwareObjectInterface.
Implements KexiDataAwareObjectInterface.
Definition at line 1789 of file kexitableview.cpp.
void KexiTableView::updateRow | ( | int | row | ) | [virtual] |
Redraws all cells of specified row.
Implements KexiDataAwareObjectInterface.
Definition at line 1794 of file kexitableview.cpp.
bool KexiTableView::verticalHeaderVisible | ( | ) | const |
void KexiTableView::setVerticalHeaderVisible | ( | bool | set | ) |
bool KexiTableView::horizontalHeaderVisible | ( | ) | const |
void KexiTableView::setHorizontalHeaderVisible | ( | bool | set | ) |
void KexiTableView::setFont | ( | const QFont & | f | ) |
Reimplemented to update cached fonts and row sizes for the painter.
Definition at line 381 of file kexitableview.cpp.
void KexiTableView::triggerUpdate | ( | ) |
static void KexiTableView::initCellEditorFactories | ( | ) | [static] |
Initializes standard editor cell editor factories. This is called internally, once.
int KexiTableView::highlightedRow | ( | ) | const |
- Returns:
- highlighted row number or -1 if no row is highlighted. Makes sense if row highlighting is enabled.
Definition at line 2556 of file kexitableview.cpp.
virtual QScrollBar* KexiTableView::verticalScrollBar | ( | ) | const [inline, virtual] |
- Returns:
- vertical scrollbar. Implemented for KexiDataAwareObjectInterface.
Implements KexiDataAwareObjectInterface.
Definition at line 259 of file kexitableview.h.
virtual void KexiTableView::setData | ( | KexiTableViewData * | data, | |
bool | owner = true | |||
) | [inline, virtual, slot] |
Sets data for this object. if owner is true, the object will own data and therefore will be destroyed when needed, else: data is (possibly) shared and not owned by the widget. If widget already has _different_ data object assigned (and owns this data), old data is destroyed before new assignment.
- Todo:
- add col width configuration and storage
- Todo:
- : store sorting settings?
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 262 of file kexitableview.h.
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.
void KexiTableView::adjustColumnWidthToContents | ( | int | colNum = -1 |
) | [slot] |
Adjusts colNum column's width to its (current) contents. If colNum == -1, all columns' width is adjusted.
- Todo:
- js: this is NOT EFFECTIVE for big data sets!!!!
Definition at line 2151 of file kexitableview.cpp.
void KexiTableView::setColumnWidth | ( | int | col, | |
int | width | |||
) | [slot] |
void KexiTableView::setColumnStretchEnabled | ( | bool | set, | |
int | colNum | |||
) | [slot] |
If set is true, colNum column is resized to take full possible width. If set is false, no automatic resize will be performed. If colNum is -1, all columns are equally resized, when needed, to take full possible width. This method behaves like QHeader::setStretchEnabled ( bool b, int section ).
Definition at line 2250 of file kexitableview.cpp.
void KexiTableView::maximizeColumnsWidth | ( | const QValueList< int > & | columnList | ) | [slot] |
Maximizes widths of columns selected by columnList, so the horizontal header has maximum overall width. Each selected column's width will be increased by the same value. Does nothing if columnList is empty or there is no free space to resize columns. If this table view is not visible, resizing will be performed on showing.
Definition at line 2210 of file kexitableview.cpp.
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.
void KexiTableView::setHighlightedRow | ( | int | row | ) | [slot] |
Sets highlighted row number or -1 if no row has to be highlighted. Makes sense if row highlighting is enabled.
- See also:
- Appearance::rowHighlightingEnabled
Definition at line 2561 of file kexitableview.cpp.
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::ensureCellVisible | ( | int | row, | |
int | col | |||
) | [virtual, slot] |
Ensures that cell at row and col is visible. If col is -1, current column number is used. row and col (if not -1) must be between 0 and rows() (or cols() accordingly).
Implements KexiDataAwareObjectInterface.
Definition at line 1966 of file kexitableview.cpp.
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.
virtual KexiTableItem* KexiTableView::insertEmptyRow | ( | int | row = -1 |
) | [inline, virtual, slot] |
Inserts one empty row above row row. If row is -1 (the default), new row is inserted above the current row (or above 1st row if there is no current). A new item becomes current if row is -1 or if row is equal currentRow(). This method does nothing if: -inserting flag is disabled (see isInsertingEnabled()) -read-only flag is set (see isReadOnly()) \ return inserted row's data
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 320 of file kexitableview.h.
virtual void KexiTableView::startEditCurrentCell | ( | const QString & | setText = QString::null |
) | [inline, virtual, slot] |
Used when Return key is pressed on cell or "+" nav. button is clicked. Also used when we want to continue editing a cell after "invalid value" message was displayed (in this case, setText is usually not empty, what means that text will be set in the cell replacing previous value).
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 328 of file kexitableview.h.
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.
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.
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.
virtual void KexiTableView::setAcceptsRowEditAfterCellAccepting | ( | bool | set | ) | [inline, virtual, slot] |
Specifies, if this table view automatically accepts row editing (using acceptRowEdit()) on accepting any cell's edit (i.e. after acceptEditor()).
- See also:
- acceptsRowEditAfterCellAccepting()
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 350 of file kexitableview.h.
virtual void KexiTableView::setDropsAtRowEnabled | ( | bool | set | ) | [inline, virtual, slot] |
Specifies, if this table accepts dropping data on the rows. If enabled:
- dragging over row is indicated by drawing a line at bottom side of this row
- dragOverRow() signal will be emitted on dragging, -droppedAtRow() will be emitted on dropping By default this flag is set to false.
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 359 of file kexitableview.h.
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.
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)
- Todo:
- allow displaying user-defined warning
also use for other error messages
- Todo:
- validation rules for this value?
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 362 of file kexitableview.h.
virtual void KexiTableView::itemSelected | ( | KexiTableItem * | ) | [virtual, signal] |
for implementation as a signal
Implements KexiDataAwareObjectInterface.
virtual void KexiTableView::cellSelected | ( | int | col, | |
int | row | |||
) | [virtual, signal] |
for implementation as a signal
Implements KexiDataAwareObjectInterface.
virtual void KexiTableView::dataRefreshed | ( | ) | [virtual, signal] |
Data has been refreshed on-screen - emitted from initDataContents().
Implements KexiDataAwareObjectInterface.
virtual void KexiTableView::itemChanged | ( | KexiTableItem * | , | |
int | row, | |||
int | col | |||
) | [virtual, signal] |
virtual void KexiTableView::newItemAppendedForAfterDeletingInSpreadSheetMode | ( | ) | [virtual, signal] |
Emitted for spreadsheet mode when an item was deleted and a new item has been appended.
Implements KexiDataAwareObjectInterface.
void KexiTableView::sortedColumnChanged | ( | int | col | ) | [virtual, signal] |
for implementation as a signal
Implements KexiDataAwareObjectInterface.
void KexiTableView::rowEditStarted | ( | int | row | ) | [signal] |
emmited when row editing is started (for updating or inserting)
void KexiTableView::rowEditTerminated | ( | int | row | ) | [virtual, signal] |
emmited when row editing is terminated (for updating or inserting) no matter if accepted or not
Implements KexiDataAwareObjectInterface.
void KexiTableView::reloadActions | ( | ) | [virtual, signal] |
Emitted in initActions() to force reload actions You should remove existing actions and add them again.
Implements KexiDataAwareObjectInterface.
void KexiTableView::slotColumnWidthChanged | ( | int | col, | |
int | os, | |||
int | ns | |||
) | [protected, slot] |
void KexiTableView::slotUpdate | ( | ) | [protected, slot] |
Definition at line 434 of file kexitableview.cpp.
virtual void KexiTableView::sortColumnInternal | ( | int | col, | |
int | order = 0 | |||
) | [inline, protected, virtual, slot] |
implemented because we needed this as slot
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 415 of file kexitableview.h.
void KexiTableView::slotTopHeaderSizeChange | ( | int | section, | |
int | oldSize, | |||
int | newSize | |||
) | [protected, slot] |
void KexiTableView::slotEditRequested | ( | ) | [protected, slot] |
void KexiTableView::reloadData | ( | ) | [protected, virtual, slot] |
Reloads data for this widget. Handles KexiTableViewData::reloadRequested() signal.
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 1532 of file kexitableview.cpp.
void KexiTableView::slotRowRepaintRequested | ( | KexiTableItem & | item | ) | [protected, virtual, slot] |
Handles KexiTableViewData::rowRepaintRequested() signal.
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 2041 of file kexitableview.cpp.
virtual void KexiTableView::slotAboutToDeleteRow | ( | KexiTableItem & | item, | |
KexiDB::ResultInfo * | result, | |||
bool | repaint | |||
) | [inline, protected, virtual, slot] |
Handles KexiTableViewData::aboutToDeleteRow() signal. Prepares info for slotRowDeleted().
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 434 of file kexitableview.h.
virtual void KexiTableView::slotRowDeleted | ( | ) | [inline, protected, virtual, slot] |
Handles KexiTableViewData::rowDeleted() signal to repaint when needed.
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 438 of file kexitableview.h.
virtual void KexiTableView::slotRowInserted | ( | KexiTableItem * | item, | |
bool | repaint | |||
) | [inline, protected, virtual, slot] |
Handles KexiTableViewData::rowInserted() signal to repaint when needed.
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 441 of file kexitableview.h.
virtual void KexiTableView::slotRowInserted | ( | KexiTableItem * | item, | |
uint | row, | |||
bool | repaint | |||
) | [inline, protected, virtual, slot] |
Like above, not db-aware version.
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 445 of file kexitableview.h.
virtual void KexiTableView::vScrollBarValueChanged | ( | int | v | ) | [inline, protected, virtual, slot] |
Handles verticalScrollBar()'s valueChanged(int) signal. Called when vscrollbar's value has been changed.
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 450 of file kexitableview.h.
virtual void KexiTableView::vScrollBarSliderReleased | ( | ) | [inline, protected, virtual, slot] |
Handles sliderReleased() signal of the verticalScrollBar(). Used to hide the "row number" tooltip.
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 453 of file kexitableview.h.
virtual void KexiTableView::scrollBarTipTimeout | ( | ) | [inline, protected, virtual, slot] |
Handles timeout() signal of the m_scrollBarTipTimer. If the tooltip is visible, m_scrollBarTipTimerCnt is set to 0 and m_scrollBarTipTimerCnt is restarted; else the m_scrollBarTipTimerCnt is just set to 0.
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 458 of file kexitableview.h.
void KexiTableView::initDataContents | ( | ) | [protected, virtual] |
Reimplementation for KexiDataAwareObjectInterface Initializes data contents (resizes it, sets cursor at 1st row). Called on setData(). Also called once on show event after reloadRequested() signal was received from KexiTableViewData object.
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 339 of file kexitableview.cpp.
void KexiTableView::updateWidgetContentsSize | ( | ) | [protected, virtual] |
Implementation for KexiDataAwareObjectInterface. Updates widget's contents size using QScrollView::resizeContents() depending on tableSize().
Implements KexiDataAwareObjectInterface.
Definition at line 361 of file kexitableview.cpp.
void KexiTableView::clearVariables | ( | ) | [protected, virtual] |
Reimplementation for KexiDataAwareObjectInterface
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 319 of file kexitableview.cpp.
int KexiTableView::currentLocalSortingOrder | ( | ) | const [protected, virtual] |
Implementation for KexiDataAwareObjectInterface
Implements KexiDataAwareObjectInterface.
Definition at line 456 of file kexitableview.cpp.
int KexiTableView::currentLocalSortColumn | ( | ) | const [protected, virtual] |
Implementation for KexiDataAwareObjectInterface
Implements KexiDataAwareObjectInterface.
Definition at line 471 of file kexitableview.cpp.
void KexiTableView::setLocalSortingOrder | ( | int | col, | |
int | order | |||
) | [protected, virtual] |
Implementation for KexiDataAwareObjectInterface
Implements KexiDataAwareObjectInterface.
Definition at line 463 of file kexitableview.cpp.
void KexiTableView::updateGUIAfterSorting | ( | ) | [protected, virtual] |
Implementation for KexiDataAwareObjectInterface
Implements KexiDataAwareObjectInterface.
Definition at line 476 of file kexitableview.cpp.
virtual void KexiTableView::updateWidgetScrollBars | ( | ) | [inline, protected, virtual] |
Implementation for KexiDataAwareObjectInterface
Implements KexiDataAwareObjectInterface.
Definition at line 488 of file kexitableview.h.
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.
void KexiTableView::drawContents | ( | QPainter * | p, | |
int | cx, | |||
int | cy, | |||
int | cw, | |||
int | ch | |||
) | [protected] |
void KexiTableView::paintCell | ( | QPainter * | p, | |
KexiTableItem * | item, | |||
int | col, | |||
int | row, | |||
const QRect & | cr, | |||
bool | print = false | |||
) | [protected] |
Definition at line 712 of file kexitableview.cpp.
void KexiTableView::keyPressEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
Definition at line 1256 of file kexitableview.cpp.
void KexiTableView::focusOutEvent | ( | QFocusEvent * | e | ) | [protected, virtual] |
Call this from the subclass. */.
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 1607 of file kexitableview.cpp.
KexiDataItemInterface * KexiTableView::editor | ( | int | col, | |
bool | ignoreMissingEditor = false | |||
) | [protected, virtual] |
Implementation for KexiDataAwareObjectInterface
Implements KexiDataAwareObjectInterface.
Definition at line 1472 of file kexitableview.cpp.
void KexiTableView::editorShowFocus | ( | int | row, | |
int | col | |||
) | [protected, virtual] |
Implementation for KexiDataAwareObjectInterface
Implements KexiDataAwareObjectInterface.
Definition at line 1511 of file kexitableview.cpp.
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.
bool KexiTableView::shortCutPressed | ( | QKeyEvent * | e, | |
const QCString & | action_name | |||
) | [protected] |
Used in key event:
- Returns:
- true if event e should execute action action_name. Action shortcuts defined by shortCutPressed() are reused, if present, and if e matches given action's shortcut - false is returned (beause action is already performed at main window's level).
Definition at line 1224 of file kexitableview.cpp.
void KexiTableView::showContextMenu | ( | const QPoint & | pos = QPoint(-1,-1) |
) | [protected] |
Shows context menu at pos for selected cell if menu is configured, else: contextMenuRequested() signal is emmited. Method used in contentsMousePressEvent() (for right button) and keyPressEvent() for Qt::Key_Menu key. If pos is QPoint(-1,-1) (the default), menu is positioned below the current cell.
Definition at line 1124 of file kexitableview.cpp.
void KexiTableView::paintRow | ( | KexiTableItem * | item, | |
QPainter * | pb, | |||
int | r, | |||
int | rowp, | |||
int | cx, | |||
int | cy, | |||
int | colfirst, | |||
int | collast, | |||
int | maxwc | |||
) | [inline, protected] |
internal
Definition at line 538 of file kexitableview.cpp.
void KexiTableView::setupNavigator | ( | ) | [protected] |
int KexiTableView::validRowNumber | ( | const QString & | text | ) | [protected] |
internal, to determine valid row number when navigator text changed
Definition at line 2332 of file kexitableview.cpp.
void KexiTableView::removeEditor | ( | ) | [protected, virtual] |
Reimplementation for KexiDataAwareObjectInterface (viewport()->setFocus() is just added)
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 2033 of file kexitableview.cpp.
void KexiTableView::updateFonts | ( | bool | repaint = false |
) | [protected] |
virtual void KexiTableView::updateWidgetContents | ( | ) | [inline, protected, virtual] |
Updates contents of the widget. Just call update() here on your widget.
Implements KexiDataAwareObjectInterface.
Definition at line 596 of file kexitableview.h.
void KexiTableView::moveToRecordRequested | ( | uint | r | ) | [protected, virtual] |
for navigator
Implements KexiRecordNavigatorHandler.
Definition at line 2343 of file kexitableview.cpp.
void KexiTableView::copySelection | ( | ) | [protected, virtual] |
Copy current selection to a clipboard (e.g. cell).
Implements KexiDataAwareObjectInterface.
Definition at line 2375 of file kexitableview.cpp.
void KexiTableView::cutSelection | ( | ) | [protected, virtual] |
Cut current selection to a clipboard (e.g. cell).
Implements KexiDataAwareObjectInterface.
Definition at line 2392 of file kexitableview.cpp.
void KexiTableView::paste | ( | ) | [protected, virtual] |
Paste current clipboard contents (e.g. to a cell).
Implements KexiDataAwareObjectInterface.
Definition at line 2400 of file kexitableview.cpp.
void KexiTableView::updateAllVisibleRowsBelow | ( | int | row | ) | [protected, virtual] |
Used in KexiDataAwareObjectInterface::slotRowDeleted() to repaint tow row and all visible below.
Reimplemented from KexiDataAwareObjectInterface.
Definition at line 414 of file kexitableview.cpp.
bool KexiTableView::getVisibleLookupValue | ( | QVariant & | cellValue, | |
KexiTableEdit * | edit, | |||
KexiTableItem * | item, | |||
KexiTableViewColumn * | tvcol | |||
) | const [protected] |
Sets cellValue if there is a lookup value for the cell item. Used in KexiTableView::paintCell() and KexiTableViewCellToolTip::maybeTip()
- Returns:
- true is cellValue has been found.
useDefaultValueIfPossible
Definition at line 2010 of file kexitableview.cpp.
The documentation for this class was generated from the following files: