Compare commits
66 Commits
Author | SHA1 | Date | |
---|---|---|---|
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 |
31
.github/workflows/macos.yml
vendored
31
.github/workflows/macos.yml
vendored
@ -1,6 +1,6 @@
|
||||
name: macOS CI
|
||||
|
||||
on: [push, pull_request]
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -10,10 +10,29 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: '6.4.2'
|
||||
- name: Run a qt project
|
||||
version: '6.9.1'
|
||||
modules: 'qtimageformats'
|
||||
- name: Install Conan and Dependencies
|
||||
id: conan
|
||||
working-directory: ./
|
||||
shell: bash
|
||||
run: |
|
||||
cmake ./ -DPREFER_QT_5=OFF
|
||||
make
|
||||
pip3 install wheel setuptools
|
||||
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]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
reuse-compliance-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: REUSE Compliance Check
|
||||
uses: fsfe/reuse-action@v2
|
||||
uses: fsfe/reuse-action@v5
|
||||
|
26
.github/workflows/ubuntu.yml
vendored
26
.github/workflows/ubuntu.yml
vendored
@ -3,30 +3,6 @@ name: Ubuntu CI
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
ubuntu-22-04-build:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- 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 ../ -DPREFER_QT_5=ON
|
||||
make
|
||||
cpack -G DEB
|
||||
- name: Try install it
|
||||
run: |
|
||||
cd build
|
||||
sudo apt install ./*.deb
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ubuntu-22.04-deb-package
|
||||
path: build/*.deb
|
||||
|
||||
ubuntu-24-04-build:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
@ -39,7 +15,7 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../ -DPREFER_QT_5=OFF
|
||||
cmake ../
|
||||
make
|
||||
cpack -G DEB
|
||||
- name: Try install it
|
||||
|
38
.github/workflows/windows.yml
vendored
38
.github/workflows/windows.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- qt_ver: '6.8.0'
|
||||
- qt_ver: '6.9.1'
|
||||
vs: '2022'
|
||||
aqt_arch: 'win64_msvc2022_64'
|
||||
msvc_arch: 'x64'
|
||||
@ -44,7 +44,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- qt_ver: '6.8.0'
|
||||
- qt_ver: '6.9.1'
|
||||
vs: '2022'
|
||||
aqt_arch: 'win64_msvc2022_64'
|
||||
msvc_arch: 'x64'
|
||||
@ -71,44 +71,52 @@ jobs:
|
||||
:: ------ dep ------
|
||||
set CMAKE_PREFIX_PATH=%PWD%/dependencies_bin
|
||||
mkdir dependencies_src
|
||||
:: ===== exiv2 =====
|
||||
echo ::group::===== exiv2 =====
|
||||
curl -fsSL -o exiv2_bin.zip https://github.com/Exiv2/exiv2/releases/download/v0.28.3/exiv2-0.28.3-2019msvc64.zip
|
||||
7z x exiv2_bin.zip -y
|
||||
ren .\exiv2-0.28.3-2019msvc64 dependencies_bin
|
||||
:: ===== zlib =====
|
||||
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
|
||||
:: ===== AOM for libavif AVI decoding support =====
|
||||
git clone -q -b v3.10.0 --depth 1 https://aomedia.googlesource.com/aom dependencies_src/aom
|
||||
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
|
||||
:: ===== libavif =====
|
||||
curl -fsSL -o libavif-v1_1_1.zip https://github.com/AOMediaCodec/libavif/archive/v1.1.1.zip
|
||||
7z x libavif-v1_1_1.zip -y -o"dependencies_src"
|
||||
ren .\dependencies_src\libavif-1.1.1 libavif || goto :error
|
||||
cmake ./dependencies_src/libavif -Bbuild_dependencies/libavif -DCMAKE_INSTALL_PREFIX="dependencies_bin" -DAVIF_CODEC_AOM=ON -DAVIF_LOCAL_LIBYUV=ON
|
||||
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
|
||||
:: ===== expat =====
|
||||
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
|
||||
:: ===== ECM =====
|
||||
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
|
||||
:: ===== KArchive =====
|
||||
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 -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
|
||||
:: ===== KImageFormats =====
|
||||
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
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,6 +2,9 @@
|
||||
*.user
|
||||
*.user.*
|
||||
|
||||
# Why, macOS, why?
|
||||
.DS_Store
|
||||
|
||||
# Translation files
|
||||
*.qm
|
||||
*.mo
|
||||
|
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 NEWS 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
|
106
CMakeLists.txt
106
CMakeLists.txt
@ -1,49 +1,37 @@
|
||||
# SPDX-FileCopyrightText: 2022 - 2024 Gary Wang <git@blumia.net>
|
||||
# SPDX-FileCopyrightText: 2022 - 2025 Gary Wang <git@blumia.net>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
cmake_minimum_required (VERSION 3.9.5)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(pineapple-pictures VERSION 0.8.2.1) # don't forget to update NEWS file and AppStream metadata.
|
||||
project(pineapple-pictures VERSION 1.0.0) # don't forget to update NEWS file and AppStream metadata.
|
||||
|
||||
include (GNUInstallDirs)
|
||||
include (FeatureSummary)
|
||||
include(GNUInstallDirs)
|
||||
include(FeatureSummary)
|
||||
|
||||
option (EXIV2_METADATA_SUPPORT "Better image metadata support via libexiv2" ON)
|
||||
option (PREFER_QT_5 "Prefer to use Qt 5" OFF)
|
||||
option (TRANSLATION_RESOURCE_EMBEDDING "Embedding .qm translation files inside resource" OFF)
|
||||
|
||||
set (CMAKE_CXX_STANDARD 17)
|
||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set (CMAKE_AUTOMOC ON)
|
||||
set (CMAKE_AUTORCC ON)
|
||||
|
||||
if (PREFER_QT_5)
|
||||
find_package(QT NAMES Qt5 REQUIRED COMPONENTS Core)
|
||||
else ()
|
||||
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
|
||||
endif ()
|
||||
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
|
||||
|
||||
if (${QT_VERSION_MAJOR} EQUAL "5")
|
||||
set (QT_MINIMUM_VERSION "5.15.2")
|
||||
else ()
|
||||
set (QT_MINIMUM_VERSION "6.4")
|
||||
endif ()
|
||||
set (QT_MINIMUM_VERSION "6.4")
|
||||
|
||||
find_package(Qt${QT_VERSION_MAJOR} ${QT_MINIMUM_VERSION} REQUIRED
|
||||
COMPONENTS Widgets Svg LinguistTools
|
||||
COMPONENTS Widgets Svg SvgWidgets LinguistTools
|
||||
OPTIONAL_COMPONENTS DBus
|
||||
)
|
||||
|
||||
if (${QT_VERSION_MAJOR} EQUAL "6")
|
||||
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} ${QT_MINIMUM_VERSION} CONFIG REQUIRED SvgWidgets)
|
||||
endif ()
|
||||
|
||||
if (EXIV2_METADATA_SUPPORT)
|
||||
find_package(Exiv2)
|
||||
set_package_properties(Exiv2 PROPERTIES
|
||||
find_package(exiv2)
|
||||
set_package_properties(exiv2 PROPERTIES
|
||||
URL "https://www.exiv2.org"
|
||||
DESCRIPTION "image metadata support"
|
||||
TYPE OPTIONAL
|
||||
TYPE RECOMMENDED
|
||||
PURPOSE "Bring better image metadata support"
|
||||
)
|
||||
endif ()
|
||||
@ -66,6 +54,8 @@ set (PPIC_CPP_FILES
|
||||
app/metadatadialog.cpp
|
||||
app/exiv2wrapper.cpp
|
||||
app/playlistmanager.cpp
|
||||
app/shortcutedit.cpp
|
||||
app/fileopeneventhandler.cpp
|
||||
)
|
||||
|
||||
set (PPIC_HEADER_FILES
|
||||
@ -85,6 +75,8 @@ set (PPIC_HEADER_FILES
|
||||
app/metadatadialog.h
|
||||
app/exiv2wrapper.h
|
||||
app/playlistmanager.h
|
||||
app/shortcutedit.h
|
||||
app/fileopeneventhandler.h
|
||||
)
|
||||
|
||||
set (PPIC_QRC_FILES
|
||||
@ -105,40 +97,43 @@ if (WIN32)
|
||||
list(APPEND PPIC_RC_FILES assets/pineapple-pictures.rc)
|
||||
endif ()
|
||||
|
||||
add_executable (${EXE_NAME} WIN32
|
||||
add_executable (${EXE_NAME}
|
||||
${PPIC_HEADER_FILES}
|
||||
${PPIC_CPP_FILES}
|
||||
${PPIC_QRC_FILES}
|
||||
${PPIC_RC_FILES}
|
||||
)
|
||||
|
||||
if (${QT_VERSION_MAJOR} EQUAL "6")
|
||||
qt_add_translations(${EXE_NAME} TS_FILES ${PPIC_TS_FILES} QM_FILES_OUTPUT_VARIABLE PPIC_QM_FILES)
|
||||
set(ADD_TRANSLATIONS_ADDITIONAL_ARGS)
|
||||
|
||||
if (Qt6_VERSION VERSION_GREATER_EQUAL "6.9.0")
|
||||
set(ADD_TRANSLATIONS_ADDITIONAL_ARGS MERGE_QT_TRANSLATIONS)
|
||||
endif()
|
||||
|
||||
if (TRANSLATION_RESOURCE_EMBEDDING)
|
||||
qt_add_translations(${EXE_NAME} ${ADD_TRANSLATIONS_ADDITIONAL_ARGS} TS_FILES ${PPIC_TS_FILES})
|
||||
else()
|
||||
qt_create_translation(PPIC_QM_FILES ${PPIC_CPP_FILES_FOR_I18N} ${PPIC_TS_FILES})
|
||||
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)
|
||||
if (${QT_VERSION_MAJOR} EQUAL "6")
|
||||
target_link_libraries (${EXE_NAME} Qt::SvgWidgets)
|
||||
endif ()
|
||||
target_link_libraries (${EXE_NAME} Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::SvgWidgets)
|
||||
|
||||
if (Exiv2_FOUND)
|
||||
if (exiv2_FOUND)
|
||||
if(NOT TARGET Exiv2::exiv2lib AND TARGET exiv2lib)
|
||||
# for exiv2 0.27.x
|
||||
# for exiv2 0.27.x and (macOS?) conan build
|
||||
add_library(Exiv2::exiv2lib ALIAS exiv2lib)
|
||||
endif()
|
||||
target_link_libraries (${EXE_NAME}
|
||||
Exiv2::exiv2lib
|
||||
)
|
||||
target_compile_definitions(${EXE_NAME} PRIVATE
|
||||
HAVE_EXIV2_VERSION="${Exiv2_VERSION}"
|
||||
HAVE_EXIV2_VERSION="${exiv2_VERSION}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (TARGET Qt5::DBus OR TARGET Qt6::DBus)
|
||||
if (TARGET Qt6::DBus)
|
||||
target_link_libraries (${EXE_NAME}
|
||||
Qt${QT_VERSION_MAJOR}::DBus
|
||||
)
|
||||
@ -199,8 +194,24 @@ endif ()
|
||||
|
||||
# Install settings
|
||||
if (WIN32)
|
||||
# TODO: try to avoid install to a "bin" subfolder under windows...
|
||||
# when fixed, don't forget to update the CI config file...
|
||||
set_target_properties(${EXE_NAME} PROPERTIES
|
||||
WIN32_EXECUTABLE TRUE
|
||||
)
|
||||
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)
|
||||
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX /usr)
|
||||
@ -227,6 +238,7 @@ elseif (UNIX)
|
||||
endif()
|
||||
|
||||
set (INSTALL_TARGETS_DEFAULT_ARGS
|
||||
BUNDLE DESTINATION .
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Devel
|
||||
@ -237,19 +249,25 @@ install (
|
||||
${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")
|
||||
else ()
|
||||
else()
|
||||
set (QM_FILE_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/pineapple-pictures/translations")
|
||||
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)
|
||||
install(
|
||||
FILES ${PPIC_QM_FILES}
|
||||
DESTINATION ${QM_FILE_INSTALL_DIR}
|
||||
)
|
||||
)
|
||||
endif()
|
||||
|
||||
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
||||
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 BLumia
|
||||
Copyright (c) 2025 BLumia
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
70
NEWS
70
NEWS
@ -1,3 +1,71 @@
|
||||
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
|
||||
@ -74,7 +142,7 @@ Version 0.7.1
|
||||
Released: 2023-07-08
|
||||
|
||||
Features:
|
||||
* TIF and TIFF format files in the same folder will now be automatedly added to the gallery
|
||||
* 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:
|
||||
|
28
README.md
28
README.md
@ -2,7 +2,7 @@ Yet another image viewer.
|
||||
|
||||
|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)|
|
||||
|Ubuntu Build|[](https://github.com/BLumia/pineapple-pictures/actions/workflows/ubuntu.yml)|
|
||||
|
||||
@ -21,7 +21,7 @@ Pineapple Pictures is a lightweight image viewer that allows you view JPEG, PNG,
|
||||
- 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)
|
||||
|
||||
### Maintained by contributors / curtain distro's package maintainers
|
||||
### Maintained by contributors / certain distro's package maintainers
|
||||
|
||||
- Debian (since bullseye) or Ubuntu (since 21.04): `sudo apt install pineapple-pictures`
|
||||
- Nix / NixOS: [pineapple-pictures](https://search.nixos.org/packages?channel=unstable&show=pineapple-pictures&from=0&size=50&sort=relevance&type=packages&query=pineapple-pictures) (maintained by @wineee)
|
||||
@ -54,31 +54,11 @@ The project will try to build with `exiv2` when it's available at build time, if
|
||||
|
||||
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.
|
||||
|
||||
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).
|
||||
|
||||
> [!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.
|
||||
|
||||
### Linux
|
||||
|
||||
Just normal build process as other program will be fine. Nothing special ;)
|
||||
|
||||
For Archlinux there are also a [PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=pineapple-pictures-git) you can use.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
### 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.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
|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)|
|
||||
|Ubuntu Build|[](https://github.com/BLumia/pineapple-pictures/actions/workflows/ubuntu.yml)|
|
||||
|
||||
@ -55,31 +55,11 @@ $ cmake --build . # 如果你使用 Makefile 作为 CMake 生成器,也可以
|
||||
|
||||
此应用的图片格式支持依赖于 Qt 的 imageformats 插件,直接从您所用的发行版获取对应的图像格式插件即可。对于 Windows 用户,您可能需要手动构建和使用图像格式插件。下方给出了进一步的说明。
|
||||
|
||||
在 Windows、Linux 以及 macOS 系统均可构建此应用,其它有移植 Qt 支持的平台也可能可以进行构建。若要了解一些平台相关的构建指引,请参阅[相关的 Wiki 页面](https://github.com/BLumia/pineapple-pictures/wiki/Platform-Specific-Build-Instructions)。
|
||||
|
||||
> [!NOTE]
|
||||
> 尽管存在一个可用于 QMake 构建的 `pineapple-pictures.pro` 文件,但其仅供简单测试所用且其并不包含 `exiv2` 支持。使用 QMake 构建此项目是 **不受支持** 的,请尽可能考虑使用 CMake。
|
||||
|
||||
### Linux
|
||||
|
||||
常规的构建步骤即可完成构建,不需要额外的处理步骤 ;)
|
||||
|
||||
对于 Archlinux 发行版的用户,这里还有一个 [PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=pineapple-pictures-git) 可供使用和参考。
|
||||
|
||||
对于在基于 debian 的发行版中进行打包的需求, `CMakeLists.txt` 已经提供了一些基本的 cpack 配置以便生成一个有效的 `.deb` 软件包。在构建步骤完毕后,使用 `cpack -G DEB` 即可生成 DEB 软件包。您也可以参考 `.github/workflows/ubuntu.yml` 来查看当前正在使用的 CI 配置是如何进行打包的。
|
||||
|
||||
目前,`DEB` 是当前唯一受到直接支持的 cpack 生成目标。若希望为此项目添加其它的 cpack 目标支持,欢迎发起合并请求。
|
||||
|
||||
### Windows
|
||||
|
||||
上述的构建步骤在 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 = [".gitignore", "appveyor.yml", ".github/**"]
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "None"
|
||||
SPDX-License-Identifier = "CC0-1.0"
|
||||
|
||||
[[annotations]]
|
||||
path = ["README**.md", "NEWS", "assets/**.rc", "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"
|
@ -14,6 +14,8 @@
|
||||
#include <QPushButton>
|
||||
#include <QFile>
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
AboutDialog::AboutDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, m_tabWidget(new QTabWidget)
|
||||
@ -27,60 +29,60 @@ AboutDialog::AboutDialog(QWidget *parent)
|
||||
this->setWindowTitle(tr("About"));
|
||||
|
||||
const QStringList helpStr {
|
||||
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.")),
|
||||
QStringLiteral("<p>%1</p>").arg(tr("None of the operations in this application will alter the pictures on disk.")),
|
||||
QStringLiteral("<p>%1</p>").arg(tr("Context menu option explanation:")),
|
||||
QStringLiteral("<ul>"),
|
||||
u"<p>%1</p>"_s.arg(tr("Launch application with image file path as argument to load the file.")),
|
||||
u"<p>%1</p>"_s.arg(tr("Drag and drop image file onto the window is also supported.")),
|
||||
u"<p>%1</p>"_s.arg(tr("None of the operations in this application will alter the pictures on disk.")),
|
||||
u"<p>%1</p>"_s.arg(tr("Context menu option explanation:")),
|
||||
u"<ul>"_s,
|
||||
// blumia: Chain two arg() here since it seems lupdate will remove one of them if we use
|
||||
// the old `arg(QCoreApp::translate(), tr())` way, but it's worth to mention
|
||||
// `arg(QCoreApp::translate(), this->tr())` works, but lupdate will complain about the usage.
|
||||
QStringLiteral("<li><b>%1</b>:<br/>%2</li>")
|
||||
u"<li><b>%1</b>:<br/>%2</li>"_s
|
||||
.arg(QCoreApplication::translate("MainWindow", "Stay on top"))
|
||||
.arg(tr("Make window stay on top of all other windows.")),
|
||||
QStringLiteral("<li><b>%1</b>:<br/>%2</li>")
|
||||
u"<li><b>%1</b>:<br/>%2</li>"_s
|
||||
.arg(QCoreApplication::translate("MainWindow", "Protected mode"))
|
||||
.arg(tr("Avoid close window accidentally. (eg. by double clicking the window)")),
|
||||
QStringLiteral("<li><b>%1</b>:<br/>%2</li>")
|
||||
u"<li><b>%1</b>:<br/>%2</li>"_s
|
||||
.arg(QCoreApplication::translate("MainWindow", "Keep transformation", "The 'transformation' means the flip/rotation status that currently applied to the image view"))
|
||||
.arg(tr("Avoid resetting the zoom/rotation/flip state that was applied to the image view when switching between images.")),
|
||||
QStringLiteral("</ul>")
|
||||
u"</ul>"_s
|
||||
};
|
||||
|
||||
const QStringList aboutStr {
|
||||
QStringLiteral("<center><img width='128' height='128' src=':/icons/app-icon.svg'/><br/>"),
|
||||
u"<center><img width='128' height='128' src=':/icons/app-icon.svg'/><br/>"_s,
|
||||
qApp->applicationDisplayName(),
|
||||
(QStringLiteral("<br/>") + tr("Version: %1").arg(
|
||||
(u"<br/>"_s + tr("Version: %1").arg(
|
||||
#ifdef GIT_DESCRIBE_VERSION_STRING
|
||||
GIT_DESCRIBE_VERSION_STRING
|
||||
#else
|
||||
qApp->applicationVersion()
|
||||
#endif // GIT_DESCRIBE_VERSION_STRING
|
||||
)),
|
||||
QStringLiteral("<hr/>"),
|
||||
u"<hr/>"_s,
|
||||
tr("Copyright (c) %1 %2", "%1 is year, %2 is the name of copyright holder(s)")
|
||||
.arg(QStringLiteral("2024"), QStringLiteral("<a href='https://github.com/BLumia'>@BLumia</a>")),
|
||||
QStringLiteral("<br/>"),
|
||||
tr("Logo designed by %1").arg(QStringLiteral("<a href='https://github.com/Lovelyblack'>@Lovelyblack</a>")),
|
||||
QStringLiteral("<hr/>"),
|
||||
.arg(u"2025"_s, u"<a href='https://github.com/BLumia'>@BLumia</a>"_s),
|
||||
u"<br/>"_s,
|
||||
tr("Logo designed by %1").arg(u"<a href='https://github.com/Lovelyblack'>@Lovelyblack</a>"_s),
|
||||
u"<hr/>"_s,
|
||||
tr("Built with Qt %1 (%2)").arg(QT_VERSION_STR, QSysInfo::buildCpuArchitecture()),
|
||||
QStringLiteral("<br/><a href='%1'>%2</a>").arg("https://github.com/BLumia/pineapple-pictures", tr("Source code")),
|
||||
QStringLiteral("</center>")
|
||||
u"</center>"_s
|
||||
};
|
||||
|
||||
QFile translaterHtml(":/plain/translators.html");
|
||||
QFile translaterHtml(u":/plain/translators.html"_s);
|
||||
bool canOpenFile = translaterHtml.open(QIODevice::ReadOnly);
|
||||
const QByteArray & translatorList = canOpenFile ? translaterHtml.readAll() : QByteArrayLiteral("");
|
||||
|
||||
const QStringList specialThanksStr {
|
||||
QStringLiteral("<h1 align='center'>%1</h1><a href='%2'>%3</a><p>%4</p>").arg(
|
||||
u"<h1 align='center'>%1</h1><a href='%2'>%3</a><p>%4</p>"_s.arg(
|
||||
tr("Contributors"),
|
||||
QStringLiteral("https://github.com/BLumia/pineapple-pictures/graphs/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.")
|
||||
),
|
||||
|
||||
QStringLiteral("<h1 align='center'>%1</h1><p>%2</p>%3").arg(
|
||||
u"<h1 align='center'>%1</h1><p>%2</p>%3"_s.arg(
|
||||
tr("Translators"),
|
||||
tr("I would like to thank the following people who volunteered to translate this application."),
|
||||
translatorList
|
||||
@ -88,22 +90,22 @@ AboutDialog::AboutDialog(QWidget *parent)
|
||||
};
|
||||
|
||||
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'><b>%1</b></h1>"_s.arg(tr("Your Rights")),
|
||||
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
|
||||
tr("You are free to use %1, for any purpose"), // %3
|
||||
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>")),
|
||||
QStringLiteral("<p>%1</p>").arg(tr("The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.")),
|
||||
QStringLiteral("<hr/><pre>%2</pre>")
|
||||
).arg(u"<i>%1</i>"_s),
|
||||
u"<p>%1</p>"_s.arg(tr("The MIT license guarantees you this freedom. Nobody is ever permitted to take it away.")),
|
||||
u"<hr/><pre>%2</pre>"_s
|
||||
};
|
||||
|
||||
const QString mitLicense(QStringLiteral(R"(Expat/MIT License
|
||||
|
||||
Copyright (c) 2024 BLumia
|
||||
Copyright (c) 2025 BLumia
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@ -125,14 +127,14 @@ SOFTWARE.
|
||||
)"));
|
||||
|
||||
const QStringList thirdPartyLibsStr {
|
||||
QStringLiteral("<h1 align='center'><b>%1</b></h1>").arg(tr("Third-party Libraries used by %1")),
|
||||
u"<h1 align='center'><b>%1</b></h1>"_s.arg(tr("Third-party Libraries used by %1")),
|
||||
tr("%1 is built on the following free software libraries:", "Free as in freedom"),
|
||||
QStringLiteral("<ul>"),
|
||||
u"<ul>"_s,
|
||||
#ifdef HAVE_EXIV2_VERSION
|
||||
QStringLiteral("<li><a href='%1'>%2</a>: %3</li>").arg("https://www.exiv2.org/", "Exiv2", "GPLv2"),
|
||||
u"<li><a href='%1'>%2</a>: %3</li>"_s.arg("https://www.exiv2.org/", "Exiv2", "GPLv2"),
|
||||
#endif // EXIV2_VERSION
|
||||
QStringLiteral("<li><a href='%1'>%2</a>: %3</li>").arg("https://www.qt.io/", "Qt", "GPLv2 + GPLv3 + LGPLv2.1 + LGPLv3"),
|
||||
QStringLiteral("</ul>")
|
||||
u"<li><a href='%1'>%2</a>: %3</li>"_s.arg("https://www.qt.io/", "Qt", "GPLv2 + GPLv3 + LGPLv2.1 + LGPLv3"),
|
||||
u"</ul>"_s
|
||||
};
|
||||
|
||||
m_helpTextEdit->setText(helpStr.join('\n'));
|
||||
@ -145,7 +147,7 @@ SOFTWARE.
|
||||
|
||||
m_licenseTextEdit->setText(licenseStr.join('\n').arg(qApp->applicationDisplayName(), mitLicense));
|
||||
|
||||
m_3rdPartyLibsTextEdit->setText(thirdPartyLibsStr.join('\n').arg(QStringLiteral("<i>%1</i>").arg(qApp->applicationDisplayName())));
|
||||
m_3rdPartyLibsTextEdit->setText(thirdPartyLibsStr.join('\n').arg(u"<i>%1</i>"_s).arg(qApp->applicationDisplayName()));
|
||||
m_3rdPartyLibsTextEdit->setOpenExternalLinks(true);
|
||||
|
||||
m_tabWidget->addTab(m_helpTextEdit, tr("&Help"));
|
||||
|
@ -16,16 +16,6 @@
|
||||
#define ACTION_NAME(s) QStringLiteral(STRIFY(s))
|
||||
#define STRIFY(s) #s
|
||||
|
||||
ActionManager::ActionManager()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ActionManager::~ActionManager()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QIcon ActionManager::loadHidpiIcon(const QString &resp, QSize sz)
|
||||
{
|
||||
QSvgRenderer r(resp);
|
||||
@ -61,6 +51,9 @@ void ActionManager::setupAction(MainWindow *mainWindow)
|
||||
CREATE_NEW_ACTION(mainWindow, actionPrevPicture);
|
||||
CREATE_NEW_ACTION(mainWindow, actionNextPicture);
|
||||
|
||||
CREATE_NEW_ACTION(mainWindow, actionTogglePauseAnimation);
|
||||
CREATE_NEW_ACTION(mainWindow, actionAnimationNextFrame);
|
||||
|
||||
CREATE_NEW_THEMEICON_ACTION(mainWindow, actionOpen, document-open);
|
||||
CREATE_NEW_ACTION(mainWindow, actionHorizontalFlip);
|
||||
CREATE_NEW_ACTION(mainWindow, actionFitInView);
|
||||
@ -102,6 +95,9 @@ void ActionManager::retranslateUi(MainWindow *mainWindow)
|
||||
actionPrevPicture->setText(QCoreApplication::translate("MainWindow", "Previous image", nullptr));
|
||||
actionNextPicture->setText(QCoreApplication::translate("MainWindow", "Next image", nullptr));
|
||||
|
||||
actionTogglePauseAnimation->setText(QCoreApplication::translate("MainWindow", "Pause/Resume Animation", nullptr));
|
||||
actionAnimationNextFrame->setText(QCoreApplication::translate("MainWindow", "Animation Go to Next Frame", nullptr));
|
||||
|
||||
actionHorizontalFlip->setText(QCoreApplication::translate("MainWindow", "Flip &Horizontally", nullptr));
|
||||
actionFitInView->setText(QCoreApplication::translate("MainWindow", "Fit to view", nullptr));
|
||||
actionFitByWidth->setText(QCoreApplication::translate("MainWindow", "Fit to width", nullptr));
|
||||
@ -130,10 +126,10 @@ void ActionManager::retranslateUi(MainWindow *mainWindow)
|
||||
|
||||
void ActionManager::setupShortcuts()
|
||||
{
|
||||
actionOpen->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_O));
|
||||
actionOpen->setShortcut(QKeySequence::Open);
|
||||
actionActualSize->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0));
|
||||
actionZoomIn->setShortcut(QKeySequence(QKeySequence::ZoomIn));
|
||||
actionZoomOut->setShortcut(QKeySequence(QKeySequence::ZoomOut));
|
||||
actionZoomIn->setShortcut(QKeySequence::ZoomIn);
|
||||
actionZoomOut->setShortcut(QKeySequence::ZoomOut);
|
||||
actionPrevPicture->setShortcuts({
|
||||
QKeySequence(Qt::Key_PageUp),
|
||||
QKeySequence(Qt::Key_Left),
|
||||
@ -143,7 +139,7 @@ void ActionManager::setupShortcuts()
|
||||
QKeySequence(Qt::Key_Right),
|
||||
});
|
||||
actionHorizontalFlip->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_R));
|
||||
actionCopyPixmap->setShortcut(QKeySequence(QKeySequence::Copy));
|
||||
actionCopyPixmap->setShortcut(QKeySequence::Copy);
|
||||
actionPaste->setShortcut(QKeySequence::Paste);
|
||||
actionTrash->setShortcut(QKeySequence::Delete);
|
||||
actionHelp->setShortcut(QKeySequence::HelpContents);
|
||||
|
@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
@ -12,8 +12,8 @@ class MainWindow;
|
||||
class ActionManager
|
||||
{
|
||||
public:
|
||||
ActionManager();
|
||||
~ActionManager();
|
||||
explicit ActionManager() = default;
|
||||
~ActionManager() = default;
|
||||
|
||||
void setupAction(MainWindow * mainWindow);
|
||||
void retranslateUi(MainWindow *MainWindow);
|
||||
@ -35,6 +35,9 @@ public:
|
||||
QAction *actionPrevPicture;
|
||||
QAction *actionNextPicture;
|
||||
|
||||
QAction *actionTogglePauseAnimation;
|
||||
QAction *actionAnimationNextFrame;
|
||||
|
||||
QAction *actionHorizontalFlip;
|
||||
QAction *actionFitInView;
|
||||
QAction *actionFitByWidth;
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
#include "opacityhelper.h"
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include <QToolButton>
|
||||
#include <QVBoxLayout>
|
||||
#include <QDebug>
|
||||
|
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);
|
||||
};
|
@ -17,14 +17,7 @@ FramelessWindow::FramelessWindow(QWidget *parent)
|
||||
, m_oldCursorShape(Qt::ArrowCursor)
|
||||
, m_oldEdges()
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinMaxButtonsHint);
|
||||
#else
|
||||
// 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.
|
||||
// The bug seems no longer exists in Qt 6 (I only tested it under Qt 6.3.0).
|
||||
this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);
|
||||
#endif // QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
this->setMouseTracking(true);
|
||||
this->setAttribute(Qt::WA_Hover, true);
|
||||
this->installEventFilter(this);
|
||||
@ -97,11 +90,7 @@ bool FramelessWindow::mousePress(QMouseEvent* event)
|
||||
{
|
||||
if (event->buttons() & Qt::LeftButton && !isMaximized() && !isFullScreen()) {
|
||||
QWindow* win = window()->windowHandle();
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
Qt::Edges edges = this->getEdgesByPos(event->globalPosition().toPoint(), win->frameGeometry());
|
||||
#else
|
||||
Qt::Edges edges = this->getEdgesByPos(event->globalPos(), win->frameGeometry());
|
||||
#endif // QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
if (edges) {
|
||||
win->startSystemResize(edges);
|
||||
return true;
|
||||
|
@ -21,6 +21,9 @@ public:
|
||||
: QGraphicsPixmapItem(pixmap, parent)
|
||||
{}
|
||||
|
||||
enum { Type = UserType + 1 };
|
||||
int type() const override { return Type; }
|
||||
|
||||
void setScaleHint(float scaleHint) {
|
||||
m_scaleHint = scaleHint;
|
||||
}
|
||||
@ -61,6 +64,9 @@ 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);
|
||||
@ -80,6 +86,10 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
inline QMovie * movie() const {
|
||||
return m_movie.data();
|
||||
}
|
||||
|
||||
private:
|
||||
QScopedPointer<QMovie> m_movie;
|
||||
};
|
||||
@ -121,8 +131,8 @@ void GraphicsScene::showSvg(const QString &filepath)
|
||||
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
|
||||
// Anyway let's disable it for now.
|
||||
// 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);
|
||||
@ -158,6 +168,29 @@ bool GraphicsScene::trySetTransformationMode(Qt::TransformationMode mode, float
|
||||
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()
|
||||
{
|
||||
PGraphicsPixmapItem * pixmapItem = qgraphicsitem_cast<PGraphicsPixmapItem *>(m_theThing);
|
||||
|
@ -21,10 +21,13 @@ public:
|
||||
|
||||
bool trySetTransformationMode(Qt::TransformationMode mode, float scaleHint);
|
||||
|
||||
bool togglePauseAnimation();
|
||||
bool skipAnimationFrame(int delta = 1);
|
||||
|
||||
QPixmap renderToPixmap();
|
||||
|
||||
private:
|
||||
QGraphicsItem * m_theThing;
|
||||
QGraphicsItem * m_theThing = nullptr;
|
||||
};
|
||||
|
||||
#endif // GRAPHICSSCENE_H
|
||||
|
@ -41,9 +41,7 @@ void GraphicsView::showFileFromPath(const QString &filePath)
|
||||
QImageReader imageReader(filePath);
|
||||
imageReader.setAutoTransform(true);
|
||||
imageReader.setDecideFormatFromContent(true);
|
||||
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
|
||||
imageReader.setAllocationLimit(0);
|
||||
#endif //QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
|
||||
|
||||
// Since if the image format / plugin does not support this feature, imageFormat() will returns an invalid format.
|
||||
// So we cannot use imageFormat() and check if it returns QImage::Format_Invalid to detect if we support the file.
|
||||
@ -118,7 +116,7 @@ qreal GraphicsView::scaleFactor() const
|
||||
|
||||
void GraphicsView::resetTransform()
|
||||
{
|
||||
if (!m_avoidResetTransform) {
|
||||
if (!shouldAvoidTransform()) {
|
||||
QGraphicsView::resetTransform();
|
||||
}
|
||||
}
|
||||
@ -196,7 +194,7 @@ void GraphicsView::fitByOrientation(Qt::Orientation ori, bool scaleDownOnly)
|
||||
|
||||
void GraphicsView::displayScene()
|
||||
{
|
||||
if (m_avoidResetTransform) {
|
||||
if (shouldAvoidTransform()) {
|
||||
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
|
||||
return;
|
||||
}
|
||||
@ -206,6 +204,7 @@ void GraphicsView::displayScene()
|
||||
}
|
||||
|
||||
m_enableFitInView = true;
|
||||
m_firstUserMediaLoaded = true;
|
||||
}
|
||||
|
||||
bool GraphicsView::isSceneBiggerThanView() const
|
||||
@ -365,3 +364,8 @@ void GraphicsView::applyTransformationModeByScaleFactor()
|
||||
scene()->trySetTransformationMode(Qt::FastTransformation, this->scaleFactor());
|
||||
}
|
||||
}
|
||||
|
||||
bool GraphicsView::shouldAvoidTransform() const
|
||||
{
|
||||
return m_firstUserMediaLoaded && m_avoidResetTransform;
|
||||
}
|
||||
|
@ -64,6 +64,8 @@ private:
|
||||
void setCheckerboardEnabled(bool enabled, bool invertColor = false);
|
||||
void applyTransformationModeByScaleFactor();
|
||||
|
||||
inline bool shouldAvoidTransform() const;
|
||||
|
||||
// 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.
|
||||
@ -71,6 +73,7 @@ private:
|
||||
bool m_avoidResetTransform = false;
|
||||
bool m_checkerboardEnabled = false;
|
||||
bool m_useLightCheckerboard = false;
|
||||
bool m_firstUserMediaLoaded = false;
|
||||
};
|
||||
|
||||
#endif // GRAPHICSVIEW_H
|
||||
|
47
app/main.cpp
47
app/main.cpp
@ -7,43 +7,42 @@
|
||||
#include "playlistmanager.h"
|
||||
#include "settings.h"
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
#include "fileopeneventhandler.h"
|
||||
#endif // Q_OS_MACOS
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
#include <QDir>
|
||||
#include <QTranslator>
|
||||
#include <QUrl>
|
||||
|
||||
// QM_FILE_INSTALL_DIR should be defined from the CMakeLists file.
|
||||
#ifndef QM_FILE_INSTALL_DIR
|
||||
#define QM_FILE_INSTALL_DIR ":/i18n/"
|
||||
#endif // QM_FILE_INSTALL_DIR
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setApplicationName("Pineapple Pictures");
|
||||
QCoreApplication::setApplicationName(u"Pineapple Pictures"_s);
|
||||
QCoreApplication::setApplicationVersion(PPIC_VERSION_STRING);
|
||||
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Settings::instance()->hiDpiScaleFactorBehavior());
|
||||
|
||||
QApplication a(argc, argv);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
a.setAttribute(Qt::ApplicationAttribute::AA_UseHighDpiPixmaps);
|
||||
#endif
|
||||
|
||||
QTranslator translator;
|
||||
QString qmDir;
|
||||
#ifdef _WIN32
|
||||
qmDir = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath("translations");
|
||||
#if defined(TRANSLATION_RESOURCE_EMBEDDING)
|
||||
const QString qmDir = u":/i18n/"_s;
|
||||
#elif defined(QM_FILE_INSTALL_ABSOLUTE_DIR)
|
||||
const QString qmDir = QT_STRINGIFY(QM_FILE_INSTALL_ABSOLUTE_DIR);
|
||||
#else
|
||||
qmDir = QT_STRINGIFY(QM_FILE_INSTALL_DIR);
|
||||
const QString qmDir = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath("translations");
|
||||
#endif
|
||||
if (translator.load(QLocale(), QLatin1String("PineapplePictures"), QLatin1String("_"), qmDir)) {
|
||||
if (translator.load(QLocale(), u"PineapplePictures"_s, u"_"_s, qmDir)) {
|
||||
QCoreApplication::installTranslator(&translator);
|
||||
}
|
||||
|
||||
QGuiApplication::setApplicationDisplayName(QCoreApplication::translate("main", "Pineapple Pictures"));
|
||||
|
||||
// commandline options
|
||||
QCommandLineOption supportedImageFormats(QStringLiteral("supported-image-formats"), QCoreApplication::translate("main", "List supported image format suffixes, and quit program."));
|
||||
QCommandLineOption supportedImageFormats(u"supported-image-formats"_s, QCoreApplication::translate("main", "List supported image format suffixes, and quit program."));
|
||||
// parse commandline arguments
|
||||
QCommandLineParser parser;
|
||||
parser.addOption(supportedImageFormats);
|
||||
@ -52,13 +51,33 @@ int main(int argc, char *argv[])
|
||||
parser.process(a);
|
||||
|
||||
if (parser.isSet(supportedImageFormats)) {
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
|
||||
fputs(qPrintable(MainWindow::supportedImageFormats().join(QChar('\n'))), stdout);
|
||||
::exit(EXIT_SUCCESS);
|
||||
#else
|
||||
QCommandLineParser::showMessageAndExit(QCommandLineParser::MessageType::Information,
|
||||
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();
|
||||
});
|
||||
#endif // Q_OS_MACOS
|
||||
|
||||
QStringList urlStrList = parser.positionalArguments();
|
||||
QList<QUrl> && urlList = PlaylistManager::convertToUrlList(urlStrList);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
#include <QFile>
|
||||
#include <QTimer>
|
||||
#include <QFileDialog>
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QStandardPaths>
|
||||
#include <QStringBuilder>
|
||||
#include <QProcess>
|
||||
@ -43,10 +44,13 @@
|
||||
#include <QDBusConnectionInterface>
|
||||
#endif // HAVE_QTDBUS
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: FramelessWindow(parent)
|
||||
, m_am(new ActionManager)
|
||||
, m_pm(new PlaylistManager(this))
|
||||
, m_fileSystemWatcher(new QFileSystemWatcher(this))
|
||||
{
|
||||
if (Settings::instance()->stayOnTop()) {
|
||||
this->setWindowFlag(Qt::WindowStaysOnTopHint);
|
||||
@ -54,24 +58,24 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
|
||||
this->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
this->setMinimumSize(350, 330);
|
||||
this->setWindowIcon(QIcon(":/icons/app-icon.svg"));
|
||||
this->setWindowIcon(QIcon(u":/icons/app-icon.svg"_s));
|
||||
this->setMouseTracking(true);
|
||||
this->setAcceptDrops(true);
|
||||
|
||||
m_pm->setAutoLoadFilterSuffixes(supportedImageFormats());
|
||||
|
||||
m_fadeOutAnimation = new QPropertyAnimation(this, "windowOpacity");
|
||||
m_fadeOutAnimation = new QPropertyAnimation(this, "windowOpacity"_ba);
|
||||
m_fadeOutAnimation->setDuration(300);
|
||||
m_fadeOutAnimation->setStartValue(1);
|
||||
m_fadeOutAnimation->setEndValue(0);
|
||||
m_floatUpAnimation = new QPropertyAnimation(this, "geometry");
|
||||
m_floatUpAnimation = new QPropertyAnimation(this, "geometry"_ba);
|
||||
m_floatUpAnimation->setDuration(300);
|
||||
m_floatUpAnimation->setEasingCurve(QEasingCurve::OutCirc);
|
||||
m_exitAnimationGroup = new QParallelAnimationGroup(this);
|
||||
m_exitAnimationGroup->addAnimation(m_fadeOutAnimation);
|
||||
m_exitAnimationGroup->addAnimation(m_floatUpAnimation);
|
||||
connect(m_exitAnimationGroup, &QParallelAnimationGroup::finished,
|
||||
this, &QWidget::close);
|
||||
this, &MainWindow::doCloseWindow);
|
||||
|
||||
GraphicsScene * scene = new GraphicsScene(this);
|
||||
|
||||
@ -86,7 +90,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
m_gv->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio);
|
||||
|
||||
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->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio);
|
||||
m_gv->setVisible(required);
|
||||
@ -135,14 +139,15 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
m_gv->setOpacity(0, false);
|
||||
m_closeButton->setOpacity(0, false);
|
||||
|
||||
connect(m_pm, &PlaylistManager::totalCountChanged, this, [this](int galleryFileCount) {
|
||||
m_prevButton->setVisible(galleryFileCount > 1);
|
||||
m_nextButton->setVisible(galleryFileCount > 1);
|
||||
});
|
||||
connect(m_pm, &PlaylistManager::totalCountChanged, this, &MainWindow::updateGalleryButtonsVisibility);
|
||||
|
||||
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);
|
||||
connect(fullscreenShorucut, &QShortcut::activated,
|
||||
this, &MainWindow::toggleFullscreen);
|
||||
@ -151,6 +156,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
|
||||
QTimer::singleShot(0, this, [this](){
|
||||
m_am->setupShortcuts();
|
||||
Settings::instance()->applyUserShortcuts(this);
|
||||
});
|
||||
|
||||
// allow some mouse events can go through these widgets for resizing window.
|
||||
@ -169,7 +175,16 @@ MainWindow::~MainWindow()
|
||||
void MainWindow::showUrls(const QList<QUrl> &urls)
|
||||
{
|
||||
if (!urls.isEmpty()) {
|
||||
m_graphicsView->showFileFromPath(urls.first().toLocalFile());
|
||||
const QUrl & firstUrl = urls.first();
|
||||
if (urls.count() == 1) {
|
||||
const QString lowerCaseUrlPath(firstUrl.path().toLower());
|
||||
if (lowerCaseUrlPath.endsWith(".m3u8") || lowerCaseUrlPath.endsWith(".m3u")) {
|
||||
m_pm->loadM3U8Playlist(firstUrl);
|
||||
galleryCurrent(true, true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_graphicsView->showFileFromPath(firstUrl.toLocalFile());
|
||||
m_pm->loadPlaylist(urls);
|
||||
} else {
|
||||
m_graphicsView->showText(tr("File url list is empty"));
|
||||
@ -188,6 +203,9 @@ void MainWindow::initWindowSize()
|
||||
case Settings::WindowSizeBehavior::Maximized:
|
||||
showMaximized();
|
||||
break;
|
||||
case Settings::WindowSizeBehavior::Windowed:
|
||||
showNormal();
|
||||
break;
|
||||
default:
|
||||
adjustWindowSizeBySceneRect();
|
||||
break;
|
||||
@ -257,12 +275,19 @@ void MainWindow::galleryNext()
|
||||
void MainWindow::galleryCurrent(bool showLoadImageHintWhenEmpty, bool reloadImage)
|
||||
{
|
||||
QModelIndex index = m_pm->curIndex();
|
||||
bool shouldResetfileWatcher = true;
|
||||
if (index.isValid()) {
|
||||
if (reloadImage) m_graphicsView->showFileFromPath(m_pm->localFileByIndex(index));
|
||||
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()
|
||||
@ -285,7 +310,7 @@ void MainWindow::showEvent(QShowEvent *event)
|
||||
return FramelessWindow::showEvent(event);
|
||||
}
|
||||
|
||||
void MainWindow::enterEvent(QT_ENTER_EVENT *event)
|
||||
void MainWindow::enterEvent(QEnterEvent *event)
|
||||
{
|
||||
m_bottomButtonGroup->setOpacity(1);
|
||||
m_gv->setOpacity(1);
|
||||
@ -326,11 +351,7 @@ void MainWindow::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
if (event->buttons() & Qt::LeftButton && m_clickedOnWindow && !isMaximized() && !isFullScreen()) {
|
||||
if (!window()->windowHandle()->startSystemMove()) {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
move(event->globalPosition().toPoint() - m_oldMousePos);
|
||||
#else
|
||||
move(event->globalPos() - m_oldMousePos);
|
||||
#endif // QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
}
|
||||
event->accept();
|
||||
}
|
||||
@ -371,6 +392,10 @@ void MainWindow::mouseDoubleClickEvent(QMouseEvent *event)
|
||||
toggleMaximize();
|
||||
event->accept();
|
||||
break;
|
||||
case Settings::DoubleClickBehavior::FullScreen:
|
||||
toggleFullscreen();
|
||||
event->accept();
|
||||
break;
|
||||
case Settings::DoubleClickBehavior::Ignore:
|
||||
break;
|
||||
}
|
||||
@ -428,13 +453,11 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event)
|
||||
QMenu * menu = new QMenu;
|
||||
QMenu * copyMenu = new QMenu(tr("&Copy"));
|
||||
QUrl currentFileUrl = currentImageFileUrl();
|
||||
QImage clipboardImage;
|
||||
QUrl clipboardFileUrl;
|
||||
|
||||
QAction * copyPixmap = m_am->actionCopyPixmap;
|
||||
QAction * copyFilePath = m_am->actionCopyFilePath;
|
||||
|
||||
copyMenu->setIcon(QIcon::fromTheme(QLatin1String("edit-copy")));
|
||||
copyMenu->setIcon(QIcon::fromTheme(u"edit-copy"_s));
|
||||
copyMenu->addAction(copyPixmap);
|
||||
if (currentFileUrl.isValid()) {
|
||||
copyMenu->addAction(copyFilePath);
|
||||
@ -554,19 +577,23 @@ void MainWindow::centerWindow()
|
||||
Qt::LeftToRight,
|
||||
Qt::AlignCenter,
|
||||
this->size(),
|
||||
qApp->screenAt(QCursor::pos())->geometry()
|
||||
qApp->screenAt(QCursor::pos())->availableGeometry()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
void MainWindow::closeWindow()
|
||||
{
|
||||
if (Settings::instance()->useBuiltInCloseAnimation()) {
|
||||
QRect windowRect(this->geometry());
|
||||
m_floatUpAnimation->setStartValue(windowRect);
|
||||
m_floatUpAnimation->setEndValue(windowRect.adjusted(0, -80, 0, 0));
|
||||
m_floatUpAnimation->setStartValue(QRect(this->geometry().x(), this->geometry().y(), this->geometry().width(), this->geometry().height()));
|
||||
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()
|
||||
@ -584,8 +611,7 @@ void MainWindow::toggleProtectedMode()
|
||||
{
|
||||
m_protectedMode = !m_protectedMode;
|
||||
m_closeButton->setVisible(!m_protectedMode);
|
||||
m_prevButton->setVisible(!m_protectedMode);
|
||||
m_nextButton->setVisible(!m_protectedMode);
|
||||
updateGalleryButtonsVisibility();
|
||||
}
|
||||
|
||||
void MainWindow::toggleStayOnTop()
|
||||
@ -761,7 +787,7 @@ void MainWindow::on_actionTrash_triggered()
|
||||
if (result == QMessageBox::Yes) {
|
||||
bool succ = file.moveToTrash();
|
||||
if (!succ) {
|
||||
QMessageBox::warning(this, "Failed to move file to trash",
|
||||
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);
|
||||
@ -800,6 +826,16 @@ void MainWindow::on_actionNextPicture_triggered()
|
||||
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()
|
||||
{
|
||||
toggleStayOnTop();
|
||||
@ -862,9 +898,9 @@ void MainWindow::on_actionLocateInFileManager_triggered()
|
||||
QDesktopServices::openUrl(folderUrl);
|
||||
return;
|
||||
}
|
||||
QDBusInterface fm1Iface(QStringLiteral("org.freedesktop.FileManager1"),
|
||||
QStringLiteral("/org/freedesktop/FileManager1"),
|
||||
QStringLiteral("org.freedesktop.FileManager1"));
|
||||
QDBusInterface fm1Iface(u"org.freedesktop.FileManager1"_s,
|
||||
u"/org/freedesktop/FileManager1"_s,
|
||||
u"org.freedesktop.FileManager1"_s);
|
||||
fm1Iface.setTimeout(1000);
|
||||
fm1Iface.callWithArgumentList(QDBus::Block, "ShowItems", {
|
||||
QStringList{currentFileUrl.toString()},
|
||||
@ -882,3 +918,29 @@ void MainWindow::on_actionQuitApp_triggered()
|
||||
{
|
||||
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());
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
|
||||
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
@ -11,15 +11,10 @@
|
||||
#include <QPropertyAnimation>
|
||||
#include <QPushButton>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
typedef QEnterEvent QT_ENTER_EVENT;
|
||||
#else
|
||||
typedef QEvent QT_ENTER_EVENT;
|
||||
#endif // QT_VERSION_CHECK(6, 0, 0)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QGraphicsOpacityEffect;
|
||||
class QGraphicsView;
|
||||
class QFileSystemWatcher;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class ActionManager;
|
||||
@ -50,7 +45,7 @@ public:
|
||||
|
||||
protected slots:
|
||||
void showEvent(QShowEvent *event) override;
|
||||
void enterEvent(QT_ENTER_EVENT *event) override;
|
||||
void enterEvent(QEnterEvent *event) override;
|
||||
void leaveEvent(QEvent *event) override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
@ -92,6 +87,9 @@ private slots:
|
||||
void on_actionPrevPicture_triggered();
|
||||
void on_actionNextPicture_triggered();
|
||||
|
||||
void on_actionTogglePauseAnimation_triggered();
|
||||
void on_actionAnimationNextFrame_triggered();
|
||||
|
||||
void on_actionHorizontalFlip_triggered();
|
||||
void on_actionFitInView_triggered();
|
||||
void on_actionFitByWidth_triggered();
|
||||
@ -108,6 +106,12 @@ private slots:
|
||||
void on_actionLocateInFileManager_triggered();
|
||||
void on_actionQuitApp_triggered();
|
||||
|
||||
void doCloseWindow();
|
||||
|
||||
private:
|
||||
bool updateFileWatcher(const QString & basePath = QString());
|
||||
void updateGalleryButtonsVisibility();
|
||||
|
||||
private:
|
||||
ActionManager *m_am;
|
||||
PlaylistManager *m_pm;
|
||||
@ -116,6 +120,7 @@ private:
|
||||
QPropertyAnimation *m_fadeOutAnimation;
|
||||
QPropertyAnimation *m_floatUpAnimation;
|
||||
QParallelAnimationGroup *m_exitAnimationGroup;
|
||||
QFileSystemWatcher *m_fileSystemWatcher;
|
||||
ToolButton *m_closeButton;
|
||||
ToolButton *m_prevButton;
|
||||
ToolButton *m_nextButton;
|
||||
|
@ -11,6 +11,8 @@
|
||||
#include <QFileInfo>
|
||||
#include <QImageReader>
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
MetadataModel::MetadataModel(QObject *parent)
|
||||
: QAbstractItemModel(parent)
|
||||
{
|
||||
@ -37,131 +39,131 @@ void MetadataModel::setFile(const QString &imageFilePath)
|
||||
const QString & imageDimensionsString = imageSize(imgReader.size());
|
||||
const QString & imageRatioString = imageSizeRatio(imgReader.size());
|
||||
|
||||
appendSection(QStringLiteral("Description"), tr("Description", "Section name."));
|
||||
appendSection(QStringLiteral("Origin"), tr("Origin", "Section name."));
|
||||
appendSection(QStringLiteral("Image"), tr("Image", "Section name."));
|
||||
appendSection(QStringLiteral("Camera"), tr("Camera", "Section name."));
|
||||
appendSection(QStringLiteral("AdvancedPhoto"), tr("Advanced photo", "Section name."));
|
||||
appendSection(QStringLiteral("GPS"), tr("GPS", "Section name."));
|
||||
appendSection(QStringLiteral("File"), tr("File", "Section name."));
|
||||
appendSection(u"Description"_s, tr("Description", "Section name."));
|
||||
appendSection(u"Origin"_s, tr("Origin", "Section name."));
|
||||
appendSection(u"Image"_s, tr("Image", "Section name."));
|
||||
appendSection(u"Camera"_s, tr("Camera", "Section name."));
|
||||
appendSection(u"AdvancedPhoto"_s, tr("Advanced photo", "Section name."));
|
||||
appendSection(u"GPS"_s, tr("GPS", "Section name."));
|
||||
appendSection(u"File"_s, tr("File", "Section name."));
|
||||
|
||||
if (imgReader.supportsOption(QImageIOHandler::Size)) {
|
||||
appendProperty(QStringLiteral("Image"), QStringLiteral("Image.Dimensions"),
|
||||
appendProperty(u"Image"_s, u"Image.Dimensions"_s,
|
||||
tr("Dimensions"), imageDimensionsString);
|
||||
appendProperty(QStringLiteral("Image"), QStringLiteral("Image.SizeRatio"),
|
||||
appendProperty(u"Image"_s, u"Image.SizeRatio"_s,
|
||||
tr("Aspect ratio"), imageRatioString);
|
||||
}
|
||||
if (imgReader.supportsAnimation() && imgReader.imageCount() > 1) {
|
||||
appendProperty(QStringLiteral("Image"), QStringLiteral("Image.FrameCount"),
|
||||
appendProperty(u"Image"_s, u"Image.FrameCount"_s,
|
||||
tr("Frame count"), QString::number(imgReader.imageCount()));
|
||||
}
|
||||
|
||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.Name"),
|
||||
appendProperty(u"File"_s, u"File.Name"_s,
|
||||
tr("Name"), fileInfo.fileName());
|
||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.ItemType"),
|
||||
appendProperty(u"File"_s, u"File.ItemType"_s,
|
||||
tr("Item type"), itemTypeString);
|
||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.Path"),
|
||||
appendProperty(u"File"_s, u"File.Path"_s,
|
||||
tr("Folder path"), QDir::toNativeSeparators(fileInfo.path()));
|
||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.Size"),
|
||||
appendProperty(u"File"_s, u"File.Size"_s,
|
||||
tr("Size"), sizeString);
|
||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.CreatedTime"),
|
||||
appendProperty(u"File"_s, u"File.CreatedTime"_s,
|
||||
tr("Date created"), birthTimeString);
|
||||
appendProperty(QStringLiteral("File"), QStringLiteral("File.LastModified"),
|
||||
appendProperty(u"File"_s, u"File.LastModified"_s,
|
||||
tr("Date modified"), lastModifiedTimeString);
|
||||
|
||||
Exiv2Wrapper wrapper;
|
||||
if (wrapper.load(imageFilePath)) {
|
||||
wrapper.cacheSections();
|
||||
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Description"),
|
||||
QStringLiteral("Xmp.dc.title"), tr("Title"), true);
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Description"),
|
||||
QStringLiteral("Exif.Image.ImageDescription"), tr("Subject"), true);
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Description"),
|
||||
QStringLiteral("Exif.Image.Rating"), tr("Rating"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Description"),
|
||||
QStringLiteral("Xmp.dc.subject"), tr("Tags"));
|
||||
appendPropertyIfNotEmpty(QStringLiteral("Description"), QStringLiteral("Description.Comments"),
|
||||
appendExivPropertyIfExist(wrapper, u"Description"_s,
|
||||
u"Xmp.dc.title"_s, tr("Title"), true);
|
||||
appendExivPropertyIfExist(wrapper, u"Description"_s,
|
||||
u"Exif.Image.ImageDescription"_s, tr("Subject"), true);
|
||||
appendExivPropertyIfExist(wrapper, u"Description"_s,
|
||||
u"Exif.Image.Rating"_s, tr("Rating"));
|
||||
appendExivPropertyIfExist(wrapper, u"Description"_s,
|
||||
u"Xmp.dc.subject"_s, tr("Tags"));
|
||||
appendPropertyIfNotEmpty(u"Description"_s, u"Description.Comments"_s,
|
||||
tr("Comments"), wrapper.comment());
|
||||
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
||||
QStringLiteral("Exif.Image.Artist"), tr("Authors"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
||||
QStringLiteral("Exif.Photo.DateTimeOriginal"), tr("Date taken"));
|
||||
appendExivPropertyIfExist(wrapper, u"Origin"_s,
|
||||
u"Exif.Image.Artist"_s, tr("Authors"));
|
||||
appendExivPropertyIfExist(wrapper, u"Origin"_s,
|
||||
u"Exif.Photo.DateTimeOriginal"_s, tr("Date taken"));
|
||||
// FIXME: We may fetch the same type of metadata from different metadata collection.
|
||||
// Current implementation is not pretty and may need to do a rework...
|
||||
// appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
||||
// QStringLiteral("Xmp.xmp.CreatorTool"), tr("Program name"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
||||
QStringLiteral("Exif.Image.Software"), tr("Program name"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
|
||||
QStringLiteral("Exif.Image.Copyright"), tr("Copyright"));
|
||||
appendExivPropertyIfExist(wrapper, u"Origin"_s,
|
||||
u"Exif.Image.Software"_s, tr("Program name"));
|
||||
appendExivPropertyIfExist(wrapper, u"Origin"_s,
|
||||
u"Exif.Image.Copyright"_s, tr("Copyright"));
|
||||
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Image"),
|
||||
QStringLiteral("Exif.Image.XResolution"), tr("Horizontal resolution"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Image"),
|
||||
QStringLiteral("Exif.Image.YResolution"), tr("Vertical resolution"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Image"),
|
||||
QStringLiteral("Exif.Image.ResolutionUnit"), tr("Resolution unit"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Image"),
|
||||
QStringLiteral("Exif.Photo.ColorSpace"), tr("Colour representation"));
|
||||
appendExivPropertyIfExist(wrapper, u"Image"_s,
|
||||
u"Exif.Image.XResolution"_s, tr("Horizontal resolution"));
|
||||
appendExivPropertyIfExist(wrapper, u"Image"_s,
|
||||
u"Exif.Image.YResolution"_s, tr("Vertical resolution"));
|
||||
appendExivPropertyIfExist(wrapper, u"Image"_s,
|
||||
u"Exif.Image.ResolutionUnit"_s, tr("Resolution unit"));
|
||||
appendExivPropertyIfExist(wrapper, u"Image"_s,
|
||||
u"Exif.Photo.ColorSpace"_s, tr("Colour representation"));
|
||||
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Image.Make"), tr("Camera maker"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Image.Model"), tr("Camera model"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.FNumber"), tr("F-stop"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.ExposureTime"), tr("Exposure time"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.ISOSpeedRatings"), tr("ISO speed"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.ExposureBiasValue"), tr("Exposure bias"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.FocalLength"), tr("Focal length"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.MaxApertureValue"), tr("Max aperture"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.MeteringMode"), tr("Metering mode"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.SubjectDistance"), tr("Subject distance"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.Flash"), tr("Flash mode"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("Camera"),
|
||||
QStringLiteral("Exif.Photo.FocalLengthIn35mmFilm"), tr("35mm focal length"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Image.Make"_s, tr("Camera maker"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Image.Model"_s, tr("Camera model"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.FNumber"_s, tr("F-stop"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.ExposureTime"_s, tr("Exposure time"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.ISOSpeedRatings"_s, tr("ISO speed"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.ExposureBiasValue"_s, tr("Exposure bias"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.FocalLength"_s, tr("Focal length"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.MaxApertureValue"_s, tr("Max aperture"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.MeteringMode"_s, tr("Metering mode"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.SubjectDistance"_s, tr("Subject distance"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.Flash"_s, tr("Flash mode"));
|
||||
appendExivPropertyIfExist(wrapper, u"Camera"_s,
|
||||
u"Exif.Photo.FocalLengthIn35mmFilm"_s, tr("35mm focal length"));
|
||||
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.LensModel"), tr("Lens model"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.Contrast"), tr("Contrast"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.BrightnessValue"), tr("Brightness"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.ExposureProgram"), tr("Exposure program"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.Saturation"), tr("Saturation"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.Sharpness"), tr("Sharpness"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.WhiteBalance"), tr("White balance"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.DigitalZoomRatio"), tr("Digital zoom"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("AdvancedPhoto"),
|
||||
QStringLiteral("Exif.Photo.ExifVersion"), tr("EXIF version"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.LensModel"_s, tr("Lens model"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.Contrast"_s, tr("Contrast"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.BrightnessValue"_s, tr("Brightness"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.ExposureProgram"_s, tr("Exposure program"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.Saturation"_s, tr("Saturation"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.Sharpness"_s, tr("Sharpness"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.WhiteBalance"_s, tr("White balance"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.DigitalZoomRatio"_s, tr("Digital zoom"));
|
||||
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
|
||||
u"Exif.Photo.ExifVersion"_s, tr("EXIF version"));
|
||||
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
||||
QStringLiteral("Exif.GPSInfo.GPSLatitudeRef"), tr("Latitude reference"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
||||
QStringLiteral("Exif.GPSInfo.GPSLatitude"), tr("Latitude"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
||||
QStringLiteral("Exif.GPSInfo.GPSLongitudeRef"), tr("Longitude reference"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
||||
QStringLiteral("Exif.GPSInfo.GPSLongitude"), tr("Longitude"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
||||
QStringLiteral("Exif.GPSInfo.GPSAltitudeRef"), tr("Altitude reference"));
|
||||
appendExivPropertyIfExist(wrapper, QStringLiteral("GPS"),
|
||||
QStringLiteral("Exif.GPSInfo.GPSAltitude"), tr("Altitude"));
|
||||
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||
u"Exif.GPSInfo.GPSLatitudeRef"_s, tr("Latitude reference"));
|
||||
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||
u"Exif.GPSInfo.GPSLatitude"_s, tr("Latitude"));
|
||||
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||
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"));
|
||||
appendExivPropertyIfExist(wrapper, u"GPS"_s,
|
||||
u"Exif.GPSInfo.GPSAltitude"_s, tr("Altitude"));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: 2024 Gary Wang <git@blumia.net>
|
||||
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
@ -16,9 +16,7 @@ PlaylistModel::PlaylistModel(QObject *parent)
|
||||
}
|
||||
|
||||
PlaylistModel::~PlaylistModel()
|
||||
{
|
||||
|
||||
}
|
||||
= default;
|
||||
|
||||
void PlaylistModel::setPlaylist(const QList<QUrl> &urls)
|
||||
{
|
||||
@ -29,7 +27,7 @@ void PlaylistModel::setPlaylist(const QList<QUrl> &urls)
|
||||
|
||||
QModelIndex PlaylistModel::loadPlaylist(const QList<QUrl> & urls)
|
||||
{
|
||||
if (urls.isEmpty()) return QModelIndex();
|
||||
if (urls.isEmpty()) return {};
|
||||
if (urls.count() == 1) {
|
||||
return loadPlaylist(urls.constFirst());
|
||||
} else {
|
||||
@ -128,7 +126,7 @@ int PlaylistModel::rowCount(const QModelIndex &parent) const
|
||||
|
||||
QVariant PlaylistModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if (!index.isValid()) return QVariant();
|
||||
if (!index.isValid()) return {};
|
||||
|
||||
switch (role) {
|
||||
case Qt::DisplayRole:
|
||||
@ -137,7 +135,7 @@ QVariant PlaylistModel::data(const QModelIndex &index, int role) const
|
||||
return m_playlist.at(index.row());
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
return {};
|
||||
}
|
||||
|
||||
PlaylistManager::PlaylistManager(QObject *parent)
|
||||
@ -188,6 +186,26 @@ QModelIndex PlaylistManager::loadPlaylist(const QUrl &url)
|
||||
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();
|
||||
@ -196,17 +214,17 @@ int PlaylistManager::totalCount() const
|
||||
QModelIndex PlaylistManager::previousIndex() const
|
||||
{
|
||||
int count = totalCount();
|
||||
if (count == 0) return QModelIndex();
|
||||
if (count == 0) return {};
|
||||
|
||||
return m_model.index(m_currentIndex - 1 < 0 ? count - 1 : m_currentIndex - 1);
|
||||
return m_model.index(isFirstIndex() ? count - 1 : m_currentIndex - 1);
|
||||
}
|
||||
|
||||
QModelIndex PlaylistManager::nextIndex() const
|
||||
{
|
||||
int count = totalCount();
|
||||
if (count == 0) return QModelIndex();
|
||||
if (count == 0) return {};
|
||||
|
||||
return m_model.index(m_currentIndex + 1 == count ? 0 : m_currentIndex + 1);
|
||||
return m_model.index(isLastIndex() ? 0 : m_currentIndex + 1);
|
||||
}
|
||||
|
||||
QModelIndex PlaylistManager::curIndex() const
|
||||
@ -214,6 +232,16 @@ 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()) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: 2024 Gary Wang <git@blumia.net>
|
||||
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
@ -18,7 +18,7 @@ public:
|
||||
Q_PROPERTY(QStringList autoLoadFilterSuffixes MEMBER m_autoLoadSuffixes NOTIFY autoLoadFilterSuffixesChanged)
|
||||
|
||||
explicit PlaylistModel(QObject *parent = nullptr);
|
||||
~PlaylistModel();
|
||||
~PlaylistModel() override;
|
||||
|
||||
void setPlaylist(const QList<QUrl> & urls);
|
||||
QModelIndex loadPlaylist(const QList<QUrl> & urls);
|
||||
@ -61,11 +61,14 @@ public:
|
||||
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);
|
||||
|
@ -8,6 +8,9 @@
|
||||
#include <QStandardPaths>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QAction>
|
||||
#include <QWidget>
|
||||
#include <QKeySequence>
|
||||
#include <QMetaEnum>
|
||||
|
||||
namespace QEnumHelper
|
||||
@ -42,16 +45,26 @@ Settings *Settings::instance()
|
||||
return m_settings_instance;
|
||||
}
|
||||
|
||||
bool Settings::stayOnTop()
|
||||
bool Settings::stayOnTop() const
|
||||
{
|
||||
return m_qsettings->value("stay_on_top", true).toBool();
|
||||
}
|
||||
|
||||
bool Settings::useLightCheckerboard()
|
||||
bool Settings::useBuiltInCloseAnimation() const
|
||||
{
|
||||
return m_qsettings->value("use_built_in_close_animation", true).toBool();
|
||||
}
|
||||
|
||||
bool Settings::useLightCheckerboard() const
|
||||
{
|
||||
return m_qsettings->value("use_light_checkerboard", false).toBool();
|
||||
}
|
||||
|
||||
bool Settings::loopGallery() const
|
||||
{
|
||||
return m_qsettings->value("loop_gallery", true).toBool();
|
||||
}
|
||||
|
||||
Settings::DoubleClickBehavior Settings::doubleClickBehavior() const
|
||||
{
|
||||
QString result = m_qsettings->value("double_click_behavior", "Close").toString();
|
||||
@ -86,12 +99,24 @@ void Settings::setStayOnTop(bool on)
|
||||
m_qsettings->sync();
|
||||
}
|
||||
|
||||
void Settings::setUseBuiltInCloseAnimation(bool on)
|
||||
{
|
||||
m_qsettings->setValue("use_built_in_close_animation", on);
|
||||
m_qsettings->sync();
|
||||
}
|
||||
|
||||
void Settings::setUseLightCheckerboard(bool light)
|
||||
{
|
||||
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::setDoubleClickBehavior(DoubleClickBehavior dcb)
|
||||
{
|
||||
m_qsettings->setValue("double_click_behavior", QEnumHelper::toString(dcb));
|
||||
@ -116,6 +141,47 @@ void Settings::setHiDpiScaleFactorBehavior(Qt::HighDpiScaleFactorRoundingPolicy
|
||||
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...
|
||||
@ -154,5 +220,7 @@ Settings::Settings()
|
||||
}
|
||||
|
||||
m_qsettings = new QSettings(QDir(configPath).absoluteFilePath("config.ini"), QSettings::IniFormat, this);
|
||||
|
||||
qRegisterMetaType<QList<QKeySequence>>();
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ public:
|
||||
Ignore,
|
||||
Close,
|
||||
Maximize,
|
||||
FullScreen,
|
||||
};
|
||||
Q_ENUM(DoubleClickBehavior)
|
||||
|
||||
@ -27,25 +28,34 @@ public:
|
||||
enum WindowSizeBehavior {
|
||||
Auto,
|
||||
Maximized,
|
||||
Windowed,
|
||||
};
|
||||
Q_ENUM(WindowSizeBehavior)
|
||||
|
||||
static Settings *instance();
|
||||
|
||||
bool stayOnTop();
|
||||
bool useLightCheckerboard();
|
||||
bool stayOnTop() const;
|
||||
bool useBuiltInCloseAnimation() const;
|
||||
bool useLightCheckerboard() const;
|
||||
bool loopGallery() const;
|
||||
DoubleClickBehavior doubleClickBehavior() const;
|
||||
MouseWheelBehavior mouseWheelBehavior() const;
|
||||
WindowSizeBehavior initWindowSizeBehavior() const;
|
||||
Qt::HighDpiScaleFactorRoundingPolicy hiDpiScaleFactorBehavior() const;
|
||||
|
||||
void setStayOnTop(bool on);
|
||||
void setUseBuiltInCloseAnimation(bool on);
|
||||
void setUseLightCheckerboard(bool light);
|
||||
void setLoopGallery(bool on);
|
||||
void setDoubleClickBehavior(DoubleClickBehavior dcb);
|
||||
void setMouseWheelBehavior(MouseWheelBehavior mwb);
|
||||
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();
|
||||
|
||||
@ -57,4 +67,3 @@ signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
|
@ -5,16 +5,24 @@
|
||||
#include "settingsdialog.h"
|
||||
|
||||
#include "settings.h"
|
||||
#include "shortcutedit.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QFormLayout>
|
||||
#include <QKeySequenceEdit>
|
||||
#include <QScrollArea>
|
||||
#include <QSplitter>
|
||||
#include <QStringListModel>
|
||||
#include <QMessageBox>
|
||||
|
||||
SettingsDialog::SettingsDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, m_stayOnTop(new QCheckBox)
|
||||
, m_useBuiltInCloseAnimation(new QCheckBox)
|
||||
, m_useLightCheckerboard(new QCheckBox)
|
||||
, m_loopGallery(new QCheckBox)
|
||||
, m_doubleClickBehavior(new QComboBox)
|
||||
, m_mouseWheelBehavior(new QComboBox)
|
||||
, m_initWindowSizeBehavior(new QComboBox)
|
||||
@ -22,12 +30,55 @@ SettingsDialog::SettingsDialog(QWidget *parent)
|
||||
{
|
||||
this->setWindowTitle(tr("Settings"));
|
||||
|
||||
QFormLayout * settingsForm = new QFormLayout(this);
|
||||
QHBoxLayout * mainLayout = new QHBoxLayout(this);
|
||||
QTabWidget * settingsTabs = new QTabWidget(this);
|
||||
mainLayout->addWidget(settingsTabs);
|
||||
|
||||
QWidget * settingsFormHolder = new QWidget;
|
||||
QFormLayout * settingsForm = new QFormLayout(settingsFormHolder);
|
||||
settingsTabs->addTab(settingsFormHolder, tr("Options"));
|
||||
|
||||
QSplitter * shortcutEditorSplitter = new QSplitter;
|
||||
shortcutEditorSplitter->setOrientation(Qt::Vertical);
|
||||
shortcutEditorSplitter->setChildrenCollapsible(false);
|
||||
QScrollArea * shortcutScrollArea = new QScrollArea;
|
||||
shortcutEditorSplitter->addWidget(shortcutScrollArea);
|
||||
shortcutScrollArea->setWidgetResizable(true);
|
||||
shortcutScrollArea->setMinimumHeight(200);
|
||||
QWidget * shortcutsFormHolder = new QWidget;
|
||||
QFormLayout * shortcutsForm = new QFormLayout(shortcutsFormHolder);
|
||||
shortcutScrollArea->setWidget(shortcutsFormHolder);
|
||||
settingsTabs->addTab(shortcutEditorSplitter, tr("Shortcuts"));
|
||||
|
||||
for (const QAction * action : parent->actions()) {
|
||||
ShortcutEdit * shortcutEdit = new ShortcutEdit;
|
||||
shortcutEdit->setObjectName(QLatin1String("shortcut_") + action->objectName());
|
||||
shortcutEdit->setShortcuts(action->shortcuts());
|
||||
shortcutsForm->addRow(action->text(), shortcutEdit);
|
||||
connect(shortcutEdit, &ShortcutEdit::editButtonClicked, this, [=](){
|
||||
if (shortcutEditorSplitter->count() == 1) shortcutEditorSplitter->addWidget(new QWidget);
|
||||
ShortcutEditor * shortcutEditor = new ShortcutEditor(shortcutEdit);
|
||||
shortcutEditor->setDescription(tr("Editing shortcuts for action \"%1\":").arg(action->text()));
|
||||
QWidget * oldEditor = shortcutEditorSplitter->replaceWidget(1, shortcutEditor);
|
||||
shortcutEditorSplitter->setSizes({shortcutEditorSplitter->height(), 1});
|
||||
oldEditor->deleteLater();
|
||||
});
|
||||
connect(shortcutEdit, &ShortcutEdit::applyShortcutsRequested, this, [=](QList<QKeySequence> newShortcuts){
|
||||
bool succ = Settings::instance()->setShortcutsForAction(parent, shortcutEdit->objectName().mid(9),
|
||||
newShortcuts);
|
||||
if (!succ) {
|
||||
QMessageBox::warning(this, tr("Failed to set shortcuts"),
|
||||
tr("Please check if shortcuts are duplicated with existing shortcuts."));
|
||||
}
|
||||
shortcutEdit->setShortcuts(action->shortcuts());
|
||||
});
|
||||
}
|
||||
|
||||
static QList< QPair<Settings::DoubleClickBehavior, QString> > _dc_options {
|
||||
{ Settings::DoubleClickBehavior::Ignore, tr("Do nothing") },
|
||||
{ Settings::DoubleClickBehavior::Close, tr("Close the window") },
|
||||
{ Settings::DoubleClickBehavior::Maximize, tr("Toggle maximize") }
|
||||
{ Settings::DoubleClickBehavior::Maximize, tr("Toggle maximize") },
|
||||
{ Settings::DoubleClickBehavior::FullScreen, tr("Toggle fullscreen") }
|
||||
};
|
||||
|
||||
static QList< QPair<Settings::MouseWheelBehavior, QString> > _mw_options {
|
||||
@ -37,7 +88,8 @@ SettingsDialog::SettingsDialog(QWidget *parent)
|
||||
|
||||
static QList< QPair<Settings::WindowSizeBehavior, QString> > _iws_options {
|
||||
{ Settings::WindowSizeBehavior::Auto, tr("Auto size") },
|
||||
{ Settings::WindowSizeBehavior::Maximized, tr("Maximized") }
|
||||
{ Settings::WindowSizeBehavior::Maximized, tr("Maximized") },
|
||||
{ Settings::WindowSizeBehavior::Windowed, tr("Windowed") }
|
||||
};
|
||||
|
||||
static QList< QPair<Qt::HighDpiScaleFactorRoundingPolicy, QString> > _hidpi_options {
|
||||
@ -68,14 +120,18 @@ SettingsDialog::SettingsDialog(QWidget *parent)
|
||||
}
|
||||
|
||||
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("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_doubleClickBehavior->setModel(new QStringListModel(dcbDropDown));
|
||||
Settings::DoubleClickBehavior dcb = Settings::instance()->doubleClickBehavior();
|
||||
m_doubleClickBehavior->setCurrentIndex(static_cast<int>(dcb));
|
||||
@ -94,14 +150,30 @@ SettingsDialog::SettingsDialog(QWidget *parent)
|
||||
}
|
||||
}
|
||||
|
||||
connect(m_stayOnTop, &QCheckBox::stateChanged, this, [ = ](int state){
|
||||
#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_useLightCheckerboard, &QCheckBox::stateChanged, this, [ = ](int state){
|
||||
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_doubleClickBehavior, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [ = ](int index){
|
||||
Settings::instance()->setDoubleClickBehavior(_dc_options.at(index).first);
|
||||
});
|
||||
|
@ -23,7 +23,9 @@ public slots:
|
||||
|
||||
private:
|
||||
QCheckBox * m_stayOnTop = nullptr;
|
||||
QCheckBox * m_useBuiltInCloseAnimation = nullptr;
|
||||
QCheckBox * m_useLightCheckerboard = nullptr;
|
||||
QCheckBox * m_loopGallery = nullptr;
|
||||
QComboBox * m_doubleClickBehavior = nullptr;
|
||||
QComboBox * m_mouseWheelBehavior = nullptr;
|
||||
QComboBox * m_initWindowSizeBehavior = nullptr;
|
||||
|
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;
|
||||
};
|
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
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
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
886
app/translations/PineapplePictures_ta.ts
Normal file
886
app/translations/PineapplePictures_ta.ts
Normal file
@ -0,0 +1,886 @@
|
||||
<?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="276"/>
|
||||
<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="181"/>
|
||||
<location filename="../mainwindow.cpp" line="545"/>
|
||||
<source>File url list is empty</source>
|
||||
<translation>கோப்பு முகவரி பட்டியல் காலியாக உள்ளது</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="445"/>
|
||||
<source>&Copy</source>
|
||||
<translation>நகலெடு (&c)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="553"/>
|
||||
<source>Image data is invalid</source>
|
||||
<translation>படத் தரவு தவறானது</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="560"/>
|
||||
<source>Not supported mimedata: %1</source>
|
||||
<translation>மைமெடாட்டாவை ஆதரிக்கவில்லை: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="759"/>
|
||||
<source>Image From Clipboard</source>
|
||||
<translation>கிளிப்போர்டிலிருந்து படம்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="777"/>
|
||||
<source>Are you sure you want to move "%1" to recycle bin?</source>
|
||||
<translation>பின் மறுசுழற்சி செய்ய "%1" ஐ நகர்த்த விரும்புகிறீர்களா?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="781"/>
|
||||
<source>Failed to move file to trash</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="782"/>
|
||||
<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="114"/>
|
||||
<source>Copy P&ixmap</source>
|
||||
<translation>பி & ஐஎக்ச்மேப்பை நகலெடுக்கவும்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="115"/>
|
||||
<source>Copy &File Path</source>
|
||||
<translation>கோப்பு பாதையை நகலெடுக்கவும்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="133"/>
|
||||
<source>Properties</source>
|
||||
<translation>பண்புகள்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="118"/>
|
||||
<location filename="../aboutdialog.cpp" line="41"/>
|
||||
<source>Stay on top</source>
|
||||
<translation>மேலே இருங்கள்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="119"/>
|
||||
<location filename="../aboutdialog.cpp" line="44"/>
|
||||
<source>Protected mode</source>
|
||||
<translation>பாதுகாக்கப்பட்ட பயன்முறை</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="120"/>
|
||||
<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="99"/>
|
||||
<source>Zoom in</source>
|
||||
<translation>பெரிதாக்கு</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="100"/>
|
||||
<source>Zoom out</source>
|
||||
<translation>சிறிதாக்கு</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="108"/>
|
||||
<source>Pause/Resume Animation</source>
|
||||
<translation>இடைநிறுத்தம்/அனிமேசனை மீண்டும் தொடங்குங்கள்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="109"/>
|
||||
<source>Animation Go to Next Frame</source>
|
||||
<translation>அனிமேசன் அடுத்த சட்டகத்திற்குச் செல்லுங்கள்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="111"/>
|
||||
<source>Flip &Horizontally</source>
|
||||
<translation>கிடைமட்டமாக புரட்டவும்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="112"/>
|
||||
<source>Fit to view</source>
|
||||
<translation>பார்க்க பொருத்தமானது</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="113"/>
|
||||
<source>Fit to width</source>
|
||||
<translation>அகலத்திற்கு ஏற்றது</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="116"/>
|
||||
<source>&Paste</source>
|
||||
<translation>ஒட்டு (&p)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="101"/>
|
||||
<source>Toggle Checkerboard</source>
|
||||
<translation>செக்கர்போர்டை மாற்றவும்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="95"/>
|
||||
<source>&Open...</source>
|
||||
<translation>& திறந்த ...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="97"/>
|
||||
<source>Actual size</source>
|
||||
<translation>உண்மையான அளவு</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="98"/>
|
||||
<source>Toggle maximize</source>
|
||||
<translation>அதிகபட்சத்தை மாற்றவும்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="102"/>
|
||||
<source>Rotate right</source>
|
||||
<translation>வலதுபுறம் சுழற்றுங்கள்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="103"/>
|
||||
<source>Rotate left</source>
|
||||
<translation>இடதுபுறம் சுழலும்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="105"/>
|
||||
<source>Previous image</source>
|
||||
<translation>முந்தைய படம்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="106"/>
|
||||
<source>Next image</source>
|
||||
<translation>அடுத்த படம்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="776"/>
|
||||
<location filename="../actionmanager.cpp" line="117"/>
|
||||
<source>Move to Trash</source>
|
||||
<translation>குப்பைக்கு நகர்த்தவும்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="121"/>
|
||||
<source>Configure...</source>
|
||||
<translation>உள்ளமைக்கவும் ...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="122"/>
|
||||
<source>Help</source>
|
||||
<translation>உதவி</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="125"/>
|
||||
<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="131"/>
|
||||
<source>Show in directory</source>
|
||||
<translation>கோப்பகத்தில் காட்டு</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../actionmanager.cpp" line="134"/>
|
||||
<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="31"/>
|
||||
<source>Settings</source>
|
||||
<translation>அமைப்புகள்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="39"/>
|
||||
<source>Options</source>
|
||||
<translation>விருப்பங்கள்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="51"/>
|
||||
<source>Shortcuts</source>
|
||||
<translation>குறுக்குவழிகள்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="61"/>
|
||||
<source>Editing shortcuts for action "%1":</source>
|
||||
<translation>செயலுக்கான குறுக்குவழிகளைத் திருத்துதல் "%1":</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="70"/>
|
||||
<source>Failed to set shortcuts</source>
|
||||
<translation>குறுக்குவழிகளை அமைப்பதில் தோல்வி</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="71"/>
|
||||
<source>Please check if shortcuts are duplicated with existing shortcuts.</source>
|
||||
<translation>தற்போதுள்ள குறுக்குவழிகளுடன் குறுக்குவழிகள் நகல் செய்யப்பட்டுள்ளதா என்று சரிபார்க்கவும்.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="78"/>
|
||||
<source>Do nothing</source>
|
||||
<translation>எதுவும் செய்ய வேண்டாம்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="79"/>
|
||||
<source>Close the window</source>
|
||||
<translation>சாளரத்தை மூடு</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="80"/>
|
||||
<source>Toggle maximize</source>
|
||||
<translation>அதிகபட்சத்தை மாற்றவும்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="81"/>
|
||||
<source>Toggle fullscreen</source>
|
||||
<translation>மாற்று முழுத்திரை</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="85"/>
|
||||
<source>Zoom in and out</source>
|
||||
<translation>உள்ளேயும் வெளியேயும் பெரிதாக்கவும்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="86"/>
|
||||
<source>View next or previous item</source>
|
||||
<translation>அடுத்த அல்லது முந்தைய உருப்படியைக் காண்க</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="90"/>
|
||||
<source>Auto size</source>
|
||||
<translation>வாகன அளவு</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="91"/>
|
||||
<source>Maximized</source>
|
||||
<translation>அதிகபட்சம்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="92"/>
|
||||
<source>Windowed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="96"/>
|
||||
<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="97"/>
|
||||
<source>Ceil (Integer scaling)</source>
|
||||
<comment>This option means always round up</comment>
|
||||
<translation>சீல் (முழு எண் அளவிடுதல்)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="98"/>
|
||||
<source>Floor (Integer scaling)</source>
|
||||
<comment>This option means always round down</comment>
|
||||
<translation>மாடி (முழு எண் அளவிடுதல்)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="99"/>
|
||||
<source>Follow system (Fractional scaling)</source>
|
||||
<comment>This option means don't round</comment>
|
||||
<translation>கணினியைப் பின்பற்றவும் (பகுதியளவு அளவிடுதல்)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="122"/>
|
||||
<source>Stay on top when start-up</source>
|
||||
<translation>தொடக்கத்தில் இருக்கும்போது மேலே இருங்கள்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="123"/>
|
||||
<source>Use built-in close window animation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="124"/>
|
||||
<source>Use light-color checkerboard</source>
|
||||
<translation>ஒளி-வண்ண செக்கர்போர்டைப் பயன்படுத்தவும்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="125"/>
|
||||
<source>Loop the loaded gallery</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="126"/>
|
||||
<source>Double-click behavior</source>
|
||||
<translation>நடத்தை இருமுறை சொடுக்கு செய்யவும்</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="127"/>
|
||||
<source>Mouse wheel behavior</source>
|
||||
<translation>சுட்டி சக்கர நடத்தை</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="128"/>
|
||||
<source>Default window size</source>
|
||||
<translation>இயல்புநிலை சாளர அளவு</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settingsdialog.cpp" line="129"/>
|
||||
<source>HiDPI scale factor rounding policy</source>
|
||||
<translation>HIDPI அளவிலான காரணி ரவுண்டிங் கொள்கை</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ShortcutEdit</name>
|
||||
<message>
|
||||
<location filename="../shortcutedit.cpp" line="109"/>
|
||||
<source>No shortcuts</source>
|
||||
<translation>குறுக்குவழிகள் இல்லை</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ShortcutEditor</name>
|
||||
<message>
|
||||
<location filename="../shortcutedit.cpp" line="75"/>
|
||||
<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
20
appveyor.yml
20
appveyor.yml
@ -8,22 +8,14 @@ environment:
|
||||
LIBEXIV2: C:\projects\exiv2
|
||||
PPKG: C:\projects\ppkg
|
||||
matrix:
|
||||
- job_name: mingw_64_qt6_7
|
||||
QTDIR: C:\Qt\6.7\mingw_64
|
||||
MINGW64: C:\Qt\Tools\mingw1120_64
|
||||
- job_name: mingw_64_qt6_8
|
||||
QTDIR: C:\Qt\6.8\mingw_64
|
||||
MINGW64: C:\Qt\Tools\mingw1310_64
|
||||
KF_BRANCH: master
|
||||
EXIV2_VERSION: "0.28.3"
|
||||
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"
|
||||
- job_name: mingw81_64_qt5_15_2
|
||||
QTDIR: C:\Qt\5.15.2\mingw81_64
|
||||
MINGW64: C:\Qt\Tools\mingw810_64
|
||||
KF_BRANCH: kf5
|
||||
EXIV2_VERSION: "0.27.7"
|
||||
EXIV2_CMAKE_OPTIONS: "-DEXIV2_BUILD_SAMPLES=OFF -DEXIV2_ENABLE_WIN_UNICODE=ON -DEXIV2_BUILD_EXIV2_COMMAND=OFF"
|
||||
PPIC_CMAKE_OPTIONS: "-DPREFER_QT_5=ON"
|
||||
WINDEPLOYQT_ARGS: "--verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-angle --no-system-d3d-compiler"
|
||||
|
||||
install:
|
||||
- mkdir %CMAKE_INSTALL_PREFIX%
|
||||
@ -98,7 +90,7 @@ build_script:
|
||||
- cd karchive
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake .. -G "Ninja" -DWITH_LIBZSTD=OFF -DWITH_BZIP2=OFF -DWITH_LIBLZMA=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX%
|
||||
- cmake .. -G "Ninja" -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 --target install/strip
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
@ -125,7 +117,7 @@ build_script:
|
||||
- cd kimageformats
|
||||
- mkdir 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 --target install/strip
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
|
BIN
assets/icons/app-icon.icns
Normal file
BIN
assets/icons/app-icon.icns
Normal file
Binary file not shown.
@ -13,6 +13,7 @@
|
||||
<li><u>Russian</u>: Sergey Shornikov, Artem, Andrey</li>
|
||||
<li><u>Sinhala</u>: HelaBasa</li>
|
||||
<li><u>Spanish</u>: Toni Estévez, Génesis Toxical, William(ѕ)ⁿ, gallegonovato</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>
|
||||
|
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>
|
@ -6,6 +6,7 @@
|
||||
<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>
|
||||
<summary>Image Viewer</summary>
|
||||
@ -13,6 +14,7 @@
|
||||
<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>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
@ -23,6 +25,7 @@
|
||||
<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>
|
||||
</description>
|
||||
@ -48,6 +51,7 @@
|
||||
<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>
|
||||
@ -58,6 +62,7 @@
|
||||
<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>
|
||||
@ -68,12 +73,87 @@
|
||||
<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.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 bugs:</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>
|
||||
@ -151,7 +231,7 @@
|
||||
<description>
|
||||
<p>This release adds the following features:</p>
|
||||
<ul>
|
||||
<li>TIF and TIFF format files in the same folder will now be automatedly added to the gallery</li>
|
||||
<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>
|
||||
|
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 "கேரி (ப்ளூமியா) வாங் மற்றும் பலர்."
|
@ -1,14 +1,17 @@
|
||||
# SPDX-FileCopyrightText: 2024 Gary Wang <git@blumia.net>
|
||||
# SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
QT += core widgets gui svg
|
||||
greaterThan(QT_MAJOR_VERSION, 5): QT += svgwidgets
|
||||
QT += core widgets gui svg svgwidgets
|
||||
|
||||
TARGET = ppic
|
||||
TEMPLATE = app
|
||||
DEFINES += PPIC_VERSION_STRING=\\\"x.y.z\\\"
|
||||
|
||||
win32 {
|
||||
DEFINES += FLAG_PORTABLE_MODE_SUPPORT=1
|
||||
}
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
@ -39,7 +42,9 @@ SOURCES += \
|
||||
app/metadatadialog.cpp \
|
||||
app/exiv2wrapper.cpp \
|
||||
app/actionmanager.cpp \
|
||||
app/playlistmanager.cpp
|
||||
app/playlistmanager.cpp \
|
||||
app/shortcutedit.cpp \
|
||||
app/fileopeneventhandler.cpp
|
||||
|
||||
HEADERS += \
|
||||
app/aboutdialog.h \
|
||||
@ -57,10 +62,12 @@ HEADERS += \
|
||||
app/metadatadialog.h \
|
||||
app/exiv2wrapper.h \
|
||||
app/actionmanager.h \
|
||||
app/playlistmanager.h
|
||||
app/playlistmanager.h \
|
||||
app/shortcutedit.h \
|
||||
app/fileopeneventhandler.h
|
||||
|
||||
TRANSLATIONS = \
|
||||
app/translations/PineapplePictures.ts \
|
||||
app/translations/PineapplePictures_en.ts \
|
||||
app/translations/PineapplePictures_zh_CN.ts \
|
||||
app/translations/PineapplePictures_de.ts \
|
||||
app/translations/PineapplePictures_es.ts \
|
||||
|
Reference in New Issue
Block a user