Commit Graph

173 Commits

Author SHA1 Message Date
Peinthor Rene
26a23595b4 updater: Fix a crash and handle redirects 2014-04-28 22:12:17 +02:00
Peinthor Rene
fdbda563d4 plot: only allow X column to be selected once 2014-04-23 19:54:07 +02:00
Martin Kleusberg
9e73f31a18 Reset plot dock after closing a DB
Reset the new plot widget after closing a database.
2014-04-22 22:28:01 +02:00
Martin Kleusberg
d1ed2d151f Update the recordset label in the Browse tab after closing a DB
Reset the recordset label in the Browse Data tab of the main window
after closing a DB file.
See issue #44.
2014-04-22 22:21:46 +02:00
Martin Kleusberg
a7110ea0fc Clear the tree widget in the Structure tab when after closing a DB
Clear the tree widget in the 'Database Structure' tab of the main window
after closing a database.
See issue #44.
2014-04-22 22:08:27 +02:00
Peinthor Rene
956dde9a59 plot: wrong date format 2014-04-19 22:44:28 +02:00
Peinthor Rene
88ccd48173 plotting: add a simple mechanism to visualize data
added a plotting dock, where you can select x and y axis
and it will draw a chart out of it
2014-04-19 22:19:32 +02:00
Martin Kleusberg
30cef84f09 Add CSV export to context menu of the Database Structure tab
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.
2014-02-14 16:40:44 +01:00
Martin Kleusberg
4cd5131d1a ExportCsvDialog: Set table selection to current table in Browse Data tab
When called while the Browse Data tab of the main window is selected
also select the current table or view in the ExportCsvDialog.

Sort the table names in the combobox of the ExportCsvDialog.
2014-02-14 16:22:51 +01:00
Peinthor Rene
5a9b1672a7 qt5: include QMimeData 2014-02-13 23:52:35 +01:00
Martin Kleusberg
6ab8cf3dd3 MainWindow: Update execute query table view when no results returned
Also update the table view widget and the status message in the Execute
Query tab of the main window when the query was valid but returned no
results.

Fixes #38.
2014-02-07 20:14:17 +01:00
Peinthor Rene
1e2ee439ea fix memory leak 2013-12-24 20:01:18 +01:00
Peinthor Rene
be1ba804c6 add a version check feature
this is only enabled on windows as there is no package manager handling the versions
and we don't want users to stay on old versions forever
2013-12-02 16:52:48 +01:00
Peinthor Rene
94819f22e2 for loop pre-increment optimization's and a slight syntax style change 2013-09-20 14:49:07 +02:00
Peinthor Rene
1bac11348f include cleanup 2013-09-19 22:55:35 +02:00
Martin Kleusberg
c01a890992 MainWindow: Support deleting multiple rows at once
When multiple rows are selected in the Browse Data tab of the main
window and the delete record button is clicked delete all selected rows
and not just one of them.
2013-09-07 12:15:56 +02:00
Martin Kleusberg
427581f51d MainWindow: Don't cancel after one INSERT or the like in SQL tab
When executing multiple INSERT/UPDATE/... statements don't cancel after
the first one. Also don't try to load them into the SqliteTableModel
class - it won't work and just generates a warning.
2013-07-19 22:13:08 +02:00
Martin Kleusberg
64a938716f Add custom model for tree view in Database Structure tab
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.
2013-07-19 20:36:48 +02:00
Martin Kleusberg
b4ce93c6e2 MainWindow: Don't show error message when cancelling extenstion loading
Don't show a file-not-found message box when cancelling the open file
dialog to select a SQLite extension.
2013-06-17 21:43:50 +02:00
Martin Kleusberg
1287a2cf6f MainWindow: Further simplification
Looking at this now this can be simplified even further.
2013-06-12 20:22:07 +02:00
Martin Kleusberg
8947579590 MainWindow: Remove unneeded code in fileExit()
There is no need to check for changes when exiting and showing a message
box in the main window as exactly the same code is also run in
DBBrowserDB.
2013-06-12 20:18:51 +02:00
Martin Kleusberg
7a81189d50 PreferencesDialog: New settings for font size of SQL editor and log
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.
2013-06-07 20:57:58 +02:00
Martin Kleusberg
720ef9bc95 Also load SQLite extensions when importing a SQL file into a new DB
When creating a new database file for an SQL import load the default
SQLite extensions - just like it's done when creating a new database the
normal way.
2013-06-05 21:23:48 +02:00
Martin Kleusberg
cbd81de88b Remove the DBBrowserField class
Remove the DBBrowserField class and change all parts of the program
which used to use this class to work with sqlb::Field instead.
2013-05-31 16:50:13 +02:00
Martin Kleusberg
a1b72c5eef Extend the entire savepoint logic to allow multiple active savepoints
Allow multiple savepoints in DBBrowserDB, i.e. setRestorePoint() doesn't
simply return if the DB is already set to dirty but creates an
additional savepoint.

Track the names of all savepoints which have not been either saved or
reverted yet.

Finally, and that's the whole point of this commit, change the savepoint
logic of the EditTableDialog. We used to have a transaction started when
opening a database which was only committed when the file was closed
again. This way the EditFileDialog could savely create a savepoint when
being opened and just release it when OK was clicked or revert to it
when cancel was clicked. Getting rid of the transaction broke this
logic. The dialog still worked but as the savepoint was released when
the changes were applied all changes made via the dialog were
immediately committed to the database. So clicking the revert button had
no effect on those changes. This is at best an unexpected behaviour but
could also be a problem when some changes are reverted while others
aren't. So, having the option now of keeping multiple savepoints opened
this problem can be fixed by just creating a new savepoint every time
the dialog is opened, reverting to it when it is cancelled and _not_
releasing it when OK is clicked.

