mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-06-13 16:23:14 +02:00
Compare commits
64 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e695de914 | |||
| 3803834d6d | |||
| 78a26f9175 | |||
| a990daaf9e | |||
| 3b7a8a17e4 | |||
| 9e78dc56a8 | |||
| 3cf9095899 | |||
| 3a1398d752 | |||
| 67a7d277f4 | |||
| e26f7fdaaa | |||
| f74fed9f3f | |||
| 410c9293d1 | |||
| 07c34d7358 | |||
| 6d7d1ea23b | |||
| 58339f9016 | |||
| f83a5b3a79 | |||
| 7e5d41b474 | |||
| f0ec416a91 | |||
| f6ba47277d | |||
| 093ec563e1 | |||
| 1a1e8a2299 | |||
| 75c1485ead | |||
| 4ebaf073d6 | |||
| 8a96097d41 | |||
| 43826361a4 | |||
| 67b80364e1 | |||
| ea9d57cdde | |||
| bad60834cc | |||
| 6119d49d15 | |||
| acf0eb8f6a | |||
| 3cadedaf9e | |||
| 84ac394d3b | |||
| 27b21b38aa | |||
| 12b33e15a3 | |||
| 2ec1aecd53 | |||
| 73ce3ae9fe | |||
| 6375136a50 | |||
| ee49086d03 | |||
| c31cab34e4 | |||
| a61d70e40e | |||
| f43ce82052 | |||
| 707005879b | |||
| 29c362fe4c | |||
| dad637689d | |||
| 0f179a5d49 | |||
| 3a0546e638 | |||
| c9ea538999 | |||
| 96d84bf852 | |||
| 0a6efa466e | |||
| f20ea041b6 | |||
| fb01e51bbb | |||
| 5f252fbd00 | |||
| 74b55f3bf5 | |||
| a121fbe530 | |||
| a2ae8255ac | |||
| d711d8fb4a | |||
| 3a6b4807db | |||
| d699faf501 | |||
| 95e401a266 | |||
| 2c1b840f9c | |||
| 2d89d70682 | |||
| 7747223dfa | |||
| ae5e188866 | |||
| 4ca0bbf682 |
@@ -1,3 +1,33 @@
|
||||
[ca]
|
||||
Gràcies a Qt Software per la biblioteca Qt ( http://www.qtsoftware.com/ ), amb llicència GNU/GPL.
|
||||
Gràcies al projecte KDE ( http://www.kde.org/ ).
|
||||
Gràcies a Loic per les seves explicacions d'ordre matemàtic.
|
||||
Gràcies a Remi Collet pels paquets Fedora.
|
||||
Gràcies a Laurent Trinques pels paquets Debian.
|
||||
Gràcies a `trem' pels paquets Mandriva.
|
||||
Gràcies a TuxFamily ( http://tuxfamily.org/ ) per a l'allotjament del projecte.
|
||||
Gràcies a `Nishiki' pels seus elements i el seu suport suport.
|
||||
Gràcies a qtcentre.org per la seva classe SingleApplication.
|
||||
Gràcies a Alfredo Carreto per les seves traduccions i correccions al castellà ( http://electronicosmx.net )
|
||||
Gràcies a 'Dr.Slump' et Sivio pour leurs traductions a l'italià
|
||||
Gràcies a Jose Carlos Martins per les seves traduccions al portuguès
|
||||
Gràcies a Pavel Fric per les seves traduccions al txec
|
||||
Gràcies a Pawel Smiech per les seves traduccions al polonès
|
||||
Gràcies a Yuriy Litkevich per les seves traduccions al rus
|
||||
Gràcies a Youssef Ouamalkran i Antoni Mirabete per les seves traduccions al català
|
||||
Gràcies a Gabi Mandoc per les seves traduccions al romanès
|
||||
Gràcies a Markus Budde i Jonas Stein et Noah Braden per les seves traduccions a l'alemany
|
||||
Gràcies a Mohamed Souabni per les seves traduccions a l'àrab
|
||||
Gràcies a Uroš Platiše per les seves traduccions a l'eslovè
|
||||
Gràcies a Antun Marakovic per les seves traduccions al croat
|
||||
Gràcies a Nikos Papadopoylos && Yannis Gyftomitros per les seves traduccions al grec
|
||||
Gràcies a Markos Chandras pels paquets Gentoo
|
||||
Gràcies a David pels paquets Slackware
|
||||
Gràcies a Chipsterjulien pels paquets Archlinux AUR
|
||||
Gràcies a Elbert de NL pels paquets OS/2
|
||||
Gràcies a Zloidemon pels paquets (port GCC)
|
||||
Gràcies a Mrbit per ebuild els paquets Gentoo
|
||||
|
||||
[en]
|
||||
Thanks to Qt Software for their Qt library ( http://www.qtsoftware.com/ ), licensed under GNU/GPL.
|
||||
Thanks to the KDE project ( http://www.kde.org/ ).
|
||||
|
||||
+338
@@ -0,0 +1,338 @@
|
||||
# Changelog
|
||||
|
||||
## [Unreleased](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/HEAD)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.9...HEAD)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- Apple silicon download is not working [\#400](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/400)
|
||||
- Apple silicon download is not working [\#394](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/394)
|
||||
- Differenciating connector for proper labeling [\#390](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/390)
|
||||
- Non-perpendicular connections [\#368](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/368)
|
||||
- using the wrong Application Data folder on Windows [\#325](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/325)
|
||||
- Unclear which PPA to use [\#321](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/321)
|
||||
- missing group functionality [\#318](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/318)
|
||||
- segfault due to calling method of uninitialized object [\#311](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/311)
|
||||
- Cannot open qelectrotech.app on macOS Sequoia 15.0 [\#307](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/307)
|
||||
- Dark Mode [\#301](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/301)
|
||||
- README 404 Not Found URL: qelectrotech.org/download.html needs to be qelectrotech.org/download.php [\#298](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/298)
|
||||
- Malware warning when trying to install dev version 0.100 [\#290](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/290)
|
||||
- The page sorting of folio [\#279](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/279)
|
||||
- Bad file name for translations [\#278](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/278)
|
||||
- Error using Portuguese Language [\#274](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/274)
|
||||
- Uninstaller [\#265](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/265)
|
||||
- New Maintainer [\#263](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/263)
|
||||
- crash on export project db \(sqlite\) [\#262](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/262)
|
||||
- https://qelectrotech.org/ is down for several days now ! [\#261](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/261)
|
||||
- right click on text crashes app [\#260](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/260)
|
||||
- broken link on github [\#259](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/259)
|
||||
- Build on Bullseye 11.5 fails [\#254](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/254)
|
||||
- Question about ARM target in future release [\#238](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/238)
|
||||
- Component library disappears completely after reset of program [\#87](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/87)
|
||||
- Can't change language in portable version [\#75](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/75)
|
||||
- Transformation Matrix for Element Editor [\#56](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/56)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Fixing translation file list in CMake [\#404](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/404) ([arummler](https://github.com/arummler))
|
||||
- Update dependencies to fix compilation errors [\#403](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/403) ([arummler](https://github.com/arummler))
|
||||
- Minor corrections to prevent crashes [\#401](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/401) ([Evilscrack](https://github.com/Evilscrack))
|
||||
- Correct compositeText alignment on copying [\#399](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/399) ([ChuckNr11](https://github.com/ChuckNr11))
|
||||
- Better handling of conductors when moving [\#398](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/398) ([ChuckNr11](https://github.com/ChuckNr11))
|
||||
- A few small improvements [\#395](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/395) ([ChuckNr11](https://github.com/ChuckNr11))
|
||||
- qet\_de updated [\#388](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/388) ([Bisku](https://github.com/Bisku))
|
||||
- only calculate grid-point-size, when min != max [\#387](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/387) ([plc-user](https://github.com/plc-user))
|
||||
- Mouse hover text for dynamic text items [\#386](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/386) ([elevatormind](https://github.com/elevatormind))
|
||||
- improvement: adjust size of grid-dots with zoom-factor [\#384](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/384) ([plc-user](https://github.com/plc-user))
|
||||
- adjust zoom-factor to use cosmetic-line and fixed comments [\#383](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/383) ([plc-user](https://github.com/plc-user))
|
||||
- element-editor: fix jumping positions when rotate, mirror or flip [\#382](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/382) ([plc-user](https://github.com/plc-user))
|
||||
- unify some more code for Qt5 & Qt6 \(and more\) [\#379](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/379) ([plc-user](https://github.com/plc-user))
|
||||
- same simplifications as in \#376 "use the same code for Qt5 & Qt6" [\#377](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/377) ([plc-user](https://github.com/plc-user))
|
||||
- simplify and use the same code for Qt5 & Qt6 [\#376](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/376) ([plc-user](https://github.com/plc-user))
|
||||
- bordertitleblock: use same code for Qt5 & Qt6 for "numbering" rows [\#375](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/375) ([plc-user](https://github.com/plc-user))
|
||||
- some minor changes [\#374](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/374) ([plc-user](https://github.com/plc-user))
|
||||
- implement setting of point-size of grids [\#372](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/372) ([plc-user](https://github.com/plc-user))
|
||||
- some small changes for selective move [\#370](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/370) ([plc-user](https://github.com/plc-user))
|
||||
- Added slovak translation to org.qelectrotech.qelectrotech.desktop [\#369](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/369) ([prescott66](https://github.com/prescott66))
|
||||
- unify calls to "setRotation" for element-primitives again [\#367](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/367) ([plc-user](https://github.com/plc-user))
|
||||
- Added option to only move dynamic texts [\#365](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/365) ([scorpio810](https://github.com/scorpio810))
|
||||
- New variables for conductor text formulas [\#364](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/364) ([scorpio810](https://github.com/scorpio810))
|
||||
- Fix typo widht to width [\#362](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/362) ([pkess](https://github.com/pkess))
|
||||
- element-editor: add mirror and flip for "text" [\#361](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/361) ([plc-user](https://github.com/plc-user))
|
||||
- Add Swedish translation [\#360](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/360) ([scorpio810](https://github.com/scorpio810))
|
||||
- German text for launcher and debian package code style [\#359](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/359) ([pkess](https://github.com/pkess))
|
||||
- some more rotation, mirror and flip [\#358](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/358) ([plc-user](https://github.com/plc-user))
|
||||
- BugFix: Flip and Mirror of terminals [\#357](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/357) ([plc-user](https://github.com/plc-user))
|
||||
- element-editor: fix rotation and more [\#356](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/356) ([plc-user](https://github.com/plc-user))
|
||||
- minor: mostly typos [\#355](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/355) ([plc-user](https://github.com/plc-user))
|
||||
- a few translated shortcuts were still there ... fixed! [\#354](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/354) ([plc-user](https://github.com/plc-user))
|
||||
- FIX: some shortcuts do not work with language set to local [\#353](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/353) ([plc-user](https://github.com/plc-user))
|
||||
- fix movement of element, when origin is outside of graphics [\#352](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/352) ([plc-user](https://github.com/plc-user))
|
||||
- FIX copy-and-paste in element-editor: set paste-position to meaningful values [\#351](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/351) ([plc-user](https://github.com/plc-user))
|
||||
- some cleaning for element-file [\#350](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/350) ([plc-user](https://github.com/plc-user))
|
||||
- fix: properties in project-file [\#348](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/348) ([plc-user](https://github.com/plc-user))
|
||||
- translation: update German and English [\#347](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/347) ([plc-user](https://github.com/plc-user))
|
||||
- export: set maximum width / height according limitations in QPainter [\#346](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/346) ([plc-user](https://github.com/plc-user))
|
||||
- export: set maximum width / height according specifications of export-type [\#345](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/345) ([plc-user](https://github.com/plc-user))
|
||||
- some clean-up for element-file and in code [\#344](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/344) ([plc-user](https://github.com/plc-user))
|
||||
- minor: typos, comments, whitespace, translation [\#343](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/343) ([plc-user](https://github.com/plc-user))
|
||||
- Sort names in element-file by language-code [\#342](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/342) ([plc-user](https://github.com/plc-user))
|
||||
- more precise Log-Text for search of "qet\_tb\_generator" [\#341](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/341) ([plc-user](https://github.com/plc-user))
|
||||
- machine\_info: add entry for QETApp::configDir\(\) also for win [\#340](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/340) ([plc-user](https://github.com/plc-user))
|
||||
- remove dead code \(local variables that were never used\) [\#339](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/339) ([plc-user](https://github.com/plc-user))
|
||||
- minor changes [\#338](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/338) ([plc-user](https://github.com/plc-user))
|
||||
- Update of qet\_de [\#337](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/337) ([Bisku](https://github.com/Bisku))
|
||||
- rewrite code for executing “qet\_tb\_generator” plugin [\#335](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/335) ([plc-user](https://github.com/plc-user))
|
||||
- build-aux/snap/snapcraft.yaml: python3.8 -\> 3.10 [\#334](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/334) ([zultron](https://github.com/zultron))
|
||||
- corrected a few places where QETApp::documentDir\(\) should also be used [\#333](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/333) ([plc-user](https://github.com/plc-user))
|
||||
- add commandline-parameter "--data-dir" [\#332](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/332) ([plc-user](https://github.com/plc-user))
|
||||
- machine\_info: fix element-count and make static text a bit shorter [\#331](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/331) ([plc-user](https://github.com/plc-user))
|
||||
- formatting / whitespace - unify declarations [\#330](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/330) ([plc-user](https://github.com/plc-user))
|
||||
- Set default-location for projects to documents-dir. [\#329](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/329) ([plc-user](https://github.com/plc-user))
|
||||
- machine\_info.cpp: add explaining text for directory-list [\#328](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/328) ([plc-user](https://github.com/plc-user))
|
||||
- set config- and data-dir to system-specific paths [\#327](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/327) ([plc-user](https://github.com/plc-user))
|
||||
- Update qet\_cs.ts [\#326](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/326) ([pafri](https://github.com/pafri))
|
||||
- update German translation [\#324](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/324) ([plc-user](https://github.com/plc-user))
|
||||
- fix copyright-year [\#323](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/323) ([plc-user](https://github.com/plc-user))
|
||||
- PT-BR language update [\#322](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/322) ([gleissonjoaquim3](https://github.com/gleissonjoaquim3))
|
||||
- Fix: Only scroll diagram-view, when moved text leaves visible area [\#320](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/320) ([plc-user](https://github.com/plc-user))
|
||||
- Change Sorting of ElementInfo ComboBox [\#319](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/319) ([ChuckNr11](https://github.com/ChuckNr11))
|
||||
- Revert "ElementEditor elmt\_info\_cb sorting changed" [\#317](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/317) ([scorpio810](https://github.com/scorpio810))
|
||||
- Fix typo and some whitespace [\#316](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/316) ([plc-user](https://github.com/plc-user))
|
||||
- Fix missing company-titleblocks in properties-dialog [\#315](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/315) ([plc-user](https://github.com/plc-user))
|
||||
- ElementEditor elmt\_info\_cb sorting changed [\#314](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/314) ([ChuckNr11](https://github.com/ChuckNr11))
|
||||
- fix typos and whitespace [\#313](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/313) ([plc-user](https://github.com/plc-user))
|
||||
- Force light mode in collections like projects [\#312](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/312) ([Arusekk](https://github.com/Arusekk))
|
||||
- About QET: improvements in usability [\#310](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/310) ([plc-user](https://github.com/plc-user))
|
||||
- use MessageBox to inform user about additional info when importing scaled element [\#308](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/308) ([plc-user](https://github.com/plc-user))
|
||||
- make text for missing software "dxf2elmt" translatable [\#304](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/304) ([plc-user](https://github.com/plc-user))
|
||||
- QET\_ElementScaler: fix error for Qt 5.9 and added mirroring [\#303](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/303) ([plc-user](https://github.com/plc-user))
|
||||
- integrate "QET\_ElementScaler" as external software [\#302](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/302) ([plc-user](https://github.com/plc-user))
|
||||
- move code into else-clause to avoid possible crashes [\#300](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/300) ([plc-user](https://github.com/plc-user))
|
||||
- add terminal-names to connection in qet-file [\#297](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/297) ([plc-user](https://github.com/plc-user))
|
||||
- fix: editing SpinBoxes with keyboard lose focus [\#296](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/296) ([plc-user](https://github.com/plc-user))
|
||||
- Spanish lang update [\#295](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/295) ([joseyspain](https://github.com/joseyspain))
|
||||
- More spanish translations.Josey [\#294](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/294) ([joseyspain](https://github.com/joseyspain))
|
||||
- update German and English translations [\#293](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/293) ([plc-user](https://github.com/plc-user))
|
||||
- hide SVG background checkbox in print preferences [\#292](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/292) ([plc-user](https://github.com/plc-user))
|
||||
- fixed indentations of the remaining \*.cpp/\*.h files [\#291](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/291) ([plc-user](https://github.com/plc-user))
|
||||
- correct more indentations / whitespace [\#289](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/289) ([plc-user](https://github.com/plc-user))
|
||||
- update German and English translations [\#288](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/288) ([plc-user](https://github.com/plc-user))
|
||||
- some minor changes [\#286](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/286) ([plc-user](https://github.com/plc-user))
|
||||
- correct comments [\#285](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/285) ([plc-user](https://github.com/plc-user))
|
||||
- FIX SegFault: Disable menu-entry for DB-export when no project loaded [\#284](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/284) ([plc-user](https://github.com/plc-user))
|
||||
- changed some remaining "pt\_br" to "pt\_BR" [\#282](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/282) ([plc-user](https://github.com/plc-user))
|
||||
- add option "transparent background" in SVG-export [\#281](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/281) ([plc-user](https://github.com/plc-user))
|
||||
- Fix sizes [\#280](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/280) ([plc-user](https://github.com/plc-user))
|
||||
- added folder "company-titleblocks" \(incl. language-files\) [\#277](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/277) ([plc-user](https://github.com/plc-user))
|
||||
- update translations: de, en, nl [\#276](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/276) ([plc-user](https://github.com/plc-user))
|
||||
- fix: set default "company-element-dir" [\#275](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/275) ([plc-user](https://github.com/plc-user))
|
||||
- Fix Cmake build [\#273](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/273) ([De-Backer](https://github.com/De-Backer))
|
||||
- added "company-collection" as second user-collection [\#272](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/272) ([plc-user](https://github.com/plc-user))
|
||||
- corrected german texts for "line-style" [\#269](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/269) ([plc-user](https://github.com/plc-user))
|
||||
- Too many parts [\#268](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/268) ([scorpio810](https://github.com/scorpio810))
|
||||
- Merge Terminal strip to master [\#267](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/267) ([scorpio810](https://github.com/scorpio810))
|
||||
- Terminal strip [\#266](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/266) ([scorpio810](https://github.com/scorpio810))
|
||||
- Added new symbols [\#264](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/264) ([kamikazzyyyy](https://github.com/kamikazzyyyy))
|
||||
|
||||
## [0.9](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.9) (2023-01-03)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.9-dev-2022/12/30...0.9)
|
||||
|
||||
## [0.9-dev-2022/12/30](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.9-dev-2022/12/30) (2022-12-30)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.9-dev-2022/08/15...0.9-dev-2022/12/30)
|
||||
|
||||
## [0.9-dev-2022/08/15](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.9-dev-2022/08/15) (2022-08-13)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/9-dev-2022/04/22...0.9-dev-2022/08/15)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- Polylines always closed on dxf export [\#228](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/228)
|
||||
- Refreshing after making changes to elements [\#168](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/168)
|
||||
|
||||
## [9-dev-2022/04/22](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/9-dev-2022/04/22) (2022-04-09)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/9-dev-2021/09/09...9-dev-2022/04/22)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- File dialog should enforce suffix [\#206](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/206)
|
||||
- snap: Update stable release to core20 & introduce branch for stable releases [\#201](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/201)
|
||||
- Can we submit Flatpak to Flathub? [\#143](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/143)
|
||||
|
||||
## [9-dev-2021/09/09](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/9-dev-2021/09/09) (2021-09-08)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/9-dev-2021/06/28...9-dev-2021/09/09)
|
||||
|
||||
## [9-dev-2021/06/28](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/9-dev-2021/06/28) (2021-07-06)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/9-dev-2021/05/09...9-dev-2021/06/28)
|
||||
|
||||
## [9-dev-2021/05/09](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/9-dev-2021/05/09) (2021-05-09)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.9-dev-2021/05...9-dev-2021/05/09)
|
||||
|
||||
## [0.9-dev-2021/05](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.9-dev-2021/05) (2021-04-30)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.8.0...0.9-dev-2021/05)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Rewrite how Properties are stored in the Project file [\#144](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/144) ([Murmele](https://github.com/Murmele))
|
||||
- Xml properties rebase2 [\#80](https://github.com/qelectrotech/qelectrotech-source-mirror/pull/80) ([Murmele](https://github.com/Murmele))
|
||||
|
||||
## [0.8.0](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.8.0) (2021-02-21)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.9-dev...0.8.0)
|
||||
|
||||
## [0.9-dev](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.9-dev) (2021-02-21)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.8.rc...0.9-dev)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- QET font [\#110](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/110)
|
||||
|
||||
## [0.8.rc](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.8.rc) (2020-12-01)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.8-dev...0.8.rc)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- overlapping comparisons always evaluate to true [\#78](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/78)
|
||||
- New snap break HiDPI [\#41](https://github.com/qelectrotech/qelectrotech-source-mirror/issues/41)
|
||||
|
||||
## [0.8-dev](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.8-dev) (2019-08-06)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.7.0...0.8-dev)
|
||||
|
||||
## [0.7.0](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.7.0) (2019-07-17)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.2a...0.7.0)
|
||||
|
||||
## [0.2a](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.2a) (2019-06-26)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.2b...0.2a)
|
||||
|
||||
## [0.2b](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.2b) (2019-06-26)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.2rc1...0.2b)
|
||||
|
||||
## [0.2rc1](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.2rc1) (2019-06-26)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.2rc2...0.2rc1)
|
||||
|
||||
## [0.2rc2](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.2rc2) (2019-06-26)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.2...0.2rc2)
|
||||
|
||||
## [0.2](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.2) (2019-06-26)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.3a...0.2)
|
||||
|
||||
## [0.3a](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.3a) (2019-06-26)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.11...0.3a)
|
||||
|
||||
## [0.11](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.11) (2019-06-26)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.21...0.11)
|
||||
|
||||
## [0.21](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.21) (2019-06-26)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.22...0.21)
|
||||
|
||||
## [0.22](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.22) (2019-06-26)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.70rc2...0.22)
|
||||
|
||||
## [0.70rc2](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.70rc2) (2019-06-25)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.70rc1...0.70rc2)
|
||||
|
||||
## [0.70rc1](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.70rc1) (2019-04-12)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.61...0.70rc1)
|
||||
|
||||
## [0.61](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.61) (2018-08-23)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.6...0.61)
|
||||
|
||||
## [0.6](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.6) (2018-03-06)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.6rc4...0.6)
|
||||
|
||||
## [0.6rc4](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.6rc4) (2018-01-12)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.6rc3...0.6rc4)
|
||||
|
||||
## [0.6rc3](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.6rc3) (2017-09-20)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.6rc2...0.6rc3)
|
||||
|
||||
## [0.6rc2](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.6rc2) (2017-06-13)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.6rc1...0.6rc2)
|
||||
|
||||
## [0.6rc1](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.6rc1) (2017-04-23)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.5...0.6rc1)
|
||||
|
||||
## [0.5](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.5) (2015-11-27)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.5rc1...0.5)
|
||||
|
||||
## [0.5rc1](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.5rc1) (2015-10-30)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.5b...0.5rc1)
|
||||
|
||||
## [0.5b](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.5b) (2015-10-04)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.4...0.5b)
|
||||
|
||||
## [0.4](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.4) (2015-02-20)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.4rc2...0.4)
|
||||
|
||||
## [0.4rc2](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.4rc2) (2014-12-27)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.4rc1...0.4rc2)
|
||||
|
||||
## [0.4rc1](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.4rc1) (2014-11-10)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.4b...0.4rc1)
|
||||
|
||||
## [0.4b](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.4b) (2014-11-02)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.3...0.4b)
|
||||
|
||||
## [0.3](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.3) (2013-09-28)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.3rc...0.3)
|
||||
|
||||
## [0.3rc](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.3rc) (2013-09-10)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.3b...0.3rc)
|
||||
|
||||
## [0.3b](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.3b) (2013-06-18)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.1...0.3b)
|
||||
|
||||
## [0.1](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.1) (2008-03-08)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.1rc1...0.1)
|
||||
|
||||
## [0.1rc1](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.1rc1) (2008-03-02)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/0.1b...0.1rc1)
|
||||
|
||||
## [0.1b](https://github.com/qelectrotech/qelectrotech-source-mirror/tree/0.1b) (2007-12-23)
|
||||
|
||||
[Full Changelog](https://github.com/qelectrotech/qelectrotech-source-mirror/compare/5cadf173c7b73460b62409c81568fc8999177d52...0.1b)
|
||||
|
||||
|
||||
|
||||
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
||||
+3
-1
@@ -163,6 +163,7 @@ http://creativecommons.org/licenses/by/3.0/ ή στείλτε μια επιστ
|
||||
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
|
||||
|
||||
[nl]
|
||||
|
||||
De elementen collectie voorzien, samen met QElectroTech wordt geleverd als en
|
||||
zonder enige garantie van geschiktheid voor uw doel of werk.
|
||||
Het gebruik, de wijziging en de integratie van de elementen in elektrische
|
||||
@@ -177,7 +178,8 @@ http://creativecommons.org/licenses/by/3.0/ of stuur een brief naar Creative
|
||||
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
|
||||
|
||||
[be]
|
||||
De elementen collectie welke samen met QElectroTech wordt geleverd zonder enige garantie
|
||||
|
||||
De elementen collectie welke samen met QElectroTech wordt geleverd zonder enige garantie
|
||||
of deze geschikt zijn voor uw doel of de werking.
|
||||
Het gebruik, wijzigen en integratie van de elementen in uw elektrische
|
||||
schema's wordt toegestaan zonder enige voorwaarden, ongeacht wat de uiteindelijke
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
[ca]
|
||||
Dependències:
|
||||
libQt5 (paquets libqt5*)
|
||||
cupsys-bsd per imprimir
|
||||
|
||||
Com compilar:
|
||||
$ qmake (qmake-qt5 pels sistemes basats en Debian)
|
||||
$ make
|
||||
# umask 0022
|
||||
# make install
|
||||
|
||||
[en]
|
||||
Requirements :
|
||||
libQt5 (see packages libqt5*)
|
||||
@@ -64,17 +75,6 @@ $ make
|
||||
# umask 0022
|
||||
# make install
|
||||
|
||||
[ca]
|
||||
Dependències:
|
||||
libQt5 (paquets libqt5*)
|
||||
cupsys-bsd per imprimir
|
||||
|
||||
Com compilar:
|
||||
$ qmake (qmake-qt5 pels sistemes basats en Debian)
|
||||
$ make
|
||||
# umask 0022
|
||||
# make install
|
||||
|
||||
[cs]
|
||||
Požadavky :
|
||||
libQt5 (viz balíček libqt5*)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
[ca]
|
||||
QElectroTech és una aplicació Qt5 per crear esquemes elèctrics.
|
||||
QET utilitza el format XML per als seus elements i esquemes i inclou un editor d'esquemes, un editor d'elements i un editor de caixetins.
|
||||
|
||||
[en]
|
||||
QElectroTech is a Qt5 application to design electric diagrams.
|
||||
It uses XML files for elements and diagrams, and includes both a diagram editor, a element editor, and an titleblock editor.
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
[ca]
|
||||
Col·lecció d'elements per a QElectroTech.
|
||||
|
||||
[fr]
|
||||
Collection d'éléments pour QElectroTech.
|
||||
|
||||
@@ -10,6 +13,7 @@ Bauteilsammlung für QElectroTech.
|
||||
[es]
|
||||
Collección de elementos para QElectroTech.
|
||||
|
||||
|
||||
[pt]
|
||||
Colecção de elementos para QElectroTech.
|
||||
|
||||
|
||||
@@ -710,7 +710,6 @@ set(QET_SRC_FILES
|
||||
|
||||
set(TS_FILES
|
||||
${QET_DIR}/lang/qet_ar.ts
|
||||
${QET_DIR}/lang/qet_be.ts
|
||||
${QET_DIR}/lang/qet_ca.ts
|
||||
${QET_DIR}/lang/qet_cs.ts
|
||||
${QET_DIR}/lang/qet_da.ts
|
||||
@@ -727,16 +726,19 @@ set(TS_FILES
|
||||
${QET_DIR}/lang/qet_mn.ts
|
||||
${QET_DIR}/lang/qet_nb.ts
|
||||
${QET_DIR}/lang/qet_nl.ts
|
||||
${QET_DIR}/lang/qet_nl_BE.ts
|
||||
${QET_DIR}/lang/qet_no.ts
|
||||
${QET_DIR}/lang/qet_pl.ts
|
||||
${QET_DIR}/lang/qet_pt.ts
|
||||
${QET_DIR}/lang/qet_pt_BR.ts
|
||||
${QET_DIR}/lang/qet_ro.ts
|
||||
${QET_DIR}/lang/qet_rs.ts
|
||||
${QET_DIR}/lang/qet_ru.ts
|
||||
${QET_DIR}/lang/qet_sk.ts
|
||||
${QET_DIR}/lang/qet_sl.ts
|
||||
${QET_DIR}/lang/qet_sr.ts
|
||||
${QET_DIR}/lang/qet_sv.ts
|
||||
${QET_DIR}/lang/qet_tr.ts
|
||||
${QET_DIR}/lang/qet_uk.ts
|
||||
${QET_DIR}/lang/qet_zh.ts
|
||||
)
|
||||
|
||||
+1
-1
Submodule elements updated: 09eb672e0f...6e1e2471fe
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
+2378
-2296
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+2
-2
@@ -716,7 +716,7 @@ Bemerkung: diese Optionen verhindern NICHT das automatische Nummerieren.</transl
|
||||
<message>
|
||||
<location filename="../sources/ui/bomexportdialog.cpp" line="122"/>
|
||||
<source>Position</source>
|
||||
<translation>Position</translation>
|
||||
<translation>Seite</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sources/ui/bomexportdialog.cpp" line="124"/>
|
||||
@@ -8839,7 +8839,7 @@ Möchten Sie sie ersetzen?</translation>
|
||||
<message>
|
||||
<location filename="../sources/qetinformation.cpp" line="237"/>
|
||||
<source>Position</source>
|
||||
<translation>Position</translation>
|
||||
<translation>Seite</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sources/qetinformation.cpp" line="238"/>
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -1393,7 +1393,7 @@ Nota: queste opzioni non consentono attivare o disattivare la numerazione automa
|
||||
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="1320"/>
|
||||
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="1458"/>
|
||||
<source>Information de l'élément</source>
|
||||
<translation>Informazioni dell'elemento</translation>
|
||||
<translation>Informazione dell'elemento</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="563"/>
|
||||
|
||||
@@ -1,214 +0,0 @@
|
||||
[en]
|
||||
The elements collection provided along with QElectroTech is provided as is and
|
||||
without any warranty of fitness for your purpose or working.
|
||||
The usage, the modification and the integration of the elements into electric
|
||||
diagrams is allowed without any condition, whatever the final license of the
|
||||
diagrams is.
|
||||
|
||||
Permission is not granted to use this software or any of the associated files
|
||||
as sample data for the purposes of building machine learning models.
|
||||
|
||||
If you redistribute all or a part of the QElectroTech collection, with or
|
||||
without any modification, out of an electric diagram, you must respect the
|
||||
conditions of the CC-BY license:
|
||||
This work is licensed under the Creative Commons Attribution 3.0 License.
|
||||
To view a copy of this license, visit
|
||||
http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative
|
||||
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
|
||||
|
||||
[fr]
|
||||
La collection d'éléments fournie avec QElectroTech est fournie telle quelle et
|
||||
sans la moindre garantie qu'elle convienne à votre utilisation ou qu'elle
|
||||
fonctionne.
|
||||
L'utilisation, la modification et l'intégration des éléments dans des schémas
|
||||
électriques est autorisée sans condition, quelle que soit la licence finale des
|
||||
schémas.
|
||||
L'autorisation n'est pas accordée pour utiliser ce logiciel ou l'un des fichiers associés
|
||||
comme exemples de données aux fins de création de modèles d’apprentissage automatique.
|
||||
|
||||
Si vous redistribuez tout ou partie de la collection QElectroTech, avec ou sans
|
||||
modification, en dehors d'un schéma électrique, vous devrez respecter les
|
||||
conditions de la licence CC-BY :
|
||||
Cette création est mise à disposition selon le Contrat Paternité 3.0
|
||||
disponible en ligne http://creativecommons.org/licenses/by/3.0/ ou par
|
||||
courrier postal à Creative Commons, 171 Second Street, Suite 300, San Francisco,
|
||||
California 94105, USA.
|
||||
|
||||
[de]
|
||||
Die mit QElectroTech zur Verfügung gestellte Sammlung von Elementen wird ohne
|
||||
Gewährleistung der Eignung für einen bestimmten Zweck oder der Funktions-
|
||||
fähigkeit zur Verfügung gestellt.
|
||||
Die Verwendung, Modifikation und Integration der Elemente in elektrische
|
||||
Schaltpläne ist uneingeschränkt erlaubt, unabhängig von der endgültigen Lizenz
|
||||
der Schaltpläne.
|
||||
Es ist nicht gestattet, diese Software oder eine der zugehörigen Dateien
|
||||
als Beispieldaten für die Erstellung von Modellen für maschinelles Lernen
|
||||
zu verwenden.
|
||||
Wenn Sie die gesamte QElectroTech-Sammlung oder Teile davon, mit oder ohne
|
||||
Modifikationen, aus einem Schaltplan weitergeben, müssen Sie die Bedingungen
|
||||
der CC-BY-Lizenz einhalten.
|
||||
Dieses Werk steht unter einer Creative Commons Attribution 3.0 Lizenz.
|
||||
Eine Kopie dieser Lizenz finden Sie unter:
|
||||
http://creativecommons.org/licenses/by/3.0/
|
||||
oder senden Sie einen Brief an:
|
||||
Creative Commons, 171 Second Street, Suite 300,
|
||||
San Francisco, Kalifornien, 94105, USA.
|
||||
|
||||
[ru]
|
||||
Коллекция элементов, поставляемая вместе с QElectroTech, поставляется "как есть"
|
||||
и без каких-либо гарантий пригодности для той или иной цели или работы.
|
||||
Использование, изменение и интеграция элементов в электрическую
|
||||
схему разрешается без каких-либо условий, безотносительно конечной лицензии на
|
||||
схему.
|
||||
Если Вы распространяете всю или часть коллекции QElectroTech, с или без
|
||||
изменений, отдельно от электрической схемы, Вы должны соблюдать условия лицензии
|
||||
CC-BY:
|
||||
Эта работа лицензирована на условиях Creative Commons Attribution 3.0 License.
|
||||
Чтобы увидеть копию этой лицензии, посетите
|
||||
http://creativecommons.org/licenses/by/3.0/ или отправте письмо в Creative
|
||||
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
|
||||
(данный перевод, на русский язык, является вольным и выполнен не юристом!)
|
||||
|
||||
[pt]
|
||||
A colecção de elementos fornecida com o programa QElectroTech é fornecida como é
|
||||
e sem nenhuma garantia da aptidão para o seu uso e sem garantia de que funciona.
|
||||
É permitido, sem condição alguma, qualquer que seja a licença final, usar,
|
||||
editar e incluir estes elementos em esquemas eléctricos.
|
||||
Se você redistribuir uma parte ou toda a colecção de elementos do programa
|
||||
QElectroTech, tendo editado ou não os elementos, sem ser num esquema eléctrico,
|
||||
tem de respeitar as condições da licença CC-BY:
|
||||
Este trabalho está licenciado de acordo com os termos da licença Creative
|
||||
Commons Attribution 3.0 License.
|
||||
Para ver uma cópia da licença visite http://creativecommons.org/licenses/by/3.0/
|
||||
ou envie uma carta para o endereço Creative Commons, 171 Second Street, Suite
|
||||
300, San Francisco, California, 94105, USA.
|
||||
|
||||
[es]
|
||||
La colección de elementos QElectrotech es distruibida tal cual y sin ninguna
|
||||
garantía a la conveniencia de su uso y sin garantía de que funciona.
|
||||
Se permite sin condicion alguna, cualquiera que sea la licencia final, usar,
|
||||
editar, e incluir estos elementos en esquemas eléctricos.
|
||||
Si usted redistribuye una parte de la colección o toda la collección de
|
||||
QElectrotech, con o sin ediciones, fuera de un esquema eléctrico, tiene que
|
||||
respetar las condiciones de la licencia CC-BY:
|
||||
Esta obra está bajo una licencia Reconocimiento 3.0 de Creative Commons.
|
||||
Para ver una copia de esta licencia, visite
|
||||
http://creativecommons.org/licenses/by/3.0/ o envie una carta a Creative
|
||||
Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.
|
||||
|
||||
[ca]
|
||||
La col·lecció de símbols QElectrotech és distribuïda tal qual i sense cap
|
||||
garantia d'idoneïtat d'ús ni de funcionament.
|
||||
Es permet incondicionalment, amb independència de la llicència final, emprar,
|
||||
editar, i incloure aquests símbols en esquemes elèctrics.
|
||||
Si vostè redistribueix una part de la col·lecció de QElectrotech o tota ella,
|
||||
amb condicions o sense, separadament d'un esquema elèctric, haurà de respectar
|
||||
les condicions de la llicència CC-BY:
|
||||
Aquesta obra es troba sota una llicència Reconeixement 3.0 de Creative Commons.
|
||||
Per veure una còpia d'aquesta llicència visiti
|
||||
http://creativecommons.org/licenses/by/3.0/ o enviï una carta a Creative
|
||||
Commons, 171 Second Street, Suite 300, San Francisco, California 94105,
|
||||
|
||||
[cs]
|
||||
Sbírka prvků poskytovaná společně s QElectroTechem je poskytována tak, jak je,
|
||||
bez záruky nebo vhodnosti pro váš účal nebo práci.
|
||||
Používání, úpravy a začlenění prvků do nákresů elektrických
|
||||
obvodů se povoluje bez jakýchkoli podmínek, cokoli je konečná licence nákresu.
|
||||
Pokud rozdáte celou nebo část ze sbírky QElectroTechu, s nebo bez
|
||||
jakýchkoli úprav, mimo elektrický nákres, musíte brát ohledy na podmínky
|
||||
licence CC-BY:
|
||||
tato práce je licencována pod licencí Creative Commons Attribution 3.0 License.
|
||||
Kopii této licence si můžete prohlédnout, navštivte
|
||||
http://creativecommons.org/licenses/by/3.0/ nebo pošlete dopis Creative
|
||||
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
|
||||
|
||||
[pl]
|
||||
Biblioteka elementów dostarczana wraz z QElectroTech jest w formie "taka jaka jest",
|
||||
bez żadnych gwarancji przydatności.
|
||||
Dozwolona jest edycja, modyfikacja i użytkowanie elementów bez żadnych warunków
|
||||
i bez względu na końcową licencję tworzonych schematów.
|
||||
W przypadku wykorzystywania całości lub części biblioteki elementów QElectroTech
|
||||
do innych celów niż tworzenie schematów elektrycznych, należy przestrzegać
|
||||
warunków licencji CC-BY:
|
||||
Niniejsza praca jest licencjonowana na zasadach Creative Commons Attribution 3.0 License.
|
||||
Aby zobaczyć kopię licencji, należy odwiedzić stronę internetową:
|
||||
http://creativecommons.org/licenses/by/3.0/ lub wysłać list do Creative
|
||||
Commons, 171 Second Street, Suite 300, San Francisco, Kalifornia 94105, USA.
|
||||
|
||||
[it]
|
||||
La collezione di elementi che si trova in QElectroTech è fornita così com'è
|
||||
senza alcuna garanzia di usabilità o funzionamento.
|
||||
L'uso, la modifica e l'integrazione degli elementi negli schemi elettrici
|
||||
è permessa senza condizioni, qualunque si ala licenza dello schema finale.
|
||||
Distribuendo tutto o parte della collezione di QElettroTech, con o senza
|
||||
modifiche, fuori da uno schema elettrico, bisogna rispettare le condizioni
|
||||
della licenza CC-BY:
|
||||
Questo lavoro è licenziato sotto la Licenza Creative Commons 3.0.
|
||||
Per vedere una copia di questa licenza, visitate il sito
|
||||
http://creativecommons.org/licenses/by/3.0/ o inviate una lettera a Creative
|
||||
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
|
||||
|
||||
[el]
|
||||
Η συλλογή στοιχείων που παρέχεται μαζί με το QElectroTech παρέχεται ως έχει και
|
||||
χωρίς καμία εγγύηση καταλληλότητας για συγκεκριμένο σκοπό ή την εργασία σας.
|
||||
Η χρήση, η τροποποίηση και η ενσωμάτωση των στοιχείων στα ηλεκτρικά
|
||||
διαγράμματα επιτρέπεται χωρίς καμία προϋπόθεση, όποια και αν είναι η τελική άδεια
|
||||
των διαγραμμάτων.
|
||||
Εάν αναδιανείμετε το σύνολο ή ένα μέρος της συλλογής του QElectroTech, με ή
|
||||
χωρίς καμία τροποποίηση, έξω από ένα ηλεκτρικό διάγραμμα, θα πρέπει να σεβαστείτε
|
||||
τους όρους της άδειας CC-BY:
|
||||
Το έργο αυτό είναι υπό την άδεια Creative Commons Attribution 3.0 License.
|
||||
Για να δείτε ένα αντίγραφο της άδειας αυτής, επισκεφτείτε το
|
||||
http://creativecommons.org/licenses/by/3.0/ ή στείλτε μια επιστολή στο Creative
|
||||
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
|
||||
|
||||
[nl]
|
||||
De elementen collectie voorzien, samen met QElectroTech wordt geleverd als en
|
||||
zonder enige garantie van geschiktheid voor uw doel of werk.
|
||||
Het gebruik, de wijziging en de integratie van de elementen in elektrische
|
||||
diagrammen wordt toegestaan zonder enige voorwaarden, ongeacht wat de uiteindelijke
|
||||
vergunning van het diagram is.
|
||||
Als u alle of een deel van de QElectroTech collectie, met of herdistribueren
|
||||
zonder enige wijziging, van een elektrisch schema, moet u voldoen aan de
|
||||
voorwaarden van de CC-BY-licentie:
|
||||
Dit werk is gelicenseerd onder de Creative Commons Attribution 3.0-licentie.
|
||||
Om een kopie van deze licentie te bekijken, bezoek
|
||||
http://creativecommons.org/licenses/by/3.0/ of stuur een brief naar Creative
|
||||
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
|
||||
|
||||
[be]
|
||||
De elementen collectie welke samen met QElectroTech wordt geleverd zonder enige garantie
|
||||
of deze geschikt zijn voor uw doel of de werking.
|
||||
Het gebruik, wijzigen en integratie van de elementen in uw elektrische
|
||||
schema's wordt toegestaan zonder enige voorwaarden, ongeacht wat de uiteindelijke
|
||||
liventie van het schema is.
|
||||
Als u één of meerdere elementen van de QElectroTech collectie, met of zonder wijzigingen, herdistribuer in een elektrisch schema of zonder schzma , moet u de voorwaarden van de
|
||||
CC-BY-licentie volgen:
|
||||
Dit werk is gelicenseerd onder de Creative Commons Attribution 3.0-licentie.
|
||||
Om een kopie van deze licentie te bekijken, bezoek
|
||||
http://creativecommons.org/licenses/by/3.0/ of stuur een brief naar Creative
|
||||
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
|
||||
|
||||
[da]
|
||||
Element samlinger leveret sammen med QElectroTech er tilvejebragt som er og
|
||||
uden nogen garanti for egnethed til dit formål eller arbejde.
|
||||
Brug, modifikation og integration af elementer til elektrisk diagrammer er
|
||||
tilladt uden nogen betingelse uanset den endelige diagram licens.
|
||||
Omfordeling af hele eller dele af QElectroTech samlingen, med eller
|
||||
uden ændring af et elektrisk diagram, skal du respektere betingelser for CC-BY-licens:
|
||||
Dette værk er licenseret under Creative Commons Attribution 3.0 License.
|
||||
For at se en kopi af denne licens, besøg
|
||||
http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative
|
||||
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
|
||||
|
||||
[ja]
|
||||
QElectroTech と一緒に提供される要素コレクションは現状のまま提供され、
|
||||
あなたの目的や作業に適合することを保証するものではありません。
|
||||
回路図での要素の利用、変更、統合は、回路図の最終的なライセンスに関わらず
|
||||
無条件で許可されます。
|
||||
回路図とは別に QElectroTech コレクションの全部または一部を
|
||||
変更の有無に関わらず再配布する場合は CC-BY ライセンスを尊重しなければなりません:
|
||||
この作品は Creative Commons Attribution 3.0 の下でライセンスされます。
|
||||
ライセンスのコピーを見るには http://creativecommons.org/licenses/by/3.0/ にアクセスするか、
|
||||
「Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.」に
|
||||
手紙を送ってください。
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../ELEMENTS.LICENSE
|
||||
@@ -1,343 +0,0 @@
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../LICENSE
|
||||
@@ -1,102 +0,0 @@
|
||||
Digitized data copyright (c) 2010 Google Corporation
|
||||
with Reserved Font Arimo, Tinos and Cousine.
|
||||
Copyright (c) 2012 Red Hat, Inc.
|
||||
with Reserved Font Name Liberation.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License,
|
||||
Version 1.1.
|
||||
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
|
||||
PREAMBLE The goals of the Open Font License (OFL) are to stimulate
|
||||
worldwide development of collaborative font projects, to support the font
|
||||
creation efforts of academic and linguistic communities, and to provide
|
||||
a free and open framework in which fonts may be shared and improved in
|
||||
partnership with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves.
|
||||
The fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply to
|
||||
any document created using the fonts or their derivatives.
|
||||
|
||||
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such.
|
||||
This may include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components
|
||||
as distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting ? in part or in whole ?
|
||||
any of the components of the Original Version, by changing formats or
|
||||
by porting the Font Software to a new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical writer
|
||||
or other person who contributed to the Font Software.
|
||||
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,in
|
||||
Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the
|
||||
corresponding Copyright Holder. This restriction only applies to the
|
||||
primary font name as presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole, must
|
||||
be distributed entirely under this license, and must not be distributed
|
||||
under any other license. The requirement for fonts to remain under
|
||||
this license does not apply to any document created using the Font
|
||||
Software.
|
||||
|
||||
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are not met.
|
||||
|
||||
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
|
||||
DEALINGS IN THE FONT SOFTWARE.
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
../fonts/liberation-fonts.LICENSE
|
||||
@@ -1,2 +0,0 @@
|
||||
"Liberation Fonts" Font Software is licensed under the
|
||||
SIL Open Font License, Version 1.1
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../fonts/liberation-fonts.NOTICE
|
||||
@@ -1,674 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../fonts/osifont.LICENSE
|
||||
@@ -1,13 +0,0 @@
|
||||
"osifont" Font Software is licensed under the
|
||||
GNU GENERAL PUBLIC LICENSE, Version 3
|
||||
|
||||
As a special exception, if you create a document which uses
|
||||
this font, and embed this font or unaltered portions of this
|
||||
font into the document, this font does not by itself cause
|
||||
the resulting document to be covered by the GNU General
|
||||
Public License. This exception does not however invalidate
|
||||
any other reasons why the document might be covered by the
|
||||
GNU General Public License. If you modify this font, you may
|
||||
extend this exception to your version of the font, but you
|
||||
are not obligated to do so. If you do not wish to do so,
|
||||
delete this exception statement from your version.
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../fonts/osifont.NOTICE
|
||||
Binary file not shown.
@@ -232,7 +232,7 @@ fi
|
||||
if [ -d "${QET_LICENSES_DIR}" ]; then
|
||||
echo "Copying licenses in the bundle..."
|
||||
mkdir $BUNDLE/Contents/Resources/licenses
|
||||
cp -R ${QET_LICENSES_DIR} $BUNDLE/Contents/Resources/licenses
|
||||
cp -R -L ${QET_LICENSES_DIR} $BUNDLE/Contents/Resources/licenses
|
||||
fi
|
||||
### create disk image ###############################################
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ fi
|
||||
if [ -d "${QET_LICENSES_DIR}" ]; then
|
||||
echo "Copying licenses in the bundle..."
|
||||
mkdir $BUNDLE/Contents/Resources/licenses
|
||||
cp -R ${QET_LICENSES_DIR} $BUNDLE/Contents/Resources/licenses
|
||||
cp -R -L ${QET_LICENSES_DIR} $BUNDLE/Contents/Resources/licenses
|
||||
fi
|
||||
|
||||
codesign --force --deep --sign --timestamp -s "Developer ID Application: Laurent TRINQUES (Y73WZ6WZ5X)" --options=runtime $BUNDLE
|
||||
|
||||
@@ -12,7 +12,7 @@ Keywords=Graphics;Science;Electricity;Engineering;
|
||||
Comment=Edit electrical diagrams.
|
||||
Comment[ar]=تحرير مخططات كهربائية
|
||||
Comment[be]=Bewerken elektrisch schema.
|
||||
Comment[ca]=Editar esquemes elèctrics.
|
||||
Comment[ca]=Edita esquemes elèctrics.
|
||||
Comment[cs]=Editor výkresů elektrických obvodů
|
||||
Comment[da]=Rediger elektriske diagrammer.
|
||||
Comment[de]=Elektroschaltpläne erstellen und bearbeiten.
|
||||
@@ -30,6 +30,7 @@ Comment[sk]=Úprava elektrických schém.
|
||||
GenericName=Electrical diagram editor
|
||||
GenericName[ar]=مُحرّر مخططات كهربائية
|
||||
GenericName[be]=Elektrische schema editor
|
||||
GenericName[ca]=Editor d'esquemes elèctrics
|
||||
GenericName[cs]=Editor výkresů elektrických obvodů
|
||||
GenericName[da]=Elektrisk diagram redigering
|
||||
GenericName[de]=Schaltplaneditor
|
||||
|
||||
@@ -7,20 +7,21 @@
|
||||
<name>QElectroTech</name>
|
||||
<summary>Electrical diagram editor</summary>
|
||||
<summary xml:lang="ar">مُحرّر مخططات كهربائية</summary>
|
||||
<summary xml:lang="be">Elektrische schema editor</summary>
|
||||
<summary xml:lang="ca">Editor d'esquemes elèctrics</summary>
|
||||
<summary xml:lang="cs">Editor výkresů elektrických obvodů</summary>
|
||||
<summary xml:lang="da">Elektrisk diagram redigering</summary>
|
||||
<summary xml:lang="de">Zeichenprogramm für Schaltpläne</summary>
|
||||
<summary xml:lang="el">Επεξεργαστής ηλεκτρικών διαγραμμάτων</summary>
|
||||
<summary xml:lang="ex">Editor de esquemas eléctricos</summary>
|
||||
<summary xml:lang="fr">Éditeur de schémas électriques</summary>
|
||||
<summary xml:lang="hr">Editor elektro sheme</summary>
|
||||
<summary xml:lang="it">Programma per disegnare schemi elettrici</summary>
|
||||
<summary xml:lang="ja">電気回路図エディタ</summary>
|
||||
<summary xml:lang="nl">Elektrische schema bewerker</summary>
|
||||
<summary xml:lang="pl">Edytor schematów elektrycznych</summary>
|
||||
<summary xml:lang="pt">Editor de esquemas eléctricos</summary>
|
||||
<summary xml:lang="ru">Редактор электрических схем</summary>
|
||||
<summary xml:lang="nl">Elektrische schema bewerker</summary>
|
||||
<summary xml:lang="be">Elektrische schema editor</summary>
|
||||
<summary xml:lang="da">Elektrisk diagram redigering</summary>
|
||||
<summary xml:lang="ja">電気回路図エディタ</summary>
|
||||
<content_rating type="oars-1.1"/>
|
||||
<releases>
|
||||
<release version="0.9-dev" date="2021-02-21"/>
|
||||
@@ -30,10 +31,22 @@
|
||||
QElectroTech is a Qt5 application to design electric diagrams.
|
||||
It uses XML files for elements and diagrams, and includes both a diagram editor, an element editor, and a titleblock editor.
|
||||
</p>
|
||||
<p xml:lang="be">
|
||||
QElectroTech is een Qt5 applicatie om elektrische schema's te ontwerpen.
|
||||
Het maakt gebruik van XML-bestanden voor elementen en diagrammen, en omvat zowel een diagram bewerker, een element bewerker, en ook een tielbloksjabloon bewerker.
|
||||
</p>
|
||||
<p xml:lang="ca">
|
||||
QElectroTech és una aplicació Qt5 per crear esquemes elèctrics.
|
||||
QET utilitza el format XML per als seus elements i esquemes i inclou un editor d'esquemes, un editor d'elements i un editor de caixetins.
|
||||
</p>
|
||||
<p xml:lang="cs">
|
||||
QElectroTech je aplikací Qt5 určenou pro návrh nákresů elektrických obvodů.
|
||||
Pro prvky a nákresy používá soubory XML, a zahrnuje v sobě jak editor nákresů, tak editor prvků.
|
||||
</p>
|
||||
<p xml:lang="da">
|
||||
QElectroTech er et Qt5 program til at redigere elektriske diagrammer.
|
||||
Det bruger XML filer for symboler og diagrammer og inkluderer diagram, symbol og titelblok redigering.
|
||||
</p>
|
||||
<p xml:lang="de">
|
||||
QElectroTech ist eine Qt5-Anwendung zum Entwerfen von Schaltplänen.
|
||||
Die Anwendung verwendet XML-Dateien zum Speichern von Projekten und Elementbibliotheken. Neben dem Schaltplaneditor enthält die Anwendung auch Elementeditoren und einen Blattvorlageneditor.
|
||||
@@ -54,9 +67,13 @@
|
||||
QElectroTech è una applicazione fatta in Qt5 per disegnare schemi elettrici.
|
||||
QET usa il formato XML per i suoi elementi e schemi, includendo anche un editor per gli stessi.
|
||||
</p>
|
||||
<p xml:lang="ru">
|
||||
QElectroTech - приложение написанное на Qt5 и предназначено для разработки электрических схем.
|
||||
Приложение использует для хранения проектов и библиотек элементов файлы в XML формате. Приложение помимо редактора электричесих схем, содержит также редакторы элементов и редактор шаблонов листов.
|
||||
<p xml:lang="ja">
|
||||
QElectroTech は電気回路図を作成する Qt5 アプリケーションです。
|
||||
QET は要素と回路図に XML 形式を利用し、回路図エディタ、要素エディタ、表題欄エディタを含みます。
|
||||
</p>
|
||||
<p xml:lang="nl">
|
||||
QElectroTech is een Qt5 applicatie om elektrische schema's te ontwerpen.
|
||||
Het maakt gebruik van XML-bestanden voor elementen en diagrammen, en omvat zowel een diagram bewerker, een element bewerker, en een bloksjabloon bewerker.
|
||||
</p>
|
||||
<p xml:lang="pl">
|
||||
QElectroTech to aplikacja napisana w Qt5, przeznaczona do tworzenia schematów elektrycznych.
|
||||
@@ -66,22 +83,10 @@
|
||||
QElectroTech é uma aplicação baseada em Qt5 para desenhar esquemas eléctricos.
|
||||
QET utiliza ficheiros XML para os elementos e para os esquemas e inclui um editor de esquemas e um editor de elementos.
|
||||
</p>
|
||||
<p xml:lang="nl">
|
||||
QElectroTech is een Qt5 applicatie om elektrische schema's te ontwerpen.
|
||||
Het maakt gebruik van XML-bestanden voor elementen en diagrammen, en omvat zowel een diagram bewerker, een element bewerker, en een bloksjabloon bewerker.
|
||||
</p>
|
||||
<p xml:lang="be">
|
||||
QElectroTech is een Qt5 applicatie om elektrische schema's te ontwerpen.
|
||||
Het maakt gebruik van XML-bestanden voor elementen en diagrammen, en omvat zowel een diagram bewerker, een element bewerker, en ook een tielbloksjabloon bewerker.
|
||||
</p>
|
||||
<p xml:lang="da">
|
||||
QElectroTech er et Qt5 program til at redigere elektriske diagrammer.
|
||||
Det bruger XML filer for symboler og diagrammer og inkluderer diagram, symbol og titelblok redigering.
|
||||
</p>
|
||||
<p xml:lang="ja">
|
||||
QElectroTech は電気回路図を作成する Qt5 アプリケーションです。
|
||||
QET は要素と回路図に XML 形式を利用し、回路図エディタ、要素エディタ、表題欄エディタを含みます。
|
||||
</p>
|
||||
<p xml:lang="ru">
|
||||
QElectroTech - приложение написанное на Qt5 и предназначено для разработки электрических схем.
|
||||
Приложение использует для хранения проектов и библиотек элементов файлы в XML формате. Приложение помимо редактора электричесих схем, содержит также редакторы элементов и редактор шаблонов листов.
|
||||
</p>
|
||||
</description>
|
||||
<url type="homepage">http://qelectrotech.org</url>
|
||||
<screenshots>
|
||||
|
||||
+63
-63
@@ -1,63 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/x-qet-project">
|
||||
<sub-class-of type="text/xml"/>
|
||||
<comment>QElectroTech project file</comment>
|
||||
<comment xml:lang="de">QElectroTech Projektdatei</comment>
|
||||
<comment xml:lang="fr">Fichier projet QElectroTech</comment>
|
||||
<comment xml:lang="ar">QElectrotech ملف مشروع</comment>
|
||||
<comment xml:lang="es">Fichero proyecto QElectroTech</comment>
|
||||
<comment xml:lang="ca">Fitxer projecte QElectroTech</comment>
|
||||
<comment xml:lang="ru">Файл проекта QElectroTech</comment>
|
||||
<comment xml:lang="pt">Ficheiro de projecto QElectroTech</comment>
|
||||
<comment xml:lang="cs">Soubor s projektem pro QElectroTech</comment>
|
||||
<comment xml:lang="pl">Plik projektu QElectrotech</comment>
|
||||
<comment xml:lang="it">File del progetto QElectroTech</comment>
|
||||
<comment xml:lang="el">Αρχείο έργου του QElectroTech</comment>
|
||||
<comment xml:lang="nl">QElectroTech project bestand</comment>
|
||||
<comment xml:lang="be">QElectroTech project bestand</comment>
|
||||
<comment xml:lang="da">QElectroTech projekt fil</comment>
|
||||
<comment xml:lang="ja">QElectroTech プロジェクト・ファイル</comment>
|
||||
<glob pattern="*.qet" />
|
||||
</mime-type>
|
||||
<mime-type type="application/x-qet-element">
|
||||
<sub-class-of type="text/xml"/>
|
||||
<comment>QElectroTech element file</comment>
|
||||
<comment xml:lang="de">QElectroTech Bauteildatei</comment>
|
||||
<comment xml:lang="fr">Fichier élément QElectroTech</comment>
|
||||
<comment xml:lang="ar">QElectrotech ملف مشروع</comment>
|
||||
<comment xml:lang="ru">Файл элемента QElectroTech</comment>
|
||||
<comment xml:lang="es">Fichero elemento QElectroTech</comment>
|
||||
<comment xml:lang="ca">Fitxer símbol QElectroTech</comment>
|
||||
<comment xml:lang="pt">Ficheiro de projecto QElectroTech</comment>
|
||||
<comment xml:lang="cs">Soubor s prvkem pro QElectroTech</comment>
|
||||
<comment xml:lang="pl">Plik elementu QElectroTech</comment>
|
||||
<comment xml:lang="it">File del progetto QElectroTech</comment>
|
||||
<comment xml:lang="el">Αρχείο στοιχείου του QElectroTech</comment>
|
||||
<comment xml:lang="nl">QElectroTech element bestand</comment>
|
||||
<comment xml:lang="be">QElectroTech element bestand</comment>
|
||||
<comment xml:lang="da">QElectroTech symbol fil</comment>
|
||||
<comment xml:lang="ja">QElectroTech 要素ファイル</comment>
|
||||
<glob pattern="*.elmt" />
|
||||
</mime-type>
|
||||
<mime-type type="application/x-qet-titleblock">
|
||||
<sub-class-of type="text/xml"/>
|
||||
<comment>QElectroTech title block template file</comment>
|
||||
<comment xml:lang="de">QElectroTech Schriftfeld Vorlagedatei</comment>
|
||||
<comment xml:lang="fr">Modèle de cartouche QElectroTech</comment>
|
||||
<comment xml:lang="ar">QElectrotech نموذج إطار تعريف</comment>
|
||||
<comment xml:lang="ru">Файл шаблона основной надписи листа QElectroTech</comment>
|
||||
<comment xml:lang="pl">Szablon tabliczki rysunkowej QElectroTech</comment>
|
||||
<comment xml:lang="es">Modelo de cartucho QElectroTech</comment>
|
||||
<comment xml:lang="ca">Model de bloc de títol QElectroTech</comment>
|
||||
<comment xml:lang="cs">Vzor záhlaví výkresu pro QElectroTech</comment>
|
||||
<comment xml:lang="pt">Modelo de moldura QElectroTech</comment>
|
||||
<comment xml:lang="it">Modello di cartiglio per QElectroTech</comment>
|
||||
<comment xml:lang="el">Πρότυπο πινακίδας του QElectroTech</comment>
|
||||
<comment xml:lang="nl">QElectroTech titel bloksjabloon</comment>
|
||||
<comment xml:lang="be">QElectroTech titel bloksjabloon</comment>
|
||||
<comment xml:lang="da">QElectroTech titelblok skabelon</comment>
|
||||
<comment xml:lang="ja">QElectroTech 表題欄テンプレート</comment>
|
||||
<glob pattern="*.titleblock" />
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/x-qet-project">
|
||||
<sub-class-of type="text/xml"/>
|
||||
<comment>QElectroTech project file</comment>
|
||||
<comment xml:lang="ar">QElectrotech ملف مشروع</comment>
|
||||
<comment xml:lang="be">QElectroTech project bestand</comment>
|
||||
<comment xml:lang="ca">Fitxer de projecte QElectroTech</comment>
|
||||
<comment xml:lang="cs">Soubor s projektem pro QElectroTech</comment>
|
||||
<comment xml:lang="da">QElectroTech projekt fil</comment>
|
||||
<comment xml:lang="de">QElectroTech Projektdatei</comment>
|
||||
<comment xml:lang="el">Αρχείο έργου του QElectroTech</comment>
|
||||
<comment xml:lang="es">Fichero proyecto QElectroTech</comment>
|
||||
<comment xml:lang="fr">Fichier projet QElectroTech</comment>
|
||||
<comment xml:lang="it">File del progetto QElectroTech</comment>
|
||||
<comment xml:lang="ja">QElectroTech プロジェクト・ファイル</comment>
|
||||
<comment xml:lang="nl">QElectroTech project bestand</comment>
|
||||
<comment xml:lang="pl">Plik projektu QElectrotech</comment>
|
||||
<comment xml:lang="pt">Ficheiro de projecto QElectroTech</comment>
|
||||
<comment xml:lang="ru">Файл проекта QElectroTech</comment>
|
||||
<glob pattern="*.qet" />
|
||||
</mime-type>
|
||||
<mime-type type="application/x-qet-element">
|
||||
<sub-class-of type="text/xml"/>
|
||||
<comment>QElectroTech element file</comment>
|
||||
<comment xml:lang="ar">QElectrotech ملف مشروع</comment>
|
||||
<comment xml:lang="be">QElectroTech element bestand</comment>
|
||||
<comment xml:lang="ca">Fitxer d'element QElectroTech</comment>
|
||||
<comment xml:lang="cs">Soubor s prvkem pro QElectroTech</comment>
|
||||
<comment xml:lang="da">QElectroTech symbol fil</comment>
|
||||
<comment xml:lang="de">QElectroTech Bauteildatei</comment>
|
||||
<comment xml:lang="el">Αρχείο στοιχείου του QElectroTech</comment>
|
||||
<comment xml:lang="es">Fichero elemento QElectroTech</comment>
|
||||
<comment xml:lang="fr">Fichier élément QElectroTech</comment>
|
||||
<comment xml:lang="it">File del progetto QElectroTech</comment>
|
||||
<comment xml:lang="ja">QElectroTech 要素ファイル</comment>
|
||||
<comment xml:lang="nl">QElectroTech element bestand</comment>
|
||||
<comment xml:lang="pl">Plik elementu QElectroTech</comment>
|
||||
<comment xml:lang="pt">Ficheiro de projecto QElectroTech</comment>
|
||||
<comment xml:lang="ru">Файл элемента QElectroTech</comment>
|
||||
<glob pattern="*.elmt" />
|
||||
</mime-type>
|
||||
<mime-type type="application/x-qet-titleblock">
|
||||
<sub-class-of type="text/xml"/>
|
||||
<comment>QElectroTech title block template file</comment>
|
||||
<comment xml:lang="ar">QElectrotech نموذج إطار تعريف</comment>
|
||||
<comment xml:lang="be">QElectroTech titel bloksjabloon</comment>
|
||||
<comment xml:lang="ca">Model de caixetí QElectroTech</comment>
|
||||
<comment xml:lang="cs">Vzor záhlaví výkresu pro QElectroTech</comment>
|
||||
<comment xml:lang="da">QElectroTech titelblok skabelon</comment>
|
||||
<comment xml:lang="de">QElectroTech Schriftfeld Vorlagedatei</comment>
|
||||
<comment xml:lang="el">Πρότυπο πινακίδας του QElectroTech</comment>
|
||||
<comment xml:lang="es">Modelo de cartucho QElectroTech</comment>
|
||||
<comment xml:lang="fr">Modèle de cartouche QElectroTech</comment>
|
||||
<comment xml:lang="it">Modello di cartiglio per QElectroTech</comment>
|
||||
<comment xml:lang="ja">QElectroTech 表題欄テンプレート</comment>
|
||||
<comment xml:lang="nl">QElectroTech titel bloksjabloon</comment>
|
||||
<comment xml:lang="pl">Szablon tabliczki rysunkowej QElectroTech</comment>
|
||||
<comment xml:lang="pt">Modelo de moldura QElectroTech</comment>
|
||||
<comment xml:lang="ru">Файл шаблона основной надписи листа QElectroTech</comment>
|
||||
<glob pattern="*.titleblock" />
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
|
||||
+4
-2
@@ -170,7 +170,8 @@ HEADERS += $$files(sources/*.h) \
|
||||
$$files(sources/TerminalStrip/GraphicsItem/properties/*.h) \
|
||||
$$files(sources/xml/*.h) \
|
||||
$$files(sources/dxf/*.h) \
|
||||
$$files(sources/qet_elementscaler/*.h)
|
||||
$$files(sources/qet_elementscaler/*.h) \
|
||||
$$files(sources/svg/*.h)
|
||||
|
||||
SOURCES += $$files(sources/*.cpp) \
|
||||
$$files(sources/editor/*.cpp) \
|
||||
@@ -213,7 +214,8 @@ SOURCES += $$files(sources/*.cpp) \
|
||||
$$files(sources/TerminalStrip/GraphicsItem/properties/*.cpp) \
|
||||
$$files(sources/xml/*.cpp) \
|
||||
$$files(sources/dxf/*.cpp) \
|
||||
$$files(sources/qet_elementscaler/*.cpp)
|
||||
$$files(sources/qet_elementscaler/*.cpp) \
|
||||
$$files(sources/svg/*.cpp)
|
||||
|
||||
# Needed for use promote QTreeWidget in terminalstripeditor.ui
|
||||
INCLUDEPATH += sources/TerminalStrip/ui
|
||||
|
||||
@@ -172,10 +172,12 @@ bool ElementsCollectionModel::dropMimeData(const QMimeData *data,
|
||||
const QModelIndex &parent)
|
||||
{
|
||||
Q_UNUSED(action)
|
||||
QStandardItem *qsi = itemFromIndex(
|
||||
parent.QModelIndex::model()->index(row, column));
|
||||
if (!qsi)
|
||||
qsi = itemFromIndex(parent);
|
||||
|
||||
const QAbstractItemModel* qaim = parent.QModelIndex::model();
|
||||
if (! qaim) return false;
|
||||
|
||||
QStandardItem* qsi = itemFromIndex(qaim->index(row, column));
|
||||
if (! qsi) qsi = itemFromIndex(parent);
|
||||
|
||||
if (qsi->type() == FileElementCollectionItem::Type)
|
||||
{
|
||||
|
||||
@@ -591,37 +591,32 @@ void ElementsCollectionWidget::resetShowThisDir()
|
||||
*/
|
||||
void ElementsCollectionWidget::dirProperties()
|
||||
{
|
||||
ElementCollectionItem *eci = elementCollectionItemForIndex(
|
||||
m_index_at_context_menu);
|
||||
//When the user right-clicks on the collection tree and
|
||||
//selects the collection property, the collection name,
|
||||
//file path and number of elements will be added
|
||||
//to the qInfo log file.
|
||||
qInfo() <<tr("Le dossier") <<(eci->localName())
|
||||
<<tr("contient")<<eci->elementsChild().size()
|
||||
<<tr("éléments") <<"\n"<< "Path:"
|
||||
<<(static_cast<FileElementCollectionItem*>(eci)->fileSystemPath());
|
||||
if (eci && eci->isDir()) {
|
||||
QString txt1 = tr("Le dossier %1 contient").arg(
|
||||
eci->localName());
|
||||
QString txt2 = tr("%n élément(s), répartie(s)",
|
||||
"",
|
||||
eci->elementsChild().size());
|
||||
QString txt3 = tr("dans %n dossier(s).",
|
||||
"" ,
|
||||
eci->directoriesChild().size());
|
||||
QString txt4 = tr("Chemin de la collection : %1").arg(
|
||||
eci->collectionPath());
|
||||
QString txt5;
|
||||
ElementCollectionItem* eci =
|
||||
elementCollectionItemForIndex(m_index_at_context_menu);
|
||||
|
||||
if (eci && eci->isDir())
|
||||
{
|
||||
QString filePath;
|
||||
if (eci->type() == FileElementCollectionItem::Type) {
|
||||
txt5 = tr("Chemin dans le système de fichiers : %1")
|
||||
.arg(static_cast<FileElementCollectionItem*>(eci)->fileSystemPath());
|
||||
filePath = tr("Chemin dans le système de fichiers : %1")
|
||||
.arg(
|
||||
static_cast<FileElementCollectionItem*>(eci)
|
||||
->fileSystemPath());
|
||||
}
|
||||
QString out =
|
||||
tr("Le dossier %1 contient").arg(eci->localName()) % " "
|
||||
% tr("%n élément(s), répartie(s)", "", eci->elementsChild().size())
|
||||
% " "
|
||||
% tr("dans %n dossier(s).", "", eci->directoriesChild().size())
|
||||
% "\n\n"
|
||||
% tr("Chemin de la collection : %1").arg(eci->collectionPath())
|
||||
% "\n" % filePath;
|
||||
qInfo() << out;
|
||||
QMessageBox::information(
|
||||
this,
|
||||
tr("Propriété du dossier %1").arg(eci->localName()),
|
||||
txt1 % " " % txt2 % " " % txt3 % "\n\n" % txt4 % "\n" % txt5);
|
||||
}
|
||||
out);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -82,7 +82,11 @@ void ElementsTreeView::startElementDrag(const ElementsLocation &location)
|
||||
{
|
||||
if (! location.exist()) return;
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 2, 0)
|
||||
QDrag* drag = new QDrag(this);
|
||||
#else
|
||||
QScopedPointer<QDrag> drag(new QDrag(this));
|
||||
#endif
|
||||
|
||||
QString location_str = location.toString();
|
||||
QMimeData *mime_data = new QMimeData();
|
||||
|
||||
@@ -174,11 +174,9 @@ void NamesList::fromXml(const pugi::xml_node &xml_element, const QHash<QString,
|
||||
/**
|
||||
Exports the list of names to an XML element.
|
||||
Make sure that the list of names is not empty before exporting.
|
||||
If list is empty, set name to "en" / "NoName"
|
||||
French:
|
||||
Exporte la liste des noms vers un element XML. Veillez a verifier que la
|
||||
liste de noms n'est pas vide avant de l'exporter.
|
||||
Si la liste est vide, le nom sera "en" / "NoName".
|
||||
@param xml_document Le document XML dans lequel l'element XML sera insere
|
||||
@param xml_options A set of options related to XML parsing.
|
||||
@return L'element XML correspondant a la section "names"
|
||||
@@ -192,7 +190,7 @@ QDomElement NamesList::toXml(QDomDocument &xml_document, const QHash<QString, QS
|
||||
qInfo() << " NamesList of element is empty - add default: [" << "en" << "] = " << "NoName" << "";
|
||||
QDomElement name_elmt = xml_document.createElement(xml_opt["TagName"]);
|
||||
name_elmt.setAttribute(xml_opt["LanguageAttribute"], "en");
|
||||
name_elmt.appendChild(xml_document.createTextNode("NoName"));
|
||||
name_elmt.appendChild(xml_document.createTextNode(" "));
|
||||
names_elmt.appendChild(name_elmt);
|
||||
} else {
|
||||
QMapIterator<QString, QString> names_iterator(map_names);
|
||||
|
||||
@@ -35,13 +35,14 @@ namespace TerminalStripDrawer
|
||||
const QUuid m_uuid;
|
||||
};
|
||||
|
||||
class DemoRealTerminal : public AbstractRealTerminalInterface
|
||||
{
|
||||
public:
|
||||
DemoRealTerminal(const QString &label, const QUuid &bridge) :
|
||||
class DemoRealTerminal : public AbstractRealTerminalInterface
|
||||
{
|
||||
public:
|
||||
DemoRealTerminal(const QString &label, const QString &xref, const QUuid &bridge) :
|
||||
m_label { label },
|
||||
m_xref{ xref },
|
||||
m_bridge { bridge }
|
||||
{}
|
||||
{}
|
||||
|
||||
QString label() const override {
|
||||
return m_label;
|
||||
@@ -55,10 +56,14 @@ namespace TerminalStripDrawer
|
||||
return new DemoBridge { m_bridge };
|
||||
}
|
||||
|
||||
private:
|
||||
QString m_label;
|
||||
QUuid m_bridge;
|
||||
};
|
||||
QString xref() const override {
|
||||
return m_xref;
|
||||
}
|
||||
|
||||
private:
|
||||
QString m_label, m_xref;
|
||||
QUuid m_bridge;
|
||||
};
|
||||
|
||||
class DemoPhysicalTerminal : public AbstractPhysicalTerminalInterface
|
||||
{
|
||||
@@ -102,51 +107,63 @@ namespace TerminalStripDrawer
|
||||
QVector <QSharedPointer<AbstractRealTerminalInterface>> real_terminals_vector;
|
||||
|
||||
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
|
||||
new DemoRealTerminal( QStringLiteral("24vdc"),
|
||||
lvl_1)};
|
||||
new DemoRealTerminal( QStringLiteral("24vdc"),
|
||||
QStringLiteral("1_A1"),
|
||||
lvl_1)};
|
||||
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
|
||||
new DemoRealTerminal( QStringLiteral("0vdc"),
|
||||
lvl_2)};
|
||||
new DemoRealTerminal( QStringLiteral("0vdc"),
|
||||
QStringLiteral("1_A2"),
|
||||
lvl_2)};
|
||||
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
|
||||
new DemoRealTerminal( QStringLiteral("signal"),
|
||||
lvl_3)};
|
||||
new DemoRealTerminal( QStringLiteral("signal"),
|
||||
QStringLiteral("1_A3"),
|
||||
lvl_3)};
|
||||
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
|
||||
new DemoRealTerminal( QStringLiteral("teach"),
|
||||
lvl_4)};
|
||||
new DemoRealTerminal( QStringLiteral("teach"),
|
||||
QStringLiteral("1_A4"),
|
||||
lvl_4)};
|
||||
m_physical_terminal << QSharedPointer<AbstractPhysicalTerminalInterface> {
|
||||
new DemoPhysicalTerminal {real_terminals_vector}};
|
||||
new DemoPhysicalTerminal {real_terminals_vector}};
|
||||
|
||||
real_terminals_vector.clear();
|
||||
real_terminals_vector.clear();
|
||||
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
|
||||
new DemoRealTerminal( QStringLiteral("24vdc"),
|
||||
lvl_1)};
|
||||
new DemoRealTerminal( QStringLiteral("24vdc"),
|
||||
QStringLiteral("2_A1"),
|
||||
lvl_1)};
|
||||
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
|
||||
new DemoRealTerminal( QStringLiteral("0vdc"),
|
||||
lvl_2)};
|
||||
new DemoRealTerminal( QStringLiteral("0vdc"),
|
||||
QStringLiteral("2_A2"),
|
||||
lvl_2)};
|
||||
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
|
||||
new DemoRealTerminal( QStringLiteral("signal"),
|
||||
lvl_3)};
|
||||
new DemoRealTerminal( QStringLiteral("signal"),
|
||||
QStringLiteral("2_A3"),
|
||||
lvl_3)};
|
||||
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
|
||||
new DemoRealTerminal( QStringLiteral("teach"),
|
||||
lvl_4)};
|
||||
new DemoRealTerminal( QStringLiteral("teach"),
|
||||
QStringLiteral("2_A4"),
|
||||
lvl_4)};
|
||||
m_physical_terminal << QSharedPointer<AbstractPhysicalTerminalInterface> {
|
||||
new DemoPhysicalTerminal {real_terminals_vector}};
|
||||
new DemoPhysicalTerminal {real_terminals_vector}};
|
||||
|
||||
real_terminals_vector.clear();
|
||||
|
||||
real_terminals_vector.clear();
|
||||
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
|
||||
new DemoRealTerminal( QStringLiteral("24vdc"),
|
||||
lvl_1)};
|
||||
new DemoRealTerminal( QStringLiteral("24vdc"),
|
||||
QStringLiteral("3_A1"),
|
||||
lvl_1)};
|
||||
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
|
||||
new DemoRealTerminal( QStringLiteral("0vdc"),
|
||||
lvl_2)};
|
||||
new DemoRealTerminal( QStringLiteral("0vdc"),
|
||||
QStringLiteral("3_A2"),
|
||||
lvl_2)};
|
||||
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
|
||||
new DemoRealTerminal( QStringLiteral("signal"),
|
||||
lvl_3)};
|
||||
new DemoRealTerminal( QStringLiteral("signal"),
|
||||
QStringLiteral("3_A3"),
|
||||
lvl_3)};
|
||||
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
|
||||
new DemoRealTerminal( QStringLiteral("teach"),
|
||||
lvl_4)};
|
||||
new DemoRealTerminal( QStringLiteral("teach"),
|
||||
QStringLiteral("3_A4"),
|
||||
lvl_4)};
|
||||
m_physical_terminal << QSharedPointer<AbstractPhysicalTerminalInterface> {
|
||||
new DemoPhysicalTerminal {real_terminals_vector}};
|
||||
}
|
||||
|
||||
new DemoPhysicalTerminal {real_terminals_vector}};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2022 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -16,16 +16,24 @@
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "terminalstriplayoutpattern.h"
|
||||
#include <QDebug>
|
||||
#include "../../../utils/qetutils.h"
|
||||
|
||||
TerminalStripLayoutPattern::TerminalStripLayoutPattern()
|
||||
{
|
||||
m_font.setPixelSize(15);
|
||||
updateHeaderTextOption();
|
||||
updateTerminalsTextOption();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TerminalStripLayoutPattern::setHeaderTextAlignment
|
||||
* Set text alignment to @param alignment. If alignment have no
|
||||
* flag this function do nothing
|
||||
* @param alignment
|
||||
*/
|
||||
void TerminalStripLayoutPattern::setHeaderTextAlignment(const Qt::Alignment &alignment)
|
||||
{
|
||||
if (!alignment) return;
|
||||
m_header_text_alignment = alignment;
|
||||
updateHeaderTextOption();
|
||||
}
|
||||
@@ -39,22 +47,61 @@ QTextOption TerminalStripLayoutPattern::headerTextOption() const {
|
||||
return m_header_text_option;
|
||||
}
|
||||
|
||||
void TerminalStripLayoutPattern::setTerminalsTextAlignment(const QVector<Qt::Alignment> &alignment)
|
||||
QFont TerminalStripLayoutPattern::font() const {
|
||||
return m_font;
|
||||
}
|
||||
|
||||
void TerminalStripLayoutPattern::setFont(const QFont &font) {
|
||||
m_font = font;
|
||||
QETUtils::pixelSizedFont(m_font);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TerminalStripLayoutPattern::setTerminalsTextAlignment
|
||||
* Set text alignment to @param alignment. If alignment have no
|
||||
* flag this function do nothing
|
||||
* @param alignment
|
||||
*/
|
||||
void TerminalStripLayoutPattern::setTerminalsTextAlignment(const Qt::Alignment &alignment)
|
||||
{
|
||||
if (!alignment) return;
|
||||
m_terminals_text_alignment = alignment;
|
||||
updateTerminalsTextOption();
|
||||
}
|
||||
|
||||
QVector<Qt::Alignment> TerminalStripLayoutPattern::terminalsTextAlignment() const
|
||||
Qt::Alignment TerminalStripLayoutPattern::terminalsTextAlignment() const
|
||||
{
|
||||
return m_terminals_text_alignment;
|
||||
}
|
||||
|
||||
QVector<QTextOption> TerminalStripLayoutPattern::terminalsTextOption() const
|
||||
QTextOption TerminalStripLayoutPattern::terminalsTextOption() const
|
||||
{
|
||||
return m_terminals_text_option;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TerminalStripLayoutPattern::setXrefTextAlignment
|
||||
* Set text alignment to @param alignment. If alignment have no
|
||||
* flag this function do nothing
|
||||
* @param alignment
|
||||
*/
|
||||
void TerminalStripLayoutPattern::setXrefTextAlignment(const Qt::Alignment &alignment)
|
||||
{
|
||||
if (!alignment) return;
|
||||
m_xref_text_alignment = alignment;
|
||||
updateTerminalsTextOption();
|
||||
}
|
||||
|
||||
Qt::Alignment TerminalStripLayoutPattern::xrefTextAlignment() const
|
||||
{
|
||||
return m_xref_text_alignment;
|
||||
}
|
||||
|
||||
QTextOption TerminalStripLayoutPattern::xrefTextOption() const
|
||||
{
|
||||
return m_xref_text_option;
|
||||
}
|
||||
|
||||
void TerminalStripLayoutPattern::updateHeaderTextOption()
|
||||
{
|
||||
m_header_text_option.setAlignment(m_header_text_alignment);
|
||||
@@ -63,16 +110,9 @@ void TerminalStripLayoutPattern::updateHeaderTextOption()
|
||||
|
||||
void TerminalStripLayoutPattern::updateTerminalsTextOption()
|
||||
{
|
||||
if (m_terminals_text_option.size() ==
|
||||
m_terminals_text_alignment.size())
|
||||
{
|
||||
for (auto i = 0 ; i<m_terminals_text_option.size() ; ++i)
|
||||
{
|
||||
m_terminals_text_option[i].setAlignment(m_terminals_text_alignment.at(i));
|
||||
m_terminals_text_option[i].setWrapMode(QTextOption::WordWrap);
|
||||
}
|
||||
}
|
||||
else {
|
||||
qDebug() << "TerminalStripLayoutPattern::updateTerminalsTextOption() : Wrong vector size";
|
||||
}
|
||||
m_terminals_text_option.setAlignment(m_terminals_text_alignment);
|
||||
m_terminals_text_option.setWrapMode(QTextOption::WordWrap);
|
||||
|
||||
m_xref_text_option.setAlignment(m_xref_text_alignment);
|
||||
m_xref_text_option.setWrapMode(QTextOption::WordWrap);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2022 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -18,6 +18,7 @@
|
||||
#ifndef TERMINALSTRIPLAYOUTPATTERN_H
|
||||
#define TERMINALSTRIPLAYOUTPATTERN_H
|
||||
|
||||
#include <QFont>
|
||||
#include <QRect>
|
||||
#include <QSize>
|
||||
#include <QTextOption>
|
||||
@@ -43,45 +44,46 @@ class TerminalStripLayoutPattern
|
||||
TerminalStripLayoutPattern();
|
||||
|
||||
//Header of terminal strip
|
||||
QRect m_header_rect{0,30,50,130};
|
||||
QRectF m_header_rect{0,30,50,130};
|
||||
Qt::Orientation m_header_text_orientation{Qt::Horizontal};
|
||||
void setHeaderTextAlignment(const Qt::Alignment &alignment);
|
||||
Qt::Alignment headerTextAlignment() const;
|
||||
QTextOption headerTextOption() const;
|
||||
|
||||
//Spacer between the header and the terminals
|
||||
QRect m_spacer_rect{0, 50, 10, 90};
|
||||
QRectF m_spacer_rect{0, 50, 10, 90};
|
||||
|
||||
//Font
|
||||
QFont font() const;
|
||||
void setFont (const QFont &font);
|
||||
|
||||
//Terminals
|
||||
QVector<QRect> m_terminal_rect
|
||||
QVector<QRectF> m_terminal_rect
|
||||
{
|
||||
QRect{0, 0, 20, 190},
|
||||
QRect{0, 10, 20, 170},
|
||||
QRect{0, 20, 20, 150},
|
||||
QRect{0, 30, 20, 130}
|
||||
QRectF{0, 0, 20, 190},
|
||||
QRectF{0, 10, 20, 170},
|
||||
QRectF{0, 20, 20, 150},
|
||||
QRectF{0, 30, 20, 130}
|
||||
};
|
||||
|
||||
void setTerminalsTextAlignment(const QVector<Qt::Alignment> &alignment);
|
||||
QVector<Qt::Alignment> terminalsTextAlignment() const;
|
||||
QVector<QTextOption> terminalsTextOption() const;
|
||||
//Terminal text
|
||||
void setTerminalsTextAlignment(const Qt::Alignment &alignment);
|
||||
Qt::Alignment terminalsTextAlignment() const;
|
||||
QTextOption terminalsTextOption() const;
|
||||
qreal m_terminals_text_height{50};
|
||||
qreal m_terminals_text_y{35};
|
||||
Qt::Orientation m_terminals_text_orientation {Qt::Vertical};
|
||||
|
||||
QVector<QRect> m_terminals_text_rect
|
||||
{
|
||||
QRect{0,35,20,50},
|
||||
QRect{0,35,20,50},
|
||||
QRect{0,35,20,50},
|
||||
QRect{0,35,20,50}
|
||||
};
|
||||
QVector<Qt::Orientation> m_terminals_text_orientation
|
||||
{
|
||||
Qt::Vertical,
|
||||
Qt::Vertical,
|
||||
Qt::Vertical,
|
||||
Qt::Vertical
|
||||
};
|
||||
//Xref text
|
||||
void setXrefTextAlignment(const Qt::Alignment &alignment);
|
||||
Qt::Alignment xrefTextAlignment() const;
|
||||
QTextOption xrefTextOption() const;
|
||||
qreal m_xref_text_height{60};
|
||||
qreal m_xref_text_y{95};
|
||||
Qt::Orientation m_xref_text_orientation {Qt::Vertical};
|
||||
|
||||
int m_bridge_point_d{5};
|
||||
QVector<int> m_bridge_point_y_offset{50,70,90,110};
|
||||
qreal m_bridge_point_d{5};
|
||||
QVector<qreal> m_bridge_point_y_offset{50,70,90,110};
|
||||
|
||||
QUuid m_uuid{QUuid::createUuid()};
|
||||
QString m_name;
|
||||
@@ -90,24 +92,17 @@ class TerminalStripLayoutPattern
|
||||
void updateHeaderTextOption();
|
||||
void updateTerminalsTextOption();
|
||||
|
||||
private:
|
||||
private:
|
||||
QFont m_font;
|
||||
Qt::Alignment m_header_text_alignment{Qt::AlignCenter};
|
||||
QTextOption m_header_text_option;
|
||||
|
||||
QVector<Qt::Alignment> m_terminals_text_alignment
|
||||
{
|
||||
Qt::AlignRight | Qt::AlignVCenter,
|
||||
Qt::AlignRight | Qt::AlignVCenter,
|
||||
Qt::AlignRight | Qt::AlignVCenter,
|
||||
Qt::AlignRight | Qt::AlignVCenter
|
||||
};
|
||||
QVector<QTextOption> m_terminals_text_option
|
||||
{
|
||||
QTextOption(),
|
||||
QTextOption(),
|
||||
QTextOption(),
|
||||
QTextOption()
|
||||
};
|
||||
Qt::Alignment
|
||||
m_terminals_text_alignment {Qt::AlignRight | Qt::AlignVCenter},
|
||||
m_xref_text_alignment {Qt::AlignLeft | Qt::AlignVCenter};
|
||||
QTextOption
|
||||
m_terminals_text_option{QTextOption()},
|
||||
m_xref_text_option{QTextOption()};
|
||||
};
|
||||
|
||||
#endif // TERMINALSTRIPLAYOUTPATTERN_H
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "terminalstripdrawer.h"
|
||||
|
||||
#include <QPainter>
|
||||
|
||||
namespace TerminalStripDrawer {
|
||||
@@ -42,12 +43,13 @@ void TerminalStripDrawer::setStrip(QSharedPointer<AbstractTerminalStripInterface
|
||||
*/
|
||||
void TerminalStripDrawer::paint(QPainter *painter)
|
||||
{
|
||||
if (m_strip && m_pattern)
|
||||
{
|
||||
//To draw text, QPainter need a Qrect. Instead of create an instance
|
||||
//for each text, we re-use the same instance of QRect.
|
||||
QRect text_rect;
|
||||
painter->save();
|
||||
if (m_strip && m_pattern)
|
||||
{
|
||||
m_united_xref_text_rect = QRectF();
|
||||
//To draw text, QPainter need a Qrect. Instead of create an instance
|
||||
//for each text, we re-use the same instance of QRect.
|
||||
QRect text_rect;
|
||||
painter->save();
|
||||
|
||||
auto pen_{painter->pen()};
|
||||
pen_.setColor(Qt::black);
|
||||
@@ -56,16 +58,20 @@ void TerminalStripDrawer::paint(QPainter *painter)
|
||||
auto brush_ = painter->brush();
|
||||
brush_.setColor(Qt::white);
|
||||
|
||||
painter->setPen(pen_);
|
||||
painter->setBrush(brush_);
|
||||
painter->setFont(m_pattern->font());
|
||||
|
||||
if (m_preview_draw)
|
||||
{
|
||||
painter->save();
|
||||
painter->setPen(Qt::blue);
|
||||
painter->drawRect(boundingRect());
|
||||
painter->restore();
|
||||
}
|
||||
painter->setPen(pen_);
|
||||
painter->setBrush(brush_);
|
||||
|
||||
if (m_preview_draw)
|
||||
{
|
||||
painter->save();
|
||||
painter->setPen(Qt::blue);
|
||||
painter->drawRect(boundingRect());
|
||||
painter->drawLine(QPointF{boundingRect().left(), boundingRect().center().y()},
|
||||
QPointF{boundingRect().right(), boundingRect().center().y()});
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
//Draw header
|
||||
painter->drawRect(m_pattern->m_header_rect);
|
||||
@@ -84,14 +90,13 @@ void TerminalStripDrawer::paint(QPainter *painter)
|
||||
text_rect.setRect(0,0,m_pattern->m_header_rect.height(),m_pattern->m_header_rect.width());
|
||||
}
|
||||
|
||||
const auto text_{m_strip->installation() + " " + m_strip->location() + " " + m_strip->name()};
|
||||
painter->drawText(text_rect, text_, m_pattern->headerTextOption());
|
||||
const auto text_{m_strip->installation() + " " + m_strip->location() + " " + m_strip->name()};
|
||||
painter->drawText(text_rect, text_, m_pattern->headerTextOption());
|
||||
painter->restore();
|
||||
|
||||
//Move painter pos to next drawing
|
||||
painter->translate(m_pattern->m_header_rect.width(),0);
|
||||
|
||||
int x_offset{m_pattern->m_header_rect.width()};
|
||||
//Move painter pos to next drawing
|
||||
painter->translate(m_pattern->m_header_rect.width(),0);
|
||||
qreal x_offset{m_pattern->m_header_rect.width()};
|
||||
|
||||
//Draw spacer
|
||||
painter->drawRect(m_pattern->m_spacer_rect);
|
||||
@@ -99,22 +104,30 @@ void TerminalStripDrawer::paint(QPainter *painter)
|
||||
painter->translate(m_pattern->m_spacer_rect.width(),0);
|
||||
x_offset += m_pattern->m_spacer_rect.width();
|
||||
|
||||
//Draw terminals
|
||||
const auto terminals_text_orientation{m_pattern->m_terminals_text_orientation};
|
||||
const auto terminals_text_option{m_pattern->terminalsTextOption()};
|
||||
const auto terminals_text_height{m_pattern->m_terminals_text_height};
|
||||
const auto terminals_text_y{m_pattern->m_terminals_text_y};
|
||||
QRectF terminal_rect;
|
||||
|
||||
//Draw terminals
|
||||
const auto terminals_text_rect{m_pattern->m_terminals_text_rect};
|
||||
const auto terminals_text_orientation{m_pattern->m_terminals_text_orientation};
|
||||
const auto terminals_text_option{m_pattern->terminalsTextOption()};
|
||||
QRect terminal_rect;
|
||||
const auto xref_text_orientation{m_pattern->m_xref_text_orientation};
|
||||
const auto xref_text_option{m_pattern->xrefTextOption()};
|
||||
const auto xref_text_height{m_pattern->m_xref_text_height};
|
||||
const auto xref_text_y{m_pattern->m_xref_text_y};
|
||||
QRectF xref_rect;
|
||||
|
||||
QHash<QUuid, QVector<QPointF>> bridges_anchor_points;
|
||||
|
||||
//Loop over physical terminals
|
||||
for (const auto &physical_t : m_strip->physicalTerminal())
|
||||
{
|
||||
//Get the good offset according to how many level have the current physical terminal
|
||||
const QVector<QSharedPointer<AbstractRealTerminalInterface>> real_terminal_vector{physical_t->realTerminals()};
|
||||
const auto real_t_count{real_terminal_vector.size()};
|
||||
const auto offset_{4 - real_t_count};
|
||||
m_hovered_xref = hoverTerminal{};
|
||||
int physical_index = 0;
|
||||
//Loop over physical terminals
|
||||
for (const auto &physical_t : m_strip->physicalTerminal())
|
||||
{
|
||||
//Get the good offset according to how many level have the current physical terminal
|
||||
const QVector<QSharedPointer<AbstractRealTerminalInterface>> real_terminal_vector{physical_t->realTerminals()};
|
||||
const auto real_t_count{real_terminal_vector.size()};
|
||||
const auto offset_{4 - real_t_count};
|
||||
|
||||
//Loop over real terminals
|
||||
for (auto i=0 ; i<real_t_count ; ++i)
|
||||
@@ -124,45 +137,50 @@ void TerminalStripDrawer::paint(QPainter *painter)
|
||||
break;
|
||||
}
|
||||
|
||||
terminal_rect = m_pattern->m_terminal_rect[index_];
|
||||
//Draw terminal rect
|
||||
painter->drawRect(terminal_rect);
|
||||
//Draw a stronger line if the current terminal have level
|
||||
//and the current level is the first
|
||||
if (real_t_count > 1 && i == 0)
|
||||
{
|
||||
painter->save();
|
||||
pen_ = painter->pen();
|
||||
pen_.setWidth(4);
|
||||
pen_.setCapStyle(Qt::FlatCap);
|
||||
painter->setPen(pen_);
|
||||
const auto p1 { terminal_rect.topLeft() };
|
||||
//We can't use terminal_rect.bottomLeft for p2 because
|
||||
//the returned value deviate from the true value
|
||||
//(see Qt documentation about QRect)
|
||||
const QPoint p2 { p1.x(), p1.y() + terminal_rect.height() };
|
||||
painter->drawLine(p1, p2);
|
||||
painter->restore();
|
||||
terminal_rect = m_pattern->m_terminal_rect[index_];
|
||||
//Draw terminal rect
|
||||
painter->drawRect(terminal_rect);
|
||||
//Draw a stronger line if the current terminal have level
|
||||
//and the current level is the first
|
||||
if (real_t_count > 1 && i == 0)
|
||||
{
|
||||
painter->save();
|
||||
pen_ = painter->pen();
|
||||
pen_.setWidth(4);
|
||||
pen_.setCapStyle(Qt::FlatCap);
|
||||
painter->setPen(pen_);
|
||||
const auto p1 { terminal_rect.topLeft() };
|
||||
//We can't use terminal_rect.bottomLeft for p2 because
|
||||
//the returned value deviate from the true value
|
||||
//(see Qt documentation about QRect)
|
||||
const QPointF p2 { p1.x(), p1.y() + terminal_rect.height() };
|
||||
painter->drawLine(p1, p2);
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
if(m_preview_draw)
|
||||
{
|
||||
painter->save();
|
||||
painter->setPen(Qt::yellow);
|
||||
painter->drawLine(QPointF{terminal_rect.x(), terminal_rect.y() + terminal_rect.height()/2},
|
||||
QPointF{terminal_rect.width(), terminal_rect.y() + terminal_rect.height()/2});
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
//Draw text
|
||||
painter->save();
|
||||
if (terminals_text_orientation[index_] == Qt::Horizontal)
|
||||
{
|
||||
text_rect = terminals_text_rect[index_];
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto rect_{terminals_text_rect[index_]};
|
||||
painter->translate(rect_.bottomLeft());
|
||||
painter->rotate(270);
|
||||
text_rect.setRect(0, 0, rect_.height(), terminal_rect.width());
|
||||
}
|
||||
//Draw text
|
||||
painter->save();
|
||||
text_rect.setRect(0, terminals_text_y, terminal_rect.width(), terminals_text_height);
|
||||
if (terminals_text_orientation == Qt::Vertical)
|
||||
{
|
||||
painter->translate(text_rect.bottomLeft());
|
||||
painter->rotate(270);
|
||||
text_rect.setRect(0, 0, text_rect.height(), text_rect.width());
|
||||
}
|
||||
|
||||
const auto shared_real_terminal{real_terminal_vector[i]};
|
||||
const auto shared_real_terminal{real_terminal_vector[i]};
|
||||
painter->drawText(text_rect,
|
||||
shared_real_terminal ? shared_real_terminal->label() : QLatin1String(),
|
||||
terminals_text_option[index_]);
|
||||
terminals_text_option);
|
||||
|
||||
if (m_preview_draw)
|
||||
{
|
||||
@@ -172,16 +190,60 @@ void TerminalStripDrawer::paint(QPainter *painter)
|
||||
|
||||
painter->restore();
|
||||
|
||||
//Add bridge anchor
|
||||
if (shared_real_terminal->isBridged())
|
||||
//Draw xref
|
||||
xref_rect.setRect(0, xref_text_y, terminal_rect.width(), xref_text_height);
|
||||
painter->save();
|
||||
if (xref_text_orientation == Qt::Vertical)
|
||||
{
|
||||
painter->save();
|
||||
if (QScopedPointer<AbstractBridgeInterface> bridge_ {
|
||||
shared_real_terminal->bridge() })
|
||||
{
|
||||
const auto x_anchor{terminal_rect.width()/2};
|
||||
const auto y_anchor {m_pattern->m_bridge_point_y_offset[index_]};
|
||||
const auto radius_anchor{m_pattern->m_bridge_point_d/2};
|
||||
painter->translate(xref_rect.bottomLeft());
|
||||
painter->rotate(270);
|
||||
xref_rect.setRect(0, 0, xref_rect.height(), xref_rect.width());
|
||||
}
|
||||
|
||||
QTransform transform;
|
||||
transform.translate(x_offset, 0);
|
||||
|
||||
if (xref_text_orientation == Qt::Vertical)
|
||||
{
|
||||
transform.translate(0, xref_text_y + xref_text_height);
|
||||
transform.rotate(270);
|
||||
}
|
||||
|
||||
auto xref_string = shared_real_terminal->xref();
|
||||
|
||||
const auto mapped_xref_text_rect = transform.mapRect(painter->boundingRect(xref_rect, xref_string, xref_text_option));
|
||||
if (m_united_xref_text_rect.isNull()) {
|
||||
m_united_xref_text_rect = mapped_xref_text_rect;
|
||||
} else {
|
||||
m_united_xref_text_rect = m_united_xref_text_rect.united(mapped_xref_text_rect);
|
||||
}
|
||||
|
||||
//if mouse hover the xref text, draw it in blue to advise user the xref is clickable.
|
||||
if (!m_mouse_hover_pos.isNull() && mapped_xref_text_rect.contains(m_mouse_hover_pos)) {
|
||||
painter->setPen(Qt::blue);
|
||||
m_hovered_xref.physical = physical_index;
|
||||
m_hovered_xref.real = i;
|
||||
}
|
||||
|
||||
painter->drawText(xref_rect, xref_string, xref_text_option);
|
||||
|
||||
if (m_preview_draw)
|
||||
{
|
||||
painter->setPen(Qt::blue);
|
||||
painter->drawRect(xref_rect);
|
||||
}
|
||||
painter->restore();
|
||||
|
||||
//Add bridge anchor
|
||||
if (shared_real_terminal->isBridged())
|
||||
{
|
||||
painter->save();
|
||||
if (QScopedPointer<AbstractBridgeInterface> bridge_ {
|
||||
shared_real_terminal->bridge() })
|
||||
{
|
||||
const auto x_anchor{terminal_rect.width()/2};
|
||||
const auto y_anchor {m_pattern->m_bridge_point_y_offset[index_]};
|
||||
const auto radius_anchor{m_pattern->m_bridge_point_d/2};
|
||||
|
||||
painter->setBrush(Qt::SolidPattern);
|
||||
painter->drawEllipse(QPointF(x_anchor, y_anchor),
|
||||
@@ -194,12 +256,13 @@ void TerminalStripDrawer::paint(QPainter *painter)
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
//Move painter pos to next drawing
|
||||
painter->translate(terminal_rect.width(),0);
|
||||
x_offset += terminal_rect.width();
|
||||
}
|
||||
}
|
||||
painter->restore();
|
||||
//Move painter pos to next drawing
|
||||
painter->translate(terminal_rect.width(),0);
|
||||
x_offset += terminal_rect.width();
|
||||
}
|
||||
physical_index++;
|
||||
}
|
||||
painter->restore();
|
||||
|
||||
//Draw the bridges
|
||||
for (const auto &points_ : qAsConst(bridges_anchor_points))
|
||||
@@ -216,7 +279,7 @@ void TerminalStripDrawer::paint(QPainter *painter)
|
||||
|
||||
QRectF TerminalStripDrawer::boundingRect() const
|
||||
{
|
||||
return QRect{0, 0, width(), height()};;
|
||||
return QRectF{0, 0, width(), height()};;
|
||||
}
|
||||
|
||||
void TerminalStripDrawer::setLayout(QSharedPointer<TerminalStripLayoutPattern> layout)
|
||||
@@ -233,7 +296,42 @@ void TerminalStripDrawer::setPreviewDraw(bool draw) {
|
||||
m_preview_draw = draw;
|
||||
}
|
||||
|
||||
int TerminalStripDrawer::height() const
|
||||
void TerminalStripDrawer::setMouseHoverPos(const QPointF &pos)
|
||||
{
|
||||
m_last_mouse_pos_in_xrefs_rect = m_united_xref_text_rect.contains(m_mouse_hover_pos);
|
||||
m_mouse_hover_pos = pos;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TerminalStripDrawer::mouseHoverXref
|
||||
* @return True if the mouse position (given through the function setMouseHoverPos)
|
||||
* hover the rect of a xref.
|
||||
*/
|
||||
bool TerminalStripDrawer::mouseHoverXref() const {
|
||||
return m_united_xref_text_rect.contains(m_mouse_hover_pos);
|
||||
}
|
||||
|
||||
bool TerminalStripDrawer::needUpdate()
|
||||
{
|
||||
if (mouseHoverXref()) {
|
||||
return true;
|
||||
} else if (m_last_mouse_pos_in_xrefs_rect) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TerminalStripDrawer::hoveredXref
|
||||
* @return the current terminal hovered by the mouse
|
||||
* in the xref bounding rectangle
|
||||
*/
|
||||
hoverTerminal TerminalStripDrawer::hoveredXref() const
|
||||
{
|
||||
return m_hovered_xref;
|
||||
}
|
||||
|
||||
qreal TerminalStripDrawer::height() const
|
||||
{
|
||||
if (m_pattern)
|
||||
{
|
||||
@@ -251,11 +349,11 @@ int TerminalStripDrawer::height() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
int TerminalStripDrawer::width() const
|
||||
qreal TerminalStripDrawer::width() const
|
||||
{
|
||||
if (m_pattern)
|
||||
{
|
||||
int width_{m_pattern->m_header_rect.width() + m_pattern->m_spacer_rect.width()};
|
||||
if (m_pattern)
|
||||
{
|
||||
qreal width_{m_pattern->m_header_rect.width() + m_pattern->m_spacer_rect.width()};
|
||||
|
||||
if (m_strip)
|
||||
{
|
||||
|
||||
@@ -27,23 +27,35 @@ class TerminalStrip;
|
||||
|
||||
namespace TerminalStripDrawer
|
||||
{
|
||||
class AbstractBridgeInterface
|
||||
{
|
||||
public:
|
||||
AbstractBridgeInterface() {}
|
||||
virtual ~AbstractBridgeInterface() {}
|
||||
virtual QUuid uuid() const = 0;
|
||||
/**
|
||||
* @brief The hoverTerminal struct
|
||||
* Just a little struct use to know what is the physical and real terminal
|
||||
* when the mouse hover the Xref string of a terminal.
|
||||
* If mouse don't hover a Xref the value is set to -1;
|
||||
*/
|
||||
struct hoverTerminal{
|
||||
int physical{-1};
|
||||
int real{-1};
|
||||
};
|
||||
|
||||
class AbstractRealTerminalInterface
|
||||
{
|
||||
public:
|
||||
AbstractRealTerminalInterface() {}
|
||||
virtual ~AbstractRealTerminalInterface() {}
|
||||
virtual QString label() const = 0;
|
||||
virtual bool isBridged() const = 0;
|
||||
virtual AbstractBridgeInterface* bridge() const = 0;
|
||||
};
|
||||
class AbstractBridgeInterface
|
||||
{
|
||||
public:
|
||||
AbstractBridgeInterface() {}
|
||||
virtual ~AbstractBridgeInterface() {}
|
||||
virtual QUuid uuid() const = 0;
|
||||
};
|
||||
|
||||
class AbstractRealTerminalInterface
|
||||
{
|
||||
public:
|
||||
AbstractRealTerminalInterface() {}
|
||||
virtual ~AbstractRealTerminalInterface() {}
|
||||
virtual QString label() const = 0;
|
||||
virtual bool isBridged() const = 0;
|
||||
virtual AbstractBridgeInterface* bridge() const = 0;
|
||||
virtual QString xref() const = 0;
|
||||
};
|
||||
|
||||
class AbstractPhysicalTerminalInterface
|
||||
{
|
||||
@@ -79,15 +91,24 @@ namespace TerminalStripDrawer
|
||||
|
||||
void setPreviewDraw(bool draw = true);
|
||||
|
||||
private:
|
||||
int height() const;
|
||||
int width() const;
|
||||
void setMouseHoverPos(const QPointF &pos);
|
||||
bool mouseHoverXref() const;
|
||||
bool needUpdate();
|
||||
hoverTerminal hoveredXref() const;
|
||||
|
||||
private:
|
||||
QSharedPointer <AbstractTerminalStripInterface> m_strip;
|
||||
QSharedPointer<TerminalStripLayoutPattern> m_pattern;
|
||||
bool m_preview_draw { false };
|
||||
};
|
||||
private:
|
||||
qreal height() const;
|
||||
qreal width() const;
|
||||
|
||||
private:
|
||||
QSharedPointer <AbstractTerminalStripInterface> m_strip;
|
||||
QSharedPointer<TerminalStripLayoutPattern> m_pattern;
|
||||
bool m_preview_draw { false };
|
||||
QPointF m_mouse_hover_pos;
|
||||
QRectF m_united_xref_text_rect;
|
||||
bool m_last_mouse_pos_in_xrefs_rect{false};
|
||||
hoverTerminal m_hovered_xref;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // TERMINALSTRIPDRAWER_H
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2022 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "../../project/projectpropertieshandler.h"
|
||||
#include "../../qetgraphicsitem/qgraphicsitemutility.h"
|
||||
#include "../terminalstrip.h"
|
||||
#include "../physicalterminal.h"
|
||||
#include "../realterminal.h"
|
||||
#include "../ui/terminalstripeditorwindow.h"
|
||||
#include "trueterminalstrip.h"
|
||||
|
||||
@@ -94,12 +96,52 @@ QString TerminalStripItem::name() const {
|
||||
return tr("plan de bornes");
|
||||
}
|
||||
|
||||
void TerminalStripItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
QetGraphicsItem::hoverMoveEvent(event);
|
||||
m_drawer.setMouseHoverPos(hoverMousePos());
|
||||
if (m_drawer.needUpdate()) {
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void TerminalStripItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
QetGraphicsItem::hoverLeaveEvent(event);
|
||||
m_drawer.setMouseHoverPos(QPointF{});
|
||||
}
|
||||
|
||||
void TerminalStripItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
Q_UNUSED (event);
|
||||
|
||||
const auto hovered = m_drawer.hoveredXref();
|
||||
|
||||
if (m_strip) {
|
||||
TerminalStripEditorWindow::edit(m_strip);
|
||||
if (hovered.physical >= 0 &&
|
||||
hovered.real >= 0)
|
||||
{
|
||||
if (const auto physical_terminal = m_strip->physicalTerminal(hovered.physical);
|
||||
!physical_terminal.isNull())
|
||||
{
|
||||
if (const auto real_terminal = physical_terminal->realTerminal(hovered.real);
|
||||
!real_terminal.isNull() &&
|
||||
real_terminal->isElement())
|
||||
{
|
||||
if (QPointer<Element> element = real_terminal->element();
|
||||
!element.isNull())
|
||||
{
|
||||
//Unselect and ungrab mouse to prevent unwanted
|
||||
//move when element is in the same scene of this.
|
||||
setSelected(false);
|
||||
ungrabMouse();
|
||||
QetGraphicsItem::showItem(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
TerminalStripEditorWindow::edit(m_strip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2022 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -46,18 +46,19 @@ class TerminalStripItem : public QetGraphicsItem
|
||||
QRectF boundingRect() const override;
|
||||
QString name() const override;
|
||||
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void refreshPending();
|
||||
void setLayout(QSharedPointer<TerminalStripLayoutPattern> layout);
|
||||
void hoverMoveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void refreshPending();
|
||||
void setLayout(QSharedPointer<TerminalStripLayoutPattern> layout);
|
||||
|
||||
private:
|
||||
void setDefaultLayout();
|
||||
|
||||
private:
|
||||
QPointer<TerminalStrip> m_strip;
|
||||
TerminalStripDrawer::TerminalStripDrawer m_drawer;
|
||||
QUuid m_pending_strip_uuid;
|
||||
|
||||
TerminalStripDrawer::TerminalStripDrawer m_drawer;
|
||||
QUuid m_pending_strip_uuid;
|
||||
};
|
||||
|
||||
#endif // TERMINALSTRIPITEM_H
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "../realterminal.h"
|
||||
#include "../terminalstrip.h"
|
||||
#include "../terminalstripbridge.h"
|
||||
#include "../../autoNum/assignvariables.h"
|
||||
|
||||
#include "terminalstripdrawer.h"
|
||||
|
||||
@@ -118,9 +119,18 @@ namespace TerminalStripDrawer
|
||||
return new TrueBridge(m_real->bridge());
|
||||
}
|
||||
|
||||
TrueBridge::TrueBridge(QSharedPointer<TerminalStripBridge> bridge) :
|
||||
m_bridge { bridge }
|
||||
{}
|
||||
QString TrueRealTerminal::xref() const
|
||||
{
|
||||
if (m_real && m_real->isElement()) {
|
||||
return autonum::AssignVariables::genericXref(m_real->element());
|
||||
} else {
|
||||
return QString{};
|
||||
}
|
||||
}
|
||||
|
||||
TrueBridge::TrueBridge(QSharedPointer<TerminalStripBridge> bridge) :
|
||||
m_bridge { bridge }
|
||||
{}
|
||||
|
||||
QUuid TrueBridge::uuid() const
|
||||
{
|
||||
|
||||
@@ -51,13 +51,14 @@ namespace TerminalStripDrawer
|
||||
QSharedPointer<PhysicalTerminal> m_physical;
|
||||
};
|
||||
|
||||
class TrueRealTerminal : public AbstractRealTerminalInterface
|
||||
{
|
||||
public:
|
||||
TrueRealTerminal(QSharedPointer<RealTerminal> real);
|
||||
QString label() const override;
|
||||
bool isBridged() const override;
|
||||
AbstractBridgeInterface* bridge() const override;
|
||||
class TrueRealTerminal : public AbstractRealTerminalInterface
|
||||
{
|
||||
public:
|
||||
TrueRealTerminal(QSharedPointer<RealTerminal> real);
|
||||
QString label() const override;
|
||||
bool isBridged() const override;
|
||||
AbstractBridgeInterface* bridge() const override;
|
||||
QString xref() const override;
|
||||
|
||||
private:
|
||||
QSharedPointer<RealTerminal> m_real;
|
||||
|
||||
@@ -189,6 +189,20 @@ QVector<QSharedPointer<RealTerminal>> PhysicalTerminal::realTerminals() const {
|
||||
return m_real_terminal;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief PhysicalTerminal::realTerminal
|
||||
* @param pos
|
||||
* @return the real terminal at position pos.
|
||||
* Note that the returned QSharedPointer can be null
|
||||
*/
|
||||
QSharedPointer<RealTerminal> PhysicalTerminal::realTerminal(int pos) const
|
||||
{
|
||||
if (pos < m_real_terminal.size()) {
|
||||
return m_real_terminal.at(pos);
|
||||
}
|
||||
else return QSharedPointer<RealTerminal>{};
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief uuid
|
||||
* @return the uuid of this physical terminal
|
||||
|
||||
@@ -86,6 +86,7 @@ class PhysicalTerminal
|
||||
int levelCount() const;
|
||||
int levelOf(const QSharedPointer<RealTerminal> &terminal) const;
|
||||
QVector<QSharedPointer<RealTerminal>> realTerminals() const;
|
||||
QSharedPointer<RealTerminal> realTerminal(int pos) const;
|
||||
QUuid uuid() const;
|
||||
int pos() const;
|
||||
int realTerminalCount() const;
|
||||
|
||||
@@ -1037,8 +1037,10 @@ bool TerminalStrip::fromXml(QDomElement &xml_element)
|
||||
}
|
||||
}
|
||||
|
||||
auto raw_ptr = new PhysicalTerminal(this, real_t_vector);
|
||||
m_physical_terminals.append(raw_ptr->sharedRef());
|
||||
if (!real_t_vector.isEmpty()) {
|
||||
auto raw_ptr = new PhysicalTerminal(this, real_t_vector);
|
||||
m_physical_terminals.append(raw_ptr->sharedRef());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2022 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2022 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -32,16 +32,20 @@
|
||||
*/
|
||||
FreeTerminalEditor::FreeTerminalEditor(QETProject *project, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FreeTerminalEditor),
|
||||
m_project(project)
|
||||
ui(new Ui::FreeTerminalEditor),
|
||||
m_project(project)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->m_table_view->setItemDelegate(new FreeTerminalModelDelegate(ui->m_table_view));
|
||||
|
||||
m_model = new FreeTerminalModel(m_project, this);
|
||||
m_model = new FreeTerminalModel(m_project, this);
|
||||
ui->m_table_view->setModel(m_model);
|
||||
ui->m_table_view->setCurrentIndex(m_model->index(0,0));
|
||||
|
||||
if (m_project) {
|
||||
connect(m_project, &QObject::destroyed, this, &FreeTerminalEditor::reload);
|
||||
}
|
||||
|
||||
//Disabled the move if the table is currently edited (yellow cell)
|
||||
connect(m_model, &FreeTerminalModel::dataChanged, this, [=] {
|
||||
this->setDisabledMove();
|
||||
@@ -135,6 +139,31 @@ void FreeTerminalEditor::apply()
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FreeTerminalEditor::setProject
|
||||
* Set @project as project handled by this editor.
|
||||
* If a previous project was setted, everything is clear.
|
||||
* This function track the destruction of the project,
|
||||
* that mean if the project pointer is deleted
|
||||
* no need to call this function with a nullptr,
|
||||
* everything is made inside this class.
|
||||
* @param project
|
||||
*/
|
||||
void FreeTerminalEditor::setProject(QETProject *project)
|
||||
{
|
||||
if(m_project) {
|
||||
disconnect(m_project, &QObject::destroyed, this, &FreeTerminalEditor::reload);
|
||||
}
|
||||
m_project = project;
|
||||
if (m_model) {
|
||||
m_model->setProject(project);
|
||||
}
|
||||
if (m_project) {
|
||||
connect(m_project, &QObject::destroyed, this, &FreeTerminalEditor::reload);
|
||||
}
|
||||
reload();
|
||||
}
|
||||
|
||||
void FreeTerminalEditor::on_m_type_cb_activated(int index)
|
||||
{
|
||||
if (m_model)
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#define FREETERMINALEDITOR_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "../../qetproject.h"
|
||||
|
||||
class QETProject;
|
||||
class RealTerminal;
|
||||
class FreeTerminalModel;
|
||||
class QTableView;
|
||||
@@ -40,6 +40,8 @@ class FreeTerminalEditor : public QWidget
|
||||
void reload();
|
||||
void apply();
|
||||
|
||||
void setProject(QETProject *project);
|
||||
|
||||
private slots:
|
||||
void on_m_type_cb_activated(int index);
|
||||
void on_m_function_cb_activated(int index);
|
||||
@@ -52,7 +54,7 @@ class FreeTerminalEditor : public QWidget
|
||||
|
||||
private:
|
||||
Ui::FreeTerminalEditor *ui;
|
||||
QETProject *m_project = nullptr;
|
||||
FreeTerminalModel *m_model = nullptr;
|
||||
QPointer <QETProject> m_project;
|
||||
FreeTerminalModel *m_model {nullptr};
|
||||
};
|
||||
#endif // FREETERMINALEDITOR_H
|
||||
|
||||
@@ -56,10 +56,30 @@ FreeTerminalModel::Column FreeTerminalModel::columnTypeForIndex(const QModelInde
|
||||
* @param parent
|
||||
*/
|
||||
FreeTerminalModel::FreeTerminalModel(QETProject *project, QObject *parent) :
|
||||
QAbstractTableModel(parent),
|
||||
m_project(project)
|
||||
QAbstractTableModel(parent) {
|
||||
setProject(project);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FreeTerminalModel::setProject
|
||||
* Set @project as project handled by this model.
|
||||
* If a previous project was setted, everything is clear.
|
||||
* This function track the destruction of the project,
|
||||
* that mean if the project pointer is deleted
|
||||
* no need to call this function with a nullptr,
|
||||
* everything is made inside this class.
|
||||
* @param project
|
||||
*/
|
||||
void FreeTerminalModel::setProject(QETProject *project)
|
||||
{
|
||||
fillTerminalVector();
|
||||
if(m_project) {
|
||||
disconnect(m_project, &QObject::destroyed, this, &FreeTerminalModel::clear);
|
||||
}
|
||||
m_project = project;
|
||||
if (m_project) {
|
||||
connect(m_project, &QObject::destroyed, this, &FreeTerminalModel::clear);
|
||||
}
|
||||
clear();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -305,20 +325,22 @@ QVector<QSharedPointer<RealTerminal> > FreeTerminalModel::realTerminalForIndex(c
|
||||
*/
|
||||
void FreeTerminalModel::fillTerminalVector()
|
||||
{
|
||||
ElementProvider provider_(m_project);
|
||||
auto free_terminal_vector = provider_.freeTerminal();
|
||||
if (m_project) {
|
||||
ElementProvider provider_(m_project);
|
||||
auto free_terminal_vector = provider_.freeTerminal();
|
||||
|
||||
std::sort(free_terminal_vector.begin(), free_terminal_vector.end(),
|
||||
[](TerminalElement *a, TerminalElement *b)
|
||||
{
|
||||
return QETUtils::sortBeginIntString(a->elementData().m_informations.value(QETInformation::ELMT_LABEL).toString(),
|
||||
b->elementData().m_informations.value(QETInformation::ELMT_LABEL).toString());
|
||||
});
|
||||
std::sort(free_terminal_vector.begin(), free_terminal_vector.end(),
|
||||
[](TerminalElement *a, TerminalElement *b)
|
||||
{
|
||||
return QETUtils::sortBeginIntString(a->elementData().m_informations.value(QETInformation::ELMT_LABEL).toString(),
|
||||
b->elementData().m_informations.value(QETInformation::ELMT_LABEL).toString());
|
||||
});
|
||||
|
||||
for (const auto &terminal_ : free_terminal_vector) {
|
||||
m_terminal_vector.append(terminal_->realTerminal());
|
||||
m_real_t_data.append(modelRealTerminalData::data(terminal_->realTerminal()));
|
||||
}
|
||||
for (const auto &terminal_ : free_terminal_vector) {
|
||||
m_terminal_vector.append(terminal_->realTerminal());
|
||||
m_real_t_data.append(modelRealTerminalData::data(terminal_->realTerminal()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
|
||||
@@ -47,6 +47,7 @@ class FreeTerminalModel : public QAbstractTableModel
|
||||
|
||||
public:
|
||||
explicit FreeTerminalModel(QETProject *project, QObject *parent = nullptr);
|
||||
void setProject(QETProject *project);
|
||||
|
||||
int rowCount(const QModelIndex &parent) const override;
|
||||
int columnCount(const QModelIndex &parent) const override;
|
||||
|
||||
@@ -57,21 +57,9 @@ TerminalStripEditor::TerminalStripEditor(QETProject *project, QWidget *parent) :
|
||||
{
|
||||
if (m_model->columnTypeForIndex(index) == TerminalStripModel::XRef)
|
||||
{
|
||||
auto mrtd = m_model->modelRealTerminalDataForIndex(index);
|
||||
if (mrtd.element_)
|
||||
{
|
||||
auto elmt = mrtd.element_;
|
||||
auto diagram = elmt->diagram();
|
||||
if (diagram)
|
||||
{
|
||||
diagram->showMe();
|
||||
if (diagram->views().size())
|
||||
{
|
||||
auto fit_view = elmt->sceneBoundingRect();
|
||||
fit_view.adjust(-200,-200,200,200);
|
||||
diagram->views().at(0)->fitInView(fit_view, Qt::KeepAspectRatioByExpanding);
|
||||
}
|
||||
}
|
||||
const auto mrtd = m_model->modelRealTerminalDataForIndex(index);
|
||||
if (mrtd.element_) {
|
||||
QetGraphicsItem::showItem(mrtd.element_);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -84,6 +72,12 @@ TerminalStripEditor::~TerminalStripEditor() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void TerminalStripEditor::setProject(QETProject *project)
|
||||
{
|
||||
m_project = project;
|
||||
setCurrentStrip(nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TerminalStripEditor::setCurrentStrip
|
||||
* Set the current terminal strip edited to \p strip_
|
||||
@@ -98,27 +92,15 @@ void TerminalStripEditor::setCurrentStrip(TerminalStrip *strip_)
|
||||
if (m_current_strip) {
|
||||
disconnect(m_current_strip, &TerminalStrip::orderChanged, this, &TerminalStripEditor::reload);
|
||||
disconnect(m_current_strip, &TerminalStrip::bridgeChanged, this, &TerminalStripEditor::reload);
|
||||
disconnect(m_current_strip, &QObject::destroyed, this, &TerminalStripEditor::clear);
|
||||
}
|
||||
|
||||
ui->m_move_to_cb->clear();
|
||||
|
||||
if (!strip_)
|
||||
{
|
||||
ui->m_installation_le ->clear();
|
||||
ui->m_location_le ->clear();
|
||||
ui->m_name_le ->clear();
|
||||
ui->m_comment_le ->clear();
|
||||
ui->m_description_te ->clear();
|
||||
m_current_strip = nullptr;
|
||||
|
||||
ui->m_table_widget->setModel(nullptr);
|
||||
if (m_model) {
|
||||
m_model->deleteLater();
|
||||
m_model = nullptr;
|
||||
}
|
||||
if (!strip_) {
|
||||
clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
ui->m_installation_le ->setText(strip_->installation());
|
||||
ui->m_location_le ->setText(strip_->location());
|
||||
ui->m_name_le ->setText(strip_->name());
|
||||
@@ -159,6 +141,7 @@ void TerminalStripEditor::setCurrentStrip(TerminalStrip *strip_)
|
||||
|
||||
connect(m_current_strip, &TerminalStrip::orderChanged, this, &TerminalStripEditor::reload);
|
||||
connect(m_current_strip, &TerminalStrip::bridgeChanged, this, &TerminalStripEditor::reload);
|
||||
connect(m_current_strip, &QObject::destroyed, this, &TerminalStripEditor::clear);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,6 +213,22 @@ void TerminalStripEditor::apply()
|
||||
reload();
|
||||
}
|
||||
|
||||
void TerminalStripEditor::clear()
|
||||
{
|
||||
ui->m_installation_le ->clear();
|
||||
ui->m_location_le ->clear();
|
||||
ui->m_name_le ->clear();
|
||||
ui->m_comment_le ->clear();
|
||||
ui->m_description_te ->clear();
|
||||
m_current_strip.clear();
|
||||
|
||||
ui->m_table_widget->setModel(nullptr);
|
||||
if (m_model) {
|
||||
m_model->deleteLater();
|
||||
m_model = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TerminalStripEditor::spanMultiLevelTerminals
|
||||
* Span row of m_table_widget for multi-level terminal
|
||||
|
||||
@@ -41,11 +41,13 @@ class TerminalStripEditor : public QWidget
|
||||
public:
|
||||
explicit TerminalStripEditor(QETProject *project, QWidget *parent = nullptr);
|
||||
~TerminalStripEditor() override;
|
||||
void setProject(QETProject *project);
|
||||
void setCurrentStrip(TerminalStrip *strip_);
|
||||
void reload();
|
||||
void apply();
|
||||
|
||||
private:
|
||||
void clear();
|
||||
void spanMultiLevelTerminals();
|
||||
void selectionChanged();
|
||||
QSize setUpBridgeCellWidth();
|
||||
@@ -67,9 +69,9 @@ class TerminalStripEditor : public QWidget
|
||||
|
||||
private:
|
||||
Ui::TerminalStripEditor *ui;
|
||||
QETProject *m_project {nullptr};
|
||||
TerminalStrip *m_current_strip {nullptr};
|
||||
TerminalStripModel *m_model {nullptr};
|
||||
QPointer<QETProject> m_project;
|
||||
QPointer<TerminalStrip> m_current_strip;
|
||||
TerminalStripModel *m_model {nullptr};
|
||||
};
|
||||
|
||||
#endif // TERMINALSTRIPEDITOR_H
|
||||
|
||||
@@ -51,10 +51,15 @@ void TerminalStripEditorWindow::edit(TerminalStrip *strip)
|
||||
|
||||
TerminalStripEditorWindow::TerminalStripEditorWindow(QETProject *project, QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::TerminalStripEditorWindow),
|
||||
m_project(project)
|
||||
ui(new Ui::TerminalStripEditorWindow),
|
||||
m_project(project)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
if (auto diagram_editor = QETApp::diagramEditor(project)) {
|
||||
ui->m_tool_bar->addSeparator();
|
||||
ui->m_tool_bar->addAction(diagram_editor->undo);
|
||||
ui->m_tool_bar->addAction(diagram_editor->redo);
|
||||
}
|
||||
ui->m_remove_terminal->setDisabled(true);
|
||||
addTreeDockWidget();
|
||||
|
||||
@@ -76,6 +81,18 @@ TerminalStripEditorWindow::~TerminalStripEditorWindow()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TerminalStripEditorWindow::setProject
|
||||
* @param project
|
||||
*/
|
||||
void TerminalStripEditorWindow::setProject(QETProject *project)
|
||||
{
|
||||
m_project = project;
|
||||
m_tree_dock->setProject(project);
|
||||
m_free_terminal_editor->setProject(project);
|
||||
m_terminal_strip_editor->setProject(project);
|
||||
}
|
||||
|
||||
void TerminalStripEditorWindow::setCurrentStrip(TerminalStrip *strip) {
|
||||
m_tree_dock->setSelectedStrip(strip);
|
||||
}
|
||||
@@ -200,4 +217,3 @@ void TerminalStripEditorWindow::on_m_button_box_clicked(QAbstractButton *button)
|
||||
void TerminalStripEditorWindow::on_m_stacked_widget_currentChanged(int arg1) {
|
||||
ui->m_button_box->setHidden(arg1 == EMPTY_PAGE);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,17 +43,19 @@ class TerminalStripEditorWindow : public QMainWindow
|
||||
//instance in her destrucor and then window_ become a dangling pointer.
|
||||
static QPointer<TerminalStripEditorWindow> window_;
|
||||
|
||||
public:
|
||||
static TerminalStripEditorWindow* instance(QETProject *project, QWidget *parent = nullptr) {
|
||||
static QMutex mutex_;
|
||||
if (!window_) {
|
||||
mutex_.lock();
|
||||
if (!window_)
|
||||
window_ = new TerminalStripEditorWindow{project, parent};
|
||||
mutex_.unlock();
|
||||
}
|
||||
return window_;
|
||||
}
|
||||
public:
|
||||
static TerminalStripEditorWindow* instance(QETProject *project, QWidget *parent = nullptr) {
|
||||
static QMutex mutex_;
|
||||
if (!window_) {
|
||||
mutex_.lock();
|
||||
if (!window_)
|
||||
window_ = new TerminalStripEditorWindow{project, parent};
|
||||
mutex_.unlock();
|
||||
} else {
|
||||
window_->setProject(project);
|
||||
}
|
||||
return window_;
|
||||
}
|
||||
|
||||
static void dropInstance () {
|
||||
static QMutex mutex;
|
||||
@@ -71,7 +73,8 @@ class TerminalStripEditorWindow : public QMainWindow
|
||||
explicit TerminalStripEditorWindow(QETProject *project, QWidget *parent = nullptr);
|
||||
~TerminalStripEditorWindow();
|
||||
|
||||
void setCurrentStrip(TerminalStrip *strip);
|
||||
void setProject(QETProject *project);
|
||||
void setCurrentStrip(TerminalStrip *strip);
|
||||
|
||||
private slots:
|
||||
void on_m_add_terminal_strip_triggered();
|
||||
@@ -87,7 +90,7 @@ class TerminalStripEditorWindow : public QMainWindow
|
||||
|
||||
private:
|
||||
Ui::TerminalStripEditorWindow *ui{nullptr};
|
||||
QETProject *m_project {nullptr};
|
||||
QPointer <QETProject> m_project;
|
||||
TerminalStripTreeDockWidget *m_tree_dock{nullptr};
|
||||
FreeTerminalEditor *m_free_terminal_editor {nullptr};
|
||||
TerminalStripEditor *m_terminal_strip_editor {nullptr};
|
||||
|
||||
@@ -33,12 +33,12 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1364</width>
|
||||
<height>21</height>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<widget class="QToolBar" name="toolBar">
|
||||
<widget class="QToolBar" name="m_tool_bar">
|
||||
<property name="windowTitle">
|
||||
<string>toolBar</string>
|
||||
</property>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <QFontDialog>
|
||||
|
||||
#include "terminalstriplayouteditor.h"
|
||||
#include "ui_terminalstriplayouteditor.h"
|
||||
#include "../GraphicsItem/properties/terminalstriplayoutpattern.h"
|
||||
@@ -54,12 +56,10 @@ void TerminalStripLayoutEditor::valueEdited()
|
||||
return;
|
||||
}
|
||||
|
||||
//auto *data_ = m_layout.data();
|
||||
|
||||
m_layout.data()->m_header_rect.setRect(0,
|
||||
ui->m_y_header_sb->value(),
|
||||
ui->m_width_header_sb->value(),
|
||||
ui->m_height_header_sb->value());
|
||||
m_layout.data()->m_header_rect.setRect(0,
|
||||
ui->m_y_header_sb->value(),
|
||||
ui->m_width_header_sb->value(),
|
||||
ui->m_height_header_sb->value());
|
||||
|
||||
m_layout.data()->m_spacer_rect.setRect(0,
|
||||
ui->m_y_spacer_sb->value(),
|
||||
@@ -91,9 +91,13 @@ void TerminalStripLayoutEditor::valueEdited()
|
||||
m_layout.data()->m_bridge_point_y_offset[2] = ui->m_bridge_point_2_sb->value();
|
||||
m_layout.data()->m_bridge_point_y_offset[3] = ui->m_bridge_point_3_sb->value();
|
||||
|
||||
m_layout.data()->m_header_text_orientation = ui->m_header_text_orientation_cb->currentIndex() == 0 ?
|
||||
Qt::Horizontal :
|
||||
Qt::Vertical;
|
||||
auto font_ = ui->m_font_cb->currentFont();
|
||||
font_.setPixelSize(ui->m_font_size_sb->value());
|
||||
m_layout->setFont(font_);
|
||||
|
||||
m_layout.data()->m_header_text_orientation = ui->m_header_text_orientation_cb->currentIndex() == 0 ?
|
||||
Qt::Horizontal :
|
||||
Qt::Vertical;
|
||||
|
||||
switch (ui->m_header_text_alignment_cb->currentIndex()) {
|
||||
case 0:
|
||||
@@ -104,34 +108,46 @@ void TerminalStripLayoutEditor::valueEdited()
|
||||
m_layout.data()->setHeaderTextAlignment(Qt::AlignRight | Qt::AlignVCenter); break;
|
||||
}
|
||||
|
||||
m_layout.data()->m_terminals_text_orientation[0] = ui->m_terminal_text_orientation_cb->currentIndex() == 0 ?
|
||||
Qt::Horizontal :
|
||||
Qt::Vertical;
|
||||
//Terminal text
|
||||
m_layout.data()->m_terminals_text_orientation = ui->m_terminal_text_orientation_cb->currentIndex() == 0 ?
|
||||
Qt::Horizontal :
|
||||
Qt::Vertical;
|
||||
|
||||
switch (ui->m_terminal_text_alignment_cb->currentIndex()) {
|
||||
case 0:
|
||||
m_layout.data()->setTerminalsTextAlignment(
|
||||
QVector<Qt::Alignment> { Qt::AlignLeft | Qt::AlignVCenter,
|
||||
Qt::AlignLeft | Qt::AlignVCenter,
|
||||
Qt::AlignLeft | Qt::AlignVCenter,
|
||||
Qt::AlignLeft | Qt::AlignVCenter });
|
||||
break;
|
||||
case 1:
|
||||
m_layout.data()->setTerminalsTextAlignment(
|
||||
QVector<Qt::Alignment> { Qt::AlignHCenter | Qt::AlignVCenter,
|
||||
Qt::AlignHCenter | Qt::AlignVCenter,
|
||||
Qt::AlignHCenter | Qt::AlignVCenter,
|
||||
Qt::AlignHCenter | Qt::AlignVCenter });
|
||||
break;
|
||||
default:
|
||||
m_layout.data()->setTerminalsTextAlignment(
|
||||
QVector<Qt::Alignment> { Qt::AlignRight | Qt::AlignVCenter,
|
||||
Qt::AlignRight | Qt::AlignVCenter,
|
||||
Qt::AlignRight | Qt::AlignVCenter,
|
||||
Qt::AlignRight | Qt::AlignVCenter });
|
||||
break;
|
||||
switch (ui->m_terminal_text_alignment_cb->currentIndex()) {
|
||||
case 0:
|
||||
m_layout.data()->setTerminalsTextAlignment(Qt::Alignment {Qt::AlignLeft | Qt::AlignVCenter});
|
||||
break;
|
||||
case 1:
|
||||
m_layout.data()->setTerminalsTextAlignment(Qt::Alignment { Qt::AlignHCenter | Qt::AlignVCenter});
|
||||
break;
|
||||
default:
|
||||
m_layout.data()->setTerminalsTextAlignment(Qt::Alignment { Qt::AlignRight | Qt::AlignVCenter});
|
||||
break;
|
||||
}
|
||||
|
||||
m_layout.data()->m_terminals_text_y = ui->m_terminal_text_y_sb->value();
|
||||
m_layout.data()->m_terminals_text_height = ui->m_terminal_text_height_sb->value();
|
||||
|
||||
//Xref text
|
||||
m_layout.data()->m_xref_text_orientation = ui->m_xref_orientation_cb->currentIndex() == 0 ?
|
||||
Qt::Horizontal :
|
||||
Qt::Vertical;
|
||||
|
||||
switch (ui->m_xref_alignment_cb->currentIndex()) {
|
||||
case 0:
|
||||
m_layout.data()->setXrefTextAlignment(Qt::Alignment {Qt::AlignLeft | Qt::AlignVCenter});
|
||||
break;
|
||||
case 1:
|
||||
m_layout.data()->setXrefTextAlignment(Qt::Alignment { Qt::AlignHCenter | Qt::AlignVCenter});
|
||||
break;
|
||||
default:
|
||||
m_layout.data()->setXrefTextAlignment(Qt::Alignment { Qt::AlignRight | Qt::AlignVCenter});
|
||||
break;
|
||||
}
|
||||
|
||||
m_layout.data()->m_xref_text_y = ui->m_xref_y_sb->value();
|
||||
m_layout.data()->m_xref_text_height = ui->m_xref_height_sb->value();
|
||||
|
||||
updateUi();
|
||||
m_preview_strip_item.update();
|
||||
}
|
||||
@@ -180,17 +196,21 @@ void TerminalStripLayoutEditor::updateUi()
|
||||
ui->m_bridge_point_2_sb->setValue(bridge_point[2]);
|
||||
ui->m_bridge_point_3_sb->setValue(bridge_point[3]);
|
||||
|
||||
if (data->m_header_text_orientation == Qt::Horizontal) {
|
||||
ui->m_header_text_orientation_cb->setCurrentIndex(0);
|
||||
} else {
|
||||
ui->m_header_text_orientation_cb->setCurrentIndex(1);
|
||||
}
|
||||
const auto font = m_layout->font();
|
||||
ui->m_font_size_sb->setValue(font.pixelSize());
|
||||
ui->m_font_cb->setCurrentFont(font);
|
||||
|
||||
if (data->m_terminals_text_orientation[0] == Qt::Horizontal) {
|
||||
ui->m_terminal_text_orientation_cb->setCurrentIndex(0);
|
||||
} else {
|
||||
ui->m_terminal_text_orientation_cb->setCurrentIndex(1);
|
||||
}
|
||||
if (data->m_header_text_orientation == Qt::Horizontal) {
|
||||
ui->m_header_text_orientation_cb->setCurrentIndex(0);
|
||||
} else {
|
||||
ui->m_header_text_orientation_cb->setCurrentIndex(1);
|
||||
}
|
||||
|
||||
if (data->m_terminals_text_orientation == Qt::Horizontal) {
|
||||
ui->m_terminal_text_orientation_cb->setCurrentIndex(0);
|
||||
} else {
|
||||
ui->m_terminal_text_orientation_cb->setCurrentIndex(1);
|
||||
}
|
||||
|
||||
const auto header_alignment = data->headerTextAlignment();
|
||||
if (header_alignment &Qt::AlignLeft) {
|
||||
@@ -201,15 +221,38 @@ void TerminalStripLayoutEditor::updateUi()
|
||||
ui->m_header_text_alignment_cb->setCurrentIndex(2);
|
||||
}
|
||||
|
||||
const auto terminal_alignment = data->terminalsTextAlignment().at(0);
|
||||
if (terminal_alignment &Qt::AlignLeft) {
|
||||
ui->m_terminal_text_alignment_cb->setCurrentIndex(0);
|
||||
} else if (terminal_alignment &Qt::AlignHCenter) {
|
||||
ui->m_terminal_text_alignment_cb->setCurrentIndex(1);
|
||||
} else if (terminal_alignment &Qt::AlignRight) {
|
||||
ui->m_terminal_text_alignment_cb->setCurrentIndex(2);
|
||||
//Terminal text
|
||||
const auto terminal_alignment = data->terminalsTextAlignment();
|
||||
if (terminal_alignment &Qt::AlignLeft) {
|
||||
ui->m_terminal_text_alignment_cb->setCurrentIndex(0);
|
||||
} else if (terminal_alignment &Qt::AlignHCenter) {
|
||||
ui->m_terminal_text_alignment_cb->setCurrentIndex(1);
|
||||
} else if (terminal_alignment &Qt::AlignRight) {
|
||||
ui->m_terminal_text_alignment_cb->setCurrentIndex(2);
|
||||
}
|
||||
|
||||
ui->m_terminal_text_y_sb->setValue(data->m_terminals_text_y);
|
||||
ui->m_terminal_text_height_sb->setValue(data->m_terminals_text_height);
|
||||
|
||||
//Xref text
|
||||
if (data->m_xref_text_orientation == Qt::Horizontal) {
|
||||
ui->m_xref_orientation_cb->setCurrentIndex(0);
|
||||
} else {
|
||||
ui->m_xref_orientation_cb->setCurrentIndex(1);
|
||||
}
|
||||
|
||||
const auto xref_alignment = data->xrefTextAlignment();
|
||||
if (xref_alignment &Qt::AlignLeft) {
|
||||
ui->m_xref_alignment_cb->setCurrentIndex(0);
|
||||
} else if (xref_alignment &Qt::AlignHCenter) {
|
||||
ui->m_xref_alignment_cb->setCurrentIndex(1);
|
||||
} else if (xref_alignment &Qt::AlignRight) {
|
||||
ui->m_xref_alignment_cb->setCurrentIndex(2);
|
||||
}
|
||||
|
||||
ui->m_xref_y_sb->setValue(data->m_xref_text_y);
|
||||
ui->m_xref_height_sb->setValue(data->m_xref_text_height);
|
||||
|
||||
m_ui_updating = false;
|
||||
updatePreview();
|
||||
}
|
||||
@@ -225,4 +268,3 @@ void TerminalStripLayoutEditor::on_m_display_preview_help_clicked(bool checked)
|
||||
m_preview_strip_item.m_drawer.setPreviewDraw(checked);
|
||||
m_preview_strip_item.update();
|
||||
}
|
||||
|
||||
|
||||
@@ -74,10 +74,9 @@ class TerminalStripLayoutEditor : public QWidget
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
void showEvent(QShowEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void valueEdited();
|
||||
|
||||
void on_m_display_preview_help_clicked(bool checked);
|
||||
private slots:
|
||||
void valueEdited();
|
||||
void on_m_display_preview_help_clicked(bool checked);
|
||||
|
||||
private:
|
||||
void updateUi();
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>767</width>
|
||||
<height>544</height>
|
||||
<width>961</width>
|
||||
<height>624</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -17,17 +17,17 @@
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMaximumSize</enum>
|
||||
</property>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Borne niveau 0 :</string>
|
||||
<item row="4" column="2">
|
||||
<widget class="QSpinBox" name="m_width_terminal_0_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>En tête :</string>
|
||||
<item row="6" column="3">
|
||||
<widget class="QSpinBox" name="m_height_terminal_2_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -38,37 +38,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0" colspan="5">
|
||||
<widget class="QGraphicsView" name="m_graphics_view"/>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="text">
|
||||
<string>Point de pont</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QSpinBox" name="m_y_terminal_1_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="5">
|
||||
<widget class="Line" name="line_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QSpinBox" name="m_height_spacer_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
@@ -76,15 +45,43 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="4">
|
||||
<widget class="QCheckBox" name="m_display_preview_help">
|
||||
<property name="text">
|
||||
<string>Afficher l'aide</string>
|
||||
<item row="7" column="4">
|
||||
<widget class="QSpinBox" name="m_bridge_point_3_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QSpinBox" name="m_width_header_sb">
|
||||
<item row="5" column="3">
|
||||
<widget class="QSpinBox" name="m_height_terminal_1_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Borne niveau 0 :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QSpinBox" name="m_width_terminal_3_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="4">
|
||||
<widget class="QSpinBox" name="m_bridge_point_2_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QSpinBox" name="m_width_terminal_1_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
@@ -97,22 +94,39 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="4">
|
||||
<widget class="QSpinBox" name="m_bridge_point_1_sb">
|
||||
<item row="14" column="0" colspan="5">
|
||||
<widget class="QGraphicsView" name="m_graphics_view"/>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QSpinBox" name="m_height_spacer_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Largeur</string>
|
||||
<string>Borne niveau 3 :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="3">
|
||||
<widget class="QSpinBox" name="m_height_terminal_2_sb">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Borne niveau 2 :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QSpinBox" name="m_width_spacer_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QSpinBox" name="m_height_terminal_0_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
@@ -125,17 +139,48 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<item row="13" column="4">
|
||||
<widget class="QCheckBox" name="m_display_preview_help">
|
||||
<property name="text">
|
||||
<string>Hauteur</string>
|
||||
<string>Afficher l'aide</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Prévisualisation :</string>
|
||||
<string>Largeur</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="4">
|
||||
<widget class="QSpinBox" name="m_bridge_point_1_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Espace :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0" colspan="5">
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<widget class="QSpinBox" name="m_bridge_point_0_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -146,35 +191,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QSpinBox" name="m_y_terminal_3_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Borne niveau 1 :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QSpinBox" name="m_y_terminal_0_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QSpinBox" name="m_width_spacer_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QSpinBox" name="m_width_terminal_2_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0" colspan="5">
|
||||
<item row="10" column="0" colspan="5">
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
@@ -189,26 +213,21 @@
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="3">
|
||||
<widget class="QComboBox" name="m_terminal_text_alignment_cb">
|
||||
<item row="5" column="3">
|
||||
<widget class="QComboBox" name="m_header_text_orientation_cb">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Gauche</string>
|
||||
<string>Horizontal</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Centre</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Droite</string>
|
||||
<string>Vertical</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<item row="6" column="3">
|
||||
<widget class="QComboBox" name="m_header_text_alignment_cb">
|
||||
<item>
|
||||
<property name="text">
|
||||
@@ -227,21 +246,136 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<item row="5" column="2">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>Orientation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="text">
|
||||
<string>Alignement du texte d'en tête :</string>
|
||||
<string>Alignement</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_17">
|
||||
<item row="1" column="2" colspan="4">
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Police :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFontComboBox" name="m_font_cb"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Taille :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_font_size_sb">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="text">
|
||||
<string>Alignement du texte de borne :</string>
|
||||
<string>Texte d'en tête</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="7" column="2">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>Origine vertical</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="QLabel" name="label_19">
|
||||
<property name="text">
|
||||
<string>Longueur maximal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="4">
|
||||
<widget class="QSpinBox" name="m_terminal_text_y_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="4">
|
||||
<widget class="QSpinBox" name="m_terminal_text_height_sb">
|
||||
<property name="minimum">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="4">
|
||||
<widget class="QComboBox" name="m_terminal_text_alignment_cb">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Gauche</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Centre</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Droite</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="4">
|
||||
<widget class="QComboBox" name="m_terminal_text_orientation_cb">
|
||||
<item>
|
||||
<property name="text">
|
||||
@@ -255,8 +389,28 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="m_header_text_orientation_cb">
|
||||
<item row="2" column="4">
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="text">
|
||||
<string>Texte borne</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<widget class="QLabel" name="label_22">
|
||||
<property name="text">
|
||||
<string>Référence croisée</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="5">
|
||||
<widget class="QComboBox" name="m_xref_orientation_cb">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Horizontal</string>
|
||||
@@ -269,23 +423,66 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="text">
|
||||
<string>Orientation du texte de borne :</string>
|
||||
<item row="6" column="5">
|
||||
<widget class="QComboBox" name="m_xref_alignment_cb">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Gauche</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Centre</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Droite</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="5">
|
||||
<widget class="QSpinBox" name="m_xref_y_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>Orientation du texte d'en tête :</string>
|
||||
<item row="8" column="5">
|
||||
<widget class="QSpinBox" name="m_xref_height_sb">
|
||||
<property name="minimum">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QSpinBox" name="m_width_terminal_2_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QSpinBox" name="m_width_header_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>En tête :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QSpinBox" name="m_height_header_sb">
|
||||
<property name="maximum">
|
||||
@@ -293,34 +490,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Borne niveau 2 :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QSpinBox" name="m_width_terminal_0_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Espace :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QSpinBox" name="m_width_terminal_3_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QSpinBox" name="m_y_terminal_2_sb">
|
||||
<property name="maximum">
|
||||
@@ -328,69 +497,55 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="4">
|
||||
<widget class="QSpinBox" name="m_bridge_point_2_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="4">
|
||||
<widget class="QSpinBox" name="m_bridge_point_3_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QSpinBox" name="m_width_terminal_1_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QSpinBox" name="m_height_terminal_0_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QSpinBox" name="m_height_terminal_1_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Borne niveau 3 :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<widget class="QSpinBox" name="m_bridge_point_0_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Borne niveau 1 :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0" colspan="5">
|
||||
<widget class="Line" name="line_2">
|
||||
<item row="9" column="0" colspan="5">
|
||||
<widget class="Line" name="line_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QSpinBox" name="m_y_terminal_3_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QSpinBox" name="m_y_terminal_1_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Hauteur</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="text">
|
||||
<string>Point de pont</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QSpinBox" name="m_y_terminal_0_sb">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Prévisualisation :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
@@ -811,6 +966,134 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>m_font_cb</sender>
|
||||
<signal>currentFontChanged(QFont)</signal>
|
||||
<receiver>TerminalStripLayoutEditor</receiver>
|
||||
<slot>valueEdited()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>245</x>
|
||||
<y>276</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>445</x>
|
||||
<y>277</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>m_font_size_sb</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>TerminalStripLayoutEditor</receiver>
|
||||
<slot>valueEdited()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>507</x>
|
||||
<y>277</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>445</x>
|
||||
<y>277</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>m_terminal_text_y_sb</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>TerminalStripLayoutEditor</receiver>
|
||||
<slot>valueEdited()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>207</x>
|
||||
<y>383</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>445</x>
|
||||
<y>277</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>m_terminal_text_height_sb</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>TerminalStripLayoutEditor</receiver>
|
||||
<slot>valueEdited()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>430</x>
|
||||
<y>383</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>445</x>
|
||||
<y>277</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>m_xref_alignment_cb</sender>
|
||||
<signal>currentIndexChanged(int)</signal>
|
||||
<receiver>TerminalStripLayoutEditor</receiver>
|
||||
<slot>valueEdited()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>836</x>
|
||||
<y>365</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>480</x>
|
||||
<y>311</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>m_xref_height_sb</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>TerminalStripLayoutEditor</receiver>
|
||||
<slot>valueEdited()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>836</x>
|
||||
<y>431</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>480</x>
|
||||
<y>311</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>m_xref_orientation_cb</sender>
|
||||
<signal>currentIndexChanged(int)</signal>
|
||||
<receiver>TerminalStripLayoutEditor</receiver>
|
||||
<slot>valueEdited()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>836</x>
|
||||
<y>333</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>480</x>
|
||||
<y>311</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>m_xref_y_sb</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>TerminalStripLayoutEditor</receiver>
|
||||
<slot>valueEdited()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>836</x>
|
||||
<y>398</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>480</x>
|
||||
<y>311</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>valueEdited()</slot>
|
||||
|
||||
@@ -30,11 +30,10 @@
|
||||
|
||||
TerminalStripTreeDockWidget::TerminalStripTreeDockWidget(QETProject *project, QWidget *parent) :
|
||||
QDockWidget(parent),
|
||||
ui(new Ui::TerminalStripTreeDockWidget),
|
||||
m_project(project)
|
||||
ui(new Ui::TerminalStripTreeDockWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
buildTree();
|
||||
setProject(project);
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)
|
||||
ui->m_tree_view->expandRecursively(ui->m_tree_view->rootIndex());
|
||||
@@ -48,6 +47,32 @@ TerminalStripTreeDockWidget::~TerminalStripTreeDockWidget()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TerminalStripTreeDockWidget::setProject
|
||||
* Set @project as project handled by this tree dock.
|
||||
* If a previous project was setted, everything is clear.
|
||||
* This function track the destruction of the project,
|
||||
* that mean if the project pointer is deleted
|
||||
* no need to call this function with a nullptr,
|
||||
* everything is made inside this class.
|
||||
* @param project
|
||||
*/
|
||||
void TerminalStripTreeDockWidget::setProject(QETProject *project)
|
||||
{
|
||||
if(m_project && m_project_destroy_connection) {
|
||||
disconnect(m_project_destroy_connection);
|
||||
}
|
||||
m_project = project;
|
||||
if (m_project) {
|
||||
m_project_destroy_connection = connect(m_project, &QObject::destroyed, [this](){
|
||||
this->m_current_strip.clear();
|
||||
this->reload();
|
||||
});
|
||||
}
|
||||
m_current_strip.clear();
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TerminalStripTreeDockWidget::reload
|
||||
*/
|
||||
@@ -205,6 +230,9 @@ void TerminalStripTreeDockWidget::on_m_tree_view_currentItemChanged(QTreeWidgetI
|
||||
*/
|
||||
void TerminalStripTreeDockWidget::buildTree()
|
||||
{
|
||||
if(!m_project) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto title_ = m_project->title();
|
||||
if (title_.isEmpty()) {
|
||||
|
||||
@@ -49,6 +49,7 @@ class TerminalStripTreeDockWidget : public QDockWidget
|
||||
explicit TerminalStripTreeDockWidget(QETProject *project, QWidget *parent = nullptr);
|
||||
~TerminalStripTreeDockWidget();
|
||||
|
||||
void setProject(QETProject *project = nullptr);
|
||||
void reload();
|
||||
bool currentIsStrip() const;
|
||||
TerminalStrip* currentStrip() const;
|
||||
@@ -74,11 +75,12 @@ class TerminalStripTreeDockWidget : public QDockWidget
|
||||
QPointer<QETProject> m_project;
|
||||
QPointer<TerminalStrip> m_current_strip;
|
||||
|
||||
QHash<QTreeWidgetItem *, TerminalStrip *> m_item_strip_H;
|
||||
QHash<QTreeWidgetItem *, QPointer<TerminalStrip>> m_item_strip_H;
|
||||
QHash<QUuid, QSharedPointer<RealTerminal>> m_uuid_terminal_H;
|
||||
QHash<QUuid, QPointer<TerminalStrip>> m_uuid_strip_H;
|
||||
QVector<QMetaObject::Connection> m_strip_changed_connection;
|
||||
bool m_current_is_free_terminal{false};
|
||||
bool m_current_is_free_terminal{false};
|
||||
QMetaObject::Connection m_project_destroy_connection;
|
||||
};
|
||||
|
||||
#endif // TERMINALSTRIPTREEDOCKWIDGET_H
|
||||
|
||||
@@ -221,11 +221,12 @@ namespace autonum
|
||||
str.replace("%{designation}", dc.value("designation").toString());
|
||||
str.replace("%{manufacturer}", dc.value("manufacturer").toString());
|
||||
str.replace("%{manufacturer_reference}",
|
||||
dc.value("manufacturer_reference").toString());
|
||||
dc.value("manufacturer_reference").toString());
|
||||
str.replace("%{supplier}", dc.value("supplier").toString());
|
||||
str.replace("%{quantity}", dc.value("quantity").toString());
|
||||
str.replace("%{unity}", dc.value("unity").toString());
|
||||
str.replace("%{auxiliary1}", dc.value("auxiliary1").toString());
|
||||
|
||||
str.replace("%{auxiliary1}", dc.value("auxiliary1").toString());
|
||||
str.replace("%{description_auxiliary1}", dc.value("description_auxiliary1").toString());
|
||||
str.replace("%{designation_auxiliary1}", dc.value("designation_auxiliary1").toString());
|
||||
str.replace("%{manufacturer_auxiliary1}", dc.value("manufacturer_auxiliary1").toString());
|
||||
@@ -264,10 +265,14 @@ namespace autonum
|
||||
str.replace("%{unity_auxiliary4}", dc.value("unity_auxiliary4").toString());
|
||||
|
||||
|
||||
str.replace("%{machine_manufacturer_reference}",
|
||||
dc.value("machine_manufacturer_reference").toString());
|
||||
str.replace("%{machine_manufacturer_reference}", dc.value("machine_manufacturer_reference").toString());
|
||||
|
||||
str.replace("%{location}", dc.value("location").toString());
|
||||
str.replace("%{function}", dc.value("function").toString());
|
||||
str.replace("%{tension_protocol}", dc.value("tension_protocol").toString());
|
||||
str.replace("%{conductor_section}", dc.value("conductor_section").toString());
|
||||
str.replace("%{conductor_color}", dc.value("conductor_color").toString());
|
||||
|
||||
str.replace("%{void}", QString());
|
||||
|
||||
return str;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2021 QElectroTech Team
|
||||
Copyright 2006-2025 QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2021 QElectroTech Team
|
||||
Copyright 2006-2025 QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
+193
-30
@@ -38,6 +38,7 @@
|
||||
#include "qetgraphicsitem/terminal.h"
|
||||
#include "qetxml.h"
|
||||
#include "undocommand/addelementtextcommand.h"
|
||||
#include "qetinformation.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <math.h>
|
||||
@@ -762,10 +763,12 @@ QList < QSet <Conductor *> > Diagram::potentials()
|
||||
represent the entire schema or only the selected content
|
||||
\~French Booleen (a vrai par defaut) indiquant si le XML genere doit
|
||||
representer l'integralite du schema ou seulement le contenu selectionne
|
||||
\~ @param is_copy_command:
|
||||
Boolean (false by default) indicating if function is called by an copy command
|
||||
\~ @return An XML Document (QDomDocument)
|
||||
\~French Un Document XML (QDomDocument)
|
||||
*/
|
||||
QDomDocument Diagram::toXml(bool whole_content) {
|
||||
QDomDocument Diagram::toXml(bool whole_content, bool is_copy_command) {
|
||||
// document
|
||||
QDomDocument document;
|
||||
|
||||
@@ -912,8 +915,13 @@ QDomDocument Diagram::toXml(bool whole_content) {
|
||||
{
|
||||
case Element::Type: {
|
||||
auto elmt = static_cast<Element *>(qgi);
|
||||
if (whole_content || elmt->isSelected())
|
||||
if (whole_content || elmt->isSelected()){
|
||||
// For a copy/paste command, the text positions must be recalculated for
|
||||
// correct text alignment, before it is saved to the clipboard
|
||||
if(is_copy_command && (elmt->linkType() == Element::Slave || elmt->linkType()&Element::AllReport))
|
||||
correctTextPos(elmt);
|
||||
list_elements << elmt;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Conductor::Type: {
|
||||
@@ -973,6 +981,9 @@ QDomDocument Diagram::toXml(bool whole_content) {
|
||||
for (auto elmt : list_elements) {
|
||||
dom_elements.appendChild(elmt->toXml(document,
|
||||
table_adr_id));
|
||||
// If copy is active we have to undo the changes we have made during creating(filling) 'list_elements'
|
||||
if(is_copy_command && (elmt->linkType() == Element::Slave || elmt->linkType()&Element::AllReport))
|
||||
restoreText(elmt);
|
||||
}
|
||||
dom_root.appendChild(dom_elements);
|
||||
}
|
||||
@@ -1428,33 +1439,6 @@ bool Diagram::fromXml(QDomElement &document,
|
||||
added_shapes << dii;
|
||||
}
|
||||
|
||||
// Load conductor
|
||||
QList<Conductor *> added_conductors;
|
||||
for (auto f : QET::findInDomElement(root,
|
||||
QStringLiteral("conductors"),
|
||||
QStringLiteral("conductor")))
|
||||
{
|
||||
if (!Conductor::valideXml(f)) continue;
|
||||
|
||||
//Check if terminal that conductor must be linked is know
|
||||
|
||||
Terminal* p1 = findTerminal(1, f, table_adr_id, added_elements);
|
||||
Terminal* p2 = findTerminal(2, f, table_adr_id, added_elements);
|
||||
|
||||
if (p1 && p2 && p1 != p2)
|
||||
{
|
||||
Conductor *c = new Conductor(p1, p2);
|
||||
if (c->isValid())
|
||||
{
|
||||
addItem(c);
|
||||
c -> fromXml(f);
|
||||
added_conductors << c;
|
||||
}
|
||||
else
|
||||
delete c;
|
||||
}
|
||||
}
|
||||
|
||||
//Load tables
|
||||
QVector<QetGraphicsTableItem *> added_tables;
|
||||
for (const auto &dom_table : QETXML::subChild(root,
|
||||
@@ -1475,7 +1459,6 @@ bool Diagram::fromXml(QDomElement &document,
|
||||
{
|
||||
QVector <QGraphicsItem *> added_items;
|
||||
for (auto element : qAsConst(added_elements )) added_items << element;
|
||||
for (auto cond : qAsConst(added_conductors )) added_items << cond;
|
||||
for (auto shape : qAsConst(added_shapes )) added_items << shape;
|
||||
for (auto text : qAsConst(added_texts )) added_items << text;
|
||||
for (auto image : qAsConst(added_images )) added_items << image;
|
||||
@@ -1500,6 +1483,33 @@ bool Diagram::fromXml(QDomElement &document,
|
||||
qgi->setPos(qgi->pos() += pos_);
|
||||
}
|
||||
|
||||
// Load conductor
|
||||
QList<Conductor *> added_conductors;
|
||||
for (auto f : QET::findInDomElement(root,
|
||||
QStringLiteral("conductors"),
|
||||
QStringLiteral("conductor")))
|
||||
{
|
||||
if (!Conductor::valideXml(f)) continue;
|
||||
|
||||
//Check if terminal that conductor must be linked is know
|
||||
|
||||
Terminal* p1 = findTerminal(1, f, table_adr_id, added_elements);
|
||||
Terminal* p2 = findTerminal(2, f, table_adr_id, added_elements);
|
||||
|
||||
if (p1 && p2 && p1 != p2)
|
||||
{
|
||||
Conductor *c = new Conductor(p1, p2);
|
||||
if (c->isValid())
|
||||
{
|
||||
addItem(c);
|
||||
c -> fromXml(f);
|
||||
added_conductors << c;
|
||||
}
|
||||
else
|
||||
delete c;
|
||||
}
|
||||
}
|
||||
|
||||
//Filling of falculatory lists
|
||||
if (content_ptr) {
|
||||
content_ptr -> m_elements = added_elements;
|
||||
@@ -2472,3 +2482,156 @@ bool Diagram::canRotateSelection() const
|
||||
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* To copy elements with right-aligned or centered elementtext, the text position
|
||||
of dynamicElementTextItems in report- and slave elements must be reset
|
||||
to the original insert position bevor writing to clipboard.
|
||||
It is only necessary for right-aligned and centered texts,
|
||||
but we do it for all, because it has no influence on other texts.
|
||||
*/
|
||||
/**
|
||||
@brief Diagram::correctTextPos
|
||||
set insertion position to the original insertion position of the element texts before copying
|
||||
@param Element
|
||||
*/
|
||||
void Diagram::correctTextPos(Element* elmt)
|
||||
{
|
||||
for (auto deti : elmt->dynamicTextItems()){
|
||||
|
||||
// correct dynamicElementTextItem of type ElementInfo
|
||||
if( deti->textFrom() == DynamicElementTextItem::ElementInfo){
|
||||
// save current PlainText
|
||||
deti->setText(deti->toPlainText());
|
||||
// writing an empty string to PlainText set
|
||||
// the insertion point to the original insertion point
|
||||
deti->setPlainText("");
|
||||
// block the alignment calculation for the next write action
|
||||
deti->m_block_alignment = true;
|
||||
// we need to set the plain text with its value,
|
||||
// otherewise the text value will not be copy
|
||||
deti->setPlainText(deti->text());
|
||||
deti->m_block_alignment = false;
|
||||
}
|
||||
// correct dynamicElementTextItem of type CompositeText
|
||||
else if(deti->textFrom() == DynamicElementTextItem::CompositeText){
|
||||
QString composite_text = deti->compositeText();
|
||||
|
||||
// create compositeText() without variables for slave item
|
||||
// This string corresponds to the original text with original insertion point
|
||||
if(elmt->linkType()==Element::Slave){
|
||||
const QStringList variables_list = QETInformation::elementInfoKeys();
|
||||
for (auto &variable : variables_list){
|
||||
if(composite_text.contains(QETInformation::infoToVar(variable)))
|
||||
composite_text.replace(QETInformation::infoToVar(variable),"");
|
||||
}
|
||||
}
|
||||
// create compositeText() without variables for report item
|
||||
else if(elmt->linkType()&Element::AllReport){
|
||||
const QStringList variables_list = QETInformation::folioReportInfoKeys();
|
||||
for (auto &variable : variables_list){
|
||||
if(composite_text.contains(QETInformation::infoToVar(variable)))
|
||||
composite_text.replace(QETInformation::infoToVar(variable),"");
|
||||
}
|
||||
}
|
||||
|
||||
deti->setText(deti->toPlainText());
|
||||
deti->setPlainText(composite_text);
|
||||
deti->m_block_alignment = true;
|
||||
deti->setPlainText(deti->text());
|
||||
deti->m_block_alignment = false;
|
||||
// We need the string for the restoration, so we save it
|
||||
deti->setText(composite_text);
|
||||
}
|
||||
}
|
||||
|
||||
// same for textgroups
|
||||
for (auto group : elmt->textGroups()){
|
||||
for(DynamicElementTextItem *deti : group->texts()){
|
||||
if( deti->textFrom() == DynamicElementTextItem::ElementInfo){
|
||||
deti->setText(deti->toPlainText());
|
||||
deti->m_block_alignment = true;
|
||||
deti->setPlainText(deti->text());
|
||||
deti->m_block_alignment = false;
|
||||
deti->setPlainText("");
|
||||
}
|
||||
|
||||
else if(deti->textFrom() == DynamicElementTextItem::CompositeText){
|
||||
QString composite_text = deti->compositeText();
|
||||
if(elmt->linkType()==Element::Slave){
|
||||
QStringList variables_list = QETInformation::elementInfoKeys();
|
||||
for (auto variable : variables_list){
|
||||
if(composite_text.contains(QETInformation::infoToVar(variable)))
|
||||
composite_text.replace(QETInformation::infoToVar(variable),"");
|
||||
}
|
||||
}
|
||||
else if(elmt->linkType()&Element::AllReport){
|
||||
QStringList variables_list = QETInformation::folioReportInfoKeys();
|
||||
for (auto variable : variables_list){
|
||||
if(composite_text.contains(QETInformation::infoToVar(variable)))
|
||||
composite_text.replace(QETInformation::infoToVar(variable),"");
|
||||
}
|
||||
}
|
||||
|
||||
deti->setText(deti->toPlainText());
|
||||
deti->setPlainText(composite_text);
|
||||
deti->m_block_alignment = true;
|
||||
deti->setPlainText(deti->text());
|
||||
deti->m_block_alignment = false;
|
||||
deti->setText(composite_text);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* After changing the element texts for copying, the element texts has to be restored.
|
||||
*/
|
||||
/**
|
||||
@brief Diagram::restoreText
|
||||
After correcting the elementtext position during copying
|
||||
the Text has to be restored
|
||||
@param Element
|
||||
*/
|
||||
void Diagram::restoreText(Element* elmt)
|
||||
{
|
||||
for (auto deti : elmt->dynamicTextItems()){
|
||||
// restore info text
|
||||
if( deti->textFrom() == DynamicElementTextItem::ElementInfo){
|
||||
// delete the actual plainText without alignmant calculation
|
||||
deti->m_block_alignment = true;
|
||||
deti->setPlainText("");
|
||||
deti->m_block_alignment = false;
|
||||
// restore the plainText
|
||||
deti->setPlainText(deti->text());
|
||||
}
|
||||
// restore composite text
|
||||
else if (deti->textFrom() == DynamicElementTextItem::CompositeText){
|
||||
QString composite_text = deti->text();
|
||||
deti->setText(deti->toPlainText());
|
||||
// set the PlainText to the origin text without alignment calculation
|
||||
deti->m_block_alignment = true;
|
||||
deti->setPlainText(composite_text);
|
||||
deti->m_block_alignment = false;
|
||||
deti->setPlainText(deti->text());
|
||||
}
|
||||
}
|
||||
// same for text groups
|
||||
for (auto group : elmt->textGroups()){
|
||||
for(DynamicElementTextItem *deti : group->texts()){
|
||||
if( deti->textFrom() == DynamicElementTextItem::ElementInfo){
|
||||
deti->m_block_alignment = true;
|
||||
deti->setPlainText("");
|
||||
deti->m_block_alignment = false;
|
||||
deti->setPlainText(deti->text());
|
||||
}
|
||||
else if (deti->textFrom() == DynamicElementTextItem::CompositeText){
|
||||
QString composite_text = deti->text();
|
||||
deti->setText(deti->toPlainText());
|
||||
deti->m_block_alignment = true;
|
||||
deti->setPlainText(composite_text);
|
||||
deti->m_block_alignment = false;
|
||||
deti->setPlainText(deti->text());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -142,6 +142,8 @@ class Diagram : public QGraphicsScene
|
||||
void wheelEvent (QGraphicsSceneWheelEvent *event) override;
|
||||
void keyPressEvent (QKeyEvent *event) override;
|
||||
void keyReleaseEvent (QKeyEvent *) override;
|
||||
void correctTextPos(Element* elmt);
|
||||
void restoreText(Element* elmt);
|
||||
|
||||
public:
|
||||
QUuid uuid();
|
||||
@@ -167,7 +169,7 @@ class Diagram : public QGraphicsScene
|
||||
QList < QSet <Conductor *> > potentials();
|
||||
|
||||
// methods related to XML import/export
|
||||
QDomDocument toXml(bool = true);
|
||||
QDomDocument toXml(bool wholeContent = true, bool is_copy_command = false);
|
||||
bool initFromXml(QDomElement &,
|
||||
QPointF = QPointF(),
|
||||
bool = true,
|
||||
|
||||
@@ -59,7 +59,15 @@ DiagramContent::DiagramContent(Diagram *diagram, bool selected) :
|
||||
{
|
||||
switch (item->type())
|
||||
{
|
||||
case Element::Type: { m_elements << qgraphicsitem_cast<Element *>(item); break;}
|
||||
case Element::Type:
|
||||
{
|
||||
auto element = qgraphicsitem_cast<Element *>(item);
|
||||
m_elements << element;
|
||||
if (element->elementData().m_type == ElementData::Terminal) {
|
||||
m_terminal_elements << static_cast<TerminalElement*>(element);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IndependentTextItem::Type: { m_text_fields << qgraphicsitem_cast<IndependentTextItem *>(item); break;}
|
||||
case Conductor::Type:
|
||||
{
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <QSet>
|
||||
#include <QVector>
|
||||
|
||||
#include "../qetgraphicsitem/terminalelement.h"
|
||||
|
||||
class QGraphicsItem;
|
||||
class Conductor;
|
||||
class Element;
|
||||
@@ -81,6 +83,7 @@ class DiagramContent
|
||||
QList<QGraphicsItem *> m_selected_items;
|
||||
QVector<QetGraphicsTableItem *> m_tables;
|
||||
QVector<TerminalStripItem *> m_terminal_strip;
|
||||
QVector<QPointer<TerminalElement>> m_terminal_elements;
|
||||
|
||||
|
||||
QList<DiagramTextItem *> selectedTexts() const;
|
||||
|
||||
+10
-7
@@ -376,6 +376,7 @@ void DiagramView::zoomReset()
|
||||
|
||||
/**
|
||||
Copie les elements selectionnes du schema dans le presse-papier puis les supprime
|
||||
Copies the selected elements from the diagram to the clipboard and then deletes them
|
||||
*/
|
||||
void DiagramView::cut()
|
||||
{
|
||||
@@ -387,13 +388,14 @@ void DiagramView::cut()
|
||||
|
||||
/**
|
||||
Copie les elements selectionnes du schema dans le presse-papier
|
||||
Copies the selected elements from the diagram to the clipboard
|
||||
*/
|
||||
void DiagramView::copy()
|
||||
{
|
||||
QClipboard *presse_papier = QApplication::clipboard();
|
||||
QString contenu_presse_papier = m_diagram -> toXml(false).toString(4);
|
||||
if (presse_papier -> supportsSelection()) presse_papier -> setText(contenu_presse_papier, QClipboard::Selection);
|
||||
presse_papier -> setText(contenu_presse_papier);
|
||||
QClipboard *clipboard = QApplication::clipboard();
|
||||
QString content_clipboard = m_diagram -> toXml(false, true).toString(4);
|
||||
if (clipboard -> supportsSelection()) clipboard -> setText(content_clipboard, QClipboard::Selection);
|
||||
clipboard -> setText(content_clipboard);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -405,11 +407,11 @@ void DiagramView::copy()
|
||||
void DiagramView::paste(const QPointF &pos, QClipboard::Mode clipboard_mode) {
|
||||
if (!isInteractive() || m_diagram -> isReadOnly()) return;
|
||||
|
||||
QString texte_presse_papier = QApplication::clipboard() -> text(clipboard_mode);
|
||||
if ((texte_presse_papier).isEmpty()) return;
|
||||
QString text_clipboard = QApplication::clipboard() -> text(clipboard_mode);
|
||||
if ((text_clipboard).isEmpty()) return;
|
||||
|
||||
QDomDocument document_xml;
|
||||
if (!document_xml.setContent(texte_presse_papier)) return;
|
||||
if (!document_xml.setContent(text_clipboard)) return;
|
||||
|
||||
DiagramContent content_pasted;
|
||||
m_diagram->fromXml(document_xml, pos, false, &content_pasted);
|
||||
@@ -425,6 +427,7 @@ void DiagramView::paste(const QPointF &pos, QClipboard::Mode clipboard_mode) {
|
||||
|
||||
/**
|
||||
Colle le contenu du presse-papier sur le schema a la position de la souris
|
||||
Pastes the contents of the clipboard into the diagram at the mouse position.
|
||||
*/
|
||||
void DiagramView::pasteHere()
|
||||
{
|
||||
|
||||
+14
-16
@@ -126,30 +126,28 @@ void ElementsMover::continueMovement(const QPointF &movement)
|
||||
| dc::Images
|
||||
| dc::Shapes
|
||||
| dc::ElementTextFields
|
||||
| dc::TextGroup
|
||||
| dc::ConductorsToMove))
|
||||
| dc::TextGroup))
|
||||
{
|
||||
if (qgi == m_movement_driver)
|
||||
continue;
|
||||
qgi->setPos(qgi->pos() + movement);
|
||||
}
|
||||
|
||||
// Move some conductors
|
||||
QVector<Conductor *>list_conductors;
|
||||
for(auto *con : m_moved_content.m_conductors_to_move){
|
||||
list_conductors << con;
|
||||
}
|
||||
|
||||
// update conductors 'conductors_to_move'
|
||||
for(auto *cond : list_conductors){
|
||||
cond->updatePath();
|
||||
if(cond->textItem()->wasMovedByUser() == true)
|
||||
cond->textItem()->setPos(cond->textItem()->pos()+movement);
|
||||
}
|
||||
|
||||
// update conductors 'conductors_to_update'
|
||||
for (auto &conductor : m_moved_content.m_conductors_to_update)
|
||||
{
|
||||
#if TODO_LIST
|
||||
#pragma message("@TODO fix this problem correctly, probably we must see conductor class.")
|
||||
#endif
|
||||
//Due to a weird behavior, we must ensure that the position of the conductor is (0,0).
|
||||
//If not, in some unknown case the function QGraphicsScene::itemsBoundingRect() return a rectangle
|
||||
//that take into account the pos() of the conductor, even if the bounding rect returned by the conductor is not in the pos().
|
||||
//For the user this situation appears when the top right of the folio is not at the top right of the graphicsview,
|
||||
//but displaced to the right and/or bottom.
|
||||
|
||||
//@TODO fix this problem correctly, probably we must see conductor class.
|
||||
// if (c->pos() != QPointF(0,0)) { //<- they work, but the conductor text return to its original pos when the pos is set by user and not auto
|
||||
// c->setPos(0,0); // because set the pos to 0,0 so text move to, and after call updatePath but because text pos is user defined
|
||||
// } // we don't move it.
|
||||
conductor->updatePath();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2021 QElectroTech Team
|
||||
Copyright 2006-2025 QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -234,9 +234,9 @@ void ProjectPrintWindow::printDiagram(Diagram *diagram, bool fit_page, QPainter
|
||||
{
|
||||
|
||||
////Prepare the print////
|
||||
//Deselect all
|
||||
// Deselect all
|
||||
diagram->deselectAll();
|
||||
//Disable focus flags
|
||||
// Disable focus flags
|
||||
QList<QGraphicsItem *> focusable_items;
|
||||
for (auto qgi : diagram->items()) {
|
||||
if (qgi->flags() & QGraphicsItem::ItemIsFocusable) {
|
||||
@@ -244,7 +244,7 @@ void ProjectPrintWindow::printDiagram(Diagram *diagram, bool fit_page, QPainter
|
||||
qgi->setFlag(QGraphicsItem::ItemIsFocusable, false);
|
||||
}
|
||||
}
|
||||
//Disable interaction
|
||||
// Disable interaction
|
||||
for (auto view : diagram->views()) {
|
||||
view->setInteractive(false);
|
||||
}
|
||||
@@ -254,7 +254,7 @@ void ProjectPrintWindow::printDiagram(Diagram *diagram, bool fit_page, QPainter
|
||||
|
||||
|
||||
auto full_page = printer->fullPage();
|
||||
auto diagram_rect = diagramRect(diagram, option);
|
||||
auto diagram_rect = QRectF(diagramRect(diagram, option));
|
||||
if (fit_page) {
|
||||
diagram->render(painter, QRectF(), diagram_rect, Qt::KeepAspectRatio);
|
||||
} else {
|
||||
@@ -266,57 +266,58 @@ void ProjectPrintWindow::printDiagram(Diagram *diagram, bool fit_page, QPainter
|
||||
#pragma message("@TODO remove code for QT 6 or later")
|
||||
#endif
|
||||
qDebug()<<"Help code for QT 6 or later";
|
||||
auto printed_rect = full_page ? printer->paperRect(QPrinter::Millimeter) : printer->pageRect(QPrinter::Millimeter);
|
||||
auto printed_rect = full_page ? printer->paperRect(QPrinter::Millimeter) :
|
||||
printer->pageRect(QPrinter::Millimeter);
|
||||
#endif
|
||||
auto used_width = printed_rect.width();
|
||||
auto used_height = printed_rect.height();
|
||||
auto h_pages_count = horizontalPagesCount(diagram, option, full_page);
|
||||
auto v_pages_count = verticalPagesCount(diagram, option, full_page);
|
||||
|
||||
QVector<QVector<QRect>> page_grid;
|
||||
//The diagram is printed on a matrix of sheet
|
||||
//scrolls through the rows of the matrix
|
||||
QVector<QVector<QRectF>> page_grid;
|
||||
// The diagram is printed on a matrix of sheet
|
||||
// scrolls through the rows of the matrix
|
||||
auto y_offset = 0;
|
||||
for (auto i=0 ; i<v_pages_count ; ++i)
|
||||
for (auto i = 0; i < v_pages_count; ++i)
|
||||
{
|
||||
page_grid << QVector<QRect>();
|
||||
//scrolls through the lines of sheet
|
||||
page_grid << QVector<QRectF>();
|
||||
// scrolls through the lines of sheet
|
||||
auto x_offset = 0;
|
||||
for (auto j=0 ; j<h_pages_count ; ++j)
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 1) // ### Qt 6: remove
|
||||
page_grid.last() << QRect(QPoint(x_offset, y_offset),
|
||||
QSize(qMin(used_width, diagram_rect.width() - x_offset),
|
||||
qMin(used_height, diagram_rect.height() - y_offset)));
|
||||
#else
|
||||
#if TODO_LIST
|
||||
#pragma message("@TODO remove code for QT 6 or later")
|
||||
#endif
|
||||
qDebug()<<"Help code for QT 6 or later";
|
||||
#endif
|
||||
page_grid.last() << QRectF(
|
||||
QPoint(x_offset, y_offset),
|
||||
QSize(
|
||||
qMin(used_width, diagram_rect.width() - x_offset),
|
||||
qMin(used_height, diagram_rect.height() - y_offset)));
|
||||
|
||||
x_offset += used_width;
|
||||
}
|
||||
y_offset += used_height;
|
||||
}
|
||||
|
||||
//Retains only the pages to be printed
|
||||
QVector<QRect> page_to_print;
|
||||
// Retains only the pages to be printed
|
||||
QVector<QRectF> page_to_print;
|
||||
for (auto i=0 ; i < v_pages_count ; ++i) {
|
||||
for (int j=0 ; j < h_pages_count ; ++j) {
|
||||
page_to_print << page_grid.at(i).at(j);
|
||||
}
|
||||
}
|
||||
|
||||
//Scrolls through the page for print
|
||||
// Scrolls through the page for print
|
||||
bool first_ = true;
|
||||
for (auto page : page_to_print)
|
||||
for (auto& page : page_to_print)
|
||||
{
|
||||
first_ ? first_ = false : m_printer->newPage();
|
||||
diagram->render(painter, QRect(QPoint(0,0), page.size()), page.translated(diagram_rect.topLeft()), Qt::KeepAspectRatio);
|
||||
diagram->render(
|
||||
painter,
|
||||
QRectF(QPoint(0, 0), page.size()),
|
||||
page.translated(diagram_rect.topLeft()),
|
||||
Qt::KeepAspectRatio);
|
||||
}
|
||||
}
|
||||
|
||||
////Print is finished, restore diagram and graphics item properties
|
||||
////Print is finished, restore diagram and graphics item properties
|
||||
for (auto view : diagram->views()) {
|
||||
view->setInteractive(true);
|
||||
}
|
||||
|
||||
@@ -775,12 +775,12 @@ void QETDiagramEditor::setUpToolBar()
|
||||
void QETDiagramEditor::setUpMenu()
|
||||
{
|
||||
|
||||
QMenu *menu_fichier = new QMenu(tr("&Fichier"));
|
||||
QMenu *menu_edition = new QMenu(tr("&Édition"));
|
||||
QMenu *menu_project = new QMenu(tr("&Projet"));
|
||||
QMenu *menu_affichage = new QMenu(tr("Afficha&ge"));
|
||||
//QMenu *menu_outils = new QMenu(tr("O&utils"));
|
||||
windows_menu = new QMenu(tr("Fe&nêtres"));
|
||||
QMenu* menu_fichier = new QMenu(tr("&Fichier"), this);
|
||||
QMenu* menu_edition = new QMenu(tr("&Édition"), this);
|
||||
QMenu* menu_project = new QMenu(tr("&Projet"), this);
|
||||
QMenu* menu_affichage = new QMenu(tr("Afficha&ge"), this);
|
||||
// QMenu *menu_outils = new QMenu(tr("O&utils"), this);
|
||||
windows_menu = new QMenu(tr("Fe&nêtres"), this);
|
||||
|
||||
insertMenu(settings_menu_, menu_fichier);
|
||||
insertMenu(settings_menu_, menu_edition);
|
||||
@@ -1469,12 +1469,21 @@ void QETDiagramEditor::selectionGroupTriggered(QAction *action)
|
||||
|
||||
if (!dv || value.isEmpty()) return;
|
||||
|
||||
if (value == "delete_selection")
|
||||
{
|
||||
diagram->clearSelection();
|
||||
diagram->undoStack().push(new DeleteQGraphicsItemCommand(diagram, dc));
|
||||
dv->adjustSceneRect();
|
||||
}
|
||||
if (value == "delete_selection")
|
||||
{
|
||||
if (DeleteQGraphicsItemCommand::hasNonDeletableTerminal(dc)) {
|
||||
QET::QetMessageBox::information(this,
|
||||
tr("Suppression de borne impossible"),
|
||||
tr("La suppression ne peut être effectué car la selection "
|
||||
"possède une ou plusieurs bornes ponté et/ou appartenant à une borne à niveau multiple.\n"
|
||||
"Déponter et/ou supprimer les niveaux des bornes concerné "
|
||||
"afin de pouvoir les supprimer"));
|
||||
} else {
|
||||
diagram->clearSelection();
|
||||
diagram->undoStack().push(new DeleteQGraphicsItemCommand(diagram, dc));
|
||||
dv->adjustSceneRect();
|
||||
}
|
||||
}
|
||||
else if (value == "rotate_selection")
|
||||
{
|
||||
RotateSelectionCommand *c = new RotateSelectionCommand(diagram);
|
||||
|
||||
@@ -54,6 +54,8 @@ class KAutoSaveFile;
|
||||
class QETDiagramEditor : public QETMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
friend class TerminalStripEditorWindow;
|
||||
|
||||
public:
|
||||
QETDiagramEditor(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2021 QElectroTech Team
|
||||
Copyright 2006-2025 QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -229,43 +229,53 @@ void Conductor::updateConductorPath(const QPointF &p1, Qet::Orientation o1, cons
|
||||
Q_ASSERT_X(!conductor_profile.isNull(), "Conductor::priv_modifieConductor", "pas de profil utilisable");
|
||||
|
||||
// recupere les coordonnees fournies des bornes
|
||||
// retrieve the coordinates provided for the terminals
|
||||
QPointF new_p1 = mapFromScene(p1);
|
||||
QPointF new_p2 = mapFromScene(p2);
|
||||
QRectF new_rect = QRectF(new_p1, new_p2);
|
||||
|
||||
// recupere la largeur et la hauteur du profil
|
||||
// retrieve the width and height of the profile
|
||||
qreal profile_width = conductor_profile.width();
|
||||
qreal profile_height = conductor_profile.height();
|
||||
|
||||
// calcule les differences verticales et horizontales a appliquer
|
||||
// calculates the vertical and horizontal differences to be applied
|
||||
qreal h_diff = (qAbs(new_rect.width()) - qAbs(profile_width) ) * getSign(profile_width);
|
||||
qreal v_diff = (qAbs(new_rect.height()) - qAbs(profile_height)) * getSign(profile_height);
|
||||
|
||||
// applique les differences aux segments
|
||||
// apply the differences to the segments
|
||||
QMultiHash<ConductorSegmentProfile *, qreal> segments_lengths;
|
||||
segments_lengths.unite(shareOffsetBetweenSegments(h_diff, conductor_profile.horizontalSegments()));
|
||||
segments_lengths.unite(shareOffsetBetweenSegments(v_diff, conductor_profile.verticalSegments()));
|
||||
|
||||
// en deduit egalement les coefficients d'inversion (-1 pour une inversion, +1 pour conserver le meme sens)
|
||||
// also deduce the inversion coefficients (-1 for inversion, +1 to keep the same direction)
|
||||
int horiz_coeff = getCoeff(new_rect.width(), profile_width);
|
||||
int verti_coeff = getCoeff(new_rect.height(), profile_height);
|
||||
|
||||
// genere les nouveaux points
|
||||
// generate the new points
|
||||
QList<QPointF> points;
|
||||
points << new_p1;
|
||||
int limit = conductor_profile.segments.count() - 1;
|
||||
for (int i = 0 ; i < limit ; ++ i) {
|
||||
// dernier point
|
||||
// last point
|
||||
QPointF previous_point = points.last();
|
||||
|
||||
// profil de segment de conducteur en cours
|
||||
// current conductor segment profile
|
||||
ConductorSegmentProfile *csp = conductor_profile.segments.at(i);
|
||||
|
||||
// coefficient et offset a utiliser pour ce point
|
||||
// coefficient and offset to be used for this point
|
||||
qreal coeff = csp -> isHorizontal ? horiz_coeff : verti_coeff;
|
||||
qreal offset_applied = segments_lengths.value(csp);
|
||||
|
||||
// applique l'offset et le coeff au point
|
||||
// apply coefficient and offset to point
|
||||
if (csp -> isHorizontal) {
|
||||
points << QPointF (
|
||||
previous_point.x() + (coeff * offset_applied),
|
||||
@@ -989,16 +999,16 @@ void Conductor::pointsToSegments(const QList<QPointF>& points_list) {
|
||||
|
||||
/**
|
||||
@brief Conductor::fromXml
|
||||
Load the conductor and her information from xml element
|
||||
Load the conductor and its information from xml element
|
||||
@param dom_element
|
||||
@return true is loading success else return false
|
||||
@return true if loading succeeded else return false
|
||||
*/
|
||||
bool Conductor::fromXml(QDomElement &dom_element)
|
||||
{
|
||||
setPos(dom_element.attribute("x", nullptr).toDouble(),
|
||||
dom_element.attribute("y", nullptr).toDouble());
|
||||
|
||||
bool return_ = pathFromXml(dom_element);
|
||||
bool retval = pathFromXml(dom_element);
|
||||
|
||||
m_text_item -> fromXml(dom_element);
|
||||
ConductorProperties pr;
|
||||
@@ -1010,11 +1020,11 @@ bool Conductor::fromXml(QDomElement &dom_element)
|
||||
else
|
||||
m_autoNum_seq.fromXml(dom_element.firstChildElement("sequentialNumbers"));
|
||||
|
||||
m_freeze_label = dom_element.attribute("freezeLabel") == "true"? true : false;
|
||||
m_freeze_label = dom_element.attribute("freezeLabel") == "true" ? true : false;
|
||||
|
||||
setProperties(pr);
|
||||
|
||||
return return_;
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1134,13 +1144,14 @@ bool Conductor::pathFromXml(const QDomElement &e) {
|
||||
}
|
||||
}
|
||||
|
||||
//If there isn't segment we generate automatic path and return true
|
||||
// If there is no segment, we generate an automatic path and return true
|
||||
if (!segments_x.size()) {
|
||||
generateConductorPath(terminal1 -> dockConductor(), terminal1 -> orientation(), terminal2 -> dockConductor(), terminal2 -> orientation());
|
||||
return(true);
|
||||
}
|
||||
|
||||
// les longueurs recueillies doivent etre coherentes avec les positions des bornes
|
||||
// The collected lengths must be consistent with the positions of the terminals
|
||||
qreal width = 0.0, height = 0.0;
|
||||
foreach (qreal t, segments_x) width += t;
|
||||
foreach (qreal t, segments_y) height += t;
|
||||
@@ -1256,65 +1267,57 @@ ConductorSegment *Conductor::middleSegment()
|
||||
*/
|
||||
QPointF Conductor::posForText(Qt::Orientations &flag)
|
||||
{
|
||||
|
||||
ConductorSegment *segment = segments;
|
||||
bool all_segment_is_vertical = true;
|
||||
bool all_segment_is_horizontal = true;
|
||||
ConductorSegment *segment = segments;
|
||||
bool all_segments_are_vertical = true;
|
||||
bool all_segments_are_horizontal = true;
|
||||
|
||||
//Go to first segment
|
||||
while (!segment->isFirstSegment()) {
|
||||
segment = segment->previousSegment();
|
||||
}
|
||||
|
||||
|
||||
QPointF p1 = segment -> firstPoint(); //<First point of conductor
|
||||
ConductorSegment *biggest_segment = segment; //<biggest segment: contain the longest segment of conductor.
|
||||
ConductorSegment *longest_segment = segment; //<the longest segment of conductor.
|
||||
|
||||
// check if all segments are horizontal or vertical ... first segment:
|
||||
if (segment -> firstPoint().x() != segment -> secondPoint().x())
|
||||
all_segment_is_vertical = false;
|
||||
all_segments_are_vertical = false;
|
||||
if (segment -> firstPoint().y() != segment -> secondPoint().y())
|
||||
all_segment_is_horizontal = false;
|
||||
|
||||
all_segments_are_horizontal = false;
|
||||
// find longest segment
|
||||
while (segment -> hasNextSegment())
|
||||
{
|
||||
segment = segment -> nextSegment();
|
||||
|
||||
if (segment -> firstPoint().x() != segment -> secondPoint().x())
|
||||
all_segment_is_vertical = false;
|
||||
all_segments_are_vertical = false;
|
||||
if (segment -> firstPoint().y() != segment -> secondPoint().y())
|
||||
all_segment_is_horizontal = false;
|
||||
all_segments_are_horizontal = false;
|
||||
|
||||
//We must compare length segment, but they can be negative
|
||||
//so we multiply by -1 to make it positive.
|
||||
int saved = biggest_segment -> length();
|
||||
if (saved < 0) saved *= -1;
|
||||
int curent = segment->length();
|
||||
if (curent < 0) curent *= -1;
|
||||
|
||||
if (curent > saved) biggest_segment = segment;
|
||||
if (qAbs(segment->length()) > qAbs(longest_segment -> length()))
|
||||
longest_segment = segment;
|
||||
}
|
||||
|
||||
QPointF p2 = segment -> secondPoint();//<Last point of conductor
|
||||
QPointF p2 = segment -> secondPoint(); //<Last point of conductor
|
||||
|
||||
//If the conductor is horizontal or vertical
|
||||
//Return the point at the middle of conductor
|
||||
if (all_segment_is_vertical) { //<Vertical
|
||||
if (all_segments_are_vertical) { //<Vertical
|
||||
flag = Qt::Vertical;
|
||||
if (p1.y() > p2.y()) {
|
||||
p1.setY(p1.y() - (length()/2));
|
||||
} else {
|
||||
p1.setY(p1.y() + (length()/2));
|
||||
}
|
||||
} else if (all_segment_is_horizontal) { //<Horizontal
|
||||
} else if (all_segments_are_horizontal) { //<Horizontal
|
||||
flag = Qt::Horizontal;
|
||||
if (p1.x() > p2.x()) {
|
||||
p1.setX(p1.x() - (length()/2));
|
||||
} else {
|
||||
p1.setX(p1.x() + (length()/2));
|
||||
}
|
||||
} else { //Return the point at the middle of biggest segment.
|
||||
p1 = biggest_segment->middle();
|
||||
flag = (biggest_segment->isHorizontal())? Qt::Horizontal : Qt::Vertical;
|
||||
} else { //Return the point at the middle of longest segment.
|
||||
p1 = longest_segment->middle();
|
||||
flag = (longest_segment->isHorizontal())? Qt::Horizontal : Qt::Vertical;
|
||||
}
|
||||
return p1;
|
||||
}
|
||||
@@ -1336,8 +1339,8 @@ void Conductor::calculateTextItemPosition()
|
||||
|
||||
Conductor *longest_conductor = longestConductorInPotential(this);
|
||||
|
||||
//The longest conductor isn't this conductor
|
||||
//we call calculateTextItemPosition of the longest conductor
|
||||
//This conductor isn't the longest conductor?
|
||||
//We call calculateTextItemPosition for the longest conductor
|
||||
if(longest_conductor != this)
|
||||
{
|
||||
longest_conductor -> calculateTextItemPosition();
|
||||
@@ -1355,7 +1358,7 @@ void Conductor::calculateTextItemPosition()
|
||||
//position
|
||||
if (m_text_item -> wasMovedByUser())
|
||||
{
|
||||
//Text field was moved by user :
|
||||
//Text field was moved by user:
|
||||
//we check if text field is yet near the conductor
|
||||
QPointF text_item_pos = m_text_item -> pos();
|
||||
QPainterPath near_shape = nearShape();
|
||||
@@ -1392,7 +1395,7 @@ void Conductor::calculateTextItemPosition()
|
||||
|
||||
m_text_item -> setPos(text_pos);
|
||||
|
||||
//Ensure text item don't collide with this conductor
|
||||
//Ensure text item does not collide with this conductor
|
||||
while (m_text_item->collidesWithItem(this))
|
||||
{
|
||||
if(rotation == Qt::Vertical)
|
||||
@@ -1420,6 +1423,7 @@ void Conductor::calculateTextItemPosition()
|
||||
/**
|
||||
Sauvegarde le profil courant du conducteur pour l'utiliser ulterieurement
|
||||
dans priv_modifieConductor.
|
||||
Save the current conductors profile for later use in priv_modifieConductor.
|
||||
*/
|
||||
void Conductor::saveProfile(bool undo) {
|
||||
Qt::Corner current_path_type = currentPathType();
|
||||
@@ -1486,7 +1490,7 @@ ConductorProfile Conductor::profile(Qt::Corner path_type) const
|
||||
/**
|
||||
@brief Conductor::refreshText
|
||||
Refresh the text of this conductor.
|
||||
recalcule and set the text according to the formula.
|
||||
recalculate and set the text according to the formula.
|
||||
*/
|
||||
void Conductor::refreshText()
|
||||
{
|
||||
|
||||
@@ -320,24 +320,7 @@ void CrossRefItem::paint(
|
||||
void CrossRefItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
event->accept();
|
||||
if (m_hovered_contact && m_hovered_contact->scene())
|
||||
{
|
||||
//Show and select the linked slave element
|
||||
if (scene() != m_hovered_contact->scene())
|
||||
{
|
||||
m_hovered_contact->diagram()->showMe();
|
||||
}
|
||||
m_hovered_contact->setSelected(true);
|
||||
|
||||
//Zoom to the linked slave element
|
||||
foreach(QGraphicsView *view,
|
||||
m_hovered_contact->diagram()->views())
|
||||
{
|
||||
QRectF fit = m_hovered_contact->sceneBoundingRect();
|
||||
fit.adjust(-200, -200, 200, 200);
|
||||
view->fitInView(fit, Qt::KeepAspectRatioByExpanding);
|
||||
}
|
||||
}
|
||||
QetGraphicsItem::showItem(m_hovered_contact);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2021 QElectroTech Team
|
||||
Copyright 2006-2025 QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1212,6 +1212,12 @@ QString DynamicElementTextItem::reportReplacedCompositeText() const
|
||||
label = autonum::AssignVariables::formulaToLabel(label, elmt->rSequenceStruct(), elmt->diagram(), elmt);
|
||||
string.replace("%{label}", label);
|
||||
}
|
||||
// if element is not linked, replace an empty string
|
||||
else
|
||||
{
|
||||
string.replace("%{label}", "");
|
||||
}
|
||||
|
||||
if (m_watched_conductor)
|
||||
{
|
||||
if(string.contains("%{function}"))
|
||||
@@ -1223,6 +1229,18 @@ QString DynamicElementTextItem::reportReplacedCompositeText() const
|
||||
if(string.contains("%{conductor_section}"))
|
||||
string.replace("%{conductor_section}", m_watched_conductor.data()->properties().m_wire_section);
|
||||
}
|
||||
// if no conductor is connected, replace an empty String
|
||||
else
|
||||
{
|
||||
if(string.contains("%{function}"))
|
||||
string.replace("%{function}", "");
|
||||
if(string.contains("%{tension_protocol}"))
|
||||
string.replace("%{tension_protocol}", "");
|
||||
if(string.contains("%{conductor_color}"))
|
||||
string.replace("%{conductor_color}", "");
|
||||
if(string.contains("%{conductor_section}"))
|
||||
string.replace("%{conductor_section}", "");
|
||||
}
|
||||
}
|
||||
|
||||
return string;
|
||||
@@ -1259,18 +1277,8 @@ void DynamicElementTextItem::zoomToLinkedElement()
|
||||
//move when linked element is in the same scene of this.
|
||||
setSelected(false);
|
||||
ungrabMouse();
|
||||
|
||||
if(scene() != zoomed_element->scene())
|
||||
zoomed_element->diagram()->showMe();
|
||||
zoomed_element->setSelected(true);
|
||||
|
||||
//Zoom to the element
|
||||
for(QGraphicsView *view : zoomed_element->scene()->views())
|
||||
{
|
||||
QRectF fit = zoomed_element->sceneBoundingRect();
|
||||
fit.adjust(-200, -200, 200, 200);
|
||||
view->fitInView(fit, Qt::KeepAspectRatioByExpanding);
|
||||
}
|
||||
|
||||
QetGraphicsItem::showItem(zoomed_element);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "iostream"
|
||||
#include "../qetxml.h"
|
||||
#include "../qetversion.h"
|
||||
#include "qgraphicsitemutility.h"
|
||||
|
||||
#include <QDomElement>
|
||||
#include <utility>
|
||||
@@ -236,7 +237,7 @@ void Element::paint(
|
||||
|
||||
//Draw the selection rectangle
|
||||
if ( isSelected() || m_mouse_over ) {
|
||||
drawSelection(painter, options);
|
||||
QGIUtility::drawBoundingRectSelection(this, painter);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,34 +335,6 @@ void Element::drawAxes(
|
||||
|
||||
/*** Methodes privees ***/
|
||||
|
||||
/**
|
||||
Dessine le cadre de selection de l'element de maniere systematiquement non antialiasee.
|
||||
@param painter Le QPainter a utiliser pour dessiner les bornes.
|
||||
@param options Les options de style a prendre en compte
|
||||
*/
|
||||
void Element::drawSelection(
|
||||
QPainter *painter,
|
||||
const QStyleOptionGraphicsItem *options)
|
||||
{
|
||||
Q_UNUSED(options)
|
||||
painter -> save();
|
||||
// Annulation des renderhints
|
||||
painter -> setRenderHint(QPainter::Antialiasing, false);
|
||||
painter -> setRenderHint(QPainter::TextAntialiasing, false);
|
||||
painter -> setRenderHint(QPainter::SmoothPixmapTransform, false);
|
||||
// Dessin du cadre de selection en gris
|
||||
QPen t;
|
||||
t.setColor(Qt::gray);
|
||||
t.setStyle(Qt::DashDotLine);
|
||||
t.setCosmetic(true);
|
||||
painter -> setPen(t);
|
||||
// Le dessin se fait a partir du rectangle delimitant
|
||||
painter -> drawRoundedRect(boundingRect().adjusted(1, 1, -1, -1),
|
||||
10,
|
||||
10);
|
||||
painter -> restore();
|
||||
}
|
||||
|
||||
/**
|
||||
Dessine le cadre de selection de l'element de maniere systematiquement non antialiasee.
|
||||
@param painter Le QPainter a utiliser pour dessiner les bornes.
|
||||
|
||||
@@ -198,9 +198,6 @@ class Element : public QetGraphicsItem
|
||||
void setSize(int, int);
|
||||
|
||||
private:
|
||||
void drawSelection(
|
||||
QPainter *,
|
||||
const QStyleOptionGraphicsItem *);
|
||||
void drawHighlight(
|
||||
QPainter *,
|
||||
const QStyleOptionGraphicsItem *);
|
||||
|
||||
@@ -24,12 +24,31 @@
|
||||
Default constructor
|
||||
@param parent : Parent Item
|
||||
*/
|
||||
void QetGraphicsItem::showItem(QetGraphicsItem *item)
|
||||
{
|
||||
if (item && item->diagram())
|
||||
{
|
||||
item->diagram()->showMe();
|
||||
item->setSelected(true);
|
||||
|
||||
//Zoom to the item
|
||||
for(QGraphicsView *view : item->scene()->views())
|
||||
{
|
||||
QRectF fit = item->sceneBoundingRect();
|
||||
fit.adjust(-200, -200, 200, 200);
|
||||
view->fitInView(fit, Qt::KeepAspectRatioByExpanding);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QetGraphicsItem::QetGraphicsItem(QGraphicsItem *parent):
|
||||
QGraphicsObject(parent),
|
||||
is_movable_(true),
|
||||
m_first_move(true),
|
||||
snap_to_grid_(true)
|
||||
{}
|
||||
{
|
||||
setAcceptHoverEvents(true);
|
||||
}
|
||||
|
||||
QetGraphicsItem::~QetGraphicsItem()
|
||||
{}
|
||||
@@ -68,6 +87,11 @@ bool QetGraphicsItem::isHovered() const {
|
||||
return m_hovered;
|
||||
}
|
||||
|
||||
QPointF QetGraphicsItem::hoverMousePos() const
|
||||
{
|
||||
return m_mouse_hover_pos;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief QetGraphicsItem::state
|
||||
@return the current state of this item
|
||||
@@ -166,6 +190,12 @@ void QetGraphicsItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
QGraphicsObject::hoverEnterEvent(event);
|
||||
}
|
||||
|
||||
void QetGraphicsItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
QGraphicsObject::hoverMoveEvent(event);
|
||||
m_mouse_hover_pos = event->pos();
|
||||
}
|
||||
|
||||
void QetGraphicsItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
m_hovered = false;
|
||||
|
||||
@@ -28,6 +28,9 @@ class QetGraphicsItem : public QGraphicsObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public :
|
||||
static void showItem (QetGraphicsItem *item);
|
||||
|
||||
public:
|
||||
//constructor destructor
|
||||
QetGraphicsItem(QGraphicsItem *parent = nullptr);
|
||||
@@ -43,6 +46,7 @@ class QetGraphicsItem : public QGraphicsObject
|
||||
virtual void setMovable (bool movable) { is_movable_ = movable;}
|
||||
|
||||
bool isHovered() const;
|
||||
QPointF hoverMousePos() const;
|
||||
|
||||
virtual void editProperty () {}
|
||||
virtual QString name ()const
|
||||
@@ -57,6 +61,7 @@ class QetGraphicsItem : public QGraphicsObject
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverMoveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
|
||||
protected:
|
||||
@@ -68,6 +73,7 @@ class QetGraphicsItem : public QGraphicsObject
|
||||
|
||||
private:
|
||||
bool m_hovered{false};
|
||||
QPointF m_mouse_hover_pos;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#include "slaveelement.h"
|
||||
|
||||
#include "../diagram.h"
|
||||
#include "../diagramposition.h"
|
||||
#include "../qetapp.h"
|
||||
#include "dynamicelementtextitem.h"
|
||||
|
||||
/**
|
||||
@@ -33,9 +31,7 @@ SlaveElement::SlaveElement(const ElementsLocation &location,
|
||||
QGraphicsItem *qgi,
|
||||
int *state) :
|
||||
Element(location, qgi, state, Element::Slave)
|
||||
{
|
||||
m_xref_item = nullptr;
|
||||
}
|
||||
{}
|
||||
|
||||
/**
|
||||
@brief SlaveElement::~SlaveElement
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#ifndef SLAVEELEMENT_H
|
||||
#define SLAVEELEMENT_H
|
||||
|
||||
#include "../properties/xrefproperties.h"
|
||||
#include "element.h"
|
||||
|
||||
class SlaveElement : public Element
|
||||
@@ -33,9 +32,6 @@ class SlaveElement : public Element
|
||||
void linkToElement(Element *elmt) override;
|
||||
void unlinkAllElements() override;
|
||||
void unlinkElement(Element *elmt) override;
|
||||
|
||||
private:
|
||||
QGraphicsTextItem *m_xref_item;
|
||||
};
|
||||
|
||||
#endif // SLAVEELEMENT_H
|
||||
|
||||
@@ -142,13 +142,12 @@ void QETMainWindow::initCommonActions()
|
||||
*/
|
||||
void QETMainWindow::initCommonMenus()
|
||||
{
|
||||
settings_menu_ = new QMenu(tr("&Configuration", "window menu"));
|
||||
settings_menu_ = new QMenu(tr("&Configuration", "window menu"), this);
|
||||
settings_menu_ -> addAction(fullscreen_action_);
|
||||
settings_menu_ -> addAction(configure_action_);
|
||||
connect(settings_menu_, SIGNAL(aboutToShow()), this, SLOT(checkToolbarsmenu()));
|
||||
|
||||
|
||||
help_menu_ = new QMenu(tr("&Aide", "window menu"));
|
||||
help_menu_ = new QMenu(tr("&Aide", "window menu"), this);
|
||||
help_menu_ -> addAction(whatsthis_action_);
|
||||
help_menu_ -> addSeparator();
|
||||
help_menu_ -> addAction(manual_online_);
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <QtDebug>
|
||||
#include <utility>
|
||||
|
||||
static int BACKUP_INTERVAL = 120000; //interval in ms of backup = 2min
|
||||
static int BACKUP_INTERVAL = 1200000; //interval in ms of backup = 20min
|
||||
|
||||
/**
|
||||
@brief QETProject::QETProject
|
||||
|
||||
@@ -953,4 +953,93 @@ bool qGraphicsItemPosFromXml(QGraphicsItem *item, const QDomElement &xml_elmt)
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief orientationToAttribute
|
||||
* Write the Qt::orientation has an attribute of @param element.
|
||||
* Attribute name is 'orientation' value is 'horizontal' or 'vertical'
|
||||
* @param orientation
|
||||
* @param element
|
||||
*/
|
||||
void orientationToAttribute(const Qt::Orientation &orientation, QDomElement &element)
|
||||
{
|
||||
element.setAttribute(QStringLiteral("orientation"),
|
||||
orientation == Qt::Horizontal ? QStringLiteral("Horizontal") :
|
||||
QStringLiteral("Vertical"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief orientationFromAttribute
|
||||
* @param element
|
||||
* @param def_value
|
||||
* @return the Qt::Orientation read in @param element. If an error occur
|
||||
* the returned orientation is @param def_value.
|
||||
*/
|
||||
Qt::Orientation orientationFromAttribute(const QDomElement &element, Qt::Orientation def_value)
|
||||
{
|
||||
if (element.hasAttribute(QStringLiteral("orientation"))) {
|
||||
const auto str {element.attribute(QStringLiteral("orientation"))};
|
||||
if (str == QLatin1String("Horizontal"))
|
||||
return Qt::Horizontal;
|
||||
else if (str == QLatin1String("Vertical"))
|
||||
return Qt::Vertical;
|
||||
}
|
||||
//Error occur during reading, we return the default value
|
||||
return def_value;
|
||||
}
|
||||
|
||||
void alignmentToAttribute(const Qt::Alignment &alignment, QDomElement &element)
|
||||
{
|
||||
QStringList al;
|
||||
if (alignment &Qt::AlignLeft)
|
||||
al.append(QStringLiteral("Left"));
|
||||
if (alignment &Qt::AlignRight)
|
||||
al.append(QStringLiteral("Right"));
|
||||
if (alignment &Qt::AlignHCenter)
|
||||
al.append(QStringLiteral("HCenter"));
|
||||
if (alignment &Qt::AlignJustify)
|
||||
al.append(QStringLiteral("Justify"));
|
||||
if (alignment &Qt::AlignTop)
|
||||
al.append(QStringLiteral("Top"));
|
||||
if (alignment &Qt::AlignBottom)
|
||||
al.append(QStringLiteral("Bottom"));
|
||||
if (alignment &Qt::AlignBottom)
|
||||
al.append(QStringLiteral("VCenter"));
|
||||
if (alignment &Qt::AlignBaseline)
|
||||
al.append(QStringLiteral("Baseline"));
|
||||
|
||||
element.setAttribute(QStringLiteral("alignment"),al.join(QStringLiteral(" ")));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief alignmentFromAttribute
|
||||
* @param element
|
||||
* @return The alignment read in @param element. If an error
|
||||
* occured the return Qt::alignment contain no set flag.
|
||||
*/
|
||||
Qt::Alignment alignmentFromAttribute(const QDomElement &element)
|
||||
{
|
||||
Qt::Alignment al;
|
||||
if (element.hasAttribute(QStringLiteral("alignment"))) {
|
||||
const auto alignment {element.attribute(QStringLiteral("alignment"))};
|
||||
if(alignment.contains(QStringLiteral("Left")))
|
||||
al = al | Qt::AlignLeft;
|
||||
if(alignment.contains(QStringLiteral("Right")))
|
||||
al = al | Qt::AlignRight;
|
||||
if(alignment.contains(QStringLiteral("HCenter")))
|
||||
al = al | Qt::AlignHCenter;
|
||||
if(alignment.contains(QStringLiteral("Justify")))
|
||||
al = al | Qt::AlignJustify;
|
||||
if(alignment.contains(QStringLiteral("Top")))
|
||||
al = al | Qt::AlignTop;
|
||||
if(alignment.contains(QStringLiteral("Bottom")))
|
||||
al = al | Qt::AlignBottom;
|
||||
if(alignment.contains(QStringLiteral("VCenter")))
|
||||
al = al | Qt::AlignVCenter;
|
||||
if(alignment.contains(QStringLiteral("Baseline")))
|
||||
al = al | Qt::AlignBaseline;
|
||||
}
|
||||
|
||||
return al;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -94,6 +94,12 @@ namespace QETXML
|
||||
QDomElement qGraphicsItemPosToXml(QGraphicsItem *item, QDomDocument &document);
|
||||
bool qGraphicsItemPosFromXml(QGraphicsItem *item, const QDomElement &xml_elmt);
|
||||
|
||||
void orientationToAttribute(const Qt::Orientation &orientation, QDomElement &element);
|
||||
Qt::Orientation orientationFromAttribute(const QDomElement &element, Qt::Orientation def_value = Qt::Vertical);
|
||||
|
||||
void alignmentToAttribute(const Qt::Alignment &alignment, QDomElement &element);
|
||||
Qt::Alignment alignmentFromAttribute (const QDomElement &element);
|
||||
|
||||
QString boolToString(bool value);
|
||||
bool boolFromString(const QString &value,
|
||||
bool default_value = true,
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
QElectroTech is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "qetsvg.h"
|
||||
|
||||
#include <QDomDocument>
|
||||
#include <QRect>
|
||||
#include <../qet.h>
|
||||
|
||||
/**
|
||||
* @brief QETSVG::rectToElmt
|
||||
* Write a QRect as a svg rect element.
|
||||
* @param rect
|
||||
* @param parent_document
|
||||
* @return
|
||||
*/
|
||||
QDomElement QETSVG::rectToElmt(const QRectF &rect, QDomDocument &parent_document)
|
||||
{
|
||||
auto dom_element = parent_document.createElement(QStringLiteral("rect"));
|
||||
if (!rect.isNull()) {
|
||||
dom_element.setAttribute(QStringLiteral("x"), rect.x());
|
||||
yToAttribute(rect.y(), dom_element);
|
||||
dom_element.setAttribute(QStringLiteral("width"), rect.width());
|
||||
heightToAttribute(rect.height(), dom_element);
|
||||
}
|
||||
return dom_element;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QETSVG::rectFromElmt
|
||||
* @param xml_element : xml_element of an svg rect.
|
||||
* The tag name must be 'rect' if not, the returned QRect is null.
|
||||
* @return a svg rect to QRect
|
||||
*/
|
||||
QRectF QETSVG::rectFromElmt(const QDomElement &xml_element)
|
||||
{
|
||||
QRectF rect_;
|
||||
if (xml_element.tagName() == QLatin1String("rect")) {
|
||||
rect_.setRect(xml_element.attribute(QStringLiteral("x"), QStringLiteral("0")).toDouble(),
|
||||
yFromAttribute(xml_element, 0),
|
||||
xml_element.attribute(QStringLiteral("width"), QStringLiteral("10")).toDouble(),
|
||||
heightFromAttribute(xml_element, 10));
|
||||
}
|
||||
return rect_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QETSVG::yToAttribute
|
||||
* @param y
|
||||
* @param xml_element
|
||||
*/
|
||||
void QETSVG::yToAttribute(const qreal &y, QDomElement &xml_element) {
|
||||
xml_element.setAttribute(QStringLiteral("y"), QString::number(y));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QETSVG::yFromAttribute
|
||||
* @param xml_element
|
||||
* @param def_value
|
||||
* @return
|
||||
*/
|
||||
qreal QETSVG::yFromAttribute(const QDomElement &xml_element, const qreal &def_value) {
|
||||
qreal value_;
|
||||
if (QET::attributeIsAReal(xml_element, QStringLiteral("y"), &value_)) {
|
||||
return value_;
|
||||
}
|
||||
return def_value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QETSVG::heightToAttribute
|
||||
* @param height
|
||||
* @param xml_element
|
||||
*/
|
||||
void QETSVG::heightToAttribute(const qreal &height, QDomElement &xml_element) {
|
||||
xml_element.setAttribute(QStringLiteral("height"), QString::number(height));
|
||||
}
|
||||
|
||||
qreal QETSVG::heightFromAttribute(const QDomElement &xml_element, const qreal &def_value) {
|
||||
qreal value_;
|
||||
if (QET::attributeIsAReal(xml_element, QStringLiteral("height"), &value_)) {
|
||||
return value_;
|
||||
}
|
||||
return def_value;
|
||||
}
|
||||
|
||||
void QETSVG::rToAttribute(const qreal &r, QDomElement &xml_element) {
|
||||
xml_element.setAttribute(QStringLiteral("r"), QString::number(r));
|
||||
}
|
||||
|
||||
qreal QETSVG::rFromAttribute(const QDomElement &xml_element, const qreal &def_value) {
|
||||
qreal value_;
|
||||
if (QET::attributeIsAReal(xml_element, QStringLiteral("r"), &value_)) {
|
||||
return value_;
|
||||
}
|
||||
return def_value;
|
||||
|
||||
}
|
||||
|
||||
void QETSVG::pointsToAttribute(const QVector<QPointF> &points, QDomElement &xml_element)
|
||||
{
|
||||
QStringList strl_;
|
||||
for (const auto &point : points) {
|
||||
strl_.append(QString::number(point.x()) +
|
||||
QString(",") +
|
||||
QString::number(point.y()));
|
||||
}
|
||||
|
||||
xml_element.setAttribute(QStringLiteral("points"), strl_.join(" "));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QETSVG::pointsFromAttribute
|
||||
* @param xml_element
|
||||
* @return a vector of points stored in attribute 'points' of @xml_element.
|
||||
* The returned vector can be empty.
|
||||
*/
|
||||
QVector<QPointF> QETSVG::pointsFromAttribute(const QDomElement &xml_element)
|
||||
{
|
||||
QVector<QPointF> vector_;
|
||||
if (const auto string_points = xml_element.attribute(QStringLiteral("points")).split(QStringLiteral(" ")) ;
|
||||
!string_points.isEmpty()) {
|
||||
bool x_ok, y_ok; for (const auto &point : string_points) {
|
||||
const auto string_x_y = point.split(QStringLiteral(","));
|
||||
if (string_x_y.size() == 2) {
|
||||
const auto x = string_x_y[0].toDouble(&x_ok);
|
||||
const auto y = string_x_y[1].toDouble(&y_ok);
|
||||
if (x_ok && y_ok) {
|
||||
vector_.append(QPointF{x,y});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return vector_;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
QElectroTech is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef QETSVG_H
|
||||
#define QETSVG_H
|
||||
|
||||
#include <QDomElement>
|
||||
|
||||
class QDomDocument;
|
||||
class QPointF;
|
||||
class QRectF;
|
||||
|
||||
/**
|
||||
* @namespace QETSVG
|
||||
* @brief the QETSVG namespace provide function read and write svg.
|
||||
* Some function work on xml element (ex rect) and some other
|
||||
* work on attribute of an element (ex x)
|
||||
*/
|
||||
namespace QETSVG
|
||||
{
|
||||
QDomElement rectToElmt(const QRectF &rect, QDomDocument &parent_document);
|
||||
QRectF rectFromElmt(const QDomElement &xml_element);
|
||||
|
||||
void yToAttribute(const qreal &y, QDomElement &xml_element);
|
||||
qreal yFromAttribute(const QDomElement &xml_element, const qreal &def_value=0);
|
||||
|
||||
void heightToAttribute(const qreal &height, QDomElement &xml_element);
|
||||
qreal heightFromAttribute(const QDomElement &xml_element, const qreal &def_value=10);
|
||||
|
||||
void rToAttribute(const qreal &r, QDomElement &xml_element);
|
||||
qreal rFromAttribute(const QDomElement &xml_element, const qreal &def_value=1);
|
||||
|
||||
void pointsToAttribute(const QVector<QPointF> &points, QDomElement &xml_element);
|
||||
QVector<QPointF> pointsFromAttribute (const QDomElement &xml_element);
|
||||
}
|
||||
|
||||
#endif // QETSVG_H
|
||||
@@ -437,8 +437,8 @@ void QETTitleBlockTemplateEditor::initActions()
|
||||
*/
|
||||
void QETTitleBlockTemplateEditor::initMenus()
|
||||
{
|
||||
file_menu_ = new QMenu(tr("&Fichier", "menu title"), this);
|
||||
edit_menu_ = new QMenu(tr("&Édition", "menu title"), this);
|
||||
file_menu_ = new QMenu(tr("&Fichier", "menu title"), this);
|
||||
edit_menu_ = new QMenu(tr("&Édition", "menu title"), this);
|
||||
display_menu_ = new QMenu(tr("Afficha&ge", "menu title"), this);
|
||||
|
||||
file_menu_ -> addAction(new_);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "../../qeticons.h"
|
||||
#include "ui_generalconfigurationpage.h"
|
||||
#include "../../utils/qetsettings.h"
|
||||
#include "../../qetmessagebox.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QFontDialog>
|
||||
@@ -83,7 +84,6 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) :
|
||||
ui->m_use_gesture_trackpad->setChecked(settings.value("diagramview/gestures", false).toBool());
|
||||
ui->m_save_label_paste->setChecked(settings.value("diagramcommands/erase-label-on-copy", true).toBool());
|
||||
ui->m_use_folio_label->setChecked(settings.value("genericpanel/folio", true).toBool());
|
||||
ui->m_export_terminal->setChecked(settings.value("nomenclature-exportlist", true).toBool());
|
||||
ui->m_border_0->setChecked(settings.value("border-columns_0", false).toBool());
|
||||
ui->m_autosave_sb->setValue(settings.value("diagrameditor/autosave-interval", 0).toInt());
|
||||
|
||||
@@ -224,9 +224,6 @@ void GeneralConfigurationPage::applyConf()
|
||||
//GENERIC PANEL
|
||||
settings.setValue("genericpanel/folio",ui->m_use_folio_label->isChecked());
|
||||
|
||||
//NOMENCLATURE
|
||||
settings.setValue("nomenclature/terminal-exportlist",ui->m_export_terminal->isChecked());
|
||||
|
||||
|
||||
//DIAGRAM EDITOR
|
||||
QString view_mode = ui->m_use_tab_mode_rb->isChecked() ? "tabbed" : "windowed";
|
||||
@@ -564,3 +561,29 @@ void GeneralConfigurationPage::on_ElementEditor_Grid_PointSize_min_sb_valueChang
|
||||
{
|
||||
ui->ElementEditor_Grid_PointSize_max_sb->setMinimum(std::max(1, value));
|
||||
}
|
||||
|
||||
void GeneralConfigurationPage::on_m_hdpi_round_cb_clicked(bool checked)
|
||||
{
|
||||
if (checked) {
|
||||
if (QMessageBox::Cancel == QET::QetMessageBox::warning(
|
||||
this,
|
||||
tr("Fonctionnalité expérimental"),
|
||||
tr("AVERTISSEMENT :\n"
|
||||
"Toutes valeurs autre que ‘Pas d’arrondi’ peut causer des erreurs de rendu "
|
||||
"du projet en fonction de :\n\n"
|
||||
"1 - la valeur sélectionnée \n"
|
||||
"2 - du dpi de l'écran \n"
|
||||
"3 - Modifier le projet sur un autre ordinateur et/ou écran n'ayant pas les mêmes paramètres des points 1 et 2."),
|
||||
QMessageBox::StandardButton::Cancel|QMessageBox::StandardButton::Ok,
|
||||
QMessageBox::StandardButton::Cancel
|
||||
)) {
|
||||
ui->m_hdpi_round_cb->blockSignals(true);
|
||||
ui->m_hdpi_round_cb->setChecked(false);
|
||||
ui->m_hdpi_round_cb->blockSignals(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
ui->m_hdpi_round_label->setEnabled(checked);
|
||||
ui->m_hdpi_round_policy_cb->setEnabled(checked);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ class GeneralConfigurationPage : public ConfigPage
|
||||
void on_DiagramEditor_Grid_PointSize_min_sb_valueChanged(int value);
|
||||
void on_ElementEditor_Grid_PointSize_min_sb_valueChanged(int value);
|
||||
|
||||
void on_m_hdpi_round_cb_clicked(bool checked);
|
||||
|
||||
private:
|
||||
void fillLang();
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user