Shows SQL for columns ALTER TABLE ... [ADD|DROP] COLUMN combines a selection of multiple columns into a single alter table. Show collation in list of columns. (order of columns isn't what is should be but that should maybe be fixed by a generic column selection and ordering mechanism that knows what the default sort should be)
42 lines
992 B
C++
42 lines
992 B
C++
#ifndef COLUMNPAGE_H
|
|
#define COLUMNPAGE_H
|
|
|
|
#include "PgClass.h"
|
|
#include <QSplitter>
|
|
#include <memory>
|
|
#include <optional>
|
|
|
|
|
|
class QTableView;
|
|
class SqlCodePreview;
|
|
class PgDatabaseCatalog;
|
|
class ColumnTableModel;
|
|
class CustomFilterSortModel;
|
|
class QItemSelection;
|
|
class QAbstractItemModel;
|
|
|
|
class ColumnPage : public QSplitter
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ColumnPage(QWidget *parent = nullptr);
|
|
|
|
void setData(std::shared_ptr<const PgDatabaseCatalog> cat, const std::optional<PgClass> &cls);
|
|
//void setFilter(const std::optional<PgClass> &cls);
|
|
signals:
|
|
|
|
public slots:
|
|
|
|
private:
|
|
QTableView *m_tableView = nullptr;
|
|
SqlCodePreview *m_definitionView = nullptr;
|
|
ColumnTableModel *m_columnModel = nullptr;
|
|
CustomFilterSortModel *m_sortFilterProxy = nullptr;
|
|
std::shared_ptr<const PgDatabaseCatalog> m_catalog;
|
|
std::optional<PgClass> m_Class;
|
|
|
|
private slots:
|
|
void tableView_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
|
};
|
|
|
|
#endif // COLUMNPAGE_H
|