Kexi API Documentation (2.0 alpha)

KexiMacroView Class Reference

#include <keximacroview.h>

Inheritance diagram for KexiMacroView:

KexiViewBase QWidget KexiActionProxy KexiMacroDesignView KexiMacroTextView List of all members.

Detailed Description

The KexiMacroView implements KexiViewBase to provide a base KexiView instance for Macros.

The KexiMacroDesignView and the KexiMacroTextView are inherited from this class.

Definition at line 42 of file keximacroview.h.

Public Slots

void execute (QObject *sender=0)
 This slot will be invoked if Kexi's menuitem Data=>Execute got activated and will execute the Macro.

Public Member Functions

 KexiMacroView (KexiMainWindow *mainwin, QWidget *parent,::KoMacro::Macro *const macro, const char *name=0)
 Constructor.
virtual ~KexiMacroView ()
 Destructor.
KSharedPtr< KoMacro::Macromacro () const
virtual bool loadData ()
 Load the data from XML source and fill the internally used KoMacro::Macro instance.
virtual KexiDB::SchemaDatastoreNewData (const KexiDB::SchemaData &sdata, bool &cancel)
 Try to call storeData with new data we like to store.
virtual tristate storeData (bool dontAsk=false)
 Try to store the modified data in the already opened and currently used KexiDB::SchemaData instance.

Protected Member Functions

virtual tristate beforeSwitchTo (int mode, bool &dontstore)
 Called by KexiDialogBase::switchToViewMode() right before dialog is switched to new mode.
virtual tristate afterSwitchFrom (int mode)
 Called by KexiDialogBase::switchToViewMode() right after dialog is switched to new mode.


Constructor & Destructor Documentation

KexiMacroView::KexiMacroView KexiMainWindow mainwin,
QWidget parent,
::KoMacro::Macro *const   macro,
const char *  name = 0
 

Constructor.

Parameters:
mainwin The KexiMainWindow instance this KexiViewBase belongs to.
parent The parent widget this widget should be displayed in.
macro The KoMacro::Macro instance this view is for.

KexiMacroView::~KexiMacroView  )  [virtual]
 

Destructor.

Definition at line 73 of file keximacroview.cpp.


Member Function Documentation

tristate KexiMacroView::afterSwitchFrom int  mode  )  [protected, virtual]
 

Called by KexiDialogBase::switchToViewMode() right after dialog is switched to new mode.

Parameters:
mode The viewmode to which we switched. This could be either Kexi::DataViewMode, Kexi::DesignViewMode or Kexi::TextViewMode.
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 90 of file keximacroview.cpp.

References kexipluginsdbg, and loadData().

tristate KexiMacroView::beforeSwitchTo int  mode,
bool &  dontstore
[protected, virtual]
 

Called by KexiDialogBase::switchToViewMode() right before dialog is switched to new mode.

Parameters:
mode The viewmode to which should be switched. This could be either Kexi::DataViewMode, Kexi::DesignViewMode or Kexi::TextViewMode.
donstore This call-by-reference boolean value defines if storeData should be called for the old but still selected viewmode. Set dontstore to true (it's false by default) if you want to avoid data storing.
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 84 of file keximacroview.cpp.

References kexipluginsdbg.

void KexiMacroView::execute QObject *  sender = 0  )  [slot]
 

This slot will be invoked if Kexi's menuitem Data=>Execute got activated and will execute the Macro.

Definition at line 162 of file keximacroview.cpp.

References KexiViewBase::mainWin().

Referenced by KexiMacroPart::execute().

bool KexiMacroView::loadData  )  [virtual]
 

Load the data from XML source and fill the internally used KoMacro::Macro instance.

Reimplemented in KexiMacroDesignView, and KexiMacroTextView.

Definition at line 97 of file keximacroview.cpp.

References kexipluginsdbg, and KexiViewBase::loadDataBlock().

Referenced by afterSwitchFrom(), KexiMacroPart::execute(), and KexiMacroDesignView::loadData().

KSharedPtr< KoMacro::Macro > KexiMacroView::macro  )  const
 

Returns:
the Macro instance.

Definition at line 79 of file keximacroview.cpp.

Referenced by KexiMacroPart::execute().

tristate KexiMacroView::storeData bool  dontAsk = false  )  [virtual]
 

Try to store the modified data in the already opened and currently used KexiDB::SchemaData instance.

Reimplemented from KexiViewBase.

Reimplemented in KexiMacroTextView.

Definition at line 151 of file keximacroview.cpp.

References kexipluginsdbg, KexiViewBase::parentDialog(), and KexiViewBase::storeDataBlock().

Referenced by storeNewData().

KexiDB::SchemaData * KexiMacroView::storeNewData const KexiDB::SchemaData sdata,
bool &  cancel
[virtual]
 

Try to call storeData with new data we like to store.

On success the matching KexiDB::SchemaData is returned.

Parameters:
sdata The source KexiDB::SchemaData instance.
cancel Cancel on failure and don't try to clean possible temporary created data up.
Returns:
The matching KexiDB::SchemaData instance or NULL if storing failed.

Reimplemented from KexiViewBase.

Definition at line 129 of file keximacroview.cpp.

References KexiDB::SchemaData::id(), kexipluginsdbg, KexiViewBase::parentDialog(), KexiDB::Connection::removeObject(), storeData(), and KexiViewBase::storeNewData().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:50:11 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003