mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-20 15:24:14 +02:00
Compare commits
21 Commits
c3b0e6725e
...
918756a91a
| Author | SHA1 | Date | |
|---|---|---|---|
| 918756a91a | |||
| 7a73e8075f | |||
| 53a0f07ca3 | |||
| 864e651966 | |||
| 26285373a3 | |||
| b4fcef1829 | |||
| 9519b70826 | |||
| 218e70c759 | |||
| 26c0fc9812 | |||
| 8c135a009d | |||
| 261b0f9e12 | |||
| 1183849ce2 | |||
| 2b30083193 | |||
| 863ac5f0ae | |||
| 6a84ada6a6 | |||
| b7f516d485 | |||
| 8ef130a59d | |||
| 7a85e2592c | |||
| 7183ed3d99 | |||
| a106395679 | |||
| 72c8008218 |
@@ -0,0 +1,79 @@
|
|||||||
|
# Linux build, unit tests, and the IPC open-forwarding regression gate.
|
||||||
|
#
|
||||||
|
# The existing workflows build Windows and generate documentation; nothing
|
||||||
|
# builds QElectroTech on Linux or runs tests/ in CI. This does both.
|
||||||
|
#
|
||||||
|
# It runs inside an ubuntu:26.04 container rather than directly on the runner
|
||||||
|
# because the IPC gate below needs Qt 6.10.2. The ubuntu-latest image ships
|
||||||
|
# Qt 6.4, and whether the crash that gate covers reproduces on 6.4 has never
|
||||||
|
# been checked -- a gate that cannot go red is worse than no gate.
|
||||||
|
name: Linux build and tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
linux:
|
||||||
|
name: Build and test (Qt 6, Debug)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: ubuntu:26.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install build and test dependencies
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
ca-certificates build-essential cmake ninja-build git pkg-config \
|
||||||
|
qt6-base-dev qt6-base-private-dev qt6-tools-dev qt6-tools-dev-tools \
|
||||||
|
libqt6svg6-dev libqt6sql6-sqlite libsqlite3-dev libcups2-dev \
|
||||||
|
libxkbcommon-x11-0 \
|
||||||
|
xvfb openbox xdotool x11-utils
|
||||||
|
# extra-cmake-modules and the KF6 libraries are installed rather than
|
||||||
|
# left to FetchContent: without them CMake builds extra-cmake-modules
|
||||||
|
# from source, and its Qt Help documentation target then demands
|
||||||
|
# Qt6{Core,Gui,Widgets,DBus}Tools, failing the configure with an error
|
||||||
|
# that appears to be about QElectroTech and is not.
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
extra-cmake-modules libkf6coreaddons-dev libkf6widgetsaddons-dev \
|
||||||
|
qt6-svg-plugins
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
# Debug, not Release. Whether a use-after-free faults depends on what
|
||||||
|
# the allocator does with the freed block: the commit before #868
|
||||||
|
# crashes every time built Debug and survives every time built
|
||||||
|
# -O3 -DNDEBUG, so a Release job would never catch a regression here.
|
||||||
|
run: |
|
||||||
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||||
|
cmake -B build -G Ninja \
|
||||||
|
-DCMAKE_BUILD_TYPE=Debug \
|
||||||
|
-DQT_VERSION_MAJOR=6
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build --parallel $(nproc)
|
||||||
|
|
||||||
|
- name: Unit tests
|
||||||
|
run: xvfb-run -a ctest --test-dir build --output-on-failure
|
||||||
|
|
||||||
|
- name: IPC open-forwarding regression (#868)
|
||||||
|
# Fails the job only on an actual crash. An inconclusive run means the
|
||||||
|
# crash path was not exercised -- it proves nothing, which is not the
|
||||||
|
# same as a regression, and failing on it would make this job flaky
|
||||||
|
# rather than informative.
|
||||||
|
run: |
|
||||||
|
set +e
|
||||||
|
tests/ipc-regression/run.sh --binary build/qelectrotech
|
||||||
|
status=$?
|
||||||
|
set -e
|
||||||
|
case $status in
|
||||||
|
0) echo "::notice::IPC gate passed" ;;
|
||||||
|
2) echo "::warning::IPC gate inconclusive -- the crash path was not exercised, nothing was proven" ;;
|
||||||
|
*) echo "::error::IPC gate failed -- forwarded files are being opened inside the socket handler again"
|
||||||
|
exit 1 ;;
|
||||||
|
esac
|
||||||
@@ -42,6 +42,9 @@ jobs:
|
|||||||
pages: write
|
pages: write
|
||||||
id-token: write # Required by SignPath
|
id-token: write # Required by SignPath
|
||||||
|
|
||||||
|
env:
|
||||||
|
SIGNPATH_API_TOKEN: ${{ secrets.SIGNPATH_API_TOKEN }}
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
qt6_msi: ${{ steps.export.outputs.msi_name_qt6 }}
|
qt6_msi: ${{ steps.export.outputs.msi_name_qt6 }}
|
||||||
|
|
||||||
@@ -290,7 +293,8 @@ jobs:
|
|||||||
# PR/run must never attempt a signing request.
|
# PR/run must never attempt a signing request.
|
||||||
# (cf. DieterMayerOSS:fix/msi-signing-fork-guard, d3f60c88)
|
# (cf. DieterMayerOSS:fix/msi-signing-fork-guard, d3f60c88)
|
||||||
- name: Sign MSI via SignPath
|
- name: Sign MSI via SignPath
|
||||||
if: github.repository == 'qelectrotech/qelectrotech-source-mirror'
|
id: sign
|
||||||
|
if: github.repository == 'qelectrotech/qelectrotech-source-mirror' && env.SIGNPATH_API_TOKEN != ''
|
||||||
uses: signpath/github-action-submit-signing-request@v2
|
uses: signpath/github-action-submit-signing-request@v2
|
||||||
with:
|
with:
|
||||||
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
|
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
|
||||||
@@ -345,7 +349,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
Write-Host "=== MSI build summary (${{ matrix.flavor }}) ==="
|
Write-Host "=== MSI build summary (${{ matrix.flavor }}) ==="
|
||||||
Write-Host "Version : ${{ steps.version.outputs.VERSION_DISPLAY }}"
|
Write-Host "Version : ${{ steps.version.outputs.VERSION_DISPLAY }}"
|
||||||
Write-Host "Signed : true"
|
Write-Host "Signed : ${{ steps.sign.outcome == 'success' }}"
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Job 2 : Génère et déploie la page GitHub Pages une fois le MSI publié,
|
# Job 2 : Génère et déploie la page GitHub Pages une fois le MSI publié,
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ if(WIN32)
|
|||||||
${QET_SRC_FILES}
|
${QET_SRC_FILES}
|
||||||
${QM_FILES}
|
${QM_FILES}
|
||||||
${QET_DIR}/qelectrotech.qrc
|
${QET_DIR}/qelectrotech.qrc
|
||||||
|
${QET_DIR}/ico/icon-themes.qrc
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
add_executable(
|
add_executable(
|
||||||
@@ -147,6 +148,7 @@ else()
|
|||||||
${QET_SRC_FILES}
|
${QET_SRC_FILES}
|
||||||
${QM_FILES}
|
${QM_FILES}
|
||||||
${QET_DIR}/qelectrotech.qrc
|
${QET_DIR}/qelectrotech.qrc
|
||||||
|
${QET_DIR}/ico/icon-themes.qrc
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,285 @@
|
|||||||
|
<!DOCTYPE RCC>
|
||||||
|
<!-- Generated by misc/make_icon_themes.py. Do not edit. -->
|
||||||
|
<RCC version="1.0">
|
||||||
|
<qresource prefix="/ico">
|
||||||
|
<file>themes/qet/index.theme</file>
|
||||||
|
<file alias="themes/qet/16x16/application-exit.png">16x16/application-exit.png</file>
|
||||||
|
<file alias="themes/qet/16x16/arrow-left-double.png">16x16/arrow-left-double.png</file>
|
||||||
|
<file alias="themes/qet/16x16/arrow-left.png">16x16/arrow-left.png</file>
|
||||||
|
<file alias="themes/qet/16x16/arrow-right-double.png">16x16/arrow-right-double.png</file>
|
||||||
|
<file alias="themes/qet/16x16/arrow-right.png">16x16/arrow-right.png</file>
|
||||||
|
<file alias="themes/qet/16x16/circle.png">16x16/circle.png</file>
|
||||||
|
<file alias="themes/qet/16x16/conductor-edit.png">16x16/conductor-edit.png</file>
|
||||||
|
<file alias="themes/qet/16x16/conductor-reset.png">16x16/conductor-reset.png</file>
|
||||||
|
<file alias="themes/qet/16x16/conductor.png">16x16/conductor.png</file>
|
||||||
|
<file alias="themes/qet/16x16/configure-toolbars.png">16x16/configure-toolbars.png</file>
|
||||||
|
<file alias="themes/qet/16x16/configure.png">16x16/configure.png</file>
|
||||||
|
<file alias="themes/qet/16x16/diagram.png">16x16/diagram.png</file>
|
||||||
|
<file alias="themes/qet/16x16/dialog-cancel.png">16x16/dialog-cancel.png</file>
|
||||||
|
<file alias="themes/qet/16x16/dialog-ok.png">16x16/dialog-ok.png</file>
|
||||||
|
<file alias="themes/qet/16x16/document-close.png">16x16/document-close.png</file>
|
||||||
|
<file alias="themes/qet/16x16/document-export.png">16x16/document-export.png</file>
|
||||||
|
<file alias="themes/qet/16x16/document-import.png">16x16/document-import.png</file>
|
||||||
|
<file alias="themes/qet/16x16/document-new.png">16x16/document-new.png</file>
|
||||||
|
<file alias="themes/qet/16x16/document-open-recent.png">16x16/document-open-recent.png</file>
|
||||||
|
<file alias="themes/qet/16x16/document-open.png">16x16/document-open.png</file>
|
||||||
|
<file alias="themes/qet/16x16/document-print-frame.png">16x16/document-print-frame.png</file>
|
||||||
|
<file alias="themes/qet/16x16/document-print.png">16x16/document-print.png</file>
|
||||||
|
<file alias="themes/qet/16x16/document-save-all.png">16x16/document-save-all.png</file>
|
||||||
|
<file alias="themes/qet/16x16/document-save-as.png">16x16/document-save-as.png</file>
|
||||||
|
<file alias="themes/qet/16x16/document-save.png">16x16/document-save.png</file>
|
||||||
|
<file alias="themes/qet/16x16/east.png">16x16/east.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-clear-locationbar-ltr.png">16x16/edit-clear-locationbar-ltr.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-clear-locationbar-rtl.png">16x16/edit-clear-locationbar-rtl.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-clear.png">16x16/edit-clear.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-copy.png">16x16/edit-copy.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-cut.png">16x16/edit-cut.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-delete.png">16x16/edit-delete.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-download.png">16x16/edit-download.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-paste.png">16x16/edit-paste.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-redo.png">16x16/edit-redo.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-rename.png">16x16/edit-rename.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-select-all.png">16x16/edit-select-all.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-select-invert.png">16x16/edit-select-invert.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-select-none.png">16x16/edit-select-none.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-table-cell-merge.png">16x16/edit-table-cell-merge.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-table-cell-split.png">16x16/edit-table-cell-split.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-table-delete-column.png">16x16/edit-table-delete-column.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-table-delete-row.png">16x16/edit-table-delete-row.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-table-insert-column-left.png">16x16/edit-table-insert-column-left.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-table-insert-column-right.png">16x16/edit-table-insert-column-right.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-table-insert-row-above.png">16x16/edit-table-insert-row-above.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-table-insert-row-under.png">16x16/edit-table-insert-row-under.png</file>
|
||||||
|
<file alias="themes/qet/16x16/edit-undo.png">16x16/edit-undo.png</file>
|
||||||
|
<file alias="themes/qet/16x16/element-delete.png">16x16/element-delete.png</file>
|
||||||
|
<file alias="themes/qet/16x16/element-edit.png">16x16/element-edit.png</file>
|
||||||
|
<file alias="themes/qet/16x16/element-master.png">16x16/element-master.png</file>
|
||||||
|
<file alias="themes/qet/16x16/element-new.png">16x16/element-new.png</file>
|
||||||
|
<file alias="themes/qet/16x16/element-slave.png">16x16/element-slave.png</file>
|
||||||
|
<file alias="themes/qet/16x16/element.png">16x16/element.png</file>
|
||||||
|
<file alias="themes/qet/16x16/endline-circle.png">16x16/endline-circle.png</file>
|
||||||
|
<file alias="themes/qet/16x16/endline-diamond.png">16x16/endline-diamond.png</file>
|
||||||
|
<file alias="themes/qet/16x16/endline-none.png">16x16/endline-none.png</file>
|
||||||
|
<file alias="themes/qet/16x16/endline-simple.png">16x16/endline-simple.png</file>
|
||||||
|
<file alias="themes/qet/16x16/endline-triangle.png">16x16/endline-triangle.png</file>
|
||||||
|
<file alias="themes/qet/16x16/export-csv.png">16x16/export-csv.png</file>
|
||||||
|
<file alias="themes/qet/16x16/flip.png">16x16/flip.png</file>
|
||||||
|
<file alias="themes/qet/16x16/folder-delete.png">16x16/folder-delete.png</file>
|
||||||
|
<file alias="themes/qet/16x16/folder-edit.png">16x16/folder-edit.png</file>
|
||||||
|
<file alias="themes/qet/16x16/folder-new.png">16x16/folder-new.png</file>
|
||||||
|
<file alias="themes/qet/16x16/folder-only-this.png">16x16/folder-only-this.png</file>
|
||||||
|
<file alias="themes/qet/16x16/folder-open.png">16x16/folder-open.png</file>
|
||||||
|
<file alias="themes/qet/16x16/folder-properties.png">16x16/folder-properties.png</file>
|
||||||
|
<file alias="themes/qet/16x16/folder-show-all.png">16x16/folder-show-all.png</file>
|
||||||
|
<file alias="themes/qet/16x16/folder.png">16x16/folder.png</file>
|
||||||
|
<file alias="themes/qet/16x16/folio-delete.png">16x16/folio-delete.png</file>
|
||||||
|
<file alias="themes/qet/16x16/folio-new.png">16x16/folio-new.png</file>
|
||||||
|
<file alias="themes/qet/16x16/folio-properties.png">16x16/folio-properties.png</file>
|
||||||
|
<file alias="themes/qet/16x16/folio-ref-coming.png">16x16/folio-ref-coming.png</file>
|
||||||
|
<file alias="themes/qet/16x16/go-bottom.png">16x16/go-bottom.png</file>
|
||||||
|
<file alias="themes/qet/16x16/go-company.png">16x16/go-company.png</file>
|
||||||
|
<file alias="themes/qet/16x16/go-down-double.png">16x16/go-down-double.png</file>
|
||||||
|
<file alias="themes/qet/16x16/go-down.png">16x16/go-down.png</file>
|
||||||
|
<file alias="themes/qet/16x16/go-home.png">16x16/go-home.png</file>
|
||||||
|
<file alias="themes/qet/16x16/go-top.png">16x16/go-top.png</file>
|
||||||
|
<file alias="themes/qet/16x16/go-up-double.png">16x16/go-up-double.png</file>
|
||||||
|
<file alias="themes/qet/16x16/go-up.png">16x16/go-up.png</file>
|
||||||
|
<file alias="themes/qet/16x16/grid.png">16x16/grid.png</file>
|
||||||
|
<file alias="themes/qet/16x16/ground.png">16x16/ground.png</file>
|
||||||
|
<file alias="themes/qet/16x16/help-contents.png">16x16/help-contents.png</file>
|
||||||
|
<file alias="themes/qet/16x16/help-donate.png">16x16/help-donate.png</file>
|
||||||
|
<file alias="themes/qet/16x16/item-cancel.png">16x16/item-cancel.png</file>
|
||||||
|
<file alias="themes/qet/16x16/item-copy.png">16x16/item-copy.png</file>
|
||||||
|
<file alias="themes/qet/16x16/item-move.png">16x16/item-move.png</file>
|
||||||
|
<file alias="themes/qet/16x16/kdenlive-show-video.png">16x16/kdenlive-show-video.png</file>
|
||||||
|
<file alias="themes/qet/16x16/label.png">16x16/label.png</file>
|
||||||
|
<file alias="themes/qet/16x16/list-add.png">16x16/list-add.png</file>
|
||||||
|
<file alias="themes/qet/16x16/list-remove.png">16x16/list-remove.png</file>
|
||||||
|
<file alias="themes/qet/16x16/masquer.png">16x16/masquer.png</file>
|
||||||
|
<file alias="themes/qet/16x16/mirror.png">16x16/mirror.png</file>
|
||||||
|
<file alias="themes/qet/16x16/move.png">16x16/move.png</file>
|
||||||
|
<file alias="themes/qet/16x16/neutral.png">16x16/neutral.png</file>
|
||||||
|
<file alias="themes/qet/16x16/north.png">16x16/north.png</file>
|
||||||
|
<file alias="themes/qet/16x16/object-group.png">16x16/object-group.png</file>
|
||||||
|
<file alias="themes/qet/16x16/object-rotate-right.png">16x16/object-rotate-right.png</file>
|
||||||
|
<file alias="themes/qet/16x16/orientations.png">16x16/orientations.png</file>
|
||||||
|
<file alias="themes/qet/16x16/phase.png">16x16/phase.png</file>
|
||||||
|
<file alias="themes/qet/16x16/preferences-desktop-user.png">16x16/preferences-desktop-user.png</file>
|
||||||
|
<file alias="themes/qet/16x16/project-close.png">16x16/project-close.png</file>
|
||||||
|
<file alias="themes/qet/16x16/project-delete.png">16x16/project-delete.png</file>
|
||||||
|
<file alias="themes/qet/16x16/project-new.png">16x16/project-new.png</file>
|
||||||
|
<file alias="themes/qet/16x16/project-properties.png">16x16/project-properties.png</file>
|
||||||
|
<file alias="themes/qet/16x16/project.png">16x16/project.png</file>
|
||||||
|
<file alias="themes/qet/16x16/qet.png">16x16/qet.png</file>
|
||||||
|
<file alias="themes/qet/16x16/qt.png">16x16/qt.png</file>
|
||||||
|
<file alias="themes/qet/16x16/run-dxf.png">16x16/run-dxf.png</file>
|
||||||
|
<file alias="themes/qet/16x16/select.png">16x16/select.png</file>
|
||||||
|
<file alias="themes/qet/16x16/south.png">16x16/south.png</file>
|
||||||
|
<file alias="themes/qet/16x16/table-of-content.png">16x16/table-of-content.png</file>
|
||||||
|
<file alias="themes/qet/16x16/terminal.png">16x16/terminal.png</file>
|
||||||
|
<file alias="themes/qet/16x16/terminalstrip.png">16x16/terminalstrip.png</file>
|
||||||
|
<file alias="themes/qet/16x16/text-xml.png">16x16/text-xml.png</file>
|
||||||
|
<file alias="themes/qet/16x16/transform-rotate.png">16x16/transform-rotate.png</file>
|
||||||
|
<file alias="themes/qet/16x16/user-busy.png">16x16/user-busy.png</file>
|
||||||
|
<file alias="themes/qet/16x16/user-online.png">16x16/user-online.png</file>
|
||||||
|
<file alias="themes/qet/16x16/view-fullscreen.png">16x16/view-fullscreen.png</file>
|
||||||
|
<file alias="themes/qet/16x16/view-refresh.png">16x16/view-refresh.png</file>
|
||||||
|
<file alias="themes/qet/16x16/view-restore.png">16x16/view-restore.png</file>
|
||||||
|
<file alias="themes/qet/16x16/west.png">16x16/west.png</file>
|
||||||
|
<file alias="themes/qet/16x16/window-new.png">16x16/window-new.png</file>
|
||||||
|
<file alias="themes/qet/16x16/zoom-draw.png">16x16/zoom-draw.png</file>
|
||||||
|
<file alias="themes/qet/16x16/zoom-fit-best.png">16x16/zoom-fit-best.png</file>
|
||||||
|
<file alias="themes/qet/16x16/zoom-in.png">16x16/zoom-in.png</file>
|
||||||
|
<file alias="themes/qet/16x16/zoom-original.png">16x16/zoom-original.png</file>
|
||||||
|
<file alias="themes/qet/16x16/zoom-out.png">16x16/zoom-out.png</file>
|
||||||
|
<file alias="themes/qet/22x22/Actions-player-time-icon.png">22x22/Actions-player-time-icon.png</file>
|
||||||
|
<file alias="themes/qet/22x22/all_pages.png">22x22/all_pages.png</file>
|
||||||
|
<file alias="themes/qet/22x22/application-exit.png">22x22/application-exit.png</file>
|
||||||
|
<file alias="themes/qet/22x22/applications-development-translation.png">22x22/applications-development-translation.png</file>
|
||||||
|
<file alias="themes/qet/22x22/arc.png">22x22/arc.png</file>
|
||||||
|
<file alias="themes/qet/22x22/arrow-left-double.png">22x22/arrow-left-double.png</file>
|
||||||
|
<file alias="themes/qet/22x22/arrow-left.png">22x22/arrow-left.png</file>
|
||||||
|
<file alias="themes/qet/22x22/arrow-right-double.png">22x22/arrow-right-double.png</file>
|
||||||
|
<file alias="themes/qet/22x22/arrow-right.png">22x22/arrow-right.png</file>
|
||||||
|
<file alias="themes/qet/22x22/autoconnect.png">22x22/autoconnect.png</file>
|
||||||
|
<file alias="themes/qet/22x22/bring_forward.png">22x22/bring_forward.png</file>
|
||||||
|
<file alias="themes/qet/22x22/conductor2.png">22x22/conductor2.png</file>
|
||||||
|
<file alias="themes/qet/22x22/conductor-reset.png">22x22/conductor2.png</file>
|
||||||
|
<file alias="themes/qet/22x22/configure-toolbars.png">22x22/configure-toolbars.png</file>
|
||||||
|
<file alias="themes/qet/22x22/configure.png">22x22/configure.png</file>
|
||||||
|
<file alias="themes/qet/22x22/diagram.png">22x22/diagram.png</file>
|
||||||
|
<file alias="themes/qet/22x22/diagram_add.png">22x22/diagram_add.png</file>
|
||||||
|
<file alias="themes/qet/22x22/folio-new.png">22x22/diagram_add.png</file>
|
||||||
|
<file alias="themes/qet/22x22/diagram_bg.png">22x22/diagram_bg.png</file>
|
||||||
|
<file alias="themes/qet/22x22/diagram_del.png">22x22/diagram_del.png</file>
|
||||||
|
<file alias="themes/qet/22x22/folio-delete.png">22x22/diagram_del.png</file>
|
||||||
|
<file alias="themes/qet/22x22/dialog-cancel.png">22x22/dialog-cancel.png</file>
|
||||||
|
<file alias="themes/qet/22x22/dialog-information.png">22x22/dialog-information.png</file>
|
||||||
|
<file alias="themes/qet/22x22/folio-properties.png">22x22/dialog-information.png</file>
|
||||||
|
<file alias="themes/qet/22x22/dialog-ok.png">22x22/dialog-ok.png</file>
|
||||||
|
<file alias="themes/qet/22x22/document-close.png">22x22/document-close.png</file>
|
||||||
|
<file alias="themes/qet/22x22/document-export.png">22x22/document-export.png</file>
|
||||||
|
<file alias="themes/qet/22x22/document-import.png">22x22/document-import.png</file>
|
||||||
|
<file alias="themes/qet/22x22/document-new.png">22x22/document-new.png</file>
|
||||||
|
<file alias="themes/qet/22x22/document-open-recent.png">22x22/document-open-recent.png</file>
|
||||||
|
<file alias="themes/qet/22x22/document-open.png">22x22/document-open.png</file>
|
||||||
|
<file alias="themes/qet/22x22/document-print-frame.png">22x22/document-print-frame.png</file>
|
||||||
|
<file alias="themes/qet/22x22/document-print.png">22x22/document-print.png</file>
|
||||||
|
<file alias="themes/qet/22x22/document-save-all.png">22x22/document-save-all.png</file>
|
||||||
|
<file alias="themes/qet/22x22/document-save-as.png">22x22/document-save-as.png</file>
|
||||||
|
<file alias="themes/qet/22x22/document-save.png">22x22/document-save.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-clear-locationbar-ltr.png">22x22/edit-clear-locationbar-ltr.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-clear-locationbar-rtl.png">22x22/edit-clear-locationbar-rtl.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-clear.png">22x22/edit-clear.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-copy.png">22x22/edit-copy.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-cut.png">22x22/edit-cut.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-delete.png">22x22/edit-delete.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-paste.png">22x22/edit-paste.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-redo.png">22x22/edit-redo.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-rename.png">22x22/edit-rename.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-select-all.png">22x22/edit-select-all.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-table-cell-merge.png">22x22/edit-table-cell-merge.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-table-cell-split.png">22x22/edit-table-cell-split.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-table-delete-column.png">22x22/edit-table-delete-column.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-table-delete-row.png">22x22/edit-table-delete-row.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-table-insert-column-left.png">22x22/edit-table-insert-column-left.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-table-insert-column-right.png">22x22/edit-table-insert-column-right.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-table-insert-row-above.png">22x22/edit-table-insert-row-above.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-table-insert-row-under.png">22x22/edit-table-insert-row-under.png</file>
|
||||||
|
<file alias="themes/qet/22x22/edit-undo.png">22x22/edit-undo.png</file>
|
||||||
|
<file alias="themes/qet/22x22/element-delete.png">22x22/element-delete.png</file>
|
||||||
|
<file alias="themes/qet/22x22/element-edit.png">22x22/element-edit.png</file>
|
||||||
|
<file alias="themes/qet/22x22/element-new.png">22x22/element-new.png</file>
|
||||||
|
<file alias="themes/qet/22x22/ellipse.png">22x22/ellipse.png</file>
|
||||||
|
<file alias="themes/qet/22x22/export-csv.png">22x22/export-csv.png</file>
|
||||||
|
<file alias="themes/qet/22x22/folder-delete.png">22x22/folder-delete.png</file>
|
||||||
|
<file alias="themes/qet/22x22/folder-edit.png">22x22/folder-edit.png</file>
|
||||||
|
<file alias="themes/qet/22x22/folder-new.png">22x22/folder-new.png</file>
|
||||||
|
<file alias="themes/qet/22x22/folder-open.png">22x22/folder-open.png</file>
|
||||||
|
<file alias="themes/qet/22x22/format-text-subscript.png">22x22/format-text-subscript.png</file>
|
||||||
|
<file alias="themes/qet/22x22/format-text-superscript.png">22x22/format-text-superscript.png</file>
|
||||||
|
<file alias="themes/qet/22x22/go-company.png">22x22/go-company.png</file>
|
||||||
|
<file alias="themes/qet/22x22/go-down.png">22x22/go-down.png</file>
|
||||||
|
<file alias="themes/qet/22x22/go-home.png">22x22/go-home.png</file>
|
||||||
|
<file alias="themes/qet/22x22/go-up.png">22x22/go-up.png</file>
|
||||||
|
<file alias="themes/qet/22x22/grid.png">22x22/grid.png</file>
|
||||||
|
<file alias="themes/qet/22x22/guides.png">22x22/guides.png</file>
|
||||||
|
<file alias="themes/qet/22x22/hotspot.png">22x22/hotspot.png</file>
|
||||||
|
<file alias="themes/qet/22x22/insert-image.png">22x22/insert-image.png</file>
|
||||||
|
<file alias="themes/qet/22x22/label.png">22x22/label.png</file>
|
||||||
|
<file alias="themes/qet/22x22/landscape.png">22x22/landscape.png</file>
|
||||||
|
<file alias="themes/qet/22x22/line.png">22x22/line.png</file>
|
||||||
|
<file alias="themes/qet/22x22/list-add.png">22x22/list-add.png</file>
|
||||||
|
<file alias="themes/qet/22x22/list-remove.png">22x22/list-remove.png</file>
|
||||||
|
<file alias="themes/qet/22x22/lower.png">22x22/lower.png</file>
|
||||||
|
<file alias="themes/qet/22x22/move.png">22x22/move.png</file>
|
||||||
|
<file alias="themes/qet/22x22/names.png">22x22/names.png</file>
|
||||||
|
<file alias="themes/qet/22x22/object-locked.png">22x22/object-locked.png</file>
|
||||||
|
<file alias="themes/qet/22x22/object-rotate-right.png">22x22/object-rotate-right.png</file>
|
||||||
|
<file alias="themes/qet/22x22/object-unlocked.png">22x22/object-unlocked.png</file>
|
||||||
|
<file alias="themes/qet/22x22/pdf-import.png">22x22/pdf-import.png</file>
|
||||||
|
<file alias="themes/qet/22x22/polygon.png">22x22/polygon.png</file>
|
||||||
|
<file alias="themes/qet/22x22/portrait.png">22x22/portrait.png</file>
|
||||||
|
<file alias="themes/qet/22x22/preferences-desktop-user.png">22x22/preferences-desktop-user.png</file>
|
||||||
|
<file alias="themes/qet/22x22/project-close.png">22x22/project-close.png</file>
|
||||||
|
<file alias="themes/qet/22x22/project-delete.png">22x22/project-delete.png</file>
|
||||||
|
<file alias="themes/qet/22x22/project-new.png">22x22/project-new.png</file>
|
||||||
|
<file alias="themes/qet/22x22/project.png">22x22/project.png</file>
|
||||||
|
<file alias="themes/qet/22x22/raise.png">22x22/raise.png</file>
|
||||||
|
<file alias="themes/qet/22x22/rectangle.png">22x22/rectangle.png</file>
|
||||||
|
<file alias="themes/qet/22x22/restaurer.png">22x22/restaurer.png</file>
|
||||||
|
<file alias="themes/qet/22x22/select.png">22x22/select.png</file>
|
||||||
|
<file alias="themes/qet/22x22/send_backward.png">22x22/send_backward.png</file>
|
||||||
|
<file alias="themes/qet/22x22/single_page.png">22x22/single_page.png</file>
|
||||||
|
<file alias="themes/qet/22x22/start.png">22x22/start.png</file>
|
||||||
|
<file alias="themes/qet/22x22/terminal.png">22x22/terminal.png</file>
|
||||||
|
<file alias="themes/qet/22x22/terminalstrip.png">22x22/terminalstrip.png</file>
|
||||||
|
<file alias="themes/qet/22x22/text-xml.png">22x22/text-xml.png</file>
|
||||||
|
<file alias="themes/qet/22x22/text.png">22x22/text.png</file>
|
||||||
|
<file alias="themes/qet/22x22/textfield.png">22x22/textfield.png</file>
|
||||||
|
<file alias="themes/qet/22x22/titleblock-bottom.png">22x22/titleblock-bottom.png</file>
|
||||||
|
<file alias="themes/qet/22x22/titleblock-right.png">22x22/titleblock-right.png</file>
|
||||||
|
<file alias="themes/qet/22x22/transform-scale.png">22x22/transform-scale.png</file>
|
||||||
|
<file alias="themes/qet/22x22/two_pages.png">22x22/two_pages.png</file>
|
||||||
|
<file alias="themes/qet/22x22/view-fit-window.png">22x22/view-fit-window.png</file>
|
||||||
|
<file alias="themes/qet/22x22/view-fullscreen.png">22x22/view-fullscreen.png</file>
|
||||||
|
<file alias="themes/qet/22x22/view-refresh.png">22x22/view-refresh.png</file>
|
||||||
|
<file alias="themes/qet/22x22/view-restore.png">22x22/view-restore.png</file>
|
||||||
|
<file alias="themes/qet/22x22/view_fit_width.png">22x22/view_fit_width.png</file>
|
||||||
|
<file alias="themes/qet/22x22/window-new.png">22x22/window-new.png</file>
|
||||||
|
<file alias="themes/qet/22x22/zoom-draw.png">22x22/zoom-draw.png</file>
|
||||||
|
<file alias="themes/qet/22x22/zoom-fit-best.png">22x22/zoom-fit-best.png</file>
|
||||||
|
<file alias="themes/qet/22x22/zoom-in.png">22x22/zoom-in.png</file>
|
||||||
|
<file alias="themes/qet/22x22/zoom-original.png">22x22/zoom-original.png</file>
|
||||||
|
<file alias="themes/qet/22x22/zoom-out.png">22x22/zoom-out.png</file>
|
||||||
|
<file alias="themes/qet/32x32/application-pdf.png">32x32/application-pdf.png</file>
|
||||||
|
<file alias="themes/qet/32x32/format-text-bold.png">32x32/format-text-bold.png</file>
|
||||||
|
<file alias="themes/qet/32x32/format-text-color.png">32x32/format-text-color.png</file>
|
||||||
|
<file alias="themes/qet/32x32/format-text-italic.png">32x32/format-text-italic.png</file>
|
||||||
|
<file alias="themes/qet/32x32/format-text-underline.png">32x32/format-text-underline.png</file>
|
||||||
|
<file alias="themes/qet/32x32/image-x-eps.png">32x32/image-x-eps.png</file>
|
||||||
|
<file alias="themes/qet/32x32/insert-link.png">32x32/insert-link.png</file>
|
||||||
|
<file alias="themes/qet/32x32/printer.png">32x32/printer.png</file>
|
||||||
|
<file alias="themes/qet/32x32/qt.png">32x32/qt.png</file>
|
||||||
|
<file alias="themes/qet/32x32/simplifyrichtext.png">32x32/simplifyrichtext.png</file>
|
||||||
|
<file alias="themes/qet/32x32/text-xml.png">32x32/text-xml.png</file>
|
||||||
|
<file alias="themes/qet/48x48/document-print-frame.png">48x48/document-print-frame.png</file>
|
||||||
|
<file alias="themes/qet/48x48/user-away-extended.png">48x48/user-away-extended.png</file>
|
||||||
|
<file alias="themes/qet/48x48/user-away.png">48x48/user-away.png</file>
|
||||||
|
<file alias="themes/qet/48x48/view-pim-journal.png">48x48/view-pim-journal.png</file>
|
||||||
|
<file alias="themes/qet/128x128/diagram.png">128x128/diagram.png</file>
|
||||||
|
<file alias="themes/qet/128x128/document-export.png">128x128/document-export.png</file>
|
||||||
|
<file alias="themes/qet/128x128/plasmagik.png">128x128/plasmagik.png</file>
|
||||||
|
<file alias="themes/qet/128x128/printer.png">128x128/printer.png</file>
|
||||||
|
<file alias="themes/qet/128x128/project.png">128x128/project.png</file>
|
||||||
|
<file alias="themes/qet/128x128/settings.png">128x128/settings.png</file>
|
||||||
|
<file alias="themes/qet/scalable/edit-opacity.svg">breeze-icons/scalable/apps/hidef/edit-opacity.svg</file>
|
||||||
|
<file alias="themes/qet/scalable/image-flip-horizontal.svg">breeze-icons/scalable/apps/hidef/image-flip-horizontal-symbolic.svg</file>
|
||||||
|
<file alias="themes/qet/scalable/image-flip-vertical.svg">breeze-icons/scalable/apps/hidef/image-flip-vertical-symbolic.svg</file>
|
||||||
|
<file alias="themes/qet/scalable/draw-bezier-curves.svg">breeze-icons/scalable/apps/hidef/draw-bezier-curves.svg</file>
|
||||||
|
<file alias="themes/qet/scalable/transform-crop.svg">breeze-icons/scalable/apps/hidef/transform-crop.svg</file>
|
||||||
|
<file alias="themes/qet/scalable/ellipse-to-bezier.svg">generated/ellipse-to-bezier.svg</file>
|
||||||
|
<file alias="themes/qet/scalable/rect-to-bezier.svg">generated/rect-to-bezier.svg</file>
|
||||||
|
<file alias="themes/qet/scalable/rect-to-polyline.svg">generated/rect-to-polyline.svg</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
[Icon Theme]
|
||||||
|
Name=qet
|
||||||
|
Comment=QElectroTech icons
|
||||||
|
Directories=16x16,22x22,32x32,48x48,128x128,scalable
|
||||||
|
|
||||||
|
[16x16]
|
||||||
|
Size=16
|
||||||
|
Type=Fixed
|
||||||
|
|
||||||
|
[22x22]
|
||||||
|
Size=22
|
||||||
|
Type=Fixed
|
||||||
|
|
||||||
|
[32x32]
|
||||||
|
Size=32
|
||||||
|
Type=Fixed
|
||||||
|
|
||||||
|
[48x48]
|
||||||
|
Size=48
|
||||||
|
Type=Fixed
|
||||||
|
|
||||||
|
[128x128]
|
||||||
|
Size=128
|
||||||
|
Type=Fixed
|
||||||
|
|
||||||
|
[scalable]
|
||||||
|
Size=22
|
||||||
|
Type=Scalable
|
||||||
|
MinSize=8
|
||||||
|
MaxSize=256
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# Copyright 2006-2026 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/>.
|
||||||
|
"""Build QET's icon theme "qet" from the PNG and SVG sources in ico/.
|
||||||
|
|
||||||
|
Run from the repository root:
|
||||||
|
|
||||||
|
python3 misc/make_icon_themes.py
|
||||||
|
|
||||||
|
It writes:
|
||||||
|
|
||||||
|
ico/themes/qet/index.theme the theme description
|
||||||
|
ico/icon-themes.qrc resource file listing the theme
|
||||||
|
|
||||||
|
The theme does not copy any file. The .qrc aliases the existing
|
||||||
|
ico/<size>/<name>.png files into the theme layout Qt's icon loader
|
||||||
|
expects (themes/qet/<size>/<name>.png), so QIcon::fromTheme("name")
|
||||||
|
finds them. Idempotent: running it twice changes nothing.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
ROOT = Path(__file__).resolve().parent.parent
|
||||||
|
ICO = ROOT / "ico"
|
||||||
|
THEMES = ICO / "themes"
|
||||||
|
QRC = ICO / "icon-themes.qrc"
|
||||||
|
|
||||||
|
# Fixed-size folders that hold toolbar, menu and dialog icons. The 24x16
|
||||||
|
# flags, the 22x22/color swatches and the application icons are not theme
|
||||||
|
# icons and stay on their resource paths.
|
||||||
|
SIZES = ["16x16", "22x22", "32x32", "48x48", "128x128"]
|
||||||
|
|
||||||
|
# Table entries in sources/qeticons.cpp that pair a 16 pixel file with a
|
||||||
|
# 22 pixel file of another name. The theme needs one name per icon, so
|
||||||
|
# the 22 pixel file is exposed under the 16 pixel name as well.
|
||||||
|
ALIASES = {
|
||||||
|
"22x22/conductor2.png": "conductor-reset",
|
||||||
|
"22x22/diagram_add.png": "folio-new",
|
||||||
|
"22x22/diagram_del.png": "folio-delete",
|
||||||
|
"22x22/dialog-information.png": "folio-properties",
|
||||||
|
}
|
||||||
|
|
||||||
|
# SVG icons referenced from sources/qeticons.cpp.
|
||||||
|
SVGS = [
|
||||||
|
"breeze-icons/scalable/apps/hidef/edit-opacity.svg",
|
||||||
|
"breeze-icons/scalable/apps/hidef/image-flip-horizontal-symbolic.svg",
|
||||||
|
"breeze-icons/scalable/apps/hidef/image-flip-vertical-symbolic.svg",
|
||||||
|
"breeze-icons/scalable/apps/hidef/draw-bezier-curves.svg",
|
||||||
|
"breeze-icons/scalable/apps/hidef/transform-crop.svg",
|
||||||
|
"generated/ellipse-to-bezier.svg",
|
||||||
|
"generated/rect-to-bezier.svg",
|
||||||
|
"generated/rect-to-polyline.svg",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def write_if_changed(path, data):
|
||||||
|
"""Write text only when the content differs, so git stays quiet."""
|
||||||
|
if path.exists() and path.read_text(encoding="utf-8") == data:
|
||||||
|
return False
|
||||||
|
path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
path.write_text(data, encoding="utf-8")
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def index_theme(name, comment, dirs, inherits=None):
|
||||||
|
lines = ["[Icon Theme]", f"Name={name}", f"Comment={comment}"]
|
||||||
|
if inherits:
|
||||||
|
lines.append(f"Inherits={inherits}")
|
||||||
|
lines.append("Directories=" + ",".join(dirs))
|
||||||
|
lines.append("")
|
||||||
|
for d in dirs:
|
||||||
|
lines.append(f"[{d}]")
|
||||||
|
if d == "scalable":
|
||||||
|
lines += ["Size=22", "Type=Scalable", "MinSize=8", "MaxSize=256"]
|
||||||
|
else:
|
||||||
|
lines += [f"Size={d.split('x')[0]}", "Type=Fixed"]
|
||||||
|
lines.append("")
|
||||||
|
return "\n".join(lines)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
entries = [] # (alias, source) pairs, paths relative to ico/
|
||||||
|
changed = 0
|
||||||
|
|
||||||
|
for size in SIZES:
|
||||||
|
for png in sorted((ICO / size).glob("*.png")):
|
||||||
|
rel = f"{size}/{png.name}"
|
||||||
|
names = [png.stem]
|
||||||
|
if rel in ALIASES:
|
||||||
|
names.append(ALIASES[rel])
|
||||||
|
for name in names:
|
||||||
|
entries.append((f"themes/qet/{size}/{name}.png", rel))
|
||||||
|
|
||||||
|
for rel in SVGS:
|
||||||
|
name = re.sub(r"-symbolic(?=\.svg$)", "", Path(rel).name)
|
||||||
|
entries.append((f"themes/qet/scalable/{name}", rel))
|
||||||
|
|
||||||
|
dirs = SIZES + ["scalable"]
|
||||||
|
changed += write_if_changed(THEMES / "qet" / "index.theme",
|
||||||
|
index_theme("qet", "QElectroTech icons", dirs))
|
||||||
|
|
||||||
|
qrc = ["<!DOCTYPE RCC>", "<!-- Generated by misc/make_icon_themes.py. Do not edit. -->",
|
||||||
|
'<RCC version="1.0">', ' <qresource prefix="/ico">',
|
||||||
|
" <file>themes/qet/index.theme</file>"]
|
||||||
|
for alias, source in entries:
|
||||||
|
qrc.append(f' <file alias="{alias}">{source}</file>')
|
||||||
|
qrc += [" </qresource>", "</RCC>", ""]
|
||||||
|
changed += write_if_changed(QRC, "\n".join(qrc))
|
||||||
|
|
||||||
|
print(f"{len(entries)} theme entries; {changed} files written")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
os.chdir(ROOT)
|
||||||
|
main()
|
||||||
@@ -456,13 +456,13 @@ void FileElementCollectionItem::setUpIcon()
|
|||||||
if (macrosPath.endsWith("/")) macrosPath.remove(macrosPath.length() - 1, 1);
|
if (macrosPath.endsWith("/")) macrosPath.remove(macrosPath.length() - 1, 1);
|
||||||
|
|
||||||
if (m_path == QETApp::commonElementsDirN())
|
if (m_path == QETApp::commonElementsDirN())
|
||||||
setIcon(QIcon(":/ico/16x16/qet.png"));
|
setIcon(QIcon::fromTheme("qet"));
|
||||||
else if (m_path == QETApp::companyElementsDirN())
|
else if (m_path == QETApp::companyElementsDirN())
|
||||||
setIcon(QIcon(":/ico/16x16/go-company.png"));
|
setIcon(QIcon::fromTheme("go-company"));
|
||||||
else if (m_path == macrosPath)
|
else if (m_path == macrosPath)
|
||||||
setIcon(QIcon(":/ico/16x16/go-home.png"));
|
setIcon(QIcon::fromTheme("go-home"));
|
||||||
else
|
else
|
||||||
setIcon(QIcon(":/ico/16x16/go-home.png"));
|
setIcon(QIcon::fromTheme("go-home"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<string>Ajouter une ligne</string>
|
<string>Ajouter une ligne</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="list-add" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/list-add.png</normaloff>:/ico/16x16/list-add.png</iconset>
|
<normaloff>:/ico/16x16/list-add.png</normaloff>:/ico/16x16/list-add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<string>Copier dans le presse papier</string>
|
<string>Copier dans le presse papier</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="edit-paste" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/edit-paste.png</normaloff>:/ico/16x16/edit-paste.png</iconset>
|
<normaloff>:/ico/16x16/edit-paste.png</normaloff>:/ico/16x16/edit-paste.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -370,7 +370,7 @@
|
|||||||
<string>phase</string>
|
<string>phase</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="phase" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/phase.png</normaloff>:/ico/16x16/phase.png</iconset>
|
<normaloff>:/ico/16x16/phase.png</normaloff>:/ico/16x16/phase.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -397,7 +397,7 @@
|
|||||||
<string>neutre</string>
|
<string>neutre</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="neutral" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/neutral.png</normaloff>:/ico/16x16/neutral.png</iconset>
|
<normaloff>:/ico/16x16/neutral.png</normaloff>:/ico/16x16/neutral.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -433,7 +433,7 @@
|
|||||||
<string>terre</string>
|
<string>terre</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="ground" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/ground.png</normaloff>:/ico/16x16/ground.png</iconset>
|
<normaloff>:/ico/16x16/ground.png</normaloff>:/ico/16x16/ground.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="start" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/start.png</normaloff>:/ico/22x22/start.png</iconset>
|
<normaloff>:/ico/22x22/start.png</normaloff>:/ico/22x22/start.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="go-bottom" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/go-bottom.png</normaloff>:/ico/16x16/go-bottom.png</iconset>
|
<normaloff>:/ico/16x16/go-bottom.png</normaloff>:/ico/16x16/go-bottom.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="flat">
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="go-top" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/go-top.png</normaloff>:/ico/16x16/go-top.png</iconset>
|
<normaloff>:/ico/16x16/go-top.png</normaloff>:/ico/16x16/go-top.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="flat">
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="view-refresh" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/view-refresh.png</normaloff>:/ico/16x16/view-refresh.png</iconset>
|
<normaloff>:/ico/16x16/view-refresh.png</normaloff>:/ico/16x16/view-refresh.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="flat">
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="configure-toolbars" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/configure-toolbars.png</normaloff>:/ico/16x16/configure-toolbars.png</iconset>
|
<normaloff>:/ico/16x16/configure-toolbars.png</normaloff>:/ico/16x16/configure-toolbars.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="dialog-ok" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/dialog-ok.png</normaloff>:/ico/22x22/dialog-ok.png</iconset>
|
<normaloff>:/ico/22x22/dialog-ok.png</normaloff>:/ico/22x22/dialog-ok.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="dialog-ok" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/dialog-ok.png</normaloff>:/ico/16x16/dialog-ok.png</iconset>
|
<normaloff>:/ico/16x16/dialog-ok.png</normaloff>:/ico/16x16/dialog-ok.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<action name="m_add_terminal_strip">
|
<action name="m_add_terminal_strip">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="list-add" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/list-add.png</normaloff>:/ico/16x16/list-add.png</iconset>
|
<normaloff>:/ico/16x16/list-add.png</normaloff>:/ico/16x16/list-add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_remove_terminal">
|
<action name="m_remove_terminal">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="list-remove" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/list-remove.png</normaloff>:/ico/16x16/list-remove.png</iconset>
|
<normaloff>:/ico/16x16/list-remove.png</normaloff>:/ico/16x16/list-remove.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_reload">
|
<action name="m_reload">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="view-refresh" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/view-refresh.png</normaloff>:/ico/16x16/view-refresh.png</iconset>
|
<normaloff>:/ico/16x16/view-refresh.png</normaloff>:/ico/16x16/view-refresh.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="view-refresh" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/view-refresh.png</normaloff>:/ico/16x16/view-refresh.png</iconset>
|
<normaloff>:/ico/16x16/view-refresh.png</normaloff>:/ico/16x16/view-refresh.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="view-refresh" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/view-refresh.png</normaloff>:/ico/16x16/view-refresh.png</iconset>
|
<normaloff>:/ico/16x16/view-refresh.png</normaloff>:/ico/16x16/view-refresh.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -238,7 +238,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="view-refresh" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/view-refresh.png</normaloff>:/ico/16x16/view-refresh.png</iconset>
|
<normaloff>:/ico/16x16/view-refresh.png</normaloff>:/ico/16x16/view-refresh.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -319,7 +319,7 @@
|
|||||||
<string>Configurer</string>
|
<string>Configurer</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="configure" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/configure.png</normaloff>:/ico/16x16/configure.png</iconset>
|
<normaloff>:/ico/16x16/configure.png</normaloff>:/ico/16x16/configure.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="edit-delete" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/edit-delete.png</normaloff>:/ico/16x16/edit-delete.png</iconset>
|
<normaloff>:/ico/16x16/edit-delete.png</normaloff>:/ico/16x16/edit-delete.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="list-remove" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/list-remove.png</normaloff>:/ico/22x22/list-remove.png</iconset>
|
<normaloff>:/ico/22x22/list-remove.png</normaloff>:/ico/22x22/list-remove.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="flat">
|
||||||
@@ -153,7 +153,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="list-add" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/list-add.png</normaloff>:/ico/22x22/list-add.png</iconset>
|
<normaloff>:/ico/22x22/list-add.png</normaloff>:/ico/22x22/list-add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="flat">
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="arrow-left" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/arrow-left.png</normaloff>:/ico/16x16/arrow-left.png</iconset>
|
<normaloff>:/ico/16x16/arrow-left.png</normaloff>:/ico/16x16/arrow-left.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="arrow-right" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/arrow-right.png</normaloff>:/ico/16x16/arrow-right.png</iconset>
|
<normaloff>:/ico/16x16/arrow-right.png</normaloff>:/ico/16x16/arrow-right.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="go-up" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/go-up.png</normaloff>:/ico/16x16/go-up.png</iconset>
|
<normaloff>:/ico/16x16/go-up.png</normaloff>:/ico/16x16/go-up.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="list-add" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/list-add.png</normaloff>:/ico/16x16/list-add.png</iconset>
|
<normaloff>:/ico/16x16/list-add.png</normaloff>:/ico/16x16/list-add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="list-remove" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/list-remove.png</normaloff>:/ico/16x16/list-remove.png</iconset>
|
<normaloff>:/ico/16x16/list-remove.png</normaloff>:/ico/16x16/list-remove.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="go-down" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/go-down.png</normaloff>:/ico/16x16/go-down.png</iconset>
|
<normaloff>:/ico/16x16/go-down.png</normaloff>:/ico/16x16/go-down.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -353,7 +353,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="folder-open" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/folder-open.png</normaloff>:/ico/16x16/folder-open.png</iconset>
|
<normaloff>:/ico/16x16/folder-open.png</normaloff>:/ico/16x16/folder-open.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -380,7 +380,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="document-save" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/document-save.png</normaloff>:/ico/16x16/document-save.png</iconset>
|
<normaloff>:/ico/16x16/document-save.png</normaloff>:/ico/16x16/document-save.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="flat">
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="go-up" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/go-up.png</normaloff>:/ico/16x16/go-up.png</iconset>
|
<normaloff>:/ico/16x16/go-up.png</normaloff>:/ico/16x16/go-up.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="list-add" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/list-add.png</normaloff>:/ico/16x16/list-add.png</iconset>
|
<normaloff>:/ico/16x16/list-add.png</normaloff>:/ico/16x16/list-add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="list-remove" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/list-remove.png</normaloff>:/ico/16x16/list-remove.png</iconset>
|
<normaloff>:/ico/16x16/list-remove.png</normaloff>:/ico/16x16/list-remove.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="go-down" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/go-down.png</normaloff>:/ico/16x16/go-down.png</iconset>
|
<normaloff>:/ico/16x16/go-down.png</normaloff>:/ico/16x16/go-down.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -801,6 +801,11 @@ void Diagram::clearEventInterface()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Diagram::eventInterfaceIsRunning() const
|
||||||
|
{
|
||||||
|
return m_event_interface && m_event_interface->isRunning();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Diagram::conductorsAutonumName
|
@brief Diagram::conductorsAutonumName
|
||||||
@return the name of autonum to use.
|
@return the name of autonum to use.
|
||||||
|
|||||||
+1
-1
@@ -216,7 +216,7 @@ class Diagram : public QGraphicsScene
|
|||||||
// methods related to graphics items addition/removal on the diagram
|
// methods related to graphics items addition/removal on the diagram
|
||||||
virtual void addItem (QGraphicsItem *item);
|
virtual void addItem (QGraphicsItem *item);
|
||||||
virtual void removeItem (QGraphicsItem *item);
|
virtual void removeItem (QGraphicsItem *item);
|
||||||
bool hasEventInterface() const { return m_event_interface != nullptr; }
|
bool eventInterfaceIsRunning() const;
|
||||||
|
|
||||||
// methods related to graphics options
|
// methods related to graphics options
|
||||||
ExportProperties applyProperties(const ExportProperties &);
|
ExportProperties applyProperties(const ExportProperties &);
|
||||||
|
|||||||
+69
-18
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "diagram.h"
|
#include "diagram.h"
|
||||||
#include "qetgraphicsitem/conductortextitem.h"
|
#include "qetgraphicsitem/conductortextitem.h"
|
||||||
|
#include "qetgraphicsitem/dynamicelementtextitem.h"
|
||||||
#include "qetgraphicsitem/element.h"
|
#include "qetgraphicsitem/element.h"
|
||||||
#include "qetgraphicsitem/elementtextitemgroup.h"
|
#include "qetgraphicsitem/elementtextitemgroup.h"
|
||||||
#include "qetinformation.h"
|
#include "qetinformation.h"
|
||||||
@@ -90,6 +91,62 @@ void PasteDiagramCommand::redo()
|
|||||||
//make new uuid, because old uuid are the uuid of the copied element
|
//make new uuid, because old uuid are the uuid of the copied element
|
||||||
e -> newUuid();
|
e -> newUuid();
|
||||||
|
|
||||||
|
// PLC slaves carry master-specific data (type, address,
|
||||||
|
// function, cross-ref, etc.) in their elementInformations.
|
||||||
|
// Always clear those on paste so the duplicate starts clean,
|
||||||
|
// regardless of the user's erase-label-on-copy preference.
|
||||||
|
const bool is_slave = (e->linkType() == Element::Slave);
|
||||||
|
if (is_slave) {
|
||||||
|
DiagramContext dc = e->elementInformations();
|
||||||
|
dc.remove(QETInformation::ELMT_PLC_TYPE);
|
||||||
|
dc.remove(QETInformation::ELMT_PLC_ADDRESS);
|
||||||
|
dc.remove(QETInformation::ELMT_PLC_FUNCTION);
|
||||||
|
dc.remove(QETInformation::ELMT_PLC_COMMENT);
|
||||||
|
dc.remove(QETInformation::ELMT_PLC_CROSSREF);
|
||||||
|
dc.remove(QETInformation::ELMT_LABEL);
|
||||||
|
dc.remove(QETInformation::ELMT_PLC_TC);
|
||||||
|
dc.remove(QETInformation::ELMT_PLC_T1);
|
||||||
|
dc.remove(QETInformation::ELMT_PLC_T2);
|
||||||
|
dc.remove(QETInformation::ELMT_PLC_T3);
|
||||||
|
dc.remove(QETInformation::ELMT_PLC_T4);
|
||||||
|
dc.remove(QStringLiteral("xref"));
|
||||||
|
|
||||||
|
// Block alignment before setElementInformations so
|
||||||
|
// that elementInfoChanged() resolves texts without
|
||||||
|
// finishAlignment() shifting right/center-aligned items.
|
||||||
|
for (DynamicElementTextItem *deti : e->dynamicTextItems())
|
||||||
|
deti->m_block_alignment = true;
|
||||||
|
for (auto *group : e->textGroups())
|
||||||
|
group->blockAlignmentUpdate(true);
|
||||||
|
|
||||||
|
e->setElementInformations(dc);
|
||||||
|
|
||||||
|
for (DynamicElementTextItem *deti : e->dynamicTextItems())
|
||||||
|
deti->m_block_alignment = false;
|
||||||
|
for (auto *group : e->textGroups())
|
||||||
|
group->blockAlignmentUpdate(false);
|
||||||
|
|
||||||
|
// After setElementInformations, elementInfoChanged()
|
||||||
|
// resolves composite text with cleaned dc. Clear
|
||||||
|
// all non-UserText items directly as a safety net.
|
||||||
|
for (DynamicElementTextItem *deti : e->dynamicTextItems()) {
|
||||||
|
if (deti->textFrom() != DynamicElementTextItem::UserText) {
|
||||||
|
deti->m_block_alignment = true;
|
||||||
|
deti->setPlainText(QString());
|
||||||
|
deti->m_block_alignment = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (auto *group : e->textGroups()) {
|
||||||
|
for (DynamicElementTextItem *deti : group->texts()) {
|
||||||
|
if (deti->textFrom() != DynamicElementTextItem::UserText) {
|
||||||
|
deti->m_block_alignment = true;
|
||||||
|
deti->setPlainText(QString());
|
||||||
|
deti->m_block_alignment = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (settings.value("diagramcommands/erase-label-on-copy", true).toBool())
|
if (settings.value("diagramcommands/erase-label-on-copy", true).toBool())
|
||||||
{
|
{
|
||||||
//Reset the information about the label, the comment and location
|
//Reset the information about the label, the comment and location
|
||||||
@@ -99,27 +156,21 @@ void PasteDiagramCommand::redo()
|
|||||||
dc.addValue("comment", "");
|
dc.addValue("comment", "");
|
||||||
dc.addValue("location", "");
|
dc.addValue("location", "");
|
||||||
|
|
||||||
// PLC slaves store master data (type, address, comment,
|
// Block alignment during setElementInformations
|
||||||
// cross-ref, etc.) in their own elementInformations.
|
// for non-slaves, same as Element::fromXml() (line 890-896).
|
||||||
// Remove them the same way MasterElement::unlinkElement()
|
if (!is_slave) {
|
||||||
// does, so pasted PLC slaves start clean like regular
|
for (DynamicElementTextItem *deti : e->dynamicTextItems())
|
||||||
// slaves.
|
deti->m_block_alignment = true;
|
||||||
if (e->linkType() == Element::Slave) {
|
for (auto *group : e->textGroups())
|
||||||
dc.remove(QETInformation::ELMT_PLC_TYPE);
|
group->blockAlignmentUpdate(true);
|
||||||
dc.remove(QETInformation::ELMT_PLC_ADDRESS);
|
|
||||||
dc.remove(QETInformation::ELMT_PLC_FUNCTION);
|
|
||||||
dc.remove(QETInformation::ELMT_PLC_COMMENT);
|
|
||||||
dc.remove(QETInformation::ELMT_PLC_CROSSREF);
|
|
||||||
dc.remove(QETInformation::ELMT_LABEL);
|
|
||||||
dc.remove(QETInformation::ELMT_PLC_TC);
|
|
||||||
dc.remove(QETInformation::ELMT_PLC_T1);
|
|
||||||
dc.remove(QETInformation::ELMT_PLC_T2);
|
|
||||||
dc.remove(QETInformation::ELMT_PLC_T3);
|
|
||||||
dc.remove(QETInformation::ELMT_PLC_T4);
|
|
||||||
dc.remove(QStringLiteral("xref"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
e->setElementInformations(dc);
|
e->setElementInformations(dc);
|
||||||
|
|
||||||
|
for (DynamicElementTextItem *deti : e->dynamicTextItems())
|
||||||
|
deti->m_block_alignment = false;
|
||||||
|
for (auto *group : e->textGroups())
|
||||||
|
group->blockAlignmentUpdate(false);
|
||||||
|
|
||||||
//Reset the text of conductors, the same way the label/comment/
|
//Reset the text of conductors, the same way the label/comment/
|
||||||
//location above are reset to "" rather than to some other
|
//location above are reset to "" rather than to some other
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
#include "../qetdiagrameditor.h"
|
#include "../qetdiagrameditor.h"
|
||||||
#include "../qetgraphicsitem/conductor.h"
|
#include "../qetgraphicsitem/conductor.h"
|
||||||
|
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
#include <QGraphicsSceneMouseEvent>
|
#include <QGraphicsSceneMouseEvent>
|
||||||
@@ -35,7 +37,7 @@
|
|||||||
@param start_pos : where the pasted items first appear, in scene
|
@param start_pos : where the pasted items first appear, in scene
|
||||||
coordinates -- normally the cursor
|
coordinates -- normally the cursor
|
||||||
*/
|
*/
|
||||||
DiagramEventAddPaste::DiagramEventAddPaste(Diagram *diagram, const QPointF &start_pos) :
|
DiagramEventAddPaste::DiagramEventAddPaste(Diagram *diagram, const QPointF &start_pos) :
|
||||||
DiagramEventInterface(diagram)
|
DiagramEventInterface(diagram)
|
||||||
{
|
{
|
||||||
//DiagramEventInterface::init() is called by Diagram::setEventInterface
|
//DiagramEventInterface::init() is called by Diagram::setEventInterface
|
||||||
@@ -49,20 +51,45 @@ DiagramEventAddPaste::DiagramEventAddPaste(Diagram *diagram, const QPointF &star
|
|||||||
QDomDocument document_xml;
|
QDomDocument document_xml;
|
||||||
if (!document_xml.setContent(clipboard_text)) return;
|
if (!document_xml.setContent(clipboard_text)) return;
|
||||||
|
|
||||||
m_diagram->fromXml(document_xml, Diagram::snapToGrid(start_pos), false, &m_content);
|
//Load items at their original XML coordinates.
|
||||||
|
m_diagram->fromXml(document_xml, QPointF(), false, &m_content);
|
||||||
if (!m_content.count()) return;
|
if (!m_content.count()) return;
|
||||||
|
|
||||||
//Remember where each item sits relative to the group's top left, so a
|
|
||||||
//move is one assignment per item rather than an accumulated delta.
|
|
||||||
QRectF group_rect;
|
|
||||||
const QList<QGraphicsItem *> movable = m_content.items(MovableItems);
|
const QList<QGraphicsItem *> movable = m_content.items(MovableItems);
|
||||||
|
if (movable.isEmpty()) return;
|
||||||
|
|
||||||
|
//Compute the top-left of all items' positions (not bounding
|
||||||
|
//rects) and snap to grid — used only for the initial cursor
|
||||||
|
//warp. Items stay at their original XML positions;
|
||||||
|
//moveTo() handles grid-snapped movement via deltas.
|
||||||
|
QPointF top_left;
|
||||||
|
bool first = true;
|
||||||
for (auto *item : movable) {
|
for (auto *item : movable) {
|
||||||
group_rect = group_rect.united(item->mapToScene(item->boundingRect()).boundingRect());
|
const QPointF p = item->pos();
|
||||||
|
if (first) {
|
||||||
|
top_left = p;
|
||||||
|
first = false;
|
||||||
|
} else {
|
||||||
|
if (p.x() < top_left.x()) top_left.setX(p.x());
|
||||||
|
if (p.y() < top_left.y()) top_left.setY(p.y());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const QPointF top_left = group_rect.topLeft();
|
QSettings settings;
|
||||||
|
const int xGrid = settings.value(QStringLiteral("diagrameditor/Xgrid"),
|
||||||
|
Diagram::xGrid).toInt();
|
||||||
|
const int yGrid = settings.value(QStringLiteral("diagrameditor/Ygrid"),
|
||||||
|
Diagram::yGrid).toInt();
|
||||||
|
const QPointF grid_origin(
|
||||||
|
qRound(top_left.x() / xGrid) * xGrid,
|
||||||
|
qRound(top_left.y() / yGrid) * yGrid);
|
||||||
|
|
||||||
|
//Store each item's position. moveTo() applies a grid-snapped
|
||||||
|
//delta from the baseline, so items preserve their layout and
|
||||||
|
//move in whole grid steps.
|
||||||
for (auto *item : movable) {
|
for (auto *item : movable) {
|
||||||
m_relative_pos.insert(item, item->pos() - top_left);
|
m_relative_pos.insert(item, item->pos());
|
||||||
}
|
}
|
||||||
|
m_group_origin = grid_origin;
|
||||||
|
|
||||||
m_diagram->clearSelection();
|
m_diagram->clearSelection();
|
||||||
for (auto *item : movable) {
|
for (auto *item : movable) {
|
||||||
@@ -70,8 +97,15 @@ DiagramEventAddPaste::DiagramEventAddPaste(Diagram *diagram, const QPointF &star
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!m_diagram->views().isEmpty()) {
|
if (!m_diagram->views().isEmpty()) {
|
||||||
if (const auto qde = QETApp::diagramEditorAncestorOf(m_diagram->views().at(0))) {
|
if (auto *view = m_diagram->views().at(0)) {
|
||||||
m_status_bar = qde->statusBar();
|
if (const auto qde = QETApp::diagramEditorAncestorOf(view)) {
|
||||||
|
m_status_bar = qde->statusBar();
|
||||||
|
}
|
||||||
|
//Warp the cursor close to the group origin so the
|
||||||
|
//first mouseMoveEvent captures the correct baseline.
|
||||||
|
const QPoint view_pos = view->mapFromScene(m_group_origin);
|
||||||
|
const QPoint global_pos = view->viewport()->mapToGlobal(view_pos);
|
||||||
|
QCursor::setPos(global_pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
showHint();
|
showHint();
|
||||||
@@ -87,12 +121,14 @@ DiagramEventAddPaste::DiagramEventAddPaste(Diagram *diagram, const QPointF &star
|
|||||||
*/
|
*/
|
||||||
DiagramEventAddPaste::~DiagramEventAddPaste()
|
DiagramEventAddPaste::~DiagramEventAddPaste()
|
||||||
{
|
{
|
||||||
if (!m_finished) {
|
if (!m_finished && m_diagram) {
|
||||||
removeItems();
|
removeItems();
|
||||||
m_finished = true;
|
m_finished = true;
|
||||||
m_running = false;
|
m_running = false;
|
||||||
}
|
}
|
||||||
if (m_status_bar) m_status_bar->clearMessage();
|
if (m_status_bar) {
|
||||||
|
m_status_bar->clearMessage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -129,19 +165,48 @@ void DiagramEventAddPaste::showHint()
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
@brief DiagramEventAddPaste::moveTo
|
@brief DiagramEventAddPaste::moveTo
|
||||||
Put the group's top left corner at @a scene_pos, snapped to the grid.
|
Compute a grid-snapped delta from the initial cursor position and
|
||||||
|
apply it to every item's grid-shifted position. This keeps all
|
||||||
|
items exactly on grid points regardless of modifier keys or
|
||||||
|
sub-pixel cursor-warp rounding.
|
||||||
*/
|
*/
|
||||||
void DiagramEventAddPaste::moveTo(const QPointF &scene_pos)
|
void DiagramEventAddPaste::moveTo(const QPointF &scene_pos)
|
||||||
{
|
{
|
||||||
const QPointF anchor = Diagram::snapToGrid(scene_pos);
|
QSettings settings;
|
||||||
|
const int xGrid = settings.value(QStringLiteral("diagrameditor/Xgrid"),
|
||||||
|
Diagram::xGrid).toInt();
|
||||||
|
const int yGrid = settings.value(QStringLiteral("diagrameditor/Ygrid"),
|
||||||
|
Diagram::yGrid).toInt();
|
||||||
|
|
||||||
|
const auto snapGrid = [xGrid, yGrid](const QPointF &p) -> QPointF {
|
||||||
|
return QPointF(
|
||||||
|
qRound(p.x() / xGrid) * xGrid,
|
||||||
|
qRound(p.y() / yGrid) * yGrid);
|
||||||
|
};
|
||||||
|
|
||||||
|
//On the very first call, record the actual grid-snapped
|
||||||
|
//cursor position as baseline. The cursor warp in the
|
||||||
|
//constructor goes through integer rounding (mapFromScene →
|
||||||
|
//QPoint) so the real position may differ slightly from
|
||||||
|
//m_initial_cursor. Using the actual scene position avoids
|
||||||
|
//a one-grid-unit jump on the first mouse movement.
|
||||||
|
if (m_initial_cursor.isNull()) {
|
||||||
|
m_initial_cursor = snapGrid(scene_pos);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QPointF delta = snapGrid(scene_pos) - m_initial_cursor;
|
||||||
|
|
||||||
for (auto it = m_relative_pos.constBegin() ; it != m_relative_pos.constEnd() ; ++it) {
|
for (auto it = m_relative_pos.constBegin() ; it != m_relative_pos.constEnd() ; ++it) {
|
||||||
if (it.key()) {
|
if (it.key()) {
|
||||||
it.key()->setPos(anchor + it.value());
|
it.key()->setPos(it.value() + delta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const auto conductors = m_content.conductors(); // AnyConductor by default
|
|
||||||
for (auto *cond : conductors) {
|
//Update conductor paths so they follow the moved terminals.
|
||||||
cond->updatePath();
|
const QList<Conductor *> conductors = m_content.conductors(DiagramContent::AnyConductor);
|
||||||
|
for (auto *conductor : conductors) {
|
||||||
|
conductor->updatePath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,13 +229,12 @@ void DiagramEventAddPaste::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
{
|
{
|
||||||
if (!m_running) return;
|
if (!m_running) return;
|
||||||
|
|
||||||
|
event->setAccepted(true);
|
||||||
if (event->button() == Qt::LeftButton) {
|
if (event->button() == Qt::LeftButton) {
|
||||||
moveTo(event->scenePos());
|
|
||||||
commit();
|
commit();
|
||||||
} else if (event->button() == Qt::RightButton) {
|
} else if (event->button() == Qt::RightButton) {
|
||||||
cancel();
|
cancel();
|
||||||
}
|
}
|
||||||
event->setAccepted(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiagramEventAddPaste::keyPressEvent(QKeyEvent *event)
|
void DiagramEventAddPaste::keyPressEvent(QKeyEvent *event)
|
||||||
@@ -179,15 +243,15 @@ void DiagramEventAddPaste::keyPressEvent(QKeyEvent *event)
|
|||||||
|
|
||||||
switch (event->key()) {
|
switch (event->key()) {
|
||||||
case Qt::Key_Escape:
|
case Qt::Key_Escape:
|
||||||
cancel();
|
|
||||||
event->setAccepted(true);
|
event->setAccepted(true);
|
||||||
|
cancel();
|
||||||
break;
|
break;
|
||||||
//Return and Enter drop the paste where it stands, so the whole
|
//Return and Enter drop the paste where it stands, so the whole
|
||||||
//operation can be completed without a mouse.
|
//operation can be completed without a mouse.
|
||||||
case Qt::Key_Return:
|
case Qt::Key_Return:
|
||||||
case Qt::Key_Enter:
|
case Qt::Key_Enter:
|
||||||
commit();
|
|
||||||
event->setAccepted(true);
|
event->setAccepted(true);
|
||||||
|
commit();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -75,12 +75,20 @@ class DiagramEventAddPaste : public DiagramEventInterface
|
|||||||
void showHint();
|
void showHint();
|
||||||
void removeItems();
|
void removeItems();
|
||||||
|
|
||||||
DiagramContent m_content;
|
DiagramContent m_content;
|
||||||
///Each movable item's position relative to the group's top left,
|
///Each movable item's position relative to the group's top left,
|
||||||
///taken once so repeated moves cannot accumulate rounding drift.
|
///taken once so repeated moves cannot accumulate rounding drift.
|
||||||
QHash<QGraphicsItem *, QPointF> m_relative_pos;
|
QHash<QGraphicsItem *, QPointF> m_relative_pos;
|
||||||
QPointer<QStatusBar> m_status_bar;
|
///Top-left corner of the bounding rect of all movable items,
|
||||||
bool m_finished{false};
|
///in scene coordinates, captured when the paste starts.
|
||||||
|
QPointF m_group_origin;
|
||||||
|
///Cursor position (scene coords) at the moment the paste starts,
|
||||||
|
///so delta-based movement can compute offsets from the initial point.
|
||||||
|
QPointF m_initial_cursor;
|
||||||
|
///Set to true once the first moveTo() captures the real cursor position.
|
||||||
|
bool m_baseline_captured{false};
|
||||||
|
QPointer<QStatusBar> m_status_bar;
|
||||||
|
bool m_finished{false};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIAGRAMEVENTADDPASTE_H
|
#endif // DIAGRAMEVENTADDPASTE_H
|
||||||
|
|||||||
@@ -733,7 +733,7 @@ void DiagramView::keyPressEvent(QKeyEvent *e)
|
|||||||
//way off the canvas for someone working without a mouse.
|
//way off the canvas for someone working without a mouse.
|
||||||
//Escape steps back out: first it drops the selection, then it
|
//Escape steps back out: first it drops the selection, then it
|
||||||
//hands focus to the next widget.
|
//hands focus to the next widget.
|
||||||
if (m_diagram && m_diagram->hasEventInterface()) {
|
if (m_diagram && m_diagram->eventInterfaceIsRunning()) {
|
||||||
QGraphicsView::keyPressEvent(e); // let the active tool see it
|
QGraphicsView::keyPressEvent(e); // let the active tool see it
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,6 +156,16 @@ bool LineEditor::setParts(QList<CustomElementPart *> parts)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// setPart() no-ops when parts.first() is already m_part (its own
|
||||||
|
// identity guard), which skips updateForm(). That is fine when this
|
||||||
|
// editor widget stayed on screen the whole time, but since PR #675
|
||||||
|
// keeps the same editor instance installed across selection changes
|
||||||
|
// instead of tearing it down, an already-shown single line can also be
|
||||||
|
// parts.first() of a later multi-selection -- and without this call
|
||||||
|
// the geometry spinboxes keep showing whatever was in them before,
|
||||||
|
// not this selection's actual first line.
|
||||||
|
updateForm();
|
||||||
|
|
||||||
return m_style->setParts(parts);
|
return m_style->setParts(parts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
<action name="m_add_point_action">
|
<action name="m_add_point_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="list-add" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/list-add.png</normaloff>:/ico/16x16/list-add.png</iconset>
|
<normaloff>:/ico/16x16/list-add.png</normaloff>:/ico/16x16/list-add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_remove_point_action">
|
<action name="m_remove_point_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="list-remove" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/list-remove.png</normaloff>:/ico/16x16/list-remove.png</iconset>
|
<normaloff>:/ico/16x16/list-remove.png</normaloff>:/ico/16x16/list-remove.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|||||||
@@ -575,9 +575,11 @@ void QETElementEditor::updateInformations()
|
|||||||
|| selection_xml_name == "ellipse"
|
|| selection_xml_name == "ellipse"
|
||||||
|| selection_xml_name == "arc")
|
|| selection_xml_name == "arc")
|
||||||
{
|
{
|
||||||
clearToolsDock();
|
|
||||||
//We add the editor widget
|
//We add the editor widget
|
||||||
ElementItemEditor *editor = static_cast<ElementItemEditor*>(m_editors[selection_xml_name]);
|
ElementItemEditor *editor = static_cast<ElementItemEditor*>(m_editors[selection_xml_name]);
|
||||||
|
if (m_tools_dock_stack -> widget(1) != editor) {
|
||||||
|
clearToolsDock();
|
||||||
|
}
|
||||||
|
|
||||||
#if TODO_LIST
|
#if TODO_LIST
|
||||||
#pragma message("@TODO Check if it takes longer than setting the parts again to the editor.")
|
#pragma message("@TODO Check if it takes longer than setting the parts again to the editor.")
|
||||||
@@ -610,11 +612,15 @@ void QETElementEditor::updateInformations()
|
|||||||
success = editor -> setParts(cep_list);
|
success = editor -> setParts(cep_list);
|
||||||
}
|
}
|
||||||
if (success) {
|
if (success) {
|
||||||
m_tools_dock_stack -> insertWidget(1, editor);
|
if (m_tools_dock_stack -> widget(1) != editor) {
|
||||||
|
m_tools_dock_stack -> insertWidget(1, editor);
|
||||||
|
}
|
||||||
m_tools_dock_stack -> setCurrentIndex(1);
|
m_tools_dock_stack -> setCurrentIndex(1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
qDebug() << "Editor refused part.";
|
qDebug() << "Editor refused part.";
|
||||||
|
clearToolsDock();
|
||||||
|
m_tools_dock_stack->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -628,8 +634,10 @@ void QETElementEditor::updateInformations()
|
|||||||
// multi edit for polygons makes no sense
|
// multi edit for polygons makes no sense
|
||||||
// TODO: maybe allowing multipart edit when number of points is the same?
|
// TODO: maybe allowing multipart edit when number of points is the same?
|
||||||
//We add the editor widget
|
//We add the editor widget
|
||||||
clearToolsDock();
|
|
||||||
ElementItemEditor *editor = static_cast<ElementItemEditor*>(m_editors[selection_xml_name]);
|
ElementItemEditor *editor = static_cast<ElementItemEditor*>(m_editors[selection_xml_name]);
|
||||||
|
if (m_tools_dock_stack -> widget(1) != editor) {
|
||||||
|
clearToolsDock();
|
||||||
|
}
|
||||||
CustomElementPart* part = editor -> currentPart();
|
CustomElementPart* part = editor -> currentPart();
|
||||||
bool equal = part == cep_list.first();
|
bool equal = part == cep_list.first();
|
||||||
|
|
||||||
@@ -639,11 +647,15 @@ void QETElementEditor::updateInformations()
|
|||||||
success = editor -> setPart(cep_list.first());
|
success = editor -> setPart(cep_list.first());
|
||||||
}
|
}
|
||||||
if (success) {
|
if (success) {
|
||||||
m_tools_dock_stack -> insertWidget(1, editor);
|
if (m_tools_dock_stack -> widget(1) != editor) {
|
||||||
|
m_tools_dock_stack -> insertWidget(1, editor);
|
||||||
|
}
|
||||||
m_tools_dock_stack -> setCurrentIndex(1);
|
m_tools_dock_stack -> setCurrentIndex(1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
qDebug() << "Editor refused part.";
|
qDebug() << "Editor refused part.";
|
||||||
|
clearToolsDock();
|
||||||
|
m_tools_dock_stack->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -657,15 +669,21 @@ void QETElementEditor::updateInformations()
|
|||||||
|
|
||||||
//There's several parts selecteds and all can be edited by style editor.
|
//There's several parts selecteds and all can be edited by style editor.
|
||||||
if (style_editable) {
|
if (style_editable) {
|
||||||
clearToolsDock();
|
|
||||||
ElementItemEditor *selection_editor = m_editors["style"];
|
ElementItemEditor *selection_editor = m_editors["style"];
|
||||||
|
if (m_tools_dock_stack -> widget(1) != selection_editor) {
|
||||||
|
clearToolsDock();
|
||||||
|
}
|
||||||
if (selection_editor) {
|
if (selection_editor) {
|
||||||
if (selection_editor -> setParts(cep_list)) {
|
if (selection_editor -> setParts(cep_list)) {
|
||||||
m_tools_dock_stack -> insertWidget(1, selection_editor);
|
if (m_tools_dock_stack -> widget(1) != selection_editor) {
|
||||||
|
m_tools_dock_stack -> insertWidget(1, selection_editor);
|
||||||
|
}
|
||||||
m_tools_dock_stack -> setCurrentIndex(1);
|
m_tools_dock_stack -> setCurrentIndex(1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
qDebug() << "Editor refused part.";
|
qDebug() << "Editor refused part.";
|
||||||
|
clearToolsDock();
|
||||||
|
m_tools_dock_stack->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<string>QElectroTech - Éditeur d'élément</string>
|
<string>QElectroTech - Éditeur d'élément</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
<property name="windowIcon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="qet" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/qet.png</normaloff>:/ico/16x16/qet.png</iconset>
|
<normaloff>:/ico/16x16/qet.png</normaloff>:/ico/16x16/qet.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget"/>
|
<widget class="QWidget" name="centralwidget"/>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
<string>Coller depuis...</string>
|
<string>Coller depuis...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="edit-paste" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/edit-paste.png</normaloff>:/ico/16x16/edit-paste.png</iconset>
|
<normaloff>:/ico/16x16/edit-paste.png</normaloff>:/ico/16x16/edit-paste.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="m_paste_from_file_action"/>
|
<addaction name="m_paste_from_file_action"/>
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<action name="m_select_all_act">
|
<action name="m_select_all_act">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="edit-select-all" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/edit-select-all.png</normaloff>:/ico/16x16/edit-select-all.png</iconset>
|
<normaloff>:/ico/16x16/edit-select-all.png</normaloff>:/ico/16x16/edit-select-all.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_new_action">
|
<action name="m_new_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="document-new" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/document-new.png</normaloff>:/ico/22x22/document-new.png</iconset>
|
<normaloff>:/ico/22x22/document-new.png</normaloff>:/ico/22x22/document-new.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -220,7 +220,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_open_action">
|
<action name="m_open_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="folder-open" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/folder-open.png</normaloff>:/ico/22x22/folder-open.png</iconset>
|
<normaloff>:/ico/22x22/folder-open.png</normaloff>:/ico/22x22/folder-open.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_open_from_file_action">
|
<action name="m_open_from_file_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="folder-open" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/folder-open.png</normaloff>:/ico/22x22/folder-open.png</iconset>
|
<normaloff>:/ico/22x22/folder-open.png</normaloff>:/ico/22x22/folder-open.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -238,7 +238,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_save_action">
|
<action name="m_save_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="document-save" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/document-save.png</normaloff>:/ico/22x22/document-save.png</iconset>
|
<normaloff>:/ico/22x22/document-save.png</normaloff>:/ico/22x22/document-save.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -247,7 +247,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_save_as_action">
|
<action name="m_save_as_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="document-save-as" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/document-save-as.png</normaloff>:/ico/22x22/document-save-as.png</iconset>
|
<normaloff>:/ico/22x22/document-save-as.png</normaloff>:/ico/22x22/document-save-as.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -256,7 +256,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_save_as_file_action">
|
<action name="m_save_as_file_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="document-save" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/document-save.png</normaloff>:/ico/22x22/document-save.png</iconset>
|
<normaloff>:/ico/22x22/document-save.png</normaloff>:/ico/22x22/document-save.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -265,7 +265,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_export_svg_action">
|
<action name="m_export_svg_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="document-export" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/document-export.png</normaloff>:/ico/22x22/document-export.png</iconset>
|
<normaloff>:/ico/22x22/document-export.png</normaloff>:/ico/22x22/document-export.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -274,7 +274,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_reload_action">
|
<action name="m_reload_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="view-refresh" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/view-refresh.png</normaloff>:/ico/22x22/view-refresh.png</iconset>
|
<normaloff>:/ico/22x22/view-refresh.png</normaloff>:/ico/22x22/view-refresh.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -283,7 +283,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_quit_action">
|
<action name="m_quit_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="application-exit" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/application-exit.png</normaloff>:/ico/16x16/application-exit.png</iconset>
|
<normaloff>:/ico/16x16/application-exit.png</normaloff>:/ico/16x16/application-exit.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -295,7 +295,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_deselect_all_action">
|
<action name="m_deselect_all_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="edit-select-none" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/edit-select-none.png</normaloff>:/ico/16x16/edit-select-none.png</iconset>
|
<normaloff>:/ico/16x16/edit-select-none.png</normaloff>:/ico/16x16/edit-select-none.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -304,7 +304,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_cut_action">
|
<action name="m_cut_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="edit-cut" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/edit-cut.png</normaloff>:/ico/16x16/edit-cut.png</iconset>
|
<normaloff>:/ico/16x16/edit-cut.png</normaloff>:/ico/16x16/edit-cut.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -313,7 +313,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_copy_action">
|
<action name="m_copy_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="edit-copy" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/edit-copy.png</normaloff>:/ico/16x16/edit-copy.png</iconset>
|
<normaloff>:/ico/16x16/edit-copy.png</normaloff>:/ico/16x16/edit-copy.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -322,7 +322,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_paste_action">
|
<action name="m_paste_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="edit-paste" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/edit-paste.png</normaloff>:/ico/16x16/edit-paste.png</iconset>
|
<normaloff>:/ico/16x16/edit-paste.png</normaloff>:/ico/16x16/edit-paste.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -331,7 +331,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_paste_in_area_action">
|
<action name="m_paste_in_area_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="edit-paste" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/edit-paste.png</normaloff>:/ico/16x16/edit-paste.png</iconset>
|
<normaloff>:/ico/16x16/edit-paste.png</normaloff>:/ico/16x16/edit-paste.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -340,7 +340,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_paste_from_file_action">
|
<action name="m_paste_from_file_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="text-xml" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/text-xml.png</normaloff>:/ico/16x16/text-xml.png</iconset>
|
<normaloff>:/ico/16x16/text-xml.png</normaloff>:/ico/16x16/text-xml.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_paste_from_element_action">
|
<action name="m_paste_from_element_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="element" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/element.png</normaloff>:/ico/16x16/element.png</iconset>
|
<normaloff>:/ico/16x16/element.png</normaloff>:/ico/16x16/element.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -358,7 +358,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_revert_selection_action">
|
<action name="m_revert_selection_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="edit-select-invert" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/edit-select-invert.png</normaloff>:/ico/16x16/edit-select-invert.png</iconset>
|
<normaloff>:/ico/16x16/edit-select-invert.png</normaloff>:/ico/16x16/edit-select-invert.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -367,7 +367,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_delete_action">
|
<action name="m_delete_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="edit-delete" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/edit-delete.png</normaloff>:/ico/22x22/edit-delete.png</iconset>
|
<normaloff>:/ico/22x22/edit-delete.png</normaloff>:/ico/22x22/edit-delete.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -376,7 +376,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_edit_names_action">
|
<action name="m_edit_names_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="names" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/names.png</normaloff>:/ico/22x22/names.png</iconset>
|
<normaloff>:/ico/22x22/names.png</normaloff>:/ico/22x22/names.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -385,7 +385,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_edit_author_action">
|
<action name="m_edit_author_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="preferences-desktop-user" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/preferences-desktop-user.png</normaloff>:/ico/16x16/preferences-desktop-user.png</iconset>
|
<normaloff>:/ico/16x16/preferences-desktop-user.png</normaloff>:/ico/16x16/preferences-desktop-user.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -394,7 +394,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_edit_element_properties_action">
|
<action name="m_edit_element_properties_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="element-edit" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/element-edit.png</normaloff>:/ico/22x22/element-edit.png</iconset>
|
<normaloff>:/ico/22x22/element-edit.png</normaloff>:/ico/22x22/element-edit.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -403,7 +403,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_zoom_in_action">
|
<action name="m_zoom_in_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="zoom-in" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/zoom-in.png</normaloff>:/ico/22x22/zoom-in.png</iconset>
|
<normaloff>:/ico/22x22/zoom-in.png</normaloff>:/ico/22x22/zoom-in.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -412,7 +412,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_zoom_out_action">
|
<action name="m_zoom_out_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="zoom-out" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/zoom-out.png</normaloff>:/ico/22x22/zoom-out.png</iconset>
|
<normaloff>:/ico/22x22/zoom-out.png</normaloff>:/ico/22x22/zoom-out.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -421,7 +421,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_zoom_fit_best_action">
|
<action name="m_zoom_fit_best_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="zoom-fit-best" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/zoom-fit-best.png</normaloff>:/ico/22x22/zoom-fit-best.png</iconset>
|
<normaloff>:/ico/22x22/zoom-fit-best.png</normaloff>:/ico/22x22/zoom-fit-best.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -430,7 +430,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_zoom_original_action">
|
<action name="m_zoom_original_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="zoom-original" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/zoom-original.png</normaloff>:/ico/22x22/zoom-original.png</iconset>
|
<normaloff>:/ico/22x22/zoom-original.png</normaloff>:/ico/22x22/zoom-original.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -439,7 +439,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_about_qet_action">
|
<action name="m_about_qet_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="qet" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/qet.png</normaloff>:/ico/16x16/qet.png</iconset>
|
<normaloff>:/ico/16x16/qet.png</normaloff>:/ico/16x16/qet.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -451,7 +451,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_online_manual">
|
<action name="m_online_manual">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="help-contents" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/help-contents.png</normaloff>:/ico/16x16/help-contents.png</iconset>
|
<normaloff>:/ico/16x16/help-contents.png</normaloff>:/ico/16x16/help-contents.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -463,7 +463,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_youtube_action">
|
<action name="m_youtube_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="kdenlive-show-video" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/kdenlive-show-video.png</normaloff>:/ico/16x16/kdenlive-show-video.png</iconset>
|
<normaloff>:/ico/16x16/kdenlive-show-video.png</normaloff>:/ico/16x16/kdenlive-show-video.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -475,7 +475,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_donate_action">
|
<action name="m_donate_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="help-donate" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/help-donate.png</normaloff>:/ico/16x16/help-donate.png</iconset>
|
<normaloff>:/ico/16x16/help-donate.png</normaloff>:/ico/16x16/help-donate.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -487,7 +487,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_about_qt_action">
|
<action name="m_about_qt_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="qt" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/qt.png</normaloff>:/ico/16x16/qt.png</iconset>
|
<normaloff>:/ico/16x16/qt.png</normaloff>:/ico/16x16/qt.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -499,7 +499,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_rotate_action">
|
<action name="m_rotate_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="orientations" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/orientations.png</normaloff>:/ico/16x16/orientations.png</iconset>
|
<normaloff>:/ico/16x16/orientations.png</normaloff>:/ico/16x16/orientations.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -508,7 +508,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_rotateFine_action">
|
<action name="m_rotateFine_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="orientations" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/orientations.png</normaloff>:/ico/16x16/orientations.png</iconset>
|
<normaloff>:/ico/16x16/orientations.png</normaloff>:/ico/16x16/orientations.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -517,7 +517,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_mirror_action">
|
<action name="m_mirror_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="mirror" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/mirror.png</normaloff>:/ico/16x16/mirror.png</iconset>
|
<normaloff>:/ico/16x16/mirror.png</normaloff>:/ico/16x16/mirror.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -526,7 +526,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_flip_action">
|
<action name="m_flip_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="flip" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/flip.png</normaloff>:/ico/16x16/flip.png</iconset>
|
<normaloff>:/ico/16x16/flip.png</normaloff>:/ico/16x16/flip.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -535,7 +535,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_import_dxf">
|
<action name="m_import_dxf">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="run-dxf" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/run-dxf.png</normaloff>:/ico/16x16/run-dxf.png</iconset>
|
<normaloff>:/ico/16x16/run-dxf.png</normaloff>:/ico/16x16/run-dxf.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -544,7 +544,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_import_scaled_element">
|
<action name="m_import_scaled_element">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../qelectrotech.qrc">
|
<iconset theme="folder-open" resource="../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/folder-open.png</normaloff>:/ico/22x22/folder-open.png</iconset>
|
<normaloff>:/ico/22x22/folder-open.png</normaloff>:/ico/22x22/folder-open.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include "qetgraphicsitem/element.h"
|
#include "qetgraphicsitem/element.h"
|
||||||
|
#include "qetgraphicsitem/dynamicelementtextitem.h"
|
||||||
|
#include "qetinformation.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
When the ENABLE_PANEL_WIDGET_DND_CHECKS flag is set, the panel
|
When the ENABLE_PANEL_WIDGET_DND_CHECKS flag is set, the panel
|
||||||
@@ -668,6 +670,10 @@ void ElementsPanelWidget::duplicateDiagram()
|
|||||||
|
|
||||||
new_diagram->fromXml(diagram_elmt, QPointF(0, 0), false, nullptr);
|
new_diagram->fromXml(diagram_elmt, QPointF(0, 0), false, nullptr);
|
||||||
|
|
||||||
|
QSettings settings;
|
||||||
|
bool erase_labels = settings.value(
|
||||||
|
"diagramcommands/erase-label-on-copy", true).toBool();
|
||||||
|
|
||||||
for (QGraphicsItem *item : new_diagram->items()) {
|
for (QGraphicsItem *item : new_diagram->items()) {
|
||||||
if (Element *elmt = dynamic_cast<Element *>(item)) {
|
if (Element *elmt = dynamic_cast<Element *>(item)) {
|
||||||
// The XML round-trip kept the source elements' uuids. Give the
|
// The XML round-trip kept the source elements' uuids. Give the
|
||||||
@@ -688,6 +694,90 @@ void ElementsPanelWidget::duplicateDiagram()
|
|||||||
{
|
{
|
||||||
new_diagram->restoreText(elmt);
|
new_diagram->restoreText(elmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clear pending links so copies don't link back to
|
||||||
|
// the source elements via stale UUIDs.
|
||||||
|
elmt->clearPendingLinks();
|
||||||
|
|
||||||
|
// Clean up copied element data:
|
||||||
|
// 1. Slaves always lose label/formula/comment/location
|
||||||
|
// and PLC master data — their text comes from a
|
||||||
|
// master element not available on the copy.
|
||||||
|
// 2. Non-slaves: honour "erase-label-on-copy".
|
||||||
|
|
||||||
|
DiagramContext dc = elmt->elementInformations();
|
||||||
|
bool changed = false;
|
||||||
|
|
||||||
|
// Slaves always lose their label/BMK and PLC data —
|
||||||
|
// their text comes from the master, which is not
|
||||||
|
// available on the copied element.
|
||||||
|
if (elmt->linkType() == Element::Slave) {
|
||||||
|
dc.addValue("formula", "");
|
||||||
|
dc.addValue("label", "");
|
||||||
|
dc.addValue("comment", "");
|
||||||
|
dc.addValue("location", "");
|
||||||
|
changed = true;
|
||||||
|
|
||||||
|
for (const QString &key : {
|
||||||
|
QETInformation::ELMT_PLC_TYPE,
|
||||||
|
QETInformation::ELMT_PLC_ADDRESS,
|
||||||
|
QETInformation::ELMT_PLC_FUNCTION,
|
||||||
|
QETInformation::ELMT_PLC_COMMENT,
|
||||||
|
QETInformation::ELMT_PLC_CROSSREF,
|
||||||
|
QETInformation::ELMT_PLC_TC,
|
||||||
|
QETInformation::ELMT_PLC_T1,
|
||||||
|
QETInformation::ELMT_PLC_T2,
|
||||||
|
QETInformation::ELMT_PLC_T3,
|
||||||
|
QETInformation::ELMT_PLC_T4,
|
||||||
|
QStringLiteral("xref")}) {
|
||||||
|
if (dc.contains(key)) {
|
||||||
|
dc.remove(key);
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Non-slaves: honour the "erase-label-on-copy" preference.
|
||||||
|
else if (erase_labels) {
|
||||||
|
dc.addValue("formula", "");
|
||||||
|
dc.addValue("label", "");
|
||||||
|
dc.addValue("comment", "");
|
||||||
|
dc.addValue("location", "");
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (changed) {
|
||||||
|
const bool is_slave = (elmt->linkType() == Element::Slave);
|
||||||
|
|
||||||
|
// Block alignment during setElementInformations
|
||||||
|
// for non-slaves, same as Element::fromXml() (line 890-896).
|
||||||
|
// For PLC slaves, don't block — elementInfoChanged()
|
||||||
|
// fires (elementUseForInfo returns self) and needs
|
||||||
|
// finishAlignment() to adjust positions for the
|
||||||
|
// new (empty) text.
|
||||||
|
if (!is_slave) {
|
||||||
|
for (auto deti : elmt->dynamicTextItems())
|
||||||
|
deti->m_block_alignment = true;
|
||||||
|
}
|
||||||
|
elmt->setElementInformations(dc);
|
||||||
|
for (auto deti : elmt->dynamicTextItems())
|
||||||
|
deti->m_block_alignment = false;
|
||||||
|
|
||||||
|
// For non-PLC slaves, elementInfoChanged() doesn't
|
||||||
|
// fire (no linked master), so the text items keep
|
||||||
|
// their original text. Clear them directly.
|
||||||
|
// For PLC slaves, elementInfoChanged() already
|
||||||
|
// cleared the text above. Skip UserText items
|
||||||
|
// (free text typed by the user) in both cases.
|
||||||
|
if (is_slave) {
|
||||||
|
for (auto deti : elmt->dynamicTextItems()) {
|
||||||
|
if (deti->textFrom() != DynamicElementTextItem::UserText) {
|
||||||
|
deti->m_block_alignment = true;
|
||||||
|
deti->setPlainText(QString());
|
||||||
|
deti->m_block_alignment = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (Conductor *cond = dynamic_cast<Conductor *>(item)) {
|
else if (Conductor *cond = dynamic_cast<Conductor *>(item)) {
|
||||||
// Same reasoning for conductors: conductor.uuid is the PRIMARY
|
// Same reasoning for conductors: conductor.uuid is the PRIMARY
|
||||||
@@ -695,6 +785,16 @@ void ElementsPanelWidget::duplicateDiagram()
|
|||||||
// so a duplicated uuid fails and the wire silently disappears
|
// so a duplicated uuid fails and the wire silently disappears
|
||||||
// from the wiring list and the per-element wire count.
|
// from the wiring list and the per-element wire count.
|
||||||
cond->newUuid();
|
cond->newUuid();
|
||||||
|
|
||||||
|
// Reset conductor labels when "erase-label-on-copy" is
|
||||||
|
// active, matching PasteDiagramCommand::redo() —
|
||||||
|
// "erase on copy" means erase, not "replace with the
|
||||||
|
// project's default new-conductor text" (see issue #413).
|
||||||
|
if (erase_labels) {
|
||||||
|
ConductorProperties cp = cond->properties();
|
||||||
|
cp.text = "";
|
||||||
|
cond->setProperties(cp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="dialog-ok" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/dialog-ok.png</normaloff>:/ico/16x16/dialog-ok.png</iconset>
|
<normaloff>:/ico/16x16/dialog-ok.png</normaloff>:/ico/16x16/dialog-ok.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="flat">
|
||||||
@@ -305,7 +305,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<action name="m_adjust_width_action">
|
<action name="m_adjust_width_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="view_fit_width" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/view_fit_width.png</normaloff>:/ico/22x22/view_fit_width.png</iconset>
|
<normaloff>:/ico/22x22/view_fit_width.png</normaloff>:/ico/22x22/view_fit_width.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -314,7 +314,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_adjust_page_action">
|
<action name="m_adjust_page_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="view-fit-window" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/view-fit-window.png</normaloff>:/ico/22x22/view-fit-window.png</iconset>
|
<normaloff>:/ico/22x22/view-fit-window.png</normaloff>:/ico/22x22/view-fit-window.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -323,7 +323,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_zoom_out_action">
|
<action name="m_zoom_out_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="zoom-out" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/zoom-out.png</normaloff>:/ico/16x16/zoom-out.png</iconset>
|
<normaloff>:/ico/16x16/zoom-out.png</normaloff>:/ico/16x16/zoom-out.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -332,7 +332,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_zoom_in_action">
|
<action name="m_zoom_in_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="zoom-in" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/zoom-in.png</normaloff>:/ico/16x16/zoom-in.png</iconset>
|
<normaloff>:/ico/16x16/zoom-in.png</normaloff>:/ico/16x16/zoom-in.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -341,7 +341,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_landscape_action">
|
<action name="m_landscape_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="landscape" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/landscape.png</normaloff>:/ico/22x22/landscape.png</iconset>
|
<normaloff>:/ico/22x22/landscape.png</normaloff>:/ico/22x22/landscape.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -350,7 +350,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_portrait_action">
|
<action name="m_portrait_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="portrait" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/portrait.png</normaloff>:/ico/22x22/portrait.png</iconset>
|
<normaloff>:/ico/22x22/portrait.png</normaloff>:/ico/22x22/portrait.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -359,7 +359,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_first_page_action">
|
<action name="m_first_page_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="arrow-left-double" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/arrow-left-double.png</normaloff>:/ico/16x16/arrow-left-double.png</iconset>
|
<normaloff>:/ico/16x16/arrow-left-double.png</normaloff>:/ico/16x16/arrow-left-double.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -368,7 +368,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_previous_page_action">
|
<action name="m_previous_page_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="arrow-left" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/arrow-left.png</normaloff>:/ico/16x16/arrow-left.png</iconset>
|
<normaloff>:/ico/16x16/arrow-left.png</normaloff>:/ico/16x16/arrow-left.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -377,7 +377,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_next_page_action">
|
<action name="m_next_page_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="arrow-right" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/arrow-right.png</normaloff>:/ico/16x16/arrow-right.png</iconset>
|
<normaloff>:/ico/16x16/arrow-right.png</normaloff>:/ico/16x16/arrow-right.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -386,7 +386,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_last_page_action">
|
<action name="m_last_page_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="arrow-right-double" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/arrow-right-double.png</normaloff>:/ico/22x22/arrow-right-double.png</iconset>
|
<normaloff>:/ico/22x22/arrow-right-double.png</normaloff>:/ico/22x22/arrow-right-double.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -395,7 +395,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_display_single_page_action">
|
<action name="m_display_single_page_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="single_page" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/single_page.png</normaloff>:/ico/22x22/single_page.png</iconset>
|
<normaloff>:/ico/22x22/single_page.png</normaloff>:/ico/22x22/single_page.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -404,7 +404,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_display_two_page_action">
|
<action name="m_display_two_page_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="two_pages" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/two_pages.png</normaloff>:/ico/22x22/two_pages.png</iconset>
|
<normaloff>:/ico/22x22/two_pages.png</normaloff>:/ico/22x22/two_pages.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -413,7 +413,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_display_all_page_action">
|
<action name="m_display_all_page_action">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="all_pages" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/all_pages.png</normaloff>:/ico/22x22/all_pages.png</iconset>
|
<normaloff>:/ico/22x22/all_pages.png</normaloff>:/ico/22x22/all_pages.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -422,7 +422,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="m_page_setup">
|
<action name="m_page_setup">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="document-print-frame" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/48x48/document-print-frame.png</normaloff>:/ico/48x48/document-print-frame.png</iconset>
|
<normaloff>:/ico/48x48/document-print-frame.png</normaloff>:/ico/48x48/document-print-frame.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ QETApp::QETApp() :
|
|||||||
}
|
}
|
||||||
initConfiguration();
|
initConfiguration();
|
||||||
initLanguage();
|
initLanguage();
|
||||||
|
initIconTheme();
|
||||||
QET::Icons::initIcons();
|
QET::Icons::initIcons();
|
||||||
initFonts();
|
initFonts();
|
||||||
initStyle();
|
initStyle();
|
||||||
@@ -2330,6 +2331,22 @@ void QETApp::initFonts()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief QETApp::initIconTheme
|
||||||
|
Register QET's icon theme "qet" (see misc/make_icon_themes.py and
|
||||||
|
ico/icon-themes.qrc) and make it the current theme, so
|
||||||
|
QIcon::fromTheme("name") resolves to QET's own icons on every
|
||||||
|
platform. Must run before QET::Icons::initIcons(), which looks icons
|
||||||
|
up by name.
|
||||||
|
*/
|
||||||
|
void QETApp::initIconTheme()
|
||||||
|
{
|
||||||
|
QStringList paths = QIcon::themeSearchPaths();
|
||||||
|
paths.prepend(QStringLiteral(":/ico/themes"));
|
||||||
|
QIcon::setThemeSearchPaths(paths);
|
||||||
|
QIcon::setThemeName(QStringLiteral("qet"));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief QETApp::initStyle
|
@brief QETApp::initStyle
|
||||||
Setup the gui style
|
Setup the gui style
|
||||||
|
|||||||
@@ -286,6 +286,7 @@ class QETApp : public QObject
|
|||||||
void setSplashScreenStep(const QString & = QString());
|
void setSplashScreenStep(const QString & = QString());
|
||||||
void initLanguage();
|
void initLanguage();
|
||||||
void initFonts();
|
void initFonts();
|
||||||
|
void initIconTheme();
|
||||||
void initStyle();
|
void initStyle();
|
||||||
void initConfiguration();
|
void initConfiguration();
|
||||||
void initSystemTray();
|
void initSystemTray();
|
||||||
|
|||||||
@@ -430,7 +430,7 @@ void QETDiagramEditor::setUpActions()
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Draw or not the custom guides
|
// Draw or not the custom guides
|
||||||
m_draw_guides = new QAction ( QIcon(":/ico/22x22/guides.png"), tr("Afficher les guides"), this);
|
m_draw_guides = new QAction ( QIcon::fromTheme("guides"), tr("Afficher les guides"), this);
|
||||||
m_draw_guides->setStatusTip(tr("Affiche ou masque les guides"));
|
m_draw_guides->setStatusTip(tr("Affiche ou masque les guides"));
|
||||||
m_draw_guides->setCheckable(true);
|
m_draw_guides->setCheckable(true);
|
||||||
m_draw_guides->setChecked(settings.value("diagrameditor/guides_display_startup", false).toBool());
|
m_draw_guides->setChecked(settings.value("diagrameditor/guides_display_startup", false).toBool());
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../../qelectrotech.qrc">
|
<iconset theme="arrow-right" resource="../../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/arrow-right.png</normaloff>:/ico/16x16/arrow-right.png</iconset>
|
<normaloff>:/ico/16x16/arrow-right.png</normaloff>:/ico/16x16/arrow-right.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="flat">
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../../qelectrotech.qrc">
|
<iconset theme="zoom-fit-best" resource="../../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/zoom-fit-best.png</normaloff>:/ico/22x22/zoom-fit-best.png</iconset>
|
<normaloff>:/ico/22x22/zoom-fit-best.png</normaloff>:/ico/22x22/zoom-fit-best.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../../qelectrotech.qrc">
|
<iconset theme="arrow-left" resource="../../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/arrow-left.png</normaloff>:/ico/16x16/arrow-left.png</iconset>
|
<normaloff>:/ico/16x16/arrow-left.png</normaloff>:/ico/16x16/arrow-left.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="flat">
|
||||||
@@ -203,7 +203,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../../qelectrotech.qrc">
|
<iconset theme="all_pages" resource="../../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/all_pages.png</normaloff>:/ico/22x22/all_pages.png</iconset>
|
<normaloff>:/ico/22x22/all_pages.png</normaloff>:/ico/22x22/all_pages.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<string>Requête</string>
|
<string>Requête</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../../qelectrotech.qrc">
|
<iconset theme="edit-rename" resource="../../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/edit-rename.png</normaloff>:/ico/16x16/edit-rename.png</iconset>
|
<normaloff>:/ico/16x16/edit-rename.png</normaloff>:/ico/16x16/edit-rename.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<string>Recharger</string>
|
<string>Recharger</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../../qelectrotech.qrc">
|
<iconset theme="view-refresh" resource="../../../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/view-refresh.png</normaloff>:/ico/16x16/view-refresh.png</iconset>
|
<normaloff>:/ico/16x16/view-refresh.png</normaloff>:/ico/16x16/view-refresh.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -120,6 +120,11 @@ class Element : public QetGraphicsItem
|
|||||||
QList<Conductor *> conductors() const;
|
QList<Conductor *> conductors() const;
|
||||||
QList<QPair<Terminal *,Terminal *>> AlignedFreeTerminals() const;
|
QList<QPair<Terminal *,Terminal *>> AlignedFreeTerminals() const;
|
||||||
|
|
||||||
|
void clearPendingLinks() {
|
||||||
|
tmp_uuids_link.clear();
|
||||||
|
m_group_index_map.clear();
|
||||||
|
}
|
||||||
|
|
||||||
//METHODS related to information
|
//METHODS related to information
|
||||||
DiagramContext elementInformations()const
|
DiagramContext elementInformations()const
|
||||||
{return m_data.m_informations;}
|
{return m_data.m_informations;}
|
||||||
|
|||||||
+383
-453
@@ -392,471 +392,401 @@ void QET::Icons::initIcons()
|
|||||||
bool rtl = QApplication::isRightToLeft();
|
bool rtl = QApplication::isRightToLeft();
|
||||||
QTransform reverse = QTransform().scale(-1, 1);
|
QTransform reverse = QTransform().scale(-1, 1);
|
||||||
|
|
||||||
Add .addFile(":/ico/16x16/list-add.png");
|
Add = QIcon::fromTheme("list-add");
|
||||||
Add .addFile(":/ico/22x22/list-add.png");
|
AddFolio = QIcon::fromTheme("folio-new");
|
||||||
AddFolio .addFile(":/ico/16x16/folio-new.png");
|
Allowed = QIcon::fromTheme("user-online");
|
||||||
Allowed .addFile(":/ico/16x16/user-online.png");
|
ApplicationExit = QIcon::fromTheme("application-exit");
|
||||||
ApplicationExit .addFile(":/ico/16x16/application-exit.png");
|
ArrowLeft = QIcon::fromTheme("arrow-left");
|
||||||
ApplicationExit .addFile(":/ico/22x22/application-exit.png");
|
ArrowLeftDouble = QIcon::fromTheme("arrow-left-double");
|
||||||
ArrowLeft .addFile(":/ico/16x16/arrow-left.png");
|
ArrowRight = QIcon::fromTheme("arrow-right");
|
||||||
ArrowLeft .addFile(":/ico/22x22/arrow-left.png");
|
ArrowRightDouble = QIcon::fromTheme("arrow-right-double");
|
||||||
ArrowLeftDouble .addFile(":/ico/16x16/arrow-left-double.png");
|
Autoconnect = QIcon::fromTheme("autoconnect");
|
||||||
ArrowLeftDouble .addFile(":/ico/22x22/arrow-left-double.png");
|
BringForward = QIcon::fromTheme("bring_forward");
|
||||||
ArrowRight .addFile(":/ico/16x16/arrow-right.png");
|
Cancel = QIcon::fromTheme("item-cancel");
|
||||||
ArrowRight .addFile(":/ico/22x22/arrow-right.png");
|
Company = QIcon::fromTheme("go-company");
|
||||||
ArrowRightDouble .addFile(":/ico/16x16/arrow-right-double.png");
|
Conductor = QIcon::fromTheme("conductor");
|
||||||
ArrowRightDouble .addFile(":/ico/22x22/arrow-right-double.png");
|
ConductorEdit = QIcon::fromTheme("conductor-edit");
|
||||||
Autoconnect .addFile(":/ico/22x22/autoconnect.png");
|
ConductorSettings = QIcon::fromTheme("conductor-reset");
|
||||||
BringForward .addFile(":/ico/22x22/bring_forward.png");
|
Configure = QIcon::fromTheme("configure");
|
||||||
Cancel .addFile(":/ico/16x16/item-cancel.png");
|
ConfigureToolbars = QIcon::fromTheme("configure-toolbars");
|
||||||
Company .addFile(":/ico/16x16/go-company.png");
|
IC_CopyFile = QIcon::fromTheme("item-copy");
|
||||||
Company .addFile(":/ico/22x22/go-company.png");
|
DiagramAdd = QIcon::fromTheme("folio-new");
|
||||||
Conductor .addFile(":/ico/16x16/conductor.png");
|
Diagram.addFile(":/ico/16x16/diagram.png");
|
||||||
ConductorEdit .addFile(":/ico/16x16/conductor-edit.png");
|
Diagram.addFile(":/ico/diagram.png");
|
||||||
ConductorSettings .addFile(":/ico/16x16/conductor-reset.png");
|
DiagramBg = QIcon::fromTheme("diagram_bg");
|
||||||
ConductorSettings .addFile(":/ico/22x22/conductor2.png");
|
DiagramDelete = QIcon::fromTheme("folio-delete");
|
||||||
Configure .addFile(":/ico/16x16/configure.png");
|
DialogCancel = QIcon::fromTheme("dialog-cancel");
|
||||||
Configure .addFile(":/ico/22x22/configure.png");
|
DialogInformation = QIcon::fromTheme("folio-properties");
|
||||||
ConfigureToolbars .addFile(":/ico/16x16/configure-toolbars.png");
|
DialogOk = QIcon::fromTheme("dialog-ok");
|
||||||
ConfigureToolbars .addFile(":/ico/22x22/configure-toolbars.png");
|
DocumentClose = QIcon::fromTheme("document-close");
|
||||||
IC_CopyFile .addFile(":/ico/16x16/item-copy.png");
|
DocumentExport = QIcon::fromTheme("document-export");
|
||||||
DiagramAdd .addFile(":/ico/16x16/folio-new.png");
|
DocumentSpreadsheet = QIcon::fromTheme("export-csv");
|
||||||
DiagramAdd .addFile(":/ico/22x22/diagram_add.png");
|
DocumentExport = QIcon::fromTheme("document-export");
|
||||||
Diagram .addFile(":/ico/16x16/diagram.png");
|
DocumentImport = QIcon::fromTheme("document-import");
|
||||||
Diagram .addFile(":/ico/diagram.png");
|
DocumentNew = QIcon::fromTheme("document-new");
|
||||||
DiagramBg .addFile(":/ico/22x22/diagram_bg.png");
|
DocumentOpen = QIcon::fromTheme("document-open");
|
||||||
DiagramDelete .addFile(":/ico/16x16/folio-delete.png");
|
DocumentOpenRecent = QIcon::fromTheme("document-open-recent");
|
||||||
DiagramDelete .addFile(":/ico/22x22/diagram_del.png");
|
DocumentPrint = QIcon::fromTheme("document-print");
|
||||||
DialogCancel .addFile(":/ico/16x16/dialog-cancel.png");
|
DocumentPrintFrame = QIcon::fromTheme("document-print-frame");
|
||||||
DialogCancel .addFile(":/ico/22x22/dialog-cancel.png");
|
DocumentSave = QIcon::fromTheme("document-save");
|
||||||
DialogInformation .addFile(":/ico/16x16/folio-properties.png");
|
DocumentSaveAll = QIcon::fromTheme("document-save-all");
|
||||||
DialogInformation .addFile(":/ico/22x22/dialog-information.png");
|
DocumentSaveAs = QIcon::fromTheme("document-save-as");
|
||||||
DialogOk .addFile(":/ico/16x16/dialog-ok.png");
|
East = QIcon::fromTheme("east");
|
||||||
DialogOk .addFile(":/ico/22x22/dialog-ok.png");
|
EditClear = QIcon::fromTheme("edit-clear");
|
||||||
DocumentClose .addFile(":/ico/16x16/document-close.png");
|
EditText = QIcon::fromTheme("names");
|
||||||
DocumentClose .addFile(":/ico/22x22/document-close.png");
|
adding_image = QIcon::fromTheme("insert-image");
|
||||||
DocumentExport .addFile(":/ico/16x16/document-export.png");
|
adding_pdf = QIcon::fromTheme("pdf-import");
|
||||||
DocumentExport .addFile(":/ico/22x22/document-export.png");
|
|
||||||
DocumentSpreadsheet .addFile(":/ico/16x16/export-csv.png");
|
|
||||||
DocumentExport .addFile(":/ico/128x128/document-export.png");
|
|
||||||
DocumentImport .addFile(":/ico/16x16/document-import.png");
|
|
||||||
DocumentImport .addFile(":/ico/22x22/document-import.png");
|
|
||||||
DocumentNew .addFile(":/ico/16x16/document-new.png");
|
|
||||||
DocumentNew .addFile(":/ico/22x22/document-new.png");
|
|
||||||
DocumentOpen .addFile(":/ico/16x16/document-open.png");
|
|
||||||
DocumentOpen .addFile(":/ico/22x22/document-open.png");
|
|
||||||
DocumentOpenRecent .addFile(":/ico/16x16/document-open-recent.png");
|
|
||||||
DocumentOpenRecent .addFile(":/ico/22x22/document-open-recent.png");
|
|
||||||
DocumentPrint .addFile(":/ico/16x16/document-print.png");
|
|
||||||
DocumentPrint .addFile(":/ico/22x22/document-print.png");
|
|
||||||
DocumentPrintFrame .addFile(":/ico/16x16/document-print-frame.png");
|
|
||||||
DocumentPrintFrame .addFile(":/ico/48x48/document-print-frame.png");
|
|
||||||
DocumentSave .addFile(":/ico/16x16/document-save.png");
|
|
||||||
DocumentSave .addFile(":/ico/22x22/document-save.png");
|
|
||||||
DocumentSaveAll .addFile(":/ico/16x16/document-save-all.png");
|
|
||||||
DocumentSaveAll .addFile(":/ico/22x22/document-save-all.png");
|
|
||||||
DocumentSaveAs .addFile(":/ico/16x16/document-save-as.png");
|
|
||||||
DocumentSaveAs .addFile(":/ico/22x22/document-save-as.png");
|
|
||||||
East .addFile(":/ico/16x16/east.png");
|
|
||||||
EditClear .addFile(":/ico/16x16/edit-clear.png");
|
|
||||||
EditClear .addFile(":/ico/22x22/edit-clear.png");
|
|
||||||
EditText .addFile(":/ico/22x22/names.png");
|
|
||||||
adding_image .addFile(":/ico/22x22/insert-image.png");
|
|
||||||
adding_pdf .addFile(":/ico/22x22/pdf-import.png");
|
|
||||||
|
|
||||||
if (rtl) {
|
if (rtl) {
|
||||||
EditClearLocationBar.addPixmap(QPixmap(":/ico/16x16/edit-clear-locationbar-ltr.png").transformed(reverse));
|
EditClearLocationBar.addPixmap(QIcon::fromTheme("edit-clear-locationbar-ltr").pixmap(16).transformed(reverse));
|
||||||
EditClearLocationBar.addPixmap(QPixmap(":/ico/22x22/edit-clear-locationbar-ltr.png").transformed(reverse));
|
EditClearLocationBar.addPixmap(QIcon::fromTheme("edit-clear-locationbar-ltr").pixmap(22).transformed(reverse));
|
||||||
} else {
|
} else {
|
||||||
EditClearLocationBar.addFile(":/ico/16x16/edit-clear-locationbar-ltr.png");
|
EditClearLocationBar= QIcon::fromTheme("edit-clear-locationbar-ltr");
|
||||||
EditClearLocationBar.addFile(":/ico/22x22/edit-clear-locationbar-ltr.png");
|
|
||||||
}
|
}
|
||||||
EditCopy .addFile(":/ico/16x16/edit-copy.png");
|
EditCopy = QIcon::fromTheme("edit-copy");
|
||||||
EditCopy .addFile(":/ico/22x22/edit-copy.png");
|
EditCut = QIcon::fromTheme("edit-cut");
|
||||||
EditCut .addFile(":/ico/16x16/edit-cut.png");
|
EditDelete = QIcon::fromTheme("edit-delete");
|
||||||
EditCut .addFile(":/ico/22x22/edit-cut.png");
|
EditOpacity = QIcon::fromTheme("edit-opacity");
|
||||||
EditDelete .addFile(":/ico/16x16/edit-delete.png");
|
EditPaste = QIcon::fromTheme("edit-paste");
|
||||||
EditDelete .addFile(":/ico/22x22/edit-delete.png");
|
|
||||||
EditOpacity .addFile(":/ico/breeze-icons/scalable/apps/hidef/edit-opacity.svg");
|
|
||||||
EditPaste .addFile(":/ico/22x22/edit-paste.png");
|
|
||||||
EditPaste .addFile(":/ico/16x16/edit-paste.png");
|
|
||||||
if (rtl) {
|
if (rtl) {
|
||||||
EditRedo.addPixmap(QPixmap(":/ico/16x16/edit-redo.png").transformed(reverse));
|
EditRedo.addPixmap(QIcon::fromTheme("edit-redo").pixmap(16).transformed(reverse));
|
||||||
EditRedo.addPixmap(QPixmap(":/ico/22x22/edit-redo.png").transformed(reverse));
|
EditRedo.addPixmap(QIcon::fromTheme("edit-redo").pixmap(22).transformed(reverse));
|
||||||
} else {
|
} else {
|
||||||
EditRedo .addFile(":/ico/16x16/edit-redo.png");
|
EditRedo = QIcon::fromTheme("edit-redo");
|
||||||
EditRedo .addFile(":/ico/22x22/edit-redo.png");
|
|
||||||
}
|
}
|
||||||
EditRename .addFile(":/ico/16x16/edit-rename.png");
|
EditRename = QIcon::fromTheme("edit-rename");
|
||||||
EditRename .addFile(":/ico/22x22/edit-rename.png");
|
EditSelectAll = QIcon::fromTheme("edit-select-all");
|
||||||
EditSelectAll .addFile(":/ico/16x16/edit-select-all.png");
|
EditSelectInvert = QIcon::fromTheme("edit-select-invert");
|
||||||
EditSelectAll .addFile(":/ico/22x22/edit-select-all.png");
|
EditSelectNone = QIcon::fromTheme("edit-select-none");
|
||||||
EditSelectInvert .addFile(":/ico/16x16/edit-select-invert.png");
|
EditTableCellMerge = QIcon::fromTheme("edit-table-cell-merge");
|
||||||
EditSelectNone .addFile(":/ico/16x16/edit-select-none.png");
|
EditTableCellSplit = QIcon::fromTheme("edit-table-cell-split");
|
||||||
EditTableCellMerge .addFile(":/ico/16x16/edit-table-cell-merge.png");
|
EditTableDeleteColumn= QIcon::fromTheme("edit-table-delete-column");
|
||||||
EditTableCellMerge .addFile(":/ico/22x22/edit-table-cell-merge.png");
|
EditTableDeleteRow = QIcon::fromTheme("edit-table-delete-row");
|
||||||
EditTableCellSplit .addFile(":/ico/16x16/edit-table-cell-split.png");
|
EditTableInsertColumnLeft= QIcon::fromTheme("edit-table-insert-column-left");
|
||||||
EditTableCellSplit .addFile(":/ico/22x22/edit-table-cell-split.png");
|
EditTableInsertColumnRight= QIcon::fromTheme("edit-table-insert-column-right");
|
||||||
EditTableDeleteColumn .addFile(":/ico/16x16/edit-table-delete-column.png");
|
EditTableInsertRowAbove= QIcon::fromTheme("edit-table-insert-row-above");
|
||||||
EditTableDeleteColumn .addFile(":/ico/22x22/edit-table-delete-column.png");
|
EditTableInsertRowUnder= QIcon::fromTheme("edit-table-insert-row-under");
|
||||||
EditTableDeleteRow .addFile(":/ico/16x16/edit-table-delete-row.png");
|
|
||||||
EditTableDeleteRow .addFile(":/ico/22x22/edit-table-delete-row.png");
|
|
||||||
EditTableInsertColumnLeft .addFile(":/ico/16x16/edit-table-insert-column-left.png");
|
|
||||||
EditTableInsertColumnLeft .addFile(":/ico/22x22/edit-table-insert-column-left.png");
|
|
||||||
EditTableInsertColumnRight.addFile(":/ico/16x16/edit-table-insert-column-right.png");
|
|
||||||
EditTableInsertColumnRight.addFile(":/ico/22x22/edit-table-insert-column-right.png");
|
|
||||||
EditTableInsertRowAbove .addFile(":/ico/16x16/edit-table-insert-row-above.png");
|
|
||||||
EditTableInsertRowAbove .addFile(":/ico/22x22/edit-table-insert-row-above.png");
|
|
||||||
EditTableInsertRowUnder .addFile(":/ico/16x16/edit-table-insert-row-under.png");
|
|
||||||
EditTableInsertRowUnder .addFile(":/ico/22x22/edit-table-insert-row-under.png");
|
|
||||||
if (rtl) {
|
if (rtl) {
|
||||||
EditUndo.addPixmap(QPixmap(":/ico/16x16/edit-undo.png").transformed(reverse));
|
EditUndo.addPixmap(QIcon::fromTheme("edit-undo").pixmap(16).transformed(reverse));
|
||||||
EditUndo.addPixmap(QPixmap(":/ico/22x22/edit-undo.png").transformed(reverse));
|
EditUndo.addPixmap(QIcon::fromTheme("edit-undo").pixmap(22).transformed(reverse));
|
||||||
} else {
|
} else {
|
||||||
EditUndo .addFile(":/ico/16x16/edit-undo.png");
|
EditUndo = QIcon::fromTheme("edit-undo");
|
||||||
EditUndo .addFile(":/ico/22x22/edit-undo.png");
|
|
||||||
}
|
}
|
||||||
Element .addFile(":/ico/breeze-icons/16x16/mimetypes/application-x-qet-element.png");
|
Element.addFile(":/ico/breeze-icons/16x16/mimetypes/application-x-qet-element.png");
|
||||||
Element .addFile(":/ico/breeze-icons/22x22/mimetypes/application-x-qet-element.png");
|
Element.addFile(":/ico/breeze-icons/22x22/mimetypes/application-x-qet-element.png");
|
||||||
Element .addFile(":/ico/breeze-icons/32x32/mimetypes/application-x-qet-element.png");
|
Element.addFile(":/ico/breeze-icons/32x32/mimetypes/application-x-qet-element.png");
|
||||||
ElementDelete .addFile(":/ico/16x16/element-delete.png");
|
ElementDelete = QIcon::fromTheme("element-delete");
|
||||||
ElementDelete .addFile(":/ico/22x22/element-delete.png");
|
ElementEdit = QIcon::fromTheme("element-edit");
|
||||||
ElementEdit .addFile(":/ico/16x16/element-edit.png");
|
ElementNew = QIcon::fromTheme("element-new");
|
||||||
ElementEdit .addFile(":/ico/22x22/element-edit.png");
|
ElementSmall = QIcon::fromTheme("element");
|
||||||
ElementNew .addFile(":/ico/16x16/element-new.png");
|
EllipseToBezier = QIcon::fromTheme("ellipse-to-bezier");
|
||||||
ElementNew .addFile(":/ico/22x22/element-new.png");
|
EndLineCircle = QIcon::fromTheme("endline-circle");
|
||||||
ElementSmall .addFile(":/ico/16x16/element.png");
|
EndLineDiamond = QIcon::fromTheme("endline-diamond");
|
||||||
EllipseToBezier .addFile(":/ico/generated/ellipse-to-bezier.svg");
|
EndLineNone = QIcon::fromTheme("endline-none");
|
||||||
EndLineCircle .addFile(":/ico/16x16/endline-circle.png");
|
EndLineSimple = QIcon::fromTheme("endline-simple");
|
||||||
EndLineDiamond .addFile(":/ico/16x16/endline-diamond.png");
|
EndLineTriangle = QIcon::fromTheme("endline-triangle");
|
||||||
EndLineNone .addFile(":/ico/16x16/endline-none.png");
|
EPS = QIcon::fromTheme("image-x-eps");
|
||||||
EndLineSimple .addFile(":/ico/16x16/endline-simple.png");
|
Flip = QIcon::fromTheme("flip");
|
||||||
EndLineTriangle .addFile(":/ico/16x16/endline-triangle.png");
|
Folder = QIcon::fromTheme("folder");
|
||||||
EPS .addFile(":/ico/32x32/image-x-eps.png");
|
FolderDelete = QIcon::fromTheme("folder-delete");
|
||||||
Flip .addFile(":/ico/16x16/flip.png");
|
FolderEdit = QIcon::fromTheme("folder-edit");
|
||||||
Folder .addFile(":/ico/16x16/folder.png");
|
FolderNew = QIcon::fromTheme("folder-new");
|
||||||
FolderDelete .addFile(":/ico/16x16/folder-delete.png");
|
FolderOnlyThis = QIcon::fromTheme("folder-only-this");
|
||||||
FolderDelete .addFile(":/ico/22x22/folder-delete.png");
|
FolderOpen = QIcon::fromTheme("folder-open");
|
||||||
FolderEdit .addFile(":/ico/16x16/folder-edit.png");
|
FolderProperties = QIcon::fromTheme("folder-properties");
|
||||||
FolderEdit .addFile(":/ico/22x22/folder-edit.png");
|
FolderShowAll = QIcon::fromTheme("folder-show-all");
|
||||||
FolderNew .addFile(":/ico/16x16/folder-new.png");
|
Forbidden = QIcon::fromTheme("user-busy");
|
||||||
FolderNew .addFile(":/ico/22x22/folder-new.png");
|
FullScreenEnter = QIcon::fromTheme("view-fullscreen");
|
||||||
FolderOnlyThis .addFile(":/ico/16x16/folder-only-this.png");
|
FullScreenExit = QIcon::fromTheme("view-restore");
|
||||||
FolderOpen .addFile(":/ico/16x16/folder-open.png");
|
GoBottom = QIcon::fromTheme("go-bottom");
|
||||||
FolderOpen .addFile(":/ico/22x22/folder-open.png");
|
GoDown = QIcon::fromTheme("go-down");
|
||||||
FolderProperties .addFile(":/ico/16x16/folder-properties.png");
|
GoDownDouble = QIcon::fromTheme("go-down-double");
|
||||||
FolderShowAll .addFile(":/ico/16x16/folder-show-all.png");
|
GoTop = QIcon::fromTheme("go-top");
|
||||||
Forbidden .addFile(":/ico/16x16/user-busy.png");
|
GoUp = QIcon::fromTheme("go-up");
|
||||||
FullScreenEnter .addFile(":/ico/16x16/view-fullscreen.png");
|
GoUpDouble = QIcon::fromTheme("go-up-double");
|
||||||
FullScreenEnter .addFile(":/ico/22x22/view-fullscreen.png");
|
Ground = QIcon::fromTheme("ground");
|
||||||
FullScreenExit .addFile(":/ico/16x16/view-restore.png");
|
Grid = QIcon::fromTheme("grid");
|
||||||
FullScreenExit .addFile(":/ico/22x22/view-restore.png");
|
Hide = QIcon::fromTheme("masquer");
|
||||||
GoBottom .addFile(":/ico/16x16/go-bottom.png");
|
Home = QIcon::fromTheme("go-home");
|
||||||
GoDown .addFile(":/ico/16x16/go-down.png");
|
HotSpot = QIcon::fromTheme("hotspot");
|
||||||
GoDown .addFile(":/ico/22x22/go-down.png");
|
ImageFlipHorizontal = QIcon::fromTheme("image-flip-horizontal");
|
||||||
GoDownDouble .addFile(":/ico/16x16/go-down-double.png");
|
ImageFlipVertical = QIcon::fromTheme("image-flip-vertical");
|
||||||
GoTop .addFile(":/ico/16x16/go-top.png");
|
InsertImage = QIcon::fromTheme("insert-image");
|
||||||
GoUp .addFile(":/ico/16x16/go-up.png");
|
Lower = QIcon::fromTheme("lower");
|
||||||
GoUp .addFile(":/ico/22x22/go-up.png");
|
IC_MoveFile = QIcon::fromTheme("item-move");
|
||||||
GoUpDouble .addFile(":/ico/16x16/go-up-double.png");
|
Mirror = QIcon::fromTheme("mirror");
|
||||||
Ground .addFile(":/ico/16x16/ground.png");
|
Names = QIcon::fromTheme("names");
|
||||||
Grid .addFile(":/ico/16x16/grid.png");
|
Neutral = QIcon::fromTheme("neutral");
|
||||||
Grid .addFile(":/ico/22x22/grid.png");
|
NewDiagram = QIcon::fromTheme("diagram");
|
||||||
Hide .addFile(":/ico/16x16/masquer.png");
|
North = QIcon::fromTheme("north");
|
||||||
Home .addFile(":/ico/16x16/go-home.png");
|
ObjectLocked = QIcon::fromTheme("object-locked");
|
||||||
Home .addFile(":/ico/22x22/go-home.png");
|
ObjectRotateRight = QIcon::fromTheme("object-rotate-right");
|
||||||
HotSpot .addFile(":/ico/22x22/hotspot.png");
|
ObjectUnlocked = QIcon::fromTheme("object-unlocked");
|
||||||
ImageFlipHorizontal .addFile(":/ico/breeze-icons/scalable/apps/hidef/image-flip-horizontal-symbolic.svg");
|
Orientations = QIcon::fromTheme("orientations");
|
||||||
ImageFlipVertical .addFile(":/ico/breeze-icons/scalable/apps/hidef/image-flip-vertical-symbolic.svg");
|
PartArc = QIcon::fromTheme("arc");
|
||||||
InsertImage .addFile(":/ico/22x22/insert-image.png");
|
PartBezier = QIcon::fromTheme("draw-bezier-curves");
|
||||||
Lower .addFile(":/ico/22x22/lower.png");
|
PartCircle = QIcon::fromTheme("circle");
|
||||||
IC_MoveFile .addFile(":/ico/16x16/item-move.png");
|
PartEllipse = QIcon::fromTheme("ellipse");
|
||||||
Mirror .addFile(":/ico/16x16/mirror.png");
|
PartLine = QIcon::fromTheme("line");
|
||||||
Names .addFile(":/ico/22x22/names.png");
|
PartPolygon = QIcon::fromTheme("polygon");
|
||||||
Neutral .addFile(":/ico/16x16/neutral.png");
|
PartRectangle = QIcon::fromTheme("rectangle");
|
||||||
NewDiagram .addFile(":/ico/128x128/diagram.png");
|
PartSelect = QIcon::fromTheme("select");
|
||||||
North .addFile(":/ico/16x16/north.png");
|
PartText = QIcon::fromTheme("text");
|
||||||
ObjectLocked .addFile(":/ico/22x22/object-locked.png");
|
PartTextField = QIcon::fromTheme("textfield");
|
||||||
ObjectRotateRight .addFile(":/ico/16x16/object-rotate-right.png");
|
PDF = QIcon::fromTheme("application-pdf");
|
||||||
ObjectRotateRight .addFile(":/ico/22x22/object-rotate-right.png");
|
Phase = QIcon::fromTheme("phase");
|
||||||
ObjectUnlocked .addFile(":/ico/22x22/object-unlocked.png");
|
PrintAllPages = QIcon::fromTheme("all_pages");
|
||||||
Orientations .addFile(":/ico/16x16/orientations.png");
|
Printer = QIcon::fromTheme("printer");
|
||||||
PartArc .addFile(":/ico/22x22/arc.png");
|
PrintLandscape = QIcon::fromTheme("landscape");
|
||||||
PartBezier .addFile(":/ico/breeze-icons/scalable/apps/hidef/draw-bezier-curves.svg");
|
PrintPortrait = QIcon::fromTheme("portrait");
|
||||||
PartCircle .addFile(":/ico/16x16/circle.png");
|
PrintTwoPages = QIcon::fromTheme("two_pages");
|
||||||
PartEllipse .addFile(":/ico/22x22/ellipse.png");
|
Projects = QIcon::fromTheme("project");
|
||||||
PartLine .addFile(":/ico/22x22/line.png");
|
ProjectClose = QIcon::fromTheme("project-close");
|
||||||
PartPolygon .addFile(":/ico/22x22/polygon.png");
|
ProjectNew = QIcon::fromTheme("project-new");
|
||||||
PartRectangle .addFile(":/ico/22x22/rectangle.png");
|
ProjectFile.addFile(":/ico/breeze-icons/16x16/mimetypes/application-x-qet-project.png");
|
||||||
PartSelect .addFile(":/ico/16x16/select.png");
|
ProjectFile.addFile(":/ico/breeze-icons/22x22/mimetypes/application-x-qet-project.png");
|
||||||
PartSelect .addFile(":/ico/22x22/select.png");
|
ProjectFile.addFile(":/ico/breeze-icons/32x32/mimetypes/application-x-qet-project.png");
|
||||||
PartText .addFile(":/ico/22x22/text.png");
|
ProjectProperties = QIcon::fromTheme("project-properties");
|
||||||
PartTextField .addFile(":/ico/22x22/textfield.png");
|
QETDonate = QIcon::fromTheme("help-donate");
|
||||||
PDF .addFile(":/ico/32x32/application-pdf.png");
|
QETDownload = QIcon::fromTheme("edit-download");
|
||||||
Phase .addFile(":/ico/16x16/phase.png");
|
QETIcon.addFile(":/ico/256x256/qelectrotech.png");
|
||||||
PrintAllPages .addFile(":/ico/22x22/all_pages.png");
|
// The elements panel shows the project root with this icon in a 50 px
|
||||||
Printer .addFile(":/ico/32x32/printer.png");
|
// slot meant for element previews. The theme name "project" also
|
||||||
Printer .addFile(":/ico/128x128/printer.png");
|
// carries the 128 px file used by the configuration dialog, and on a
|
||||||
PrintLandscape .addFile(":/ico/22x22/landscape.png");
|
// 2x display Qt's theme loader would pick it and fill the slot. Load
|
||||||
PrintPortrait .addFile(":/ico/22x22/portrait.png");
|
// the two small files directly so the item stays at 16/22 px.
|
||||||
PrintTwoPages .addFile(":/ico/22x22/two_pages.png");
|
ProjectFileGP.addFile(":/ico/themes/qet/16x16/project.png");
|
||||||
Projects .addFile(":/ico/128x128/project.png");
|
ProjectFileGP.addFile(":/ico/themes/qet/22x22/project.png");
|
||||||
ProjectClose .addFile(":/ico/16x16/project-close.png");
|
QETLogo = QIcon::fromTheme("qet");
|
||||||
ProjectClose .addFile(":/ico/22x22/project-close.png");
|
QETManual = QIcon::fromTheme("help-contents");
|
||||||
ProjectNew .addFile(":/ico/16x16/project-new.png");
|
QETLogo.addFile(":/ico/256x256/qet.png");
|
||||||
ProjectNew .addFile(":/ico/22x22/project-new.png");
|
QETOxygenLogo.addFile(":/ico/breeze-icons/128x128/apps/qelectrotech.png");
|
||||||
ProjectFile .addFile(":/ico/breeze-icons/16x16/mimetypes/application-x-qet-project.png");
|
QETOxygenLogo.addFile(":/ico/breeze-icons/16x16/apps/qelectrotech.png");
|
||||||
ProjectFile .addFile(":/ico/breeze-icons/22x22/mimetypes/application-x-qet-project.png");
|
QETOxygenLogo.addFile(":/ico/breeze-icons/22x22/apps/qelectrotech.png");
|
||||||
ProjectFile .addFile(":/ico/breeze-icons/32x32/mimetypes/application-x-qet-project.png");
|
QETOxygenLogo.addFile(":/ico/breeze-icons/256x256/apps/qelectrotech.png");
|
||||||
ProjectProperties .addFile(":/ico/16x16/project-properties.png");
|
QETOxygenLogo.addFile(":/ico/breeze-icons/32x32/apps/qelectrotech.png");
|
||||||
QETDonate .addFile(":/ico/16x16/help-donate.png");
|
QETOxygenLogo.addFile(":/ico/breeze-icons/48x48/apps/qelectrotech.png");
|
||||||
QETDownload .addFile(":/ico/16x16/edit-download.png");
|
QETOxygenLogo.addFile(":/ico/breeze-icons/64x64/apps/qelectrotech.png");
|
||||||
QETIcon .addFile(":/ico/256x256/qelectrotech.png");
|
QETVideo = QIcon::fromTheme("kdenlive-show-video");
|
||||||
ProjectFileGP .addFile(":/ico/16x16/project.png");
|
QtLogo = QIcon::fromTheme("qt");
|
||||||
QETLogo .addFile(":/ico/16x16/qet.png");
|
Raise = QIcon::fromTheme("raise");
|
||||||
QETManual .addFile(":/ico/16x16/help-contents.png");
|
RectToBezier = QIcon::fromTheme("rect-to-bezier");
|
||||||
QETLogo .addFile(":/ico/256x256/qet.png");
|
RectToPolyline = QIcon::fromTheme("rect-to-polyline");
|
||||||
QETOxygenLogo .addFile(":/ico/breeze-icons/128x128/apps/qelectrotech.png");
|
Remove = QIcon::fromTheme("list-remove");
|
||||||
QETOxygenLogo .addFile(":/ico/breeze-icons/16x16/apps/qelectrotech.png");
|
resize_image = QIcon::fromTheme("transform-scale");
|
||||||
QETOxygenLogo .addFile(":/ico/breeze-icons/22x22/apps/qelectrotech.png");
|
Restore = QIcon::fromTheme("restaurer");
|
||||||
QETOxygenLogo .addFile(":/ico/breeze-icons/256x256/apps/qelectrotech.png");
|
RunDxf = QIcon::fromTheme("run-dxf");
|
||||||
QETOxygenLogo .addFile(":/ico/breeze-icons/32x32/apps/qelectrotech.png");
|
SendBackward = QIcon::fromTheme("send_backward");
|
||||||
QETOxygenLogo .addFile(":/ico/breeze-icons/48x48/apps/qelectrotech.png");
|
Settings = QIcon::fromTheme("settings");
|
||||||
QETOxygenLogo .addFile(":/ico/breeze-icons/64x64/apps/qelectrotech.png");
|
SinglePage = QIcon::fromTheme("single_page");
|
||||||
QETVideo .addFile(":/ico/16x16/kdenlive-show-video.png");
|
South = QIcon::fromTheme("south");
|
||||||
QtLogo .addFile(":/ico/16x16/qt.png");
|
Start = QIcon::fromTheme("start");
|
||||||
Raise .addFile(":/ico/22x22/raise.png");
|
TableOfContent = QIcon::fromTheme("table-of-content");
|
||||||
RectToBezier .addFile(":/ico/generated/rect-to-bezier.svg");
|
Terminal = QIcon::fromTheme("terminal");
|
||||||
RectToPolyline .addFile(":/ico/generated/rect-to-polyline.svg");
|
TerminalStrip = QIcon::fromTheme("terminalstrip");
|
||||||
Remove .addFile(":/ico/16x16/list-remove.png");
|
TitleBlock = QIcon::fromTheme("label");
|
||||||
Remove .addFile(":/ico/22x22/list-remove.png");
|
TitleBlockBottom = QIcon::fromTheme("titleblock-bottom");
|
||||||
resize_image .addFile(":/ico/22x22/transform-scale.png");
|
TitleBlockRight = QIcon::fromTheme("titleblock-right");
|
||||||
Restore .addFile(":/ico/22x22/restaurer.png");
|
TransformCrop = QIcon::fromTheme("transform-crop");
|
||||||
RunDxf .addFile(":/ico/16x16/run-dxf.png");
|
TransformRotate = QIcon::fromTheme("transform-rotate");
|
||||||
SendBackward .addFile(":/ico/22x22/send_backward.png");
|
UserInformations = QIcon::fromTheme("preferences-desktop-user");
|
||||||
Settings .addFile(":/ico/128x128/settings.png");
|
ViewFitWidth = QIcon::fromTheme("view_fit_width");
|
||||||
SinglePage .addFile(":/ico/22x22/single_page.png");
|
ViewFitWindow = QIcon::fromTheme("view-fit-window");
|
||||||
South .addFile(":/ico/16x16/south.png");
|
ViewMove = QIcon::fromTheme("move");
|
||||||
Start .addFile(":/ico/22x22/start.png");
|
|
||||||
TableOfContent .addFile(":/ico/16x16/table-of-content.png");
|
|
||||||
Terminal .addFile(":/ico/22x22/terminal.png");
|
|
||||||
TerminalStrip .addFile(":/ico/16x16/terminalstrip.png");
|
|
||||||
TerminalStrip .addFile(":/ico/22x22/terminalstrip.png");
|
|
||||||
TitleBlock .addFile(":/ico/16x16/label.png");
|
|
||||||
TitleBlock .addFile(":/ico/22x22/label.png");
|
|
||||||
TitleBlockBottom .addFile(":/ico/22x22/titleblock-bottom.png");
|
|
||||||
TitleBlockRight .addFile(":/ico/22x22/titleblock-right.png");
|
|
||||||
TransformCrop .addFile(":/ico/breeze-icons/scalable/apps/hidef/transform-crop.svg");
|
|
||||||
TransformRotate .addFile(":/ico/16x16/transform-rotate.png");
|
|
||||||
UserInformations .addFile(":/ico/16x16/preferences-desktop-user.png");
|
|
||||||
UserInformations .addFile(":/ico/22x22/preferences-desktop-user.png");
|
|
||||||
ViewFitWidth .addFile(":/ico/22x22/view_fit_width.png");
|
|
||||||
ViewFitWindow .addFile(":/ico/22x22/view-fit-window.png");
|
|
||||||
ViewMove .addFile(":/ico/16x16/move.png");
|
|
||||||
ViewMove .addFile(":/ico/22x22/move.png");
|
|
||||||
if (rtl) {
|
if (rtl) {
|
||||||
ViewRefresh.addPixmap(QPixmap(":/ico/16x16/view-refresh.png").transformed(reverse));
|
ViewRefresh.addPixmap(QIcon::fromTheme("view-refresh").pixmap(16).transformed(reverse));
|
||||||
ViewRefresh.addPixmap(QPixmap(":/ico/22x22/view-refresh.png").transformed(reverse));
|
ViewRefresh.addPixmap(QIcon::fromTheme("view-refresh").pixmap(22).transformed(reverse));
|
||||||
} else {
|
} else {
|
||||||
ViewRefresh .addFile(":/ico/16x16/view-refresh.png");
|
ViewRefresh = QIcon::fromTheme("view-refresh");
|
||||||
ViewRefresh .addFile(":/ico/22x22/view-refresh.png");
|
|
||||||
}
|
}
|
||||||
West .addFile(":/ico/16x16/west.png");
|
West = QIcon::fromTheme("west");
|
||||||
WindowNew .addFile(":/ico/16x16/window-new.png");
|
WindowNew = QIcon::fromTheme("window-new");
|
||||||
WindowNew .addFile(":/ico/22x22/window-new.png");
|
XmlTextFile = QIcon::fromTheme("text-xml");
|
||||||
XmlTextFile .addFile(":/ico/16x16/text-xml.png");
|
ZoomDraw = QIcon::fromTheme("zoom-draw");
|
||||||
XmlTextFile .addFile(":/ico/22x22/text-xml.png");
|
ZoomFitBest = QIcon::fromTheme("zoom-fit-best");
|
||||||
XmlTextFile .addFile(":/ico/32x32/text-xml.png");
|
ZoomIn = QIcon::fromTheme("zoom-in");
|
||||||
ZoomDraw .addFile(":/ico/16x16/zoom-draw.png");
|
ZoomOriginal = QIcon::fromTheme("zoom-original");
|
||||||
ZoomDraw .addFile(":/ico/22x22/zoom-draw.png");
|
ZoomOut = QIcon::fromTheme("zoom-out");
|
||||||
ZoomFitBest .addFile(":/ico/16x16/zoom-fit-best.png");
|
sa.addFile(":/ico/24x16/sa.png");
|
||||||
ZoomFitBest .addFile(":/ico/22x22/zoom-fit-best.png");
|
br.addFile(":/ico/24x16/br.png");
|
||||||
ZoomIn .addFile(":/ico/16x16/zoom-in.png");
|
catalonia.addFile(":/ico/24x16/catalonia.png");
|
||||||
ZoomIn .addFile(":/ico/22x22/zoom-in.png");
|
cs.addFile(":/ico/24x16/cs.png");
|
||||||
ZoomOriginal .addFile(":/ico/16x16/zoom-original.png");
|
da.addFile(":/ico/24x16/dk.png");
|
||||||
ZoomOriginal .addFile(":/ico/22x22/zoom-original.png");
|
de.addFile(":/ico/24x16/de.png");
|
||||||
ZoomOut .addFile(":/ico/16x16/zoom-out.png");
|
gr.addFile(":/ico/24x16/gr.png");
|
||||||
ZoomOut .addFile(":/ico/22x22/zoom-out.png");
|
en.addFile(":/ico/24x16/en.png");
|
||||||
sa .addFile(":/ico/24x16/sa.png");
|
es.addFile(":/ico/24x16/es.png");
|
||||||
br .addFile(":/ico/24x16/br.png");
|
fr.addFile(":/ico/24x16/fr.png");
|
||||||
catalonia .addFile(":/ico/24x16/catalonia.png");
|
hr.addFile(":/ico/24x16/hr.png");
|
||||||
cs .addFile(":/ico/24x16/cs.png");
|
hu.addFile(":/ico/24x16/hu.png");
|
||||||
da .addFile(":/ico/24x16/dk.png");
|
it.addFile(":/ico/24x16/it.png");
|
||||||
de .addFile(":/ico/24x16/de.png");
|
jp.addFile(":/ico/24x16/jp.png");
|
||||||
gr .addFile(":/ico/24x16/gr.png");
|
ko.addFile(":/ico/24x16/kr.png");
|
||||||
en .addFile(":/ico/24x16/en.png");
|
pl.addFile(":/ico/24x16/pl.png");
|
||||||
es .addFile(":/ico/24x16/es.png");
|
pt.addFile(":/ico/24x16/pt.png");
|
||||||
fr .addFile(":/ico/24x16/fr.png");
|
ro.addFile(":/ico/24x16/ro.png");
|
||||||
hr .addFile(":/ico/24x16/hr.png");
|
ru.addFile(":/ico/24x16/ru.png");
|
||||||
hu .addFile(":/ico/24x16/hu.png");
|
sl.addFile(":/ico/24x16/sl.png");
|
||||||
it .addFile(":/ico/24x16/it.png");
|
nl.addFile(":/ico/24x16/nl.png");
|
||||||
jp .addFile(":/ico/24x16/jp.png");
|
no.addFile(":/ico/24x16/no.png");
|
||||||
ko .addFile(":/ico/24x16/kr.png");
|
nl_BE.addFile(":/ico/24x16/nl_BE.png");
|
||||||
pl .addFile(":/ico/24x16/pl.png");
|
tr.addFile(":/ico/24x16/tr.png");
|
||||||
pt .addFile(":/ico/24x16/pt.png");
|
uk.addFile(":/ico/24x16/ua.png");
|
||||||
ro .addFile(":/ico/24x16/ro.png");
|
mn.addFile(":/ico/24x16/mn.png");
|
||||||
ru .addFile(":/ico/24x16/ru.png");
|
zh.addFile(":/ico/24x16/zh.png");
|
||||||
sl .addFile(":/ico/24x16/sl.png");
|
se.addFile(":/ico/24x16/se.png");
|
||||||
nl .addFile(":/ico/24x16/nl.png");
|
translation = QIcon::fromTheme("applications-development-translation");
|
||||||
no .addFile(":/ico/24x16/no.png");
|
listDrawings = QIcon::fromTheme("view-pim-journal");
|
||||||
nl_BE .addFile(":/ico/24x16/nl_BE.png");
|
AutoNum = QIcon::fromTheme("plasmagik");
|
||||||
tr .addFile(":/ico/24x16/tr.png");
|
sub = QIcon::fromTheme("format-text-subscript");
|
||||||
uk .addFile(":/ico/24x16/ua.png");
|
super = QIcon::fromTheme("format-text-superscript");
|
||||||
mn .addFile(":/ico/24x16/mn.png");
|
textGroup = QIcon::fromTheme("object-group");
|
||||||
zh .addFile(":/ico/24x16/zh.png");
|
ElementMaster = QIcon::fromTheme("element-master");
|
||||||
se .addFile(":/ico/24x16/se.png");
|
ElementSlave = QIcon::fromTheme("element-slave");
|
||||||
translation .addFile(":/ico/22x22/applications-development-translation.png");
|
FolioXrefComing = QIcon::fromTheme("folio-ref-coming");
|
||||||
listDrawings .addFile(":/ico/48x48/view-pim-journal.png");
|
ElementTerminal = QIcon::fromTheme("terminal");
|
||||||
AutoNum .addFile(":/ico/128x128/plasmagik.png");
|
ColorBrown.addFile(":/ico/22x22/color/color-brown.png");
|
||||||
sub .addFile(":/ico/22x22/format-text-subscript.png");
|
ColorGray.addFile(":/ico/22x22/color/color-gray.png");
|
||||||
super .addFile(":/ico/22x22/format-text-superscript.png");
|
ColorOrange.addFile(":/ico/22x22/color/color-orange.png");
|
||||||
textGroup .addFile(":/ico/16x16/object-group.png");
|
ColorPurple.addFile(":/ico/22x22/color/color-purple.png");
|
||||||
ElementMaster .addFile(":/ico/16x16/element-master.png");
|
ColorHTMLPinkPink.addFile(":/ico/22x22/color/color-01-pink-01-pink.png");
|
||||||
ElementSlave .addFile(":/ico/16x16/element-slave.png");
|
ColorHTMLPinkLightPink.addFile(":/ico/22x22/color/color-01-pink-02-lightpink.png");
|
||||||
FolioXrefComing .addFile(":/ico/16x16/folio-ref-coming.png");
|
ColorHTMLPinkHotPink.addFile(":/ico/22x22/color/color-01-pink-03-hotpink.png");
|
||||||
ElementTerminal .addFile(":/ico/16x16/terminal.png");
|
ColorHTMLPinkDeepPink.addFile(":/ico/22x22/color/color-01-pink-04-deeppink.png");
|
||||||
ColorBrown .addFile(":/ico/22x22/color/color-brown.png");
|
ColorHTMLPinkPaleVioletRed.addFile(":/ico/22x22/color/color-01-pink-05-palevioletred.png");
|
||||||
ColorGray .addFile(":/ico/22x22/color/color-gray.png");
|
ColorHTMLPinkMediumVioletRed.addFile(":/ico/22x22/color/color-01-pink-06-mediumvioletred.png");
|
||||||
ColorOrange .addFile(":/ico/22x22/color/color-orange.png");
|
ColorHTMLRedLightSalmon.addFile(":/ico/22x22/color/color-02-red-01-lightsalmon.png");
|
||||||
ColorPurple .addFile(":/ico/22x22/color/color-purple.png");
|
ColorHTMLRedSalmon.addFile(":/ico/22x22/color/color-02-red-02-salmon.png");
|
||||||
ColorHTMLPinkPink .addFile(":/ico/22x22/color/color-01-pink-01-pink.png");
|
ColorHTMLRedDarkSalmon.addFile(":/ico/22x22/color/color-02-red-03-darksalmon.png");
|
||||||
ColorHTMLPinkLightPink .addFile(":/ico/22x22/color/color-01-pink-02-lightpink.png");
|
ColorHTMLRedLightCoral.addFile(":/ico/22x22/color/color-02-red-04-lightcoral.png");
|
||||||
ColorHTMLPinkHotPink .addFile(":/ico/22x22/color/color-01-pink-03-hotpink.png");
|
ColorHTMLRedIndianRed.addFile(":/ico/22x22/color/color-02-red-05-indianred.png");
|
||||||
ColorHTMLPinkDeepPink .addFile(":/ico/22x22/color/color-01-pink-04-deeppink.png");
|
ColorHTMLRedCrimson.addFile(":/ico/22x22/color/color-02-red-06-crimson.png");
|
||||||
ColorHTMLPinkPaleVioletRed .addFile(":/ico/22x22/color/color-01-pink-05-palevioletred.png");
|
ColorHTMLRedFirebrick.addFile(":/ico/22x22/color/color-02-red-07-firebrick.png");
|
||||||
ColorHTMLPinkMediumVioletRed .addFile(":/ico/22x22/color/color-01-pink-06-mediumvioletred.png");
|
ColorHTMLRedDarkRed.addFile(":/ico/22x22/color/color-02-red-08-darkred.png");
|
||||||
ColorHTMLRedLightSalmon .addFile(":/ico/22x22/color/color-02-red-01-lightsalmon.png");
|
ColorHTMLRedRed.addFile(":/ico/22x22/color/color-02-red-09-red.png");
|
||||||
ColorHTMLRedSalmon .addFile(":/ico/22x22/color/color-02-red-02-salmon.png");
|
ColorHTMLOrangeOrangeRed.addFile(":/ico/22x22/color/color-03-orange-01-orangered.png");
|
||||||
ColorHTMLRedDarkSalmon .addFile(":/ico/22x22/color/color-02-red-03-darksalmon.png");
|
ColorHTMLOrangeTomato.addFile(":/ico/22x22/color/color-03-orange-02-tomato.png");
|
||||||
ColorHTMLRedLightCoral .addFile(":/ico/22x22/color/color-02-red-04-lightcoral.png");
|
ColorHTMLOrangeCoral.addFile(":/ico/22x22/color/color-03-orange-03-coral.png");
|
||||||
ColorHTMLRedIndianRed .addFile(":/ico/22x22/color/color-02-red-05-indianred.png");
|
ColorHTMLOrangeDarkOrange.addFile(":/ico/22x22/color/color-03-orange-04-darkorange.png");
|
||||||
ColorHTMLRedCrimson .addFile(":/ico/22x22/color/color-02-red-06-crimson.png");
|
ColorHTMLOrangeOrange.addFile(":/ico/22x22/color/color-03-orange-05-orange.png");
|
||||||
ColorHTMLRedFirebrick .addFile(":/ico/22x22/color/color-02-red-07-firebrick.png");
|
ColorHTMLYellowYellow.addFile(":/ico/22x22/color/color-04-yellow-01-yellow.png");
|
||||||
ColorHTMLRedDarkRed .addFile(":/ico/22x22/color/color-02-red-08-darkred.png");
|
ColorHTMLYellowLightYellow.addFile(":/ico/22x22/color/color-04-yellow-02-lightyellow.png");
|
||||||
ColorHTMLRedRed .addFile(":/ico/22x22/color/color-02-red-09-red.png");
|
ColorHTMLYellowLemonChiffon.addFile(":/ico/22x22/color/color-04-yellow-03-lemonchiffon.png");
|
||||||
ColorHTMLOrangeOrangeRed .addFile(":/ico/22x22/color/color-03-orange-01-orangered.png");
|
|
||||||
ColorHTMLOrangeTomato .addFile(":/ico/22x22/color/color-03-orange-02-tomato.png");
|
|
||||||
ColorHTMLOrangeCoral .addFile(":/ico/22x22/color/color-03-orange-03-coral.png");
|
|
||||||
ColorHTMLOrangeDarkOrange .addFile(":/ico/22x22/color/color-03-orange-04-darkorange.png");
|
|
||||||
ColorHTMLOrangeOrange .addFile(":/ico/22x22/color/color-03-orange-05-orange.png");
|
|
||||||
ColorHTMLYellowYellow .addFile(":/ico/22x22/color/color-04-yellow-01-yellow.png");
|
|
||||||
ColorHTMLYellowLightYellow .addFile(":/ico/22x22/color/color-04-yellow-02-lightyellow.png");
|
|
||||||
ColorHTMLYellowLemonChiffon .addFile(":/ico/22x22/color/color-04-yellow-03-lemonchiffon.png");
|
|
||||||
ColorHTMLYellowLightGoldenrodYellow.addFile(":/ico/22x22/color/color-04-yellow-04-lightgoldenrodyellow.png");
|
ColorHTMLYellowLightGoldenrodYellow.addFile(":/ico/22x22/color/color-04-yellow-04-lightgoldenrodyellow.png");
|
||||||
ColorHTMLYellowPapayaWhip .addFile(":/ico/22x22/color/color-04-yellow-05-papayawhip.png");
|
ColorHTMLYellowPapayaWhip.addFile(":/ico/22x22/color/color-04-yellow-05-papayawhip.png");
|
||||||
ColorHTMLYellowMoccasin .addFile(":/ico/22x22/color/color-04-yellow-06-moccasin.png");
|
ColorHTMLYellowMoccasin.addFile(":/ico/22x22/color/color-04-yellow-06-moccasin.png");
|
||||||
ColorHTMLYellowPeachPuff .addFile(":/ico/22x22/color/color-04-yellow-07-peachpuff.png");
|
ColorHTMLYellowPeachPuff.addFile(":/ico/22x22/color/color-04-yellow-07-peachpuff.png");
|
||||||
ColorHTMLYellowPaleGoldenrod .addFile(":/ico/22x22/color/color-04-yellow-08-palegoldenrod.png");
|
ColorHTMLYellowPaleGoldenrod.addFile(":/ico/22x22/color/color-04-yellow-08-palegoldenrod.png");
|
||||||
ColorHTMLYellowKhaki .addFile(":/ico/22x22/color/color-04-yellow-09-khaki.png");
|
ColorHTMLYellowKhaki.addFile(":/ico/22x22/color/color-04-yellow-09-khaki.png");
|
||||||
ColorHTMLYellowDarkKhaki .addFile(":/ico/22x22/color/color-04-yellow-10-darkkhaki.png");
|
ColorHTMLYellowDarkKhaki.addFile(":/ico/22x22/color/color-04-yellow-10-darkkhaki.png");
|
||||||
ColorHTMLYellowGold .addFile(":/ico/22x22/color/color-04-yellow-11-gold.png");
|
ColorHTMLYellowGold.addFile(":/ico/22x22/color/color-04-yellow-11-gold.png");
|
||||||
ColorHTMLBrownCornsilk .addFile(":/ico/22x22/color/color-05-brown-01-cornsilk.png");
|
ColorHTMLBrownCornsilk.addFile(":/ico/22x22/color/color-05-brown-01-cornsilk.png");
|
||||||
ColorHTMLBrownBlanchedAlmond .addFile(":/ico/22x22/color/color-05-brown-02-blanchedalmond.png");
|
ColorHTMLBrownBlanchedAlmond.addFile(":/ico/22x22/color/color-05-brown-02-blanchedalmond.png");
|
||||||
ColorHTMLBrownBisque .addFile(":/ico/22x22/color/color-05-brown-03-bisque.png");
|
ColorHTMLBrownBisque.addFile(":/ico/22x22/color/color-05-brown-03-bisque.png");
|
||||||
ColorHTMLBrownNavajoWhite .addFile(":/ico/22x22/color/color-05-brown-04-navajowhite.png");
|
ColorHTMLBrownNavajoWhite.addFile(":/ico/22x22/color/color-05-brown-04-navajowhite.png");
|
||||||
ColorHTMLBrownWheat .addFile(":/ico/22x22/color/color-05-brown-05-wheat.png");
|
ColorHTMLBrownWheat.addFile(":/ico/22x22/color/color-05-brown-05-wheat.png");
|
||||||
ColorHTMLBrownBurlywood .addFile(":/ico/22x22/color/color-05-brown-06-burlywood.png");
|
ColorHTMLBrownBurlywood.addFile(":/ico/22x22/color/color-05-brown-06-burlywood.png");
|
||||||
ColorHTMLBrownTan .addFile(":/ico/22x22/color/color-05-brown-07-tan.png");
|
ColorHTMLBrownTan.addFile(":/ico/22x22/color/color-05-brown-07-tan.png");
|
||||||
ColorHTMLBrownRosyBrown .addFile(":/ico/22x22/color/color-05-brown-08-rosybrown.png");
|
ColorHTMLBrownRosyBrown.addFile(":/ico/22x22/color/color-05-brown-08-rosybrown.png");
|
||||||
ColorHTMLBrownSandyBrown .addFile(":/ico/22x22/color/color-05-brown-09-sandybrown.png");
|
ColorHTMLBrownSandyBrown.addFile(":/ico/22x22/color/color-05-brown-09-sandybrown.png");
|
||||||
ColorHTMLBrownGoldenrod .addFile(":/ico/22x22/color/color-05-brown-10-goldenrod.png");
|
ColorHTMLBrownGoldenrod.addFile(":/ico/22x22/color/color-05-brown-10-goldenrod.png");
|
||||||
ColorHTMLBrownDarkGoldenrod .addFile(":/ico/22x22/color/color-05-brown-11-darkgoldenrod.png");
|
ColorHTMLBrownDarkGoldenrod.addFile(":/ico/22x22/color/color-05-brown-11-darkgoldenrod.png");
|
||||||
ColorHTMLBrownPeru .addFile(":/ico/22x22/color/color-05-brown-12-peru.png");
|
ColorHTMLBrownPeru.addFile(":/ico/22x22/color/color-05-brown-12-peru.png");
|
||||||
ColorHTMLBrownChocolate .addFile(":/ico/22x22/color/color-05-brown-13-chocolate.png");
|
ColorHTMLBrownChocolate.addFile(":/ico/22x22/color/color-05-brown-13-chocolate.png");
|
||||||
ColorHTMLBrownSaddleBrown .addFile(":/ico/22x22/color/color-05-brown-14-saddlebrown.png");
|
ColorHTMLBrownSaddleBrown.addFile(":/ico/22x22/color/color-05-brown-14-saddlebrown.png");
|
||||||
ColorHTMLBrownSienna .addFile(":/ico/22x22/color/color-05-brown-15-sienna.png");
|
ColorHTMLBrownSienna.addFile(":/ico/22x22/color/color-05-brown-15-sienna.png");
|
||||||
ColorHTMLBrownBrown .addFile(":/ico/22x22/color/color-05-brown-16-brown.png");
|
ColorHTMLBrownBrown.addFile(":/ico/22x22/color/color-05-brown-16-brown.png");
|
||||||
ColorHTMLBrownMaroon .addFile(":/ico/22x22/color/color-05-brown-17-maroon.png");
|
ColorHTMLBrownMaroon.addFile(":/ico/22x22/color/color-05-brown-17-maroon.png");
|
||||||
ColorHTMLGreenDarkOliveGreen .addFile(":/ico/22x22/color/color-06-green-01-darkolivegreen.png");
|
ColorHTMLGreenDarkOliveGreen.addFile(":/ico/22x22/color/color-06-green-01-darkolivegreen.png");
|
||||||
ColorHTMLGreenOlive .addFile(":/ico/22x22/color/color-06-green-02-olive.png");
|
ColorHTMLGreenOlive.addFile(":/ico/22x22/color/color-06-green-02-olive.png");
|
||||||
ColorHTMLGreenOliveDrab .addFile(":/ico/22x22/color/color-06-green-03-olivedrab.png");
|
ColorHTMLGreenOliveDrab.addFile(":/ico/22x22/color/color-06-green-03-olivedrab.png");
|
||||||
ColorHTMLGreenYellowGreen .addFile(":/ico/22x22/color/color-06-green-04-yellowgreen.png");
|
ColorHTMLGreenYellowGreen.addFile(":/ico/22x22/color/color-06-green-04-yellowgreen.png");
|
||||||
ColorHTMLGreenLimeGreen .addFile(":/ico/22x22/color/color-06-green-05-limegreen.png");
|
ColorHTMLGreenLimeGreen.addFile(":/ico/22x22/color/color-06-green-05-limegreen.png");
|
||||||
ColorHTMLGreenLime .addFile(":/ico/22x22/color/color-06-green-06-lime.png");
|
ColorHTMLGreenLime.addFile(":/ico/22x22/color/color-06-green-06-lime.png");
|
||||||
ColorHTMLGreenLawnGreen .addFile(":/ico/22x22/color/color-06-green-07-lawngreen.png");
|
ColorHTMLGreenLawnGreen.addFile(":/ico/22x22/color/color-06-green-07-lawngreen.png");
|
||||||
ColorHTMLGreenChartreuse .addFile(":/ico/22x22/color/color-06-green-08-chartreuse.png");
|
ColorHTMLGreenChartreuse.addFile(":/ico/22x22/color/color-06-green-08-chartreuse.png");
|
||||||
ColorHTMLGreenGreenYellow .addFile(":/ico/22x22/color/color-06-green-09-greenyellow.png");
|
ColorHTMLGreenGreenYellow.addFile(":/ico/22x22/color/color-06-green-09-greenyellow.png");
|
||||||
ColorHTMLGreenSpringGreen .addFile(":/ico/22x22/color/color-06-green-10-springgreen.png");
|
ColorHTMLGreenSpringGreen.addFile(":/ico/22x22/color/color-06-green-10-springgreen.png");
|
||||||
ColorHTMLGreenMediumSpringGreen .addFile(":/ico/22x22/color/color-06-green-11-mediumspringgreen.png");
|
ColorHTMLGreenMediumSpringGreen.addFile(":/ico/22x22/color/color-06-green-11-mediumspringgreen.png");
|
||||||
ColorHTMLGreenLightGreen .addFile(":/ico/22x22/color/color-06-green-12-lightgreen.png");
|
ColorHTMLGreenLightGreen.addFile(":/ico/22x22/color/color-06-green-12-lightgreen.png");
|
||||||
ColorHTMLGreenPaleGreen .addFile(":/ico/22x22/color/color-06-green-13-palegreen.png");
|
ColorHTMLGreenPaleGreen.addFile(":/ico/22x22/color/color-06-green-13-palegreen.png");
|
||||||
ColorHTMLGreenDarkSeaGreen .addFile(":/ico/22x22/color/color-06-green-14-darkseagreen.png");
|
ColorHTMLGreenDarkSeaGreen.addFile(":/ico/22x22/color/color-06-green-14-darkseagreen.png");
|
||||||
ColorHTMLGreenMediumAquamarine .addFile(":/ico/22x22/color/color-06-green-15-mediumaquamarine.png");
|
ColorHTMLGreenMediumAquamarine.addFile(":/ico/22x22/color/color-06-green-15-mediumaquamarine.png");
|
||||||
ColorHTMLGreenMediumSeaGreen .addFile(":/ico/22x22/color/color-06-green-16-mediumseagreen.png");
|
ColorHTMLGreenMediumSeaGreen.addFile(":/ico/22x22/color/color-06-green-16-mediumseagreen.png");
|
||||||
ColorHTMLGreenSeaGreen .addFile(":/ico/22x22/color/color-06-green-17-seagreen.png");
|
ColorHTMLGreenSeaGreen.addFile(":/ico/22x22/color/color-06-green-17-seagreen.png");
|
||||||
ColorHTMLGreenForestGreen .addFile(":/ico/22x22/color/color-06-green-18-forestgreen.png");
|
ColorHTMLGreenForestGreen.addFile(":/ico/22x22/color/color-06-green-18-forestgreen.png");
|
||||||
ColorHTMLGreenGreen .addFile(":/ico/22x22/color/color-06-green-19-green.png");
|
ColorHTMLGreenGreen.addFile(":/ico/22x22/color/color-06-green-19-green.png");
|
||||||
ColorHTMLGreenDarkGreen .addFile(":/ico/22x22/color/color-06-green-20-darkgreen.png");
|
ColorHTMLGreenDarkGreen.addFile(":/ico/22x22/color/color-06-green-20-darkgreen.png");
|
||||||
ColorHTMLCyanAqua .addFile(":/ico/22x22/color/color-07-cyan-01-aqua.png");
|
ColorHTMLCyanAqua.addFile(":/ico/22x22/color/color-07-cyan-01-aqua.png");
|
||||||
ColorHTMLCyanCyan .addFile(":/ico/22x22/color/color-07-cyan-02-cyan.png");
|
ColorHTMLCyanCyan.addFile(":/ico/22x22/color/color-07-cyan-02-cyan.png");
|
||||||
ColorHTMLCyanLightCyan .addFile(":/ico/22x22/color/color-07-cyan-03-lightcyan.png");
|
ColorHTMLCyanLightCyan.addFile(":/ico/22x22/color/color-07-cyan-03-lightcyan.png");
|
||||||
ColorHTMLCyanPaleTurquoise .addFile(":/ico/22x22/color/color-07-cyan-04-paleturquoise.png");
|
ColorHTMLCyanPaleTurquoise.addFile(":/ico/22x22/color/color-07-cyan-04-paleturquoise.png");
|
||||||
ColorHTMLCyanAquamarine .addFile(":/ico/22x22/color/color-07-cyan-05-aquamarine.png");
|
ColorHTMLCyanAquamarine.addFile(":/ico/22x22/color/color-07-cyan-05-aquamarine.png");
|
||||||
ColorHTMLCyanTurquoise .addFile(":/ico/22x22/color/color-07-cyan-06-turquoise.png");
|
ColorHTMLCyanTurquoise.addFile(":/ico/22x22/color/color-07-cyan-06-turquoise.png");
|
||||||
ColorHTMLCyanMediumTurquoise .addFile(":/ico/22x22/color/color-07-cyan-07-mediumturquoise.png");
|
ColorHTMLCyanMediumTurquoise.addFile(":/ico/22x22/color/color-07-cyan-07-mediumturquoise.png");
|
||||||
ColorHTMLCyanDarkTurquoise .addFile(":/ico/22x22/color/color-07-cyan-08-darkturquoise.png");
|
ColorHTMLCyanDarkTurquoise.addFile(":/ico/22x22/color/color-07-cyan-08-darkturquoise.png");
|
||||||
ColorHTMLCyanLightSeaGreen .addFile(":/ico/22x22/color/color-07-cyan-09-lightseagreen.png");
|
ColorHTMLCyanLightSeaGreen.addFile(":/ico/22x22/color/color-07-cyan-09-lightseagreen.png");
|
||||||
ColorHTMLCyanCadetBlue .addFile(":/ico/22x22/color/color-07-cyan-10-cadetblue.png");
|
ColorHTMLCyanCadetBlue.addFile(":/ico/22x22/color/color-07-cyan-10-cadetblue.png");
|
||||||
ColorHTMLCyanDarkCyan .addFile(":/ico/22x22/color/color-07-cyan-11-darkcyan.png");
|
ColorHTMLCyanDarkCyan.addFile(":/ico/22x22/color/color-07-cyan-11-darkcyan.png");
|
||||||
ColorHTMLCyanTeal .addFile(":/ico/22x22/color/color-07-cyan-12-teal.png");
|
ColorHTMLCyanTeal.addFile(":/ico/22x22/color/color-07-cyan-12-teal.png");
|
||||||
ColorHTMLBlueLightSteelBlue .addFile(":/ico/22x22/color/color-08-blue-01-lightsteelblue.png");
|
ColorHTMLBlueLightSteelBlue.addFile(":/ico/22x22/color/color-08-blue-01-lightsteelblue.png");
|
||||||
ColorHTMLBluePowderBlue .addFile(":/ico/22x22/color/color-08-blue-02-powderblue.png");
|
ColorHTMLBluePowderBlue.addFile(":/ico/22x22/color/color-08-blue-02-powderblue.png");
|
||||||
ColorHTMLBlueLightBlue .addFile(":/ico/22x22/color/color-08-blue-03-lightblue.png");
|
ColorHTMLBlueLightBlue.addFile(":/ico/22x22/color/color-08-blue-03-lightblue.png");
|
||||||
ColorHTMLBlueSkyBlue .addFile(":/ico/22x22/color/color-08-blue-04-skyblue.png");
|
ColorHTMLBlueSkyBlue.addFile(":/ico/22x22/color/color-08-blue-04-skyblue.png");
|
||||||
ColorHTMLBlueLightSkyBlue .addFile(":/ico/22x22/color/color-08-blue-05-lightskyblue.png");
|
ColorHTMLBlueLightSkyBlue.addFile(":/ico/22x22/color/color-08-blue-05-lightskyblue.png");
|
||||||
ColorHTMLBlueDeepSkyBlue .addFile(":/ico/22x22/color/color-08-blue-06-deepskyblue.png");
|
ColorHTMLBlueDeepSkyBlue.addFile(":/ico/22x22/color/color-08-blue-06-deepskyblue.png");
|
||||||
ColorHTMLBlueDodgerBlue .addFile(":/ico/22x22/color/color-08-blue-07-dodgerblue.png");
|
ColorHTMLBlueDodgerBlue.addFile(":/ico/22x22/color/color-08-blue-07-dodgerblue.png");
|
||||||
ColorHTMLBlueCornflowerBlue .addFile(":/ico/22x22/color/color-08-blue-08-cornflowerblue.png");
|
ColorHTMLBlueCornflowerBlue.addFile(":/ico/22x22/color/color-08-blue-08-cornflowerblue.png");
|
||||||
ColorHTMLBlueSteelBlue .addFile(":/ico/22x22/color/color-08-blue-09-steelblue.png");
|
ColorHTMLBlueSteelBlue.addFile(":/ico/22x22/color/color-08-blue-09-steelblue.png");
|
||||||
ColorHTMLBlueRoyalBlue .addFile(":/ico/22x22/color/color-08-blue-10-royalblue.png");
|
ColorHTMLBlueRoyalBlue.addFile(":/ico/22x22/color/color-08-blue-10-royalblue.png");
|
||||||
ColorHTMLBlueBlue .addFile(":/ico/22x22/color/color-08-blue-11-blue.png");
|
ColorHTMLBlueBlue.addFile(":/ico/22x22/color/color-08-blue-11-blue.png");
|
||||||
ColorHTMLBlueMediumBlue .addFile(":/ico/22x22/color/color-08-blue-12-mediumblue.png");
|
ColorHTMLBlueMediumBlue.addFile(":/ico/22x22/color/color-08-blue-12-mediumblue.png");
|
||||||
ColorHTMLBlueDarkBlue .addFile(":/ico/22x22/color/color-08-blue-13-darkblue.png");
|
ColorHTMLBlueDarkBlue.addFile(":/ico/22x22/color/color-08-blue-13-darkblue.png");
|
||||||
ColorHTMLBlueNavy .addFile(":/ico/22x22/color/color-08-blue-14-navy.png");
|
ColorHTMLBlueNavy.addFile(":/ico/22x22/color/color-08-blue-14-navy.png");
|
||||||
ColorHTMLBlueMidnightBlue .addFile(":/ico/22x22/color/color-08-blue-15-midnightblue.png");
|
ColorHTMLBlueMidnightBlue.addFile(":/ico/22x22/color/color-08-blue-15-midnightblue.png");
|
||||||
ColorHTMLPurpleLavender .addFile(":/ico/22x22/color/color-09-purple-01-lavender.png");
|
ColorHTMLPurpleLavender.addFile(":/ico/22x22/color/color-09-purple-01-lavender.png");
|
||||||
ColorHTMLPurpleThistle .addFile(":/ico/22x22/color/color-09-purple-02-thistle.png");
|
ColorHTMLPurpleThistle.addFile(":/ico/22x22/color/color-09-purple-02-thistle.png");
|
||||||
ColorHTMLPurplePlum .addFile(":/ico/22x22/color/color-09-purple-03-plum.png");
|
ColorHTMLPurplePlum.addFile(":/ico/22x22/color/color-09-purple-03-plum.png");
|
||||||
ColorHTMLPurpleViolet .addFile(":/ico/22x22/color/color-09-purple-04-violet.png");
|
ColorHTMLPurpleViolet.addFile(":/ico/22x22/color/color-09-purple-04-violet.png");
|
||||||
ColorHTMLPurpleOrchid .addFile(":/ico/22x22/color/color-09-purple-05-orchid.png");
|
ColorHTMLPurpleOrchid.addFile(":/ico/22x22/color/color-09-purple-05-orchid.png");
|
||||||
ColorHTMLPurpleFuchsia .addFile(":/ico/22x22/color/color-09-purple-06-fuchsia.png");
|
ColorHTMLPurpleFuchsia.addFile(":/ico/22x22/color/color-09-purple-06-fuchsia.png");
|
||||||
ColorHTMLPurpleMagenta .addFile(":/ico/22x22/color/color-09-purple-07-magenta.png");
|
ColorHTMLPurpleMagenta.addFile(":/ico/22x22/color/color-09-purple-07-magenta.png");
|
||||||
ColorHTMLPurpleMediumOrchid .addFile(":/ico/22x22/color/color-09-purple-08-mediumorchid.png");
|
ColorHTMLPurpleMediumOrchid.addFile(":/ico/22x22/color/color-09-purple-08-mediumorchid.png");
|
||||||
ColorHTMLPurpleMediumPurple .addFile(":/ico/22x22/color/color-09-purple-09-mediumpurple.png");
|
ColorHTMLPurpleMediumPurple.addFile(":/ico/22x22/color/color-09-purple-09-mediumpurple.png");
|
||||||
ColorHTMLPurpleBlueViolet .addFile(":/ico/22x22/color/color-09-purple-10-blueviolet.png");
|
ColorHTMLPurpleBlueViolet.addFile(":/ico/22x22/color/color-09-purple-10-blueviolet.png");
|
||||||
ColorHTMLPurpleDarkViolet .addFile(":/ico/22x22/color/color-09-purple-11-darkviolet.png");
|
ColorHTMLPurpleDarkViolet.addFile(":/ico/22x22/color/color-09-purple-11-darkviolet.png");
|
||||||
ColorHTMLPurpleDarkOrchid .addFile(":/ico/22x22/color/color-09-purple-12-darkorchid.png");
|
ColorHTMLPurpleDarkOrchid.addFile(":/ico/22x22/color/color-09-purple-12-darkorchid.png");
|
||||||
ColorHTMLPurpleDarkMagenta .addFile(":/ico/22x22/color/color-09-purple-13-darkmagenta.png");
|
ColorHTMLPurpleDarkMagenta.addFile(":/ico/22x22/color/color-09-purple-13-darkmagenta.png");
|
||||||
ColorHTMLPurplePurple .addFile(":/ico/22x22/color/color-09-purple-14-purple.png");
|
ColorHTMLPurplePurple.addFile(":/ico/22x22/color/color-09-purple-14-purple.png");
|
||||||
ColorHTMLPurpleIndigo .addFile(":/ico/22x22/color/color-09-purple-15-indigo.png");
|
ColorHTMLPurpleIndigo.addFile(":/ico/22x22/color/color-09-purple-15-indigo.png");
|
||||||
ColorHTMLPurpleDarkSlateBlue .addFile(":/ico/22x22/color/color-09-purple-16-darkslateblue.png");
|
ColorHTMLPurpleDarkSlateBlue.addFile(":/ico/22x22/color/color-09-purple-16-darkslateblue.png");
|
||||||
ColorHTMLPurpleSlateBlue .addFile(":/ico/22x22/color/color-09-purple-17-slateblue.png");
|
ColorHTMLPurpleSlateBlue.addFile(":/ico/22x22/color/color-09-purple-17-slateblue.png");
|
||||||
ColorHTMLPurpleMediumSlateBlue .addFile(":/ico/22x22/color/color-09-purple-18-mediumslateblue.png");
|
ColorHTMLPurpleMediumSlateBlue.addFile(":/ico/22x22/color/color-09-purple-18-mediumslateblue.png");
|
||||||
ColorHTMLWhiteWhite .addFile(":/ico/22x22/color/color-10-white-01-white.png");
|
ColorHTMLWhiteWhite.addFile(":/ico/22x22/color/color-10-white-01-white.png");
|
||||||
ColorHTMLWhiteSnow .addFile(":/ico/22x22/color/color-10-white-02-snow.png");
|
ColorHTMLWhiteSnow.addFile(":/ico/22x22/color/color-10-white-02-snow.png");
|
||||||
ColorHTMLWhiteHoneydew .addFile(":/ico/22x22/color/color-10-white-03-honeydew.png");
|
ColorHTMLWhiteHoneydew.addFile(":/ico/22x22/color/color-10-white-03-honeydew.png");
|
||||||
ColorHTMLWhiteMintCream .addFile(":/ico/22x22/color/color-10-white-04-mintcream.png");
|
ColorHTMLWhiteMintCream.addFile(":/ico/22x22/color/color-10-white-04-mintcream.png");
|
||||||
ColorHTMLWhiteAzure .addFile(":/ico/22x22/color/color-10-white-05-azure.png");
|
ColorHTMLWhiteAzure.addFile(":/ico/22x22/color/color-10-white-05-azure.png");
|
||||||
ColorHTMLWhiteAliceBlue .addFile(":/ico/22x22/color/color-10-white-06-aliceblue.png");
|
ColorHTMLWhiteAliceBlue.addFile(":/ico/22x22/color/color-10-white-06-aliceblue.png");
|
||||||
ColorHTMLWhiteGhostWhite .addFile(":/ico/22x22/color/color-10-white-07-ghostwhite.png");
|
ColorHTMLWhiteGhostWhite.addFile(":/ico/22x22/color/color-10-white-07-ghostwhite.png");
|
||||||
ColorHTMLWhiteWhiteSmoke .addFile(":/ico/22x22/color/color-10-white-08-whitesmoke.png");
|
ColorHTMLWhiteWhiteSmoke.addFile(":/ico/22x22/color/color-10-white-08-whitesmoke.png");
|
||||||
ColorHTMLWhiteSeashell .addFile(":/ico/22x22/color/color-10-white-09-seashell.png");
|
ColorHTMLWhiteSeashell.addFile(":/ico/22x22/color/color-10-white-09-seashell.png");
|
||||||
ColorHTMLWhiteBeige .addFile(":/ico/22x22/color/color-10-white-10-beige.png");
|
ColorHTMLWhiteBeige.addFile(":/ico/22x22/color/color-10-white-10-beige.png");
|
||||||
ColorHTMLWhiteOldLace .addFile(":/ico/22x22/color/color-10-white-11-oldlace.png");
|
ColorHTMLWhiteOldLace.addFile(":/ico/22x22/color/color-10-white-11-oldlace.png");
|
||||||
ColorHTMLWhiteFloralWhite .addFile(":/ico/22x22/color/color-10-white-12-floralwhite.png");
|
ColorHTMLWhiteFloralWhite.addFile(":/ico/22x22/color/color-10-white-12-floralwhite.png");
|
||||||
ColorHTMLWhiteIvory .addFile(":/ico/22x22/color/color-10-white-13-ivory.png");
|
ColorHTMLWhiteIvory.addFile(":/ico/22x22/color/color-10-white-13-ivory.png");
|
||||||
ColorHTMLWhiteAntiqueWhite .addFile(":/ico/22x22/color/color-10-white-14-antiquewhite.png");
|
ColorHTMLWhiteAntiqueWhite.addFile(":/ico/22x22/color/color-10-white-14-antiquewhite.png");
|
||||||
ColorHTMLWhiteLinen .addFile(":/ico/22x22/color/color-10-white-15-linen.png");
|
ColorHTMLWhiteLinen.addFile(":/ico/22x22/color/color-10-white-15-linen.png");
|
||||||
ColorHTMLWhiteLavenderBlush .addFile(":/ico/22x22/color/color-10-white-16-lavenderblush.png");
|
ColorHTMLWhiteLavenderBlush.addFile(":/ico/22x22/color/color-10-white-16-lavenderblush.png");
|
||||||
ColorHTMLWhiteMistyRose .addFile(":/ico/22x22/color/color-10-white-17-mistyrose.png");
|
ColorHTMLWhiteMistyRose.addFile(":/ico/22x22/color/color-10-white-17-mistyrose.png");
|
||||||
ColorHTMLGrayGainsboro .addFile(":/ico/22x22/color/color-11-gray-01-gainsboro.png");
|
ColorHTMLGrayGainsboro.addFile(":/ico/22x22/color/color-11-gray-01-gainsboro.png");
|
||||||
ColorHTMLGrayLightGray .addFile(":/ico/22x22/color/color-11-gray-02-lightgray.png");
|
ColorHTMLGrayLightGray.addFile(":/ico/22x22/color/color-11-gray-02-lightgray.png");
|
||||||
ColorHTMLGraySilver .addFile(":/ico/22x22/color/color-11-gray-03-silver.png");
|
ColorHTMLGraySilver.addFile(":/ico/22x22/color/color-11-gray-03-silver.png");
|
||||||
ColorHTMLGrayDarkGray .addFile(":/ico/22x22/color/color-11-gray-04-darkgray.png");
|
ColorHTMLGrayDarkGray.addFile(":/ico/22x22/color/color-11-gray-04-darkgray.png");
|
||||||
ColorHTMLGrayGray .addFile(":/ico/22x22/color/color-11-gray-05-gray.png");
|
ColorHTMLGrayGray.addFile(":/ico/22x22/color/color-11-gray-05-gray.png");
|
||||||
ColorHTMLGrayDimGray .addFile(":/ico/22x22/color/color-11-gray-06-dimgray.png");
|
ColorHTMLGrayDimGray.addFile(":/ico/22x22/color/color-11-gray-06-dimgray.png");
|
||||||
ColorHTMLGrayLightSlateGray .addFile(":/ico/22x22/color/color-11-gray-07-lightslategray.png");
|
ColorHTMLGrayLightSlateGray.addFile(":/ico/22x22/color/color-11-gray-07-lightslategray.png");
|
||||||
ColorHTMLGraySlateGray .addFile(":/ico/22x22/color/color-11-gray-08-slategray.png");
|
ColorHTMLGraySlateGray.addFile(":/ico/22x22/color/color-11-gray-08-slategray.png");
|
||||||
ColorHTMLGrayDarkSlateGray .addFile(":/ico/22x22/color/color-11-gray-09-darkslategray.png");
|
ColorHTMLGrayDarkSlateGray.addFile(":/ico/22x22/color/color-11-gray-09-darkslategray.png");
|
||||||
ColorHTMLGrayBlack .addFile(":/ico/22x22/color/color-11-gray-10-black.png");
|
ColorHTMLGrayBlack.addFile(":/ico/22x22/color/color-11-gray-10-black.png");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -514,19 +514,19 @@ RichTextEditorToolBar::RichTextEditorToolBar(RichTextEditor *editor,
|
|||||||
// Bold, italic and underline buttons
|
// Bold, italic and underline buttons
|
||||||
|
|
||||||
m_bold_action = createCheckableAction(
|
m_bold_action = createCheckableAction(
|
||||||
QIcon(":/ico/32x32/format-text-bold.png"),
|
QIcon::fromTheme("format-text-bold"),
|
||||||
tr("Texte en gras"), editor, &RichTextEditor::setFontBold, this);
|
tr("Texte en gras"), editor, &RichTextEditor::setFontBold, this);
|
||||||
ShortcutManager::instance().registerAction(m_bold_action, "richtext.bold", tr("Éditeur de texte"), Qt::CTRL | Qt::Key_B);
|
ShortcutManager::instance().registerAction(m_bold_action, "richtext.bold", tr("Éditeur de texte"), Qt::CTRL | Qt::Key_B);
|
||||||
addAction(m_bold_action);
|
addAction(m_bold_action);
|
||||||
|
|
||||||
m_italic_action = createCheckableAction(
|
m_italic_action = createCheckableAction(
|
||||||
QIcon(":/ico/32x32/format-text-italic.png"),
|
QIcon::fromTheme("format-text-italic"),
|
||||||
tr("Texte en italique"), editor, &RichTextEditor::setFontItalic, this);
|
tr("Texte en italique"), editor, &RichTextEditor::setFontItalic, this);
|
||||||
ShortcutManager::instance().registerAction(m_italic_action, "richtext.italic", tr("Éditeur de texte"), Qt::CTRL | Qt::Key_I);
|
ShortcutManager::instance().registerAction(m_italic_action, "richtext.italic", tr("Éditeur de texte"), Qt::CTRL | Qt::Key_I);
|
||||||
addAction(m_italic_action);
|
addAction(m_italic_action);
|
||||||
|
|
||||||
m_underline_action = createCheckableAction(
|
m_underline_action = createCheckableAction(
|
||||||
QIcon(":/ico/32x32/format-text-underline.png"),
|
QIcon::fromTheme("format-text-underline"),
|
||||||
tr("Texte souligé"), editor, &RichTextEditor::setFontUnderline, this);
|
tr("Texte souligé"), editor, &RichTextEditor::setFontUnderline, this);
|
||||||
ShortcutManager::instance().registerAction(m_underline_action, "richtext.underline", tr("Éditeur de texte"), Qt::CTRL | Qt::Key_U);
|
ShortcutManager::instance().registerAction(m_underline_action, "richtext.underline", tr("Éditeur de texte"), Qt::CTRL | Qt::Key_U);
|
||||||
addAction(m_underline_action);
|
addAction(m_underline_action);
|
||||||
@@ -567,13 +567,13 @@ RichTextEditorToolBar::RichTextEditorToolBar(RichTextEditor *editor,
|
|||||||
// Superscript and subscript buttons
|
// Superscript and subscript buttons
|
||||||
|
|
||||||
m_valign_sup_action = createCheckableAction(
|
m_valign_sup_action = createCheckableAction(
|
||||||
QIcon(":/ico/22x22/format-text-superscript.png"),
|
QIcon::fromTheme("format-text-superscript"),
|
||||||
tr("Superscript"),
|
tr("Superscript"),
|
||||||
this, &RichTextEditorToolBar::setVAlignSuper, this);
|
this, &RichTextEditorToolBar::setVAlignSuper, this);
|
||||||
addAction(m_valign_sup_action);
|
addAction(m_valign_sup_action);
|
||||||
|
|
||||||
m_valign_sub_action = createCheckableAction(
|
m_valign_sub_action = createCheckableAction(
|
||||||
QIcon(":/ico/22x22/format-text-subscript.png"),
|
QIcon::fromTheme("format-text-subscript"),
|
||||||
tr("Subscript"),
|
tr("Subscript"),
|
||||||
this, &RichTextEditorToolBar::setVAlignSub, this);
|
this, &RichTextEditorToolBar::setVAlignSub, this);
|
||||||
addAction(m_valign_sub_action);
|
addAction(m_valign_sub_action);
|
||||||
@@ -601,7 +601,7 @@ RichTextEditorToolBar::RichTextEditorToolBar(RichTextEditor *editor,
|
|||||||
|
|
||||||
// Simplify rich text
|
// Simplify rich text
|
||||||
m_simplify_richtext_action = createCheckableAction(
|
m_simplify_richtext_action = createCheckableAction(
|
||||||
QIcon(":/ico/32x32/simplifyrichtext.png"),
|
QIcon::fromTheme("simplifyrichtext"),
|
||||||
tr("Simplify Rich Text"), editor, &RichTextEditor::setSimplifyRichText, this);
|
tr("Simplify Rich Text"), editor, &RichTextEditor::setSimplifyRichText, this);
|
||||||
m_simplify_richtext_action->setChecked(editor->simplifyRichText());
|
m_simplify_richtext_action->setChecked(editor->simplifyRichText());
|
||||||
connect(m_editor, &RichTextEditor::simplifyRichTextChanged, m_simplify_richtext_action, &QAction::setChecked);
|
connect(m_editor, &RichTextEditor::simplifyRichTextChanged, m_simplify_richtext_action, &QAction::setChecked);
|
||||||
|
|||||||
@@ -233,7 +233,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="configure" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/configure.png</normaloff>:/ico/16x16/configure.png</iconset>
|
<normaloff>:/ico/16x16/configure.png</normaloff>:/ico/16x16/configure.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -363,7 +363,7 @@
|
|||||||
<string>neutre</string>
|
<string>neutre</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="neutral" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/neutral.png</normaloff>:/ico/16x16/neutral.png</iconset>
|
<normaloff>:/ico/16x16/neutral.png</normaloff>:/ico/16x16/neutral.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -377,7 +377,7 @@
|
|||||||
<string>terre</string>
|
<string>terre</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="ground" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/ground.png</normaloff>:/ico/16x16/ground.png</iconset>
|
<normaloff>:/ico/16x16/ground.png</normaloff>:/ico/16x16/ground.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -391,7 +391,7 @@
|
|||||||
<string>phase</string>
|
<string>phase</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="phase" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/phase.png</normaloff>:/ico/16x16/phase.png</iconset>
|
<normaloff>:/ico/16x16/phase.png</normaloff>:/ico/16x16/phase.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="folder-open" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/folder-open.png</normaloff>:/ico/16x16/folder-open.png</iconset>
|
<normaloff>:/ico/16x16/folder-open.png</normaloff>:/ico/16x16/folder-open.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="document-save" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/document-save.png</normaloff>:/ico/16x16/document-save.png</iconset>
|
<normaloff>:/ico/16x16/document-save.png</normaloff>:/ico/16x16/document-save.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="document-save" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/document-save.png</normaloff>:/ico/16x16/document-save.png</iconset>
|
<normaloff>:/ico/16x16/document-save.png</normaloff>:/ico/16x16/document-save.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="folder-open" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/folder-open.png</normaloff>:/ico/16x16/folder-open.png</iconset>
|
<normaloff>:/ico/16x16/folder-open.png</normaloff>:/ico/16x16/folder-open.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="textfield" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/textfield.png</normaloff>:/ico/22x22/textfield.png</iconset>
|
<normaloff>:/ico/22x22/textfield.png</normaloff>:/ico/22x22/textfield.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="object-group" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/object-group.png</normaloff>:/ico/16x16/object-group.png</iconset>
|
<normaloff>:/ico/16x16/object-group.png</normaloff>:/ico/16x16/object-group.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="list-remove" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/list-remove.png</normaloff>:/ico/16x16/list-remove.png</iconset>
|
<normaloff>:/ico/16x16/list-remove.png</normaloff>:/ico/16x16/list-remove.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -136,7 +136,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="go-up" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/go-up.png</normaloff>:/ico/16x16/go-up.png</iconset>
|
<normaloff>:/ico/16x16/go-up.png</normaloff>:/ico/16x16/go-up.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="go-down" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/go-down.png</normaloff>:/ico/16x16/go-down.png</iconset>
|
<normaloff>:/ico/16x16/go-down.png</normaloff>:/ico/16x16/go-down.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<string>Télechargement</string>
|
<string>Télechargement</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="edit-download" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/edit-download.png</normaloff>:/ico/16x16/edit-download.png</iconset>
|
<normaloff>:/ico/16x16/edit-download.png</normaloff>:/ico/16x16/edit-download.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
<string>Dossier installation</string>
|
<string>Dossier installation</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="folder-open" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/folder-open.png</normaloff>:/ico/16x16/folder-open.png</iconset>
|
<normaloff>:/ico/16x16/folder-open.png</normaloff>:/ico/16x16/folder-open.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="titleblock-bottom" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/titleblock-bottom.png</normaloff>:/ico/22x22/titleblock-bottom.png</iconset>
|
<normaloff>:/ico/22x22/titleblock-bottom.png</normaloff>:/ico/22x22/titleblock-bottom.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="titleblock-right" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/titleblock-right.png</normaloff>:/ico/22x22/titleblock-right.png</iconset>
|
<normaloff>:/ico/22x22/titleblock-right.png</normaloff>:/ico/22x22/titleblock-right.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="edit-rename" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/edit-rename.png</normaloff>:/ico/22x22/edit-rename.png</iconset>
|
<normaloff>:/ico/22x22/edit-rename.png</normaloff>:/ico/22x22/edit-rename.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
@@ -210,7 +210,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="configure" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/16x16/configure.png</normaloff>:/ico/16x16/configure.png</iconset>
|
<normaloff>:/ico/16x16/configure.png</normaloff>:/ico/16x16/configure.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -305,7 +305,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../qelectrotech.qrc">
|
<iconset theme="start" resource="../../qelectrotech.qrc">
|
||||||
<normaloff>:/ico/22x22/start.png</normaloff>:/ico/22x22/start.png</iconset>
|
<normaloff>:/ico/22x22/start.png</normaloff>:/ico/22x22/start.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -82,12 +82,28 @@ target_link_libraries(tst_contactusage PRIVATE Qt::Test)
|
|||||||
add_executable(
|
add_executable(
|
||||||
tst_qetpalette
|
tst_qetpalette
|
||||||
tst_qetpalette.cpp
|
tst_qetpalette.cpp
|
||||||
|
inkcontrast.h
|
||||||
${QET_DIR}/sources/qetpalette.cpp
|
${QET_DIR}/sources/qetpalette.cpp
|
||||||
${QET_DIR}/sources/qetpalette.h)
|
${QET_DIR}/sources/qetpalette.h)
|
||||||
add_test(NAME tst_qetpalette COMMAND tst_qetpalette)
|
add_test(NAME tst_qetpalette COMMAND tst_qetpalette)
|
||||||
target_include_directories(tst_qetpalette PRIVATE ${QET_DIR}/sources)
|
target_include_directories(tst_qetpalette PRIVATE ${QET_DIR}/sources)
|
||||||
target_link_libraries(tst_qetpalette PRIVATE Qt::Test Qt::Widgets)
|
target_link_libraries(tst_qetpalette PRIVATE Qt::Test Qt::Widgets)
|
||||||
|
|
||||||
|
# qeticons.cpp is compiled in so the test can check the table entries
|
||||||
|
# themselves (icon sizes in the element panel), not only the theme files.
|
||||||
|
add_executable(
|
||||||
|
tst_qeticons
|
||||||
|
tst_qeticons.cpp
|
||||||
|
inkcontrast.h
|
||||||
|
${QET_DIR}/sources/qeticons.cpp
|
||||||
|
${QET_DIR}/sources/qeticons.h
|
||||||
|
${QET_DIR}/sources/qetpalette.cpp
|
||||||
|
${QET_DIR}/sources/qetpalette.h
|
||||||
|
${QET_DIR}/ico/icon-themes.qrc)
|
||||||
|
add_test(NAME tst_qeticons COMMAND tst_qeticons)
|
||||||
|
target_include_directories(tst_qeticons PRIVATE ${QET_DIR}/sources)
|
||||||
|
target_link_libraries(tst_qeticons PRIVATE Qt::Test Qt::Widgets Qt::Svg)
|
||||||
|
|
||||||
add_executable(
|
add_executable(
|
||||||
tst_smart_device
|
tst_smart_device
|
||||||
tst_smart_device.cpp
|
tst_smart_device.cpp
|
||||||
|
|||||||
@@ -0,0 +1,77 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2006-2026 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 QET_TEST_INKCONTRAST_H
|
||||||
|
#define QET_TEST_INKCONTRAST_H
|
||||||
|
|
||||||
|
#include <QHash>
|
||||||
|
#include <QImage>
|
||||||
|
#include <QRect>
|
||||||
|
#include <QString>
|
||||||
|
#include <QTest>
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
#include "qetpalette.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
Shared helpers for the rendering tests: paint a widget on the offscreen
|
||||||
|
platform and measure the ink against the background.
|
||||||
|
*/
|
||||||
|
namespace QET {
|
||||||
|
namespace Test {
|
||||||
|
/**
|
||||||
|
Grab a widget for measuring. With QET_TEST_DUMP_DIR set, the
|
||||||
|
image is also written there as <row>-<name>.png so a failure
|
||||||
|
can be looked at.
|
||||||
|
*/
|
||||||
|
inline QImage grab(QWidget *widget, const char *name)
|
||||||
|
{
|
||||||
|
const QImage image = widget->grab().toImage();
|
||||||
|
const QByteArray dir = qgetenv("QET_TEST_DUMP_DIR");
|
||||||
|
if (!dir.isEmpty())
|
||||||
|
image.save(QString("%1/%2-%3.png").arg(QString::fromLocal8Bit(dir),
|
||||||
|
QTest::currentDataTag(), name));
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Contrast between the background of a rendered widget (its most
|
||||||
|
frequent color) and the ink drawn on it (the pixel whose
|
||||||
|
luminance differs most from the background), inside rect.
|
||||||
|
*/
|
||||||
|
inline double inkContrast(const QImage &image, const QRect &rect)
|
||||||
|
{
|
||||||
|
QHash<QRgb, int> histogram;
|
||||||
|
for (int y = rect.top(); y <= rect.bottom(); ++y)
|
||||||
|
for (int x = rect.left(); x <= rect.right(); ++x)
|
||||||
|
++histogram[image.pixel(x, y)];
|
||||||
|
|
||||||
|
QRgb background = 0;
|
||||||
|
int best = -1;
|
||||||
|
for (auto it = histogram.cbegin(); it != histogram.cend(); ++it)
|
||||||
|
if (it.value() > best) { best = it.value(); background = it.key(); }
|
||||||
|
|
||||||
|
double contrast = 1.0;
|
||||||
|
for (auto it = histogram.cbegin(); it != histogram.cend(); ++it)
|
||||||
|
contrast = qMax(contrast, QET::Palette::contrastRatio(QColor(background),
|
||||||
|
QColor(it.key())));
|
||||||
|
return contrast;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,166 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2006-2026 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 <QtTest>
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QDir>
|
||||||
|
#include <QIcon>
|
||||||
|
#include <QMainWindow>
|
||||||
|
#include <QStyleFactory>
|
||||||
|
#include <QToolBar>
|
||||||
|
#include <QToolButton>
|
||||||
|
|
||||||
|
#include "inkcontrast.h"
|
||||||
|
#include "qeticons.h"
|
||||||
|
#include "qetpalette.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
Checks on QET's icon theme "qet", generated by misc/make_icon_themes.py
|
||||||
|
into ico/icon-themes.qrc, and on the icon table that uses it.
|
||||||
|
|
||||||
|
Every icon name must resolve. A toolbar button painted with Fusion must
|
||||||
|
show its icon at 3:1 (WCAG 1.4.11), with the disabled state reading
|
||||||
|
weaker than the enabled one. And the icons the elements panel draws in
|
||||||
|
its 50 px slots must stay small (GitHub #870).
|
||||||
|
*/
|
||||||
|
class tst_qeticons : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void initTestCase();
|
||||||
|
void everyIconResolves();
|
||||||
|
void toolbarIconIsReadable_data();
|
||||||
|
void toolbarIconIsReadable();
|
||||||
|
void panelProjectIconStaysSmall();
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
const double kIconRatio = 3.0;
|
||||||
|
|
||||||
|
QStringList iconNames(const QString &theme)
|
||||||
|
{
|
||||||
|
QStringList names;
|
||||||
|
for (const QString &size : {"16x16", "22x22", "32x32", "48x48", "128x128", "scalable"})
|
||||||
|
{
|
||||||
|
QDir dir(QString(":/ico/themes/%1/%2").arg(theme, size));
|
||||||
|
for (const QString &file : dir.entryList(QDir::Files))
|
||||||
|
names << file.section('.', 0, -2);
|
||||||
|
}
|
||||||
|
names.removeDuplicates();
|
||||||
|
names.sort();
|
||||||
|
return names;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void tst_qeticons::initTestCase()
|
||||||
|
{
|
||||||
|
QStringList paths = QIcon::themeSearchPaths();
|
||||||
|
paths.prepend(QStringLiteral(":/ico/themes"));
|
||||||
|
QIcon::setThemeSearchPaths(paths);
|
||||||
|
QIcon::setThemeName(QStringLiteral("qet"));
|
||||||
|
QVERIFY2(!iconNames("qet").isEmpty(), "theme has no icons: is ico/icon-themes.qrc compiled in?");
|
||||||
|
}
|
||||||
|
|
||||||
|
void tst_qeticons::everyIconResolves()
|
||||||
|
{
|
||||||
|
QVERIFY(QIcon::hasThemeIcon("list-add"));
|
||||||
|
for (const QString &name : iconNames("qet"))
|
||||||
|
QVERIFY2(!QIcon::fromTheme(name).isNull(), qPrintable(QString("%1 missing").arg(name)));
|
||||||
|
// Names the icon table relies on that come from the alias list in
|
||||||
|
// misc/make_icon_themes.py, not from a file of that name at 22 pixels.
|
||||||
|
for (const QString &name : {"folio-new", "folio-delete", "folio-properties", "conductor-reset"})
|
||||||
|
QVERIFY2(!QIcon::fromTheme(name).pixmap(22).isNull(), qPrintable(name));
|
||||||
|
}
|
||||||
|
|
||||||
|
void tst_qeticons::toolbarIconIsReadable_data()
|
||||||
|
{
|
||||||
|
QTest::addColumn<QPalette>("palette");
|
||||||
|
QTest::newRow("light") << QET::Palette::fusionLight();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
A line-art icon on a Fusion tool button, as in the diagram editor
|
||||||
|
toolbar. Enabled must reach 3:1; disabled must be weaker than enabled.
|
||||||
|
*/
|
||||||
|
void tst_qeticons::toolbarIconIsReadable()
|
||||||
|
{
|
||||||
|
QFETCH(QPalette, palette);
|
||||||
|
QApplication::setStyle(QStyleFactory::create("Fusion"));
|
||||||
|
QApplication::setPalette(palette);
|
||||||
|
|
||||||
|
QMainWindow window;
|
||||||
|
QToolBar *toolbar = window.addToolBar("view");
|
||||||
|
auto make = [&](const char *name, bool enabled) {
|
||||||
|
auto *button = new QToolButton;
|
||||||
|
button->setIcon(QIcon::fromTheme("zoom-fit-best"));
|
||||||
|
button->setAutoRaise(true);
|
||||||
|
button->setEnabled(enabled);
|
||||||
|
button->setObjectName(name);
|
||||||
|
toolbar->addWidget(button);
|
||||||
|
return button;
|
||||||
|
};
|
||||||
|
QToolButton *enabled = make("enabled", true);
|
||||||
|
QToolButton *disabled = make("disabled", false);
|
||||||
|
window.resize(300, 100);
|
||||||
|
window.show();
|
||||||
|
QVERIFY(QTest::qWaitForWindowExposed(&window));
|
||||||
|
|
||||||
|
const double enabled_contrast = QET::Test::inkContrast(QET::Test::grab(enabled, "enabled"), enabled->rect());
|
||||||
|
const double disabled_contrast = QET::Test::inkContrast(QET::Test::grab(disabled, "disabled"), disabled->rect());
|
||||||
|
QVERIFY2(enabled_contrast >= kIconRatio,
|
||||||
|
qPrintable(QString("enabled icon: %1").arg(enabled_contrast)));
|
||||||
|
QVERIFY2(disabled_contrast < enabled_contrast,
|
||||||
|
qPrintable(QString("disabled %1 reads better than enabled %2")
|
||||||
|
.arg(disabled_contrast).arg(enabled_contrast)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
The elements panel sets a 50 px icon size so element previews are
|
||||||
|
large. Its project root item uses ProjectFileGP, whose theme name also
|
||||||
|
has a 128 px file for the configuration dialog. On a 2x display the
|
||||||
|
theme loader would pick that file for a 50 px request and fill the
|
||||||
|
slot, so the entry must not resolve through the theme name.
|
||||||
|
*/
|
||||||
|
void tst_qeticons::panelProjectIconStaysSmall()
|
||||||
|
{
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
QSKIP("QIcon::pixmap(size, devicePixelRatio) needs Qt 6");
|
||||||
|
#else
|
||||||
|
QET::Icons::initIcons();
|
||||||
|
|
||||||
|
const QPixmap panel = QET::Icons::ProjectFileGP.pixmap(QSize(50, 50), 2.0);
|
||||||
|
QVERIFY(!panel.isNull());
|
||||||
|
const int logical = qRound(panel.width() / panel.devicePixelRatio());
|
||||||
|
QVERIFY2(logical <= 22, qPrintable(QString("project root icon is %1 px in a 50 px slot").arg(logical)));
|
||||||
|
|
||||||
|
// The configuration dialog's page list still gets the large file.
|
||||||
|
QCOMPARE(QET::Icons::Projects.pixmap(QSize(128, 128), 1.0).width(), 128);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
if (qEnvironmentVariableIsEmpty("QT_QPA_PLATFORM"))
|
||||||
|
qputenv("QT_QPA_PLATFORM", "offscreen");
|
||||||
|
QApplication app(argc, argv);
|
||||||
|
tst_qeticons test;
|
||||||
|
QTEST_SET_MAIN_SOURCE_PATH
|
||||||
|
return QTest::qExec(&test, argc, argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "tst_qeticons.moc"
|
||||||
@@ -28,9 +28,12 @@
|
|||||||
#include <QStyleFactory>
|
#include <QStyleFactory>
|
||||||
#include <QToolBar>
|
#include <QToolBar>
|
||||||
|
|
||||||
|
#include "inkcontrast.h"
|
||||||
#include "qetpalette.h"
|
#include "qetpalette.h"
|
||||||
|
|
||||||
using QET::Palette::contrastRatio;
|
using QET::Palette::contrastRatio;
|
||||||
|
using QET::Test::grab;
|
||||||
|
using QET::Test::inkContrast;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Contrast checks for the palettes QET installs under the Fusion style.
|
Contrast checks for the palettes QET installs under the Fusion style.
|
||||||
@@ -94,44 +97,6 @@ namespace {
|
|||||||
{"Link/Window", QPalette::Link, QPalette::Window},
|
{"Link/Window", QPalette::Link, QPalette::Window},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
Grab a widget for measuring. With QET_TEST_DUMP_DIR set, the image
|
|
||||||
is also written there as <row>-<name>.png so a failure can be
|
|
||||||
looked at.
|
|
||||||
*/
|
|
||||||
QImage grab(QWidget *widget, const char *name)
|
|
||||||
{
|
|
||||||
const QImage image = widget->grab().toImage();
|
|
||||||
const QByteArray dir = qgetenv("QET_TEST_DUMP_DIR");
|
|
||||||
if (!dir.isEmpty())
|
|
||||||
image.save(QString("%1/%2-%3.png").arg(QString::fromLocal8Bit(dir),
|
|
||||||
QTest::currentDataTag(), name));
|
|
||||||
return image;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
Contrast between the background of a rendered widget (its most
|
|
||||||
frequent color) and the ink drawn on it (the pixel whose luminance
|
|
||||||
differs most from the background), inside rect.
|
|
||||||
*/
|
|
||||||
double inkContrast(const QImage &image, const QRect &rect)
|
|
||||||
{
|
|
||||||
QHash<QRgb, int> histogram;
|
|
||||||
for (int y = rect.top(); y <= rect.bottom(); ++y)
|
|
||||||
for (int x = rect.left(); x <= rect.right(); ++x)
|
|
||||||
++histogram[image.pixel(x, y)];
|
|
||||||
|
|
||||||
QRgb background = 0;
|
|
||||||
int best = -1;
|
|
||||||
for (auto it = histogram.cbegin(); it != histogram.cend(); ++it)
|
|
||||||
if (it.value() > best) { best = it.value(); background = it.key(); }
|
|
||||||
|
|
||||||
double contrast = 1.0;
|
|
||||||
for (auto it = histogram.cbegin(); it != histogram.cend(); ++it)
|
|
||||||
contrast = qMax(contrast, contrastRatio(QColor(background),
|
|
||||||
QColor(it.key())));
|
|
||||||
return contrast;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_qetpalette::addPaletteRows()
|
void tst_qetpalette::addPaletteRows()
|
||||||
|
|||||||
Reference in New Issue
Block a user