KexiInternalPart Class Reference
#include <kexiinternalpart.h>
Inheritance diagram for KexiInternalPart:

Detailed Description
A prototype for Kexi Internal Parts (plugins) implementation.Internal Kexi parts are parts that are not available for users, but loaded internally be application when needed. Example of such part is Relations Window. The internal part instance is unique and has no explicitly stored data. Parts may be able to create widgets or/and dialogs, depending on implementation (createWidgetInstance(), createDialogInstance()). Parts can have unique flag set for dialogs (true by default)
- then a dialog created by createDialogInstance() is unique.
Definition at line 49 of file kexiinternalpart.h.
Public Member Functions | |
| KexiInternalPart (QObject *parent, const char *name, const QStringList &) | |
| virtual | ~KexiInternalPart () |
| KexiDialogBase * | instance (KexiMainWindow *parent) |
| bool | uniqueDialog () const |
| bool | cancelled () const |
Static Public Member Functions | |
| static QWidget * | createWidgetInstance (const char *partName, const char *widgetClass, KexiDB::MessageHandler *msgHdr, KexiMainWindow *mainWin, QWidget *parent, const char *objName=0, QMap< QString, QString > *args=0) |
| static QWidget * | createWidgetInstance (const char *partName, KexiDB::MessageHandler *msgHdr, KexiMainWindow *mainWin, QWidget *parent, const char *objName=0, QMap< QString, QString > *args=0) |
| static KexiDialogBase * | createKexiDialogInstance (const char *partName, KexiDB::MessageHandler *msgHdr, KexiMainWindow *mainWin, const char *objName=0) |
| static QDialog * | createModalDialogInstance (const char *partName, const char *dialogClass, KexiDB::MessageHandler *msgHdr, KexiMainWindow *mainWin, const char *objName=0, QMap< QString, QString > *args=0) |
| static QDialog * | createModalDialogInstance (const char *partName, KexiDB::MessageHandler *msgHdr, KexiMainWindow *mainWin, const char *objName=0, QMap< QString, QString > *args=0) |
| static bool | executeCommand (const char *partName, KexiMainWindow *mainWin, const char *commandName, QMap< QString, QString > *args=0) |
| static const KexiInternalPart * | part (KexiDB::MessageHandler *msgHdr, const char *partName) |
Protected Member Functions | |
| KexiDialogBase * | findOrCreateKexiDialog (KexiMainWindow *mainWin, const char *objName) |
| virtual QWidget * | createWidget (const char *widgetClass, KexiMainWindow *mainWin, QWidget *parent, const char *objName=0, QMap< QString, QString > *args=0) |
| virtual KexiViewBase * | createView (KexiMainWindow *mainWin, QWidget *parent, const char *objName=0) |
| virtual bool | executeCommand (KexiMainWindow *mainWin, const char *commandName, QMap< QString, QString > *args=0) |
Protected Attributes | |
| QGuardedPtr< QWidget > | m_uniqueWidget |
| Unique dialog - we're using guarded ptr for the dialog so can know if it has been closed. | |
| bool | m_uniqueDialog: 1 |
| true if createDialogInstance() should return only one dialog | |
| bool | m_cancelled: 1 |
| Used in cancelled(). | |
Constructor & Destructor Documentation
|
||||||||||||||||
|
Definition at line 74 of file kexiinternalpart.cpp. |
|
|
Definition at line 81 of file kexiinternalpart.cpp. |
Member Function Documentation
|
|
Definition at line 124 of file kexiinternalpart.h. |
|
||||||||||||||||||||
|
Creates a new dialog instance. If such instance already exists, and is unique (see uniqueDialog()) it is just returned. The part knows about destroying its dialog instance, (if it is uinque), so on another call the dialog will be created again. msgHdr is a message handler for displaying error messages. The dialog is assigned to mainWin as its parent, and objName name is set. Definition at line 129 of file kexiinternalpart.cpp. References findOrCreateKexiDialog(). Referenced by KexiMainWindowImpl::slotProjectRelations(). |
|
||||||||||||||||||||||||
|
Adeded For convenience. Definition at line 105 of file kexiinternalpart.h. |
|
||||||||||||||||||||||||||||
|
Creates a new modal dialog instance (QDialog or a subclass). If such instance already exists, and is unique (see uniqueDialog()) it is just returned. dialogClass is a pseudo class used in case when the part offers more than one dialog type. msgHdr is a message handler for displaying error messages. args is two-way optional argument: it can contain custom options used on widget's creation. Depending on implementation, the created dialog can write its state (e.g. result or status information) back to this argument. The part knows about destroying its dialog instance, (if it is uinque), so on another call the dialog will be created again. The dialog is assigned to mainWin as its parent, and objName name is set. Definition at line 142 of file kexiinternalpart.cpp. References createWidget(), m_uniqueWidget, and uniqueDialog(). Referenced by KexiMacro::DataTableAction::activate(), KexiMainWindowImpl::copyItemToClipboardAsDataTable(), KexiMainWindowImpl::exportItemAsDataTable(), KexiMainWindowImpl::showProjectMigrationWizard(), KexiMainWindowImpl::slotEditPasteSpecialDataTable(), and KexiMainWindowImpl::slotProjectImportDataTable(). |
|
||||||||||||||||
|
Reimplement this if your internal part has to return a view object. Reimplemented in KexiRelationPartImpl. Definition at line 191 of file kexiinternalpart.cpp. Referenced by findOrCreateKexiDialog(). |
|
||||||||||||||||||||||||
|
Reimplement this if your internal part has to return widgets or QDialog objects. Reimplemented in KexiCSVImportExportPart, and KexiMigrationPart. Definition at line 180 of file kexiinternalpart.cpp. Referenced by createModalDialogInstance(), and createWidgetInstance(). |
|
||||||||||||||||||||||||||||
|
For convenience. Definition at line 72 of file kexiinternalpart.h. |
|
||||||||||||||||||||||||||||||||
|
Creates a new widget instance using part partName. widgetClass is a pseudo class used in case when the part offers more than one widget type. msgHdr is a message handler for displaying error messages. args is two-way optional argument: it can contain custom options used on widget's creation. Depending on implementation, the created widget can write its state (e.g. result or status information) back to this argument. Created widget will have assigned parent widget and objName name. Definition at line 93 of file kexiinternalpart.cpp. References createWidget(). |
|
||||||||||||||||
|
Reimplement this if your internal part has to execute a command commandName (usually nonvisual). Arguments are put into args and the result can be put into the args.
Reimplemented in KexiCSVImportExportPart. Definition at line 200 of file kexiinternalpart.cpp. |
|
||||||||||||||||||||
|
Executes a command commandName (usually nonvisual) using part called partName. The result can be put into the args.
Definition at line 169 of file kexiinternalpart.cpp. References executeCommand(). Referenced by executeCommand(). |
|
||||||||||||
|
Used internally Definition at line 103 of file kexiinternalpart.cpp. References KexiDialogBase::addView(), createView(), m_uniqueDialog, m_uniqueWidget, KexiDialogBase::registerDialog(), and KexiDialogBase::setId(). Referenced by createKexiDialogInstance(). |
|
|
|
|
||||||||||||
|
Definition at line 87 of file kexiinternalpart.cpp. |
|
|
Definition at line 119 of file kexiinternalpart.h. Referenced by createModalDialogInstance(). |
Member Data Documentation
|
|
Used in cancelled().
Definition at line 156 of file kexiinternalpart.h. Referenced by KexiCSVImportExportPart::createWidget(). |
|
|
true if createDialogInstance() should return only one dialog
Definition at line 154 of file kexiinternalpart.h. Referenced by findOrCreateKexiDialog(). |
|
|
Unique dialog - we're using guarded ptr for the dialog so can know if it has been closed.
Definition at line 152 of file kexiinternalpart.h. Referenced by createModalDialogInstance(), and findOrCreateKexiDialog(). |
The documentation for this class was generated from the following files:
