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().
Referenced by getBindList().
|
protectedvirtual |
Reimplemented QDataTable function.
Referenced by viewRequest().
|
protectedvirtual |
Referenced by contentsContextMenuEvent(), and viewRequest().
|
protected |
Reimplemented QDataTable function.
Referenced by viewRequest().
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().
|
protectedvirtual |
Referenced by viewRequest().
|
protected |
Reimplemented QDataTable function.
References beginInsert(), deleteRequest(), insertRequest(), keyPressEvent(), updateRequest(), and viewRequest().
Referenced by 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().
Referenced by keyPressEvent(), and viewRequest().
|
slot |
Gets list of id binding table.
References wDBTable().
Referenced by setAvailableTables().
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 | ) |
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. |
QString wDBTable::getFieldType | ( | long | id | ) |
Gets field type.
id | - field id |
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 |
int wDBTable::getTableInd | ( | int | id | ) |
Gets table position at id table.
id | (in) - Id table |
int wDBTable::getTblInd | ( | ) | const |
Gets current table id.
void wDBTable::init | ( | ) |
Function init. Sets metadata object and tables object.
Referenced by wDBTable().
Initialisation the widget on form loaded in engine.
References aDatabase::cfg, newDataId(), 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(), and viewRequest().
|
slot |
Handler line current change signal.
References deleteLine(), and saveLine().
Referenced by wDBTable().
|
slot |
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().
Referenced by viewRequest().
|
signal |
Signal emitted after table line update.
Referenced by lineUpdate().
|
signal |
Signal emitted after select another document.
Referenced by keyPressEvent(), paintField(), and viewRequest().
|
signal |
Signal emitted after change line.
|
slot |
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 |
void wDBTable::setId | ( | Q_ULLONG | fn | ) |
Sets metadata document id.
Referenced by newDataId().
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. \russian Возвращает иконку для отображения состояния строки.
References aDocJournal::CurrentDocument(), aDocJournal::findDocument(), and aDocument::IsConducted().
Referenced by paintField().
|
signal |
Signal emitted after update cell.
Referenced by deleteCurrent(), and updateCurrent().
|
protectedvirtual |
|
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 |
References activateNextCell(), beginInsert(), beginUpdate(), confirmEdit(), contentsContextMenuEvent(), deleteCurrent(), EditElement(), keyPressEvent(), paintField(), selected(), and updateCurrent().
Referenced by contentsContextMenuEvent().