2018-11-25 09:06:01 +01:00
|
|
|
|
#ifndef FUNCTIONSPAGE_H
|
|
|
|
|
|
#define FUNCTIONSPAGE_H
|
|
|
|
|
|
|
2018-12-16 20:40:04 +01:00
|
|
|
|
#include <QSplitter>
|
2018-11-25 09:06:01 +01:00
|
|
|
|
#include <memory>
|
2018-12-16 20:40:04 +01:00
|
|
|
|
#include <optional>
|
2018-11-25 09:06:01 +01:00
|
|
|
|
|
2018-12-29 17:54:54 +01:00
|
|
|
|
class PgLabTableView;
|
2018-11-25 09:06:01 +01:00
|
|
|
|
class PgDatabaseCatalog;
|
|
|
|
|
|
class ProcTableModel;
|
|
|
|
|
|
class CustomFilterSortModel;
|
2018-12-16 20:40:04 +01:00
|
|
|
|
class QTabWidget;
|
|
|
|
|
|
class SqlCodePreview;
|
|
|
|
|
|
class PgProc;
|
2018-11-25 09:06:01 +01:00
|
|
|
|
|
2018-12-16 20:40:04 +01:00
|
|
|
|
class FunctionsPage : public QSplitter {
|
2018-11-25 09:06:01 +01:00
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
|
|
|
|
explicit FunctionsPage(QWidget *parent = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
void setCatalog(std::shared_ptr<const PgDatabaseCatalog> cat);
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
2018-12-16 20:40:04 +01:00
|
|
|
|
void functionTable_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
2018-11-25 09:06:01 +01:00
|
|
|
|
private:
|
2018-12-29 17:54:54 +01:00
|
|
|
|
PgLabTableView *m_functionTable = nullptr;
|
2018-12-16 20:40:04 +01:00
|
|
|
|
QTabWidget *m_detailTabs = nullptr;
|
|
|
|
|
|
SqlCodePreview *m_definitionView = nullptr;
|
2018-11-25 09:06:01 +01:00
|
|
|
|
ProcTableModel *m_model = nullptr;
|
|
|
|
|
|
CustomFilterSortModel *m_sortFilterProxy = nullptr;
|
|
|
|
|
|
std::shared_ptr<const PgDatabaseCatalog> m_catalog;
|
|
|
|
|
|
|
2018-12-16 20:40:04 +01:00
|
|
|
|
void retranslateUi();
|
2018-11-25 09:06:01 +01:00
|
|
|
|
|
2018-12-16 20:40:04 +01:00
|
|
|
|
void selectedProcChanged(const std::optional<PgProc> &proc);
|
|
|
|
|
|
void updateSqlTab(const std::optional<PgProc> &proc);
|
2018-11-25 09:06:01 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // FUNCTIONSPAGE_H
|