kexi

#include <kexiquerypart.h>

Inheritance diagram for KexiQueryPart:
KexiPart::Part

Classes

class  TempData

Public Member Functions

 KexiQueryPart (TQObject *parent, const char *name, const TQStringList &)
virtual bool remove (KexiMainWindow *win, KexiPart::Item &item)
virtual TQString i18nMessage (const TQCString &englishMessage, KexiDialogBase *dlg) const
virtual tristate rename (KexiMainWindow *win, KexiPart::Item &item, const TQString &newName)
Public Member Functions inherited from KexiPart::Part
 Part (TQObject *parent, const char *name, const TQStringList &)
virtual ~Part ()
virtual bool execute (KexiPart::Item *item, TQObject *sender=0)
int supportedViewModes () const
int supportedUserViewModes () const
KexiDialogBase * openInstance (KexiMainWindow *win, KexiPart::Item &item, int viewMode=Kexi::DataViewMode, TQMap< TQString, TQString > *staticObjectArgs=0)
TQCString instanceName () const
TQString instanceCaption () const
Info * info () const
GUIClient * guiClient () const
GUIClient * instanceGuiClient (int mode=0) const
TDEActionCollection * actionCollectionForMode (int viewMode) const
const Kexi::ObjectStatus & lastOperationStatus () const

Protected Member Functions

virtual KexiDialogTempData * createTempData (KexiDialogBase *dialog)
virtual KexiViewBase * createView (TQWidget *parent, KexiDialogBase *dialog, KexiPart::Item &item, int viewMode=Kexi::DataViewMode, TQMap< TQString, TQString > *staticObjectArgs=0)
virtual void initPartActions ()
virtual void initInstanceActions ()
virtual KexiDB::SchemaData * loadSchemaData (KexiDialogBase *dlg, const KexiDB::SchemaData &sdata, int viewMode)
Protected Member Functions inherited from KexiPart::Part
 Part (TQObject *parent, StaticInfo *info)
void createGUIClients (KexiMainWindow *win)
bool loadDataBlock (KexiDialogBase *dlg, TQString &dataString, const TQString &dataID=TQString())
TDEAction * createSharedAction (int mode, const TQString &text, const TQString &pix_name, const TDEShortcut &cut, const char *name, const char *subclassName=0)
TDEAction * createSharedToggleAction (int mode, const TQString &text, const TQString &pix_name, const TDEShortcut &cut, const char *name)
TDEAction * createSharedPartAction (const TQString &text, const TQString &pix_name, const TDEShortcut &cut, const char *name, const char *subclassName=0)
TDEAction * createSharedPartToggleAction (const TQString &text, const TQString &pix_name, const TDEShortcut &cut, const char *name)
void setActionAvailable (const char *action_name, bool avail)
void setInfo (Info *info)
virtual void setupCustomPropertyPanelTabs (KTabWidget *tab, KexiMainWindow *mainWin)

Additional Inherited Members

Signals inherited from KexiPart::Part
void newObjectRequest (KexiPart::Info *info)
Protected Slots inherited from KexiPart::Part
void slotCreate ()
Protected Attributes inherited from KexiPart::Part
TQMap< TQString, TQString > m_names
int m_supportedViewModes
int m_supportedUserViewModes
Info * m_info
GUIClient * m_guiClient
TQIntDict< GUIClient > m_instanceGuiClients
KexiMainWindow * m_mainWin
Kexi::ObjectStatus m_status
int m_registeredPartID
bool m_newObjectsAreDirty: 1
PartPrivate * d

Detailed Description

Kexi Query Designer Plugin.

Definition at line 44 of file kexiquerypart.h.

Constructor & Destructor Documentation

◆ KexiQueryPart()

KexiQueryPart::KexiQueryPart ( TQObject * parent,
const char * name,
const TQStringList & l )

Definition at line 40 of file kexiquerypart.cpp.

◆ ~KexiQueryPart()

KexiQueryPart::~KexiQueryPart ( )
virtual

Definition at line 55 of file kexiquerypart.cpp.

Member Function Documentation

◆ createTempData()

KexiDialogTempData * KexiQueryPart::createTempData ( KexiDialogBase * dialog)
protectedvirtual

Creates and returns a new temporary data for a dialog dialog. This method is called on openInstance() once per dialog. Reimplement this to return KexiDialogTempData subclass instance. Default implemention just returns empty KexiDialogTempData object.

Reimplemented from KexiPart::Part.

Definition at line 60 of file kexiquerypart.cpp.

◆ createView()

KexiViewBase * KexiQueryPart::createView ( TQWidget * parent,
KexiDialogBase * dialog,
KexiPart::Item & item,
int viewMode = Kexi::DataViewMode,
TQMap< TQString, TQString > * staticObjectArgs = 0 )
protectedvirtual

Creates a new view for mode viewMode, item and parent. The view will be used inside dialog.

Implements KexiPart::Part.

Definition at line 68 of file kexiquerypart.cpp.

◆ i18nMessage()

TQString KexiQueryPart::i18nMessage ( const TQCString & englishMessage,
KexiDialogBase * dlg ) const
virtual
Returns
i18n'd message translated from englishMessage. This method is useful for messages like: "<p>Table \"%1\" has been modified.</p>", – such messages can be accurately translated, while this could not: "<p>%1 \"%2\" has been modified.</p>". See implementation of this method in KexiTablePart to see what strings are needed for translation.

Default implementation returns generic englishMessage. In special cases, englishMessage can start with ":", to indicate that empty string will be generated if a part does not offer a message for such englishMessage. This is used e.g. in KexiMainWindowImpl::closeDialog().

Reimplemented from KexiPart::Part.

Definition at line 194 of file kexiquerypart.cpp.

◆ initInstanceActions()

void KexiQueryPart::initInstanceActions ( )
protectedvirtual

Reimplemented from KexiPart::Part.

Definition at line 142 of file kexiquerypart.cpp.

◆ initPartActions()

void KexiQueryPart::initPartActions ( )
protectedvirtual

Reimplemented from KexiPart::Part.

Definition at line 138 of file kexiquerypart.cpp.

◆ loadSchemaData()

KexiDB::SchemaData * KexiQueryPart::loadSchemaData ( KexiDialogBase * dlg,
const KexiDB::SchemaData & sdata,
int viewMode )
protectedvirtual

Reimplemented from KexiPart::Part.

Definition at line 161 of file kexiquerypart.cpp.

◆ remove()

bool KexiQueryPart::remove ( KexiMainWindow * win,
KexiPart::Item & item )
virtual
Todo
make it protected, outside world should use KexiProject

Removes any stored data pointed by item (example: table is dropped for table part). From now this data is inaccesible, and item disappear. You do not need to remove item, or remove object's schema stored in the database, beacuse this will be done automatically by KexiProject after successful call of this method. All object's data blocks are also automatically removed from database (from "kexi__objectdata" table). For this, a database connection associated with kexi project owned by win can be used.

Database transaction is started by KexiProject before calling this method, and it will be rolled back if you return false here. You shouldn't use by hand transactions here.

Default implementation just removes object from kexi__* system structures at the database backend using KexiDB::Connection::removeObject().

Reimplemented from KexiPart::Part.

Definition at line 101 of file kexiquerypart.cpp.

◆ rename()

tristate KexiQueryPart::rename ( KexiMainWindow * win,
KexiPart::Item & item,
const TQString & newName )
virtual

Renames stored data pointed by item to newName. Reimplemented to mark the query obsolete by using KexiDB::Connection::setQuerySchemaObsolete().

Reimplemented from KexiPart::Part.

Definition at line 205 of file kexiquerypart.cpp.


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