pgLab/pglab/CodeGenerator.h
eelke 601d071d0f Proof of concept for having the context actions statically defined in the module.
Needs work for correctly placing the items in menu and on toolbar.
Old system still needs to be removed left in place to keep app useable.
2019-08-14 09:06:48 +02:00

36 lines
772 B
C++

#ifndef CODEGENERATOR_H
#define CODEGENERATOR_H
#include <QWidget>
#include "plugin_support/PluginContentWidget.h"
#include "Pgsql_declare.h"
namespace Ui {
class CodeGenerator;
}
class PgDatabaseCatalog;
class CodeGenerator : public PluginContentWidget
{
Q_OBJECT
public:
CodeGenerator(IPluginContentWidgetContext *context, PluginModule *module, 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