KexiDataAwareObjectInterface Class Reference
#include <kexidataawareobjectiface.h>
Inheritance diagram for KexiDataAwareObjectInterface:

Detailed Description
This interface is implemented by KexiTableView and KexiFormView and used by KexiDataAwareView.If yu're implementing this interface, add KEXI_DATAAWAREOBJECTINTERFACE convenience macro just after Q_OBJECT.
You should add following code to your destructor so data is deleted:
This is not performed in KexiDataAwareObjectInterface because you may need to access m_data in your desctructor.
Definition at line 67 of file kexidataawareobjectiface.h.
Public Types | |
| enum | DeletionPolicy { NoDelete = 0, AskDelete = 1, ImmediateDelete = 2, SignalDelete = 3 } |
Public Member Functions | |
| KexiDataAwareObjectInterface () | |
| virtual | ~KexiDataAwareObjectInterface () |
| void | setData (KexiTableViewData *data, bool owner=true) |
| KexiTableViewData * | data () const |
| int | currentColumn () const |
| int | currentRow () const |
| virtual int | lastVisibleRow () const =0 |
| KexiTableItem * | selectedItem () const |
| int | rows () const |
| virtual int | columns () const |
| int | dataColumns () const |
| virtual bool | isReadOnly () const |
| void | setReadOnly (bool set) |
| bool | isSortingEnabled () const |
| virtual void | setSorting (int col, bool ascending=true) |
| virtual void | setSortingEnabled (bool set) |
| int | dataSortedColumn () const |
| int | dataSortingOrder () const |
| virtual bool | sort () |
| void | sortAscending () |
| void | sortDescending () |
| virtual bool | isInsertingEnabled () const |
| void | setInsertingEnabled (bool set) |
| bool | isDeleteEnabled () const |
| bool | isEmptyRowInsertingEnabled () const |
| void | setEmptyRowInsertingEnabled (bool set) |
| virtual void | setFilteringEnabled (bool set) |
| bool | isFilteringEnabled () const |
| virtual void | setSpreadSheetMode () |
| bool | spreadSheetMode () const |
| bool | rowEditing () const |
| DeletionPolicy | deletionPolicy () const |
| virtual void | setDeletionPolicy (DeletionPolicy policy) |
| virtual void | deleteCurrentRow () |
| virtual KexiTableItem * | insertEmptyRow (int row=-1) |
| virtual bool | beforeDeleteItem (KexiTableItem *item) |
| bool | deleteItem (KexiTableItem *item) |
| void | insertItem (KexiTableItem *newItem, int row=-1) |
| tristate | deleteAllRows (bool ask=false, bool repaint=true) |
| virtual int | rowsPerPage () const =0 |
| virtual void | selectRow (int row) |
| virtual void | selectNextRow () |
| virtual void | selectPrevRow () |
| virtual void | selectNextPage () |
| page down action | |
| virtual void | selectPrevPage () |
| page up action | |
| virtual void | selectFirstRow () |
| virtual void | selectLastRow () |
| virtual void | addNewRecordRequested () |
| virtual void | clearSelection () |
| virtual void | setCursorPosition (int row, int col=-1, bool forceSet=false) |
| virtual void | ensureCellVisible (int row, int col)=0 |
| virtual void | setAcceptsRowEditAfterCellAccepting (bool set) |
| bool | acceptsRowEditAfterCellAccepting () const |
| bool | dropsAtRowEnabled () const |
| virtual void | setDropsAtRowEnabled (bool set) |
| KexiDataItemInterface * | editor () const |
| virtual bool | cancelRowEdit () |
| virtual bool | acceptRowEdit () |
| virtual void | removeEditor () |
| virtual bool | cancelEditor () |
| virtual bool | acceptEditor () |
| Accepst changes made to the currently active editor. | |
| virtual void | createEditor (int row, int col, const QString &addText=QString::null, bool removeOld=false)=0 |
| Creates editors and shows it, what usually means the beginning of a cell editing. | |
| virtual void | startEditCurrentCell (const QString &setText=QString::null) |
| virtual void | deleteAndStartEditCurrentCell () |
| KexiTableItem * | itemAt (int row) const |
| virtual KexiTableViewColumn * | column (int col) |
| virtual int | fieldNumberForColumn (int col) |
| bool | hasDefaultValueAt (const KexiTableViewColumn &tvcol) |
| const QVariant * | bufferedValueAt (int col, bool useDefaultValueIfPossible=true) |
| int | columnType (int col) |
| QVariant | columnDefaultValue (int col) const |
| virtual bool | columnEditable (int col) |
| virtual void | updateCurrentCell ()=0 |
| KexiRecordMarker * | verticalHeader () const |
| virtual void | itemChanged (KexiTableItem *, int row, int col)=0 |
| signals | |
| virtual void | itemChanged (KexiTableItem *, int row, int col, QVariant oldValue)=0 |
| virtual void | itemDeleteRequest (KexiTableItem *, int row, int col)=0 |
| virtual void | currentItemDeleteRequest ()=0 |
| virtual void | newItemAppendedForAfterDeletingInSpreadSheetMode ()=0 |
| Emitted for spreadsheet mode when an item was deleted and a new item has been appended. | |
| virtual void | dataRefreshed ()=0 |
| virtual void | dataSet (KexiTableViewData *data)=0 |
| KPopupMenu * | contextMenu () const |
| bool | contextMenuEnabled () const |
| void | setContextMenuEnabled (bool set) |
| bool | scrollbarToolTipsEnabled () const |
| void | setScrollbarToolTipsEnabled (bool set) |
| void | startEditOrToggleValue () |
| bool | newRowEditing () const |
| virtual void | boolToggled () |
| virtual void | connectCellSelectedSignal (const QObject *receiver, const char *intIntMember)=0 |
| virtual void | connectRowEditStartedSignal (const QObject *receiver, const char *intMember)=0 |
| virtual void | connectRowEditTerminatedSignal (const QObject *receiver, const char *voidMember)=0 |
| virtual void | connectReloadActionsSignal (const QObject *receiver, const char *voidMember)=0 |
| virtual void | connectDataSetSignal (const QObject *receiver, const char *kexiTableViewDataMember)=0 |
| virtual void | connectToReloadDataSlot (const QObject *sender, const char *voidSignal)=0 |
| virtual void | slotDataDestroying () |
| virtual void | copySelection ()=0 |
| Copy current selection to a clipboard (e.g. cell). | |
| virtual void | cutSelection ()=0 |
| Cut current selection to a clipboard (e.g. cell). | |
| virtual void | paste ()=0 |
| Paste current clipboard contents (e.g. to a cell). | |
| virtual QScrollBar * | verticalScrollBar () const =0 |
| virtual bool | handleKeyPress (QKeyEvent *e, int &curRow, int &curCol, bool fullRowSelection, bool *moveToFirstField=0, bool *moveToLastField=0) |
Protected Member Functions | |
| virtual void | initDataContents () |
| virtual void | clearColumns (bool repaint=true) |
| virtual void | clearColumnsInternal (bool repaint)=0 |
| virtual void | addHeaderColumn (const QString &caption, const QString &description, const QIconSet &icon, int size)=0 |
| virtual int | currentLocalSortingOrder () const =0 |
| virtual int | currentLocalSortColumn () const =0 |
| virtual void | setLocalSortingOrder (int col, int order)=0 |
| virtual void | sortColumnInternal (int col, int order=0) |
| virtual void | updateGUIAfterSorting ()=0 |
| virtual void | reloadActions ()=0 |
| virtual void | reloadData () |
| virtual void | itemSelected (KexiTableItem *)=0 |
| virtual void | cellSelected (int col, int row)=0 |
| virtual void | sortedColumnChanged (int col)=0 |
| virtual void | rowEditTerminated (int row)=0 |
| virtual void | clearVariables () |
| virtual KexiDataItemInterface * | editor (int col, bool ignoreMissingEditor=false)=0 |
| virtual void | editorShowFocus (int row, int col)=0 |
| virtual void | updateCell (int row, int col)=0 |
| virtual void | updateRow (int row)=0 |
| virtual void | updateWidgetContents ()=0 |
| virtual void | updateWidgetContentsSize ()=0 |
| virtual void | updateWidgetScrollBars ()=0 |
| virtual void | updateAfterCancelRowEdit () |
| virtual void | updateAfterAcceptRowEdit () |
| 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 | slotRowsDeleted (const QValueList< int > &) |
| bool | hasData () const |
| for sanity checks (return true if m_data is present; else: outputs warning) | |
| virtual void | selectCellInternal () |
| virtual void | updateAllVisibleRowsBelow (int row) |
| virtual void | focusOutEvent (QFocusEvent *e) |
| Call this from the subclass. */. | |
| virtual void | vScrollBarValueChanged (int v) |
| virtual void | vScrollBarSliderReleased () |
| virtual void | scrollBarTipTimeout () |
| int | showErrorMessageForResult (KexiDB::ResultInfo *resultInfo) |
Protected Attributes | |
| KexiTableViewData * | m_data |
| data structure displayed for this object | |
| bool | m_owner: 1 |
| true if m_data member is owned by this object | |
| int | m_curRow |
| cursor position | |
| int | m_curCol |
| cursor position | |
| KexiTableItem * | m_currentItem |
| current data item | |
| KexiTableViewData::Iterator * | m_itemIterator |
| data item's iterator | |
| KexiTableItem * | m_insertItem |
| item data for inserting | |
| bool | m_rowEditing: 1 |
| when (current or new) row is edited - changed field values are temporary stored here | |
| bool | m_newRowEditing: 1 |
| bool | m_isSortingEnabled: 1 |
| bool | m_isFilteringEnabled: 1 |
| bool | m_acceptsRowEditAfterCellAccepting: 1 |
| bool | m_inside_acceptEditor: 1 |
| bool | m_internal_acceptsRowEditAfterCellAccepting: 1 |
| bool | m_emptyRowInsertingEnabled: 1 |
| int | m_readOnly |
| bool | m_contentsMousePressEvent_dblClick: 1 |
| int | m_insertingEnabled |
| bool | m_initDataContentsOnShow: 1 |
| bool | m_cursorPositionSetExplicityBeforeShow: 1 |
| bool | m_spreadSheetMode: 1 |
| bool | m_dropsAtRowEnabled: 1 |
| bool | m_updateEntireRowWhenMovingToOtherRow: 1 |
| DeletionPolicy | m_deletionPolicy |
| KexiRecordMarker * | m_verticalHeader |
| KexiTableViewHeader * | m_horizontalHeader |
| KexiDataItemInterface * | m_editor |
| KexiRecordNavigator * | m_navPanel |
| main navigation widget | |
| bool | m_navPanelEnabled: 1 |
| bool | m_verticalHeaderAlreadyAdded: 1 |
| int | m_dragIndicatorLine |
| KPopupMenu * | m_popupMenu |
| bool | m_contextMenuEnabled: 1 |
| bool | m_alsoUpdateNextRow: 1 |
| Used by updateAfterCancelRowEdit(). | |
| int | m_rowWillBeDeleted |
| QGuardedPtr< KexiArrowTip > | m_errorMessagePopup |
| bool | m_vScrollBarValueChanged_enabled: 1 |
| bool | m_scrollbarToolTipsEnabled: 1 |
| QLabel * | m_scrollBarTip |
| scrollbar tooltip | |
| QTimer | m_scrollBarTipTimer |
| scrollbar tooltip's timer | |
| uint | m_scrollBarTipTimerCnt |
| helper for timeout counting (scrollbar tooltip) | |
Member Enumeration Documentation
|
|
Definition at line 223 of file kexidataawareobjectiface.h. |
Constructor & Destructor Documentation
|
|
|
Definition at line 93 of file kexidataawareobjectiface.cpp. References m_insertItem, m_itemIterator, and m_scrollBarTip. |
Member Function Documentation
|
|
|
|
Definition at line 319 of file kexidataawareobjectiface.h. |
|
||||||||||||||||||||
|
Implemented in KexiFormScrollView, and KexiTableView. Referenced by setData(). |
|
|
Reimplemented in KexiFormScrollView, and KexiTableView. Definition at line 1641 of file kexidataawareobjectiface.cpp. References acceptRowEdit(), isInsertingEnabled(), m_editor, m_rowEditing, rows(), selectRow(), KexiDataItemInterface::setFocus(), and startEditCurrentCell(). Referenced by KexiTableView::addNewRecordRequested(), KexiFormScrollView::addNewRecordRequested(), and KexiDataAwareView::slotGoToNewRow(). |
|
|
For reimplementation: called by deleteItem(). If returns false, deleting is aborted. Default implementation just returns true. Definition at line 1514 of file kexidataawareobjectiface.cpp. Referenced by deleteItem(). |
|
|
Reaction on toggling a boolean value of a cell: we're starting to edit the cell and inverting it's state. Definition at line 1618 of file kexidataawareobjectiface.cpp. References acceptEditor(), KexiDataItemInterface::clickedOnContents(), m_curCol, m_curRow, m_editor, startEditCurrentCell(), and updateCell(). Referenced by KexiTableView::contentsMousePressEvent(), KexiTableView::keyPressEvent(), and startEditOrToggleValue(). |
|
||||||||||||
|
Definition at line 1568 of file kexidataawareobjectiface.cpp. References column(), KexiTableViewColumn::columnInfo, KexiTableViewColumn::field(), fieldNumberForColumn(), KexiTableViewColumn::isDBAware, m_currentItem, m_data, m_rowEditing, and KexiTableViewData::rowEditBuffer(). Referenced by KexiTableView::createEditor(), and KexiTableView::paintCell(). |
|
|
Cancels changes made to the currently active editor. Reverts the editor's value to old one.
Reimplemented in KexiFormScrollView, and KexiTableView. Definition at line 875 of file kexidataawareobjectiface.cpp. References m_editor, m_errorMessagePopup, and removeEditor(). Referenced by acceptEditor(), KexiTableView::cancelEditor(), KexiFormScrollView::cancelEditor(), and cancelRowEdit(). |
|
|
Cancels row editing All changes made to the editing row during this current session will be undone.
Reimplemented in KexiTableView. Definition at line 810 of file kexidataawareobjectiface.cpp. References cancelEditor(), KexiTableViewData::clearRowEditBuffer(), hasData(), kexidbg, m_alsoUpdateNextRow, m_currentItem, m_curRow, m_data, m_insertItem, m_newRowEditing, m_rowEditing, m_verticalHeader, KexiTableViewData::removeLast(), rowEditTerminated(), KexiRecordMarker::setEditRow(), updateAfterCancelRowEdit(), updateWidgetContents(), and updateWidgetContentsSize(). Referenced by acceptEditor(), acceptRowEdit(), KexiTableView::cancelRowEdit(), KexiDataAwareView::cancelRowEdit(), clearColumns(), deleteAllRows(), deleteCurrentRow(), and setData(). |
|
||||||||||||
|
for implementation as a signal Implemented in KexiFormScrollView, and KexiTableView. Referenced by setCursorPosition(). |
|
|
Clears columns information and thus all internal table data and its visible representation. Repaints widget if repaint is true. Definition at line 1361 of file kexidataawareobjectiface.cpp. References cancelRowEdit(), clearColumnsInternal(), KexiTableViewData::clearInternal(), m_data, and updateWidgetContents(). Referenced by KexiDataTableView::setData(). |
|
|
Called by clearColumns() to clear internals of the object. For example, KexiTableView removes contents of it's horizontal header. Implemented in KexiFormScrollView, and KexiTableView. Referenced by clearColumns(), and setData(). |
|
|
Clears current selection. Current row and column will be now unspecified: currentRow(), currentColumn() will return -1, and selectedItem() will return null. Definition at line 484 of file kexidataawareobjectiface.cpp. References m_curCol, m_currentItem, m_curRow, m_navPanel, KexiRecordNavigator::setCurrentRecordNumber(), and updateRow(). |
|
|
Clear temporary members like the pointer to current editor. If you reimplement this method, don't forget to call this one. Reimplemented in KexiTableView. Definition at line 102 of file kexidataawareobjectiface.cpp. References m_curCol, m_currentItem, m_curRow, m_editor, m_newRowEditing, and m_rowEditing. Referenced by KexiTableView::clearVariables(), KexiDataAwareObjectInterface(), reloadData(), and setData(). |
|
|
Reimplemented in KexiFormScrollView. Definition at line 1555 of file kexidataawareobjectiface.cpp. References KexiTableViewData::column(), and m_data. Referenced by acceptEditor(), bufferedValueAt(), columnEditable(), columnType(), and KexiTableViewCellToolTip::maybeTip(). |
|
|
Definition at line 1452 of file kexidataawareobjectiface.cpp. |
|
|
Reimplemented in KexiFormScrollView. Definition at line 1432 of file kexidataawareobjectiface.cpp. References column(), KexiTableViewColumn::isReadOnly(), and m_data. Referenced by KexiFormScrollView::columnEditable(), KexiTableView::contentsMouseDoubleClickEvent(), KexiTableView::contentsMousePressEvent(), deleteAndStartEditCurrentCell(), KexiTableView::keyPressEvent(), startEditCurrentCell(), and startEditOrToggleValue(). |
|
|
Reimplemented in KexiFormScrollView. Definition at line 106 of file kexidataawareobjectiface.h. Referenced by acceptEditor(), acceptRowEdit(), KexiTableView::adjustColumnWidthToContents(), KexiTableView::drawContents(), KexiTableView::editor(), handleKeyPress(), KexiTableView::keyPressEvent(), KexiTableView::minimumSizeHint(), KexiTableView::paintRow(), KexiTableView::print(), reloadData(), KexiTableView::setColumnWidth(), setCursorPosition(), and KexiTableView::tableSize(). |
|
|
Definition at line 1426 of file kexidataawareobjectiface.cpp. References column(), KexiTableViewColumn::field(), KexiDB::Field::InvalidType, and m_data. Referenced by KexiTableView::adjustColumnWidthToContents(), KexiTableView::contentsMouseDoubleClickEvent(), KexiTableView::contentsMousePressEvent(), KexiTableView::keyPressEvent(), and startEditOrToggleValue(). |
|
||||||||||||
|
Referenced by KexiDataAwareView::init(), and KexiDataAwarePropertySet::KexiDataAwarePropertySet(). |
|
||||||||||||
|
Referenced by KexiDataAwarePropertySet::KexiDataAwarePropertySet(). |
|
||||||||||||
|
Referenced by KexiDataAwareView::init(). |
|
||||||||||||
|
Referenced by KexiDataAwareView::init(). |
|
||||||||||||
|
Referenced by KexiDataAwareView::init(). |
|
||||||||||||
|
Referenced by setData(). |
|
|
Definition at line 421 of file kexidataawareobjectiface.h. Referenced by KexiTableDesignerView::KexiTableDesignerView(), and KexiDataAwareView::reloadActions(). |
|
|
Definition at line 425 of file kexidataawareobjectiface.h. |
|
|
Copy current selection to a clipboard (e.g. cell).
Implemented in KexiFormScrollView, and KexiTableView. Referenced by KexiDataAwareView::copySelection(). |
|
||||||||||||||||||||
|
Creates editors and shows it, what usually means the beginning of a cell editing.
Implemented in KexiFormScrollView, and KexiTableView. Referenced by deleteAndStartEditCurrentCell(), and startEditCurrentCell(). |
|
|
Definition at line 85 of file kexidataawareobjectiface.h. Referenced by acceptRowEdit(), KexiMacro::NavigateAction::activate(), KexiTableView::adjustColumnWidthToContents(), KexiTableViewCellToolTip::maybeTip(), KexiDataAwareView::reloadActions(), sortAscending(), and sortDescending(). |
|
|
Implemented in KexiFormScrollView, and KexiTableView. Referenced by deleteCurrentRow(). |
|
|
Implemented in KexiFormScrollView, and KexiTableView. |
|
|
Implemented in KexiFormScrollView, and KexiTableView. Referenced by sortColumnInternal(). |
|
|
|
Cut current selection to a clipboard (e.g. cell).
Implemented in KexiFormScrollView, and KexiTableView. Referenced by KexiDataAwareView::cutSelection(). |
|
|
