Had stopped working because the catalog now behaves a little different, returning nullptr instead of an invalid element.
40 lines
936 B
C++
40 lines
936 B
C++
#ifndef TRIGGERPAGE_H
|
|
#define TRIGGERPAGE_H
|
|
|
|
#include <QSplitter>
|
|
#include <memory>
|
|
#include <optional>
|
|
|
|
class QTableView;
|
|
class SqlCodePreview;
|
|
class PgDatabaseCatalog;
|
|
class PgClass;
|
|
class TriggerTableModel;
|
|
class CustomFilterSortModel;
|
|
class QItemSelection;
|
|
|
|
class TriggerPage : public QSplitter
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit TriggerPage(QWidget *parent = nullptr);
|
|
// TriggerPage(QWidget *parent = nullptr);
|
|
|
|
void setCatalog(std::shared_ptr<const PgDatabaseCatalog> cat);
|
|
void setFilter(const std::optional<PgClass> &cls);
|
|
signals:
|
|
|
|
public slots:
|
|
|
|
private:
|
|
QTableView *m_tableView = nullptr;
|
|
SqlCodePreview *m_definitionView = nullptr;
|
|
TriggerTableModel *m_model = nullptr;
|
|
CustomFilterSortModel *m_sortFilterProxy = nullptr;
|
|
std::shared_ptr<const PgDatabaseCatalog> m_catalog;
|
|
|
|
private slots:
|
|
void tableView_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
|
};
|
|
|
|
#endif // TRIGGERPAGE_H
|