kexi

#include <kexireportview.h>

Inheritance diagram for KexiReportView:
KexiViewBase KexiActionProxy

Public Types

enum  ResizeMode { ResizeAuto = 0 , ResizeDefault = ResizeAuto , ResizeFixed = 1 , NoResize = 2 }

Public Slots

virtual void show ()
Public Slots inherited from KexiViewBase
virtual void setFocus ()
virtual void propertySetSwitched ()
void setDirty (bool set)
void setDirty ()

Public Member Functions

 KexiReportView (KexiMainWindow *win, TQWidget *parent, const char *name, KexiDB::Connection *conn)
KexiDB::Connection * connection ()
virtual TQSize preferredSizeHint (const TQSize &otherSize)
int resizeMode () const
Public Member Functions inherited from KexiViewBase
 KexiViewBase (KexiMainWindow *mainWin, TQWidget *parent, const char *name=0)
KexiMainWindow * mainWin () const
KexiDialogBase * parentDialog () const
KexiPart::Part * part () const
virtual bool eventFilter (TQObject *o, TQEvent *e)
void addChildView (KexiViewBase *childView)
virtual bool dirty () const
int viewMode () const
virtual TDEAction * sharedAction (const char *action_name)
virtual void setAvailable (const char *action_name, bool set)
Public Member Functions inherited from KexiActionProxy
 KexiActionProxy (TQObject *receiver, KexiSharedActionHost *host=0)
bool activateSharedAction (const char *action_name, bool alsoCheckInChildren=true)
void setSharedActionHost (KexiSharedActionHost &host)
bool isAvailable (const char *action_name, bool alsoCheckInChildren=true) const
bool isSupported (const char *action_name) const
void setActionProxyParent_internal (KexiActionProxy *parent)

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 (TQResizeEvent *)
Protected Member Functions inherited from KexiViewBase
virtual void closeEvent (TQCloseEvent *e)
void propertySetReloaded (bool preservePrevSelection=false, const TQCString &propertyToSelect=TQCString())
bool loadDataBlock (TQString &dataString, const TQString &dataID=TQString(), bool canBeEmpty=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 ()
Protected Member Functions inherited from KexiActionProxy
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)

Additional Inherited Members

Signals inherited from KexiViewBase
void closing (bool &cancel)
void focus (bool in)
Public Attributes inherited from KexiActionProxy
KexiActionProxy * m_focusedChild
Protected Attributes inherited from KexiViewBase
TQString m_defaultIconName
KexiMainWindow * m_mainWin
KexiDialogBase * m_dialog
TQWidget * m_viewWidget
KexiViewBase * m_parentView
TQGuardedPtr< TQWidget > m_lastFocusedChildBeforeFocusOut
Protected Attributes inherited from KexiActionProxy
KexiSharedActionHost * m_host
TQGuardedPtr< TQObject > m_receiver
TQAsciiDict< TQPair< TQSignal *, bool > > m_signals
TQPtrList< KexiActionProxy > m_sharedActionChildren
TQPtrList< TDEAction > m_alternativeActions
KexiActionProxy * m_actionProxyParent
TQObject m_signal_parent
TDEAction_setEnabled_Helper * m_TDEAction_setEnabled_helper

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 63 of file kexireportview.h.

Member Enumeration Documentation

◆ ResizeMode

enum KexiReportView::ResizeMode

Definition at line 69 of file kexireportview.h.

Constructor & Destructor Documentation

◆ KexiReportView()

KexiReportView::KexiReportView ( KexiMainWindow * win,
TQWidget * parent,
const char * name,
KexiDB::Connection * conn )
Todo
skip this if ther're no borders

Definition at line 83 of file kexireportview.cpp.

◆ ~KexiReportView()

KexiReportView::~KexiReportView ( )
virtual

Definition at line 155 of file kexireportview.cpp.

Member Function Documentation

◆ afterSwitchFrom()

tristate KexiReportView::afterSwitchFrom ( int mode)
protectedvirtual

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.

◆ beforeSwitchTo()

tristate KexiReportView::beforeSwitchTo ( int mode,
bool & dontStore )
protectedvirtual

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.

◆ connection()

KexiDB::Connection * KexiReportView::connection ( )
inline

Definition at line 79 of file kexireportview.h.

◆ form()

KFormDesigner::Form * KexiReportView::form ( ) const
protected

Definition at line 165 of file kexireportview.cpp.

◆ initForm()

void KexiReportView::initForm ( )
protected

Definition at line 183 of file kexireportview.cpp.

◆ loadForm()

void KexiReportView::loadForm ( )
protected

Definition at line 218 of file kexireportview.cpp.

◆ preferredSizeHint()

TQSize KexiReportView::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 from KexiViewBase.

Definition at line 432 of file kexireportview.cpp.

◆ propertySet()

virtual KoProperty::Set * KexiReportView::propertySet ( )
inlineprotectedvirtual
Returns
a property set for this view. For reimplementation. By default returns NULL.

Reimplemented from KexiViewBase.

Definition at line 104 of file kexireportview.h.

◆ reportPart()

KexiReportPart * KexiReportView::reportPart ( ) const
inlineprotected

Definition at line 111 of file kexireportview.h.

◆ resizeEvent()

void KexiReportView::resizeEvent ( TQResizeEvent * e)
protectedvirtual

Definition at line 441 of file kexireportview.cpp.

◆ resizeMode()

int KexiReportView::resizeMode ( ) const
inline

Definition at line 83 of file kexireportview.h.

◆ setForm()

void KexiReportView::setForm ( KFormDesigner::Form * f)
protected

Definition at line 174 of file kexireportview.cpp.

◆ show

void KexiReportView::show ( )
virtualslot

Reimplemented to update resize policy.

Definition at line 454 of file kexireportview.cpp.

◆ slotDirty

void KexiReportView::slotDirty ( KFormDesigner::Form * f,
bool isDirty )
protectedslot

Definition at line 296 of file kexireportview.cpp.

◆ slotFocus

void KexiReportView::slotFocus ( bool in)
protectedslot

Definition at line 469 of file kexireportview.cpp.

◆ slotPropertySetSwitched

void KexiReportView::slotPropertySetSwitched ( KoProperty::Set * set,
bool forceReload = false )
protectedslot

Definition at line 237 of file kexireportview.cpp.

◆ storeData()

tristate KexiReportView::storeData ( bool dontAsk = false)
protectedvirtual

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.

◆ storeNewData()

KexiDB::SchemaData * KexiReportView::storeNewData ( const KexiDB::SchemaData & sdata,
bool & cancel )
protectedvirtual

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.

◆ tempData()

KexiReportPart::TempData * KexiReportView::tempData ( ) const
inlineprotected

Definition at line 109 of file kexireportview.h.


The documentation for this class was generated from the following files: