Remove all knowledge of DatabaseWindow from CrudTab (unwanted dependency)
This commit is contained in:
parent
cc4f309c0f
commit
1da8ef7407
2 changed files with 2 additions and 8 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
#include "CrudTab.h"
|
#include "CrudTab.h"
|
||||||
#include "ui_CrudTab.h"
|
#include "ui_CrudTab.h"
|
||||||
#include "CrudModel.h"
|
#include "CrudModel.h"
|
||||||
#include "DatabaseWindow.h"
|
|
||||||
#include "ResultTableModelUtil.h"
|
#include "ResultTableModelUtil.h"
|
||||||
#include "PgLabItemDelegate.h"
|
#include "PgLabItemDelegate.h"
|
||||||
#include "IntegerRange.h"
|
#include "IntegerRange.h"
|
||||||
|
|
@ -12,10 +11,9 @@
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
|
||||||
CrudTab::CrudTab(IPluginContentWidgetContext *context, DatabaseWindow *parent)
|
CrudTab::CrudTab(IPluginContentWidgetContext *context, QWidget *parent)
|
||||||
: PluginContentWidget(context, parent)
|
: PluginContentWidget(context, parent)
|
||||||
, ui(new Ui::CrudTab)
|
, ui(new Ui::CrudTab)
|
||||||
, m_window(parent)
|
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,13 @@ namespace Ui {
|
||||||
|
|
||||||
class OpenDatabase;
|
class OpenDatabase;
|
||||||
class CrudModel;
|
class CrudModel;
|
||||||
class DatabaseWindow;
|
|
||||||
|
|
||||||
class CrudTab : public PluginContentWidget
|
class CrudTab : public PluginContentWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CrudTab(IPluginContentWidgetContext *context, DatabaseWindow *parent = nullptr);
|
explicit CrudTab(IPluginContentWidgetContext *context, QWidget *parent = nullptr);
|
||||||
~CrudTab() override;
|
~CrudTab() override;
|
||||||
|
|
||||||
void setConfig(std::shared_ptr<OpenDatabase> db, const PgClass &table);
|
void setConfig(std::shared_ptr<OpenDatabase> db, const PgClass &table);
|
||||||
|
|
@ -31,8 +30,6 @@ public:
|
||||||
private:
|
private:
|
||||||
Ui::CrudTab *ui;
|
Ui::CrudTab *ui;
|
||||||
|
|
||||||
DatabaseWindow *m_window;
|
|
||||||
|
|
||||||
std::shared_ptr<OpenDatabase> m_db;
|
std::shared_ptr<OpenDatabase> m_db;
|
||||||
std::optional<PgClass> m_table;
|
std::optional<PgClass> m_table;
|
||||||
|
|
||||||
|
|
@ -40,7 +37,6 @@ private:
|
||||||
std::vector<QAction*> actions;
|
std::vector<QAction*> actions;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
// void tableView_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
|
||||||
void on_actionRemove_rows_triggered();
|
void on_actionRemove_rows_triggered();
|
||||||
void headerCustomContextMenu(const QPoint &pos);
|
void headerCustomContextMenu(const QPoint &pos);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue