#ifndef COMMODITYSETTINGSFORM_H
#define COMMODITYSETTINGSFORM_H

#include <QWidget>
#include <iform.h>
#include "data/commoditytypedata.h"
#include <autotablemodel.h>

namespace Ui {
class CommoditySettingsForm;
}

class CommoditySettingsForm : public IForm
{
    Q_OBJECT

public:
    explicit CommoditySettingsForm(QWidget *parent = 0);
    ~CommoditySettingsForm();

private:
    Ui::CommoditySettingsForm *ui;
    AutoTableModel<CommodityTypeData> *m_table;
    QList<QSharedPointer<CommodityTypeData> > m_delCommodityTypes;

    // IForm interface
public:
    void loadEntity();

public slots:
    bool saveRecord();
private slots:
    void on_addCommodityType_clicked();
    void on_delCommodityType_clicked();
};

#endif // COMMODITYSETTINGSFORM_H
