kexi

#include <kexidataawareobjectiface.h>

Inheritance diagram for KexiDataAwareObjectInterface:
KexiFormScrollView KexiTableView KexiDataTableView

Classes

class  PositionOfValue
 

Public Types

enum  DeletionPolicy { NoDelete = 0 , AskDelete = 1 , ImmediateDelete = 2 , SignalDelete = 3 }
 

Public Member Functions

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 ()
 
virtual void selectPrevPage ()
 
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 ()
 
virtual void createEditor (int row, int col, const TQString &addText=TQString(), bool removeOld=false)=0
 
virtual void startEditCurrentCell (const TQString &setText=TQString())
 
virtual void deleteAndStartEditCurrentCell ()
 
KexiTableItem * itemAt (int row) const
 
virtual KexiTableViewColumn * column (int col)
 
virtual int fieldNumberForColumn (int col)
 
bool hasDefaultValueAt (const KexiTableViewColumn &tvcol)
 
const TQVariant * bufferedValueAt (int col, bool useDefaultValueIfPossible=true)
 
int columnType (int col)
 
TQVariant 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
 
virtual void itemChanged (KexiTableItem *, int row, int col, TQVariant oldValue)=0
 
virtual void itemDeleteRequest (KexiTableItem *, int row, int col)=0
 
virtual void currentItemDeleteRequest ()=0
 
virtual void newItemAppendedForAfterDeletingInSpreadSheetMode ()=0
 
virtual void dataRefreshed ()=0
 
virtual void dataSet (KexiTableViewData *data)=0
 
TDEPopupMenu * 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 TQObject *receiver, const char *intIntMember)=0
 
virtual void connectRowEditStartedSignal (const TQObject *receiver, const char *intMember)=0
 
virtual void connectRowEditTerminatedSignal (const TQObject *receiver, const char *voidMember)=0
 
virtual void connectReloadActionsSignal (const TQObject *receiver, const char *voidMember)=0
 
virtual void connectDataSetSignal (const TQObject *receiver, const char *kexiTableViewDataMember)=0
 
virtual void connectToReloadDataSlot (const TQObject *sender, const char *voidSignal)=0
 
virtual void slotDataDestroying ()
 
virtual void copySelection ()=0
 
virtual void cutSelection ()=0
 
virtual void paste ()=0
 
virtual tristate find (const TQVariant &valueToFind, const KexiSearchAndReplaceViewInterface::Options &options, bool next)
 
virtual tristate findNextAndReplace (const TQVariant &valueToFind, const TQVariant &replacement, const KexiSearchAndReplaceViewInterface::Options &options, bool replaceAll)
 
virtual TQScrollBar * verticalScrollBar () const =0
 
virtual bool handleKeyPress (TQKeyEvent *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 TQString &caption, const TQString &description, const TQIconSet &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)
 
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 TQValueList< int > &)
 
bool hasData () const
 
virtual void selectCellInternal ()
 
virtual void updateAllVisibleRowsBelow (int row)
 
virtual void focusOutEvent (TQFocusEvent *e)
 
virtual void vScrollBarValueChanged (int v)
 
virtual void vScrollBarSliderReleased ()
 
virtual void scrollBarTipTimeout ()
 
int showErrorMessageForResult (KexiDB::ResultInfo *resultInfo)
 
void updateIndicesForVisibleValues ()
 

Protected Attributes

KexiTableViewData * m_data
 
bool m_owner: 1
 
int m_curRow
 
int m_curCol
 
KexiTableItem * m_currentItem
 
KexiTableViewData::Iterator * m_itemIterator
 
KexiTableItem * m_insertItem
 
bool m_rowEditing: 1
 
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
 
bool m_navPanelEnabled: 1
 
bool m_verticalHeaderAlreadyAdded: 1
 
int m_dragIndicatorLine
 
TDEPopupMenu * m_popupMenu
 
bool m_contextMenuEnabled: 1
 
bool m_alsoUpdateNextRow: 1
 
int m_rowWillBeDeleted
 
TQGuardedPtr< KexiArrowTip > m_errorMessagePopup
 
bool m_vScrollBarValueChanged_enabled: 1
 
bool m_scrollbarToolTipsEnabled: 1
 
TQLabel * m_scrollBarTip
 
TQTimer m_scrollBarTipTimer
 
uint m_scrollBarTipTimerCnt
 
PositionOfValue m_positionOfRecentlyFoundValue
 
TQVariant m_recentlySearchedValue
 
KexiSearchAndReplaceViewInterface::Options::SearchDirection m_recentSearchDirection
 
TQValueVector< uint > m_indicesForVisibleValues
 

Detailed Description

The KexiDataAwareObjectInterface is an interface for record-based data object.

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 TQ_OBJECT.

You should add following code to your destructor so data is deleted:

if (m_owner)
delete m_data;
m_data = 0;
KexiTableViewData * m_data
data structure displayed for this object
bool m_owner
true if m_data member is owned by this object

This is not performed in KexiDataAwareObjectInterface because you may need to access m_data in your desctructor.

Definition at line 68 of file kexidataawareobjectiface.h.

Member Enumeration Documentation

◆ DeletionPolicy

enum KexiDataAwareObjectInterface::DeletionPolicy

Definition at line 224 of file kexidataawareobjectiface.h.

Constructor & Destructor Documentation

◆ KexiDataAwareObjectInterface()

KexiDataAwareObjectInterface::KexiDataAwareObjectInterface ( )

Definition at line 45 of file kexidataawareobjectiface.cpp.

◆ ~KexiDataAwareObjectInterface()

KexiDataAwareObjectInterface::~KexiDataAwareObjectInterface ( )
virtual

Definition at line 94 of file kexidataawareobjectiface.cpp.

Member Function Documentation

◆ acceptEditor()

bool KexiDataAwareObjectInterface::acceptEditor ( )
virtual

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
Todo:
Todo:
also use for other error messages
Todo:
validation rules for this value?

Definition at line 906 of file kexidataawareobjectiface.cpp.

◆ acceptRowEdit()

bool KexiDataAwareObjectInterface::acceptRowEdit ( )
virtual

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

Definition at line 694 of file kexidataawareobjectiface.cpp.

◆ acceptsRowEditAfterCellAccepting()

bool KexiDataAwareObjectInterface::acceptsRowEditAfterCellAccepting ( ) const
inline
Returns
true, if this object automatically accepts row editing (using acceptRowEdit()) on accepting any cell's edit (i.e. after acceptEditor()). By default this flag is set to false. Not that if the query for this table has given constraints defined, like NOT NULL / NOT EMPTY for more than one field - editing a record would be impossible for the flag set to true, because of constraints violation. However, setting this flag to true can be useful especially for not-db-aware data set (it's used e.g. in Kexi Alter Table's field editor).

