kexi

KexiFormScrollView Class Reference

#include <kexiformscrollview.h>

Inheritance diagram for KexiFormScrollView:

KexiScrollView KexiRecordNavigatorHandler KexiSharedActionClient KexiDataAwareObjectInterface KexiFormDataProvider KexiFormEventHandler KexiDataItemChangesListener List of all members.

Detailed Description

KexiFormScrollView class provides a widget for displaying data in a form view.

This class also implements:

See also:
KexiTableView

Definition at line 41 of file kexiformscrollview.h.


Public Slots

virtual void show ()
virtual int rowsPerPage () const
virtual void ensureCellVisible (int row, int col)
virtual void moveToRecordRequested (uint r)
virtual void moveToLastRecordRequested ()
virtual void moveToPreviousRecordRequested ()
virtual void moveToNextRecordRequested ()
virtual void moveToFirstRecordRequested ()
virtual void addNewRecordRequested ()
virtual bool cancelEditor ()
virtual void refreshContentsSize ()
virtual void vScrollBarValueChanged (int v)
virtual void vScrollBarSliderReleased ()
virtual void scrollBarTipTimeout ()

Signals

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 ()
virtual void dataRefreshed ()
virtual void dataSet (KexiTableViewData *data)
virtual void itemSelected (KexiTableItem *)
virtual void cellSelected (int col, int row)
virtual void sortedColumnChanged (int col)
virtual void rowEditStarted (int row)
virtual void rowEditTerminated (int row)
virtual void reloadActions ()

Public Member Functions

 KexiFormScrollView (QWidget *parent, bool preview)
virtual ~KexiFormScrollView ()
void setForm (KFormDesigner::Form *form)
virtual bool columnEditable (int col)
virtual int columns () const
virtual KexiTableViewColumncolumn (int col)
virtual int fieldNumberForColumn (int col)
void beforeSwitchView ()
virtual int lastVisibleRow () const
virtual QScrollBar * verticalScrollBar () const

Protected Slots

void slotResizingStarted ()
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 slotRowsDeleted (const QValueList< int > &)
virtual void slotDataDestroying ()
virtual void reloadData ()
virtual void copySelection ()
virtual void cutSelection ()
virtual void paste ()

Protected Member Functions

virtual void clearColumnsInternal (bool repaint)
virtual void addHeaderColumn (const QString &caption, const QString &description, const QIconSet &icon, int width)
virtual int currentLocalSortingOrder () const
virtual int currentLocalSortColumn () const
virtual void setLocalSortingOrder (int col, int order)
void sortColumnInternal (int col, int order=0)
virtual void updateGUIAfterSorting ()
virtual void createEditor (int row, int col, const QString &addText=QString::null, bool removeOld=false)
virtual KexiDataItemInterfaceeditor (int col, bool ignoreMissingEditor=false)
virtual void editorShowFocus (int row, int col)
virtual void updateCell (int row, int col)
virtual void updateCurrentCell ()
virtual void updateRow (int row)
virtual void updateWidgetContents ()
virtual void updateWidgetContentsSize ()
virtual void updateWidgetScrollBars ()
KexiDBFormdbFormWidget () const
virtual void valueChanged (KexiDataItemInterface *item)
virtual bool cursorAtNewRow () const
virtual void selectCellInternal ()
virtual void initDataContents ()
virtual void updateAfterCancelRowEdit ()
virtual void updateAfterAcceptRowEdit ()
void handleDataWidgetAction (const QString &actionName)
bool shouldDisplayDefaultValueForItem (KexiFormDataItemInterface *itemIface) const

Protected Attributes

KFormDesigner::Formm_form
int m_currentLocalSortColumn
int m_localSortingOrder
KexiTableItemm_previousItem

Member Function Documentation

bool KexiFormScrollView::columnEditable ( int  col  )  [virtual]

Reimplemented from KexiDataAwareObjectInterface for checking 'readOnly' flag from a widget ('readOnly' flag from data member is still checked though).

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 401 of file kexiformscrollview.cpp.

int KexiFormScrollView::columns (  )  const [virtual]

