Prior to this PR, we've had the Edit Cell be available both in a "dock"
and "window" mode. Both at the same time. (!)
The "dock" mode already had tear off window functionality and was more
complete, whereas the "window" mode was buggy and didn't really add
anything new.
This PR removes the "window" version of the dock, and cleans up the
handling of "dock" mode, so there's just one Edit Cell dock now. It
can be torn off and used as a window, docked to the main UI (by double
clicking its title bar), and toggled on/off with Ctrl-E (Cmd-E on OSX).
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.
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.
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.
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 :(
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.
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.
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.
Qt tries to determine the role of a menu item based on its text. If the
text is "Preferences" it guesses that that menu item opens the
preferences dialog. On MacOS X this means the menu item is moved from
the View menu to the application menu. However, for translations this
doesn't seem to work, so this commit sets the menu roles manually. At
least that's the idea - no idea if it works.
See issue #200.
When saving a SQL file in the Execute Query tab don't always ask for a
new file name but use the file name used when last saving the tab or
used when a file was opened. Add a 'Save As' menu option with the old
behaviour of always asking for a file name.
See issue #152.
Add a new menu option to the main window (only visible when built with
the sqlcipher option enabled) which opens a dialog asking for new
encryption settings. These are then applied to a new database to which
all contents of the current one are exported. The old database is then
replaced by the new one.
This adds support for encrypting plaintext databases, decrypting
encrypted databases and changing the password or other settings of
encrypted databases.
If this turns out to work well enough we have functional SQLCipher
encryption support with only details missing.
Add a new menu option which allows attaching other databases. Doing so
by running the SQL code by yourself using the Execute SQL tab won't work
because the SQL tab creates a restorepoint and attaching databases while
being in a transaction is not allowed.
Note that this commit misses quite a few features: In case of name
conflicts the UI may break, there is no way to tell which databases have
been attached and the attached databases are not stored in the project
files.
See issue #100.
Change the window title of the toolbar to the same name it has in the
View menu as the window title actually is visible in the UI when right
clicking on the toolbar or menu.
Add the Ctrl+Return shortcut for executing the current SQL again. This
needs to be done using C++ code instead of setting it in Qt Designer
because setting multiple shortcuts in the latter means defining a key
sequence row.
Also add the keyboard shortcuts to the tooltips of the buttons as they
didn't appear anywhere in the program.
Increase the default size of the main window a bit.
Move the SQL log dock to the right side and tabify it with the plot
dock. This way there is much more space for actual information by
default.
The idea behind both changes is to make it easier for first time users
to find their way around and offer them a more appropriate window layout
for the usual tasks. The layout is still entirely configurable and
non-first-time users are not affected at all.
This add support for saving and loading of SQLiteBrowser project files.
As of now these files contain a reference to the used database file,
store some window and widget settings as well as the content of the SQL
tabs.
Note that while working this is a first draft only. Especially the
parsing code still might contain a bug or two and there is a lot more
information to be added to these files later (like filters, plot
settings, etc.).
Also note that the main intention behind these project files was to make
the life of users easier while not getting into the way of those who don't
need them. The program still remains a database browser and doesn't
become a visual database studio thing.
Move the FilterTableHeader object from the MainWindow to the
ExtendedTableWidget class because it actually is a part of the latter,
not the former.
Show sort order arrows in the table header of the Browse Data tab after
clicking it.
Change the tool tips and help texts for the navigation buttons in the
Browse Data tab. They were still referring to the old concept of pages
of 1000 records.