KexiPart::Part Class Reference
#include <kexipart.h>
Inheritance diagram for KexiPart::Part:

Detailed Description
The main class for kexi frontend parts like tables, queries, forms and reports.
Definition at line 65 of file kexipart.h.
Signals | |
| void | newObjectRequest (KexiPart::Info *info) |
Public Member Functions | |
| Part (QObject *parent, const char *name, const QStringList &) | |
| virtual | ~Part () |
| virtual bool | execute (KexiPart::Item *item, QObject *sender=0) |
| int | supportedViewModes () const |
| int | supportedUserViewModes () const |
| KexiDialogBase * | openInstance (KexiMainWindow *win, KexiPart::Item &item, int viewMode=Kexi::DataViewMode, QMap< QString, QString > *staticObjectArgs=0) |
| virtual bool | remove (KexiMainWindow *win, KexiPart::Item &item) |
| virtual tristate | rename (KexiMainWindow *win, KexiPart::Item &item, const QString &newName) |
| virtual KexiDialogTempData * | createTempData (KexiDialogBase *dialog) |
| virtual KexiViewBase * | createView (QWidget *parent, KexiDialogBase *dialog, KexiPart::Item &item, int viewMode=Kexi::DataViewMode, QMap< QString, QString > *staticObjectArgs=0)=0 |
| QCString | instanceName () const |
| QString | instanceCaption () const |
| Info * | info () const |
| GUIClient * | guiClient () const |
| GUIClient * | instanceGuiClient (int mode=0) const |
| KActionCollection * | actionCollectionForMode (int viewMode) const |
| const Kexi::ObjectStatus & | lastOperationStatus () const |
| virtual QString | i18nMessage (const QCString &englishMessage, KexiDialogBase *dlg) const |
Protected Slots | |
| void | slotCreate () |
Protected Member Functions | |
| Part (QObject *parent, StaticInfo *info) | |
| Used by StaticPart. | |
| void | createGUIClients (KexiMainWindow *win) |
| Creates GUICLients for this part, attached to win This method is called from KexiMainWindow. | |
| virtual void | initPartActions () |
| virtual void | initInstanceActions () |
| virtual KexiDB::SchemaData * | loadSchemaData (KexiDialogBase *dlg, const KexiDB::SchemaData &sdata, int viewMode) |
| bool | loadDataBlock (KexiDialogBase *dlg, QString &dataString, const QString &dataID=QString::null) |
| KAction * | createSharedAction (int mode, const QString &text, const QString &pix_name, const KShortcut &cut, const char *name, const char *subclassName=0) |
| KAction * | createSharedToggleAction (int mode, const QString &text, const QString &pix_name, const KShortcut &cut, const char *name) |
| KAction * | createSharedPartAction (const QString &text, const QString &pix_name, const KShortcut &cut, const char *name, const char *subclassName=0) |
| KAction * | createSharedPartToggleAction (const QString &text, const QString &pix_name, const KShortcut &cut, const char *name) |
| void | setActionAvailable (const char *action_name, bool avail) |
| void | setInfo (Info *info) |
| virtual void | setupCustomPropertyPanelTabs (KTabWidget *tab, KexiMainWindow *mainWin) |
Protected Attributes | |
| QMap< QString, QString > | m_names |
| Set of i18n'd action names for, initialised on KexiPart::Part subclass ctor The names are useful because the same action can have other name for each part E.g. | |
| int | m_supportedViewModes |
| int | m_supportedUserViewModes |
| Info * | m_info |
| GUIClient * | m_guiClient |
| QIntDict< GUIClient > | m_instanceGuiClients |
| KexiMainWindow * | m_mainWin |
| Kexi::ObjectStatus | m_status |
| int | m_registeredPartID |
| bool | m_newObjectsAreDirty: 1 |
| PartPrivate * | d |
Friends | |
| class | Manager |
| class | ::KexiMainWindow |
| class | ::KexiMainWindowImpl |
| class | GUIClient |
Constructor & Destructor Documentation
|
||||||||||||||||
|
Constructor. Definition at line 90 of file kexipart.cpp. References Kexi::DataViewMode, Kexi::DesignViewMode, m_info, m_mainWin, m_newObjectsAreDirty, m_supportedUserViewModes, and m_supportedViewModes. |
|
|
Destructor. Definition at line 116 of file kexipart.cpp. References d. |
|
||||||||||||
|
Used by StaticPart.
Definition at line 103 of file kexipart.cpp. References Kexi::DesignViewMode, m_info, m_mainWin, m_newObjectsAreDirty, m_supportedUserViewModes, and m_supportedViewModes. |
Member Function Documentation
|
|
Definition at line 164 of file kexipart.cpp. References m_instanceGuiClients. Referenced by KexiFormManager::action(), KexiReportPart::initInstanceActions(), and KexiFormPart::initInstanceActions(). |
|
|
Creates GUICLients for this part, attached to win This method is called from KexiMainWindow.
Definition at line 121 of file kexipart.cpp. References Kexi::AllViewModes, GUIClient, info(), initPartActions(), instanceGuiClient(), m_guiClient, m_instanceGuiClients, m_mainWin, m_names, m_supportedViewModes, KexiPart::nameForCreateAction(), Kexi::nameForViewMode(), and slotCreate(). |
|
||||||||||||||||||||||||||||
|
Creates shared action for action collection declared for 'instance actions' of this part. See KexiSharedActionHost::createSharedAction() for details. Pass desired KAction subclass with subclassName (e.g. "KToggleAction") to have that subclass allocated instead just KAction (what is the default). Definition at line 170 of file kexipart.cpp. References KexiSharedActionHost::createSharedAction(), instanceGuiClient(), m_instanceGuiClients, and m_mainWin. Referenced by createSharedToggleAction(), KexiScriptPart::initInstanceActions(), KexiQueryPart::initInstanceActions(), and KexiFormPart::initInstanceActions(). |
|
||||||||||||||||||||||||
|
Creates shared action for action collection declared for 'part actions' of this part. See KexiSharedActionHost::createSharedAction() for details. Pass desired KAction subclass with subclassName (e.g. "KToggleAction") to have that subclass allocated instead just KAction (what is the default). Definition at line 183 of file kexipart.cpp. References KexiSharedActionHost::createSharedAction(), m_guiClient, and m_mainWin. Referenced by createSharedPartToggleAction(). |
|
||||||||||||||||||||
|
Convenience version of above method - creates shared toggle action for 'part actions' of this part. Definition at line 199 of file kexipart.cpp. References createSharedPartAction(). |
|
||||||||||||||||||||||||
|
Convenience version of above method - creates shared toggle action. Definition at line 193 of file kexipart.cpp. References createSharedAction(). Referenced by KexiTablePart::initInstanceActions(), and KexiQueryPart::initInstanceActions(). |
|
|
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 in KexiFormPart, KexiQueryPart, KexiReportPart, and KexiTablePart. Definition at line 393 of file kexipart.cpp. Referenced by openInstance(). |
|
||||||||||||||||||||||||
|
Creates a new view for mode viewMode, item and parent. The view will be used inside dialog. Implemented in KexiPart::StaticPart, KexiSimplePrintingPart, KexiFormPart, KexiMacroPart, KexiQueryPart, KexiReportPart, KexiScriptPart, and KexiTablePart. |
|
||||||||||||
|
Try to execute the part. Implementations of this Part are able to overwrite this method to offer execution.
Reimplemented in KexiMacroPart, and KexiScriptPart. Definition at line 84 of file kexipart.h. Referenced by KexiFormEventAction::activate(), KexiMacro::ExecuteAction::activate(), and KexiMainWindowImpl::executeItem(). |
|
|
Definition at line 170 of file kexipart.h. Referenced by KexiReportPart::initInstanceActions(). |
|
||||||||||||
|
Reimplemented in KexiFormPart, KexiQueryPart, KexiReportPart, and KexiTablePart. Definition at line 398 of file kexipart.cpp. Referenced by KexiMainWindowImpl::getNewObjectInfo(). |
|
|
|
Reimplemented in KexiFormPart, KexiMacroPart, KexiQueryPart, KexiReportPart, KexiScriptPart, and KexiTablePart. Definition at line 381 of file kexipart.cpp. Referenced by openInstance(). |
|
|
Reimplemented in KexiFormPart, KexiMacroPart, KexiQueryPart, KexiReportPart, KexiScriptPart, and KexiTablePart. Definition at line 377 of file kexipart.cpp. Referenced by createGUIClients(). |
|
|
i18n'd instance name usable for displaying in gui as object's caption.
Definition at line 415 of file kexipart.cpp. References m_names. Referenced by KexiProject::createPartItem(), KexiMainWindowImpl::removeObject(), and KexiBrowser::slotContextMenu(). |
|
|
Definition at line 174 of file kexipart.h. Referenced by createGUIClients(), and createSharedAction(). |
|
|
i18n'd instance name usable for displaying in gui as object's name. The name is valid identifier - contains latin1 lowercase characters only.
Definition at line 408 of file kexipart.cpp. References m_names, and KexiUtils::string2Identifier(). Referenced by KexiProject::createPartItem(). |
|
|
Definition at line 188 of file kexipart.h. Referenced by KexiProject::openObject(), and KexiProject::renameObject(). |
|
||||||||||||||||
|
Definition at line 366 of file kexipart.cpp. References Kexi::ObjectStatus::append(), KexiDialogBase::id(), m_status, and KexiDialogBase::mainWin(). Referenced by KexiQueryPart::loadSchemaData(). |
|
||||||||||||||||
|
Reimplemented in KexiQueryPart, and KexiTablePart. Definition at line 358 of file kexipart.cpp. Referenced by KexiQueryPart::loadSchemaData(), and openInstance(). |
|
|
Referenced by slotCreate(). |
|
||||||||||||||||||||
|
||||||||||||
|
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 in KexiQueryPart, and KexiTablePart. Definition at line 385 of file kexipart.cpp. References KexiPart::Item::identifier(), KexiMainWindow::project(), and KexiDB::Connection::removeObject(). Referenced by KexiProject::removeObject(). |
|
||||||||||||||||
|
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 in KexiQueryPart, and KexiTablePart. Definition at line 420 of file kexipart.cpp. Referenced by KexiProject::renameObject(). |
|
||||||||||||
|
Definition at line 222 of file kexipart.cpp. References m_instanceGuiClients, m_mainWin, and KexiSharedActionHost::setActionAvailable(). |
|
|
Definition at line 283 of file kexipart.h. Referenced by KexiPart::Manager::part(). |
|
||||||||||||
|
This method can be reimplemented to setup additional tabs in the property editor panel. Default implementation does nothing. This method is called whenever current dialog (KexiDialogBase) is switched and type (mime type) of its contents differs from previous one. For example, if a user switched from Table Designer to Form Designer, additional tab containing Form Designer's object tree should be shown. Reimplemented in KexiFormPart, and KexiTablePart. Definition at line 404 of file kexipart.cpp. |
|
|
Definition at line 353 of file kexipart.cpp. References m_info, and newObjectRequest(). Referenced by createGUIClients(). |
|
|
Definition at line 105 of file kexipart.h. Referenced by KexiMainWindowImpl::openingAllowed(). |
|
|
Definition at line 97 of file kexipart.h. Referenced by KexiMainWindowImpl::openObjectFromNavigator(), and KexiBrowser::slotSelectionChanged(). |
Friends And Related Function Documentation
|
|
Definition at line 326 of file kexipart.h. |
|
|
Definition at line 327 of file kexipart.h. |
|
|
Definition at line 328 of file kexipart.h. Referenced by createGUIClients(). |
|
|
Definition at line 325 of file kexipart.h. |
Member Data Documentation
|
|
Definition at line 323 of file kexipart.h. Referenced by openInstance(), and ~Part(). |
|
|
Definition at line 308 of file kexipart.h. Referenced by createGUIClients(), and createSharedPartAction(). |
|
|
Definition at line 307 of file kexipart.h. Referenced by openInstance(), Part(), and slotCreate(). |
|
|
Definition at line 309 of file kexipart.h. Referenced by actionCollectionForMode(), createGUIClients(), createSharedAction(), and setActionAvailable(). |
|
|
Definition at line 310 of file kexipart.h. Referenced by createGUIClients(), createSharedAction(), createSharedPartAction(), KexiScriptPart::execute(), KexiMacroPart::execute(), KexiScriptPart::initPartActions(), KexiMacroPart::initPartActions(), Part(), and setActionAvailable(). |
|
|
Set of i18n'd action names for, initialised on KexiPart::Part subclass ctor The names are useful because the same action can have other name for each part E.g. "New table" vs "New query" can have different forms for some languages... Definition at line 296 of file kexipart.h. Referenced by createGUIClients(), instanceCaption(), instanceName(), KexiFormPart::KexiFormPart(), KexiMacroPart::KexiMacroPart(), KexiQueryPart::KexiQueryPart(), KexiReportPart::KexiReportPart(), KexiScriptPart::KexiScriptPart(), KexiSimplePrintingPart::KexiSimplePrintingPart(), and KexiTablePart::KexiTablePart(). |
|
|
True if newwly created, unsaved objects are dirty. False by default. You can change it in your subclass' constructor. Definition at line 321 of file kexipart.h. Referenced by KexiFormPart::KexiFormPart(), openInstance(), and Part(). |
|
|
If you're implementing a new part, set this to value >0 in your ctor if you have well known (ie registered ID) for your part. So far, table, query, form, report and script part have defined their IDs (see KexiPart::ObjectTypes). Definition at line 317 of file kexipart.h. Referenced by KexiFormPart::KexiFormPart(), KexiMacroPart::KexiMacroPart(), KexiQueryPart::KexiQueryPart(), KexiReportPart::KexiReportPart(), KexiScriptPart::KexiScriptPart(), KexiTablePart::KexiTablePart(), and KexiPart::Manager::part(). |
|
|
Definition at line 311 of file kexipart.h. Referenced by loadDataBlock(), and openInstance(). |
|
|
Supported modes for dialogs created by this part in "user mode". The default is Kexi::DataViewMode. It is altered in classes like KexiSimplePrintingPart.
Definition at line 305 of file kexipart.h. Referenced by KexiSimplePrintingPart::KexiSimplePrintingPart(), and Part(). |
|
|
Supported modes for dialogs created by this part.
Definition at line 300 of file kexipart.h. Referenced by createGUIClients(), KexiFormPart::KexiFormPart(), KexiMacroPart::KexiMacroPart(), KexiQueryPart::KexiQueryPart(), KexiReportPart::KexiReportPart(), KexiScriptPart::KexiScriptPart(), KexiSimplePrintingPart::KexiSimplePrintingPart(), KexiTablePart::KexiTablePart(), openInstance(), and Part(). |
The documentation for this class was generated from the following files:
