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 void cancelEditor ()
virtual void refreshContentsSize ()

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 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 ()

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 ()

Protected Member Functions

virtual void clearColumnsInternal (bool repaint)
virtual void addHeaderColumn (const QString &caption, const QString &description, 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 updateRow (int row)
virtual void updateWidgetContents ()
virtual void updateWidgetContentsSize ()
virtual void updateWidgetScrollBars ()
KexiDBFormdbFormWidget () const
virtual void valueChanged (KexiDataItemInterface *item)
virtual bool cursorAtNewRow ()
virtual void selectCellInternal ()
virtual void initDataContents ()
virtual void updateAfterCancelRowEdit ()
virtual void updateAfterAcceptRowEdit ()

Protected Attributes

KFormDesigner::Formm_form
int m_currentLocalSortColumn
int m_localSortingOrder
KexiTableItemm_previousItem

Member Function Documentation

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

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 163 of file kexiformscrollview.cpp.

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

Reverts current editor's value to old one.

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 471 of file kexiformscrollview.cpp.

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

for implementation as a signal

Implements KexiDataAwareObjectInterface.

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

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 157 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 465 of file kexiformscrollview.cpp.

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 399 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 (data-aware widgets, see KexiFormScrollView::columns()), so columns() can return greater number than dataColumns().

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 385 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 202 of file kexiformscrollview.cpp.

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

Implementation for KexiDataAwareObjectInterface.

Implements KexiDataAwareObjectInterface.

Definition at line 178 of file kexiformscrollview.cpp.

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

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 172 of file kexiformscrollview.cpp.

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

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

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

Implements KexiDataAwareObjectInterface.

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

Implementation for KexiDataAwareObjectInterface.

Implements KexiDataAwareObjectInterface.

Definition at line 262 of file kexiformscrollview.cpp.

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

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 306 of file kexiformscrollview.cpp.

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

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 109 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 77 of file kexiformscrollview.h.

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 450 of file kexiformscrollview.cpp.

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

signals

Implements KexiDataAwareObjectInterface.

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

for implementation as a signal

Implements KexiDataAwareObjectInterface.

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

Implements KexiRecordNavigatorHandler.

Definition at line 145 of file kexiformscrollview.cpp.

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

Implements KexiRecordNavigatorHandler.

Definition at line 127 of file kexiformscrollview.cpp.

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

Implements KexiRecordNavigatorHandler.

Definition at line 139 of file kexiformscrollview.cpp.

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

Implements KexiRecordNavigatorHandler.

Definition at line 133 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 121 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 505 of file kexiformscrollview.cpp.

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.

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

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

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 155 of file kexiformscrollview.h.

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

for implementation as a signal

Implements KexiDataAwareObjectInterface.

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

Implementation for KexiDataAwareObjectInterface.

Returns:
arbitraty value of 10.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 90 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 96 of file kexiformscrollview.cpp.

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

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 183 of file kexiformscrollview.cpp.

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

Reimplemented to update resize policy.

Definition at line 66 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 137 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 141 of file kexiformscrollview.h.

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 367 of file kexiformscrollview.cpp.

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 360 of file kexiformscrollview.cpp.

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

Handles KexiTableViewData::rowRepaintRequested() signal.

Todo:

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 343 of file kexiformscrollview.cpp.

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

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 375 of file kexiformscrollview.cpp.

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

Implementation for KexiDataAwareObjectInterface.

Todo:

Reimplemented from KexiDataAwareObjectInterface.

Definition at line 190 of file kexiformscrollview.cpp.

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

for implementation as a signal

Implements KexiDataAwareObjectInterface.

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

Implementation for KexiDataAwareObjectInterface Redraws specified cell.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 315 of file kexiformscrollview.cpp.

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

Implementation for KexiDataAwareObjectInterface.

Todo:

Implements KexiDataAwareObjectInterface.

Definition at line 197 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 322 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 328 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 333 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 338 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 427 of file kexiformscrollview.cpp.


Member Data Documentation

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

Definition at line 247 of file kexiformscrollview.h.


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