Commit Graph

368 Commits

Author SHA1 Message Date
Chris Hennes
bdd600ba6e Spreadsheet: Display new value, or pending, when dirty
If recomputes are turned off, the old behavior was that a cell would
display its old property value in the SheetView. The new behavior is
that we check to see if the value is actually something that gets
computed: if so, show "#PENDING". If not, display the new value, but
format it specially to indicate that it's been changed and that
a recompute is (eventually) needed.
2021-11-03 09:23:43 -05:00
Chris Hennes
34fdcd1a61 Spreadsheet: Remove double-set of value on enter 2021-11-02 23:12:31 -05:00
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
7c7b30e79d [Spreadsheet] Fix missing header context menu 2021-10-31 23:38:11 -05:00
wmayer
f275893f5f Spreadsheet: [skip ci] update translation 2021-10-26 17:40:48 +02:00
wmayer
82d147b0a3 Spreadsheet: [skip ci] add sub-menu text for translation 2021-10-26 17:40:21 +02:00
luz paz
397729e33e Fix various typos
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,bottome,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,ontop,orgin,orginx,orginy,ot,pard,parms,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/doc/SourceDocu`
2021-10-20 18:18:33 -04:00
Zheng, Lei
64053912b1 Spreadsheet: support displaying of integer 2021-10-12 15:14:31 -05:00
Zheng, Lei
8e51d7a86d Spreadsheet: preserve component reference in cell 2021-10-12 14:58:36 -05:00
Zheng, Lei
49074f5af1 Spreadsheet: add a few context menu options 2021-10-12 14:34:58 -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
Chris Hennes
11c5e2b96f Merge pull request #5049 from chennes/spreadsheetPasteCleanup
[Spreadsheet] Refactor and simplify paste code
2021-10-03 13:15:57 -05:00
donovaly
56a9f4f144 [Spreadsheet] fix preferences UI
- add missing layouts (Qt's designer warns too)
- add spacers to assure a compact layout on all screens
2021-10-03 13:44:44 +02:00
Yorik van Havre
140e03301e Updated ts files 2021-09-29 14:32:12 +02:00
mwganson
2e021e5880 [Spreadsheet] add preference page and 3 import/export parameters 2021-09-27 22:05:36 -05:00
Chris Hennes
3d85ad70b5 Merge branch 'master' into spreadsheetPasteCleanup 2021-09-24 07:59:21 -05:00
Yorik van Havre
6ad3530981 Merged crowdin translations 2021-09-23 17:14:48 +02:00
Chris Hennes
4ebfb0c7f4 [Spreadsheet] Add support for copying empty cells 2021-09-21 14:32:42 -05:00
Chris Hennes
bbee3f05eb [Spreadsheet] Refactor and simplify paste code 2021-09-20 16:12:16 -05:00
mwganson
eb88ebafaf [Spreadsheet] Prevent infinite loop when copy/paste of non-rectangular selection 2021-09-14 15:15:59 -05:00
Yorik van Havre
34d28ac985 Merge pull request #5015 from Roy-043/Spreadsheet-importXLSX
Spreadsheet importXLSX: Added floor and ceil functions.
2021-09-07 12:45:03 +02:00
Yorik van Havre
a9717a1e17 Merged crowdin translations 2021-09-07 11:26:48 +02:00
Roy-043
5221175455 Spreadsheet importXLSX: Added floor and ceil functions. Fixed aliasRef is None issue.
See https://forum.freecadweb.org/viewtopic.php?f=3&t=61807&p=530473#p530413
2021-09-07 09:26:39 +02:00
Yorik van Havre
199e8a8d6e Merged crowdin translations 2021-08-26 14:51:36 +02:00
Yorik van Havre
834933866e Merged crowdin translations 2021-07-08 16:06:38 +02:00
Yorik van Havre
da508e30b0 Merged crowdin translations 2021-07-01 13:56:25 +02:00
Yorik van Havre
acedf491f3 Merged crowdin translations 2021-06-24 17:22:19 +02:00
Yorik van Havre
24362e9020 Merged crowdin translations 2021-06-17 16:04:02 +02:00
Yorik van Havre
ee6a9b8c7d Merged crowdin translations 2021-06-10 12:24:24 +02:00
0penBrain
07db7dd262 [Spreadsheet] Expose SpreadsheetView::getSheet to Python 2021-06-07 21:18:26 +02:00
Yorik van Havre
9f81ca933d merged crowdin translations 2021-06-03 15:43:34 +02:00
Yorik van Havre
dd1220b345 Merged crowdin translations 2021-05-27 14:51:33 +02:00
Yorik van Havre
0be2757e13 Merged crwodin translations 2021-05-12 16:36:31 +02:00
Yorik van Havre
91ea7fbba8 Updated ts files 2021-05-11 13:05:20 +02:00
wmayer
72a3b9cb51 Spreadsheet: remove some more deprecated Py2 code 2021-04-26 11:03:48 +02:00
Mateusz Skowroński
9ade68e9bf Fix CMake warning: qt5_make_output_file is not part of the official API, and might be removed in Qt 6. 2021-04-19 15:10:53 +02:00
wmayer
f4e0abc9d2 Spreadsheet: [skip ci] fix gcc warnings about unused variables 2021-04-03 12:21:42 +02:00
Benjamin Nauck
4e4a8df724 Spreadsheet: Fix UI issues when trying to insert rows/cols
* Add support for better translations (using pluralizations)
* Add support for inserting rows/columns after the selection
* Informs the user that it will insert rows/cols above/under/left/right of the selection
* Informs the user how many rows/cols that will be inserted
2021-04-02 19:33:06 +02:00
Chris Hennes
ee2d7651b8 [Spreadsheet] Remove deprecated Qt < 5.9 code 2021-04-01 19:31:22 +02:00
Chris Hennes
48b4a9d7c9 Remove unneeded Qt version checks 2021-03-28 17:41:27 +02:00
Chris Hennes
be0d3e1157 Remove deprecated Qt constants
Qt has deprecated the following constants, this commit replaces them
with their new equivalent/replacement:

Qt::TextColorRole -> Qt::ForegroundRole
Qt::BackgroundColorRole -> Qt::BackgroundRole
QPainter::HighQualityAntialiasing -> QPainter::Antialiasing
QPalette::Foreground -> QPalette::WindowText
2021-03-28 17:03:09 +02:00
Benjamin Nauck
8a2cfc268e [Base] Remove includes to StdStlTools.h as that's not needed anymore
std::make_unique was introduced in c++14, so no need to use the back
ported version
2021-03-06 21:20:32 +01:00
Benjamin Nauck
93d2758fbd [Spreadsheet] Use std::shared_ptr instead of boost::shared_ptr
There's no need to use boost version when stl has support for shared_ptr
2021-03-06 19:32:03 +01:00
David Osterberg
c1b3fba031 Beautify xml step 1: These changes do not affect the uic output 2021-03-02 16:29:11 +01:00
Yorik van Havre
fa85db61f9 Merged crowdin translations 2021-02-25 13:27:48 +01:00
Yorik van Havre
5c12afb5b5 Merged crowdin translations 2021-02-24 18:07:59 +01:00
Benjamin Nauck
eb400fe249 Spreadsheet: Don't autocomplete when writing strings
After pull request https://github.com/FreeCAD/FreeCAD/pull/4215 it
doesn't make much sense helping the user to write expressions without
leading '=', as that content will be parsed as a string.

This change adjusts the behaviour in SpreadsheetGui's LineEdit to avoid
popping up the ExpressionCompleter when no leading equal sign is used.
2021-02-19 16:22:41 +01: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
0penBrain
aa44e700cd [SpreadSheet] Fixes #4563 exported range issue 2021-02-12 18:06:07 +01:00