The new toolbar is hidden by default and can be toggled using a button in
the main Data Browser toolbar. Margins and spacing have been updated to
improve appearance of the two toolbars.
These tool buttons apply the format to the columns which are contained in
the selection. This is done by updating or adding a new condition-less
format to the list of conditional formats of those columns.
New style icons from the Silk icon set. Changed existent ones for
coherence.
See issue #1976.
A new dialog for editing conditional formats that can be invoked from the
filter line editor or from the data browser contextual menus. The dialog
allows adding and removing conditional formats, changing the priority order
and editing foreground colour, background colour and filter condition.
The conditional formats have been expanded to allow defining the foreground
colour. By default is the setting configured by user.
This is a continuation of the functionality introduced in PR #1503.
This allows sorting by multiple columns (as in ORDER BY Field1, Field2)
by holding the Control key while clicking on another column header in
the Browse Data tab.
See issue #1761.
This change fixes a cmpile warning on Mac OS: (10.12.6) + Clang
warning: 'selectAll' overrides a member function but is not marked
'override'
Fixes#1718
selectAll is overridden so all data is actually selected. Warn and ask user
as this may take some time and consume lots of memory (when the table is
big).
See issue #1373
This adds support for the REGEXP operator using the syntax /regexp/ in the
filter line boxes.
A new helper option for a not-containing filter is added using this new
syntax. This could be simplified using a NOT LIKE filter, but we don't
currently support that.
The "Use in Filter Expression > Containing" option escapes a possible
slash in the beginning, so it is not interpreted as a regexp filter.
See issue #1522
For consistency for the other application tabs, a print button is added
to the Data Browse Tab for printing the currently browsed table or
selection of cells.
This commit make sure that we never quote cells or change their contents
when copying to the text clipboard. This way the data can't be parsed
anymore without being ambigious but for these purposes we have the
internal buffer and the HTML clipboard. This makes sure that for simple
text copies (mainly that should be single cells) the data is never
changed.
This commit also uses the normal copy code for single cells unless they
are image cells. This makes sure that copying a single cell also uses
the internal buffer which in turn avoids problems when copying and
pasting single cells with line breaks in them.
See issue #1244.
A QSortFilterProxyModel is used for filtering the values in the column so
only distinct values are accepted for the completion. With this change
the less intrusive pop-up completion can be used, displaying only unique
values in the completion menu.
Added contextual menu entry and keyboard shortcut for printing the browsed
table with headers. If a region is selected, print those cells data.
Otherwise, print the entire table.
The HTML conversion used for clipboard is reused. Borders are added for
better visual output.
Ctrl+' is used by spreadsheets for copying formula/value from the cell
above.
Our shortcut copies the value inside the inline editor when it is text.
That mimics the behaviour of LibreOffice Calc. For binary data that cannot
be edited inline, the BLOB is just copied from the above cell to the
current one.
See discussion in PR #1516.
Added contextual menus in filter line box and cells for assisting in using
filters and for discovering existing filters.
The menu in the filter line adds "What's This" option and helper options
that add the operator and a selected placeholder (?) for easy editing.
Special options for NULL and empty strings are also added. Those work
directly.
The menu in the cells works as the current "Use as Filter" but for
different operators. In this case, only the range operator is incomplete.
Currently, not all the operators make sense for strings because we take
them as LIKE filters. At least the Not Equal filter (<>) should work, but
the other would also make sense. This will be addressed in future commits.
When selecting an entire row or multiple entire rows in the table view
and hitting the delete key, delete the records and not just the cell
contents.
See issue #1391.
Make use of signals to connect the selection in plot to the associated
table widget. Every time that the plot is updated from the Main Window
the table widget associated to the table or query is connected to the plot
and the previous widget is disconnected. This allows the selection of the
correct table widget.
Line selection methods moved to the Extended Table Widget to be used as
slots for this connection.
The destroyed signal is also connected for resetting the plot. This fixes
a crash that already existed before this PR, when closing a SQL tab while
the plot is still associated to the table results model.
For table cells with text larger than 32768 characters, the data gets
truncated. If the user doesn't notice this somehow and hits the Escape
key the truncated data is written back to the database resulting in a
possible data loss.
This problem is fixed by this commit in two ways:
1) The maximum length of the editor widgets is increased to the maximum
value making this problem much more unlikely.
2) If the user is still hitting this value, i.e. the text is truncated
anyway, the widget is put into read only mode and no data is written
back to the database.
See issue #1281.
At the time of pasting, use the generator and date meta tags in the HTML
version for knowing whether our data in the system clipboard has been
overwritten. If not, the internal buffer has better data, so we use it.
Since the binary data is not excluded in the system clipboard, images
are also included embedded in the HTML table. Other binary data are encoded
as base64 strings.
We have two different sources when pasting data into a table view: the
system clipboard and the internal copy-paste buffer. Both work slightly
different but most code is duplicated between them. This commit cleans
up the pasting code by merging the two code paths into a single one.
This does not only reduce the amount of duplicated code but also enables
some features for both sources that were only available for one of the
sources. This includes duplicating data by copying from a single cell to
multiple cells and the message box asking for confirmation when the
source and destination ranges do not match. These features were only
available for the system clipboard before and should now work for both
sources.
Use a shared internal copy-paste buffer for all table views in the
application instead of having one buffer per view. This is not only less
confusing because it more closely resembles the behaviour of the system
clipboard but it also allows copying BLOB data from a Execute SQL result
view to a Browse Data table.
This adds support for pasting a single value into all selected cells in
the Browse Data tab in order to mimic the behaviour of standard
spreadsheet application more closely.
* 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
A new option in the context menu of the table widget is added for copying
to clipboard the content of the selected cells prepended with the
appropiate column names.
See issue #1058
* Added an option in the context menu for using the currently selected cell
as filter in this column. This allows quick filtering by selected values.
* Changes to pull request #1182 requested by @MKleusberg: get internal cell data and check for the NULL special case.
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.
Add a context menu to all table view widgets in the program (Browse Data
tab and Execute SQL tab) which opens when right clicking a table item.
Currently the menu only allows you to copy and paste the selected
item(s).
Only activate the paste action when the current view is writable.
Add two new keyboard shortcuts for switching the currently selected
table in the Browse Data tab. These work as long as the table widget is
active. For now I have set them to Ctrl+PageUp and Ctrl+PageDown.
See issue #536.
Add a tooltip to the database browser when you hover a cell with a
foreign key set in order to show the referenced table and column.
When clicking on such a cell while holding the Ctrl and Shift key (only
one of them won't work because they are for multiselection and Alt
doesn't do the trick on my system because it's just for grabbing and
moving the window) try to jump to the table and row which is referenced
in the clicked cell.
See issue #192.
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.
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.
Improve the lazy population fatchData() calls when using the vertical
scrollbar to make scrolling a lot smoother. Still not perfect but
definitely a lot better than before.
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...