#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "Spells.h"

class QItemSelection;
class SpellsTableModel;
class SpellViewer;
class SpellFilterViewer;
class QTableView;

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(Spells spells, QWidget *parent = 0);
    virtual ~MainWindow();

private:
    void setupUi(Spells &spells);

public slots:
    void onSelectedSpellChanged(const QItemSelection &selected, const QItemSelection &deselected);
    void onModelLayoutChanged();
    void onSpellFilterChanged();

private:
    SpellsTableModel *_model;
    SpellViewer *_spellViewer;
    SpellFilterViewer *_filterViewer;
    QTableView *_table;
};

#endif // MAINWINDOW_H