Definition at line 320 of file kexidataawareobjectiface.h.

◆ addHeaderColumn()

virtual void KexiDataAwareObjectInterface::addHeaderColumn ( const TQString &  caption,
const TQString &  description,
const TQIconSet &  icon,
int  size 
)
protectedpure virtual

Implemented in KexiTableView, and KexiFormScrollView.

◆ addNewRecordRequested()

void KexiDataAwareObjectInterface::addNewRecordRequested ( )
virtual

Definition at line 1648 of file kexidataawareobjectiface.cpp.

◆ beforeDeleteItem()

bool KexiDataAwareObjectInterface::beforeDeleteItem ( KexiTableItem *  item)
virtual

For reimplementation: called by deleteItem(). If returns false, deleting is aborted. Default implementation just returns true.

Definition at line 1521 of file kexidataawareobjectiface.cpp.

◆ boolToggled()

void KexiDataAwareObjectInterface::boolToggled ( )
virtual

Reaction on toggling a boolean value of a cell: we're starting to edit the cell and inverting it's state.

Definition at line 1625 of file kexidataawareobjectiface.cpp.

◆ bufferedValueAt()

const TQVariant * KexiDataAwareObjectInterface::bufferedValueAt ( int  col,
bool  useDefaultValueIfPossible = true 
)

Definition at line 1575 of file kexidataawareobjectiface.cpp.

◆ cancelEditor()

bool KexiDataAwareObjectInterface::cancelEditor ( )
virtual

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)

Definition at line 881 of file kexidataawareobjectiface.cpp.

◆ cancelRowEdit()

bool KexiDataAwareObjectInterface::cancelRowEdit ( )
virtual

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)
Todo:
(js): cancel changes for this row!

Definition at line 816 of file kexidataawareobjectiface.cpp.

◆ cellSelected()

virtual void KexiDataAwareObjectInterface::cellSelected ( int  col,
int  row 
)
protectedpure virtual

for implementation as a signal

◆ clearColumns()

void KexiDataAwareObjectInterface::clearColumns ( bool  repaint = true)
protectedvirtual

Clears columns information and thus all internal table data and its visible representation. Repaints widget if repaint is true.

Definition at line 1367 of file kexidataawareobjectiface.cpp.

◆ clearColumnsInternal()

virtual void KexiDataAwareObjectInterface::clearColumnsInternal ( bool  repaint)
protectedpure virtual

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

Implemented in KexiFormScrollView.

◆ clearSelection()

void KexiDataAwareObjectInterface::clearSelection ( )
virtual

Clears current selection. Current row and column will be now unspecified: currentRow(), currentColumn() will return -1, and selectedItem() will return null.

Definition at line 486 of file kexidataawareobjectiface.cpp.

◆ clearVariables()

void KexiDataAwareObjectInterface::clearVariables ( )
protectedvirtual

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 103 of file kexidataawareobjectiface.cpp.

◆ column()

KexiTableViewColumn * KexiDataAwareObjectInterface::column ( int  col)
virtual
Returns
column information for column number col. Default implementation just returns column # col, but for Kexi Forms column data corresponding to widget number is used here (see KexiFormScrollView::fieldNumberForColumn()).

Reimplemented in KexiFormScrollView.

Definition at line 1562 of file kexidataawareobjectiface.cpp.

◆ columnDefaultValue()

TQVariant KexiDataAwareObjectInterface::columnDefaultValue ( int  col) const
Returns
default value for column col

Definition at line 1459 of file kexidataawareobjectiface.cpp.

◆ columnEditable()

bool KexiDataAwareObjectInterface::columnEditable ( int  col)
virtual
Returns
true is column col is editable. Default implementation takes information about 'readOnly' flag from data member. Within forms, this is reimplemented for checking 'readOnly' flag from a widget ('readOnly' flag from data member is still checked though).

Reimplemented in KexiFormScrollView.

Definition at line 1439 of file kexidataawareobjectiface.cpp.

◆ columns()

virtual int KexiDataAwareObjectInterface::columns ( ) const
inlinevirtual
Returns
number of visible columns in this view. By default returns dataColumns(), what is proper table view. In case of form 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 in KexiFormScrollView.

Definition at line 107 of file kexidataawareobjectiface.h.

◆ columnType()

int KexiDataAwareObjectInterface::columnType ( int  col)
Returns
a type of column col - one of KexiDB::Field::Type

Definition at line 1433 of file kexidataawareobjectiface.cpp.

◆ contextMenu()

TDEPopupMenu * KexiDataAwareObjectInterface::contextMenu ( ) const
inline
Returns
a pointer to context menu. This can be used to plug some actions there.

Definition at line 422 of file kexidataawareobjectiface.h.

◆ contextMenuEnabled()

bool KexiDataAwareObjectInterface::contextMenuEnabled ( ) const
inline
Returns
true if the context menu is enabled (visible) for the view. True by default.

Definition at line 426 of file kexidataawareobjectiface.h.

◆ copySelection()

virtual void KexiDataAwareObjectInterface::copySelection ( )
pure virtual

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

Implemented in KexiTableView.

◆ createEditor()

virtual void KexiDataAwareObjectInterface::createEditor ( int  row,
int  col,
const TQString &  addText = TQString(),
bool  removeOld = false 
)
pure virtual

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

Implemented in KexiFormScrollView, and KexiTableView.

◆ currentColumn()

int KexiDataAwareObjectInterface::currentColumn ( ) const
inline
Returns
currently selected column number or -1.

Definition at line 86 of file kexidataawareobjectiface.h.

◆ currentLocalSortColumn()

virtual int KexiDataAwareObjectInterface::currentLocalSortColumn ( ) const
protectedpure virtual

Implemented in KexiFormScrollView, and KexiTableView.

◆ currentLocalSortingOrder()

virtual int KexiDataAwareObjectInterface::currentLocalSortingOrder ( ) const
protectedpure virtual

Implemented in KexiFormScrollView, and KexiTableView.

◆ currentRow()

int KexiDataAwareObjectInterface::currentRow ( ) const
inline
Returns
currently selected row number or -1.

Definition at line 89 of file kexidataawareobjectiface.h.

◆ cutSelection()

virtual void KexiDataAwareObjectInterface::cutSelection ( )
pure virtual

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

Implemented in KexiTableView.

◆ data()

KexiTableViewData * KexiDataAwareObjectInterface::data ( ) const
inline
Returns
data structure displayed for this object

Definition at line 83 of file kexidataawareobjectiface.h.

◆ dataColumns()

int KexiDataAwareObjectInterface::dataColumns ( ) const

Helper function.

Returns
number of columns of data.

