adding font and fontSize support
This commit is contained in:
parent
2711bde130
commit
ed632e0733
10 changed files with 128 additions and 7 deletions
|
@ -13,6 +13,8 @@ class ServiceItem : public QObject
|
|||
Q_PROPERTY(QString backgroundType READ backgroundType WRITE setBackgroundType NOTIFY backgroundTypeChanged)
|
||||
Q_PROPERTY(QStringList text READ text WRITE setText NOTIFY textChanged)
|
||||
Q_PROPERTY(QString audio READ audio WRITE setAudio NOTIFY audioChanged)
|
||||
Q_PROPERTY(QString font READ font WRITE setFont NOTIFY fontChanged)
|
||||
Q_PROPERTY(int fontSize READ fontSize WRITE setFontSize NOTIFY fontSizeChanged)
|
||||
|
||||
public:
|
||||
explicit ServiceItem(QObject *parent = nullptr);
|
||||
|
@ -25,6 +27,9 @@ public:
|
|||
ServiceItem(const QString &name, const QString &type, const QString &background,
|
||||
const QString &backgroundType, const QStringList &text, const QString &audio,
|
||||
QObject * parent = nullptr);
|
||||
ServiceItem(const QString &name, const QString &type, const QString &background,
|
||||
const QString &backgroundType, const QStringList &text, const QString &audio,
|
||||
const QString &font, const int &fontSize, QObject * parent = nullptr);
|
||||
|
||||
QString name() const;
|
||||
QString type() const;
|
||||
|
@ -32,6 +37,8 @@ public:
|
|||
QString backgroundType() const;
|
||||
QStringList text() const;
|
||||
QString audio() const;
|
||||
QString font() const;
|
||||
int fontSize() const;
|
||||
|
||||
void setName(QString name);
|
||||
void setType(QString type);
|
||||
|
@ -39,6 +46,8 @@ public:
|
|||
void setBackgroundType(QString backgroundType);
|
||||
void setText(QStringList text);
|
||||
void setAudio(QString audio);
|
||||
void setFont(QString font);
|
||||
void setFontSize(int fontSize);
|
||||
|
||||
signals:
|
||||
void nameChanged(QString name);
|
||||
|
@ -47,6 +56,8 @@ signals:
|
|||
void backgroundTypeChanged(QString backgroundType);
|
||||
void textChanged(QStringList text);
|
||||
void audioChanged(QString audio);
|
||||
void fontChanged(QString font);
|
||||
void fontSizeChanged(int fontSize);
|
||||
|
||||
private:
|
||||
QString m_name;
|
||||
|
@ -55,6 +66,8 @@ private:
|
|||
QString m_backgroundType;
|
||||
QStringList m_text;
|
||||
QString m_audio;
|
||||
QString m_font;
|
||||
int m_fontSize;
|
||||
};
|
||||
|
||||
#endif // SERVICEITEM_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue