Commit Graph

852 Commits

Author SHA1 Message Date
Martin Kleusberg
7c1d237d9b Support alternative display formats in the Browse Data tab
This is a proof-of-concept or even a basic first implementation of a new
feature I'd like to have in DB4S which at the moment I call display
formats.

The idea here is to allow the user to change the data in the Browse Data
tab on a per column basis before displaying it. This means even though
the data is stored in format X in the database it can be shown in format
Y in the browser. This should be useful in cases where the original
format X is hard to read or just not useful in a particular case.

This first implementation allows the user to right click on the header
of a column and open a new dialog for setting the display format which
offers a (limited) list of pre-defined formats. The selected format is
then integrated into the SELECT statement which is sent to SQLite.

While it works, this draft implementation lacks a number of features.
Here are the most prominent ones I'm currently aware of:
* Data not editable (or only via the Edit Dialog) because it isn't
  transformed back yet.
* More display formats needed; maybe customizable ones, too.
* No indication in the UI for which columns a format has been set.
* Could _maybe_ be integrated into the import/export etc. for optional
  use.
2015-07-06 18:28:30 +02:00
Martin Kleusberg
944e22a80d Add clear button to filter line edit widgets
When entering some filter value show a clear button in that line edit
widget which when clicked clears the filter value.
2015-07-06 13:52:35 +02:00
Martin Kleusberg
748f06df93 Save filter settings and sort order for each table
When changing the table in the Browse Data tab we used to remember the
column widths for that particular table. When changing the tab and then
coming back or when pressing the refresh button we used to save the
filters (but not for a table change). The sort order wasn't remembered
at all. I think this behaviour doesn't make any sense.

With this patch we remember column widths, sort order and filter values
for each table individually and restore it when the user switches back to
the table. All the settings are handled the same way and as much
information as possible is stored. It gets also saved in our project
file format.
2015-07-04 23:12:30 +02:00
Martin Kleusberg
1696ad19fc Remove all the "no error" error messages
They are kind of pointless because, really, they never should be visible
to the user. If there is no error we shouldn't show an error message and
if there is an error we should show a proper error message.

Especially during bunch executions of SQL statements by calling
DBBrowserDB::executeSQL() (like when importing a huge CSV file) this
avoids a whole bunch of string copy operations and calls to tr() and
should therefore increase the performance a bit, too.
2015-07-04 22:13:31 +02:00
Martin Kleusberg
a598e0d36c Fix sqlb::Table::fieldList()
This suddenly failed on my system and broke the CSV import. Maybe
because of some new version of some software? Either way, the new
version should work anywhere.
2015-07-04 18:57:50 +02:00
Martin Kleusberg
b08cead7c8 csvimport: Set filename as default table name
See issue #376.
2015-07-03 21:42:46 +02:00
Oleg Polivets
42583a3a7d Merge pull request #377 from schdub/browser.colors
enhancement: advanced data browser colors preferences
2015-07-02 01:23:45 +03:00
schdub
b2e8dc3500 enhancement: advanced data browser colors preferences 2015-07-01 20:20:14 +03:00
Justin Clift
334334512c Merge pull request #365 from SevenLines/sevenlines
fix: UTF-8 characters (when out of comments or quotes) are drawn with different font
2015-07-01 18:12:19 +02:00
schdub
45b5438d27 fix: error adding new record into table with all fields has default values 2015-06-26 23:55:37 +03:00
schdub
7527df22ff fix: PRAGMA user_version is not displayed correctly if it is higher than 10000 2015-06-23 18:10:28 +03:00
m
3b5053c0a0 set default color to black 2015-06-23 03:09:03 +08:00
m
9af70c042e fix line numbers position recalculation 2015-06-23 02:57:26 +08:00
m
84ba7d8a17 fix: UTF-8 characters (when out of comments or quotes) are drawn with different font 2015-06-23 02:46:09 +08:00
Martin Kleusberg
5e0d1ba34e Add option for disabling the SQL error indicators
See issue #302.
2015-06-22 12:38:50 +02:00
Martin Kleusberg
1870f85e99 Trim SQL string before logging them
See issue #337
2015-06-22 11:56:27 +02:00
Martin Kleusberg
d5164a0c64 Fix Qt4 build 2015-06-22 00:09:15 +02:00
Martin Kleusberg
39a49e33c2 Allow clicking cells with foreign key in order to jump to referenced cell
Add a tooltip to the database browser when you hover a cell with a
foreign key set in order to show the referenced table and column.

When clicking on such a cell while holding the Ctrl and Shift key (only
one of them won't work because they are for multiselection and Alt
doesn't do the trick on my system because it's just for grabbing and
moving the window) try to jump to the table and row which is referenced
in the clicked cell.

See issue #192.
2015-06-21 23:59:45 +02:00
Martin Kleusberg
9dc59086a6 Allow changing columns when foreign keys are enabled and used
When foreign keys are enabled it used to be impossible to change a
column of a table which is referenced in a foreign key. This is because
the table gets dropped in the process of renaming the column and only
then replaced by a new version.
With this commit the foreign keys are disabled for this short period of
time where the table doesn't exist and the old settings value is
restored as soon as the renaming is done.

