pgLab/pglab/CodeGenerator.h
eelke 2a7e505dbf Made a step in removing knowledge of DatabaseWindow from QueryTab as an effort to move
in the direction of a plugin system.

DatabaseWindow now passes a Context to QueryTab and other pages that give those pages an
API for passing information up the system without knowing anything about the sytem.
2018-12-29 18:59:54 +01:00

36 lines
735 B
C++

#ifndef CODEGENERATOR_H
#define CODEGENERATOR_H
#include <QWidget>
#include "PluginContentWidget.h"
#include "Pgsql_declare.h"
namespace Ui {
class CodeGenerator;
}
class PgDatabaseCatalog;
class CodeGenerator : public PluginContentWidget
{
Q_OBJECT
public:
CodeGenerator(IPluginContentWidgetContext *context, QWidget *parent = nullptr);
~CodeGenerator();
void Init(std::shared_ptr<PgDatabaseCatalog> catalog, QString query, std::shared_ptr<const Pgsql::Result> dbres);
private slots:
void on_updateCodeButton_clicked();
private:
Ui::CodeGenerator *ui;
std::shared_ptr<PgDatabaseCatalog> m_catalog;
QString m_query;
std::shared_ptr<const Pgsql::Result> m_dbres;
void generateCode();
};
#endif // CODEGENERATOR_H