kexi
KexiQueryView Class Reference
Inheritance diagram for KexiQueryView:

Detailed Description
Definition at line 32 of file kexiqueryview.h.
Public Member Functions | |
KexiQueryView (KexiMainWindow *win, QWidget *parent, const char *name=0) | |
~KexiQueryView () | |
Protected Member Functions | |
virtual tristate | afterSwitchFrom (int mode) |
virtual KexiDB::SchemaData * | storeNewData (const KexiDB::SchemaData &sdata, bool &cancel) |
virtual tristate | storeData (bool dontAsk=false) |
bool | executeQuery (KexiDB::QuerySchema *query) |
Protected Attributes | |
Private * | d |
Member Function Documentation
tristate KexiQueryView::afterSwitchFrom | ( | int | mode | ) | [protected, virtual] |
called by KexiDialogBase::switchToViewMode() right after dialog is switched to new mode By default does nothing. Reimplement this if you need to do something after switching to this view.
- Returns:
- true if you accept or false if a error occupied and view shouldn't change If there is no error but switching should be just cancelled (probably after showing some info messages), you need to return cancelled.
Reimplemented from KexiViewBase.
Definition at line 92 of file kexiqueryview.cpp.
bool KexiQueryView::executeQuery | ( | KexiDB::QuerySchema * | query | ) | [protected] |
Definition at line 66 of file kexiqueryview.cpp.
tristate KexiQueryView::storeData | ( | bool | dontAsk = false |
) | [protected, virtual] |
Tells this view to store data changes on the backend. Called by KexiDialogBase::storeData(). Default implementation:
- makes a deep copy of sdata
- stores object schema data sdata in 'kexi__objects' internal table using Connection::storeObjectSchemaData(). If dontAsk is true, no question dialog will be shown to the user. The default is false.
Reimpelment this for your needs. Should return true on success or cancelled when the task should be cancelled.
- See also:
- storeNewData()
Reimplemented from KexiViewBase.
Definition at line 126 of file kexiqueryview.cpp.
KexiDB::SchemaData * KexiQueryView::storeNewData | ( | const KexiDB::SchemaData & | sdata, | |
bool & | cancel | |||
) | [protected, virtual] |
Tells this dialog to create and store data of the new object pointed by sdata on the backend. Called by KexiDialogBase::storeNewData(). Default implementation:
- makes a deep copy of sdata
- stores object schema data sdata in 'kexi__objects' internal table using Connection::storeObjectSchemaData(). Reimpelment this for your needs. Requirements:
- deep copy of sdata should be made
- schema data should be created at the backend (by calling KexiViewBase::storeNewData(const KexiDB::SchemaData& sdata)), or using Connection::storeObjectSchemaData() or more specialized method. For example, KexiAlterTableDialog uses Connection::createTable(TableSchema) for this (tableschema is SchemaData subclass) to store more information than just a schem adata. You should use such subclasses if needed. Should return newly created schema data object on success. In this case, do not store schema object yourself (make deep copy if needed).
Reimplemented from KexiViewBase.
Definition at line 116 of file kexiqueryview.cpp.
The documentation for this class was generated from the following files: