Functions page now shows sql for selected function.
The actual SQL needs some further checking.
This commit is contained in:
parent
31a77a1742
commit
c0a11f9b3b
3 changed files with 76 additions and 10 deletions
|
|
@ -1,15 +1,19 @@
|
|||
#ifndef FUNCTIONSPAGE_H
|
||||
#define FUNCTIONSPAGE_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QSplitter>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
class QTableView;
|
||||
class PgDatabaseCatalog;
|
||||
class ProcTableModel;
|
||||
class CustomFilterSortModel;
|
||||
class QTabWidget;
|
||||
class SqlCodePreview;
|
||||
class PgProc;
|
||||
|
||||
class FunctionsPage : public QWidget {
|
||||
class FunctionsPage : public QSplitter {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FunctionsPage(QWidget *parent = nullptr);
|
||||
|
|
@ -19,14 +23,19 @@ signals:
|
|||
|
||||
public slots:
|
||||
|
||||
void functionTable_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
private:
|
||||
QTableView *m_functionTable = nullptr;
|
||||
QTabWidget *m_detailTabs = nullptr;
|
||||
SqlCodePreview *m_definitionView = nullptr;
|
||||
ProcTableModel *m_model = nullptr;
|
||||
CustomFilterSortModel *m_sortFilterProxy = nullptr;
|
||||
std::shared_ptr<const PgDatabaseCatalog> m_catalog;
|
||||
|
||||
void retranslateUi(bool all = true);
|
||||
void retranslateUi();
|
||||
|
||||
void selectedProcChanged(const std::optional<PgProc> &proc);
|
||||
void updateSqlTab(const std::optional<PgProc> &proc);
|
||||
};
|
||||
|
||||
#endif // FUNCTIONSPAGE_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue