First apply the new filter values and only when that is done get the
number of rows in the current view. This fixes the issue that, when
changing a filter, the number of rows shown under the table view is that
of the last results, not the current.
See issue #122.
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.
Use a common format for all include guards, make sure each header file
has one and make sure it's named after the file name.
And as a random extra in this commit: Make sure the gen_version.h file
generated by cmake ends with a line break.
Closes#59.
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.
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.
Add two new settings to allow changing the font size inside the SQL log
and the SQL editor.
Increase the default font size from 8 to 9 - better a bit too big on
some systems than too small on others.
Also do some restructuring in the MainWindow to avoid duplicate code to
reload settings.
Support some additional command line options for opening and running SQL
scripts directly.
Don't just take the first argument as a SQLite database to open as it
could be a command line option - Qt and X11 have some default ones.
Change the way sorting is done to correctly sort all data even if it
hasn't been loaded completely yet.
Fix the navigation label and buttons by showing the correct information
again and fixing the validator of the input field.
Log all SQL statements executed from within the SqliteTableModel.
Silence a few warnings.
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.
Read and write the settings only from the preferences dialog.
Remove all the copies of some settings which were stored in nearly every
dialog class individually.
Simplify the settings dialog code by removing all those not really
needed slots.
Store the data of a DB cell in a QByteArray, i.e. a binary data type,
instead of putting it in a QString, thus converting it to a UTF8 string.
Rewrite the reading and writing of DB cells to correctly handle binary
data containing 0x00 bytes.
Change the edit dialog to actually do all the data checks etc. on a
currently invisible QHexEdit widget instead of a QTextEdit.
All these changes combined make it possible to actually store binary
data without it being corrupted. You can for example import pictures
now, export them and actually open the exported file. So this is an
improvement.
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...
removed uninteresting PRAGMA's for user
only set PRAGMA if value has changed
commit transaction before setting pragma with user warning
show the current PRAGMA value after setting
Remove the copy and paste actions and slots from the main window code.
They have not been working for a very long time and seem to be rather
useless anyway.
Create a Qt Designer form file for the edit dialog.
Clean up the edit dialog code removing some not working and not used
functionality e.g. for blob editing.
Rename all slots starting with "on_" because Qt tries to auto-connect
them to signals of that name. And as those signals do not exist Qt
prints a warning for each of them after every program start.