pollymc/launcher/ui/dialogs/NewsDialog.h
flow 455e4de6f3
feat: add news reader dialog
Makes it easier to read about new blog posts! Yay :D
2022-06-25 20:15:16 -03:00

31 lines
519 B
C++

#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;
};