kexi
KexiAlterTableDialog Class Reference
Inheritance diagram for KexiAlterTableDialog:

Detailed Description
Definition at line 34 of file kexialtertabledialog.h.
Public Member Functions | |
KexiAlterTableDialog (KexiMainWindow *win, QWidget *parent, const char *name=0) | |
virtual | ~KexiAlterTableDialog () |
KexiTablePart::TempData * | tempData () const |
Protected Slots | |
void | updateActions () |
virtual void | slotUpdateRowActions (int row) |
void | slotBeforeCellChanged (KexiTableItem *item, int colnum, QVariant &newValue, KexiDB::ResultInfo *result) |
void | slotRowUpdated (KexiTableItem *item) |
void | slotAboutToInsertRow (KexiTableItem *item, KexiDB::ResultInfo *result, bool repaint) |
void | slotAboutToDeleteRow (KexiTableItem &item, KexiDB::ResultInfo *result, bool repaint) |
void | slotPropertyChanged (KoProperty::Set &set, KoProperty::Property &property) |
void | slotTogglePrimaryKey () |
Protected Member Functions | |
virtual void | updateActions (bool activated) |
void | initData () |
KoProperty::Set * | createPropertySet (int row, KexiDB::Field *field, bool newOne=false) |
virtual tristate | beforeSwitchTo (int mode, bool &dontStore) |
virtual tristate | afterSwitchFrom (int mode) |
virtual KoProperty::Set * | propertySet () |
void | removeCurrentPropertySet () |
virtual KexiDB::SchemaData * | storeNewData (const KexiDB::SchemaData &sdata, bool &cancel) |
virtual tristate | storeData (bool dontAsk=false) |
tristate | buildSchema (KexiDB::TableSchema &schema) |
QString | messageForSavingChanges (bool &emptyTable) |
void | setPrimaryKey (KoProperty::Set &propertySet, bool set, bool aWasPKey=false) |
void | getSubTypeListData (KexiDB::Field::TypeGroup fieldTypeGroup, QStringList &stringsList, QStringList &namesList) |
Constructor & Destructor Documentation
KexiAlterTableDialog::KexiAlterTableDialog | ( | KexiMainWindow * | win, | |
QWidget * | parent, | |||
const char * | name = 0 | |||
) |
Creates a new alter table dialog.
- Todo:
- remove this later
Definition at line 107 of file kexialtertabledialog.cpp.
Member Function Documentation
tristate KexiAlterTableDialog::afterSwitchFrom | ( | int | mode | ) | [protected, virtual] |
called by KexiDialogBase::switchToViewMode() right after dialog is switched to new mode By default does nothing. Reimplement this if you need to do something after switching to this view.
- Returns:
- true if you accept or false if a error occupied and view shouldn't change If there is no error but switching should be just cancelled (probably after showing some info messages), you need to return cancelled.
Reimplemented from KexiViewBase.
Definition at line 592 of file kexialtertabledialog.cpp.
tristate KexiAlterTableDialog::beforeSwitchTo | ( | int | mode, | |
bool & | dontStore | |||
) | [protected, virtual] |
called by KexiDialogBase::switchToViewMode() right before dialog is switched to new mode By default does nothing. Reimplement this if you need to do something before switching to this view.
- Returns:
- true if you accept or false if a error occupied and view shouldn't change If there is no error but switching should be just cancelled (probably after showing some info messages), you need to return cancelled. Set dontStore to true (it's false by default) if you want to avoid data storing by storeData() or storeNewData().
Reimplemented from KexiViewBase.
Definition at line 545 of file kexialtertabledialog.cpp.
tristate KexiAlterTableDialog::buildSchema | ( | KexiDB::TableSchema & | schema | ) | [protected] |
Definition at line 887 of file kexialtertabledialog.cpp.
KoProperty::Set * KexiAlterTableDialog::createPropertySet | ( | int | row, | |
KexiDB::Field * | field, | |||
bool | newOne = false | |||
) | [protected] |
Creates a new property set for field. The property set will be asigned to row, and owned by this dialog. If newOne is true, the property set will be marked as newly created.
- Returns:
- newly created property set.
- Todo:
- add table_field icon (add buff->addProperty(prop = new KexiProperty("this:iconName", "table_field") );
- Todo:
- this should be retrieved from KexiDB::Field when BLOB supports many different mimetypes
- Todo:
- set reasonable default for column width
- Todo:
- show this after we get properly working editor for QVariant
Definition at line 334 of file kexialtertabledialog.cpp.
void KexiAlterTableDialog::getSubTypeListData | ( | KexiDB::Field::TypeGroup | fieldTypeGroup, | |
QStringList & | stringsList, | |||
QStringList & | namesList | |||
) | [protected] |
Gets subtype strings and names for type fieldType.
- Todo:
- hardcoded!
Definition at line 316 of file kexialtertabledialog.cpp.
void KexiAlterTableDialog::initData | ( | ) | [protected] |
called whenever data should be reloaded (on switching to this view mode)
Definition at line 190 of file kexialtertabledialog.cpp.
KoProperty::Set * KexiAlterTableDialog::propertySet | ( | ) | [protected, virtual] |
- Returns:
- property set associated with currently selected row (i.e. field) or 0 if current row is empty.
Reimplemented from KexiViewBase.
Definition at line 600 of file kexialtertabledialog.cpp.
void KexiAlterTableDialog::setPrimaryKey | ( | KoProperty::Set & | propertySet, | |
bool | set, | |||
bool | aWasPKey = false | |||
) | [protected] |
Helper, used for slotTogglePrimaryKey() and slotPropertyChanged(). Assigns primary key icon and value for property set propertySet, and deselects it from previous pkey's row. aWasPKey is internal.
Definition at line 471 of file kexialtertabledialog.cpp.
void KexiAlterTableDialog::slotAboutToDeleteRow | ( | KexiTableItem & | item, | |
KexiDB::ResultInfo * | result, | |||
bool | repaint | |||
) | [protected, slot] |
void KexiAlterTableDialog::slotAboutToInsertRow | ( | KexiTableItem * | item, | |
KexiDB::ResultInfo * | result, | |||
bool | repaint | |||
) | [protected, slot] |
void KexiAlterTableDialog::slotBeforeCellChanged | ( | KexiTableItem * | item, | |
int | colnum, | |||
QVariant & | newValue, | |||
KexiDB::ResultInfo * | result | |||
) | [protected, slot] |
Called before cell change in tableview.
- Todo:
- remove this later
- Todo:
- should we display (passive?) dialog informing about cleared pkey?
rememberOldValue
Definition at line 621 of file kexialtertabledialog.cpp.
void KexiAlterTableDialog::slotPropertyChanged | ( | KoProperty::Set & | set, | |
KoProperty::Property & | property | |||
) | [protected, slot] |
Called after any property has been changed in the current property set, to perform some actions (like updating other dependent properties)
- Todo:
- : add setting for this: "Integer PKeys have autonumber set by default"
Definition at line 794 of file kexialtertabledialog.cpp.
void KexiAlterTableDialog::slotRowUpdated | ( | KexiTableItem * | item | ) | [protected, slot] |
void KexiAlterTableDialog::slotTogglePrimaryKey | ( | ) | [protected, slot] |
Toggles primary key for currently selected field. Does nothing for empty row.
Definition at line 458 of file kexialtertabledialog.cpp.
tristate KexiAlterTableDialog::storeData | ( | bool | dontAsk = false |
) | [protected, virtual] |
Reimplemented from KexiViewBase, because table storage is more complex.
Reimplemented from KexiViewBase.
Definition at line 1086 of file kexialtertabledialog.cpp.
KexiDB::SchemaData * KexiAlterTableDialog::storeNewData | ( | const KexiDB::SchemaData & | sdata, | |
bool & | cancel | |||
) | [protected, virtual] |
Reimplemented from KexiViewBase, because tables creation is more complex.
Reimplemented from KexiViewBase.
Definition at line 1050 of file kexialtertabledialog.cpp.
void KexiAlterTableDialog::updateActions | ( | bool | activated | ) | [protected, virtual] |
Updates actions (e.g. availability). Reimplement it, if needed (you must call superclass impelmentation at the end!). This implementation does nothing for this view but calls updateActions() for every child-view of this view. called by KexiDialogBase on dialog's activation (activated is true) or deactivation.
Reimplemented from KexiDataAwareView.
Definition at line 439 of file kexialtertabledialog.cpp.
void KexiAlterTableDialog::updateActions | ( | ) | [protected, slot] |
Equivalent to updateActions(false). Called on row insert/delete in a KexiDataAwarePropertySet.
Definition at line 789 of file kexialtertabledialog.cpp.
The documentation for this class was generated from the following files: