#ifndef CURRENCYMODEL_H
#define CURRENCYMODEL_H

#include <QAbstractTableModel>

class TableModel : public QAbstractTableModel
{
public:
    TableModel(QObject *parent = 0);

    void setContents(const QList<QList<double> > c);
    void setRowTitles(QStringList rt);
    void setColumnTitles(QStringList ct);

    int rowCount(const QModelIndex &parent) const;
    int columnCount(const QModelIndex &parent) const;
    QVariant data(const QModelIndex &index, int role) const;
    QVariant headerData(int section, Qt::Orientation orientation,
                        int role) const;

    QList<QList<double> > getContents() const;
    QStringList getRowTitles() const;
    QStringList getColumnTitles() const;
    QStringList getUniqueColumnTitles() const;

    void showColumn(int col);
    void hideColumn(int col);

private:
    QList<QList<double> > contents;
    QStringList rowTitles;
    QStringList columnTitles;
};

#endif
