kexi

#include <kexiquerydesignersql.h>

Inheritance diagram for KexiQueryDesignerSQLView:
KexiViewBase KexiActionProxy

Signals

void queryShortcut ()
Signals inherited from KexiViewBase
void closing (bool &cancel)
void focus (bool in)

Public Member Functions

 KexiQueryDesignerSQLView (KexiMainWindow *mainWin, TQWidget *parent, const char *name=0)
TQString sqlText () const
KexiQueryDesignerSQLEditor * editor () const
virtual bool eventFilter (TQObject *o, TQEvent *e)
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 TQSize preferredSizeHint (const TQSize &otherSize)
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

bool slotCheckQuery ()
void slotUpdateMode ()
void slotTextChanged ()
void slotSelectQuery ()

Protected Member Functions

KexiQueryPart::TempData * tempData () const
virtual tristate beforeSwitchTo (int mode, bool &dontStore)
virtual tristate afterSwitchFrom (int mode)
virtual KexiDB::SchemaData * storeNewData (const KexiDB::SchemaData &sdata, bool &cancel)
virtual tristate storeData (bool dontAsk=false)
void setStatusOk ()
void setStatusError (const TQString &msg)
void setStatusEmpty ()
void setStatusText (const TQString &text)
virtual void updateActions (bool activated)
Protected Member Functions inherited from KexiViewBase
virtual void closeEvent (TQCloseEvent *e)
virtual KoProperty::Set * propertySet ()
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 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)

Friends

class KexiQueryView

Additional Inherited Members

Public Slots inherited from KexiViewBase
virtual void setFocus ()
virtual void propertySetSwitched ()
void setDirty (bool set)
void setDirty ()
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 KexiQueryDesignerSQLView class for editing Queries in text mode.

It is a view containing SQL text editor and SQL history/status widget splitted vertically. Depending on user's will, the widget can be in "sql history" mode or in "sql status" mode.

Definition at line 35 of file kexiquerydesignersql.h.

Constructor & Destructor Documentation

◆ KexiQueryDesignerSQLView()

KexiQueryDesignerSQLView::KexiQueryDesignerSQLView ( KexiMainWindow * mainWin,
TQWidget * parent,
const char * name = 0 )

Definition at line 102 of file kexiquerydesignersql.cpp.

◆ ~KexiQueryDesignerSQLView()

KexiQueryDesignerSQLView::~KexiQueryDesignerSQLView ( )
virtual

Definition at line 162 of file kexiquerydesignersql.cpp.

Member Function Documentation

◆ afterSwitchFrom()

tristate KexiQueryDesignerSQLView::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 283 of file kexiquerydesignersql.cpp.

◆ beforeSwitchTo()

tristate KexiQueryDesignerSQLView::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 208 of file kexiquerydesignersql.cpp.

◆ editor()

KexiQueryDesignerSQLEditor * KexiQueryDesignerSQLView::editor ( ) const

Definition at line 167 of file kexiquerydesignersql.cpp.

◆ eventFilter()

bool KexiQueryDesignerSQLView::eventFilter ( TQObject * o,
TQEvent * e )
virtual

Reimplemented from KexiViewBase.

Definition at line 410 of file kexiquerydesignersql.cpp.

◆ setStatusEmpty()

void KexiQueryDesignerSQLView::setStatusEmpty ( )
protected

Definition at line 186 of file kexiquerydesignersql.cpp.

◆ setStatusError()

void KexiQueryDesignerSQLView::setStatusError ( const TQString & msg)
protected

Definition at line 179 of file kexiquerydesignersql.cpp.

◆ setStatusOk()

void KexiQueryDesignerSQLView::setStatusOk ( )
protected

Definition at line 172 of file kexiquerydesignersql.cpp.

◆ setStatusText()

void KexiQueryDesignerSQLView::setStatusText ( const TQString & text)
protected

Definition at line 192 of file kexiquerydesignersql.cpp.

◆ slotCheckQuery

bool KexiQueryDesignerSQLView::slotCheckQuery ( )
protectedslot

Performs query checking (by text parsing).

Returns
true and sets d->parsedQuery to the new query schema object on success.

Definition at line 333 of file kexiquerydesignersql.cpp.

◆ slotSelectQuery

void KexiQueryDesignerSQLView::slotSelectQuery ( )
protectedslot

Definition at line 433 of file kexiquerydesignersql.cpp.

◆ slotTextChanged

void KexiQueryDesignerSQLView::slotTextChanged ( )
protectedslot

Definition at line 402 of file kexiquerydesignersql.cpp.

◆ slotUpdateMode

void KexiQueryDesignerSQLView::slotUpdateMode ( )
protectedslot

Definition at line 362 of file kexiquerydesignersql.cpp.

◆ sqlText()

TQString KexiQueryDesignerSQLView::sqlText ( ) const

Definition at line 328 of file kexiquerydesignersql.cpp.

◆ storeData()

tristate KexiQueryDesignerSQLView::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 501 of file kexiquerydesignersql.cpp.

◆ storeNewData()

KexiDB::SchemaData * KexiQueryDesignerSQLView::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 448 of file kexiquerydesignersql.cpp.

◆ tempData()

KexiQueryPart::TempData * KexiQueryDesignerSQLView::tempData ( ) const
protected

Definition at line 442 of file kexiquerydesignersql.cpp.

◆ updateActions()

void KexiQueryDesignerSQLView::updateActions ( bool activated)
protectedvirtual

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 from KexiViewBase.

Definition at line 423 of file kexiquerydesignersql.cpp.

◆ KexiQueryView

friend class KexiQueryView
friend

Definition at line 80 of file kexiquerydesignersql.h.


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