Definition at line 1452 of file kexidataawareobjectiface.cpp.

◆ dataRefreshed()

virtual void KexiDataAwareObjectInterface::dataRefreshed ( )
pure virtual

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

◆ dataSortedColumn()

int KexiDataAwareObjectInterface::dataSortedColumn ( ) const
Returns
sorted column number or -1 if no column is sorted within data. This does not mean that any sorting has been performed within GUI of this object, because the data could be changed in the meantime outside of this GUI object.

Definition at line 273 of file kexidataawareobjectiface.cpp.

◆ dataSortingOrder()

int KexiDataAwareObjectInterface::dataSortingOrder ( ) const
Returns
1 if ascending order for data sorting data is set, -1 for descending, 0 for no sorting. This does not mean that any sorting has been performed within GUI of this objetct, because the data could be changed in the meantime outside of this GUI object.

Definition at line 280 of file kexidataawareobjectiface.cpp.

◆ deleteAllRows()

tristate KexiDataAwareObjectInterface::deleteAllRows ( bool  ask = false,
bool  repaint = true 
)

Clears entire table data, its visible representation and deletes data at database backend (if this is db-aware object). Does not clear columns information. Does not destroy KexiTableViewData object (if present) but only clears its contents. Displays confirmation dialog if ask is true (the default is false). Repaints widget if repaint is true (the default). For empty tables, true is returned immediately. If isDeleteEnabled() is false, false is returned. For spreadsheet mode all current rows are just replaced by empty rows.

Returns
true on success, false on failure, and cancelled if user cancelled deletion (only possible if ask is true).

Definition at line 1320 of file kexidataawareobjectiface.cpp.

◆ deleteAndStartEditCurrentCell()

void KexiDataAwareObjectInterface::deleteAndStartEditCurrentCell ( )
virtual

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

Definition at line 1169 of file kexidataawareobjectiface.cpp.

◆ deleteCurrentRow()

void KexiDataAwareObjectInterface::deleteCurrentRow ( )
virtual

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

Definition at line 1193 of file kexidataawareobjectiface.cpp.

◆ deleteItem()

bool KexiDataAwareObjectInterface::deleteItem ( KexiTableItem *  item)

Deletes item. Used by deleteCurrentRow(). Calls beforeDeleteItem() before deleting, to double-check if deleting is allowed.

Returns
true on success.

Definition at line 1527 of file kexidataawareobjectiface.cpp.

◆ deletionPolicy()

DeletionPolicy KexiDataAwareObjectInterface::deletionPolicy ( ) const
inline
Returns
deletion policy for this object. The default (after allocating) is AskDelete.

Definition at line 234 of file kexidataawareobjectiface.h.

◆ dropsAtRowEnabled()

bool KexiDataAwareObjectInterface::dropsAtRowEnabled ( ) const
inline
Returns
true, if this table accepts dropping data on the rows.

Definition at line 323 of file kexidataawareobjectiface.h.

◆ editor() [1/2]

KexiDataItemInterface * KexiDataAwareObjectInterface::editor ( ) const
inline
Returns
currently used data (field/cell) editor or 0 if there is no data editing.

Definition at line 334 of file kexidataawareobjectiface.h.

◆ editor() [2/2]

virtual KexiDataItemInterface * KexiDataAwareObjectInterface::editor ( int  col,
bool  ignoreMissingEditor = false 
)
protectedpure virtual

Implemented in KexiFormScrollView, and KexiTableView.

◆ editorShowFocus()

virtual void KexiDataAwareObjectInterface::editorShowFocus ( int  row,
int  col 
)
protectedpure virtual

Updates editor's position, size and shows its focus (not the editor!) for row and col, using editor(). Does nothing if editor not found.

Implemented in KexiFormScrollView, and KexiTableView.

◆ ensureCellVisible()

virtual void KexiDataAwareObjectInterface::ensureCellVisible ( int  row,
int  col 
)
pure virtual

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

◆ fieldNumberForColumn()

virtual int KexiDataAwareObjectInterface::fieldNumberForColumn ( int  col)
inlinevirtual
Returns
field number within data model connected to a data-aware widget at column col. Can return -1 if there's no such column.

Reimplemented in KexiFormScrollView.

Definition at line 385 of file kexidataawareobjectiface.h.

◆ find()

tristate KexiDataAwareObjectInterface::find ( const TQVariant &  valueToFind,
const KexiSearchAndReplaceViewInterface::Options &  options,
bool  next 
)
virtual

Finds valueToFind within the data items options are used to control the process. Selection is moved to found value. If next is true, "find next" is performed, else "find previous" is performed.

Searching behaviour also depends on status of the previous search: for every search, position of the cells containing the found value is stored internally by the data-aware interface (not in options). Moreover, position (start, end) of the found value is also stored. Thus, the subsequent search will reuse this information to be able to start searching exactly after the previously found value (or before for "find previous" option). The flags can be zeroed, what will lead to seaching from the first character of the current item (cell).

Returns
true if value has been found, false if value has not been found, and cancelled if there is nothing to find or there is no data to search in.
Todo:
for regexp lastCharacter should be computed

Definition at line 1965 of file kexidataawareobjectiface.cpp.

◆ findNextAndReplace()

tristate KexiDataAwareObjectInterface::findNextAndReplace ( const TQVariant &  valueToFind,
const TQVariant &  replacement,
const KexiSearchAndReplaceViewInterface::Options &  options,
bool  replaceAll 
)
virtual

Finds valueToFind within the data items and replaces with replacement options are used to control the process.

Returns
true if value has been found and replaced, false if value has not been found and replaced, and cancelled if there is nothing to find or there is no data to search in or the data is read only. If replaceAll is true, all found values are replaced.
Todo:
implement KexiDataAwareObjectInterface::findAndReplace()

Definition at line 2094 of file kexidataawareobjectiface.cpp.

◆ focusOutEvent()

void KexiDataAwareObjectInterface::focusOutEvent ( TQFocusEvent *  e)
protectedvirtual

Call this from the subclass. *‍/.

Reimplemented in KexiTableView.

Definition at line 1822 of file kexidataawareobjectiface.cpp.

◆ handleKeyPress()

bool KexiDataAwareObjectInterface::handleKeyPress ( TQKeyEvent *  e,
int &  curRow,
int &  curCol,
bool  fullRowSelection,
bool *  moveToFirstField = 0,
bool *  moveToLastField = 0 
)
virtual

Used in KexiTableView::keyPressEvent() (and in continuous forms).

Returns
true when the key press event was consumed. You should also check e->isAccepted(), if it's true, nothing should be done; if it is false, you should call setCursorPosition() for the altered curCol and curRow variables.

