#ifndef IXWIDGET_H
#define IXWIDGET_H

#include <QMetaType>

class IxWidget
{
public:
    IxWidget() = default;

    virtual ~IxWidget() = default;

	virtual QVariant getValue() const = 0;

    virtual void setValue(const QVariant &value) = 0;

	virtual bool isValueNull() const = 0;

    virtual void clearInput() = 0;

 public:
    QString getName() const { return name; }

	void setName(const QString &name){ this->name = name; }
	
protected:
    QString name;
};
Q_DECLARE_METATYPE(IxWidget*)
#define IXWIDGET_OBJECT_NAME void setObjectName(const QString &name)\
    {\
        QObject::setObjectName(name);\
        setName(name); \
        setProperty("IxWidget",QVariant::fromValue(static_cast<IxWidget*>(this)));\
    }

#endif // IXWIDGET_H

