Ananas Library
0.9.5
|
#include <wdbtable.h>
Public Slots | |
QValueList< int > | getBindList () |
void | setWFieldEditor () |
void | setAvailableTables () |
void | lineUpdate (QSql::Op mode) |
void | newFilter (const QString &) |
void | newDataId (const Q_ULLONG) |
QVariant | Value (const QString &colname) |
bool | searchColumn (const QString &text, bool FromCurrent=FALSE, bool Forward=TRUE) |
void | searchOpen (const QString &text="") |
void | searchClose () |
Signals | |
void | saveLine (QSqlRecord *rec) |
void | deleteLine (QSqlRecord *rec) |
void | selected (Q_ULLONG uid) |
void | selectRecord (Q_ULLONG) |
void | updateCurr (int row, int col) |
void | insertRequest () |
void | updateRequest () |
void | deleteRequest () |
void | viewRequest () |
Public Member Functions | |
wDBTable (QString objtype, QWidget *parent=0, const char *name=0) | |
void | checkFields () |
void | setFields (int numTable) |
QStringList | getFields (int numTable, bool GetId=false) |
QString | getFieldName (long idField) |
QString | getFieldType (long idField) |
int | getTableInd (int id) |
int | getTableId (int ind) |
void | init () |
void | init (aDatabase *adb, aEngine *e=0) |
void | OpenEditor () |
QStringList | getDefFields () const |
QStringList | getDefHeaders () const |
QStringList | getColWidth () const |
QStringList | getDefIdList () const |
Q_ULLONG | getId () const |
int | getTblInd () const |
bool | getOpenEditor () const |
int | getDefColWidth () const |
void | setDefFields (QStringList lst) |
void | setDefHeaders (QStringList lst) |
void | setColWidth (QStringList lst) |
void | setDefIdList (QStringList lst) |
void | setId (Q_ULLONG fn) |
void | setTblInd (int ind) |
void | setOpenEditor (bool fn) |
void | setDefColWidth (int fn) |
QString | getEditFormName () const |
void | setEditFormName (QString name) |
QString | containerType () const |
void | setContainerType (QString name) |
QPixmap | systemIcon () |
virtual int | Select (ANANAS_UID db_uid) |
Public Attributes | |
aCfg * | md |
aDatabase * | db |
aEngine * | engine |
QStringList | list_available_tables |
QStringList | fname |
QStringList | hname |
QStringList | colWidth |
QStringList | idList |
int | defColWidth |
int | tableInd |
aCfgItem | tables |
QSqlCursor * | cur |
bool | searchMode |
QString | searchString |
aSearchWidget * | searchWidget |
Protected Slots | |
void | doubleClickEventHandler (int, int, int, const QPoint &) |
virtual void | updateTableCellHandler (int, int) |
void | dropped (QDropEvent *) |
Protected Member Functions | |
virtual QDragObject * | dragObject () |
virtual void | paintField (QPainter *p, const QSqlField *field, const QRect &cr, bool selected) |
QWidget * | beginUpdate (int row, int col, bool replace) |
virtual bool | updateCurrent () |
void | contentsContextMenuEvent (QContextMenuEvent *e) |
virtual bool | deleteCurrent () |
virtual void | keyPressEvent (QKeyEvent *e) |
void | EditElement () |
virtual void | activateNextCell () |
virtual bool | beginInsert () |
virtual QSql::Confirm | confirmEdit (QSql::Op m) |
Properties | |
Q_ULLONG | Id |
int | DefaultColWidth |
int | TableInd |
QStringList | DefFields |
QStringList | DefHeaders |
QStringList | ColWidth |
QStringList | DefIdList |
QString | editFormName |
Friends | |
class | aForm |
Class for editing documents tables.
wDBTable::wDBTable | ( | QString | objtype, |
QWidget * | parent = 0 , |
||
const char * | name = 0 |
||
) |
Constructor.
References init(), lineUpdate(), aLog::print(), and updateTableCellHandler().
|
protectedvirtual |
Reimplemented QDataTable function.
|
protected |
Reimplemented QDataTable function.
void wDBTable::checkFields | ( | ) |
function check property name, id, header and width. If have incorrect field name or id, then print message and all. If have less or more items in DefHeaders or ColWidth, then set them normal.
References getFieldName(), and aLog::print().
Referenced by OpenEditor().
|
protected |
Reimplemented QDataTable function.
References deleteRequest(), insertRequest(), keyPressEvent(), updateRequest(), and viewRequest().
|
protectedvirtual |
|
signal |
Signal emitted after table line delete.
Referenced by lineUpdate().
|
signal |
Referenced by contentsContextMenuEvent().
|
protected |
Opens form for edit catalogue element.
References getId(), and aEngine::openForm().
Referenced by keyPressEvent().
|
slot |
QStringList wDBTable::getColWidth | ( | ) | const |
Gets list of defined column width.
int wDBTable::getDefColWidth | ( | ) | const |
Gets default column width.
QStringList wDBTable::getDefFields | ( | ) | const |
Gets list of defined fields.
Referenced by aForm::ColIndex().
QStringList wDBTable::getDefHeaders | ( | ) | const |
Gets list of defined headers.
QStringList wDBTable::getDefIdList | ( | ) | const |
Gets list of defined column id.
Referenced by aForm::tabValue().
QString wDBTable::getFieldName | ( | long | id | ) |
Gets field name.
id | - field id |
References aCfg::attr(), and aCfg::find().
Referenced by checkFields().
QStringList wDBTable::getFields | ( | int | idTable, |
bool | GetId = false |
||
) |
Gets list of id fields or list of name fields.
idTable | (in) - id of table |
GetId | (ib) - if GetId == true returns list of id, else returns list of names. |
References aCfg::attr(), aCfg::countChild(), aCfg::find(), and aCfg::objClass().
QString wDBTable::getFieldType | ( | long | id | ) |
Gets field type.
id | - field id |
References aCfg::attr(), aCfg::find(), and aCfg::objClass().
Referenced by aEditorFactory::createEditor(), and aForm::tabValue().
Q_ULLONG wDBTable::getId | ( | ) | const |
Gets metadata document id.
Referenced by EditElement().
bool wDBTable::getOpenEditor | ( | ) | const |
Olways return false.
int wDBTable::getTableId | ( | int | numTable | ) |
Gets table id at position table.
numTable | (in) - Position table in metadata |
References aCfg::id(), and aCfg::objClass().
int wDBTable::getTableInd | ( | int | id | ) |
Gets table position at id table.
id | (in) - Id table |
References aCfg::count(), aCfg::id(), and aCfg::objClass().
int wDBTable::getTblInd | ( | ) | const |
Gets current table id.
void wDBTable::init | ( | ) |
Function init. Sets metadata object and tables object.
References aCfg::find(), aWidget::getMd(), and aCfg::objClass().
Referenced by wDBTable().
Initialisation the widget on form loaded in engine.
References aDatabase::cfg, aCfg::objClass(), aCfg::objTable(), aLog::print(), setWFieldEditor(), and aWidget::uid().
|
signal |
signals from context menu for connecting to wJournal if container has another type, then do QDataTable context menu and this signal no emitted
Referenced by contentsContextMenuEvent().
|
protectedvirtual |
Key press handler.
References EditElement(), aLog::print(), and selected().
Referenced by contentsContextMenuEvent().
|
slot |
Handler line current change signal.
References deleteLine(), and saveLine().
Referenced by wDBTable().
void wDBTable::OpenEditor | ( | ) |
Creates property editor dialog window.
References checkFields(), and setAvailableTables().
Referenced by setOpenEditor().
|
protectedvirtual |
Function paint field in table.
References selected(), and systemIcon().
|
signal |
Signal emitted after table line update.
Referenced by lineUpdate().
|
signal |
Signal emitted after select another document.
Referenced by keyPressEvent(), and paintField().
|
signal |
Signal emitted after change line.
|
slot |
Sets available tables, using object tables.
References aCfg::attr(), aCfg::countChild(), aCfg::find(), getBindList(), aCfg::id(), and aCfg::objClass().
Referenced by OpenEditor().
void wDBTable::setColWidth | ( | QStringList | lst | ) |
Sets list of columns width.
void wDBTable::setDefColWidth | ( | int | fn | ) |
Sets default columns width.
void wDBTable::setDefFields | ( | QStringList | lst | ) |
Sets list of field names.
void wDBTable::setDefHeaders | ( | QStringList | lst | ) |
Sets list of field headers.
void wDBTable::setDefIdList | ( | QStringList | lst | ) |
Gets list of column id.
void wDBTable::setFields | ( | int | idTable | ) |
Sets property ‘DefFields’, ‘DefHeaders’, ‘ColWidth’, ‘DefIdList’ to values from metadata.
idTable | (in) - table id |
References aCfg::attr(), aCfg::countChild(), aCfg::find(), and aCfg::objClass().
void wDBTable::setId | ( | Q_ULLONG | fn | ) |
Sets metadata document id.
void wDBTable::setOpenEditor | ( | bool | fn | ) |
Opens property editor.
References OpenEditor().
void wDBTable::setTblInd | ( | int | ind | ) |
Gets current table id.
|
slot |
QPixmap wDBTable::systemIcon | ( | ) |
Return system icon for display object record state. Возвращает иконку для отображения состояния строки.
References aDocJournal::CurrentDocument(), aDocJournal::findDocument(), aDocument::IsConducted(), and aWidget::value().
Referenced by paintField().
|
signal |
Signal emitted after update cell.
Referenced by deleteCurrent(), and updateCurrent().
|
protectedvirtual |
Reimplemented QDataTable function.
References updateCurr().
|
signal |
Referenced by contentsContextMenuEvent().
|
protectedvirtualslot |
Hanler table cell end edit.
Referenced by wDBTable().
|
slot |
Get field value slot. Don't implemented.
References aLog::print().
|
signal |
Referenced by contentsContextMenuEvent().