I hope this works!
2013-05-23 17:41:16 +02:00
Martin Kleusberg
4dfabe4a78 VacuumDialog: Add dialog to allow compacting single objects individually
Add a new dialog which is shown when compacting the database. This
dialog allows selecting single objects individually to avoid vacuuming
the entire database.

It also shows a new warning if the database is dirty as changes are
going to be saved before vacuuming.
2013-05-21 22:32:05 +02:00
Martin Kleusberg
c0e6d251d5 MainWindow: Show execution time in SQL tab
Show the time needed for executing a statement in the result box.

Generally fix some minor problems with the result view.
2013-05-17 14:56:58 +02:00
Martin Kleusberg
04b431d3f1 Add rough implementation of some command line options
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.
2013-05-14 18:12:11 +02:00
Martin Kleusberg
6ba0cd76c0 Open database correctly when importing into a new file
When doing a SQL import into a new database file open this file
correctly after the import.
2013-05-10 13:29:49 +02:00
Martin Kleusberg
11a2d321d8 Don't set dirty flag after SQL import to new DB file
When creating a new database to import a SQL file into don't set the
dirty flag.
2013-05-10 13:21:52 +02:00
Martin Kleusberg
729773d345 Fix SQL import file name logic
Don't ask the user wether to create a new DB or use the current one if
no database is opened anyway.

Don't start the import when the save dialog was cancelled.
2013-05-10 13:15:06 +02:00
Martin Kleusberg
cf0a0339eb MainWindow: Replace icon for the SQL log window
Replace the icon used in the action for toggling the SQL log
dock/window.
You might need to delete your makefiles before building this.
2013-05-09 18:34:33 +02:00
Martin Kleusberg
5b9d5cc40b Remove some debug messages. Change some error messages..
Remove some useless debug messages, e.g. because they just print an SQL
string which you can see in the SQL log window anyway.

Change some "critical" errors messages to just warning. No sense in
printing a critical error message when the program can handle the
problem by itself.
2013-05-08 22:03:04 +02:00
Martin Kleusberg
cf72bfbb1c MainWindow: Improve SQL tab behaviour
Don't allow opening and saving when no database file is opened.

Close all tabs when the database is closed.
2013-05-08 21:50:35 +02:00
Martin Kleusberg
f3f340f83e Add single step execution to the SQL tab
Add a new action to allow the execution of the SQL statement in the
current line. This also supports multi-line SQL statement.
2013-05-08 21:44:08 +02:00
Martin Kleusberg
ea31c8023b SqliteTableModel: Don't show binary data in table widgets
Don't show BLOBs as binary data in table widgets, instead put a "BLOB"
text in that cell.

Also make BLOBs not editable unless you use the edit dialog.
2013-05-07 20:47:16 +02:00
Martin Kleusberg
09afe637c6 MainWindow: Don't open new SQL tab when the current one is empty
When opening an SQL file don't open a new tab for it when the current
one is completely empty and could be used just as well.
2013-05-07 20:33:04 +02:00
Martin Kleusberg
61ee8b4871 MainWindow: Fix menu entry for log dock widget
Simplify the log window handling a little bit.

Fix a bug that caused the log window to disappear when the window was
minimised.
2013-05-06 19:11:06 +02:00
Martin Kleusberg
9536e7a095 SqlExecutionArea: Support exporting result to CSV file
Add a button which allows the user to save the query results to a CSV
file.

Add some basic preparations for saving the result as a view.
2013-05-06 18:44:58 +02:00
Martin Kleusberg
65b1adf845 Also load extensions when creating a new database
Also load the default extensions when creating a new database.

When opening a database load the extensions before reading the structure
and the pragmas because the extensions could affect those.
2013-05-04 21:27:36 +02:00
Martin Kleusberg
33d3dcdc16 Fix extension loading 2013-05-03 16:11:35 +02:00
Martin Kleusberg
2d8cad27eb PreferencesDialog: Add new tab for extension loading
Add new settings to preferences dialog for automated loading of
extensions for all databases.
2013-05-03 16:01:52 +02:00
Martin Kleusberg
e36b17a485 Add support for SQLite extension loading
Enable the extension support in SQLite.

Add code to allow loading of extension.

Add menu entry for easy extension loading.
2013-05-03 15:26:34 +02:00
Martin Kleusberg
9d8cfaa8cf Remove filter row when closing database file
Remove the filter row in the browse tab when closing the database.
Before this it would remain visible leading to a crash when using it.
2013-05-03 13:20:20 +02:00
Martin Kleusberg
d52a6be86f Add buttons to open and save SQL files to SQL tab in main window 2013-05-03 12:13:17 +02:00
Martin Kleusberg
57b44b891d Add auto completion in SQL editor again 2013-05-03 11:47:53 +02:00
Martin Kleusberg
23d929ec0e First version of multiple SQL scripts support in main window
Allow multiple SQL scripts in different tabs in the SQL tab of the main
window.

Auto completion support is still missing, the rest is working fine.
2013-05-02 21:15:23 +02:00
Martin Kleusberg
909d435ec6 Allow inline editing in browse data tab
Make it possible to edit records directly in the table view without
having to open the edit dialog.
2013-05-02 17:36:16 +02:00
Martin Kleusberg
b3465546bb SqliteTableModel: Remove dependency from PreferencesDialog 2013-04-26 13:55:29 +02:00
Martin Kleusberg
b4a64d6208 Clean up SQLiteDB
Much of the code in there is not really needed anymore as quite a bit of
functionality has been moved to the SqliteTableModel.
2013-04-19 19:54:26 +02:00