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.
This commit is contained in:
eelke 2018-12-29 18:59:54 +01:00
parent f6ea2ce0a6
commit 2a7e505dbf
13 changed files with 220 additions and 113 deletions

View file

@ -3,7 +3,7 @@
#include "catalog/PgClass.h"
#include <QWidget>
#include "PlgPage.h"
#include "PluginContentWidget.h"
#include <memory>
#include <optional>
@ -15,12 +15,12 @@ class OpenDatabase;
class CrudModel;
class DatabaseWindow;
class CrudTab : public PlgPage
class CrudTab : public PluginContentWidget
{
Q_OBJECT
public:
explicit CrudTab(DatabaseWindow *parent = 0);
explicit CrudTab(IPluginContentWidgetContext *context, DatabaseWindow *parent = 0);
~CrudTab() override;
void setConfig(std::shared_ptr<OpenDatabase> db, const PgClass &table);