If moveToFirstField is not 0, *moveToFirstField will be set to true when the cursor should be moved to the first field (in tab order) and to false otherwise. If moveToLastField is not 0, *moveToLastField will be set to true when the cursor should be moved to the last field (in tab order) and to false otherwise. Note for forms: if moveToFirstField and moveToLastField are not 0, curCol is altered after calling this method, so setCursorPosition() will set to the index of an appropriate column (field). This is needed because field widgets can be inserted and ordered in custom tab order, so the very first field in the data source can be other than the very first field in the form.

Used by KexiTableView::keyPressEvent() and KexiTableView::keyPressEvent().

Definition at line 1663 of file kexidataawareobjectiface.cpp.

◆ hasData()

bool KexiDataAwareObjectInterface::hasData ( ) const
inlineprotected

for sanity checks (return true if m_data is present; else: outputs warning)

Definition at line 874 of file kexidataawareobjectiface.h.

◆ hasDefaultValueAt()

bool KexiDataAwareObjectInterface::hasDefaultValueAt ( const KexiTableViewColumn &  tvcol)

Definition at line 1567 of file kexidataawareobjectiface.cpp.

◆ initDataContents()

void KexiDataAwareObjectInterface::initDataContents ( )
protectedvirtual

Reimplementation for KexiDataAwareObjectInterface. Initializes data contents (resizes it, sets cursor at 1st row). Sets record count for record navigator. Sets cursor positin (using setCursorPosition()) to first row or sets (-1, -1) position if no rows are available. Called on setData(). Also called once on show event after refreshRequested() signal was received from KexiTableViewData object.

Reimplemented in KexiFormScrollView, and KexiTableView.

Definition at line 214 of file kexidataawareobjectiface.cpp.

◆ insertEmptyRow()

KexiTableItem * KexiDataAwareObjectInterface::insertEmptyRow ( int  row = -1)
virtual

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

Definition at line 1230 of file kexidataawareobjectiface.cpp.

◆ insertItem()

void KexiDataAwareObjectInterface::insertItem ( KexiTableItem *  newItem,
int  row = -1 
)

Inserts newItem at row. -1 means current row. Used by insertEmptyRow().

Definition at line 1241 of file kexidataawareobjectiface.cpp.

◆ isDeleteEnabled()

bool KexiDataAwareObjectInterface::isDeleteEnabled ( ) const
Returns
true if row deleting is enabled. Equal to deletionPolicy() != NoDelete && !isReadOnly()).

Definition at line 382 of file kexidataawareobjectiface.cpp.

◆ isEmptyRowInsertingEnabled()

bool KexiDataAwareObjectInterface::isEmptyRowInsertingEnabled ( ) const
inline
Returns
true if inserting empty rows are enabled (false by default). Mostly usable for not db-aware objects (e.g. used in Kexi Alter Table). Note, that if inserting is disabled, or the data set is read-only, this flag will be ignored.

Definition at line 198 of file kexidataawareobjectiface.h.

◆ isFilteringEnabled()

bool KexiDataAwareObjectInterface::isFilteringEnabled ( ) const
inline
Returns
true if filtering is enabled.

Definition at line 208 of file kexidataawareobjectiface.h.

◆ isInsertingEnabled()

bool KexiDataAwareObjectInterface::isInsertingEnabled ( ) const
virtual
Returns
true if data inserting is enabled (the default).

Definition at line 366 of file kexidataawareobjectiface.cpp.

◆ isReadOnly()

bool KexiDataAwareObjectInterface::isReadOnly ( ) const
virtual
Returns
true if data represented by this object is not editable (it can be editable with other ways although, outside of this object).

Definition at line 404 of file kexidataawareobjectiface.cpp.

◆ isSortingEnabled()

bool KexiDataAwareObjectInterface::isSortingEnabled ( ) const
inline
Returns
true if sorting is enabled.

Definition at line 134 of file kexidataawareobjectiface.h.

◆ itemAt()

KexiTableItem * KexiDataAwareObjectInterface::itemAt ( int  row) const
inline

Definition at line 881 of file kexidataawareobjectiface.h.

◆ itemChanged()

virtual void KexiDataAwareObjectInterface::itemChanged ( KexiTableItem *  ,
int  row,
int  col 
)
pure virtual

signals

◆ itemSelected()

virtual void KexiDataAwareObjectInterface::itemSelected ( KexiTableItem *  )
protectedpure virtual

for implementation as a signal

◆ lastVisibleRow()

virtual int KexiDataAwareObjectInterface::lastVisibleRow ( ) const
pure 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 in KexiFormScrollView, and KexiTableView.

◆ newItemAppendedForAfterDeletingInSpreadSheetMode()

virtual void KexiDataAwareObjectInterface::newItemAppendedForAfterDeletingInSpreadSheetMode ( )
pure virtual

Emitted for spreadsheet mode when an item was deleted and a new item has been appended.

◆ newRowEditing()

bool KexiDataAwareObjectInterface::newRowEditing ( ) const
inline
Returns
true if new row is edited; implies: rowEditing==true.

Definition at line 443 of file kexidataawareobjectiface.h.

◆ paste()

virtual void KexiDataAwareObjectInterface::paste ( )
pure virtual

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

Implemented in KexiTableView.

◆ reloadActions()

virtual void KexiDataAwareObjectInterface::reloadActions ( )
protectedpure virtual

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

◆ reloadData()

void KexiDataAwareObjectInterface::reloadData ( )
protectedvirtual

Reloads data for this object.

Definition at line 1403 of file kexidataawareobjectiface.cpp.

◆ removeEditor()

void KexiDataAwareObjectInterface::removeEditor ( )
virtual

Reimplemented in KexiTableView.

Definition at line 873 of file kexidataawareobjectiface.cpp.

◆ rowEditing()

bool KexiDataAwareObjectInterface::rowEditing ( ) const
inline
Returns
true if currently selected row is edited.

Definition at line 222 of file kexidataawareobjectiface.h.

◆ rowEditTerminated()

virtual void KexiDataAwareObjectInterface::rowEditTerminated ( int  row)
protectedpure virtual

for implementation as a signal

◆ rows()

int KexiDataAwareObjectInterface::rows ( ) const
Returns
number of rows in this view.

Definition at line 1445 of file kexidataawareobjectiface.cpp.

◆ rowsPerPage()

virtual int KexiDataAwareObjectInterface::rowsPerPage ( ) const
pure virtual
Returns
maximum number of rows that can be displayed per one "page" for current view's size.

Implemented in KexiTableView.

◆ scrollBarTipTimeout()

void KexiDataAwareObjectInterface::scrollBarTipTimeout ( )
protectedvirtual

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.

Definition at line 1808 of file kexidataawareobjectiface.cpp.

◆ scrollbarToolTipsEnabled()

