#ifndef SPELLVIEWER_H
#define SPELLVIEWER_H

#include <QWidget>
#include <QLabel>
#include <QTextEdit>
#include "Spell.h"

class SpellViewer : public QWidget
{
    Q_OBJECT

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

signals:
    void spellChanged();

public slots:
    void setSpell(Spell spell);
    const Spell& spell() const;
    void onSpellChanged();

private:
    void setupUi();

private:
    Spell _spell;

    QLabel *_name;
    QLabel *_level;
    QLabel *_school;
    QLabel *_classes;
    QLabel *_castingtime;
    QLabel *_range;
    QLabel *_duration;
    QLabel *_components;
    QLabel *_ritual;
    QLabel *_concentration;

    QTextEdit *_description;
};

#endif // SPELLVIEWER_H
