Commit Graph

31 Commits

Author SHA1 Message Date
Chris Hennes
1d8a9a86a4 Spreadsheet: Fix bug in content and alias lineedits
The two line edit widgets above the spreadsheet, one for exiting the
cell contents and one for editing the alias, were set to use the same
editing widget as the individual spreadsheet cells. Once that widget was
refactored to handle tab/enter behavior it was no longer the correct
widget for those elements. This commit changes them to
Gui::ExpressionLineEdit widgets instead, so that the Enter key works
correctly for them again.
2021-11-02 10:15:19 -05:00
Chris Hennes
82e3bc5844 [Spreadsheet] Clean up compilation warnings 2021-10-12 11:53:48 -05:00
Chris Hennes
8aa22d1a68 [Spreadsheet] Refactor keyboard handling
LineEdit no longer actually handles motion, it simply indicates which
action was taken to cause it to lose focus (e.g. which key was pressed).
It's up to the client code to determine what this means. This allows
significant consolidation of keyboard-handling logic, and the
implementation of more extensive keyboard navigation features.

New keyboard shortcuts include a tab counter to implement auto-return,
plus Ctrl->Arrow, End, Home, Ctrl-End, and Ctrl-Home, matching the
behavior of OpenOffice, LibreOffice, etc.

Block selection via keyboard has also been added by holding down the
shift key during navigation with the arrow keys (this also works in
combination with the Ctrl modifier for region navigation).
2021-10-08 14:55:39 -05:00
0penBrain
07db7dd262 [Spreadsheet] Expose SpreadsheetView::getSheet to Python 2021-06-07 21:18:26 +02:00
Benjamin Nauck
6eb89fe038 Spreadsheet: Fix coverity warning
There are no reason to check the return values for these functions
as the string passed as an argument will be set to an empty string
if it false. An empty string is a valid option in these instances.

Coverity warnings fixed:

CID 316520 (1 of 1): Unchecked return value (CHECKED_RETURN)
3. check_return: Calling getAlias without checking return value (as is done elsewhere 8 out of 10 times).

CID 316557 (1 of 1): Unchecked return value (CHECKED_RETURN)
8. check_return: Calling getAlias without checking return value (as is done elsewhere 8 out of 10 times).
2021-02-19 15:47:27 +01:00
luz paz
786d84d288 Spreadsheet: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the Spreadsheet Wb.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
wmayer
0a6929a122 Coverity: Dereference after null check 2020-07-20 17:34:25 +02:00
donovaly
37c4c90ab0 [Spreadsheet] add visible alias check
as discussed in https://forum.freecadweb.org/viewtopic.php?p=408992#p408981
visible feedback is missing for the Alias field. This PR add it and also adapts the UI label style.
2020-06-19 12:17:04 +02:00
wmayer
d6169d6478 boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
730154a684 boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
mwganson
4643e3b170 [Spreadsheet] [skip ci] fix bug where aliases renamed in the spreadsheet were not getting renamed in sketcher constraints 2020-03-22 15:20:53 +01:00
mwganson
e2e0018df6 [Spreadsheet] fix minor bug where failure to set alias message appears erroneously. Fixes #4287 2020-03-13 15:40:30 +01:00
mwganson
2609ec5441 [Spreadsheet] fix bug where duplicate / bad aliases were being allowed. 2020-03-12 15:47:54 +01:00
mwganson
54549d0931 [Spreadsheet] add alias line edit next to contents line edit -- add back in some inadvertently removed code 2020-03-12 15:47:54 +01:00
mwganson
77114fa942 [Spreadsheet] add alias line edit next to contents line edit 2020-03-12 15:47:54 +01:00
wmayer
5390266ac7 fixes #0004125: MDIViews not accessible correctly 2019-09-15 18:15:44 +02:00
Zheng, Lei
11321bb996 Spreadsheet changes
Various changes to support in-place editing, and more.
2019-08-17 15:15:47 +02:00
wmayer
c26ac76083 fixes 0003515: Changing Name of Spreadsheet in History Tree Does Not Trigger Name Update in Tab at Bottom of 3D Window 2019-01-14 00:21:56 +01:00
wmayer
e450387d36 implement Cut, Copy, Paste messages in SheetView 2018-10-10 08:25:34 +02:00
wmayer
4d47ce619e fixes #0002833: [Spreadsheet] Keyboard events are sent to the wrong viewprovider 2018-09-12 17:40:57 +02:00
wmayer
47c91f01b8 fix -Wextra & -Wdeprecated in Spreadsheet 2016-09-22 16:35:05 +02:00
Eivind Kvedalen
7a58bead5c Spreadsheet: Fixed undo/redo (issue #2483). 2016-04-04 19:58:19 +02:00
Eivind Kvedalen
ae111d11b5 Spreadsheet: Removed own expression parser and instead use the one in App. 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
ee9c242960 Spreadsheet: Don't update line edit on top unless we have to. 2016-01-08 23:09:00 +01:00
Eivind Kvedalen
7739335fb3 Spreadsheet: Clear line edit on top when current cell is cleared. 2016-01-08 23:09:00 +01:00
Mateusz Skowroński
c275b35d48 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
Eivind Kvedalen
ef7c8977ca Spreadsheet: Removed setPosition() function. 2015-11-28 12:56:28 +01:00
Eivind Kvedalen
899956cd51 Spreadsheet: Issue #2301: Handle enter/return and tab keys the same as e.g OpenOffice and Excel. 2015-11-28 12:56:27 +01:00
Eivind Kvedalen
95088a0061 Spreadsheet: Added auto completer. 2015-09-21 14:51:11 +02:00
Eivind Kvedalen
e34884b1a8 Spreadsheet: Removed 'using namespace App'; preparation for moving Expression
classes to App.
2015-09-21 14:51:00 +02:00
Eivind Kvedalen
935ec5b034 Initial implementation of Spreadsheet module (C++ version) by Eivind Kvedalen.
Various fixes for Windows by
Peter Lama <peterldev94@gmail.com>
Werner Mayer <wmayer@users.sourceforge.net>
2015-02-13 21:53:58 +01:00