Mercurial > minori
diff include/gui/widgets/text.h @ 64:fe719c109dbc
*: update
1. add media tracking ability, and it displays info on the `now playing` page
2. the `now playing` page now actually shows something
3. renamed every page class to be more accurate to what it is
4. ...
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 01 Oct 2023 23:15:43 -0400 |
parents | 3d2decf093bb |
children | 27a19dd6cba1 |
line wrap: on
line diff
--- a/include/gui/widgets/text.h Sun Oct 01 06:39:47 2023 -0400 +++ b/include/gui/widgets/text.h Sun Oct 01 23:15:43 2023 -0400 @@ -1,20 +1,21 @@ #ifndef __gui__ui_utils_h #define __gui__ui_utils_h + #include <QFrame> #include <QLabel> #include <QPlainTextEdit> #include <QSize> #include <QString> #include <QWidget> + namespace TextWidgets { -void SetPlainTextEditData(QPlainTextEdit* text_edit, QString data); class Header : public QWidget { Q_OBJECT public: Header(QString title, QWidget* parent = nullptr); - void SetTitle(QString title); + void SetText(QString title); private: QLabel* static_text_title; @@ -26,6 +27,7 @@ public: Paragraph(QString text, QWidget* parent = nullptr); + void SetText(QString text); QSize minimumSizeHint() const override; QSize sizeHint() const override; }; @@ -73,5 +75,14 @@ Header* header; Paragraph* paragraph; }; -}; // namespace TextWidgets + +class Title : public Paragraph { + Q_OBJECT + + public: + Title(QString title, QWidget* parent = nullptr); +}; + +} // namespace TextWidgets + #endif // __gui__ui_utils_h