pgLab/pglab/CatalogInspector.h
eelke 601d071d0f Proof of concept for having the context actions statically defined in the module.
Needs work for correctly placing the items in menu and on toolbar.
Old system still needs to be removed left in place to keep app useable.
2019-08-14 09:06:48 +02:00

50 lines
1.2 KiB
C++

#ifndef TABLESPAGE_H
#define TABLESPAGE_H
#include <QWidget>
#include <memory>
#include "NamespaceFilter.h"
#include "plugin_support/PluginContentWidget.h"
#include "plugin_support/PluginModule.h"
class CatalogFunctionsPage;
class CatalogSequencesPage;
class CatalogTablesPage;
class PgDatabaseCatalog;
class QTabWidget;
class CatalogInspector : public PluginContentWidget {
Q_OBJECT
public:
explicit CatalogInspector(IPluginContentWidgetContext *context, PluginModule *module,
QWidget *parent = nullptr);
~CatalogInspector();
void setCatalog(std::shared_ptr<PgDatabaseCatalog> cat);
void setNamespaceFilter(NamespaceFilter filter);
private:
QTabWidget *m_tabWidget = nullptr;
CatalogTablesPage *m_tablesPage = nullptr;
CatalogFunctionsPage *m_functionsPage = nullptr;
CatalogSequencesPage *m_sequencesPage = nullptr;
std::shared_ptr<PgDatabaseCatalog> m_catalog;
void retranslateUi(bool all = true);
private slots:
};
class CatalogInspectorModule: public PluginModule {
Q_OBJECT
public:
using PluginModule::PluginModule;
void init();
private slots:
private:
void moduleAction_open(IPluginContentWidgetContext* context, const ModuleActionParameters &params);
};
#endif // TABLESPAGE_H