Ananas Library  0.9.5
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
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
 
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 Slots inherited from aWidget
virtual QVariant value (const QString &name)
 
virtual QString value () const
 
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 aDataFieldgetAttribute (const QString &name)
 
virtual int setAttribute (const QString &name, const aDataField *value)
 

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)
 
- 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)
 

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 ( QWidget *  parent,
const char *  name,
WFlags  fl = 0 
)

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

wField::~wField ( )
virtual

Destructor.

Member Function Documentation

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

Creates property editor dialog window.

Parameters
parent- parent

Reimplemented from aWidget.

Reimplemented in wDBField.

void wField::fieldSelect ( )
slot

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().

void wField::focusInEvent ( )
virtualslot

Handler signal lostFocus.

void wField::focusOutEvent ( )
virtualslot

Handler signal lostFocus.

Referenced by widgetInit().

void wField::setEditorType ( tEditorType  n)
slot

Sets property editorType.

References widgetInit().

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

void wField::setFieldType ( QString  n)
slot

Sets property fieldType.

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

void wField::SetMask ( QString  inputMask)
virtualslot

Set input Mask to LineEdit.

Parameters
QStringinputMas - inputMas for LineEdit.

Referenced by wDBField::initObject().

void wField::SetNonZero ( bool  fl)
virtualslot

Mark field by red asterisk if it is Non Zero.

Referenced by wDBField::initObject().

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

Set validaror and connect LineEdit to Validator.

Parameters
QStringValidator - RegExp for QRegExpValidator

References Validate().

Referenced by wDBField::initObject().

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

Sets value.

Parameters
newvalue(in) - value for set

Referenced by Validate(), and widgetInit().

void wField::setValue ( const QDate &  newDate)
slot

Sets value type DateTime.

Parameters
newDate(in) - date for set
QString wField::text ( ) const
slot

Gets text value.

Returns
value
void wField::Validate ( const QString &  test)
virtualslot

Validate value and paint LineEdit frame.

References setValue().

Referenced by SetValidator().

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().

Property Documentation

QString wField::value
readwrite

Gets value.

Returns
value

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