2017-12-09 14:16:47 +01:00
|
|
|
|
#ifndef QUERYPARAMLISTCONTROLLER_H
|
|
|
|
|
|
#define QUERYPARAMLISTCONTROLLER_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
#include "ParamListModel.h"
|
|
|
|
|
|
#include "ParamTypeDelegate.h"
|
|
|
|
|
|
#include "Pgsql_Params.h"
|
2017-12-25 10:31:58 +01:00
|
|
|
|
#include <memory>
|
2017-12-09 14:16:47 +01:00
|
|
|
|
|
|
|
|
|
|
class QTableView;
|
|
|
|
|
|
class OpenDatabase;
|
|
|
|
|
|
|
|
|
|
|
|
class QueryParamListController : public QObject {
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
2017-12-25 10:31:58 +01:00
|
|
|
|
QueryParamListController(QTableView *tv, std::shared_ptr<OpenDatabase> opendb, QWidget *parent);
|
2017-12-09 14:16:47 +01:00
|
|
|
|
|
|
|
|
|
|
Pgsql::Params params() const;
|
|
|
|
|
|
bool empty() const;
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
void on_addParam();
|
|
|
|
|
|
void on_removeParam();
|
|
|
|
|
|
private:
|
|
|
|
|
|
QTableView *paramTableView;
|
2017-12-25 10:31:58 +01:00
|
|
|
|
std::shared_ptr<OpenDatabase> m_openDatabase;
|
2017-12-09 14:16:47 +01:00
|
|
|
|
ParamListModel m_paramList;
|
|
|
|
|
|
ParamTypeDelegate m_typeDelegate;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // QUERYPARAMLISTCONTROLLER_H
|