The shortcut is constrained to the Widget context so it does not conflict
with other SqlTextEdit widgets in the application. Now all SqlTextEdit
widgets are able of opening the dialog with the same shortcut and behave
in the same way (do not block the parent window).
The find/replace dialog can now be discovered by the user in the context
menu at the SqlTextEdit widgets.
This was mistakenly introduced in 7ed1b1db05
The unwanted effect was two new duplicate records inserted.
Additionally the shortcut is made self-documented for the user in the
corresponding context menu.
That avoids overwriting existing record as reported in issue #1255.
This doesn't improve the underlying situation, that is inserting empty rows
before duplicating the content. But it is safer to not ignore the error in
the initial row insertion.
Disable 'Attach Database' when no database is opened.
Added to the function that enables and disable actions depending on
database state. See issue #1254
Display more specific 'Choose a file...' messages in two places. See issue
#331.
Two new application toolbars: Extra DB (attach, close database) and Project
(Open, Save). Can be disabled and moved as usual.
Icons for Close Database and Attach Database actions, which lacked ones.
Different icon for the dock configuration, so they are visually
distinguishable from the toolbar configurations.
New preference for the toolbar style, with default value: text besides icon
as before. But in order for the style to change, the value in UI must be
ToolButtonIconOnly.
Needed new icons from famfamfam.com's Silk collection.
See related issue #331
The query used in sqlitetablemodel does not rename the columns, instead
it applies the display formats in the WHERE part. In this way the saved
view has the original column names.
Changes in Button "Save filter as view": more information in tooltip and it
is disabled when no database is open.
See discussion in PR #1246
New view name validated with isNull().
Text in information box reworded.
Column names are preserved in the new view, except for the ones with
display formats, for which an underline is appended in order to fix the
reported filtering defect.
Make sure the keyboard shortcut for the Find & Replace dialog is always
set to Ctrl+H instead of using Qt's QKeySequence::Replace. At least on
KDE desktops but probably on other systems too it break the Ctrl+R
shortcut which is used for refresh and SQL execution.
A new button is added to the Browse Data tab for saving the current display
of the table (current filter, sort column and display formats) as a new
view. This allows (specially for non advanced users) the creation of simple
views. It can be seen, either as a way of storing the current
filtering or as an easy way of creating views.
This reuses the query set in sqlitetablemodel, but the column aliases when
a display format is used has been changed from col%1 to the original column
names, i.e. format(`orig`) AS `orig`.
Find/Replace dialog does not block the main window.
Dialog reused, so checks changed by user are preserved.
The selection of the last occurrence in Find All and Replace All
is cleared, so all the occurrences have the same appearance.
A classic Find/Replace dialog including all the options provided
by the QScintilla editor. Additionally a "Replace All" and a
Find All" button are implemented. This complements issue #191
New shortcut in main window for opening the find/replace dialog
connected to the focused widget. Standard for Replace is Ctrl+H.
Consequently the shortcut for Copy with Headers is changed to
Ctrl+Shift+C (see issue #1058).
For SQL text widgets not embedded in the main window, the standard
shortcut cannot be enabled, otherwise it conflicts with the main
window. Therefore the shortcut Ctrl+Shift+H is enabled for all the
SQL widgets as fallback. A better solution would be desirable.
* Add Signal if File dropped
* Check if Index is valid
Send Signal and return if Index is invalid and File was dropped
* Connect Dropsignal to fileopen
results pane
Copy for multi-line text data surrounds the text with the
<pre> tag in the HTML version for avoiding line white-space
adjustments in the pasted text. See #1058
Do not use binary data in the "Use as Filter" option.
Indicate the existence of an error in the background of the
SQL results frame. The error-indicators is reused for
disabling this functionality.
When nothing is shown, a placeholder text hints the
objective of the results pane.
The preference label for the font size of this pane is
modified for consistency (SQL Log is another widget).
New button and key sequence (ESC) to close the search bar.
Clear selection (by not avoiding the search) when the text to search is
deleted, as expected by @pamtbaau at #1220.
The user is now able of selecting a range of contiguous points in any of
the graphs of the plot, through rectangle selection or click in single
point. This selection triggers automatically the selection of the
corresponding lines in the browsed table. In this way the user can analyse
the plot in detail.
Two other minor improvements: spelling error fixed and the dummy column in
the plot selection table has now transparent foreground (intends to avoid
wondering of the user about what functionality provides this column).
If multiple SQL tabs are opened, show or hide the find bar for all of
them when changing the check state of the button. Also apply the find
bar state to newly opened SQL tabs.
This also fixes a crash which would happen if you click the Find button
prior to opening any SQL tabs, i.e. before opening the first database
file.
The find operations in QScintilla are used for implementing a find frame
in the SQL Editor of the main window. A checkable tool button is added
in the SQL Editor toolbar for showing and hiding this frame.
There are check boxes for Whole Words, Case Sensitive and Regular
Expressions. The QScintilla facilities in the findFirst method are used
for the implementation.
This fixes a regression which recently was introduced by commit
955848f957. Because the status message was
overwritten by a version without the returned row count, you would never
see the intended status message when running SELECT statements in the
Execute SQL tab.
See issue #1211.
Don't use the QSettings class directly. This keeps the code more
consistent and makes it a bit easier to read. It also means that all
parts of the code profit from the settings cache that we have
implemented in the Settings class.
This should improve the detection of read-only query statements vs.
modifiying statements in the Execute SQL tab. The idea is to stop
looking for the SELECT keyword at the beginning of the statement and
instead fully rely on whether SQLite returns any data for this
statement.
See issue #1185.
Remove the valid flag from the SqliteTableModel class and remove its
usage in the Execute SQL tab of the main window. I believe this hasn't
been used for some time now because the main sources of error should
really be noticed before the query is even handed over to the model.
Additionally the valid flag wasn't as realible either anymore because of
the multi-threaded execution of the model queries.
The no collate function warning is triggered in a thread which is used
for loading data. However, the warning is a message box and GUI elements
can only be drawn in the main thread. So the old code would crash. This
is fixed here by jumping to the main thread for showing the message box.
In the SqliteTableModel class we need to know the total number of rows
in the table or returned by the query. This takes a considerable amount
of time and can be moved into a separate thread. I haven't done any
performance measurements with this but it might speed up switching
between large tables a bit.
There's no need to set sqlitebrowser as active window when updating
the main application window. The `activateWindow()` call prevents
switching workspaces in GNOME and Cinnamon desktops.
Fixes#934
When importing multiple CSV files at once, remove each entry from the
list of CSV files as its import completes. This way people can see the
list shrink visibly onscreen.
Also don't close the window if there are still files left to be
imported. This allows the user to import unchecked files, too, probably
using different settings.
See issue #1072.
With this commit the main window keeps track of the hidden columns and
re-hides them when the table is selected again. It also saves the hidden
status to the project file and restores it from there.
Instead of disabling the entire edit dock when the database is opened in
read only mode, only disable all buttons for making changes to the
field. This way the data can still be read using the edit dock.
See issue #1123.
In the Execute SQL tab, move the button for saving the results of a
query as either a CSV file or a view from the bottom of the results view
to the toolbar at the top.
See issue #1122.
Similar to commit 44eb2d4f99 this commit
makes use of the backend code improvements introduced in commit
532fcd3f6b.
It adds support for database schemata other than "main" to the Browse
Data tab. With this it's possible again to browse and edit data of
temporary tables using the Browse Data tab. This time, however, they are
separated logically from "main" tables. So handling temporary tables
should be a lot less error prone now, plus it's easier to tell for the
user what tables goes in what schema.
This commit changes the project file format. There is some code included
which allows loading of project files in the old format. However,
project files generated using versions after this commit can't be loaded
by older versions of DB4S.