bool KexiDataAwareObjectInterface::scrollbarToolTipsEnabled ( ) const
Returns
true if vertical scrollbar's tooltips are enabled (true by default).

Definition at line 1792 of file kexidataawareobjectiface.cpp.

◆ selectCellInternal()

virtual void KexiDataAwareObjectInterface::selectCellInternal ( )
inlineprotectedvirtual

Only needed for forms: called by KexiDataAwareObjectInterface::setCursorPosition() if cursor's position is really changed.

Reimplemented in KexiFormScrollView.

Definition at line 675 of file kexidataawareobjectiface.h.

◆ selectedItem()

KexiTableItem * KexiDataAwareObjectInterface::selectedItem ( ) const
inline
Returns
currently selected item (row data) or null.

Definition at line 97 of file kexidataawareobjectiface.h.

◆ selectFirstRow()

void KexiDataAwareObjectInterface::selectFirstRow ( )
virtual

Definition at line 463 of file kexidataawareobjectiface.cpp.

◆ selectLastRow()

void KexiDataAwareObjectInterface::selectLastRow ( )
virtual

Definition at line 468 of file kexidataawareobjectiface.cpp.

◆ selectNextPage()

void KexiDataAwareObjectInterface::selectNextPage ( )
virtual

page down action

Definition at line 453 of file kexidataawareobjectiface.cpp.

◆ selectNextRow()

void KexiDataAwareObjectInterface::selectNextRow ( )
virtual

Definition at line 441 of file kexidataawareobjectiface.cpp.

◆ selectPrevPage()

void KexiDataAwareObjectInterface::selectPrevPage ( )
virtual

page up action

Definition at line 446 of file kexidataawareobjectiface.cpp.

◆ selectPrevRow()

void KexiDataAwareObjectInterface::selectPrevRow ( )
virtual

Definition at line 481 of file kexidataawareobjectiface.cpp.

◆ selectRow()

void KexiDataAwareObjectInterface::selectRow ( int  row)
virtual

Definition at line 474 of file kexidataawareobjectiface.cpp.

◆ setAcceptsRowEditAfterCellAccepting()

void KexiDataAwareObjectInterface::setAcceptsRowEditAfterCellAccepting ( bool  set)
virtual

Specifies, if this object automatically accepts row editing (using acceptRowEdit()) on accepting any cell's edit (i.e. after acceptEditor()).

See also
acceptsRowEditAfterCellAccepting()

Definition at line 1466 of file kexidataawareobjectiface.cpp.

◆ setContextMenuEnabled()

void KexiDataAwareObjectInterface::setContextMenuEnabled ( bool  set)
inline

Enables or disables the context menu for the view.

Definition at line 429 of file kexidataawareobjectiface.h.

◆ setCursorPosition()

void KexiDataAwareObjectInterface::setCursorPosition ( int  row,
int  col = -1,
bool  forceSet = false 
)
virtual

Moves cursor to row and col. If col is -1, current column number is used. If forceSet is true, cursor position is updated even if row and col doesn't differ from actual position.

Definition at line 499 of file kexidataawareobjectiface.cpp.

◆ setData()

void KexiDataAwareObjectInterface::setData ( KexiTableViewData *  data,
bool  owner = true 
)

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?

Definition at line 114 of file kexidataawareobjectiface.cpp.

◆ setDeletionPolicy()

void KexiDataAwareObjectInterface::setDeletionPolicy ( DeletionPolicy  policy)
virtual

Definition at line 387 of file kexidataawareobjectiface.cpp.

◆ setDropsAtRowEnabled()

void KexiDataAwareObjectInterface::setDropsAtRowEnabled ( bool  set)
virtual

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.

Definition at line 1471 of file kexidataawareobjectiface.cpp.

◆ setEmptyRowInsertingEnabled()

void KexiDataAwareObjectInterface::setEmptyRowInsertingEnabled ( bool  set)

Sets emptyRowInserting flag. Note, that if inserting is disabled, this flag is ignored.

Definition at line 1486 of file kexidataawareobjectiface.cpp.

◆ setFilteringEnabled()

void KexiDataAwareObjectInterface::setFilteringEnabled ( bool  set)
virtual

Enables or disables filtering. Filtering is enabled by default.

Definition at line 377 of file kexidataawareobjectiface.cpp.

◆ setInsertingEnabled()

void KexiDataAwareObjectInterface::setInsertingEnabled ( bool  set)

Sets insertingEnabled flag. If true, empty row is available at the end of this widget for new entering new data. Unless the flag is set, the widget inherits insertingEnabled flag from it's data structure assigned with setData(). The default value if false.

Note: it is not allowed to force insertingEnabled on when internal data has insertingEnabled set off - in that case the method does nothing. You can check internal data flag calling data()->insertingEnabled().

Setting this flag to true will have no effect if read-only flag is true.

See also
setReadOnly()

Definition at line 415 of file kexidataawareobjectiface.cpp.

◆ setLocalSortingOrder()

virtual void KexiDataAwareObjectInterface::setLocalSortingOrder ( int  col,
int  order 
)
protectedpure virtual

Implemented in KexiFormScrollView, and KexiTableView.

◆ setReadOnly()

void KexiDataAwareObjectInterface::setReadOnly ( bool  set)

Sets readOnly flag for this object. Unless the flag is set, the widget inherits readOnly flag from it's data structure assigned with setData(). The default value if false.

This method is useful when you need to switch on the flag indepentently from the data structure. Note: it is not allowed to force readOnly off when internal data is readOnly - in that case the method does nothing. You can check internal data flag calling data()->isReadOnly().

If set is true, insertingEnabled flag will be cleared automatically.

See also
isInsertingEnabled()

Definition at line 393 of file kexidataawareobjectiface.cpp.

◆ setScrollbarToolTipsEnabled()

void KexiDataAwareObjectInterface::setScrollbarToolTipsEnabled ( bool  set)

Enables or disables vertical scrollbar's tooltip.

Definition at line 1797 of file kexidataawareobjectiface.cpp.

◆ setSorting()

void KexiDataAwareObjectInterface::setSorting ( int  col,
bool  ascending = true 
)
virtual

Sets sorting on column col, or (when col == -1) sets rows unsorted this will do not work if sorting is disabled with setSortingEnabled()

Definition at line 264 of file kexidataawareobjectiface.cpp.

◆ setSortingEnabled()

void KexiDataAwareObjectInterface::setSortingEnabled ( bool  set)
virtual

Enables or disables sorting for this object This method is different that setSorting() because it prevents both user and programmer from sorting by clicking a column's header or calling setSorting(). By default sorting is enabled.

Definition at line 256 of file kexidataawareobjectiface.cpp.

◆ setSpreadSheetMode()

void KexiDataAwareObjectInterface::setSpreadSheetMode ( )
virtual

Added for convenience: configure this object to behave more like spreadsheet (it's used for things like alter-table view).

Reimplemented in KexiTableView.

Definition at line 430 of file kexidataawareobjectiface.cpp.

◆ showErrorMessageForResult()

int KexiDataAwareObjectInterface::showErrorMessageForResult ( KexiDB::ResultInfo *  resultInfo)
protected

Shows error message box suitable for resultInfo. This can be "sorry" or "detailedSorry" message box or "queryYesNo" if resultInfo->allowToDiscardChanges is true.

Returns
code of button clicked: KMessageBox::Ok in case of "sorry" or "detailedSorry" messages and KMessageBox::Yes or KMessageBox::No in case of "queryYesNo" message.

Definition at line 1831 of file kexidataawareobjectiface.cpp.

◆ slotAboutToDeleteRow()

void KexiDataAwareObjectInterface::slotAboutToDeleteRow ( KexiTableItem &  item,
KexiDB::ResultInfo *  result,
bool  repaint 
)
protectedvirtual

Handles KexiTableViewData::aboutToDeleteRow() signal. Prepares info for slotRowDeleted().

Definition at line 1492 of file kexidataawareobjectiface.cpp.

◆ slotDataDestroying()

void KexiDataAwareObjectInterface::slotDataDestroying ( )
virtual

Definition at line 1642 of file kexidataawareobjectiface.cpp.

◆ slotRowDeleted()

void KexiDataAwareObjectInterface::slotRowDeleted ( )
protectedvirtual

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

Definition at line 1500 of file kexidataawareobjectiface.cpp.

◆ slotRowInserted() [1/2]

void KexiDataAwareObjectInterface::slotRowInserted ( KexiTableItem *  item,
bool  repaint 
)
protectedvirtual

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

Definition at line 1284 of file kexidataawareobjectiface.cpp.

◆ slotRowInserted() [2/2]

void KexiDataAwareObjectInterface::slotRowInserted ( KexiTableItem *  item,
uint  row,
bool  repaint 
)
protectedvirtual

Like above, not db-aware version.

Definition at line 1290 of file kexidataawareobjectiface.cpp.

◆ slotRowRepaintRequested()

virtual void KexiDataAwareObjectInterface::slotRowRepaintRequested ( KexiTableItem &  item)
inlineprotectedvirtual

Handles KexiTableViewData::rowRepaintRequested() signal.

Definition at line 653 of file kexidataawareobjectiface.h.

◆ slotRowsDeleted()

virtual void KexiDataAwareObjectInterface::slotRowsDeleted ( const TQValueList< int > &  )
inlineprotectedvirtual

Definition at line 668 of file kexidataawareobjectiface.h.

◆ sort()

bool KexiDataAwareObjectInterface::sort ( )
virtual

Sorts all rows by column selected with setSorting(). If there is currently row edited, it is accepted. If acception failed, sort() will return false.

Returns
true on success.

Definition at line 285 of file kexidataawareobjectiface.cpp.

◆ sortAscending()

void KexiDataAwareObjectInterface::sortAscending ( )

Sorts currently selected column in ascending order. This slot is used typically for "data_sort_az" action.

Definition at line 328 of file kexidataawareobjectiface.cpp.

◆ sortColumnInternal()

void KexiDataAwareObjectInterface::sortColumnInternal ( int  col,
int  order = 0 
)
protectedvirtual

Reimplemented in KexiFormScrollView.

Definition at line 342 of file kexidataawareobjectiface.cpp.

◆ sortDescending()

void KexiDataAwareObjectInterface::sortDescending ( )

Sorts currently selected column in descending order. This slot is used typically for "data_sort_za" action.

Definition at line 335 of file kexidataawareobjectiface.cpp.

◆ sortedColumnChanged()

virtual void KexiDataAwareObjectInterface::sortedColumnChanged ( int  col)
protectedpure virtual

for implementation as a signal

◆ spreadSheetMode()

bool KexiDataAwareObjectInterface::spreadSheetMode ( ) const
inline
Returns
true id "spreadSheetMode" is enabled. It's false by default.

Definition at line 219 of file kexidataawareobjectiface.h.

◆ startEditCurrentCell()

void KexiDataAwareObjectInterface::startEditCurrentCell ( const TQString &  setText = TQString())
virtual

Used when Return key is pressed on cell, the cell has been double clicked or "+" navigator's 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).

Definition at line 1148 of file kexidataawareobjectiface.cpp.

◆ startEditOrToggleValue()

void KexiDataAwareObjectInterface::startEditOrToggleValue ( )

Typically handles pressing Enter or F2 key: if current cell has boolean type, toggles it's value, otherwise starts editing (startEditCurrentCell()).

Definition at line 1612 of file kexidataawareobjectiface.cpp.

◆ updateAfterAcceptRowEdit()

void KexiDataAwareObjectInterface::updateAfterAcceptRowEdit ( )
protectedvirtual

Definition at line 868 of file kexidataawareobjectiface.cpp.

◆ updateAfterCancelRowEdit()

void KexiDataAwareObjectInterface::updateAfterCancelRowEdit ( )
protectedvirtual

Definition at line 860 of file kexidataawareobjectiface.cpp.

◆ updateAllVisibleRowsBelow()

virtual void KexiDataAwareObjectInterface::updateAllVisibleRowsBelow ( int  row)
inlineprotectedvirtual

Used in KexiDataAwareObjectInterface::slotRowDeleted() to repaint tow row and all visible below. Implemented if there is more than one row displayed, i.e. currently for KexiTableView.

Reimplemented in KexiTableView.

Definition at line 680 of file kexidataawareobjectiface.h.

◆ updateCell()

virtual void KexiDataAwareObjectInterface::updateCell ( int  row,
int  col 
)
protectedpure virtual

Redraws specified cell.

Implemented in KexiFormScrollView, and KexiTableView.

◆ updateCurrentCell()

virtual void KexiDataAwareObjectInterface::updateCurrentCell ( )
pure virtual

Redraws the current cell. To be implemented.

Implemented in KexiFormScrollView, and KexiTableView.

◆ updateGUIAfterSorting()

virtual void KexiDataAwareObjectInterface::updateGUIAfterSorting ( )
protectedpure virtual

Implemented in KexiFormScrollView, and KexiTableView.

◆ updateIndicesForVisibleValues()

void KexiDataAwareObjectInterface::updateIndicesForVisibleValues ( )
protected

Prepares array of indices of visible values to search within. This is per-interface global cache. Needed for faster lookup because there could be lookup values. Called whenever columns definition changes, i.e. in setData() and clearColumns().

See also
find()

Definition at line 1850 of file kexidataawareobjectiface.cpp.

◆ updateRow()

virtual void KexiDataAwareObjectInterface::updateRow ( int  row)
protectedpure virtual

Redraws all cells of specified row.

Implemented in KexiFormScrollView, and KexiTableView.

◆ updateWidgetContents()

virtual void KexiDataAwareObjectInterface::updateWidgetContents ( )
protectedpure virtual

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

Implemented in KexiFormScrollView, and KexiTableView.

◆ updateWidgetContentsSize()

virtual void KexiDataAwareObjectInterface::updateWidgetContentsSize ( )
protectedpure virtual

Updates widget's contents size e.g. using TQScrollView::resizeContents().

Implemented in KexiFormScrollView, and KexiTableView.

◆ updateWidgetScrollBars()

virtual void KexiDataAwareObjectInterface::updateWidgetScrollBars ( )
protectedpure virtual

Updates scrollbars of the widget. TQScrollView::updateScrollbars() will be usually called here.

Implemented in KexiFormScrollView, and KexiTableView.

◆ verticalHeader()

KexiRecordMarker * KexiDataAwareObjectInterface::verticalHeader ( ) const
inline

Definition at line 407 of file kexidataawareobjectiface.h.

◆ verticalScrollBar()

virtual TQScrollBar * KexiDataAwareObjectInterface::verticalScrollBar ( ) const
pure virtual
Returns
vertical scrollbar

Implemented in KexiFormScrollView, and KexiTableView.

◆ vScrollBarSliderReleased()

void KexiDataAwareObjectInterface::vScrollBarSliderReleased ( )
protectedvirtual

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

Definition at line 1802 of file kexidataawareobjectiface.cpp.

◆ vScrollBarValueChanged()

void KexiDataAwareObjectInterface::vScrollBarValueChanged ( int  v)
protectedvirtual

Handles verticalScrollBar()'s valueChanged(int) signal. Called when vscrollbar's value has been changed. Call this method from the subclass.

Definition at line 1748 of file kexidataawareobjectiface.cpp.

Member Data Documentation

◆ m_acceptsRowEditAfterCellAccepting

bool KexiDataAwareObjectInterface::m_acceptsRowEditAfterCellAccepting
protected

Public version of 'acceptsRowEditAfterCellAcceptin' flag (available for a user). It's OR'es together with above flag.

Definition at line 747 of file kexidataawareobjectiface.h.

◆ m_alsoUpdateNextRow

bool KexiDataAwareObjectInterface::m_alsoUpdateNextRow
protected

Used by updateAfterCancelRowEdit()

Definition at line 826 of file kexidataawareobjectiface.h.

◆ m_contentsMousePressEvent_dblClick

bool KexiDataAwareObjectInterface::m_contentsMousePressEvent_dblClick
protected
Todo:
really keep this here and not in KexiTableView?

true if currently double click action was is performed (so accept/cancel editor shoudn't be executed)

Definition at line 770 of file kexidataawareobjectiface.h.

◆ m_contextMenuEnabled

bool KexiDataAwareObjectInterface::m_contextMenuEnabled
protected

Definition at line 823 of file kexidataawareobjectiface.h.

◆ m_curCol

int KexiDataAwareObjectInterface::m_curCol
protected

Definition at line 718 of file kexidataawareobjectiface.h.

◆ m_currentItem

KexiTableItem* KexiDataAwareObjectInterface::m_currentItem
protected

current data item

Definition at line 721 of file kexidataawareobjectiface.h.

◆ m_curRow

int KexiDataAwareObjectInterface::m_curRow
protected

cursor position

Definition at line 718 of file kexidataawareobjectiface.h.

◆ m_cursorPositionSetExplicityBeforeShow

bool KexiDataAwareObjectInterface::m_cursorPositionSetExplicityBeforeShow
protected

Set to true in setCursorPosition() to indicate that cursor position was set before show() and it shouldn't be changed on show(). Only used if initDataContentsOnShow is true.

Definition at line 781 of file kexidataawareobjectiface.h.

◆ m_data

KexiTableViewData* KexiDataAwareObjectInterface::m_data
protected

data structure displayed for this object

Definition at line 712 of file kexidataawareobjectiface.h.

◆ m_deletionPolicy

DeletionPolicy KexiDataAwareObjectInterface::m_deletionPolicy
protected

Definition at line 794 of file kexidataawareobjectiface.h.

◆ m_dragIndicatorLine

int KexiDataAwareObjectInterface::m_dragIndicatorLine
protected

Row number that over which user drags a mouse pointer. Used to indicate dropping possibility for that row. Equal -1 if no indication is needed.

Definition at line 818 of file kexidataawareobjectiface.h.

◆ m_dropsAtRowEnabled

bool KexiDataAwareObjectInterface::m_dropsAtRowEnabled
protected

true, if this table accepts dropping data on the rows (false by default).

Definition at line 788 of file kexidataawareobjectiface.h.

◆ m_editor

KexiDataItemInterface* KexiDataAwareObjectInterface::m_editor
protected

Definition at line 802 of file kexidataawareobjectiface.h.

◆ m_emptyRowInsertingEnabled

bool KexiDataAwareObjectInterface::m_emptyRowInsertingEnabled
protected

true, if inserting empty rows are enabled (false by default)

Definition at line 759 of file kexidataawareobjectiface.h.

◆ m_errorMessagePopup

TQGuardedPtr<KexiArrowTip> KexiDataAwareObjectInterface::m_errorMessagePopup
protected

Displays passive error popup label used when invalid data has been entered.

Definition at line 836 of file kexidataawareobjectiface.h.

◆ m_horizontalHeader

KexiTableViewHeader* KexiDataAwareObjectInterface::m_horizontalHeader
protected
Todo:
make generic interface out of KexiTableViewHeader

Definition at line 800 of file kexidataawareobjectiface.h.

◆ m_indicesForVisibleValues

TQValueVector<uint> KexiDataAwareObjectInterface::m_indicesForVisibleValues
protected

Setup by updateIndicesForVisibleValues() and used by find()

Definition at line 871 of file kexidataawareobjectiface.h.

◆ m_initDataContentsOnShow

bool KexiDataAwareObjectInterface::m_initDataContentsOnShow
protected

true, if initDataContents() should be called on show event.

Definition at line 776 of file kexidataawareobjectiface.h.

◆ m_insertingEnabled

int KexiDataAwareObjectInterface::m_insertingEnabled
protected

like for readOnly: 1 if inserting is enabled

Definition at line 773 of file kexidataawareobjectiface.h.

◆ m_insertItem

KexiTableItem* KexiDataAwareObjectInterface::m_insertItem
protected

item data for inserting

Definition at line 727 of file kexidataawareobjectiface.h.

◆ m_inside_acceptEditor

bool KexiDataAwareObjectInterface::m_inside_acceptEditor
protected

Used in acceptEditor() to avoid infinite recursion, eg. when we're calling acceptRowEdit() during cell accepting phase.

Definition at line 751 of file kexidataawareobjectiface.h.

◆ m_internal_acceptsRowEditAfterCellAccepting

bool KexiDataAwareObjectInterface::m_internal_acceptsRowEditAfterCellAccepting
protected

Definition at line 756 of file kexidataawareobjectiface.h.

◆ m_isFilteringEnabled

bool KexiDataAwareObjectInterface::m_isFilteringEnabled
protected

true if filtering is enabled for the view.

Definition at line 742 of file kexidataawareobjectiface.h.

◆ m_isSortingEnabled

bool KexiDataAwareObjectInterface::m_isSortingEnabled
protected

'sorting by column' availability flag for widget

Definition at line 739 of file kexidataawareobjectiface.h.

◆ m_itemIterator

KexiTableViewData::Iterator* KexiDataAwareObjectInterface::m_itemIterator
protected

data item's iterator

Definition at line 724 of file kexidataawareobjectiface.h.

◆ m_navPanel

KexiRecordNavigator* KexiDataAwareObjectInterface::m_navPanel
protected

main navigation widget

Navigation panel, used if navigationPanelEnabled is true.

Definition at line 806 of file kexidataawareobjectiface.h.

◆ m_navPanelEnabled

bool KexiDataAwareObjectInterface::m_navPanelEnabled
protected

Definition at line 808 of file kexidataawareobjectiface.h.

◆ m_newRowEditing

bool KexiDataAwareObjectInterface::m_newRowEditing
protected

true if new row is edited; implies: rowEditing==true.

Definition at line 736 of file kexidataawareobjectiface.h.

◆ m_owner

bool KexiDataAwareObjectInterface::m_owner
protected

true if m_data member is owned by this object

Definition at line 715 of file kexidataawareobjectiface.h.

◆ m_popupMenu

TDEPopupMenu* KexiDataAwareObjectInterface::m_popupMenu
protected

Context menu widget.

Definition at line 821 of file kexidataawareobjectiface.h.

◆ m_positionOfRecentlyFoundValue

PositionOfValue KexiDataAwareObjectInterface::m_positionOfRecentlyFoundValue
protected

Used to mark recently found value. Updated on succesful execution of find(). If the current cursor's position changes, or data in the current cell changes, positionOfRecentlyFoundValue.exists is set to false.

Definition at line 862 of file kexidataawareobjectiface.h.

◆ m_readOnly

int KexiDataAwareObjectInterface::m_readOnly
protected

Contains 1 if the object is readOnly, 0 if not; otherwise (-1 means "do not know") the 'readOnly' flag from object's internal data structure (KexiTableViewData *KexiTableViewm_data) is reused.

Definition at line 765 of file kexidataawareobjectiface.h.

◆ m_recentlySearchedValue

TQVariant KexiDataAwareObjectInterface::m_recentlySearchedValue
protected

Used to compare whether we're looking for new value.

Definition at line 865 of file kexidataawareobjectiface.h.

◆ m_recentSearchDirection

KexiSearchAndReplaceViewInterface::Options::SearchDirection KexiDataAwareObjectInterface::m_recentSearchDirection
protected

Used to compare whether the search direction has changed.

Definition at line 868 of file kexidataawareobjectiface.h.

◆ m_rowEditing

bool KexiDataAwareObjectInterface::m_rowEditing
protected

when (current or new) row is edited - changed field values are temporary stored here

true if currently selected row is edited

Definition at line 733 of file kexidataawareobjectiface.h.

◆ m_rowWillBeDeleted

int KexiDataAwareObjectInterface::m_rowWillBeDeleted
protected

Row number (>=0 or -1 == no row) that will be deleted in deleteRow(). It is set in slotAboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)) slot received from KexiTableViewData member. This value will be used in slotRowDeleted() after rowDeleted() signal is received from KexiTableViewData member and then cleared (set to -1).

