// This file generated by libqtelegram-code-generator.
// You can download it from: https://github.com/Aseman-Land/libqtelegram-code-generator
// DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

#ifndef LQTG_TYPE_RICHTEXT_OBJECT
#define LQTG_TYPE_RICHTEXT_OBJECT

#include "telegramtypeqobject.h"
#include "telegram/types/richtext.h"

#include <QPointer>
#include "richtextobject.h"

class LIBQTELEGRAMSHARED_EXPORT RichTextObject : public TelegramTypeQObject
{
    Q_OBJECT
    Q_ENUMS(RichTextClassType)
    Q_PROPERTY(QString email READ email WRITE setEmail NOTIFY emailChanged)
    Q_PROPERTY(QString textString READ textString WRITE setTextString NOTIFY textStringChanged)
    Q_PROPERTY(RichTextObject* textRich READ textRich WRITE setTextRich NOTIFY textRichChanged)
    Q_PROPERTY(QList<RichText> texts READ texts WRITE setTexts NOTIFY textsChanged)
    Q_PROPERTY(QString url READ url WRITE setUrl NOTIFY urlChanged)
    Q_PROPERTY(qint64 webpageId READ webpageId WRITE setWebpageId NOTIFY webpageIdChanged)
    Q_PROPERTY(RichText core READ core WRITE setCore NOTIFY coreChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    enum RichTextClassType {
        TypeTextEmpty,
        TypeTextPlain,
        TypeTextBold,
        TypeTextItalic,
        TypeTextUnderline,
        TypeTextStrike,
        TypeTextFixed,
        TypeTextUrl,
        TypeTextEmail,
        TypeTextConcat
    };

    RichTextObject(const RichText &core, QObject *parent = 0);
    RichTextObject(QObject *parent = 0);
    virtual ~RichTextObject();

    void setEmail(const QString &email);
    QString email() const;

    void setTextString(const QString &textString);
    QString textString() const;

    void setTextRich(RichTextObject* textRich);
    RichTextObject* textRich() const;

    void setTexts(const QList<RichText> &texts);
    QList<RichText> texts() const;

    void setUrl(const QString &url);
    QString url() const;

    void setWebpageId(qint64 webpageId);
    qint64 webpageId() const;

    void setClassType(quint32 classType);
    quint32 classType() const;

    void setCore(const RichText &core);
    RichText core() const;

    RichTextObject &operator =(const RichText &b);
    bool operator ==(const RichText &b) const;

Q_SIGNALS:
    void coreChanged();
    void classTypeChanged();
    void emailChanged();
    void textStringChanged();
    void textRichChanged();
    void textsChanged();
    void urlChanged();
    void webpageIdChanged();

private Q_SLOTS:
    void coreTextRichChanged();

private:
    QPointer<RichTextObject> m_textRich;
    RichText m_core;
};

#endif // LQTG_TYPE_RICHTEXT_OBJECT
