kexi

KexiAlterTableDialog Class Reference

Inheritance diagram for KexiAlterTableDialog:

KexiDataTable KexiDataAwareView KexiViewBase KexiActionProxy List of all members.

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::TempDatatempData () 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::SchemaDatastoreNewData (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.

Definition at line 108 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 546 of file kexialtertabledialog.cpp.

tristate KexiAlterTableDialog::buildSchema KexiDB::TableSchema schema  )  [protected]
 

Todo:
for "names hidden" mode we won't get this error because user is unable to change names

Definition at line 884 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.

Definition at line 335 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 317 of file kexialtertabledialog.cpp.

void KexiAlterTableDialog::initData  )  [protected]
 

called whenever data should be reloaded (on switching to this view mode)

Definition at line 191 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 472 of file kexialtertabledialog.cpp.

void KexiAlterTableDialog::slotAboutToDeleteRow KexiTableItem item,
KexiDB::ResultInfo result,
bool  repaint
[protected, slot]
 

Called before row deleting in tableview.

Definition at line 875 of file kexialtertabledialog.cpp.

void KexiAlterTableDialog::slotAboutToInsertRow KexiTableItem item,
KexiDB::ResultInfo result,
bool  repaint
[protected, slot]
 

Called before row inserting in tableview.

Definition at line 868 of file kexialtertabledialog.cpp.

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)

Definition at line 791 of file kexialtertabledialog.cpp.

void KexiAlterTableDialog::slotRowUpdated KexiTableItem item  )  [protected, slot]
 

Called on row change in a tableview.

Definition at line 725 of file kexialtertabledialog.cpp.

void KexiAlterTableDialog::slotTogglePrimaryKey  )  [protected, slot]
 

Toggles primary key for currently selected field. Does nothing for empty row.

Definition at line 459 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 1083 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 1047 of file kexialtertabledialog.cpp.

void KexiAlterTableDialog::updateActions bool  activated  )  [protected, virtual]
 

Todo:
check if we can set pkey for this column type (eg. BLOB?)

Reimplemented from KexiDataAwareView.

Definition at line 440 of file kexialtertabledialog.cpp.

void KexiAlterTableDialog::updateActions  )  [protected, slot]
 

Equivalent to updateActions(false). Called on row insert/delete in a KexiDataAwarePropertySet.

Definition at line 786 of file kexialtertabledialog.cpp.


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