Ananas Library 0.9.5
wField Class Reference

Ananas Field widget. . More...

#include <wfield.h>

Inheritance diagram for wField:
aWidget wDBField

Public Types

enum  tEditorType {
  Unknown , Numberic , String , Date ,
  DateTime , Boolean , Catalogue =101 , Document
}
 

Public Slots

bool getOpt () const
 
- Public Slots inherited from aWidget
virtual QVariant value (const QString &name)
 

Signals

void valueChanged (const QString &)
 
void valueChanged (const QVariant &)
 
void inputInvalid ()
 
void lostFocus ()
 
- Signals inherited from aWidget
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

 wField (QWidget *parent, const char *name, WFlags fl=0)
 
virtual ~wField ()
 
virtual QDialog * createEditor (QWidget *parent)
 
void setOpt (bool fn)
 
virtual QString value () const
 
QString text () const
 
virtual void setValue (const QString &fn)
 
virtual void Validate (const QString &fn)
 
void setValue (const QDate &d)
 
virtual QString textValue ()
 
void setFieldType (QString n)
 
QString getFieldType () const
 
void setEditorType (tEditorType n)
 
tEditorType getEditorType () const
 
void fieldSelect ()
 
virtual void focusInEvent ()
 
virtual void focusOutEvent ()
 
void selectAll ()
 
virtual void SetReadOnly (bool)
 
virtual void SetNonZero (bool)
 
virtual void SetMask (QString)
 
virtual void SetValidator (QString Validator, int twostate)
 
- Public Member Functions inherited from aWidget
 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 QToolBar * createToolBar (QMainWindow *parent)
 
virtual aObjectcreateDBObject (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)
 
aCfggetMd ()
 
virtual Q_ULLONG uid ()
 
virtual ERR_Code New ()
 
virtual ERR_Code Update ()
 
virtual ERR_Code TurnOn ()
 
virtual ERR_Code Select (Q_ULLONG id)
 
aObjectdataObject ()
 
virtual Q_ULLONG docId ()
 
int formMode () const
 
virtual void setFormMode (int mode)
 
virtual QString getFieldName () const
 
int getId () const
 
void setId (int fn)
 
virtual int setValue (const QString &name, const QVariant &value)
 
virtual int setObjValue (const QString &nameWidget, aObject *value)
 
virtual int Refresh ()
 
QWidget * Widget (QString name, bool onlyMyWidgets=true)
 
virtual aDataFieldgetAttribute (const QString &name)
 
virtual int setAttribute (const QString &name, const aDataField *value)
 

Protected Member Functions

void widgetInit ()
 
- Protected Member Functions inherited from aWidget
virtual void updateProp ()
 
virtual void keyPressEvent (QKeyEvent *e)
 

Protected Attributes

QLineEdit * lineEdit
 
wDateEditdateEdit
 
QLabel * objLabel
 
QLabel * nzLabel
 
wCatButtonobjButton
 
wCheckBoxcheckBox
 
QValidator * v
 
int two_state
 
tEditorType vEditorType
 
QString vFieldType
 
QString vValue
 
- Protected Attributes inherited from aWidget
aObjectdbobj
 

Properties

QString value
 
QString FieldType
 
tEditorType EditorType
 
- Properties inherited from aWidget
int Id
 
bool openEditor
 
int FormMode
 

Additional Inherited Members

- Static Public Member Functions inherited from aWidget
static void widgetEditor (QWidget *object, QDialog *editor)
 
static aWidgetparentContainer (QWidget *w)
 
static aFormparentForm (QWidget *w)
 
static QString widgetName (QWidget *w)
 
static QWidget * Widget (QWidget *owner, QString name)
 
- Public Attributes inherited from aWidget
aDatabasedb
 
aCfgmd
 
aEngineengine
 

Detailed Description

Ananas Field widget. .

Constructor & Destructor Documentation

◆ wField()

wField::wField ( QWidget * parent,
const char * name,
WFlags fl = 0 )

Constructs object with parent=parent, name=name and flags=fl

◆ ~wField()

wField::~wField ( )
virtual

Destructor.

Member Function Documentation

◆ createEditor()

QDialog * wField::createEditor ( QWidget * parent)
virtual

Creates property editor dialog window.

Parameters
parent- parent

Reimplemented from aWidget.

Reimplemented in wDBField.

◆ fieldSelect()

void wField::fieldSelect ( )

Calls handler onClick event for Catalogue or Document object.

References aCfg::attr(), aCfg::find(), aCfg::getDefaultFormId(), aCfg::id(), aCfg::objClass(), aEngine::openEmbedCatalogueEditor(), aEngine::openForm(), and aLog::print().

Referenced by widgetInit().

◆ focusInEvent()

void wField::focusInEvent ( )
virtual

Handler signal lostFocus.

◆ focusOutEvent()

void wField::focusOutEvent ( )
virtual

Handler signal lostFocus.

Referenced by widgetInit().

◆ setEditorType()

void wField::setEditorType ( tEditorType n)

Sets property editorType.

References widgetInit().

Referenced by aEditorFactory::createEditor(), and wDBField::setEditorType().

◆ setFieldType()

void wField::setFieldType ( QString n)

Sets property fieldType.

Referenced by aEditorFactory::createEditor(), and wDBField::setEditorType().

◆ SetMask()

void wField::SetMask ( QString inputMask)
virtual

Set input Mask to LineEdit.

Parameters
QStringinputMas - inputMas for LineEdit.

Referenced by wDBField::initObject().

◆ SetNonZero()

void wField::SetNonZero ( bool fl)
virtual

Mark field by red asterisk if it is Non Zero.

Referenced by wDBField::initObject().

◆ SetReadOnly()

void wField::SetReadOnly ( bool status)
virtual

Seting widget readonly flag. When widget readonly it's fields can't be edit, and make updatе action

Parameters
status- New readonly flag.

Reimplemented from aWidget.

◆ SetValidator()

void wField::SetValidator ( QString Validator,
int twostate )
virtual

Set validaror and connect LineEdit to Validator.

Parameters
QStringValidator - RegExp for QRegExpValidator

References Validate().

Referenced by wDBField::initObject().

◆ setValue() [1/2]

void wField::setValue ( const QDate & newDate)

Sets value type DateTime.

Parameters
newDate(in) - date for set

◆ setValue() [2/2]

void wField::setValue ( const QString & newvalue)
virtual

Sets value.

Parameters
newvalue(in) - value for set

Reimplemented from aWidget.

Referenced by Validate(), and widgetInit().

◆ text()

QString wField::text ( ) const

Gets text value.

Returns
value

◆ textValue()

virtual QString wField::textValue ( )
inlinevirtual

Reimplemented from aWidget.

◆ Validate()

void wField::Validate ( const QString & test)
virtual

Validate value and paint LineEdit frame.

References setValue().

Referenced by SetValidator().

◆ value()

QString wField::value ( ) const
virtual

Gets value.

Returns
value

Reimplemented from aWidget.

◆ widgetInit()

void wField::widgetInit ( )
protected

Sets widget visual type, depend of property fieldType. This property must be set above call this function.

References fieldSelect(), focusOutEvent(), and setValue().

Referenced by setEditorType().


The documentation for this class was generated from the following files: