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

@ -55,11 +55,13 @@ public:
std::shared_ptr<OpenDatabase> getDatabase() { return m_database; }
void newCrudPage(const PgClass &table);
void newCodeGenPage(QString query, std::shared_ptr<const Pgsql::Result> dbres);
void setTabCaptionForWidget(QWidget *widget, const QString &caption, const QString &hint);
void setTabIcon(QWidget *widget, const QString &iconname);
/// Called when a newly created page is added to the QTabWidget
void addPage(PluginContentWidget* page, QString caption);
private:
Ui::MainWindow *ui;
@ -124,8 +126,6 @@ private:
void newCreateTablePage();
/// Called when a newly created page is added to the QTabWidget
void addPage(PluginContentWidget* page, QString caption);
/// Called when a page is completely removed from the QTabWidget
void removePage(PluginContentWidget *page);