feat: add news reader dialog

Makes it easier to read about new blog posts! Yay :D
This commit is contained in:
flow
2022-06-25 20:15:16 -03:00
parent 4e319254dd
commit 455e4de6f3
5 changed files with 203 additions and 10 deletions

View File

@ -0,0 +1,30 @@
#pragma once
#include <QDialog>
#include <QHash>
#include "news/NewsEntry.h"
namespace Ui {
class NewsDialog;
}
class NewsDialog : public QDialog {
Q_OBJECT
public:
NewsDialog(QList<NewsEntryPtr> entries, QWidget* parent = nullptr);
~NewsDialog();
public slots:
void toggleArticleList();
private slots:
void selectedArticleChanged(const QString& new_title);
private:
Ui::NewsDialog* ui;
QHash<QString, NewsEntryPtr> m_entries;
bool m_article_list_hidden = false;
};