Compare commits
205 Commits
0.6.5
...
e52a6d8eed
| Author | SHA1 | Date | |
|---|---|---|---|
| e52a6d8eed | |||
| 8b0c8ec194 | |||
| 1da7fff518 | |||
| e216592205 | |||
| 8fc9d06937 | |||
| 73b15da182 | |||
| f4f7d93e38 | |||
| 591b01a83a | |||
| f8d3dcc899 | |||
| f0ed9d0ca1 | |||
| 13227cfac9 | |||
| b73df5ea1a | |||
| 4375fe1c2d | |||
| 4654cb21a0 | |||
| ba23208a7a | |||
| ed5a602332 | |||
| 347681e604 | |||
| 505ab9e2a6 | |||
| c787e14a69 | |||
| 29c5783a66 | |||
| ddc75f7cd0 | |||
| f976fea418 | |||
| 2846e4907b | |||
| c828f86b74 | |||
| 040e2a7b5f | |||
| b566096b1f | |||
| 2bee79c064 | |||
| 91696963ae | |||
| 1623ca315a | |||
| 3cfb25db9a | |||
| 36854d19f4 | |||
| 3f7ebd2f6c | |||
| 291a98ea97 | |||
| 24a0b581f3 | |||
| 369aa13be3 | |||
| b964fdc77f | |||
| d6d2703c93 | |||
| c6068ba23d | |||
| fbdd858fbd | |||
| 8333f17199 | |||
| 30eb06cba7 | |||
| 0a45cd7c22 | |||
| fc417b30e5 | |||
| 8568f6d4ef | |||
| 8832c2daa9 | |||
| da9d7d6989 | |||
| 317d296507 | |||
| f24743e381 | |||
| fd4af282af | |||
| 4de03dd02e | |||
| bfaf702606 | |||
| 3203d7f598 | |||
| cbd006bae7 | |||
| fc13a497d3 | |||
| 183a61b2f6 | |||
| ae07c5fe44 | |||
| a33381557b | |||
| 6d8ec6a54a | |||
| dd3209e3ff | |||
| 088066197f | |||
| 3a8e907f28 | |||
| eb04ac362b | |||
| 6d7d0e4e1d | |||
| ff4f71c1e6 | |||
| 101f111209 | |||
| c227c74e23 | |||
| 32ff813609 | |||
| 2de9ff810d | |||
| 57354fc135 | |||
| 07d0b0270e | |||
| 78e3e45a2e | |||
| 5a34441c72 | |||
| b01601085b | |||
| 64c4d2e064 | |||
| e64b871a2f | |||
| 06af632914 | |||
| 99abf3b69d | |||
| 42b6510877 | |||
| aa746721f0 | |||
| 42e3d4c691 | |||
| a993437983 | |||
| 8cce48e6b0 | |||
| d0bdc71cf5 | |||
| 2071e82e1d | |||
| b2f10b9193 | |||
| 9eb91dedf9 | |||
| 6f3c30fc5b | |||
| 3eade9c3cf | |||
| fad7a668e3 | |||
| c68e82c7c8 | |||
| 7e04ba84eb | |||
| 29355c7fc1 | |||
| 95f85374cf | |||
| 471a3b15ef | |||
| 5d2ddc199a | |||
| fa0b86a995 | |||
| b880406474 | |||
| 470a29c38c | |||
| 3a5ead8cc2 | |||
| 4dd3f22d88 | |||
| 3a4ea573f6 | |||
| d574018a8e | |||
| ae0f11c153 | |||
| 2bca7bd691 | |||
| c2226ef5c7 | |||
| 3596f9eac4 | |||
| a6e31a2c4d | |||
| cd01a05f23 | |||
| f32cb998ae | |||
| eb2e2e93f9 | |||
| 4a095a0cfd | |||
| d01297043e | |||
| ae257ea567 | |||
| edb1a84601 | |||
| 0436dfab39 | |||
| 87ed730891 | |||
| 85d6762828 | |||
| a6360d5e66 | |||
| a217ce9ee8 | |||
| 9fe3aca774 | |||
| c636b14af8 | |||
| f8587020d7 | |||
| 495ff31518 | |||
| 2671b6061d | |||
| d52f22c0de | |||
| 471f6b9f32 | |||
| 2a30cc0dd3 | |||
| 8435fa0a9d | |||
| 99252ab732 | |||
| 7ec4420eaf | |||
| a83cc61148 | |||
| e0fda8f3b0 | |||
| 37cfdad799 | |||
| 370e64f192 | |||
| d27f94bc4d | |||
| be20c3d389 | |||
| 6145925283 | |||
| bba4863853 | |||
| a459dc2be6 | |||
| f1da25f766 | |||
| 0e8370c39a | |||
| a452ea2644 | |||
| 2fc6c59a30 | |||
| 67e6eac520 | |||
| 710d633678 | |||
| 23f160221b | |||
| 2d718b013b | |||
| 19de914046 | |||
| 1aa9674179 | |||
| fd5929bc47 | |||
| 6158dfa630 | |||
| 9300f7812f | |||
| 9677fed3f2 | |||
| 7634c6db2b | |||
| 438103587a | |||
| 6e5bde68d8 | |||
| 27be83184e | |||
| e79b5d3448 | |||
| f420a61077 | |||
| e927708f78 | |||
| 248f889cb3 | |||
| ecfaf7f02b | |||
| 116d24087a | |||
| 32fc6735bd | |||
| c5a5d07f50 | |||
| eea7b24f6e | |||
| 67762b357d | |||
| d80c661c66 | |||
| 0e1ec979cf | |||
| ee3198f448 | |||
| 0c78d3668b | |||
| 4c2af150a6 | |||
| 9a9f61ae2f | |||
| 0e1635e0e7 | |||
| d4ded92734 | |||
| f96da17e78 | |||
| 1431f2b9d0 | |||
| 7db7cfd85a | |||
| 1e3d68df1c | |||
| 6fc9534184 | |||
| 6f28878837 | |||
| c51ec4bd5d | |||
| a29a1806a3 | |||
| c69483eff1 | |||
| edceac754f | |||
| 6a992f4c1f | |||
| 5aeb0f821f | |||
| 235e50439f | |||
| ae931c8c51 | |||
| 3b279fca6a | |||
| a55e873c48 | |||
| 20e028a643 | |||
| 777589e2dc | |||
| c7727d233e | |||
| e8722c687a | |||
| 2e2cbd40fa | |||
| aa1e1b12ac | |||
| c6a7032d73 | |||
| e472000507 | |||
| b11ea43ee5 | |||
| bf89476421 | |||
| e03a6e6c34 | |||
| 24f10168dc | |||
| 09dfbb0630 | |||
| 69f3d9920a |
3
.git-blame-ignore-revs
Normal file
3
.git-blame-ignore-revs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# .git-blame-ignore-revs
|
||||||
|
# CR LF to LF
|
||||||
|
ed5a6023326fd2ab420ded76976501be33e0b389
|
||||||
5
.gitattributes
vendored
Normal file
5
.gitattributes
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
*.txt text eol=lf
|
||||||
|
*.cpp text eol=lf
|
||||||
|
*.h text eol=lf
|
||||||
|
*.ui text eol=lf
|
||||||
|
*.qml text eol=lf
|
||||||
2
.github/FUNDING.yml
vendored
Normal file
2
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
ko_fi: blumia
|
||||||
|
custom: ["https://blumia.itch.io/pineapple-pictures"]
|
||||||
33
.github/workflows/macos.yml
vendored
33
.github/workflows/macos.yml
vendored
@ -1,6 +1,6 @@
|
|||||||
name: macOS CI
|
name: macOS CI
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -8,12 +8,31 @@ jobs:
|
|||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v4
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
uses: jurplel/install-qt-action@v2
|
uses: jurplel/install-qt-action@v4
|
||||||
with:
|
with:
|
||||||
version: '5.15.2'
|
version: '6.9.1'
|
||||||
- name: Run a qt project
|
modules: 'qtimageformats'
|
||||||
|
- name: Install Conan and Dependencies
|
||||||
|
id: conan
|
||||||
|
working-directory: ./
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake ./
|
pip3 install wheel setuptools
|
||||||
make
|
pip3 install conan --upgrade
|
||||||
|
conan --version
|
||||||
|
conan profile detect
|
||||||
|
conan install --requires=exiv2/0.28.3 --generator CMakeDeps --generator CMakeToolchain --build=missing
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cmake . -DTRANSLATION_RESOURCE_EMBEDDING=ON --preset conan-release
|
||||||
|
cmake --build --preset conan-release
|
||||||
|
- name: Deploy
|
||||||
|
run: |
|
||||||
|
macdeployqt ./ppic.app -dmg
|
||||||
|
ls
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: "macos-bundle"
|
||||||
|
path: "*.dmg"
|
||||||
|
|||||||
8
.github/workflows/reuse-check.yml
vendored
8
.github/workflows/reuse-check.yml
vendored
@ -7,9 +7,11 @@ name: REUSE Compliance Check
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
reuse-compliance-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: REUSE Compliance Check
|
- name: REUSE Compliance Check
|
||||||
uses: fsfe/reuse-action@v1
|
uses: fsfe/reuse-action@v5
|
||||||
|
|||||||
40
.github/workflows/ubuntu.yml
vendored
40
.github/workflows/ubuntu.yml
vendored
@ -3,16 +3,14 @@ name: Ubuntu CI
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ubuntu-20-04-build:
|
ubuntu-24-04-build:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Get build dept.
|
- name: Get build dept.
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install cmake qtbase5-dev libqt5svg5-dev qttools5-dev libexiv2-dev
|
sudo apt install cmake qt6-base-dev qt6-svg-dev qt6-tools-dev libexiv2-dev
|
||||||
- name: Build it
|
- name: Build it
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
@ -24,33 +22,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
sudo apt install ./*.deb
|
sudo apt install ./*.deb
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ubuntu-20.04-deb-package
|
name: ubuntu-24.04-deb-package
|
||||||
path: build/*.deb
|
|
||||||
|
|
||||||
ubuntu-22-04-build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Get build dept.
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install cmake qtbase5-dev libqt5svg5-dev qttools5-dev libexiv2-dev
|
|
||||||
- name: Build it
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake ../
|
|
||||||
make
|
|
||||||
cpack -G DEB
|
|
||||||
- name: Try install it
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
sudo apt install ./*.deb
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ubuntu-22.04-deb-package
|
|
||||||
path: build/*.deb
|
path: build/*.deb
|
||||||
|
|||||||
121
.github/workflows/windows.yml
vendored
121
.github/workflows/windows.yml
vendored
@ -1,24 +1,28 @@
|
|||||||
name: Windows CI
|
name: Windows CI
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
msvc-build:
|
msvc-qmake-build:
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
vs: ['2019']
|
include:
|
||||||
msvc_arch: ['x64']
|
- qt_ver: '6.9.1'
|
||||||
|
vs: '2022'
|
||||||
|
aqt_arch: 'win64_msvc2022_64'
|
||||||
|
msvc_arch: 'x64'
|
||||||
|
|
||||||
runs-on: windows-2019
|
runs-on: windows-2022
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
uses: jurplel/install-qt-action@v2
|
uses: jurplel/install-qt-action@v4
|
||||||
with:
|
with:
|
||||||
arch: 'win64_msvc2019_64'
|
arch: ${{ matrix.aqt_arch }}
|
||||||
version: '5.15.2'
|
version: ${{ matrix.qt_ver }}
|
||||||
|
modules: 'qtimageformats'
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
@ -28,3 +32,102 @@ jobs:
|
|||||||
call %VCVARS% ${{ matrix.msvc_arch }}
|
call %VCVARS% ${{ matrix.msvc_arch }}
|
||||||
qmake pineapple-pictures.pro
|
qmake pineapple-pictures.pro
|
||||||
nmake
|
nmake
|
||||||
|
nmake clean
|
||||||
|
windeployqt --verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-system-d3d-compiler --no-system-dxc-compiler --skip-plugin-types tls,networkinformation release\ppic.exe
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: "windows-msvc${{ matrix.vs }}-qt${{ matrix.qt_ver }}-qmake-package"
|
||||||
|
path: release/*
|
||||||
|
|
||||||
|
msvc-cmake-build:
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- qt_ver: '6.9.1'
|
||||||
|
vs: '2022'
|
||||||
|
aqt_arch: 'win64_msvc2022_64'
|
||||||
|
msvc_arch: 'x64'
|
||||||
|
|
||||||
|
runs-on: windows-2022
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install Qt
|
||||||
|
uses: jurplel/install-qt-action@v4
|
||||||
|
with:
|
||||||
|
arch: ${{ matrix.aqt_arch }}
|
||||||
|
version: ${{ matrix.qt_ver }}
|
||||||
|
modules: 'qtimageformats'
|
||||||
|
- name: Build
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
:: ------ env ------
|
||||||
|
set PWD=%cd%
|
||||||
|
set VS=${{ matrix.vs }}
|
||||||
|
set VCVARS="C:\Program Files (x86)\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
|
||||||
|
if not exist %VCVARS% set VCVARS="C:\Program Files\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
|
||||||
|
call %VCVARS% ${{ matrix.msvc_arch }}
|
||||||
|
:: ------ dep ------
|
||||||
|
set CMAKE_PREFIX_PATH=%PWD%/dependencies_bin
|
||||||
|
mkdir dependencies_src
|
||||||
|
echo ::group::===== exiv2 =====
|
||||||
|
curl -fsSL -o exiv2_bin.zip https://github.com/Exiv2/exiv2/releases/download/v0.28.5/exiv2-0.28.5-2022msvc-AMD64.zip
|
||||||
|
7z x exiv2_bin.zip -y
|
||||||
|
ren .\exiv2-0.28.5-2022msvc-AMD64 dependencies_bin
|
||||||
|
echo ::endgroup::
|
||||||
|
echo ::group::===== zlib =====
|
||||||
|
curl -fsSL -o zlib_src.zip https://zlib.net/zlib131.zip
|
||||||
|
7z x zlib_src.zip -y -o"dependencies_src"
|
||||||
|
ren .\dependencies_src\zlib-1.3.1 zlib || goto :error
|
||||||
|
cmake ./dependencies_src/zlib -Bbuild_dependencies/zlib -DCMAKE_INSTALL_PREFIX="dependencies_bin" || goto :error
|
||||||
|
cmake --build build_dependencies/zlib --config Release --target=install || goto :error
|
||||||
|
curl -fsSL -o expat_src.zip https://github.com/libexpat/libexpat/archive/R_2_6_2.zip
|
||||||
|
echo ::endgroup::
|
||||||
|
echo ::group::===== AOM for libavif AVI decoding support =====
|
||||||
|
git clone -q -b v3.12.0 --depth 1 https://aomedia.googlesource.com/aom dependencies_src/aom
|
||||||
|
cmake ./dependencies_src/aom -Bbuild_dependencies/aom -DCMAKE_INSTALL_PREFIX="dependencies_bin" -DENABLE_DOCS=OFF -DBUILD_SHARED_LIBS=ON -DAOM_TARGET_CPU=generic -DENABLE_TESTS=OFF -DENABLE_TESTDATA=OFF -DENABLE_TOOLS=OFF -DENABLE_EXAMPLES=0 || goto :error
|
||||||
|
cmake --build build_dependencies/aom --config Release --target=install || goto :error
|
||||||
|
echo ::endgroup::
|
||||||
|
echo ::group::===== libavif =====
|
||||||
|
curl -fsSL -o libavif-v1_2_1.zip https://github.com/AOMediaCodec/libavif/archive/v1.2.1.zip
|
||||||
|
7z x libavif-v1_2_1.zip -y -o"dependencies_src"
|
||||||
|
ren .\dependencies_src\libavif-1.2.1 libavif || goto :error
|
||||||
|
cmake ./dependencies_src/libavif -Bbuild_dependencies/libavif -DCMAKE_INSTALL_PREFIX="dependencies_bin" -DAVIF_CODEC_AOM=ON -DAVIF_LIBYUV=LOCAL
|
||||||
|
cmake --build build_dependencies/libavif --config Release --target=install || goto :error
|
||||||
|
echo ::endgroup::
|
||||||
|
echo ::group::===== expat =====
|
||||||
|
7z x expat_src.zip -y -o"dependencies_src"
|
||||||
|
ren .\dependencies_src\libexpat-R_2_6_2 expat || goto :error
|
||||||
|
cmake ./dependencies_src/expat/expat -Bbuild_dependencies/expat -DCMAKE_INSTALL_PREFIX="dependencies_bin" || goto :error
|
||||||
|
cmake --build build_dependencies/expat --config Release --target=install || goto :error
|
||||||
|
echo ::endgroup::
|
||||||
|
echo ::group::===== ECM =====
|
||||||
|
git clone -q https://invent.kde.org/frameworks/extra-cmake-modules.git dependencies_src/extra-cmake-modules
|
||||||
|
cmake .\dependencies_src\extra-cmake-modules -Bbuild_dependencies/extra-cmake-modules -DCMAKE_INSTALL_PREFIX="dependencies_bin" -DBUILD_TESTING=OFF || goto :error
|
||||||
|
cmake --build build_dependencies/extra-cmake-modules --config Release --target=install || goto :error
|
||||||
|
echo ::endgroup::
|
||||||
|
echo ::group::===== KArchive =====
|
||||||
|
git clone -q https://invent.kde.org/frameworks/karchive.git dependencies_src/karchive
|
||||||
|
cmake .\dependencies_src\karchive -Bbuild_dependencies/karchive -DBUILD_TESTING=OFF -DWITH_LIBZSTD=OFF -DWITH_BZIP2=OFF -DWITH_LIBLZMA=OFF -DCMAKE_INSTALL_PREFIX="dependencies_bin" || goto :error
|
||||||
|
cmake --build build_dependencies/karchive --config Release --target=install || goto :error
|
||||||
|
echo ::endgroup::
|
||||||
|
echo ::group::===== KImageFormats =====
|
||||||
|
git clone -q https://invent.kde.org/frameworks/kimageformats.git dependencies_src/kimageformats
|
||||||
|
cmake .\dependencies_src\kimageformats -Bbuild_dependencies/kimageformats -DKDE_INSTALL_QTPLUGINDIR=%QT_ROOT_DIR%\plugins || goto :error
|
||||||
|
cmake --build build_dependencies/kimageformats --config Release --target=install || goto :error
|
||||||
|
echo ::endgroup::
|
||||||
|
:: ------ app ------
|
||||||
|
cmake -Bbuild . -DCMAKE_INSTALL_PREFIX="%PWD%\build\"
|
||||||
|
cmake --build build --config Release
|
||||||
|
cmake --build build --config Release --target=install
|
||||||
|
:: ------ pkg ------
|
||||||
|
windeployqt --verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-system-d3d-compiler --no-system-dxc-compiler --skip-plugin-types tls,networkinformation build\bin\ppic.exe
|
||||||
|
robocopy ./dependencies_bin/bin build/bin *.dll
|
||||||
|
if ErrorLevel 8 (exit /B 1)
|
||||||
|
copy LICENSE build\bin
|
||||||
|
exit /B 0
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: "windows-msvc${{ matrix.vs }}-qt${{ matrix.qt_ver }}-cmake-package"
|
||||||
|
path: build/bin/*
|
||||||
|
|||||||
9
.gitignore
vendored
9
.gitignore
vendored
@ -2,8 +2,17 @@
|
|||||||
*.user
|
*.user
|
||||||
*.user.*
|
*.user.*
|
||||||
|
|
||||||
|
# Why, macOS, why?
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
# Translation files
|
# Translation files
|
||||||
*.qm
|
*.qm
|
||||||
|
*.mo
|
||||||
|
|
||||||
# Generic Build Dir
|
# Generic Build Dir
|
||||||
[Bb]uild/
|
[Bb]uild/
|
||||||
|
cmake-build-*/
|
||||||
|
|
||||||
|
# IDE/Editor config folders
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
|||||||
28
.reuse/dep5
28
.reuse/dep5
@ -1,28 +0,0 @@
|
|||||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
||||||
Upstream-Name: Pineapple Pictures
|
|
||||||
Source: https://github.com/BLumia/pineapple-pictures
|
|
||||||
|
|
||||||
# Config files
|
|
||||||
Files: .gitignore appveyor.yml .github/*
|
|
||||||
Copyright: None
|
|
||||||
License: CC0-1.0
|
|
||||||
|
|
||||||
# README, resource files and Metadata files
|
|
||||||
Files: README*.md assets/*.rc assets/*.qrc dist/*
|
|
||||||
Copyright: None
|
|
||||||
License: CC0-1.0
|
|
||||||
|
|
||||||
# Translation files
|
|
||||||
# See assets/plain/translators.html for a list of translators
|
|
||||||
Files: app/translations/*.ts assets/plain/translators.html
|
|
||||||
Copyright: Translators from hosted.weblate.org
|
|
||||||
License: MIT
|
|
||||||
|
|
||||||
# Assets
|
|
||||||
Files: assets/icons/*.svg
|
|
||||||
Copyright: 2022 Gary Wang
|
|
||||||
License: MIT
|
|
||||||
|
|
||||||
Files: assets/icons/app-icon.*
|
|
||||||
Copyright: 2020 Lovelyblack
|
|
||||||
License: MIT
|
|
||||||
157
CMakeLists.txt
157
CMakeLists.txt
@ -1,38 +1,41 @@
|
|||||||
# SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
# SPDX-FileCopyrightText: 2022 - 2025 Gary Wang <git@blumia.net>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
project (pineapple-pictures)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
cmake_minimum_required (VERSION 3.9.5)
|
project(pineapple-pictures VERSION 1.1.1) # don't forget to update NEWS file and AppStream metadata.
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
|
include(GNUInstallDirs)
|
||||||
|
include(FeatureSummary)
|
||||||
include (GNUInstallDirs)
|
|
||||||
include (FeatureSummary)
|
|
||||||
|
|
||||||
set (CMAKE_AUTOMOC ON)
|
|
||||||
set (CMAKE_AUTORCC ON)
|
|
||||||
set (QT_MINIMUM_VERSION "5.10")
|
|
||||||
|
|
||||||
option (EXIV2_METADATA_SUPPORT "Better image metadata support via libexiv2" ON)
|
option (EXIV2_METADATA_SUPPORT "Better image metadata support via libexiv2" ON)
|
||||||
|
option (TRANSLATION_RESOURCE_EMBEDDING "Embedding .qm translation files inside resource" OFF)
|
||||||
|
|
||||||
find_package(Qt5 ${QT_MINIMUM_VERSION} REQUIRED
|
set (CMAKE_CXX_STANDARD 17)
|
||||||
COMPONENTS Widgets Svg LinguistTools
|
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
set (CMAKE_AUTOMOC ON)
|
||||||
|
set (CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
|
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
|
||||||
|
|
||||||
|
set (QT_MINIMUM_VERSION "6.4")
|
||||||
|
|
||||||
|
find_package(Qt${QT_VERSION_MAJOR} ${QT_MINIMUM_VERSION} REQUIRED
|
||||||
|
COMPONENTS Widgets Svg SvgWidgets LinguistTools
|
||||||
OPTIONAL_COMPONENTS DBus
|
OPTIONAL_COMPONENTS DBus
|
||||||
)
|
)
|
||||||
|
|
||||||
if (EXIV2_METADATA_SUPPORT)
|
if (EXIV2_METADATA_SUPPORT)
|
||||||
find_package(LibExiv2)
|
find_package(exiv2)
|
||||||
set_package_properties(LibExiv2 PROPERTIES
|
set_package_properties(exiv2 PROPERTIES
|
||||||
URL "https://www.exiv2.org"
|
URL "https://www.exiv2.org"
|
||||||
DESCRIPTION "image metadata support"
|
DESCRIPTION "image metadata support"
|
||||||
TYPE OPTIONAL
|
TYPE RECOMMENDED
|
||||||
PURPOSE "Bring better image metadata support"
|
PURPOSE "Bring better image metadata support"
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
#LibExiv2_FOUND
|
|
||||||
set (PPIC_CPP_FILES
|
set (PPIC_CPP_FILES
|
||||||
app/main.cpp
|
app/main.cpp
|
||||||
app/framelesswindow.cpp
|
app/framelesswindow.cpp
|
||||||
@ -51,6 +54,8 @@ set (PPIC_CPP_FILES
|
|||||||
app/metadatadialog.cpp
|
app/metadatadialog.cpp
|
||||||
app/exiv2wrapper.cpp
|
app/exiv2wrapper.cpp
|
||||||
app/playlistmanager.cpp
|
app/playlistmanager.cpp
|
||||||
|
app/shortcutedit.cpp
|
||||||
|
app/fileopeneventhandler.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set (PPIC_HEADER_FILES
|
set (PPIC_HEADER_FILES
|
||||||
@ -70,6 +75,8 @@ set (PPIC_HEADER_FILES
|
|||||||
app/metadatadialog.h
|
app/metadatadialog.h
|
||||||
app/exiv2wrapper.h
|
app/exiv2wrapper.h
|
||||||
app/playlistmanager.h
|
app/playlistmanager.h
|
||||||
|
app/shortcutedit.h
|
||||||
|
app/fileopeneventhandler.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set (PPIC_QRC_FILES
|
set (PPIC_QRC_FILES
|
||||||
@ -86,10 +93,9 @@ set (EXE_NAME ppic)
|
|||||||
file (GLOB PPIC_TS_FILES app/translations/*.ts)
|
file (GLOB PPIC_TS_FILES app/translations/*.ts)
|
||||||
set (PPIC_CPP_FILES_FOR_I18N ${PPIC_CPP_FILES})
|
set (PPIC_CPP_FILES_FOR_I18N ${PPIC_CPP_FILES})
|
||||||
|
|
||||||
qt5_create_translation(PPIC_QM_FILES ${PPIC_CPP_FILES_FOR_I18N} ${PPIC_TS_FILES})
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
list(APPEND PPIC_RC_FILES assets/pineapple-pictures.rc)
|
configure_file(assets/pineapple-pictures.rc.in pineapple-pictures.rc @ONLY)
|
||||||
|
list(APPEND PPIC_RC_FILES ${CMAKE_CURRENT_BINARY_DIR}/pineapple-pictures.rc)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
add_executable (${EXE_NAME}
|
add_executable (${EXE_NAME}
|
||||||
@ -97,28 +103,40 @@ add_executable (${EXE_NAME}
|
|||||||
${PPIC_CPP_FILES}
|
${PPIC_CPP_FILES}
|
||||||
${PPIC_QRC_FILES}
|
${PPIC_QRC_FILES}
|
||||||
${PPIC_RC_FILES}
|
${PPIC_RC_FILES}
|
||||||
${PPIC_QM_FILES}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries (${EXE_NAME} Qt5::Widgets Qt5::Svg)
|
set(ADD_TRANSLATIONS_ADDITIONAL_ARGS)
|
||||||
|
|
||||||
if (LibExiv2_FOUND)
|
if (Qt6_VERSION VERSION_GREATER_EQUAL "6.9.0")
|
||||||
message(INFO ${LibExiv2_INCLUDE_DIRS})
|
set(ADD_TRANSLATIONS_ADDITIONAL_ARGS MERGE_QT_TRANSLATIONS)
|
||||||
target_include_directories(${EXE_NAME}
|
endif()
|
||||||
PRIVATE
|
|
||||||
${LibExiv2_INCLUDE_DIRS}
|
if (TRANSLATION_RESOURCE_EMBEDDING)
|
||||||
)
|
qt_add_translations(${EXE_NAME} ${ADD_TRANSLATIONS_ADDITIONAL_ARGS} TS_FILES ${PPIC_TS_FILES})
|
||||||
|
else()
|
||||||
|
qt_add_translations(${EXE_NAME} ${ADD_TRANSLATIONS_ADDITIONAL_ARGS} TS_FILES ${PPIC_TS_FILES} QM_FILES_OUTPUT_VARIABLE PPIC_QM_FILES)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_sources(${EXE_NAME} PRIVATE ${PPIC_QM_FILES})
|
||||||
|
|
||||||
|
target_link_libraries (${EXE_NAME} Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::SvgWidgets)
|
||||||
|
|
||||||
|
if (exiv2_FOUND)
|
||||||
|
if(NOT TARGET Exiv2::exiv2lib AND TARGET exiv2lib)
|
||||||
|
# for exiv2 0.27.x and (macOS?) conan build
|
||||||
|
add_library(Exiv2::exiv2lib ALIAS exiv2lib)
|
||||||
|
endif()
|
||||||
target_link_libraries (${EXE_NAME}
|
target_link_libraries (${EXE_NAME}
|
||||||
LibExiv2::LibExiv2
|
Exiv2::exiv2lib
|
||||||
)
|
)
|
||||||
target_compile_definitions(${EXE_NAME} PRIVATE
|
target_compile_definitions(${EXE_NAME} PRIVATE
|
||||||
HAVE_EXIV2_VERSION="${LibExiv2_VERSION}"
|
HAVE_EXIV2_VERSION="${exiv2_VERSION}"
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (Qt5DBus_FOUND)
|
if (TARGET Qt6::DBus)
|
||||||
target_link_libraries (${EXE_NAME}
|
target_link_libraries (${EXE_NAME}
|
||||||
Qt5::DBus
|
Qt${QT_VERSION_MAJOR}::DBus
|
||||||
)
|
)
|
||||||
target_compile_definitions(${EXE_NAME} PRIVATE
|
target_compile_definitions(${EXE_NAME} PRIVATE
|
||||||
HAVE_QTDBUS
|
HAVE_QTDBUS
|
||||||
@ -127,11 +145,6 @@ endif()
|
|||||||
|
|
||||||
# Extra build settings
|
# Extra build settings
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set_property (
|
|
||||||
TARGET ${EXE_NAME}
|
|
||||||
PROPERTY WIN32_EXECUTABLE true
|
|
||||||
)
|
|
||||||
|
|
||||||
target_compile_definitions(${EXE_NAME} PRIVATE
|
target_compile_definitions(${EXE_NAME} PRIVATE
|
||||||
FLAG_PORTABLE_MODE_SUPPORT=1
|
FLAG_PORTABLE_MODE_SUPPORT=1
|
||||||
)
|
)
|
||||||
@ -162,6 +175,7 @@ macro (ppic_set_version_via_describe _describe_long)
|
|||||||
endmacro ()
|
endmacro ()
|
||||||
|
|
||||||
# Version setup
|
# Version setup
|
||||||
|
target_compile_definitions(${EXE_NAME} PRIVATE PPIC_VERSION_STRING="${CMAKE_PROJECT_VERSION}")
|
||||||
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||||
find_package(Git)
|
find_package(Git)
|
||||||
set_package_properties(Git PROPERTIES TYPE OPTIONAL PURPOSE "Determine exact build version.")
|
set_package_properties(Git PROPERTIES TYPE OPTIONAL PURPOSE "Determine exact build version.")
|
||||||
@ -179,34 +193,36 @@ if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
|||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Helper macros for install settings
|
|
||||||
macro (ppic_convert_to_relative_path _var)
|
|
||||||
# Make sure _var is a relative path
|
|
||||||
if (IS_ABSOLUTE "${${_var}}")
|
|
||||||
file (RELATIVE_PATH ${_var} "${CMAKE_INSTALL_PREFIX}" "${${_var}}")
|
|
||||||
endif ()
|
|
||||||
endmacro ()
|
|
||||||
|
|
||||||
# Install settings
|
# Install settings
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
# FIXME: try to avoid install to a "bin" subfolder under windows...
|
set_target_properties(${EXE_NAME} PROPERTIES
|
||||||
# when fixed, don't forget to update the CI config file...
|
WIN32_EXECUTABLE TRUE
|
||||||
set (BIN_INSTALL_DIR "") # seems useless, don't know why...
|
)
|
||||||
|
elseif (APPLE)
|
||||||
|
set_source_files_properties(assets/icons/app-icon.icns PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION "Resources"
|
||||||
|
)
|
||||||
|
target_sources(${EXE_NAME} PUBLIC assets/icons/app-icon.icns)
|
||||||
|
# See https://cmake.org/cmake/help/v3.15/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.html
|
||||||
|
set_target_properties(${EXE_NAME} PROPERTIES
|
||||||
|
MACOSX_BUNDLE TRUE
|
||||||
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/dist/MacOSXBundleInfo.plist.in
|
||||||
|
MACOSX_BUNDLE_BUNDLE_NAME "Pineapple Pictures"
|
||||||
|
MACOSX_BUNDLE_GUI_IDENTIFIER net.blumia.pineapple-pictures
|
||||||
|
MACOSX_BUNDLE_ICON_FILE app-icon.icns # contains the .icns file name, *without* the path.
|
||||||
|
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
|
||||||
|
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
||||||
|
)
|
||||||
elseif (UNIX)
|
elseif (UNIX)
|
||||||
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||||
set(CMAKE_INSTALL_PREFIX /usr)
|
set(CMAKE_INSTALL_PREFIX /usr)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set (BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}") # relative, usually "bin"
|
|
||||||
ppic_convert_to_relative_path(BIN_INSTALL_DIR)
|
|
||||||
set (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}") # "lib" or "lib64"
|
|
||||||
ppic_convert_to_relative_path(LIB_INSTALL_DIR)
|
|
||||||
|
|
||||||
# install icon
|
# install icon
|
||||||
install (
|
install (
|
||||||
FILES assets/icons/app-icon.svg
|
FILES assets/icons/app-icon.svg
|
||||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/48x48/apps"
|
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps"
|
||||||
RENAME pineapple-pictures.svg
|
RENAME net.blumia.pineapple-pictures.svg
|
||||||
)
|
)
|
||||||
|
|
||||||
# install shortcut
|
# install shortcut
|
||||||
@ -223,9 +239,10 @@ elseif (UNIX)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set (INSTALL_TARGETS_DEFAULT_ARGS
|
set (INSTALL_TARGETS_DEFAULT_ARGS
|
||||||
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
|
BUNDLE DESTINATION .
|
||||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT Devel
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Devel
|
||||||
)
|
)
|
||||||
|
|
||||||
install (
|
install (
|
||||||
@ -233,19 +250,25 @@ install (
|
|||||||
${INSTALL_TARGETS_DEFAULT_ARGS}
|
${INSTALL_TARGETS_DEFAULT_ARGS}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (WIN32)
|
if (TRANSLATION_RESOURCE_EMBEDDING)
|
||||||
|
target_compile_definitions(${EXE_NAME}
|
||||||
|
PRIVATE TRANSLATION_RESOURCE_EMBEDDING
|
||||||
|
)
|
||||||
|
elseif (WIN32)
|
||||||
set (QM_FILE_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}/translations")
|
set (QM_FILE_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}/translations")
|
||||||
else ()
|
else()
|
||||||
set (QM_FILE_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/pineapple-pictures/translations")
|
set (QM_FILE_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/pineapple-pictures/translations")
|
||||||
target_compile_definitions(${EXE_NAME}
|
target_compile_definitions(${EXE_NAME}
|
||||||
PRIVATE QM_FILE_INSTALL_DIR=${QM_FILE_INSTALL_DIR}
|
PRIVATE QM_FILE_INSTALL_ABSOLUTE_DIR=${QM_FILE_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
install (
|
if (DEFINED QM_FILE_INSTALL_DIR)
|
||||||
FILES ${PPIC_QM_FILES}
|
install(
|
||||||
DESTINATION ${QM_FILE_INSTALL_DIR}
|
FILES ${PPIC_QM_FILES}
|
||||||
)
|
DESTINATION ${QM_FILE_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||||
|
|
||||||
@ -261,7 +284,7 @@ elseif (APPLE)
|
|||||||
# ...
|
# ...
|
||||||
elseif (UNIX)
|
elseif (UNIX)
|
||||||
set (CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
|
set (CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
set (CPACK_DEBIAN_PACKAGE_SHILIBDEPS ON)
|
set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||||
set (CPACK_DEBIAN_PACKAGE_RECOMMENDS "kimageformat-plugins")
|
set (CPACK_DEBIAN_PACKAGE_RECOMMENDS "kimageformat-plugins")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
42
LICENSE
42
LICENSE
@ -1,21 +1,21 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2020 BLumia
|
Copyright (c) 2025 BLumia
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The above copyright notice and this permission notice shall be included in all
|
||||||
copies or substantial portions of the Software.
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
Copyright (c) <year> <owner>.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
186
NEWS
Normal file
186
NEWS
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
Version 1.1.1
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Released: 2025-08-02
|
||||||
|
|
||||||
|
Features:
|
||||||
|
* Click dock icon should show window when it's hidden on macOS
|
||||||
|
|
||||||
|
Bugfixes:
|
||||||
|
* Ensure "Fit by Width" position the view to the beginning of the image
|
||||||
|
|
||||||
|
Miscellaneous:
|
||||||
|
* Update translations
|
||||||
|
* Update Exiv2 version for Windows binary build
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Heimen Stoffels, VenusGirl, தமிழ்நேரம்
|
||||||
|
|
||||||
|
Version 1.1.0
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Released: 2025-07-06
|
||||||
|
|
||||||
|
Features:
|
||||||
|
* New option to disable built-in close window animation
|
||||||
|
* New option to disable gallery looping
|
||||||
|
* Support load m3u8 as image gallery playlist
|
||||||
|
|
||||||
|
Miscellaneous:
|
||||||
|
* Drop Qt 5 support
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Heimen Stoffels, albanobattistella, தமிழ்நேரம்
|
||||||
|
|
||||||
|
Version 1.0.0
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Released: 2025-05-03
|
||||||
|
|
||||||
|
Features:
|
||||||
|
* Support enforces windowed mode on start-up
|
||||||
|
* Reload image automatically when current image gets updated
|
||||||
|
|
||||||
|
Bugfixes:
|
||||||
|
* Display correct text language on macOS
|
||||||
|
|
||||||
|
Miscellaneous:
|
||||||
|
* Use native text for shortcut editor's label
|
||||||
|
* Display native commandline message when possible
|
||||||
|
* Merge Qt translations into app applications as well
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Heimen Stoffels, albanobattistella, mmahhi
|
||||||
|
|
||||||
|
Version 0.9.2
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Released: 2025-03-05
|
||||||
|
|
||||||
|
Bugfixes:
|
||||||
|
* Refer to the right exiv2 CMake module so it can be found on Linux
|
||||||
|
|
||||||
|
Miscellaneous:
|
||||||
|
* Convert DEP5 to REUSE.toml for better REUSE compliance
|
||||||
|
* Update translations
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Pino Toscano, TamilNeram
|
||||||
|
|
||||||
|
Version 0.9.1
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Released: 2025-01-25
|
||||||
|
|
||||||
|
Features:
|
||||||
|
* Option to double-click to fullscreen
|
||||||
|
* Build-time option to embed translation resources
|
||||||
|
|
||||||
|
Bugfixes:
|
||||||
|
* Fix window size not adjusted when open file on macOS
|
||||||
|
* Should center window according to available screen geometry
|
||||||
|
|
||||||
|
Miscellaneous:
|
||||||
|
* Change close window bahavior on macOS
|
||||||
|
* Update translations
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
albanobattistella, Sabri Ünal
|
||||||
|
|
||||||
|
Version 0.9.0
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Released: 2024-12-08
|
||||||
|
|
||||||
|
Features:
|
||||||
|
* Support custom shortcuts for existing actions
|
||||||
|
* Actions for frame-by-frame animated image playback support
|
||||||
|
|
||||||
|
Miscellaneous:
|
||||||
|
* Initial macOS bundle support
|
||||||
|
* bump minimum required CMake version to 3.16
|
||||||
|
* Update translations
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
albanobattistella, VenusGirl, gallegonovato, Sabri Ünal
|
||||||
|
|
||||||
|
Version 0.8.2.1
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Released: 2024-10-27
|
||||||
|
|
||||||
|
Bugfixes:
|
||||||
|
* Cannot load translations caused by a change in 0.8.2
|
||||||
|
|
||||||
|
Version 0.8.2
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Released: 2024-10-26
|
||||||
|
|
||||||
|
Features:
|
||||||
|
* New option to allow use light-color checkerboard by default
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
albanobattistella, mmahhi, gallegonovato
|
||||||
|
|
||||||
|
Version 0.8.1
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Released: 2024-08-25
|
||||||
|
|
||||||
|
Features:
|
||||||
|
* New command line option to list all supported formats
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
albanobattistella, mmahhi, ovl-1, gallegonovato, Oğuz Ersen
|
||||||
|
|
||||||
|
Version 0.8.0
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Released: 2024-06-29
|
||||||
|
|
||||||
|
Features:
|
||||||
|
* Support move image file to trash
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
albanobattistella, mmahhi, gallegonovato, Oğuz Ersen
|
||||||
|
|
||||||
|
Version 0.7.4
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Released: 2024-04-04
|
||||||
|
|
||||||
|
Features:
|
||||||
|
* Add some icons for corresponding menu actions
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Reza Almanda, mmahhi, Oğuz Ersen, volkov, Сергій
|
||||||
|
|
||||||
|
Version 0.7.3
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Released: 2023-10-24
|
||||||
|
|
||||||
|
Features:
|
||||||
|
* Add "Keep transformation" to menu
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
mmahhi, VenusGirl, albanobattistella, gallegonovato, Heimen Stoffels
|
||||||
|
|
||||||
|
Version 0.7.2
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Released: 2023-08-27
|
||||||
|
|
||||||
|
Features:
|
||||||
|
* Add an option in setting dialog to tweak the High-DPI scaling rounding policy (might only works in Qt 6 build)
|
||||||
|
|
||||||
|
Bugfixes:
|
||||||
|
* Remove image size limit for Qt 6 build
|
||||||
|
* Fix application icon install location under Linux
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Heimen Stoffels, Andrey, Dan, gallegonovato, albanobattistella, Sabri Ünal
|
||||||
|
|
||||||
|
Version 0.7.1
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Released: 2023-07-08
|
||||||
|
|
||||||
|
Features:
|
||||||
|
* TIF and TIFF format files in the same folder will now be automatically added to the gallery
|
||||||
|
* Built-in window resizing now also supports Linux desktop. (macOS might also works as well)
|
||||||
|
|
||||||
|
Bugfixes:
|
||||||
|
* Settings dialog will automatedly use a suitable size instead of a hard-coded one
|
||||||
|
* Fix default configuration file location under Linux. (was `~/.config/config.ini`, now it's `~/.config/Pineapple Pictures/config.ini`)
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
yyc12345
|
||||||
|
|
||||||
141
README.md
141
README.md
@ -1,78 +1,63 @@
|
|||||||
Yet another image viewer.
|
Yet another image viewer.
|
||||||
|
|
||||||
|CI|Build Status|
|
|CI|Build Status|
|
||||||
|---|---|
|
|---|---|
|
||||||
|Windows Build|[](https://ci.appveyor.com/project/BLumia/pineapplepictures/branch/master)|
|
|Windows Build|[](https://github.com/BLumia/pineapple-pictures/actions/workflows/windows.yml)|
|
||||||
|macOS Build|[](https://github.com/BLumia/pineapple-pictures/actions/workflows/macos.yml)|
|
|macOS Build|[](https://github.com/BLumia/pineapple-pictures/actions/workflows/macos.yml)|
|
||||||
|Ubuntu Build|[](https://github.com/BLumia/pineapple-pictures/actions/workflows/ubuntu.yml)|
|
|Ubuntu Build|[](https://github.com/BLumia/pineapple-pictures/actions/workflows/ubuntu.yml)|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Summary
|
## Summary
|
||||||
|
|
||||||
Pineapple Pictures is a lightweight image viewer that allows you view JPEG, PNG, GIF, SVG, PSD, KRA, XCF, TGA, AVIF and some other frequently used image formats files quickly and easily, and also provide a Stay-on-Top window setting that allows you pin the window so you can use it to pin a reference image at the top and then you can work with other software.
|
Pineapple Pictures is a lightweight image viewer that allows you view JPEG, PNG, GIF, SVG, PSD, KRA, XCF, TGA, HDR, AVIF and some other frequently used image formats files quickly and easily, and also provide a Stay-on-Top window setting that allows you pin the window so you can use it to pin a reference image at the top and then you can work with other software.
|
||||||
|
|
||||||
## Get it!
|
## Get it!
|
||||||
|
|
||||||
- [GitHub Release Page](https://github.com/BLumia/pineapple-pictures/releases)
|
### Maintained by the original author
|
||||||
- [SourceForge](https://sourceforge.net/projects/pineapple-pictures/)
|
|
||||||
- Archlinux AUR: [pineapple-pictures](https://aur.archlinux.org/packages/pineapple-pictures/) | [pineapple-pictures-git](https://aur.archlinux.org/packages/pineapple-pictures-git/)
|
- [GitHub Release Page](https://github.com/BLumia/pineapple-pictures/releases)
|
||||||
- Debian (since bullseye) or Ubuntu (since 21.04): `sudo apt install pineapple-pictures`
|
- [SourceForge](https://sourceforge.net/projects/pineapple-pictures/)
|
||||||
- [Itch.io Store](https://blumia.itch.io/pineapple-pictures)
|
- Archlinux AUR: [pineapple-pictures](https://aur.archlinux.org/packages/pineapple-pictures/) | [pineapple-pictures-git](https://aur.archlinux.org/packages/pineapple-pictures-git/)
|
||||||
|
- [Itch.io Store](https://blumia.itch.io/pineapple-pictures)
|
||||||
## Help Translation!
|
|
||||||
|
### Maintained by contributors / certain distro's package maintainers
|
||||||
[Translate this project on Weblate!](https://hosted.weblate.org/projects/pineapple-pictures/)
|
|
||||||
|
[](https://repology.org/project/pineapple-pictures/versions)
|
||||||
## Build it manually:
|
|
||||||
|
## Help Translation!
|
||||||
Current state, we need:
|
|
||||||
|
[Translate this project on Weblate!](https://hosted.weblate.org/projects/pineapple-pictures/)
|
||||||
- `cmake`: as the build system.
|
|
||||||
- `qt5` with `qt5-svg` and `qt5-tools`: since the app is using Qt.
|
## Build it manually:
|
||||||
- `libexiv2`: able to display more image metadata. (optional, but recommended)
|
|
||||||
|
Current state, we need:
|
||||||
Then we can build it with any proper c++ compiler like g++ or msvc.
|
|
||||||
|
- `cmake`: as the build system.
|
||||||
Building it just requires normal cmake building steps:
|
- `qt6` with `qt6-svg` and `qt6-tools`: since the app is using Qt.
|
||||||
|
- `libexiv2`: able to display more image metadata. (optional, but recommended)
|
||||||
``` bash
|
|
||||||
$ mkdir build && cd build
|
Then we can build it with any proper c++ compiler like g++ or msvc.
|
||||||
$ cmake ..
|
|
||||||
$ cmake --build . # or simply using `make` if you are using Makefile as the cmake generator.
|
Building it just requires normal cmake building steps:
|
||||||
```
|
|
||||||
|
``` bash
|
||||||
After that, a `ppic` executable file will be available to use. You can also optionally install it by using the target `install` (or simply `make install` in case you are using Makefile). After the build process, you can also use `cpack` to make a package.
|
$ mkdir build && cd build
|
||||||
|
$ cmake ..
|
||||||
The project will try to build with `exiv2` when it's available at build time, if you would like to build the project without `exiv2`, pass `-DEXIV2_METADATA_SUPPORT=OFF` to `cmake`. The project will also not use `exiv2` if it's not found, the `EXIV2_METADATA_SUPPORT` option can be useful if you have `exiv2` but specifically don't want to use it.
|
$ cmake --build . # or simply using `make` if you are using Makefile as the cmake generator.
|
||||||
|
```
|
||||||
Image formats supports rely on Qt's imageformats plugins, just get the plugins you need from your distro's package manager will be fine. For Windows user, you may need build and install the imageformats plugin manually, read the content below.
|
|
||||||
|
After that, a `ppic` executable file will be available to use. You can also optionally install it by using the target `install` (or simply `make install` in case you are using Makefile). After the build process, you can also use `cpack` to make a package.
|
||||||
> **Note**
|
|
||||||
> Although there is a `pineapple-pictures.pro` file which can be used for QMake build, it's only for testing purpose and it doesn't have `exiv2` support included. Using QMake to build this project is NOT supported, please use CMake if possible.
|
The project will try to build with `exiv2` when it's available at build time, if you would like to build the project without `exiv2`, pass `-DEXIV2_METADATA_SUPPORT=OFF` to `cmake`. The project will also not use `exiv2` if it's not found, the `EXIV2_METADATA_SUPPORT` option can be useful if you have `exiv2` but specifically don't want to use it.
|
||||||
|
|
||||||
### Linux
|
Image formats supports rely on Qt's imageformats plugins, just get the plugins you need from your distro's package manager will be fine. For Windows user, you may need build and install the imageformats plugin manually, read the content below.
|
||||||
|
|
||||||
Just normal build process as other program will be fine. Nothing special ;)
|
It's possible to build it under Windows, Linux, macOS, and maybe other desktop platforms that Qt is ported to. For platform specific build instructions, please read the [related wiki page](https://github.com/BLumia/pineapple-pictures/wiki/Platform-Specific-Build-Instructions).
|
||||||
|
|
||||||
For Archlinux there are also a [PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=pineapple-pictures-git) you can use.
|
> [!NOTE]
|
||||||
|
> Although there is a `pineapple-pictures.pro` file which can be used for QMake build, it's only for testing purpose and it doesn't have `exiv2` support included. Using QMake to build this project is NOT supported, please use CMake if possible.
|
||||||
For packaging to debian-based distro, the `CMakeLists.txt` provides some cpack configurations for generating a `.deb` package. After the build process, use `cpack -G DEB` to generate the package. You can also take `.github/workflows/ubuntu.yml` as a reference.
|
|
||||||
|
## License
|
||||||
For this project, `DEB` is the only supported cpack generator in current state, feel free to submit a PR if you like improving `cpack` support for this project.
|
|
||||||
|
Pineapple Pictures as a whole is licensed under MIT license. Individual files may have a different, but compatible license.
|
||||||
### Windows
|
|
||||||
|
|
||||||
The normal build steps for Linux is also applied to Windows, but since Windows doesn't have a decent package manager, so if you need any other image formats support other than the supported formats which Qt provided, you need to get and build these imageformats plugins manually and vendor it. It's optional and can be skipped if you don't need extra image formats support.
|
|
||||||
|
|
||||||
For the Windows binary I provided, kimageformats plugin is used (for formats like kra, xcf, psd and etc.). You can take `appveyor.yml` as a reference to learn what I did when building the Windows binary.
|
|
||||||
|
|
||||||
[KDE Craft](https://community.kde.org/Craft) environment also can be used to build and package this program. I did also created a blueprint for building this project that you can found it at [here](https://github.com/BearKidsTeam/craft-shmooprint-bkt). It's not the way I used to create the release binary, but still worth trying.
|
|
||||||
|
|
||||||
### macOS
|
|
||||||
|
|
||||||
I don't have a mac, so no support at all. There is also a GitHub Action (see `.github/workflows/macos.yml`) running macOS build though so at least it can build. Feel free to submit a PR if you would like to give some love to the macOS build ;P
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
Pineapple Pictures as a whole is licensed under MIT license. Individual files may have a different, but compatible license.
|
|
||||||
|
|||||||
142
README.zh_CN.md
142
README.zh_CN.md
@ -1,78 +1,64 @@
|
|||||||
简单轻量的跨平台看图工具。
|
简单轻量的跨平台看图工具。
|
||||||
|
|
||||||
|CI|构建状态|
|
|CI|构建状态|
|
||||||
|---|---|
|
|---|---|
|
||||||
|Windows Build|[](https://ci.appveyor.com/project/BLumia/pineapplepictures/branch/master)|
|
|Windows Build|[](https://github.com/BLumia/pineapple-pictures/actions/workflows/windows.yml)|
|
||||||
|macOS Build|[](https://github.com/BLumia/pineapple-pictures/actions/workflows/macos.yml)|
|
|macOS Build|[](https://github.com/BLumia/pineapple-pictures/actions/workflows/macos.yml)|
|
||||||
|Ubuntu Build|[](https://github.com/BLumia/pineapple-pictures/actions/workflows/ubuntu.yml)|
|
|Ubuntu Build|[](https://github.com/BLumia/pineapple-pictures/actions/workflows/ubuntu.yml)|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 简介
|
## 简介
|
||||||
|
|
||||||
菠萝看图是一个轻量图像查看器,允许你简单快捷的查看 JPEG, PNG, GIF, SVG, PSD, KRA, XCF, TGA, AVIF 等常用格式的图像文件,并提供了置顶窗口的选项以便你在使用其它软件时也可以将参考图片固定在顶端。
|
菠萝看图是一个轻量图像查看器,允许你简单快捷的查看 JPEG, PNG, GIF, SVG, PSD, KRA, XCF, TGA, HDR, AVIF 等常用格式的图像文件,并提供了置顶窗口的选项以便你在使用其它软件时也可以将参考图片固定在顶端。
|
||||||
|
|
||||||
## 立即获取!
|
## 立即获取!
|
||||||
|
|
||||||
- [GitHub Release 页面](https://github.com/BLumia/pineapple-pictures/releases) | [gitee 发布页面](https://gitee.com/blumia/pineapple-pictures/releases)
|
### 由原作者维护
|
||||||
- [SourceForge](https://sourceforge.net/projects/pineapple-pictures/)
|
|
||||||
- Archlinux AUR: [pineapple-pictures](https://aur.archlinux.org/packages/pineapple-pictures/) | [pineapple-pictures-git](https://aur.archlinux.org/packages/pineapple-pictures-git/)
|
- [GitHub Release 页面](https://github.com/BLumia/pineapple-pictures/releases)
|
||||||
- Debian (自 bullseye 起) 或 Ubuntu (自 21.04 起): `sudo apt install pineapple-pictures`
|
- [SourceForge](https://sourceforge.net/projects/pineapple-pictures/)
|
||||||
- [Itch.io 商店](https://blumia.itch.io/pineapple-pictures)
|
- Archlinux AUR: [pineapple-pictures](https://aur.archlinux.org/packages/pineapple-pictures/) | [pineapple-pictures-git](https://aur.archlinux.org/packages/pineapple-pictures-git/)
|
||||||
|
- [Itch.io 商店](https://blumia.itch.io/pineapple-pictures)
|
||||||
## 帮助翻译!
|
- Flatpak (于 FlatHub): [net.blumia.pineapple-pictures](https://flathub.org/apps/net.blumia.pineapple-pictures) *([我应当使用 flatpak 版吗?](https://github.com/BLumia/pineapple-pictures/wiki/Container%E2%80%90based-Packaging-Solutions-Support))*
|
||||||
|
|
||||||
[在 Weblate 上帮助此项目翻译到更多语言!](https://hosted.weblate.org/projects/pineapple-pictures/)
|
### 由贡献者/对应发行版的打包人员维护
|
||||||
|
|
||||||
## 手动构建步骤:
|
[](https://repology.org/project/pineapple-pictures/versions)
|
||||||
|
|
||||||
当前状态,我们需要先确保如下依赖可用:
|
## 帮助翻译!
|
||||||
|
|
||||||
- `cmake`: 我们所使用的构建系统
|
[在 Weblate 上帮助此项目翻译到更多语言!](https://hosted.weblate.org/projects/pineapple-pictures/)
|
||||||
- 包含 `qt5-svg` 与 `qt5-tools` 组件的 `qt5`: 此应用基于 Qt
|
|
||||||
- `libexiv2`: 用以获取和显示更多的图像元信息(可选,推荐)
|
## 手动构建步骤:
|
||||||
|
|
||||||
然后我们就可以使用任何常规的 c++ 编译器如 g++ 或 msvc 来进行构建了
|
当前状态,我们需要先确保如下依赖可用:
|
||||||
|
|
||||||
构建过程就是常规的 CMake 应用构建过程:
|
- `cmake`: 我们所使用的构建系统
|
||||||
|
- 包含 `qt6-svg` 与 `qt6-tools` 组件的 `qt6`: 此应用基于 Qt
|
||||||
``` bash
|
- `libexiv2`: 用以获取和显示更多的图像元信息(可选,推荐)
|
||||||
$ mkdir build && cd build
|
|
||||||
$ cmake ..
|
然后我们就可以使用任何常规的 c++ 编译器如 g++ 或 msvc 来进行构建了
|
||||||
$ cmake --build . # 如果你使用 Makefile 作为 CMake 生成器,也可以直接简单的使用 `make`
|
|
||||||
```
|
构建过程就是常规的 CMake 应用构建过程:
|
||||||
|
|
||||||
完毕后,一个名为 `ppic` 的可执行程序即会被生成以供使用。您也可以选择通过使用 CMake 生成的 `install` 目标继续将其安装到您的设备上(假设您使用 Makefile,即可执行 `make install` 来进行安装)。构建步骤完毕后,您也可以使用 `cpack` 来对应用程序进行打包。
|
``` bash
|
||||||
|
$ mkdir build && cd build
|
||||||
当 `exiv2` 在构建时可用时,此项目将尝试使用其进行构建,若您不希望使用 `exiv2`,请传递 `-DEXIV2_METADATA_SUPPORT=OFF` 参数给 `cmake`。此项目在找不到 `exiv2` 时并不会使用 `exiv2`,`EXIV2_METADATA_SUPPORT` 选项可供尽管存在可用的 `exiv2` 但您明确不希望启用其支持时使用。
|
$ cmake ..
|
||||||
|
$ cmake --build . # 如果你使用 Makefile 作为 CMake 生成器,也可以直接简单的使用 `make`
|
||||||
此应用的图片格式支持依赖于 Qt 的 imageformats 插件,直接从您所用的发行版获取对应的图像格式插件即可。对于 Windows 用户,您可能需要手动构建和使用图像格式插件。下方给出了进一步的说明。
|
```
|
||||||
|
|
||||||
> **Note**
|
完毕后,一个名为 `ppic` 的可执行程序即会被生成以供使用。您也可以选择通过使用 CMake 生成的 `install` 目标继续将其安装到您的设备上(假设您使用 Makefile,即可执行 `make install` 来进行安装)。构建步骤完毕后,您也可以使用 `cpack` 来对应用程序进行打包。
|
||||||
> 尽管存在一个可用于 QMake 构建的 `pineapple-pictures.pro` 文件,但其仅供简单测试所用且其并不包含 `exiv2` 支持。使用 QMake 构建此项目是 **不受支持** 的,请尽可能考虑使用 CMake。
|
|
||||||
|
当 `exiv2` 在构建时可用时,此项目将尝试使用其进行构建,若您不希望使用 `exiv2`,请传递 `-DEXIV2_METADATA_SUPPORT=OFF` 参数给 `cmake`。此项目在找不到 `exiv2` 时并不会使用 `exiv2`,`EXIV2_METADATA_SUPPORT` 选项可供尽管存在可用的 `exiv2` 但您明确不希望启用其支持时使用。
|
||||||
### Linux
|
|
||||||
|
此应用的图片格式支持依赖于 Qt 的 imageformats 插件,直接从您所用的发行版获取对应的图像格式插件即可。对于 Windows 用户,您可能需要手动构建和使用图像格式插件。下方给出了进一步的说明。
|
||||||
常规的构建步骤即可完成构建,不需要额外的处理步骤 ;)
|
|
||||||
|
在 Windows、Linux 以及 macOS 系统均可构建此应用,其它有移植 Qt 支持的平台也可能可以进行构建。若要了解一些平台相关的构建指引,请参阅[相关的 Wiki 页面](https://github.com/BLumia/pineapple-pictures/wiki/Platform-Specific-Build-Instructions)。
|
||||||
对于 Archlinux 发行版的用户,这里还有一个 [PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=pineapple-pictures-git) 可供使用和参考。
|
|
||||||
|
> [!NOTE]
|
||||||
对于在基于 debian 的发行版中进行打包的需求, `CMakeLists.txt` 已经提供了一些基本的 cpack 配置以便生成一个有效的 `.deb` 软件包。在构建步骤完毕后,使用 `cpack -G DEB` 即可生成 DEB 软件包。您也可以参考 `.github/workflows/ubuntu.yml` 来查看当前正在使用的 CI 配置是如何进行打包的。
|
> 尽管存在一个可用于 QMake 构建的 `pineapple-pictures.pro` 文件,但其仅供简单测试所用且其并不包含 `exiv2` 支持。使用 QMake 构建此项目是 **不受支持** 的,请尽可能考虑使用 CMake。
|
||||||
|
|
||||||
目前,`DEB` 是当前唯一受到直接支持的 cpack 生成目标。若希望为此项目添加其它的 cpack 目标支持,欢迎发起合并请求。
|
## 许可协议
|
||||||
|
|
||||||
### Windows
|
菠萝看图整体使用 MIT 协议进行发布。项目所随的部分源文件可能具备不同但与之兼容的许可协议。
|
||||||
|
|
||||||
上述的构建步骤在 Windows 中也适用,但由于 Windows 中不具备类如大多 Linux 发行版中所提供的方便的软件包管理机制,故如果您需要任何 Qt 官方支持之外的图像格式例如 psd,xcf,kra 等格式的支持,你就可能需要自行获取并构建对应的 imageformats 插件,并在您最终生成的可执行文件中一并提供这些插件。若您不需要这些额外的图像格式支持,这个步骤也可以直接跳过。
|
|
||||||
|
|
||||||
我们所提供的预编译好的 Windows 程序包含了 kimageformats 插件来提供额外(kra, xcf, psd 等)格式的支持。您可以参考 `appveyor.yml` 来查看我们是如何构建并打包 Windows 可执行程序的。
|
|
||||||
|
|
||||||
[KDE Craft](https://community.kde.org/Craft) 环境也可以被用来构建此应用程序。我也创建了一个蓝图来进行此项目的构建和打包,可参见[这里](https://github.com/BearKidsTeam/craft-shmooprint-bkt)。尽管这不是我用于构建发布二进制所使用的方案,但仍值得一试。
|
|
||||||
|
|
||||||
### macOS
|
|
||||||
|
|
||||||
由于我没有 mac 设备,故 macOS 暂时不受任何支持。不过我们目前有一个 GitHub Action 来执行 macOS 环境下的构建(见 `.github/workflows/macos.yml`)所以至少 macOS 下是可以顺利进行构建的。如果您想完善对 macOS 的支持,也欢迎您创建合并请求 ;P
|
|
||||||
|
|
||||||
## 许可协议
|
|
||||||
|
|
||||||
菠萝看图整体使用 MIT 协议进行发布。项目所随的部分源文件可能具备不同但与之兼容的许可协议。
|
|
||||||
|
|||||||
33
REUSE.toml
Normal file
33
REUSE.toml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
version = 1
|
||||||
|
SPDX-PackageName = "Pineapple Pictures"
|
||||||
|
SPDX-PackageDownloadLocation = "https://github.com/BLumia/pineapple-pictures"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = [".gitattributes", ".git-blame-ignore-revs", ".gitignore", "appveyor.yml", ".github/**"]
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "None"
|
||||||
|
SPDX-License-Identifier = "CC0-1.0"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = ["README**.md", "NEWS", "assets/**.rc.in", "assets/**.qrc", "dist/**"]
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "None"
|
||||||
|
SPDX-License-Identifier = "CC0-1.0"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = ["app/translations/**.ts", "assets/plain/translators.html"]
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "Translators from hosted.weblate.org"
|
||||||
|
SPDX-License-Identifier = "MIT"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = "assets/icons/**.svg"
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "2022 Gary Wang"
|
||||||
|
SPDX-License-Identifier = "MIT"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = "assets/icons/app-icon.**"
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "2020 Lovelyblack"
|
||||||
|
SPDX-License-Identifier = "MIT"
|
||||||
@ -1,172 +1,181 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "aboutdialog.h"
|
#include "aboutdialog.h"
|
||||||
|
|
||||||
#include <QAbstractButton>
|
#include <QAbstractButton>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QTextBrowser>
|
#include <QTextBrowser>
|
||||||
#include <QTabWidget>
|
#include <QTabWidget>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
|
||||||
AboutDialog::AboutDialog(QWidget *parent)
|
using namespace Qt::Literals::StringLiterals;
|
||||||
: QDialog(parent)
|
|
||||||
, m_tabWidget(new QTabWidget)
|
AboutDialog::AboutDialog(QWidget *parent)
|
||||||
, m_buttonBox(new QDialogButtonBox)
|
: QDialog(parent)
|
||||||
, m_helpTextEdit(new QTextBrowser)
|
, m_tabWidget(new QTabWidget)
|
||||||
, m_aboutTextEdit(new QTextBrowser)
|
, m_buttonBox(new QDialogButtonBox)
|
||||||
, m_specialThanksTextEdit(new QTextBrowser)
|
, m_helpTextEdit(new QTextBrowser)
|
||||||
, m_licenseTextEdit(new QTextBrowser)
|
, m_aboutTextEdit(new QTextBrowser)
|
||||||
, m_3rdPartyLibsTextEdit(new QTextBrowser)
|
, m_specialThanksTextEdit(new QTextBrowser)
|
||||||
{
|
, m_licenseTextEdit(new QTextBrowser)
|
||||||
this->setWindowTitle(tr("About"));
|
, m_3rdPartyLibsTextEdit(new QTextBrowser)
|
||||||
|
{
|
||||||
const QStringList helpStr {
|
this->setWindowTitle(tr("About"));
|
||||||
QStringLiteral("<p>%1</p>").arg(tr("Launch application with image file path as argument to load the file.")),
|
|
||||||
QStringLiteral("<p>%1</p>").arg(tr("Drag and drop image file onto the window is also supported.")),
|
const QStringList helpStr {
|
||||||
QStringLiteral("<p>%1</p>").arg(tr("None of the operations in this application will alter the pictures on disk.")),
|
u"<p>%1</p>"_s.arg(tr("Launch application with image file path as argument to load the file.")),
|
||||||
QStringLiteral("<p>%1</p>").arg(tr("Context menu option explanation:")),
|
u"<p>%1</p>"_s.arg(tr("Drag and drop image file onto the window is also supported.")),
|
||||||
QStringLiteral("<ul>"),
|
u"<p>%1</p>"_s.arg(tr("None of the operations in this application will alter the pictures on disk.")),
|
||||||
// blumia: Chain two arg() here since it seems lupdate will remove one of them if we use
|
u"<p>%1</p>"_s.arg(tr("Context menu option explanation:")),
|
||||||
// the old `arg(QCoreApp::translate(), tr())` way, but it's worth to mention
|
u"<ul>"_s,
|
||||||
// `arg(QCoreApp::translate(), this->tr())` works, but lupdate will complain about the usage.
|
// blumia: Chain two arg() here since it seems lupdate will remove one of them if we use
|
||||||
QStringLiteral("<li><b>%1</b>:<br/>%2</li>")
|
// the old `arg(QCoreApp::translate(), tr())` way, but it's worth to mention
|
||||||
.arg(QCoreApplication::translate("MainWindow", "Stay on top"))
|
// `arg(QCoreApp::translate(), this->tr())` works, but lupdate will complain about the usage.
|
||||||
.arg(tr("Make window stay on top of all other windows.")),
|
u"<li><b>%1</b>:<br/>%2</li>"_s
|
||||||
QStringLiteral("<li><b>%1</b>:<br/>%2</li>")
|
.arg(QCoreApplication::translate("MainWindow", "Stay on top"))
|
||||||
.arg(QCoreApplication::translate("MainWindow", "Protected mode"))
|
.arg(tr("Make window stay on top of all other windows.")),
|
||||||
.arg(tr("Avoid close window accidentally. (eg. by double clicking the window)")),
|
u"<li><b>%1</b>:<br/>%2</li>"_s
|
||||||
QStringLiteral("</ul>")
|
.arg(QCoreApplication::translate("MainWindow", "Protected mode"))
|
||||||
};
|
.arg(tr("Avoid close window accidentally. (eg. by double clicking the window)")),
|
||||||
|
u"<li><b>%1</b>:<br/>%2</li>"_s
|
||||||
const QStringList aboutStr {
|
.arg(QCoreApplication::translate("MainWindow", "Keep transformation", "The 'transformation' means the flip/rotation status that currently applied to the image view"))
|
||||||
QStringLiteral("<center><img width='128' height='128' src=':/icons/app-icon.svg'/><br/>"),
|
.arg(tr("Avoid resetting the zoom/rotation/flip state that was applied to the image view when switching between images.")),
|
||||||
qApp->applicationDisplayName(),
|
u"</ul>"_s
|
||||||
#ifdef GIT_DESCRIBE_VERSION_STRING
|
};
|
||||||
(QStringLiteral("<br/>") + tr("Version: %1").arg(GIT_DESCRIBE_VERSION_STRING)),
|
|
||||||
#endif // GIT_DESCRIBE_VERSION_STRING
|
const QStringList aboutStr {
|
||||||
QStringLiteral("<hr/>"),
|
u"<center><img width='128' height='128' src=':/icons/app-icon.svg'/><br/>"_s,
|
||||||
tr("Copyright (c) %1 %2", "%1 is year, %2 is the name of copyright holder(s)")
|
qApp->applicationDisplayName(),
|
||||||
.arg(QStringLiteral("2022"), QStringLiteral("<a href='https://github.com/BLumia'>@BLumia</a>")),
|
(u"<br/>"_s + tr("Version: %1").arg(
|
||||||
QStringLiteral("<br/>"),
|
#ifdef GIT_DESCRIBE_VERSION_STRING
|
||||||
tr("Logo designed by %1").arg(QStringLiteral("<a href='https://github.com/Lovelyblack'>@Lovelyblack</a>")),
|
GIT_DESCRIBE_VERSION_STRING
|
||||||
QStringLiteral("<hr/>"),
|
#else
|
||||||
tr("Built with Qt %1 (%2)").arg(QT_VERSION_STR, QSysInfo::buildCpuArchitecture()),
|
qApp->applicationVersion()
|
||||||
QStringLiteral("<br/><a href='%1'>%2</a>").arg("https://github.com/BLumia/pineapple-pictures", tr("Source code")),
|
#endif // GIT_DESCRIBE_VERSION_STRING
|
||||||
QStringLiteral("</center>")
|
)),
|
||||||
};
|
u"<hr/>"_s,
|
||||||
|
tr("Copyright (c) %1 %2", "%1 is year, %2 is the name of copyright holder(s)")
|
||||||
QFile translaterHtml(":/plain/translators.html");
|
.arg(u"2025"_s, u"<a href='https://github.com/BLumia'>@BLumia</a>"_s),
|
||||||
bool canOpenFile = translaterHtml.open(QIODevice::ReadOnly);
|
u"<br/>"_s,
|
||||||
const QByteArray & translatorList = canOpenFile ? translaterHtml.readAll() : "";
|
tr("Logo designed by %1").arg(u"<a href='https://github.com/Lovelyblack'>@Lovelyblack</a>"_s),
|
||||||
|
u"<hr/>"_s,
|
||||||
const QStringList specialThanksStr {
|
tr("Built with Qt %1 (%2)").arg(QT_VERSION_STR, QSysInfo::buildCpuArchitecture()),
|
||||||
QStringLiteral("<h1 align='center'>%1</h1><a href='%2'>%3</a><p>%4</p>").arg(
|
QStringLiteral("<br/><a href='%1'>%2</a>").arg("https://github.com/BLumia/pineapple-pictures", tr("Source code")),
|
||||||
tr("Contributors"),
|
u"</center>"_s
|
||||||
QStringLiteral("https://github.com/BLumia/pineapple-pictures/graphs/contributors"),
|
};
|
||||||
tr("List of contributors on GitHub"),
|
|
||||||
tr("Thanks to all people who contributed to this project.")
|
QFile translaterHtml(u":/plain/translators.html"_s);
|
||||||
),
|
bool canOpenFile = translaterHtml.open(QIODevice::ReadOnly);
|
||||||
|
const QByteArray & translatorList = canOpenFile ? translaterHtml.readAll() : QByteArrayLiteral("");
|
||||||
QStringLiteral("<h1 align='center'>%1</h1><p>%2</p>%3").arg(
|
|
||||||
tr("Translators"),
|
const QStringList specialThanksStr {
|
||||||
tr("I would like to thank the following people who volunteered to translate this application."),
|
u"<h1 align='center'>%1</h1><a href='%2'>%3</a><p>%4</p>"_s.arg(
|
||||||
translatorList
|
tr("Contributors"),
|
||||||
)
|
u"https://github.com/BLumia/pineapple-pictures/graphs/contributors"_s,
|
||||||
};
|
tr("List of contributors on GitHub"),
|
||||||
|
tr("Thanks to all people who contributed to this project.")
|
||||||
const QStringList licenseStr {
|
),
|
||||||
QStringLiteral("<h1 align='center'><b>%1</b></h1>").arg(tr("Your Rights")),
|
|
||||||
QStringLiteral("<p>%1</p><p>%2</p><ul><li>%3</li><li>%4</li><li>%5</li><li>%6</li></ul>").arg(
|
u"<h1 align='center'>%1</h1><p>%2</p>%3"_s.arg(
|
||||||
tr("%1 is released under the MIT License."), // %1
|
tr("Translators"),
|
||||||
tr("This license grants people a number of freedoms:"), // %2
|
tr("I would like to thank the following people who volunteered to translate this application."),
|
||||||
tr("You are free to use %1, for any purpose"), // %3
|
translatorList
|
||||||
tr("You are free to distribute %1"), // %4
|
)
|
||||||
tr("You can study how %1 works and change it"), // %5
|
};
|
||||||
tr("You can distribute changed versions of %1") // %6
|
|
||||||
).arg(QStringLiteral("<i>%1</i>")),
|
const QStringList licenseStr {
|
||||||
QStringLiteral("<p>%1</p>").arg(tr("The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.")),
|
u"<h1 align='center'><b>%1</b></h1>"_s.arg(tr("Your Rights")),
|
||||||
QStringLiteral("<hr/><pre>%2</pre>")
|
u"<p>%1</p><p>%2</p><ul><li>%3</li><li>%4</li><li>%5</li><li>%6</li></ul>"_s.arg(
|
||||||
};
|
tr("%1 is released under the MIT License."), // %1
|
||||||
|
tr("This license grants people a number of freedoms:"), // %2
|
||||||
const QString mitLicense(QStringLiteral(R"(Expat/MIT License
|
tr("You are free to use %1, for any purpose"), // %3
|
||||||
|
tr("You are free to distribute %1"), // %4
|
||||||
Copyright (c) 2020 BLumia
|
tr("You can study how %1 works and change it"), // %5
|
||||||
|
tr("You can distribute changed versions of %1") // %6
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
).arg(u"<i>%1</i>"_s),
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
u"<p>%1</p>"_s.arg(tr("The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.")),
|
||||||
in the Software without restriction, including without limitation the rights
|
u"<hr/><pre>%2</pre>"_s
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
};
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
const QString mitLicense(QStringLiteral(R"(Expat/MIT License
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
Copyright (c) 2025 BLumia
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
in the Software without restriction, including without limitation the rights
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
furnished to do so, subject to the following conditions:
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
The above copyright notice and this permission notice shall be included in all
|
||||||
)"));
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
const QStringList thirdPartyLibsStr {
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
QStringLiteral("<h1 align='center'><b>%1</b></h1>").arg(tr("Third-party Libraries used by %1")),
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
tr("%1 is built on the following free software libraries:", "Free as in freedom"),
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
QStringLiteral("<ul>"),
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
#ifdef HAVE_EXIV2_VERSION
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
QStringLiteral("<li><a href='%1'>%2</a>: %3</li>").arg("https://www.exiv2.org/", "Exiv2", "GPLv2"),
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
#endif // EXIV2_VERSION
|
SOFTWARE.
|
||||||
QStringLiteral("<li><a href='%1'>%2</a>: %3</li>").arg("https://www.qt.io/", "Qt", "GPLv2 + GPLv3 + LGPLv2.1 + LGPLv3"),
|
)"));
|
||||||
QStringLiteral("</ul>")
|
|
||||||
};
|
const QStringList thirdPartyLibsStr {
|
||||||
|
u"<h1 align='center'><b>%1</b></h1>"_s.arg(tr("Third-party Libraries used by %1")),
|
||||||
m_helpTextEdit->setText(helpStr.join('\n'));
|
tr("%1 is built on the following free software libraries:", "Free as in freedom"),
|
||||||
|
u"<ul>"_s,
|
||||||
m_aboutTextEdit->setText(aboutStr.join('\n'));
|
#ifdef HAVE_EXIV2_VERSION
|
||||||
m_aboutTextEdit->setOpenExternalLinks(true);
|
u"<li><a href='%1'>%2</a>: %3</li>"_s.arg("https://www.exiv2.org/", "Exiv2", "GPLv2"),
|
||||||
|
#endif // EXIV2_VERSION
|
||||||
m_specialThanksTextEdit->setText(specialThanksStr.join('\n'));
|
u"<li><a href='%1'>%2</a>: %3</li>"_s.arg("https://www.qt.io/", "Qt", "GPLv2 + GPLv3 + LGPLv2.1 + LGPLv3"),
|
||||||
m_specialThanksTextEdit->setOpenExternalLinks(true);
|
u"</ul>"_s
|
||||||
|
};
|
||||||
m_licenseTextEdit->setText(licenseStr.join('\n').arg(qApp->applicationDisplayName(), mitLicense));
|
|
||||||
|
m_helpTextEdit->setText(helpStr.join('\n'));
|
||||||
m_3rdPartyLibsTextEdit->setText(thirdPartyLibsStr.join('\n').arg(QStringLiteral("<i>%1</i>").arg(qApp->applicationDisplayName())));
|
|
||||||
m_3rdPartyLibsTextEdit->setOpenExternalLinks(true);
|
m_aboutTextEdit->setText(aboutStr.join('\n'));
|
||||||
|
m_aboutTextEdit->setOpenExternalLinks(true);
|
||||||
m_tabWidget->addTab(m_helpTextEdit, tr("&Help"));
|
|
||||||
m_tabWidget->addTab(m_aboutTextEdit, tr("&About"));
|
m_specialThanksTextEdit->setText(specialThanksStr.join('\n'));
|
||||||
m_tabWidget->addTab(m_specialThanksTextEdit, tr("&Special Thanks"));
|
m_specialThanksTextEdit->setOpenExternalLinks(true);
|
||||||
m_tabWidget->addTab(m_licenseTextEdit, tr("&License"));
|
|
||||||
m_tabWidget->addTab(m_3rdPartyLibsTextEdit, tr("&Third-party Libraries"));
|
m_licenseTextEdit->setText(licenseStr.join('\n').arg(qApp->applicationDisplayName(), mitLicense));
|
||||||
|
|
||||||
m_buttonBox->setStandardButtons(QDialogButtonBox::Close);
|
m_3rdPartyLibsTextEdit->setText(thirdPartyLibsStr.join('\n').arg(u"<i>%1</i>"_s).arg(qApp->applicationDisplayName()));
|
||||||
connect(m_buttonBox, QOverload<QAbstractButton *>::of(&QDialogButtonBox::clicked), this, [this](){
|
m_3rdPartyLibsTextEdit->setOpenExternalLinks(true);
|
||||||
this->close();
|
|
||||||
});
|
m_tabWidget->addTab(m_helpTextEdit, tr("&Help"));
|
||||||
|
m_tabWidget->addTab(m_aboutTextEdit, tr("&About"));
|
||||||
setLayout(new QVBoxLayout);
|
m_tabWidget->addTab(m_specialThanksTextEdit, tr("&Special Thanks"));
|
||||||
|
m_tabWidget->addTab(m_licenseTextEdit, tr("&License"));
|
||||||
layout()->addWidget(m_tabWidget);
|
m_tabWidget->addTab(m_3rdPartyLibsTextEdit, tr("&Third-party Libraries"));
|
||||||
layout()->addWidget(m_buttonBox);
|
|
||||||
|
m_buttonBox->setStandardButtons(QDialogButtonBox::Close);
|
||||||
setMinimumSize(361, 161); // not sure why it complain "Unable to set geometry"
|
connect(m_buttonBox, QOverload<QAbstractButton *>::of(&QDialogButtonBox::clicked), this, [this](){
|
||||||
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
this->close();
|
||||||
}
|
});
|
||||||
|
|
||||||
AboutDialog::~AboutDialog()
|
setLayout(new QVBoxLayout);
|
||||||
{
|
|
||||||
|
layout()->addWidget(m_tabWidget);
|
||||||
}
|
layout()->addWidget(m_buttonBox);
|
||||||
|
|
||||||
QSize AboutDialog::sizeHint() const
|
setMinimumSize(361, 161); // not sure why it complain "Unable to set geometry"
|
||||||
{
|
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
||||||
return QSize(520, 350);
|
}
|
||||||
}
|
|
||||||
|
AboutDialog::~AboutDialog()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize AboutDialog::sizeHint() const
|
||||||
|
{
|
||||||
|
return QSize(520, 350);
|
||||||
|
}
|
||||||
|
|||||||
@ -1,36 +1,36 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#ifndef ABOUTDIALOG_H
|
#ifndef ABOUTDIALOG_H
|
||||||
#define ABOUTDIALOG_H
|
#define ABOUTDIALOG_H
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QTextBrowser;
|
class QTextBrowser;
|
||||||
class QTabWidget;
|
class QTabWidget;
|
||||||
class QDialogButtonBox;
|
class QDialogButtonBox;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
class AboutDialog : public QDialog
|
class AboutDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit AboutDialog(QWidget *parent = nullptr);
|
explicit AboutDialog(QWidget *parent = nullptr);
|
||||||
~AboutDialog() override;
|
~AboutDialog() override;
|
||||||
|
|
||||||
QSize sizeHint() const override;
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QTabWidget * m_tabWidget = nullptr;
|
QTabWidget * m_tabWidget = nullptr;
|
||||||
QDialogButtonBox * m_buttonBox = nullptr;
|
QDialogButtonBox * m_buttonBox = nullptr;
|
||||||
|
|
||||||
QTextBrowser * m_helpTextEdit = nullptr;
|
QTextBrowser * m_helpTextEdit = nullptr;
|
||||||
QTextBrowser * m_aboutTextEdit = nullptr;
|
QTextBrowser * m_aboutTextEdit = nullptr;
|
||||||
QTextBrowser * m_specialThanksTextEdit = nullptr;
|
QTextBrowser * m_specialThanksTextEdit = nullptr;
|
||||||
QTextBrowser * m_licenseTextEdit = nullptr;
|
QTextBrowser * m_licenseTextEdit = nullptr;
|
||||||
QTextBrowser * m_3rdPartyLibsTextEdit = nullptr;
|
QTextBrowser * m_3rdPartyLibsTextEdit = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ABOUTDIALOG_H
|
#endif // ABOUTDIALOG_H
|
||||||
|
|||||||
@ -1,148 +1,155 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "actionmanager.h"
|
#include "actionmanager.h"
|
||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include <QSvgRenderer>
|
#include <QSvgRenderer>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
#define ICON_NAME(name)\
|
#define ICON_NAME(name)\
|
||||||
QStringLiteral(":/icons/" #name ".svg")
|
QStringLiteral(":/icons/" #name ".svg")
|
||||||
|
|
||||||
#define ACTION_NAME(s) QStringLiteral(STRIFY(s))
|
#define ACTION_NAME(s) QStringLiteral(STRIFY(s))
|
||||||
#define STRIFY(s) #s
|
#define STRIFY(s) #s
|
||||||
|
|
||||||
ActionManager::ActionManager()
|
QIcon ActionManager::loadHidpiIcon(const QString &resp, QSize sz)
|
||||||
{
|
{
|
||||||
|
QSvgRenderer r(resp);
|
||||||
}
|
QPixmap pm = QPixmap(sz * qApp->devicePixelRatio());
|
||||||
|
pm.fill(Qt::transparent);
|
||||||
ActionManager::~ActionManager()
|
QPainter p(&pm);
|
||||||
{
|
r.render(&p);
|
||||||
|
pm.setDevicePixelRatio(qApp->devicePixelRatio());
|
||||||
}
|
return QIcon(pm);
|
||||||
|
}
|
||||||
QIcon ActionManager::loadHidpiIcon(const QString &resp, QSize sz)
|
|
||||||
{
|
void ActionManager::setupAction(MainWindow *mainWindow)
|
||||||
QSvgRenderer r(resp);
|
{
|
||||||
QPixmap pm = QPixmap(sz * qApp->devicePixelRatio());
|
auto create_action = [] (QWidget *w, QAction **a, QString i, QString an, bool iconFromTheme = false) {
|
||||||
pm.fill(Qt::transparent);
|
*a = new QAction(w);
|
||||||
QPainter p(&pm);
|
if (!i.isNull())
|
||||||
r.render(&p);
|
(*a)->setIcon(iconFromTheme ? QIcon::fromTheme(i) : ActionManager::loadHidpiIcon(i));
|
||||||
pm.setDevicePixelRatio(qApp->devicePixelRatio());
|
(*a)->setObjectName(an);
|
||||||
return QIcon(pm);
|
w->addAction(*a);
|
||||||
}
|
};
|
||||||
|
#define CREATE_NEW_ICON_ACTION(w, a, i) create_action(w, &a, ICON_NAME(i), ACTION_NAME(a))
|
||||||
void ActionManager::setupAction(MainWindow *mainWindow)
|
CREATE_NEW_ICON_ACTION(mainWindow, actionActualSize, zoom-original);
|
||||||
{
|
CREATE_NEW_ICON_ACTION(mainWindow, actionToggleMaximize, view-fullscreen);
|
||||||
auto create_action = [] (QWidget *w, QAction **a, QString i, QString an) {
|
CREATE_NEW_ICON_ACTION(mainWindow, actionZoomIn, zoom-in);
|
||||||
*a = new QAction(w);
|
CREATE_NEW_ICON_ACTION(mainWindow, actionZoomOut, zoom-out);
|
||||||
if (!i.isNull())
|
CREATE_NEW_ICON_ACTION(mainWindow, actionToggleCheckerboard, view-background-checkerboard);
|
||||||
(*a)->setIcon(ActionManager::loadHidpiIcon(i));
|
CREATE_NEW_ICON_ACTION(mainWindow, actionRotateClockwise, object-rotate-right);
|
||||||
(*a)->setObjectName(an);
|
#undef CREATE_NEW_ICON_ACTION
|
||||||
w->addAction(*a);
|
|
||||||
};
|
#define CREATE_NEW_ACTION(w, a) create_action(w, &a, QString(), ACTION_NAME(a))
|
||||||
#define CREATE_NEW_ICON_ACTION(w, a, i) create_action(w, &a, ICON_NAME(i), ACTION_NAME(a))
|
#define CREATE_NEW_THEMEICON_ACTION(w, a, i) create_action(w, &a, QLatin1String(STRIFY(i)), ACTION_NAME(a), true)
|
||||||
CREATE_NEW_ICON_ACTION(mainWindow, actionActualSize, zoom-original);
|
CREATE_NEW_ACTION(mainWindow, actionRotateCounterClockwise);
|
||||||
CREATE_NEW_ICON_ACTION(mainWindow, actionToggleMaximize, view-fullscreen);
|
CREATE_NEW_ACTION(mainWindow, actionPrevPicture);
|
||||||
CREATE_NEW_ICON_ACTION(mainWindow, actionZoomIn, zoom-in);
|
CREATE_NEW_ACTION(mainWindow, actionNextPicture);
|
||||||
CREATE_NEW_ICON_ACTION(mainWindow, actionZoomOut, zoom-out);
|
|
||||||
CREATE_NEW_ICON_ACTION(mainWindow, actionToggleCheckerboard, view-background-checkerboard);
|
CREATE_NEW_ACTION(mainWindow, actionTogglePauseAnimation);
|
||||||
CREATE_NEW_ICON_ACTION(mainWindow, actionRotateClockwise, object-rotate-right);
|
CREATE_NEW_ACTION(mainWindow, actionAnimationNextFrame);
|
||||||
#undef CREATE_NEW_ICON_ACTION
|
|
||||||
|
CREATE_NEW_THEMEICON_ACTION(mainWindow, actionOpen, document-open);
|
||||||
#define CREATE_NEW_ACTION(w, a) create_action(w, &a, QString(), ACTION_NAME(a))
|
CREATE_NEW_ACTION(mainWindow, actionHorizontalFlip);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionPrevPicture);
|
CREATE_NEW_ACTION(mainWindow, actionFitInView);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionNextPicture);
|
CREATE_NEW_ACTION(mainWindow, actionFitByWidth);
|
||||||
|
CREATE_NEW_ACTION(mainWindow, actionFitLongImage);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionOpen);
|
CREATE_NEW_THEMEICON_ACTION(mainWindow, actionCopyPixmap, edit-copy);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionHorizontalFlip);
|
CREATE_NEW_ACTION(mainWindow, actionCopyFilePath);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionFitInView);
|
CREATE_NEW_THEMEICON_ACTION(mainWindow, actionPaste, edit-paste);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionFitByWidth);
|
CREATE_NEW_THEMEICON_ACTION(mainWindow, actionTrash, edit-delete);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionCopyPixmap);
|
CREATE_NEW_ACTION(mainWindow, actionToggleStayOnTop);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionCopyFilePath);
|
CREATE_NEW_ACTION(mainWindow, actionToggleProtectMode);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionPaste);
|
CREATE_NEW_ACTION(mainWindow, actionToggleAvoidResetTransform);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionToggleStayOnTop);
|
CREATE_NEW_ACTION(mainWindow, actionSettings);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionToggleProtectMode);
|
CREATE_NEW_THEMEICON_ACTION(mainWindow, actionHelp, system-help);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionSettings);
|
CREATE_NEW_THEMEICON_ACTION(mainWindow, actionLocateInFileManager, system-file-manager);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionHelp);
|
CREATE_NEW_THEMEICON_ACTION(mainWindow, actionProperties, document-properties);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionLocateInFileManager);
|
CREATE_NEW_ACTION(mainWindow, actionQuitApp);
|
||||||
CREATE_NEW_ACTION(mainWindow, actionProperties);
|
#undef CREATE_NEW_ACTION
|
||||||
CREATE_NEW_ACTION(mainWindow, actionQuitApp);
|
#undef CREATE_NEW_THEMEICON_ACTION
|
||||||
#undef CREATE_NEW_ACTION
|
|
||||||
|
retranslateUi(mainWindow);
|
||||||
retranslateUi(mainWindow);
|
|
||||||
|
QMetaObject::connectSlotsByName(mainWindow);
|
||||||
QMetaObject::connectSlotsByName(mainWindow);
|
}
|
||||||
}
|
|
||||||
|
void ActionManager::retranslateUi(MainWindow *mainWindow)
|
||||||
void ActionManager::retranslateUi(MainWindow *mainWindow)
|
{
|
||||||
{
|
Q_UNUSED(mainWindow);
|
||||||
Q_UNUSED(mainWindow);
|
|
||||||
|
actionOpen->setText(QCoreApplication::translate("MainWindow", "&Open...", nullptr));
|
||||||
actionOpen->setText(QCoreApplication::translate("MainWindow", "&Open...", nullptr));
|
|
||||||
|
actionActualSize->setText(QCoreApplication::translate("MainWindow", "Actual size", nullptr));
|
||||||
actionActualSize->setText(QCoreApplication::translate("MainWindow", "Actual size", nullptr));
|
actionToggleMaximize->setText(QCoreApplication::translate("MainWindow", "Toggle maximize", nullptr));
|
||||||
actionToggleMaximize->setText(QCoreApplication::translate("MainWindow", "Toggle maximize", nullptr));
|
actionZoomIn->setText(QCoreApplication::translate("MainWindow", "Zoom in", nullptr));
|
||||||
actionZoomIn->setText(QCoreApplication::translate("MainWindow", "Zoom in", nullptr));
|
actionZoomOut->setText(QCoreApplication::translate("MainWindow", "Zoom out", nullptr));
|
||||||
actionZoomOut->setText(QCoreApplication::translate("MainWindow", "Zoom out", nullptr));
|
actionToggleCheckerboard->setText(QCoreApplication::translate("MainWindow", "Toggle Checkerboard", nullptr));
|
||||||
actionToggleCheckerboard->setText(QCoreApplication::translate("MainWindow", "Toggle Checkerboard", nullptr));
|
actionRotateClockwise->setText(QCoreApplication::translate("MainWindow", "Rotate right", nullptr));
|
||||||
actionRotateClockwise->setText(QCoreApplication::translate("MainWindow", "Rotate right", nullptr));
|
actionRotateCounterClockwise->setText(QCoreApplication::translate("MainWindow", "Rotate left", nullptr));
|
||||||
|
|
||||||
actionPrevPicture->setText(QCoreApplication::translate("MainWindow", "Previous image", nullptr));
|
actionPrevPicture->setText(QCoreApplication::translate("MainWindow", "Previous image", nullptr));
|
||||||
actionNextPicture->setText(QCoreApplication::translate("MainWindow", "Next image", nullptr));
|
actionNextPicture->setText(QCoreApplication::translate("MainWindow", "Next image", nullptr));
|
||||||
|
|
||||||
actionHorizontalFlip->setText(QCoreApplication::translate("MainWindow", "Flip &Horizontally", nullptr));
|
actionTogglePauseAnimation->setText(QCoreApplication::translate("MainWindow", "Pause/Resume Animation", nullptr));
|
||||||
actionFitInView->setText("Fit in view"); // TODO: what should it called?
|
actionAnimationNextFrame->setText(QCoreApplication::translate("MainWindow", "Animation Go to Next Frame", nullptr));
|
||||||
actionFitByWidth->setText("Fit by width"); // TODO: what should it called?
|
|
||||||
actionCopyPixmap->setText(QCoreApplication::translate("MainWindow", "Copy P&ixmap", nullptr));
|
actionHorizontalFlip->setText(QCoreApplication::translate("MainWindow", "Flip &Horizontally", nullptr));
|
||||||
actionCopyFilePath->setText(QCoreApplication::translate("MainWindow", "Copy &File Path", nullptr));
|
actionFitInView->setText(QCoreApplication::translate("MainWindow", "Fit to view", nullptr));
|
||||||
actionPaste->setText(QCoreApplication::translate("MainWindow", "&Paste", nullptr));
|
actionFitByWidth->setText(QCoreApplication::translate("MainWindow", "Fit to width", nullptr));
|
||||||
actionToggleStayOnTop->setText(QCoreApplication::translate("MainWindow", "Stay on top", nullptr));
|
actionFitLongImage->setText(QCoreApplication::translate("MainWindow", "Fit long image", nullptr));
|
||||||
actionToggleProtectMode->setText(QCoreApplication::translate("MainWindow", "Protected mode", nullptr));
|
actionCopyPixmap->setText(QCoreApplication::translate("MainWindow", "Copy P&ixmap", nullptr));
|
||||||
actionSettings->setText(QCoreApplication::translate("MainWindow", "Configure...", nullptr));
|
actionCopyFilePath->setText(QCoreApplication::translate("MainWindow", "Copy &File Path", nullptr));
|
||||||
actionHelp->setText(QCoreApplication::translate("MainWindow", "Help", nullptr));
|
actionPaste->setText(QCoreApplication::translate("MainWindow", "&Paste", nullptr));
|
||||||
#ifdef Q_OS_WIN
|
actionTrash->setText(QCoreApplication::translate("MainWindow", "Move to Trash", nullptr));
|
||||||
actionLocateInFileManager->setText(
|
actionToggleStayOnTop->setText(QCoreApplication::translate("MainWindow", "Stay on top", nullptr));
|
||||||
QCoreApplication::translate(
|
actionToggleProtectMode->setText(QCoreApplication::translate("MainWindow", "Protected mode", nullptr));
|
||||||
"MainWindow", "Show in File Explorer",
|
actionToggleAvoidResetTransform->setText(QCoreApplication::translate("MainWindow", "Keep transformation", "The 'transformation' means the flip/rotation status that currently applied to the image view"));
|
||||||
"File Explorer is the name of explorer.exe under Windows"
|
actionSettings->setText(QCoreApplication::translate("MainWindow", "Configure...", nullptr));
|
||||||
)
|
actionHelp->setText(QCoreApplication::translate("MainWindow", "Help", nullptr));
|
||||||
);
|
#ifdef Q_OS_WIN
|
||||||
#else
|
actionLocateInFileManager->setText(
|
||||||
actionLocateInFileManager->setText(QCoreApplication::translate("MainWindow", "Show in directory", nullptr));
|
QCoreApplication::translate(
|
||||||
#endif // Q_OS_WIN
|
"MainWindow", "Show in File Explorer",
|
||||||
actionProperties->setText(QCoreApplication::translate("MainWindow", "Properties", nullptr));
|
"File Explorer is the name of explorer.exe under Windows"
|
||||||
actionQuitApp->setText(QCoreApplication::translate("MainWindow", "Quit", nullptr));
|
)
|
||||||
}
|
);
|
||||||
|
#else
|
||||||
void ActionManager::setupShortcuts()
|
actionLocateInFileManager->setText(QCoreApplication::translate("MainWindow", "Show in directory", nullptr));
|
||||||
{
|
#endif // Q_OS_WIN
|
||||||
actionOpen->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_O));
|
actionProperties->setText(QCoreApplication::translate("MainWindow", "Properties", nullptr));
|
||||||
actionActualSize->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0));
|
actionQuitApp->setText(QCoreApplication::translate("MainWindow", "Quit", nullptr));
|
||||||
actionZoomIn->setShortcut(QKeySequence(QKeySequence::ZoomIn));
|
}
|
||||||
actionZoomOut->setShortcut(QKeySequence(QKeySequence::ZoomOut));
|
|
||||||
actionPrevPicture->setShortcuts({
|
void ActionManager::setupShortcuts()
|
||||||
QKeySequence(Qt::Key_PageUp),
|
{
|
||||||
QKeySequence(Qt::Key_Left),
|
actionOpen->setShortcut(QKeySequence::Open);
|
||||||
});
|
actionActualSize->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0));
|
||||||
actionNextPicture->setShortcuts({
|
actionZoomIn->setShortcut(QKeySequence::ZoomIn);
|
||||||
QKeySequence(Qt::Key_PageDown),
|
actionZoomOut->setShortcut(QKeySequence::ZoomOut);
|
||||||
QKeySequence(Qt::Key_Right),
|
actionPrevPicture->setShortcuts({
|
||||||
});
|
QKeySequence(Qt::Key_PageUp),
|
||||||
actionHorizontalFlip->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_R));
|
QKeySequence(Qt::Key_Left),
|
||||||
actionCopyPixmap->setShortcut(QKeySequence(QKeySequence::Copy));
|
});
|
||||||
actionPaste->setShortcut(QKeySequence::Paste);
|
actionNextPicture->setShortcuts({
|
||||||
actionHelp->setShortcut(QKeySequence::HelpContents);
|
QKeySequence(Qt::Key_PageDown),
|
||||||
actionSettings->setShortcut(QKeySequence::Preferences);
|
QKeySequence(Qt::Key_Right),
|
||||||
actionProperties->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_I));
|
});
|
||||||
actionQuitApp->setShortcuts({
|
actionHorizontalFlip->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_R));
|
||||||
QKeySequence(Qt::Key_Space),
|
actionCopyPixmap->setShortcut(QKeySequence::Copy);
|
||||||
QKeySequence(Qt::Key_Escape)
|
actionPaste->setShortcut(QKeySequence::Paste);
|
||||||
});
|
actionTrash->setShortcut(QKeySequence::Delete);
|
||||||
}
|
actionHelp->setShortcut(QKeySequence::HelpContents);
|
||||||
|
actionSettings->setShortcut(QKeySequence::Preferences);
|
||||||
|
actionProperties->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_I));
|
||||||
|
actionQuitApp->setShortcuts({
|
||||||
|
QKeySequence(Qt::Key_Space),
|
||||||
|
QKeySequence(Qt::Key_Escape)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,52 +1,59 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#ifndef ACTIONMANAGER_H
|
#ifndef ACTIONMANAGER_H
|
||||||
#define ACTIONMANAGER_H
|
#define ACTIONMANAGER_H
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
|
|
||||||
class ActionManager
|
class ActionManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ActionManager();
|
explicit ActionManager() = default;
|
||||||
~ActionManager();
|
~ActionManager() = default;
|
||||||
|
|
||||||
void setupAction(MainWindow * mainWindow);
|
void setupAction(MainWindow * mainWindow);
|
||||||
void retranslateUi(MainWindow *MainWindow);
|
void retranslateUi(MainWindow *MainWindow);
|
||||||
void setupShortcuts();
|
void setupShortcuts();
|
||||||
|
|
||||||
static QIcon loadHidpiIcon(const QString &resp, QSize sz = QSize(32, 32));
|
static QIcon loadHidpiIcon(const QString &resp, QSize sz = QSize(32, 32));
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QAction *actionOpen;
|
QAction *actionOpen;
|
||||||
|
|
||||||
QAction *actionActualSize;
|
QAction *actionActualSize;
|
||||||
QAction *actionToggleMaximize;
|
QAction *actionToggleMaximize;
|
||||||
QAction *actionZoomIn;
|
QAction *actionZoomIn;
|
||||||
QAction *actionZoomOut;
|
QAction *actionZoomOut;
|
||||||
QAction *actionToggleCheckerboard;
|
QAction *actionToggleCheckerboard;
|
||||||
QAction *actionRotateClockwise;
|
QAction *actionRotateClockwise;
|
||||||
|
QAction *actionRotateCounterClockwise;
|
||||||
QAction *actionPrevPicture;
|
|
||||||
QAction *actionNextPicture;
|
QAction *actionPrevPicture;
|
||||||
|
QAction *actionNextPicture;
|
||||||
QAction *actionHorizontalFlip;
|
|
||||||
QAction *actionFitInView;
|
QAction *actionTogglePauseAnimation;
|
||||||
QAction *actionFitByWidth;
|
QAction *actionAnimationNextFrame;
|
||||||
QAction *actionCopyPixmap;
|
|
||||||
QAction *actionCopyFilePath;
|
QAction *actionHorizontalFlip;
|
||||||
QAction *actionPaste;
|
QAction *actionFitInView;
|
||||||
QAction *actionToggleStayOnTop;
|
QAction *actionFitByWidth;
|
||||||
QAction *actionToggleProtectMode;
|
QAction *actionFitLongImage;
|
||||||
QAction *actionSettings;
|
QAction *actionCopyPixmap;
|
||||||
QAction *actionHelp;
|
QAction *actionCopyFilePath;
|
||||||
QAction *actionLocateInFileManager;
|
QAction *actionPaste;
|
||||||
QAction *actionProperties;
|
QAction *actionTrash;
|
||||||
QAction *actionQuitApp;
|
QAction *actionToggleStayOnTop;
|
||||||
};
|
QAction *actionToggleProtectMode;
|
||||||
|
QAction *actionToggleAvoidResetTransform;
|
||||||
#endif // ACTIONMANAGER_H
|
QAction *actionSettings;
|
||||||
|
QAction *actionHelp;
|
||||||
|
QAction *actionLocateInFileManager;
|
||||||
|
QAction *actionProperties;
|
||||||
|
QAction *actionQuitApp;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ACTIONMANAGER_H
|
||||||
|
|||||||
@ -1,59 +1,57 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "bottombuttongroup.h"
|
#include "bottombuttongroup.h"
|
||||||
|
|
||||||
#include "opacityhelper.h"
|
#include "opacityhelper.h"
|
||||||
|
|
||||||
#include <functional>
|
#include <QToolButton>
|
||||||
|
#include <QVBoxLayout>
|
||||||
#include <QToolButton>
|
#include <QDebug>
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QDebug>
|
BottomButtonGroup::BottomButtonGroup(const std::vector<QAction *> &actionList, QWidget *parent)
|
||||||
|
: QGroupBox (parent)
|
||||||
BottomButtonGroup::BottomButtonGroup(const std::vector<QAction *> &actionList, QWidget *parent)
|
, m_opacityHelper(new OpacityHelper(this))
|
||||||
: QGroupBox (parent)
|
{
|
||||||
, m_opacityHelper(new OpacityHelper(this))
|
QHBoxLayout * mainLayout = new QHBoxLayout(this);
|
||||||
{
|
mainLayout->setSizeConstraint(QLayout::SetFixedSize);
|
||||||
QHBoxLayout * mainLayout = new QHBoxLayout(this);
|
this->setLayout(mainLayout);
|
||||||
mainLayout->setSizeConstraint(QLayout::SetFixedSize);
|
this->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||||
this->setLayout(mainLayout);
|
this->setStyleSheet("BottomButtonGroup {"
|
||||||
this->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
"border: 1px solid gray;"
|
||||||
this->setStyleSheet("BottomButtonGroup {"
|
"border-top-left-radius: 10px;"
|
||||||
"border: 1px solid gray;"
|
"border-top-right-radius: 10px;"
|
||||||
"border-top-left-radius: 10px;"
|
"border-style: none;"
|
||||||
"border-top-right-radius: 10px;"
|
"background-color:rgba(0,0,0,120)"
|
||||||
"border-style: none;"
|
"}"
|
||||||
"background-color:rgba(0,0,0,120)"
|
"QToolButton {"
|
||||||
"}"
|
"background:transparent;"
|
||||||
"QToolButton {"
|
"}"
|
||||||
"background:transparent;"
|
"QToolButton:!focus {"
|
||||||
"}"
|
"border-style: none;"
|
||||||
"QToolButton:!focus {"
|
"}");
|
||||||
"border-style: none;"
|
|
||||||
"}");
|
auto newActionBtn = [this](QAction * action) -> QToolButton * {
|
||||||
|
QToolButton * btn = new QToolButton(this);
|
||||||
auto newActionBtn = [this](QAction * action) -> QToolButton * {
|
btn->setDefaultAction(action);
|
||||||
QToolButton * btn = new QToolButton(this);
|
btn->setIconSize(QSize(32, 32));
|
||||||
btn->setDefaultAction(action);
|
btn->setFixedSize(40, 40);
|
||||||
btn->setIconSize(QSize(32, 32));
|
return btn;
|
||||||
btn->setFixedSize(40, 40);
|
};
|
||||||
return btn;
|
|
||||||
};
|
for (QAction * action : actionList) {
|
||||||
|
addButton(newActionBtn(action));
|
||||||
for (QAction * action : actionList) {
|
}
|
||||||
addButton(newActionBtn(action));
|
}
|
||||||
}
|
|
||||||
}
|
void BottomButtonGroup::setOpacity(qreal opacity, bool animated)
|
||||||
|
{
|
||||||
void BottomButtonGroup::setOpacity(qreal opacity, bool animated)
|
m_opacityHelper->setOpacity(opacity, animated);
|
||||||
{
|
}
|
||||||
m_opacityHelper->setOpacity(opacity, animated);
|
|
||||||
}
|
void BottomButtonGroup::addButton(QAbstractButton *button)
|
||||||
|
{
|
||||||
void BottomButtonGroup::addButton(QAbstractButton *button)
|
layout()->addWidget(button);
|
||||||
{
|
updateGeometry();
|
||||||
layout()->addWidget(button);
|
}
|
||||||
updateGeometry();
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,27 +1,27 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#ifndef BOTTOMBUTTONGROUP_H
|
#ifndef BOTTOMBUTTONGROUP_H
|
||||||
#define BOTTOMBUTTONGROUP_H
|
#define BOTTOMBUTTONGROUP_H
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <QAbstractButton>
|
#include <QAbstractButton>
|
||||||
#include <QGroupBox>
|
#include <QGroupBox>
|
||||||
|
|
||||||
class OpacityHelper;
|
class OpacityHelper;
|
||||||
class BottomButtonGroup : public QGroupBox
|
class BottomButtonGroup : public QGroupBox
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit BottomButtonGroup(const std::vector<QAction *> & actionList, QWidget *parent = nullptr);
|
explicit BottomButtonGroup(const std::vector<QAction *> & actionList, QWidget *parent = nullptr);
|
||||||
|
|
||||||
void setOpacity(qreal opacity, bool animated = true);
|
void setOpacity(qreal opacity, bool animated = true);
|
||||||
void addButton(QAbstractButton *button);
|
void addButton(QAbstractButton *button);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
OpacityHelper * m_opacityHelper;
|
OpacityHelper * m_opacityHelper;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BOTTOMBUTTONGROUP_H
|
#endif // BOTTOMBUTTONGROUP_H
|
||||||
|
|||||||
@ -1,126 +1,138 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "exiv2wrapper.h"
|
#include "exiv2wrapper.h"
|
||||||
|
|
||||||
#ifdef HAVE_EXIV2_VERSION
|
#ifdef HAVE_EXIV2_VERSION
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
#else // HAVE_EXIV2_VERSION
|
#else // HAVE_EXIV2_VERSION
|
||||||
namespace Exiv2 {
|
namespace Exiv2 {
|
||||||
class Image {};
|
class Image {};
|
||||||
}
|
}
|
||||||
#endif // HAVE_EXIV2_VERSION
|
#endif // HAVE_EXIV2_VERSION
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
Exiv2Wrapper::Exiv2Wrapper()
|
Exiv2Wrapper::Exiv2Wrapper()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Exiv2Wrapper::~Exiv2Wrapper()
|
Exiv2Wrapper::~Exiv2Wrapper()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Collection, typename Iterator>
|
#ifdef HAVE_EXIV2_VERSION // stupid AppleClang...
|
||||||
void Exiv2Wrapper::cacheSection(Collection collection)
|
template<typename Collection, typename Iterator>
|
||||||
{
|
void Exiv2Wrapper::cacheSection(Collection collection)
|
||||||
const Collection& exifData = collection;
|
{
|
||||||
Iterator it = exifData.begin(), end = exifData.end();
|
const Collection& exifData = collection;
|
||||||
for (; it != end; ++it) {
|
Iterator it = exifData.begin(), end = exifData.end();
|
||||||
QString key = QString::fromUtf8(it->key().c_str());
|
for (; it != end; ++it) {
|
||||||
if (it->tagName().substr(0, 2) == "0x") continue;
|
QString key = QString::fromUtf8(it->key().c_str());
|
||||||
QString label = QString::fromLocal8Bit(it->tagLabel().c_str());
|
if (it->tagName().substr(0, 2) == "0x") continue;
|
||||||
std::ostringstream stream;
|
// We might get exceptions like "No namespace info available for XMP prefix `Item'"
|
||||||
stream << *it;
|
// when trying to get tagLabel() data from a Xmpdatum if the tag is not common-used.
|
||||||
QString value = QString::fromUtf8(stream.str().c_str());
|
// We don't care for those rare tags so let's just use a try-cache...
|
||||||
m_metadataValue.insert(key, value);
|
try {
|
||||||
m_metadataLabel.insert(key, label);
|
QString label = QString::fromLocal8Bit(it->tagLabel().c_str());
|
||||||
|
std::ostringstream stream;
|
||||||
qDebug() << key << label << value;
|
stream << *it;
|
||||||
}
|
QString value = QString::fromUtf8(stream.str().c_str());
|
||||||
}
|
m_metadataValue.insert(key, value);
|
||||||
|
m_metadataLabel.insert(key, label);
|
||||||
bool Exiv2Wrapper::load(const QString &filePath)
|
qDebug() << key << label << value;
|
||||||
{
|
#if EXIV2_TEST_VERSION(0, 28, 0)
|
||||||
#ifdef HAVE_EXIV2_VERSION
|
} catch (Exiv2::Error & err) {
|
||||||
QByteArray filePathByteArray = QFile::encodeName(filePath);
|
#else // 0.27.x
|
||||||
try {
|
} catch (Exiv2::AnyError & err) {
|
||||||
m_exivImage.reset(Exiv2::ImageFactory::open(filePathByteArray.constData()).release());
|
#endif // EXIV2_TEST_VERSION(0, 28, 0)
|
||||||
m_exivImage->readMetadata();
|
qWarning() << "Error loading key" << key << ":" << err.what();
|
||||||
} catch (const Exiv2::Error& error) {
|
}
|
||||||
m_errMsg = QString::fromUtf8(error.what());
|
}
|
||||||
return false;
|
}
|
||||||
}
|
#endif // HAVE_EXIV2_VERSION
|
||||||
return true;
|
|
||||||
#else // HAVE_EXIV2_VERSION
|
bool Exiv2Wrapper::load(const QString &filePath)
|
||||||
Q_UNUSED(filePath);
|
{
|
||||||
return false;
|
#ifdef HAVE_EXIV2_VERSION
|
||||||
#endif // HAVE_EXIV2_VERSION
|
QByteArray filePathByteArray = QFile::encodeName(filePath);
|
||||||
}
|
try {
|
||||||
|
m_exivImage.reset(Exiv2::ImageFactory::open(filePathByteArray.constData()).release());
|
||||||
void Exiv2Wrapper::cacheSections()
|
m_exivImage->readMetadata();
|
||||||
{
|
} catch (const Exiv2::Error& error) {
|
||||||
#ifdef HAVE_EXIV2_VERSION
|
m_errMsg = QString::fromUtf8(error.what());
|
||||||
if (m_exivImage->checkMode(Exiv2::mdExif) & Exiv2::amRead) {
|
return false;
|
||||||
cacheSection<Exiv2::ExifData, Exiv2::ExifData::const_iterator>(m_exivImage->exifData());
|
}
|
||||||
}
|
return true;
|
||||||
|
#else // HAVE_EXIV2_VERSION
|
||||||
if (m_exivImage->checkMode(Exiv2::mdIptc) & Exiv2::amRead) {
|
Q_UNUSED(filePath);
|
||||||
cacheSection<Exiv2::IptcData, Exiv2::IptcData::const_iterator>(m_exivImage->iptcData());
|
return false;
|
||||||
}
|
#endif // HAVE_EXIV2_VERSION
|
||||||
|
}
|
||||||
if (m_exivImage->checkMode(Exiv2::mdXmp) & Exiv2::amRead) {
|
|
||||||
cacheSection<Exiv2::XmpData, Exiv2::XmpData::const_iterator>(m_exivImage->xmpData());
|
void Exiv2Wrapper::cacheSections()
|
||||||
}
|
{
|
||||||
|
#ifdef HAVE_EXIV2_VERSION
|
||||||
// qDebug() << m_metadataValue;
|
if (m_exivImage->checkMode(Exiv2::mdExif) & Exiv2::amRead) {
|
||||||
// qDebug() << m_metadataLabel;
|
cacheSection<Exiv2::ExifData, Exiv2::ExifData::const_iterator>(m_exivImage->exifData());
|
||||||
#endif // HAVE_EXIV2_VERSION
|
}
|
||||||
}
|
|
||||||
|
if (m_exivImage->checkMode(Exiv2::mdIptc) & Exiv2::amRead) {
|
||||||
QString Exiv2Wrapper::comment() const
|
cacheSection<Exiv2::IptcData, Exiv2::IptcData::const_iterator>(m_exivImage->iptcData());
|
||||||
{
|
}
|
||||||
#ifdef HAVE_EXIV2_VERSION
|
|
||||||
return m_exivImage->comment().c_str();
|
if (m_exivImage->checkMode(Exiv2::mdXmp) & Exiv2::amRead) {
|
||||||
#else // HAVE_EXIV2_VERSION
|
cacheSection<Exiv2::XmpData, Exiv2::XmpData::const_iterator>(m_exivImage->xmpData());
|
||||||
return QString();
|
}
|
||||||
#endif // HAVE_EXIV2_VERSION
|
|
||||||
}
|
// qDebug() << m_metadataValue;
|
||||||
|
// qDebug() << m_metadataLabel;
|
||||||
QString Exiv2Wrapper::label(const QString &key) const
|
#endif // HAVE_EXIV2_VERSION
|
||||||
{
|
}
|
||||||
return m_metadataLabel.value(key);
|
|
||||||
}
|
QString Exiv2Wrapper::comment() const
|
||||||
|
{
|
||||||
QString Exiv2Wrapper::value(const QString &key) const
|
#ifdef HAVE_EXIV2_VERSION
|
||||||
{
|
return m_exivImage->comment().c_str();
|
||||||
return m_metadataValue.value(key);
|
#else // HAVE_EXIV2_VERSION
|
||||||
}
|
return QString();
|
||||||
|
#endif // HAVE_EXIV2_VERSION
|
||||||
QString Exiv2Wrapper::XmpValue(const QString &rawValue)
|
}
|
||||||
{
|
|
||||||
QString ignored;
|
QString Exiv2Wrapper::label(const QString &key) const
|
||||||
return Exiv2Wrapper::XmpValue(rawValue, ignored);
|
{
|
||||||
}
|
return m_metadataLabel.value(key);
|
||||||
|
}
|
||||||
QString Exiv2Wrapper::XmpValue(const QString &rawValue, QString &language)
|
|
||||||
{
|
QString Exiv2Wrapper::value(const QString &key) const
|
||||||
if (rawValue.size() > 6 && rawValue.startsWith(QLatin1String("lang=\""))) {
|
{
|
||||||
int pos = rawValue.indexOf('"', 6);
|
return m_metadataValue.value(key);
|
||||||
|
}
|
||||||
if (pos != -1) {
|
|
||||||
language = rawValue.mid(6, pos - 6);
|
QString Exiv2Wrapper::XmpValue(const QString &rawValue)
|
||||||
return (rawValue.mid(pos + 2));
|
{
|
||||||
}
|
QString ignored;
|
||||||
}
|
return Exiv2Wrapper::XmpValue(rawValue, ignored);
|
||||||
|
}
|
||||||
language.clear();
|
|
||||||
return rawValue;
|
QString Exiv2Wrapper::XmpValue(const QString &rawValue, QString &language)
|
||||||
}
|
{
|
||||||
|
if (rawValue.size() > 6 && rawValue.startsWith(QLatin1String("lang=\""))) {
|
||||||
|
int pos = rawValue.indexOf('"', 6);
|
||||||
|
|
||||||
|
if (pos != -1) {
|
||||||
|
language = rawValue.mid(6, pos - 6);
|
||||||
|
return (rawValue.mid(pos + 2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
language.clear();
|
||||||
|
return rawValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,43 +1,43 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#ifndef EXIV2WRAPPER_H
|
#ifndef EXIV2WRAPPER_H
|
||||||
#define EXIV2WRAPPER_H
|
#define EXIV2WRAPPER_H
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
|
||||||
namespace Exiv2 {
|
namespace Exiv2 {
|
||||||
class Image;
|
class Image;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Exiv2Wrapper
|
class Exiv2Wrapper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Exiv2Wrapper();
|
Exiv2Wrapper();
|
||||||
~Exiv2Wrapper();
|
~Exiv2Wrapper();
|
||||||
|
|
||||||
bool load(const QString& filePath);
|
bool load(const QString& filePath);
|
||||||
void cacheSections();
|
void cacheSections();
|
||||||
|
|
||||||
QString comment() const;
|
QString comment() const;
|
||||||
QString label(const QString & key) const;
|
QString label(const QString & key) const;
|
||||||
QString value(const QString & key) const;
|
QString value(const QString & key) const;
|
||||||
|
|
||||||
static QString XmpValue(const QString &rawValue);
|
static QString XmpValue(const QString &rawValue);
|
||||||
static QString XmpValue(const QString &rawValue, QString & language);
|
static QString XmpValue(const QString &rawValue, QString & language);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<Exiv2::Image> m_exivImage;
|
std::unique_ptr<Exiv2::Image> m_exivImage;
|
||||||
QMap<QString, QString> m_metadataValue;
|
QMap<QString, QString> m_metadataValue;
|
||||||
QMap<QString, QString> m_metadataLabel;
|
QMap<QString, QString> m_metadataLabel;
|
||||||
QString m_errMsg;
|
QString m_errMsg;
|
||||||
|
|
||||||
template<typename Collection, typename Iterator>
|
template<typename Collection, typename Iterator>
|
||||||
void cacheSection(Collection collection);
|
void cacheSection(Collection collection);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // EXIV2WRAPPER_H
|
#endif // EXIV2WRAPPER_H
|
||||||
|
|||||||
22
app/fileopeneventhandler.cpp
Normal file
22
app/fileopeneventhandler.cpp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2024 Gary Wang <git@blumia.net>
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
#include "fileopeneventhandler.h"
|
||||||
|
|
||||||
|
#include <QFileOpenEvent>
|
||||||
|
|
||||||
|
FileOpenEventHandler::FileOpenEventHandler(QObject *parent)
|
||||||
|
: QObject(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FileOpenEventHandler::eventFilter(QObject *obj, QEvent *event)
|
||||||
|
{
|
||||||
|
if (event->type() == QEvent::FileOpen) {
|
||||||
|
QFileOpenEvent *fileOpenEvent = static_cast<QFileOpenEvent *>(event);
|
||||||
|
emit fileOpen(fileOpenEvent->url());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return QObject::eventFilter(obj, event);
|
||||||
|
}
|
||||||
21
app/fileopeneventhandler.h
Normal file
21
app/fileopeneventhandler.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2024 Gary Wang <git@blumia.net>
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
class FileOpenEventHandler : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit FileOpenEventHandler(QObject *parent = nullptr);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void fileOpen(const QUrl &url);
|
||||||
|
};
|
||||||
@ -1,127 +1,136 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
// SPDX-FileCopyrightText: 2023 Tad Young <yyc12321@outlook.com>
|
||||||
// SPDX-License-Identifier: MIT
|
//
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
#include "framelesswindow.h"
|
|
||||||
|
#include "framelesswindow.h"
|
||||||
#include <QApplication>
|
|
||||||
#include <QVBoxLayout>
|
#include <QMouseEvent>
|
||||||
|
#include <QHoverEvent>
|
||||||
#ifdef _WIN32
|
#include <QApplication>
|
||||||
#include <windows.h>
|
#include <QVBoxLayout>
|
||||||
#endif // _WIN32
|
#include <QWindow>
|
||||||
|
|
||||||
FramelessWindow::FramelessWindow(QWidget *parent)
|
FramelessWindow::FramelessWindow(QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, m_centralLayout(new QVBoxLayout(this))
|
, m_centralLayout(new QVBoxLayout(this))
|
||||||
{
|
, m_oldCursorShape(Qt::ArrowCursor)
|
||||||
// TODO: Remove the comment below when we switch to Qt 6 completely.
|
, m_oldEdges()
|
||||||
// There is a bug in Qt 5 that will make pressing Meta+Up cause the app
|
{
|
||||||
// fullscreen under Windows, see QTBUG-91226 to learn more.
|
this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinMaxButtonsHint);
|
||||||
// The bug seems no longer exists in Qt 6 (I only tested it under Qt 6.3.0).
|
this->setMouseTracking(true);
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
this->setAttribute(Qt::WA_Hover, true);
|
||||||
this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinMaxButtonsHint);
|
this->installEventFilter(this);
|
||||||
#else
|
|
||||||
this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);
|
m_centralLayout->setContentsMargins(QMargins());
|
||||||
#endif // QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
}
|
||||||
|
|
||||||
m_centralLayout->setContentsMargins(QMargins());
|
void FramelessWindow::setCentralWidget(QWidget *widget)
|
||||||
}
|
{
|
||||||
|
if (m_centralWidget) {
|
||||||
void FramelessWindow::setCentralWidget(QWidget *widget)
|
m_centralLayout->removeWidget(m_centralWidget);
|
||||||
{
|
m_centralWidget->deleteLater();
|
||||||
if (m_centralWidget) {
|
}
|
||||||
m_centralLayout->removeWidget(m_centralWidget);
|
|
||||||
m_centralWidget->deleteLater();
|
m_centralLayout->addWidget(widget);
|
||||||
}
|
m_centralWidget = widget;
|
||||||
|
}
|
||||||
m_centralLayout->addWidget(widget);
|
|
||||||
m_centralWidget = widget;
|
void FramelessWindow::installResizeCapture(QObject* widget)
|
||||||
}
|
{
|
||||||
|
widget->installEventFilter(this);
|
||||||
bool FramelessWindow::nativeEvent(const QByteArray &eventType, void *message, NATIVE_RESULT *result)
|
}
|
||||||
{
|
|
||||||
#ifdef _WIN32
|
bool FramelessWindow::eventFilter(QObject* o, QEvent* e)
|
||||||
// https://stackoverflow.com/questions/43505580/qt-windows-resizable-frameless-window
|
{
|
||||||
// Too lazy to do this now.. just stackoverflow it and did a copy and paste..
|
switch (e->type()) {
|
||||||
Q_UNUSED(eventType)
|
case QEvent::HoverMove:
|
||||||
MSG* msg = static_cast<MSG*>(message);
|
{
|
||||||
|
QWidget* wg = qobject_cast<QWidget*>(o);
|
||||||
if (msg->message == WM_NCHITTEST) {
|
if (wg != nullptr)
|
||||||
if (isMaximized()) {
|
return mouseHover(static_cast<QHoverEvent*>(e), wg);
|
||||||
return false;
|
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
*result = 0;
|
case QEvent::MouseButtonPress:
|
||||||
const LONG borderWidth = 8;
|
return mousePress(static_cast<QMouseEvent*>(e));
|
||||||
RECT winrect;
|
}
|
||||||
GetWindowRect(reinterpret_cast<HWND>(winId()), &winrect);
|
|
||||||
|
return QWidget::eventFilter(o, e);
|
||||||
// must be short to correctly work with multiple monitors (negative coordinates)
|
}
|
||||||
short x = msg->lParam & 0x0000FFFF;
|
|
||||||
short y = (msg->lParam & 0xFFFF0000) >> 16;
|
bool FramelessWindow::mouseHover(QHoverEvent* event, QWidget* wg)
|
||||||
|
{
|
||||||
bool resizeWidth = minimumWidth() != maximumWidth();
|
if (!isMaximized() && !isFullScreen()) {
|
||||||
bool resizeHeight = minimumHeight() != maximumHeight();
|
QWindow* win = window()->windowHandle();
|
||||||
if (resizeWidth) {
|
Qt::Edges edges = this->getEdgesByPos(wg->mapToGlobal(event->oldPos()), win->frameGeometry());
|
||||||
//left border
|
|
||||||
if (x >= winrect.left && x < winrect.left + borderWidth) {
|
// backup & restore cursor shape
|
||||||
*result = HTLEFT;
|
if (edges && !m_oldEdges)
|
||||||
}
|
// entering the edge. backup cursor shape
|
||||||
//right border
|
m_oldCursorShape = win->cursor().shape();
|
||||||
if (x < winrect.right && x >= winrect.right - borderWidth) {
|
if (!edges && m_oldEdges)
|
||||||
*result = HTRIGHT;
|
// leaving the edge. restore cursor shape
|
||||||
}
|
win->setCursor(m_oldCursorShape);
|
||||||
}
|
|
||||||
if (resizeHeight) {
|
// save the latest edges status
|
||||||
//bottom border
|
m_oldEdges = edges;
|
||||||
if (y < winrect.bottom && y >= winrect.bottom - borderWidth) {
|
|
||||||
*result = HTBOTTOM;
|
// show resize cursor shape if cursor is within border
|
||||||
}
|
if (edges) {
|
||||||
//top border
|
win->setCursor(this->getCursorByEdge(edges, Qt::ArrowCursor));
|
||||||
if (y >= winrect.top && y < winrect.top + borderWidth) {
|
return true;
|
||||||
*result = HTTOP;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (resizeWidth && resizeHeight) {
|
return false;
|
||||||
//bottom left corner
|
}
|
||||||
if (x >= winrect.left && x < winrect.left + borderWidth &&
|
|
||||||
y < winrect.bottom && y >= winrect.bottom - borderWidth)
|
bool FramelessWindow::mousePress(QMouseEvent* event)
|
||||||
{
|
{
|
||||||
*result = HTBOTTOMLEFT;
|
if (event->buttons() & Qt::LeftButton && !isMaximized() && !isFullScreen()) {
|
||||||
}
|
QWindow* win = window()->windowHandle();
|
||||||
//bottom right corner
|
Qt::Edges edges = this->getEdgesByPos(event->globalPosition().toPoint(), win->frameGeometry());
|
||||||
if (x < winrect.right && x >= winrect.right - borderWidth &&
|
if (edges) {
|
||||||
y < winrect.bottom && y >= winrect.bottom - borderWidth)
|
win->startSystemResize(edges);
|
||||||
{
|
return true;
|
||||||
*result = HTBOTTOMRIGHT;
|
}
|
||||||
}
|
}
|
||||||
//top left corner
|
|
||||||
if (x >= winrect.left && x < winrect.left + borderWidth &&
|
return false;
|
||||||
y >= winrect.top && y < winrect.top + borderWidth)
|
}
|
||||||
{
|
|
||||||
*result = HTTOPLEFT;
|
Qt::CursorShape FramelessWindow::getCursorByEdge(const Qt::Edges& edges, Qt::CursorShape default_cursor)
|
||||||
}
|
{
|
||||||
//top right corner
|
if ((edges == (Qt::TopEdge | Qt::LeftEdge)) || (edges == (Qt::RightEdge | Qt::BottomEdge)))
|
||||||
if (x < winrect.right && x >= winrect.right - borderWidth &&
|
return Qt::SizeFDiagCursor;
|
||||||
y >= winrect.top && y < winrect.top + borderWidth)
|
else if ((edges == (Qt::TopEdge | Qt::RightEdge)) || (edges == (Qt::LeftEdge | Qt::BottomEdge)))
|
||||||
{
|
return Qt::SizeBDiagCursor;
|
||||||
*result = HTTOPRIGHT;
|
else if (edges & (Qt::TopEdge | Qt::BottomEdge))
|
||||||
}
|
return Qt::SizeVerCursor;
|
||||||
}
|
else if (edges & (Qt::LeftEdge | Qt::RightEdge))
|
||||||
|
return Qt::SizeHorCursor;
|
||||||
if (*result != 0)
|
else
|
||||||
return true;
|
return default_cursor;
|
||||||
|
}
|
||||||
QWidget *action = QApplication::widgetAt(QCursor::pos());
|
|
||||||
if (action == this) {
|
Qt::Edges FramelessWindow::getEdgesByPos(const QPoint gpos, const QRect& winrect)
|
||||||
*result = HTCAPTION;
|
{
|
||||||
return true;
|
const int borderWidth = 8;
|
||||||
}
|
Qt::Edges edges;
|
||||||
}
|
|
||||||
|
int x = gpos.x() - winrect.x();
|
||||||
return false;
|
int y = gpos.y() - winrect.y();
|
||||||
#else
|
|
||||||
return QWidget::nativeEvent(eventType, message, result);
|
if (x < borderWidth)
|
||||||
#endif // _WIN32
|
edges |= Qt::LeftEdge;
|
||||||
}
|
if (x > (winrect.width() - borderWidth))
|
||||||
|
edges |= Qt::RightEdge;
|
||||||
|
if (y < borderWidth)
|
||||||
|
edges |= Qt::TopEdge;
|
||||||
|
if (y > (winrect.height() - borderWidth))
|
||||||
|
edges |= Qt::BottomEdge;
|
||||||
|
|
||||||
|
return edges;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,36 +1,39 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#ifndef FRAMELESSWINDOW_H
|
#ifndef FRAMELESSWINDOW_H
|
||||||
#define FRAMELESSWINDOW_H
|
#define FRAMELESSWINDOW_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
QT_BEGIN_NAMESPACE
|
||||||
typedef qintptr NATIVE_RESULT;
|
class QVBoxLayout;
|
||||||
#else
|
QT_END_NAMESPACE
|
||||||
typedef long NATIVE_RESULT;
|
|
||||||
#endif // QT_VERSION_CHECK(6, 0, 0)
|
class FramelessWindow : public QWidget
|
||||||
|
{
|
||||||
QT_BEGIN_NAMESPACE
|
Q_OBJECT
|
||||||
class QVBoxLayout;
|
public:
|
||||||
QT_END_NAMESPACE
|
explicit FramelessWindow(QWidget *parent = nullptr);
|
||||||
|
|
||||||
class FramelessWindow : public QWidget
|
void setCentralWidget(QWidget * widget);
|
||||||
{
|
void installResizeCapture(QObject* widget);
|
||||||
Q_OBJECT
|
|
||||||
public:
|
protected:
|
||||||
explicit FramelessWindow(QWidget *parent = nullptr);
|
bool eventFilter(QObject *o, QEvent *e) override;
|
||||||
|
bool mouseHover(QHoverEvent* event, QWidget* wg);
|
||||||
void setCentralWidget(QWidget * widget);
|
bool mousePress(QMouseEvent* event);
|
||||||
|
|
||||||
protected:
|
private:
|
||||||
bool nativeEvent(const QByteArray& eventType, void* message, NATIVE_RESULT* result) override;
|
Qt::Edges m_oldEdges;
|
||||||
|
Qt::CursorShape m_oldCursorShape;
|
||||||
private:
|
|
||||||
QVBoxLayout * m_centralLayout = nullptr;
|
Qt::CursorShape getCursorByEdge(const Qt::Edges& edges, Qt::CursorShape default_cursor);
|
||||||
QWidget * m_centralWidget = nullptr; // just a pointer, doesn't take the ownership.
|
Qt::Edges getEdgesByPos(const QPoint pos, const QRect& winrect);
|
||||||
};
|
|
||||||
|
QVBoxLayout * m_centralLayout = nullptr;
|
||||||
#endif // FRAMELESSWINDOW_H
|
QWidget * m_centralWidget = nullptr; // just a pointer, doesn't take the ownership.
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // FRAMELESSWINDOW_H
|
||||||
|
|||||||
@ -10,8 +10,8 @@
|
|||||||
#include <QGraphicsItem>
|
#include <QGraphicsItem>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QGraphicsSvgItem>
|
#include <QGraphicsSvgItem>
|
||||||
|
#include <QSvgRenderer>
|
||||||
#include <QMovie>
|
#include <QMovie>
|
||||||
#include <QLabel>
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
class PGraphicsPixmapItem : public QGraphicsPixmapItem
|
class PGraphicsPixmapItem : public QGraphicsPixmapItem
|
||||||
@ -21,6 +21,9 @@ public:
|
|||||||
: QGraphicsPixmapItem(pixmap, parent)
|
: QGraphicsPixmapItem(pixmap, parent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
enum { Type = UserType + 1 };
|
||||||
|
int type() const override { return Type; }
|
||||||
|
|
||||||
void setScaleHint(float scaleHint) {
|
void setScaleHint(float scaleHint) {
|
||||||
m_scaleHint = scaleHint;
|
m_scaleHint = scaleHint;
|
||||||
}
|
}
|
||||||
@ -56,6 +59,41 @@ private:
|
|||||||
QPixmap m_cachedPixmap;
|
QPixmap m_cachedPixmap;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class PGraphicsMovieItem : public QGraphicsItem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PGraphicsMovieItem(QGraphicsItem *parent = nullptr) : QGraphicsItem(parent) {}
|
||||||
|
|
||||||
|
enum { Type = UserType + 2 };
|
||||||
|
int type() const override { return Type; }
|
||||||
|
|
||||||
|
void setMovie(QMovie* movie) {
|
||||||
|
if (m_movie) m_movie->disconnect();
|
||||||
|
m_movie.reset(movie);
|
||||||
|
m_movie->connect(m_movie.data(), &QMovie::updated, [this](){
|
||||||
|
this->update();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QRectF boundingRect() const override {
|
||||||
|
if (m_movie) { return m_movie->frameRect(); }
|
||||||
|
else { return QRectF(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override {
|
||||||
|
if (m_movie) {
|
||||||
|
painter->drawPixmap(m_movie->frameRect(), m_movie->currentPixmap(), m_movie->frameRect());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QMovie * movie() const {
|
||||||
|
return m_movie.data();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
QScopedPointer<QMovie> m_movie;
|
||||||
|
};
|
||||||
|
|
||||||
GraphicsScene::GraphicsScene(QObject *parent)
|
GraphicsScene::GraphicsScene(QObject *parent)
|
||||||
: QGraphicsScene(parent)
|
: QGraphicsScene(parent)
|
||||||
{
|
{
|
||||||
@ -89,7 +127,16 @@ void GraphicsScene::showText(const QString &text)
|
|||||||
void GraphicsScene::showSvg(const QString &filepath)
|
void GraphicsScene::showSvg(const QString &filepath)
|
||||||
{
|
{
|
||||||
this->clear();
|
this->clear();
|
||||||
QGraphicsSvgItem * svgItem = new QGraphicsSvgItem(filepath);
|
QGraphicsSvgItem * svgItem = new QGraphicsSvgItem();
|
||||||
|
QSvgRenderer * render = new QSvgRenderer(svgItem);
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
|
||||||
|
// Qt 6.7.0's SVG support is terrible caused by huge memory usage, see QTBUG-124287
|
||||||
|
// Qt 6.7.1's is somewhat better, memory issue seems fixed, but still laggy when zoom in,
|
||||||
|
// see QTBUG-126771. Anyway let's disable it for now.
|
||||||
|
render->setOptions(QtSvg::Tiny12FeaturesOnly);
|
||||||
|
#endif // QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
|
||||||
|
render->load(filepath);
|
||||||
|
svgItem->setSharedRenderer(render);
|
||||||
this->addItem(svgItem);
|
this->addItem(svgItem);
|
||||||
m_theThing = svgItem;
|
m_theThing = svgItem;
|
||||||
this->setSceneRect(m_theThing->boundingRect());
|
this->setSceneRect(m_theThing->boundingRect());
|
||||||
@ -98,14 +145,14 @@ void GraphicsScene::showSvg(const QString &filepath)
|
|||||||
void GraphicsScene::showAnimated(const QString &filepath)
|
void GraphicsScene::showAnimated(const QString &filepath)
|
||||||
{
|
{
|
||||||
this->clear();
|
this->clear();
|
||||||
QLabel * label = new QLabel;
|
|
||||||
QMovie * movie = new QMovie(filepath, QByteArray(), label);
|
PGraphicsMovieItem * animatedItem = new PGraphicsMovieItem();
|
||||||
label->setStyleSheet("background-color:rgba(225,255,255,0);");
|
QMovie * movie = new QMovie(filepath);
|
||||||
label->setMovie(movie);
|
|
||||||
this->addWidget(label);
|
|
||||||
movie->start();
|
movie->start();
|
||||||
m_theThing = this->addRect(QRect(QPoint(0, 0), label->sizeHint()),
|
animatedItem->setMovie(movie);
|
||||||
QPen(Qt::transparent));
|
this->addItem(animatedItem);
|
||||||
|
m_theThing = animatedItem;
|
||||||
|
|
||||||
this->setSceneRect(m_theThing->boundingRect());
|
this->setSceneRect(m_theThing->boundingRect());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,6 +168,29 @@ bool GraphicsScene::trySetTransformationMode(Qt::TransformationMode mode, float
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GraphicsScene::togglePauseAnimation()
|
||||||
|
{
|
||||||
|
PGraphicsMovieItem * animatedItem = qgraphicsitem_cast<PGraphicsMovieItem *>(m_theThing);
|
||||||
|
if (animatedItem) {
|
||||||
|
animatedItem->movie()->setPaused(animatedItem->movie()->state() != QMovie::Paused);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GraphicsScene::skipAnimationFrame(int delta)
|
||||||
|
{
|
||||||
|
PGraphicsMovieItem * animatedItem = qgraphicsitem_cast<PGraphicsMovieItem *>(m_theThing);
|
||||||
|
if (animatedItem) {
|
||||||
|
const int frameCount = animatedItem->movie()->frameCount();
|
||||||
|
const int currentFrame = animatedItem->movie()->currentFrameNumber();
|
||||||
|
const int targetFrame = (currentFrame + delta) % frameCount;
|
||||||
|
animatedItem->movie()->setPaused(true);
|
||||||
|
return animatedItem->movie()->jumpToFrame(targetFrame);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
QPixmap GraphicsScene::renderToPixmap()
|
QPixmap GraphicsScene::renderToPixmap()
|
||||||
{
|
{
|
||||||
PGraphicsPixmapItem * pixmapItem = qgraphicsitem_cast<PGraphicsPixmapItem *>(m_theThing);
|
PGraphicsPixmapItem * pixmapItem = qgraphicsitem_cast<PGraphicsPixmapItem *>(m_theThing);
|
||||||
|
|||||||
@ -21,10 +21,13 @@ public:
|
|||||||
|
|
||||||
bool trySetTransformationMode(Qt::TransformationMode mode, float scaleHint);
|
bool trySetTransformationMode(Qt::TransformationMode mode, float scaleHint);
|
||||||
|
|
||||||
|
bool togglePauseAnimation();
|
||||||
|
bool skipAnimationFrame(int delta = 1);
|
||||||
|
|
||||||
QPixmap renderToPixmap();
|
QPixmap renderToPixmap();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QGraphicsItem * m_theThing;
|
QGraphicsItem * m_theThing = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GRAPHICSSCENE_H
|
#endif // GRAPHICSSCENE_H
|
||||||
|
|||||||
@ -1,409 +1,495 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "graphicsview.h"
|
#include "graphicsview.h"
|
||||||
|
|
||||||
#include "graphicsscene.h"
|
#include "graphicsscene.h"
|
||||||
|
#include "settings.h"
|
||||||
#include <QDebug>
|
|
||||||
#include <QMouseEvent>
|
#include <QDebug>
|
||||||
#include <QScrollBar>
|
#include <QMouseEvent>
|
||||||
#include <QMimeData>
|
#include <QScrollBar>
|
||||||
#include <QImageReader>
|
#include <QMimeData>
|
||||||
#include <QStyleOptionGraphicsItem>
|
#include <QImageReader>
|
||||||
|
#include <QStyleOptionGraphicsItem>
|
||||||
// TODO: remove this once we drop older Qt support.
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)
|
GraphicsView::GraphicsView(QWidget *parent)
|
||||||
#define COMPAT_CONSTCOLOR constexpr
|
: QGraphicsView (parent)
|
||||||
#else
|
{
|
||||||
#define COMPAT_CONSTCOLOR const
|
setDragMode(QGraphicsView::ScrollHandDrag);
|
||||||
#endif
|
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
GraphicsView::GraphicsView(QWidget *parent)
|
setResizeAnchor(QGraphicsView::AnchorUnderMouse);
|
||||||
: QGraphicsView (parent)
|
setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
|
||||||
{
|
setStyleSheet("background-color: rgba(0, 0, 0, 220);"
|
||||||
setDragMode(QGraphicsView::ScrollHandDrag);
|
"border-radius: 3px;");
|
||||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
setAcceptDrops(false);
|
||||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
setCheckerboardEnabled(false);
|
||||||
setResizeAnchor(QGraphicsView::AnchorUnderMouse);
|
|
||||||
setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
|
connect(horizontalScrollBar(), &QScrollBar::valueChanged, this, &GraphicsView::viewportRectChanged);
|
||||||
setStyleSheet("background-color: rgba(0, 0, 0, 220);"
|
connect(verticalScrollBar(), &QScrollBar::valueChanged, this, &GraphicsView::viewportRectChanged);
|
||||||
"border-radius: 3px;");
|
}
|
||||||
setAcceptDrops(true);
|
|
||||||
setCheckerboardEnabled(false);
|
void GraphicsView::showFileFromPath(const QString &filePath)
|
||||||
|
{
|
||||||
connect(horizontalScrollBar(), &QScrollBar::valueChanged, this, &GraphicsView::viewportRectChanged);
|
emit navigatorViewRequired(false, transform());
|
||||||
connect(verticalScrollBar(), &QScrollBar::valueChanged, this, &GraphicsView::viewportRectChanged);
|
|
||||||
}
|
if (filePath.endsWith(".svg")) {
|
||||||
|
showSvg(filePath);
|
||||||
void GraphicsView::showFileFromPath(const QString &filePath, bool doRequestGallery)
|
} else {
|
||||||
{
|
QImageReader imageReader(filePath);
|
||||||
emit navigatorViewRequired(false, transform());
|
imageReader.setAutoTransform(true);
|
||||||
|
imageReader.setDecideFormatFromContent(true);
|
||||||
if (filePath.endsWith(".svg")) {
|
imageReader.setAllocationLimit(0);
|
||||||
showSvg(filePath);
|
|
||||||
} else {
|
// Since if the image format / plugin does not support this feature, imageFormat() will returns an invalid format.
|
||||||
QImageReader imageReader(filePath);
|
// So we cannot use imageFormat() and check if it returns QImage::Format_Invalid to detect if we support the file.
|
||||||
imageReader.setAutoTransform(true);
|
// QImage::Format imageFormat = imageReader.imageFormat();
|
||||||
imageReader.setDecideFormatFromContent(true);
|
if (imageReader.format().isEmpty()) {
|
||||||
|
showText(tr("File is not a valid image"));
|
||||||
// Since if the image format / plugin does not support this feature, imageFormat() will returns an invalid format.
|
} else if (imageReader.supportsAnimation() && imageReader.imageCount() > 1) {
|
||||||
// So we cannot use imageFormat() and check if it returns QImage::Format_Invalid to detect if we support the file.
|
showAnimated(filePath);
|
||||||
// QImage::Format imageFormat = imageReader.imageFormat();
|
} else if (!imageReader.canRead()) {
|
||||||
if (imageReader.format().isEmpty()) {
|
showText(tr("Image data is invalid or currently unsupported"));
|
||||||
doRequestGallery = false;
|
} else {
|
||||||
showText(tr("File is not a valid image"));
|
QPixmap && pixmap = QPixmap::fromImageReader(&imageReader);
|
||||||
} else if (imageReader.supportsAnimation() && imageReader.imageCount() > 1) {
|
if (pixmap.isNull()) {
|
||||||
showAnimated(filePath);
|
showText(tr("Image data is invalid or currently unsupported"));
|
||||||
} else if (!imageReader.canRead()) {
|
} else {
|
||||||
doRequestGallery = false;
|
pixmap.setDevicePixelRatio(devicePixelRatioF());
|
||||||
showText(tr("Image data is invalid or currently unsupported"));
|
showImage(pixmap);
|
||||||
} else {
|
}
|
||||||
QPixmap && pixmap = QPixmap::fromImageReader(&imageReader);
|
}
|
||||||
if (pixmap.isNull()) {
|
}
|
||||||
doRequestGallery = false;
|
}
|
||||||
showText(tr("Image data is invalid or currently unsupported"));
|
|
||||||
} else {
|
void GraphicsView::showImage(const QPixmap &pixmap)
|
||||||
pixmap.setDevicePixelRatio(devicePixelRatioF());
|
{
|
||||||
showImage(pixmap);
|
resetTransform();
|
||||||
}
|
scene()->showImage(pixmap);
|
||||||
}
|
displayScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doRequestGallery) {
|
void GraphicsView::showImage(const QImage &image)
|
||||||
emit requestGallery(filePath);
|
{
|
||||||
}
|
resetTransform();
|
||||||
}
|
scene()->showImage(QPixmap::fromImage(image));
|
||||||
|
displayScene();
|
||||||
void GraphicsView::showImage(const QPixmap &pixmap)
|
}
|
||||||
{
|
|
||||||
resetTransform();
|
void GraphicsView::showText(const QString &text)
|
||||||
scene()->showImage(pixmap);
|
{
|
||||||
displayScene();
|
resetTransform();
|
||||||
}
|
scene()->showText(text);
|
||||||
|
displayScene();
|
||||||
void GraphicsView::showImage(const QImage &image)
|
}
|
||||||
{
|
|
||||||
resetTransform();
|
void GraphicsView::showSvg(const QString &filepath)
|
||||||
scene()->showImage(QPixmap::fromImage(image));
|
{
|
||||||
displayScene();
|
resetTransform();
|
||||||
}
|
scene()->showSvg(filepath);
|
||||||
|
displayScene();
|
||||||
void GraphicsView::showText(const QString &text)
|
}
|
||||||
{
|
|
||||||
resetTransform();
|
void GraphicsView::showAnimated(const QString &filepath)
|
||||||
scene()->showText(text);
|
{
|
||||||
displayScene();
|
resetTransform();
|
||||||
}
|
scene()->showAnimated(filepath);
|
||||||
|
displayScene();
|
||||||
void GraphicsView::showSvg(const QString &filepath)
|
}
|
||||||
{
|
|
||||||
resetTransform();
|
GraphicsScene *GraphicsView::scene() const
|
||||||
scene()->showSvg(filepath);
|
{
|
||||||
displayScene();
|
return qobject_cast<GraphicsScene*>(QGraphicsView::scene());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GraphicsView::showAnimated(const QString &filepath)
|
void GraphicsView::setScene(GraphicsScene *scene)
|
||||||
{
|
{
|
||||||
resetTransform();
|
return QGraphicsView::setScene(scene);
|
||||||
scene()->showAnimated(filepath);
|
}
|
||||||
displayScene();
|
|
||||||
}
|
qreal GraphicsView::scaleFactor() const
|
||||||
|
{
|
||||||
GraphicsScene *GraphicsView::scene() const
|
return QStyleOptionGraphicsItem::levelOfDetailFromTransform(transform());
|
||||||
{
|
}
|
||||||
return qobject_cast<GraphicsScene*>(QGraphicsView::scene());
|
|
||||||
}
|
void GraphicsView::resetTransform()
|
||||||
|
{
|
||||||
void GraphicsView::setScene(GraphicsScene *scene)
|
if (!shouldAvoidTransform()) {
|
||||||
{
|
QGraphicsView::resetTransform();
|
||||||
return QGraphicsView::setScene(scene);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal GraphicsView::scaleFactor() const
|
void GraphicsView::zoomView(qreal scaleFactor)
|
||||||
{
|
{
|
||||||
return QStyleOptionGraphicsItem::levelOfDetailFromTransform(transform());
|
m_enableFitInView = false;
|
||||||
}
|
m_longImageMode = false;
|
||||||
|
scale(scaleFactor, scaleFactor);
|
||||||
void GraphicsView::resetTransform()
|
applyTransformationModeByScaleFactor();
|
||||||
{
|
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
|
||||||
QGraphicsView::resetTransform();
|
}
|
||||||
}
|
|
||||||
|
// This is always according to user's view.
|
||||||
void GraphicsView::zoomView(qreal scaleFactor)
|
// the direction of the rotation will NOT be clockwise because the y-axis points downwards.
|
||||||
{
|
void GraphicsView::rotateView(bool clockwise)
|
||||||
m_enableFitInView = false;
|
{
|
||||||
scale(scaleFactor, scaleFactor);
|
resetScale();
|
||||||
applyTransformationModeByScaleFactor();
|
|
||||||
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
|
QTransform tf(0, clockwise ? 1 : -1, 0,
|
||||||
}
|
clockwise ? -1 : 1, 0, 0,
|
||||||
|
0, 0, 1);
|
||||||
// This is always according to user's view.
|
tf = transform() * tf;
|
||||||
// the direction of the rotation will NOT be clockwise because the y-axis points downwards.
|
setTransform(tf);
|
||||||
void GraphicsView::rotateView(bool clockwise)
|
|
||||||
{
|
// Apply transformation mode but don't emit navigator signal here
|
||||||
resetScale();
|
// Let displayScene() handle the navigator visibility correctly
|
||||||
|
applyTransformationModeByScaleFactor();
|
||||||
QTransform tf(0, clockwise ? 1 : -1, 0,
|
}
|
||||||
clockwise ? -1 : 1, 0, 0,
|
|
||||||
0, 0, 1);
|
void GraphicsView::flipView(bool horizontal)
|
||||||
tf = transform() * tf;
|
{
|
||||||
setTransform(tf);
|
QTransform tf(horizontal ? -1 : 1, 0, 0,
|
||||||
}
|
0, horizontal ? 1 : -1, 0,
|
||||||
|
0, 0, 1);
|
||||||
void GraphicsView::flipView(bool horizontal)
|
tf = transform() * tf;
|
||||||
{
|
setTransform(tf);
|
||||||
QTransform tf(horizontal ? -1 : 1, 0, 0,
|
|
||||||
0, horizontal ? 1 : -1, 0,
|
// Ensure the navigation view is also flipped.
|
||||||
0, 0, 1);
|
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
|
||||||
tf = transform() * tf;
|
}
|
||||||
setTransform(tf);
|
|
||||||
|
void GraphicsView::resetScale()
|
||||||
// Ensure the navigation view is also flipped.
|
{
|
||||||
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
|
setTransform(resetScale(transform()));
|
||||||
}
|
applyTransformationModeByScaleFactor();
|
||||||
|
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
|
||||||
void GraphicsView::resetScale()
|
}
|
||||||
{
|
|
||||||
setTransform(resetScale(transform()));
|
void GraphicsView::fitInView(const QRectF &rect, Qt::AspectRatioMode aspectRadioMode)
|
||||||
applyTransformationModeByScaleFactor();
|
{
|
||||||
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
|
QGraphicsView::fitInView(rect, aspectRadioMode);
|
||||||
}
|
applyTransformationModeByScaleFactor();
|
||||||
|
}
|
||||||
void GraphicsView::fitInView(const QRectF &rect, Qt::AspectRatioMode aspectRadioMode)
|
|
||||||
{
|
void GraphicsView::fitByOrientation(Qt::Orientation ori, bool scaleDownOnly)
|
||||||
QGraphicsView::fitInView(rect, aspectRadioMode);
|
{
|
||||||
applyTransformationModeByScaleFactor();
|
resetScale();
|
||||||
}
|
|
||||||
|
QRectF viewRect = this->viewport()->rect();
|
||||||
void GraphicsView::fitByOrientation(Qt::Orientation ori, bool scaleDownOnly)
|
QRectF imageRect = transform().mapRect(sceneRect());
|
||||||
{
|
QSize viewSize = viewRect.size().toSize();
|
||||||
resetScale();
|
|
||||||
|
qreal ratio;
|
||||||
QRectF viewRect = this->viewport()->rect().adjusted(2, 2, -2, -2);
|
|
||||||
QRectF imageRect = transform().mapRect(sceneRect());
|
if (ori == Qt::Horizontal) {
|
||||||
|
// Horizontal fit means fit by width
|
||||||
qreal ratio;
|
if (scaleDownOnly && imageRect.width() <= viewSize.width()) {
|
||||||
|
// Image width already fits, no scaling needed
|
||||||
if (ori == Qt::Horizontal) {
|
ratio = 1;
|
||||||
ratio = viewRect.width() / imageRect.width();
|
} else {
|
||||||
} else {
|
ratio = viewRect.width() / imageRect.width();
|
||||||
ratio = viewRect.height() / imageRect.height();
|
}
|
||||||
}
|
} else {
|
||||||
|
// Vertical fit means fit by height
|
||||||
if (scaleDownOnly && ratio > 1) ratio = 1;
|
if (scaleDownOnly && imageRect.height() <= viewSize.height()) {
|
||||||
|
// Image height already fits, no scaling needed
|
||||||
scale(ratio, ratio);
|
ratio = 1;
|
||||||
centerOn(imageRect.top(), 0);
|
} else {
|
||||||
m_enableFitInView = false;
|
ratio = viewRect.height() / imageRect.height();
|
||||||
|
}
|
||||||
applyTransformationModeByScaleFactor();
|
}
|
||||||
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
|
|
||||||
}
|
if (ratio != 1) {
|
||||||
|
scale(ratio, ratio);
|
||||||
void GraphicsView::displayScene()
|
}
|
||||||
{
|
|
||||||
if (isSceneBiggerThanView()) {
|
// Position the image correctly based on orientation with rotation consideration
|
||||||
fitInView(sceneRect(), Qt::KeepAspectRatio);
|
QRectF originalScene = sceneRect();
|
||||||
}
|
QTransform currentTransform = transform();
|
||||||
|
|
||||||
m_enableFitInView = true;
|
if (ori == Qt::Horizontal) {
|
||||||
}
|
// For horizontal fit (fit by width), position at top (for tall images)
|
||||||
|
// Find the scene point that corresponds to the top-center of the transformed image
|
||||||
bool GraphicsView::isSceneBiggerThanView() const
|
QPointF sceneTopCenter;
|
||||||
{
|
|
||||||
if (!isThingSmallerThanWindowWith(transform())) {
|
if (qFuzzyIsNull(currentTransform.m12()) && qFuzzyIsNull(currentTransform.m21())) {
|
||||||
return true;
|
// 0° or 180° rotation
|
||||||
} else {
|
if (currentTransform.m11() > 0 && currentTransform.m22() > 0) {
|
||||||
return false;
|
// 0° rotation: use original top-center
|
||||||
}
|
sceneTopCenter = QPointF(originalScene.center().x(), originalScene.top());
|
||||||
}
|
} else {
|
||||||
|
// 180° rotation: the visual "top" is now at the scene bottom
|
||||||
// Automately do fit in view when viewport(window) smaller than image original size.
|
sceneTopCenter = QPointF(originalScene.center().x(), originalScene.bottom());
|
||||||
void GraphicsView::setEnableAutoFitInView(bool enable)
|
}
|
||||||
{
|
} else {
|
||||||
m_enableFitInView = enable;
|
// 90/270 degree rotation: the "top" in view corresponds to left/right in scene
|
||||||
}
|
if (currentTransform.m12() > 0) {
|
||||||
|
// 90 degree: top in view = left in scene
|
||||||
inline double zeroOrOne(double number)
|
sceneTopCenter = QPointF(originalScene.left(), originalScene.center().y());
|
||||||
{
|
} else {
|
||||||
return qFuzzyIsNull(number) ? 0 : (number > 0 ? 1 : -1);
|
// 270 degree: top in view = right in scene
|
||||||
}
|
sceneTopCenter = QPointF(originalScene.right(), originalScene.center().y());
|
||||||
|
}
|
||||||
// Note: this only works if we only have 90 degree based rotation
|
}
|
||||||
// and no shear/translate.
|
centerOn(sceneTopCenter);
|
||||||
QTransform GraphicsView::resetScale(const QTransform & orig)
|
} else {
|
||||||
{
|
// For vertical fit (fit by height), position at left (for wide images)
|
||||||
return QTransform(zeroOrOne(orig.m11()), zeroOrOne(orig.m12()),
|
// Find the scene point that corresponds to the left-center of the transformed image
|
||||||
zeroOrOne(orig.m21()), zeroOrOne(orig.m22()),
|
QPointF sceneLeftCenter;
|
||||||
orig.dx(), orig.dy());
|
|
||||||
}
|
if (qFuzzyIsNull(currentTransform.m12()) && qFuzzyIsNull(currentTransform.m21())) {
|
||||||
|
// 0° or 180° rotation
|
||||||
void GraphicsView::toggleCheckerboard(bool invertCheckerboardColor)
|
if (currentTransform.m11() > 0 && currentTransform.m22() > 0) {
|
||||||
{
|
// 0° rotation: use original left-center
|
||||||
setCheckerboardEnabled(!m_checkerboardEnabled, invertCheckerboardColor);
|
sceneLeftCenter = QPointF(originalScene.left(), originalScene.center().y());
|
||||||
}
|
} else {
|
||||||
|
// 180° rotation: the visual "left" is now at the scene right
|
||||||
void GraphicsView::mousePressEvent(QMouseEvent *event)
|
sceneLeftCenter = QPointF(originalScene.right(), originalScene.center().y());
|
||||||
{
|
}
|
||||||
if (shouldIgnoreMousePressMoveEvent(event)) {
|
} else {
|
||||||
event->ignore();
|
// 90/270 degree rotation: the "left" in view corresponds to top/bottom in scene
|
||||||
// blumia: return here, or the QMouseEvent event transparency won't
|
if (currentTransform.m21() > 0) {
|
||||||
// work if we set a QGraphicsView::ScrollHandDrag drag mode.
|
// 90 degree: left in view = top in scene
|
||||||
return;
|
sceneLeftCenter = QPointF(originalScene.center().x(), originalScene.top());
|
||||||
}
|
} else {
|
||||||
|
// 270 degree: left in view = bottom in scene
|
||||||
return QGraphicsView::mousePressEvent(event);
|
sceneLeftCenter = QPointF(originalScene.center().x(), originalScene.bottom());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
void GraphicsView::mouseMoveEvent(QMouseEvent *event)
|
centerOn(sceneLeftCenter);
|
||||||
{
|
}
|
||||||
if (shouldIgnoreMousePressMoveEvent(event)) {
|
|
||||||
event->ignore();
|
m_enableFitInView = false;
|
||||||
}
|
|
||||||
|
applyTransformationModeByScaleFactor();
|
||||||
return QGraphicsView::mouseMoveEvent(event);
|
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GraphicsView::mouseReleaseEvent(QMouseEvent *event)
|
bool GraphicsView::isLongImage() const
|
||||||
{
|
{
|
||||||
if (event->button() == Qt::ForwardButton || event->button() == Qt::BackButton) {
|
// Get the transformed image size (considering rotation and other transforms)
|
||||||
event->ignore();
|
QRectF transformedRect = transform().mapRect(sceneRect());
|
||||||
} else {
|
QSizeF imageSize = transformedRect.size();
|
||||||
QGraphicsItem *item = itemAt(event->pos());
|
|
||||||
if (!item) {
|
if (imageSize.isEmpty()) return false;
|
||||||
event->ignore();
|
|
||||||
}
|
qreal aspectRatio = imageSize.width() / imageSize.height();
|
||||||
}
|
|
||||||
|
// Check if aspect ratio exceeds 5:2 (wide) or 2:5 (tall)
|
||||||
return QGraphicsView::mouseReleaseEvent(event);
|
return aspectRatio > 2.5 || aspectRatio < 0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GraphicsView::wheelEvent(QWheelEvent *event)
|
void GraphicsView::fitLongImage()
|
||||||
{
|
{
|
||||||
event->ignore();
|
QRectF transformedRect = transform().mapRect(sceneRect());
|
||||||
// blumia: no need for calling parent method.
|
|
||||||
}
|
if (transformedRect.width() < transformedRect.height()) {
|
||||||
|
fitByOrientation(Qt::Horizontal, true);
|
||||||
void GraphicsView::resizeEvent(QResizeEvent *event)
|
} else {
|
||||||
{
|
fitByOrientation(Qt::Vertical, true);
|
||||||
if (m_enableFitInView) {
|
}
|
||||||
bool originalSizeSmallerThanWindow = isThingSmallerThanWindowWith(resetScale(transform()));
|
}
|
||||||
if (originalSizeSmallerThanWindow && scaleFactor() >= 1) {
|
|
||||||
// no longer need to do fitInView()
|
void GraphicsView::displayScene()
|
||||||
// but we leave the m_enableFitInView value unchanged in case
|
{
|
||||||
// user resize down the window again.
|
if (shouldAvoidTransform()) {
|
||||||
} else if (originalSizeSmallerThanWindow && scaleFactor() < 1) {
|
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
|
||||||
resetScale();
|
return;
|
||||||
} else {
|
}
|
||||||
fitInView(sceneRect(), Qt::KeepAspectRatio);
|
|
||||||
}
|
// Check if should apply long image mode
|
||||||
} else {
|
if (Settings::instance()->autoLongImageMode() && isLongImage()) {
|
||||||
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
|
m_longImageMode = true;
|
||||||
}
|
m_firstUserMediaLoaded = true;
|
||||||
return QGraphicsView::resizeEvent(event);
|
if (isSceneBiggerThanView()) fitLongImage();
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
void GraphicsView::dragEnterEvent(QDragEnterEvent *event)
|
|
||||||
{
|
if (isSceneBiggerThanView()) {
|
||||||
if (event->mimeData()->hasUrls() || event->mimeData()->hasImage() || event->mimeData()->hasText()) {
|
// Do fit-in-view
|
||||||
event->acceptProposedAction();
|
fitInView(sceneRect(), Qt::KeepAspectRatio);
|
||||||
} else {
|
// After fitInView, the image should fit the window, so hide navigator
|
||||||
event->ignore();
|
emit navigatorViewRequired(false, transform());
|
||||||
}
|
} else {
|
||||||
// qDebug() << event->mimeData() << "Drag Enter Event"
|
// Image is already smaller than window, no navigator needed
|
||||||
// << event->mimeData()->hasUrls() << event->mimeData()->hasImage()
|
emit navigatorViewRequired(false, transform());
|
||||||
// << event->mimeData()->formats() << event->mimeData()->hasFormat("text/uri-list");
|
}
|
||||||
|
|
||||||
return QGraphicsView::dragEnterEvent(event);
|
m_longImageMode = false;
|
||||||
}
|
m_enableFitInView = true;
|
||||||
|
m_firstUserMediaLoaded = true;
|
||||||
void GraphicsView::dragMoveEvent(QDragMoveEvent *event)
|
}
|
||||||
{
|
|
||||||
Q_UNUSED(event)
|
bool GraphicsView::isSceneBiggerThanView() const
|
||||||
// by default, QGraphicsView/Scene will ignore the action if there are no QGraphicsItem under cursor.
|
{
|
||||||
// We actually doesn't care and would like to keep the drag event as-is, so just do nothing here.
|
if (!isThingSmallerThanWindowWith(transform())) {
|
||||||
}
|
return true;
|
||||||
|
} else {
|
||||||
void GraphicsView::dropEvent(QDropEvent *event)
|
return false;
|
||||||
{
|
}
|
||||||
event->acceptProposedAction();
|
}
|
||||||
|
|
||||||
const QMimeData * mimeData = event->mimeData();
|
// Automately do fit in view when viewport(window) smaller than image original size.
|
||||||
|
void GraphicsView::setEnableAutoFitInView(bool enable)
|
||||||
if (mimeData->hasUrls()) {
|
{
|
||||||
const QList<QUrl> &urls = mimeData->urls();
|
m_enableFitInView = enable;
|
||||||
if (urls.isEmpty()) {
|
}
|
||||||
showText(tr("File url list is empty"));
|
|
||||||
} else {
|
void GraphicsView::setLongImageMode(bool enable)
|
||||||
showFileFromPath(urls.first().toLocalFile(), true);
|
{
|
||||||
}
|
m_longImageMode = enable;
|
||||||
} else if (mimeData->hasImage()) {
|
}
|
||||||
QImage img = qvariant_cast<QImage>(mimeData->imageData());
|
|
||||||
QPixmap pixmap = QPixmap::fromImage(img);
|
bool GraphicsView::avoidResetTransform() const
|
||||||
if (pixmap.isNull()) {
|
{
|
||||||
showText(tr("Image data is invalid"));
|
return m_avoidResetTransform;
|
||||||
} else {
|
}
|
||||||
showImage(pixmap);
|
|
||||||
}
|
void GraphicsView::setAvoidResetTransform(bool avoidReset)
|
||||||
} else if (mimeData->hasText()) {
|
{
|
||||||
showText(mimeData->text());
|
m_avoidResetTransform = avoidReset;
|
||||||
} else {
|
}
|
||||||
showText(tr("Not supported mimedata: %1").arg(mimeData->formats().first()));
|
|
||||||
}
|
inline double zeroOrOne(double number)
|
||||||
}
|
{
|
||||||
|
return qFuzzyIsNull(number) ? 0 : (number > 0 ? 1 : -1);
|
||||||
bool GraphicsView::isThingSmallerThanWindowWith(const QTransform &transform) const
|
}
|
||||||
{
|
|
||||||
return rect().size().expandedTo(transform.mapRect(sceneRect()).size().toSize())
|
// Note: this only works if we only have 90 degree based rotation
|
||||||
== rect().size();
|
// and no shear/translate.
|
||||||
}
|
QTransform GraphicsView::resetScale(const QTransform & orig)
|
||||||
|
{
|
||||||
bool GraphicsView::shouldIgnoreMousePressMoveEvent(const QMouseEvent *event) const
|
return QTransform(zeroOrOne(orig.m11()), zeroOrOne(orig.m12()),
|
||||||
{
|
zeroOrOne(orig.m21()), zeroOrOne(orig.m22()),
|
||||||
if (event->buttons() == Qt::NoButton) {
|
orig.dx(), orig.dy());
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
void GraphicsView::toggleCheckerboard(bool invertCheckerboardColor)
|
||||||
QGraphicsItem *item = itemAt(event->pos());
|
{
|
||||||
if (!item) {
|
setCheckerboardEnabled(!m_checkerboardEnabled, invertCheckerboardColor);
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
void GraphicsView::mousePressEvent(QMouseEvent *event)
|
||||||
if (isThingSmallerThanWindowWith(transform())) {
|
{
|
||||||
return true;
|
if (shouldIgnoreMousePressMoveEvent(event)) {
|
||||||
}
|
event->ignore();
|
||||||
|
// blumia: return here, or the QMouseEvent event transparency won't
|
||||||
return false;
|
// work if we set a QGraphicsView::ScrollHandDrag drag mode.
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
void GraphicsView::setCheckerboardEnabled(bool enabled, bool invertColor)
|
|
||||||
{
|
return QGraphicsView::mousePressEvent(event);
|
||||||
m_checkerboardEnabled = enabled;
|
}
|
||||||
m_isLastCheckerboardColorInverted = invertColor;
|
|
||||||
if (m_checkerboardEnabled) {
|
void GraphicsView::mouseMoveEvent(QMouseEvent *event)
|
||||||
// Prepare background check-board pattern
|
{
|
||||||
QPixmap tilePixmap(0x20, 0x20);
|
if (shouldIgnoreMousePressMoveEvent(event)) {
|
||||||
tilePixmap.fill(invertColor ? QColor(220, 220, 220, 170) : QColor(35, 35, 35, 170));
|
event->ignore();
|
||||||
QPainter tilePainter(&tilePixmap);
|
}
|
||||||
COMPAT_CONSTCOLOR QColor color(45, 45, 45, 170);
|
|
||||||
COMPAT_CONSTCOLOR QColor invertedColor(210, 210, 210, 170);
|
return QGraphicsView::mouseMoveEvent(event);
|
||||||
tilePainter.fillRect(0, 0, 0x10, 0x10, invertColor ? invertedColor : color);
|
}
|
||||||
tilePainter.fillRect(0x10, 0x10, 0x10, 0x10, invertColor ? invertedColor : color);
|
|
||||||
tilePainter.end();
|
void GraphicsView::mouseReleaseEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
setBackgroundBrush(tilePixmap);
|
if (event->button() == Qt::ForwardButton || event->button() == Qt::BackButton) {
|
||||||
} else {
|
event->ignore();
|
||||||
setBackgroundBrush(Qt::transparent);
|
} else {
|
||||||
}
|
QGraphicsItem *item = itemAt(event->pos());
|
||||||
}
|
if (!item) {
|
||||||
|
event->ignore();
|
||||||
void GraphicsView::applyTransformationModeByScaleFactor()
|
}
|
||||||
{
|
}
|
||||||
if (this->scaleFactor() < 1) {
|
|
||||||
scene()->trySetTransformationMode(Qt::SmoothTransformation, this->scaleFactor());
|
return QGraphicsView::mouseReleaseEvent(event);
|
||||||
} else {
|
}
|
||||||
scene()->trySetTransformationMode(Qt::FastTransformation, this->scaleFactor());
|
|
||||||
}
|
void GraphicsView::wheelEvent(QWheelEvent *event)
|
||||||
}
|
{
|
||||||
|
event->ignore();
|
||||||
|
// blumia: no need for calling parent method.
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphicsView::resizeEvent(QResizeEvent *event)
|
||||||
|
{
|
||||||
|
if (m_longImageMode) {
|
||||||
|
// In long image mode, reapply long image logic on resize
|
||||||
|
// We directly apply the long image mode logic without rechecking
|
||||||
|
// if we should enter long image mode, as the mode is already active
|
||||||
|
fitLongImage();
|
||||||
|
} else if (m_enableFitInView) {
|
||||||
|
bool originalSizeSmallerThanWindow = isThingSmallerThanWindowWith(resetScale(transform()));
|
||||||
|
if (originalSizeSmallerThanWindow && scaleFactor() >= 1) {
|
||||||
|
// no longer need to do fitInView()
|
||||||
|
// but we leave the m_enableFitInView value unchanged in case
|
||||||
|
// user resize down the window again.
|
||||||
|
} else if (originalSizeSmallerThanWindow && scaleFactor() < 1) {
|
||||||
|
resetScale();
|
||||||
|
} else {
|
||||||
|
fitInView(sceneRect(), Qt::KeepAspectRatio);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
|
||||||
|
}
|
||||||
|
return QGraphicsView::resizeEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GraphicsView::isThingSmallerThanWindowWith(const QTransform &transform) const
|
||||||
|
{
|
||||||
|
return rect().size().expandedTo(transform.mapRect(sceneRect()).size().toSize())
|
||||||
|
== rect().size();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GraphicsView::shouldIgnoreMousePressMoveEvent(const QMouseEvent *event) const
|
||||||
|
{
|
||||||
|
if (event->buttons() == Qt::NoButton) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGraphicsItem *item = itemAt(event->pos());
|
||||||
|
if (!item) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isThingSmallerThanWindowWith(transform())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphicsView::setCheckerboardEnabled(bool enabled, bool invertColor)
|
||||||
|
{
|
||||||
|
m_checkerboardEnabled = enabled;
|
||||||
|
bool isLightCheckerboard = Settings::instance()->useLightCheckerboard() ^ invertColor;
|
||||||
|
if (m_checkerboardEnabled) {
|
||||||
|
// Prepare background check-board pattern
|
||||||
|
QPixmap tilePixmap(0x20, 0x20);
|
||||||
|
tilePixmap.fill(isLightCheckerboard ? QColor(220, 220, 220, 170) : QColor(35, 35, 35, 170));
|
||||||
|
QPainter tilePainter(&tilePixmap);
|
||||||
|
constexpr QColor color(45, 45, 45, 170);
|
||||||
|
constexpr QColor invertedColor(210, 210, 210, 170);
|
||||||
|
tilePainter.fillRect(0, 0, 0x10, 0x10, isLightCheckerboard ? invertedColor : color);
|
||||||
|
tilePainter.fillRect(0x10, 0x10, 0x10, 0x10, isLightCheckerboard ? invertedColor : color);
|
||||||
|
tilePainter.end();
|
||||||
|
|
||||||
|
setBackgroundBrush(tilePixmap);
|
||||||
|
} else {
|
||||||
|
setBackgroundBrush(Qt::transparent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphicsView::applyTransformationModeByScaleFactor()
|
||||||
|
{
|
||||||
|
if (this->scaleFactor() < 1) {
|
||||||
|
scene()->trySetTransformationMode(Qt::SmoothTransformation, this->scaleFactor());
|
||||||
|
} else {
|
||||||
|
scene()->trySetTransformationMode(Qt::FastTransformation, this->scaleFactor());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GraphicsView::shouldAvoidTransform() const
|
||||||
|
{
|
||||||
|
return m_firstUserMediaLoaded && m_avoidResetTransform;
|
||||||
|
}
|
||||||
|
|||||||
@ -1,77 +1,85 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#ifndef GRAPHICSVIEW_H
|
#ifndef GRAPHICSVIEW_H
|
||||||
#define GRAPHICSVIEW_H
|
#define GRAPHICSVIEW_H
|
||||||
|
|
||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
class GraphicsScene;
|
class GraphicsScene;
|
||||||
class GraphicsView : public QGraphicsView
|
class GraphicsView : public QGraphicsView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GraphicsView(QWidget *parent = nullptr);
|
GraphicsView(QWidget *parent = nullptr);
|
||||||
|
|
||||||
void showFileFromPath(const QString &filePath, bool requestGallery = false);
|
void showFileFromPath(const QString &filePath);
|
||||||
|
|
||||||
void showImage(const QPixmap &pixmap);
|
void showImage(const QPixmap &pixmap);
|
||||||
void showImage(const QImage &image);
|
void showImage(const QImage &image);
|
||||||
void showText(const QString &text);
|
void showText(const QString &text);
|
||||||
void showSvg(const QString &filepath);
|
void showSvg(const QString &filepath);
|
||||||
void showAnimated(const QString &filepath);
|
void showAnimated(const QString &filepath);
|
||||||
|
|
||||||
GraphicsScene * scene() const;
|
GraphicsScene * scene() const;
|
||||||
void setScene(GraphicsScene *scene);
|
void setScene(GraphicsScene *scene);
|
||||||
|
|
||||||
qreal scaleFactor() const;
|
qreal scaleFactor() const;
|
||||||
|
|
||||||
void resetTransform();
|
void resetTransform();
|
||||||
void zoomView(qreal scaleFactor);
|
void zoomView(qreal scaleFactor);
|
||||||
void rotateView(bool clockwise = true);
|
void rotateView(bool clockwise = true);
|
||||||
void flipView(bool horizontal = true);
|
void flipView(bool horizontal = true);
|
||||||
void resetScale();
|
void resetScale();
|
||||||
void fitInView(const QRectF &rect, Qt::AspectRatioMode aspectRadioMode = Qt::IgnoreAspectRatio);
|
void fitInView(const QRectF &rect, Qt::AspectRatioMode aspectRadioMode = Qt::IgnoreAspectRatio);
|
||||||
void fitByOrientation(Qt::Orientation ori = Qt::Horizontal, bool scaleDownOnly = false);
|
void fitByOrientation(Qt::Orientation ori = Qt::Horizontal, bool scaleDownOnly = false);
|
||||||
|
|
||||||
void displayScene();
|
void displayScene();
|
||||||
bool isSceneBiggerThanView() const;
|
bool isSceneBiggerThanView() const;
|
||||||
void setEnableAutoFitInView(bool enable = true);
|
void setEnableAutoFitInView(bool enable = true);
|
||||||
|
void setLongImageMode(bool enable = true);
|
||||||
static QTransform resetScale(const QTransform & orig);
|
|
||||||
|
bool avoidResetTransform() const;
|
||||||
signals:
|
void setAvoidResetTransform(bool avoidReset);
|
||||||
void navigatorViewRequired(bool required, QTransform transform);
|
|
||||||
void viewportRectChanged();
|
static QTransform resetScale(const QTransform & orig);
|
||||||
void requestGallery(const QString &filePath);
|
|
||||||
|
// Long image mode support
|
||||||
public slots:
|
bool isLongImage() const;
|
||||||
void toggleCheckerboard(bool invertCheckerboardColor = false);
|
void fitLongImage();
|
||||||
|
|
||||||
private:
|
signals:
|
||||||
void mousePressEvent(QMouseEvent * event) override;
|
void navigatorViewRequired(bool required, QTransform transform);
|
||||||
void mouseMoveEvent(QMouseEvent * event) override;
|
void viewportRectChanged();
|
||||||
void mouseReleaseEvent(QMouseEvent * event) override;
|
|
||||||
void wheelEvent(QWheelEvent *event) override;
|
public slots:
|
||||||
void resizeEvent(QResizeEvent *event) override;
|
void toggleCheckerboard(bool invertCheckerboardColor = false);
|
||||||
|
|
||||||
void dragEnterEvent(QDragEnterEvent *event) override;
|
private:
|
||||||
void dragMoveEvent(QDragMoveEvent *event) override;
|
void mousePressEvent(QMouseEvent * event) override;
|
||||||
void dropEvent(QDropEvent *event) override;
|
void mouseMoveEvent(QMouseEvent * event) override;
|
||||||
|
void mouseReleaseEvent(QMouseEvent * event) override;
|
||||||
bool isThingSmallerThanWindowWith(const QTransform &transform) const;
|
void wheelEvent(QWheelEvent *event) override;
|
||||||
bool shouldIgnoreMousePressMoveEvent(const QMouseEvent *event) const;
|
void resizeEvent(QResizeEvent *event) override;
|
||||||
void setCheckerboardEnabled(bool enabled, bool invertColor = false);
|
|
||||||
void applyTransformationModeByScaleFactor();
|
bool isThingSmallerThanWindowWith(const QTransform &transform) const;
|
||||||
|
bool shouldIgnoreMousePressMoveEvent(const QMouseEvent *event) const;
|
||||||
// Consider switch to 3 state for "no fit", "always fit" and "fit when view is smaller"?
|
void setCheckerboardEnabled(bool enabled, bool invertColor = false);
|
||||||
// ... or even more? e.g. "fit/snap width" things...
|
void applyTransformationModeByScaleFactor();
|
||||||
// Currently it's "no fit" when it's false and "fit when view is smaller" when it's true.
|
|
||||||
bool m_enableFitInView = false;
|
inline bool shouldAvoidTransform() const;
|
||||||
bool m_checkerboardEnabled = false;
|
|
||||||
bool m_isLastCheckerboardColorInverted = false;
|
// Consider switch to 3 state for "no fit", "always fit" and "fit when view is smaller"?
|
||||||
};
|
// ... or even more? e.g. "fit/snap width" things...
|
||||||
|
// Currently it's "no fit" when it's false and "fit when view is smaller" when it's true.
|
||||||
#endif // GRAPHICSVIEW_H
|
bool m_enableFitInView = false;
|
||||||
|
bool m_longImageMode = false;
|
||||||
|
bool m_avoidResetTransform = false;
|
||||||
|
bool m_checkerboardEnabled = false;
|
||||||
|
bool m_useLightCheckerboard = false;
|
||||||
|
bool m_firstUserMediaLoaded = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // GRAPHICSVIEW_H
|
||||||
|
|||||||
163
app/main.cpp
163
app/main.cpp
@ -1,60 +1,103 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
#include "playlistmanager.h"
|
#include "playlistmanager.h"
|
||||||
|
#include "settings.h"
|
||||||
#include <QApplication>
|
|
||||||
#include <QCommandLineParser>
|
#ifdef Q_OS_MACOS
|
||||||
#include <QDir>
|
#include "fileopeneventhandler.h"
|
||||||
#include <QTranslator>
|
#endif // Q_OS_MACOS
|
||||||
#include <QUrl>
|
|
||||||
|
#include <QApplication>
|
||||||
// QM_FILE_INSTALL_DIR should be defined from the CMakeLists file.
|
#include <QCommandLineParser>
|
||||||
#ifndef QM_FILE_INSTALL_DIR
|
#include <QDir>
|
||||||
#define QM_FILE_INSTALL_DIR ":/i18n/"
|
#include <QTranslator>
|
||||||
#endif // QM_FILE_INSTALL_DIR
|
#include <QUrl>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
using namespace Qt::Literals::StringLiterals;
|
||||||
{
|
|
||||||
QApplication a(argc, argv);
|
int main(int argc, char *argv[])
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
{
|
||||||
a.setAttribute(Qt::ApplicationAttribute::AA_UseHighDpiPixmaps);
|
QCoreApplication::setApplicationName(u"Pineapple Pictures"_s);
|
||||||
#endif
|
QCoreApplication::setApplicationVersion(PPIC_VERSION_STRING);
|
||||||
|
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Settings::instance()->hiDpiScaleFactorBehavior());
|
||||||
QTranslator translator;
|
|
||||||
QString qmDir;
|
QApplication a(argc, argv);
|
||||||
#ifdef _WIN32
|
|
||||||
qmDir = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath("translations");
|
QTranslator translator;
|
||||||
#else
|
#if defined(TRANSLATION_RESOURCE_EMBEDDING)
|
||||||
qmDir = QT_STRINGIFY(QM_FILE_INSTALL_DIR);
|
const QString qmDir = u":/i18n/"_s;
|
||||||
#endif
|
#elif defined(QM_FILE_INSTALL_ABSOLUTE_DIR)
|
||||||
if (translator.load(QString("PineapplePictures_%1").arg(QLocale::system().name()), qmDir)) {
|
const QString qmDir = QT_STRINGIFY(QM_FILE_INSTALL_ABSOLUTE_DIR);
|
||||||
a.installTranslator(&translator);
|
#else
|
||||||
}
|
const QString qmDir = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath("translations");
|
||||||
a.setApplicationName("Pineapple Pictures");
|
#endif
|
||||||
a.setApplicationDisplayName(QCoreApplication::translate("main", "Pineapple Pictures"));
|
if (translator.load(QLocale(), u"PineapplePictures"_s, u"_"_s, qmDir)) {
|
||||||
|
QCoreApplication::installTranslator(&translator);
|
||||||
// parse commandline arguments
|
}
|
||||||
QCommandLineParser parser;
|
|
||||||
parser.addPositionalArgument("File list", QCoreApplication::translate("main", "File list."));
|
QGuiApplication::setApplicationDisplayName(QCoreApplication::translate("main", "Pineapple Pictures"));
|
||||||
parser.addHelpOption();
|
|
||||||
|
// commandline options
|
||||||
parser.process(a);
|
QCommandLineOption supportedImageFormats(u"supported-image-formats"_s, QCoreApplication::translate("main", "List supported image format suffixes, and quit program."));
|
||||||
|
// parse commandline arguments
|
||||||
MainWindow w;
|
QCommandLineParser parser;
|
||||||
w.show();
|
parser.addOption(supportedImageFormats);
|
||||||
|
parser.addPositionalArgument("File list", QCoreApplication::translate("main", "File list."));
|
||||||
QStringList urlStrList = parser.positionalArguments();
|
parser.addHelpOption();
|
||||||
QList<QUrl> && urlList = PlaylistManager::convertToUrlList(urlStrList);
|
parser.process(a);
|
||||||
|
|
||||||
if (!urlList.isEmpty()) {
|
if (parser.isSet(supportedImageFormats)) {
|
||||||
w.showUrls(urlList);
|
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
|
||||||
}
|
fputs(qPrintable(MainWindow::supportedImageFormats().join(QChar('\n'))), stdout);
|
||||||
|
::exit(EXIT_SUCCESS);
|
||||||
w.initWindowSize();
|
#else
|
||||||
|
QCommandLineParser::showMessageAndExit(QCommandLineParser::MessageType::Information,
|
||||||
return a.exec();
|
MainWindow::supportedImageFormats().join(QChar('\n')));
|
||||||
}
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
MainWindow w;
|
||||||
|
w.show();
|
||||||
|
|
||||||
|
#ifdef Q_OS_MACOS
|
||||||
|
FileOpenEventHandler * fileOpenEventHandler = new FileOpenEventHandler(&a);
|
||||||
|
a.installEventFilter(fileOpenEventHandler);
|
||||||
|
a.connect(fileOpenEventHandler, &FileOpenEventHandler::fileOpen, [&w](const QUrl & url){
|
||||||
|
if (w.isHidden()) {
|
||||||
|
w.setWindowOpacity(1);
|
||||||
|
w.showNormal();
|
||||||
|
} else {
|
||||||
|
w.activateWindow();
|
||||||
|
}
|
||||||
|
w.showUrls({url});
|
||||||
|
w.initWindowSize();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Handle dock icon clicks to show hidden window
|
||||||
|
a.connect(&a, &QApplication::applicationStateChanged, [&w](Qt::ApplicationState state) {
|
||||||
|
if (state == Qt::ApplicationActive && w.isHidden()) {
|
||||||
|
w.showUrls({});
|
||||||
|
w.galleryCurrent(true, true);
|
||||||
|
w.setWindowOpacity(1);
|
||||||
|
w.showNormal();
|
||||||
|
w.raise();
|
||||||
|
w.activateWindow();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
#endif // Q_OS_MACOS
|
||||||
|
|
||||||
|
QStringList urlStrList = parser.positionalArguments();
|
||||||
|
QList<QUrl> && urlList = PlaylistManager::convertToUrlList(urlStrList);
|
||||||
|
|
||||||
|
if (!urlList.isEmpty()) {
|
||||||
|
w.showUrls(urlList);
|
||||||
|
}
|
||||||
|
|
||||||
|
w.initWindowSize();
|
||||||
|
|
||||||
|
return QApplication::exec();
|
||||||
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
@ -32,19 +32,25 @@
|
|||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
#include <QFileSystemWatcher>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
#include <QStringBuilder>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
#ifdef HAVE_QTDBUS
|
#ifdef HAVE_QTDBUS
|
||||||
#include <QDBusInterface>
|
#include <QDBusInterface>
|
||||||
#include <QDBusConnectionInterface>
|
#include <QDBusConnectionInterface>
|
||||||
#endif // HAVE_QTDBUS
|
#endif // HAVE_QTDBUS
|
||||||
|
|
||||||
|
using namespace Qt::Literals::StringLiterals;
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent)
|
MainWindow::MainWindow(QWidget *parent)
|
||||||
: FramelessWindow(parent)
|
: FramelessWindow(parent)
|
||||||
, m_am(new ActionManager)
|
, m_am(new ActionManager)
|
||||||
, m_pm(new PlaylistManager(PlaylistManager::PL_SAMEFOLDER, this))
|
, m_pm(new PlaylistManager(this))
|
||||||
|
, m_fileSystemWatcher(new QFileSystemWatcher(this))
|
||||||
{
|
{
|
||||||
if (Settings::instance()->stayOnTop()) {
|
if (Settings::instance()->stayOnTop()) {
|
||||||
this->setWindowFlag(Qt::WindowStaysOnTopHint);
|
this->setWindowFlag(Qt::WindowStaysOnTopHint);
|
||||||
@ -52,23 +58,24 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
|
|
||||||
this->setAttribute(Qt::WA_TranslucentBackground, true);
|
this->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||||
this->setMinimumSize(350, 330);
|
this->setMinimumSize(350, 330);
|
||||||
this->setWindowIcon(QIcon(":/icons/app-icon.svg"));
|
this->setWindowIcon(QIcon(u":/icons/app-icon.svg"_s));
|
||||||
this->setMouseTracking(true);
|
this->setMouseTracking(true);
|
||||||
|
this->setAcceptDrops(true);
|
||||||
|
|
||||||
m_pm->setAutoLoadFilterSuffix({"*.jpg", "*.jpeg", "*.jfif", "*.png", "*.gif", "*.svg", "*.bmp", "*.webp"});
|
m_pm->setAutoLoadFilterSuffixes(supportedImageFormats());
|
||||||
|
|
||||||
m_fadeOutAnimation = new QPropertyAnimation(this, "windowOpacity");
|
m_fadeOutAnimation = new QPropertyAnimation(this, "windowOpacity"_ba);
|
||||||
m_fadeOutAnimation->setDuration(300);
|
m_fadeOutAnimation->setDuration(300);
|
||||||
m_fadeOutAnimation->setStartValue(1);
|
m_fadeOutAnimation->setStartValue(1);
|
||||||
m_fadeOutAnimation->setEndValue(0);
|
m_fadeOutAnimation->setEndValue(0);
|
||||||
m_floatUpAnimation = new QPropertyAnimation(this, "geometry");
|
m_floatUpAnimation = new QPropertyAnimation(this, "geometry"_ba);
|
||||||
m_floatUpAnimation->setDuration(300);
|
m_floatUpAnimation->setDuration(300);
|
||||||
m_floatUpAnimation->setEasingCurve(QEasingCurve::OutCirc);
|
m_floatUpAnimation->setEasingCurve(QEasingCurve::OutCirc);
|
||||||
m_exitAnimationGroup = new QParallelAnimationGroup(this);
|
m_exitAnimationGroup = new QParallelAnimationGroup(this);
|
||||||
m_exitAnimationGroup->addAnimation(m_fadeOutAnimation);
|
m_exitAnimationGroup->addAnimation(m_fadeOutAnimation);
|
||||||
m_exitAnimationGroup->addAnimation(m_floatUpAnimation);
|
m_exitAnimationGroup->addAnimation(m_floatUpAnimation);
|
||||||
connect(m_exitAnimationGroup, &QParallelAnimationGroup::finished,
|
connect(m_exitAnimationGroup, &QParallelAnimationGroup::finished,
|
||||||
this, &QWidget::close);
|
this, &MainWindow::doCloseWindow);
|
||||||
|
|
||||||
GraphicsScene * scene = new GraphicsScene(this);
|
GraphicsScene * scene = new GraphicsScene(this);
|
||||||
|
|
||||||
@ -83,7 +90,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
m_gv->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio);
|
m_gv->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio);
|
||||||
|
|
||||||
connect(m_graphicsView, &GraphicsView::navigatorViewRequired,
|
connect(m_graphicsView, &GraphicsView::navigatorViewRequired,
|
||||||
this, [ = ](bool required, const QTransform & tf){
|
this, [this](bool required, const QTransform & tf){
|
||||||
m_gv->setTransform(GraphicsView::resetScale(tf));
|
m_gv->setTransform(GraphicsView::resetScale(tf));
|
||||||
m_gv->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio);
|
m_gv->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio);
|
||||||
m_gv->setVisible(required);
|
m_gv->setVisible(required);
|
||||||
@ -93,9 +100,6 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
connect(m_graphicsView, &GraphicsView::viewportRectChanged,
|
connect(m_graphicsView, &GraphicsView::viewportRectChanged,
|
||||||
m_gv, &NavigatorView::updateMainViewportRegion);
|
m_gv, &NavigatorView::updateMainViewportRegion);
|
||||||
|
|
||||||
connect(m_graphicsView, &GraphicsView::requestGallery,
|
|
||||||
this, &MainWindow::loadGalleryBySingleLocalFile);
|
|
||||||
|
|
||||||
m_closeButton = new ToolButton(true, m_graphicsView);
|
m_closeButton = new ToolButton(true, m_graphicsView);
|
||||||
m_closeButton->setIconSize(QSize(32, 32));
|
m_closeButton->setIconSize(QSize(32, 32));
|
||||||
m_closeButton->setFixedSize(QSize(50, 50));
|
m_closeButton->setFixedSize(QSize(50, 50));
|
||||||
@ -135,9 +139,13 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
m_gv->setOpacity(0, false);
|
m_gv->setOpacity(0, false);
|
||||||
m_closeButton->setOpacity(0, false);
|
m_closeButton->setOpacity(0, false);
|
||||||
|
|
||||||
connect(m_pm, &PlaylistManager::loaded, this, [this](int galleryFileCount) {
|
connect(m_pm, &PlaylistManager::totalCountChanged, this, &MainWindow::updateGalleryButtonsVisibility);
|
||||||
m_prevButton->setVisible(galleryFileCount > 1);
|
|
||||||
m_nextButton->setVisible(galleryFileCount > 1);
|
connect(m_pm->model(), &PlaylistModel::modelReset, this, std::bind(&MainWindow::galleryCurrent, this, false, false));
|
||||||
|
connect(m_pm, &PlaylistManager::currentIndexChanged, this, std::bind(&MainWindow::galleryCurrent, this, true, false));
|
||||||
|
|
||||||
|
connect(m_fileSystemWatcher, &QFileSystemWatcher::fileChanged, this, [this](){
|
||||||
|
QTimer::singleShot(500, this, std::bind(&MainWindow::galleryCurrent, this, false, true));
|
||||||
});
|
});
|
||||||
|
|
||||||
QShortcut * fullscreenShorucut = new QShortcut(QKeySequence(QKeySequence::FullScreen), this);
|
QShortcut * fullscreenShorucut = new QShortcut(QKeySequence(QKeySequence::FullScreen), this);
|
||||||
@ -148,7 +156,15 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
|
|
||||||
QTimer::singleShot(0, this, [this](){
|
QTimer::singleShot(0, this, [this](){
|
||||||
m_am->setupShortcuts();
|
m_am->setupShortcuts();
|
||||||
|
Settings::instance()->applyUserShortcuts(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// allow some mouse events can go through these widgets for resizing window.
|
||||||
|
installResizeCapture(m_closeButton);
|
||||||
|
installResizeCapture(m_graphicsView);
|
||||||
|
installResizeCapture(m_graphicsView->viewport());
|
||||||
|
installResizeCapture(m_gv);
|
||||||
|
installResizeCapture(m_gv->viewport());
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
@ -159,15 +175,20 @@ MainWindow::~MainWindow()
|
|||||||
void MainWindow::showUrls(const QList<QUrl> &urls)
|
void MainWindow::showUrls(const QList<QUrl> &urls)
|
||||||
{
|
{
|
||||||
if (!urls.isEmpty()) {
|
if (!urls.isEmpty()) {
|
||||||
|
const QUrl & firstUrl = urls.first();
|
||||||
if (urls.count() == 1) {
|
if (urls.count() == 1) {
|
||||||
m_graphicsView->showFileFromPath(urls.first().toLocalFile(), true);
|
const QString lowerCaseUrlPath(firstUrl.path().toLower());
|
||||||
} else {
|
if (lowerCaseUrlPath.endsWith(".m3u8") || lowerCaseUrlPath.endsWith(".m3u")) {
|
||||||
m_graphicsView->showFileFromPath(urls.first().toLocalFile(), false);
|
m_pm->loadM3U8Playlist(firstUrl);
|
||||||
m_pm->setPlaylist(urls);
|
galleryCurrent(true, true);
|
||||||
m_pm->setCurrentIndex(0);
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
m_graphicsView->showFileFromPath(firstUrl.toLocalFile());
|
||||||
|
m_pm->loadPlaylist(urls);
|
||||||
} else {
|
} else {
|
||||||
m_graphicsView->showText(tr("File url list is empty"));
|
m_graphicsView->showText(tr("File url list is empty"));
|
||||||
|
m_pm->setPlaylist(urls);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,6 +204,9 @@ void MainWindow::initWindowSize()
|
|||||||
case Settings::WindowSizeBehavior::Maximized:
|
case Settings::WindowSizeBehavior::Maximized:
|
||||||
showMaximized();
|
showMaximized();
|
||||||
break;
|
break;
|
||||||
|
case Settings::WindowSizeBehavior::Windowed:
|
||||||
|
showNormal();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
adjustWindowSizeBySceneRect();
|
adjustWindowSizeBySceneRect();
|
||||||
break;
|
break;
|
||||||
@ -191,14 +215,14 @@ void MainWindow::initWindowSize()
|
|||||||
|
|
||||||
void MainWindow::adjustWindowSizeBySceneRect()
|
void MainWindow::adjustWindowSizeBySceneRect()
|
||||||
{
|
{
|
||||||
if (m_pm->count() < 1) return;
|
if (m_pm->totalCount() < 1) return;
|
||||||
|
|
||||||
QSize sceneSize = m_graphicsView->sceneRect().toRect().size();
|
QSize sceneSize = m_graphicsView->sceneRect().toRect().size();
|
||||||
QSize sceneSizeWithMargins = sceneSize + QSize(130, 125);
|
QSize sceneSizeWithMargins = sceneSize + QSize(130, 125);
|
||||||
|
|
||||||
if (m_graphicsView->scaleFactor() < 1 || size().expandedTo(sceneSizeWithMargins) != size()) {
|
if (m_graphicsView->scaleFactor() < 1 || size().expandedTo(sceneSizeWithMargins) != size()) {
|
||||||
// if it scaled down by the resize policy:
|
// if it scaled down by the resize policy:
|
||||||
QSize screenSize = qApp->screenAt(QCursor::pos())->availableSize();
|
QSize screenSize = window()->screen()->availableSize();
|
||||||
if (screenSize.expandedTo(sceneSize) == screenSize) {
|
if (screenSize.expandedTo(sceneSize) == screenSize) {
|
||||||
// we can show the picture by increase the window size.
|
// we can show the picture by increase the window size.
|
||||||
QSize finalSize = (screenSize.expandedTo(sceneSizeWithMargins) == screenSize) ?
|
QSize finalSize = (screenSize.expandedTo(sceneSizeWithMargins) == screenSize) ?
|
||||||
@ -222,46 +246,70 @@ void MainWindow::adjustWindowSizeBySceneRect()
|
|||||||
// can be empty if it is NOT from a local file.
|
// can be empty if it is NOT from a local file.
|
||||||
QUrl MainWindow::currentImageFileUrl() const
|
QUrl MainWindow::currentImageFileUrl() const
|
||||||
{
|
{
|
||||||
QUrl url;
|
return m_pm->urlByIndex(m_pm->curIndex());
|
||||||
std::tie(std::ignore, url) = m_pm->currentFileUrl();
|
|
||||||
|
|
||||||
return url;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::clearGallery()
|
void MainWindow::clearGallery()
|
||||||
{
|
{
|
||||||
m_pm->clear();
|
m_pm->setPlaylist({});
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::loadGalleryBySingleLocalFile(const QString &path)
|
|
||||||
{
|
|
||||||
m_pm->setCurrentFile(path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::galleryPrev()
|
void MainWindow::galleryPrev()
|
||||||
{
|
{
|
||||||
int index;
|
const bool loopGallery = Settings::instance()->loopGallery();
|
||||||
QString filePath;
|
if (!loopGallery && m_pm->isFirstIndex()) return;
|
||||||
std::tie(index, filePath) = m_pm->previousFile();
|
|
||||||
|
|
||||||
if (index >= 0) {
|
QModelIndex index = m_pm->previousIndex();
|
||||||
m_graphicsView->showFileFromPath(filePath, false);
|
if (index.isValid()) {
|
||||||
m_pm->setCurrentIndex(index);
|
m_pm->setCurrentIndex(index);
|
||||||
|
m_graphicsView->showFileFromPath(m_pm->localFileByIndex(index));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::galleryNext()
|
void MainWindow::galleryNext()
|
||||||
{
|
{
|
||||||
int index;
|
const bool loopGallery = Settings::instance()->loopGallery();
|
||||||
QString filePath;
|
if (!loopGallery && m_pm->isLastIndex()) return;
|
||||||
std::tie(index, filePath) = m_pm->nextFile();
|
|
||||||
|
|
||||||
if (index >= 0) {
|
QModelIndex index = m_pm->nextIndex();
|
||||||
m_graphicsView->showFileFromPath(filePath, false);
|
if (index.isValid()) {
|
||||||
m_pm->setCurrentIndex(index);
|
m_pm->setCurrentIndex(index);
|
||||||
|
m_graphicsView->showFileFromPath(m_pm->localFileByIndex(index));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only use this to update minor information.
|
||||||
|
void MainWindow::galleryCurrent(bool showLoadImageHintWhenEmpty, bool reloadImage)
|
||||||
|
{
|
||||||
|
QModelIndex index = m_pm->curIndex();
|
||||||
|
bool shouldResetfileWatcher = true;
|
||||||
|
if (index.isValid()) {
|
||||||
|
const QString & localFilePath(m_pm->localFileByIndex(index));
|
||||||
|
if (reloadImage) m_graphicsView->showFileFromPath(localFilePath);
|
||||||
|
shouldResetfileWatcher = !updateFileWatcher(localFilePath);
|
||||||
|
setWindowTitle(m_pm->urlByIndex(index).fileName());
|
||||||
|
} else if (showLoadImageHintWhenEmpty && m_pm->totalCount() <= 0) {
|
||||||
|
m_graphicsView->showText(QCoreApplication::translate("GraphicsScene", "Drag image here"));
|
||||||
|
}
|
||||||
|
|
||||||
|
updateGalleryButtonsVisibility();
|
||||||
|
|
||||||
|
if (shouldResetfileWatcher) updateFileWatcher();
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList MainWindow::supportedImageFormats()
|
||||||
|
{
|
||||||
|
QStringList formatFilters {
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
|
||||||
|
QStringLiteral("*.jfif")
|
||||||
|
#endif // QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
|
||||||
|
};
|
||||||
|
for (const QByteArray &item : QImageReader::supportedImageFormats()) {
|
||||||
|
formatFilters.append(QStringLiteral("*.") % QString::fromLocal8Bit(item));
|
||||||
|
}
|
||||||
|
return formatFilters;
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::showEvent(QShowEvent *event)
|
void MainWindow::showEvent(QShowEvent *event)
|
||||||
{
|
{
|
||||||
updateWidgetsPosition();
|
updateWidgetsPosition();
|
||||||
@ -269,7 +317,7 @@ void MainWindow::showEvent(QShowEvent *event)
|
|||||||
return FramelessWindow::showEvent(event);
|
return FramelessWindow::showEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::enterEvent(QT_ENTER_EVENT *event)
|
void MainWindow::enterEvent(QEnterEvent *event)
|
||||||
{
|
{
|
||||||
m_bottomButtonGroup->setOpacity(1);
|
m_bottomButtonGroup->setOpacity(1);
|
||||||
m_gv->setOpacity(1);
|
m_gv->setOpacity(1);
|
||||||
@ -308,14 +356,10 @@ void MainWindow::mousePressEvent(QMouseEvent *event)
|
|||||||
|
|
||||||
void MainWindow::mouseMoveEvent(QMouseEvent *event)
|
void MainWindow::mouseMoveEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
if (event->buttons() & Qt::LeftButton && m_clickedOnWindow && !isMaximized()) {
|
if (event->buttons() & Qt::LeftButton && m_clickedOnWindow && !isMaximized() && !isFullScreen()) {
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
|
||||||
if (!window()->windowHandle()->startSystemMove()) {
|
if (!window()->windowHandle()->startSystemMove()) {
|
||||||
move(event->globalPos() - m_oldMousePos);
|
move(event->globalPosition().toPoint() - m_oldMousePos);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
move(event->globalPos() - m_oldMousePos);
|
|
||||||
#endif // QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
|
||||||
event->accept();
|
event->accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -355,6 +399,10 @@ void MainWindow::mouseDoubleClickEvent(QMouseEvent *event)
|
|||||||
toggleMaximize();
|
toggleMaximize();
|
||||||
event->accept();
|
event->accept();
|
||||||
break;
|
break;
|
||||||
|
case Settings::DoubleClickBehavior::FullScreen:
|
||||||
|
toggleFullscreen();
|
||||||
|
event->accept();
|
||||||
|
break;
|
||||||
case Settings::DoubleClickBehavior::Ignore:
|
case Settings::DoubleClickBehavior::Ignore:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -412,12 +460,11 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event)
|
|||||||
QMenu * menu = new QMenu;
|
QMenu * menu = new QMenu;
|
||||||
QMenu * copyMenu = new QMenu(tr("&Copy"));
|
QMenu * copyMenu = new QMenu(tr("&Copy"));
|
||||||
QUrl currentFileUrl = currentImageFileUrl();
|
QUrl currentFileUrl = currentImageFileUrl();
|
||||||
QImage clipboardImage;
|
|
||||||
QUrl clipboardFileUrl;
|
|
||||||
|
|
||||||
QAction * copyPixmap = m_am->actionCopyPixmap;
|
QAction * copyPixmap = m_am->actionCopyPixmap;
|
||||||
QAction * copyFilePath = m_am->actionCopyFilePath;
|
QAction * copyFilePath = m_am->actionCopyFilePath;
|
||||||
|
|
||||||
|
copyMenu->setIcon(QIcon::fromTheme(u"edit-copy"_s));
|
||||||
copyMenu->addAction(copyPixmap);
|
copyMenu->addAction(copyPixmap);
|
||||||
if (currentFileUrl.isValid()) {
|
if (currentFileUrl.isValid()) {
|
||||||
copyMenu->addAction(copyFilePath);
|
copyMenu->addAction(copyFilePath);
|
||||||
@ -425,6 +472,8 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event)
|
|||||||
|
|
||||||
QAction * paste = m_am->actionPaste;
|
QAction * paste = m_am->actionPaste;
|
||||||
|
|
||||||
|
QAction * trash = m_am->actionTrash;
|
||||||
|
|
||||||
QAction * stayOnTopMode = m_am->actionToggleStayOnTop;
|
QAction * stayOnTopMode = m_am->actionToggleStayOnTop;
|
||||||
stayOnTopMode->setCheckable(true);
|
stayOnTopMode->setCheckable(true);
|
||||||
stayOnTopMode->setChecked(stayOnTop());
|
stayOnTopMode->setChecked(stayOnTop());
|
||||||
@ -433,6 +482,10 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event)
|
|||||||
protectedMode->setCheckable(true);
|
protectedMode->setCheckable(true);
|
||||||
protectedMode->setChecked(m_protectedMode);
|
protectedMode->setChecked(m_protectedMode);
|
||||||
|
|
||||||
|
QAction * avoidResetTransform = m_am->actionToggleAvoidResetTransform;
|
||||||
|
avoidResetTransform->setCheckable(true);
|
||||||
|
avoidResetTransform->setChecked(m_graphicsView->avoidResetTransform());
|
||||||
|
|
||||||
QAction * toggleSettings = m_am->actionSettings;
|
QAction * toggleSettings = m_am->actionSettings;
|
||||||
QAction * helpAction = m_am->actionHelp;
|
QAction * helpAction = m_am->actionHelp;
|
||||||
QAction * propertiesAction = m_am->actionProperties;
|
QAction * propertiesAction = m_am->actionProperties;
|
||||||
@ -461,12 +514,14 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event)
|
|||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
menu->addAction(stayOnTopMode);
|
menu->addAction(stayOnTopMode);
|
||||||
menu->addAction(protectedMode);
|
menu->addAction(protectedMode);
|
||||||
|
menu->addAction(avoidResetTransform);
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
menu->addAction(toggleSettings);
|
menu->addAction(toggleSettings);
|
||||||
menu->addAction(helpAction);
|
menu->addAction(helpAction);
|
||||||
if (currentFileUrl.isValid()) {
|
if (currentFileUrl.isValid()) {
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
if (currentFileUrl.isLocalFile()) {
|
if (currentFileUrl.isLocalFile()) {
|
||||||
|
menu->addAction(trash);
|
||||||
menu->addAction(m_am->actionLocateInFileManager);
|
menu->addAction(m_am->actionLocateInFileManager);
|
||||||
}
|
}
|
||||||
menu->addAction(propertiesAction);
|
menu->addAction(propertiesAction);
|
||||||
@ -478,6 +533,50 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event)
|
|||||||
return FramelessWindow::contextMenuEvent(event);
|
return FramelessWindow::contextMenuEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::dragEnterEvent(QDragEnterEvent *event)
|
||||||
|
{
|
||||||
|
if (event->mimeData()->hasUrls() || event->mimeData()->hasImage() || event->mimeData()->hasText()) {
|
||||||
|
event->acceptProposedAction();
|
||||||
|
} else {
|
||||||
|
event->ignore();
|
||||||
|
}
|
||||||
|
|
||||||
|
return FramelessWindow::dragEnterEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::dragMoveEvent(QDragMoveEvent *event)
|
||||||
|
{
|
||||||
|
Q_UNUSED(event)
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::dropEvent(QDropEvent *event)
|
||||||
|
{
|
||||||
|
event->acceptProposedAction();
|
||||||
|
|
||||||
|
const QMimeData * mimeData = event->mimeData();
|
||||||
|
|
||||||
|
if (mimeData->hasUrls()) {
|
||||||
|
const QList<QUrl> &urls = mimeData->urls();
|
||||||
|
if (urls.isEmpty()) {
|
||||||
|
m_graphicsView->showText(tr("File url list is empty"));
|
||||||
|
} else {
|
||||||
|
showUrls(urls);
|
||||||
|
}
|
||||||
|
} else if (mimeData->hasImage()) {
|
||||||
|
QImage img = qvariant_cast<QImage>(mimeData->imageData());
|
||||||
|
QPixmap pixmap = QPixmap::fromImage(img);
|
||||||
|
if (pixmap.isNull()) {
|
||||||
|
m_graphicsView->showText(tr("Image data is invalid"));
|
||||||
|
} else {
|
||||||
|
m_graphicsView->showImage(pixmap);
|
||||||
|
}
|
||||||
|
} else if (mimeData->hasText()) {
|
||||||
|
m_graphicsView->showText(mimeData->text());
|
||||||
|
} else {
|
||||||
|
m_graphicsView->showText(tr("Not supported mimedata: %1").arg(mimeData->formats().first()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::centerWindow()
|
void MainWindow::centerWindow()
|
||||||
{
|
{
|
||||||
this->setGeometry(
|
this->setGeometry(
|
||||||
@ -485,19 +584,23 @@ void MainWindow::centerWindow()
|
|||||||
Qt::LeftToRight,
|
Qt::LeftToRight,
|
||||||
Qt::AlignCenter,
|
Qt::AlignCenter,
|
||||||
this->size(),
|
this->size(),
|
||||||
qApp->screenAt(QCursor::pos())->geometry()
|
window()->screen()->availableGeometry()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::closeWindow()
|
void MainWindow::closeWindow()
|
||||||
{
|
{
|
||||||
QRect windowRect(this->geometry());
|
if (Settings::instance()->useBuiltInCloseAnimation()) {
|
||||||
m_floatUpAnimation->setStartValue(windowRect);
|
QRect windowRect(this->geometry());
|
||||||
m_floatUpAnimation->setEndValue(windowRect.adjusted(0, -80, 0, 0));
|
m_floatUpAnimation->setStartValue(windowRect);
|
||||||
m_floatUpAnimation->setStartValue(QRect(this->geometry().x(), this->geometry().y(), this->geometry().width(), this->geometry().height()));
|
m_floatUpAnimation->setEndValue(windowRect.adjusted(0, -80, 0, 0));
|
||||||
m_floatUpAnimation->setEndValue(QRect(this->geometry().x(), this->geometry().y()-80, this->geometry().width(), this->geometry().height()));
|
m_floatUpAnimation->setStartValue(QRect(this->geometry().x(), this->geometry().y(), this->geometry().width(), this->geometry().height()));
|
||||||
m_exitAnimationGroup->start();
|
m_floatUpAnimation->setEndValue(QRect(this->geometry().x(), this->geometry().y()-80, this->geometry().width(), this->geometry().height()));
|
||||||
|
m_exitAnimationGroup->start();
|
||||||
|
} else {
|
||||||
|
doCloseWindow();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::updateWidgetsPosition()
|
void MainWindow::updateWidgetsPosition()
|
||||||
@ -515,8 +618,7 @@ void MainWindow::toggleProtectedMode()
|
|||||||
{
|
{
|
||||||
m_protectedMode = !m_protectedMode;
|
m_protectedMode = !m_protectedMode;
|
||||||
m_closeButton->setVisible(!m_protectedMode);
|
m_closeButton->setVisible(!m_protectedMode);
|
||||||
m_prevButton->setVisible(!m_protectedMode);
|
updateGalleryButtonsVisibility();
|
||||||
m_nextButton->setVisible(!m_protectedMode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::toggleStayOnTop()
|
void MainWindow::toggleStayOnTop()
|
||||||
@ -525,6 +627,11 @@ void MainWindow::toggleStayOnTop()
|
|||||||
show();
|
show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::toggleAvoidResetTransform()
|
||||||
|
{
|
||||||
|
m_graphicsView->setAvoidResetTransform(!m_graphicsView->avoidResetTransform());
|
||||||
|
}
|
||||||
|
|
||||||
bool MainWindow::stayOnTop() const
|
bool MainWindow::stayOnTop() const
|
||||||
{
|
{
|
||||||
return windowFlags().testFlag(Qt::WindowStaysOnTopHint);
|
return windowFlags().testFlag(Qt::WindowStaysOnTopHint);
|
||||||
@ -593,6 +700,7 @@ void MainWindow::on_actionActualSize_triggered()
|
|||||||
{
|
{
|
||||||
m_graphicsView->resetScale();
|
m_graphicsView->resetScale();
|
||||||
m_graphicsView->setEnableAutoFitInView(false);
|
m_graphicsView->setEnableAutoFitInView(false);
|
||||||
|
m_graphicsView->setLongImageMode(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionToggleMaximize_triggered()
|
void MainWindow::on_actionToggleMaximize_triggered()
|
||||||
@ -621,6 +729,7 @@ void MainWindow::on_actionFitInView_triggered()
|
|||||||
{
|
{
|
||||||
m_graphicsView->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio);
|
m_graphicsView->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio);
|
||||||
m_graphicsView->setEnableAutoFitInView(m_graphicsView->scaleFactor() <= 1);
|
m_graphicsView->setEnableAutoFitInView(m_graphicsView->scaleFactor() <= 1);
|
||||||
|
m_graphicsView->setLongImageMode(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionFitByWidth_triggered()
|
void MainWindow::on_actionFitByWidth_triggered()
|
||||||
@ -628,6 +737,12 @@ void MainWindow::on_actionFitByWidth_triggered()
|
|||||||
m_graphicsView->fitByOrientation();
|
m_graphicsView->fitByOrientation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionFitLongImage_triggered()
|
||||||
|
{
|
||||||
|
m_graphicsView->setLongImageMode(true);
|
||||||
|
m_graphicsView->fitLongImage();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionCopyPixmap_triggered()
|
void MainWindow::on_actionCopyPixmap_triggered()
|
||||||
{
|
{
|
||||||
QClipboard *cb = QApplication::clipboard();
|
QClipboard *cb = QApplication::clipboard();
|
||||||
@ -665,12 +780,34 @@ void MainWindow::on_actionPaste_triggered()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!clipboardImage.isNull()) {
|
if (!clipboardImage.isNull()) {
|
||||||
|
setWindowTitle(tr("Image From Clipboard"));
|
||||||
m_graphicsView->showImage(clipboardImage);
|
m_graphicsView->showImage(clipboardImage);
|
||||||
clearGallery();
|
clearGallery();
|
||||||
} else if (clipboardFileUrl.isValid()) {
|
} else if (clipboardFileUrl.isValid()) {
|
||||||
QString localFile(clipboardFileUrl.toLocalFile());
|
m_graphicsView->showFileFromPath(clipboardFileUrl.toLocalFile());
|
||||||
m_graphicsView->showFileFromPath(localFile, true);
|
m_pm->loadPlaylist(clipboardFileUrl);
|
||||||
m_pm->setCurrentFile(localFile);
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionTrash_triggered()
|
||||||
|
{
|
||||||
|
QModelIndex index = m_pm->curIndex();
|
||||||
|
if (!m_pm->urlByIndex(index).isLocalFile()) return;
|
||||||
|
|
||||||
|
QFile file(m_pm->localFileByIndex(index));
|
||||||
|
QFileInfo fileInfo(file.fileName());
|
||||||
|
|
||||||
|
QMessageBox::StandardButton result = QMessageBox::question(this, tr("Move to Trash"),
|
||||||
|
tr("Are you sure you want to move \"%1\" to recycle bin?").arg(fileInfo.fileName()));
|
||||||
|
if (result == QMessageBox::Yes) {
|
||||||
|
bool succ = file.moveToTrash();
|
||||||
|
if (!succ) {
|
||||||
|
QMessageBox::warning(this, tr("Failed to move file to trash"),
|
||||||
|
tr("Move to trash failed, it might caused by file permission issue, file system limitation, or platform limitation."));
|
||||||
|
} else {
|
||||||
|
m_pm->removeAt(index);
|
||||||
|
galleryCurrent(true, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -684,7 +821,12 @@ void MainWindow::on_actionRotateClockwise_triggered()
|
|||||||
{
|
{
|
||||||
m_graphicsView->rotateView();
|
m_graphicsView->rotateView();
|
||||||
m_graphicsView->displayScene();
|
m_graphicsView->displayScene();
|
||||||
m_gv->setVisible(false);
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionRotateCounterClockwise_triggered()
|
||||||
|
{
|
||||||
|
m_graphicsView->rotateView(false);
|
||||||
|
m_graphicsView->displayScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionPrevPicture_triggered()
|
void MainWindow::on_actionPrevPicture_triggered()
|
||||||
@ -697,6 +839,16 @@ void MainWindow::on_actionNextPicture_triggered()
|
|||||||
galleryNext();
|
galleryNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionTogglePauseAnimation_triggered()
|
||||||
|
{
|
||||||
|
m_graphicsView->scene()->togglePauseAnimation();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionAnimationNextFrame_triggered()
|
||||||
|
{
|
||||||
|
m_graphicsView->scene()->skipAnimationFrame(1);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionToggleStayOnTop_triggered()
|
void MainWindow::on_actionToggleStayOnTop_triggered()
|
||||||
{
|
{
|
||||||
toggleStayOnTop();
|
toggleStayOnTop();
|
||||||
@ -707,6 +859,11 @@ void MainWindow::on_actionToggleProtectMode_triggered()
|
|||||||
toggleProtectedMode();
|
toggleProtectedMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionToggleAvoidResetTransform_triggered()
|
||||||
|
{
|
||||||
|
toggleAvoidResetTransform();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionSettings_triggered()
|
void MainWindow::on_actionSettings_triggered()
|
||||||
{
|
{
|
||||||
SettingsDialog * sd = new SettingsDialog(this);
|
SettingsDialog * sd = new SettingsDialog(this);
|
||||||
@ -754,9 +911,9 @@ void MainWindow::on_actionLocateInFileManager_triggered()
|
|||||||
QDesktopServices::openUrl(folderUrl);
|
QDesktopServices::openUrl(folderUrl);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QDBusInterface fm1Iface(QStringLiteral("org.freedesktop.FileManager1"),
|
QDBusInterface fm1Iface(u"org.freedesktop.FileManager1"_s,
|
||||||
QStringLiteral("/org/freedesktop/FileManager1"),
|
u"/org/freedesktop/FileManager1"_s,
|
||||||
QStringLiteral("org.freedesktop.FileManager1"));
|
u"org.freedesktop.FileManager1"_s);
|
||||||
fm1Iface.setTimeout(1000);
|
fm1Iface.setTimeout(1000);
|
||||||
fm1Iface.callWithArgumentList(QDBus::Block, "ShowItems", {
|
fm1Iface.callWithArgumentList(QDBus::Block, "ShowItems", {
|
||||||
QStringList{currentFileUrl.toString()},
|
QStringList{currentFileUrl.toString()},
|
||||||
@ -774,3 +931,29 @@ void MainWindow::on_actionQuitApp_triggered()
|
|||||||
{
|
{
|
||||||
quitAppAction(false);
|
quitAppAction(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::doCloseWindow()
|
||||||
|
{
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
this->hide();
|
||||||
|
#else
|
||||||
|
this->close();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MainWindow::updateFileWatcher(const QString &basePath)
|
||||||
|
{
|
||||||
|
m_fileSystemWatcher->removePaths(m_fileSystemWatcher->files());
|
||||||
|
if (!basePath.isEmpty()) return m_fileSystemWatcher->addPath(basePath);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::updateGalleryButtonsVisibility()
|
||||||
|
{
|
||||||
|
const int galleryFileCount = m_pm->totalCount();
|
||||||
|
const bool loopGallery = Settings::instance()->loopGallery();
|
||||||
|
m_prevButton->setVisible(!m_protectedMode && galleryFileCount > 1);
|
||||||
|
m_nextButton->setVisible(!m_protectedMode && galleryFileCount > 1);
|
||||||
|
m_prevButton->setEnabled(loopGallery || !m_pm->isFirstIndex());
|
||||||
|
m_nextButton->setEnabled(loopGallery || !m_pm->isLastIndex());
|
||||||
|
}
|
||||||
|
|||||||
255
app/mainwindow.h
255
app/mainwindow.h
@ -1,120 +1,135 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#ifndef MAINWINDOW_H
|
#ifndef MAINWINDOW_H
|
||||||
#define MAINWINDOW_H
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
#include "framelesswindow.h"
|
#include "framelesswindow.h"
|
||||||
|
|
||||||
#include <QParallelAnimationGroup>
|
#include <QParallelAnimationGroup>
|
||||||
#include <QPropertyAnimation>
|
#include <QPropertyAnimation>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
QT_BEGIN_NAMESPACE
|
||||||
typedef QEnterEvent QT_ENTER_EVENT;
|
class QGraphicsOpacityEffect;
|
||||||
#else
|
class QGraphicsView;
|
||||||
typedef QEvent QT_ENTER_EVENT;
|
class QFileSystemWatcher;
|
||||||
#endif // QT_VERSION_CHECK(6, 0, 0)
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
class ActionManager;
|
||||||
class QGraphicsOpacityEffect;
|
class PlaylistManager;
|
||||||
class QGraphicsView;
|
class ToolButton;
|
||||||
QT_END_NAMESPACE
|
class GraphicsView;
|
||||||
|
class NavigatorView;
|
||||||
class ActionManager;
|
class BottomButtonGroup;
|
||||||
class PlaylistManager;
|
class MainWindow : public FramelessWindow
|
||||||
class ToolButton;
|
{
|
||||||
class GraphicsView;
|
Q_OBJECT
|
||||||
class NavigatorView;
|
|
||||||
class BottomButtonGroup;
|
public:
|
||||||
class MainWindow : public FramelessWindow
|
explicit MainWindow(QWidget *parent = nullptr);
|
||||||
{
|
~MainWindow() override;
|
||||||
Q_OBJECT
|
|
||||||
|
void showUrls(const QList<QUrl> &urls);
|
||||||
public:
|
void initWindowSize();
|
||||||
explicit MainWindow(QWidget *parent = nullptr);
|
void adjustWindowSizeBySceneRect();
|
||||||
~MainWindow() override;
|
QUrl currentImageFileUrl() const;
|
||||||
|
|
||||||
void showUrls(const QList<QUrl> &urls);
|
void clearGallery();
|
||||||
void initWindowSize();
|
void galleryPrev();
|
||||||
void adjustWindowSizeBySceneRect();
|
void galleryNext();
|
||||||
QUrl currentImageFileUrl() const;
|
void galleryCurrent(bool showLoadImageHintWhenEmpty, bool reloadImage);
|
||||||
|
|
||||||
void clearGallery();
|
static QStringList supportedImageFormats();
|
||||||
void loadGalleryBySingleLocalFile(const QString &path);
|
|
||||||
void galleryPrev();
|
protected slots:
|
||||||
void galleryNext();
|
void showEvent(QShowEvent *event) override;
|
||||||
|
void enterEvent(QEnterEvent *event) override;
|
||||||
protected slots:
|
void leaveEvent(QEvent *event) override;
|
||||||
void showEvent(QShowEvent *event) override;
|
void mousePressEvent(QMouseEvent *event) override;
|
||||||
void enterEvent(QT_ENTER_EVENT *event) override;
|
void mouseMoveEvent(QMouseEvent *event) override;
|
||||||
void leaveEvent(QEvent *event) override;
|
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||||
void mousePressEvent(QMouseEvent *event) override;
|
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||||
void mouseMoveEvent(QMouseEvent *event) override;
|
void wheelEvent(QWheelEvent *event) override;
|
||||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
void resizeEvent(QResizeEvent *event) override;
|
||||||
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||||
void wheelEvent(QWheelEvent *event) override;
|
void dragEnterEvent(QDragEnterEvent *event) override;
|
||||||
void resizeEvent(QResizeEvent *event) override;
|
void dragMoveEvent(QDragMoveEvent *event) override;
|
||||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
void dropEvent(QDropEvent *event) override;
|
||||||
|
|
||||||
void centerWindow();
|
void centerWindow();
|
||||||
void closeWindow();
|
void closeWindow();
|
||||||
void updateWidgetsPosition();
|
void updateWidgetsPosition();
|
||||||
void toggleProtectedMode();
|
void toggleProtectedMode();
|
||||||
void toggleStayOnTop();
|
void toggleStayOnTop();
|
||||||
bool stayOnTop() const;
|
void toggleAvoidResetTransform();
|
||||||
bool canPaste() const;
|
bool stayOnTop() const;
|
||||||
void quitAppAction(bool force = false);
|
bool canPaste() const;
|
||||||
void toggleFullscreen();
|
void quitAppAction(bool force = false);
|
||||||
void toggleMaximize();
|
void toggleFullscreen();
|
||||||
|
void toggleMaximize();
|
||||||
protected:
|
|
||||||
QSize sizeHint() const override;
|
protected:
|
||||||
|
QSize sizeHint() const override;
|
||||||
private slots:
|
|
||||||
void on_actionOpen_triggered();
|
private slots:
|
||||||
|
void on_actionOpen_triggered();
|
||||||
void on_actionActualSize_triggered();
|
|
||||||
void on_actionToggleMaximize_triggered();
|
void on_actionActualSize_triggered();
|
||||||
void on_actionZoomIn_triggered();
|
void on_actionToggleMaximize_triggered();
|
||||||
void on_actionZoomOut_triggered();
|
void on_actionZoomIn_triggered();
|
||||||
void on_actionToggleCheckerboard_triggered();
|
void on_actionZoomOut_triggered();
|
||||||
void on_actionRotateClockwise_triggered();
|
void on_actionToggleCheckerboard_triggered();
|
||||||
|
void on_actionRotateClockwise_triggered();
|
||||||
void on_actionPrevPicture_triggered();
|
void on_actionRotateCounterClockwise_triggered();
|
||||||
void on_actionNextPicture_triggered();
|
|
||||||
|
void on_actionPrevPicture_triggered();
|
||||||
void on_actionHorizontalFlip_triggered();
|
void on_actionNextPicture_triggered();
|
||||||
void on_actionFitInView_triggered();
|
|
||||||
void on_actionFitByWidth_triggered();
|
void on_actionTogglePauseAnimation_triggered();
|
||||||
void on_actionCopyPixmap_triggered();
|
void on_actionAnimationNextFrame_triggered();
|
||||||
void on_actionCopyFilePath_triggered();
|
|
||||||
void on_actionPaste_triggered();
|
void on_actionHorizontalFlip_triggered();
|
||||||
void on_actionToggleStayOnTop_triggered();
|
void on_actionFitInView_triggered();
|
||||||
void on_actionToggleProtectMode_triggered();
|
void on_actionFitByWidth_triggered();
|
||||||
void on_actionSettings_triggered();
|
void on_actionFitLongImage_triggered();
|
||||||
void on_actionHelp_triggered();
|
void on_actionCopyPixmap_triggered();
|
||||||
void on_actionProperties_triggered();
|
void on_actionCopyFilePath_triggered();
|
||||||
void on_actionLocateInFileManager_triggered();
|
void on_actionPaste_triggered();
|
||||||
void on_actionQuitApp_triggered();
|
void on_actionTrash_triggered();
|
||||||
|
void on_actionToggleStayOnTop_triggered();
|
||||||
private:
|
void on_actionToggleProtectMode_triggered();
|
||||||
ActionManager *m_am;
|
void on_actionToggleAvoidResetTransform_triggered();
|
||||||
PlaylistManager *m_pm;
|
void on_actionSettings_triggered();
|
||||||
|
void on_actionHelp_triggered();
|
||||||
QPoint m_oldMousePos;
|
void on_actionProperties_triggered();
|
||||||
QPropertyAnimation *m_fadeOutAnimation;
|
void on_actionLocateInFileManager_triggered();
|
||||||
QPropertyAnimation *m_floatUpAnimation;
|
void on_actionQuitApp_triggered();
|
||||||
QParallelAnimationGroup *m_exitAnimationGroup;
|
|
||||||
ToolButton *m_closeButton;
|
void doCloseWindow();
|
||||||
ToolButton *m_prevButton;
|
|
||||||
ToolButton *m_nextButton;
|
private:
|
||||||
GraphicsView *m_graphicsView;
|
bool updateFileWatcher(const QString & basePath = QString());
|
||||||
NavigatorView *m_gv;
|
void updateGalleryButtonsVisibility();
|
||||||
BottomButtonGroup *m_bottomButtonGroup;
|
|
||||||
bool m_protectedMode = false;
|
private:
|
||||||
bool m_clickedOnWindow = false;
|
ActionManager *m_am;
|
||||||
};
|
PlaylistManager *m_pm;
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
QPoint m_oldMousePos;
|
||||||
|
QPropertyAnimation *m_fadeOutAnimation;
|
||||||
|
QPropertyAnimation *m_floatUpAnimation;
|
||||||
|
QParallelAnimationGroup *m_exitAnimationGroup;
|
||||||
|
QFileSystemWatcher *m_fileSystemWatcher;
|
||||||
|
ToolButton *m_closeButton;
|
||||||
|
ToolButton *m_prevButton;
|
||||||
|
ToolButton *m_nextButton;
|
||||||
|
GraphicsView *m_graphicsView;
|
||||||
|
NavigatorView *m_gv;
|
||||||
|
BottomButtonGroup *m_bottomButtonGroup;
|
||||||
|
bool m_protectedMode = false;
|
||||||
|
bool m_clickedOnWindow = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MAINWINDOW_H
|
||||||
|
|||||||
@ -1,110 +1,110 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "metadatadialog.h"
|
#include "metadatadialog.h"
|
||||||
|
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QStyledItemDelegate>
|
#include <QStyledItemDelegate>
|
||||||
#include <QTreeView>
|
#include <QTreeView>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
|
|
||||||
#include "metadatamodel.h"
|
#include "metadatamodel.h"
|
||||||
|
|
||||||
class PropertyTreeView : public QTreeView
|
class PropertyTreeView : public QTreeView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit PropertyTreeView(QWidget* parent) : QTreeView(parent) {}
|
explicit PropertyTreeView(QWidget* parent) : QTreeView(parent) {}
|
||||||
~PropertyTreeView() {}
|
~PropertyTreeView() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void rowsInserted(const QModelIndex& parent, int start, int end) override
|
void rowsInserted(const QModelIndex& parent, int start, int end) override
|
||||||
{
|
{
|
||||||
QTreeView::rowsInserted(parent, start, end);
|
QTreeView::rowsInserted(parent, start, end);
|
||||||
if (!parent.isValid()) {
|
if (!parent.isValid()) {
|
||||||
// we are inserting a section group
|
// we are inserting a section group
|
||||||
for (int row = start; row <= end; ++row) {
|
for (int row = start; row <= end; ++row) {
|
||||||
setupSection(row);
|
setupSection(row);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// we are inserting a property
|
// we are inserting a property
|
||||||
setRowHidden(parent.row(), QModelIndex(), false);
|
setRowHidden(parent.row(), QModelIndex(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void reset() override
|
void reset() override
|
||||||
{
|
{
|
||||||
QTreeView::reset();
|
QTreeView::reset();
|
||||||
if (model()) {
|
if (model()) {
|
||||||
for (int row = 0; row < model()->rowCount(); ++row) {
|
for (int row = 0; row < model()->rowCount(); ++row) {
|
||||||
setupSection(row);
|
setupSection(row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupSection(int row)
|
void setupSection(int row)
|
||||||
{
|
{
|
||||||
expand(model()->index(row, 0));
|
expand(model()->index(row, 0));
|
||||||
setFirstColumnSpanned(row, QModelIndex(), true);
|
setFirstColumnSpanned(row, QModelIndex(), true);
|
||||||
setRowHidden(row, QModelIndex(), !model()->hasChildren(model()->index(row, 0)));
|
setRowHidden(row, QModelIndex(), !model()->hasChildren(model()->index(row, 0)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class PropertyTreeItemDelegate : public QStyledItemDelegate
|
class PropertyTreeItemDelegate : public QStyledItemDelegate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PropertyTreeItemDelegate(QObject* parent)
|
PropertyTreeItemDelegate(QObject* parent)
|
||||||
: QStyledItemDelegate(parent)
|
: QStyledItemDelegate(parent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override
|
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override
|
||||||
{
|
{
|
||||||
QStyleOptionViewItem opt = option;
|
QStyleOptionViewItem opt = option;
|
||||||
if (!index.parent().isValid()) {
|
if (!index.parent().isValid()) {
|
||||||
opt.font.setBold(true);
|
opt.font.setBold(true);
|
||||||
opt.features.setFlag(QStyleOptionViewItem::Alternate);
|
opt.features.setFlag(QStyleOptionViewItem::Alternate);
|
||||||
}
|
}
|
||||||
QStyledItemDelegate::paint(painter, opt, index);
|
QStyledItemDelegate::paint(painter, opt, index);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
MetadataDialog::MetadataDialog(QWidget *parent)
|
MetadataDialog::MetadataDialog(QWidget *parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
, m_treeView(new PropertyTreeView(this))
|
, m_treeView(new PropertyTreeView(this))
|
||||||
{
|
{
|
||||||
m_treeView->setRootIsDecorated(false);
|
m_treeView->setRootIsDecorated(false);
|
||||||
m_treeView->setIndentation(0);
|
m_treeView->setIndentation(0);
|
||||||
m_treeView->setItemDelegate(new PropertyTreeItemDelegate(m_treeView));
|
m_treeView->setItemDelegate(new PropertyTreeItemDelegate(m_treeView));
|
||||||
m_treeView->header()->resizeSection(0, sizeHint().width() / 2);
|
m_treeView->header()->resizeSection(0, sizeHint().width() / 2);
|
||||||
|
|
||||||
setWindowTitle(tr("Image Metadata"));
|
setWindowTitle(tr("Image Metadata"));
|
||||||
|
|
||||||
QDialogButtonBox * buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
|
QDialogButtonBox * buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
|
||||||
|
|
||||||
setLayout(new QVBoxLayout);
|
setLayout(new QVBoxLayout);
|
||||||
layout()->addWidget(m_treeView);
|
layout()->addWidget(m_treeView);
|
||||||
layout()->addWidget(buttonBox);
|
layout()->addWidget(buttonBox);
|
||||||
|
|
||||||
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::close);
|
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::close);
|
||||||
|
|
||||||
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
MetadataDialog::~MetadataDialog()
|
MetadataDialog::~MetadataDialog()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetadataDialog::setMetadataModel(MetadataModel * model)
|
void MetadataDialog::setMetadataModel(MetadataModel * model)
|
||||||
{
|
{
|
||||||
m_treeView->setModel(model);
|
m_treeView->setModel(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
QSize MetadataDialog::sizeHint() const
|
QSize MetadataDialog::sizeHint() const
|
||||||
{
|
{
|
||||||
return QSize(520, 350);
|
return QSize(520, 350);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,30 +1,30 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#ifndef METADATADIALOG_H
|
#ifndef METADATADIALOG_H
|
||||||
#define METADATADIALOG_H
|
#define METADATADIALOG_H
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QTreeView;
|
class QTreeView;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
class MetadataModel;
|
class MetadataModel;
|
||||||
class MetadataDialog : public QDialog
|
class MetadataDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit MetadataDialog(QWidget * parent);
|
explicit MetadataDialog(QWidget * parent);
|
||||||
~MetadataDialog() override;
|
~MetadataDialog() override;
|
||||||
|
|
||||||
void setMetadataModel(MetadataModel * model);
|
void setMetadataModel(MetadataModel * model);
|
||||||
|
|
||||||
QSize sizeHint() const override;
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QTreeView * m_treeView = nullptr;
|
QTreeView * m_treeView = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // METADATADIALOG_H
|
#endif // METADATADIALOG_H
|
||||||
|
|||||||
@ -1,314 +1,320 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "metadatamodel.h"
|
#include "metadatamodel.h"
|
||||||
#include "exiv2wrapper.h"
|
#include "exiv2wrapper.h"
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QImageReader>
|
#include <QImageReader>
|
||||||
|
|
||||||
MetadataModel::MetadataModel(QObject *parent)
|
using namespace Qt::Literals::StringLiterals;
|
||||||
: QAbstractItemModel(parent)
|
|
||||||
{
|
MetadataModel::MetadataModel(QObject *parent)
|
||||||
|
: QAbstractItemModel(parent)
|
||||||
}
|
{
|
||||||
|
|
||||||
MetadataModel::~MetadataModel()
|
}
|
||||||
{
|
|
||||||
|
MetadataModel::~MetadataModel()
|
||||||
}
|
{
|
||||||
|
|
||||||
void MetadataModel::setFile(const QString &imageFilePath)
|
}
|
||||||
{
|
|
||||||
QFileInfo fileInfo(imageFilePath);
|
void MetadataModel::setFile(const QString &imageFilePath)
|
||||||
// It'll be fine if we don't re-use the image reader we pass to the graphics scene for now.
|
{
|
||||||
QImageReader imgReader(imageFilePath);
|
QFileInfo fileInfo(imageFilePath);
|
||||||
imgReader.setAutoTransform(true);
|
// It'll be fine if we don't re-use the image reader we pass to the graphics scene for now.
|
||||||
imgReader.setDecideFormatFromContent(true);
|
QImageReader imgReader(imageFilePath);
|
||||||
|
imgReader.setAutoTransform(true);
|
||||||
const QString & itemTypeString = tr("%1 File").arg(QString(imgReader.format().toUpper()));
|
imgReader.setDecideFormatFromContent(true);
|
||||||
const QString & sizeString = QLocale().formattedDataSize(fileInfo.size());
|
|
||||||
const QString & birthTimeString = QLocale().toString(fileInfo.birthTime(), QLocale::LongFormat);
|
const QString & itemTypeString = tr("%1 File").arg(QString(imgReader.format().toUpper()));
|
||||||
const QString & lastModifiedTimeString = QLocale().toString(fileInfo.lastModified(), QLocale::LongFormat);
|
const QString & sizeString = QLocale().formattedDataSize(fileInfo.size());
|
||||||
const QString & imageDimensionsString = imageSize(imgReader.size());
|
const QString & birthTimeString = QLocale().toString(fileInfo.birthTime(), QLocale::LongFormat);
|
||||||
const QString & imageRatioString = imageSizeRatio(imgReader.size());
|
const QString & lastModifiedTimeString = QLocale().toString(fileInfo.lastModified(), QLocale::LongFormat);
|
||||||
|
const QString & imageDimensionsString = imageSize(imgReader.size());
|
||||||
appendSection(QStringLiteral("Description"), tr("Description", "Section name."));
|
const QString & imageRatioString = imageSizeRatio(imgReader.size());
|
||||||
appendSection(QStringLiteral("Origin"), tr("Origin", "Section name."));
|
|
||||||
appendSection(QStringLiteral("Image"), tr("Image", "Section name."));
|
appendSection(u"Description"_s, tr("Description", "Section name."));
|
||||||
appendSection(QStringLiteral("Camera"), tr("Camera", "Section name."));
|
appendSection(u"Origin"_s, tr("Origin", "Section name."));
|
||||||
appendSection(QStringLiteral("AdvancedPhoto"), tr("Advanced photo", "Section name."));
|
appendSection(u"Image"_s, tr("Image", "Section name."));
|
||||||
appendSection(QStringLiteral("GPS"), tr("GPS", "Section name."));
|
appendSection(u"Camera"_s, tr("Camera", "Section name."));
|
||||||
appendSection(QStringLiteral("File"), tr("File", "Section name."));
|
appendSection(u"AdvancedPhoto"_s, tr("Advanced photo", "Section name."));
|
||||||
|
appendSection(u"GPS"_s, tr("GPS", "Section name."));
|
||||||
if (imgReader.supportsOption(QImageIOHandler::Size)) {
|
appendSection(u"File"_s, tr("File", "Section name."));
|
||||||
appendProperty(QStringLiteral("Image"), QStringLiteral("Image.Dimensions"),
|
|
||||||
tr("Dimensions"), imageDimensionsString);
|
if (imgReader.supportsOption(QImageIOHandler::Size)) {
|
||||||
appendProperty(QStringLiteral("Image"), QStringLiteral("Image.SizeRatio"),
|
appendProperty(u"Image"_s, u"Image.Dimensions"_s,
|
||||||
tr("Aspect ratio"), imageRatioString);
|
tr("Dimensions"), imageDimensionsString);
|
||||||
}
|
appendProperty(u"Image"_s, u"Image.SizeRatio"_s,
|
||||||
if (imgReader.supportsAnimation() && imgReader.imageCount() > 1) {
|
tr("Aspect ratio"), imageRatioString);
|
||||||
appendProperty(QStringLiteral("Image"), QStringLiteral("Image.FrameCount"),
|
}
|
||||||
tr("Frame count"), QString::number(imgReader.imageCount()));
|
if (imgReader.supportsAnimation() && imgReader.imageCount() > 1) {
|
||||||
}
|
appendProperty(u"Image"_s, u"Image.FrameCount"_s,
|
||||||
|
tr("Frame count"), QString::number(imgReader.imageCount()));
|
||||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.Name"),
|
}
|
||||||
tr("Name"), fileInfo.fileName());
|
|
||||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.ItemType"),
|
appendProperty(u"File"_s, u"File.Name"_s,
|
||||||
tr("Item type"), itemTypeString);
|
tr("Name"), fileInfo.fileName());
|
||||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.Path"),
|
appendProperty(u"File"_s, u"File.ItemType"_s,
|
||||||
tr("Folder path"), QDir::toNativeSeparators(fileInfo.path()));
|
tr("Item type"), itemTypeString);
|
||||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.Size"),
|
appendProperty(u"File"_s, u"File.Path"_s,
|
||||||
tr("Size"), sizeString);
|
tr("Folder path"), QDir::toNativeSeparators(fileInfo.path()));
|
||||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.CreatedTime"),
|
appendProperty(u"File"_s, u"File.Size"_s,
|
||||||
tr("Date created"), birthTimeString);
|
tr("Size"), sizeString);
|
||||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.LastModified"),
|
appendProperty(u"File"_s, u"File.CreatedTime"_s,
|
||||||
tr("Date modified"), lastModifiedTimeString);
|
tr("Date created"), birthTimeString);
|
||||||
|
appendProperty(u"File"_s, u"File.LastModified"_s,
|
||||||
Exiv2Wrapper wrapper;
|
tr("Date modified"), lastModifiedTimeString);
|
||||||
if (wrapper.load(imageFilePath)) {
|
|
||||||
wrapper.cacheSections();
|
Exiv2Wrapper wrapper;
|
||||||
|
if (wrapper.load(imageFilePath)) {
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Description"),
|
wrapper.cacheSections();
|
||||||
QStringLiteral("Xmp.dc.title"), tr("Title"), true);
|
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Description"),
|
appendExivPropertyIfExist(wrapper, u"Description"_s,
|
||||||
QStringLiteral("Exif.Image.ImageDescription"), tr("Subject"), true);
|
u"Xmp.dc.title"_s, tr("Title"), true);
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Description"),
|
appendExivPropertyIfExist(wrapper, u"Description"_s,
|
||||||
QStringLiteral("Exif.Image.Rating"), tr("Rating"));
|
u"Exif.Image.ImageDescription"_s, tr("Subject"), true);
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Description"),
|
appendExivPropertyIfExist(wrapper, u"Description"_s,
|
||||||
QStringLiteral("Xmp.dc.subject"), tr("Tags"));
|
u"Exif.Image.Rating"_s, tr("Rating"));
|
||||||
appendPropertyIfNotEmpty(QStringLiteral("Description"), QStringLiteral("Description.Comments"),
|
appendExivPropertyIfExist(wrapper, u"Description"_s,
|
||||||
tr("Comments"), wrapper.comment());
|
u"Xmp.dc.subject"_s, tr("Tags"));
|
||||||
|
appendPropertyIfNotEmpty(u"Description"_s, u"Description.Comments"_s,
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
tr("Comments"), wrapper.comment());
|
||||||
QStringLiteral("Exif.Image.Artist"), tr("Authors"));
|
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
appendExivPropertyIfExist(wrapper, u"Origin"_s,
|
||||||
QStringLiteral("Exif.Photo.DateTimeOriginal"), tr("Date taken"));
|
u"Exif.Image.Artist"_s, tr("Authors"));
|
||||||
// FIXME: We may fetch the same type of metadata from different metadata collection.
|
appendExivPropertyIfExist(wrapper, u"Origin"_s,
|
||||||
// Current implementation is not pretty and may need to do a rework...
|
u"Exif.Photo.DateTimeOriginal"_s, tr("Date taken"));
|
||||||
// appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
// FIXME: We may fetch the same type of metadata from different metadata collection.
|
||||||
// QStringLiteral("Xmp.xmp.CreatorTool"), tr("Program name"));
|
// Current implementation is not pretty and may need to do a rework...
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
// appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
||||||
QStringLiteral("Exif.Image.Software"), tr("Program name"));
|
// QStringLiteral("Xmp.xmp.CreatorTool"), tr("Program name"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
appendExivPropertyIfExist(wrapper, u"Origin"_s,
|
||||||
QStringLiteral("Exif.Image.Copyright"), tr("Copyright"));
|
u"Exif.Image.Software"_s, tr("Program name"));
|
||||||
|
appendExivPropertyIfExist(wrapper, u"Origin"_s,
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Image"),
|
u"Exif.Image.Copyright"_s, tr("Copyright"));
|
||||||
QStringLiteral("Exif.Image.XResolution"), tr("Horizontal resolution"));
|
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Image"),
|
appendExivPropertyIfExist(wrapper, u"Image"_s,
|
||||||
QStringLiteral("Exif.Image.YResolution"), tr("Vertical resolution"));
|
u"Exif.Image.XResolution"_s, tr("Horizontal resolution"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Image"),
|
appendExivPropertyIfExist(wrapper, u"Image"_s,
|
||||||
QStringLiteral("Exif.Image.ResolutionUnit"), tr("Resolution unit"));
|
u"Exif.Image.YResolution"_s, tr("Vertical resolution"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Image"),
|
appendExivPropertyIfExist(wrapper, u"Image"_s,
|
||||||
QStringLiteral("Exif.Photo.ColorSpace"), tr("Colour representation"));
|
u"Exif.Image.ResolutionUnit"_s, tr("Resolution unit"));
|
||||||
|
appendExivPropertyIfExist(wrapper, u"Image"_s,
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
u"Exif.Photo.ColorSpace"_s, tr("Colour representation"));
|
||||||
QStringLiteral("Exif.Image.Make"), tr("Camera maker"));
|
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||||
QStringLiteral("Exif.Image.Model"), tr("Camera model"));
|
u"Exif.Image.Make"_s, tr("Camera maker"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||||
QStringLiteral("Exif.Photo.FNumber"), tr("F-stop"));
|
u"Exif.Image.Model"_s, tr("Camera model"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||||
QStringLiteral("Exif.Photo.ExposureTime"), tr("Exposure time"));
|
u"Exif.Photo.FNumber"_s, tr("F-stop"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||||
QStringLiteral("Exif.Photo.ISOSpeedRatings"), tr("ISO speed"));
|
u"Exif.Photo.ExposureTime"_s, tr("Exposure time"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||||
QStringLiteral("Exif.Photo.ExposureBiasValue"), tr("Exposure bias"));
|
u"Exif.Photo.ISOSpeedRatings"_s, tr("ISO speed"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||||
QStringLiteral("Exif.Photo.FocalLength"), tr("Focal length"));
|
u"Exif.Photo.ExposureBiasValue"_s, tr("Exposure bias"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||||
QStringLiteral("Exif.Photo.MaxApertureValue"), tr("Max aperture"));
|
u"Exif.Photo.FocalLength"_s, tr("Focal length"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||||
QStringLiteral("Exif.Photo.MeteringMode"), tr("Metering mode"));
|
u"Exif.Photo.MaxApertureValue"_s, tr("Max aperture"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||||
QStringLiteral("Exif.Photo.Flash"), tr("Flash mode"));
|
u"Exif.Photo.MeteringMode"_s, tr("Metering mode"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||||
QStringLiteral("Exif.Photo.FocalLengthIn35mmFilm"), tr("35mm focal length"));
|
u"Exif.Photo.SubjectDistance"_s, tr("Subject distance"));
|
||||||
|
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
u"Exif.Photo.Flash"_s, tr("Flash mode"));
|
||||||
QStringLiteral("Exif.Photo.LensModel"), tr("Lens model"));
|
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
u"Exif.Photo.FocalLengthIn35mmFilm"_s, tr("35mm focal length"));
|
||||||
QStringLiteral("Exif.Photo.BrightnessValue"), tr("Brightness"));
|
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||||
QStringLiteral("Exif.Photo.ExposureProgram"), tr("Exposure program"));
|
u"Exif.Photo.LensModel"_s, tr("Lens model"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||||
QStringLiteral("Exif.Photo.Saturation"), tr("Saturation"));
|
u"Exif.Photo.Contrast"_s, tr("Contrast"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||||
QStringLiteral("Exif.Photo.Sharpness"), tr("Sharpness"));
|
u"Exif.Photo.BrightnessValue"_s, tr("Brightness"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||||
QStringLiteral("Exif.Photo.WhiteBalance"), tr("White balance"));
|
u"Exif.Photo.ExposureProgram"_s, tr("Exposure program"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||||
QStringLiteral("Exif.Photo.DigitalZoomRatio"), tr("Digital zoom"));
|
u"Exif.Photo.Saturation"_s, tr("Saturation"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||||
QStringLiteral("Exif.Photo.ExifVersion"), tr("EXIF version"));
|
u"Exif.Photo.Sharpness"_s, tr("Sharpness"));
|
||||||
|
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
u"Exif.Photo.WhiteBalance"_s, tr("White balance"));
|
||||||
QStringLiteral("Exif.GPSInfo.GPSLatitudeRef"), tr("Latitude reference"));
|
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
u"Exif.Photo.DigitalZoomRatio"_s, tr("Digital zoom"));
|
||||||
QStringLiteral("Exif.GPSInfo.GPSLatitude"), tr("Latitude"));
|
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
u"Exif.Photo.ExifVersion"_s, tr("EXIF version"));
|
||||||
QStringLiteral("Exif.GPSInfo.GPSLongitudeRef"), tr("Longitude reference"));
|
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||||
QStringLiteral("Exif.GPSInfo.GPSLongitude"), tr("Longitude"));
|
u"Exif.GPSInfo.GPSLatitudeRef"_s, tr("Latitude reference"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||||
QStringLiteral("Exif.GPSInfo.GPSAltitudeRef"), tr("Altitude reference"));
|
u"Exif.GPSInfo.GPSLatitude"_s, tr("Latitude"));
|
||||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||||
QStringLiteral("Exif.GPSInfo.GPSAltitude"), tr("Altitude"));
|
u"Exif.GPSInfo.GPSLongitudeRef"_s, tr("Longitude reference"));
|
||||||
|
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||||
}
|
u"Exif.GPSInfo.GPSLongitude"_s, tr("Longitude"));
|
||||||
}
|
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||||
|
u"Exif.GPSInfo.GPSAltitudeRef"_s, tr("Altitude reference"));
|
||||||
QString MetadataModel::imageSize(const QSize &size)
|
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||||
{
|
u"Exif.GPSInfo.GPSAltitude"_s, tr("Altitude"));
|
||||||
QString imageSize;
|
|
||||||
|
}
|
||||||
if (size.isValid()) {
|
}
|
||||||
imageSize = tr("%1 x %2").arg(QString::number(size.width()), QString::number(size.height()));
|
|
||||||
} else {
|
QString MetadataModel::imageSize(const QSize &size)
|
||||||
imageSize = QLatin1Char('-');
|
{
|
||||||
}
|
QString imageSize;
|
||||||
|
|
||||||
return imageSize;
|
if (size.isValid()) {
|
||||||
}
|
imageSize = tr("%1 x %2").arg(QString::number(size.width()), QString::number(size.height()));
|
||||||
|
} else {
|
||||||
int simplegcd(int a, int b) {
|
imageSize = QLatin1Char('-');
|
||||||
return b == 0 ? a : simplegcd(b, a % b);
|
}
|
||||||
}
|
|
||||||
|
return imageSize;
|
||||||
QString MetadataModel::imageSizeRatio(const QSize &size)
|
}
|
||||||
{
|
|
||||||
if (!size.isValid()) {
|
int simplegcd(int a, int b) {
|
||||||
return QStringLiteral("-");
|
return b == 0 ? a : simplegcd(b, a % b);
|
||||||
}
|
}
|
||||||
int gcd = simplegcd(size.width(), size.height());
|
|
||||||
return tr("%1 : %2").arg(QString::number(size.width() / gcd), QString::number(size.height() / gcd));
|
QString MetadataModel::imageSizeRatio(const QSize &size)
|
||||||
}
|
{
|
||||||
|
if (!size.isValid()) {
|
||||||
bool MetadataModel::appendSection(const QString §ionKey, QStringView sectionDisplayName)
|
return QStringLiteral("-");
|
||||||
{
|
}
|
||||||
if (m_sections.contains(sectionKey)) {
|
int gcd = simplegcd(size.width(), size.height());
|
||||||
return false;
|
return tr("%1 : %2").arg(QString::number(size.width() / gcd), QString::number(size.height() / gcd));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sections.append(sectionKey);
|
bool MetadataModel::appendSection(const QString §ionKey, QStringView sectionDisplayName)
|
||||||
m_sectionProperties[sectionKey] = qMakePair<QString, QList<QString> >(sectionDisplayName.toString(), {});
|
{
|
||||||
|
if (m_sections.contains(sectionKey)) {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MetadataModel::appendPropertyIfNotEmpty(const QString §ionKey, const QString &propertyKey, const QString &propertyDisplayName, const QString &propertyValue)
|
m_sections.append(sectionKey);
|
||||||
{
|
m_sectionProperties[sectionKey] = qMakePair<QString, QList<QString> >(sectionDisplayName.toString(), {});
|
||||||
if (propertyValue.isEmpty()) return false;
|
|
||||||
|
return true;
|
||||||
return appendProperty(sectionKey, propertyKey, propertyDisplayName, propertyValue);
|
}
|
||||||
}
|
|
||||||
|
bool MetadataModel::appendPropertyIfNotEmpty(const QString §ionKey, const QString &propertyKey, const QString &propertyDisplayName, const QString &propertyValue)
|
||||||
bool MetadataModel::appendProperty(const QString §ionKey, const QString &propertyKey, QStringView propertyDisplayName, QStringView propertyValue)
|
{
|
||||||
{
|
if (propertyValue.isEmpty()) return false;
|
||||||
if (!m_sections.contains(sectionKey)) {
|
|
||||||
return false;
|
return appendProperty(sectionKey, propertyKey, propertyDisplayName, propertyValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QString> & propertyList = m_sectionProperties[sectionKey].second;
|
bool MetadataModel::appendProperty(const QString §ionKey, const QString &propertyKey, QStringView propertyDisplayName, QStringView propertyValue)
|
||||||
if (!propertyList.contains(propertyKey)) {
|
{
|
||||||
propertyList.append(propertyKey);
|
if (!m_sections.contains(sectionKey)) {
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
m_properties[propertyKey] = qMakePair<QString, QString>(propertyDisplayName.toString(), propertyValue.toString());
|
|
||||||
|
QList<QString> & propertyList = m_sectionProperties[sectionKey].second;
|
||||||
return true;
|
if (!propertyList.contains(propertyKey)) {
|
||||||
}
|
propertyList.append(propertyKey);
|
||||||
|
}
|
||||||
bool MetadataModel::appendExivPropertyIfExist(const Exiv2Wrapper &wrapper, const QString §ionKey, const QString &exiv2propertyKey, const QString &propertyDisplayName, bool isXmpString)
|
|
||||||
{
|
m_properties[propertyKey] = qMakePair<QString, QString>(propertyDisplayName.toString(), propertyValue.toString());
|
||||||
const QString & value = wrapper.value(exiv2propertyKey);
|
|
||||||
if (!value.isEmpty()) {
|
return true;
|
||||||
appendProperty(sectionKey, exiv2propertyKey,
|
}
|
||||||
propertyDisplayName.isEmpty() ? wrapper.label(exiv2propertyKey) : propertyDisplayName,
|
|
||||||
isXmpString ? Exiv2Wrapper::XmpValue(value) : value);
|
bool MetadataModel::appendExivPropertyIfExist(const Exiv2Wrapper &wrapper, const QString §ionKey, const QString &exiv2propertyKey, const QString &propertyDisplayName, bool isXmpString)
|
||||||
return true;
|
{
|
||||||
}
|
const QString & value = wrapper.value(exiv2propertyKey);
|
||||||
return false;
|
if (!value.isEmpty()) {
|
||||||
}
|
appendProperty(sectionKey, exiv2propertyKey,
|
||||||
|
propertyDisplayName.isEmpty() ? wrapper.label(exiv2propertyKey) : propertyDisplayName,
|
||||||
QModelIndex MetadataModel::index(int row, int column, const QModelIndex &parent) const
|
isXmpString ? Exiv2Wrapper::XmpValue(value) : value);
|
||||||
{
|
return true;
|
||||||
if (!hasIndex(row, column, parent)) {
|
}
|
||||||
return QModelIndex();
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!parent.isValid()) {
|
QModelIndex MetadataModel::index(int row, int column, const QModelIndex &parent) const
|
||||||
return createIndex(row, column, RowType::SectionRow);
|
{
|
||||||
} else {
|
if (!hasIndex(row, column, parent)) {
|
||||||
// internalid param: row means nth section it belongs to.
|
return QModelIndex();
|
||||||
return createIndex(row, column, RowType::PropertyRow + parent.row());
|
}
|
||||||
}
|
|
||||||
}
|
if (!parent.isValid()) {
|
||||||
|
return createIndex(row, column, RowType::SectionRow);
|
||||||
QModelIndex MetadataModel::parent(const QModelIndex &child) const
|
} else {
|
||||||
{
|
// internalid param: row means nth section it belongs to.
|
||||||
if (!child.isValid()) {
|
return createIndex(row, column, RowType::PropertyRow + parent.row());
|
||||||
return QModelIndex();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (child.internalId() == RowType::SectionRow) {
|
QModelIndex MetadataModel::parent(const QModelIndex &child) const
|
||||||
return QModelIndex();
|
{
|
||||||
} else {
|
if (!child.isValid()) {
|
||||||
return createIndex(child.internalId() - RowType::PropertyRow, 0, SectionRow);
|
return QModelIndex();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
if (child.internalId() == RowType::SectionRow) {
|
||||||
int MetadataModel::rowCount(const QModelIndex &parent) const
|
return QModelIndex();
|
||||||
{
|
} else {
|
||||||
if (!parent.isValid()) {
|
return createIndex(child.internalId() - RowType::PropertyRow, 0, SectionRow);
|
||||||
return m_sections.count();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parent.internalId() == RowType::SectionRow) {
|
int MetadataModel::rowCount(const QModelIndex &parent) const
|
||||||
const QString & sectionKey = m_sections[parent.row()];
|
{
|
||||||
return m_sectionProperties[sectionKey].second.count();
|
if (!parent.isValid()) {
|
||||||
}
|
return m_sections.count();
|
||||||
|
}
|
||||||
return 0;
|
|
||||||
}
|
if (parent.internalId() == RowType::SectionRow) {
|
||||||
|
const QString & sectionKey = m_sections[parent.row()];
|
||||||
int MetadataModel::columnCount(const QModelIndex &) const
|
return m_sectionProperties[sectionKey].second.count();
|
||||||
{
|
}
|
||||||
// Always key(display name) and value.
|
|
||||||
return 2;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant MetadataModel::data(const QModelIndex &index, int role) const
|
int MetadataModel::columnCount(const QModelIndex &) const
|
||||||
{
|
{
|
||||||
if (!index.isValid()) {
|
// Always key(display name) and value.
|
||||||
return QVariant();
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (role != Qt::DisplayRole) {
|
QVariant MetadataModel::data(const QModelIndex &index, int role) const
|
||||||
return QVariant();
|
{
|
||||||
}
|
if (!index.isValid()) {
|
||||||
|
return QVariant();
|
||||||
if (index.internalId() == RowType::SectionRow) {
|
}
|
||||||
return (index.column() == 0) ? m_sectionProperties[m_sections[index.row()]].first
|
|
||||||
: QVariant();
|
if (role != Qt::DisplayRole) {
|
||||||
} else {
|
return QVariant();
|
||||||
int sectionIndex = index.internalId() - RowType::PropertyRow;
|
}
|
||||||
const QString & sectionKey = m_sections[sectionIndex];
|
|
||||||
const QList<QString> & propertyList = m_sectionProperties[sectionKey].second;
|
if (index.internalId() == RowType::SectionRow) {
|
||||||
return (index.column() == 0) ? m_properties[propertyList[index.row()]].first
|
return (index.column() == 0) ? m_sectionProperties[m_sections[index.row()]].first
|
||||||
: m_properties[propertyList[index.row()]].second;
|
: QVariant();
|
||||||
}
|
} else {
|
||||||
}
|
int sectionIndex = index.internalId() - RowType::PropertyRow;
|
||||||
|
const QString & sectionKey = m_sections[sectionIndex];
|
||||||
QVariant MetadataModel::headerData(int section, Qt::Orientation orientation, int role) const
|
const QList<QString> & propertyList = m_sectionProperties[sectionKey].second;
|
||||||
{
|
return (index.column() == 0) ? m_properties[propertyList[index.row()]].first
|
||||||
if (orientation == Qt::Vertical || role != Qt::DisplayRole) {
|
: m_properties[propertyList[index.row()]].second;
|
||||||
return QVariant();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return section == 0 ? tr("Property") : tr("Value");
|
QVariant MetadataModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||||
}
|
{
|
||||||
|
if (orientation == Qt::Vertical || role != Qt::DisplayRole) {
|
||||||
|
return QVariant();
|
||||||
|
}
|
||||||
|
|
||||||
|
return section == 0 ? tr("Property") : tr("Value");
|
||||||
|
}
|
||||||
|
|||||||
@ -1,52 +1,52 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#ifndef METADATAMODEL_H
|
#ifndef METADATAMODEL_H
|
||||||
#define METADATAMODEL_H
|
#define METADATAMODEL_H
|
||||||
|
|
||||||
#include <QAbstractItemModel>
|
#include <QAbstractItemModel>
|
||||||
|
|
||||||
class Exiv2Wrapper;
|
class Exiv2Wrapper;
|
||||||
class MetadataModel : public QAbstractItemModel
|
class MetadataModel : public QAbstractItemModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MetadataModel(QObject *parent = nullptr);
|
explicit MetadataModel(QObject *parent = nullptr);
|
||||||
~MetadataModel();
|
~MetadataModel();
|
||||||
|
|
||||||
void setFile(const QString & imageFilePath);
|
void setFile(const QString & imageFilePath);
|
||||||
static QString imageSize(const QSize &size);
|
static QString imageSize(const QSize &size);
|
||||||
static QString imageSizeRatio(const QSize &size);
|
static QString imageSizeRatio(const QSize &size);
|
||||||
bool appendSection(const QString & sectionKey, QStringView sectionDisplayName);
|
bool appendSection(const QString & sectionKey, QStringView sectionDisplayName);
|
||||||
bool appendPropertyIfNotEmpty(const QString & sectionKey, const QString & propertyKey,
|
bool appendPropertyIfNotEmpty(const QString & sectionKey, const QString & propertyKey,
|
||||||
const QString & propertyDisplayName, const QString & propertyValue = QString());
|
const QString & propertyDisplayName, const QString & propertyValue = QString());
|
||||||
bool appendProperty(const QString & sectionKey, const QString & propertyKey,
|
bool appendProperty(const QString & sectionKey, const QString & propertyKey,
|
||||||
QStringView propertyDisplayName, QStringView propertyValue = QString());
|
QStringView propertyDisplayName, QStringView propertyValue = QString());
|
||||||
bool appendExivPropertyIfExist(const Exiv2Wrapper & wrapper, const QString & sectionKey,
|
bool appendExivPropertyIfExist(const Exiv2Wrapper & wrapper, const QString & sectionKey,
|
||||||
const QString & exiv2propertyKey, const QString & propertyDisplayName = QString(),
|
const QString & exiv2propertyKey, const QString & propertyDisplayName = QString(),
|
||||||
bool isXmpString = false);
|
bool isXmpString = false);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum RowType : quintptr {
|
enum RowType : quintptr {
|
||||||
SectionRow,
|
SectionRow,
|
||||||
PropertyRow,
|
PropertyRow,
|
||||||
};
|
};
|
||||||
|
|
||||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||||
QModelIndex parent(const QModelIndex &child) const override;
|
QModelIndex parent(const QModelIndex &child) const override;
|
||||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||||
int columnCount(const QModelIndex & = QModelIndex()) const override;
|
int columnCount(const QModelIndex & = QModelIndex()) const override;
|
||||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||||
|
|
||||||
// [SECTION_KEY]
|
// [SECTION_KEY]
|
||||||
QList<QString> m_sections;
|
QList<QString> m_sections;
|
||||||
// {SECTION_KEY: (SECTION_DISPLAY_NAME, [PROPERTY_KEY])}
|
// {SECTION_KEY: (SECTION_DISPLAY_NAME, [PROPERTY_KEY])}
|
||||||
QMap<QString, QPair<QString, QList<QString> > > m_sectionProperties;
|
QMap<QString, QPair<QString, QList<QString> > > m_sectionProperties;
|
||||||
// {PROPERTY_KEY: (PROPERTY_DISPLAY_NAME, PROPERTY_VALUE)}
|
// {PROPERTY_KEY: (PROPERTY_DISPLAY_NAME, PROPERTY_VALUE)}
|
||||||
QMap<QString, QPair<QString, QString> > m_properties;
|
QMap<QString, QPair<QString, QString> > m_properties;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // METADATAMODEL_H
|
#endif // METADATAMODEL_H
|
||||||
|
|||||||
@ -1,86 +1,91 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "navigatorview.h"
|
#include "navigatorview.h"
|
||||||
|
|
||||||
#include "graphicsview.h"
|
#include "graphicsview.h"
|
||||||
#include "opacityhelper.h"
|
#include "opacityhelper.h"
|
||||||
|
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QTimer>
|
||||||
NavigatorView::NavigatorView(QWidget *parent)
|
|
||||||
: QGraphicsView (parent)
|
NavigatorView::NavigatorView(QWidget *parent)
|
||||||
, m_viewportRegion(this->rect())
|
: QGraphicsView (parent)
|
||||||
, m_opacityHelper(new OpacityHelper(this))
|
, m_viewportRegion(this->rect())
|
||||||
{
|
, m_opacityHelper(new OpacityHelper(this))
|
||||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
{
|
||||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
setStyleSheet("background-color: rgba(0, 0, 0, 120);"
|
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
"border-radius: 3px;");
|
setStyleSheet("background-color: rgba(0, 0, 0, 120);"
|
||||||
}
|
"border-radius: 3px;");
|
||||||
|
}
|
||||||
// doesn't take or manage its ownership
|
|
||||||
void NavigatorView::setMainView(GraphicsView *mainView)
|
// doesn't take or manage its ownership
|
||||||
{
|
void NavigatorView::setMainView(GraphicsView *mainView)
|
||||||
m_mainView = mainView;
|
{
|
||||||
}
|
m_mainView = mainView;
|
||||||
|
}
|
||||||
void NavigatorView::setOpacity(qreal opacity, bool animated)
|
|
||||||
{
|
void NavigatorView::setOpacity(qreal opacity, bool animated)
|
||||||
m_opacityHelper->setOpacity(opacity, animated);
|
{
|
||||||
}
|
m_opacityHelper->setOpacity(opacity, animated);
|
||||||
|
}
|
||||||
void NavigatorView::updateMainViewportRegion()
|
|
||||||
{
|
void NavigatorView::updateMainViewportRegion()
|
||||||
if (m_mainView != nullptr) {
|
{
|
||||||
m_viewportRegion = mapFromScene(m_mainView->mapToScene(m_mainView->rect()));
|
// Use QTimer::singleShot with lambda to delay the update
|
||||||
update();
|
// This ensures all geometry updates are complete before calculating viewport region
|
||||||
}
|
QTimer::singleShot(0, [this]() {
|
||||||
}
|
if (m_mainView != nullptr) {
|
||||||
|
m_viewportRegion = mapFromScene(m_mainView->mapToScene(m_mainView->rect()));
|
||||||
void NavigatorView::mousePressEvent(QMouseEvent *event)
|
update();
|
||||||
{
|
}
|
||||||
m_mouseDown = true;
|
});
|
||||||
|
}
|
||||||
if (m_mainView) {
|
|
||||||
m_mainView->centerOn(mapToScene(event->pos()));
|
void NavigatorView::mousePressEvent(QMouseEvent *event)
|
||||||
update();
|
{
|
||||||
}
|
m_mouseDown = true;
|
||||||
|
|
||||||
event->accept();
|
if (m_mainView) {
|
||||||
}
|
m_mainView->centerOn(mapToScene(event->pos()));
|
||||||
|
update();
|
||||||
void NavigatorView::mouseMoveEvent(QMouseEvent *event)
|
}
|
||||||
{
|
|
||||||
if (m_mouseDown && m_mainView) {
|
event->accept();
|
||||||
m_mainView->centerOn(mapToScene(event->pos()));
|
}
|
||||||
update();
|
|
||||||
event->accept();
|
void NavigatorView::mouseMoveEvent(QMouseEvent *event)
|
||||||
} else {
|
{
|
||||||
event->ignore();
|
if (m_mouseDown && m_mainView) {
|
||||||
}
|
m_mainView->centerOn(mapToScene(event->pos()));
|
||||||
}
|
update();
|
||||||
|
event->accept();
|
||||||
void NavigatorView::mouseReleaseEvent(QMouseEvent *event)
|
} else {
|
||||||
{
|
event->ignore();
|
||||||
m_mouseDown = false;
|
}
|
||||||
|
}
|
||||||
event->accept();
|
|
||||||
}
|
void NavigatorView::mouseReleaseEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
void NavigatorView::wheelEvent(QWheelEvent *event)
|
m_mouseDown = false;
|
||||||
{
|
|
||||||
event->ignore();
|
event->accept();
|
||||||
return QGraphicsView::wheelEvent(event);
|
}
|
||||||
}
|
|
||||||
|
void NavigatorView::wheelEvent(QWheelEvent *event)
|
||||||
void NavigatorView::paintEvent(QPaintEvent *event)
|
{
|
||||||
{
|
event->ignore();
|
||||||
QGraphicsView::paintEvent(event);
|
return QGraphicsView::wheelEvent(event);
|
||||||
|
}
|
||||||
QPainter painter(viewport());
|
|
||||||
painter.setPen(QPen(Qt::gray, 2));
|
void NavigatorView::paintEvent(QPaintEvent *event)
|
||||||
painter.drawRect(m_viewportRegion.boundingRect());
|
{
|
||||||
}
|
QGraphicsView::paintEvent(event);
|
||||||
|
|
||||||
|
QPainter painter(viewport());
|
||||||
|
painter.setPen(QPen(Qt::gray, 2));
|
||||||
|
painter.drawRect(m_viewportRegion.boundingRect());
|
||||||
|
}
|
||||||
|
|||||||
@ -1,38 +1,38 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#ifndef NAVIGATORVIEW_H
|
#ifndef NAVIGATORVIEW_H
|
||||||
#define NAVIGATORVIEW_H
|
#define NAVIGATORVIEW_H
|
||||||
|
|
||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
|
|
||||||
class OpacityHelper;
|
class OpacityHelper;
|
||||||
class GraphicsView;
|
class GraphicsView;
|
||||||
class NavigatorView : public QGraphicsView
|
class NavigatorView : public QGraphicsView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
NavigatorView(QWidget *parent = nullptr);
|
NavigatorView(QWidget *parent = nullptr);
|
||||||
|
|
||||||
void setMainView(GraphicsView *mainView);
|
void setMainView(GraphicsView *mainView);
|
||||||
void setOpacity(qreal opacity, bool animated = true);
|
void setOpacity(qreal opacity, bool animated = true);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateMainViewportRegion();
|
void updateMainViewportRegion();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void mousePressEvent(QMouseEvent * event) override;
|
void mousePressEvent(QMouseEvent * event) override;
|
||||||
void mouseMoveEvent(QMouseEvent * event) override;
|
void mouseMoveEvent(QMouseEvent * event) override;
|
||||||
void mouseReleaseEvent(QMouseEvent * event) override;
|
void mouseReleaseEvent(QMouseEvent * event) override;
|
||||||
|
|
||||||
void wheelEvent(QWheelEvent *event) override;
|
void wheelEvent(QWheelEvent *event) override;
|
||||||
void paintEvent(QPaintEvent *event) override;
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
bool m_mouseDown = false;
|
bool m_mouseDown = false;
|
||||||
QPolygon m_viewportRegion;
|
QPolygon m_viewportRegion;
|
||||||
QGraphicsView *m_mainView = nullptr;
|
QGraphicsView *m_mainView = nullptr;
|
||||||
OpacityHelper *m_opacityHelper = nullptr;
|
OpacityHelper *m_opacityHelper = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // NAVIGATORVIEW_H
|
#endif // NAVIGATORVIEW_H
|
||||||
|
|||||||
@ -1,31 +1,31 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "opacityhelper.h"
|
#include "opacityhelper.h"
|
||||||
|
|
||||||
#include <QGraphicsOpacityEffect>
|
#include <QGraphicsOpacityEffect>
|
||||||
#include <QPropertyAnimation>
|
#include <QPropertyAnimation>
|
||||||
|
|
||||||
OpacityHelper::OpacityHelper(QWidget *parent)
|
OpacityHelper::OpacityHelper(QWidget *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_opacityFx(new QGraphicsOpacityEffect(parent))
|
, m_opacityFx(new QGraphicsOpacityEffect(parent))
|
||||||
, m_opacityAnimation(new QPropertyAnimation(m_opacityFx, "opacity"))
|
, m_opacityAnimation(new QPropertyAnimation(m_opacityFx, "opacity"))
|
||||||
{
|
{
|
||||||
parent->setGraphicsEffect(m_opacityFx);
|
parent->setGraphicsEffect(m_opacityFx);
|
||||||
|
|
||||||
m_opacityAnimation->setDuration(300);
|
m_opacityAnimation->setDuration(300);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpacityHelper::setOpacity(qreal opacity, bool animated)
|
void OpacityHelper::setOpacity(qreal opacity, bool animated)
|
||||||
{
|
{
|
||||||
if (!animated) {
|
if (!animated) {
|
||||||
m_opacityFx->setOpacity(opacity);
|
m_opacityFx->setOpacity(opacity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_opacityAnimation->stop();
|
m_opacityAnimation->stop();
|
||||||
m_opacityAnimation->setStartValue(m_opacityFx->opacity());
|
m_opacityAnimation->setStartValue(m_opacityFx->opacity());
|
||||||
m_opacityAnimation->setEndValue(opacity);
|
m_opacityAnimation->setEndValue(opacity);
|
||||||
m_opacityAnimation->start();
|
m_opacityAnimation->start();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,27 +1,27 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#ifndef OPACITYHELPER_H
|
#ifndef OPACITYHELPER_H
|
||||||
#define OPACITYHELPER_H
|
#define OPACITYHELPER_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QGraphicsOpacityEffect;
|
class QGraphicsOpacityEffect;
|
||||||
class QPropertyAnimation;
|
class QPropertyAnimation;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
class OpacityHelper : QObject
|
class OpacityHelper : QObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
OpacityHelper(QWidget * parent);
|
OpacityHelper(QWidget * parent);
|
||||||
|
|
||||||
void setOpacity(qreal opacity, bool animated = true);
|
void setOpacity(qreal opacity, bool animated = true);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QGraphicsOpacityEffect * m_opacityFx;
|
QGraphicsOpacityEffect * m_opacityFx;
|
||||||
QPropertyAnimation * m_opacityAnimation;
|
QPropertyAnimation * m_opacityAnimation;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // OPACITYHELPER_H
|
#endif // OPACITYHELPER_H
|
||||||
|
|||||||
@ -1,173 +1,283 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "playlistmanager.h"
|
#include "playlistmanager.h"
|
||||||
|
|
||||||
#include <QCollator>
|
#include <QCollator>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
PlaylistManager::PlaylistManager(PlaylistType type, QObject *parent)
|
PlaylistModel::PlaylistModel(QObject *parent)
|
||||||
: QObject(parent)
|
: QAbstractListModel(parent)
|
||||||
, m_type(type)
|
{
|
||||||
{
|
|
||||||
|
}
|
||||||
}
|
|
||||||
|
PlaylistModel::~PlaylistModel()
|
||||||
PlaylistManager::~PlaylistManager()
|
= default;
|
||||||
{
|
|
||||||
|
void PlaylistModel::setPlaylist(const QList<QUrl> &urls)
|
||||||
}
|
{
|
||||||
|
beginResetModel();
|
||||||
void PlaylistManager::setPlaylistType(PlaylistManager::PlaylistType type)
|
m_playlist = urls;
|
||||||
{
|
endResetModel();
|
||||||
m_type = type;
|
}
|
||||||
}
|
|
||||||
|
QModelIndex PlaylistModel::loadPlaylist(const QList<QUrl> & urls)
|
||||||
PlaylistManager::PlaylistType PlaylistManager::playlistType() const
|
{
|
||||||
{
|
if (urls.isEmpty()) return {};
|
||||||
return m_type;
|
if (urls.count() == 1) {
|
||||||
}
|
return loadPlaylist(urls.constFirst());
|
||||||
|
} else {
|
||||||
QStringList PlaylistManager::autoLoadFilterSuffix() const
|
setPlaylist(urls);
|
||||||
{
|
return index(0);
|
||||||
return m_autoLoadSuffix;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlaylistManager::setAutoLoadFilterSuffix(const QStringList & nameFilters)
|
QModelIndex PlaylistModel::loadPlaylist(const QUrl &url)
|
||||||
{
|
{
|
||||||
m_autoLoadSuffix = nameFilters;
|
QFileInfo info(url.toLocalFile());
|
||||||
}
|
QDir dir(info.path());
|
||||||
|
QString && currentFileName = info.fileName();
|
||||||
void PlaylistManager::clear()
|
|
||||||
{
|
if (dir.path() == m_currentDir) {
|
||||||
m_currentIndex = -1;
|
int idx = indexOf(url);
|
||||||
m_playlist.clear();
|
return idx == -1 ? appendToPlaylist(url) : index(idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlaylistManager::setPlaylist(const QList<QUrl> &urls)
|
QStringList entryList = dir.entryList(
|
||||||
{
|
m_autoLoadSuffixes,
|
||||||
m_playlist = urls;
|
QDir::Files | QDir::NoSymLinks, QDir::NoSort);
|
||||||
}
|
|
||||||
|
QCollator collator;
|
||||||
void PlaylistManager::setCurrentFile(const QString & filePath)
|
collator.setNumericMode(true);
|
||||||
{
|
|
||||||
QFileInfo info(filePath);
|
std::sort(entryList.begin(), entryList.end(), collator);
|
||||||
QDir dir(info.path());
|
|
||||||
QString && currentFileName = info.fileName();
|
QList<QUrl> playlist;
|
||||||
|
|
||||||
switch (playlistType()) {
|
int idx = -1;
|
||||||
case PL_SAMEFOLDER: {
|
for (int i = 0; i < entryList.count(); i++) {
|
||||||
if (dir.path() == m_currentDir) {
|
const QString & fileName = entryList.at(i);
|
||||||
int index = indexOf(filePath);
|
const QString & oneEntry = dir.absoluteFilePath(fileName);
|
||||||
m_currentIndex = index == -1 ? appendFile(filePath) : index;
|
const QUrl & url = QUrl::fromLocalFile(oneEntry);
|
||||||
} else {
|
playlist.append(url);
|
||||||
QStringList entryList = dir.entryList(
|
if (fileName == currentFileName) {
|
||||||
m_autoLoadSuffix,
|
idx = i;
|
||||||
QDir::Files | QDir::NoSymLinks, QDir::NoSort);
|
}
|
||||||
|
}
|
||||||
QCollator collator;
|
if (idx == -1) {
|
||||||
collator.setNumericMode(true);
|
idx = playlist.count();
|
||||||
|
playlist.append(url);
|
||||||
std::sort(entryList.begin(), entryList.end(), collator);
|
}
|
||||||
|
m_currentDir = dir.path();
|
||||||
clear();
|
|
||||||
|
setPlaylist(playlist);
|
||||||
int index = -1;
|
|
||||||
for (int i = 0; i < entryList.count(); i++) {
|
return index(idx);
|
||||||
const QString & fileName = entryList.at(i);
|
}
|
||||||
const QString & oneEntry = dir.absoluteFilePath(fileName);
|
|
||||||
const QUrl & url = QUrl::fromLocalFile(oneEntry);
|
QModelIndex PlaylistModel::appendToPlaylist(const QUrl &url)
|
||||||
m_playlist.append(url);
|
{
|
||||||
if (fileName == currentFileName) {
|
const int lastIndex = rowCount();
|
||||||
index = i;
|
beginInsertRows(QModelIndex(), lastIndex, lastIndex);
|
||||||
}
|
m_playlist.append(url);
|
||||||
}
|
endInsertRows();
|
||||||
m_currentIndex = index == -1 ? appendFile(filePath) : index;
|
return index(lastIndex);
|
||||||
m_currentDir = dir.path();
|
}
|
||||||
}
|
|
||||||
break;
|
bool PlaylistModel::removeAt(int index)
|
||||||
}
|
{
|
||||||
case PL_USERPLAYLIST:{
|
if (index < 0 || index >= rowCount()) return false;
|
||||||
int index = indexOf(filePath);
|
beginRemoveRows(QModelIndex(), index, index);
|
||||||
m_currentIndex = index == -1 ? appendFile(filePath) : index;
|
m_playlist.removeAt(index);
|
||||||
break;
|
endRemoveRows();
|
||||||
}
|
return true;
|
||||||
default:
|
}
|
||||||
break;
|
|
||||||
}
|
int PlaylistModel::indexOf(const QUrl &url) const
|
||||||
|
{
|
||||||
emit loaded(m_playlist.count());
|
return m_playlist.indexOf(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlaylistManager::setCurrentIndex(int index)
|
QUrl PlaylistModel::urlByIndex(int index) const
|
||||||
{
|
{
|
||||||
if (index < 0 || index >= m_playlist.count()) return;
|
return m_playlist.value(index);
|
||||||
m_currentIndex = index;
|
}
|
||||||
}
|
|
||||||
|
QStringList PlaylistModel::autoLoadFilterSuffixes() const
|
||||||
int PlaylistManager::appendFile(const QString &filePath)
|
{
|
||||||
{
|
return m_autoLoadSuffixes;
|
||||||
int index = m_playlist.length();
|
}
|
||||||
m_playlist.append(QUrl::fromLocalFile(filePath));
|
|
||||||
|
QHash<int, QByteArray> PlaylistModel::roleNames() const
|
||||||
return index;
|
{
|
||||||
}
|
QHash<int, QByteArray> result = QAbstractListModel::roleNames();
|
||||||
|
result.insert(UrlRole, "url");
|
||||||
int PlaylistManager::indexOf(const QString &filePath)
|
return result;
|
||||||
{
|
}
|
||||||
const QUrl & url = QUrl::fromLocalFile(filePath);
|
|
||||||
return m_playlist.indexOf(url);
|
int PlaylistModel::rowCount(const QModelIndex &parent) const
|
||||||
}
|
{
|
||||||
|
return m_playlist.count();
|
||||||
int PlaylistManager::count() const
|
}
|
||||||
{
|
|
||||||
return m_playlist.count();
|
QVariant PlaylistModel::data(const QModelIndex &index, int role) const
|
||||||
}
|
{
|
||||||
|
if (!index.isValid()) return {};
|
||||||
std::tuple<int, QString> PlaylistManager::previousFile() const
|
|
||||||
{
|
switch (role) {
|
||||||
int count = m_playlist.count();
|
case Qt::DisplayRole:
|
||||||
if (count == 0) return std::make_tuple(-1, QString());
|
return m_playlist.at(index.row()).fileName();
|
||||||
|
case UrlRole:
|
||||||
int index = m_currentIndex - 1 < 0 ? count - 1 : m_currentIndex - 1;
|
return m_playlist.at(index.row());
|
||||||
return std::make_tuple(index, m_playlist.at(index).toLocalFile());
|
}
|
||||||
}
|
|
||||||
|
return {};
|
||||||
std::tuple<int, QString> PlaylistManager::nextFile() const
|
}
|
||||||
{
|
|
||||||
int count = m_playlist.count();
|
PlaylistManager::PlaylistManager(QObject *parent)
|
||||||
if (count == 0) return std::make_tuple(-1, QString());
|
: QObject(parent)
|
||||||
|
{
|
||||||
int index = m_currentIndex + 1 == count ? 0 : m_currentIndex + 1;
|
connect(&m_model, &PlaylistModel::rowsRemoved, this,
|
||||||
return std::make_tuple(index, m_playlist.at(index).toLocalFile());
|
[this](const QModelIndex &, int, int) {
|
||||||
}
|
if (m_model.rowCount() <= m_currentIndex) {
|
||||||
|
setProperty("currentIndex", m_currentIndex - 1);
|
||||||
std::tuple<int, QString> PlaylistManager::currentFile() const
|
}
|
||||||
{
|
});
|
||||||
if (m_playlist.count() == 0) return std::make_tuple(-1, QString());
|
|
||||||
|
auto onRowCountChanged = [this](){
|
||||||
return std::make_tuple(m_currentIndex, m_playlist.at(m_currentIndex).toLocalFile());
|
emit totalCountChanged(m_model.rowCount());
|
||||||
}
|
};
|
||||||
|
|
||||||
std::tuple<int, QUrl> PlaylistManager::currentFileUrl() const
|
connect(&m_model, &PlaylistModel::rowsInserted, this, onRowCountChanged);
|
||||||
{
|
connect(&m_model, &PlaylistModel::rowsRemoved, this, onRowCountChanged);
|
||||||
if (m_playlist.count() == 0) return std::make_tuple(-1, QUrl());
|
connect(&m_model, &PlaylistModel::modelReset, this, onRowCountChanged);
|
||||||
|
}
|
||||||
return std::make_tuple(m_currentIndex, m_playlist.at(m_currentIndex));
|
|
||||||
}
|
PlaylistManager::~PlaylistManager()
|
||||||
|
{
|
||||||
QList<QUrl> PlaylistManager::convertToUrlList(const QStringList &files)
|
|
||||||
{
|
}
|
||||||
QList<QUrl> urlList;
|
|
||||||
for (const QString & str : qAsConst(files)) {
|
PlaylistModel *PlaylistManager::model()
|
||||||
QUrl url = QUrl::fromLocalFile(str);
|
{
|
||||||
if (url.isValid()) {
|
return &m_model;
|
||||||
urlList.append(url);
|
}
|
||||||
}
|
|
||||||
}
|
void PlaylistManager::setPlaylist(const QList<QUrl> &urls)
|
||||||
|
{
|
||||||
return urlList;
|
m_model.setPlaylist(urls);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QModelIndex PlaylistManager::loadPlaylist(const QList<QUrl> &urls)
|
||||||
|
{
|
||||||
|
QModelIndex idx = m_model.loadPlaylist(urls);
|
||||||
|
setProperty("currentIndex", idx.row());
|
||||||
|
return idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
QModelIndex PlaylistManager::loadPlaylist(const QUrl &url)
|
||||||
|
{
|
||||||
|
QModelIndex idx = m_model.loadPlaylist(url);
|
||||||
|
setProperty("currentIndex", idx.row());
|
||||||
|
return idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
QModelIndex PlaylistManager::loadM3U8Playlist(const QUrl &url)
|
||||||
|
{
|
||||||
|
QFile file(url.toLocalFile());
|
||||||
|
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
|
QList<QUrl> urls;
|
||||||
|
while (!file.atEnd()) {
|
||||||
|
QString line = file.readLine();
|
||||||
|
if (line.startsWith('#')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
QFileInfo fileInfo(file);
|
||||||
|
QUrl item = QUrl::fromUserInput(line, fileInfo.absolutePath());
|
||||||
|
urls.append(item);
|
||||||
|
}
|
||||||
|
return loadPlaylist(urls);
|
||||||
|
} else {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int PlaylistManager::totalCount() const
|
||||||
|
{
|
||||||
|
return m_model.rowCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
QModelIndex PlaylistManager::previousIndex() const
|
||||||
|
{
|
||||||
|
int count = totalCount();
|
||||||
|
if (count == 0) return {};
|
||||||
|
|
||||||
|
return m_model.index(isFirstIndex() ? count - 1 : m_currentIndex - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
QModelIndex PlaylistManager::nextIndex() const
|
||||||
|
{
|
||||||
|
int count = totalCount();
|
||||||
|
if (count == 0) return {};
|
||||||
|
|
||||||
|
return m_model.index(isLastIndex() ? 0 : m_currentIndex + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
QModelIndex PlaylistManager::curIndex() const
|
||||||
|
{
|
||||||
|
return m_model.index(m_currentIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PlaylistManager::isFirstIndex() const
|
||||||
|
{
|
||||||
|
return m_currentIndex == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PlaylistManager::isLastIndex() const
|
||||||
|
{
|
||||||
|
return m_currentIndex + 1 == totalCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PlaylistManager::setCurrentIndex(const QModelIndex &index)
|
||||||
|
{
|
||||||
|
if (index.isValid() && index.row() >= 0 && index.row() < totalCount()) {
|
||||||
|
setProperty("currentIndex", index.row());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QUrl PlaylistManager::urlByIndex(const QModelIndex &index)
|
||||||
|
{
|
||||||
|
return m_model.urlByIndex(index.row());
|
||||||
|
}
|
||||||
|
|
||||||
|
QString PlaylistManager::localFileByIndex(const QModelIndex &index)
|
||||||
|
{
|
||||||
|
return urlByIndex(index).toLocalFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PlaylistManager::removeAt(const QModelIndex &index)
|
||||||
|
{
|
||||||
|
return m_model.removeAt(index.row());
|
||||||
|
}
|
||||||
|
|
||||||
|
void PlaylistManager::setAutoLoadFilterSuffixes(const QStringList &nameFilters)
|
||||||
|
{
|
||||||
|
m_model.setProperty("autoLoadFilterSuffixes", nameFilters);
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<QUrl> PlaylistManager::convertToUrlList(const QStringList &files)
|
||||||
|
{
|
||||||
|
QList<QUrl> urlList;
|
||||||
|
for (const QString & str : std::as_const(files)) {
|
||||||
|
QUrl url = QUrl::fromLocalFile(str);
|
||||||
|
if (url.isValid()) {
|
||||||
|
urlList.append(url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return urlList;
|
||||||
|
}
|
||||||
|
|||||||
@ -1,54 +1,88 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QObject>
|
#include <QUrl>
|
||||||
|
#include <QAbstractListModel>
|
||||||
class PlaylistManager : public QObject
|
|
||||||
{
|
class PlaylistModel : public QAbstractListModel
|
||||||
Q_OBJECT
|
{
|
||||||
public:
|
Q_OBJECT
|
||||||
enum PlaylistType {
|
public:
|
||||||
PL_USERPLAYLIST, // Regular playlist, managed by user.
|
enum PlaylistRole {
|
||||||
PL_SAMEFOLDER // PlaylistManager managed playlist, loaded from files from same folder.
|
UrlRole = Qt::UserRole
|
||||||
};
|
};
|
||||||
|
Q_ENUM(PlaylistRole)
|
||||||
explicit PlaylistManager(PlaylistType type = PL_USERPLAYLIST, QObject *parent = nullptr);
|
Q_PROPERTY(QStringList autoLoadFilterSuffixes MEMBER m_autoLoadSuffixes NOTIFY autoLoadFilterSuffixesChanged)
|
||||||
~PlaylistManager();
|
|
||||||
|
explicit PlaylistModel(QObject *parent = nullptr);
|
||||||
void setPlaylistType(PlaylistType type);
|
~PlaylistModel() override;
|
||||||
PlaylistType playlistType() const;
|
|
||||||
|
void setPlaylist(const QList<QUrl> & urls);
|
||||||
QStringList autoLoadFilterSuffix() const;
|
QModelIndex loadPlaylist(const QList<QUrl> & urls);
|
||||||
void setAutoLoadFilterSuffix(const QStringList &nameFilters);
|
QModelIndex loadPlaylist(const QUrl & url);
|
||||||
|
QModelIndex appendToPlaylist(const QUrl & url);
|
||||||
void clear();
|
bool removeAt(int index);
|
||||||
|
int indexOf(const QUrl & url) const;
|
||||||
void setPlaylist(const QList<QUrl> & urls);
|
QUrl urlByIndex(int index) const;
|
||||||
void setCurrentFile(const QString & filePath);
|
QStringList autoLoadFilterSuffixes() const;
|
||||||
void setCurrentIndex(int index);
|
|
||||||
int appendFile(const QString & filePath);
|
QHash<int, QByteArray> roleNames() const override;
|
||||||
int indexOf(const QString & filePath);
|
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||||
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||||
int count() const;
|
|
||||||
|
signals:
|
||||||
std::tuple<int, QString> previousFile() const;
|
void autoLoadFilterSuffixesChanged(QStringList suffixes);
|
||||||
std::tuple<int, QString> nextFile() const;
|
|
||||||
std::tuple<int, QString> currentFile() const;
|
private:
|
||||||
std::tuple<int, QUrl> currentFileUrl() const;
|
// model data
|
||||||
|
QList<QUrl> m_playlist;
|
||||||
static QList<QUrl> convertToUrlList(const QStringList & files);
|
// properties
|
||||||
|
QStringList m_autoLoadSuffixes = {};
|
||||||
signals:
|
// internal
|
||||||
void loaded(int length);
|
QString m_currentDir;
|
||||||
|
};
|
||||||
private:
|
|
||||||
QList<QUrl> m_playlist;
|
class PlaylistManager : public QObject
|
||||||
PlaylistType m_type;
|
{
|
||||||
QString m_currentDir;
|
Q_OBJECT
|
||||||
int m_currentIndex = -1;
|
public:
|
||||||
QStringList m_autoLoadSuffix = {};
|
Q_PROPERTY(int currentIndex MEMBER m_currentIndex NOTIFY currentIndexChanged)
|
||||||
};
|
Q_PROPERTY(QStringList autoLoadFilterSuffixes WRITE setAutoLoadFilterSuffixes)
|
||||||
|
Q_PROPERTY(PlaylistModel * model READ model CONSTANT)
|
||||||
|
|
||||||
|
explicit PlaylistManager(QObject *parent = nullptr);
|
||||||
|
~PlaylistManager();
|
||||||
|
|
||||||
|
PlaylistModel * model();
|
||||||
|
|
||||||
|
void setPlaylist(const QList<QUrl> & url);
|
||||||
|
Q_INVOKABLE QModelIndex loadPlaylist(const QList<QUrl> & urls);
|
||||||
|
Q_INVOKABLE QModelIndex loadPlaylist(const QUrl & url);
|
||||||
|
Q_INVOKABLE QModelIndex loadM3U8Playlist(const QUrl & url);
|
||||||
|
|
||||||
|
int totalCount() const;
|
||||||
|
QModelIndex previousIndex() const;
|
||||||
|
QModelIndex nextIndex() const;
|
||||||
|
QModelIndex curIndex() const;
|
||||||
|
bool isFirstIndex() const;
|
||||||
|
bool isLastIndex() const;
|
||||||
|
void setCurrentIndex(const QModelIndex & index);
|
||||||
|
QUrl urlByIndex(const QModelIndex & index);
|
||||||
|
QString localFileByIndex(const QModelIndex & index);
|
||||||
|
bool removeAt(const QModelIndex & index);
|
||||||
|
|
||||||
|
void setAutoLoadFilterSuffixes(const QStringList &nameFilters);
|
||||||
|
|
||||||
|
static QList<QUrl> convertToUrlList(const QStringList & files);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void currentIndexChanged(int index);
|
||||||
|
void totalCountChanged(int count);
|
||||||
|
|
||||||
|
private:
|
||||||
|
int m_currentIndex = -1;
|
||||||
|
PlaylistModel m_model;
|
||||||
|
};
|
||||||
|
|||||||
353
app/settings.cpp
353
app/settings.cpp
@ -1,116 +1,237 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QMetaEnum>
|
#include <QAction>
|
||||||
|
#include <QWidget>
|
||||||
namespace QEnumHelper
|
#include <QKeySequence>
|
||||||
{
|
#include <QMetaEnum>
|
||||||
template <typename E>
|
|
||||||
E fromString(const QString &text, const E defaultValue)
|
namespace QEnumHelper
|
||||||
{
|
{
|
||||||
bool ok;
|
template <typename E>
|
||||||
E result = static_cast<E>(QMetaEnum::fromType<E>().keyToValue(text.toUtf8(), &ok));
|
E fromString(const QString &text, const E defaultValue)
|
||||||
if (!ok) {
|
{
|
||||||
return defaultValue;
|
bool ok;
|
||||||
}
|
E result = static_cast<E>(QMetaEnum::fromType<E>().keyToValue(text.toUtf8(), &ok));
|
||||||
return result;
|
if (!ok) {
|
||||||
}
|
return defaultValue;
|
||||||
|
}
|
||||||
template <typename E>
|
return result;
|
||||||
QString toString(E value)
|
}
|
||||||
{
|
|
||||||
const int intValue = static_cast<int>(value);
|
template <typename E>
|
||||||
return QString::fromUtf8(QMetaEnum::fromType<E>().valueToKey(intValue));
|
QString toString(E value)
|
||||||
}
|
{
|
||||||
}
|
const int intValue = static_cast<int>(value);
|
||||||
|
return QString::fromUtf8(QMetaEnum::fromType<E>().valueToKey(intValue));
|
||||||
Settings *Settings::m_settings_instance = nullptr;
|
}
|
||||||
|
}
|
||||||
Settings *Settings::instance()
|
|
||||||
{
|
Settings *Settings::m_settings_instance = nullptr;
|
||||||
if (!m_settings_instance) {
|
|
||||||
m_settings_instance = new Settings;
|
Settings *Settings::instance()
|
||||||
}
|
{
|
||||||
|
if (!m_settings_instance) {
|
||||||
return m_settings_instance;
|
m_settings_instance = new Settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Settings::stayOnTop()
|
return m_settings_instance;
|
||||||
{
|
}
|
||||||
return m_qsettings->value("stay_on_top", true).toBool();
|
|
||||||
}
|
bool Settings::stayOnTop() const
|
||||||
|
{
|
||||||
Settings::DoubleClickBehavior Settings::doubleClickBehavior() const
|
return m_qsettings->value("stay_on_top", true).toBool();
|
||||||
{
|
}
|
||||||
QString result = m_qsettings->value("double_click_behavior", "Close").toString();
|
|
||||||
|
bool Settings::useBuiltInCloseAnimation() const
|
||||||
return QEnumHelper::fromString<DoubleClickBehavior>(result, DoubleClickBehavior::Close);
|
{
|
||||||
}
|
return m_qsettings->value("use_built_in_close_animation", true).toBool();
|
||||||
|
}
|
||||||
Settings::MouseWheelBehavior Settings::mouseWheelBehavior() const
|
|
||||||
{
|
bool Settings::useLightCheckerboard() const
|
||||||
QString result = m_qsettings->value("mouse_wheel_behavior", "Zoom").toString();
|
{
|
||||||
|
return m_qsettings->value("use_light_checkerboard", false).toBool();
|
||||||
return QEnumHelper::fromString<MouseWheelBehavior>(result, MouseWheelBehavior::Zoom);
|
}
|
||||||
}
|
|
||||||
|
bool Settings::loopGallery() const
|
||||||
Settings::WindowSizeBehavior Settings::initWindowSizeBehavior() const
|
{
|
||||||
{
|
return m_qsettings->value("loop_gallery", true).toBool();
|
||||||
QString result = m_qsettings->value("init_window_size_behavior", "Auto").toString();
|
}
|
||||||
|
|
||||||
return QEnumHelper::fromString<WindowSizeBehavior>(result, WindowSizeBehavior::Auto);
|
bool Settings::autoLongImageMode() const
|
||||||
}
|
{
|
||||||
|
return m_qsettings->value("auto_long_image_mode", true).toBool();
|
||||||
void Settings::setStayOnTop(bool on)
|
}
|
||||||
{
|
|
||||||
m_qsettings->setValue("stay_on_top", on);
|
Settings::DoubleClickBehavior Settings::doubleClickBehavior() const
|
||||||
m_qsettings->sync();
|
{
|
||||||
}
|
QString result = m_qsettings->value("double_click_behavior", "Close").toString();
|
||||||
|
|
||||||
void Settings::setDoubleClickBehavior(DoubleClickBehavior dcb)
|
return QEnumHelper::fromString<DoubleClickBehavior>(result, DoubleClickBehavior::Close);
|
||||||
{
|
}
|
||||||
m_qsettings->setValue("double_click_behavior", QEnumHelper::toString(dcb));
|
|
||||||
m_qsettings->sync();
|
Settings::MouseWheelBehavior Settings::mouseWheelBehavior() const
|
||||||
}
|
{
|
||||||
|
QString result = m_qsettings->value("mouse_wheel_behavior", "Zoom").toString();
|
||||||
void Settings::setMouseWheelBehavior(MouseWheelBehavior mwb)
|
|
||||||
{
|
return QEnumHelper::fromString<MouseWheelBehavior>(result, MouseWheelBehavior::Zoom);
|
||||||
m_qsettings->setValue("mouse_wheel_behavior", QEnumHelper::toString(mwb));
|
}
|
||||||
m_qsettings->sync();
|
|
||||||
}
|
Settings::WindowSizeBehavior Settings::initWindowSizeBehavior() const
|
||||||
|
{
|
||||||
void Settings::setInitWindowSizeBehavior(WindowSizeBehavior wsb)
|
QString result = m_qsettings->value("init_window_size_behavior", "Auto").toString();
|
||||||
{
|
|
||||||
m_qsettings->setValue("init_window_size_behavior", QEnumHelper::toString(wsb));
|
return QEnumHelper::fromString<WindowSizeBehavior>(result, WindowSizeBehavior::Auto);
|
||||||
m_qsettings->sync();
|
}
|
||||||
}
|
|
||||||
|
Qt::HighDpiScaleFactorRoundingPolicy Settings::hiDpiScaleFactorBehavior() const
|
||||||
Settings::Settings()
|
{
|
||||||
: QObject(qApp)
|
QString result = m_qsettings->value("hidpi_scale_factor_behavior", "PassThrough").toString();
|
||||||
{
|
|
||||||
QString configPath;
|
return QEnumHelper::fromString<Qt::HighDpiScaleFactorRoundingPolicy>(result, Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||||
|
}
|
||||||
#ifdef FLAG_PORTABLE_MODE_SUPPORT
|
|
||||||
QString portableConfigDirPath = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath("data");
|
void Settings::setStayOnTop(bool on)
|
||||||
QFileInfo portableConfigDirInfo(portableConfigDirPath);
|
{
|
||||||
if (portableConfigDirInfo.exists() && portableConfigDirInfo.isDir() && portableConfigDirInfo.isWritable()) {
|
m_qsettings->setValue("stay_on_top", on);
|
||||||
// we can use it.
|
m_qsettings->sync();
|
||||||
configPath = portableConfigDirPath;
|
}
|
||||||
}
|
|
||||||
#endif // FLAG_PORTABLE_MODE_SUPPORT
|
void Settings::setUseBuiltInCloseAnimation(bool on)
|
||||||
|
{
|
||||||
// %LOCALAPPDATA% under Windows.
|
m_qsettings->setValue("use_built_in_close_animation", on);
|
||||||
if (configPath.isEmpty()) {
|
m_qsettings->sync();
|
||||||
configPath = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
|
}
|
||||||
}
|
|
||||||
|
void Settings::setUseLightCheckerboard(bool light)
|
||||||
m_qsettings = new QSettings(QDir(configPath).absoluteFilePath("config.ini"), QSettings::IniFormat, this);
|
{
|
||||||
}
|
m_qsettings->setValue("use_light_checkerboard", light);
|
||||||
|
m_qsettings->sync();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::setLoopGallery(bool on)
|
||||||
|
{
|
||||||
|
m_qsettings->setValue("loop_gallery", on);
|
||||||
|
m_qsettings->sync();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::setAutoLongImageMode(bool on)
|
||||||
|
{
|
||||||
|
m_qsettings->setValue("auto_long_image_mode", on);
|
||||||
|
m_qsettings->sync();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::setDoubleClickBehavior(DoubleClickBehavior dcb)
|
||||||
|
{
|
||||||
|
m_qsettings->setValue("double_click_behavior", QEnumHelper::toString(dcb));
|
||||||
|
m_qsettings->sync();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::setMouseWheelBehavior(MouseWheelBehavior mwb)
|
||||||
|
{
|
||||||
|
m_qsettings->setValue("mouse_wheel_behavior", QEnumHelper::toString(mwb));
|
||||||
|
m_qsettings->sync();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::setInitWindowSizeBehavior(WindowSizeBehavior wsb)
|
||||||
|
{
|
||||||
|
m_qsettings->setValue("init_window_size_behavior", QEnumHelper::toString(wsb));
|
||||||
|
m_qsettings->sync();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::setHiDpiScaleFactorBehavior(Qt::HighDpiScaleFactorRoundingPolicy hidpi)
|
||||||
|
{
|
||||||
|
m_qsettings->setValue("hidpi_scale_factor_behavior", QEnumHelper::toString(hidpi));
|
||||||
|
m_qsettings->sync();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::applyUserShortcuts(QWidget *widget)
|
||||||
|
{
|
||||||
|
m_qsettings->beginGroup("shortcuts");
|
||||||
|
const QStringList shortcutNames = m_qsettings->allKeys();
|
||||||
|
for (const QString & name : shortcutNames) {
|
||||||
|
QList<QKeySequence> shortcuts = m_qsettings->value(name).value<QList<QKeySequence>>();
|
||||||
|
setShortcutsForAction(widget, name, shortcuts, false);
|
||||||
|
}
|
||||||
|
m_qsettings->endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Settings::setShortcutsForAction(QWidget *widget, const QString &objectName,
|
||||||
|
QList<QKeySequence> shortcuts, bool writeConfig)
|
||||||
|
{
|
||||||
|
QAction * targetAction = nullptr;
|
||||||
|
for (QAction * action : widget->actions()) {
|
||||||
|
if (action->objectName() == objectName) {
|
||||||
|
targetAction = action;
|
||||||
|
} else {
|
||||||
|
for (const QKeySequence & shortcut : std::as_const(shortcuts)) {
|
||||||
|
if (action->shortcuts().contains(shortcut)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetAction) {
|
||||||
|
targetAction->setShortcuts(shortcuts);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetAction && writeConfig) {
|
||||||
|
m_qsettings->beginGroup("shortcuts");
|
||||||
|
m_qsettings->setValue(objectName, QVariant::fromValue(shortcuts));
|
||||||
|
m_qsettings->endGroup();
|
||||||
|
m_qsettings->sync();
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(FLAG_PORTABLE_MODE_SUPPORT) && defined(Q_OS_WIN)
|
||||||
|
#include <windows.h>
|
||||||
|
// QCoreApplication::applicationDirPath() parses the "applicationDirPath" from arg0, which...
|
||||||
|
// 1. rely on a QApplication object instance
|
||||||
|
// but we need to call QGuiApplication::setHighDpiScaleFactorRoundingPolicy() before QApplication get created
|
||||||
|
// 2. arg0 is NOT garanteed to be the path of execution
|
||||||
|
// see also: https://stackoverflow.com/questions/383973/is-args0-guaranteed-to-be-the-path-of-execution
|
||||||
|
// This function is here mainly for #1.
|
||||||
|
QString getApplicationDirPath()
|
||||||
|
{
|
||||||
|
WCHAR buffer[MAX_PATH];
|
||||||
|
GetModuleFileNameW(NULL, buffer, MAX_PATH);
|
||||||
|
QString appPath = QString::fromWCharArray(buffer);
|
||||||
|
|
||||||
|
return appPath.left(appPath.lastIndexOf('\\'));
|
||||||
|
}
|
||||||
|
#endif // defined(FLAG_PORTABLE_MODE_SUPPORT) && defined(Q_OS_WIN)
|
||||||
|
|
||||||
|
Settings::Settings()
|
||||||
|
: QObject(qApp)
|
||||||
|
{
|
||||||
|
QString configPath;
|
||||||
|
|
||||||
|
#if defined(FLAG_PORTABLE_MODE_SUPPORT) && defined(Q_OS_WIN)
|
||||||
|
QString portableConfigDirPath = QDir(getApplicationDirPath()).absoluteFilePath("data");
|
||||||
|
QFileInfo portableConfigDirInfo(portableConfigDirPath);
|
||||||
|
if (portableConfigDirInfo.exists() && portableConfigDirInfo.isDir() && portableConfigDirInfo.isWritable()) {
|
||||||
|
// we can use it.
|
||||||
|
configPath = portableConfigDirPath;
|
||||||
|
}
|
||||||
|
#endif // defined(FLAG_PORTABLE_MODE_SUPPORT) && defined(Q_OS_WIN)
|
||||||
|
|
||||||
|
if (configPath.isEmpty()) {
|
||||||
|
// Should be %LOCALAPPDATA%\<APPNAME> under Windows, ~/.config/<APPNAME> under Linux.
|
||||||
|
configPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_qsettings = new QSettings(QDir(configPath).absoluteFilePath("config.ini"), QSettings::IniFormat, this);
|
||||||
|
|
||||||
|
qRegisterMetaType<QList<QKeySequence>>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
127
app/settings.h
127
app/settings.h
@ -1,56 +1,71 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
class Settings : public QObject
|
class Settings : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
enum DoubleClickBehavior {
|
enum DoubleClickBehavior {
|
||||||
Ignore,
|
Ignore,
|
||||||
Close,
|
Close,
|
||||||
Maximize,
|
Maximize,
|
||||||
};
|
FullScreen,
|
||||||
Q_ENUM(DoubleClickBehavior);
|
};
|
||||||
|
Q_ENUM(DoubleClickBehavior)
|
||||||
enum MouseWheelBehavior {
|
|
||||||
Zoom,
|
enum MouseWheelBehavior {
|
||||||
Switch,
|
Zoom,
|
||||||
};
|
Switch,
|
||||||
Q_ENUM(MouseWheelBehavior);
|
};
|
||||||
|
Q_ENUM(MouseWheelBehavior)
|
||||||
enum WindowSizeBehavior {
|
|
||||||
Auto,
|
enum WindowSizeBehavior {
|
||||||
Maximized,
|
Auto,
|
||||||
};
|
Maximized,
|
||||||
Q_ENUM(WindowSizeBehavior);
|
Windowed,
|
||||||
|
};
|
||||||
static Settings *instance();
|
Q_ENUM(WindowSizeBehavior)
|
||||||
|
|
||||||
bool stayOnTop();
|
static Settings *instance();
|
||||||
DoubleClickBehavior doubleClickBehavior() const;
|
|
||||||
MouseWheelBehavior mouseWheelBehavior() const;
|
bool stayOnTop() const;
|
||||||
WindowSizeBehavior initWindowSizeBehavior() const;
|
bool useBuiltInCloseAnimation() const;
|
||||||
|
bool useLightCheckerboard() const;
|
||||||
void setStayOnTop(bool on);
|
bool loopGallery() const;
|
||||||
void setDoubleClickBehavior(DoubleClickBehavior dcb);
|
bool autoLongImageMode() const;
|
||||||
void setMouseWheelBehavior(MouseWheelBehavior mwb);
|
DoubleClickBehavior doubleClickBehavior() const;
|
||||||
void setInitWindowSizeBehavior(WindowSizeBehavior wsb);
|
MouseWheelBehavior mouseWheelBehavior() const;
|
||||||
|
WindowSizeBehavior initWindowSizeBehavior() const;
|
||||||
private:
|
Qt::HighDpiScaleFactorRoundingPolicy hiDpiScaleFactorBehavior() const;
|
||||||
Settings();
|
|
||||||
|
void setStayOnTop(bool on);
|
||||||
static Settings *m_settings_instance;
|
void setUseBuiltInCloseAnimation(bool on);
|
||||||
|
void setUseLightCheckerboard(bool light);
|
||||||
QSettings *m_qsettings;
|
void setLoopGallery(bool on);
|
||||||
|
void setAutoLongImageMode(bool on);
|
||||||
signals:
|
void setDoubleClickBehavior(DoubleClickBehavior dcb);
|
||||||
|
void setMouseWheelBehavior(MouseWheelBehavior mwb);
|
||||||
public slots:
|
void setInitWindowSizeBehavior(WindowSizeBehavior wsb);
|
||||||
};
|
void setHiDpiScaleFactorBehavior(Qt::HighDpiScaleFactorRoundingPolicy hidpi);
|
||||||
|
|
||||||
|
void applyUserShortcuts(QWidget * widget);
|
||||||
|
bool setShortcutsForAction(QWidget * widget, const QString & objectName,
|
||||||
|
QList<QKeySequence> shortcuts, bool writeConfig = true);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Settings();
|
||||||
|
|
||||||
|
static Settings *m_settings_instance;
|
||||||
|
|
||||||
|
QSettings *m_qsettings;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
};
|
||||||
|
|||||||
@ -1,95 +1,207 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "settingsdialog.h"
|
#include "settingsdialog.h"
|
||||||
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
#include "shortcutedit.h"
|
||||||
#include <QCheckBox>
|
|
||||||
#include <QComboBox>
|
#include <QAction>
|
||||||
#include <QFormLayout>
|
#include <QCheckBox>
|
||||||
#include <QStringListModel>
|
#include <QComboBox>
|
||||||
|
#include <QFormLayout>
|
||||||
SettingsDialog::SettingsDialog(QWidget *parent)
|
#include <QKeySequenceEdit>
|
||||||
: QDialog(parent)
|
#include <QScrollArea>
|
||||||
, m_stayOnTop(new QCheckBox)
|
#include <QSplitter>
|
||||||
, m_doubleClickBehavior(new QComboBox)
|
#include <QStringListModel>
|
||||||
, m_mouseWheelBehavior(new QComboBox)
|
#include <QMessageBox>
|
||||||
, m_initWindowSizeBehavior(new QComboBox)
|
|
||||||
{
|
SettingsDialog::SettingsDialog(QWidget *parent)
|
||||||
this->setWindowTitle(tr("Settings"));
|
: QDialog(parent)
|
||||||
|
, m_stayOnTop(new QCheckBox)
|
||||||
QFormLayout * settingsForm = new QFormLayout(this);
|
, m_useBuiltInCloseAnimation(new QCheckBox)
|
||||||
|
, m_useLightCheckerboard(new QCheckBox)
|
||||||
static QList< QPair<Settings::DoubleClickBehavior, QString> > _dc_options {
|
, m_loopGallery(new QCheckBox)
|
||||||
{ Settings::DoubleClickBehavior::Ignore, tr("Do nothing") },
|
, m_autoLongImageMode(new QCheckBox)
|
||||||
{ Settings::DoubleClickBehavior::Close, tr("Close the window") },
|
, m_doubleClickBehavior(new QComboBox)
|
||||||
{ Settings::DoubleClickBehavior::Maximize, tr("Toggle maximize") }
|
, m_mouseWheelBehavior(new QComboBox)
|
||||||
};
|
, m_initWindowSizeBehavior(new QComboBox)
|
||||||
|
, m_hiDpiRoundingPolicyBehavior(new QComboBox)
|
||||||
static QList< QPair<Settings::MouseWheelBehavior, QString> > _mw_options {
|
{
|
||||||
{ Settings::MouseWheelBehavior::Zoom, tr("Zoom in and out") },
|
this->setWindowTitle(tr("Settings"));
|
||||||
{ Settings::MouseWheelBehavior::Switch, tr("View next or previous item") }
|
|
||||||
};
|
QHBoxLayout * mainLayout = new QHBoxLayout(this);
|
||||||
|
QTabWidget * settingsTabs = new QTabWidget(this);
|
||||||
static QList< QPair<Settings::WindowSizeBehavior, QString> > _iws_options {
|
mainLayout->addWidget(settingsTabs);
|
||||||
{ Settings::WindowSizeBehavior::Auto, tr("Auto size") },
|
|
||||||
{ Settings::WindowSizeBehavior::Maximized, tr("Maximized") }
|
QWidget * settingsFormHolder = new QWidget;
|
||||||
};
|
QFormLayout * settingsForm = new QFormLayout(settingsFormHolder);
|
||||||
|
settingsTabs->addTab(settingsFormHolder, tr("Options"));
|
||||||
QStringList dcbDropDown;
|
|
||||||
for (const QPair<Settings::DoubleClickBehavior, QString> & dcOption : _dc_options) {
|
QSplitter * shortcutEditorSplitter = new QSplitter;
|
||||||
dcbDropDown.append(dcOption.second);
|
shortcutEditorSplitter->setOrientation(Qt::Vertical);
|
||||||
}
|
shortcutEditorSplitter->setChildrenCollapsible(false);
|
||||||
|
QScrollArea * shortcutScrollArea = new QScrollArea;
|
||||||
QStringList mwbDropDown;
|
shortcutEditorSplitter->addWidget(shortcutScrollArea);
|
||||||
for (const QPair<Settings::MouseWheelBehavior, QString> & mwOption : _mw_options) {
|
shortcutScrollArea->setWidgetResizable(true);
|
||||||
mwbDropDown.append(mwOption.second);
|
shortcutScrollArea->setMinimumHeight(200);
|
||||||
}
|
QWidget * shortcutsFormHolder = new QWidget;
|
||||||
|
QFormLayout * shortcutsForm = new QFormLayout(shortcutsFormHolder);
|
||||||
QStringList iwsbDropDown;
|
shortcutScrollArea->setWidget(shortcutsFormHolder);
|
||||||
for (const QPair<Settings::WindowSizeBehavior, QString> & iwsOption : _iws_options) {
|
settingsTabs->addTab(shortcutEditorSplitter, tr("Shortcuts"));
|
||||||
iwsbDropDown.append(iwsOption.second);
|
|
||||||
}
|
for (const QAction * action : parent->actions()) {
|
||||||
|
ShortcutEdit * shortcutEdit = new ShortcutEdit;
|
||||||
settingsForm->addRow(tr("Stay on top when start-up"), m_stayOnTop);
|
shortcutEdit->setObjectName(QLatin1String("shortcut_") + action->objectName());
|
||||||
settingsForm->addRow(tr("Double-click behavior"), m_doubleClickBehavior);
|
shortcutEdit->setShortcuts(action->shortcuts());
|
||||||
settingsForm->addRow(tr("Mouse wheel behavior"), m_mouseWheelBehavior);
|
shortcutsForm->addRow(action->text(), shortcutEdit);
|
||||||
settingsForm->addRow(tr("Default window size"), m_initWindowSizeBehavior);
|
connect(shortcutEdit, &ShortcutEdit::editButtonClicked, this, [=](){
|
||||||
|
if (shortcutEditorSplitter->count() == 1) shortcutEditorSplitter->addWidget(new QWidget);
|
||||||
m_stayOnTop->setChecked(Settings::instance()->stayOnTop());
|
ShortcutEditor * shortcutEditor = new ShortcutEditor(shortcutEdit);
|
||||||
m_doubleClickBehavior->setModel(new QStringListModel(dcbDropDown));
|
shortcutEditor->setDescription(tr("Editing shortcuts for action \"%1\":").arg(action->text()));
|
||||||
Settings::DoubleClickBehavior dcb = Settings::instance()->doubleClickBehavior();
|
QWidget * oldEditor = shortcutEditorSplitter->replaceWidget(1, shortcutEditor);
|
||||||
m_doubleClickBehavior->setCurrentIndex(static_cast<int>(dcb));
|
shortcutEditorSplitter->setSizes({shortcutEditorSplitter->height(), 1});
|
||||||
m_mouseWheelBehavior->setModel(new QStringListModel(mwbDropDown));
|
oldEditor->deleteLater();
|
||||||
Settings::MouseWheelBehavior mwb = Settings::instance()->mouseWheelBehavior();
|
});
|
||||||
m_mouseWheelBehavior->setCurrentIndex(static_cast<int>(mwb));
|
connect(shortcutEdit, &ShortcutEdit::applyShortcutsRequested, this, [=](QList<QKeySequence> newShortcuts){
|
||||||
m_initWindowSizeBehavior->setModel(new QStringListModel(iwsbDropDown));
|
bool succ = Settings::instance()->setShortcutsForAction(parent, shortcutEdit->objectName().mid(9),
|
||||||
Settings::WindowSizeBehavior iwsb = Settings::instance()->initWindowSizeBehavior();
|
newShortcuts);
|
||||||
m_initWindowSizeBehavior->setCurrentIndex(static_cast<int>(iwsb));
|
if (!succ) {
|
||||||
|
QMessageBox::warning(this, tr("Failed to set shortcuts"),
|
||||||
connect(m_stayOnTop, &QCheckBox::stateChanged, this, [ = ](int state){
|
tr("Please check if shortcuts are duplicated with existing shortcuts."));
|
||||||
Settings::instance()->setStayOnTop(state == Qt::Checked);
|
}
|
||||||
});
|
shortcutEdit->setShortcuts(action->shortcuts());
|
||||||
|
});
|
||||||
connect(m_doubleClickBehavior, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [ = ](int index){
|
}
|
||||||
Settings::instance()->setDoubleClickBehavior(_dc_options.at(index).first);
|
|
||||||
});
|
static QList< QPair<Settings::DoubleClickBehavior, QString> > _dc_options {
|
||||||
|
{ Settings::DoubleClickBehavior::Ignore, tr("Do nothing") },
|
||||||
connect(m_mouseWheelBehavior, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [ = ](int index){
|
{ Settings::DoubleClickBehavior::Close, tr("Close the window") },
|
||||||
Settings::instance()->setMouseWheelBehavior(_mw_options.at(index).first);
|
{ Settings::DoubleClickBehavior::Maximize, tr("Toggle maximize") },
|
||||||
});
|
{ Settings::DoubleClickBehavior::FullScreen, tr("Toggle fullscreen") }
|
||||||
|
};
|
||||||
connect(m_initWindowSizeBehavior, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [ = ](int index){
|
|
||||||
Settings::instance()->setInitWindowSizeBehavior(_iws_options.at(index).first);
|
static QList< QPair<Settings::MouseWheelBehavior, QString> > _mw_options {
|
||||||
});
|
{ Settings::MouseWheelBehavior::Zoom, tr("Zoom in and out") },
|
||||||
|
{ Settings::MouseWheelBehavior::Switch, tr("View next or previous item") }
|
||||||
this->setMinimumSize(300, 120); // not sure why it complain "Unable to set geometry"
|
};
|
||||||
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
|
||||||
}
|
static QList< QPair<Settings::WindowSizeBehavior, QString> > _iws_options {
|
||||||
|
{ Settings::WindowSizeBehavior::Auto, tr("Auto size") },
|
||||||
SettingsDialog::~SettingsDialog()
|
{ Settings::WindowSizeBehavior::Maximized, tr("Maximized") },
|
||||||
{
|
{ Settings::WindowSizeBehavior::Windowed, tr("Windowed") }
|
||||||
|
};
|
||||||
}
|
|
||||||
|
static QList< QPair<Qt::HighDpiScaleFactorRoundingPolicy, QString> > _hidpi_options {
|
||||||
|
{ Qt::HighDpiScaleFactorRoundingPolicy::Round, tr("Round (Integer scaling)", "This option means round up for .5 and above") },
|
||||||
|
{ Qt::HighDpiScaleFactorRoundingPolicy::Ceil, tr("Ceil (Integer scaling)", "This option means always round up") },
|
||||||
|
{ Qt::HighDpiScaleFactorRoundingPolicy::Floor, tr("Floor (Integer scaling)", "This option means always round down") },
|
||||||
|
{ Qt::HighDpiScaleFactorRoundingPolicy::PassThrough, tr("Follow system (Fractional scaling)", "This option means don't round") }
|
||||||
|
};
|
||||||
|
|
||||||
|
QStringList dcbDropDown;
|
||||||
|
for (const QPair<Settings::DoubleClickBehavior, QString> & dcOption : _dc_options) {
|
||||||
|
dcbDropDown.append(dcOption.second);
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList mwbDropDown;
|
||||||
|
for (const QPair<Settings::MouseWheelBehavior, QString> & mwOption : _mw_options) {
|
||||||
|
mwbDropDown.append(mwOption.second);
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList iwsbDropDown;
|
||||||
|
for (const QPair<Settings::WindowSizeBehavior, QString> & iwsOption : _iws_options) {
|
||||||
|
iwsbDropDown.append(iwsOption.second);
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList hidpiDropDown;
|
||||||
|
for (const QPair<Qt::HighDpiScaleFactorRoundingPolicy, QString> & hidpiOption : _hidpi_options) {
|
||||||
|
hidpiDropDown.append(hidpiOption.second);
|
||||||
|
}
|
||||||
|
|
||||||
|
settingsForm->addRow(tr("Stay on top when start-up"), m_stayOnTop);
|
||||||
|
settingsForm->addRow(tr("Use built-in close window animation"), m_useBuiltInCloseAnimation);
|
||||||
|
settingsForm->addRow(tr("Use light-color checkerboard"), m_useLightCheckerboard);
|
||||||
|
settingsForm->addRow(tr("Loop the loaded gallery"), m_loopGallery);
|
||||||
|
settingsForm->addRow(tr("Auto long image mode"), m_autoLongImageMode);
|
||||||
|
settingsForm->addRow(tr("Double-click behavior"), m_doubleClickBehavior);
|
||||||
|
settingsForm->addRow(tr("Mouse wheel behavior"), m_mouseWheelBehavior);
|
||||||
|
settingsForm->addRow(tr("Default window size"), m_initWindowSizeBehavior);
|
||||||
|
settingsForm->addRow(tr("HiDPI scale factor rounding policy"), m_hiDpiRoundingPolicyBehavior);
|
||||||
|
|
||||||
|
m_stayOnTop->setChecked(Settings::instance()->stayOnTop());
|
||||||
|
m_useBuiltInCloseAnimation->setChecked(Settings::instance()->useBuiltInCloseAnimation());
|
||||||
|
m_useLightCheckerboard->setChecked(Settings::instance()->useLightCheckerboard());
|
||||||
|
m_loopGallery->setChecked(Settings::instance()->loopGallery());
|
||||||
|
m_autoLongImageMode->setChecked(Settings::instance()->autoLongImageMode());
|
||||||
|
m_doubleClickBehavior->setModel(new QStringListModel(dcbDropDown));
|
||||||
|
Settings::DoubleClickBehavior dcb = Settings::instance()->doubleClickBehavior();
|
||||||
|
m_doubleClickBehavior->setCurrentIndex(static_cast<int>(dcb));
|
||||||
|
m_mouseWheelBehavior->setModel(new QStringListModel(mwbDropDown));
|
||||||
|
Settings::MouseWheelBehavior mwb = Settings::instance()->mouseWheelBehavior();
|
||||||
|
m_mouseWheelBehavior->setCurrentIndex(static_cast<int>(mwb));
|
||||||
|
m_initWindowSizeBehavior->setModel(new QStringListModel(iwsbDropDown));
|
||||||
|
Settings::WindowSizeBehavior iwsb = Settings::instance()->initWindowSizeBehavior();
|
||||||
|
m_initWindowSizeBehavior->setCurrentIndex(static_cast<int>(iwsb));
|
||||||
|
m_hiDpiRoundingPolicyBehavior->setModel(new QStringListModel(hidpiDropDown));
|
||||||
|
Qt::HighDpiScaleFactorRoundingPolicy hidpi = Settings::instance()->hiDpiScaleFactorBehavior();
|
||||||
|
for (int i = 0; i < _hidpi_options.count(); i++) {
|
||||||
|
if (_hidpi_options.at(i).first == hidpi) {
|
||||||
|
m_hiDpiRoundingPolicyBehavior->setCurrentIndex(i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
|
||||||
|
# define QCHECKBOX_CHECKSTATECHANGED QCheckBox::checkStateChanged
|
||||||
|
# define QT_CHECKSTATE Qt::CheckState
|
||||||
|
#else
|
||||||
|
# define QCHECKBOX_CHECKSTATECHANGED QCheckBox::stateChanged
|
||||||
|
# define QT_CHECKSTATE int
|
||||||
|
#endif // QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
|
||||||
|
|
||||||
|
connect(m_stayOnTop, &QCHECKBOX_CHECKSTATECHANGED, this, [ = ](QT_CHECKSTATE state){
|
||||||
|
Settings::instance()->setStayOnTop(state == Qt::Checked);
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(m_useBuiltInCloseAnimation, &QCHECKBOX_CHECKSTATECHANGED, this, [ = ](QT_CHECKSTATE state){
|
||||||
|
Settings::instance()->setUseBuiltInCloseAnimation(state == Qt::Checked);
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(m_useLightCheckerboard, &QCHECKBOX_CHECKSTATECHANGED, this, [ = ](QT_CHECKSTATE state){
|
||||||
|
Settings::instance()->setUseLightCheckerboard(state == Qt::Checked);
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(m_loopGallery, &QCHECKBOX_CHECKSTATECHANGED, this, [ = ](QT_CHECKSTATE state){
|
||||||
|
Settings::instance()->setLoopGallery(state == Qt::Checked);
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(m_autoLongImageMode, &QCHECKBOX_CHECKSTATECHANGED, this, [ = ](QT_CHECKSTATE state){
|
||||||
|
Settings::instance()->setAutoLongImageMode(state == Qt::Checked);
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(m_doubleClickBehavior, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [ = ](int index){
|
||||||
|
Settings::instance()->setDoubleClickBehavior(_dc_options.at(index).first);
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(m_mouseWheelBehavior, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [ = ](int index){
|
||||||
|
Settings::instance()->setMouseWheelBehavior(_mw_options.at(index).first);
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(m_initWindowSizeBehavior, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [ = ](int index){
|
||||||
|
Settings::instance()->setInitWindowSizeBehavior(_iws_options.at(index).first);
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(m_hiDpiRoundingPolicyBehavior, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [ = ](int index){
|
||||||
|
Settings::instance()->setHiDpiScaleFactorBehavior(_hidpi_options.at(index).first);
|
||||||
|
});
|
||||||
|
|
||||||
|
adjustSize();
|
||||||
|
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
SettingsDialog::~SettingsDialog()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -1,31 +1,36 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#ifndef SETTINGSDIALOG_H
|
#ifndef SETTINGSDIALOG_H
|
||||||
#define SETTINGSDIALOG_H
|
#define SETTINGSDIALOG_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
class SettingsDialog : public QDialog
|
class SettingsDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit SettingsDialog(QWidget *parent = nullptr);
|
explicit SettingsDialog(QWidget *parent = nullptr);
|
||||||
~SettingsDialog();
|
~SettingsDialog();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QCheckBox * m_stayOnTop = nullptr;
|
QCheckBox * m_stayOnTop = nullptr;
|
||||||
QComboBox * m_doubleClickBehavior = nullptr;
|
QCheckBox * m_useBuiltInCloseAnimation = nullptr;
|
||||||
QComboBox * m_mouseWheelBehavior = nullptr;
|
QCheckBox * m_useLightCheckerboard = nullptr;
|
||||||
QComboBox * m_initWindowSizeBehavior = nullptr;
|
QCheckBox * m_loopGallery = nullptr;
|
||||||
};
|
QCheckBox * m_autoLongImageMode = nullptr;
|
||||||
|
QComboBox * m_doubleClickBehavior = nullptr;
|
||||||
#endif // SETTINGSDIALOG_H
|
QComboBox * m_mouseWheelBehavior = nullptr;
|
||||||
|
QComboBox * m_initWindowSizeBehavior = nullptr;
|
||||||
|
QComboBox * m_hiDpiRoundingPolicyBehavior = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SETTINGSDIALOG_H
|
||||||
|
|||||||
126
app/shortcutedit.cpp
Normal file
126
app/shortcutedit.cpp
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2024 Gary Wang <opensource@blumia.net>
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
#include "shortcutedit.h"
|
||||||
|
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QToolButton>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QFormLayout>
|
||||||
|
#include <QDialogButtonBox>
|
||||||
|
#include <QKeySequenceEdit>
|
||||||
|
|
||||||
|
ShortcutEditor::ShortcutEditor(ShortcutEdit * shortcutEdit, QWidget * parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
, m_descriptionLabel(new QLabel)
|
||||||
|
, m_shortcutEdit(shortcutEdit)
|
||||||
|
, m_shortcutLayout(new QFormLayout)
|
||||||
|
{
|
||||||
|
Q_CHECK_PTR(m_shortcutEdit);
|
||||||
|
|
||||||
|
QDialogButtonBox * buttons = new QDialogButtonBox(QDialogButtonBox::Apply | QDialogButtonBox::Discard);
|
||||||
|
|
||||||
|
QVBoxLayout * layout = new QVBoxLayout(this);
|
||||||
|
layout->addWidget(m_descriptionLabel);
|
||||||
|
layout->addLayout(m_shortcutLayout);
|
||||||
|
layout->addWidget(buttons);
|
||||||
|
|
||||||
|
connect(buttons, &QDialogButtonBox::clicked, this, [=](QAbstractButton *button){
|
||||||
|
if ((QPushButton *)button == buttons->button(QDialogButtonBox::Apply)) {
|
||||||
|
applyShortcuts();
|
||||||
|
} else {
|
||||||
|
reloadShortcuts();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
connect(shortcutEdit, &ShortcutEdit::shortcutsChanged, this, &ShortcutEditor::reloadShortcuts);
|
||||||
|
|
||||||
|
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
|
||||||
|
|
||||||
|
reloadShortcuts();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShortcutEditor::setDescription(const QString &desc)
|
||||||
|
{
|
||||||
|
m_descriptionLabel->setText(desc);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShortcutEditor::reloadShortcuts()
|
||||||
|
{
|
||||||
|
if (!m_keySequenceEdits.isEmpty()) {
|
||||||
|
for (QKeySequenceEdit * keyseqEdit : m_keySequenceEdits) {
|
||||||
|
m_shortcutLayout->removeRow(keyseqEdit);
|
||||||
|
}
|
||||||
|
m_keySequenceEdits.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<QKeySequence> shortcuts = m_shortcutEdit->shortcuts();
|
||||||
|
shortcuts.append(QKeySequence());
|
||||||
|
for (const QKeySequence & shortcut : shortcuts) {
|
||||||
|
QKeySequenceEdit * keyseqEdit = new QKeySequenceEdit(this);
|
||||||
|
keyseqEdit->setClearButtonEnabled(true);
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||||
|
keyseqEdit->setMaximumSequenceLength(1);
|
||||||
|
#endif // QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||||
|
keyseqEdit->setKeySequence(shortcut);
|
||||||
|
m_keySequenceEdits.append(keyseqEdit);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < m_keySequenceEdits.count(); i++) {
|
||||||
|
m_shortcutLayout->addRow(tr("Shortcut #%1").arg(i + 1), m_keySequenceEdits.at(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShortcutEditor::applyShortcuts()
|
||||||
|
{
|
||||||
|
QList<QKeySequence> shortcuts;
|
||||||
|
for (const QKeySequenceEdit * keyseqEdit : m_keySequenceEdits) {
|
||||||
|
if (!keyseqEdit->keySequence().isEmpty() && !shortcuts.contains(keyseqEdit->keySequence())) {
|
||||||
|
shortcuts.append(keyseqEdit->keySequence());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
emit m_shortcutEdit->applyShortcutsRequested(shortcuts);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------
|
||||||
|
|
||||||
|
ShortcutEdit::ShortcutEdit(QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
, m_shortcutsLabel(new QLabel(this))
|
||||||
|
, m_setShortcutButton(new QToolButton(this))
|
||||||
|
{
|
||||||
|
m_setShortcutButton->setText("...");
|
||||||
|
|
||||||
|
QHBoxLayout * layout = new QHBoxLayout(this);
|
||||||
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
layout->addWidget(m_shortcutsLabel, 1);
|
||||||
|
layout->addWidget(m_setShortcutButton);
|
||||||
|
|
||||||
|
connect(this, &ShortcutEdit::shortcutsChanged, this, [=](){
|
||||||
|
QStringList shortcutTexts;
|
||||||
|
for (const QKeySequence & shortcut : std::as_const(m_shortcuts)) {
|
||||||
|
shortcutTexts.append(shortcut.toString(QKeySequence::NativeText));
|
||||||
|
}
|
||||||
|
m_shortcutsLabel->setText(shortcutTexts.isEmpty() ? tr("No shortcuts") : shortcutTexts.join(", "));
|
||||||
|
m_shortcutsLabel->setDisabled(shortcutTexts.isEmpty());
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(m_setShortcutButton, &QToolButton::clicked, this, &ShortcutEdit::editButtonClicked);
|
||||||
|
|
||||||
|
adjustSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
ShortcutEdit::~ShortcutEdit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<QKeySequence> ShortcutEdit::shortcuts() const
|
||||||
|
{
|
||||||
|
return m_shortcuts;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShortcutEdit::setShortcuts(const QList<QKeySequence> &shortcuts)
|
||||||
|
{
|
||||||
|
m_shortcuts = shortcuts;
|
||||||
|
emit shortcutsChanged();
|
||||||
|
}
|
||||||
55
app/shortcutedit.h
Normal file
55
app/shortcutedit.h
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2024 Gary Wang <opensource@blumia.net>
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QList>
|
||||||
|
#include <QKeySequence>
|
||||||
|
|
||||||
|
class QLabel;
|
||||||
|
class QFormLayout;
|
||||||
|
class QToolButton;
|
||||||
|
class QKeySequenceEdit;
|
||||||
|
class ShortcutEdit;
|
||||||
|
class ShortcutEditor : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit ShortcutEditor(ShortcutEdit * shortcutEdit, QWidget * parent = nullptr);
|
||||||
|
~ShortcutEditor() = default;
|
||||||
|
|
||||||
|
void setDescription(const QString & desc);
|
||||||
|
|
||||||
|
void reloadShortcuts();
|
||||||
|
void applyShortcuts();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QLabel * m_descriptionLabel;
|
||||||
|
ShortcutEdit * m_shortcutEdit;
|
||||||
|
QFormLayout * m_shortcutLayout;
|
||||||
|
QList<QKeySequenceEdit *> m_keySequenceEdits;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ShortcutEdit : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(QList<QKeySequence> shortcuts MEMBER m_shortcuts WRITE setShortcuts NOTIFY shortcutsChanged)
|
||||||
|
public:
|
||||||
|
explicit ShortcutEdit(QWidget * parent = nullptr);
|
||||||
|
~ShortcutEdit();
|
||||||
|
|
||||||
|
QList<QKeySequence> shortcuts() const;
|
||||||
|
void setShortcuts(const QList<QKeySequence> &shortcuts);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void shortcutsChanged();
|
||||||
|
void editButtonClicked();
|
||||||
|
void applyShortcutsRequested(QList<QKeySequence> newShortcuts);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QList<QKeySequence> m_shortcuts;
|
||||||
|
QLabel * m_shortcutsLabel;
|
||||||
|
QToolButton * m_setShortcutButton;
|
||||||
|
};
|
||||||
@ -1,38 +1,38 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "toolbutton.h"
|
#include "toolbutton.h"
|
||||||
|
|
||||||
#include "actionmanager.h"
|
#include "actionmanager.h"
|
||||||
#include "opacityhelper.h"
|
#include "opacityhelper.h"
|
||||||
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QGraphicsOpacityEffect>
|
#include <QGraphicsOpacityEffect>
|
||||||
#include <QPropertyAnimation>
|
#include <QPropertyAnimation>
|
||||||
|
|
||||||
ToolButton::ToolButton(bool hoverColor, QWidget *parent)
|
ToolButton::ToolButton(bool hoverColor, QWidget *parent)
|
||||||
: QPushButton(parent)
|
: QPushButton(parent)
|
||||||
, m_opacityHelper(new OpacityHelper(this))
|
, m_opacityHelper(new OpacityHelper(this))
|
||||||
{
|
{
|
||||||
setFlat(true);
|
setFlat(true);
|
||||||
QString qss = "QPushButton {"
|
QString qss = "QPushButton {"
|
||||||
"background: transparent;"
|
"background: transparent;"
|
||||||
"}";
|
"}";
|
||||||
if (hoverColor) {
|
if (hoverColor) {
|
||||||
qss += "QPushButton:hover {"
|
qss += "QPushButton:hover {"
|
||||||
"background: red;"
|
"background: red;"
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
setStyleSheet(qss);
|
setStyleSheet(qss);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolButton::setIconResourcePath(const QString &iconp)
|
void ToolButton::setIconResourcePath(const QString &iconp)
|
||||||
{
|
{
|
||||||
this->setIcon(ActionManager::loadHidpiIcon(iconp, this->iconSize()));
|
this->setIcon(ActionManager::loadHidpiIcon(iconp, this->iconSize()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolButton::setOpacity(qreal opacity, bool animated)
|
void ToolButton::setOpacity(qreal opacity, bool animated)
|
||||||
{
|
{
|
||||||
m_opacityHelper->setOpacity(opacity, animated);
|
m_opacityHelper->setOpacity(opacity, animated);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,25 +1,25 @@
|
|||||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#ifndef TOOLBUTTON_H
|
#ifndef TOOLBUTTON_H
|
||||||
#define TOOLBUTTON_H
|
#define TOOLBUTTON_H
|
||||||
|
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
||||||
class OpacityHelper;
|
class OpacityHelper;
|
||||||
class ToolButton : public QPushButton
|
class ToolButton : public QPushButton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ToolButton(bool hoverColor = false, QWidget * parent = nullptr);
|
ToolButton(bool hoverColor = false, QWidget * parent = nullptr);
|
||||||
void setIconResourcePath(const QString &iconp);
|
void setIconResourcePath(const QString &iconp);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setOpacity(qreal opacity, bool animated = true);
|
void setOpacity(qreal opacity, bool animated = true);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
OpacityHelper * m_opacityHelper;
|
OpacityHelper * m_opacityHelper;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TOOLBUTTON_H
|
#endif // TOOLBUTTON_H
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
908
app/translations/PineapplePictures_it.ts
Normal file
908
app/translations/PineapplePictures_it.ts
Normal file
@ -0,0 +1,908 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="it_IT">
|
||||||
|
<context>
|
||||||
|
<name>AboutDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="29"/>
|
||||||
|
<source>About</source>
|
||||||
|
<translation>Informazioni</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="32"/>
|
||||||
|
<source>Launch application with image file path as argument to load the file.</source>
|
||||||
|
<translation>Avvia l'applicazione con il percorso del file immagine come argomento per caricare il file.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="33"/>
|
||||||
|
<source>Drag and drop image file onto the window is also supported.</source>
|
||||||
|
<translation>È supportato anche il trascinamento del file immagine sulla finestra.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="34"/>
|
||||||
|
<source>None of the operations in this application will alter the pictures on disk.</source>
|
||||||
|
<translation>Nessuna delle operazioni in questa applicazione altererà le immagini sul disco.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="35"/>
|
||||||
|
<source>Context menu option explanation:</source>
|
||||||
|
<translation>Spiegazione delle opzioni del menu contestuale:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="42"/>
|
||||||
|
<source>Make window stay on top of all other windows.</source>
|
||||||
|
<translation>Fai in modo che la finestra rimanga in cima a tutte le altre finestre.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="45"/>
|
||||||
|
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
|
||||||
|
<translation>Evitare di chiudere accidentalmente la finestra. (es. facendo doppio clic sulla finestra)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="48"/>
|
||||||
|
<source>Avoid resetting the zoom/rotation/flip state that was applied to the image view when switching between images.</source>
|
||||||
|
<translation>Evitare di reimpostare lo stato di zoom/rotazione/capovolgimento applicato alla visualizzazione dell'immagine quando si passa da un'immagine all'altra.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="55"/>
|
||||||
|
<source>Version: %1</source>
|
||||||
|
<translation>Versione: %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="66"/>
|
||||||
|
<source>Logo designed by %1</source>
|
||||||
|
<translation>Logo disegnato da %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="68"/>
|
||||||
|
<source>Built with Qt %1 (%2)</source>
|
||||||
|
<translation>Costruito con Qt %1 (%2)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="69"/>
|
||||||
|
<source>Source code</source>
|
||||||
|
<translation>Codice sorgente</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="79"/>
|
||||||
|
<source>Contributors</source>
|
||||||
|
<translation>Contributori</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="81"/>
|
||||||
|
<source>List of contributors on GitHub</source>
|
||||||
|
<translation>Elenco dei contributori su GitHub</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="82"/>
|
||||||
|
<source>Thanks to all people who contributed to this project.</source>
|
||||||
|
<translation>Grazie a tutte le persone che hanno contribuito a questo progetto.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="86"/>
|
||||||
|
<source>Translators</source>
|
||||||
|
<translation>Traduttori</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="87"/>
|
||||||
|
<source>I would like to thank the following people who volunteered to translate this application.</source>
|
||||||
|
<translation>Vorrei ringraziare le seguenti persone che si sono offerte volontarie per tradurre questa applicazione.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="131"/>
|
||||||
|
<source>%1 is built on the following free software libraries:</source>
|
||||||
|
<comment>Free as in freedom</comment>
|
||||||
|
<translation>%1 si basa sulle seguenti librerie di software libero:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="155"/>
|
||||||
|
<source>&Special Thanks</source>
|
||||||
|
<translation>&Ringraziamenti speciali</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="157"/>
|
||||||
|
<source>&Third-party Libraries</source>
|
||||||
|
<translation>&Librerie di terze parti</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="93"/>
|
||||||
|
<source>Your Rights</source>
|
||||||
|
<translation>I tuoi diritti</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="63"/>
|
||||||
|
<source>Copyright (c) %1 %2</source>
|
||||||
|
<comment>%1 is year, %2 is the name of copyright holder(s)</comment>
|
||||||
|
<translation>Copyright (c) %1 %2</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="95"/>
|
||||||
|
<source>%1 is released under the MIT License.</source>
|
||||||
|
<translation>%1 è rilasciato sotto licenza MIT.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="96"/>
|
||||||
|
<source>This license grants people a number of freedoms:</source>
|
||||||
|
<translation>Questa licenza garantisce alle persone una serie di libertà:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="97"/>
|
||||||
|
<source>You are free to use %1, for any purpose</source>
|
||||||
|
<translation>Sei libero di usare %1, per qualsiasi scopo</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="98"/>
|
||||||
|
<source>You are free to distribute %1</source>
|
||||||
|
<translation>Sei libero di distribuire %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="99"/>
|
||||||
|
<source>You can study how %1 works and change it</source>
|
||||||
|
<translation>Puoi studiare come funziona %1 e cambiarlo</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="100"/>
|
||||||
|
<source>You can distribute changed versions of %1</source>
|
||||||
|
<translation>Puoi distribuire versioni modificate di %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="102"/>
|
||||||
|
<source>The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.</source>
|
||||||
|
<translation>La licenza MIT ti garantisce questa libertà. A nessuno è mai permesso portarlo via.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="130"/>
|
||||||
|
<source>Third-party Libraries used by %1</source>
|
||||||
|
<translation>Librerie di terze parti utilizzate da %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="153"/>
|
||||||
|
<source>&Help</source>
|
||||||
|
<translation>&Aiuto</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="154"/>
|
||||||
|
<source>&About</source>
|
||||||
|
<translation>&Informazioni</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="156"/>
|
||||||
|
<source>&License</source>
|
||||||
|
<translation>&Licenza</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>GraphicsScene</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="292"/>
|
||||||
|
<location filename="../graphicsscene.cpp" line="100"/>
|
||||||
|
<source>Drag image here</source>
|
||||||
|
<translation>Trascina qui l'immagine</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>GraphicsView</name>
|
||||||
|
<message>
|
||||||
|
<source>File url list is empty</source>
|
||||||
|
<translation type="vanished">L'elenco degli URL dei file è vuoto</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphicsview.cpp" line="50"/>
|
||||||
|
<source>File is not a valid image</source>
|
||||||
|
<translation>Il file non è un'immagine valida</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphicsview.cpp" line="54"/>
|
||||||
|
<location filename="../graphicsview.cpp" line="58"/>
|
||||||
|
<source>Image data is invalid or currently unsupported</source>
|
||||||
|
<translation>I dati dell'immagine non sono validi o non sono attualmente supportati</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Image data is invalid</source>
|
||||||
|
<translation type="vanished">I dati dell'immagine non sono validi</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Not supported mimedata: %1</source>
|
||||||
|
<translation type="vanished">Dati mime non supportati: %1</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="190"/>
|
||||||
|
<location filename="../mainwindow.cpp" line="561"/>
|
||||||
|
<source>File url list is empty</source>
|
||||||
|
<translation>L'elenco degli URL dei file è vuoto</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="461"/>
|
||||||
|
<source>&Copy</source>
|
||||||
|
<translation>&Copia</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="569"/>
|
||||||
|
<source>Image data is invalid</source>
|
||||||
|
<translation>I dati dell'immagine non sono validi</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="576"/>
|
||||||
|
<source>Not supported mimedata: %1</source>
|
||||||
|
<translation>Dati mime non supportati: %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="783"/>
|
||||||
|
<source>Image From Clipboard</source>
|
||||||
|
<translation>Immagine dagli appunti</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="801"/>
|
||||||
|
<source>Are you sure you want to move "%1" to recycle bin?</source>
|
||||||
|
<translation>Sei sicuro di voler spostare "%1" nel cestino?</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="805"/>
|
||||||
|
<source>Failed to move file to trash</source>
|
||||||
|
<translation>Impossibile spostare il file nel cestino</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="806"/>
|
||||||
|
<source>Move to trash failed, it might caused by file permission issue, file system limitation, or platform limitation.</source>
|
||||||
|
<translation>Lo spostamento nel cestino non è riuscito, potrebbe essere causato da un problema di autorizzazione del file, da una limitazione del file system o da una limitazione della piattaforma.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="106"/>
|
||||||
|
<source>Copy P&ixmap</source>
|
||||||
|
<translation>Copia P&ixmap</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="107"/>
|
||||||
|
<source>Copy &File Path</source>
|
||||||
|
<translation>Copia &Percorso file</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="125"/>
|
||||||
|
<source>Properties</source>
|
||||||
|
<translation>Proprietà</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="110"/>
|
||||||
|
<location filename="../aboutdialog.cpp" line="41"/>
|
||||||
|
<source>Stay on top</source>
|
||||||
|
<translation>Rimani in cima</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="111"/>
|
||||||
|
<location filename="../aboutdialog.cpp" line="44"/>
|
||||||
|
<source>Protected mode</source>
|
||||||
|
<translation>Modalità protetta</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="112"/>
|
||||||
|
<location filename="../aboutdialog.cpp" line="47"/>
|
||||||
|
<source>Keep transformation</source>
|
||||||
|
<comment>The 'transformation' means the flip/rotation status that currently applied to the image view</comment>
|
||||||
|
<translation>Mantieni trasformazione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="90"/>
|
||||||
|
<source>Zoom in</source>
|
||||||
|
<translation>Zoom avanti</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="91"/>
|
||||||
|
<source>Zoom out</source>
|
||||||
|
<translation>Zoom indietro</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="99"/>
|
||||||
|
<source>Pause/Resume Animation</source>
|
||||||
|
<translation>Pausa/Riprendi animazione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="100"/>
|
||||||
|
<source>Animation Go to Next Frame</source>
|
||||||
|
<translation>Animazione Vai al fotogramma successivo</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="102"/>
|
||||||
|
<source>Flip &Horizontally</source>
|
||||||
|
<translation>Capovolgi &Orizzontalmente</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="103"/>
|
||||||
|
<source>Fit to view</source>
|
||||||
|
<translation>Adatto alla visualizzazione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="104"/>
|
||||||
|
<source>Fit to width</source>
|
||||||
|
<translation>Adatta alla larghezza</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="105"/>
|
||||||
|
<source>Fit long image</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="108"/>
|
||||||
|
<source>&Paste</source>
|
||||||
|
<translation>&Incolla</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="92"/>
|
||||||
|
<source>Toggle Checkerboard</source>
|
||||||
|
<translation>Attiva/disattiva scacchiera</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="86"/>
|
||||||
|
<source>&Open...</source>
|
||||||
|
<translation>&Apri...</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="88"/>
|
||||||
|
<source>Actual size</source>
|
||||||
|
<translation>Dimensione reale</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="89"/>
|
||||||
|
<source>Toggle maximize</source>
|
||||||
|
<translation>Attiva massimizzazione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="93"/>
|
||||||
|
<source>Rotate right</source>
|
||||||
|
<translation>Ruota a destra</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="94"/>
|
||||||
|
<source>Rotate left</source>
|
||||||
|
<translation>Ruota a sinistra</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="96"/>
|
||||||
|
<source>Previous image</source>
|
||||||
|
<translation>Immagine precedente</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="97"/>
|
||||||
|
<source>Next image</source>
|
||||||
|
<translation>Immagine successiva</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="800"/>
|
||||||
|
<location filename="../actionmanager.cpp" line="109"/>
|
||||||
|
<source>Move to Trash</source>
|
||||||
|
<translation>Sposta nel cestino</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="113"/>
|
||||||
|
<source>Configure...</source>
|
||||||
|
<translation>Configura...</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="114"/>
|
||||||
|
<source>Help</source>
|
||||||
|
<translation>Aiuto</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="117"/>
|
||||||
|
<source>Show in File Explorer</source>
|
||||||
|
<comment>File Explorer is the name of explorer.exe under Windows</comment>
|
||||||
|
<translation>Mostra in Esplora file</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="123"/>
|
||||||
|
<source>Show in directory</source>
|
||||||
|
<translation>Mostra nella directory</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="126"/>
|
||||||
|
<source>Quit</source>
|
||||||
|
<translation>Esci</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MetadataDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatadialog.cpp" line="84"/>
|
||||||
|
<source>Image Metadata</source>
|
||||||
|
<translation>Metadati dell'immagine</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MetadataModel</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="43"/>
|
||||||
|
<source>Origin</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>Origine</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="44"/>
|
||||||
|
<source>Image</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>Immagine</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="48"/>
|
||||||
|
<source>File</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>File</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="45"/>
|
||||||
|
<source>Camera</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>Camera</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="35"/>
|
||||||
|
<source>%1 File</source>
|
||||||
|
<translation>%1 File</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="42"/>
|
||||||
|
<source>Description</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>Descrizione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="46"/>
|
||||||
|
<source>Advanced photo</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>Foto avanzata</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="47"/>
|
||||||
|
<source>GPS</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>GPS</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="52"/>
|
||||||
|
<source>Dimensions</source>
|
||||||
|
<translation>Dimensioni</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="54"/>
|
||||||
|
<source>Aspect ratio</source>
|
||||||
|
<translation>Proporzioni</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="58"/>
|
||||||
|
<source>Frame count</source>
|
||||||
|
<translation>Conteggio fotogrammi</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="62"/>
|
||||||
|
<source>Name</source>
|
||||||
|
<translation>Nome</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="64"/>
|
||||||
|
<source>Item type</source>
|
||||||
|
<translation>Tipo di elemento</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="66"/>
|
||||||
|
<source>Folder path</source>
|
||||||
|
<translation>Percorso cartella</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="68"/>
|
||||||
|
<source>Size</source>
|
||||||
|
<translation>Dimensione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="70"/>
|
||||||
|
<source>Date created</source>
|
||||||
|
<translation>Data di creazione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="72"/>
|
||||||
|
<source>Date modified</source>
|
||||||
|
<translation>Data di modifica</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="79"/>
|
||||||
|
<source>Title</source>
|
||||||
|
<translation>Titolo</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="81"/>
|
||||||
|
<source>Subject</source>
|
||||||
|
<translation>Soggetto</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="83"/>
|
||||||
|
<source>Rating</source>
|
||||||
|
<translation>Valutazione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="85"/>
|
||||||
|
<source>Tags</source>
|
||||||
|
<translation>Tag</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="87"/>
|
||||||
|
<source>Comments</source>
|
||||||
|
<translation>Commenti</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="90"/>
|
||||||
|
<source>Authors</source>
|
||||||
|
<translation>Autori</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="92"/>
|
||||||
|
<source>Date taken</source>
|
||||||
|
<translation>Data scatto</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="98"/>
|
||||||
|
<source>Program name</source>
|
||||||
|
<translation>Nome programma</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="100"/>
|
||||||
|
<source>Copyright</source>
|
||||||
|
<translation>Copyright</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="103"/>
|
||||||
|
<source>Horizontal resolution</source>
|
||||||
|
<translation>Risoluzione orizzontale</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="105"/>
|
||||||
|
<source>Vertical resolution</source>
|
||||||
|
<translation>Risoluzione verticale</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="107"/>
|
||||||
|
<source>Resolution unit</source>
|
||||||
|
<translation>Unità di risoluzione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="109"/>
|
||||||
|
<source>Colour representation</source>
|
||||||
|
<translation>Rappresentazione del colore</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="112"/>
|
||||||
|
<source>Camera maker</source>
|
||||||
|
<translation>Produttore macchina fotografica</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="114"/>
|
||||||
|
<source>Camera model</source>
|
||||||
|
<translation>Modello camera</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="116"/>
|
||||||
|
<source>F-stop</source>
|
||||||
|
<translation>F-stop</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="118"/>
|
||||||
|
<source>Exposure time</source>
|
||||||
|
<translation>Tempo di esposizione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="120"/>
|
||||||
|
<source>ISO speed</source>
|
||||||
|
<translation>Velocità ISO</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="122"/>
|
||||||
|
<source>Exposure bias</source>
|
||||||
|
<translation>Bias d'esposizione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="124"/>
|
||||||
|
<source>Focal length</source>
|
||||||
|
<translation>Lunghezza focale</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="126"/>
|
||||||
|
<source>Max aperture</source>
|
||||||
|
<translation>Massima apertura</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="128"/>
|
||||||
|
<source>Metering mode</source>
|
||||||
|
<translation>Modalità di misurazione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="130"/>
|
||||||
|
<source>Subject distance</source>
|
||||||
|
<translation>Distanza del soggetto</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="132"/>
|
||||||
|
<source>Flash mode</source>
|
||||||
|
<translation>Modalità flash</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="134"/>
|
||||||
|
<source>35mm focal length</source>
|
||||||
|
<translation>Lunghezza focale 35 mm</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="137"/>
|
||||||
|
<source>Lens model</source>
|
||||||
|
<translation>Modello di lente</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="139"/>
|
||||||
|
<source>Contrast</source>
|
||||||
|
<translation>Contrasto</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="141"/>
|
||||||
|
<source>Brightness</source>
|
||||||
|
<translation>Luminosità</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="143"/>
|
||||||
|
<source>Exposure program</source>
|
||||||
|
<translation>Programma di esposizione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="145"/>
|
||||||
|
<source>Saturation</source>
|
||||||
|
<translation>Saturazione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="147"/>
|
||||||
|
<source>Sharpness</source>
|
||||||
|
<translation>Nitidezza</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="149"/>
|
||||||
|
<source>White balance</source>
|
||||||
|
<translation>Bilanciamento del bianco</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="151"/>
|
||||||
|
<source>Digital zoom</source>
|
||||||
|
<translation>Zoom digitale</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="153"/>
|
||||||
|
<source>EXIF version</source>
|
||||||
|
<translation>Versione EXIF</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="156"/>
|
||||||
|
<source>Latitude reference</source>
|
||||||
|
<translation>Riferimento di latitudine</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="158"/>
|
||||||
|
<source>Latitude</source>
|
||||||
|
<translation>Latitudine</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="160"/>
|
||||||
|
<source>Longitude reference</source>
|
||||||
|
<translation>Riferimento di longitudine</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="162"/>
|
||||||
|
<source>Longitude</source>
|
||||||
|
<translation>Longitudine</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="164"/>
|
||||||
|
<source>Altitude reference</source>
|
||||||
|
<translation>Riferimento altimetrico</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="166"/>
|
||||||
|
<source>Altitude</source>
|
||||||
|
<translation>Altitudine</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="176"/>
|
||||||
|
<source>%1 x %2</source>
|
||||||
|
<translation>%1 x %2</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="194"/>
|
||||||
|
<source>%1 : %2</source>
|
||||||
|
<translation>%1 : %2</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="319"/>
|
||||||
|
<source>Property</source>
|
||||||
|
<translation>Proprietà</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="319"/>
|
||||||
|
<source>Value</source>
|
||||||
|
<translation>Valore</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SettingsDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="32"/>
|
||||||
|
<source>Settings</source>
|
||||||
|
<translation>Impostazioni</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="40"/>
|
||||||
|
<source>Options</source>
|
||||||
|
<translation>Opzioni</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="52"/>
|
||||||
|
<source>Shortcuts</source>
|
||||||
|
<translation>Scorciatoie</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="62"/>
|
||||||
|
<source>Editing shortcuts for action "%1":</source>
|
||||||
|
<translation>Modifica delle scorciatoie per l'azione "%1":</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="71"/>
|
||||||
|
<source>Failed to set shortcuts</source>
|
||||||
|
<translation>Impossibile impostare le scorciatoie</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="72"/>
|
||||||
|
<source>Please check if shortcuts are duplicated with existing shortcuts.</source>
|
||||||
|
<translation>Controlla se i collegamenti sono duplicati con collegamenti esistenti.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="79"/>
|
||||||
|
<source>Do nothing</source>
|
||||||
|
<translation>Non fare nulla</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="80"/>
|
||||||
|
<source>Close the window</source>
|
||||||
|
<translation>Chiudi la finestra</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="81"/>
|
||||||
|
<source>Toggle maximize</source>
|
||||||
|
<translation>Attiva massimizzazione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="82"/>
|
||||||
|
<source>Toggle fullscreen</source>
|
||||||
|
<translation>Attiva schermo intero</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="86"/>
|
||||||
|
<source>Zoom in and out</source>
|
||||||
|
<translation>Zoom avanti e indietro</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="87"/>
|
||||||
|
<source>View next or previous item</source>
|
||||||
|
<translation>Visualizza l'elemento successivo o precedente</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="91"/>
|
||||||
|
<source>Auto size</source>
|
||||||
|
<translation>Dimensione automatica</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="92"/>
|
||||||
|
<source>Maximized</source>
|
||||||
|
<translation>Massimizzato</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="93"/>
|
||||||
|
<source>Windowed</source>
|
||||||
|
<translation>Finestrato</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="97"/>
|
||||||
|
<source>Round (Integer scaling)</source>
|
||||||
|
<comment>This option means round up for .5 and above</comment>
|
||||||
|
<translation>Round (ridimensionamento intero)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="98"/>
|
||||||
|
<source>Ceil (Integer scaling)</source>
|
||||||
|
<comment>This option means always round up</comment>
|
||||||
|
<translation>Ceil (ridimensionamento intero)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="99"/>
|
||||||
|
<source>Floor (Integer scaling)</source>
|
||||||
|
<comment>This option means always round down</comment>
|
||||||
|
<translation>Floor (ridimensionamento intero)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="100"/>
|
||||||
|
<source>Follow system (Fractional scaling)</source>
|
||||||
|
<comment>This option means don't round</comment>
|
||||||
|
<translation>Segui il sistema (scala frazionaria)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="123"/>
|
||||||
|
<source>Stay on top when start-up</source>
|
||||||
|
<translation>Rimani in cima quando si avvia</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="124"/>
|
||||||
|
<source>Use built-in close window animation</source>
|
||||||
|
<translation>Utilizza l'animazione di chiusura della finestra integrata</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="125"/>
|
||||||
|
<source>Use light-color checkerboard</source>
|
||||||
|
<translation>Utilizzare scacchiera di colore chiaro</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="126"/>
|
||||||
|
<source>Loop the loaded gallery</source>
|
||||||
|
<translation>Esegui il loop della galleria caricata</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="127"/>
|
||||||
|
<source>Auto long image mode</source>
|
||||||
|
<translation>Modalità immagine lunga automatica</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="128"/>
|
||||||
|
<source>Double-click behavior</source>
|
||||||
|
<translation>Comportamento del doppio clic</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="129"/>
|
||||||
|
<source>Mouse wheel behavior</source>
|
||||||
|
<translation>Comportamento della rotellina del mouse</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="130"/>
|
||||||
|
<source>Default window size</source>
|
||||||
|
<translation>Dimensioni predefinite della finestra</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="131"/>
|
||||||
|
<source>HiDPI scale factor rounding policy</source>
|
||||||
|
<translation>Politica di arrotondamento del fattore di scala HiDPI</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ShortcutEdit</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../shortcutedit.cpp" line="104"/>
|
||||||
|
<source>No shortcuts</source>
|
||||||
|
<translation>Nessuna scorciatoia</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ShortcutEditor</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../shortcutedit.cpp" line="70"/>
|
||||||
|
<source>Shortcut #%1</source>
|
||||||
|
<translation>Scorciatoia #%1</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>main</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../main.cpp" line="42"/>
|
||||||
|
<source>Pineapple Pictures</source>
|
||||||
|
<translation>Immagini di Pineapple</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main.cpp" line="45"/>
|
||||||
|
<source>List supported image format suffixes, and quit program.</source>
|
||||||
|
<translation>Elenca i suffissi dei formati immagine supportati e chiudi il programma.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main.cpp" line="49"/>
|
||||||
|
<source>File list.</source>
|
||||||
|
<translation>Elenco file.</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
||||||
File diff suppressed because it is too large
Load Diff
908
app/translations/PineapplePictures_ko.ts
Normal file
908
app/translations/PineapplePictures_ko.ts
Normal file
@ -0,0 +1,908 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="ko_KR">
|
||||||
|
<context>
|
||||||
|
<name>AboutDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="29"/>
|
||||||
|
<source>About</source>
|
||||||
|
<translation>정보</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="32"/>
|
||||||
|
<source>Launch application with image file path as argument to load the file.</source>
|
||||||
|
<translation>이미지 파일 경로를 인수로 지정하여 응용 프로그램을 시작하여 파일을 불러옵니다.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="33"/>
|
||||||
|
<source>Drag and drop image file onto the window is also supported.</source>
|
||||||
|
<translation>이미지 파일을 창으로 끌어다 놓기도 지원됩니다.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="34"/>
|
||||||
|
<source>None of the operations in this application will alter the pictures on disk.</source>
|
||||||
|
<translation>이 응용 프로그램의 어떤 작업도 디스크의 사진을 변경하지 않습니다.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="35"/>
|
||||||
|
<source>Context menu option explanation:</source>
|
||||||
|
<translation>상황에 맞는 메뉴 옵션 설명:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="42"/>
|
||||||
|
<source>Make window stay on top of all other windows.</source>
|
||||||
|
<translation>창이 다른 모든 창 위에 오도록 합니다.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="45"/>
|
||||||
|
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
|
||||||
|
<translation>실수로 창을 닫지 마십시오. (예: 창을 두 번 클릭하여)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="48"/>
|
||||||
|
<source>Avoid resetting the zoom/rotation/flip state that was applied to the image view when switching between images.</source>
|
||||||
|
<translation>이미지 간 전환 시 이미지 보기에 적용되었던 줌/회전/플립 상태를 재설정하지 마세요.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="55"/>
|
||||||
|
<source>Version: %1</source>
|
||||||
|
<translation>버전: %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="66"/>
|
||||||
|
<source>Logo designed by %1</source>
|
||||||
|
<translation>%1에 의해 설계된 로고</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="68"/>
|
||||||
|
<source>Built with Qt %1 (%2)</source>
|
||||||
|
<translation>Qt %1(%2)로 빌드됨</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="69"/>
|
||||||
|
<source>Source code</source>
|
||||||
|
<translation>소스 코드</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="79"/>
|
||||||
|
<source>Contributors</source>
|
||||||
|
<translation>기여자</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="81"/>
|
||||||
|
<source>List of contributors on GitHub</source>
|
||||||
|
<translation>GitHub의 기여자 목록</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="82"/>
|
||||||
|
<source>Thanks to all people who contributed to this project.</source>
|
||||||
|
<translation>이 프로젝트에 기여해주신 모든 분들께 감사드립니다.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="86"/>
|
||||||
|
<source>Translators</source>
|
||||||
|
<translation>번역자</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="87"/>
|
||||||
|
<source>I would like to thank the following people who volunteered to translate this application.</source>
|
||||||
|
<translation>이 응용 프로그램 번역에 자원해 주신 다음 분들께 감사의 말씀을 전합니다.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="131"/>
|
||||||
|
<source>%1 is built on the following free software libraries:</source>
|
||||||
|
<comment>Free as in freedom</comment>
|
||||||
|
<translation>%1은 다음과 같은 무료 소프트웨어 라이브러리를 기반으로 합니다:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="155"/>
|
||||||
|
<source>&Special Thanks</source>
|
||||||
|
<translation>특별한 감사(&S)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="157"/>
|
||||||
|
<source>&Third-party Libraries</source>
|
||||||
|
<translation>타사 라이브러리(&T)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="93"/>
|
||||||
|
<source>Your Rights</source>
|
||||||
|
<translation>사용자 권한</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="63"/>
|
||||||
|
<source>Copyright (c) %1 %2</source>
|
||||||
|
<comment>%1 is year, %2 is the name of copyright holder(s)</comment>
|
||||||
|
<translation>저작권 (c) %1 %2</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="95"/>
|
||||||
|
<source>%1 is released under the MIT License.</source>
|
||||||
|
<translation>사용자의 권한 %1은 MIT 라이선스에 따라 릴리스됩니다.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="96"/>
|
||||||
|
<source>This license grants people a number of freedoms:</source>
|
||||||
|
<translation>이 라이선스는 다음과 같은 다양한 자유를 제공합니다:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="97"/>
|
||||||
|
<source>You are free to use %1, for any purpose</source>
|
||||||
|
<translation>%1을(를) 어떤 용도로도 자유롭게 사용할 수 있습니다</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="98"/>
|
||||||
|
<source>You are free to distribute %1</source>
|
||||||
|
<translation>%1를 무료로 배포할 수 있습니다</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="99"/>
|
||||||
|
<source>You can study how %1 works and change it</source>
|
||||||
|
<translation>%1가 작동하는 방식을 연구하고 변경할 수 있습니다</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="100"/>
|
||||||
|
<source>You can distribute changed versions of %1</source>
|
||||||
|
<translation>변경된 버전의 %1을 배포할 수 있습니다</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="102"/>
|
||||||
|
<source>The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.</source>
|
||||||
|
<translation>MIT 라이선스는 이러한 자유를 보장합니다. 누구도 이를 빼앗을 수 없습니다.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="130"/>
|
||||||
|
<source>Third-party Libraries used by %1</source>
|
||||||
|
<translation>%1에서 사용하는 타사 라이브러리</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="153"/>
|
||||||
|
<source>&Help</source>
|
||||||
|
<translation>도움말(&H)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="154"/>
|
||||||
|
<source>&About</source>
|
||||||
|
<translation>정보(&A)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="156"/>
|
||||||
|
<source>&License</source>
|
||||||
|
<translation>라이선스(&L)</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>GraphicsScene</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="292"/>
|
||||||
|
<location filename="../graphicsscene.cpp" line="100"/>
|
||||||
|
<source>Drag image here</source>
|
||||||
|
<translation>이미지를 여기로 끌기</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>GraphicsView</name>
|
||||||
|
<message>
|
||||||
|
<source>File url list is empty</source>
|
||||||
|
<translation type="vanished">파일 URL 목록이 비어 있습니다</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphicsview.cpp" line="50"/>
|
||||||
|
<source>File is not a valid image</source>
|
||||||
|
<translation>파일이 올바른 이미지가 아닙니다</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphicsview.cpp" line="54"/>
|
||||||
|
<location filename="../graphicsview.cpp" line="58"/>
|
||||||
|
<source>Image data is invalid or currently unsupported</source>
|
||||||
|
<translation>이미지 데이터가 잘못되었거나 현재 지원되지 않습니다</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Image data is invalid</source>
|
||||||
|
<translation type="vanished">이미지 데이터가 잘못되었습니다</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Not supported mimedata: %1</source>
|
||||||
|
<translation type="vanished">지원되지 않는 mimedata: %1</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="190"/>
|
||||||
|
<location filename="../mainwindow.cpp" line="561"/>
|
||||||
|
<source>File url list is empty</source>
|
||||||
|
<translation>파일 URL 목록이 비어 있습니다</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="461"/>
|
||||||
|
<source>&Copy</source>
|
||||||
|
<translation>복사(&C)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="569"/>
|
||||||
|
<source>Image data is invalid</source>
|
||||||
|
<translation>이미지 데이터가 잘못되었습니다</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="576"/>
|
||||||
|
<source>Not supported mimedata: %1</source>
|
||||||
|
<translation>지원되지 않는 mimedata: %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="783"/>
|
||||||
|
<source>Image From Clipboard</source>
|
||||||
|
<translation>클립보드에서 이미지</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="801"/>
|
||||||
|
<source>Are you sure you want to move "%1" to recycle bin?</source>
|
||||||
|
<translation>"%1"을 휴지통으로 옮기시겠습니까?</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="805"/>
|
||||||
|
<source>Failed to move file to trash</source>
|
||||||
|
<translation>파일을 휴지통으로 이동하지 못했습니다</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="806"/>
|
||||||
|
<source>Move to trash failed, it might caused by file permission issue, file system limitation, or platform limitation.</source>
|
||||||
|
<translation>휴지통으로 이동하지 못했습니다. 파일 권한 문제, 파일 시스템 제한 또는 플랫폼 제한으로 인해 발생할 수 있습니다.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="106"/>
|
||||||
|
<source>Copy P&ixmap</source>
|
||||||
|
<translation>Pixmap 복사(&I)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="107"/>
|
||||||
|
<source>Copy &File Path</source>
|
||||||
|
<translation>파일 경로 복사(&F)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="125"/>
|
||||||
|
<source>Properties</source>
|
||||||
|
<translation>속성</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="110"/>
|
||||||
|
<location filename="../aboutdialog.cpp" line="41"/>
|
||||||
|
<source>Stay on top</source>
|
||||||
|
<translation>맨 위에 유지</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="111"/>
|
||||||
|
<location filename="../aboutdialog.cpp" line="44"/>
|
||||||
|
<source>Protected mode</source>
|
||||||
|
<translation>보호 모드</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="112"/>
|
||||||
|
<location filename="../aboutdialog.cpp" line="47"/>
|
||||||
|
<source>Keep transformation</source>
|
||||||
|
<comment>The 'transformation' means the flip/rotation status that currently applied to the image view</comment>
|
||||||
|
<translation>변형 유지</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="90"/>
|
||||||
|
<source>Zoom in</source>
|
||||||
|
<translation>확대</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="91"/>
|
||||||
|
<source>Zoom out</source>
|
||||||
|
<translation>축소</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="99"/>
|
||||||
|
<source>Pause/Resume Animation</source>
|
||||||
|
<translation>애니메이션 일시 중지/재개</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="100"/>
|
||||||
|
<source>Animation Go to Next Frame</source>
|
||||||
|
<translation>애니메이션 다음 프레임으로 이동</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="102"/>
|
||||||
|
<source>Flip &Horizontally</source>
|
||||||
|
<translation>수평으로 뒤집기(&H)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="103"/>
|
||||||
|
<source>Fit to view</source>
|
||||||
|
<translation>보기에 맞춤</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="104"/>
|
||||||
|
<source>Fit to width</source>
|
||||||
|
<translation>너비에 맞춤</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="105"/>
|
||||||
|
<source>Fit long image</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="108"/>
|
||||||
|
<source>&Paste</source>
|
||||||
|
<translation>붙여넣기(&P)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="92"/>
|
||||||
|
<source>Toggle Checkerboard</source>
|
||||||
|
<translation>바둑판 전환</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="86"/>
|
||||||
|
<source>&Open...</source>
|
||||||
|
<translation>열기(&O)...</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="88"/>
|
||||||
|
<source>Actual size</source>
|
||||||
|
<translation>실제 크기</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="89"/>
|
||||||
|
<source>Toggle maximize</source>
|
||||||
|
<translation>최대화 전환</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="93"/>
|
||||||
|
<source>Rotate right</source>
|
||||||
|
<translation>오른쪽으로 회전</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="94"/>
|
||||||
|
<source>Rotate left</source>
|
||||||
|
<translation>왼쪽으로 회전</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="96"/>
|
||||||
|
<source>Previous image</source>
|
||||||
|
<translation>이전 이미지</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="97"/>
|
||||||
|
<source>Next image</source>
|
||||||
|
<translation>다음 이미지</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="800"/>
|
||||||
|
<location filename="../actionmanager.cpp" line="109"/>
|
||||||
|
<source>Move to Trash</source>
|
||||||
|
<translation>휴지통으로 이동</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="113"/>
|
||||||
|
<source>Configure...</source>
|
||||||
|
<translation>구성...</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="114"/>
|
||||||
|
<source>Help</source>
|
||||||
|
<translation>도움말</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="117"/>
|
||||||
|
<source>Show in File Explorer</source>
|
||||||
|
<comment>File Explorer is the name of explorer.exe under Windows</comment>
|
||||||
|
<translation>파일 탐색기에 표시</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="123"/>
|
||||||
|
<source>Show in directory</source>
|
||||||
|
<translation>디렉터리에 표시</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="126"/>
|
||||||
|
<source>Quit</source>
|
||||||
|
<translation>종료</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MetadataDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatadialog.cpp" line="84"/>
|
||||||
|
<source>Image Metadata</source>
|
||||||
|
<translation>이미지 메타데이터</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MetadataModel</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="43"/>
|
||||||
|
<source>Origin</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>기원</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="44"/>
|
||||||
|
<source>Image</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>이미지</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="48"/>
|
||||||
|
<source>File</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>파일</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="45"/>
|
||||||
|
<source>Camera</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>카메라</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="35"/>
|
||||||
|
<source>%1 File</source>
|
||||||
|
<translation>%1 파일</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="42"/>
|
||||||
|
<source>Description</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>설명</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="46"/>
|
||||||
|
<source>Advanced photo</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>고급 사진</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="47"/>
|
||||||
|
<source>GPS</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>GPS</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="52"/>
|
||||||
|
<source>Dimensions</source>
|
||||||
|
<translation>치수</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="54"/>
|
||||||
|
<source>Aspect ratio</source>
|
||||||
|
<translation>종횡비</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="58"/>
|
||||||
|
<source>Frame count</source>
|
||||||
|
<translation>프레임 수</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="62"/>
|
||||||
|
<source>Name</source>
|
||||||
|
<translation>이름</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="64"/>
|
||||||
|
<source>Item type</source>
|
||||||
|
<translation>항목 유형</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="66"/>
|
||||||
|
<source>Folder path</source>
|
||||||
|
<translation>폴더 경로</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="68"/>
|
||||||
|
<source>Size</source>
|
||||||
|
<translation>크기</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="70"/>
|
||||||
|
<source>Date created</source>
|
||||||
|
<translation>만든 날짜</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="72"/>
|
||||||
|
<source>Date modified</source>
|
||||||
|
<translation>수정 날짜</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="79"/>
|
||||||
|
<source>Title</source>
|
||||||
|
<translation>제목</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="81"/>
|
||||||
|
<source>Subject</source>
|
||||||
|
<translation>주제</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="83"/>
|
||||||
|
<source>Rating</source>
|
||||||
|
<translation>등급</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="85"/>
|
||||||
|
<source>Tags</source>
|
||||||
|
<translation>태그</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="87"/>
|
||||||
|
<source>Comments</source>
|
||||||
|
<translation>주석</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="90"/>
|
||||||
|
<source>Authors</source>
|
||||||
|
<translation>저자</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="92"/>
|
||||||
|
<source>Date taken</source>
|
||||||
|
<translation>촬영 날짜</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="98"/>
|
||||||
|
<source>Program name</source>
|
||||||
|
<translation>프로그램 이름</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="100"/>
|
||||||
|
<source>Copyright</source>
|
||||||
|
<translation>저작권</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="103"/>
|
||||||
|
<source>Horizontal resolution</source>
|
||||||
|
<translation>수평 해상도</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="105"/>
|
||||||
|
<source>Vertical resolution</source>
|
||||||
|
<translation>수직 해상도</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="107"/>
|
||||||
|
<source>Resolution unit</source>
|
||||||
|
<translation>해상도 단위</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="109"/>
|
||||||
|
<source>Colour representation</source>
|
||||||
|
<translation>색 표현</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="112"/>
|
||||||
|
<source>Camera maker</source>
|
||||||
|
<translation>카메라 제조업체</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="114"/>
|
||||||
|
<source>Camera model</source>
|
||||||
|
<translation>카메라 모델</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="116"/>
|
||||||
|
<source>F-stop</source>
|
||||||
|
<translation>F-스톱</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="118"/>
|
||||||
|
<source>Exposure time</source>
|
||||||
|
<translation>노출 시간</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="120"/>
|
||||||
|
<source>ISO speed</source>
|
||||||
|
<translation>ISO 속도</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="122"/>
|
||||||
|
<source>Exposure bias</source>
|
||||||
|
<translation>노출 편향</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="124"/>
|
||||||
|
<source>Focal length</source>
|
||||||
|
<translation>초점 거리</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="126"/>
|
||||||
|
<source>Max aperture</source>
|
||||||
|
<translation>최대 조리개</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="128"/>
|
||||||
|
<source>Metering mode</source>
|
||||||
|
<translation>미터링 모드</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="130"/>
|
||||||
|
<source>Subject distance</source>
|
||||||
|
<translation>피사체 거리</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="132"/>
|
||||||
|
<source>Flash mode</source>
|
||||||
|
<translation>플래시 모드</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="134"/>
|
||||||
|
<source>35mm focal length</source>
|
||||||
|
<translation>35mm 초점 거리</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="137"/>
|
||||||
|
<source>Lens model</source>
|
||||||
|
<translation>렌즈 모델</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="139"/>
|
||||||
|
<source>Contrast</source>
|
||||||
|
<translation>대비</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="141"/>
|
||||||
|
<source>Brightness</source>
|
||||||
|
<translation>밝기</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="143"/>
|
||||||
|
<source>Exposure program</source>
|
||||||
|
<translation>노출 프로그램</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="145"/>
|
||||||
|
<source>Saturation</source>
|
||||||
|
<translation>채도</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="147"/>
|
||||||
|
<source>Sharpness</source>
|
||||||
|
<translation>선명도</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="149"/>
|
||||||
|
<source>White balance</source>
|
||||||
|
<translation>화이트 밸런스</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="151"/>
|
||||||
|
<source>Digital zoom</source>
|
||||||
|
<translation>디지털 줌</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="153"/>
|
||||||
|
<source>EXIF version</source>
|
||||||
|
<translation>EXIF 버전</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="156"/>
|
||||||
|
<source>Latitude reference</source>
|
||||||
|
<translation>위도 참조</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="158"/>
|
||||||
|
<source>Latitude</source>
|
||||||
|
<translation>위도</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="160"/>
|
||||||
|
<source>Longitude reference</source>
|
||||||
|
<translation>경도 참조</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="162"/>
|
||||||
|
<source>Longitude</source>
|
||||||
|
<translation>경도</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="164"/>
|
||||||
|
<source>Altitude reference</source>
|
||||||
|
<translation>고도 참조</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="166"/>
|
||||||
|
<source>Altitude</source>
|
||||||
|
<translation>고도</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="176"/>
|
||||||
|
<source>%1 x %2</source>
|
||||||
|
<translation>%1 x %2</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="194"/>
|
||||||
|
<source>%1 : %2</source>
|
||||||
|
<translation>%1 : %2</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="319"/>
|
||||||
|
<source>Property</source>
|
||||||
|
<translation>속성</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="319"/>
|
||||||
|
<source>Value</source>
|
||||||
|
<translation>값</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SettingsDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="32"/>
|
||||||
|
<source>Settings</source>
|
||||||
|
<translation>설정</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="40"/>
|
||||||
|
<source>Options</source>
|
||||||
|
<translation>옵션</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="52"/>
|
||||||
|
<source>Shortcuts</source>
|
||||||
|
<translation>단축키</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="62"/>
|
||||||
|
<source>Editing shortcuts for action "%1":</source>
|
||||||
|
<translation>작업 "%1"의 단축키 편집:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="71"/>
|
||||||
|
<source>Failed to set shortcuts</source>
|
||||||
|
<translation>단축키 설정 실패</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="72"/>
|
||||||
|
<source>Please check if shortcuts are duplicated with existing shortcuts.</source>
|
||||||
|
<translation>단축키가 기존 단축키와 중복되는지 확인해 주세요.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="79"/>
|
||||||
|
<source>Do nothing</source>
|
||||||
|
<translation>아무것도 하지 않음</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="80"/>
|
||||||
|
<source>Close the window</source>
|
||||||
|
<translation>창 닫기</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="81"/>
|
||||||
|
<source>Toggle maximize</source>
|
||||||
|
<translation>최대화 전환</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="82"/>
|
||||||
|
<source>Toggle fullscreen</source>
|
||||||
|
<translation>전체 화면 전환</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="86"/>
|
||||||
|
<source>Zoom in and out</source>
|
||||||
|
<translation>확대 및 축소</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="87"/>
|
||||||
|
<source>View next or previous item</source>
|
||||||
|
<translation>다음 또는 이전 항목 보기</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="91"/>
|
||||||
|
<source>Auto size</source>
|
||||||
|
<translation>자동 크기</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="92"/>
|
||||||
|
<source>Maximized</source>
|
||||||
|
<translation>최대화</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="93"/>
|
||||||
|
<source>Windowed</source>
|
||||||
|
<translation>창 모드</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="97"/>
|
||||||
|
<source>Round (Integer scaling)</source>
|
||||||
|
<comment>This option means round up for .5 and above</comment>
|
||||||
|
<translation>라운드 (정수 스케일링)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="98"/>
|
||||||
|
<source>Ceil (Integer scaling)</source>
|
||||||
|
<comment>This option means always round up</comment>
|
||||||
|
<translation>셰일 (정수 스케일링)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="99"/>
|
||||||
|
<source>Floor (Integer scaling)</source>
|
||||||
|
<comment>This option means always round down</comment>
|
||||||
|
<translation>바닥 (정수 스케일링)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="100"/>
|
||||||
|
<source>Follow system (Fractional scaling)</source>
|
||||||
|
<comment>This option means don't round</comment>
|
||||||
|
<translation>팔로우 시스템 (부분 스케일링)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="123"/>
|
||||||
|
<source>Stay on top when start-up</source>
|
||||||
|
<translation>시작 시 맨 위에 유지</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="124"/>
|
||||||
|
<source>Use built-in close window animation</source>
|
||||||
|
<translation>내장된 창 닫기 애니메이션 사용</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="125"/>
|
||||||
|
<source>Use light-color checkerboard</source>
|
||||||
|
<translation>밝은 색상의 바둑판 사용</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="126"/>
|
||||||
|
<source>Loop the loaded gallery</source>
|
||||||
|
<translation>로드된 갤러리 반복</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="127"/>
|
||||||
|
<source>Auto long image mode</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="128"/>
|
||||||
|
<source>Double-click behavior</source>
|
||||||
|
<translation>더블클릭 동작</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="129"/>
|
||||||
|
<source>Mouse wheel behavior</source>
|
||||||
|
<translation>마우스 휠 동작</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="130"/>
|
||||||
|
<source>Default window size</source>
|
||||||
|
<translation>기본 창 크기</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="131"/>
|
||||||
|
<source>HiDPI scale factor rounding policy</source>
|
||||||
|
<translation>HiDPI 배율 반올림 정책</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ShortcutEdit</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../shortcutedit.cpp" line="104"/>
|
||||||
|
<source>No shortcuts</source>
|
||||||
|
<translation>단축키 없음</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ShortcutEditor</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../shortcutedit.cpp" line="70"/>
|
||||||
|
<source>Shortcut #%1</source>
|
||||||
|
<translation>단축키 #%1</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>main</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../main.cpp" line="42"/>
|
||||||
|
<source>Pineapple Pictures</source>
|
||||||
|
<translation>파인애플 픽처스</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main.cpp" line="45"/>
|
||||||
|
<source>List supported image format suffixes, and quit program.</source>
|
||||||
|
<translation>지원되는 이미지 형식 접미사를 나열하고 프로그램을 종료합니다.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main.cpp" line="49"/>
|
||||||
|
<source>File list.</source>
|
||||||
|
<translation>파일 목록.</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
896
app/translations/PineapplePictures_ta.ts
Normal file
896
app/translations/PineapplePictures_ta.ts
Normal file
@ -0,0 +1,896 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="ta">
|
||||||
|
<context>
|
||||||
|
<name>AboutDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="29"/>
|
||||||
|
<source>About</source>
|
||||||
|
<translation>பற்றி</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="32"/>
|
||||||
|
<source>Launch application with image file path as argument to load the file.</source>
|
||||||
|
<translation>கோப்பை ஏற்ற வாதமாக பட கோப்பு பாதையுடன் பயன்பாட்டைத் தொடங்கவும்.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="33"/>
|
||||||
|
<source>Drag and drop image file onto the window is also supported.</source>
|
||||||
|
<translation>படக் கோப்பை சாளரத்தில் இழுத்து விடுங்கள்.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="34"/>
|
||||||
|
<source>None of the operations in this application will alter the pictures on disk.</source>
|
||||||
|
<translation>இந்த பயன்பாட்டில் உள்ள எந்த செயல்பாடுகளும் வட்டில் உள்ள படங்களை மாற்றாது.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="35"/>
|
||||||
|
<source>Context menu option explanation:</source>
|
||||||
|
<translation>சூழல் பட்டியல் விருப்பம் விளக்கம்:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="42"/>
|
||||||
|
<source>Make window stay on top of all other windows.</source>
|
||||||
|
<translation>மற்ற எல்லா சன்னல்களுக்கும் மேலாக சாளரத்தை வைக்கவும்.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="45"/>
|
||||||
|
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
|
||||||
|
<translation>தற்செயலாக நெருக்கமான சாளரத்தைத் தவிர்க்கவும். (எ.கா. சாளரத்தை இருமுறை சொடுக்கு செய்வதன் மூலம்)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="48"/>
|
||||||
|
<source>Avoid resetting the zoom/rotation/flip state that was applied to the image view when switching between images.</source>
|
||||||
|
<translation>படங்களுக்கு இடையில் மாறும்போது படக் காட்சிக்கு பயன்படுத்தப்பட்ட சூம்/சுழற்சி/ஃபிளிப் நிலையை மீட்டமைப்பதைத் தவிர்க்கவும்.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="55"/>
|
||||||
|
<source>Version: %1</source>
|
||||||
|
<translation>பதிப்பு: %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="66"/>
|
||||||
|
<source>Logo designed by %1</source>
|
||||||
|
<translation>லோகோ %1 ஆல் வடிவமைக்கப்பட்டுள்ளது</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="68"/>
|
||||||
|
<source>Built with Qt %1 (%2)</source>
|
||||||
|
<translation>கியுடி %1 ( %2) உடன் கட்டப்பட்டுள்ளது</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="69"/>
|
||||||
|
<source>Source code</source>
|
||||||
|
<translation>மூலக் குறியீடு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="79"/>
|
||||||
|
<source>Contributors</source>
|
||||||
|
<translation>பங்களிப்பாளர்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="81"/>
|
||||||
|
<source>List of contributors on GitHub</source>
|
||||||
|
<translation>கிதுபில் பங்களிப்பாளர்களின் பட்டியல்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="82"/>
|
||||||
|
<source>Thanks to all people who contributed to this project.</source>
|
||||||
|
<translation>இந்த திட்டத்திற்கு பங்களித்த அனைத்து மக்களுக்கும் நன்றி.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="86"/>
|
||||||
|
<source>Translators</source>
|
||||||
|
<translation>மொழிபெயர்ப்பாளர்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="87"/>
|
||||||
|
<source>I would like to thank the following people who volunteered to translate this application.</source>
|
||||||
|
<translation>இந்த விண்ணப்பத்தை மொழிபெயர்க்க முன்வந்த பின்வரும் நபர்களுக்கு நன்றி தெரிவிக்க விரும்புகிறேன்.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="131"/>
|
||||||
|
<source>%1 is built on the following free software libraries:</source>
|
||||||
|
<comment>Free as in freedom</comment>
|
||||||
|
<translation>%1 பின்வரும் இலவச மென்பொருள் நூலகங்களில் கட்டப்பட்டுள்ளது:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="155"/>
|
||||||
|
<source>&Special Thanks</source>
|
||||||
|
<translation>& சிறப்பு நன்றி</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="157"/>
|
||||||
|
<source>&Third-party Libraries</source>
|
||||||
|
<translation>மூன்றாம் தரப்பு நூலகங்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="93"/>
|
||||||
|
<source>Your Rights</source>
|
||||||
|
<translation>உங்கள் உரிமைகள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="63"/>
|
||||||
|
<source>Copyright (c) %1 %2</source>
|
||||||
|
<comment>%1 is year, %2 is the name of copyright holder(s)</comment>
|
||||||
|
<translation>பதிப்புரிமை (சி) %1 %2</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="95"/>
|
||||||
|
<source>%1 is released under the MIT License.</source>
|
||||||
|
<translation>%1 எம்ஐடி உரிமத்தின் கீழ் வெளியிடப்படுகிறது.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="96"/>
|
||||||
|
<source>This license grants people a number of freedoms:</source>
|
||||||
|
<translation>இந்த உரிமம் மக்களுக்கு பல சுதந்திரங்களை வழங்குகிறது:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="97"/>
|
||||||
|
<source>You are free to use %1, for any purpose</source>
|
||||||
|
<translation>எந்தவொரு நோக்கத்திற்காகவும் நீங்கள் %1 ஐப் பயன்படுத்த இலவசம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="98"/>
|
||||||
|
<source>You are free to distribute %1</source>
|
||||||
|
<translation>%1 ஐ விநியோகிக்க நீங்கள் இலவசம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="99"/>
|
||||||
|
<source>You can study how %1 works and change it</source>
|
||||||
|
<translation>%1 எவ்வாறு செயல்படுகிறது என்பதைப் படித்து அதை மாற்றலாம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="100"/>
|
||||||
|
<source>You can distribute changed versions of %1</source>
|
||||||
|
<translation>மாற்றப்பட்ட பதிப்புகளை %1 இன் விநியோகிக்கலாம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="102"/>
|
||||||
|
<source>The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.</source>
|
||||||
|
<translation>எம்ஐடி உரிமம் இந்த சுதந்திரத்தை உங்களுக்கு பொறுப்பு செய்கிறது. அதை எடுத்துச் செல்ல யாரும் அனுமதிக்கப்படுவதில்லை.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="130"/>
|
||||||
|
<source>Third-party Libraries used by %1</source>
|
||||||
|
<translation>%1 ஆல் பயன்படுத்தப்படும் மூன்றாம் தரப்பு நூலகங்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="153"/>
|
||||||
|
<source>&Help</source>
|
||||||
|
<translation>உதவி (&h)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="154"/>
|
||||||
|
<source>&About</source>
|
||||||
|
<translation>&பற்றி</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="156"/>
|
||||||
|
<source>&License</source>
|
||||||
|
<translation>& உரிமம்</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>GraphicsScene</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="292"/>
|
||||||
|
<location filename="../graphicsscene.cpp" line="100"/>
|
||||||
|
<source>Drag image here</source>
|
||||||
|
<translation>படத்தை இங்கே இழுக்கவும்</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>GraphicsView</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphicsview.cpp" line="50"/>
|
||||||
|
<source>File is not a valid image</source>
|
||||||
|
<translation>கோப்பு சரியான படம் அல்ல</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphicsview.cpp" line="54"/>
|
||||||
|
<location filename="../graphicsview.cpp" line="58"/>
|
||||||
|
<source>Image data is invalid or currently unsupported</source>
|
||||||
|
<translation>படத் தரவு தவறானது அல்லது தற்போது ஆதரிக்கப்படாதது</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="190"/>
|
||||||
|
<location filename="../mainwindow.cpp" line="561"/>
|
||||||
|
<source>File url list is empty</source>
|
||||||
|
<translation>கோப்பு முகவரி பட்டியல் காலியாக உள்ளது</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="461"/>
|
||||||
|
<source>&Copy</source>
|
||||||
|
<translation>நகலெடு (&c)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="569"/>
|
||||||
|
<source>Image data is invalid</source>
|
||||||
|
<translation>படத் தரவு தவறானது</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="576"/>
|
||||||
|
<source>Not supported mimedata: %1</source>
|
||||||
|
<translation>மைமெடாட்டாவை ஆதரிக்கவில்லை: %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="783"/>
|
||||||
|
<source>Image From Clipboard</source>
|
||||||
|
<translation>கிளிப்போர்டிலிருந்து படம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="801"/>
|
||||||
|
<source>Are you sure you want to move "%1" to recycle bin?</source>
|
||||||
|
<translation>பின் மறுசுழற்சி செய்ய "%1" ஐ நகர்த்த விரும்புகிறீர்களா?</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="805"/>
|
||||||
|
<source>Failed to move file to trash</source>
|
||||||
|
<translation>கோப்பை குப்பைக்கு நகர்த்துவதில் தோல்வி</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="806"/>
|
||||||
|
<source>Move to trash failed, it might caused by file permission issue, file system limitation, or platform limitation.</source>
|
||||||
|
<translation>குப்பைக்கு நகர்வது தோல்வியுற்றது, இது கோப்பு இசைவு சிக்கல், கோப்பு முறைமை வரம்பு அல்லது இயங்குதள வரம்பு ஆகியவற்றால் ஏற்படலாம்.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="106"/>
|
||||||
|
<source>Copy P&ixmap</source>
|
||||||
|
<translation>பி & ஐஎக்ச்மேப்பை நகலெடுக்கவும்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="107"/>
|
||||||
|
<source>Copy &File Path</source>
|
||||||
|
<translation>கோப்பு பாதையை நகலெடுக்கவும்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="125"/>
|
||||||
|
<source>Properties</source>
|
||||||
|
<translation>பண்புகள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="110"/>
|
||||||
|
<location filename="../aboutdialog.cpp" line="41"/>
|
||||||
|
<source>Stay on top</source>
|
||||||
|
<translation>மேலே இருங்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="111"/>
|
||||||
|
<location filename="../aboutdialog.cpp" line="44"/>
|
||||||
|
<source>Protected mode</source>
|
||||||
|
<translation>பாதுகாக்கப்பட்ட பயன்முறை</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="112"/>
|
||||||
|
<location filename="../aboutdialog.cpp" line="47"/>
|
||||||
|
<source>Keep transformation</source>
|
||||||
|
<comment>The 'transformation' means the flip/rotation status that currently applied to the image view</comment>
|
||||||
|
<translation>மாற்றத்தைத் தொடருங்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="90"/>
|
||||||
|
<source>Zoom in</source>
|
||||||
|
<translation>பெரிதாக்கு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="91"/>
|
||||||
|
<source>Zoom out</source>
|
||||||
|
<translation>சிறிதாக்கு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="99"/>
|
||||||
|
<source>Pause/Resume Animation</source>
|
||||||
|
<translation>இடைநிறுத்தம்/அனிமேசனை மீண்டும் தொடங்குங்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="100"/>
|
||||||
|
<source>Animation Go to Next Frame</source>
|
||||||
|
<translation>அனிமேசன் அடுத்த சட்டகத்திற்குச் செல்லுங்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="102"/>
|
||||||
|
<source>Flip &Horizontally</source>
|
||||||
|
<translation>கிடைமட்டமாக புரட்டவும்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="103"/>
|
||||||
|
<source>Fit to view</source>
|
||||||
|
<translation>பார்க்க பொருத்தமானது</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="104"/>
|
||||||
|
<source>Fit to width</source>
|
||||||
|
<translation>அகலத்திற்கு ஏற்றது</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="105"/>
|
||||||
|
<source>Fit long image</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="108"/>
|
||||||
|
<source>&Paste</source>
|
||||||
|
<translation>ஒட்டு (&p)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="92"/>
|
||||||
|
<source>Toggle Checkerboard</source>
|
||||||
|
<translation>செக்கர்போர்டை மாற்றவும்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="86"/>
|
||||||
|
<source>&Open...</source>
|
||||||
|
<translation>& திறந்த ...</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="88"/>
|
||||||
|
<source>Actual size</source>
|
||||||
|
<translation>உண்மையான அளவு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="89"/>
|
||||||
|
<source>Toggle maximize</source>
|
||||||
|
<translation>அதிகபட்சத்தை மாற்றவும்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="93"/>
|
||||||
|
<source>Rotate right</source>
|
||||||
|
<translation>வலதுபுறம் சுழற்றுங்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="94"/>
|
||||||
|
<source>Rotate left</source>
|
||||||
|
<translation>இடதுபுறம் சுழலும்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="96"/>
|
||||||
|
<source>Previous image</source>
|
||||||
|
<translation>முந்தைய படம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="97"/>
|
||||||
|
<source>Next image</source>
|
||||||
|
<translation>அடுத்த படம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="800"/>
|
||||||
|
<location filename="../actionmanager.cpp" line="109"/>
|
||||||
|
<source>Move to Trash</source>
|
||||||
|
<translation>குப்பைக்கு நகர்த்தவும்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="113"/>
|
||||||
|
<source>Configure...</source>
|
||||||
|
<translation>உள்ளமைக்கவும் ...</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="114"/>
|
||||||
|
<source>Help</source>
|
||||||
|
<translation>உதவி</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="117"/>
|
||||||
|
<source>Show in File Explorer</source>
|
||||||
|
<comment>File Explorer is the name of explorer.exe under Windows</comment>
|
||||||
|
<translation>கோப்பு எக்ச்ப்ளோரரில் காண்பி</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="123"/>
|
||||||
|
<source>Show in directory</source>
|
||||||
|
<translation>கோப்பகத்தில் காட்டு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="126"/>
|
||||||
|
<source>Quit</source>
|
||||||
|
<translation>வெளியேறு</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MetadataDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatadialog.cpp" line="84"/>
|
||||||
|
<source>Image Metadata</source>
|
||||||
|
<translation>பட மேனிலை தரவு</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MetadataModel</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="43"/>
|
||||||
|
<source>Origin</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>தோற்றம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="44"/>
|
||||||
|
<source>Image</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>படம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="48"/>
|
||||||
|
<source>File</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>கோப்பு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="45"/>
|
||||||
|
<source>Camera</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>கேமரா</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="35"/>
|
||||||
|
<source>%1 File</source>
|
||||||
|
<translation>%1 கோப்பு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="42"/>
|
||||||
|
<source>Description</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>விவரம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="46"/>
|
||||||
|
<source>Advanced photo</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>மேம்பட்ட புகைப்படம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="47"/>
|
||||||
|
<source>GPS</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>உலக இடம் காட்டும் அமைப்பு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="52"/>
|
||||||
|
<source>Dimensions</source>
|
||||||
|
<translation>பரிமாணங்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="54"/>
|
||||||
|
<source>Aspect ratio</source>
|
||||||
|
<translation>அம்ச விகிதம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="58"/>
|
||||||
|
<source>Frame count</source>
|
||||||
|
<translation>சட்ட எண்ணிக்கை</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="62"/>
|
||||||
|
<source>Name</source>
|
||||||
|
<translation>பெயர்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="64"/>
|
||||||
|
<source>Item type</source>
|
||||||
|
<translation>உருப்படி வகை</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="66"/>
|
||||||
|
<source>Folder path</source>
|
||||||
|
<translation>கோப்புறை பாதை</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="68"/>
|
||||||
|
<source>Size</source>
|
||||||
|
<translation>அளவு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="70"/>
|
||||||
|
<source>Date created</source>
|
||||||
|
<translation>தேதி உருவாக்கப்பட்டது</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="72"/>
|
||||||
|
<source>Date modified</source>
|
||||||
|
<translation>தேதி மாற்றியமைக்கப்பட்டது</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="79"/>
|
||||||
|
<source>Title</source>
|
||||||
|
<translation>தலைப்பு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="81"/>
|
||||||
|
<source>Subject</source>
|
||||||
|
<translation>பொருள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="83"/>
|
||||||
|
<source>Rating</source>
|
||||||
|
<translation>செயல்வரம்பு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="85"/>
|
||||||
|
<source>Tags</source>
|
||||||
|
<translation>குறிச்சொற்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="87"/>
|
||||||
|
<source>Comments</source>
|
||||||
|
<translation>கருத்துகள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="90"/>
|
||||||
|
<source>Authors</source>
|
||||||
|
<translation>ஆசிரியர்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="92"/>
|
||||||
|
<source>Date taken</source>
|
||||||
|
<translation>எடுக்கப்பட்ட தேதி</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="98"/>
|
||||||
|
<source>Program name</source>
|
||||||
|
<translation>நிரல் பெயர்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="100"/>
|
||||||
|
<source>Copyright</source>
|
||||||
|
<translation>பதிப்புரிமை</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="103"/>
|
||||||
|
<source>Horizontal resolution</source>
|
||||||
|
<translation>கிடைமட்ட தீர்மானம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="105"/>
|
||||||
|
<source>Vertical resolution</source>
|
||||||
|
<translation>செங்குத்து தீர்மானம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="107"/>
|
||||||
|
<source>Resolution unit</source>
|
||||||
|
<translation>தெளிவுத்திறன் அலகு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="109"/>
|
||||||
|
<source>Colour representation</source>
|
||||||
|
<translation>வண்ண பிரதிநிதித்துவம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="112"/>
|
||||||
|
<source>Camera maker</source>
|
||||||
|
<translation>கேமரா தயாரிப்பாளர்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="114"/>
|
||||||
|
<source>Camera model</source>
|
||||||
|
<translation>கேமரா மாதிரி</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="116"/>
|
||||||
|
<source>F-stop</source>
|
||||||
|
<translation>எஃப்-ச்டாப்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="118"/>
|
||||||
|
<source>Exposure time</source>
|
||||||
|
<translation>நேரிடுதல் காலம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="120"/>
|
||||||
|
<source>ISO speed</source>
|
||||||
|
<translation>ஐஎச்ஓ விரைவு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="122"/>
|
||||||
|
<source>Exposure bias</source>
|
||||||
|
<translation>வெளிப்பாடு சார்பு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="124"/>
|
||||||
|
<source>Focal length</source>
|
||||||
|
<translation>குவிநீளம், குவியத் தொலைவு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="126"/>
|
||||||
|
<source>Max aperture</source>
|
||||||
|
<translation>அதிகபட்ச துளை</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="128"/>
|
||||||
|
<source>Metering mode</source>
|
||||||
|
<translation>அளவீட்டு முறை</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="130"/>
|
||||||
|
<source>Subject distance</source>
|
||||||
|
<translation>பொருள் தூரம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="132"/>
|
||||||
|
<source>Flash mode</source>
|
||||||
|
<translation>ஃபிளாச் பயன்முறை</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="134"/>
|
||||||
|
<source>35mm focal length</source>
|
||||||
|
<translation>35 மிமீ குவிய நீளம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="137"/>
|
||||||
|
<source>Lens model</source>
|
||||||
|
<translation>லென்ச் மாதிரி</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="139"/>
|
||||||
|
<source>Contrast</source>
|
||||||
|
<translation>மாறுபாடு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="141"/>
|
||||||
|
<source>Brightness</source>
|
||||||
|
<translation>ஒளி</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="143"/>
|
||||||
|
<source>Exposure program</source>
|
||||||
|
<translation>வெளிப்பாடு திட்டம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="145"/>
|
||||||
|
<source>Saturation</source>
|
||||||
|
<translation>தெவிட்டல்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="147"/>
|
||||||
|
<source>Sharpness</source>
|
||||||
|
<translation>கூர்மையானது</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="149"/>
|
||||||
|
<source>White balance</source>
|
||||||
|
<translation>வெள்ளை இருப்பு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="151"/>
|
||||||
|
<source>Digital zoom</source>
|
||||||
|
<translation>டிசிட்டல் சூம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="153"/>
|
||||||
|
<source>EXIF version</source>
|
||||||
|
<translation>Exif பதிப்பு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="156"/>
|
||||||
|
<source>Latitude reference</source>
|
||||||
|
<translation>அட்சரேகை குறிப்பு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="158"/>
|
||||||
|
<source>Latitude</source>
|
||||||
|
<translation>அகலாங்கு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="160"/>
|
||||||
|
<source>Longitude reference</source>
|
||||||
|
<translation>தீர்க்கரேகை குறிப்பு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="162"/>
|
||||||
|
<source>Longitude</source>
|
||||||
|
<translation>நெட்டாங்கு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="164"/>
|
||||||
|
<source>Altitude reference</source>
|
||||||
|
<translation>உயர குறிப்பு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="166"/>
|
||||||
|
<source>Altitude</source>
|
||||||
|
<translation>குத்துயரம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="176"/>
|
||||||
|
<source>%1 x %2</source>
|
||||||
|
<translation>%1 ஃச் %2</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="194"/>
|
||||||
|
<source>%1 : %2</source>
|
||||||
|
<translation>%1: %2</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="319"/>
|
||||||
|
<source>Property</source>
|
||||||
|
<translation>சொத்து</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="319"/>
|
||||||
|
<source>Value</source>
|
||||||
|
<translation>மதிப்பு</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SettingsDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="32"/>
|
||||||
|
<source>Settings</source>
|
||||||
|
<translation>அமைப்புகள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="40"/>
|
||||||
|
<source>Options</source>
|
||||||
|
<translation>விருப்பங்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="52"/>
|
||||||
|
<source>Shortcuts</source>
|
||||||
|
<translation>குறுக்குவழிகள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="62"/>
|
||||||
|
<source>Editing shortcuts for action "%1":</source>
|
||||||
|
<translation>செயலுக்கான குறுக்குவழிகளைத் திருத்துதல் "%1":</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="71"/>
|
||||||
|
<source>Failed to set shortcuts</source>
|
||||||
|
<translation>குறுக்குவழிகளை அமைப்பதில் தோல்வி</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="72"/>
|
||||||
|
<source>Please check if shortcuts are duplicated with existing shortcuts.</source>
|
||||||
|
<translation>தற்போதுள்ள குறுக்குவழிகளுடன் குறுக்குவழிகள் நகல் செய்யப்பட்டுள்ளதா என்று சரிபார்க்கவும்.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="79"/>
|
||||||
|
<source>Do nothing</source>
|
||||||
|
<translation>எதுவும் செய்ய வேண்டாம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="80"/>
|
||||||
|
<source>Close the window</source>
|
||||||
|
<translation>சாளரத்தை மூடு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="81"/>
|
||||||
|
<source>Toggle maximize</source>
|
||||||
|
<translation>அதிகபட்சத்தை மாற்றவும்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="82"/>
|
||||||
|
<source>Toggle fullscreen</source>
|
||||||
|
<translation>மாற்று முழுத்திரை</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="86"/>
|
||||||
|
<source>Zoom in and out</source>
|
||||||
|
<translation>உள்ளேயும் வெளியேயும் பெரிதாக்கவும்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="87"/>
|
||||||
|
<source>View next or previous item</source>
|
||||||
|
<translation>அடுத்த அல்லது முந்தைய உருப்படியைக் காண்க</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="91"/>
|
||||||
|
<source>Auto size</source>
|
||||||
|
<translation>வாகன அளவு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="92"/>
|
||||||
|
<source>Maximized</source>
|
||||||
|
<translation>அதிகபட்சம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="93"/>
|
||||||
|
<source>Windowed</source>
|
||||||
|
<translation>சாளரம்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="97"/>
|
||||||
|
<source>Round (Integer scaling)</source>
|
||||||
|
<comment>This option means round up for .5 and above</comment>
|
||||||
|
<translation>சுற்று (முழு எண் அளவிடுதல்)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="98"/>
|
||||||
|
<source>Ceil (Integer scaling)</source>
|
||||||
|
<comment>This option means always round up</comment>
|
||||||
|
<translation>சீல் (முழு எண் அளவிடுதல்)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="99"/>
|
||||||
|
<source>Floor (Integer scaling)</source>
|
||||||
|
<comment>This option means always round down</comment>
|
||||||
|
<translation>மாடி (முழு எண் அளவிடுதல்)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="100"/>
|
||||||
|
<source>Follow system (Fractional scaling)</source>
|
||||||
|
<comment>This option means don't round</comment>
|
||||||
|
<translation>கணினியைப் பின்பற்றவும் (பகுதியளவு அளவிடுதல்)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="123"/>
|
||||||
|
<source>Stay on top when start-up</source>
|
||||||
|
<translation>தொடக்கத்தில் இருக்கும்போது மேலே இருங்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="124"/>
|
||||||
|
<source>Use built-in close window animation</source>
|
||||||
|
<translation>உள்ளமைக்கப்பட்ட நெருக்கமான சாளர அனிமேஷனைப் பயன்படுத்தவும்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="125"/>
|
||||||
|
<source>Use light-color checkerboard</source>
|
||||||
|
<translation>ஒளி-வண்ண செக்கர்போர்டைப் பயன்படுத்தவும்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="126"/>
|
||||||
|
<source>Loop the loaded gallery</source>
|
||||||
|
<translation>ஏற்றப்பட்ட கேலரியை சுற்றுங்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="127"/>
|
||||||
|
<source>Auto long image mode</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="128"/>
|
||||||
|
<source>Double-click behavior</source>
|
||||||
|
<translation>நடத்தை இருமுறை சொடுக்கு செய்யவும்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="129"/>
|
||||||
|
<source>Mouse wheel behavior</source>
|
||||||
|
<translation>சுட்டி சக்கர நடத்தை</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="130"/>
|
||||||
|
<source>Default window size</source>
|
||||||
|
<translation>இயல்புநிலை சாளர அளவு</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="131"/>
|
||||||
|
<source>HiDPI scale factor rounding policy</source>
|
||||||
|
<translation>HIDPI அளவிலான காரணி ரவுண்டிங் கொள்கை</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ShortcutEdit</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../shortcutedit.cpp" line="104"/>
|
||||||
|
<source>No shortcuts</source>
|
||||||
|
<translation>குறுக்குவழிகள் இல்லை</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ShortcutEditor</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../shortcutedit.cpp" line="70"/>
|
||||||
|
<source>Shortcut #%1</source>
|
||||||
|
<translation>குறுக்குவழி #%1</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>main</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../main.cpp" line="42"/>
|
||||||
|
<source>Pineapple Pictures</source>
|
||||||
|
<translation>அன்னாசி படங்கள்</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main.cpp" line="45"/>
|
||||||
|
<source>List supported image format suffixes, and quit program.</source>
|
||||||
|
<translation>ஆதரிக்கப்பட்ட பட வடிவமைப்பு பின்னொட்டுகளை பட்டியலிடுங்கள், மற்றும் நிரல் வெளியேறுதல்.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main.cpp" line="49"/>
|
||||||
|
<source>File list.</source>
|
||||||
|
<translation>கோப்பு பட்டியல்.</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
||||||
File diff suppressed because it is too large
Load Diff
908
app/translations/PineapplePictures_uk.ts
Normal file
908
app/translations/PineapplePictures_uk.ts
Normal file
@ -0,0 +1,908 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="uk_UA">
|
||||||
|
<context>
|
||||||
|
<name>AboutDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="29"/>
|
||||||
|
<source>About</source>
|
||||||
|
<translation>Про додаток</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="32"/>
|
||||||
|
<source>Launch application with image file path as argument to load the file.</source>
|
||||||
|
<translation>Запустіть додаток, вказавши шлях до файлу зображення у якості аргументу для завантаження файлу.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="33"/>
|
||||||
|
<source>Drag and drop image file onto the window is also supported.</source>
|
||||||
|
<translation>Також підтримується перетягування файлу зображення у вікно.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="34"/>
|
||||||
|
<source>None of the operations in this application will alter the pictures on disk.</source>
|
||||||
|
<translation>Жодна з операцій у цьому додатку не змінить зображення на диску.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="35"/>
|
||||||
|
<source>Context menu option explanation:</source>
|
||||||
|
<translation>Пояснення пунктів контекстного меню:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="42"/>
|
||||||
|
<source>Make window stay on top of all other windows.</source>
|
||||||
|
<translation>Зробити так, щоб вікно залишалося поверх усіх інших вікон.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="45"/>
|
||||||
|
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
|
||||||
|
<translation>Уникати випадкового закривання вікна. (Наприклад, подвійним клацанням по вікну.)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="48"/>
|
||||||
|
<source>Avoid resetting the zoom/rotation/flip state that was applied to the image view when switching between images.</source>
|
||||||
|
<translation>Уникати скидання стану масштабування/обертання/гортання яке було застосовано до перегляду зображення при перемиканні зображень.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="55"/>
|
||||||
|
<source>Version: %1</source>
|
||||||
|
<translation>Версія: %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="66"/>
|
||||||
|
<source>Logo designed by %1</source>
|
||||||
|
<translation>Логотип розроблено %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="68"/>
|
||||||
|
<source>Built with Qt %1 (%2)</source>
|
||||||
|
<translation>Побудований за допомогою Qt %1 (%2)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="69"/>
|
||||||
|
<source>Source code</source>
|
||||||
|
<translation>Джерельний код</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="79"/>
|
||||||
|
<source>Contributors</source>
|
||||||
|
<translation>Учасники</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="81"/>
|
||||||
|
<source>List of contributors on GitHub</source>
|
||||||
|
<translation>Список учасників на GitHub</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="82"/>
|
||||||
|
<source>Thanks to all people who contributed to this project.</source>
|
||||||
|
<translation>Дякуємо всім, хто долучився до цього проєкту.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="86"/>
|
||||||
|
<source>Translators</source>
|
||||||
|
<translation>Перекладачі</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="87"/>
|
||||||
|
<source>I would like to thank the following people who volunteered to translate this application.</source>
|
||||||
|
<translation>Я хотів би подякувати наступним людям, які прийняли участь у перекладі цього додатку.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="131"/>
|
||||||
|
<source>%1 is built on the following free software libraries:</source>
|
||||||
|
<comment>Free as in freedom</comment>
|
||||||
|
<translation>%1 побудовано на наступних вільних бібліотеках:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="155"/>
|
||||||
|
<source>&Special Thanks</source>
|
||||||
|
<translation>&Особлива подяка</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="157"/>
|
||||||
|
<source>&Third-party Libraries</source>
|
||||||
|
<translation>&Сторонні бібліотеки</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="93"/>
|
||||||
|
<source>Your Rights</source>
|
||||||
|
<translation>Ваші права</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="63"/>
|
||||||
|
<source>Copyright (c) %1 %2</source>
|
||||||
|
<comment>%1 is year, %2 is the name of copyright holder(s)</comment>
|
||||||
|
<translation>Авторське право (c) %1 %2</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="95"/>
|
||||||
|
<source>%1 is released under the MIT License.</source>
|
||||||
|
<translation>%1 випускається за ліцензією MIT.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="96"/>
|
||||||
|
<source>This license grants people a number of freedoms:</source>
|
||||||
|
<translation>Ця ліцензія надає людям низку свобод:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="97"/>
|
||||||
|
<source>You are free to use %1, for any purpose</source>
|
||||||
|
<translation>Ви можете вільно використовувати %1 для будь-яких цілей</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="98"/>
|
||||||
|
<source>You are free to distribute %1</source>
|
||||||
|
<translation>Ви можете вільно розповсюджувати %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="99"/>
|
||||||
|
<source>You can study how %1 works and change it</source>
|
||||||
|
<translation>Ви можете вивчити, як працює %1, і змінити його</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="100"/>
|
||||||
|
<source>You can distribute changed versions of %1</source>
|
||||||
|
<translation>Ви можете розповсюджувати змінені версії %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="102"/>
|
||||||
|
<source>The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.</source>
|
||||||
|
<translation>Ліцензія MIT гарантує вам цю свободу. Ніхто не має права її відбирати.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="130"/>
|
||||||
|
<source>Third-party Libraries used by %1</source>
|
||||||
|
<translation>Сторонні бібліотеки, що використовуються %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="153"/>
|
||||||
|
<source>&Help</source>
|
||||||
|
<translation>&Допомога</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="154"/>
|
||||||
|
<source>&About</source>
|
||||||
|
<translation>&Про додаток</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../aboutdialog.cpp" line="156"/>
|
||||||
|
<source>&License</source>
|
||||||
|
<translation>&Ліцензія</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>GraphicsScene</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="292"/>
|
||||||
|
<location filename="../graphicsscene.cpp" line="100"/>
|
||||||
|
<source>Drag image here</source>
|
||||||
|
<translation>Перетягніть зображення сюди</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>GraphicsView</name>
|
||||||
|
<message>
|
||||||
|
<source>File url list is empty</source>
|
||||||
|
<translation type="vanished">Список URL-адрес файлів порожній</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphicsview.cpp" line="50"/>
|
||||||
|
<source>File is not a valid image</source>
|
||||||
|
<translation>Файл не є дійсним зображенням</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../graphicsview.cpp" line="54"/>
|
||||||
|
<location filename="../graphicsview.cpp" line="58"/>
|
||||||
|
<source>Image data is invalid or currently unsupported</source>
|
||||||
|
<translation>Дані зображення недійсні або наразі не підтримуються</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Image data is invalid</source>
|
||||||
|
<translation type="vanished">Дані зображення недійсні</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Not supported mimedata: %1</source>
|
||||||
|
<translation type="vanished">Не підтримується mimedata: %1</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="190"/>
|
||||||
|
<location filename="../mainwindow.cpp" line="561"/>
|
||||||
|
<source>File url list is empty</source>
|
||||||
|
<translation>Список URL-адрес файлів порожній</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="461"/>
|
||||||
|
<source>&Copy</source>
|
||||||
|
<translation>&Скопіювати</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="569"/>
|
||||||
|
<source>Image data is invalid</source>
|
||||||
|
<translation>Дані зображення недійсні</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="576"/>
|
||||||
|
<source>Not supported mimedata: %1</source>
|
||||||
|
<translation>Не підтримується mimedata: %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="783"/>
|
||||||
|
<source>Image From Clipboard</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="801"/>
|
||||||
|
<source>Are you sure you want to move "%1" to recycle bin?</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="805"/>
|
||||||
|
<source>Failed to move file to trash</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="806"/>
|
||||||
|
<source>Move to trash failed, it might caused by file permission issue, file system limitation, or platform limitation.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="106"/>
|
||||||
|
<source>Copy P&ixmap</source>
|
||||||
|
<translation>Скопіювати P&ixmap</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="107"/>
|
||||||
|
<source>Copy &File Path</source>
|
||||||
|
<translation>Скопіювати &шлях до файлу</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="125"/>
|
||||||
|
<source>Properties</source>
|
||||||
|
<translation>Властивості</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="110"/>
|
||||||
|
<location filename="../aboutdialog.cpp" line="41"/>
|
||||||
|
<source>Stay on top</source>
|
||||||
|
<translation>Поверх всіх вікон</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="111"/>
|
||||||
|
<location filename="../aboutdialog.cpp" line="44"/>
|
||||||
|
<source>Protected mode</source>
|
||||||
|
<translation>Захищений режим</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="112"/>
|
||||||
|
<location filename="../aboutdialog.cpp" line="47"/>
|
||||||
|
<source>Keep transformation</source>
|
||||||
|
<comment>The 'transformation' means the flip/rotation status that currently applied to the image view</comment>
|
||||||
|
<translation>Зберігати трансформацію</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="90"/>
|
||||||
|
<source>Zoom in</source>
|
||||||
|
<translation>Збільшити</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="91"/>
|
||||||
|
<source>Zoom out</source>
|
||||||
|
<translation>Зменшити</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="99"/>
|
||||||
|
<source>Pause/Resume Animation</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="100"/>
|
||||||
|
<source>Animation Go to Next Frame</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="102"/>
|
||||||
|
<source>Flip &Horizontally</source>
|
||||||
|
<translation>Перевернути по &горизонталі</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="103"/>
|
||||||
|
<source>Fit to view</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="104"/>
|
||||||
|
<source>Fit to width</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="105"/>
|
||||||
|
<source>Fit long image</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="108"/>
|
||||||
|
<source>&Paste</source>
|
||||||
|
<translation>&Вставити</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="92"/>
|
||||||
|
<source>Toggle Checkerboard</source>
|
||||||
|
<translation>Перемкнути шахову дошку</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="86"/>
|
||||||
|
<source>&Open...</source>
|
||||||
|
<translation>&Відкрити...</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="88"/>
|
||||||
|
<source>Actual size</source>
|
||||||
|
<translation>Фактичний розмір</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="89"/>
|
||||||
|
<source>Toggle maximize</source>
|
||||||
|
<translation>Перемкнути на максимум</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="93"/>
|
||||||
|
<source>Rotate right</source>
|
||||||
|
<translation>Перегорнути праворуч</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="94"/>
|
||||||
|
<source>Rotate left</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="96"/>
|
||||||
|
<source>Previous image</source>
|
||||||
|
<translation>Попереднє зображення</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="97"/>
|
||||||
|
<source>Next image</source>
|
||||||
|
<translation>Наступне зображення</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="800"/>
|
||||||
|
<location filename="../actionmanager.cpp" line="109"/>
|
||||||
|
<source>Move to Trash</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="113"/>
|
||||||
|
<source>Configure...</source>
|
||||||
|
<translation>Налаштувати...</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="114"/>
|
||||||
|
<source>Help</source>
|
||||||
|
<translation>Допомога</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="117"/>
|
||||||
|
<source>Show in File Explorer</source>
|
||||||
|
<comment>File Explorer is the name of explorer.exe under Windows</comment>
|
||||||
|
<translation>Показати у файловому провіднику</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="123"/>
|
||||||
|
<source>Show in directory</source>
|
||||||
|
<translation>Показати у теці</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../actionmanager.cpp" line="126"/>
|
||||||
|
<source>Quit</source>
|
||||||
|
<translation>Вийти</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MetadataDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatadialog.cpp" line="84"/>
|
||||||
|
<source>Image Metadata</source>
|
||||||
|
<translation>Метадані зображення</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MetadataModel</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="43"/>
|
||||||
|
<source>Origin</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>Походження</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="44"/>
|
||||||
|
<source>Image</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>Зображення</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="48"/>
|
||||||
|
<source>File</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>Файл</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="45"/>
|
||||||
|
<source>Camera</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>Камера</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="35"/>
|
||||||
|
<source>%1 File</source>
|
||||||
|
<translation>%1 файл</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="42"/>
|
||||||
|
<source>Description</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>Опис</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="46"/>
|
||||||
|
<source>Advanced photo</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>Розширене фото</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="47"/>
|
||||||
|
<source>GPS</source>
|
||||||
|
<comment>Section name.</comment>
|
||||||
|
<translation>GPS</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="52"/>
|
||||||
|
<source>Dimensions</source>
|
||||||
|
<translation>Розміри</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="54"/>
|
||||||
|
<source>Aspect ratio</source>
|
||||||
|
<translation>Співвідношення сторін</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="58"/>
|
||||||
|
<source>Frame count</source>
|
||||||
|
<translation>Кількість кадрів</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="62"/>
|
||||||
|
<source>Name</source>
|
||||||
|
<translation>Ім’я</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="64"/>
|
||||||
|
<source>Item type</source>
|
||||||
|
<translation>Тип елемента</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="66"/>
|
||||||
|
<source>Folder path</source>
|
||||||
|
<translation>Шлях до теки</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="68"/>
|
||||||
|
<source>Size</source>
|
||||||
|
<translation>Розмір</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="70"/>
|
||||||
|
<source>Date created</source>
|
||||||
|
<translation>Дата створення</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="72"/>
|
||||||
|
<source>Date modified</source>
|
||||||
|
<translation>Дата зміни</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="79"/>
|
||||||
|
<source>Title</source>
|
||||||
|
<translation>Назва</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="81"/>
|
||||||
|
<source>Subject</source>
|
||||||
|
<translation>Тема</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="83"/>
|
||||||
|
<source>Rating</source>
|
||||||
|
<translation>Рейтинг</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="85"/>
|
||||||
|
<source>Tags</source>
|
||||||
|
<translation>Мітки</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="87"/>
|
||||||
|
<source>Comments</source>
|
||||||
|
<translation>Коментарі</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="90"/>
|
||||||
|
<source>Authors</source>
|
||||||
|
<translation>Автори</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="92"/>
|
||||||
|
<source>Date taken</source>
|
||||||
|
<translation>Дата зйомки</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="98"/>
|
||||||
|
<source>Program name</source>
|
||||||
|
<translation>Назва програми</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="100"/>
|
||||||
|
<source>Copyright</source>
|
||||||
|
<translation>Авторське право</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="103"/>
|
||||||
|
<source>Horizontal resolution</source>
|
||||||
|
<translation>Роздільна здатність по горизонталі</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="105"/>
|
||||||
|
<source>Vertical resolution</source>
|
||||||
|
<translation>Роздільна здатність по вертикалі</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="107"/>
|
||||||
|
<source>Resolution unit</source>
|
||||||
|
<translation>Одиниця роздільної здатності</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="109"/>
|
||||||
|
<source>Colour representation</source>
|
||||||
|
<translation>Представлення кольору</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="112"/>
|
||||||
|
<source>Camera maker</source>
|
||||||
|
<translation>Виробник камери</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="114"/>
|
||||||
|
<source>Camera model</source>
|
||||||
|
<translation>Модель камери</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="116"/>
|
||||||
|
<source>F-stop</source>
|
||||||
|
<translation>Діафрагма (F)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="118"/>
|
||||||
|
<source>Exposure time</source>
|
||||||
|
<translation>Час експозиції</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="120"/>
|
||||||
|
<source>ISO speed</source>
|
||||||
|
<translation>Чутливість ISO</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="122"/>
|
||||||
|
<source>Exposure bias</source>
|
||||||
|
<translation>Зсув експозиції</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="124"/>
|
||||||
|
<source>Focal length</source>
|
||||||
|
<translation>Фокусна відстань</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="126"/>
|
||||||
|
<source>Max aperture</source>
|
||||||
|
<translation>Максимальна апертура</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="128"/>
|
||||||
|
<source>Metering mode</source>
|
||||||
|
<translation>Режим вимірювання</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="130"/>
|
||||||
|
<source>Subject distance</source>
|
||||||
|
<translation>Відстань до об'єкта зйомки</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="132"/>
|
||||||
|
<source>Flash mode</source>
|
||||||
|
<translation>Режим спалаху</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="134"/>
|
||||||
|
<source>35mm focal length</source>
|
||||||
|
<translation>Фокусна відстань 35 мм</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="137"/>
|
||||||
|
<source>Lens model</source>
|
||||||
|
<translation>Модель об'єктива</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="139"/>
|
||||||
|
<source>Contrast</source>
|
||||||
|
<translation>Контраст</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="141"/>
|
||||||
|
<source>Brightness</source>
|
||||||
|
<translation>Яскравість</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="143"/>
|
||||||
|
<source>Exposure program</source>
|
||||||
|
<translation>Програма експозиції</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="145"/>
|
||||||
|
<source>Saturation</source>
|
||||||
|
<translation>Насиченість</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="147"/>
|
||||||
|
<source>Sharpness</source>
|
||||||
|
<translation>Різкість</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="149"/>
|
||||||
|
<source>White balance</source>
|
||||||
|
<translation>Баланс білого</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="151"/>
|
||||||
|
<source>Digital zoom</source>
|
||||||
|
<translation>Цифровий зум</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="153"/>
|
||||||
|
<source>EXIF version</source>
|
||||||
|
<translation>Версія EXIF</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="156"/>
|
||||||
|
<source>Latitude reference</source>
|
||||||
|
<translation>Посилання на широту</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="158"/>
|
||||||
|
<source>Latitude</source>
|
||||||
|
<translation>Широта</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="160"/>
|
||||||
|
<source>Longitude reference</source>
|
||||||
|
<translation>Посилання на довготу</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="162"/>
|
||||||
|
<source>Longitude</source>
|
||||||
|
<translation>Довгота</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="164"/>
|
||||||
|
<source>Altitude reference</source>
|
||||||
|
<translation>Посилання на висоту над рівнем моря</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="166"/>
|
||||||
|
<source>Altitude</source>
|
||||||
|
<translation>Висота над рівнем моря</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="176"/>
|
||||||
|
<source>%1 x %2</source>
|
||||||
|
<translation>%1 x %2</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="194"/>
|
||||||
|
<source>%1 : %2</source>
|
||||||
|
<translation>%1 : %2</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="319"/>
|
||||||
|
<source>Property</source>
|
||||||
|
<translation>Власність</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../metadatamodel.cpp" line="319"/>
|
||||||
|
<source>Value</source>
|
||||||
|
<translation>Значення</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SettingsDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="32"/>
|
||||||
|
<source>Settings</source>
|
||||||
|
<translation>Налаштування</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="40"/>
|
||||||
|
<source>Options</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="52"/>
|
||||||
|
<source>Shortcuts</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="62"/>
|
||||||
|
<source>Editing shortcuts for action "%1":</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="71"/>
|
||||||
|
<source>Failed to set shortcuts</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="72"/>
|
||||||
|
<source>Please check if shortcuts are duplicated with existing shortcuts.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="79"/>
|
||||||
|
<source>Do nothing</source>
|
||||||
|
<translation>Нічого не робити</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="80"/>
|
||||||
|
<source>Close the window</source>
|
||||||
|
<translation>Закрити вікно</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="81"/>
|
||||||
|
<source>Toggle maximize</source>
|
||||||
|
<translation>Перемкнути на максимум</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="82"/>
|
||||||
|
<source>Toggle fullscreen</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="86"/>
|
||||||
|
<source>Zoom in and out</source>
|
||||||
|
<translation>Збільшення та зменшення</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="87"/>
|
||||||
|
<source>View next or previous item</source>
|
||||||
|
<translation>Переглянути наступний або попередній елемент</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="91"/>
|
||||||
|
<source>Auto size</source>
|
||||||
|
<translation>Автоматичний розмір</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="92"/>
|
||||||
|
<source>Maximized</source>
|
||||||
|
<translation>Максимізувати</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="93"/>
|
||||||
|
<source>Windowed</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="97"/>
|
||||||
|
<source>Round (Integer scaling)</source>
|
||||||
|
<comment>This option means round up for .5 and above</comment>
|
||||||
|
<translation>Round (цілочисельне масштабування)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="98"/>
|
||||||
|
<source>Ceil (Integer scaling)</source>
|
||||||
|
<comment>This option means always round up</comment>
|
||||||
|
<translation>Ceil (цілочисельне масштабування)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="99"/>
|
||||||
|
<source>Floor (Integer scaling)</source>
|
||||||
|
<comment>This option means always round down</comment>
|
||||||
|
<translation>Floor (цілочисельне масштабування)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="100"/>
|
||||||
|
<source>Follow system (Fractional scaling)</source>
|
||||||
|
<comment>This option means don't round</comment>
|
||||||
|
<translation>Стежити за системою (дробове масштабування)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="123"/>
|
||||||
|
<source>Stay on top when start-up</source>
|
||||||
|
<translation>Поверх всіх вікон під час запуску</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="124"/>
|
||||||
|
<source>Use built-in close window animation</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="125"/>
|
||||||
|
<source>Use light-color checkerboard</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="126"/>
|
||||||
|
<source>Loop the loaded gallery</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="127"/>
|
||||||
|
<source>Auto long image mode</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="128"/>
|
||||||
|
<source>Double-click behavior</source>
|
||||||
|
<translation>Поведінка при подвійному кліку</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="129"/>
|
||||||
|
<source>Mouse wheel behavior</source>
|
||||||
|
<translation>Поведінка колеса миші</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="130"/>
|
||||||
|
<source>Default window size</source>
|
||||||
|
<translation>Розмір вікна за замовчуванням</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../settingsdialog.cpp" line="131"/>
|
||||||
|
<source>HiDPI scale factor rounding policy</source>
|
||||||
|
<translation>Політика округлення коефіцієнта HiDPI</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ShortcutEdit</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../shortcutedit.cpp" line="104"/>
|
||||||
|
<source>No shortcuts</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ShortcutEditor</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../shortcutedit.cpp" line="70"/>
|
||||||
|
<source>Shortcut #%1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>main</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../main.cpp" line="42"/>
|
||||||
|
<source>Pineapple Pictures</source>
|
||||||
|
<translation>Pineapple Pictures</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main.cpp" line="45"/>
|
||||||
|
<source>List supported image format suffixes, and quit program.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main.cpp" line="49"/>
|
||||||
|
<source>File list.</source>
|
||||||
|
<translation>Список файлів.</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
||||||
File diff suppressed because it is too large
Load Diff
80
appveyor.yml
80
appveyor.yml
@ -1,5 +1,5 @@
|
|||||||
image:
|
image:
|
||||||
- Visual Studio 2019
|
- Visual Studio 2022
|
||||||
environment:
|
environment:
|
||||||
CMAKE_INSTALL_PREFIX: C:\projects\cmake
|
CMAKE_INSTALL_PREFIX: C:\projects\cmake
|
||||||
LIBZ: C:\projects\zlib
|
LIBZ: C:\projects\zlib
|
||||||
@ -8,9 +8,14 @@ environment:
|
|||||||
LIBEXIV2: C:\projects\exiv2
|
LIBEXIV2: C:\projects\exiv2
|
||||||
PPKG: C:\projects\ppkg
|
PPKG: C:\projects\ppkg
|
||||||
matrix:
|
matrix:
|
||||||
- build_name: mingw81_64_qt5_15_2
|
- job_name: mingw_64_qt6_8
|
||||||
QTDIR: C:\Qt\5.15.2\mingw81_64
|
QTDIR: C:\Qt\6.8\mingw_64
|
||||||
MINGW64: C:\Qt\Tools\mingw810_64
|
MINGW64: C:\Qt\Tools\mingw1310_64
|
||||||
|
KF_BRANCH: master
|
||||||
|
EXIV2_VERSION: "0.28.5"
|
||||||
|
EXIV2_CMAKE_OPTIONS: "-DEXIV2_ENABLE_BROTLI=OFF -DEXIV2_ENABLE_INIH=OFF -DEXIV2_BUILD_EXIV2_COMMAND=OFF"
|
||||||
|
PPIC_CMAKE_OPTIONS: "-DPREFER_QT_5=OFF"
|
||||||
|
WINDEPLOYQT_ARGS: "--verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-system-d3d-compiler --skip-plugin-types tls,networkinformation"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- mkdir %CMAKE_INSTALL_PREFIX%
|
- mkdir %CMAKE_INSTALL_PREFIX%
|
||||||
@ -28,15 +33,15 @@ install:
|
|||||||
build_script:
|
build_script:
|
||||||
# prepare
|
# prepare
|
||||||
- mkdir 3rdparty
|
- mkdir 3rdparty
|
||||||
- cinst ninja
|
- choco install ninja
|
||||||
- cd %PPKG%
|
- cd %PPKG%
|
||||||
- curl -fsSL -o ppkg.exe https://github.com/BLumia/pineapple-package-manager/releases/latest/download/ppkg.exe
|
- curl -fsSL -o ppkg.exe https://github.com/BLumia/pineapple-package-manager/releases/latest/download/ppkg.exe
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
# download and install zlib for KArchive
|
# download and install zlib for KArchive
|
||||||
- cd %LIBZ%
|
- cd %LIBZ%
|
||||||
- curl -fsSL -o zlib1213.zip https://zlib.net/zlib1213.zip
|
- curl -fsSL -o zlib131.zip https://zlib.net/zlib131.zip
|
||||||
- 7z x zlib1213.zip -y
|
- 7z x zlib131.zip -y
|
||||||
- cd zlib-1.2.13
|
- cd zlib-1.3.1
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX%
|
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX%
|
||||||
@ -45,7 +50,7 @@ build_script:
|
|||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
# install ECM so we can build KImageFormats
|
# install ECM so we can build KImageFormats
|
||||||
- cd 3rdparty
|
- cd 3rdparty
|
||||||
- git clone -q https://invent.kde.org/frameworks/extra-cmake-modules.git
|
- git clone -b %KF_BRANCH% -q https://invent.kde.org/frameworks/extra-cmake-modules.git
|
||||||
- git rev-parse HEAD
|
- git rev-parse HEAD
|
||||||
- cd extra-cmake-modules
|
- cd extra-cmake-modules
|
||||||
- cmake -G "Ninja" . -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DBUILD_TESTING=OFF
|
- cmake -G "Ninja" . -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DBUILD_TESTING=OFF
|
||||||
@ -54,97 +59,100 @@ build_script:
|
|||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
# install AOM for libavif AV1 decoding support...
|
# install AOM for libavif AV1 decoding support...
|
||||||
- cd 3rdparty
|
- cd 3rdparty
|
||||||
#- git clone -b v3.2.0 --depth 1 https://aomedia.googlesource.com/aom
|
#- git clone -b v3.9.1 --depth 1 https://aomedia.googlesource.com/aom
|
||||||
#- cd aom
|
#- cd aom
|
||||||
#- mkdir build.libavif
|
#- mkdir build.aom
|
||||||
#- cd build.libavif
|
#- cd build.aom
|
||||||
#- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DENABLE_DOCS=OFF -DBUILD_SHARED_LIBS=ON -DAOM_TARGET_CPU=generic -DENABLE_TESTS=OFF -DENABLE_TESTDATA=OFF -DENABLE_TOOLS=OFF -DENABLE_EXAMPLES=0
|
#- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DENABLE_DOCS=OFF -DBUILD_SHARED_LIBS=ON -DAOM_TARGET_CPU=generic -DENABLE_TESTS=OFF -DENABLE_TESTDATA=OFF -DENABLE_TOOLS=OFF -DENABLE_EXAMPLES=0
|
||||||
#- cmake --build . --config Release
|
#- cmake --build . --config Release
|
||||||
#- cmake --build . --config Release --target install/strip
|
#- cmake --build . --config Release --target install/strip
|
||||||
- mkdir aom
|
- mkdir aom
|
||||||
- cd aom
|
- cd aom
|
||||||
- curl -fsSL -o ppkg-aom.zip https://sourceforge.net/projects/pineapple-package-manager/files/packages/mingw-w64-x86_64-windows/aom-3.2.0-2.zip
|
- curl -fsSL -o ppkg-aom.zip https://sourceforge.net/projects/pineapple-package-manager/files/packages/mingw-w64-x86_64-windows/aom-3.9.1-2.zip
|
||||||
- ppkg ppkg-aom.zip
|
- ppkg ppkg-aom.zip
|
||||||
- 7z x ppkg-aom.zip LICENSE -y
|
- 7z x ppkg-aom.zip LICENSE -y
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
# install libavif for avif format support of KImageFormats
|
# install libavif for avif format support of KImageFormats
|
||||||
- cd %LIBAVIF%
|
- cd %LIBAVIF%
|
||||||
- curl -fsSL -o libavif-v0_10_1.zip https://github.com/AOMediaCodec/libavif/archive/v0.10.1.zip
|
- curl -fsSL -o libavif-v1_1_1.zip https://github.com/AOMediaCodec/libavif/archive/v1.1.1.zip
|
||||||
- 7z x libavif-v0_10_1.zip -y
|
- 7z x libavif-v1_1_1.zip -y
|
||||||
- cd libavif-0.10.1
|
- cd libavif-1.1.1
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DAVIF_CODEC_AOM=ON
|
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DAVIF_CODEC_AOM=ON -DAVIF_LOCAL_LIBYUV=ON
|
||||||
- cmake --build . --config Release
|
- cmake --build . --config Release
|
||||||
- cmake --build . --config Release --target install/strip
|
- cmake --build . --config Release --target install/strip
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
# install KArchive for kra format support of KImageFormats
|
# install KArchive for kra format support of KImageFormats
|
||||||
- cd 3rdparty
|
- cd 3rdparty
|
||||||
- git clone -q https://invent.kde.org/frameworks/karchive.git
|
- git clone -b %KF_BRANCH% -q https://invent.kde.org/frameworks/karchive.git
|
||||||
- git rev-parse HEAD
|
- git rev-parse HEAD
|
||||||
- cd karchive
|
- cd karchive
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX%
|
- cmake .. -G "Ninja" -DBUILD_TESTING=OFF -DWITH_LIBZSTD=OFF -DWITH_BZIP2=OFF -DWITH_LIBLZMA=OFF -DWITH_OPENSSL=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX%
|
||||||
- cmake --build . --config Release
|
- cmake --build . --config Release
|
||||||
- cmake --build . --config Release --target install/strip
|
- cmake --build . --config Release --target install/strip
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
# build libexpat for libexiv2
|
# build libexpat for libexiv2
|
||||||
- cd %LIBEXPAT%
|
- cd %LIBEXPAT%
|
||||||
- curl -fsSL -o R_2_4_8.zip https://github.com/libexpat/libexpat/archive/R_2_4_8.zip
|
- curl -fsSL -o R_2_6_2.zip https://github.com/libexpat/libexpat/archive/R_2_6_2.zip
|
||||||
- 7z x R_2_4_8.zip -y
|
- 7z x R_2_6_2.zip -y
|
||||||
- cd libexpat-R_2_4_8/expat/
|
- cd libexpat-R_2_6_2/expat/
|
||||||
- cmake -G "Ninja" . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF
|
- cmake -G "Ninja" . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF
|
||||||
- cmake --build . --target install/strip
|
- cmake --build . --target install/strip
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
# build libexiv2
|
# build libexiv2
|
||||||
- cd %LIBEXIV2%
|
- cd %LIBEXIV2%
|
||||||
- curl -fsSL -o v0.27.5.zip https://github.com/Exiv2/exiv2/archive/v0.27.5.zip
|
- curl -fsSL -o v%EXIV2_VERSION%.zip https://github.com/Exiv2/exiv2/archive/v%EXIV2_VERSION%.zip
|
||||||
- 7z x v0.27.5.zip -y
|
- 7z x v%EXIV2_VERSION%.zip -y
|
||||||
- cd exiv2-0.27.5
|
- cd exiv2-%EXIV2_VERSION%
|
||||||
- cmake -G "Ninja" . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DEXIV2_BUILD_SAMPLES=OFF -DEXIV2_ENABLE_WIN_UNICODE=ON
|
- cmake -G "Ninja" . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% %EXIV2_CMAKE_OPTIONS%
|
||||||
- cmake --build . --target install/strip
|
- cmake --build . --target install/strip
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
# install KImageFormats
|
# install KImageFormats
|
||||||
- cd 3rdparty
|
- cd 3rdparty
|
||||||
- git clone -q https://invent.kde.org/frameworks/kimageformats.git
|
- git clone -b %KF_BRANCH% -q https://invent.kde.org/frameworks/kimageformats.git
|
||||||
- git rev-parse HEAD
|
- git rev-parse HEAD
|
||||||
- cd kimageformats
|
- cd kimageformats
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_QTPLUGINDIR=%QTDIR%\plugins
|
- cmake .. -G "Ninja" -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_QTPLUGINDIR=%QTDIR%\plugins
|
||||||
- cmake --build . --config Release
|
- cmake --build . --config Release
|
||||||
- cmake --build . --config Release --target install/strip
|
- cmake --build . --config Release --target install/strip
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
# finally...
|
# finally...
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=mingw32-make -DCMAKE_INSTALL_PREFIX='%cd%'
|
- cmake .. -G "Ninja" %PPIC_CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=%CMAKE_INSTALL_PREFIX% -DCMAKE_INSTALL_PREFIX='%cd%'
|
||||||
- cmake --build . --config Release
|
- cmake --build . --config Release
|
||||||
- cmake --build . --config Release --target install/strip
|
- cmake --build . --config Release --target install/strip
|
||||||
# fixme: I don't know how to NOT make the binary installed to the ./bin/ folder...
|
# fixme: I don't know how to NOT make the binary installed to the ./bin/ folder...
|
||||||
- cd bin
|
- cd bin
|
||||||
- copy %APPVEYOR_BUILD_FOLDER%\LICENSE .
|
- copy %APPVEYOR_BUILD_FOLDER%\LICENSE
|
||||||
- copy %CMAKE_INSTALL_PREFIX%\bin\libaom.dll
|
- copy %CMAKE_INSTALL_PREFIX%\bin\libaom.dll
|
||||||
- copy %CMAKE_INSTALL_PREFIX%\bin\libexpat.dll
|
- copy %CMAKE_INSTALL_PREFIX%\bin\libexpat-1.dll
|
||||||
- copy %CMAKE_INSTALL_PREFIX%\bin\libexiv2.dll
|
- copy %CMAKE_INSTALL_PREFIX%\bin\libexiv2.dll
|
||||||
- copy %CMAKE_INSTALL_PREFIX%\bin\libavif.dll
|
- copy %CMAKE_INSTALL_PREFIX%\bin\libavif.dll
|
||||||
- copy %CMAKE_INSTALL_PREFIX%\bin\libzlib.dll
|
- copy %CMAKE_INSTALL_PREFIX%\bin\libzlib.dll
|
||||||
- copy C:\projects\cmake\bin\libKF5Archive.dll .
|
- copy %CMAKE_INSTALL_PREFIX%\bin\libKF?Archive.dll
|
||||||
- windeployqt --verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-angle --no-system-d3d-compiler .\ppic.exe
|
- windeployqt %WINDEPLOYQT_ARGS% .\ppic.exe
|
||||||
# copy 3rdparty licenses for the libs we vendored for windows...
|
# copy 3rdparty licenses for the libs we vendored for windows...
|
||||||
- mkdir licenses
|
- mkdir licenses
|
||||||
- cd licenses
|
- cd licenses
|
||||||
- copy %APPVEYOR_BUILD_FOLDER%\3rdparty\aom\LICENSE License.aom.txt
|
- copy %APPVEYOR_BUILD_FOLDER%\3rdparty\aom\LICENSE License.aom.txt
|
||||||
- copy %APPVEYOR_BUILD_FOLDER%\3rdparty\karchive\LICENSES\LGPL-2.0-or-later.txt License.KArchive.txt
|
- copy %APPVEYOR_BUILD_FOLDER%\3rdparty\karchive\LICENSES\LGPL-2.0-or-later.txt License.KArchive.txt
|
||||||
- copy %APPVEYOR_BUILD_FOLDER%\3rdparty\kimageformats\LICENSES\LGPL-2.1-or-later.txt License.kimageformats.txt
|
- copy %APPVEYOR_BUILD_FOLDER%\3rdparty\kimageformats\LICENSES\LGPL-2.1-or-later.txt License.kimageformats.txt
|
||||||
- copy %LIBEXPAT%\libexpat-R_2_4_8\expat\COPYING License.expat.txt
|
- copy %LIBEXPAT%\libexpat-R_2_6_2\expat\COPYING License.expat.txt
|
||||||
- copy %LIBAVIF%\libavif-0.10.1\LICENSE License.libavif.txt
|
- copy %LIBAVIF%\libavif-1.1.1\LICENSE License.libavif.txt
|
||||||
- copy %LIBEXIV2%\exiv2-0.27.5\COPYING License.exiv2.txt
|
- copy %LIBEXIV2%\exiv2-%EXIV2_VERSION%\COPYING License.exiv2.txt
|
||||||
# TODO: Qt, zlib
|
# TODO: Qt, zlib
|
||||||
- cd ..
|
- cd ..
|
||||||
# for debug..
|
# for debug..
|
||||||
- tree /f
|
- tree /f
|
||||||
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
|
- xcopy %CMAKE_INSTALL_PREFIX% .\cmake-prefix-copy /E /H /C /I
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: build\bin
|
- path: build\bin
|
||||||
|
- path: cmake-prefix-copy
|
||||||
|
|||||||
BIN
assets/icons/app-icon.icns
Normal file
BIN
assets/icons/app-icon.icns
Normal file
Binary file not shown.
@ -1,17 +1,18 @@
|
|||||||
IDI_ICON1 ICON DISCARDABLE "icons/app-icon.ico"
|
IDI_ICON1 ICON DISCARDABLE "@CMAKE_CURRENT_SOURCE_DIR@/assets/icons/app-icon.ico"
|
||||||
1 VERSIONINFO
|
1 VERSIONINFO
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "StringFileInfo"
|
BLOCK "StringFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040904E4"
|
BLOCK "040904E4"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileDescription", "Pineapple Pictures - Image Viewer"
|
VALUE "FileDescription", "Pineapple Pictures - Image Viewer"
|
||||||
VALUE "LegalCopyright", "MIT/Expat License - Copyright (C) 2020 Gary Wang"
|
VALUE "LegalCopyright", "MIT/Expat License - Copyright (C) 2024 Gary Wang"
|
||||||
VALUE "ProductName", "Pineapple Pictures"
|
VALUE "ProductName", "Pineapple Pictures"
|
||||||
END
|
VALUE "ProductVersion", "@PROJECT_VERSION@"
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
END
|
||||||
BEGIN
|
BLOCK "VarFileInfo"
|
||||||
VALUE "Translation", 0x409, 1200
|
BEGIN
|
||||||
END
|
VALUE "Translation", 0x409, 1200
|
||||||
END
|
END
|
||||||
|
END
|
||||||
@ -4,11 +4,16 @@
|
|||||||
<li><u>Dutch</u>: Heimen Stoffels</li>
|
<li><u>Dutch</u>: Heimen Stoffels</li>
|
||||||
<li><u>French</u>: J. Lavoie, K. Herbert, Maxime Leroy</li>
|
<li><u>French</u>: J. Lavoie, K. Herbert, Maxime Leroy</li>
|
||||||
<li><u>German</u>: K. Herbert, J. Lavoie, sal0max</li>
|
<li><u>German</u>: K. Herbert, J. Lavoie, sal0max</li>
|
||||||
<li><u>Indonesian</u>: liimee</li>
|
<li><u>Indonesian</u>: liimee, Reza Almanda</li>
|
||||||
<li><u>Norwegian Bokmål</u>: Allan Nordhøy</li>
|
<li><u>Italian</u>: albanobattistella</li>
|
||||||
|
<li><u>Japanese</u>: Black Cat, mmahhi, Percy Hong</li>
|
||||||
|
<li><u>Korean</u>: VenusGirl</li>
|
||||||
|
<li><u>Norwegian Bokmål</u>: Allan Nordhøy, ovl-1</li>
|
||||||
<li><u>Punjabi (Pakistan)</u>: bgo-eiu</li>
|
<li><u>Punjabi (Pakistan)</u>: bgo-eiu</li>
|
||||||
<li><u>Russian</u>: Sergey Shornikov, Artem, Andrey</li>
|
<li><u>Russian</u>: Sergey Shornikov, Artem, Andrey</li>
|
||||||
<li><u>Sinhala</u>: HelaBasa</li>
|
<li><u>Sinhala</u>: HelaBasa</li>
|
||||||
<li><u>Spanish</u>: Toni Estévez, Génesis Toxical, William(ѕ)ⁿ</li>
|
<li><u>Spanish</u>: Toni Estévez, Génesis Toxical, William(ѕ)ⁿ, gallegonovato</li>
|
||||||
<li><u>Turkish</u>: E-Akcaer, Oğuz Ersen</li>
|
<li><u>Tamil</u>: தமிழ்நேரம் (TamilNeram)</li>
|
||||||
|
<li><u>Turkish</u>: E-Akcaer, Oğuz Ersen, Sabri Ünal</li>
|
||||||
|
<li><u>Ukrainian</u>: Dan, volkov, Сергій</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -1,96 +0,0 @@
|
|||||||
#.rst:
|
|
||||||
# FindLibExiv2
|
|
||||||
# ------------
|
|
||||||
#
|
|
||||||
# Try to find the Exiv2 library.
|
|
||||||
#
|
|
||||||
# This will define the following variables:
|
|
||||||
#
|
|
||||||
# ``LibExiv2_FOUND``
|
|
||||||
# True if (the requested version of) Exiv2 is available
|
|
||||||
#
|
|
||||||
# ``LibExiv2_VERSION``
|
|
||||||
# The version of Exiv2
|
|
||||||
#
|
|
||||||
# ``LibExiv2_INCLUDE_DIRS``
|
|
||||||
# The include dirs of Exiv2 for use with target_include_directories()
|
|
||||||
#
|
|
||||||
# ``LibExiv2_LIBRARIES``
|
|
||||||
# The Exiv2 library for use with target_link_libraries().
|
|
||||||
# This can be passed to target_link_libraries() instead of
|
|
||||||
# the ``LibExiv2::LibExiv2`` target
|
|
||||||
#
|
|
||||||
# If ``LibExiv2_FOUND`` is TRUE, it will also define the following imported
|
|
||||||
# target:
|
|
||||||
#
|
|
||||||
# ``LibExiv2::LibExiv2``
|
|
||||||
# The Exiv2 library
|
|
||||||
#
|
|
||||||
# In general we recommend using the imported target, as it is easier to use.
|
|
||||||
# Bear in mind, however, that if the target is in the link interface of an
|
|
||||||
# exported library, it must be made available by the package config file.
|
|
||||||
#
|
|
||||||
# Since 5.53.0.
|
|
||||||
#
|
|
||||||
#=============================================================================
|
|
||||||
# SPDX-FileCopyrightText: 2018 Christophe Giboudeaux <christophe@krop.fr>
|
|
||||||
# SPDX-FileCopyrightText: 2010 Alexander Neundorf <neundorf@kde.org>
|
|
||||||
# SPDX-FileCopyrightText: 2008 Gilles Caulier <caulier.gilles@gmail.com>
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
find_package(PkgConfig QUIET)
|
|
||||||
pkg_check_modules(PC_EXIV2 QUIET exiv2)
|
|
||||||
|
|
||||||
find_path(LibExiv2_INCLUDE_DIRS NAMES exiv2/exif.hpp
|
|
||||||
HINTS ${PC_EXIV2_INCLUDEDIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(LibExiv2_LIBRARIES NAMES exiv2 libexiv2
|
|
||||||
HINTS ${PC_EXIV2_LIBRARY_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
set(LibExiv2_VERSION ${PC_EXIV2_VERSION})
|
|
||||||
|
|
||||||
if(NOT LibExiv2_VERSION AND DEFINED LibExiv2_INCLUDE_DIRS)
|
|
||||||
# With exiv >= 0.27, the version #defines are in exv_conf.h instead of version.hpp
|
|
||||||
foreach(_exiv2_version_file "version.hpp" "exv_conf.h")
|
|
||||||
if(EXISTS "${LibExiv2_INCLUDE_DIRS}/exiv2/${_exiv2_version_file}")
|
|
||||||
file(READ "${LibExiv2_INCLUDE_DIRS}/exiv2/${_exiv2_version_file}" _exiv_version_file_content)
|
|
||||||
string(REGEX MATCH "#define EXIV2_MAJOR_VERSION[ ]+\\([0-9]+\\)" EXIV2_MAJOR_VERSION_MATCH ${_exiv_version_file_content})
|
|
||||||
string(REGEX MATCH "#define EXIV2_MINOR_VERSION[ ]+\\([0-9]+\\)" EXIV2_MINOR_VERSION_MATCH ${_exiv_version_file_content})
|
|
||||||
string(REGEX MATCH "#define EXIV2_PATCH_VERSION[ ]+\\([0-9]+\\)" EXIV2_PATCH_VERSION_MATCH ${_exiv_version_file_content})
|
|
||||||
if(EXIV2_MAJOR_VERSION_MATCH)
|
|
||||||
string(REGEX REPLACE ".*_MAJOR_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_MAJOR_VERSION ${EXIV2_MAJOR_VERSION_MATCH})
|
|
||||||
string(REGEX REPLACE ".*_MINOR_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_MINOR_VERSION ${EXIV2_MINOR_VERSION_MATCH})
|
|
||||||
string(REGEX REPLACE ".*_PATCH_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_PATCH_VERSION ${EXIV2_PATCH_VERSION_MATCH})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
set(LibExiv2_VERSION "${EXIV2_MAJOR_VERSION}.${EXIV2_MINOR_VERSION}.${EXIV2_PATCH_VERSION}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(LibExiv2
|
|
||||||
FOUND_VAR LibExiv2_FOUND
|
|
||||||
REQUIRED_VARS LibExiv2_LIBRARIES LibExiv2_INCLUDE_DIRS
|
|
||||||
VERSION_VAR LibExiv2_VERSION
|
|
||||||
)
|
|
||||||
|
|
||||||
mark_as_advanced(LibExiv2_INCLUDE_DIRS LibExiv2_LIBRARIES)
|
|
||||||
|
|
||||||
if(LibExiv2_FOUND AND NOT TARGET LibExiv2::LibExiv2)
|
|
||||||
add_library(LibExiv2::LibExiv2 UNKNOWN IMPORTED)
|
|
||||||
set_target_properties(LibExiv2::LibExiv2 PROPERTIES
|
|
||||||
IMPORTED_LOCATION "${LibExiv2_LIBRARIES}"
|
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${LibExiv2_INCLUDE_DIRS}"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(FeatureSummary)
|
|
||||||
set_package_properties(LibExiv2 PROPERTIES
|
|
||||||
URL "https://www.exiv2.org"
|
|
||||||
DESCRIPTION "Image metadata support"
|
|
||||||
)
|
|
||||||
136
dist/MacOSXBundleInfo.plist.in
vendored
Normal file
136
dist/MacOSXBundleInfo.plist.in
vendored
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||||
|
<key>CFBundleGetInfoString</key>
|
||||||
|
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleLongVersionString</key>
|
||||||
|
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||||
|
<key>CSResourcesFileMapped</key>
|
||||||
|
<true/>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||||
|
<!-- FIXME: this list can't be automatically generated by Qt's CMake API, don't know why. -->
|
||||||
|
<key>CFBundleLocalizations</key>
|
||||||
|
<array>
|
||||||
|
<string>en</string>
|
||||||
|
<string>ca</string>
|
||||||
|
<string>de</string>
|
||||||
|
<string>es</string>
|
||||||
|
<string>fr</string>
|
||||||
|
<string>id</string>
|
||||||
|
<string>it</string>
|
||||||
|
<string>ja</string>
|
||||||
|
<string>ko</string>
|
||||||
|
<string>nb_NO</string>
|
||||||
|
<string>nl</string>
|
||||||
|
<string>pa_PK</string>
|
||||||
|
<string>ru</string>
|
||||||
|
<string>si</string>
|
||||||
|
<string>ta</string>
|
||||||
|
<string>tr</string>
|
||||||
|
<string>uk</string>
|
||||||
|
<string>zh_CN</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleDocumentTypes</key>
|
||||||
|
<array>
|
||||||
|
<!-- JPEG -->
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeName</key>
|
||||||
|
<string>JPEG Image</string>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>jpg</string>
|
||||||
|
<string>jpeg</string>
|
||||||
|
<string>jfif</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeMIMETypes</key>
|
||||||
|
<array>
|
||||||
|
<string>image/jpeg</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Viewer</string>
|
||||||
|
</dict>
|
||||||
|
<!-- PNG -->
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeName</key>
|
||||||
|
<string>PNG Image</string>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>png</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeMIMETypes</key>
|
||||||
|
<array>
|
||||||
|
<string>image/png</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Viewer</string>
|
||||||
|
</dict>
|
||||||
|
<!-- WebP -->
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeName</key>
|
||||||
|
<string>WebP Image</string>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>webp</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeMIMETypes</key>
|
||||||
|
<array>
|
||||||
|
<string>image/webp</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Viewer</string>
|
||||||
|
</dict>
|
||||||
|
<!-- GIF -->
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeName</key>
|
||||||
|
<string>GIF Image</string>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>gif</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeMIMETypes</key>
|
||||||
|
<array>
|
||||||
|
<string>image/gif</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Viewer</string>
|
||||||
|
</dict>
|
||||||
|
<!-- SVG -->
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeName</key>
|
||||||
|
<string>SVG Image</string>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>svg</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeMIMETypes</key>
|
||||||
|
<array>
|
||||||
|
<string>image/svg+xml</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Viewer</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@ -1,19 +1,283 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<component type="desktop-application">
|
<component type="desktop-application">
|
||||||
<id>net.blumia.pineapple-pictures</id>
|
<id>net.blumia.pineapple-pictures</id>
|
||||||
<metadata_license>CC0-1.0</metadata_license>
|
|
||||||
<project_license>MIT</project_license>
|
|
||||||
<name>Pineapple Pictures</name>
|
<name>Pineapple Pictures</name>
|
||||||
|
<name xml:lang="es">Pineapple Pictures</name>
|
||||||
|
<name xml:lang="ja">Pineapple Pictures</name>
|
||||||
|
<name xml:lang="nl">Pineapple Afbeeldingen</name>
|
||||||
|
<name xml:lang="ru">Pineapple Pictures</name>
|
||||||
|
<name xml:lang="ta">அன்னாசி படங்கள்</name>
|
||||||
|
<name xml:lang="uk">Pineapple Pictures</name>
|
||||||
<name xml:lang="zh-CN">菠萝看图</name>
|
<name xml:lang="zh-CN">菠萝看图</name>
|
||||||
<summary>Image Viewer</summary>
|
<summary>Image Viewer</summary>
|
||||||
|
<summary xml:lang="es">Visor de imágenes</summary>
|
||||||
|
<summary xml:lang="ja">画像ビューアー</summary>
|
||||||
|
<summary xml:lang="nl">Afbeeldingsweergave</summary>
|
||||||
|
<summary xml:lang="ru">Просмотр изображений</summary>
|
||||||
|
<summary xml:lang="ta">பட பார்வையாளர்</summary>
|
||||||
|
<summary xml:lang="uk">Переглядач зображень</summary>
|
||||||
<summary xml:lang="zh-CN">图像查看器</summary>
|
<summary xml:lang="zh-CN">图像查看器</summary>
|
||||||
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
|
<project_license>MIT</project_license>
|
||||||
<description>
|
<description>
|
||||||
<p>Pineapple Pictures is a lightweight and easy-to-use image viewer that comes with a handy navigation thumbnail when zoom-in, and doesn't contain any image management support.</p>
|
<p>Pineapple Pictures is a lightweight and easy-to-use image viewer that comes with a handy navigation thumbnail when zoom-in, and doesn't contain any image management support.</p>
|
||||||
|
<p xml:lang="es">Pineapple Pictures es un visor de imágenes ligero y fácil de usar que viene con una práctica miniatura de navegación al hacer zoom, y no contiene ningún soporte de gestión de imágenes.</p>
|
||||||
|
<p xml:lang="ja">Pineapple Picturesは、ズームイン時に便利なナビゲーションサムネイルを備えた軽量で使いやすい画像ビューアです。画像管理のサポートは含まれていません。</p>
|
||||||
|
<p xml:lang="nl">Pineapple Afbeeldingen is een licht en eenvoudig te gebruiken afbeeldingsweergaveprogramma met miniatuurnavigatie na inzoomen. Het programma heeft echter geen fotobeheermogelijkheid.</p>
|
||||||
|
<p xml:lang="ru">Pineapple Pictures - это легкий и простой в использовании просмотрщик изображений, оснащенный удобной навигацией по миниатюрам при увеличении масштаба и не содержащий никакой поддержки управления изображениями.</p>
|
||||||
|
<p xml:lang="ta">அன்னாசி படங்கள் ஒரு இலகுரக மற்றும் பயன்படுத்த எளிதான பட பார்வையாளராகும், இது பெரிதாக்கும்போது ஒரு எளிமையான வழிசெலுத்தல் சிறுபடத்துடன் வருகிறது, மேலும் எந்த பட மேலாண்மை ஆதரவையும் கொண்டிருக்கவில்லை.</p>
|
||||||
|
<p xml:lang="uk">Pineapple Pictures – це легкий і простий у використанні переглядач зображень, який постачається зі зручною навігаційною мініатюрою при збільшенні масштабу і не містить жодної підтримки керування зображеннями.</p>
|
||||||
<p xml:lang="zh-CN">菠萝看图是一个轻量级易用的图像查看器,在图片放大时提供了方便的鸟瞰导航功能,且不包含任何图片管理功能。</p>
|
<p xml:lang="zh-CN">菠萝看图是一个轻量级易用的图像查看器,在图片放大时提供了方便的鸟瞰导航功能,且不包含任何图片管理功能。</p>
|
||||||
</description>
|
</description>
|
||||||
|
<developer id="net.blumia">
|
||||||
|
<name>Gary (BLumia) Wang et al.</name>
|
||||||
|
<name xml:lang="ja">Gary (BLumia) Wang など</name>
|
||||||
|
<name xml:lang="nl">Gary (BLumia) Wang e.a.</name>
|
||||||
|
<name xml:lang="ru">Gary (BLumia) Wang et al.</name>
|
||||||
|
<name xml:lang="uk">Gary (BLumia) Wang.</name>
|
||||||
|
<name xml:lang="zh-CN">Gary (BLumia) Wang 等人</name>
|
||||||
|
</developer>
|
||||||
|
<launchable type="desktop-id">net.blumia.pineapple-pictures.desktop</launchable>
|
||||||
<url type="homepage">https://github.com/BLumia/pineapple-pictures</url>
|
<url type="homepage">https://github.com/BLumia/pineapple-pictures</url>
|
||||||
<url type="bugtracker">https://github.com/BLumia/pineapple-pictures/issues</url>
|
<url type="bugtracker">https://github.com/BLumia/pineapple-pictures/issues</url>
|
||||||
|
<url type="translate">https://hosted.weblate.org/projects/pineapple-pictures/</url>
|
||||||
<provides>
|
<provides>
|
||||||
<binary>ppic</binary>
|
<binary>ppic</binary>
|
||||||
</provides>
|
</provides>
|
||||||
|
<screenshots>
|
||||||
|
<screenshot type="default">
|
||||||
|
<caption>Main window when an image file is loaded</caption>
|
||||||
|
<caption xml:lang="es">Ventana principal cuando se carga un archivo de imagen</caption>
|
||||||
|
<caption xml:lang="ja">画像ファイル読み込み時のメインウィンドウ</caption>
|
||||||
|
<caption xml:lang="nl">Hoofdvenster na het laden van een afbeelding</caption>
|
||||||
|
<caption xml:lang="ru">Основное окно после загрузки файла изображения</caption>
|
||||||
|
<caption xml:lang="ta">ஒரு படக் கோப்பு ஏற்றப்படும் போது முதன்மையான சாளரம்</caption>
|
||||||
|
<caption xml:lang="uk">Головне вікно після завантаження файлу зображення</caption>
|
||||||
|
<caption xml:lang="zh-CN">加载图片后的主窗口</caption>
|
||||||
|
<image type="source" width="1503" height="640">https://pineapple-pictures.sourceforge.io/ppic-gui-static.png</image>
|
||||||
|
</screenshot>
|
||||||
|
<screenshot>
|
||||||
|
<caption>Zooming in a raster image</caption>
|
||||||
|
<caption xml:lang="es">Ampliar una imagen rasterizada</caption>
|
||||||
|
<caption xml:lang="ja">ラスター画像の拡大</caption>
|
||||||
|
<caption xml:lang="nl">Inzoomen op een roosterafbeelding</caption>
|
||||||
|
<caption xml:lang="ru">Масштабирование растрового изображения</caption>
|
||||||
|
<caption xml:lang="ta">ராச்டர் படத்தில் பெரிதாக்குதல்</caption>
|
||||||
|
<caption xml:lang="uk">Масштабування растрового зображення</caption>
|
||||||
|
<caption xml:lang="zh-CN">放大浏览位图</caption>
|
||||||
|
<image type="source" width="771" height="553">https://pineapple-pictures.sourceforge.io/ppic-zoom-raster.png</image>
|
||||||
|
</screenshot>
|
||||||
|
<screenshot>
|
||||||
|
<caption>Zooming in a vector image</caption>
|
||||||
|
<caption xml:lang="es">Ampliar una imagen vectorial</caption>
|
||||||
|
<caption xml:lang="ja">ベクター画像の拡大</caption>
|
||||||
|
<caption xml:lang="nl">Inzoomen op een vectorafbeelding</caption>
|
||||||
|
<caption xml:lang="ru">Масштабирование векторного изображения</caption>
|
||||||
|
<caption xml:lang="ta">ஒரு திசையன் படத்தில் பெரிதாக்குதல்</caption>
|
||||||
|
<caption xml:lang="uk">Масштабування векторного зображення</caption>
|
||||||
|
<caption xml:lang="zh-CN">放大浏览矢量图</caption>
|
||||||
|
<image type="source" width="771" height="553">https://pineapple-pictures.sourceforge.io/ppic-zoom-svg.png</image>
|
||||||
|
</screenshot>
|
||||||
|
</screenshots>
|
||||||
|
<releases>
|
||||||
|
<release type="stable" version="1.1.1" date="2025-08-02T00:00:00Z">
|
||||||
|
<description>
|
||||||
|
<p>This release adds the following feature:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Click dock icon should show window when it's hidden on macOS</li>
|
||||||
|
</ul>
|
||||||
|
<p>This release fixes the following bug:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Ensure "Fit by Width" position the view to the beginning of the image</li>
|
||||||
|
</ul>
|
||||||
|
<p>This release includes the following changes:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Update translations</li>
|
||||||
|
<li>Update Exiv2 version for Windows binary build</li>
|
||||||
|
</ul>
|
||||||
|
<p>With contributions from:</p>
|
||||||
|
<p>Heimen Stoffels, VenusGirl, தமிழ்நேரம்</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release type="stable" version="1.1.0" date="2025-07-06T00:00:00Z">
|
||||||
|
<description>
|
||||||
|
<p>This release adds the following features:</p>
|
||||||
|
<ul>
|
||||||
|
<li>New option to disable built-in close window animation</li>
|
||||||
|
<li>New option to disable gallery looping</li>
|
||||||
|
<li>Support load m3u8 as image gallery playlist</li>
|
||||||
|
</ul>
|
||||||
|
<p>This release includes the following change:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Drop Qt 5 support</li>
|
||||||
|
</ul>
|
||||||
|
<p>With contributions from:</p>
|
||||||
|
<p>Heimen Stoffels, albanobattistella, தமிழ்நேரம்</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release type="stable" version="1.0.0" date="2025-05-03T00:00:00Z">
|
||||||
|
<description>
|
||||||
|
<p>This release adds the following features:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Support enforces windowed mode on start-up</li>
|
||||||
|
<li>Reload image automatically when current image gets updated</li>
|
||||||
|
</ul>
|
||||||
|
<p>This release fixes the following bug:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Display correct text language on macOS</li>
|
||||||
|
</ul>
|
||||||
|
<p>This release includes the following changes:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Use native text for shortcut editor's label</li>
|
||||||
|
<li>Display native commandline message when possible</li>
|
||||||
|
<li>Merge Qt translations into app applications as well</li>
|
||||||
|
</ul>
|
||||||
|
<p>With contributions from:</p>
|
||||||
|
<p>Heimen Stoffels, albanobattistella, mmahhi</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release type="stable" version="0.9.2" date="2025-03-05T00:00:00Z">
|
||||||
|
<description>
|
||||||
|
<p>This release fixes the following bug:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Refer to the right exiv2 CMake module so it can be found on Linux</li>
|
||||||
|
</ul>
|
||||||
|
<p>This release includes the following changes:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Convert DEP5 to REUSE.toml for better REUSE compliance</li>
|
||||||
|
<li>Update translations</li>
|
||||||
|
</ul>
|
||||||
|
<p>With contributions from:</p>
|
||||||
|
<p>Pino Toscano, TamilNeram</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release type="stable" version="0.9.1" date="2025-01-25T00:00:00Z">
|
||||||
|
<description>
|
||||||
|
<p>This release adds the following features:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Option to double-click to fullscreen</li>
|
||||||
|
<li>Build-time option to embed translation resources</li>
|
||||||
|
</ul>
|
||||||
|
<p>This release fixes the following bugs:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Fix window size not adjusted when open file on macOS</li>
|
||||||
|
<li>Should center window according to available screen geometry</li>
|
||||||
|
</ul>
|
||||||
|
<p>This release includes the following changes:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Change close window bahavior on macOS</li>
|
||||||
|
<li>Update translations</li>
|
||||||
|
</ul>
|
||||||
|
<p>With contributions from:</p>
|
||||||
|
<p>albanobattistella, Sabri Ünal</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release type="stable" version="0.9.0" date="2024-12-08T00:00:00Z">
|
||||||
|
<description>
|
||||||
|
<p>This release adds the following features:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Support custom shortcuts for existing actions</li>
|
||||||
|
<li>Actions for frame-by-frame animated image playback support</li>
|
||||||
|
</ul>
|
||||||
|
<p>This release includes the following changes:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Initial macOS bundle support</li>
|
||||||
|
<li>bump minimum required CMake version to 3.16</li>
|
||||||
|
<li>Update translations</li>
|
||||||
|
</ul>
|
||||||
|
<p>With contributions from:</p>
|
||||||
|
<p>albanobattistella, VenusGirl, gallegonovato, Sabri Ünal</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release type="stable" version="0.8.2.1" date="2024-10-27T00:00:00Z">
|
||||||
|
<description>
|
||||||
|
<p>This release fixes the following bug:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Cannot load translations caused by a change in 0.8.2</li>
|
||||||
|
</ul>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release type="stable" version="0.8.2" date="2024-10-26T00:00:00Z">
|
||||||
|
<description>
|
||||||
|
<p>This release adds the following feature:</p>
|
||||||
|
<ul>
|
||||||
|
<li>New option to allow use light-color checkerboard by default</li>
|
||||||
|
</ul>
|
||||||
|
<p>With contributions from:</p>
|
||||||
|
<p>albanobattistella, mmahhi, gallegonovato</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release type="stable" version="0.8.1" date="2024-08-25T00:00:00Z">
|
||||||
|
<description>
|
||||||
|
<p>This release adds the following feature:</p>
|
||||||
|
<ul>
|
||||||
|
<li>New command line option to list all supported formats</li>
|
||||||
|
</ul>
|
||||||
|
<p>With contributions from:</p>
|
||||||
|
<p>albanobattistella, mmahhi, ovl-1, gallegonovato, Oğuz Ersen</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release type="stable" version="0.8.0" date="2024-06-29T00:00:00Z">
|
||||||
|
<description>
|
||||||
|
<p>This release adds the following feature:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Support move image file to trash</li>
|
||||||
|
</ul>
|
||||||
|
<p>With contributions from:</p>
|
||||||
|
<p>albanobattistella, mmahhi, gallegonovato, Oğuz Ersen</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release type="stable" version="0.7.4" date="2024-04-04T00:00:00Z">
|
||||||
|
<description>
|
||||||
|
<p>This release adds the following feature:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Add some icons for corresponding menu actions</li>
|
||||||
|
</ul>
|
||||||
|
<p>With contributions from:</p>
|
||||||
|
<p>Reza Almanda, mmahhi, Oğuz Ersen, volkov, Сергій</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release type="stable" version="0.7.3" date="2023-10-24T00:00:00Z">
|
||||||
|
<description>
|
||||||
|
<p>This release adds the following feature:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Add "Keep transformation" to menu</li>
|
||||||
|
</ul>
|
||||||
|
<p>With contributions from:</p>
|
||||||
|
<p>mmahhi, VenusGirl, albanobattistella, gallegonovato, Heimen Stoffels</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release type="stable" version="0.7.2" date="2023-08-27T00:00:00Z">
|
||||||
|
<description>
|
||||||
|
<p>This release adds the following feature:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Add an option in setting dialog to tweak the High-DPI scaling rounding policy (might only works in Qt 6 build)</li>
|
||||||
|
</ul>
|
||||||
|
<p>This release fixes the following bugs:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Remove image size limit for Qt 6 build</li>
|
||||||
|
<li>Fix application icon install location under Linux</li>
|
||||||
|
</ul>
|
||||||
|
<p>With contributions from:</p>
|
||||||
|
<p>Heimen Stoffels, Andrey, Dan, gallegonovato, albanobattistella, Sabri Ünal</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release type="stable" version="0.7.1" date="2023-07-08T00:00:00Z">
|
||||||
|
<description>
|
||||||
|
<p>This release adds the following features:</p>
|
||||||
|
<ul>
|
||||||
|
<li>TIF and TIFF format files in the same folder will now be automatically added to the gallery</li>
|
||||||
|
<li>Built-in window resizing now also supports Linux desktop. (macOS might also works as well)</li>
|
||||||
|
</ul>
|
||||||
|
<p>This release fixes the following bugs:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Settings dialog will automatedly use a suitable size instead of a hard-coded one</li>
|
||||||
|
<li>Fix default configuration file location under Linux. (was `~/.config/config.ini`, now it's `~/.config/Pineapple Pictures/config.ini`)</li>
|
||||||
|
</ul>
|
||||||
|
<p>With contributions from:</p>
|
||||||
|
<p>yyc12345</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
</releases>
|
||||||
|
<content_rating type="oars-1.1"/>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
55
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.es.po
vendored
Normal file
55
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.es.po
vendored
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"POT-Creation-Date: 2023-08-22 18:49中国标准时间\n"
|
||||||
|
"PO-Revision-Date: 2024-04-19 17:07+0000\n"
|
||||||
|
"Last-Translator: gallegonovato <fran-carro@hotmail.es>\n"
|
||||||
|
"Language-Team: Spanish <https://hosted.weblate.org/projects/pineapple-"
|
||||||
|
"pictures/appstream-metadata/es/>\n"
|
||||||
|
"Language: es\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 5.5-dev\n"
|
||||||
|
|
||||||
|
#. (itstool) path: component/name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:7
|
||||||
|
msgid "Pineapple Pictures"
|
||||||
|
msgstr "Pineapple Pictures"
|
||||||
|
|
||||||
|
#. (itstool) path: component/summary
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:9
|
||||||
|
msgid "Image Viewer"
|
||||||
|
msgstr "Visor de imágenes"
|
||||||
|
|
||||||
|
#. (itstool) path: description/p
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:12
|
||||||
|
msgid ""
|
||||||
|
"Pineapple Pictures is a lightweight and easy-to-use image viewer that comes "
|
||||||
|
"with a handy navigation thumbnail when zoom-in, and doesn't contain any "
|
||||||
|
"image management support."
|
||||||
|
msgstr ""
|
||||||
|
"Pineapple Pictures es un visor de imágenes ligero y fácil de usar que viene "
|
||||||
|
"con una práctica miniatura de navegación al hacer zoom, y no contiene ningún "
|
||||||
|
"soporte de gestión de imágenes."
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:17
|
||||||
|
msgid "Main window when an image file is loaded"
|
||||||
|
msgstr "Ventana principal cuando se carga un archivo de imagen"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:22
|
||||||
|
msgid "Zooming in a raster image"
|
||||||
|
msgstr "Ampliar una imagen rasterizada"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:27
|
||||||
|
msgid "Zooming in a vector image"
|
||||||
|
msgstr "Ampliar una imagen vectorial"
|
||||||
|
|
||||||
|
#. (itstool) path: component/developer_name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:34
|
||||||
|
msgid "Gary (BLumia) Wang et al."
|
||||||
|
msgstr "Gary (BLumia) Wang et al."
|
||||||
54
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.ja.po
vendored
Normal file
54
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.ja.po
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"POT-Creation-Date: 2023-08-22 18:49中国标准时间\n"
|
||||||
|
"PO-Revision-Date: 2023-11-14 17:05+0000\n"
|
||||||
|
"Last-Translator: mmahhi <masa10suda@gmail.com>\n"
|
||||||
|
"Language-Team: Japanese <https://hosted.weblate.org/projects/pineapple-"
|
||||||
|
"pictures/appstream-metadata/ja/>\n"
|
||||||
|
"Language: ja\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||||
|
"X-Generator: Weblate 5.2-dev\n"
|
||||||
|
|
||||||
|
#. (itstool) path: component/name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:7
|
||||||
|
msgid "Pineapple Pictures"
|
||||||
|
msgstr "Pineapple Pictures"
|
||||||
|
|
||||||
|
#. (itstool) path: component/summary
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:9
|
||||||
|
msgid "Image Viewer"
|
||||||
|
msgstr "画像ビューアー"
|
||||||
|
|
||||||
|
#. (itstool) path: description/p
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:12
|
||||||
|
msgid ""
|
||||||
|
"Pineapple Pictures is a lightweight and easy-to-use image viewer that comes "
|
||||||
|
"with a handy navigation thumbnail when zoom-in, and doesn't contain any "
|
||||||
|
"image management support."
|
||||||
|
msgstr ""
|
||||||
|
"Pineapple Picturesは、ズームイン時に便利なナビゲーションサムネイルを備えた軽"
|
||||||
|
"量で使いやすい画像ビューアです。画像管理のサポートは含まれていません。"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:17
|
||||||
|
msgid "Main window when an image file is loaded"
|
||||||
|
msgstr "画像ファイル読み込み時のメインウィンドウ"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:22
|
||||||
|
msgid "Zooming in a raster image"
|
||||||
|
msgstr "ラスター画像の拡大"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:27
|
||||||
|
msgid "Zooming in a vector image"
|
||||||
|
msgstr "ベクター画像の拡大"
|
||||||
|
|
||||||
|
#. (itstool) path: component/developer_name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:34
|
||||||
|
msgid "Gary (BLumia) Wang et al."
|
||||||
|
msgstr "Gary (BLumia) Wang など"
|
||||||
55
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.nl.po
vendored
Normal file
55
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.nl.po
vendored
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"POT-Creation-Date: 2023-08-22 18:49中国标准时间\n"
|
||||||
|
"PO-Revision-Date: 2023-08-23 06:41+0000\n"
|
||||||
|
"Last-Translator: Heimen Stoffels <vistausss@fastmail.com>\n"
|
||||||
|
"Language-Team: Dutch <https://hosted.weblate.org/projects/pineapple-pictures/"
|
||||||
|
"appstream-metadata/nl/>\n"
|
||||||
|
"Language: nl\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 5.0-dev\n"
|
||||||
|
|
||||||
|
#. (itstool) path: component/name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:7
|
||||||
|
msgid "Pineapple Pictures"
|
||||||
|
msgstr "Pineapple Afbeeldingen"
|
||||||
|
|
||||||
|
#. (itstool) path: component/summary
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:9
|
||||||
|
msgid "Image Viewer"
|
||||||
|
msgstr "Afbeeldingsweergave"
|
||||||
|
|
||||||
|
#. (itstool) path: description/p
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:12
|
||||||
|
msgid ""
|
||||||
|
"Pineapple Pictures is a lightweight and easy-to-use image viewer that comes "
|
||||||
|
"with a handy navigation thumbnail when zoom-in, and doesn't contain any "
|
||||||
|
"image management support."
|
||||||
|
msgstr ""
|
||||||
|
"Pineapple Afbeeldingen is een licht en eenvoudig te gebruiken "
|
||||||
|
"afbeeldingsweergaveprogramma met miniatuurnavigatie na inzoomen. Het "
|
||||||
|
"programma heeft echter geen fotobeheermogelijkheid."
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:17
|
||||||
|
msgid "Main window when an image file is loaded"
|
||||||
|
msgstr "Hoofdvenster na het laden van een afbeelding"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:22
|
||||||
|
msgid "Zooming in a raster image"
|
||||||
|
msgstr "Inzoomen op een roosterafbeelding"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:27
|
||||||
|
msgid "Zooming in a vector image"
|
||||||
|
msgstr "Inzoomen op een vectorafbeelding"
|
||||||
|
|
||||||
|
#. (itstool) path: component/developer_name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:34
|
||||||
|
msgid "Gary (BLumia) Wang et al."
|
||||||
|
msgstr "Gary (BLumia) Wang e.a."
|
||||||
46
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.pot
vendored
Normal file
46
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.pot
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"POT-Creation-Date: 2023-08-22 18:49中国标准时间\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
#. (itstool) path: component/name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:7
|
||||||
|
msgid "Pineapple Pictures"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: component/summary
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:9
|
||||||
|
msgid "Image Viewer"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: description/p
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:12
|
||||||
|
msgid "Pineapple Pictures is a lightweight and easy-to-use image viewer that comes with a handy navigation thumbnail when zoom-in, and doesn't contain any image management support."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:17
|
||||||
|
msgid "Main window when an image file is loaded"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:22
|
||||||
|
msgid "Zooming in a raster image"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:27
|
||||||
|
msgid "Zooming in a vector image"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: component/developer_name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:34
|
||||||
|
msgid "Gary (BLumia) Wang et al."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
56
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.ru.po
vendored
Normal file
56
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.ru.po
vendored
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"POT-Creation-Date: 2023-08-22 18:49中国标准时间\n"
|
||||||
|
"PO-Revision-Date: 2023-08-23 06:41+0000\n"
|
||||||
|
"Last-Translator: Andrey <andrey@mailbox.org>\n"
|
||||||
|
"Language-Team: Russian <https://hosted.weblate.org/projects/pineapple-"
|
||||||
|
"pictures/appstream-metadata/ru/>\n"
|
||||||
|
"Language: ru\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||||
|
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||||
|
"X-Generator: Weblate 5.0-dev\n"
|
||||||
|
|
||||||
|
#. (itstool) path: component/name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:7
|
||||||
|
msgid "Pineapple Pictures"
|
||||||
|
msgstr "Pineapple Pictures"
|
||||||
|
|
||||||
|
#. (itstool) path: component/summary
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:9
|
||||||
|
msgid "Image Viewer"
|
||||||
|
msgstr "Просмотр изображений"
|
||||||
|
|
||||||
|
#. (itstool) path: description/p
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:12
|
||||||
|
msgid ""
|
||||||
|
"Pineapple Pictures is a lightweight and easy-to-use image viewer that comes "
|
||||||
|
"with a handy navigation thumbnail when zoom-in, and doesn't contain any "
|
||||||
|
"image management support."
|
||||||
|
msgstr ""
|
||||||
|
"Pineapple Pictures - это легкий и простой в использовании просмотрщик "
|
||||||
|
"изображений, оснащенный удобной навигацией по миниатюрам при увеличении "
|
||||||
|
"масштаба и не содержащий никакой поддержки управления изображениями."
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:17
|
||||||
|
msgid "Main window when an image file is loaded"
|
||||||
|
msgstr "Основное окно после загрузки файла изображения"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:22
|
||||||
|
msgid "Zooming in a raster image"
|
||||||
|
msgstr "Масштабирование растрового изображения"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:27
|
||||||
|
msgid "Zooming in a vector image"
|
||||||
|
msgstr "Масштабирование векторного изображения"
|
||||||
|
|
||||||
|
#. (itstool) path: component/developer_name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:34
|
||||||
|
msgid "Gary (BLumia) Wang et al."
|
||||||
|
msgstr "Gary (BLumia) Wang et al."
|
||||||
52
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.ta.po
vendored
Normal file
52
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.ta.po
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"POT-Creation-Date: 2023-08-22 18:49中国标准时间\n"
|
||||||
|
"PO-Revision-Date: 2025-01-28 09:01+0000\n"
|
||||||
|
"Last-Translator: தமிழ்நேரம் <anishprabu.t@gmail.com>\n"
|
||||||
|
"Language-Team: Tamil <https://hosted.weblate.org/projects/pineapple-pictures/"
|
||||||
|
"appstream-metadata/ta/>\n"
|
||||||
|
"Language: ta\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 5.10-dev\n"
|
||||||
|
|
||||||
|
#. (itstool) path: component/name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:7
|
||||||
|
msgid "Pineapple Pictures"
|
||||||
|
msgstr "அன்னாசி படங்கள்"
|
||||||
|
|
||||||
|
#. (itstool) path: component/summary
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:9
|
||||||
|
msgid "Image Viewer"
|
||||||
|
msgstr "பட பார்வையாளர்"
|
||||||
|
|
||||||
|
#. (itstool) path: description/p
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:12
|
||||||
|
msgid "Pineapple Pictures is a lightweight and easy-to-use image viewer that comes with a handy navigation thumbnail when zoom-in, and doesn't contain any image management support."
|
||||||
|
msgstr ""
|
||||||
|
"அன்னாசி படங்கள் ஒரு இலகுரக மற்றும் பயன்படுத்த எளிதான பட பார்வையாளராகும், இது "
|
||||||
|
"பெரிதாக்கும்போது ஒரு எளிமையான வழிசெலுத்தல் சிறுபடத்துடன் வருகிறது, மேலும் எந்த பட "
|
||||||
|
"மேலாண்மை ஆதரவையும் கொண்டிருக்கவில்லை."
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:17
|
||||||
|
msgid "Main window when an image file is loaded"
|
||||||
|
msgstr "ஒரு படக் கோப்பு ஏற்றப்படும் போது முதன்மையான சாளரம்"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:22
|
||||||
|
msgid "Zooming in a raster image"
|
||||||
|
msgstr "ராச்டர் படத்தில் பெரிதாக்குதல்"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:27
|
||||||
|
msgid "Zooming in a vector image"
|
||||||
|
msgstr "ஒரு திசையன் படத்தில் பெரிதாக்குதல்"
|
||||||
|
|
||||||
|
#. (itstool) path: component/developer_name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:34
|
||||||
|
msgid "Gary (BLumia) Wang et al."
|
||||||
|
msgstr "கேரி (ப்ளூமியா) வாங் மற்றும் பலர்."
|
||||||
56
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.uk.po
vendored
Normal file
56
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.uk.po
vendored
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"POT-Creation-Date: 2023-08-22 18:49中国标准时间\n"
|
||||||
|
"PO-Revision-Date: 2024-01-01 16:10+0000\n"
|
||||||
|
"Last-Translator: Сергій <sergiy.goncharuk.1@gmail.com>\n"
|
||||||
|
"Language-Team: Ukrainian <https://hosted.weblate.org/projects/"
|
||||||
|
"pineapple-pictures/appstream-metadata/uk/>\n"
|
||||||
|
"Language: uk\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
|
||||||
|
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||||
|
"X-Generator: Weblate 5.4-dev\n"
|
||||||
|
|
||||||
|
#. (itstool) path: component/name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:7
|
||||||
|
msgid "Pineapple Pictures"
|
||||||
|
msgstr "Pineapple Pictures"
|
||||||
|
|
||||||
|
#. (itstool) path: component/summary
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:9
|
||||||
|
msgid "Image Viewer"
|
||||||
|
msgstr "Переглядач зображень"
|
||||||
|
|
||||||
|
#. (itstool) path: description/p
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:12
|
||||||
|
msgid ""
|
||||||
|
"Pineapple Pictures is a lightweight and easy-to-use image viewer that comes "
|
||||||
|
"with a handy navigation thumbnail when zoom-in, and doesn't contain any "
|
||||||
|
"image management support."
|
||||||
|
msgstr ""
|
||||||
|
"Pineapple Pictures – це легкий і простий у використанні переглядач "
|
||||||
|
"зображень, який постачається зі зручною навігаційною мініатюрою при "
|
||||||
|
"збільшенні масштабу і не містить жодної підтримки керування зображеннями."
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:17
|
||||||
|
msgid "Main window when an image file is loaded"
|
||||||
|
msgstr "Головне вікно після завантаження файлу зображення"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:22
|
||||||
|
msgid "Zooming in a raster image"
|
||||||
|
msgstr "Масштабування растрового зображення"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:27
|
||||||
|
msgid "Zooming in a vector image"
|
||||||
|
msgstr "Масштабування векторного зображення"
|
||||||
|
|
||||||
|
#. (itstool) path: component/developer_name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:34
|
||||||
|
msgid "Gary (BLumia) Wang et al."
|
||||||
|
msgstr "Gary (BLumia) Wang."
|
||||||
52
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.zh_CN.po
vendored
Normal file
52
dist/appstream/po/net.blumia.pineapple-pictures.metainfo.zh_CN.po
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: \n"
|
||||||
|
"POT-Creation-Date: 2023-08-22 18:49中国标准时间\n"
|
||||||
|
"PO-Revision-Date: 2023-08-22 18:22+0800\n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"Language: zh_CN\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Generator: Poedit 3.3.2\n"
|
||||||
|
|
||||||
|
#. (itstool) path: component/name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:7
|
||||||
|
msgid "Pineapple Pictures"
|
||||||
|
msgstr "菠萝看图"
|
||||||
|
|
||||||
|
#. (itstool) path: component/summary
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:9
|
||||||
|
msgid "Image Viewer"
|
||||||
|
msgstr "图像查看器"
|
||||||
|
|
||||||
|
#. (itstool) path: description/p
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:12
|
||||||
|
msgid ""
|
||||||
|
"Pineapple Pictures is a lightweight and easy-to-use image viewer that comes "
|
||||||
|
"with a handy navigation thumbnail when zoom-in, and doesn't contain any "
|
||||||
|
"image management support."
|
||||||
|
msgstr ""
|
||||||
|
"菠萝看图是一个轻量级易用的图像查看器,在图片放大时提供了方便的鸟瞰导航功能,"
|
||||||
|
"且不包含任何图片管理功能。"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:17
|
||||||
|
msgid "Main window when an image file is loaded"
|
||||||
|
msgstr "加载图片后的主窗口"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:22
|
||||||
|
msgid "Zooming in a raster image"
|
||||||
|
msgstr "放大浏览位图"
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:27
|
||||||
|
msgid "Zooming in a vector image"
|
||||||
|
msgstr "放大浏览矢量图"
|
||||||
|
|
||||||
|
#. (itstool) path: component/developer_name
|
||||||
|
#: net.blumia.pineapple-pictures.metainfo.xml:34
|
||||||
|
msgid "Gary (BLumia) Wang et al."
|
||||||
|
msgstr "Gary (BLumia) Wang 等人"
|
||||||
2
dist/net.blumia.pineapple-pictures.desktop
vendored
2
dist/net.blumia.pineapple-pictures.desktop
vendored
@ -5,7 +5,7 @@ Comment[zh_CN]=菠萝看图是一个轻量级的图像查看器
|
|||||||
Exec=ppic %F
|
Exec=ppic %F
|
||||||
GenericName=Image Viewer
|
GenericName=Image Viewer
|
||||||
GenericName[zh_CN]=图像查看器
|
GenericName[zh_CN]=图像查看器
|
||||||
Icon=pineapple-pictures
|
Icon=net.blumia.pineapple-pictures
|
||||||
Keywords=Picture;Image;Viewer;Jpg;Jpeg;Png;
|
Keywords=Picture;Image;Viewer;Jpg;Jpeg;Png;
|
||||||
MimeType=image/bmp;image/bmp24;image/jpg;image/jpe;image/jpeg;image/jpeg24;image/jng;image/pcd;image/pcx;image/png;image/tif;image/tiff;image/tiff24;image/dds;image/gif;image/sgi;image/j2k;image/jp2;image/pct;image/wdp;image/arw;image/icb;image/dng;image/vda;image/vst;image/svg;image/ptif;image/mef;image/xbm;image/svg+xml;
|
MimeType=image/bmp;image/bmp24;image/jpg;image/jpe;image/jpeg;image/jpeg24;image/jng;image/pcd;image/pcx;image/png;image/tif;image/tiff;image/tiff24;image/dds;image/gif;image/sgi;image/j2k;image/jp2;image/pct;image/wdp;image/arw;image/icb;image/dng;image/vda;image/vst;image/svg;image/ptif;image/mef;image/xbm;image/svg+xml;
|
||||||
Name=Pineapple Pictures
|
Name=Pineapple Pictures
|
||||||
|
|||||||
@ -1,93 +1,101 @@
|
|||||||
# SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
# SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
QT += core widgets gui svg
|
QT += core widgets gui svg svgwidgets
|
||||||
greaterThan(QT_MAJOR_VERSION, 5): QT += svgwidgets
|
|
||||||
|
TARGET = ppic
|
||||||
TARGET = ppic
|
TEMPLATE = app
|
||||||
TEMPLATE = app
|
DEFINES += PPIC_VERSION_STRING=\\\"x.y.z\\\"
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
win32 {
|
||||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
DEFINES += FLAG_PORTABLE_MODE_SUPPORT=1
|
||||||
# depend on your compiler). Please consult the documentation of the
|
}
|
||||||
# deprecated API in order to know how to port your code away from it.
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
# The following define makes your compiler emit warnings if you use
|
||||||
|
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||||
# You can also make your code fail to compile if you use deprecated APIs.
|
# depend on your compiler). Please consult the documentation of the
|
||||||
# In order to do so, uncomment the following line.
|
# deprecated API in order to know how to port your code away from it.
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
|
||||||
|
# You can also make your code fail to compile if you use deprecated APIs.
|
||||||
CONFIG += c++11 lrelease embed_translations
|
# In order to do so, uncomment the following line.
|
||||||
|
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||||
SOURCES += \
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
app/aboutdialog.cpp \
|
|
||||||
app/main.cpp \
|
CONFIG += c++17 lrelease embed_translations
|
||||||
app/framelesswindow.cpp \
|
|
||||||
app/mainwindow.cpp \
|
SOURCES += \
|
||||||
app/graphicsview.cpp \
|
app/aboutdialog.cpp \
|
||||||
app/bottombuttongroup.cpp \
|
app/main.cpp \
|
||||||
app/graphicsscene.cpp \
|
app/framelesswindow.cpp \
|
||||||
app/navigatorview.cpp \
|
app/mainwindow.cpp \
|
||||||
app/opacityhelper.cpp \
|
app/graphicsview.cpp \
|
||||||
app/toolbutton.cpp \
|
app/bottombuttongroup.cpp \
|
||||||
app/settings.cpp \
|
app/graphicsscene.cpp \
|
||||||
app/settingsdialog.cpp \
|
app/navigatorview.cpp \
|
||||||
app/metadatamodel.cpp \
|
app/opacityhelper.cpp \
|
||||||
app/metadatadialog.cpp \
|
app/toolbutton.cpp \
|
||||||
app/exiv2wrapper.cpp \
|
app/settings.cpp \
|
||||||
app/actionmanager.cpp \
|
app/settingsdialog.cpp \
|
||||||
app/playlistmanager.cpp
|
app/metadatamodel.cpp \
|
||||||
|
app/metadatadialog.cpp \
|
||||||
HEADERS += \
|
app/exiv2wrapper.cpp \
|
||||||
app/aboutdialog.h \
|
app/actionmanager.cpp \
|
||||||
app/framelesswindow.h \
|
app/playlistmanager.cpp \
|
||||||
app/mainwindow.h \
|
app/shortcutedit.cpp \
|
||||||
app/graphicsview.h \
|
app/fileopeneventhandler.cpp
|
||||||
app/bottombuttongroup.h \
|
|
||||||
app/graphicsscene.h \
|
HEADERS += \
|
||||||
app/navigatorview.h \
|
app/aboutdialog.h \
|
||||||
app/opacityhelper.h \
|
app/framelesswindow.h \
|
||||||
app/toolbutton.h \
|
app/mainwindow.h \
|
||||||
app/settings.h \
|
app/graphicsview.h \
|
||||||
app/settingsdialog.h \
|
app/bottombuttongroup.h \
|
||||||
app/metadatamodel.h \
|
app/graphicsscene.h \
|
||||||
app/metadatadialog.h \
|
app/navigatorview.h \
|
||||||
app/exiv2wrapper.h \
|
app/opacityhelper.h \
|
||||||
app/actionmanager.h \
|
app/toolbutton.h \
|
||||||
app/playlistmanager.h
|
app/settings.h \
|
||||||
|
app/settingsdialog.h \
|
||||||
TRANSLATIONS = \
|
app/metadatamodel.h \
|
||||||
app/translations/PineapplePictures.ts \
|
app/metadatadialog.h \
|
||||||
app/translations/PineapplePictures_zh_CN.ts \
|
app/exiv2wrapper.h \
|
||||||
app/translations/PineapplePictures_de.ts \
|
app/actionmanager.h \
|
||||||
app/translations/PineapplePictures_es.ts \
|
app/playlistmanager.h \
|
||||||
app/translations/PineapplePictures_fr.ts \
|
app/shortcutedit.h \
|
||||||
app/translations/PineapplePictures_nb_NO.ts \
|
app/fileopeneventhandler.h
|
||||||
app/translations/PineapplePictures_nl.ts \
|
|
||||||
app/translations/PineapplePictures_ru.ts \
|
TRANSLATIONS = \
|
||||||
app/translations/PineapplePictures_si.ts \
|
app/translations/PineapplePictures_en.ts \
|
||||||
app/translations/PineapplePictures_id.ts
|
app/translations/PineapplePictures_zh_CN.ts \
|
||||||
|
app/translations/PineapplePictures_de.ts \
|
||||||
# Default rules for deployment.
|
app/translations/PineapplePictures_es.ts \
|
||||||
qnx: target.path = /tmp/$${TARGET}/bin
|
app/translations/PineapplePictures_fr.ts \
|
||||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
app/translations/PineapplePictures_nb_NO.ts \
|
||||||
!isEmpty(target.path): INSTALLS += target
|
app/translations/PineapplePictures_nl.ts \
|
||||||
|
app/translations/PineapplePictures_ru.ts \
|
||||||
RESOURCES += \
|
app/translations/PineapplePictures_si.ts \
|
||||||
assets/resources.qrc
|
app/translations/PineapplePictures_id.ts
|
||||||
|
|
||||||
# Generate from svg:
|
# Default rules for deployment.
|
||||||
# magick convert -density 512x512 -background none app-icon.svg -define icon:auto-resize app-icon.ico
|
qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
RC_ICONS = assets/icons/app-icon.ico
|
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
|
!isEmpty(target.path): INSTALLS += target
|
||||||
# Windows only, for rc file (we're not going to use the .rc file in this repo)
|
|
||||||
QMAKE_TARGET_PRODUCT = Pineapple Pictures
|
RESOURCES += \
|
||||||
QMAKE_TARGET_DESCRIPTION = Pineapple Pictures - Image Viewer
|
assets/resources.qrc
|
||||||
QMAKE_TARGET_COPYRIGHT = MIT/Expat License - Copyright (C) 2020 Gary Wang
|
|
||||||
|
# Generate from svg:
|
||||||
# MSVC only, since QMake doesn't have a CMAKE_CXX_STANDARD_LIBRARIES or cpp_winlibs similar thing
|
# magick convert -density 512x512 -background none app-icon.svg -define icon:auto-resize app-icon.ico
|
||||||
win32-msvc* {
|
RC_ICONS = assets/icons/app-icon.ico
|
||||||
LIBS += -luser32
|
|
||||||
}
|
# Windows only, for rc file (we're not going to use the .rc file in this repo)
|
||||||
|
QMAKE_TARGET_PRODUCT = Pineapple Pictures
|
||||||
|
QMAKE_TARGET_DESCRIPTION = Pineapple Pictures - Image Viewer
|
||||||
|
QMAKE_TARGET_COPYRIGHT = MIT/Expat License - Copyright (C) 2024 Gary Wang
|
||||||
|
|
||||||
|
# MSVC only, since QMake doesn't have a CMAKE_CXX_STANDARD_LIBRARIES or cpp_winlibs similar thing
|
||||||
|
win32-msvc* {
|
||||||
|
LIBS += -luser32
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user