kexi
KexiReportView Class Reference
#include <kexireportview.h>
Inheritance diagram for KexiReportView:

Detailed Description
The FormPart's view.This class presents a single view used inside KexiDialogBase. It takes care of saving/loading report, of enabling actions when needed. One KexiReportView object is instantiated for data view mode (preview == true in constructor), and second KexiReportView object is instantiated for design view mode (preview == false in constructor).
Definition at line 62 of file kexireportview.h.
Public Types | |
enum | ResizeMode { ResizeAuto = 0, ResizeDefault = ResizeAuto, ResizeFixed = 1, NoResize = 2 } |
Public Slots | |
virtual void | show () |
Public Member Functions | |
KexiReportView (KexiMainWindow *win, QWidget *parent, const char *name, KexiDB::Connection *conn) | |
virtual | ~KexiReportView () |
KexiDB::Connection * | connection () |
virtual QSize | preferredSizeHint (const QSize &otherSize) |
int | resizeMode () const |
Protected Slots | |
void | slotPropertySetSwitched (KoProperty::Set *set, bool forceReload=false) |
void | slotDirty (KFormDesigner::Form *f, bool isDirty) |
void | slotFocus (bool in) |
Protected Member Functions | |
virtual tristate | beforeSwitchTo (int mode, bool &dontStore) |
virtual tristate | afterSwitchFrom (int mode) |
virtual KoProperty::Set * | propertySet () |
virtual KexiDB::SchemaData * | storeNewData (const KexiDB::SchemaData &sdata, bool &cancel) |
virtual tristate | storeData (bool dontAsk=false) |
KexiReportPart::TempData * | tempData () const |
KexiReportPart * | reportPart () const |
void | disableWidgetActions () |
void | enableFormActions () |
KFormDesigner::Form * | form () const |
void | setForm (KFormDesigner::Form *f) |
void | initForm () |
void | loadForm () |
virtual void | resizeEvent (QResizeEvent *) |
Constructor & Destructor Documentation
KexiReportView::KexiReportView | ( | KexiMainWindow * | win, | |
QWidget * | parent, | |||
const char * | name, | |||
KexiDB::Connection * | conn | |||
) |
Definition at line 83 of file kexireportview.cpp.
Member Function Documentation
QSize KexiReportView::preferredSizeHint | ( | const QSize & | otherSize | ) | [virtual] |
- Returns:
- preferred size hint, that can be used to resize the view. It is computed using maximum of (a) otherSize and (b) current KMDI dock area's size, so the view won't exceed this maximum size. The method is used e.g. in KexiDialogBase::sizeHint(). If you reimplement this method, dont forget to return value of yoursize.boundedTo( KexiViewBase::preferredSizeHint(otherSize) ).
Reimplemented from KexiViewBase.
Definition at line 432 of file kexireportview.cpp.
void KexiReportView::show | ( | ) | [virtual, slot] |
Reimplemented to update resize policy.
Definition at line 454 of file kexireportview.cpp.
tristate KexiReportView::beforeSwitchTo | ( | int | mode, | |
bool & | dontStore | |||
) | [protected, virtual] |
called by KexiDialogBase::switchToViewMode() right before dialog is switched to new mode By default does nothing. Reimplement this if you need to do something before 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. Set dontStore to true (it's false by default) if you want to avoid data storing by storeData() or storeNewData().
Reimplemented from KexiViewBase.
Definition at line 247 of file kexireportview.cpp.
tristate KexiReportView::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 264 of file kexireportview.cpp.
virtual KoProperty::Set* KexiReportView::propertySet | ( | ) | [inline, protected, virtual] |
- Returns:
- a property set for this view. For reimplementation. By default returns NULL.
Reimplemented from KexiViewBase.
Definition at line 102 of file kexireportview.h.
KexiDB::SchemaData * KexiReportView::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 303 of file kexireportview.cpp.
tristate KexiReportView::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 322 of file kexireportview.cpp.
The documentation for this class was generated from the following files: