Commit Graph

546 Commits

Author SHA1 Message Date
Martin Kleusberg
1a7aad0ff0 Make current filename a private class member 2016-01-27 23:08:48 +01:00
Martin Kleusberg
910c15ae25 Try suggesting file names when saving some files
When exporting tables, saving project files, etc. suggest default file
names where appropriate.

See issue #484.
2016-01-27 23:02:30 +01:00
Martin Kleusberg
0bfdc28f7a Don't show context menu in Browse tab when not clicking on column header
When not clicking on an actual column header in the Browse Data tab
don't show the context menu. It's not working correctly anyway.

See issue #485.
2016-01-27 22:37:17 +01:00
Martin Kleusberg
d9d2f96c40 Windows: Try to remove the keyboard shortcuts for dock widgets
See issue #494.
2016-01-27 22:08:45 +01:00
Martin Kleusberg
23f9c59478 Reload schema when refreshing the browse data view
When hittin the refresh button in the Browse Data tab reload the table
schema, too, before reloading the table data. It might have changed from
outside the application as well.

See issue #496.
2016-01-27 21:56:39 +01:00
Martin Kleusberg
3ff20044e0 Plot: Minor code improvement
Use the actual data for type guessing, i.e. nothing for NULL values
instead of 'NULL'. This should be a bit simpler and faster and overall
more correct (even though it doesn't change the behaviour at all).
2016-01-27 21:19:53 +01:00
Martin Kleusberg
6784a6a854 Plot: Load all data before drawing a plot
Load all table data first, before drawing a plot. Otherwise the plot
might be incomplete because not all data is loaded yet due to partial
table loading.

See issue #499.
2016-01-27 20:50:39 +01:00
Martin Kleusberg
ef8fbd83c8 Don't disable the Browse Table option when browsing a read only database 2016-01-27 20:28:06 +01:00
Martin Kleusberg
6f17c3d1ea Reduce number of unneededly executed SQL commands
See issue #503.
2016-01-27 20:23:36 +01:00
gimKondo
54cea17f3a set selected data type on imported by Edit database cell
Data type isn't decided by column type, but cell's type.
And, 2 bugs is fixed.
1. prevention in-place editing data
2. the lack of tr() on text literal
2016-01-18 15:56:57 +00:00
Martin Kleusberg
f6b9cd11a3 EditDialog: Clear after closing database
When closing the current database file clear the contents of the edit
window or the edit dock (whichever is used at the moment).

See issue #469.
2016-01-02 22:36:32 +01:00
Martin Kleusberg
69e1c87f7a EditDialog: Update dock after inline editing of cell
When having set the edit dialog to work in dock mode but changing the
content of a cell using the inline editor of the grid view, update the
text in the editor of the docked dialog, too.

See issue #441.
2015-12-24 14:27:39 +01:00
Martin Kleusberg
d7c035874a Fix bug when cancelling the database closing
See issue #432.
2015-12-24 13:30:12 +01:00
Martin Kleusberg
4727b0bb92 Minor text fix 2015-12-22 22:56:19 +01:00
Martin Kleusberg
84cd516bdf Fix Show Rowid menu item
This took me way too long to fix but it feels good that it's working
now.

See issue #408.
2015-12-22 22:42:00 +01:00
Martin Kleusberg
0fed833e55 Move a connect in SqlTextEdit to avoid unnecessary slot calls
Move the connect for updating the line number area width from the reload
settings method to the constructor to make sure it's only called once.
Otherwise there would be more and more unnecessary connections made
whenever the settings are reloaded.
2015-12-22 18:19:55 +01:00
Martin Kleusberg
540b12a57a EditDialog: Allow opening dialog/updating dock in read-only mode for views
See #441.
2015-12-21 11:22:43 +01:00
Martin Kleusberg
d923c5dfe7 Add keyboard shortcuts for recently opened files actions
See issue #432.
2015-12-21 01:08:40 +01:00
Martin Kleusberg
0e17990583 EditDialog: Better behaviour when pressing escape key in dock mode
See issue #441.
2015-12-20 12:15:13 +01:00
Martin Kleusberg
672b6f693b EditDialog: Make edit dock more keyboard friendly to use
See #440, #441.
2015-12-19 14:05:45 +01:00
Martin Kleusberg
f26df79961 Add edit cell dock to main window
Add a new option for replacing the edit data dialog by an edit data dock
widget which is added to the main window and remains visible. This might
be interesting for people who otherwise would have to open the edit
dialog many times by doing tons of double clicks.
2015-12-15 22:29:15 +01:00
GeorgijK
9d7efcacfa Fixed bug issue #390 ("crash then correct table").
Some functions renamed for better readability.

See pull request #401.
2015-10-14 22:22:07 +02:00
Martin Kleusberg
afb14a6f27 Fix Qt4 build 2015-09-15 11:07:23 +02:00
Martin Kleusberg
c78c466598 Add option for changing encoding for all tables in Browse Data tab
Add a new menu option to the Browse Data tab for changing the encoding
of all tables instead of just the one table.

Also check if the encoding the user typed in exists before trying to use
it to prevent a crash when an invalid encoding is used.

See issue #414.
2015-09-15 10:58:37 +02:00
Martin Kleusberg
eaf6ff1565 Support text in different encoding in Browse Data tab
When browsing and editing a table in the Browse Data tab allow the user
to change the assumed encoding of the text in the table. We'll then try
to convert from this encoding to Unicode for display purposes and to
convert from Unicode to this encoding for editing purposes. This way the
UI and all tools will keep using Unicode while the database format is
still respected. I hope the amount conversions generated this way won't
affect the performance too much.

See issue #414.
2015-09-15 00:14:55 +02:00
Martin Kleusberg
1ebecbbc9d Add option for showing the rowid column
See issue #408.

This isn't working reliably yet on my system: If you enable the fix
restoring the previous settings when going back to a table doesn't work
and if you disable it that very way is the only way to change the
option. Don't know what's going on there :(
2015-09-11 13:30:24 +02:00
Martin Kleusberg
90bb4891b9 Support read only opening of database files
When opening a read only database file show a 'Read only' note in the
status bar of the main window and disable all editing buttons in the UI.

See issue #402.
2015-08-25 19:28:40 +02:00
Martin Kleusberg
a8c52eba12 Make Data Browser font and font size configurable
See issue #383.

Also delete the custom styling sheets for the Data Browser tab in the
Preferences Dialog - no need to have these group boxes look differently
from all the others.
2015-08-23 18:19:19 +02:00
Martin Kleusberg
631979c330 Improve escpaing support
When generating SQL statements properly escape all identifiers, even
those containing backticks which apparently are allowed inside
identifiers in SQLite.

See issue #387.
2015-08-17 00:17:48 +02:00
Martin Kleusberg
8e4371c1d9 MainWindow: Add extra shortcut for Browse Data refresh button
See issue #388.
2015-08-06 15:01:49 +02:00
Martin Kleusberg
82292c221b Add 'x rows affected' part to the Execute Query results
See issue #114.
2015-07-16 20:02:49 +02:00
Martin Kleusberg
86fb1758de Optimise success message in Execute SQL tab
Change the success message for SELECT statement so that the amount of
time taken comes before the SQL statement itself because the time is a
new information whereas the statement is just a repitition for the user.

See issue #381.
2015-07-09 10:57:04 +02:00
Martin Kleusberg
c235379523 Add option for horizontal tiling between code editor and result view
Add a new option to the Preferences Dialog which activates horizontal
tiling between the SQL code editor and the result view in the Execute
SQL tab, i.e. the two widgets are shown side by side instead of one over
the other.

See issue #380.
2015-07-08 21:48:14 +02:00
Martin Kleusberg
16f037a0ed Remove deleted files from recently opened files list
See #379.
2015-07-08 21:29:12 +02:00
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
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
5e0d1ba34e Add option for disabling the SQL error indicators
See issue #302.
2015-06-22 12:38:50 +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
6b8f57d484 Make sure there are file extension filters set for all file dialogs 2015-06-16 23:58:02 +02: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
abc432fcd6 Fixed a few typos. 2015-05-20 10:17:52 -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
schdub
b5c1c7b0ab enhancement: preserve field filters when switching tab 2015-05-11 23:35:59 +03:00
Martin Kleusberg
861ecec527 Add option to remember last location for file dialogs
Add an option to remember the location of the last opened or saved file
and use it as the default location for the next file dialog because
always going back to the default location set in the preferences dialog
can be a real hastle.

See issues #224, #276 and #281.
2015-05-03 13:22:13 +02:00
Martin Kleusberg
d6533ba5f7 Fix Qt4 build broken in dd8dd4852d 2015-04-23 22:44:23 +02:00
Martin Kleusberg
dd8dd4852d Add Browse Table popop action to Database Structure tab
In the Database Structure tab of the main window, add a new action to
the popup menu which open upon right clicking the tree view to allow
directly changing to the Browse Data tab with the current table being
selected automatically.

See issue #246.
2015-04-23 22:32:23 +02:00