Returns:
number of visible columns in this view. There can be a number of duplicated columns defined, so columns() can return greater or smaller number than dataColumns().

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 387 of file kexiformscrollview.cpp.

KexiTableViewColumn * KexiFormScrollView::column ( int  col  )  [virtual]

Returns:
column information for column number col. Reimplemented for KexiDataAwareObjectInterface: column data corresponding to widget number is used here (see fieldNumberForColumn()).

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 472 of file kexiformscrollview.cpp.

virtual int KexiFormScrollView::fieldNumberForColumn ( int  col  )  [inline, virtual]

Returns:
field number within data model connected to a data-aware widget at column col.

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 76 of file kexiformscrollview.h.

int KexiFormScrollView::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. Implemented for KexiDataAwareObjectInterface.
Todo:
unimplemented for now, this will be used for continuous forms

Todo:
unimplemented for now, this will be used for continuous forms

Implements KexiDataAwareObjectInterface.

Definition at line 581 of file kexiformscrollview.cpp.

virtual QScrollBar* KexiFormScrollView::verticalScrollBar (  )  const [inline, virtual]

Returns:
vertical scrollbar. Implemented for KexiDataAwareObjectInterface.

Implements KexiDataAwareObjectInterface.

Definition at line 96 of file kexiformscrollview.h.

void KexiFormScrollView::show (  )  [virtual, slot]

Reimplemented to update resize policy.

Definition at line 67 of file kexiformscrollview.cpp.

int KexiFormScrollView::rowsPerPage (  )  const [virtual, slot]

Implementation for KexiDataAwareObjectInterface.

Returns:
arbitraty value of 10.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 91 of file kexiformscrollview.cpp.

void KexiFormScrollView::ensureCellVisible ( int  row,
int  col 
) [virtual, slot]

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 111 of file kexiformscrollview.cpp.

void KexiFormScrollView::moveToRecordRequested ( uint  r  )  [virtual, slot]

Moving to record r is requested. Records are counted from 0.

Implements KexiRecordNavigatorHandler.

Definition at line 123 of file kexiformscrollview.cpp.

void KexiFormScrollView::moveToLastRecordRequested (  )  [virtual, slot]

Implements KexiRecordNavigatorHandler.

Definition at line 129 of file kexiformscrollview.cpp.

void KexiFormScrollView::moveToPreviousRecordRequested (  )  [virtual, slot]

Implements KexiRecordNavigatorHandler.

Definition at line 135 of file kexiformscrollview.cpp.

void KexiFormScrollView::moveToNextRecordRequested (  )  [virtual, slot]

Implements KexiRecordNavigatorHandler.

Definition at line 141 of file kexiformscrollview.cpp.

void KexiFormScrollView::moveToFirstRecordRequested (  )  [virtual, slot]

Implements KexiRecordNavigatorHandler.

Definition at line 147 of file kexiformscrollview.cpp.