Definition at line 833 of file kexidataawareobjectiface.h.

◆ m_scrollBarTip

TQLabel* KexiDataAwareObjectInterface::m_scrollBarTip
protected

scrollbar tooltip

Definition at line 845 of file kexidataawareobjectiface.h.

◆ m_scrollBarTipTimer

TQTimer KexiDataAwareObjectInterface::m_scrollBarTipTimer
protected

scrollbar tooltip's timer

Definition at line 846 of file kexidataawareobjectiface.h.

◆ m_scrollBarTipTimerCnt

uint KexiDataAwareObjectInterface::m_scrollBarTipTimerCnt
protected

helper for timeout counting (scrollbar tooltip)

Definition at line 847 of file kexidataawareobjectiface.h.

◆ m_scrollbarToolTipsEnabled

bool KexiDataAwareObjectInterface::m_scrollbarToolTipsEnabled
protected

True, if vscrollbar tooltips are enabled (true by default).

Definition at line 843 of file kexidataawareobjectiface.h.

◆ m_spreadSheetMode

bool KexiDataAwareObjectInterface::m_spreadSheetMode
protected

true if spreadSheetMode is enabled. False by default.

See also
KexiTableView::setSpreadSheetMode()

Definition at line 785 of file kexidataawareobjectiface.h.

