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 () |
| virtual void | propertySetSwitched () |
| void | setDirty (bool set) |
| void | setDirty () |
Signals | |
| void | closing (bool &cancel) |
| emitted when the view is about to close | |
| 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, const QCString &propertyToSelect=QCString()) |
| virtual KexiDB::SchemaData * | storeNewData (const KexiDB::SchemaData &sdata, bool &cancel) |
| bool | loadDataBlock (QString &dataString, const QString &dataID=QString::null, bool canBeEmpty=false) |
| 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 |
Constructor & Destructor Documentation
|
||||||||||||||||
|
Definition at line 33 of file kexiviewbase.cpp. References KexiDialogBase::m_creatingViewsMode, m_dialog, and KexiDialogBase::supportsViewMode(). |
|
|
Definition at line 56 of file kexiviewbase.cpp. |
Member Function Documentation
|
|
Definition at line 264 of file kexiviewbase.cpp. References KexiActionProxy::addActionProxyChild(). Referenced by KexiQueryDesignerGuiEditor::KexiQueryDesignerGuiEditor(), KexiQueryDesignerSQLView::KexiQueryDesignerSQLView(), and KexiScriptDesignView::KexiScriptDesignView(). |
|
|
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, KexiMacroView, KexiQueryDesignerGuiEditor, KexiQueryDesignerSQLView, KexiQueryView, KexiReportView, KexiTableDesigner_DataView, and KexiTableDesignerView. Definition at line 70 of file kexiviewbase.cpp. Referenced by KexiDialogBase::switchToViewMode(). |
|
||||||||||||
|
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, KexiMacroView, KexiQueryDesignerGuiEditor, KexiQueryDesignerSQLView, KexiReportView, KexiTableDesigner_DataView, and KexiTableDesignerView. Definition at line 65 of file kexiviewbase.cpp. Referenced by KexiDialogBase::switchToViewMode(). |
|
|
Definition at line 88 of file kexiviewbase.cpp. References closing(). |
|
|
emitted when the view is about to close
Referenced by closeEvent(), KexiDialogBase::closeEvent(), and KexiDataAwareView::init(). |
|
|
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. Referenced by KexiQueryDesignerGuiEditor::afterSwitchFrom(), KexiTableDesignerView::beforeSwitchTo(), KexiReportView::beforeSwitchTo(), KexiQueryDesignerGuiEditor::beforeSwitchTo(), KexiFormView::beforeSwitchTo(), KexiDataAwarePropertySet::KexiDataAwarePropertySet(), KexiFormView::KexiFormView(), KexiReportView::KexiReportView(), KexiQueryDesignerGuiEditor::loadLayout(), setDirty(), KexiEditor::setText(), KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(), and KexiQueryDesignerGuiEditor::storeData(). |
|
||||||||||||
|
Reimplemented in KexiQueryDesignerSQLView. Definition at line 213 of file kexiviewbase.cpp. References focus(), KexiUtils::hasParent(), KexiActionProxy::m_actionProxyParent, KexiActionProxy::m_focusedChild, m_lastFocusedChildBeforeFocusOut, and m_parentView. Referenced by KexiQueryDesignerSQLView::eventFilter(). |
|
|
Referenced by eventFilter(), KexiFormView::KexiFormView(), and KexiReportView::KexiReportView(). |
|
||||||||||||||||
|
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.
Definition at line 178 of file kexiviewbase.cpp. References KexiDialogBase::id(), m_dialog, m_mainWin, and KexiMainWindow::project(). Referenced by KexiQueryDesignerSQLView::afterSwitchFrom(), KexiMacroView::loadData(), KexiMacroTextView::loadData(), KexiReportView::loadForm(), KexiFormView::loadForm(), and KexiQueryDesignerGuiEditor::loadLayout(). |
|
|
|
|
Allows to react on parent dialog's attaching (only for KMDI's ChildFrame mode)
Definition at line 245 of file kexiviewbase.h. Referenced by KexiDialogBase::sendAttachedStateToCurrentView(). |
|
|
Allows to react on parent dialog's detaching (only for KMDI's ChildFrame mode)
Definition at line 239 of file kexiviewbase.h. Referenced by KexiDialogBase::sendDetachedStateToCurrentView(). |
|
|
Added for convenience.
Definition at line 60 of file kexiviewbase.cpp. References m_dialog, and KexiDialogBase::part(). Referenced by KexiFormView::formPart(), KexiTableDesignerViewPrivate::messageForSavingChanges(), KexiReportView::reportPart(), setAvailable(), and sharedAction(). |
|
|
Reimplemented in KexiFormView, and KexiReportView. Definition at line 75 of file kexiviewbase.cpp. References parentDialog(). Referenced by KexiDataAwareView::init(), KexiReportView::preferredSizeHint(), KexiFormView::preferredSizeHint(), and KexiDialogBase::sizeHint(). |
|
|
Reimplemented in KexiFormView, KexiMacroDesignView, KexiQueryDesignerGuiEditor, KexiReportView, KexiScriptDesignView, and KexiTableDesignerView. Definition at line 99 of file kexiviewbase.cpp. Referenced by KexiDialogBase::propertySet(). |
|
||||||||||||
|
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. References m_mainWin, parentDialog(), and KexiMainWindow::propertySetSwitched(). Referenced by KexiTableDesignerView::changePropertyVisibility(), KexiTableDesignerView::insertFieldInternal(), KexiTableDesignerView::slotBeforeCellChanged(), KexiTableDesignerView::slotPropertyChanged(), KexiReportView::slotPropertySetSwitched(), KexiFormView::slotPropertySetSwitched(), and KexiQueryDesignerGuiEditor::updatePropertiesVisibility(). |
|
|
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. References m_mainWin, parentDialog(), and KexiMainWindow::propertySetSwitched(). Referenced by KexiFormView::KexiFormView(), KexiReportView::KexiReportView(), KexiTableDesignerView::propertySetSwitched(), KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(), KexiQueryDesignerGuiEditor::slotBeforeCellChanged(), KexiReportView::slotPropertySetSwitched(), KexiFormView::slotPropertySetSwitched(), KexiQueryDesignerGuiEditor::slotRowInserted(), KexiQueryDesignerGuiEditor::slotTableFieldDoubleClicked(), KexiDialogBase::switchToViewMode(), KexiFormView::~KexiFormView(), and KexiReportView::~KexiReportView(). |
|
|
Removes (potentially large) string data (e.g. xml form's representation), pointed by optional dataID, from the database backend.
Definition at line 206 of file kexiviewbase.cpp. References KexiDialogBase::id(), m_dialog, m_mainWin, and KexiMainWindow::project(). |
|
||||||||||||
|
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. References part(), KexiActionProxy::setAvailable(), and viewMode(). Referenced by KexiFormManager::enableAction(), KexiDataAwareView::initActions(), KexiRelationWidget::invalidateActions(), KexiFormView::KexiFormView(), KexiTableDesignerView::KexiTableDesignerView(), KexiDataAwareView::reloadActions(), KexiDataAwareView::slotUpdateRowActions(), KexiTableDesignerView::updateActions(), KexiQueryDesignerSQLView::updateActions(), KexiDataAwareView::updateActions(), and KexiTableDesignerView::updateUndoRedoActions(). |
|
|
|
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. References dirty(), KexiDialogBase::dirtyChanged(), m_dialog, m_parentView, and setDirty(). Referenced by KexiDataAwarePropertySet::KexiDataAwarePropertySet(), and setDirty(). |
|
|
Reimplemented in KexiQueryDesignerGuiEditor. Definition at line 275 of file kexiviewbase.cpp. References KexiSharedActionHost::invalidateSharedActions(), m_lastFocusedChildBeforeFocusOut, m_mainWin, and setFocusInternal(). Referenced by KexiQueryDesignerSQLView::afterSwitchFrom(). |
|
|
Reimplemented in KexiFormView. Definition at line 233 of file kexiviewbase.h. Referenced by setFocus(). |
|
||||||||||||
|
|
Reimpelmented from KexiActionProxy.
Reimplemented from KexiActionProxy. Definition at line 292 of file kexiviewbase.cpp. References part(), KexiActionProxy::sharedAction(), and viewMode(). Referenced by KexiDataAwareView::initActions(), KexiQueryDesignerSQLView::KexiQueryDesignerSQLView(), and KexiTableDesignerView::KexiTableDesignerView(). |
|
|
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, KexiMacroTextView, KexiMacroView, KexiQueryDesignerGuiEditor, KexiQueryDesignerSQLView, KexiQueryView, KexiReportView, KexiScriptDesignView, and KexiTableDesignerView. Definition at line 164 of file kexiviewbase.cpp. References m_dialog, m_mainWin, KexiMainWindow::project(), KexiDialogBase::schemaData(), and setDirty(). Referenced by KexiQueryDesignerSQLView::storeData(), KexiQueryDesignerGuiEditor::storeData(), and KexiDialogBase::storeData(). |
|
||||||||||||
|
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 190 of file kexiviewbase.cpp. References KexiDialogBase::id(), m_dialog, m_mainWin, and KexiMainWindow::project(). Referenced by KexiScriptDesignView::storeData(), KexiReportView::storeData(), KexiQueryDesignerSQLView::storeData(), KexiMacroView::storeData(), KexiMacroTextView::storeData(), KexiFormView::storeData(), KexiQueryDesignerGuiEditor::storeLayout(), and KexiQueryDesignerSQLView::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:
Reimplemented in KexiFormView, KexiMacroView, KexiQueryDesignerGuiEditor, KexiQueryDesignerSQLView, KexiQueryView, KexiReportView, KexiScriptDesignView, and KexiTableDesignerView. Definition at line 149 of file kexiviewbase.cpp. References KexiDB::SchemaData::id(), m_mainWin, and KexiMainWindow::project(). Referenced by KexiScriptDesignView::storeNewData(), KexiReportView::storeNewData(), KexiMacroView::storeNewData(), KexiFormView::storeNewData(), and KexiDialogBase::storeNewData(). |
|
|
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, KexiTableDesignerView, KexiDataAwareView, and KexiEditor. Definition at line 318 of file kexiviewbase.cpp. Referenced by KexiDialogBase::deactivate(), KexiQueryDesignerSQLView::updateActions(), KexiEditor::updateActions(), and KexiDataAwareView::updateActions(). |
|
Friends And Related Function Documentation
|
|
Definition at line 276 of file kexiviewbase.h. |
Member Data Documentation
|
|
Definition at line 245 of file kexiviewbase.h. Referenced by KexiDialogBase::itemIcon(), and KexiRelationMainDlg::KexiRelationMainDlg(). |
|
|
|
Definition at line 257 of file kexiviewbase.h. Referenced by eventFilter(), and setFocus(). |
|
|
|
Definition at line 255 of file kexiviewbase.h. Referenced by eventFilter(), setDirty(), and KexiEditor::setText(). |
|
|
Definition at line 253 of file kexiviewbase.h. Referenced by setViewWidget(). |
The documentation for this class was generated from the following files:
