Flexible models #76

Merged
eelke merged 9 commits from flexible-models into master 2018-09-02 10:30:31 +00:00

9 commits

Author SHA1 Message Date
eelke
e8f81557bb Simplify connecting QItemSelection::currentRowChanged to PropertyProxyModel::activeRow 2018-09-02 12:28:56 +02:00
eelke
0cef509771 Correct tablespace names are now shown in the list of tables.
Slightly more complex then you may expect because the tablespace specified by the tables tends to be oid 0
which means the default tablespace is used. However this does not mean pg_default, it means the tablespace
as defined as standard in the database definition. So we need to know what the current dbname is retrieve
it's details from the catalog and retrieve that tablespace to know what to show for an oid of 0.
2018-08-27 21:14:57 +02:00
eelke
7630723b69 Switched TablesTableModel to rely on the PgLabDelegate for formatting instead of the old model base class. 2018-08-27 21:12:27 +02:00
eelke
a4054ed789 Introduced global enum to keep track of custom roles we want to use in our datamodels. 2018-08-26 15:18:32 +02:00
eelke
ad4c6fd442 The PropertyProxyModel now properly maps the second column to the active row of the source.
It has a slot to receive the activeRow.
Used this in the TablesPage to let the property tab follow the currentIndex in the list of tables.
2018-08-26 07:59:15 +02:00
eelke
c6faafec59 Renamed HorizontalProxyModel to PropertyProxyModel as the original name didn't reflect
what we are going to morph it into.
2018-08-26 07:14:25 +02:00
eelke
3080523b0d First step in using HorizontalProxyModel to show selected row in properties table.
HorizontalProxyModel now inherits from QIdentityProxyModel which provides a more complete base implementation (maybe to much?)
for now it seems to do what we want, forward relevant signals which the abstract base didn't.
Issues: Properties table needs formatting and shows all rows as columns instead of values of a single row.
2018-08-26 07:11:46 +02:00
eelke
49f009bdf9 Fix two warnings + some documentation in comment 2018-08-26 07:08:44 +02:00
eelke
68a1a8e7c9 Addded HorizontalProxyModel which is used to effictively rotate a table 90 degrees. 2018-08-25 18:14:08 +02:00