aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/dialogs/NewsDialog.h
blob: add6b8dd72da02cc5b79be7bb34cf2b6a13f06c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;
};