poc Add support for reloading the catalog
Reload works and the column page reacts correctly. Others to be checked and fixed.
This commit is contained in:
parent
83122e89df
commit
60d8f36328
8 changed files with 89 additions and 40 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "BaseTableModel.h"
|
||||
#include "catalog/PgAttribute.h"
|
||||
#include "catalog/PgDatabaseCatalog.h"
|
||||
#include "catalog/PgClass.h"
|
||||
#include "catalog/PgIndex.h"
|
||||
#include <memory>
|
||||
|
|
@ -13,6 +14,7 @@ class PgDatabaseCatalog;
|
|||
class PgAttribute;
|
||||
|
||||
class ColumnTableModel: public BaseTableModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum e_Columns : int {
|
||||
AttnumCol,
|
||||
|
|
@ -49,8 +51,15 @@ protected:
|
|||
t_Columns m_columns;
|
||||
std::vector<PgIndex> m_indexes;
|
||||
|
||||
QMetaObject::Connection refreshConnection;
|
||||
|
||||
QString getFKey(const PgAttribute &column) const;
|
||||
|
||||
|
||||
|
||||
private slots:
|
||||
/// Retrieves required data from catalog, called everytime it might have changed
|
||||
void refresh();
|
||||
};
|
||||
|
||||
#endif // COLUMNTABLEMODEL_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue