pgLab/pglab/TriggerPage.h
eelke 52011a9842 Updating of detail tabs besides list of tables works correctly again.
Had stopped working because the catalog now behaves a little different,
returning nullptr instead of an invalid element.
2018-11-18 20:24:27 +01:00

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