2018-09-01 18:06:46 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QVariant>
|
|
|
|
|
|
|
|
|
|
#include "messagingcorelib_global.h"
|
|
|
|
|
|
|
|
|
|
class MESSAGINGCORELIBSHARED_EXPORT DbMsgFieldBase
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
DbMsgFieldBase();
|
|
|
|
|
virtual ~DbMsgFieldBase();
|
|
|
|
|
|
|
|
|
|
bool hasValue() const;
|
|
|
|
|
virtual void clear();
|
|
|
|
|
|
|
|
|
|
bool touched() const;
|
|
|
|
|
void setTouched(bool touched);
|
|
|
|
|
|
|
|
|
|
virtual QVariant toVariant() const = 0;
|
2018-09-01 18:54:05 +02:00
|
|
|
virtual void setVariant(const QVariant &variant) = 0;
|
2018-09-01 18:06:46 +02:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void setHasValue(bool hasValue);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
bool m_hasValue;
|
|
|
|
|
bool m_touched;
|
|
|
|
|
};
|