Extended the plugin system to allow for dynamic runtime bindings between modules.

As a test implementation, this allows the TablesPage to open a CrudTab for a table/view without
the need for TablesPage, CrudTab and DatabaseWindow to know anything about each other.
This commit is contained in:
eelke 2018-12-31 15:20:55 +01:00
parent f996703937
commit b0cd47ef46
17 changed files with 209 additions and 55 deletions

View file

@ -6,6 +6,8 @@
#include <optional>
#include <QItemSelection>
#include "TablesTableModel.h"
#include "plugin_support/PluginContentWidget.h"
#include "plugin_support/PluginModule.h"
namespace Ui {
class TablesPage;
@ -18,25 +20,23 @@ class ConstraintModel;
class PgDatabaseCatalog;
class NamespaceFilterWidget;
class IndexModel;
class DatabaseWindow;
class PropertiesPage;
class TriggerPage;
class PgClass;
class SqlCodePreview;
class TablesPage : public QWidget
class TablesPage : public PluginContentWidget
{
Q_OBJECT
public:
explicit TablesPage(DatabaseWindow *parent = nullptr);
explicit TablesPage(IPluginContentWidgetContext *context, QWidget *parent = nullptr);
~TablesPage();
void setCatalog(std::shared_ptr<PgDatabaseCatalog> cat);
void setNamespaceFilter(TablesTableModel::NamespaceFilter filter);
private:
Ui::TablesPage *ui;
DatabaseWindow *m_window;
// QWidget *m_columnsTab;
ColumnPage *m_columnsPage;
// QWidget *m_propertiesTab;