Commit Graph

43 Commits

Author SHA1 Message Date
Martin Kleusberg
3bd2dc3bc1 Replace 'foreach' by range-based for loop from C++11 2017-10-30 13:10:08 +01:00
mgrojo
5cef432159 New option in the context menu for using the value as filter (#1182)
* 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.
2017-10-21 22:24:43 +02:00
Martin Kleusberg
ea1659e1d0 Support schemata other than main in the Browse Data tab
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.
2017-09-04 12:27:52 +02:00
Martin Kleusberg
e3764c920f Change wording of a message box 2017-06-28 22:45:16 +02:00
Martin Kleusberg
803a1fa5cb Add 'Set to NULL' context menu action
Add a new action 'Set to NULL' to the table browser context menu for
setting all selected items to NULL.
2017-06-28 16:40:09 +02:00
Martin Kleusberg
2421fef219 Add context menu to all table views
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.
2017-06-28 16:30:03 +02:00
Martin Kleusberg
760ef092cd Try setting a saner default row height in the data browser
Maybe this helps with issue #419.
2017-04-10 15:07:51 +02:00
Martin Kleusberg
c62d291042 Add keyboard shortcuts for switching the currently browsed table
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.
2017-02-02 22:07:49 +01:00
Vladyslav Tronko
0c60b01770 Replace obsolete key combination in comments 2017-01-16 18:30:55 +02:00
Vlad
312c29b238 Fix cells copying (#825)
With this commit, we start to handle empty and NULL single cell
selections in a special way. Well, there's nothing special about it.
We just push them to inner buffer and clear outer clipboard. That's it.

NB: possible side effect might appear if you copy empty value,
then select some text and paste your empty value here. Nothing will
happen with text though, because, well, we wiped clipboard.

Plus, it fixes single-cell multiline text copy-pasting (#541)
2016-10-15 18:15:04 +03:00
Justin Clift
2a097a639a Add a comment about the ScrollPerItem default, as it was tricky to debug 2016-10-08 22:42:28 +01:00
Iulian Onofrei
e5bca9d2db Fix incorrect scrollbar size on macOS with Qt5 (#810)
Building the project with Qt5 on macOS and browsing a huge table, the
scrollbar height was smaller than necessary. Scrolling to the end, some
rows were not showing up.

This was caused by the default vertical scroll mode, which is set to
ScrollPerPixel on macOS, and ScrollPerItem on other systems.
2016-10-08 22:40:19 +01:00
Iulian Onofrei
8c510ff4e4 Add unquoted single cell copy functionality
If a single cell is copied, its contents are not quoted now. This was
working in 3.8.0.

See #789
2016-09-30 15:24:18 +03:00
Martin Kleusberg
8b0decff6e Remove useless variable assignment
The variable never gets read afterwards.
2016-08-16 23:19:48 +02:00
Vladislav Tronko
e607b8836a Force contiguous selection in ExtendedTableWidget 2016-08-12 08:16:15 +03:00
Vladislav Tronko
d12fd1bf13 Implement persistent clipboard copy/paste formatting 2016-08-12 08:16:06 +03:00
Vladislav Tronko
043dee0126 Implement copy/pasting single image via clipboard 2016-08-07 18:22:32 +03:00
Vladislav Tronko
5cd65e8ef6 Implemented multiple BLOB cells copy/paste 2016-08-07 06:01:07 +03:00
Vladislav Tronko
83e9e60447 Improved copy/pasting in ExtendedTableWidget 2016-08-07 06:01:04 +03:00
Justin Clift
985a990868 Add Backspace and Alt+Backspace key support (#705) 2016-08-05 15:11:04 +01:00
Justin Clift
906aa8cce6 Merge pull request #663 from justinclift/issue660v2
Set NULL correctly on Alt-Delete
2016-07-21 14:49:04 +01:00
Justin Clift
e5dfefb021 Don't hijack the Enter key in the Browse Data tab 2016-07-20 20:38:36 +01:00
Justin Clift
671a822c8a Set NULL correctly on Alt-Delete
For #660
2016-07-20 19:58:33 +01:00
Vladislav Tronko
1ce62d74a4 Optimized clipboard insertion and fixed issue #626 2016-06-18 16:49:12 +03:00
Vlad
c91390941d Add duplicate record option (#594) 2016-05-24 19:47:09 +02:00
Martin Kleusberg
a7b5c3f182 Fix opening of edit dialog when pressing the return key
Pressing the return key opens the edit dialog or moves focus to the edit
dock (whichever is used). However, when using the edit *dialog* doing
inline editing and then hitting the return key opens the edit dialog
instead of just saving the changes. This is changed by this commit.

See issue #480.
2016-01-06 20:31:47 +01:00
Milos Subotic
fb8814729a Unquoting text pasted from clipboard in Browse Data table. 2015-12-24 12:11:01 +01:00
Milos Subotic
fe4302cb22 Paste in Browse Data table 2015-12-23 12:32:46 +01:00
Martin Kleusberg
9582786237 Add dropping of URLs and text on the data browser view
See issue #441.
2015-12-19 19:02:38 +01:00
Martin Kleusberg
672b6f693b EditDialog: Make edit dock more keyboard friendly to use
See #440, #441.
2015-12-19 14:05:45 +01:00
Martin Kleusberg
e74645bb1f Browse Data: Add keyboard shortcuts for deleting value
Add keyboard shortcut for setting the values of the selected cells to
empty string (Delete key) or to NULL (Alt+Delete).

See issue #443.
2015-12-14 21:53:12 +01:00
Martin Kleusberg
39a49e33c2 Allow clicking cells with foreign key in order to jump to referenced cell
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.
2015-06-21 23:59:45 +02:00
schdub
029f01643b resize multiple (selected) cols in Browse Data tab 2015-04-20 22:15:28 +02:00
Martin Kleusberg
0bcdb97572 Insert new row when pressing tab on the last cell in Browse Data tab
When browsing a table in the Browse Data tab of the main window you can
move the focus to the next cell by pressing the tab key. This commit
improves this behaviour by checking if the tab key has been while the
last cell of the last row is focused. If this is the case a new, empty row
is inserted automatically into the table.

See issue #209.
2015-03-03 00:33:11 +01:00
Martin Kleusberg
eb8e801b57 Make it possible to jump between filters by pressing the tab key
Allow jumping between the filter input fields by pressing Tab and
Shift+Tab.

See issue #106.
2014-10-11 15:45:30 +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
Martin Kleusberg
6ff8ba2fdb ExtendedTableWidget: Fix bug when just copying one cell
The code for copying the selected cells to the clipboard doesn't work
when there is just one cell selected. Fix the code by including a
special handling for this case which returns the content of the single
selected cell without any quotes or the like.
2013-11-30 14:08:19 +01:00
Peinthor Rene
1bac11348f include cleanup 2013-09-19 22:55:35 +02:00
Martin Kleusberg
1c19defbe9 ExtendedTableWidget: Always scroll per pixel horizonzally
Always use per pixel scrolling when scrolling in horizontal direction.
This changes the scrolling in the SqlExecutionArea and makes some
settings in the MainWindow dispensable.
2013-05-09 18:05:25 +02:00
Martin Kleusberg
e057f97773 ExtendedTableWidget: Fix jumpy scrolling
Fix wrong scrolling behaviour that ocurred when going to the very bottom
of the table and scrolling up slowly.
2013-04-17 20:26:55 +02:00
Martin Kleusberg
49239dad1f ExtendedTableWidget: Make scrolling less awkward with lazy population
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.
2013-04-11 17:45:14 +02:00
Martin Kleusberg
5e8c14e942 Make the QTableWidget a QTableView
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...
2013-03-16 19:10:03 +01:00
Martin Kleusberg
d9cd62ba49 Implement an extended table widget to add proper copy to clipboard support
Extend the standard table widget class to make it possible to copy
multiple cells to the clipboard.
2013-03-16 18:31:12 +01:00