#include <kexipart.h>
|
| | 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) |
| |
| virtual bool | remove (KexiMainWindow *win, KexiPart::Item &item) |
| |
| virtual tristate | rename (KexiMainWindow *win, KexiPart::Item &item, const TQString &newName) |
| |
| virtual KexiDialogTempData * | createTempData (KexiDialogBase *dialog) |
| |
| virtual KexiViewBase * | createView (TQWidget *parent, KexiDialogBase *dialog, KexiPart::Item &item, int viewMode=Kexi::DataViewMode, TQMap< TQString, TQString > *staticObjectArgs=0)=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 |
| |
| virtual TQString | i18nMessage (const TQCString &englishMessage, KexiDialogBase *dlg) const |
| |
|
| | Part (TQObject *parent, StaticInfo *info) |
| |
| void | createGUIClients (KexiMainWindow *win) |
| |
| virtual void | initPartActions () |
| |
| virtual void | initInstanceActions () |
| |
| virtual KexiDB::SchemaData * | loadSchemaData (KexiDialogBase *dlg, const KexiDB::SchemaData &sdata, int viewMode) |
| |
| 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) |
| |
The main class for kexi frontend parts like tables, queries, forms and reports.
Definition at line 65 of file kexipart.h.
◆ Part() [1/2]
| Part::Part |
( |
TQObject * |
parent, |
|
|
const char * |
name, |
|
|
const TQStringList & |
|
|
) |
| |
◆ ~Part()
◆ Part() [2/2]
| Part::Part |
( |
TQObject * |
parent, |
|
|
StaticInfo * |
info |
|
) |
| |
|
protected |
◆ actionCollectionForMode()
| TDEActionCollection * Part::actionCollectionForMode |
( |
int |
viewMode | ) |
const |
- Returns
- action collection for mode viewMode.
Definition at line 164 of file kexipart.cpp.
◆ createGUIClients()
◆ createSharedAction()
| TDEAction * Part::createSharedAction |
( |
int |
mode, |
|
|
const TQString & |
text, |
|
|
const TQString & |
pix_name, |
|
|
const TDEShortcut & |
cut, |
|
|
const char * |
name, |
|
|
const char * |
subclassName = 0 |
|
) |
| |
|
protected |
Creates shared action for action collection declared for 'instance actions' of this part. See KexiSharedActionHost::createSharedAction() for details. Pass desired TDEAction subclass with subclassName (e.g. "TDEToggleAction") to have that subclass allocated instead just TDEAction (what is the default).
Definition at line 170 of file kexipart.cpp.
◆ createSharedPartAction()
| TDEAction * Part::createSharedPartAction |
( |
const TQString & |
text, |
|
|
const TQString & |
pix_name, |
|
|
const TDEShortcut & |
cut, |
|
|
const char * |
name, |
|
|
const char * |
subclassName = 0 |
|
) |
| |
|
protected |
Creates shared action for action collection declared for 'part actions' of this part. See KexiSharedActionHost::createSharedAction() for details. Pass desired TDEAction subclass with subclassName (e.g. "TDEToggleAction") to have that subclass allocated instead just TDEAction (what is the default).
Definition at line 183 of file kexipart.cpp.
◆ createSharedPartToggleAction()
| TDEAction * Part::createSharedPartToggleAction |
( |
const TQString & |
text, |
|
|
const TQString & |
pix_name, |
|
|
const TDEShortcut & |
cut, |
|
|
const char * |
name |
|
) |
| |
|
protected |
Convenience version of above method - creates shared toggle action for 'part actions' of this part.
Definition at line 199 of file kexipart.cpp.
◆ createSharedToggleAction()
| TDEAction * Part::createSharedToggleAction |
( |
int |
mode, |
|
|
const TQString & |
text, |
|
|
const TQString & |
pix_name, |
|
|
const TDEShortcut & |
cut, |
|
|
const char * |
name |
|
) |
| |
|
protected |
Convenience version of above method - creates shared toggle action.
Definition at line 193 of file kexipart.cpp.
◆ createTempData()
◆ createView()
| virtual KexiViewBase * KexiPart::Part::createView |
( |
TQWidget * |
parent, |
|
|
KexiDialogBase * |
dialog, |
|
|
KexiPart::Item & |
item, |
|
|
int |
viewMode = Kexi::DataViewMode, |
|
|
TQMap< TQString, TQString > * |
staticObjectArgs = 0 |
|
) |
| |
|
pure virtual |
◆ execute()
| virtual bool KexiPart::Part::execute |
( |
KexiPart::Item * |
item, |
|
|
TQObject * |
sender = 0 |
|
) |
| |
|
inlinevirtual |
- Todo:
- make it protected, outside world should use KexiProject
Try to execute the part. Implementations of this Part are able to overwrite this method to offer execution. - Parameters
-
| item | The KexiPart::Item that should be executed. |
| sender | The sender TQObject which likes to execute this Part or NULL if there is no sender. The KFormDesigner uses this to pass the actual widget (e.g. the button that was pressed). |
- Returns
- true if execution was successfully else false.
Reimplemented in KexiMacroPart, and KexiScriptPart.
Definition at line 85 of file kexipart.h.
◆ guiClient()
| GUIClient * KexiPart::Part::guiClient |
( |
| ) |
const |
|
inline |
- Returns
- part's GUI Client, so you can create part-wide actions using this client.
Definition at line 171 of file kexipart.h.
◆ i18nMessage()
| TQString Part::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 in KexiFormPart, KexiQueryPart, and KexiReportPart.
Definition at line 398 of file kexipart.cpp.
◆ info()
| Info * KexiPart::Part::info |
( |
| ) |
const |
|
inline |
◆ initInstanceActions()
| void Part::initInstanceActions |
( |
| ) |
|
|
protectedvirtual |
◆ initPartActions()
| void Part::initPartActions |
( |
| ) |
|
|
protectedvirtual |
◆ instanceCaption()
| TQString Part::instanceCaption |
( |
| ) |
const |
i18n'd instance name usable for displaying in gui as object's caption. - Todo:
- move this to Info class when the name could be moved as localized property to service's .desktop file.
Definition at line 415 of file kexipart.cpp.
◆ instanceGuiClient()
| GUIClient * KexiPart::Part::instanceGuiClient |
( |
int |
mode = 0 | ) |
const |
|
inline |
- Returns
- part's GUI Client, so you can create instance-wide actions using this client.
Definition at line 175 of file kexipart.h.
◆ instanceName()
| TQCString Part::instanceName |
( |
| ) |
const |
i18n'd instance name usable for displaying in gui as object's name. The name is valid identifier - contains latin1 lowercase characters only. - Todo:
- move this to Info class when the name could be moved as localized property to service's .desktop file.
Definition at line 408 of file kexipart.cpp.
◆ lastOperationStatus()
◆ loadDataBlock()
| bool Part::loadDataBlock |
( |
KexiDialogBase * |
dlg, |
|
|
TQString & |
dataString, |
|
|
const TQString & |
dataID = TQString() |
|
) |
| |
|
protected |
◆ loadSchemaData()
◆ openInstance()
- Todo:
- make it protected, outside world should use KexiProject
"Opens" an instance that the part provides, pointed by item in a mode viewMode. viewMode is one of Kexi::ViewMode enum. staticObjectArgs can be passed for static Kexi Parts.
- Todo:
- js: apply settings for caption displaying method; there can be option for
- displaying item.caption() as caption, if not empty, without instanceName
- displaying the same as above in tabCaption (or not)
Definition at line 236 of file kexipart.cpp.
◆ remove()
- 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 in KexiQueryPart.
Definition at line 385 of file kexipart.cpp.
◆ rename()
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.
Definition at line 420 of file kexipart.cpp.
◆ setActionAvailable()
| void Part::setActionAvailable |
( |
const char * |
action_name, |
|
|
bool |
avail |
|
) |
| |
|
protected |
◆ setInfo()
| void KexiPart::Part::setInfo |
( |
Info * |
info | ) |
|
|
inlineprotected |
◆ setupCustomPropertyPanelTabs()
| void Part::setupCustomPropertyPanelTabs |
( |
KTabWidget * |
tab, |
|
|
KexiMainWindow * |
mainWin |
|
) |
| |
|
protectedvirtual |
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.
Definition at line 404 of file kexipart.cpp.
◆ slotCreate
| void Part::slotCreate |
( |
| ) |
|
|
protectedslot |
◆ supportedUserViewModes()
| int KexiPart::Part::supportedUserViewModes |
( |
| ) |
const |
|
inline |
- Returns
- supported modes for dialogs created by this part in "user mode", i.e. a combination of Kexi::ViewMode enum elements. Set this member in your KexiPart subclass' ctor, if you need to override the default value that equals Kexi::DataViewMode. or 0 in case of Kexi::PartStaticPart object. This information is used to set supported view modes for every KexiDialogBase-derived object created by this KexiPart.
Definition at line 106 of file kexipart.h.
◆ supportedViewModes()
| int KexiPart::Part::supportedViewModes |
( |
| ) |
const |
|
inline |
- Returns
- supported modes for dialogs created by this part, i.e. a combination of Kexi::ViewMode enum elements. Set this member in your KexiPart subclass' ctor, if you need to override the default value that equals Kexi::DataViewMode | Kexi::DesignViewMode, or Kexi::DesignViewMode in case of Kexi::PartStaticPart object. This information is used to set supported view modes for every KexiDialogBase-derived object created by this KexiPart.
Definition at line 98 of file kexipart.h.
◆ ::KexiMainWindow
◆ ::KexiMainWindowImpl
◆ GUIClient
◆ Manager
| PartPrivate* KexiPart::Part::d |
|
protected |
◆ m_guiClient
| GUIClient* KexiPart::Part::m_guiClient |
|
protected |
◆ m_info
| Info* KexiPart::Part::m_info |
|
protected |
◆ m_instanceGuiClients
| TQIntDict<GUIClient> KexiPart::Part::m_instanceGuiClients |
|
protected |
◆ m_mainWin
◆ m_names
| TQMap<TQString,TQString> KexiPart::Part::m_names |
|
protected |
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 297 of file kexipart.h.
◆ m_newObjectsAreDirty
| bool KexiPart::Part::m_newObjectsAreDirty |
|
protected |
True if newwly created, unsaved objects are dirty. False by default. You can change it in your subclass' constructor.
Definition at line 322 of file kexipart.h.
◆ m_registeredPartID
| int KexiPart::Part::m_registeredPartID |
|
protected |
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 318 of file kexipart.h.
◆ m_status
◆ m_supportedUserViewModes
| int KexiPart::Part::m_supportedUserViewModes |
|
protected |
◆ m_supportedViewModes
| int KexiPart::Part::m_supportedViewModes |
|
protected |
The documentation for this class was generated from the following files:
|