#include <kexiviewbase.h>
|
| void | closing (bool &cancel) |
|
void | focus (bool in) |
|
| virtual tristate | beforeSwitchTo (int mode, bool &dontStore) |
| virtual tristate | afterSwitchFrom (int mode) |
| virtual void | closeEvent (TQCloseEvent *e) |
| virtual KoProperty::Set * | propertySet () |
| void | propertySetReloaded (bool preservePrevSelection=false, const TQCString &propertyToSelect=TQCString()) |
| virtual KexiDB::SchemaData * | storeNewData (const KexiDB::SchemaData &sdata, bool &cancel) |
| bool | loadDataBlock (TQString &dataString, const TQString &dataID=TQString(), bool canBeEmpty=false) |
| virtual tristate | storeData (bool dontAsk=false) |
| bool | storeDataBlock (const TQString &dataString, const TQString &dataID=TQString()) |
| bool | removeDataBlock (const TQString &dataID=TQString()) |
| void | setViewWidget (TQWidget *w, bool focusProxy=false) |
| virtual void | updateActions (bool activated) |
| virtual void | setFocusInternal () |
| virtual void | parentDialogDetached () |
| virtual void | parentDialogAttached () |
| void | plugSharedAction (const char *action_name, TQObject *receiver, const char *slot) |
| void | unplugSharedAction (const char *action_name) |
| void | plugSharedAction (const char *action_name, const char *slot) |
| int | plugSharedAction (const char *action_name, TQWidget *w) |
| void | plugSharedActionToExternalGUI (const char *action_name, KXMLGUIClient *client) |
| void | plugSharedActionsToExternalGUI (const TQValueList< TQCString > &action_names, KXMLGUIClient *client) |
| void | unplugSharedAction (const char *action_name, TQWidget *w) |
| TDEAction * | plugSharedAction (const char *action_name, const TQString &alternativeText, TQWidget *w) |
| TQObject * | receiver () const |
| void | addActionProxyChild (KexiActionProxy *child) |
| void | takeActionProxyChild (KexiActionProxy *child) |
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.
◆ KexiViewBase()
| KexiViewBase::KexiViewBase |
( |
KexiMainWindow * | mainWin, |
|
|
TQWidget * | parent, |
|
|
const char * | name = 0 ) |
◆ ~KexiViewBase()
| KexiViewBase::~KexiViewBase |
( |
| ) |
|
|
virtual |
◆ addChildView()
◆ afterSwitchFrom()
| tristate KexiViewBase::afterSwitchFrom |
( |
int | mode | ) |
|
|
protectedvirtual |
◆ beforeSwitchTo()
| tristate KexiViewBase::beforeSwitchTo |
( |
int | mode, |
|
|
bool & | dontStore ) |
|
protectedvirtual |
◆ closeEvent()
| void KexiViewBase::closeEvent |
( |
TQCloseEvent * | e | ) |
|
|
protectedvirtual |
◆ closing
| void KexiViewBase::closing |
( |
bool & | cancel | ) |
|
|
signal |
emitted when the view is about to close
◆ dirty()
| virtual bool KexiViewBase::dirty |
( |
| ) |
const |
|
inlinevirtual |
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 91 of file kexiviewbase.h.
◆ eventFilter()
| bool KexiViewBase::eventFilter |
( |
TQObject * | o, |
|
|
TQEvent * | e ) |
|
virtual |
◆ loadDataBlock()
| bool KexiViewBase::loadDataBlock |
( |
TQString & | dataString, |
|
|
const TQString & | dataID = TQString(), |
|
|
bool | canBeEmpty = false ) |
|
protected |
Loads large string data dataString block (e.g. xml form's representation), indexed with optional dataID, from the database backend. If canBeEmpty is true and there is no data block for dataID, true is returned and dataString is set to null string. The default is false. - Returns
- true on success
- See also
- storeDataBlock().
Definition at line 178 of file kexiviewbase.cpp.
◆ mainWin()
- Returns
- kexi main window that contain this view
Definition at line 62 of file kexiviewbase.h.
◆ parentDialog()
◆ parentDialogAttached()
| virtual void KexiViewBase::parentDialogAttached |
( |
| ) |
|
|
inlineprotectedvirtual |
Allows to react on parent dialog's attaching (only for KMDI's ChildFrame mode)
- it is called by KexiDialogBase::youAreAttached(). Default implementation does nothing. Implement it if you want to perform some appropriate actions.
Definition at line 246 of file kexiviewbase.h.
◆ parentDialogDetached()
| virtual void KexiViewBase::parentDialogDetached |
( |
| ) |
|
|
inlineprotectedvirtual |
Allows to react on parent dialog's detaching (only for KMDI's ChildFrame mode)
- it is called by KexiDialogBase::youAreDetached(). Default implementation does nothing. Implement it if you want to perform some appropriate actions.
Definition at line 240 of file kexiviewbase.h.
◆ part()
Added for convenience. - Returns
- KexiPart object that was used to create this view (with a dialog) or 0 if this view is not created using KexiPart.
- See also
- parentDialog()
Definition at line 60 of file kexiviewbase.cpp.
◆ preferredSizeHint()
| TQSize KexiViewBase::preferredSizeHint |
( |
const TQSize & | 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, do not forget to return value of yoursize.boundedTo( KexiViewBase::preferredSizeHint(otherSize) ).
Reimplemented in KexiFormView, and KexiReportView.
Definition at line 75 of file kexiviewbase.cpp.
◆ propertySet()
| KoProperty::Set * KexiViewBase::propertySet |
( |
| ) |
|
|
protectedvirtual |
◆ propertySetReloaded()
| void KexiViewBase::propertySetReloaded |
( |
bool | preservePrevSelection = false, |
|
|
const TQCString & | propertyToSelect = TQCString() ) |
|
protected |
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.
◆ propertySetSwitched
| void KexiViewBase::propertySetSwitched |
( |
| ) |
|
|
virtualslot |
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.
Reimplemented in KexiTableDesignerView.
Definition at line 104 of file kexiviewbase.cpp.
◆ removeDataBlock()
| bool KexiViewBase::removeDataBlock |
( |
const TQString & | dataID = TQString() | ) |
|
|
protected |
Removes (potentially large) string data (e.g. xml form's representation), pointed by optional dataID, from the database backend. - Returns
- true on success. Does not fail if the block doe not exists. Note that if dataID is not specified, all data blocks for this view will be removed.
- See also
- storeDataBlock().
Definition at line 206 of file kexiviewbase.cpp.
◆ setAvailable()
| void KexiViewBase::setAvailable |
( |
const char * | action_name, |
|
|
bool | set ) |
|
virtual |
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 305 of file kexiviewbase.cpp.
◆ setDirty [1/2]
| void KexiViewBase::setDirty |
( |
| ) |
|
|
inlineslot |
◆ setDirty [2/2]
| void KexiViewBase::setDirty |
( |
bool | set | ) |
|
|
slot |
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.
Definition at line 116 of file kexiviewbase.cpp.
◆ setFocus
| void KexiViewBase::setFocus |
( |
| ) |
|
|
virtualslot |
◆ setFocusInternal()
| virtual void KexiViewBase::setFocusInternal |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ setViewWidget()
| void KexiViewBase::setViewWidget |
( |
TQWidget * | w, |
|
|
bool | focusProxy = false ) |
|
protected |
◆ sharedAction()
| TDEAction * KexiViewBase::sharedAction |
( |
const char * | action_name | ) |
|
|
virtual |
◆ storeData()
| tristate KexiViewBase::storeData |
( |
bool | dontAsk = false | ) |
|
|
protectedvirtual |
◆ storeDataBlock()
| bool KexiViewBase::storeDataBlock |
( |
const TQString & | dataString, |
|
|
const TQString & | dataID = TQString() ) |
|
protected |
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. - Returns
- true on success
Definition at line 190 of file kexiviewbase.cpp.
◆ storeNewData()
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 in KexiFormView, KexiMacroView, KexiQueryDesignerGuiEditor, KexiQueryDesignerSQLView, KexiReportView, KexiScriptDesignView, and KexiTableDesignerView.
Definition at line 149 of file kexiviewbase.cpp.
◆ updateActions()
| void KexiViewBase::updateActions |
( |
bool | activated | ) |
|
|
protectedvirtual |
◆ viewMode()
| int KexiViewBase::viewMode |
( |
| ) |
const |
|
inline |
- Returns
- the view mode for this view.
Definition at line 94 of file kexiviewbase.h.
◆ KexiDialogBase
◆ m_defaultIconName
| TQString KexiViewBase::m_defaultIconName |
|
protected |
◆ m_dialog
◆ m_lastFocusedChildBeforeFocusOut
| TQGuardedPtr<TQWidget> KexiViewBase::m_lastFocusedChildBeforeFocusOut |
|
protected |
◆ m_mainWin
◆ m_parentView
◆ m_viewWidget
| TQWidget* KexiViewBase::m_viewWidget |
|
protected |
The documentation for this class was generated from the following files:
|