176 Commits

Author SHA1 Message Date
Martin Marmsoler
b7c2740778 replace foreach by for 2020-06-11 11:12:05 +02:00
Martin Marmsoler
e6f77ec369 Use uuid instead of an index to connect multiple elements 2020-06-11 11:12:05 +02:00
Simon De Backer
fe64923ffe fix deprecated warning QSet<T> QList<T>::toSet()
Use
QSet<T>(list.begin(), list.end())
instead.

This function was introduced in Qt 5.14
2020-06-08 03:52:51 +02:00
Claveau Joshua
908d79925c save/load QetGraphicsTableItem to/from .qet file 2020-04-17 18:40:28 +02:00
Laurent Trinques
73149973e3 Merge remote-tracking branch 'origin/QetGraphicsTableItem' 2020-04-12 18:51:38 +02:00
Laurent Trinques
99064fe2ab Moving elements by mouse does not respect the grid settings
When moving element by mouse, snapping to grid uses fixed 10 px steps
hardcoded in source instead of using the value from grid settings. When
moved by keyboard, the grid step is respected.
It is due to QPointF Diagram::snapToGrid(const QPointF &p) function not
considering the settings.

Thanks jethro for this patch
2020-03-27 21:21:49 +01:00
blacksun
62f5c4092d fix typo
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5759 bfdf4180-ca20-0410-9c96-a3a8aa849046
2019-03-05 13:48:47 +00:00
blacksun
1c2b3baba7 Minor : update gui layout.
Fix : change grid step doesn't applyed


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5754 bfdf4180-ca20-0410-9c96-a3a8aa849046
2019-03-04 08:55:06 +00:00
scorpio810
ba293a650e Add two speedsize for displacing items when working with a keyboard on
diagram editor :
normal displacement "adjustable from 1 to 30" 
(keys : Left,Right,Up,Down) 
fine displacement "adjustable from 1 to 10"
(ALT + keys : Left,Right,Up,Down ), thanks Erik for his patch


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5749 bfdf4180-ca20-0410-9c96-a3a8aa849046
2019-02-24 15:44:47 +00:00
scorpio810
47aaa1cdf4 Add Erik path : User can Diagram grid layout and keys
Left,Right,Up,Down stepsize


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5744 bfdf4180-ca20-0410-9c96-a3a8aa849046
2019-02-21 00:02:49 +00:00
blacksun
33d757e0d8 Diagram editor : add a new widget in the "curent selection dock" for edit the independent text. WIP
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5737 bfdf4180-ca20-0410-9c96-a3a8aa849046
2019-02-19 16:42:07 +00:00
blacksun
dba6a58390 Minor refactoring of diagram event interface
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5706 bfdf4180-ca20-0410-9c96-a3a8aa849046
2019-01-14 18:25:43 +00:00
scorpio810
3ed7a4e63b Minor : update Copyright date
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5705 bfdf4180-ca20-0410-9c96-a3a8aa849046
2019-01-13 16:56:12 +00:00
blacksun
4adf94dabf Fix crash when load an old project, wich contain element without her definition embedded, aka "ghost element".
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5550 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-10-10 16:48:44 +00:00
blacksun
e6d73977c1 1-Use the "implicite shared" of Qt for the QPicture and QPixmap of element (https://doc.qt.io/qt-5/implicit-sharing.html).
This avoid to parse the same element definition each time user drop the same element in the diagram.
Only the first element build the picture, all other get the created picture which is shared.

2- For use the "implicite shared" QPicture and QPixmap of element, now this isn't the element who build her picture, but a dedicated class who made only this job : build the QPicture and QPixmap of elements.

3- With the two previous novelty, the class CustomElement and GhostElement are became useless, and so was removed.
Some few member function of CustomElement was moved to Element.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5492 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-08-23 19:41:58 +00:00
scorpio810
30bee81432 Revert r5449 and disable r5452 momentary : Load time from elements is
very slow


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5461 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-07-30 15:24:29 +00:00
scorpio810
b97b01d63c Apply clang-tidy's modernize-use-auto
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5449 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-07-19 16:27:20 +00:00
scorpio810
e4b1ba9797 Apply clang-tidy's performance-unnecessary-value-param, performance-for-
range-copy


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5448 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-07-19 14:14:31 +00:00
blacksun
52eb4b5f71 Diagram editor : add 4 tools for edit the depth (Z value) of items.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5394 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-06-17 18:21:56 +00:00
blacksun
3225bdb371 minor fix : elements can't be moved up and left, when there rotation are different than 0.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5389 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-06-07 16:29:41 +00:00
blacksun
9d2124f593 Multipaste dialog : add 'autonum pasted conductors' check box
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5339 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-04-23 13:50:36 +00:00
blacksun
3228f3e5db Multi paste dialog : add a check box for allows auto connection of the pasted elements.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5331 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-04-12 16:24:44 +00:00
blacksun
22f95c22f0 simplify some code
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5299 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-04-05 09:37:35 +00:00
blacksun
a7917bb5bb Remove the class element text item.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5276 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-03-25 14:33:49 +00:00
blacksun
8e74d88e65 Fix wrong behavior when move a text item group, with rotation different than 0
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5223 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-01-28 11:16:09 +00:00
blacksun
d85e395b46 Element text item with are now converted to dynamic element text item.
From now, the class ElementTextItem is not anymore use in qet. Every texts in a diagram are DynamicElementTextItem.
the Xref item was adapted to dynamic text.
Previously, the comment and location, displayed as a "static text" below the "old text" tagged "label" are now automaticaly converted to DynamicElementTextItem, so visually, these texts stay unchanged 


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5216 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-01-19 12:17:20 +00:00
blacksun
89c019a10e Texts group item can be rotate.
The keybord shortcut for texts group alignment change. Now it's ctrl + arrow-left/up/right


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5141 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-12-05 20:51:54 +00:00
blacksun
e2a49e4872 Dynamic element text item : when the source of text is label or composite text with variable %{label}, and the label of the element is created from a formula,
the displayed text of the dynamic text item is up to date according to the formula 


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5086 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-10-26 17:12:49 +00:00
blacksun
8d333cbf1b Set the ItemIndexMethod of scene to NoIndex, according to some forum (Adress of forum are in the cpp file of this comit) they can be the sources of the crash occured by the conductor and shape "guost".
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5073 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-10-09 16:05:19 +00:00
scorpio810
9f9b127c04 Modernize-use-nullptr refactors code
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5008 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-08-05 02:06:59 +00:00
blacksun
3ef55906a4 First step for the dynamic element text : Now user can add directly from the diagram editor an editable text of an element.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5005 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-08-03 17:36:08 +00:00
blacksun
0df5391491 Fix the left margin of the diagram : In some condition, (most of time when use copy and paste) a margin appear in the left of the folio.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5004 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-08-03 17:04:08 +00:00
blacksun
618683d962 Toatly revamp of the handlers use to modify primitves, shapes and conductors.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5001 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-08-02 15:26:14 +00:00
blacksun
a69e39cd2f Fix crash: In Xref link widget, If there is an element being added (element pose mode), and this one is compatible with the type of Xref sought by the widget, then the widget show this element.
When user finish the element pose mode, the element under the cursor is deleted, but continue to be show by the widget.
So, click on this element in the widget cause a crash.
This case come when user add element and go to another diagram without finish the pose mode, and open Xref link widget from an element in this other diagram. 


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4993 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-07-26 08:55:32 +00:00
blacksun
4c56ebf353 Fix crash. Close a project with a selected linkable element (master, slave, report) cause a crash
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4992 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-07-20 12:40:30 +00:00
blacksun
fee0c55d9c In rare case in the diagram editor, when we add an element in the diagram and quickly click left, qet crash.
This commit try to avoid this crash, but without any certitude because the crash is very difficult to reproduce


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4959 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-05-13 16:01:47 +00:00
blacksun
34d7d134d3 Simplify how the diagrams are saved
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4927 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-03-05 13:10:47 +00:00
blacksun
878e3d5bf0 Remove some unused or obsolete code.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4926 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-03-05 12:24:33 +00:00
blacksun
1b120550e8 Fix bugtracker report N° 119 : Variable %F (of several element Xref) is not always up to date when the corresponding value of titleblock change.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4906 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-02-11 11:42:52 +00:00
blacksun
9792e95e6f Minor : remove a signal in diagram and use directly a signal of qetproject
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4904 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-02-09 11:07:45 +00:00
scorpio810
41659fa6fd Revert r4900
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4902 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-02-05 16:18:50 +00:00
scorpio810
6422dd096f Replace foreach function by for, please try and report problem
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4900 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-02-04 21:43:23 +00:00
scorpio810
54c85db29c Minor update Copyright year
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4860 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-01-20 10:55:49 +00:00
blacksun
15fb7e94bd Fix crash
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4828 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-01-02 13:42:16 +00:00
blacksun
14f02d4ed1 revert and merge rev 4823.
Fix : in old projects without the conductors formula, the conductors texts aren't loaded and displayed
Fix it in method void Conductor::refreshText()


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4825 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-12-28 10:03:47 +00:00
scorpio810
52f911887d Revert rev 4814 and 4820 momentarily
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4823 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-12-24 12:48:44 +00:00
blacksun
d8a374629b Modifie the text item of a conductor directly on a diagram also change the value of formula and label of the conductor property.
The change is apply for every conductors in the same potential


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4814 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-12-19 15:57:20 +00:00
blacksun
543578c3dc Conductor :
Use method toXml and fromXml of sequentialNumbers.
Use m_freeze_label instead of m_frozen_label to save the frozen status of the text item.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4807 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-12-12 10:52:44 +00:00
blacksun
4f192940b3 Element : change freeze label variable from a string to a bool.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4805 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-12-10 12:00:52 +00:00
blacksun
ae2afe8424 Element : edit an element text item (with tagg) directly on the folio, also update the information of the element.
For exemple, edit the element text item tagged "label", update the value with key "label" of element information. 


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4804 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-12-08 16:54:41 +00:00