#ifndef WIDGETCOMBOBOXPOPUPTABLE_H
#define WIDGETCOMBOBOXPOPUPTABLE_H
#include "ui_widgetcomboboxpopuptable.h"

#include <QWidget>

class QSqlQueryModel;

namespace Ui
{
class widgetComboboxPopupTable;
}

class widgetComboboxPopupTable : public QWidget, public Ui::widgetComboboxPopupTable
{
    Q_OBJECT

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

    void setModel(QSqlQueryModel *aModel);
    void setQueryEXEC(QString command);

private slots:
    void on_tableView_doubleClicked(const QModelIndex &index);
    void on_buttonSelect_released();
    void on_focusChanged(QWidget *old, QWidget *now);

private:
    //Ui::widgetComboboxPopupTable *ui;
    QSqlQueryModel *mModel;
    bool mMultiselect;    
    void SelectValues();

signals:
    void onSelect(QStringList aList);
};

#endif // WIDGETCOMBOBOXPOPUPTABLE_H
