Ananas Library
0.9.5
|
#include <awidget.h>
Public Slots | |
virtual QVariant | value (const QString &name) |
virtual QString | value () const |
Signals | |
void | setData (QWidget *, aCfg *) |
void | getData (QWidget *) |
void | getMd (aCfg **) |
void | valueChanged (const QString &, const QVariant &) |
void | valueChanged (const QString &, const QVariant &, const QString &) |
void | changeObj (const QString &) |
void | changeObjId (const Q_ULLONG) |
void | keyPressed (QKeyEvent *e) |
Public Member Functions | |
aWidget (QWidget *parent=0, const char *name=0, WFlags fl=0) | |
aWidget (const QString &oname, aDatabase *adb, QWidget *parent=0, const char *name=0, WFlags fl=0) | |
aWidget (aCfgItem context, aDatabase *adb, QWidget *parent=0, const char *name=0, WFlags fl=0) | |
virtual bool | checkStructure () |
virtual void | initObject (aDatabase *adb) |
virtual void | widgetEditor () |
virtual QDialog * | createEditor (QWidget *parent) |
virtual QToolBar * | createToolBar (QMainWindow *parent) |
virtual aObject * | createDBObject (aCfgItem obj, aDatabase *) |
virtual QString | displayString () |
void | init (aDatabase *adb) |
bool | getOpenEditor () const |
void | setOpenEditor (bool) |
bool | isInited () |
virtual bool | isContainer () |
void | setInited (bool flag) |
aCfgItem * | getMDObject () |
void | setMDObject (aCfgItem object) |
aSQLTable * | table (const QString &name="") |
void | setObjectData (QWidget *object, aCfg *md) |
void | getObjectData (QWidget *object) |
aCfg * | getMd () |
virtual Q_ULLONG | uid () |
virtual ERR_Code | New () |
virtual ERR_Code | Update () |
virtual ERR_Code | TurnOn () |
virtual ERR_Code | Select (Q_ULLONG id) |
aObject * | dataObject () |
virtual Q_ULLONG | docId () |
int | formMode () const |
virtual void | setFormMode (int mode) |
virtual QString | getFieldName () const |
int | getId () const |
void | setId (int fn) |
virtual QString | textValue () |
virtual void | setValue (const QString &) |
virtual int | setValue (const QString &name, const QVariant &value) |
virtual int | setObjValue (const QString &nameWidget, aObject *value) |
virtual void | SetReadOnly (bool) |
virtual int | Refresh () |
QWidget * | Widget (QString name, bool onlyMyWidgets=true) |
virtual aDataField * | getAttribute (const QString &name) |
virtual int | setAttribute (const QString &name, const aDataField *value) |
Static Public Member Functions | |
static void | widgetEditor (QWidget *object, QDialog *editor) |
static aWidget * | parentContainer (QWidget *w) |
static aForm * | parentForm (QWidget *w) |
static QString | widgetName (QWidget *w) |
static QWidget * | Widget (QWidget *owner, QString name) |
Public Attributes | |
aDatabase * | db |
aCfg * | md |
aEngine * | engine |
Protected Member Functions | |
virtual void | updateProp () |
virtual void | keyPressEvent (QKeyEvent *e) |
Protected Attributes | |
aObject * | dbobj |
Properties | |
int | Id |
bool | openEditor |
int | FormMode |
Base visual object.
aWidget::aWidget | ( | QWidget * | parent = 0 , |
const char * | name = 0 , |
||
WFlags | fl = 0 |
||
) |
Abstract Ananas widget object.
Create database object.
Reimplemented in wJournal, wDocument, wCatalogue, and wGroupTree.
Referenced by initObject().
|
virtual |
Create toolbar for QMainWindow owner object.
Reimplemented in wJournal, wCatalogue, and wGroupTree.
Referenced by aForm::init(), and aForm::initContainer().
|
virtual |
Return form widget pointer by name.
aCfg * aWidget::getMd | ( | ) |
Return toplevel metadata configuration.
Referenced by wDBField::init(), and wDBTable::init().
void aWidget::getObjectData | ( | QWidget * | object | ) |
Emit signal getData( object ).
|
virtual |
Init object after create. Need setId( id ), where id - if of the metadata object of the adb->cfg loaded Configuration.
adb | - ananas database object. |
Reimplemented in wDBField, wJournal, wDocument, wGroupTree, wCatalogue, and wReport.
References aDatabase::cfg, createDBObject(), aCfg::find(), and aLog::print().
Referenced by aEditorFactory::createEditor(), wReport::initObject(), wCatalogue::initObject(), wGroupTree::initObject(), wDocument::initObject(), wJournal::initObject(), and wDBField::initObject().
|
virtual |
Create new database record object. New object create with using wirtual function aObject::New() of aObject and it's childs.
Reimplemented in wDocument, and wReport.
References aObject::New(), and aLog::print().
Referenced by wDocument::New(), and aForm::New().
|
virtual |
Select object in database.
id | - database record id. |
Reimplemented in wDocument, and wReport.
References aLog::print().
Referenced by wDocument::Select(), and aForm::Select().
|
virtual |
Return form widget pointer by name.
void aWidget::setObjectData | ( | QWidget * | object, |
aCfg * | md | ||
) |
Emit signal setData( object, md ).
|
virtual |
Setting form widgets value of object type. Support type of widgets: wField, wDBField.
nameWidget | - Widget name. |
value | - value. |
References aObject::getUid(), aLog::print(), and Widget().
Referenced by aForm::SetObjValue().
|
virtual |
Seting widget readonly flag. When widget readonly it's fields can't be edit, and make updatе action
status | - New readonly flag. |
Reimplemented in wField.
Referenced by aForm::SetReadOnly().
|
virtual |
Setting form widgets value. Must be implemented in inherited class.
value | - value. |
Reimplemented in wField.
Referenced by aForm::SetValue().
|
virtual |
Setting form widgets value. Support type of widgets: wField, wDBField, QPushButton, QLabel, QLineEdit, QCheckBox.
nameWidget | - Widget name. |
value | - value. |
References aLog::print(), and Widget().
|
virtual |
Get id from database. Get id for current database record or 0 if database object not created.
Reimplemented in wReport.
References aObject::getUid(), and aLog::print().
Referenced by wDBTable::init(), wDocument::New(), and aForm::New().
|
virtual |
Update data
Reimplemented in wReport.
References aLog::print(), aObject::SetValue(), aObject::Update(), and value().
Referenced by aForm::UpdateDB().
|
virtualslot |
Get field value. get value for field with such name.
name | - field md name. |
References aLog::print(), value(), and Widget().
Referenced by wDBTable::systemIcon(), Update(), and value().
|
static |
Return form widget pointer by name.
Referenced by setObjValue(), setValue(), value(), Widget(), and aForm::Widget().
QWidget * aWidget::Widget | ( | QString | name, |
bool | onlyMyWidgets = true |
||
) |
Return form widget pointer by name.
References Widget().