bool KexiFormScrollView::cancelEditor (  )  [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 486 of file kexiformscrollview.cpp.

void KexiFormScrollView::refreshContentsSize (  )  [virtual, slot]

Reimplemented to also clear command history right after final resize.

Reimplemented from KexiScrollView.

Definition at line 542 of file kexiformscrollview.cpp.

virtual void KexiFormScrollView::vScrollBarValueChanged ( int  v  )  [inline, virtual, slot]

Handles verticalScrollBar()'s valueChanged(int) signal. Called when vscrollbar's value has been changed.

Todo:
unused for now, will be used for continuous forms

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 130 of file kexiformscrollview.h.

virtual void KexiFormScrollView::vScrollBarSliderReleased (  )  [inline, virtual, slot]

Handles sliderReleased() signal of the verticalScrollBar(). Used to hide the "row number" tooltip.

Todo:
unused for now, will be used for continuous forms

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 134 of file kexiformscrollview.h.

virtual void KexiFormScrollView::scrollBarTipTimeout (  )  [inline, 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.

Todo:
unused for now, will be used for continuous forms

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 140 of file kexiformscrollview.h.

virtual void KexiFormScrollView::itemChanged ( KexiTableItem ,
int  row,
int  col 
) [virtual, signal]

signals

Implements KexiDataAwareObjectInterface.

virtual void KexiFormScrollView::newItemAppendedForAfterDeletingInSpreadSheetMode (  )  [virtual, signal]

does nothing

Implements KexiDataAwareObjectInterface.

virtual void KexiFormScrollView::dataRefreshed (  )  [virtual, signal]

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

Implements KexiDataAwareObjectInterface.

virtual void KexiFormScrollView::itemSelected ( KexiTableItem  )  [virtual, signal]

for implementation as a signal

Implements KexiDataAwareObjectInterface.

virtual void KexiFormScrollView::cellSelected ( int  col,
int  row 
) [virtual, signal]

for implementation as a signal

Implements KexiDataAwareObjectInterface.

virtual void KexiFormScrollView::sortedColumnChanged ( int  col  )  [virtual, signal]

for implementation as a signal

Implements KexiDataAwareObjectInterface.

virtual void KexiFormScrollView::rowEditTerminated ( int  row  )  [virtual, signal]

for implementation as a signal

Implements KexiDataAwareObjectInterface.

virtual void KexiFormScrollView::reloadActions (  )  [virtual, signal]

Emitted in initActions() to force reload actions You should remove existing actions and add them again. Define and emit reloadActions() signal here.

Implements KexiDataAwareObjectInterface.

void KexiFormScrollView::slotRowRepaintRequested ( KexiTableItem item  )  [protected, virtual, slot]

Handles KexiTableViewData::rowRepaintRequested() signal.

Todo:

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 345 of file kexiformscrollview.cpp.

virtual void KexiFormScrollView::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 164 of file kexiformscrollview.h.

virtual void KexiFormScrollView::slotRowDeleted (  )  [inline, protected, virtual, slot]

Handles KexiTableViewData::rowDeleted() signal to repaint when needed.

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 168 of file kexiformscrollview.h.

void KexiFormScrollView::slotRowInserted ( KexiTableItem item,
bool  repaint 
) [protected, virtual, slot]

Handles KexiTableViewData::rowInserted() signal to repaint when needed.

Todo:

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 362 of file kexiformscrollview.cpp.

void KexiFormScrollView::slotRowInserted ( KexiTableItem item,
uint  row,
bool  repaint 
) [protected, virtual, slot]

Like above, not db-aware version.

Todo:

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 369 of file kexiformscrollview.cpp.

void KexiFormScrollView::slotRowsDeleted ( const QValueList< int > &   )  [protected, virtual, slot]

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 377 of file kexiformscrollview.cpp.

virtual void KexiFormScrollView::reloadData (  )  [inline, protected, virtual, slot]

Reloads data for this widget. Handles KexiTableViewData::reloadRequested() signal.

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 182 of file kexiformscrollview.h.

void KexiFormScrollView::copySelection (  )  [protected, virtual, slot]

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

Implements KexiDataAwareObjectInterface.

Definition at line 566 of file kexiformscrollview.cpp.

void KexiFormScrollView::cutSelection (  )  [protected, virtual, slot]

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

Implements KexiDataAwareObjectInterface.

Definition at line 571 of file kexiformscrollview.cpp.

void KexiFormScrollView::paste (  )  [protected, virtual, slot]

Paste current clipboard contents (e.g. to a cell).

Implements KexiDataAwareObjectInterface.

Definition at line 576 of file kexiformscrollview.cpp.

void KexiFormScrollView::clearColumnsInternal ( bool  repaint  )  [protected, virtual]

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 153 of file kexiformscrollview.cpp.

void KexiFormScrollView::addHeaderColumn ( const QString &  caption,
const QString &  description,
const QIconSet &  icon,
int  width 
) [protected, virtual]

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 159 of file kexiformscrollview.cpp.

int KexiFormScrollView::currentLocalSortingOrder (  )  const [protected, virtual]

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 170 of file kexiformscrollview.cpp.

int KexiFormScrollView::currentLocalSortColumn (  )  const [protected, virtual]

Implementation for KexiDataAwareObjectInterface.

Implements KexiDataAwareObjectInterface.

Definition at line 176 of file kexiformscrollview.cpp.

void KexiFormScrollView::setLocalSortingOrder ( int  col,
int  order 
) [protected, virtual]

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 181 of file kexiformscrollview.cpp.

void KexiFormScrollView::sortColumnInternal ( int  col,
int  order = 0 
) [protected, virtual]

Implementation for KexiDataAwareObjectInterface.

Todo:

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 188 of file kexiformscrollview.cpp.

void KexiFormScrollView::updateGUIAfterSorting (  )  [protected, virtual]

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 195 of file kexiformscrollview.cpp.

void KexiFormScrollView::createEditor ( int  row,
int  col,
const QString &  addText = QString::null,
bool  removeOld = false 
) [protected, virtual]

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 200 of file kexiformscrollview.cpp.

KexiDataItemInterface * KexiFormScrollView::editor ( int  col,
bool  ignoreMissingEditor = false 
) [protected, virtual]

Implementation for KexiDataAwareObjectInterface.

Implements KexiDataAwareObjectInterface.

Definition at line 260 of file kexiformscrollview.cpp.

void KexiFormScrollView::editorShowFocus ( int  row,
int  col 
) [protected, virtual]

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 304 of file kexiformscrollview.cpp.

void KexiFormScrollView::updateCell ( int  row,
int  col 
) [protected, virtual]

Implementation for KexiDataAwareObjectInterface Redraws specified cell.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 313 of file kexiformscrollview.cpp.

void KexiFormScrollView::updateCurrentCell (  )  [protected, virtual]

Redraws the current cell. Implemented after KexiDataAwareObjectInterface.

Implements KexiDataAwareObjectInterface.

Definition at line 320 of file kexiformscrollview.cpp.

void KexiFormScrollView::updateRow ( int  row  )  [protected, virtual]

Implementation for KexiDataAwareObjectInterface Redraws all cells of specified row.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 324 of file kexiformscrollview.cpp.

void KexiFormScrollView::updateWidgetContents (  )  [protected, virtual]

Implementation for KexiDataAwareObjectInterface Updates contents of the widget. Just call update() here on your widget.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 330 of file kexiformscrollview.cpp.

void KexiFormScrollView::updateWidgetContentsSize (  )  [protected, virtual]

Implementation for KexiDataAwareObjectInterface Implementation for KexiDataAwareObjectInterface Updates widget's contents size e.g. using QScrollView::resizeContents().

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 335 of file kexiformscrollview.cpp.

void KexiFormScrollView::updateWidgetScrollBars (  )  [protected, virtual]

Implementation for KexiDataAwareObjectInterface Updates scrollbars of the widget. QScrollView::updateScrollbars() will be usually called here.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 340 of file kexiformscrollview.cpp.

void KexiFormScrollView::valueChanged ( KexiDataItemInterface item  )  [protected, virtual]

Reimplemented from KexiFormDataProvider. Reaction for change of item.

Reimplemented from KexiFormDataProvider.

Definition at line 429 of file kexiformscrollview.cpp.

bool KexiFormScrollView::cursorAtNewRow (  )  const [protected, virtual]

Reimplemented from KexiFormDataProvider.

Returns:
information whether we're currently at new row or now. This can be used e.g. by data-aware widgets to determine if "(autonumber)" label should be displayed.

Reimplemented from KexiFormDataProvider.

Definition at line 450 of file kexiformscrollview.cpp.

void KexiFormScrollView::selectCellInternal (  )  [inline, protected, virtual]

Implementation for KexiDataAwareObjectInterface Called by KexiDataAwareObjectInterface::setCursorPosition() if cursor's position is really changed.

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 97 of file kexiformscrollview.cpp.

void KexiFormScrollView::initDataContents (  )  [protected, virtual]

Reimplementation: used to refresh "editing indicator" visibility.

Todo:
here we can react if user wanted to show the navigator

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 455 of file kexiformscrollview.cpp.


Member Data Documentation

Used in selectCellInternal() to avoid fetching the same record twice.

Definition at line 294 of file kexiformscrollview.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys