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.
it wasn't possible to add new tab pages from the qt designer
added a QWidget container with a vertical layout as this is
done also if you create a new empty mainwindow
Add an entry for the CSV export to the context menu of the Database
Structure tab of the main windows as well which preselects the currently
selected table.
When opening the CSV export dialog via the standard menu also preselect
the currently selected table when the Database Structure tab is active.
Make it possible to drop database objects (i.e. SQL code) on the tree
view in the Database Structure tab. This is far from being perfect as of
now but enables you to drag and drop entire objects between databases.
Use a custom model for the tree view in the "Database Structure" tab in
the main window, i.e. change from a QTreeWidget to a QTreeView and do
all the item management stuff manually. This might add some code and
complexity but also offers some more flexibility for us.
Reduce the minimum width of two horizontal spacers, the one next to the
table drop down box and the one in the SQL log dock. This way the combo
boxes can take up a bit more space when the window is not that big.
Always use per pixel scrolling when scrolling in horizontal direction.
This changes the scrolling in the SqlExecutionArea and makes some
settings in the MainWindow dispensable.
Fix empty rows being shown in the main window when changing to a table
with less rows than the old one.
Add sorting in the browse tab again.
Do some minor clean ups.
Rewrite some code to use a QTableView widget instead of a QTableWidget
in the browse tab of the main window, or more presicely in the new
extended table widget class. This way the widget and the data model are
separated which on the one hand means a bit more work on our side but on
the other hand also gives us a bit more flexibility. And more
importantly at the moment: This means both, the browse tab and the sql
tab, use a table view now - that's going to be helpful for the next
commit...