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
eelke
50cb21b6f9
The list of indexes on a table now also shows the access method (ie btree)
2018-08-25 18:11:12 +02:00
eelke
7c4f1a4752
fix: the source views for constraints and indexes are now cleared when the
...
model is reset as this will clear all selections.
Unfortunatly the selection model does not trigger a selectionChanged when
the model is reset.
Close #16
2018-08-05 11:57:27 +02:00
eelke
f1020ac56e
Index DROP and CREATE statements are now shown.
...
For now the create is still single line. Either complex query is required
to get details for custom generator or we need to format after the fact.
Close #12
2018-08-05 11:27:05 +02:00
eelke
78a6666839
WIP moving actions for toolbar to module system.
2018-08-05 09:07:12 +02:00
eelke
f5e9c4b74e
Added column number to list of columns of table.
2018-08-05 09:05:56 +02:00
eelke
31afc6fcbf
Fix some warning
2018-08-05 09:05:24 +02:00
eelke
ec8c3ff5ec
The list of tables can now be sorted by either name,schema or schema,name by clicking on the column headers.
2018-07-07 09:57:59 +02:00
eelke
5b20f900fc
Sketched rough parser code construction including some SQL AST classes.
2018-06-19 19:52:56 +02:00
eelke
f3898599fd
design docs
2018-05-20 13:44:04 +02:00
eelke
4dd526f32a
Icons on action supplied by the PlgPages.
2018-05-20 13:42:30 +02:00
eelke
3d516e6006
First tab at building a mechanism where tabpages can supply a list of actions that are added to the global main toolbar.
2018-05-14 20:24:41 +02:00
eelke
c2d725ec6d
Ask confirmation before removing connection.
...
Close #5
2018-04-30 20:17:44 +02:00
eelke
d67224858d
Focus query editor when opening new querytab.
...
Close #7
2018-04-21 14:36:33 +02:00
eelke
8cb1d6eab3
Permission denied errors are now being ignored while reading the system catalog.
...
Other parts of the program will have to cope with the fact that not all data will
be available.
Close #4
2018-04-21 10:50:04 +02:00
eelke
65c3d9f2b4
getTypeDisplayString now better handles zero oid's and oid's that are not known in the catalog.
...
Close #10
2018-04-21 10:23:28 +02:00
eelke
51d72c7f20
Can close CRUD tabs now
...
Close #6
2018-04-10 20:21:50 +02:00
eelke
45b7d4fcbc
show location of error in gutter and as selection
...
Close #3
2018-04-09 21:44:00 +02:00
eelke
47ee1857cd
Added a gutter and currentline highlighting to the SQL editor.
...
Currently gutter only shows linenumbers. Code is mostly from http://doc.qt.io/qt-5/qtwidgets-widgets-codeeditor-example.html
There is a little bit included in this commit from a first try to make toobars adept to the current tab.
Code #2
2018-04-08 09:19:32 +02:00
eelke
5e83094e6a
Improved way sockets are closed.
...
Not 100% sure this is allowed by boost::asio thought a code inspection suggest it does as it is ignoring the error it gets on close.
2018-04-08 09:06:05 +02:00
eelke
61645d44ac
Show moer information about the indexes.
2018-04-08 09:04:38 +02:00
eelke
8c20bd6a02
Added delete support to the CRUD system.
2018-04-08 09:03:03 +02:00
eelke
36f5153091
Only allow editing of tables that have a primary key.
2018-02-18 12:10:09 +01:00
eelke
09d5c1e41a
The crud now support inserting new rows
2018-02-18 08:37:59 +01:00
eelke
c51bd7594d
Data in crud table wasn't shown as it was supposed to.
2018-02-18 08:32:38 +01:00
eelke
2ba68d4edc
fix: editing same row only updated the view for first edit
...
Was programming error emplace only inserts new keys into map if key exists it fails.
Neede to use insert_or_assign to get desired behaviour.
2018-02-18 07:23:59 +01:00
eelke
628c16e2f4
Updating rows kinda works.
...
Blocking calls are still used.
2018-02-18 07:15:43 +01:00
eelke
99d738ee65
Added some classes from a stackoverflow to utilize Qt's concurrency functions especially cancellable QFuture's
2018-02-14 19:18:51 +01:00
eelke
ad3f605ada
Some rudementary refresh support in crud tab bound to execute action (should be replaced with dynamic action list on form)
2018-02-05 22:40:17 +01:00
eelke
914d2fe9fa
Lexical analyzer should now be less confused by dots and comma's and an assortment of other single character symbols.
2018-02-05 22:25:38 +01:00
eelke
44326da564
Fix: boolean values from query result were always shown as true.
2018-02-05 21:47:21 +01:00
eelke
d626c19e14
Basic support for update in Crud implementation, error reporting and transfering data to modified set is still missing.
2018-02-05 21:42:54 +01:00
eelke
3fb32f1200
Couple of minor changes.
2018-01-15 13:32:18 +01:00
eelke
e1405d5370
Use PgLabItemDelegate for indexes tab.
2018-01-15 13:31:37 +01:00
eelke
07c1b63d44
Tab of crud view now shows name of the table.
2018-01-15 13:31:06 +01:00
eelke
a543ccb021
CrudTab uses new PgLabItemDelegate, no need anymore for CrudModel to inherit BaseTableModel.
2018-01-15 13:30:30 +01:00
eelke
208883462c
QueryResultModel inherits from QAbstractTableModel now instead of BaseTableModel and the tableview now gets a custom delegate.
2018-01-15 12:23:41 +01:00
eelke
3ac1d21728
Implemented a custom delegate that does the samework as the BaseTableModel class did.
...
While this might seem to duplicate behaviour I believe having this code in a delegate
is a better solution.
- the logic in BaseTableModel is view logic not model logic
- letting the custom delegate determine the formatting is much more efficient
then letting the default delegate do many virtual calls to detemine how the
model wants it formatted.
2018-01-15 12:21:24 +01:00
eelke
2ba27178a2
Double clicking a table now opens a CRUD page for that table however data cannot be changed yet thought it will display an editbox.
2018-01-09 20:39:43 +01:00
eelke
abd4020ddf
Decided to use signal slot mechanism
...
The automatic cross thread activation is probably worth it.
2018-01-08 20:54:03 +01:00
eelke
14ab400ccb
Bezig met crudmodel/tab
2018-01-08 20:45:52 +01:00
eelke
ee321b3fb1
Bunch of tests were in header files so they all got compiled when main got compiled.
...
Prefer to have them in seperate compilation units for faster make times when changing tests.
Also parallel build is faster with seperate cpps.
2018-01-07 09:19:19 +01:00