2017-12-10 14:20:45 +01:00
|
|
|
|
#ifndef TABLESPAGE_H
|
2017-12-10 08:17:07 +01:00
|
|
|
|
#define TABLESPAGE_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
2017-12-10 14:20:45 +01:00
|
|
|
|
#include <memory>
|
2018-12-29 10:56:24 +01:00
|
|
|
|
#include "TablesTableModel.h"
|
2018-12-31 15:20:55 +01:00
|
|
|
|
#include "plugin_support/PluginContentWidget.h"
|
|
|
|
|
|
#include "plugin_support/PluginModule.h"
|
2017-12-10 08:17:07 +01:00
|
|
|
|
|
2019-02-09 09:49:27 +01:00
|
|
|
|
class CatalogFunctionsPage;
|
|
|
|
|
|
class CatalogSequencesPage;
|
|
|
|
|
|
class CatalogTablesPage;
|
|
|
|
|
|
class QTabWidget;
|
2017-12-10 08:17:07 +01:00
|
|
|
|
|
2019-02-09 09:49:27 +01:00
|
|
|
|
class CatalogInspector : public PluginContentWidget {
|
2017-12-10 08:17:07 +01:00
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
2019-01-06 10:11:48 +01:00
|
|
|
|
explicit CatalogInspector(IPluginContentWidgetContext *context, QWidget *parent = nullptr);
|
|
|
|
|
|
~CatalogInspector();
|
2017-12-10 08:17:07 +01:00
|
|
|
|
|
2017-12-10 14:20:45 +01:00
|
|
|
|
void setCatalog(std::shared_ptr<PgDatabaseCatalog> cat);
|
2018-12-29 10:56:24 +01:00
|
|
|
|
void setNamespaceFilter(TablesTableModel::NamespaceFilter filter);
|
2017-12-10 08:17:07 +01:00
|
|
|
|
private:
|
2019-02-09 09:49:27 +01:00
|
|
|
|
QTabWidget *m_tabWidget = nullptr;
|
|
|
|
|
|
CatalogTablesPage *m_tablesPage = nullptr;
|
|
|
|
|
|
CatalogFunctionsPage *m_functionsPage = nullptr;
|
|
|
|
|
|
CatalogSequencesPage *m_sequencesPage = nullptr;
|
2017-12-10 14:20:45 +01:00
|
|
|
|
std::shared_ptr<PgDatabaseCatalog> m_catalog;
|
2017-12-12 20:13:53 +01:00
|
|
|
|
|
2018-10-07 19:40:06 +02:00
|
|
|
|
void retranslateUi(bool all = true);
|
2018-10-21 13:47:38 +02:00
|
|
|
|
|
2017-12-12 20:13:53 +01:00
|
|
|
|
private slots:
|
2017-12-10 08:17:07 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
2019-01-06 10:11:48 +01:00
|
|
|
|
class CatalogInspectorModule: public PluginModule {
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
|
|
|
|
using PluginModule::PluginModule;
|
|
|
|
|
|
|
|
|
|
|
|
void init();
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
void moduleAction_open(IPluginContentWidgetContext* context, const ModuleActionParameters ¶ms);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-10 08:17:07 +01:00
|
|
|
|
#endif // TABLESPAGE_H
|