From 455e4de6f32d8b46e5798409e19cd27af4a8e083 Mon Sep 17 00:00:00 2001 From: flow Date: Sat, 25 Jun 2022 20:15:16 -0300 Subject: feat: add news reader dialog Makes it easier to read about new blog posts! Yay :D --- launcher/ui/dialogs/NewsDialog.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 launcher/ui/dialogs/NewsDialog.h (limited to 'launcher/ui/dialogs/NewsDialog.h') diff --git a/launcher/ui/dialogs/NewsDialog.h b/launcher/ui/dialogs/NewsDialog.h new file mode 100644 index 00000000..add6b8dd --- /dev/null +++ b/launcher/ui/dialogs/NewsDialog.h @@ -0,0 +1,30 @@ +#pragma once + +#include +#include + +#include "news/NewsEntry.h" + +namespace Ui { +class NewsDialog; +} + +class NewsDialog : public QDialog { + Q_OBJECT + + public: + NewsDialog(QList entries, QWidget* parent = nullptr); + ~NewsDialog(); + + public slots: + void toggleArticleList(); + + private slots: + void selectedArticleChanged(const QString& new_title); + + private: + Ui::NewsDialog* ui; + + QHash m_entries; + bool m_article_list_hidden = false; +}; -- cgit