#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);
    void setContents(const QString &contents);
    void setIcon(const QPixmap &pixmap);

    QString getTitle();
    QString getUrl();
    QString getDate();
    QString getContents();
    QPixmap getIcon();

    ~NewsPiece();

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

#endif // NEWSPIECE_H
