kexi
KexiViewBase Class Reference
#include <kexiviewbase.h>
Inheritance diagram for KexiViewBase:

Detailed Description
Base class for single view embeddable of in KexiDialogBase.This class automatically works as a proxy for shared (application-wide) actions. KexiViewBase has 'dirty' flag to indicate that view's data has changed. This flag's state is reused by KexiDialogBase object that contain the view. KexiViewBase objects can be also nested, using addChildView(): any actions and 'dirty' flag are transmited to parent view in this case.
KexiViewBase objects are usually allocated within KexiDialogBase objects by implementing KexiPart::createView() method. See query or table part code for examples.
KexiViewBase object can be also allocated without attaching it KexiDialogBase, especially withinn dock window. see KexiMainWindowImpl::initNavigator() to see example how KexiBrowser does this.
Definition at line 52 of file kexiviewbase.h.
Public Slots | |
virtual void | setFocus () |
void | propertySetSwitched () |
void | setDirty (bool set) |
void | setDirty () |
Signals | |
void | closing (bool &cancel) |
void | focus (bool in) |
Public Member Functions | |
KexiViewBase (KexiMainWindow *mainWin, QWidget *parent, const char *name=0) | |
virtual | ~KexiViewBase () |
KexiMainWindow * | mainWin () const |
KexiDialogBase * | parentDialog () const |
KexiPart::Part * | part () const |
virtual QSize | preferredSizeHint (const QSize &otherSize) |
virtual bool | eventFilter (QObject *o, QEvent *e) |
void | addChildView (KexiViewBase *childView) |
virtual bool | dirty () const |
int | viewMode () const |
virtual KAction * | sharedAction (const char *action_name) |
virtual void | setAvailable (const char *action_name, bool set) |
Protected Member Functions | |
virtual tristate | beforeSwitchTo (int mode, bool &dontStore) |
virtual tristate | afterSwitchFrom (int mode) |
virtual void | closeEvent (QCloseEvent *e) |
virtual KoProperty::Set * | propertySet () |
void | propertySetReloaded (bool preservePrevSelection=false) |
virtual KexiDB::SchemaData * | storeNewData (const KexiDB::SchemaData &sdata, bool &cancel) |
bool | loadDataBlock (QString &dataString, const QString &dataID=QString::null) |
virtual tristate | storeData (bool dontAsk=false) |
bool | storeDataBlock (const QString &dataString, const QString &dataID=QString::null) |
bool | removeDataBlock (const QString &dataID=QString::null) |
void | setViewWidget (QWidget *w, bool focusProxy=false) |
virtual void | updateActions (bool activated) |
virtual void | setFocusInternal () |
virtual void | parentDialogDetached () |
virtual void | parentDialogAttached () |
Protected Attributes | |
QString | m_defaultIconName |
KexiMainWindow * | m_mainWin |
KexiDialogBase * | m_dialog |
QWidget * | m_viewWidget |
KexiViewBase * | m_parentView |
QGuardedPtr< QWidget > | m_lastFocusedChildBeforeFocusOut |
Friends | |
class | KexiDialogBase |
Member Function Documentation
|
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.
Reimplemented in KexiFormView, KexiQueryDesignerGuiEditor, KexiQueryDesignerSQLView, KexiQueryView, KexiReportView, KexiAlterTable_DataView, and KexiAlterTableDialog. Definition at line 70 of file kexiviewbase.cpp. |
|
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.
Reimplemented in KexiFormView, KexiQueryDesignerGuiEditor, KexiQueryDesignerSQLView, KexiReportView, KexiAlterTable_DataView, and KexiAlterTableDialog. Definition at line 65 of file kexiviewbase.cpp. |
|
emitted when the view is about to close
|
|
True if contents (data) of the view is dirty and need to be saved This may or not be used, depending if changes in the dialog are saved immediately (e.g. like in datatableview) or saved by hand (by user) (e.g. like in alter-table dialog). "Dirty" flag is reused by KexiDialogBase::dirty(). Default implementation just uses internal m_dirty flag, that is false by default. Reimplement this if you e.g. want reuse other "dirty" flag from internal structures that may be changed. Definition at line 90 of file kexiviewbase.h. |
|
Loads large string data dataString block (e.g. xml form's representation), indexed with optional dataID, from the database backend.
Definition at line 178 of file kexiviewbase.cpp. |
|
Definition at line 61 of file kexiviewbase.h. |
|
Definition at line 64 of file kexiviewbase.h. |
|
Allows to react on parent dialog's attaching (only for KMDI's ChildFrame mode)
Definition at line 243 of file kexiviewbase.h. |
|
Allows to react on parent dialog's detaching (only for KMDI's ChildFrame mode)
Definition at line 237 of file kexiviewbase.h. |
|
Added for convenience.
Definition at line 60 of file kexiviewbase.cpp. |
|
Reimplemented in KexiFormView, and KexiReportView. Definition at line 75 of file kexiviewbase.cpp. |
|
Reimplemented in KexiFormView, KexiQueryDesignerGuiEditor, KexiReportView, KexiScriptDesignView, and KexiAlterTableDialog. Definition at line 99 of file kexiviewbase.cpp. |
|
Call this in your view's implementation whenever current property set is changed that few properties are now visible and/or few other are invisible, so property editor operating on this property set should be completely reloaded. If preservePrevSelection is true and there was a property set assigned before call, previously selected item will be preselected in the editor (if found). Definition at line 110 of file kexiviewbase.cpp. |
|
Call this in your view's implementation whenever current property set (returned by propertySet()) is switched to other, so property editor contents need to be completely replaced. Definition at line 104 of file kexiviewbase.cpp. |
|
Removes (potentially large) string data (e.g. xml form's representation), pointed by optional dataID, from the database backend.
Definition at line 201 of file kexiviewbase.cpp. |
|
Enables or disables shared action declared in Kexi Part (part()). If there's no such action, global shared action is enabled or disabled (if exists). Reimplemented from KexiActionProxy. Definition at line 299 of file kexiviewbase.cpp. |
|
Equal to setDirty(true). Definition at line 121 of file kexiviewbase.h. |
|
Sets dirty flag on or off. It the flag changes, dirty(bool) signal is emitted by parent dialog (KexiDialog), to inform the world about that. If this view has a parent view, setDirty() is called also on parent view. Always use this function to update 'dirty' flag information. Reimplemented in KexiSimplePrintingPageSetup. Definition at line 116 of file kexiviewbase.cpp. |
|
Reimpelmented from KexiActionProxy.
Reimplemented from KexiActionProxy. Definition at line 286 of file kexiviewbase.cpp. |
|
Tells this view to store data changes on the backend. Called by KexiDialogBase::storeData(). Default implementation:
Reimpelment this for your needs. Should return true on success or cancelled when the task should be cancelled.
Reimplemented in KexiFormView, KexiQueryDesignerGuiEditor, KexiQueryDesignerSQLView, KexiReportView, KexiScriptDesignView, and KexiAlterTableDialog. Definition at line 164 of file kexiviewbase.cpp. |
|
Stores (potentially large) string data dataString, block (e.g. xml form's representation), at the database backend. Block will be stored in "kexi__objectdata" table pointed by this object's id and an optional dataID identifier. If dialog's id is not available (KexiDialogBase::id()), then ID that was just created in storeNewData() is used (see description of m_newlyAssignedID member). If there is already such record in the table, it's simply overwritten.
Definition at line 185 of file kexiviewbase.cpp. |
|
Tells this dialog to create and store data of the new object pointed by sdata on the backend. Called by KexiDialogBase::storeNewData(). Default implementation:
Reimplemented in KexiFormView, KexiQueryDesignerGuiEditor, KexiQueryDesignerSQLView, KexiReportView, KexiScriptDesignView, and KexiAlterTableDialog. Definition at line 149 of file kexiviewbase.cpp. |
|
Updates actions (e.g. availability). Reimplement it, if needed (you must call superclass impelmentation at the end!). This implementation does nothing for this view but calls updateActions() for every child-view of this view. called by KexiDialogBase on dialog's activation (activated is true) or deactivation. Reimplemented in KexiQueryDesignerSQLView, KexiAlterTableDialog, KexiDataAwareView, and KexiEditor. Definition at line 312 of file kexiviewbase.cpp. |
|
Definition at line 93 of file kexiviewbase.h. |
The documentation for this class was generated from the following files: