making songeditor align text

This commit is contained in:
Chris Cochrun 2022-04-12 17:21:50 -05:00
parent 86a5bbf93c
commit e22ac445c5
6 changed files with 145 additions and 38 deletions

View file

@ -18,7 +18,8 @@ class SongSqlModel : public QSqlTableModel
Q_PROPERTY(QString vorder READ vorder WRITE setVerseOrder NOTIFY vorderChanged)
Q_PROPERTY(QString background READ background WRITE setBackground NOTIFY backgroundChanged)
Q_PROPERTY(QString backgroundType READ backgroundType WRITE setBackgroundType NOTIFY backgroundTypeChanged)
Q_PROPERTY(QString textAlignment READ textAlignment WRITE setTextAlignment NOTIFY textAlignmentChanged)
Q_PROPERTY(QString horizontalTextAlignment READ horizontalTextAlignment WRITE setHorizontalTextAlignment NOTIFY horizontalTextAlignmentChanged)
Q_PROPERTY(QString verticalTextAlignment READ verticalTextAlignment WRITE setVerticalTextAlignment NOTIFY verticalTextAlignmentChanged)
QML_ELEMENT
public:
@ -33,7 +34,8 @@ public:
QString vorder() const;
QString background() const;
QString backgroundType() const;
QString textAlignment() const;
QString horizontalTextAlignment() const;
QString verticalTextAlignment() const;
void setTitle(const QString &title);
void setLyrics(const QString &lyrics);
@ -43,7 +45,8 @@ public:
void setVerseOrder(const QString &vorder);
void setBackground(const QString &background);
void setBackgroundType(const QString &backgroundType);
void setTextAlignment(const QString &background);
void setHorizontalTextAlignment(const QString &background);
void setVerticalTextAlignment(const QString &background);
Q_INVOKABLE void updateTitle(const int &row, const QString &title);
Q_INVOKABLE void updateLyrics(const int &row, const QString &lyrics);
@ -53,7 +56,8 @@ public:
Q_INVOKABLE void updateVerseOrder(const int &row, const QString &vorder);
Q_INVOKABLE void updateBackground(const int &row, const QString &background);
Q_INVOKABLE void updateBackgroundType(const int &row, const QString &backgroundType);
Q_INVOKABLE void updateTextAlignment(const int &row, const QString &textAlignment);
Q_INVOKABLE void updateHorizontalTextAlignment(const int &row, const QString &horizontalTextAlignment);
Q_INVOKABLE void updateVerticalTextAlignment(const int &row, const QString &horizontalTextAlignment);
Q_INVOKABLE void newSong();
Q_INVOKABLE void deleteSong(const int &row);
@ -72,7 +76,8 @@ signals:
void vorderChanged();
void backgroundChanged();
void backgroundTypeChanged();
void textAlignmentChanged();
void horizontalTextAlignmentChanged();
void verticalTextAlignmentChanged();
private:
int m_id;
@ -84,7 +89,8 @@ private:
QString m_vorder;
QString m_background;
QString m_backgroundType;
QString m_textAlignment;
QString m_horizontalTextAlignment;
QString m_verticalTextAlignment;
};
#endif //SONGSQLMODEL_H