kexi

KexiInternalPart Class Reference

#include <kexiinternalpart.h>

Inheritance diagram for KexiInternalPart:

KexiCSVImportExportPart KexiMigrationPart KexiRelationPartImpl List of all members.

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 explicity 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 ()
KexiDialogBaseinstance (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 KexiDialogBasecreateKexiDialogInstance (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 const KexiInternalPartpart (KexiDB::MessageHandler *msgHdr, const char *partName)

Protected Member Functions

KexiDialogBasefindOrCreateKexiDialog (KexiMainWindow *mainWin, const char *objName)
virtual QWidget * createWidget (const char *, KexiMainWindow *, QWidget *, const char *=0, QMap< QString, QString > *=0)
virtual KexiViewBasecreateView (KexiMainWindow *, QWidget *, const char *=0)

Protected Attributes

QGuardedPtr< QWidget > m_uniqueWidget
bool m_uniqueDialog: 1
bool m_cancelled: 1

Member Function Documentation

bool KexiInternalPart::cancelled (  )  const [inline]

Returns:
true if the part creation has been cancelled (eg. by a user) so it wasn't an error. Internal part's impelmentation should set it to true when needed. False by default.

Definition at line 119 of file kexiinternalpart.h.

KexiDialogBase * KexiInternalPart::createKexiDialogInstance ( const char *  partName,
KexiDB::MessageHandler msgHdr,
KexiMainWindow mainWin,
const char *  objName = 0 
) [static]

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.

static QDialog* KexiInternalPart::createModalDialogInstance ( const char *  partName,
KexiDB::MessageHandler msgHdr,
KexiMainWindow mainWin,
const char *  objName = 0,
QMap< QString, QString > *  args = 0 
) [inline, static]

Adeded For convenience.

Definition at line 105 of file kexiinternalpart.h.

QDialog * KexiInternalPart::createModalDialogInstance ( const char *  partName,
const char *  dialogClass,
KexiDB::MessageHandler msgHdr,
KexiMainWindow mainWin,
const char *  objName = 0,
QMap< QString, QString > *  args = 0 
) [static]

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.

virtual QWidget* KexiInternalPart::createWidget ( const char *  ,
KexiMainWindow ,
QWidget *  ,
const char *  = 0,
QMap< QString, QString > *  = 0 
) [inline, protected, virtual]

Reimplement this if your internal part has to return widgets or QDialog objects.

Reimplemented in KexiCSVImportExportPart, and KexiMigrationPart.

Definition at line 128 of file kexiinternalpart.h.

static QWidget* KexiInternalPart::createWidgetInstance ( const char *  partName,
KexiDB::MessageHandler msgHdr,
KexiMainWindow mainWin,
QWidget *  parent,
const char *  objName = 0,
QMap< QString, QString > *  args = 0 
) [inline, static]

For convenience.

Definition at line 72 of file kexiinternalpart.h.

QWidget * KexiInternalPart::createWidgetInstance ( const char *  partName,
const char *  widgetClass,
KexiDB::MessageHandler msgHdr,
KexiMainWindow mainWin,
QWidget *  parent,
const char *  objName = 0,
QMap< QString, QString > *  args = 0 
) [static]

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.

KexiDialogBase * KexiInternalPart::findOrCreateKexiDialog ( KexiMainWindow mainWin,
const char *  objName 
) [protected]

Used internally

Definition at line 103 of file kexiinternalpart.cpp.

const KexiInternalPart * KexiInternalPart::part ( KexiDB::MessageHandler msgHdr,
const char *  partName 
) [static]

Returns:
internal part of a name partName. Shouldn't be usable.

Definition at line 87 of file kexiinternalpart.cpp.

bool KexiInternalPart::uniqueDialog (  )  const [inline]

Returns:
true if the part can create only one (unique) dialog.

Definition at line 114 of file kexiinternalpart.h.


Member Data Documentation

true if createDialogInstance() should return only one dialog

Definition at line 142 of file kexiinternalpart.h.

QGuardedPtr<QWidget> KexiInternalPart::m_uniqueWidget [protected]

Unique dialog - we're using guarded ptr for the dialog so can know if it has been closed.

Definition at line 140 of file kexiinternalpart.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys