Commit Graph

173 Commits

Author SHA1 Message Date
Martin Kleusberg
fca39e9e1c Don't override project file settings right after loading them
This fixes a bug which was introduced during the SQLCipher development
and which caused some settings loaded from a project file to be loaded
but then replaced by the default values which were loaded right
afterwards.
2014-11-06 16:56:08 +01:00
Martin Kleusberg
ea2512d538 cipher: Fix build on Qt4 2014-11-02 19:33:28 +01:00
Martin Kleusberg
a22ed6f9d3 cipher: Add option for changing the encryption used for the current file
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.
2014-11-02 19:06:06 +01:00
Martin Kleusberg
8fb9176f99 cipher: Show encryption status in the main window statusbar
Add a note to the status bar of the main window when an encrpyted
database is opened.

Also make some methods in the CipherDialog class const.
2014-11-02 18:15:13 +01:00
Martin Kleusberg
9ba36d02b2 Add initial SQLCipher support
Add some basic initial support for SQLCipher. Note that this is more of
a POC than a final implementation.

This commit adds an option called 'sqlcipher' to the cmake and qmake
projects which - when enabled - replaces the default SQLite3 include and
library files by their SQLCipher counter-parts. Especially on MacOS X
there might be some more work required in finding the correct include
paths. The SQLCipher library supports unencrypted databases, too, so
even if the option is enabled the program behaves like before. You can
see the difference, though, in the About Dialog where the SQLite version
string will say 'SQLCipher version xy'.

When the sqlcipher option is enabled and you try to open a file which is
neither a project file nor a normal SQLite3 database it is assumed now
that the file is an encypted database. There is no way to tell between
an invalid file and an encypted file, so in both cases a password dialog
pops up. When the correct password and page size are entered the file is
opened and can be edited like any other database before.

Creating encrypted databases isn't supported yet. So for testing you
need to fall back to the sqlcipher command line tool.

See issue #12.
2014-11-01 12:56:53 +01:00
Martin Kleusberg
280d5c1773 plot: Use default location from preferences dialog when saving picture 2014-10-15 19:53:06 +02:00
Martin Kleusberg
a0f22a1ddb SqlExecutionArea: Use log font size for execution result
Use the same configurable font size as for the SQL log pane for the
result view of the SQL execution area tabs in the main window.

See issue #131.
2014-10-15 18:46:20 +02:00
Martin Kleusberg
5d20d97e24 MainWindow: Improve saving of project files
When saving a project file make sure it's got the right file ending.
Also add it to the list of recently opened files.

Use the default location from the preferences dialog for initialising
the file dialogs for loading and saving project files.
2014-10-15 13:44:52 +02:00
Martin Kleusberg
ff5cf3e63d MainWindow: Add project files to list of recently opened files
When opening a project file add it to the list of recently opened files
instead of the database file associated with it.
2014-10-15 13:38:32 +02:00
Martin Kleusberg
63eaf01988 MainWindow: Automatically resize Schema column in DB Structure tab
Automatically resize the Schema column in the Database Structure tab of
the main window to fit its contents.

See issue #113.
2014-10-12 17:46:50 +02:00
Martin Kleusberg
ae199112a5 MainWindow: Make sure the filters are applied before getting the row num
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.
2014-10-06 15:23:55 +02:00
Justin Clift
05207b0b9f Renamed project to "DB Browser for SQLite" 2014-09-21 11:14:39 +01:00
Peinthor Rene
57d086fbf2 filters: don't clear filters on refresh 2014-09-19 18:27:40 +02:00
Martin Kleusberg
b2532686a9 Fix build on Qt 4 (hopefully) after 6c52ac736 2014-09-16 19:41:07 +02:00
Martin Kleusberg
6c52ac7368 Add menu item to allow attaching other databases
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.
2014-09-16 19:19:00 +02:00
Peinthor Rene
9682d34ca7 execsql: use the correct statement length 2014-09-04 20:33:48 +02:00
Martin Kleusberg
7d4248ecb4 Keep field information in sqlb::Table object rather than DBBrowserObject
Keep all the table and field information in a sqlb::Table object (which
itself is stored in DBBrowserObject) rather than storing field
information in DBBrowserObject and sqlb::Table objects at the same time.
2014-08-26 17:52:15 +02:00
Peinthor Rene
63c338c359 plot: add another shortcut to plot CTRL+D
if we maybe have print support in the future,
we can assign CTRL+P to print than
2014-08-24 16:58:13 +02:00
Peinthor Rene
681b143649 dbschema: shortcut for schema pane 2014-08-24 16:50:41 +02:00
Martin Kleusberg
beae69296c MainWindow: Add new dock showing the DB schema
See issue #75.
2014-08-22 15:05:23 +02:00
Martin Kleusberg
5f4066c351 MainWindow: Show line numbers in SQL log 2014-07-31 21:19:41 +02:00
mafagafogigante
262612928d some comments were corrected 2014-07-31 08:56:24 +01:00
Martin Kleusberg
17cf2018ca Remove dependency to main window from DBBrowserDB class
Get rid of the dependency to the MainWindow class in the DBBrowserDB
class. It was only used for calling the log SQL and set database state
functions anyway. The same result can be achieved emitting Qt slots.
2014-07-12 16:13:32 +02:00
Martin Kleusberg
dca664270f MainWindow: Make it possible to cancel closing of database file
When closing the database, either by using the menu item or by closing
the window, the user is asked whether the changes he made shall be
saved or not. Add a third button to this message box which makes it
possible to cancel the action.
2014-06-20 13:03:23 +02:00
Martin Kleusberg
2136813bd6 MainWindow: Add Ctrl+Return shortcut for executing SQL and add tooltips
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.
2014-06-14 13:51:12 +02:00
Martin Kleusberg
1e787b4d22 sqbpro: Allow relative database file paths
When the path to the database file given in a project file doesn't exist
try parsing it relative to the path of the loaded project file. This
makes it possible to move project and database file around together
without need to manually correct the path in the project file.

See #36.
2014-06-11 21:01:06 +02:00
Martin Kleusberg
daf12d413c Remove unnecessary overloaded function 2014-06-08 12:48:53 +02:00
Martin Kleusberg
8c8187740d MainWindow: Increase default size, tabify docks by default
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.
2014-06-07 00:14:50 +02:00
Martin Kleusberg
62622ae8e8 Add support for basic project files
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.
2014-06-06 23:32:35 +02:00
Martin Kleusberg
5e1169b43d MainWindow: Keep column widths for each table in Browse Data tab
Store the column widths of the table view widget for each table/view
individually and restore them when changing back to the table/view.
2014-06-01 19:47:20 +02:00
Martin Kleusberg
297bfbce0a Move filter header from window to table widget and show sort indicators
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.
2014-05-25 14:35:56 +02:00
Peinthor Rene
80d5c1a117 qt5 different including hit me again 2014-05-25 13:33:11 +02:00
Peinthor Rene
f7315f5f90 add a few more help menu entries
website, wiki, bug report
2014-05-25 12:58:01 +02:00
Peinthor Rene
b5e5d3b0c5 updater: show the url we got from the release file 2014-05-16 18:29:13 +02:00
Peinthor Rene
1fdf3e4fd4 updater: exit a possible redirect loop 2014-05-16 18:24:26 +02:00
Peinthor Rene
edab586c08 plot: rescale to all drawn axis
I did miss this call on the customplot widget
2014-05-16 18:02:32 +02:00
Peinthor Rene
39ab238ddd plot: only select a color on double click
otherwise we will get some random globalcolor from qt
2014-05-16 17:49:42 +02:00
Peinthor Rene
404274be32 plot: keep the color between model updates 2014-05-16 17:32:25 +02:00
Peinthor Rene
466d78cf53 Fix missing include, worked with qt5 2014-05-14 07:26:42 +02:00
Peinthor Rene
da9f24836a plot: axis color is now chosen on activating an Y axis 2014-05-13 21:19:08 +02:00
Peinthor Rene
75b519df37 plot: no selection for tree plot columns widget 2014-05-13 21:18:22 +02:00
Martin Kleusberg
ddda08b673 Make sure the SQL editor has got the focus after creating a new tab
Focus the SQL editor of a newly created tab to make sure it receives
keyboard input without need to click it first. On my system this wasn't
the case after starting the application, i.e. the first time the SQL tab
is used.
2014-05-11 13:46:28 +02:00
Martin Kleusberg
770a37928b Plot: Suggest file formats in save dialog 2014-05-11 12:37:46 +02:00
Peinthor Rene
4ed5d9a778 plot: add a button to save the current plot as different file formats 2014-05-10 09:23:16 +02:00
Peinthor Rene
2055bc6b26 plot: fix crash with selecting column out of range 2014-05-09 17:51:55 +02:00
Peinthor Rene
9bd3cf1655 plot: add some comments 2014-05-09 17:29:00 +02:00
Peinthor Rene
062f2df775 plot: reselect columns after model change 2014-05-09 17:28:45 +02:00
Justin Clift
62b2b1738d Adjusted rp-/sqlitebrowser to sqlitebrowser/sqlitebrowser 2014-05-01 14:55:23 +01:00
Martin Kleusberg
309204b01a Merge branch 'master' of github.com:rp-/sqlitebrowser 2014-04-29 20:28:20 +02:00
Martin Kleusberg
a1f506bb14 Fix not working filters.
Closes issue #46.
2014-04-29 20:27:20 +02:00