#ifndef NEWSPIECE_H
#define NEWSPIECE_H

#include <QWidget>

namespace Ui {
class NewsPiece;
}

class NewsPiece : public QWidget
{
    Q_OBJECT

public:
    explicit NewsPiece(QWidget *parent = 0);

    void setTitle(const QString &title, const QString &url);
    void setDate(const QString &date);

    QString getTitle();
    QString getUrl();
    QString getDate();

    ~NewsPiece();

public slots:
    void updateFontsSizes();

protected:
    void resizeEvent(QResizeEvent *event) override;

private:
    QString _title;
    QString _url;
    Ui::NewsPiece *ui;
};

#endif // NEWSPIECE_H
