2018-12-28 08:51:02 +01:00
|
|
|
|
#ifndef SEQUENCESPAGES_H
|
|
|
|
|
|
#define SEQUENCESPAGES_H
|
|
|
|
|
|
|
2019-02-09 20:37:34 +01:00
|
|
|
|
#include "NamespaceFilter.h"
|
2018-12-28 08:51:02 +01:00
|
|
|
|
#include <QSplitter>
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
#include <optional>
|
|
|
|
|
|
|
2018-12-29 17:54:54 +01:00
|
|
|
|
class PgLabTableView;
|
2018-12-28 08:51:02 +01:00
|
|
|
|
class PgDatabaseCatalog;
|
|
|
|
|
|
class SequenceModel;
|
|
|
|
|
|
class CustomFilterSortModel;
|
|
|
|
|
|
class SqlCodePreview;
|
|
|
|
|
|
class PgSequence;
|
|
|
|
|
|
|
2019-02-09 09:49:27 +01:00
|
|
|
|
class CatalogSequencesPage : public QSplitter {
|
2018-12-28 08:51:02 +01:00
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
2019-02-09 09:49:27 +01:00
|
|
|
|
CatalogSequencesPage(QWidget *parent = nullptr);
|
2018-12-28 08:51:02 +01:00
|
|
|
|
|
|
|
|
|
|
void setCatalog(std::shared_ptr<const PgDatabaseCatalog> cat);
|
2019-02-09 20:37:34 +01:00
|
|
|
|
void setNamespaceFilter(NamespaceFilter filter);
|
2018-12-28 08:51:02 +01:00
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
|
|
void sequenceTable_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
2018-12-29 17:54:54 +01:00
|
|
|
|
PgLabTableView *m_sequenceTable = nullptr;
|
2018-12-28 08:51:02 +01:00
|
|
|
|
//QTabWidget *m_detailTabs = nullptr;
|
|
|
|
|
|
SqlCodePreview *m_definitionView = nullptr;
|
|
|
|
|
|
SequenceModel *m_model = nullptr;
|
|
|
|
|
|
CustomFilterSortModel *m_sortFilterProxy = nullptr;
|
|
|
|
|
|
std::shared_ptr<const PgDatabaseCatalog> m_catalog;
|
|
|
|
|
|
|
|
|
|
|
|
void retranslateUi();
|
|
|
|
|
|
void selectedSequenceChanged(const std::optional<PgSequence> &seq);
|
|
|
|
|
|
void updateSqlTab(const std::optional<PgSequence> &seq);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // SEQUENCESPAGES_H
|