feat: add news reader dialog
Makes it easier to read about new blog posts! Yay :D
This commit is contained in:
30
launcher/ui/dialogs/NewsDialog.h
Normal file
30
launcher/ui/dialogs/NewsDialog.h
Normal 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;
|
||||
};
|
Reference in New Issue
Block a user