See issue #362.
2015-06-21 22:30:53 +02:00
Martin Kleusberg
212116ae18 Also set foreign key preferences when creating a new database
When opening a database we set the foreign key constraint checking
according to the preferences set in the Preferences Dialog. But when
creating a new database this wasn't done accordingly which means the
behaviour of the application is different depending on wether a database
was opened or newly created. This is changed by this commit.
2015-06-21 22:23:54 +02:00
Martin Kleusberg
0387999403 EditTableDialog: Print error when trying to edit a column referenced in a FK
In the EditTableDialog, when trying to edit a column which is referenced
in a foreign key of some other column (and thus cannot be changed
without errors ocurring during the rename process) print an error
message instead of just going on.

See issue #362.
2015-06-21 22:18:48 +02:00
Martin Kleusberg
0e18e36aa9 Parse foreign key clauses instead of just treating them as a big string
This changes the SQL grammar parser so that it parses foreign key
clauses instead of just reading to the end of the clause when
encoutering one. This allows using the information inside the clause
later in a more effective way. However, as of now this isn't used yet.
This commit only attempts to imitate the old behaviour using the new
approach (and might fail doing so, causing new errors...).
2015-06-21 22:09:36 +02:00
schdub
d4ce11b8ce fix: renameColumn 'no error' after errors 2015-06-20 23:14:35 +03:00
Martin Kleusberg
6b8f57d484 Make sure there are file extension filters set for all file dialogs 2015-06-16 23:58:02 +02:00
schdub
90639d8c3c fix: query is missing in log when it contains \r or \t 2015-06-16 21:21:34 +03:00
Justin Clift
7acc0c7b36 3.7.0 is built, so updating the master branch version numbers to 3.7.99 2015-06-14 18:10:29 +01:00
Peinthor Rene
3cefaf4476 prepare release 3.7.0 2015-06-14 12:13:37 +02:00
Martin Kleusberg
c9b892879e Fix regular expressions when used on columns with NULL values
See issue #353.
2015-06-13 19:00:35 +02:00
Geoff Lawrence
700741af71 Added English (United Kingdom) translation
Not a huge change from the default US English but also added the flag.
This was done to document the process for the wiki!
2015-06-13 15:15:01 +01:00
schdub
e7cecd0e42 Merge pull request #351 from schdub/master
update Russian translation
2015-06-10 23:04:28 +03:00
schdub
621a31ea99 update Russian translation 2015-06-10 22:19:56 +03:00
schdub
e0a687992d exportsql: incorrect extra ); after create table 2015-06-10 17:16:09 +03:00
Bernardo Sulzbach
8a84ed5dca Brazilian Portuguese translation. 2015-05-30 12:52:14 -03:00
Peinthor Rene
4223d5d5da gen_version.h is no longer generated so rename it to version.h 2015-05-23 10:27:15 +02:00
schdub
8a4abcf9da plot: remove ssDot item from point shape option 2015-05-22 04:26:00 +03:00
Martin Kleusberg
8823cf837c Merge pull request #320 from mafagafogigante/typo-fix
Fixed a typo.
2015-05-21 00:02:55 +02:00
Bernardo Sulzbach
8153df8cb8 Reworded CSVProgress brief. 2015-05-20 14:03:59 -03:00
Bernardo Sulzbach
abc432fcd6 Fixed a few typos. 2015-05-20 10:17:52 -03:00
Peinthor Rene
97b88feaab Merge pull request #317 from schdub/issue316
plot: lineType and pointShape options
2015-05-20 09:21:06 +02:00
schdub
b0abd07d01 preparation to Brazilian Portuguese translation 2015-05-20 01:09:57 +03:00
schdub
220c5ba75b plot: lineType and pointShape options 2015-05-19 23:37:32 +03:00
Martin Kleusberg
4e36226c85 Fix Qt4 build
...again
2015-05-18 19:19:59 +02:00
Martin Kleusberg
75483d0136 Add a 'Copy Create statement' popup action to Database Browser tab
See issue #140.
2015-05-18 19:09:30 +02:00
Martin Kleusberg
55780562d5 EditTableDialog: Add '=' in fron of functions in default value
When editing an existing table with a function used inside a default
value of a field add a '=' character before the default expression
string to match our own input format for these kind of default values.

See issue #166.
2015-05-18 18:42:24 +02:00
Martin Kleusberg
a342194443 Simplify code for translation loading
Don't have two identical loops for loading languages from files and from
resources.
2015-05-18 15:44:57 +02:00
schdub
28f3fae7a9 Update Russian Translation 2015-05-15 14:56:28 +03:00
Justin Clift
7cfef559b4 Merge pull request #309 from schdub/issue305
enhancement: preserve field filters when switching tab
2015-05-15 04:30:49 +02:00
Peinthor Rene
dd333ce88c Merge pull request #310 from schdub/issue304
fix: translations are not being installed via make install
2015-05-12 21:52:20 +02:00
Peinthor Rene
9359b855a1 Merge branch 'pinotree-external-antlr' 2015-05-12 21:43:41 +02:00
schdub
f251d11ccb fix: translations are not being installed via make install 2015-05-12 22:15:10 +03:00