12345678910111213141516171819202122232425262728293031323334353637 |
- #ifndef NEWSWIDGET_H
- #define NEWSWIDGET_H
- #include <QWidget>
- #include <QTimer>
- #include "networkdownloader.h"
- namespace Ui {
- class NewsWidget;
- }
- class LegacyApp;
- class NewsWidget : public QWidget
- {
- Q_OBJECT
- public:
- explicit NewsWidget(LegacyApp *_app, QWidget *parent = 0);
- ~NewsWidget();
- public slots:
- void updateNews();
- private:
- void constructNewsPiece(int piece_id, QString title, QString text, QString news_src);
- void setImgToNewsPiece(int piece_id, QPixmap img);
- private:
- Ui::NewsWidget *ui;
- LegacyApp *app;
- QTimer news_update_timer;
- QByteArray news_data;
- NetworkDownloader news_downloader;
- };
- #endif // NEWSWIDGET_H
|