Kexi API Documentation (2.0 alpha)

KexiTablePart Class Reference

#include <kexitablepart.h>

Inheritance diagram for KexiTablePart:

KexiPart::Part List of all members.

Public Member Functions

 KexiTablePart (QObject *parent, const char *name, const QStringList &)
virtual ~KexiTablePart ()
virtual bool remove (KexiMainWindow *win, KexiPart::Item &item)
virtual tristate rename (KexiMainWindow *win, KexiPart::Item &item, const QString &newName)
virtual QString i18nMessage (const QCString &englishMessage, KexiDialogBase *dlg) const
KexiLookupColumnPagelookupColumnPage () const

Static Public Member Functions

static tristate askForClosingObjectsUsingTableSchema (QWidget *parent, KexiDB::Connection &conn, KexiDB::TableSchema &table, const QString &msg)

Protected Member Functions

virtual KexiDialogTempDatacreateTempData (KexiDialogBase *dialog)
virtual KexiViewBasecreateView (QWidget *parent, KexiDialogBase *dialog, KexiPart::Item &item, int viewMode=Kexi::DataViewMode, QMap< QString, QString > *staticObjectArgs=0)
virtual void initPartActions ()
virtual void initInstanceActions ()
virtual void setupCustomPropertyPanelTabs (KTabWidget *tab, KexiMainWindow *mainWin)
virtual KexiDB::SchemaDataloadSchemaData (KexiDialogBase *dlg, const KexiDB::SchemaData &sdata, int viewMode)

Classes

class  TempData

Constructor & Destructor Documentation

KexiTablePart::KexiTablePart QObject *  parent,
const char *  name,
const QStringList & 
 

Definition at line 57 of file kexitablepart.cpp.

References Kexi::DataViewMode, Kexi::DesignViewMode, KexiPart::Part::m_names, KexiPart::Part::m_registeredPartID, KexiPart::Part::m_supportedViewModes, and KexiPart::TableObjectType.

KexiTablePart::~KexiTablePart  )  [virtual]
 

Definition at line 75 of file kexitablepart.cpp.


Member Function Documentation

tristate KexiTablePart::askForClosingObjectsUsingTableSchema QWidget parent,
KexiDB::Connection conn,
KexiDB::TableSchema table,
const QString msg
[static]
 

Definition at line 174 of file kexitablepart.cpp.

References cancelled, KexiDB::Connection::closeAllTableSchemaChangeListeners(), and KexiDB::Connection::tableSchemaChangeListeners().

Referenced by remove(), and KexiTableDesignerView::storeData().

KexiDialogTempData * KexiTablePart::createTempData KexiDialogBase dialog  )  [protected, virtual]
 

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 94 of file kexitablepart.cpp.

KexiViewBase * KexiTablePart::createView QWidget parent,
KexiDialogBase dialog,
KexiPart::Item item,
int  viewMode = Kexi::DataViewMode,
QMap< QString, QString > *  staticObjectArgs = 0
[protected, virtual]
 

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

Implements KexiPart::Part.

Definition at line 99 of file kexitablepart.cpp.

References Kexi::DataViewMode, Kexi::DesignViewMode, KexiDialogBase::mainWin(), KexiPart::Item::name(), KexiMainWindow::project(), KexiTablePart::TempData::table, and KexiDialogBase::tempData().

QString KexiTablePart::i18nMessage const QCString &  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 206 of file kexitablepart.cpp.

References KexiDialogBase::currentViewMode(), Kexi::DesignViewMode, and KexiDialogBase::neverSaved().

void KexiTablePart::initInstanceActions  )  [protected, virtual]
 

Reimplemented from KexiPart::Part.

Definition at line 84 of file kexitablepart.cpp.

References KexiPart::Part::createSharedToggleAction(), and Kexi::DesignViewMode.

void KexiTablePart::initPartActions  )  [protected, virtual]
 

Reimplemented from KexiPart::Part.

Definition at line 80 of file kexitablepart.cpp.

KexiDB::SchemaData * KexiTablePart::loadSchemaData KexiDialogBase dlg,
const KexiDB::SchemaData sdata,
int  viewMode
[protected, virtual]
 

Reimplemented from KexiPart::Part.

Definition at line 159 of file kexitablepart.cpp.

References KexiDB::SchemaData::name().

KexiLookupColumnPage * KexiTablePart::lookupColumnPage  )  const
 

Definition at line 247 of file kexitablepart.cpp.

bool KexiTablePart::remove KexiMainWindow win,
KexiPart::Item item
[virtual]
 

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 128 of file kexitablepart.cpp.

References askForClosingObjectsUsingTableSchema(), KexiDB::Connection::dropTable(), KexiPart::Item::identifier(), KexiDB::SchemaData::name(), KexiMainWindow::project(), KexiDB::Connection::removeObject(), and KexiDB::Connection::tableSchema().

tristate KexiTablePart::rename KexiMainWindow win,
KexiPart::Item item,
const QString newName
[virtual]
 

Renames stored data pointed by item to newName (example: table name is altered in the database). For this, a database connection associated with kexi project owned by win can be used. You do not need to change item, and change object's schema stored in the database, beacuse this is automatically handled by KexiProject.

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 does nothing and returns true.

Reimplemented from KexiPart::Part.

Definition at line 147 of file kexitablepart.cpp.

References KexiDB::Connection::alterTableName(), KexiPart::Item::identifier(), and KexiDB::Connection::tableSchema().

void KexiTablePart::setupCustomPropertyPanelTabs KTabWidget tab,
KexiMainWindow mainWin
[protected, virtual]
 

Todo:
add "Table" tab
Todo:
add lookup field icon

Reimplemented from KexiPart::Part.

Definition at line 221 of file kexitablepart.cpp.

References KexiMainWindow::project().


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:29 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003