kexi

KexiQueryDesignerGuiEditor Class Reference

#include <kexiquerydesignerguieditor.h>

Inheritance diagram for KexiQueryDesignerGuiEditor:

KexiViewBase KexiActionProxy List of all members.

Detailed Description

Design view of the Query Designer.

Definition at line 59 of file kexiquerydesignerguieditor.h.


Public Slots

virtual void setFocus ()

Public Member Functions

 KexiQueryDesignerGuiEditor (KexiMainWindow *mainWin, QWidget *parent, const char *name=0)
virtual ~KexiQueryDesignerGuiEditor ()
KexiRelationWidgetrelationView () const
virtual QSize sizeHint () const

Protected Slots

void slotDragOverTableRow (KexiTableItem *item, int row, QDragMoveEvent *e)
void slotDroppedAtRow (KexiTableItem *item, int row, QDropEvent *ev, KexiTableItem *&newItem)
void slotTableAdded (KexiDB::TableSchema &t)
void slotTableHidden (KexiDB::TableSchema &t)
void slotBeforeCellChanged (KexiTableItem *item, int colnum, QVariant &newValue, KexiDB::ResultInfo *result)
void slotRowInserted (KexiTableItem *item, uint row, bool repaint)
void slotTablePositionChanged (KexiRelationViewTableContainer *)
void slotAboutConnectionRemove (KexiRelationViewConnection *)
void slotTableFieldDoubleClicked (KexiDB::TableSchema *table, const QString &fieldName)
bool loadLayout ()
bool storeLayout ()
void showTablesForQuery (KexiDB::QuerySchema *query)
void showFieldsOrRelationsForQueryInternal (KexiDB::QuerySchema *query, bool showFields, bool showRelations)
void showFieldsAndRelationsForQuery (KexiDB::QuerySchema *query)
void showFieldsForQuery (KexiDB::QuerySchema *query)
void showRelationsForQuery (KexiDB::QuerySchema *query)
void addConnection (KexiDB::Field *masterField, KexiDB::Field *detailsField)
void slotPropertyChanged (KoProperty::Set &list, KoProperty::Property &property)
void slotNewItemStored (KexiPart::Item &)
void slotItemRemoved (const KexiPart::Item &item)
void slotItemRenamed (const KexiPart::Item &item, const QCString &oldName)

Protected Member Functions

void initTableColumns ()
void initTableRows ()
virtual tristate beforeSwitchTo (int mode, bool &dontStore)
virtual tristate afterSwitchFrom (int mode)
virtual KexiDB::SchemaDatastoreNewData (const KexiDB::SchemaData &sdata, bool &cancel)
virtual tristate storeData (bool dontAsk=false)
void updateColumnsData ()
virtual KoProperty::Set * propertySet ()
KoProperty::Set * createPropertySet (int row, const QString &tableName, const QString &fieldName, bool newOne=false)
bool buildSchema (QString *errMsg=0)
KexiQueryPart::TempDatatempData () const
KexiTableItemcreateNewRow (const QString &tableName, const QString &fieldName, bool visible=true) const
KexiDB::BaseExprparseExpressionString (const QString &fullString, int &token, bool allowRelationalOperator)
QCString generateUniqueAlias () const
void updatePropertiesVisibility (KoProperty::Set &buf)

Friends

class KexiQueryView

Member Function Documentation

tristate KexiQueryDesignerGuiEditor::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 523 of file kexiquerydesignerguieditor.cpp.

tristate KexiQueryDesignerGuiEditor::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 475 of file kexiquerydesignerguieditor.cpp.

bool KexiQueryDesignerGuiEditor::buildSchema ( QString *  errMsg = 0  )  [protected]

Builds query schema out of information provided by gui. The schema is stored in temp->query member. errMsg is optional error message returned.

Returns:
true on proper schema creation.

Todo:
what about query?

allowRelationalOperator

set

Todo:
what about query?

Definition at line 329 of file kexiquerydesignerguieditor.cpp.

KexiTableItem * KexiQueryDesignerGuiEditor::createNewRow ( const QString &  tableName,
const QString &  fieldName,
bool  visible = true 
) const [protected]

Helper: allocates and initializes new table view's row. Doesn't insert it, just returns. tableName and fieldName shoudl be provided. visible flag sets value for "Visible" column.

Definition at line 1015 of file kexiquerydesignerguieditor.cpp.

KoProperty::Set * KexiQueryDesignerGuiEditor::createPropertySet ( int  row,
const QString &  tableName,
const QString &  fieldName,
bool  newOne = false 
) [protected]

Definition at line 1494 of file kexiquerydesignerguieditor.cpp.

void KexiQueryDesignerGuiEditor::initTableColumns (  )  [protected]

Called just once.

Definition at line 177 of file kexiquerydesignerguieditor.cpp.

void KexiQueryDesignerGuiEditor::initTableRows (  )  [protected]

Called to have all rows empty.

Definition at line 230 of file kexiquerydesignerguieditor.cpp.

bool KexiQueryDesignerGuiEditor::loadLayout (  )  [protected, slot]

Loads layout of relation GUI diagram.

Definition at line 902 of file kexiquerydesignerguieditor.cpp.

KexiDB::BaseExpr * KexiQueryDesignerGuiEditor::parseExpressionString ( const QString &  fullString,
int &  token,
bool  allowRelationalOperator 
) [protected]

Todo:
this is primitive, temporary: reuse SQL parser

Todo:
what about query?

Definition at line 1114 of file kexiquerydesignerguieditor.cpp.

KoProperty::Set * KexiQueryDesignerGuiEditor::propertySet (  )  [protected, virtual]

Returns:
property buffer associated with currently selected row (i.e. field) or 0 if current row is empty.

Reimplemented from KexiViewBase.

Definition at line 1468 of file kexiquerydesignerguieditor.cpp.

void KexiQueryDesignerGuiEditor::showFieldsAndRelationsForQuery ( KexiDB::QuerySchema query  )  [protected, slot]

convenience method equal to showFieldsOrRelationsForQueryInternal(query, true, true)

Definition at line 668 of file kexiquerydesignerguieditor.cpp.

void KexiQueryDesignerGuiEditor::showFieldsForQuery ( KexiDB::QuerySchema query  )  [protected, slot]

convenience method equal to showFieldsOrRelationsForQueryInternal(query, true, false)

Definition at line 658 of file kexiquerydesignerguieditor.cpp.

void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal ( KexiDB::QuerySchema query,
bool  showFields,
bool  showRelations 
) [protected, slot]

Definition at line 673 of file kexiquerydesignerguieditor.cpp.

void KexiQueryDesignerGuiEditor::showRelationsForQuery ( KexiDB::QuerySchema query  )  [protected, slot]

convenience method equal to showFieldsOrRelationsForQueryInternal(query, false, true)

Definition at line 663 of file kexiquerydesignerguieditor.cpp.

void KexiQueryDesignerGuiEditor::slotBeforeCellChanged ( KexiTableItem item,
int  colnum,
QVariant &  newValue,
KexiDB::ResultInfo result 
) [protected, slot]

Called before cell change in tableview.

allowSignals

allowSignals

allowSignals

Definition at line 1236 of file kexiquerydesignerguieditor.cpp.

tristate KexiQueryDesignerGuiEditor::storeData ( bool  dontAsk = false  )  [protected, virtual]

Tells this view to store data changes on the backend. Called by KexiDialogBase::storeData(). Default implementation:

  • makes a deep copy of sdata
  • stores object schema data sdata in 'kexi__objects' internal table using Connection::storeObjectSchemaData(). If dontAsk is true, no question dialog will be shown to the user. The default is false.

Reimpelment this for your needs. Should return true on success or cancelled when the task should be cancelled.

See also:
storeNewData()

Reimplemented from KexiViewBase.

Definition at line 611 of file kexiquerydesignerguieditor.cpp.

bool KexiQueryDesignerGuiEditor::storeLayout (  )  [protected, slot]

Stores layout of relation GUI diagram.

Todo:
what about query?

Definition at line 960 of file kexiquerydesignerguieditor.cpp.

KexiDB::SchemaData * KexiQueryDesignerGuiEditor::storeNewData ( const KexiDB::SchemaData sdata,
bool &  cancel 
) [protected, virtual]

Tells this dialog to create and store data of the new object pointed by sdata on the backend. Called by KexiDialogBase::storeNewData(). Default implementation:

  • makes a deep copy of sdata
  • stores object schema data sdata in 'kexi__objects' internal table using Connection::storeObjectSchemaData(). Reimpelment this for your needs. Requirements:
  • deep copy of sdata should be made
  • schema data should be created at the backend (by calling KexiViewBase::storeNewData(const KexiDB::SchemaData& sdata)), or using Connection::storeObjectSchemaData() or more specialized method. For example, KexiAlterTableDialog uses Connection::createTable(TableSchema) for this (tableschema is SchemaData subclass) to store more information than just a schem adata. You should use such subclasses if needed. Should return newly created schema data object on success. In this case, do not store schema object yourself (make deep copy if needed).

Reimplemented from KexiViewBase.

Definition at line 581 of file kexiquerydesignerguieditor.cpp.

void KexiQueryDesignerGuiEditor::updateColumnsData (  )  [protected]

Updates data in columns depending on tables that are currently inserted. Tabular Data in combo box popups is updated as well.

Todo:
what about query?

Definition at line 242 of file kexiquerydesignerguieditor.cpp.


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