#ifndef QGGRIFODOWNLOADENTITIESFORM_H
#define QGGRIFODOWNLOADENTITIESFORM_H

#include <QWidget>
#include "bsk_tftp_pfs.h"
#include "fpgaflashconfig.h"
#include "flashtarget.h"

//static TgtMatchSet tgtMatchSet;

class QTreeWidgetItem;

struct QgGrifoDownloadSite//: public bsk_download_site_t
{
    //TgtMatch* tgt;

    targetItem* tgtFlash;

    bsk_download_site_t site;
};

//struct bsk_download_site_t;

namespace Ui {
class QgGrifoDownloadEntitiesForm;
}

class QgGrifoDownloadEntitiesForm : public QWidget
{
    Q_OBJECT

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

    void clear();

    void addSite(const QgGrifoDownloadSite* s);

    void db_add_site(QTreeWidget* root, QgGrifoDownloadSite* s);

    void setDefaultTarget(QString _def_target);

    void setChecked(QString _def_target);

    void setUnCheckedAll();

    void dropEvent(QDropEvent * event);
    void dragEnterEvent(QDragEnterEvent*event);

//    TgtMatchSet tgtMatchSet;

    QString getFirstSelectedTarget();

signals:
    void itemSelected(void*, void*);
    void fileDroppped(QTreeWidgetItem*, const QString& filename);

private:
    Ui::QgGrifoDownloadEntitiesForm *ui;
};

#endif // QGGRIFODOWNLOADENTITIESFORM_H