◆ m_updateEntireRowWhenMovingToOtherRow

bool KexiDataAwareObjectInterface::m_updateEntireRowWhenMovingToOtherRow
protected

true, if this entire (visible) row should be updated when boving to other row. False by default. For table view with 'row highlighting' flag enabled, it is true.

Definition at line 792 of file kexidataawareobjectiface.h.

◆ m_verticalHeader

KexiRecordMarker* KexiDataAwareObjectInterface::m_verticalHeader
protected
Todo:
make generic interface out of KexiRecordMarker

Definition at line 797 of file kexidataawareobjectiface.h.

◆ m_verticalHeaderAlreadyAdded

bool KexiDataAwareObjectInterface::m_verticalHeaderAlreadyAdded
protected

true, if certical header shouldn't be increased in KexiTableView::slotRowInserted() because it was already done in KexiTableView::createEditor().

Definition at line 813 of file kexidataawareobjectiface.h.

◆ m_vScrollBarValueChanged_enabled

bool KexiDataAwareObjectInterface::m_vScrollBarValueChanged_enabled
protected

Used to enable/disable execution of vScrollBarValueChanged() when users navigate through rows using keyboard, so vscrollbar tooltips are not visible.

Definition at line 840 of file kexidataawareobjectiface.h.


The documentation for this class was generated from the following files: