diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index 966595de43e9470a4121eaacb010bd38b7189bd0..bbed1e91c0aa5696d2448092e1065fa3c426b71e 100644
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -47,6 +47,10 @@ message( STATUS "CMAKE_CL_64: ${CMAKE_CL_64}")
set(GLOBAL_BUILD_TYPE RelWithDebInfo)
set(GLOBAL_PROFILE ${GLOBAL_PROFILE} -DBUILD_TESTING=false)
+if (DEFINED EP_PREFIX)
+ set_directory_properties(PROPERTIES EP_PREFIX ${EP_PREFIX})
+endif (DEFINED EP_PREFIX)
+
if (MSVC)
set(GLOBAL_PROFILE ${GLOBAL_PROFILE} -DCMAKE_EXE_LINKER_FLAGS=/PROFILE -DCMAKE_SHARED_LINKER_FLAGS=/PROFILE)
set(PATCH_COMMAND myptch)
diff --git a/3rdparty/README.md b/3rdparty/README.md
index df542d27396d5f587dccc092e60c5ba210b4493c..c196568a8cbc61edcbf26787786eaef73a90028b 100644
--- a/3rdparty/README.md
+++ b/3rdparty/README.md
@@ -25,7 +25,12 @@ Note: on all operating systems the entire procedure is done in a terminal window
3. Make sure you have a compiler:
* Linux: gcc, minimum version 4.8
* OSX: clang, you need to install xcode for this
- * Windows: (http://tdm-gcc.tdragon.net/, version 5.1). MSVC cannot build G'Mic correctly. Remember to install the OpenMP plugin in tdm-gcc. Make sure mingw's bin folder is in your path.
+ * Windows: mingw-w64 5.4 (by mingw-builds)
+ - 32-bit (x86) target: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/5.4.0/threads-posix/dwarf/
+ - 64-bit (x64) target: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/5.4.0/threads-posix/seh/
+ Make sure mingw's bin folder is in your path. It might be a good
+ idea to create a batch file which sets the path and start cmd.
+ MSVC is *not* supported at the moment.
4. If you compile Qt on Windows, you will also need Python: https://www.python.org. Make sure to have python.exe in your path.
== Setup your environment ==
@@ -48,7 +53,13 @@ Note: on all operating systems the entire procedure is done in a terminal window
== Prepare the externals build ==
1. enter the BUILDROOT/b directory
-2. run cmake:
+
+2. The cmake command needs to point to your BUILDROOT like /dev/d, not c:\dev\d.
+
+ set PATH=BUILDROOT\i\bin\;BUILDROOT\i\lib;%PATH%
+ cmake ..\krita\3rdparty -DEXTERNALS_DOWNLOAD_DIR=/dev/d -DINSTALL_ROOT=/dev/i -G "MinGW Makefiles"
+
+3. run cmake:
* Linux:
export PATH=$BUILDROOT/i/bin
@@ -72,12 +83,8 @@ Note: on all operating systems the entire procedure is done in a terminal window
* Windows 64 bits:
-Note that the cmake command needs to point to your BUILDROOT like /dev/d, not c:\dev\d.
-
- set PATH=BUILDROOT\i\bin\;BUILDROOT\i\lib;%PATH%
- cmake ..\krita\3rdparty -DEXTERNALS_DOWNLOAD_DIR=/dev/d -DINSTALL_ROOT=/dev/i -G "MinGW Makefiles"
-3. build the packages:
+4. build the packages:
With a judicious application of DEPENDS statements, it's possible to build it all in one go, but in my experience that fails always, so it's better to build the dependencies independently.
@@ -171,19 +178,19 @@ On Windows
Depending on what you want to use, run this command for MSBuild:
- cmake ..\krita -G "MinGW Makefiles" -DBoost_DEBUG=OFF -DBOOST_INCLUDEDIR=c:\dev\i\include -DBOOST_DEBUG=ON -DBOOST_ROOT=c:\dev\i -DBOOST_LIBRARYDIR=c:\dev\i\lib -DCMAKE_INSTALL_PREFIX=c:\dev\i -DCMAKE_PREFIX_PATH=c:\dev\i -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DHAVE_MEMORY_LEAK_TRACKER=OFF -DPACKAGERS_BUILD=ON -Wno-dev -DDEFINE_NO_DEPRECATED=1
+ cmake ..\krita -G "MinGW Makefiles" -DBoost_DEBUG=OFF -DBOOST_INCLUDEDIR=c:\dev\i\include -DBOOST_DEBUG=ON -DBOOST_ROOT=c:\dev\i -DBOOST_LIBRARYDIR=c:\dev\i\lib -DCMAKE_INSTALL_PREFIX=c:\dev\i -DCMAKE_PREFIX_PATH=c:\dev\i -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DHAVE_MEMORY_LEAK_TRACKER=OFF -Wno-dev -DDEFINE_NO_DEPRECATED=1
Or this to use jom (faster compiling, uses all cores, ships with QtCreator/pre-built Qt binaries):
- cmake ..\krita -G "MinGW Makefiles" -DBoost_DEBUG=OFF -DBOOST_INCLUDEDIR=c:\dev\i\include -DBOOST_DEBUG=ON -DBOOST_ROOT=c:\dev\i -DBOOST_LIBRARYDIR=c:\dev\i\lib -DCMAKE_INSTALL_PREFIX=c:\dev\i -DCMAKE_PREFIX_PATH=c:\dev\i -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DHAVE_MEMORY_LEAK_TRACKER=OFF -DPACKAGERS_BUILD=ON -Wno-dev -DDEFINE_NO_DEPRECATED=1
+ cmake ..\krita -G "MinGW Makefiles" -DBoost_DEBUG=OFF -DBOOST_INCLUDEDIR=c:\dev\i\include -DBOOST_DEBUG=ON -DBOOST_ROOT=c:\dev\i -DBOOST_LIBRARYDIR=c:\dev\i\lib -DCMAKE_INSTALL_PREFIX=c:\dev\i -DCMAKE_PREFIX_PATH=c:\dev\i -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DHAVE_MEMORY_LEAK_TRACKER=OFF -Wno-dev -DDEFINE_NO_DEPRECATED=1
On Linux
- cmake ../krita -DCMAKE_INSTALL_PREFIX=BUILDROOT/i -DDEFINE_NO_DEPRECATED=1 -DPACKAGERS_BUILD=ON -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfobg
+ cmake ../krita -DCMAKE_INSTALL_PREFIX=BUILDROOT/i -DDEFINE_NO_DEPRECATED=1 -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfobg
On OSX
- cmake ../krita -DCMAKE_INSTALL_PREFIX=/Users/boud/dev/i -DDEFINE_NO_DEPRECATED=1 -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DPACKAGERS_BUILD=ON -DBUNDLE_INSTALL_DIR=$HOME/dev/i/bin -DCMAKE_BUILD_TYPE=RelWithDebInfo
+ cmake ../krita -DCMAKE_INSTALL_PREFIX=$BUILDROOT/i -DDEFINE_NO_DEPRECATED=1 -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DBUNDLE_INSTALL_DIR=$BUILDROOT/i/bin -DCMAKE_BUILD_TYPE=RelWithDebInfo
4. Run
diff --git a/3rdparty/ext_boost/CMakeLists.txt b/3rdparty/ext_boost/CMakeLists.txt
index 8928bd7b7875f0dea3a1332a725c3b42e23149dc..29963a806a5b6ea344ec7507103cb340c76a2aab 100755
--- a/3rdparty/ext_boost/CMakeLists.txt
+++ b/3rdparty/ext_boost/CMakeLists.txt
@@ -13,7 +13,6 @@ if (MSVC)
INSTALL_DIR ${EXTPREFIX_boost}
UPDATE_COMMAND ""
- ALWAYS 0
BUILD_IN_SOURCE 1
)
ExternalProject_Add_Step(
@@ -37,7 +36,6 @@ if (MSVC)
INSTALL_DIR ${EXTPREFIX_boost}
UPDATE_COMMAND ""
- ALWAYS 0
BUILD_IN_SOURCE 1
)
ExternalProject_Add_Step(
@@ -63,7 +61,6 @@ elseif(MINGW)
INSTALL_DIR ${EXTPREFIX_boost}
UPDATE_COMMAND ""
- ALWAYS 0
BUILD_IN_SOURCE 1
)
ExternalProject_Add_Step(
@@ -84,7 +81,6 @@ else()
INSTALL_DIR ${PREFIX_ext_boost}
UPDATE_COMMAND ""
- ALWAYS 0
BUILD_IN_SOURCE 1
)
endif()
diff --git a/3rdparty/ext_drmingw/CMakeLists.txt b/3rdparty/ext_drmingw/CMakeLists.txt
index 3e7286b0027b4952e7bfa1a30bba862670627c2f..d979aaa0e03aa9845a6259b14c46722e636a75a4 100644
--- a/3rdparty/ext_drmingw/CMakeLists.txt
+++ b/3rdparty/ext_drmingw/CMakeLists.txt
@@ -16,7 +16,6 @@ if (MSVC OR MINGW)
COMMAND ${CMAKE_COMMAND} -E copy /bin/symsrv.yes ${PREFIX_ext_drmingw}/bin/
UPDATE_COMMAND ""
- ALWAYS 0
)
else ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
ExternalProject_Add(ext_drmingw
@@ -34,7 +33,6 @@ if (MSVC OR MINGW)
COMMAND ${CMAKE_COMMAND} -E copy /bin/symsrv.yes ${PREFIX_ext_drmingw}/bin/
UPDATE_COMMAND ""
- ALWAYS 0
)
endif ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
endif (MSVC OR MINGW)
diff --git a/3rdparty/ext_eigen3/CMakeLists.txt b/3rdparty/ext_eigen3/CMakeLists.txt
index 6e49a85622196c137ef54a4d403ad7f73dde7ff5..c2088f386cb37c95eeaed05b0a76e08b5e6ee02e 100644
--- a/3rdparty/ext_eigen3/CMakeLists.txt
+++ b/3rdparty/ext_eigen3/CMakeLists.txt
@@ -9,5 +9,4 @@ ExternalProject_Add( ext_eigen3
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_eigen3} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
)
diff --git a/3rdparty/ext_exiv2/CMakeLists.txt b/3rdparty/ext_exiv2/CMakeLists.txt
index 5c3838dfd01e3a226a2d8284d74ce699248f129f..b3c3eb2a5bf8f668243596139ffd5f6363a14da5 100755
--- a/3rdparty/ext_exiv2/CMakeLists.txt
+++ b/3rdparty/ext_exiv2/CMakeLists.txt
@@ -12,6 +12,5 @@ ExternalProject_Add( ext_exiv2
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_exiv2} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DEXIV2_ENABLE_BUILD_SAMPLES=OFF -DEXIV2_ENABLE_BUILD_PO=OFF -DEXIV2_ENABLE_NLS=OFF -DICONV_INCLUDE_DIR=${PREFIX_ext_exiv2}/include
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_iconv ext_zlib ext_expat
)
diff --git a/3rdparty/ext_expat/CMakeLists.txt b/3rdparty/ext_expat/CMakeLists.txt
index 8d297addd1f9c9b2d9dcdae97c8859d9c2e364bd..cc0b28043c5ceec37bb008d4e48de421ea186e7c 100755
--- a/3rdparty/ext_expat/CMakeLists.txt
+++ b/3rdparty/ext_expat/CMakeLists.txt
@@ -11,7 +11,6 @@ ExternalProject_Add( ext_expat
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_expat} -DBUILD_tests=OFF -DBUILD_examples=OFF -DBUILD_tools=OFF -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_patch
)
@@ -28,7 +27,6 @@ ExternalProject_Add( ext_expat
INSTALL_COMMAND make install
UPDATE_COMMAND ""
- ALWAYS 0
)
diff --git a/3rdparty/ext_fftw3/CMakeLists.txt b/3rdparty/ext_fftw3/CMakeLists.txt
index 8baba645d8f42904b264ead3e756f8b7068f162d..f2dc3ec8cdc16dba83cec51b37c878874d2c2c2e 100755
--- a/3rdparty/ext_fftw3/CMakeLists.txt
+++ b/3rdparty/ext_fftw3/CMakeLists.txt
@@ -14,7 +14,6 @@ if (MSVC)
COMMAND ${CMAKE_COMMAND} -E copy_directory /include ${PREFIX_ext_fftw3}/include
UPDATE_COMMAND ""
- ALWAYS 0
)
else()
ExternalProject_Add( ext_fftw3
@@ -30,7 +29,6 @@ if (MSVC)
COMMAND ${CMAKE_COMMAND} -E copy_directory /include ${PREFIX_ext_fftw3}/include
UPDATE_COMMAND ""
- ALWAYS 0
)
endif()
elseif (MINGW)
@@ -48,7 +46,6 @@ elseif (MINGW)
COMMAND ${CMAKE_COMMAND} -E copy_directory /include ${PREFIX_ext_fftw3}/include
UPDATE_COMMAND ""
- ALWAYS 0
)
else("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
ExternalProject_Add( ext_fftw3
@@ -64,7 +61,6 @@ elseif (MINGW)
COMMAND ${CMAKE_COMMAND} -E copy_directory /include ${PREFIX_ext_fftw3}/include
UPDATE_COMMAND ""
- ALWAYS 0
)
endif("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
else ()
@@ -79,6 +75,5 @@ ExternalProject_Add( ext_fftw3
INSTALL_COMMAND make install
UPDATE_COMMAND ""
- ALWAYS 0
)
endif ()
diff --git a/3rdparty/ext_fontconfig/CMakeLists.txt b/3rdparty/ext_fontconfig/CMakeLists.txt
index 9bd90758954c5bcc9669b57b24d618bd1b648f17..a013c04fb85cf64b5625ae97a8293886ea013385 100755
--- a/3rdparty/ext_fontconfig/CMakeLists.txt
+++ b/3rdparty/ext_fontconfig/CMakeLists.txt
@@ -9,5 +9,4 @@ ExternalProject_Add( ext_fontconfig
INSTALL_COMMAND make install
UPDATE_COMMAND ""
- ALWAYS 0
)
diff --git a/3rdparty/ext_frameworks/CMakeLists.txt b/3rdparty/ext_frameworks/CMakeLists.txt
index 3e0dea3c7c5a5cb61416f0b396f923ae2793e38d..4810deb6e2ce6b894ee600fb6d2450b85d9d84ae 100755
--- a/3rdparty/ext_frameworks/CMakeLists.txt
+++ b/3rdparty/ext_frameworks/CMakeLists.txt
@@ -18,7 +18,7 @@ SET(EXTPREFIX_frameworks "${EXTPREFIX}" )
ExternalProject_Add(
ext_extra_cmake_modules
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://download.kde.org/stable/frameworks/5.24/extra-cmake-modules-5.24.0.zip
+ URL http://download.kde.org/Attic/frameworks/5.24/extra-cmake-modules-5.24.0.zip
URL_MD5 e0c19ba97ebd964f9bdc9110c64ce96a
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/ecm_install_to_share.diff
INSTALL_DIR ${EXTPREFIX_frameworks}
@@ -28,14 +28,13 @@ ExternalProject_Add(
-DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
-DBUILD_TESTING=false
UPDATE_COMMAND ""
- ALWAYS 0
)
ExternalProject_Add(
ext_karchive
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://download.kde.org/stable/frameworks/5.24/karchive-5.24.0.zip
+ URL http://download.kde.org/Attic/frameworks/5.24/karchive-5.24.0.zip
URL_MD5 739843accfe9bd85ab2f1582722cf01e
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
@@ -44,7 +43,6 @@ ExternalProject_Add(
-DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
-DBUILD_TESTING=false
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_extra_cmake_modules
)
@@ -52,7 +50,7 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kconfig
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://download.kde.org/stable/frameworks/5.24/kconfig-5.24.0.zip
+ URL http://download.kde.org/Attic/frameworks/5.24/kconfig-5.24.0.zip
URL_MD5 f87ecff795eb76e4ec6561758a5baf87
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/kconfig.diff
INSTALL_DIR ${EXTPREFIX_frameworks}
@@ -62,7 +60,6 @@ ExternalProject_Add(
-DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
-DBUILD_TESTING=false
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_karchive
)
@@ -70,7 +67,7 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kwidgetsaddons
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://download.kde.org/stable/frameworks/5.24/kwidgetsaddons-5.24.0.zip
+ URL http://download.kde.org/Attic/frameworks/5.24/kwidgetsaddons-5.24.0.zip
URL_MD5 0e399b427814a4814c65a3cf407f9d79
INSTALL_DIR ${EXTPREFIX_frameworks}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/kwidgetsaddons.diff
@@ -80,7 +77,6 @@ ExternalProject_Add(
-DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
-DBUILD_TESTING=false
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_kconfig
)
@@ -88,7 +84,7 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kcompletion
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://download.kde.org/stable/frameworks/5.24/kcompletion-5.24.0.zip
+ URL http://download.kde.org/Attic/frameworks/5.24/kcompletion-5.24.0.zip
URL_MD5 e8764251ab45005aa81dba242852300c
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
@@ -97,7 +93,6 @@ ExternalProject_Add(
-DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
-DBUILD_TESTING=false
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_kwidgetsaddons
)
@@ -105,7 +100,7 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kcoreaddons
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://download.kde.org/stable/frameworks/5.24/kcoreaddons-5.24.0.zip
+ URL http://download.kde.org/Attic/frameworks/5.24/kcoreaddons-5.24.0.zip
URL_MD5 2885878625b19ad0300ef3770b897112
INSTALL_DIR ${EXTPREFIX_frameworks}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/desktoptojson.diff
@@ -115,7 +110,6 @@ ExternalProject_Add(
-DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
-DBUILD_TESTING=false
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_kcompletion
)
@@ -123,7 +117,7 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kguiaddons
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://download.kde.org/stable/frameworks/5.24/kguiaddons-5.24.0.zip
+ URL http://download.kde.org/Attic/frameworks/5.24/kguiaddons-5.24.0.zip
URL_MD5 9bdadbc57d0634816ef80ee9798c3d6c
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
@@ -132,7 +126,6 @@ ExternalProject_Add(
-DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
-DBUILD_TESTING=false
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_kcoreaddons
)
@@ -151,7 +144,6 @@ ExternalProject_Add(
-DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
-DBUILD_TESTING=false
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_kguiaddons
)
@@ -159,7 +151,7 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kitemmodels
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://download.kde.org/stable/frameworks/5.24/kitemmodels-5.24.0.zip
+ URL http://download.kde.org/Attic/frameworks/5.24/kitemmodels-5.24.0.zip
URL_MD5 ff41589f48395fc01d5fc7887593779d
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
@@ -168,14 +160,13 @@ ExternalProject_Add(
-DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
-DBUILD_TESTING=false
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_ki18n
)
ExternalProject_Add(
ext_kitemviews
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://download.kde.org/stable/frameworks/5.24/kitemviews-5.24.0.zip
+ URL http://download.kde.org/Attic/frameworks/5.24/kitemviews-5.24.0.zip
URL_MD5 33f638d027a3011a6a69f7484eee3287
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
@@ -184,14 +175,13 @@ ExternalProject_Add(
-DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
-DBUILD_TESTING=false
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_kitemmodels
)
ExternalProject_Add(
ext_kimageformats
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://download.kde.org/stable/frameworks/5.24/kimageformats-5.24.0.zip
+ URL http://download.kde.org/Attic/frameworks/5.24/kimageformats-5.24.0.zip
URL_MD5 c1964516bcb2bfe882858f0c0913deb5
INSTALL_DIR ${EXTPREFIX_frameworks}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/kimageformats.diff
@@ -201,14 +191,13 @@ ExternalProject_Add(
-DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
-DBUILD_TESTING=false
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_kitemviews
)
ExternalProject_Add(
ext_kwindowsystem
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://download.kde.org/stable/frameworks/5.24/kwindowsystem-5.24.0.zip
+ URL http://download.kde.org/Attic/frameworks/5.24/kwindowsystem-5.24.0.zip
URL_MD5 5915e4f63ded983af6db7db3a6cbae1a
INSTALL_DIR ${EXTPREFIX_frameworks}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/kwindowsystem-x11.diff
@@ -218,14 +207,13 @@ ExternalProject_Add(
-DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
-DBUILD_TESTING=false
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_kimageformats
)
ExternalProject_Add(
ext_kcrash
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://download.kde.org/stable/frameworks/5.24/kcrash-5.24.0.zip
+ URL http://download.kde.org/Attic/frameworks/5.24/kcrash-5.24.0.zip
URL_MD5 a2e41e6650105fc3ac8fbd44afbae4fe
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
@@ -234,6 +222,5 @@ ExternalProject_Add(
-DCMAKE_SYSTEM_PREFIX_PATH=${EXTPREFIX}
-DBUILD_TESTING=false
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_kwindowsystem
)
diff --git a/3rdparty/ext_freetype/CMakeLists.txt b/3rdparty/ext_freetype/CMakeLists.txt
index e53643a28473bbca1eb5b35ae71dc4269f11ce1a..13cddbfed994b3994fcfcc1585826a7b3b588a79 100755
--- a/3rdparty/ext_freetype/CMakeLists.txt
+++ b/3rdparty/ext_freetype/CMakeLists.txt
@@ -8,5 +8,4 @@ ExternalProject_Add( ext_freetype
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_freetype} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
)
diff --git a/3rdparty/ext_gettext/CMakeLists.txt b/3rdparty/ext_gettext/CMakeLists.txt
index b72178076b7225e4089f50649402595318cea70d..519c77b81f85545003246e87d9f1b7599f95d2b4 100644
--- a/3rdparty/ext_gettext/CMakeLists.txt
+++ b/3rdparty/ext_gettext/CMakeLists.txt
@@ -11,7 +11,6 @@ ExternalProject_Add(
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_gettext} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_patch ext_iconv
)
else (MSVC OR MINGW)
@@ -26,7 +25,6 @@ ExternalProject_Add( ext_gettext
INSTALL_COMMAND make install
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_iconv
)
endif (MSVC OR MINGW)
diff --git a/3rdparty/ext_gsl/CMakeLists.txt b/3rdparty/ext_gsl/CMakeLists.txt
index 38f32cefd62b01466f0fa2793bb91de6dd044a40..2a02f23889f625b2f746342b5315325c7a404e56 100644
--- a/3rdparty/ext_gsl/CMakeLists.txt
+++ b/3rdparty/ext_gsl/CMakeLists.txt
@@ -11,7 +11,6 @@ ExternalProject_Add(
INSTALL_DIR ${EXTPREFIX_gsl}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_gsl} -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
)
else()
ExternalProject_Add( ext_gsl
@@ -23,6 +22,5 @@ ExternalProject_Add( ext_gsl
INSTALL_DIR ${EXTPREFIX_gsl}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_gsl} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DGSL_SHARED=ON
UPDATE_COMMAND ""
- ALWAYS 0
)
endif()
diff --git a/3rdparty/ext_iconv/CMakeLists.txt b/3rdparty/ext_iconv/CMakeLists.txt
index 4087a298afb24e0a0f2e6627c313738ed4584902..9b7f799db8acc37d7def01a9b12acbd62bb5ac72 100755
--- a/3rdparty/ext_iconv/CMakeLists.txt
+++ b/3rdparty/ext_iconv/CMakeLists.txt
@@ -9,7 +9,6 @@ ExternalProject_Add( ext_iconv
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_iconv} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
)
else ()
ExternalProject_Add( ext_iconv
@@ -25,7 +24,6 @@ ExternalProject_Add( ext_iconv
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
- ALWAYS 0
)
endif ()
diff --git a/3rdparty/ext_ilmbase/CMakeLists.txt b/3rdparty/ext_ilmbase/CMakeLists.txt
index 0ca9f2d2efcfc708ee392aadb023c7e3307f00a0..f37f66948270e4ab81bbea89e74e1308fdfab7b9 100755
--- a/3rdparty/ext_ilmbase/CMakeLists.txt
+++ b/3rdparty/ext_ilmbase/CMakeLists.txt
@@ -7,7 +7,6 @@ ExternalProject_Add( ext_ilmbase
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_ilmbase} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DNAMESPACE_VERSIONING=OFF
UPDATE_COMMAND ""
- ALWAYS 0
)
if (MSVC)
diff --git a/3rdparty/ext_jpeg/CMakeLists.txt b/3rdparty/ext_jpeg/CMakeLists.txt
index 168603644cbee5c0dc5b89a3281f1c1f032ca453..834fdc4a521fd248819677f362284adb05026786 100755
--- a/3rdparty/ext_jpeg/CMakeLists.txt
+++ b/3rdparty/ext_jpeg/CMakeLists.txt
@@ -9,7 +9,6 @@ ExternalProject_Add( ext_jpeg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_jpeg} -DWITH_SIMD=OFF -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
)
else()
ExternalProject_Add( ext_jpeg
@@ -22,6 +21,5 @@ ExternalProject_Add( ext_jpeg
INSTALL_COMMAND make install
UPDATE_COMMAND ""
- ALWAYS 0
)
endif()
diff --git a/3rdparty/ext_lcms2/CMakeLists.txt b/3rdparty/ext_lcms2/CMakeLists.txt
index 032e759376a3947ca47c6f3262597c7fd16a1370..6323ec1de9d3b596e5eae57040435a76f9b4ed6d 100755
--- a/3rdparty/ext_lcms2/CMakeLists.txt
+++ b/3rdparty/ext_lcms2/CMakeLists.txt
@@ -10,7 +10,6 @@ ExternalProject_Add( ext_lcms2
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_lcms2} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DBUILD_TESTS=FALSE -DBUILD_UTILS=FALSE -DBUILD_STATIC=FALSE
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_patch
)
else (MSVC OR MINGW)
@@ -24,6 +23,5 @@ ExternalProject_Add( ext_lcms2
INSTALL_COMMAND make install
UPDATE_COMMAND ""
- ALWAYS 0
)
endif (MSVC OR MINGW)
diff --git a/3rdparty/ext_libraw/CMakeLists.txt b/3rdparty/ext_libraw/CMakeLists.txt
index d212a94c4b34eb111ef48cb961ef026b241d307b..a1c72664018175974d09ce26ff054cbe6477d2d1 100755
--- a/3rdparty/ext_libraw/CMakeLists.txt
+++ b/3rdparty/ext_libraw/CMakeLists.txt
@@ -8,7 +8,6 @@ ExternalProject_Add( ext_libraw
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_libraw} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_lcms2 ext_jpeg
)
diff --git a/3rdparty/ext_libxml2/CMakeLists.txt b/3rdparty/ext_libxml2/CMakeLists.txt
index f5c023e0c66acd3cc65060ef7f4f11b2796917c9..c625da2475397b2fd6435e5539aecc40739ab56c 100755
--- a/3rdparty/ext_libxml2/CMakeLists.txt
+++ b/3rdparty/ext_libxml2/CMakeLists.txt
@@ -10,7 +10,6 @@ if (MSVC OR MINGW)
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_libxml2} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_patch ext_iconv ext_zlib
)
else (MSVC OR MINGW)
@@ -25,7 +24,6 @@ else (MSVC OR MINGW)
INSTALL_COMMAND make install
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_iconv ext_zlib
)
endif (MSVC OR MINGW)
diff --git a/3rdparty/ext_libxslt/CMakeLists.txt b/3rdparty/ext_libxslt/CMakeLists.txt
index d31d2b5aedab26d555b3471096629b5d6d78aad1..ef6950d78728f3fefc765ca3daf6ef2b9a1959db 100755
--- a/3rdparty/ext_libxslt/CMakeLists.txt
+++ b/3rdparty/ext_libxslt/CMakeLists.txt
@@ -10,7 +10,6 @@ ExternalProject_Add( ext_libxslt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_libxslt} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_patch ext_libxml2
)
else (MSVC OR MINGW)
@@ -24,7 +23,6 @@ ExternalProject_Add( ext_libxslt
INSTALL_COMMAND make install
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_libxml2
)
endif (MSVC OR MINGW)
diff --git a/3rdparty/ext_ocio/CMakeLists.txt b/3rdparty/ext_ocio/CMakeLists.txt
index 2b2e6703ddeea04a5658ba686fcff41373974cce..3fa2cc767116e819d1d98bfa51b0411382b59efd 100644
--- a/3rdparty/ext_ocio/CMakeLists.txt
+++ b/3rdparty/ext_ocio/CMakeLists.txt
@@ -17,7 +17,6 @@ ExternalProject_Add(
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_ocio} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DOCIO_BUILD_APPS=OFF -DOCIO_BUILD_TRUELIGHT=OFF -DOCIO_BUILD_NUKE=OFF -DOCIO_BUILD_DOCS=OFF -DOCIO_BUILD_TESTS=OFF -DOCIO_BUILD_PYGLUE=OFF -DOCIO_BUILD_STATIC_JNIGLUE=OFF
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_boost
)
else()
@@ -31,7 +30,6 @@ ExternalProject_Add(
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_ocio} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DOCIO_BUILD_APPS=OFF -DOCIO_BUILD_TRUELIGHT=OFF -DOCIO_BUILD_NUKE=OFF -DOCIO_BUILD_DOCS=OFF -DOCIO_BUILD_TESTS=OFF -DOCIO_BUILD_PYGLUE=OFF -DOCIO_BUILD_STATIC_JNIGLUE=OFF
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_boost
)
endif()
diff --git a/3rdparty/ext_openexr/CMakeLists.txt b/3rdparty/ext_openexr/CMakeLists.txt
index 7b4f5c45a4c7a5cca5f60290811dfb0f003342ed..fc340108c1f0e5387fca95ce836fc9773070523f 100755
--- a/3rdparty/ext_openexr/CMakeLists.txt
+++ b/3rdparty/ext_openexr/CMakeLists.txt
@@ -12,7 +12,6 @@ ExternalProject_Add( ext_openexr
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_openexr} -DILMBASE_PACKAGE_PREFIX=${EXTPREFIX_openexr} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DNAMESPACE_VERSIONING=OFF
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_ilmbase ext_zlib
)
else()
@@ -27,7 +26,6 @@ ExternalProject_Add(ext_openexr
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_openexr} -DILMBASE_PACKAGE_PREFIX=${EXTPREFIX_openexr} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DNAMESPACE_VERSIONING=OFF
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_ilmbase ext_zlib
)
endif()
diff --git a/3rdparty/ext_patch/CMakeLists.txt b/3rdparty/ext_patch/CMakeLists.txt
index 110bd5071784fca8e466e1cf97d13b792841748f..314bff05ce133bd3fc295fbeee8c63f46dd0738e 100755
--- a/3rdparty/ext_patch/CMakeLists.txt
+++ b/3rdparty/ext_patch/CMakeLists.txt
@@ -10,5 +10,4 @@ ExternalProject_Add( ext_patch
COMMAND ${CMAKE_COMMAND} -E copy bin/patch.exe ${PREFIX_ext_patch}/bin/myptch.exe
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
- ALWAYS 0
)
diff --git a/3rdparty/ext_png/CMakeLists.txt b/3rdparty/ext_png/CMakeLists.txt
index bf67d146e3291206b3c2a2cd606326b63b7b9bcb..b5ac62d0f6a30bc1a688e8cd21a818ba3bf7893e 100755
--- a/3rdparty/ext_png/CMakeLists.txt
+++ b/3rdparty/ext_png/CMakeLists.txt
@@ -8,6 +8,5 @@ ExternalProject_Add( ext_png
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_png} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_zlib
)
diff --git a/3rdparty/ext_png2ico/CMakeLists.txt b/3rdparty/ext_png2ico/CMakeLists.txt
index 17e0b03204797dfb6f4bbc6726097d64b60f3057..1d44fe6274c26877a9b0a76065add84efa1e8574 100755
--- a/3rdparty/ext_png2ico/CMakeLists.txt
+++ b/3rdparty/ext_png2ico/CMakeLists.txt
@@ -12,5 +12,4 @@ ExternalProject_Add( ext_png2ico
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
- ALWAYS 0
)
diff --git a/3rdparty/ext_poppler/CMakeLists.txt b/3rdparty/ext_poppler/CMakeLists.txt
index 3a0074dc7fd884a6e96b9f301ded8baf8ce4ee92..e2b3c9a7854bb90922ce63a08d5b0a50c7f70b2c 100755
--- a/3rdparty/ext_poppler/CMakeLists.txt
+++ b/3rdparty/ext_poppler/CMakeLists.txt
@@ -9,5 +9,4 @@ ExternalProject_Add( ext_poppler
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_poppler} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DBUILD_GTK_TESTS=OFF -DBUILD_QT5_TESTS=FALSE -BUILD_CPP_TESTS=FALSE -DENABLE_UTILS=FALSE -DENABLE_GLIB=FALSE -DENABLE_LIBOPENJPEG=FALSE
UPDATE_COMMAND ""
- ALWAYS 0
)
diff --git a/3rdparty/ext_pthreads/CMakeLists.txt b/3rdparty/ext_pthreads/CMakeLists.txt
index b80490d507d0d808db1a3a07d85324b5a8b33349..42d539bab1f39af2e3ad8a2c8c003c643f3fa0bf 100755
--- a/3rdparty/ext_pthreads/CMakeLists.txt
+++ b/3rdparty/ext_pthreads/CMakeLists.txt
@@ -9,6 +9,5 @@ ExternalProject_Add( ext_pthreads
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_pthreads} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_patch
)
diff --git a/3rdparty/ext_qt/CMakeLists.txt b/3rdparty/ext_qt/CMakeLists.txt
index a7b99bb7a127a0d05f9311fb4b36bc0ae30cc97e..3d05473fefbed2db0f29278b5cc263941e943d6b 100644
--- a/3rdparty/ext_qt/CMakeLists.txt
+++ b/3rdparty/ext_qt/CMakeLists.txt
@@ -12,16 +12,15 @@ if (WIN32)
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-Hack-for-fullscreen-workaround.patch
INSTALL_DIR ${EXTPREFIX_qt}
- CONFIGURE_COMMAND /configure.bat -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia -skip qtsensors -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtxmlpatterns -no-sql-sqlite -nomake examples -nomake tools -no-compile-examples -no-dbus -no-iconv -no-angle -no-ssl -no-openssl -no-wmf-backend -no-qml-debug -no-libproxy -no-system-proxies -no-nis -no-icu -no-mtdev -opensource -confirm-license -release -opengl desktop -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -prefix ${EXTPREFIX_qt} -platform win32-g++
+ CONFIGURE_COMMAND /configure.bat -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtsensors -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtxmlpatterns -no-sql-sqlite -nomake examples -nomake tools -no-compile-examples -no-dbus -no-iconv -no-angle -no-ssl -no-openssl -no-wmf-backend -no-qml-debug -no-libproxy -no-system-proxies -no-nis -no-icu -no-mtdev -opensource -confirm-license -release -opengl desktop -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -prefix ${EXTPREFIX_qt} -platform win32-g++
# use this line for building Qt with debugging info enabled
- #CONFIGURE_COMMAND /configure.bat -release -force-debug-info -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia -skip qtsensors -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtxmlpatterns -no-sql-sqlite -nomake examples -nomake tools -no-compile-examples -no-dbus -no-iconv -no-angle -no-ssl -no-openssl -no-wmf-backend -no-qml-debug -no-libproxy -no-system-proxies -no-nis -no-icu -no-mtdev -opensource -confirm-license -release -opengl desktop -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -prefix ${EXTPREFIX_qt} -platform win32-g++
+ #CONFIGURE_COMMAND /configure.bat -release -force-debug-info -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtsensors -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtxmlpatterns -no-sql-sqlite -nomake examples -nomake tools -no-compile-examples -no-dbus -no-iconv -no-angle -no-ssl -no-openssl -no-wmf-backend -no-qml-debug -no-libproxy -no-system-proxies -no-nis -no-icu -no-mtdev -opensource -confirm-license -release -opengl desktop -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -prefix ${EXTPREFIX_qt} -platform win32-g++
BUILD_COMMAND mingw32-make
INSTALL_COMMAND mingw32-make install
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
- ALWAYS 0
DEPENDS ext_patch
)
elseif (NOT APPLE)
@@ -33,13 +32,12 @@ elseif (NOT APPLE)
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt-no-motion-compression.diff
INSTALL_DIR ${EXTPREFIX_qt}
- CONFIGURE_COMMAND /configure -prefix ${EXTPREFIX_qt} -opensource -confirm-license -nomake examples -no-sql-sqlite -no-openssl -no-qml-debug -no-mtdev -no-journald -no-syslog -no-nis -no-cups -no-tslib -no-directfb -no-linuxfb -no-libproxy -no-pch -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-harfbuzz -qt-freetype -qt-xcb -qt-xkbcommon-x11 -optimized-qmake -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtandroidextras -skip qtserialport
+ CONFIGURE_COMMAND /configure -prefix ${EXTPREFIX_qt} -opensource -confirm-license -nomake examples -no-sql-sqlite -no-openssl -no-qml-debug -no-mtdev -no-journald -no-syslog -no-nis -no-cups -no-tslib -no-directfb -no-linuxfb -no-libproxy -no-pch -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-harfbuzz -qt-freetype -qt-xcb -qt-xkbcommon-x11 -optimized-qmake -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtandroidextras -skip qtserialport
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
- ALWAYS 0
)
else( APPLE )
@@ -176,11 +174,10 @@ else( APPLE )
PATCH_COMMAND ${ext_qt_PATCH_COMMAND}
INSTALL_DIR ${EXTPREFIX_qt}
- CONFIGURE_COMMAND /configure -confirm-license -opensource -nomake examples -no-openssl -no-compile-examples -qt-freetype -qt-harfbuzz -opengl desktop -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtxmlpatterns -prefix ${EXTPREFIX_qt}
+ CONFIGURE_COMMAND /configure -confirm-license -opensource -nomake examples -no-openssl -no-compile-examples -qt-freetype -qt-harfbuzz -opengl desktop -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtgraphicaleffects -skip qtlocation -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtxmlpatterns -prefix ${EXTPREFIX_qt}
BUILD_COMMAND ${PARALLEL_MAKE}
INSTALL_COMMAND make install
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
- ALWAYS 0
)
endif()
diff --git a/3rdparty/ext_tiff/CMakeLists.txt b/3rdparty/ext_tiff/CMakeLists.txt
index 32351b398741e5f27d03ab74198f2bb9f103187c..e3b1faa91d8ff90ebe31fec7684511607fa17550 100755
--- a/3rdparty/ext_tiff/CMakeLists.txt
+++ b/3rdparty/ext_tiff/CMakeLists.txt
@@ -10,7 +10,6 @@ ExternalProject_Add( ext_tiff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_tiff} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_patch ext_zlib ext_jpeg
)
else (MSVC OR MINGW)
@@ -24,7 +23,6 @@ ExternalProject_Add( ext_tiff
INSTALL_COMMAND make install
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_zlib ext_jpeg
)
endif (MSVC OR MINGW)
diff --git a/3rdparty/ext_vc/CMakeLists.txt b/3rdparty/ext_vc/CMakeLists.txt
index 203f4bcca96f062837c9214e653fb5de11138b37..9c218bbfab30540a6006a1f6a82f2f02c0fcfe5c 100755
--- a/3rdparty/ext_vc/CMakeLists.txt
+++ b/3rdparty/ext_vc/CMakeLists.txt
@@ -10,6 +10,5 @@ ExternalProject_Add( ext_vc
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_vc} -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DCMAKE_SYSTEM_PROCESSOR=x86
UPDATE_COMMAND ""
- ALWAYS 0
)
diff --git a/3rdparty/ext_zlib/CMakeLists.txt b/3rdparty/ext_zlib/CMakeLists.txt
index 2934bff647892c77104fb5aa650beabb78c4e2ca..1db66ffc4960d33620dd637701a13e55c276e7fa 100755
--- a/3rdparty/ext_zlib/CMakeLists.txt
+++ b/3rdparty/ext_zlib/CMakeLists.txt
@@ -11,7 +11,6 @@ ExternalProject_Add(
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_zlib} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
DEPENDS ext_patch
)
else ()
@@ -25,6 +24,5 @@ ExternalProject_Add( ext_zlib
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_zlib} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
UPDATE_COMMAND ""
- ALWAYS 0
)
endif ()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 777319ca35e92e83a63a90f543c26e7c75751580..3dd8e9e006321ec6aa55a0247185826d3e05948f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,10 +73,10 @@ set(KRITA_VERSION_STRING "3.1.88")
set(KRITA_STABLE_VERSION_MAJOR 3) # 3 for 3.x, 4 for 4.x, etc.
set(KRITA_STABLE_VERSION_MINOR 1) # 0 for 3.0, 1 for 3.1, etc.
set(KRITA_VERSION_RELEASE 88) # 88 for pre-alpha, 89 for Alpha, increase for next test releases, set 0 for first Stable, etc.
-#set(KRITA_ALPHA 1) # uncomment only for Alpha
-set(KRITA_BETA 1) # uncomment only for Beta
+set(KRITA_ALPHA 1) # uncomment only for Alpha
+#set(KRITA_BETA 1) # uncomment only for Beta
#set(KRITA_RC 1) # uncomment only for RC
-set(KRITA_YEAR 2016) # update every year
+set(KRITA_YEAR 2017) # update every year
if(NOT DEFINED KRITA_ALPHA AND NOT DEFINED KRITA_BETA AND NOT DEFINED KRITA_RC)
set(KRITA_STABLE 1) # do not edit
@@ -141,9 +141,6 @@ set(KRITA_BROKEN_TESTS "" CACHE INTERNAL "KRITA_BROKEN_TESTS")
include(FeatureSummary)
-option(PACKAGERS_BUILD "Build support of multiple CPU architectures in one binary. Should be used by packagers only or Krita developers. Only switch off when you're an artist optimizing a build for your very own machine." ON)
-add_feature_info("Packagers' Build" PACKAGERS_BUILD "Support several CPU arch in one binary. Recommended for packages. Switch this off to make a build for only your machine.")
-
if (WIN32)
option(USE_DRMINGW "Support the Dr. Mingw crash handler (only on windows)" ON)
add_feature_info("Dr. Mingw" USE_DRMINGW "Enable the Dr. Mingw crash handler")
@@ -252,11 +249,22 @@ macro_ensure_out_of_source_build("Compiling Krita inside the source directory is
# Note: OPTIONAL_COMPONENTS does not seem to be reliable
# (as of ECM 5.15.0, CMake 3.2)
+
+find_package(Qt5Multimedia ${MIN_QT_VERSION})
+set_package_properties(Qt5Multimedia PROPERTIES
+ DESCRIPTION "Qt multimedia integration"
+ URL "http://www.qt.io/"
+ TYPE OPTIONAL
+ PURPOSE "Optionally used to provide sound support for animations")
+
+macro_bool_to_01(Qt5Multimedia_FOUND HAVE_QT_MULTIMEDIA)
+configure_file(config-qtmultimedia.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-qtmultimedia.h )
+
if (NOT WIN32 AND NOT APPLE)
find_package(Qt5 ${MIN_QT_VERSION} REQUIRED X11Extras)
- find_package(Qt5DBus ${MIN_QT_VERSION} QUIET)
+ find_package(Qt5DBus ${MIN_QT_VERSION})
set(HAVE_DBUS ${Qt5DBus_FOUND})
set_package_properties(Qt5DBus PROPERTIES
DESCRIPTION "Qt DBUS integration"
@@ -264,7 +272,7 @@ if (NOT WIN32 AND NOT APPLE)
TYPE OPTIONAL
PURPOSE "Optionally used to provide a dbus api on Linux")
- find_package(KF5KIO ${MIN_FRAMEWORKS_VERSION} QUIET)
+ find_package(KF5KIO ${MIN_FRAMEWORKS_VERSION})
macro_bool_to_01(KF5KIO_FOUND HAVE_KIO)
set_package_properties(KF5KIO PROPERTIES
DESCRIPTION "KDE's KIO Framework"
@@ -272,7 +280,7 @@ if (NOT WIN32 AND NOT APPLE)
TYPE OPTIONAL
PURPOSE "Optionally used for recent document handling")
- find_package(KF5Crash ${MIN_FRAMEWORKS_VERSION} QUIET)
+ find_package(KF5Crash ${MIN_FRAMEWORKS_VERSION})
macro_bool_to_01(KF5Crash_FOUND HAVE_KCRASH)
set_package_properties(KF5Crash PROPERTIES
DESCRIPTION "KDE's Crash Handler"
@@ -292,6 +300,7 @@ else()
set(HAVE_XCB FALSE)
endif()
+
add_definitions(
-DQT_USE_QSTRINGBUILDER
-DQT_STRICT_ITERATORS
@@ -513,7 +522,6 @@ if( NOT MSVC)
TYPE OPTIONAL
PURPOSE "Required by the Krita for vectorization")
macro_bool_to_01(Vc_FOUND HAVE_VC)
- macro_bool_to_01(PACKAGERS_BUILD DO_PACKAGERS_BUILD)
endif()
configure_file(config-vc.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-vc.h )
@@ -539,25 +547,12 @@ if(HAVE_VC)
endif()
macro(ko_compile_for_all_implementations_no_scalar _objs _src)
- if(PACKAGERS_BUILD)
vc_compile_for_all_implementations(${_objs} ${_src} FLAGS ${ADDITIONAL_VC_FLAGS} ONLY SSE2 SSSE3 SSE4_1 AVX AVX2+FMA+BMI2)
- else()
- set(${_objs} ${_src})
- endif()
endmacro()
macro(ko_compile_for_all_implementations _objs _src)
- if(PACKAGERS_BUILD)
vc_compile_for_all_implementations(${_objs} ${_src} FLAGS ${ADDITIONAL_VC_FLAGS} ONLY Scalar SSE2 SSSE3 SSE4_1 AVX AVX2+FMA+BMI2)
- else()
- set(${_objs} ${_src})
- endif()
endmacro()
-
- if (NOT PACKAGERS_BUILD)
- # Optimize everything for the current architecture
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Vc_DEFINITIONS}")
- endif ()
endif()
set(CMAKE_MODULE_PATH ${OLD_CMAKE_MODULE_PATH} )
diff --git a/README.md b/README.md
index a47243500cfd43b0137b3549db43b51525254ecf..a35a1aedda037d0bed8f36305a998507247cb793 100644
--- a/README.md
+++ b/README.md
@@ -3,9 +3,9 @@
Krita is a free and open source digital painting application. It is for artists who want to create professional work from start to end. Krita is used by comic book artists, illustrators, concept artists, matte and texture painters and in the digital VFX industry.
If you are reading this on Github, be aware that this is just a mirror. Our real
-code repository is provided by KDE: https://phabricator.kde.org/diffusion/KRITA/
+code repository is provided by KDE: https://phabricator.kde.org/source/krita/
-This repository contains the current, Qt5-based, development version of Krita 3. Krita 3.0 has been released and development on Krita 2.9 has stopped. Krita 2.9 was part of Calligra: https://phabricator.kde.org/diffusion/CALLIGRA/
+This repository contains the current, Qt5-based, development version of Krita 3. Krita 3.0 has been released and development on Krita 2.9 has stopped. Krita 2.9 was part of Calligra: https://phabricator.kde.org/source/krita/
![Picture] (https://krita.org/wp-content/uploads/2016/04/krita-30-screenshot.jpg)
diff --git a/README_PACKAGERS.md b/README_PACKAGERS.md
index 53f3da7d4819e2c8fe6e592815e194e2f6410eff..ef66f9d14ea67725b1d5398fba820bf00a1e2fcd 100644
--- a/README_PACKAGERS.md
+++ b/README_PACKAGERS.md
@@ -29,8 +29,6 @@ There are four forks of 3rd party libraries that are relevant and cannot be repl
== Build flags ==
-Packagers must build krita with the PACKAGERS_BUILD flag enabled. This makes sure that object files for all SIMD vectorization extensions krita supports are built. The right one is then selected run-time.
-
Krita no longer supports a build without OpenGL.
For alpha and beta packages, please build with debug output enabled, but for production packages the -DCMAKE_CXX_FLAGS="-DKDE_NO_DEBUG_OUTPUT" is recommended. A significant performance increase will be the result.
diff --git a/benchmarks/kis_bcontrast_benchmark.cpp b/benchmarks/kis_bcontrast_benchmark.cpp
index 109c398700217ed31191d922a62eba09778ad08f..bc5e8d04fda9ab8cf7dab6986ae7ec3d914b0f19 100644
--- a/benchmarks/kis_bcontrast_benchmark.cpp
+++ b/benchmarks/kis_bcontrast_benchmark.cpp
@@ -68,7 +68,7 @@ void KisBContrastBenchmark::cleanupTestCase()
void KisBContrastBenchmark::benchmarkFilter()
{
KisFilterSP filter = KisFilterRegistry::instance()->value("brightnesscontrast");
- KisFilterConfigurationSP kfc = filter->defaultConfiguration(m_device);
+ KisFilterConfigurationSP kfc = filter->defaultConfiguration();
// Get the predefined configuration from a file
QFile file(QString(FILES_DATA_DIR) + QDir::separator() + filter->id() + ".cfg");
diff --git a/benchmarks/kis_blur_benchmark.cpp b/benchmarks/kis_blur_benchmark.cpp
index 80d24578ac714534a15e03dfdfeae9aace85837e..7c7057aaebf79e030601368fdb33e9fd41eee147 100644
--- a/benchmarks/kis_blur_benchmark.cpp
+++ b/benchmarks/kis_blur_benchmark.cpp
@@ -66,7 +66,7 @@ void KisBlurBenchmark::cleanupTestCase()
void KisBlurBenchmark::benchmarkFilter()
{
KisFilterSP filter = KisFilterRegistry::instance()->value("blur");
- KisFilterConfigurationSP kfc = filter->defaultConfiguration(m_device);
+ KisFilterConfigurationSP kfc = filter->defaultConfiguration();
// Get the predefined configuration from a file
QFile file(QString(FILES_DATA_DIR) + QDir::separator() + filter->id() + ".cfg");
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
diff --git a/benchmarks/kis_filter_selections_benchmark.cpp b/benchmarks/kis_filter_selections_benchmark.cpp
index 7c78cc8a1d414c3325154dd663fc67f82f3cc471..0ddf4996152f4b18c4f8e4346dc58cb7c335f115 100644
--- a/benchmarks/kis_filter_selections_benchmark.cpp
+++ b/benchmarks/kis_filter_selections_benchmark.cpp
@@ -106,7 +106,7 @@ void KisFilterSelectionsBenchmark::initFilter(const QString &name)
{
m_filter = KisFilterRegistry::instance()->value(name);
Q_ASSERT(m_filter);
- m_configuration = m_filter->defaultConfiguration(0);
+ m_configuration = m_filter->defaultConfiguration();
dbgKrita << "Filter initialized:" << name;
}
diff --git a/config-qtmultimedia.h.cmake b/config-qtmultimedia.h.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..ca655089f5fecd9361c6b27a7b2fdaf884638d73
--- /dev/null
+++ b/config-qtmultimedia.h.cmake
@@ -0,0 +1,4 @@
+/* config-qtmultimedia.h. Generated by cmake from config-gsl.h.cmake */
+
+/* Defines if you have Qt Multimedia component */
+#cmakedefine HAVE_QT_MULTIMEDIA 1
diff --git a/config-vc.h.cmake b/config-vc.h.cmake
index e2b6adaa0dfd074917fef50dfb1c39a42ce12faf..489dd7d888d80f9a4d8092c54427f9b50e4e13ce 100644
--- a/config-vc.h.cmake
+++ b/config-vc.h.cmake
@@ -2,4 +2,3 @@
/* Define if you have Vc, the vectorization library */
#cmakedefine HAVE_VC 1
-#cmakedefine DO_PACKAGERS_BUILD 1
diff --git a/krita/data/aboutdata/backers.txt b/krita/data/aboutdata/backers.txt
index 3d84495d8a0c424cf0dfc8ff3bc1a4e412048ee4..4895596389a43448c84056172c8c1fc58feab1dd 100644
--- a/krita/data/aboutdata/backers.txt
+++ b/krita/data/aboutdata/backers.txt
@@ -443,6 +443,7 @@ sam@cmpct
Sami Kyöstilä
Samuel Stoney
Sarah Laufer
+Shawn Rutledge
Scott Petrovic
Scott Wilson
Scotty
diff --git a/krita/data/kritarc b/krita/data/kritarc
index fd0cb3e3730c38b6d567b3b2be7d7093c4c23b95..599c527b7844fbf6d9800855477c57346de38e70 100644
--- a/krita/data/kritarc
+++ b/krita/data/kritarc
@@ -103,6 +103,7 @@ showAdditionalOnionSkinsSettings=true
toolbarslider_1=opacity
toolbarslider_2=size
toolbarslider_3=flow
+favoriteCompositeOps=normal,erase,multiply,burn,darken,add,dodge,screen,overlay,soft_light_svg,luminize,lighten,saturation,color
[advancedColorSelector]
allowHorizontalLayout=true
@@ -465,3 +466,4 @@ LastReturnType=Custom Document
[theme]
Theme=Krita dark
+
diff --git a/krita/data/paintoppresets/kis_paintoppresets_tags.xml b/krita/data/paintoppresets/kis_paintoppresets_tags.xml
index 9ea6708fa7a5ce967f004085fe11b242c0388932..cc7337730ac96acb61838e45d9b20adb275d45fa 100644
--- a/krita/data/paintoppresets/kis_paintoppresets_tags.xml
+++ b/krita/data/paintoppresets/kis_paintoppresets_tags.xml
@@ -59,4 +59,169 @@
demo
+
+ Block
+
+
+ Block
+ Wet
+
+
+ Block
+ Mix
+
+
+ FX
+
+
+ Mix
+
+
+ FX
+
+
+ Ink
+
+
+ Erasers
+
+
+ Erasers
+
+
+ Wet
+
+
+ Circle
+
+
+ Ink
+
+
+ Block
+
+
+ Block
+ Smudge
+
+
+ Mix
+
+
+ Circle
+
+
+ Wet
+
+
+ FX
+
+
+ Mix
+
+
+ FX
+
+
+ Circle
+
+
+ Smudge
+
+
+ Block
+
+
+ Mix
+
+
+ Circle
+
+
+ Block
+
+
+ Block
+
+
+ Ink
+
+
+ Wet
+
+
+ Ink
+
+
+ Erasers
+
+
+ Ink
+
+
+ Smudge
+
+
+ Smudge
+
+
+ Block
+
+
+ Ink
+
+
+ Circle
+ Ink
+
+
+ Circle
+ Ink
+
+
+ Wet
+
+
+ Erasers
+
+
+ Erasers
+
+
+ Smudge
+
+
+ Wet
+
+
+ Circle
+
+
+ FX
+
+
+ Ink
+
+
+ Wet
+
+
+ Circle
+
+
+ FX
+
+
+ PixelArt
+
+
+ PixelArt
+
+
+ PixelArt
+
+
+ PixelArt
+
+
diff --git a/krita/data/templates/.gitignore b/krita/data/templates/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..baf566cbea08d29ed30ebab1b901ba1d305012aa
--- /dev/null
+++ b/krita/data/templates/.gitignore
@@ -0,0 +1,26 @@
+*.trace
+build
+qtcreator-build
+*.kdev4
+*~
+.kateconfig
+CMakeLists.txt.user*
+*.autosave
+*.swp
+.gdb_history
+.kdev_include_paths
+*.config
+*.creator
+*.creator.user
+*.files
+*.includes
+.DS_Store
+*.kate-swap
+.idea
+GTAGS
+GPATH
+GRTAGS
+GSYMS
+BROWSE
+*.kate-swp
+
diff --git a/krita/data/templates/animation/.directory b/krita/data/templates/animation/.directory
new file mode 100644
index 0000000000000000000000000000000000000000..0113b2cbf23028bda25d165990a103faa17db14f
--- /dev/null
+++ b/krita/data/templates/animation/.directory
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Animation Templates
+Name[ca]=Plantilles d'animació
+Name[it]=Modelli di animazioni
+Name[nl]=Animatiesjablonen
+Name[pl]=Szablony animacji
+Name[pt]=Modelos de Animações
+Name[uk]=Шаблони анімацій
+Name[x-test]=xxAnimation Templatesxx
+X-KDE-DefaultTab=true
diff --git a/krita/data/templates/animation/Anim-Jp-EN.desktop b/krita/data/templates/animation/Anim-Jp-EN.desktop
index 0833bf71bb7ab8b6a59118519ce3de1640cf7428..5734b9c4e3310dafd390bca72188514ec1abac98 100644
--- a/krita/data/templates/animation/Anim-Jp-EN.desktop
+++ b/krita/data/templates/animation/Anim-Jp-EN.desktop
@@ -19,3 +19,4 @@ Name[sk]=Animation-Japanese-En
Name[sv]=Animering-japanska-en
Name[uk]=Японська анімація (англійською)
Name[x-test]=xxAnimation-Japanese-Enxx
+Name[zh_CN]=日本动画 (英式)
diff --git a/krita/data/templates/animation/Anim-Jp-JP.desktop b/krita/data/templates/animation/Anim-Jp-JP.desktop
index cb80183fd927b0c3bf9732a37109cb50a7f35cb7..4a773fea09bdaa6a85320f6484c2e6c732a27aca 100644
--- a/krita/data/templates/animation/Anim-Jp-JP.desktop
+++ b/krita/data/templates/animation/Anim-Jp-JP.desktop
@@ -19,3 +19,4 @@ Name[sk]=Animation-Japanese-JP
Name[sv]=Animering-japanska-jp
Name[uk]=Японська анімація (японською)
Name[x-test]=xxAnimation-Japanese-JPxx
+Name[zh_CN]=日本动画 (日式)
diff --git a/krita/data/templates/animation/CMakeLists.txt b/krita/data/templates/animation/CMakeLists.txt
index 5f1622220b850f408ee5238bd42ca7ce720e701d..5f0bda58a02bf245467d3c46e42055b2989c4071 100644
--- a/krita/data/templates/animation/CMakeLists.txt
+++ b/krita/data/templates/animation/CMakeLists.txt
@@ -1,5 +1,6 @@
install( FILES
-template_animation.png
+light_template_animation.png
+dark_template_animation.png
DESTINATION
${DATA_INSTALL_DIR}/krita/pics
)
@@ -10,6 +11,7 @@ install( FILES
DESTINATION ${DATA_INSTALL_DIR}/krita/templates/animation/.source)
install( FILES
+ .directory
Anim-Jp-EN.desktop
Anim-Jp-JP.desktop
DESTINATION ${DATA_INSTALL_DIR}/krita/templates/animation)
diff --git a/krita/data/templates/animation/dark_template_animation.png b/krita/data/templates/animation/dark_template_animation.png
new file mode 100644
index 0000000000000000000000000000000000000000..f2787afd6eaa55a0486310c6c5fdb08a3be1ee38
Binary files /dev/null and b/krita/data/templates/animation/dark_template_animation.png differ
diff --git a/krita/data/templates/animation/light_template_animation.png b/krita/data/templates/animation/light_template_animation.png
new file mode 100644
index 0000000000000000000000000000000000000000..8689dd626c39ec2dc5b00b2a9e2d880f43a5fe59
Binary files /dev/null and b/krita/data/templates/animation/light_template_animation.png differ
diff --git a/krita/data/templates/animation/template_animation.png b/krita/data/templates/animation/template_animation.png
deleted file mode 100644
index 1c359f732f33f72f2291b65038ad5508c188e2e5..0000000000000000000000000000000000000000
Binary files a/krita/data/templates/animation/template_animation.png and /dev/null differ
diff --git a/krita/data/templates/animation/template_animation.svg b/krita/data/templates/animation/template_animation.svg
index 4f19375fb8c7091b33d0de1187634ba325286fdb..c4ee907436b56386730cfbbde989e14d7c033128 100644
--- a/krita/data/templates/animation/template_animation.svg
+++ b/krita/data/templates/animation/template_animation.svg
@@ -1,25 +1,51 @@
+
+
+ inkscape:export-filename="light_template_animation.png"
+ inkscape:export-xdpi="384.00003"
+ inkscape:export-ydpi="384.00003">
+
+
+
+
+ id="metadata1397">
@@ -30,138 +56,97 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/data/templates/comics/.directory b/krita/data/templates/comics/.directory
index 7f1112eada29ee61b9bb3fab7c6bd69bf04f38d5..b41f413754a53c90e9191d98d798c4bcb7d472e3 100644
--- a/krita/data/templates/comics/.directory
+++ b/krita/data/templates/comics/.directory
@@ -1,6 +1,5 @@
[Desktop Entry]
Name=Comic Templates
-Name[ast]=Plantíes de comics
Name[bs]=Predlošci stripova
Name[ca]=Plantilles per a còmics
Name[ca@valencia]=Plantilles per a còmics
@@ -36,5 +35,6 @@ Name[tr]=Çizgi Roman Şablonu
Name[uk]=Шаблони коміксів
Name[wa]=Modeles di bindes d' imådjes
Name[x-test]=xxComic Templatesxx
+Name[zh_CN]=漫画模板
Name[zh_TW]=漫畫樣本
X-KDE-DefaultTab=true
diff --git a/krita/data/templates/comics/BD-EuroTemplate.desktop b/krita/data/templates/comics/BD-EuroTemplate.desktop
index 96b751cedefddc678153e79782710ebe28956b5c..04f0f9c6aeafc32ceca2d5705b73ceac030941ea 100644
--- a/krita/data/templates/comics/BD-EuroTemplate.desktop
+++ b/krita/data/templates/comics/BD-EuroTemplate.desktop
@@ -18,6 +18,7 @@ Name[fr]=Modèle européen de bandes dessinées
Name[gl]=Formato europeo (2×4 viñetas)
Name[hu]=Európai BD sablon
Name[it]=Modello MD europeo
+Name[ja]=バンドデシネテンプレート
Name[kk]=Еуропалық BD үлгісі
Name[lt]=Europos DB šablonas
Name[nb]=Europeisk BD-mal
@@ -34,6 +35,7 @@ Name[tr]=Avrupa BD Şablonu
Name[uk]=Європейський шаблон BD
Name[wa]=Modele di binde d' imådje a l' uropeyinne
Name[x-test]=xxEuropean BD templatexx
+Name[zh_CN]=欧洲 BD 模板
Name[zh_TW]=歐式 BD 樣本
Comment=template for European BD-style comics
Comment[bs]=predložak za evropske BD stripove
@@ -51,6 +53,7 @@ Comment[fr]=Modèle européen de bandes dessinées
Comment[gl]=Páxina de banda deseñada de formato europeo, con 2×4 viñetas regulares.
Comment[hu]=sablon az európai BD-stílusú képregényekhez
Comment[it]=modello per fumetti in stile BD europeo
+Comment[ja]=バンドデシネ式コミック用テンプレート
Comment[kk]=Еуропалық BD-стильдегі комикс үлгісі
Comment[nb]=mal for europeiske tegneserier i BD-stil
Comment[nds]=BD-Vörlaag för europääsche Comics
@@ -65,5 +68,6 @@ Comment[sv]=seriemall med europeisk BD-stil
Comment[uk]=шаблон для європейських коміксів у стилі BD
Comment[wa]=Modele po les bindes d' imådje al môde uropeyinne
Comment[x-test]=xxtemplate for European BD-style comicsxx
+Comment[zh_CN]=欧洲 BD 式漫画模板
Comment[zh_TW]=歐式 BD-樣式漫畫的樣本
X-Krita-Version=28
diff --git a/krita/data/templates/comics/CMakeLists.txt b/krita/data/templates/comics/CMakeLists.txt
index 19003d695387d19afd2af33385a196528c678b5a..004aa59c3a8044200eca214e4cdb175cd4b7d6af 100644
--- a/krita/data/templates/comics/CMakeLists.txt
+++ b/krita/data/templates/comics/CMakeLists.txt
@@ -1,5 +1,6 @@
install( FILES
-template_comics_empty.png
+light_template_comics_empty.png
+dark_template_comics_empty.png
DESTINATION
${DATA_INSTALL_DIR}/krita/pics
)
diff --git a/krita/data/templates/comics/Comics-USTemplate.desktop b/krita/data/templates/comics/Comics-USTemplate.desktop
index 8d9ddb50372eb67cf27c80737088a65ef5135768..561e281151438ac8af22e2df133cb85ee9fecafa 100644
--- a/krita/data/templates/comics/Comics-USTemplate.desktop
+++ b/krita/data/templates/comics/Comics-USTemplate.desktop
@@ -36,6 +36,7 @@ Name[sv]=Seriemall med amerikansk stil
Name[uk]=Шаблон коміксів у американському стилі
Name[wa]=Modele comics a l' amerikinnes
Name[x-test]=xxUS-style comics templatexx
+Name[zh_CN]=美式漫画模板
Name[zh_TW]=美式漫畫樣本
Comment=template for US-style comics
Comment[bs]=predložak za stripove američkog stila
@@ -70,5 +71,6 @@ Comment[sv]=seriemall med amerikansk stil
Comment[uk]=шаблон для коміксів у американському стилі
Comment[wa]=Modele di bindes d' imådje al môde des comics amerikins
Comment[x-test]=xxtemplate for US-style comicsxx
+Comment[zh_CN]=美式漫画模板
Comment[zh_TW]=美式漫畫樣本
X-Krita-Version=28
diff --git a/krita/data/templates/comics/Manga-JpTemplate.desktop b/krita/data/templates/comics/Manga-JpTemplate.desktop
index 9c0111d60bfb9f521aa8627452580f877fd29d7c..d17ebb58af0a1985ff2a71bfbd7c6981288b8699 100644
--- a/krita/data/templates/comics/Manga-JpTemplate.desktop
+++ b/krita/data/templates/comics/Manga-JpTemplate.desktop
@@ -38,6 +38,7 @@ Name[tr]=Manga şablonu
Name[uk]=Шаблон манґи
Name[wa]=Modele di manga
Name[x-test]=xxManga templatexx
+Name[zh_CN]=漫画模板
Name[zh_TW]=連環漫畫樣本
Comment=template for Japanese Manga-style comics
Comment[bs]=predložak za japanske Manga stripove
@@ -73,5 +74,6 @@ Comment[tr]=Japon Manga çizgi romanları için şablon
Comment[uk]=шаблон японських коміксів у стилі манґа
Comment[wa]=Modele di bindes d' imådje al môde des mangas djaponès
Comment[x-test]=xxtemplate for Japanese Manga-style comicsxx
+Comment[zh_CN]=日式漫画模板
Comment[zh_TW]=日式連環漫畫冊樣式的樣本
X-Krita-Version=28
diff --git a/krita/data/templates/comics/a4_waffle_grid.desktop b/krita/data/templates/comics/a4_waffle_grid.desktop
index f01bc068e7249d5cb4e4a46b79804355d3318a4d..1ebaea23e942296424be43a354e09b5a2c0dc452 100644
--- a/krita/data/templates/comics/a4_waffle_grid.desktop
+++ b/krita/data/templates/comics/a4_waffle_grid.desktop
@@ -30,6 +30,7 @@ Name[sv]=våffelmönster
Name[uk]=сітка з комірками
Name[wa]=grile di fier a wåfes
Name[x-test]=xxwaffle-iron gridxx
+Name[zh_CN]=华夫铁网格
Name[zh_TW]=鐵模式格線
Comment=300 dpi, A4 waffle-iron grid comic page with ink and color layers
Comment[bs]=300 dpi, A4 mreža sječenog željeza stranica stripa s slojevima za tintu i bojemreža sječenog željeza
@@ -59,5 +60,6 @@ Comment[sv]=300 punkter/tum, A4 våffelmönstrad seriesida med bläck- och färg
Comment[uk]=300 т/д, сторінка коміксу у форматі A4 з комірками та шарами контурів та кольорів
Comment[wa]=Pådje A4 di binde d' imådjes avou on discôpaedje come ene grile di fier a wåfes avou des coûtches d' intche eyet d' coleurs.
Comment[x-test]=xx300 dpi, A4 waffle-iron grid comic page with ink and color layersxx
+Comment[zh_CN]=300 DPI,A4 尺寸华夫铁网格漫画页,带有墨水和色彩图层
Comment[zh_TW]=300 dpi,A4 大小的烘餅鐵模狀的格線,有墨水與顏色圖層
X-Krita-Version=28
diff --git a/krita/data/templates/comics/dark_template_comics_empty.png b/krita/data/templates/comics/dark_template_comics_empty.png
new file mode 100644
index 0000000000000000000000000000000000000000..3693020d64d121ba3ec3d42a3409f3778271d35b
Binary files /dev/null and b/krita/data/templates/comics/dark_template_comics_empty.png differ
diff --git a/krita/data/templates/comics/light_template_comics_empty.png b/krita/data/templates/comics/light_template_comics_empty.png
new file mode 100644
index 0000000000000000000000000000000000000000..5addefd334b000b52e82ccad3264c6f9ab956daf
Binary files /dev/null and b/krita/data/templates/comics/light_template_comics_empty.png differ
diff --git a/krita/data/templates/comics/template_comics_empty.png b/krita/data/templates/comics/template_comics_empty.png
deleted file mode 100644
index cbe95d6071469b46712b0d8d280851a5f74d025b..0000000000000000000000000000000000000000
Binary files a/krita/data/templates/comics/template_comics_empty.png and /dev/null differ
diff --git a/krita/data/templates/comics/template_comics_empty.svg b/krita/data/templates/comics/template_comics_empty.svg
index 246af13ec2fe7e28fad3deae2c8493ff34a0f796..762f97057d650c2593ed498e2de7613b03b78ada 100644
--- a/krita/data/templates/comics/template_comics_empty.svg
+++ b/krita/data/templates/comics/template_comics_empty.svg
@@ -1,5 +1,5 @@
-
+
- ComicsIcon
-
-
-
-
-
- image/svg+xml
-
-
-
- image/svg+xml
-
- ComicsIcon
-
-
-
- Timothée Giet
-
-
- 18/19/2010
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ style="display:inline">
\ No newline at end of file
diff --git a/krita/data/templates/design/.directory b/krita/data/templates/design/.directory
index 22d779d0e5dece0b55d1e63075de14c27038d0df..6c05f34ad3c2593d1327861e8cb0e05422f0024a 100644
--- a/krita/data/templates/design/.directory
+++ b/krita/data/templates/design/.directory
@@ -33,4 +33,5 @@ Name[sv]=Designmallar
Name[tr]=Tasarım Şablonları
Name[uk]=Шаблони компонування
Name[x-test]=xxDesign Templatesxx
+Name[zh_CN]=设计模板
X-KDE-DefaultTab=true
diff --git a/krita/data/templates/design/CMakeLists.txt b/krita/data/templates/design/CMakeLists.txt
index f8c24419705ab7de21664b241799906aa183764f..ccb704fe7df7cb89d5645bfe489325af3d0e08ef 100644
--- a/krita/data/templates/design/CMakeLists.txt
+++ b/krita/data/templates/design/CMakeLists.txt
@@ -1,10 +1,16 @@
install( FILES
-template_DIN_A3_landscape.png
-template_DIN_A4_portrait.png
-template_ratio_1610.png
-template_ratio_2391.png
-template_ratio_43.png
-template_web_design.png
+light_template_DIN_A3_landscape.png
+dark_template_DIN_A3_landscape.png
+light_template_DIN_A4_portrait.png
+dark_template_DIN_A4_portrait.png
+light_template_ratio_1610.png
+dark_template_ratio_1610.png
+light_template_ratio_2391.png
+dark_template_ratio_2391.png
+light_template_ratio_43.png
+dark_template_ratio_43.png
+light_template_web_design.png
+dark_template_web_design.png
DESTINATION
${DATA_INSTALL_DIR}/krita/pics)
diff --git a/krita/data/templates/design/Designcinema16_10_2484x1200_96dpiRGB_8bit_.desktop b/krita/data/templates/design/Designcinema16_10_2484x1200_96dpiRGB_8bit_.desktop
index 8b3989b2c0373eb7032ceb25152930e55bee08a1..cd2946981185559d30b28ae9700080c460807f46 100644
--- a/krita/data/templates/design/Designcinema16_10_2484x1200_96dpiRGB_8bit_.desktop
+++ b/krita/data/templates/design/Designcinema16_10_2484x1200_96dpiRGB_8bit_.desktop
@@ -29,6 +29,7 @@ Name[sv]=Design film 16:10 [ 2484x1200, 96 punkter/tum RGB, 8 bitar ]
Name[tr]=Sineme tasarla 16:10 [ 2484x1200 , 96dpi RGB , 8bit ]
Name[uk]=Компонування кіноекрана 16:10 [2484⨯1200, 96 т./д., RGB, 8 бітів]
Name[x-test]=xxDesign cinema 16:10 [ 2484x1200 , 96dpi RGB , 8bit ]xx
+Name[zh_CN]=设计影院 16:10 [ 2484x1200 像素, 96dpi RGB , 8 位 ]
Type=Link
URL[$e]=.source/Designcinema16_10_2484x1200_96dpiRGB_8bit_.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/design/Designcinema2.39_1_2484x1040_96dpiRGB_8bit_.desktop b/krita/data/templates/design/Designcinema2.39_1_2484x1040_96dpiRGB_8bit_.desktop
index dd29e63fd32f900394be0f5a9973e8d6fe08bd4d..427cca26ab91611309cbced524a2608b72663340 100644
--- a/krita/data/templates/design/Designcinema2.39_1_2484x1040_96dpiRGB_8bit_.desktop
+++ b/krita/data/templates/design/Designcinema2.39_1_2484x1040_96dpiRGB_8bit_.desktop
@@ -29,6 +29,7 @@ Name[sv]=Design film 2,39:1 [ 2484x1040, 96 punkter/tum RGB, 8 bitar ]
Name[tr]=Sineme tasarla 2.39:1 [ 2484x1040 , 96dpi RGB , 8bit ]
Name[uk]=Компонування кіноекрана 2,39:1 [2484⨯1040, 96 т./д., RGB, 8 бітів]
Name[x-test]=xxDesign cinema 2.39:1 [ 2484x1040 , 96dpi RGB , 8bit ]xx
+Name[zh_CN]=设计影院 2.39:1 [ 2484x1040 像素, 96dpi RGB , 8 位]
Type=Link
URL[$e]=.source/Designcinema2.39_1_2484x1040_96dpiRGB_8bit_.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/design/DesignpresentationA3Landscape_4960x3508_300dpiRGB_8bit_.desktop b/krita/data/templates/design/DesignpresentationA3Landscape_4960x3508_300dpiRGB_8bit_.desktop
index 6153470df2ee5cff6e21f85d34d2f0d4fcfacd67..9079f888f8e572ca1285bbb2bb8c1c8edf99f51b 100644
--- a/krita/data/templates/design/DesignpresentationA3Landscape_4960x3508_300dpiRGB_8bit_.desktop
+++ b/krita/data/templates/design/DesignpresentationA3Landscape_4960x3508_300dpiRGB_8bit_.desktop
@@ -29,6 +29,7 @@ Name[sv]=Design presentation A3 landskap [ 4960x3508, 300 punkter/tum RGB, 8 bit
Name[tr]=A3 Yatay sunum tasarla [ 4960x3508 , 300dpi RGB , 8bit ]
Name[uk]=Компонування презентації, A3, альбомна [4960⨯3508, 300 т./д., RGB, 8 бітів]
Name[x-test]=xxDesign presentation A3 Landscape [ 4960x3508 , 300dpi RGB , 8bit ]xx
+Name[zh_CN]=设计展示 A3 横版 [ 4960x3508 像素, 300dpi RGB , 8 位]
Type=Link
URL[$e]=.source/DesignpresentationA3Landscape_4960x3508_300dpiRGB_8bit_.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/design/DesignpresentationA4portrait_2480x3508,300dpiRGB_8bit_.desktop b/krita/data/templates/design/DesignpresentationA4portrait_2480x3508,300dpiRGB_8bit_.desktop
index 90abfbf1807622d28a8dcc3f461873589a87a60c..997cd902e8d04b10bdfd736481cca52940b8b0c0 100644
--- a/krita/data/templates/design/DesignpresentationA4portrait_2480x3508,300dpiRGB_8bit_.desktop
+++ b/krita/data/templates/design/DesignpresentationA4portrait_2480x3508,300dpiRGB_8bit_.desktop
@@ -29,6 +29,7 @@ Name[sv]=Design presentation A4 porträtt [ 2480x3508, 300 punkter/tum RGB, 8 bi
Name[tr]=A4 dikey sunum tasarla [ 2480x3508 , 300dpi RGB , 8bit ]
Name[uk]=Компонування презентації, A4, книжкова [2480x3508, 300 т./д., RGB, 8 бітів]
Name[x-test]=xxDesign presentation A4 portrait [ 2480x3508 , 300dpi RGB , 8bit ]xx
+Name[zh_CN]=设计展示 A4 竖版 [ 2480x3508 像素, 300dpi RGB , 8 位 ]
Type=Link
URL[$e]=.source/DesignpresentationA4portrait_2480x3508_300dpiRGB_8bit_.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/design/DesignpresentationA4portrait_2480x3508_300dpiRGB_8bit_.desktop b/krita/data/templates/design/DesignpresentationA4portrait_2480x3508_300dpiRGB_8bit_.desktop
index 90abfbf1807622d28a8dcc3f461873589a87a60c..997cd902e8d04b10bdfd736481cca52940b8b0c0 100644
--- a/krita/data/templates/design/DesignpresentationA4portrait_2480x3508_300dpiRGB_8bit_.desktop
+++ b/krita/data/templates/design/DesignpresentationA4portrait_2480x3508_300dpiRGB_8bit_.desktop
@@ -29,6 +29,7 @@ Name[sv]=Design presentation A4 porträtt [ 2480x3508, 300 punkter/tum RGB, 8 bi
Name[tr]=A4 dikey sunum tasarla [ 2480x3508 , 300dpi RGB , 8bit ]
Name[uk]=Компонування презентації, A4, книжкова [2480x3508, 300 т./д., RGB, 8 бітів]
Name[x-test]=xxDesign presentation A4 portrait [ 2480x3508 , 300dpi RGB , 8bit ]xx
+Name[zh_CN]=设计展示 A4 竖版 [ 2480x3508 像素, 300dpi RGB , 8 位 ]
Type=Link
URL[$e]=.source/DesignpresentationA4portrait_2480x3508_300dpiRGB_8bit_.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/design/Designscreen4_3_2250x1680_96dpiRGB_8bit_.desktop b/krita/data/templates/design/Designscreen4_3_2250x1680_96dpiRGB_8bit_.desktop
index 2f29b0b1f3f6b778a94000ac7f5874db29016593..579f125968b174c66853a4881c2332803fd2502b 100644
--- a/krita/data/templates/design/Designscreen4_3_2250x1680_96dpiRGB_8bit_.desktop
+++ b/krita/data/templates/design/Designscreen4_3_2250x1680_96dpiRGB_8bit_.desktop
@@ -29,6 +29,7 @@ Name[sv]=Design skärm 4:3 [ 2250x1680, 96 punkter/tum RGB, 8 bitar ]
Name[tr]=Ekran tasarla 4:3 [ 2250x1680 , 96dpi RGB , 8bit ]
Name[uk]=Компонування екрана 4:3 [2250⨯1680, 96 т./д., RGB, 8 бітів]
Name[x-test]=xxDesign screen 4:3 [ 2250x1680 , 96dpi RGB , 8bit ]xx
+Name[zh_CN]=设计屏幕 4:3 [ 2250x1680 像素, 96dpi RGB , 8 位]
Type=Link
URL[$e]=.source/Designscreen4_3_2250x1680_96dpiRGB_8bit_.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/design/dark_template_DIN_A3_landscape.png b/krita/data/templates/design/dark_template_DIN_A3_landscape.png
new file mode 100644
index 0000000000000000000000000000000000000000..d3777e936227d248f1fd7610b3842b05eefd2002
Binary files /dev/null and b/krita/data/templates/design/dark_template_DIN_A3_landscape.png differ
diff --git a/krita/data/templates/design/dark_template_DIN_A4_portrait.png b/krita/data/templates/design/dark_template_DIN_A4_portrait.png
new file mode 100644
index 0000000000000000000000000000000000000000..a20d5918eb597e8c2ec9d17526d4b36f41b58cab
Binary files /dev/null and b/krita/data/templates/design/dark_template_DIN_A4_portrait.png differ
diff --git a/krita/data/templates/design/dark_template_ratio_1610.png b/krita/data/templates/design/dark_template_ratio_1610.png
new file mode 100644
index 0000000000000000000000000000000000000000..a8826beb45801fa1237efdaf3f991b9d396dab72
Binary files /dev/null and b/krita/data/templates/design/dark_template_ratio_1610.png differ
diff --git a/krita/data/templates/design/dark_template_ratio_2391.png b/krita/data/templates/design/dark_template_ratio_2391.png
new file mode 100644
index 0000000000000000000000000000000000000000..36a065fc85a82729cb118dc16ad7dcd626e208a4
Binary files /dev/null and b/krita/data/templates/design/dark_template_ratio_2391.png differ
diff --git a/krita/data/templates/design/dark_template_ratio_43.png b/krita/data/templates/design/dark_template_ratio_43.png
new file mode 100644
index 0000000000000000000000000000000000000000..3b939599f6b4c015db4c7d84ea06a5d835d98b64
Binary files /dev/null and b/krita/data/templates/design/dark_template_ratio_43.png differ
diff --git a/krita/data/templates/design/dark_template_web_design.png b/krita/data/templates/design/dark_template_web_design.png
new file mode 100644
index 0000000000000000000000000000000000000000..8d096bc7f6c5b4d0e753e554e72182f05a6a51d4
Binary files /dev/null and b/krita/data/templates/design/dark_template_web_design.png differ
diff --git a/krita/data/templates/design/design-icons.svg b/krita/data/templates/design/design-icons.svg
new file mode 100644
index 0000000000000000000000000000000000000000..0ff2b5299ea4344cddf611da3aa83fc28e12913b
--- /dev/null
+++ b/krita/data/templates/design/design-icons.svg
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+ A3
+
+
+
+ A4
+
+
+
+ 4:3
+
+
+
+ 16:10
+
+
+ 2.39:1
+
+
+
+
+
+
+
+
diff --git a/krita/data/templates/design/light_template_DIN_A3_landscape.png b/krita/data/templates/design/light_template_DIN_A3_landscape.png
new file mode 100644
index 0000000000000000000000000000000000000000..561a9ad566f2ffb4b969be1b49a441ab73b1cb30
Binary files /dev/null and b/krita/data/templates/design/light_template_DIN_A3_landscape.png differ
diff --git a/krita/data/templates/design/light_template_DIN_A4_portrait.png b/krita/data/templates/design/light_template_DIN_A4_portrait.png
new file mode 100644
index 0000000000000000000000000000000000000000..5b5e7cac732049dcdcf664f90dad6a164e8fd2f6
Binary files /dev/null and b/krita/data/templates/design/light_template_DIN_A4_portrait.png differ
diff --git a/krita/data/templates/design/light_template_ratio_1610.png b/krita/data/templates/design/light_template_ratio_1610.png
new file mode 100644
index 0000000000000000000000000000000000000000..b66a46baf3ca064077333beed1f48ee1e4e12c22
Binary files /dev/null and b/krita/data/templates/design/light_template_ratio_1610.png differ
diff --git a/krita/data/templates/design/light_template_ratio_2391.png b/krita/data/templates/design/light_template_ratio_2391.png
new file mode 100644
index 0000000000000000000000000000000000000000..31ea81f1012051df463d1800a199db22de1cbb20
Binary files /dev/null and b/krita/data/templates/design/light_template_ratio_2391.png differ
diff --git a/krita/data/templates/design/light_template_ratio_43.png b/krita/data/templates/design/light_template_ratio_43.png
new file mode 100644
index 0000000000000000000000000000000000000000..0834e87bbd24c8d6cc6f0d490c9a1ce6bdf66e51
Binary files /dev/null and b/krita/data/templates/design/light_template_ratio_43.png differ
diff --git a/krita/data/templates/design/light_template_web_design.png b/krita/data/templates/design/light_template_web_design.png
new file mode 100644
index 0000000000000000000000000000000000000000..6b22d24e4d957d3dc9731950aee6feab73e2e369
Binary files /dev/null and b/krita/data/templates/design/light_template_web_design.png differ
diff --git a/krita/data/templates/design/template_DIN_A3_landscape.png b/krita/data/templates/design/template_DIN_A3_landscape.png
deleted file mode 100644
index 5705bead50830243ac8f9415c9077cf0a49a0e7d..0000000000000000000000000000000000000000
Binary files a/krita/data/templates/design/template_DIN_A3_landscape.png and /dev/null differ
diff --git a/krita/data/templates/design/template_DIN_A4_portrait.png b/krita/data/templates/design/template_DIN_A4_portrait.png
deleted file mode 100644
index b2a5bea65bcb54797125dc0a7f68c0b998a23722..0000000000000000000000000000000000000000
Binary files a/krita/data/templates/design/template_DIN_A4_portrait.png and /dev/null differ
diff --git a/krita/data/templates/design/template_ratio_1610.png b/krita/data/templates/design/template_ratio_1610.png
deleted file mode 100644
index da8e3a72341bce8ab3da310c14d3bf8bb1cc9103..0000000000000000000000000000000000000000
Binary files a/krita/data/templates/design/template_ratio_1610.png and /dev/null differ
diff --git a/krita/data/templates/design/template_ratio_2391.png b/krita/data/templates/design/template_ratio_2391.png
deleted file mode 100644
index e97684dd0627b764b1261ac04eb716aa34e66877..0000000000000000000000000000000000000000
Binary files a/krita/data/templates/design/template_ratio_2391.png and /dev/null differ
diff --git a/krita/data/templates/design/template_ratio_43.png b/krita/data/templates/design/template_ratio_43.png
deleted file mode 100644
index 6e1ddbd406bcdc29a8b239a233c96a39ad56bcf5..0000000000000000000000000000000000000000
Binary files a/krita/data/templates/design/template_ratio_43.png and /dev/null differ
diff --git a/krita/data/templates/design/template_web_design.png b/krita/data/templates/design/template_web_design.png
deleted file mode 100644
index 065f1a4543557ed61aca498440467e5ebe73e402..0000000000000000000000000000000000000000
Binary files a/krita/data/templates/design/template_web_design.png and /dev/null differ
diff --git a/krita/data/templates/design/web_design.desktop b/krita/data/templates/design/web_design.desktop
index bf2c314574c6f3c3fa88d40b20ca8a3f5c43293b..fc268b05af746b84aacb66df4ff2b21c960b8545 100644
--- a/krita/data/templates/design/web_design.desktop
+++ b/krita/data/templates/design/web_design.desktop
@@ -25,6 +25,7 @@ Name[sv]=Webbdesign [ 2160x1440, 72 punkter/tum RGB, 8 bitar ]
Name[tr]=Web Tasarımı [ 2160x1440 , 72ppi RGB , 8bit ]
Name[uk]=Вебдизайн [2160⨯1440, 72 т./д., RGB, 8 бітів]
Name[x-test]=xxWeb Design [ 2160x1440 , 72ppi RGB , 8bit ]xx
+Name[zh_CN]=网页设计 [ 2160x1440 像素, 72ppi RGB , 8 位 ]
Type=Link
URL[$e]=.source/web_design.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/dslr/.directory b/krita/data/templates/dslr/.directory
index 9c73c3c3b0ded2056f46a044f85c7ed79b3edc5f..814b9359f8f72fb618365e65f8ac5220245f6713 100644
--- a/krita/data/templates/dslr/.directory
+++ b/krita/data/templates/dslr/.directory
@@ -33,4 +33,5 @@ Name[sv]=Mallar för digitala spegelreflexkameror
Name[tr]=DSLR Şablonları
Name[uk]=Шаблони DSLR
Name[x-test]=xxDSLR Templatesxx
+Name[zh_CN]=DSLR 模板
X-KDE-DefaultTab=true
diff --git a/krita/data/templates/dslr/CMakeLists.txt b/krita/data/templates/dslr/CMakeLists.txt
index ac518ceb1f3778f24e491f509da1cccf47b7f29d..174d8485c43db4aa660a78e98dfa82ad83b961c3 100644
--- a/krita/data/templates/dslr/CMakeLists.txt
+++ b/krita/data/templates/dslr/CMakeLists.txt
@@ -1,5 +1,6 @@
install( FILES
-template_dslr.png
+light_template_dslr.png
+dark_template_dslr.png
DESTINATION
${DATA_INSTALL_DIR}/krita/pics )
diff --git a/krita/data/templates/dslr/Canon_550D_5184x3456.desktop b/krita/data/templates/dslr/Canon_550D_5184x3456.desktop
index 92ae1a3399e2bed356a6227d6d5eeb8e02d685de..7a8ca2fde3f5d2694d286b049556b112c076d555 100755
--- a/krita/data/templates/dslr/Canon_550D_5184x3456.desktop
+++ b/krita/data/templates/dslr/Canon_550D_5184x3456.desktop
@@ -32,6 +32,7 @@ Name[sv]=Canon_550D_5184x3456
Name[tr]=Canon_550D_5184x3456
Name[uk]=Canon 550D 5184⨯3456
Name[x-test]=xxCanon_550D_5184x3456xx
+Name[zh_CN]=佳能 550D 相机 5184x3456 像素
Type=Link
URL[$e]=.source/Canon_550D_5184x3456.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/dslr/Canon_5Dmk3_5760x3840.desktop b/krita/data/templates/dslr/Canon_5Dmk3_5760x3840.desktop
index a8761b9cbba01049aab9d6b6a924d9267035deca..ab9da52b0d3d89309e19eb6bd5cd266145cc1b05 100755
--- a/krita/data/templates/dslr/Canon_5Dmk3_5760x3840.desktop
+++ b/krita/data/templates/dslr/Canon_5Dmk3_5760x3840.desktop
@@ -32,6 +32,7 @@ Name[sv]=Canon_5Dmk3_5760x3840
Name[tr]=Canon_5Dmk3_5760x3840
Name[uk]=Canon 5Dmk3 5760⨯3840
Name[x-test]=xxCanon_5Dmk3_5760x3840xx
+Name[zh_CN]=佳能 5Dmk3 相机 5760x3840 像素
Type=Link
URL[$e]=.source/Canon_5Dmk3_5760x3840.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/dslr/Nikon_D3000_3872x2592.desktop b/krita/data/templates/dslr/Nikon_D3000_3872x2592.desktop
index 74be3a4b2447e43e9ca6412a1c7b54ae3a6dd6a3..a5e774b380aefab258fe559aa6ccba3626878c1e 100755
--- a/krita/data/templates/dslr/Nikon_D3000_3872x2592.desktop
+++ b/krita/data/templates/dslr/Nikon_D3000_3872x2592.desktop
@@ -32,6 +32,7 @@ Name[sv]=Nikon_D3000_3872x2592
Name[tr]=Nikon_D3000_3872x2592
Name[uk]=Nikon D3000 3872⨯2592
Name[x-test]=xxNikon_D3000_3872x2592xx
+Name[zh_CN]=尼康 D3000 相机 3872x2592 像素
Type=Link
URL[$e]=.source/Nikon_D3000_3872x2592.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/dslr/Nikon_D5000_4288x2848.desktop b/krita/data/templates/dslr/Nikon_D5000_4288x2848.desktop
index 2359fd6e4e05494e719102872b83490552c4dbc6..0d3a2880aa63b3bdc61aaced1948640adf49c34a 100755
--- a/krita/data/templates/dslr/Nikon_D5000_4288x2848.desktop
+++ b/krita/data/templates/dslr/Nikon_D5000_4288x2848.desktop
@@ -1,6 +1,7 @@
[Desktop Entry]
Icon=template_dslr
Name=Nikon_D5000_4288x2848
+Name[ast]=Nikon_D5000_4288x2848
Name[bs]=Nikon_D5000_4288x2848
Name[ca]=Nikon_D5000_4288x2848
Name[ca@valencia]=Nikon_D5000_4288x2848
@@ -32,6 +33,7 @@ Name[sv]=Nikon_D5000_4288x2848
Name[tr]=Nikon_D5000_4288x2848
Name[uk]=Nikon D5000 4288⨯2848
Name[x-test]=xxNikon_D5000_4288x2848xx
+Name[zh_CN]=尼康 D5000 相机 4288x2848 像素
Type=Link
URL[$e]=.source/Nikon_D5000_4288x2848.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/dslr/Nikon_D7000_4928x3264.desktop b/krita/data/templates/dslr/Nikon_D7000_4928x3264.desktop
index d3c674bd8edb16f2f44eb1be8eb3637698d82903..057da86b9167312409b02d53f847853c3339c11f 100755
--- a/krita/data/templates/dslr/Nikon_D7000_4928x3264.desktop
+++ b/krita/data/templates/dslr/Nikon_D7000_4928x3264.desktop
@@ -32,6 +32,7 @@ Name[sv]=Nikon_D7000_4928x3264
Name[tr]=Nikon_D7000_4928x3264
Name[uk]=Nikon D7000 4928⨯3264
Name[x-test]=xxNikon_D7000_4928x3264xx
+Name[zh_CN]=尼康 D7000 相机 4928x3264 像素
Type=Link
URL[$e]=.source/Nikon_D7000_4928x3264.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/dslr/dark_template_dslr.png b/krita/data/templates/dslr/dark_template_dslr.png
new file mode 100644
index 0000000000000000000000000000000000000000..2ed623bde95002dadb36a6558b3f280e31640f0a
Binary files /dev/null and b/krita/data/templates/dslr/dark_template_dslr.png differ
diff --git a/krita/data/templates/dslr/light_template_dslr.png b/krita/data/templates/dslr/light_template_dslr.png
new file mode 100644
index 0000000000000000000000000000000000000000..dd525c777e157c718ecc39fa019a0d5ba5c95059
Binary files /dev/null and b/krita/data/templates/dslr/light_template_dslr.png differ
diff --git a/krita/data/templates/dslr/photo-camera.svg b/krita/data/templates/dslr/photo-camera.svg
new file mode 100644
index 0000000000000000000000000000000000000000..2a79b8d79257c07715199ea07e1171bcfc4b23c7
--- /dev/null
+++ b/krita/data/templates/dslr/photo-camera.svg
@@ -0,0 +1,96 @@
+
+
+
+image/svg+xml
\ No newline at end of file
diff --git a/krita/data/templates/dslr/template_dslr.png b/krita/data/templates/dslr/template_dslr.png
deleted file mode 100644
index a5c7fb3d934bd8828a55b6957eefab54b6207243..0000000000000000000000000000000000000000
Binary files a/krita/data/templates/dslr/template_dslr.png and /dev/null differ
diff --git a/krita/data/templates/texture/.directory b/krita/data/templates/texture/.directory
index fb938ad3e7729a3f26147e33ed58f613a9bd43cc..56fff1fe825f01b9bf70928db7d585e85aebddd3 100644
--- a/krita/data/templates/texture/.directory
+++ b/krita/data/templates/texture/.directory
@@ -33,4 +33,5 @@ Name[sv]=Strukturmallar
Name[tr]=Doku Şablonları
Name[uk]=Шаблони текстур
Name[x-test]=xxTexture Templatesxx
+Name[zh_CN]=纹理模板
X-KDE-DefaultTab=true
diff --git a/krita/data/templates/texture/CMakeLists.txt b/krita/data/templates/texture/CMakeLists.txt
index eb97febe543bce5ffc7326401c27564dd23be850..2226bba4716b5ef75c7605482a2dd842592ae89e 100644
--- a/krita/data/templates/texture/CMakeLists.txt
+++ b/krita/data/templates/texture/CMakeLists.txt
@@ -1,5 +1,6 @@
install( FILES
-template_texture.png
+light_template_texture.png
+dark_template_texture.png
DESTINATION
${DATA_INSTALL_DIR}/krita/pics )
install( FILES
diff --git a/krita/data/templates/texture/Texture1024x10248bitsrgb.desktop b/krita/data/templates/texture/Texture1024x10248bitsrgb.desktop
index 147b8edcdbf6b06a17a82c9cda1fdcd7070f17b6..8bc2e328cb9660bce2ed8da242e3353e8edaaab5 100644
--- a/krita/data/templates/texture/Texture1024x10248bitsrgb.desktop
+++ b/krita/data/templates/texture/Texture1024x10248bitsrgb.desktop
@@ -25,6 +25,7 @@ Name[sv]=Struktur 1024 x 1024 8-bitar SRGB
Name[tr]=Doku 1024x1024 8bit srgb
Name[uk]=Текстура 1024⨯1024, 8-бітова, srgb
Name[x-test]=xxTexture 1024x1024 8bit srgbxx
+Name[zh_CN]=纹理 1024x1024 像素 8位 srgb 色彩空间
Type=Link
URL[$e]=.source/Texture1024x10248bitsrgb.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/texture/Texture1k32bitscalar.desktop b/krita/data/templates/texture/Texture1k32bitscalar.desktop
index 53f567168072cd71b5ae6dc7992e1b907995ac33..3f2566f7a1c28af3d2c6240833f197bad658122d 100755
--- a/krita/data/templates/texture/Texture1k32bitscalar.desktop
+++ b/krita/data/templates/texture/Texture1k32bitscalar.desktop
@@ -29,6 +29,7 @@ Name[sv]=Struktur 1k 32-bitar skalär
Name[tr]=Doku 1k 32bit sayısal
Name[uk]=Текстура 1k, 32-бітова, скалярна
Name[x-test]=xxTexture 1k 32bit scalarxx
+Name[zh_CN]=纹理 1K 像素 32 位 scalar 色彩空间
Type=Link
URL[$e]=.source/Texture1k32bitscalar.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/texture/Texture1k8bitsrgb.desktop b/krita/data/templates/texture/Texture1k8bitsrgb.desktop
index 6812054e731d7aa87888a1ce764e324d7c0a970e..478ae4c74dbf87d510795ac56fcbd3ed5b3979f6 100755
--- a/krita/data/templates/texture/Texture1k8bitsrgb.desktop
+++ b/krita/data/templates/texture/Texture1k8bitsrgb.desktop
@@ -29,6 +29,7 @@ Name[sv]=Struktur 1k 8-bitar SRGB
Name[tr]=Doku 1k 8bit srgb
Name[uk]=Текстура 1k, 8-бітова, srgb
Name[x-test]=xxTexture 1k 8bit srgbxx
+Name[zh_CN]=纹理 1K 像素 8 位 sRGB 色彩空间
Type=Link
URL[$e]=.source/Texture1k8bitsrgb.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/texture/Texture2048x20488bitsrgb.desktop b/krita/data/templates/texture/Texture2048x20488bitsrgb.desktop
index c0be72b73078ef2036e99c812976b57c55e59ab6..34b1482b92306211a5065e1ff114e618760937bd 100644
--- a/krita/data/templates/texture/Texture2048x20488bitsrgb.desktop
+++ b/krita/data/templates/texture/Texture2048x20488bitsrgb.desktop
@@ -25,6 +25,7 @@ Name[sv]=Struktur 2048 x 2048 8-bitar SRGB
Name[tr]=Doku 2048x2048 8bit srgb
Name[uk]=Текстура 2048⨯2048, 8-бітова, srgb
Name[x-test]=xxTexture 2048x2048 8bit srgbxx
+Name[zh_CN]=纹理 2048x2048 像素 8 位 sRGB 色彩空间
Type=Link
URL[$e]=.source/Texture2048x20488bitsrgb.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/texture/Texture256x2568bitsrgb.desktop b/krita/data/templates/texture/Texture256x2568bitsrgb.desktop
index 7c1d94637a7694891bdc3ea329c03ae46bc93517..9163d3143fab0f306353bedd1436f3a37cd4eb1b 100644
--- a/krita/data/templates/texture/Texture256x2568bitsrgb.desktop
+++ b/krita/data/templates/texture/Texture256x2568bitsrgb.desktop
@@ -25,6 +25,7 @@ Name[sv]=Struktur 256 x 256 8-bitar SRGB
Name[tr]=Doku 256x256 8bit srgb
Name[uk]=Текстура 256⨯256, 8-бітова, srgb
Name[x-test]=xxTexture 256x256 8bit srgbxx
+Name[zh_CN]=纹理 256x256 像素 8 位 srgb 色彩空间
Type=Link
URL[$e]=.source/Texture256x2568bitsrgb.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/texture/Texture2k32bitscalar.desktop b/krita/data/templates/texture/Texture2k32bitscalar.desktop
index 80acbe092097e4b84a6f0c51a1c934d9e5d9f7b6..bc96e84458a4ed71c68c557a767ae3950c5b8f4f 100755
--- a/krita/data/templates/texture/Texture2k32bitscalar.desktop
+++ b/krita/data/templates/texture/Texture2k32bitscalar.desktop
@@ -29,6 +29,7 @@ Name[sv]=Struktur 2k 32-bitar skalär
Name[tr]=Doku 2k 32bit sayısal
Name[uk]=Текстура 2k, 32-бітова, скалярна
Name[x-test]=xxTexture 2k 32bit scalarxx
+Name[zh_CN]=纹理 2K 像素 32 位 scalar 色彩空间
Type=Link
URL[$e]=.source/Texture2k32bitscalar.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/texture/Texture2k8bitsrgb.desktop b/krita/data/templates/texture/Texture2k8bitsrgb.desktop
index 2e5aa3ec09419185e7463fb677df56155b9bb0a5..9da38fb090506a28249908eb5461e5045b58fbe1 100755
--- a/krita/data/templates/texture/Texture2k8bitsrgb.desktop
+++ b/krita/data/templates/texture/Texture2k8bitsrgb.desktop
@@ -29,6 +29,7 @@ Name[sv]=Struktur 2k 8-bitar SRGB
Name[tr]=Doku 2k 8bit srgb
Name[uk]=Текстура 2k, 8-бітова, srgb
Name[x-test]=xxTexture 2k 8bit srgbxx
+Name[zh_CN]=纹理 2K 像素 8 位 sRGB 色彩空间
Type=Link
URL[$e]=.source/Texture2k8bitsrgb.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/texture/Texture4096x40968bitsrgb.desktop b/krita/data/templates/texture/Texture4096x40968bitsrgb.desktop
index 2e3099afb9c8af7bbb50963024de98c569b6f4f3..8e12bab233deadb3d6aca5ad5d72639f477df17c 100644
--- a/krita/data/templates/texture/Texture4096x40968bitsrgb.desktop
+++ b/krita/data/templates/texture/Texture4096x40968bitsrgb.desktop
@@ -25,6 +25,7 @@ Name[sv]=Struktur 4096 x 4096 8-bitar SRGB
Name[tr]=Doku 4096x4096 8bit srgb
Name[uk]=Текстура 4096⨯4096, 8-бітова, srgb
Name[x-test]=xxTexture 4096x4096 8bit srgbxx
+Name[zh_CN]=纹理 4096x4096 像素 8 位 sRGB 色彩空间
Type=Link
URL[$e]=.source/Texture4096x40968bitsrgb.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/texture/Texture4k32bitscalar.desktop b/krita/data/templates/texture/Texture4k32bitscalar.desktop
index 486efb4c62a176c45312d52af366a796792fc763..093320a2163eb47a94a4b9ae6cd7278c029e5b44 100755
--- a/krita/data/templates/texture/Texture4k32bitscalar.desktop
+++ b/krita/data/templates/texture/Texture4k32bitscalar.desktop
@@ -29,6 +29,7 @@ Name[sv]=Struktur 4k 32-bitar skalär
Name[tr]=Doku 4k 32bit sayısal
Name[uk]=Текстура 4k, 32-бітова, скалярна
Name[x-test]=xxTexture 4k 32bit scalarxx
+Name[zh_CN]=纹理 4K 像素 32 位 scalar 色彩空间
Type=Link
URL[$e]=.source/Texture4k32bitscalar.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/texture/Texture4k8bitsrgb.desktop b/krita/data/templates/texture/Texture4k8bitsrgb.desktop
index 704afc3f4cb9cd75919d2e22137e092336c5a767..e7b84ce75e8cc2eec7bed2fb273c89776730cf7a 100755
--- a/krita/data/templates/texture/Texture4k8bitsrgb.desktop
+++ b/krita/data/templates/texture/Texture4k8bitsrgb.desktop
@@ -29,6 +29,7 @@ Name[sv]=Struktur 4k 8-bitar SRGB
Name[tr]=Doku 4k 8bit srgb
Name[uk]=Текстура 4k, 8-бітова, srgb
Name[x-test]=xxTexture 4k 8bit srgbxx
+Name[zh_CN]=纹理 4K 像素 8 位 srgb 色彩空间
Type=Link
URL[$e]=.source/Texture4k8bitsrgb.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/texture/Texture512x5128bitsrgb.desktop b/krita/data/templates/texture/Texture512x5128bitsrgb.desktop
index 639bf1b5ea6203834c1b9881a39412f4f7e12c95..7d431c6116ff9e8f76bbf9f28bb698601f345f21 100644
--- a/krita/data/templates/texture/Texture512x5128bitsrgb.desktop
+++ b/krita/data/templates/texture/Texture512x5128bitsrgb.desktop
@@ -25,6 +25,7 @@ Name[sv]=Struktur 512 x 512 8-bitar SRGB
Name[tr]=Doku 512x512 8bit srgb
Name[uk]=Текстура 512⨯512, 8-бітова, srgb
Name[x-test]=xxTexture 512x512 8bit srgbxx
+Name[zh_CN]=纹理 512x512 像素 8 位 sRGB 色彩空间
Type=Link
URL[$e]=.source/Texture512x5128bitsrgb.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/texture/Texture8k32bitscalar.desktop b/krita/data/templates/texture/Texture8k32bitscalar.desktop
index 0fa1b224fc15cda2e76d3aa719e320cab090c247..07f4930507bb5368831caf3fe76d37846a4622e6 100755
--- a/krita/data/templates/texture/Texture8k32bitscalar.desktop
+++ b/krita/data/templates/texture/Texture8k32bitscalar.desktop
@@ -29,6 +29,7 @@ Name[sv]=Struktur 8k 32-bitar skalär
Name[tr]=Doku 8k 32bit sayısal
Name[uk]=Текстура 8k, 32-бітова, скалярна
Name[x-test]=xxTexture 8k 32bit scalarxx
+Name[zh_CN]=纹理 8K 像素 32 位 scalar 色彩空间
Type=Link
URL[$e]=.source/Texture8k32bitscalar.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/texture/Texture8k8bitsrgb.desktop b/krita/data/templates/texture/Texture8k8bitsrgb.desktop
index 18f82922b9f4f2c3d96a60bcdb1c2f28ace4ed08..4b78395b8e20bc392f1e5a655bedfe38971da005 100755
--- a/krita/data/templates/texture/Texture8k8bitsrgb.desktop
+++ b/krita/data/templates/texture/Texture8k8bitsrgb.desktop
@@ -30,6 +30,7 @@ Name[sv]=Struktur 8k 8-bitar SRGB
Name[tr]=Doku 8k 8bit srgb
Name[uk]=Текстура 8k, 8-бітова, srgb
Name[x-test]=xxTexture 8k 8bit srgbxx
+Name[zh_CN]=纹理 8K 像素 8 位 srgb 色彩空间
Type=Link
URL[$e]=.source/Texture8k8bitsrgb.kra
X-KDE-Hidden=false
diff --git a/krita/data/templates/texture/dark_template_texture.png b/krita/data/templates/texture/dark_template_texture.png
new file mode 100644
index 0000000000000000000000000000000000000000..fbf4b08ed7628ce2e8b5a1d85f807f1dfeefa2b7
Binary files /dev/null and b/krita/data/templates/texture/dark_template_texture.png differ
diff --git a/krita/data/templates/texture/light_template_texture.png b/krita/data/templates/texture/light_template_texture.png
new file mode 100644
index 0000000000000000000000000000000000000000..1d2371a473d54bb165ab6e6988b032681720b1a9
Binary files /dev/null and b/krita/data/templates/texture/light_template_texture.png differ
diff --git a/krita/data/templates/texture/template_texture.png b/krita/data/templates/texture/template_texture.png
deleted file mode 100644
index 120b4da015deeaf6004054ed3a66c95063edd756..0000000000000000000000000000000000000000
Binary files a/krita/data/templates/texture/template_texture.png and /dev/null differ
diff --git a/krita/data/templates/texture/texture-icon.svg b/krita/data/templates/texture/texture-icon.svg
new file mode 100644
index 0000000000000000000000000000000000000000..b81cc035ab6eb7ad705a6fe3631944d6695aefaa
--- /dev/null
+++ b/krita/data/templates/texture/texture-icon.svg
@@ -0,0 +1,110 @@
+
+
+
+image/svg+xml
\ No newline at end of file
diff --git a/krita/krita.action b/krita/krita.action
index c4038c13bba5099b63e864fb8970a7656ea69f8a..fe025f82241c12d506eb1b6ae43dce2ee42c4bbd 100644
--- a/krita/krita.action
+++ b/krita/krita.action
@@ -481,7 +481,7 @@
-
+ preset-switcher
Switch to Previous Preset
Switch to Previous Preset
@@ -521,7 +521,7 @@
-
+ smoothing-weighted
Brush Smoothing: Weighted
Brush Smoothing: Weighted
@@ -531,7 +531,7 @@
-
+ smoothing-no
Brush Smoothing: Disabled
Brush Smoothing: Disabled
@@ -541,7 +541,7 @@
-
+ smoothing-stabilizer
Brush Smoothing: Stabilizer
Brush Smoothing: Stabilizer
@@ -563,7 +563,7 @@
-
+ smoothing-basic
Brush Smoothing: Basic
Brush Smoothing: Basic
@@ -670,8 +670,8 @@
Shows global selection as a usual selection mask in <interface>Layers</interface> docker
Show Global Selection Mask
- 0
- 0
+ 100000
+ 100
true
@@ -681,7 +681,7 @@
Filters
-
+ color-to-alpha
&Color to Alpha...
Color to Alpha
@@ -2096,6 +2096,18 @@
false
+
+
+ Activate previously selected layer
+
+ Activate previously selected layer
+ Activate previously selected layer
+ 1000
+ 0
+ ;
+ false
+
+
groupLayer
&Group Layer
@@ -2306,7 +2318,7 @@
Copy layer to clipboard
Copy layer to clipboard
- 0
+ 10000
0
false
@@ -2318,7 +2330,7 @@
Cut layer to clipboard
Cut layer to clipboard
- 0
+ 10000
0
false
@@ -2330,7 +2342,7 @@
Paste layer from clipboard
Paste layer from clipboard
- 100000000000000
+ 10000
0
false
@@ -2378,7 +2390,7 @@
Select all layers
Select all layers
- 0
+ 10000
0
false
@@ -2390,7 +2402,7 @@
Select all visible layers
Select all visible layers
- 0
+ 10000
0
false
@@ -2402,7 +2414,7 @@
Select all locked layers
Select all locked layers
- 0
+ 10000
0
false
@@ -2414,7 +2426,7 @@
Select all invisible layers
Select all invisible layers
- 0
+ 10000
0
false
@@ -2426,7 +2438,7 @@
Select all unlocked layers
Select all unlocked layers
- 0
+ 10000
0
false
@@ -2613,7 +2625,7 @@
-
+ split-layer
Split Layer...
Split Layer
@@ -2793,7 +2805,7 @@
-
+ merge-layer-below
&Merge with Layer Below
Merge with Layer Below
diff --git a/krita/kritamenu.action b/krita/kritamenu.action
index 48befac8f47c08d174f4ba47213bbb62ebd7ac27..3ca097eb1f6e11ba2a5895ab7b73c6b51b037af5 100644
--- a/krita/kritamenu.action
+++ b/krita/kritamenu.action
@@ -285,7 +285,7 @@
- _edit-redo
+ edit-redo
Redo
Redo last undone action
@@ -527,7 +527,7 @@
0
0
Ctrl+Shift+F
- false
+ true
@@ -575,7 +575,7 @@
-
+ mirror-view
Mirror View
Mirror View
@@ -585,7 +585,7 @@
-
+ zoom-original
&Reset zoom
Reset zoom
@@ -597,11 +597,11 @@
-
+ zoom-in
Zoom &In
Zoom In
- Zoom In
+
0
0
Ctrl++
@@ -609,11 +609,11 @@
-
+ zoom-out
Zoom &Out
Zoom Out
- Zoom Out
+
0
0
Ctrl+-
@@ -621,7 +621,7 @@
-
+ rotate-canvas-right
Rotate &Canvas Right
Rotate Canvas Right
@@ -633,7 +633,7 @@
-
+ rotate-canvas-left
Rotate Canvas &Left
Rotate Canvas Left
@@ -645,7 +645,7 @@
-
+ rotation-reset
Reset Canvas Rotation
Reset Canvas Rotation
@@ -1381,7 +1381,7 @@
-
+ gmic
G'MIC
Apply G'Mic Action
diff --git a/krita/main.cc b/krita/main.cc
index 257b0afd2b577f1c916559bfc54b7d35bcdb7afa..44785e451ed70dc412dd61921b95ad1e4cc6b225 100644
--- a/krita/main.cc
+++ b/krita/main.cc
@@ -91,9 +91,9 @@ extern "C" int main(int argc, char **argv)
// The global initialization of the random generator
qsrand(time(0));
bool runningInKDE = !qgetenv("KDE_FULL_SESSION").isEmpty();
-
-#if defined HAVE_X11
- qputenv("QT_QPA_PLATFORM", "xcb");
+
+#if defined HAVE_X11
+ qputenv("QT_QPA_PLATFORM", "xcb");
#endif
/**
@@ -142,7 +142,6 @@ extern "C" int main(int argc, char **argv)
// Now that the paths are set, set the language. First check the override from the langage
// selection dialog.
- KLocalizedString::clearLanguages();
const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
QSettings languageoverride(configPath + QStringLiteral("/klanguageoverridesrc"), QSettings::IniFormat);
languageoverride.beginGroup(QStringLiteral("Language"));
@@ -163,6 +162,7 @@ extern "C" int main(int argc, char **argv)
// XXX: This doesn't work, for some !@#$% reason.
QLocale locale = QLocale::system();
if (locale.bcp47Name() != QStringLiteral("en")) {
+ qputenv("LANG", locale.bcp47Name().toLatin1());
KLocalizedString::setLanguages(QStringList() << locale.bcp47Name());
}
}
@@ -247,7 +247,7 @@ extern "C" int main(int argc, char **argv)
#if QT_VERSION >= 0x050700
app.setAttribute(Qt::AA_CompressHighFrequencyEvents, false);
#endif
-
+
// Set up remote arguments.
QObject::connect(&app, SIGNAL(messageReceived(QByteArray,QObject*)),
&app, SLOT(remoteArguments(QByteArray,QObject*)));
@@ -256,7 +256,7 @@ extern "C" int main(int argc, char **argv)
&app, SLOT(fileOpenRequested(QString)));
int state = app.exec();
-
+
return state;
}
diff --git a/krita/org.kde.krita.appdata.xml b/krita/org.kde.krita.appdata.xml
index 6725db32ed86545c27ad6c66136923ffee2c71cf..66c6696cf53c29657bdc063642935d76a6333d86 100644
--- a/krita/org.kde.krita.appdata.xml
+++ b/krita/org.kde.krita.appdata.xml
@@ -30,7 +30,7 @@
数码绘图,自由创作
Krita is the full-featured digital art studio.
- Krita ye l'estudiu dixital d'arte completu.
+ Krita ye l'estudiu completu d'arte dixital.
Krita je potpuni digitalni umjetnički studio.
Krita és l'estudi d'art digital ple de funcionalitats.
Krita és l'estudi d'art digital ple de funcionalitats.
@@ -75,6 +75,7 @@
Den är perfekt för att skissa och måla, samt erbjuder en helomfattande lösning för att skapa digitala målningsfiler från grunden av mästare.
Цей комплекс чудово пасує для створення ескізів та художніх зображень і є самодостатнім набором для створення файлів цифрових полотен «з нуля» для справжніх художників.
xxIt is perfect for sketching and painting, and presents an end–to–end solution for creating digital painting files from scratch by masters.xx
+ 适合做草图和绘画,为艺术大师提供了从草稿到数码绘画的完整解决方案。
Krita is a great choice for creating concept art, comics, textures for rendering and matte paintings. Krita supports many colorspaces like RGB and CMYK
at 8 and 16 bits integer channels, as well as 16 and 32 bits floating point channels.
@@ -100,6 +101,7 @@
Krita är ett utmärkt val för att skapa concept art, serier, strukturer för återgivning och bakgrundsmålningar. Krita stöder många färgrymder som RGB och CMYK med 8- och 16-bitars heltal, samt 16- och 32-bitars flyttal.
Krita — чудовий інструмент для створення концептуального живопису, коміксів, текстур для моделей та декорацій. У Krita передбачено підтримку багатьох просторів кольорів, зокрема RGB та CMYK з 8-бітовими та 16-бітовими цілими значеннями, а також 16-бітовими та 32-бітовими значеннями з рухомою крапкою для каналів кольорів.
xxKrita is a great choice for creating concept art, comics, textures for rendering and matte paintings. Krita supports many colorspaces like RGB and CMYK at 8 and 16 bits integer channels, as well as 16 and 32 bits floating point channels.xx
+ Krita 是创建抽象艺术,漫画,渲染纹理和亚光绘画的理想选择。Krita 支持非常多的色彩空间,比如 8 位和 16 位整数通道以及 16 位和 32 位浮点通道的 RGB 和 CMYK。
Have fun painting with the advanced brush engines, amazing filters and many handy features that make Krita enormously productive.
Zabavite se kreirajući napredne pogone četki, filtere i mnoge praktične osobine koje čine Krita vrlo produktivnim.
Gaudiu pintant amb els motors de pinzells avançats, els filtres impressionants i moltes funcionalitats útils que fan el Krita molt productiu.
@@ -122,6 +124,7 @@
Ha det så kul vid målning med de avancerade penselfunktionerna, fantastiska filtren och många praktiska funktioner som gör Krita så enormt produktiv.
Отримуйте задоволення від малювання за допомогою пензлів з найширшими можливостями, чудових фільтрів та багатьох зручних можливостей, які роблять Krita надзвичайно продуктивним засобом малювання.
xxHave fun painting with the advanced brush engines, amazing filters and many handy features that make Krita enormously productive.xx
+ 尽情使用高级笔刷引擎,超赞的滤镜和很多手绘特性,发挥 Krita 绝佳的创造力。
https://www.krita.org/
https://krita.org/about/faq/
diff --git a/krita/org.kde.krita.desktop b/krita/org.kde.krita.desktop
index ab017817d35e1018cfa325e5ea3658d8ef85ca5e..250e6e5e26f709d94bf8633aac68e0d83cdcbdcf 100644
--- a/krita/org.kde.krita.desktop
+++ b/krita/org.kde.krita.desktop
@@ -96,6 +96,7 @@ GenericName[tr]=Sayısal Boyama
GenericName[ug]=سىفىرلىق رەسىم سىزغۇ
GenericName[uk]=Цифрове малювання
GenericName[x-test]=xxDigital Paintingxx
+GenericName[zh_CN]=数字绘画
MimeType=application/x-krita;image/openraster;application/x-krita-paintoppreset;
Comment=Digital Painting
Comment[bs]=Digitalno Bojenje
@@ -131,6 +132,7 @@ Comment[tr]=Sayısal Boyama
Comment[ug]=سىفىرلىق رەسىم سىزغۇ
Comment[uk]=Цифрове малювання
Comment[x-test]=xxDigital Paintingxx
+Comment[zh_CN]=数字绘画
Type=Application
Icon=calligrakrita
Categories=Qt;KDE;Graphics;
diff --git a/krita/pics/layers/dark_fillLayer.svg b/krita/pics/layers/dark_fillLayer.svg
index d47660a4ef159558ccd73fa8d7164e2b27013b43..2570c0cb16a7c504ed249925dccc75badb4b433b 100644
--- a/krita/pics/layers/dark_fillLayer.svg
+++ b/krita/pics/layers/dark_fillLayer.svg
@@ -14,8 +14,8 @@
viewBox="0 0 12 12"
id="svg2"
version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="dark-fillLayer.svg">
+ inkscape:version="0.92.0 r15299"
+ sodipodi:docname="dark_fillLayer.svg">
image/svg+xml
-
+
@@ -58,12 +58,6 @@
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1040.3622)">
-
+ inkscape:version="0.92.0 r15299"
+ sodipodi:docname="light_fillLayer.svg">
image/svg+xml
-
+
@@ -58,12 +58,6 @@
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1040.3622)">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_audio-volume-high.svg b/krita/pics/svg/dark_audio-volume-high.svg
new file mode 100644
index 0000000000000000000000000000000000000000..5b9d6cb5b6ed4f7ebc22c3f97cf21d298abfe38c
--- /dev/null
+++ b/krita/pics/svg/dark_audio-volume-high.svg
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_audio-volume-mute.svg b/krita/pics/svg/dark_audio-volume-mute.svg
new file mode 100644
index 0000000000000000000000000000000000000000..315644bb393be82c5d06096be9739dc1aa59e181
--- /dev/null
+++ b/krita/pics/svg/dark_audio-volume-mute.svg
@@ -0,0 +1,112 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_color-to-alpha.svg b/krita/pics/svg/dark_color-to-alpha.svg
new file mode 100644
index 0000000000000000000000000000000000000000..1ff61cb3d13bba8b6a0f13e6eb975abbf595b3af
--- /dev/null
+++ b/krita/pics/svg/dark_color-to-alpha.svg
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_gmic.svg b/krita/pics/svg/dark_gmic.svg
new file mode 100644
index 0000000000000000000000000000000000000000..180e3a74afa6b1ca54ac6d9fd97662ffb8336e9e
--- /dev/null
+++ b/krita/pics/svg/dark_gmic.svg
@@ -0,0 +1,173 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_merge-layer-below.svg b/krita/pics/svg/dark_merge-layer-below.svg
new file mode 100644
index 0000000000000000000000000000000000000000..e50f24166127854a5c9c0e55f8c665919db8c9b1
--- /dev/null
+++ b/krita/pics/svg/dark_merge-layer-below.svg
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_mirror-view.svg b/krita/pics/svg/dark_mirror-view.svg
new file mode 100644
index 0000000000000000000000000000000000000000..a4b62ab6b6500689b9b2d5967269db7c5d4a7af5
--- /dev/null
+++ b/krita/pics/svg/dark_mirror-view.svg
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_preset-switcher.svg b/krita/pics/svg/dark_preset-switcher.svg
new file mode 100644
index 0000000000000000000000000000000000000000..5c1047ed02bea7b4b6f9a8223fc1f1a3722324a7
--- /dev/null
+++ b/krita/pics/svg/dark_preset-switcher.svg
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_rotate-canvas-left.svg b/krita/pics/svg/dark_rotate-canvas-left.svg
new file mode 100644
index 0000000000000000000000000000000000000000..40f926751f4c0173a39c557633e84270c04fd1ab
--- /dev/null
+++ b/krita/pics/svg/dark_rotate-canvas-left.svg
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_rotate-canvas-right.svg b/krita/pics/svg/dark_rotate-canvas-right.svg
new file mode 100644
index 0000000000000000000000000000000000000000..ae06d38fc340ac3e52d3a3892f56932dd6eca51e
--- /dev/null
+++ b/krita/pics/svg/dark_rotate-canvas-right.svg
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_rotation-reset.svg b/krita/pics/svg/dark_rotation-reset.svg
new file mode 100644
index 0000000000000000000000000000000000000000..e52312c8085991d703992f67205970a8cd33757a
--- /dev/null
+++ b/krita/pics/svg/dark_rotation-reset.svg
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_smoothing-basic.svg b/krita/pics/svg/dark_smoothing-basic.svg
new file mode 100644
index 0000000000000000000000000000000000000000..8bdd2f563e3112e9613c3c39b028f99ad1ce576c
--- /dev/null
+++ b/krita/pics/svg/dark_smoothing-basic.svg
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_smoothing-no.svg b/krita/pics/svg/dark_smoothing-no.svg
new file mode 100644
index 0000000000000000000000000000000000000000..c13228f91d093c4fe10cbe3eb8edca049863c1a7
--- /dev/null
+++ b/krita/pics/svg/dark_smoothing-no.svg
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_smoothing-stabilizer.svg b/krita/pics/svg/dark_smoothing-stabilizer.svg
new file mode 100644
index 0000000000000000000000000000000000000000..03ed4d78a9c006fbbec659870ae64abb16602742
--- /dev/null
+++ b/krita/pics/svg/dark_smoothing-stabilizer.svg
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_smoothing-weighted.svg b/krita/pics/svg/dark_smoothing-weighted.svg
new file mode 100644
index 0000000000000000000000000000000000000000..4b14a92d8a5ffafd012f351d5558402571a07872
--- /dev/null
+++ b/krita/pics/svg/dark_smoothing-weighted.svg
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/dark_split-layer.svg b/krita/pics/svg/dark_split-layer.svg
new file mode 100644
index 0000000000000000000000000000000000000000..301d93e805f4354725983d1cef04b6ede68035bf
--- /dev/null
+++ b/krita/pics/svg/dark_split-layer.svg
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_audio-none.svg b/krita/pics/svg/light_audio-none.svg
new file mode 100644
index 0000000000000000000000000000000000000000..00358b48442c18f24c14af752ee54a48512777cf
--- /dev/null
+++ b/krita/pics/svg/light_audio-none.svg
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_audio-volume-high.svg b/krita/pics/svg/light_audio-volume-high.svg
new file mode 100644
index 0000000000000000000000000000000000000000..e9a282df990eb3e3dede3a91c51e8d0898d7b697
--- /dev/null
+++ b/krita/pics/svg/light_audio-volume-high.svg
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_audio-volume-mute.svg b/krita/pics/svg/light_audio-volume-mute.svg
new file mode 100644
index 0000000000000000000000000000000000000000..e1f9c7ba15103d8fbd64a25ee27a37bc958f28d5
--- /dev/null
+++ b/krita/pics/svg/light_audio-volume-mute.svg
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_color-to-alpha.svg b/krita/pics/svg/light_color-to-alpha.svg
new file mode 100644
index 0000000000000000000000000000000000000000..9f09406d571ab54c9bf13530f7ba71cbddd609bc
--- /dev/null
+++ b/krita/pics/svg/light_color-to-alpha.svg
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_gmic.svg b/krita/pics/svg/light_gmic.svg
new file mode 100644
index 0000000000000000000000000000000000000000..0f496fd25d9d2b202633640453907693db937f5b
--- /dev/null
+++ b/krita/pics/svg/light_gmic.svg
@@ -0,0 +1,173 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_merge-layer-below.svg b/krita/pics/svg/light_merge-layer-below.svg
new file mode 100644
index 0000000000000000000000000000000000000000..20ea4fe11911e21d4b27ce24dbaa045d8162b6e1
--- /dev/null
+++ b/krita/pics/svg/light_merge-layer-below.svg
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_mirror-view.svg b/krita/pics/svg/light_mirror-view.svg
new file mode 100644
index 0000000000000000000000000000000000000000..82c66287c56d3f15b0f63ba3940e55622c051d98
--- /dev/null
+++ b/krita/pics/svg/light_mirror-view.svg
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_preset-switcher.svg b/krita/pics/svg/light_preset-switcher.svg
new file mode 100644
index 0000000000000000000000000000000000000000..38a28896ffcb6a0520484f027b332da70cc10b4d
--- /dev/null
+++ b/krita/pics/svg/light_preset-switcher.svg
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_rotate-canvas-left.svg b/krita/pics/svg/light_rotate-canvas-left.svg
new file mode 100644
index 0000000000000000000000000000000000000000..7169cd331eca774e93ef03f2df25dd4f41c2f29a
--- /dev/null
+++ b/krita/pics/svg/light_rotate-canvas-left.svg
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_rotate-canvas-right.svg b/krita/pics/svg/light_rotate-canvas-right.svg
new file mode 100644
index 0000000000000000000000000000000000000000..b093ca62c9f49dcc2efb26d59e6747181e4ea5fa
--- /dev/null
+++ b/krita/pics/svg/light_rotate-canvas-right.svg
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_rotation-reset.svg b/krita/pics/svg/light_rotation-reset.svg
new file mode 100644
index 0000000000000000000000000000000000000000..1c5ecefabbb792074fbb7dd9fab665c3c03d76e5
--- /dev/null
+++ b/krita/pics/svg/light_rotation-reset.svg
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_smoothing-basic.svg b/krita/pics/svg/light_smoothing-basic.svg
new file mode 100644
index 0000000000000000000000000000000000000000..8dc8fc10f686728162254ef742fb3af624c98462
--- /dev/null
+++ b/krita/pics/svg/light_smoothing-basic.svg
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_smoothing-no.svg b/krita/pics/svg/light_smoothing-no.svg
new file mode 100644
index 0000000000000000000000000000000000000000..737da98971baaf6e39468bf89c5ef824120d275f
--- /dev/null
+++ b/krita/pics/svg/light_smoothing-no.svg
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_smoothing-stabilizer.svg b/krita/pics/svg/light_smoothing-stabilizer.svg
new file mode 100644
index 0000000000000000000000000000000000000000..8a50de9c22223df9d88e9625ec1082f51f2b132a
--- /dev/null
+++ b/krita/pics/svg/light_smoothing-stabilizer.svg
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_smoothing-weighted.svg b/krita/pics/svg/light_smoothing-weighted.svg
new file mode 100644
index 0000000000000000000000000000000000000000..696fd12e87e0065096466ef7fe7e6b7923128ad2
--- /dev/null
+++ b/krita/pics/svg/light_smoothing-weighted.svg
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/light_split-layer.svg b/krita/pics/svg/light_split-layer.svg
new file mode 100644
index 0000000000000000000000000000000000000000..2d012507dde1fb10ad7eff31970717629ca53a85
--- /dev/null
+++ b/krita/pics/svg/light_split-layer.svg
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/krita/pics/svg/svg-icons.qrc b/krita/pics/svg/svg-icons.qrc
index c579ff90858391c604713c2e7f57c85dad941e72..312f78b568111169faeb06f8538b7961513d6ea3 100644
--- a/krita/pics/svg/svg-icons.qrc
+++ b/krita/pics/svg/svg-icons.qrc
@@ -64,7 +64,33 @@
light_lazyframeOff.svg
dark_lazyframeOn.svg
dark_lazyframeOff.svg
-
+ dark_mirror-view.svg
+ light_mirror-view.svg
+ dark_rotation-reset.svg
+ light_rotation-reset.svg
+ light_smoothing-basic.svg
+ light_smoothing-no.svg
+ light_smoothing-stabilizer.svg
+ light_smoothing-weighted.svg
+ dark_smoothing-basic.svg
+ dark_smoothing-no.svg
+ dark_smoothing-stabilizer.svg
+ dark_smoothing-weighted.svg
+ light_merge-layer-below.svg
+ dark_merge-layer-below.svg
+ light_rotate-canvas-left.svg
+ light_rotate-canvas-right.svg
+ dark_rotate-canvas-left.svg
+ dark_rotate-canvas-right.svg
+ light_gmic.svg
+ dark_gmic.svg
+ light_split-layer.svg
+ dark_split-layer.svg
+ light_color-to-alpha.svg
+ dark_color-to-alpha.svg
+ light_preset-switcher.svg
+ dark_preset-switcher.svg
+
dark_animation_play.svg
dark_animation_stop.svg
dark_dropframe.svg
@@ -92,11 +118,17 @@
light_interpolation_sharp.svg
light_interpolation_smooth.svg
+ dark_audio-none.svg
+ dark_audio-volume-high.svg
+ dark_audio-volume-mute.svg
dark_keyframe-add.svg
dark_keyframe-remove.svg
dark_zoom-fit.svg
dark_zoom-horizontal.svg
dark_zoom-vertical.svg
+ light_audio-none.svg
+ light_audio-volume-high.svg
+ light_audio-volume-mute.svg
light_keyframe-add.svg
light_keyframe-remove.svg
light_zoom-fit.svg
diff --git a/libs/brush/kis_qimage_pyramid.cpp b/libs/brush/kis_qimage_pyramid.cpp
index f4818cbe17d324f5f978ae365aa0e885379fc242..620349dd6fe4c6c29d0c097b793df12528f0b9a6 100644
--- a/libs/brush/kis_qimage_pyramid.cpp
+++ b/libs/brush/kis_qimage_pyramid.cpp
@@ -30,7 +30,7 @@
KisQImagePyramid::KisQImagePyramid(const QImage &baseImage)
{
- Q_ASSERT(!baseImage.isNull());
+ KIS_SAFE_ASSERT_RECOVER_RETURN(!baseImage.isNull());
m_originalSize = baseImage.size();
@@ -109,14 +109,14 @@ inline QRect roundRect(const QRectF &rc)
QRectF rect(rc);
- KIS_ASSERT_RECOVER_NOOP(rect.x() > -1e-6);
- KIS_ASSERT_RECOVER_NOOP(rect.y() > -1e-6);
+ KIS_SAFE_ASSERT_RECOVER_NOOP(rect.x() > -0.000001);
+ KIS_SAFE_ASSERT_RECOVER_NOOP(rect.y() > -0.000001);
- if (rect.x() < 0.0) {
+ if (rect.x() < 0.000001) {
rect.setLeft(0.0);
}
- if (rect.y() < 0.0) {
+ if (rect.y() < 0.000001) {
rect.setTop(0.0);
}
@@ -130,7 +130,7 @@ QTransform baseBrushTransform(KisDabShape const& shape,
QTransform transform;
transform.scale(shape.scaleX(), shape.scaleY());
- if (!qFuzzyCompare(shape.rotation(), 0)) {
+ if (!qFuzzyCompare(shape.rotation(), 0) && !qIsNaN(shape.rotation())) {
transform = transform * QTransform().rotateRadians(shape.rotation());
QRectF rotatedBounds = transform.mapRect(baseBounds);
transform = transform * QTransform::fromTranslate(-rotatedBounds.x(), -rotatedBounds.y());
@@ -159,9 +159,7 @@ void KisQImagePyramid::calculateParams(KisDabShape shape,
Q_UNUSED(baseScale);
QRectF originalBounds = QRectF(QPointF(), originalSize);
- QTransform originalTransform =
- baseBrushTransform(shape, subPixelX, subPixelY,
- originalBounds);
+ QTransform originalTransform = baseBrushTransform(shape, subPixelX, subPixelY, originalBounds);
qreal realBaseScaleX = qreal(baseSize.width()) / originalSize.width();
qreal realBaseScaleY = qreal(baseSize.height()) / originalSize.height();
@@ -170,32 +168,49 @@ void KisQImagePyramid::calculateParams(KisDabShape shape,
shape = KisDabShape(scaleX, scaleY/scaleX, shape.rotation());
QRectF baseBounds = QRectF(QPointF(), baseSize);
+ QTransform transform = baseBrushTransform(shape, subPixelX, subPixelY, baseBounds);
+ QRectF mappedRect = originalTransform.mapRect(originalBounds);
+
+ // Set up a 0,0,1,1 size and identity transform in case the transform fails to
+ // produce a usable result.
+ int width = 1;
+ int height = 1;
+ *outputTransform = QTransform();
+
+ if (mappedRect.isValid()) {
+ QRect expectedDstRect = roundRect(mappedRect);
- QTransform transform =
- baseBrushTransform(shape,
- subPixelX, subPixelY,
- baseBounds);
- QRect expectedDstRect = roundRect(originalTransform.mapRect(originalBounds));
#if 0 // Only enable when debugging; users shouldn't see this warning
- {
- QRect testingRect = roundRect(transform.mapRect(baseBounds));
- if (testingRect != expectedDstRect) {
- warnKrita << "WARNING: expected and real dab rects do not coincide!";
- warnKrita << " expected rect:" << expectedDstRect;
- warnKrita << " real rect: " << testingRect;
+ {
+ QRect testingRect = roundRect(transform.mapRect(baseBounds));
+ if (testingRect != expectedDstRect) {
+ warnKrita << "WARNING: expected and real dab rects do not coincide!";
+ warnKrita << " expected rect:" << expectedDstRect;
+ warnKrita << " real rect: " << testingRect;
+ }
}
- }
#endif
- KIS_ASSERT_RECOVER_NOOP(expectedDstRect.x() >= 0);
- KIS_ASSERT_RECOVER_NOOP(expectedDstRect.y() >= 0);
+ KIS_SAFE_ASSERT_RECOVER_NOOP(expectedDstRect.x() >= 0);
+ KIS_SAFE_ASSERT_RECOVER_NOOP(expectedDstRect.y() >= 0);
- int width = expectedDstRect.x() + expectedDstRect.width();
- int height = expectedDstRect.y() + expectedDstRect.height();
+ width = expectedDstRect.x() + expectedDstRect.width();
+ height = expectedDstRect.y() + expectedDstRect.height();
- // we should not return invalid image, so adjust the image to be
- // at least 1 px in size.
- width = qMax(1, width);
- height = qMax(1, height);
+ // we should not return invalid image, so adjust the image to be
+ // at least 1 px in size.
+ width = qMax(1, width);
+ height = qMax(1, height);
+ }
+ else {
+ qWarning() << "Brush transform generated an invalid rectangle!"
+ << ppVar(shape.scaleX()) << ppVar(shape.scaleY()) << ppVar(shape.rotation())
+ << ppVar(subPixelX) << ppVar(subPixelY)
+ << ppVar(originalSize)
+ << ppVar(baseScale)
+ << ppVar(baseSize)
+ << ppVar(baseBounds)
+ << ppVar(mappedRect);
+ }
*outputTransform = transform;
*outputSize = QSize(width, height);
@@ -238,7 +253,8 @@ void KisQImagePyramid::appendPyramidLevel(const QImage &image)
*
* See a unittest in: KisGbrBrushTest::testQPainterTransformationBorder
*/
- QSize levelSize = image.size();
+
+QSize levelSize = image.size();
QImage tmp = image.convertToFormat(QImage::Format_ARGB32);
tmp = tmp.copy(-QPAINTER_WORKAROUND_BORDER,
-QPAINTER_WORKAROUND_BORDER,
diff --git a/libs/command/kundo2stack.cpp b/libs/command/kundo2stack.cpp
index 1c2110df4cfe3fcd7e01a26d4d88144388c15e0c..9ba7f21f389cfaecdfdfb1f8c9db225d01ad6826 100644
--- a/libs/command/kundo2stack.cpp
+++ b/libs/command/kundo2stack.cpp
@@ -837,7 +837,7 @@ void KUndo2QStack::push(KUndo2Command *cmd)
}
}
m_index = m_command_list.size();
- }
+ }
if (try_merge && cur->mergeWith(cmd)) {
delete cmd;
if (!macro) {
@@ -1071,11 +1071,12 @@ bool KUndo2QStack::canRedo() const
QString KUndo2QStack::undoText() const
{
- if (!m_macro_stack.isEmpty())
+ if (!m_macro_stack.isEmpty()) {
return QString();
- if (m_index > 0 && m_command_list.at(m_index-1)!=0)
-
+ }
+ if (m_index > 0 && m_command_list.count() >= m_index -1 && m_command_list.at(m_index - 1) != 0) {
return m_command_list.at(m_index - 1)->actionText();
+ }
return QString();
}
diff --git a/libs/flake/KoInputDevice.cpp b/libs/flake/KoInputDevice.cpp
index b0f20eabf2bcaf43f48c79a82211bd4805eefa2f..b7905fb28e27cec10df152ba157aac234e236238 100644
--- a/libs/flake/KoInputDevice.cpp
+++ b/libs/flake/KoInputDevice.cpp
@@ -130,7 +130,6 @@ KoInputDevice KoInputDevice::eraser()
QDebug operator<<(QDebug dbg, const KoInputDevice &device)
{
-#ifndef NDEBUG
if (device.isMouse())
dbg.nospace() << "mouse";
else {
@@ -173,8 +172,5 @@ QDebug operator<<(QDebug dbg, const KoInputDevice &device)
}
dbg.space() << "(id: " << device.uniqueTabletId() << ")";
}
-#else
- Q_UNUSED(device);
-#endif
return dbg.space();
}
diff --git a/libs/global/kis_signal_compressor_with_param.h b/libs/global/kis_signal_compressor_with_param.h
index b4c07e18aaac00b8c397e63edc17e586d312fc08..a6882bc0f5f033d4fd43b2e2807b31b79e07e7e5 100644
--- a/libs/global/kis_signal_compressor_with_param.h
+++ b/libs/global/kis_signal_compressor_with_param.h
@@ -121,6 +121,10 @@ KisSignalCompressorWithParam(int delay, CallbackFunction function, KisSignalComp
return m_compressor.isActive();
}
+ void setDelay(int value) {
+ m_compressor.setDelay(value);
+ }
+
private:
void fakeSlotTimeout() {
m_function(m_currentParamValue);
diff --git a/libs/image/CMakeLists.txt b/libs/image/CMakeLists.txt
index dc16289fb80a5a745445a942618fcf8b6fb83099..62aef4a48eb1236989ebcf0c3f4751dffa728f51 100644
--- a/libs/image/CMakeLists.txt
+++ b/libs/image/CMakeLists.txt
@@ -350,9 +350,6 @@ endif()
if(HAVE_VC)
target_link_libraries(kritaimage PUBLIC ${Vc_LIBRARIES})
- if (NOT PACKAGERS_BUILD)
- set_property(TARGET kritaimage APPEND PROPERTY COMPILE_OPTIONS "${Vc_ARCHITECTURE_FLAGS}")
- endif()
endif()
if (NOT GSL_FOUND)
diff --git a/libs/image/brushengine/kis_standard_uniform_properties_factory.cpp b/libs/image/brushengine/kis_standard_uniform_properties_factory.cpp
index 7f87d34879fdca9bc68dcb857803e5eec3af14c8..a3bd739097cfe3e71c03fc01015dce77619b76b6 100644
--- a/libs/image/brushengine/kis_standard_uniform_properties_factory.cpp
+++ b/libs/image/brushengine/kis_standard_uniform_properties_factory.cpp
@@ -21,105 +21,112 @@
#include "kis_slider_based_paintop_property.h"
#include "kis_paintop_settings.h"
#include "kis_paintop_settings_update_proxy.h"
+#include
+#include
+#include
namespace KisStandardUniformPropertiesFactory {
- KisUniformPaintOpPropertySP createProperty(const KoID &id,
- KisPaintOpSettingsRestrictedSP settings,
- KisPaintopSettingsUpdateProxy *updateProxy)
- {
- return createProperty(id.id(), settings, updateProxy);
- }
- KisUniformPaintOpPropertySP createProperty(const QString &id,
- KisPaintOpSettingsRestrictedSP settings,
- KisPaintopSettingsUpdateProxy *updateProxy)
- {
- KisUniformPaintOpPropertySP result;
+
+KisUniformPaintOpPropertySP createProperty(const KoID &id,
+ KisPaintOpSettingsRestrictedSP settings,
+ KisPaintopSettingsUpdateProxy *updateProxy)
+{
+ return createProperty(id.id(), settings, updateProxy);
+}
+
+KisUniformPaintOpPropertySP createProperty(const QString &id,
+ KisPaintOpSettingsRestrictedSP settings,
+ KisPaintopSettingsUpdateProxy *updateProxy)
+{
+ KisUniformPaintOpPropertySP result;
- if (id == size.id()) {
- KisDoubleSliderBasedPaintOpPropertyCallback *prop =
+ if (id == size.id()) {
+ KisDoubleSliderBasedPaintOpPropertyCallback *prop =
new KisDoubleSliderBasedPaintOpPropertyCallback(
KisDoubleSliderBasedPaintOpPropertyCallback::Double,
"size",
i18n("Size"),
settings, 0);
- prop->setRange(0, 1000);
- prop->setDecimals(2);
- prop->setSingleStep(1);
- prop->setExponentRatio(3.0);
- prop->setSuffix(i18n(" px"));
-
- prop->setReadCallback(
- [](KisUniformPaintOpProperty *prop) {
- prop->setValue(prop->settings()->paintOpSize());
- });
- prop->setWriteCallback(
- [](KisUniformPaintOpProperty *prop) {
- prop->settings()->setPaintOpSize(prop->value().toReal());
- });
-
- QObject::connect(updateProxy, SIGNAL(sigSettingsChanged()), prop, SLOT(requestReadValue()));
- prop->requestReadValue();
- result = toQShared(prop);
- } else if (id == opacity.id()) {
- KisDoubleSliderBasedPaintOpPropertyCallback *prop =
+
+
+ prop->setRange(0, KSharedConfig::openConfig()->group("").readEntry("maximumBrushSize", 1000));
+ prop->setDecimals(2);
+ prop->setSingleStep(1);
+ prop->setExponentRatio(3.0);
+ prop->setSuffix(i18n(" px"));
+
+ prop->setReadCallback(
+ [](KisUniformPaintOpProperty *prop) {
+ prop->setValue(prop->settings()->paintOpSize());
+ });
+ prop->setWriteCallback(
+ [](KisUniformPaintOpProperty *prop) {
+ prop->settings()->setPaintOpSize(prop->value().toReal());
+ });
+
+ QObject::connect(updateProxy, SIGNAL(sigSettingsChanged()), prop, SLOT(requestReadValue()));
+ prop->requestReadValue();
+ result = toQShared(prop);
+ } else if (id == opacity.id()) {
+ KisDoubleSliderBasedPaintOpPropertyCallback *prop =
new KisDoubleSliderBasedPaintOpPropertyCallback(
KisDoubleSliderBasedPaintOpPropertyCallback::Double,
opacity.id(),
opacity.name(),
settings, 0);
- prop->setRange(0.0, 1.0);
- prop->setSingleStep(0.01);
-
- prop->setReadCallback(
- [](KisUniformPaintOpProperty *prop) {
- prop->setValue(prop->settings()->paintOpOpacity());
- });
- prop->setWriteCallback(
- [](KisUniformPaintOpProperty *prop) {
- prop->settings()->setPaintOpOpacity(prop->value().toReal());
- });
-
- QObject::connect(updateProxy, SIGNAL(sigSettingsChanged()), prop, SLOT(requestReadValue()));
- prop->requestReadValue();
- result = toQShared(prop);
- } else if (id == flow.id()) {
- KisDoubleSliderBasedPaintOpPropertyCallback *prop =
+ prop->setRange(0.0, 1.0);
+ prop->setSingleStep(0.01);
+
+ prop->setReadCallback(
+ [](KisUniformPaintOpProperty *prop) {
+ prop->setValue(prop->settings()->paintOpOpacity());
+ });
+ prop->setWriteCallback(
+ [](KisUniformPaintOpProperty *prop) {
+ prop->settings()->setPaintOpOpacity(prop->value().toReal());
+ });
+
+ QObject::connect(updateProxy, SIGNAL(sigSettingsChanged()), prop, SLOT(requestReadValue()));
+ prop->requestReadValue();
+ result = toQShared(prop);
+ } else if (id == flow.id()) {
+ KisDoubleSliderBasedPaintOpPropertyCallback *prop =
new KisDoubleSliderBasedPaintOpPropertyCallback(
KisDoubleSliderBasedPaintOpPropertyCallback::Double,
flow.id(),
flow.name(),
settings, 0);
- prop->setRange(0.0, 1.0);
- prop->setSingleStep(0.01);
-
- prop->setReadCallback(
- [](KisUniformPaintOpProperty *prop) {
- prop->setValue(prop->settings()->paintOpFlow());
- });
- prop->setWriteCallback(
- [](KisUniformPaintOpProperty *prop) {
- prop->settings()->setPaintOpFlow(prop->value().toReal());
- });
-
- QObject::connect(updateProxy, SIGNAL(sigSettingsChanged()), prop, SLOT(requestReadValue()));
- prop->requestReadValue();
- result = toQShared(prop);
- } else if (id == angle.id()) {
- qFatal("Not implemented");
- } else if (id == spacing.id()) {
- qFatal("Not implemented");
- }
-
- if (!result) {
- KIS_SAFE_ASSERT_RECOVER_NOOP(0 && "Unknown Uniform property id!");
- }
-
- return result;
+ prop->setRange(0.0, 1.0);
+ prop->setSingleStep(0.01);
+
+ prop->setReadCallback(
+ [](KisUniformPaintOpProperty *prop) {
+ prop->setValue(prop->settings()->paintOpFlow());
+ });
+ prop->setWriteCallback(
+ [](KisUniformPaintOpProperty *prop) {
+ prop->settings()->setPaintOpFlow(prop->value().toReal());
+ });
+
+ QObject::connect(updateProxy, SIGNAL(sigSettingsChanged()), prop, SLOT(requestReadValue()));
+ prop->requestReadValue();
+ result = toQShared(prop);
+ } else if (id == angle.id()) {
+ qFatal("Not implemented");
+ } else if (id == spacing.id()) {
+ qFatal("Not implemented");
+ }
+
+ if (!result) {
+ KIS_SAFE_ASSERT_RECOVER_NOOP(0 && "Unknown Uniform property id!");
}
+
+ return result;
+}
}
diff --git a/libs/image/brushengine/kis_standard_uniform_properties_factory.h b/libs/image/brushengine/kis_standard_uniform_properties_factory.h
index 44ed4d5113bc890e23504daf3a62b1aca508217e..517a6dea85744992c4388ed590df7fa01bf370dd 100644
--- a/libs/image/brushengine/kis_standard_uniform_properties_factory.h
+++ b/libs/image/brushengine/kis_standard_uniform_properties_factory.h
@@ -27,26 +27,27 @@ class KisPaintopSettingsUpdateProxy;
namespace KisStandardUniformPropertiesFactory
{
- static const KoID size("size", i18n("Size"));
- static const KoID opacity("opacity", i18n("Opacity"));
- static const KoID flow("flow", i18n("Flow"));
- static const KoID angle("angle", i18n("Angle"));
- static const KoID spacing("spacing", i18n("Spacing"));
+static const KoID size("size", ki18n("Size"));
+static const KoID opacity("opacity", ki18n("Opacity"));
+static const KoID flow("flow", ki18n("Flow"));
+static const KoID angle("angle", ki18n("Angle"));
+static const KoID spacing("spacing", ki18n("Spacing"));
- /**
+
+/**
* Overload of createProperty(const QString &id, ...)
*/
- KisUniformPaintOpPropertySP createProperty(const KoID &id,
- KisPaintOpSettingsRestrictedSP settings,
- KisPaintopSettingsUpdateProxy *updateProxy);
+KisUniformPaintOpPropertySP createProperty(const KoID &id,
+ KisPaintOpSettingsRestrictedSP settings,
+ KisPaintopSettingsUpdateProxy *updateProxy);
- /**
+/**
* Factory for creating standard uniform properties. Right now
* it supports only size, opacity and flow.
*/
- KisUniformPaintOpPropertySP createProperty(const QString &id,
- KisPaintOpSettingsRestrictedSP settings,
- KisPaintopSettingsUpdateProxy *updateProxy);
+KisUniformPaintOpPropertySP createProperty(const QString &id,
+ KisPaintOpSettingsRestrictedSP settings,
+ KisPaintopSettingsUpdateProxy *updateProxy);
}
#endif /* __KIS_STANDARD_UNIFORM_PROPERTIES_FACTORY_H */
diff --git a/libs/image/commands/kis_change_filter_command.h b/libs/image/commands/kis_change_filter_command.h
index f949ec148075d6df8a82844204ad196ca6bfeefc..7634b4059f2d88830ca32056ba82c9c517f768d1 100644
--- a/libs/image/commands/kis_change_filter_command.h
+++ b/libs/image/commands/kis_change_filter_command.h
@@ -72,10 +72,10 @@ private:
if (m_useGeneratorRegistry) {
KisGeneratorSP generator = KisGeneratorRegistry::instance()->value(name);
- config = generator->defaultConfiguration(KisPaintDeviceSP());
+ config = generator->defaultConfiguration();
} else {
KisFilterSP filter = KisFilterRegistry::instance()->value(name);
- config = filter->defaultConfiguration(KisPaintDeviceSP());
+ config = filter->defaultConfiguration();
}
config->fromXML(data);
diff --git a/libs/image/filter/kis_color_transformation_filter.cc b/libs/image/filter/kis_color_transformation_filter.cc
index ab451b62dc1451820daebb326f27226ef6039079..3b5457dec35f454bb19a713c7755634042a1c701 100644
--- a/libs/image/filter/kis_color_transformation_filter.cc
+++ b/libs/image/filter/kis_color_transformation_filter.cc
@@ -82,7 +82,7 @@ void KisColorTransformationFilter::processImpl(KisPaintDeviceSP device,
}
-KisFilterConfigurationSP KisColorTransformationFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisColorTransformationFilter::factoryConfiguration() const
{
return new KisColorTransformationConfiguration(id(), 0);
}
diff --git a/libs/image/filter/kis_color_transformation_filter.h b/libs/image/filter/kis_color_transformation_filter.h
index 8666cb3a44a7dc3a34ed1f431de3d638d2bbc17a..d2c7a4b9716a25eb9db501a0f011ef8b551339d3 100644
--- a/libs/image/filter/kis_color_transformation_filter.h
+++ b/libs/image/filter/kis_color_transformation_filter.h
@@ -42,7 +42,7 @@ public:
*/
virtual KoColorTransformation* createTransformation(const KoColorSpace* cs, const KisFilterConfigurationSP config) const = 0;
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
};
#endif
diff --git a/libs/image/filter/kis_filter_registry.cc b/libs/image/filter/kis_filter_registry.cc
index d9fb0ae4f015a588d08bb539b15c5259850c7b99..4e8143663b83f431477ea76cde0aa3b50e3ba987 100644
--- a/libs/image/filter/kis_filter_registry.cc
+++ b/libs/image/filter/kis_filter_registry.cc
@@ -74,7 +74,7 @@ KisFilterConfigurationSP KisFilterRegistry::cloneConfiguration(const KisFilterCo
{
Q_ASSERT(kfc);
KisFilterSP filter = value(kfc->name());
- KisFilterConfigurationSP newkfc(filter->defaultConfiguration(KisPaintDeviceSP()));
+ KisFilterConfigurationSP newkfc(filter->defaultConfiguration());
newkfc->fromXML(kfc->toXML());
return newkfc;
}
diff --git a/libs/image/generator/kis_generator.cpp b/libs/image/generator/kis_generator.cpp
index d123e33145e453fee830c5f4009a06d2a15fff86..2da7029953ced559e7e27f1d9baaf3664b6aa35e 100644
--- a/libs/image/generator/kis_generator.cpp
+++ b/libs/image/generator/kis_generator.cpp
@@ -29,7 +29,7 @@
KisGenerator::KisGenerator(const KoID& _id, const KoID & category, const QString & entry)
- : KisBaseProcessor(_id, category, entry)
+ : KisBaseProcessor(_id, category, entry)
{
init(id() + "_generator_bookmarks");
}
@@ -46,11 +46,6 @@ void KisGenerator::generate(KisProcessingInformation dst,
generate(dst, size, config, 0);
}
-const KoColorSpace * KisGenerator::colorSpace()
-{
- return 0;
-}
-
QRect KisGenerator::generatedRect(QRect _imageArea, const KisFilterConfigurationSP) const
{
return _imageArea;
diff --git a/libs/image/generator/kis_generator.h b/libs/image/generator/kis_generator.h
index e7b113dffc22c6bdc07250ca79256f616ba13fc9..df327919eb392ad4828e4fdbd048f94b54212ebd 100644
--- a/libs/image/generator/kis_generator.h
+++ b/libs/image/generator/kis_generator.h
@@ -72,13 +72,6 @@ public:
const KisFilterConfigurationSP config
) const;
- /**
- * A generator may be specialized for working in a certain colorspace.
- * If so, this function returns in instance of that colorspace, else
- * it return 0.
- */
- virtual const KoColorSpace * colorSpace();
-
/**
* @param _imageArea the rectangle of the image
* @return the rectangle that is affected by this generator, if the generator
diff --git a/libs/image/generator/kis_generator_layer.cpp b/libs/image/generator/kis_generator_layer.cpp
index 5dc99814fce632897b45706ae47a799adcdba01a..66a68f52edb70760346b5d8a773f4620c2c6e98a 100644
--- a/libs/image/generator/kis_generator_layer.cpp
+++ b/libs/image/generator/kis_generator_layer.cpp
@@ -105,7 +105,8 @@ void KisGeneratorLayer::update()
QRect processRect = exactBounds();
- resetCache(f->colorSpace());
+ resetCache();
+
KisPaintDeviceSP originalDevice = original();
KisProcessingInformation dstCfg(originalDevice,
diff --git a/libs/image/generator/kis_generator_registry.cpp b/libs/image/generator/kis_generator_registry.cpp
index ee8a66511ec9fd8dab301809c091292f9fc30f47..60c7e4f3ce06e7b8c5cd70f47874fab9178b2247 100644
--- a/libs/image/generator/kis_generator_registry.cpp
+++ b/libs/image/generator/kis_generator_registry.cpp
@@ -73,7 +73,7 @@ void KisGeneratorRegistry::add(const QString &id, KisGeneratorSP item)
KisFilterConfigurationSP KisGeneratorRegistry::cloneConfiguration(const KisFilterConfigurationSP kfc)
{
KisGeneratorSP filter = value(kfc->name());
- KisFilterConfigurationSP newkfc(filter->defaultConfiguration(KisPaintDeviceSP()));
+ KisFilterConfigurationSP newkfc(filter->defaultConfiguration());
newkfc->fromXML(kfc->toXML());
return newkfc;
}
diff --git a/libs/image/kis_base_processor.cpp b/libs/image/kis_base_processor.cpp
index d0c57893ff538ff7a200ca6660ee394c02508b9f..8390b707f2ba636294217b5397bb298fcd28ea8d 100644
--- a/libs/image/kis_base_processor.cpp
+++ b/libs/image/kis_base_processor.cpp
@@ -32,10 +32,10 @@ public:
KisBaseProcessorConfigurationFactory(KisBaseProcessor* _generator) : m_generator(_generator) {}
~KisBaseProcessorConfigurationFactory() override {}
KisSerializableConfigurationSP createDefault() override {
- return m_generator->factoryConfiguration(KisPaintDeviceSP());
+ return m_generator->factoryConfiguration();
}
KisSerializableConfigurationSP create(const QDomElement& e) override {
- KisSerializableConfigurationSP config = m_generator->factoryConfiguration(KisPaintDeviceSP());
+ KisSerializableConfigurationSP config = m_generator->factoryConfiguration();
config->fromXML(e);
return config;
}
@@ -85,21 +85,14 @@ KisBaseProcessor::~KisBaseProcessor()
delete d;
}
-KisFilterConfigurationSP KisBaseProcessor::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisBaseProcessor::factoryConfiguration() const
{
return new KisFilterConfiguration(id(), 0);
}
-KisFilterConfigurationSP KisBaseProcessor::defaultConfiguration(const KisPaintDeviceSP pd) const
+KisFilterConfigurationSP KisBaseProcessor::defaultConfiguration() const
{
- KisFilterConfigurationSP fc = 0;
-// if (bookmarkManager()) {
-// fc = dynamic_cast(bookmarkManager()->defaultConfiguration());
-// }
- if (!fc || !fc->isCompatible(pd)) {
- fc = factoryConfiguration(pd);
- }
- return fc;
+ return factoryConfiguration();
}
KisConfigWidget * KisBaseProcessor::createConfigurationWidget(QWidget *, const KisPaintDeviceSP) const
diff --git a/libs/image/kis_base_processor.h b/libs/image/kis_base_processor.h
index 65c857da8aa6b39daee6bbd3663135f7c3d83656..0cb9c75f8accc882b4987ad06bb012b78007b1ad 100644
--- a/libs/image/kis_base_processor.h
+++ b/libs/image/kis_base_processor.h
@@ -72,7 +72,7 @@ public:
*
* @return the default configuration of this widget
*/
- KisFilterConfigurationSP defaultConfiguration(const KisPaintDeviceSP) const;
+ KisFilterConfigurationSP defaultConfiguration() const;
/**
* @return the bookmark manager for this processor
@@ -139,7 +139,7 @@ public:
ColorSpaceIndependence colorSpaceIndependence() const;
/// @return the default configuration as defined by whoever wrote the plugin
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
protected:
diff --git a/libs/image/kis_colorspace_convert_visitor.cpp b/libs/image/kis_colorspace_convert_visitor.cpp
index 3ea96fd11747261c7a72c37a4ccc676c883084d7..c56b3e85ed16ba05efc5d47e675aacb9a76edbc4 100644
--- a/libs/image/kis_colorspace_convert_visitor.cpp
+++ b/libs/image/kis_colorspace_convert_visitor.cpp
@@ -28,6 +28,8 @@
#include "filter/kis_filter_configuration.h"
#include "filter/kis_filter_registry.h"
#include "filter/kis_filter.h"
+#include "kis_generator.h"
+#include "kis_generator_registry.h"
#include "generator/kis_generator_layer.h"
#include "kis_time_range.h"
#include
@@ -71,7 +73,8 @@ bool KisColorSpaceConvertVisitor::visit(KisPaintLayer *layer)
bool KisColorSpaceConvertVisitor::visit(KisGeneratorLayer *layer)
{
- return convertPaintDevice(layer);
+ layer->resetCache();
+ return true;
}
bool KisColorSpaceConvertVisitor::visit(KisAdjustmentLayer * layer)
@@ -83,19 +86,13 @@ bool KisColorSpaceConvertVisitor::visit(KisAdjustmentLayer * layer)
// XXX: Make this more generic for after 1.6, when we'll have many
// channel-specific filters.
KisFilterSP f = KisFilterRegistry::instance()->value("perchannel");
- layer->setFilter(f->defaultConfiguration(0));
+ layer->setFilter(f->defaultConfiguration());
}
layer->resetCache();
return true;
}
-bool KisColorSpaceConvertVisitor::visit(KisExternalLayer *layer)
-{
- Q_UNUSED(layer)
- return true;
-}
-
bool KisColorSpaceConvertVisitor::convertPaintDevice(KisLayer* layer)
{
diff --git a/libs/image/kis_colorspace_convert_visitor.h b/libs/image/kis_colorspace_convert_visitor.h
index 3fcc0174653c49672f4b76899cceac7e034e4e23..a2ad8a7459730cbed93a7b867aa9cf8b9f4da909 100644
--- a/libs/image/kis_colorspace_convert_visitor.h
+++ b/libs/image/kis_colorspace_convert_visitor.h
@@ -46,23 +46,31 @@ public:
bool visit(KisGroupLayer *layer);
bool visit(KisAdjustmentLayer* layer);
bool visit(KisGeneratorLayer * layer);
- bool visit(KisExternalLayer *);
+
+ bool visit(KisExternalLayer *) {
+ return true;
+ }
bool visit(KisNode*) {
return true;
}
+
bool visit(KisCloneLayer*) {
return true;
}
+
bool visit(KisFilterMask*) {
return true;
}
+
bool visit(KisTransformMask*) {
return true;
}
+
bool visit(KisTransparencyMask*) {
return true;
}
+
bool visit(KisSelectionMask*) {
return true;
}
diff --git a/libs/image/kis_fill_painter.cc b/libs/image/kis_fill_painter.cc
index ab3bdc5f907ccf170d15a7f5f0f760632037816d..05372cb7138469cc6d01b440ff28e74fc9527f89 100644
--- a/libs/image/kis_fill_painter.cc
+++ b/libs/image/kis_fill_painter.cc
@@ -50,15 +50,9 @@
#include
#include "KoColorSpace.h"
#include "kis_transaction.h"
-
#include "kis_pixel_selection.h"
-
#include
#include
-
-#include "kis_random_accessor_ng.h"
-
-
#include "kis_selection_filters.h"
KisFillPainter::KisFillPainter()
diff --git a/libs/image/kis_group_layer.cc b/libs/image/kis_group_layer.cc
index 4e8e1e6607fa1efccfdd4877f693834e04eaf0c5..9ccaf0deeacf3d1d1a7dcb45cf3d7ecdf5b5a1e9 100644
--- a/libs/image/kis_group_layer.cc
+++ b/libs/image/kis_group_layer.cc
@@ -72,6 +72,7 @@ KisGroupLayer::KisGroupLayer(const KisGroupLayer &rhs) :
m_d->y = rhs.m_d->y;
m_d->paintDevice->setDefaultPixel(const_cast(&rhs)->m_d->paintDevice->defaultPixel());
m_d->paintDevice->setProjectionDevice(true);
+ m_d->passThroughMode = rhs.passThroughMode();
}
KisGroupLayer::~KisGroupLayer()
diff --git a/libs/image/kis_image.h b/libs/image/kis_image.h
index a34ccf6054445fc369fb3614ca3028096dbd9f93..8704e5885af5751b570f1a86c921e4d026d03f47 100644
--- a/libs/image/kis_image.h
+++ b/libs/image/kis_image.h
@@ -111,7 +111,7 @@ public:
* expected to use the copied image anywhere except for saving. Don't use
* this option if you plan to work with the copied image later.
*/
- KisImage* clone(bool exactCopy = false);
+ KisImage *clone(bool exactCopy = false);
/**
* Render the projection onto a QImage.
diff --git a/libs/image/kis_image_animation_interface.cpp b/libs/image/kis_image_animation_interface.cpp
index 09cdc21f3ec4911b1b57d3f08e33fb16348d7dab..5d2cd3fd298de3941655ab9356baedcc03a70141 100644
--- a/libs/image/kis_image_animation_interface.cpp
+++ b/libs/image/kis_image_animation_interface.cpp
@@ -18,6 +18,8 @@
#include "kis_image_animation_interface.h"
+#include
+
#include "kis_global.h"
#include "kis_image.h"
#include "kis_regenerate_frame_stroke_strategy.h"
@@ -37,6 +39,8 @@ struct KisImageAnimationInterface::Private
externalFrameActive(false),
frameInvalidationBlocked(false),
cachedLastFrameValue(-1),
+ audioChannelMuted(false),
+ audioChannelVolume(0.5),
m_currentTime(0),
m_currentUITime(0)
{
@@ -50,6 +54,9 @@ struct KisImageAnimationInterface::Private
playbackRange(rhs.playbackRange),
framerate(rhs.framerate),
cachedLastFrameValue(-1),
+ audioChannelFileName(rhs.audioChannelFileName),
+ audioChannelMuted(rhs.audioChannelMuted),
+ audioChannelVolume(rhs.audioChannelVolume),
m_currentTime(rhs.m_currentTime),
m_currentUITime(rhs.m_currentUITime)
{
@@ -63,6 +70,9 @@ struct KisImageAnimationInterface::Private
KisTimeRange playbackRange;
int framerate;
int cachedLastFrameValue;
+ QString audioChannelFileName;
+ bool audioChannelMuted;
+ qreal audioChannelVolume;
KisSwitchTimeStrokeStrategy::SharedTokenWSP switchToken;
@@ -156,6 +166,43 @@ int KisImageAnimationInterface::framerate() const
return m_d->framerate;
}
+QString KisImageAnimationInterface::audioChannelFileName() const
+{
+ return m_d->audioChannelFileName;
+}
+
+void KisImageAnimationInterface::setAudioChannelFileName(const QString &fileName)
+{
+ QFileInfo info(fileName);
+
+ KIS_SAFE_ASSERT_RECOVER_NOOP(fileName.isEmpty() || info.isAbsolute());
+ m_d->audioChannelFileName = fileName.isEmpty() ? fileName : info.absoluteFilePath();
+
+ emit sigAudioChannelChanged();
+}
+
+bool KisImageAnimationInterface::isAudioMuted() const
+{
+ return m_d->audioChannelMuted;
+}
+
+void KisImageAnimationInterface::setAudioMuted(bool value)
+{
+ m_d->audioChannelMuted = value;
+ emit sigAudioChannelChanged();
+}
+
+qreal KisImageAnimationInterface::audioVolume() const
+{
+ return m_d->audioChannelVolume;
+}
+
+void KisImageAnimationInterface::setAudioVolume(qreal value)
+{
+ m_d->audioChannelVolume = value;
+ emit sigAudioVolumeChanged();
+}
+
void KisImageAnimationInterface::setFramerate(int fps)
{
m_d->framerate = fps;
diff --git a/libs/image/kis_image_animation_interface.h b/libs/image/kis_image_animation_interface.h
index b596c69292426d0a657290cc1effed102639390e..f9af07ccff85d9833aa1dfd2cb8dc43406e30a5a 100644
--- a/libs/image/kis_image_animation_interface.h
+++ b/libs/image/kis_image_animation_interface.h
@@ -122,6 +122,37 @@ public:
int framerate() const;
+ /**
+ * @return **absolute** file name of the audio channel file
+ */
+ QString audioChannelFileName() const;
+
+ /**
+ * Sets **absolute** file name of the audio channel file. Dont' try to pass
+ * a relative path, it'll assert!
+ */
+ void setAudioChannelFileName(const QString &fileName);
+
+ /**
+ * @return is the audio channel is currently muted
+ */
+ bool isAudioMuted() const;
+
+ /**
+ * Mutes the audio channel
+ */
+ void setAudioMuted(bool value);
+
+ /**
+ * Returns the preferred audio value in rangle [0, 1]
+ */
+ qreal audioVolume() const;
+
+ /**
+ * Set the preferred volume for the audio channel in range [0, 1]
+ */
+ void setAudioVolume(qreal value);
+
public Q_SLOTS:
void setFramerate(int fps);
public:
@@ -158,6 +189,17 @@ Q_SIGNALS:
void sigFullClipRangeChanged();
void sigPlaybackRangeChanged();
+ /**
+ * Emitted when the audio channel of the document is changed
+ */
+ void sigAudioChannelChanged();
+
+ /**
+ * Emitted when audion volume changes. Please note that it doesn't change
+ * when you mute the channel! When muting, sigAudioChannelChanged() is used instead!
+ */
+ void sigAudioVolumeChanged();
+
private:
struct Private;
const QScopedPointer m_d;
diff --git a/libs/image/kis_layer.cc b/libs/image/kis_layer.cc
index 158488433b0bfe9047bc80b798ab32fc20be85b6..551d8e0bbfd81d7fb1b1e3a5eef767ad8d0f831f 100644
--- a/libs/image/kis_layer.cc
+++ b/libs/image/kis_layer.cc
@@ -795,6 +795,10 @@ QRect KisLayer::outgoingChangeRect(const QRect &rect) const
QImage KisLayer::createThumbnail(qint32 w, qint32 h)
{
+ if (w == 0 || h == 0) {
+ return QImage();
+ }
+
KisPaintDeviceSP originalDevice = original();
return originalDevice ?
diff --git a/libs/image/kis_paint_device_cache.h b/libs/image/kis_paint_device_cache.h
index f783981879b7bb628043428d54b7b903285a77cc..39062ba66459c09a93248f5149418e02490fa3a4 100644
--- a/libs/image/kis_paint_device_cache.h
+++ b/libs/image/kis_paint_device_cache.h
@@ -88,7 +88,11 @@ public:
QImage createThumbnail(qint32 w, qint32 h, qreal oversample, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags) {
QImage thumbnail;
- if(m_thumbnailsValid) {
+ if (h == 0 || w == 0) {
+ return thumbnail;
+ }
+
+ if (m_thumbnailsValid) {
thumbnail = findThumbnail(w, h, oversample);
}
else {
@@ -96,7 +100,7 @@ public:
m_thumbnailsValid = true;
}
- if(thumbnail.isNull()) {
+ if (thumbnail.isNull()) {
thumbnail = m_paintDevice->createThumbnail(w, h, QRect(), oversample, renderingIntent, conversionFlags);
cacheThumbnail(w, h, oversample, thumbnail);
}
diff --git a/libs/image/kis_paint_layer.cc b/libs/image/kis_paint_layer.cc
index e6b9c9947d4533d02dad4837fa920ee497d7904b..25e8e1691b64acaca06f2876bd785a01610d89b5 100644
--- a/libs/image/kis_paint_layer.cc
+++ b/libs/image/kis_paint_layer.cc
@@ -62,8 +62,8 @@ public:
};
KisPaintLayer::KisPaintLayer(KisImageWSP image, const QString& name, quint8 opacity, KisPaintDeviceSP dev)
- : KisLayer(image, name, opacity)
- , m_d(new Private())
+ : KisLayer(image, name, opacity)
+ , m_d(new Private())
{
Q_ASSERT(dev);
@@ -73,8 +73,8 @@ KisPaintLayer::KisPaintLayer(KisImageWSP image, const QString& name, quint8 opac
KisPaintLayer::KisPaintLayer(KisImageWSP image, const QString& name, quint8 opacity)
- : KisLayer(image, name, opacity)
- , m_d(new Private())
+ : KisLayer(image, name, opacity)
+ , m_d(new Private())
{
Q_ASSERT(image);
@@ -82,8 +82,8 @@ KisPaintLayer::KisPaintLayer(KisImageWSP image, const QString& name, quint8 opac
}
KisPaintLayer::KisPaintLayer(KisImageWSP image, const QString& name, quint8 opacity, const KoColorSpace * colorSpace)
- : KisLayer(image, name, opacity)
- , m_d(new Private())
+ : KisLayer(image, name, opacity)
+ , m_d(new Private())
{
if (!colorSpace) {
Q_ASSERT(image);
@@ -94,12 +94,11 @@ KisPaintLayer::KisPaintLayer(KisImageWSP image, const QString& name, quint8 opac
}
KisPaintLayer::KisPaintLayer(const KisPaintLayer& rhs)
- : KisLayer(rhs)
- , KisIndirectPaintingSupport()
- , m_d(new Private)
+ : KisLayer(rhs)
+ , KisIndirectPaintingSupport()
+ , m_d(new Private)
{
const bool copyFrames = (rhs.m_d->contentChannel != 0);
-
if (!copyFrames) {
init(new KisPaintDevice(*rhs.m_d->paintDevice.data()), rhs.m_d->paintChannelFlags);
} else {
@@ -148,8 +147,8 @@ bool KisPaintLayer::needProjection() const
}
void KisPaintLayer::copyOriginalToProjection(const KisPaintDeviceSP original,
- KisPaintDeviceSP projection,
- const QRect& rect) const
+ KisPaintDeviceSP projection,
+ const QRect& rect) const
{
KisIndirectPaintingSupport::ReadLocker l(this);
@@ -162,9 +161,9 @@ void KisPaintLayer::copyOriginalToProjection(const KisPaintDeviceSP original,
}
if (m_d->contentChannel &&
- m_d->contentChannel->keyframeCount() > 1 &&
- onionSkinEnabled() &&
- !m_d->paintDevice->defaultBounds()->externalFrameActive()) {
+ m_d->contentChannel->keyframeCount() > 1 &&
+ onionSkinEnabled() &&
+ !m_d->paintDevice->defaultBounds()->externalFrameActive()) {
KisPaintDeviceSP skins = m_d->onionSkinCache.projection(m_d->paintDevice);
@@ -175,8 +174,8 @@ void KisPaintLayer::copyOriginalToProjection(const KisPaintDeviceSP original,
}
if (!m_d->contentChannel ||
- (m_d->contentChannel && m_d->contentChannel->keyframeCount() <= 1) ||
- !onionSkinEnabled()) {
+ (m_d->contentChannel && m_d->contentChannel->keyframeCount() <= 1) ||
+ !onionSkinEnabled()) {
m_d->onionSkinCache.reset();
}
@@ -326,7 +325,7 @@ void KisPaintLayer::slotExternalUpdateOnionSkins()
if (!onionSkinEnabled()) return;
const QRect dirtyRect =
- KisOnionSkinCompositor::instance()->calculateFullExtent(m_d->paintDevice);
+ KisOnionSkinCompositor::instance()->calculateFullExtent(m_d->paintDevice);
setDirty(dirtyRect);
}
diff --git a/libs/image/kis_selection_based_layer.cpp b/libs/image/kis_selection_based_layer.cpp
index 09daf2217ef922127922ea39b0f8c2daecd3594b..80cd1d51f49123c46f9b040ff05788b0d677b3f0 100644
--- a/libs/image/kis_selection_based_layer.cpp
+++ b/libs/image/kis_selection_based_layer.cpp
@@ -192,19 +192,15 @@ QRect KisSelectionBasedLayer::needRect(const QRect &rect, PositionToFilthy pos)
return rect;
}
-void KisSelectionBasedLayer::resetCache(const KoColorSpace *colorSpace)
+void KisSelectionBasedLayer::resetCache()
{
KisImageSP imageSP = image().toStrongRef();
if (!imageSP) {
return;
}
- if (!colorSpace)
- colorSpace = imageSP->colorSpace();
- if (!m_d->paintDevice ||
- *m_d->paintDevice->colorSpace() != *colorSpace) {
-
- m_d->paintDevice = KisPaintDeviceSP(new KisPaintDevice(KisNodeWSP(this), colorSpace, new KisDefaultBounds(image())));
+ if (!m_d->paintDevice || *m_d->paintDevice->colorSpace() != *imageSP->colorSpace()) {
+ m_d->paintDevice = KisPaintDeviceSP(new KisPaintDevice(KisNodeWSP(this), imageSP->colorSpace(), new KisDefaultBounds(image())));
} else {
m_d->paintDevice->clear();
}
diff --git a/libs/image/kis_selection_based_layer.h b/libs/image/kis_selection_based_layer.h
index 0007cd61e0907b584f97061eed678d35745e108c..8362c5f5cf253de053bc9c7c965de389831244b3 100644
--- a/libs/image/kis_selection_based_layer.h
+++ b/libs/image/kis_selection_based_layer.h
@@ -73,7 +73,7 @@ public:
* resets cached projection of lower layer to a new device
* @return void
*/
- void resetCache(const KoColorSpace *colorSpace = 0);
+ void resetCache();
/**
* for KisLayer::setDirty(const QRegion&)
diff --git a/libs/image/kis_selection_mask.cpp b/libs/image/kis_selection_mask.cpp
index 8ece07eb4d1c3a65c66df8cf9cabcc24ea6782db..f43494a16ba1884fc765b7e962d68af478df5e45 100644
--- a/libs/image/kis_selection_mask.cpp
+++ b/libs/image/kis_selection_mask.cpp
@@ -63,7 +63,6 @@ KisSelectionMask::KisSelectionMask(KisImageWSP image)
new KisThreadSafeSignalCompressor(300, KisSignalCompressor::POSTPONE);
connect(m_d->updatesCompressor, SIGNAL(timeout()), SLOT(slotSelectionChangedCompressed()));
- this->setObjectName("KisSelectionMask");
this->moveToThread(image->thread());
}
@@ -73,8 +72,10 @@ KisSelectionMask::KisSelectionMask(const KisSelectionMask& rhs)
{
setActive(false);
m_d->image = rhs.image();
+ m_d->updatesCompressor =
+ new KisThreadSafeSignalCompressor(300, KisSignalCompressor::POSTPONE);
+
connect(m_d->updatesCompressor, SIGNAL(timeout()), SLOT(slotSelectionChangedCompressed()));
- this->setObjectName("KisSelectionMask");
this->moveToThread(m_d->image->thread());
}
diff --git a/libs/image/recorder/kis_recorded_filter_action.cpp b/libs/image/recorder/kis_recorded_filter_action.cpp
index 04dc26b937d9e60d0d93b976d3d8664df671572f..5052a43f116515b97e7efa1966c24390097bf2e4 100644
--- a/libs/image/recorder/kis_recorded_filter_action.cpp
+++ b/libs/image/recorder/kis_recorded_filter_action.cpp
@@ -47,7 +47,7 @@ struct Q_DECL_HIDDEN KisRecordedFilterAction::Private {
KisFilterConfigurationSP configuration() {
if (!filterConfiguration) {
- filterConfiguration = filter->defaultConfiguration(0);
+ filterConfiguration = filter->defaultConfiguration();
if (filterConfiguration) {
filterConfiguration->fromXML(configstr);
}
@@ -162,7 +162,7 @@ KisRecordedAction* KisRecordedFilterActionFactory::fromXML(const QDomElement& el
KisNodeQueryPath pathnode = KisNodeQueryPath::fromString(elt.attribute("path"));
const KisFilterSP filter = KisFilterRegistry::instance()->get(elt.attribute("filter"));
if (filter) {
- KisFilterConfigurationSP config = filter->defaultConfiguration(0);
+ KisFilterConfigurationSP config = filter->defaultConfiguration();
QDomElement paramsElt = elt.firstChildElement("Params");
if (config && !paramsElt.isNull()) {
config->fromXML(paramsElt);
diff --git a/libs/image/recorder/kis_recorded_paint_action.cpp b/libs/image/recorder/kis_recorded_paint_action.cpp
index 50332e34d5b03ef2d42455e90b5ae20987b5a103..2a5456664612c5906f36ae9ccb977d696a175b80 100644
--- a/libs/image/recorder/kis_recorded_paint_action.cpp
+++ b/libs/image/recorder/kis_recorded_paint_action.cpp
@@ -391,7 +391,7 @@ void KisRecordedPaintActionFactory::setupPaintAction(KisRecordedPaintAction* act
KisFilterConfigurationSP config = 0;
if (g)
{
- config = g->defaultConfiguration(0);
+ config = g->defaultConfiguration();
QDomElement paramsElt = elt.firstChildElement("Generator");
if (config && !paramsElt.isNull()) {
config->fromXML(paramsElt);
diff --git a/libs/image/tests/kis_adjustment_layer_test.cpp b/libs/image/tests/kis_adjustment_layer_test.cpp
index dca96250c44e7f732a172cd2f6c7c68427757884..97814f4be116da2fa5f2f5314da76965d8179bb9 100644
--- a/libs/image/tests/kis_adjustment_layer_test.cpp
+++ b/libs/image/tests/kis_adjustment_layer_test.cpp
@@ -41,7 +41,7 @@ void KisAdjustmentLayerTest::testCreation()
KisImageSP image = new KisImage(0, 512, 512, colorSpace, "adj layer test");
KisFilterSP f = KisFilterRegistry::instance()->value("invert");
Q_ASSERT(f);
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
Q_ASSERT(kfc);
KisAdjustmentLayerSP test = new KisAdjustmentLayer(image, "test", kfc, 0);
@@ -54,7 +54,7 @@ void KisAdjustmentLayerTest::testSetSelection()
KisImageSP image = new KisImage(0, 512, 512, colorSpace, "adj layer test");
KisFilterSP f = KisFilterRegistry::instance()->value("invert");
Q_ASSERT(f);
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
Q_ASSERT(kfc);
sel->pixelSelection()->select(QRect(10, 10, 200, 200), 128);
KisAdjustmentLayerSP l1 = new KisAdjustmentLayer(image, "bla", kfc, sel);
@@ -67,7 +67,7 @@ void KisAdjustmentLayerTest::testInverted()
KisImageSP image = new KisImage(0, 512, 512, colorSpace, "adj layer test");
KisFilterSP f = KisFilterRegistry::instance()->value("invert");
Q_ASSERT(f);
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
Q_ASSERT(kfc);
KisSelectionSP sel2 = new KisSelection();
@@ -90,7 +90,7 @@ void KisAdjustmentLayerTest::testSelectionParent()
{
KisAdjustmentLayerSP adjLayer =
- new KisAdjustmentLayer(image, "bla", f->defaultConfiguration(0), 0);
+ new KisAdjustmentLayer(image, "bla", f->defaultConfiguration(), 0);
QCOMPARE(adjLayer->internalSelection()->parentNode(), KisNodeWSP(adjLayer));
}
@@ -98,14 +98,14 @@ void KisAdjustmentLayerTest::testSelectionParent()
{
KisSelectionSP selection = new KisSelection();
KisAdjustmentLayerSP adjLayer =
- new KisAdjustmentLayer(image, "bla", f->defaultConfiguration(0), selection);
+ new KisAdjustmentLayer(image, "bla", f->defaultConfiguration(), selection);
QCOMPARE(adjLayer->internalSelection()->parentNode(), KisNodeWSP(adjLayer));
}
{
KisAdjustmentLayerSP adjLayer =
- new KisAdjustmentLayer(image, "bla", f->defaultConfiguration(0), 0);
+ new KisAdjustmentLayer(image, "bla", f->defaultConfiguration(), 0);
KisSelectionSP selection = new KisSelection();
adjLayer->setInternalSelection(selection);
diff --git a/libs/image/tests/kis_filter_mask_test.cpp b/libs/image/tests/kis_filter_mask_test.cpp
index 71f2087d5da553691d25dca3dbd0fa300b2e23bf..6f16a2f4bb33899ae4d14ef66a6e83962fa7310d 100644
--- a/libs/image/tests/kis_filter_mask_test.cpp
+++ b/libs/image/tests/kis_filter_mask_test.cpp
@@ -62,7 +62,7 @@ void KisFilterMaskTest::testProjectionNotSelected()
KisFilterSP f = KisFilterRegistry::instance()->value("invert");
Q_ASSERT(f);
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
Q_ASSERT(kfc);
KisFilterMaskSP mask = new KisFilterMask();
@@ -98,7 +98,7 @@ void KisFilterMaskTest::testProjectionSelected()
KisFilterSP f = KisFilterRegistry::instance()->value("invert");
Q_ASSERT(f);
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
Q_ASSERT(kfc);
KisFilterMaskSP mask = new KisFilterMask();
diff --git a/libs/image/tests/kis_filter_test.cpp b/libs/image/tests/kis_filter_test.cpp
index 49ca7ac20d42a2ba2538f93540e9e9337c63c0d3..7f081fc4ab22d460ddeffae78b9f5afec7b33b4d 100644
--- a/libs/image/tests/kis_filter_test.cpp
+++ b/libs/image/tests/kis_filter_test.cpp
@@ -71,7 +71,7 @@ void KisFilterTest::testWithProgressUpdater()
KisFilterSP f = KisFilterRegistry::instance()->value("invert");
Q_ASSERT(f);
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
Q_ASSERT(kfc);
f->process(dev, QRect(QPoint(0,0), qimage.size()), kfc, updater);
@@ -97,7 +97,7 @@ void KisFilterTest::testSingleThreaded()
KisFilterSP f = KisFilterRegistry::instance()->value("invert");
Q_ASSERT(f);
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
Q_ASSERT(kfc);
f->process(dev, QRect(QPoint(0,0), qimage.size()), kfc);
@@ -126,7 +126,7 @@ void KisFilterTest::testDifferentSrcAndDst()
KisFilterSP f = KisFilterRegistry::instance()->value("invert");
Q_ASSERT(f);
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
Q_ASSERT(kfc);
f->process(src, dst, sel, QRect(QPoint(0,0), qimage.size()), kfc);
@@ -167,7 +167,7 @@ void KisFilterTest::testOldDataApiAfterCopy()
KisFilterSP f = KisFilterRegistry::instance()->value("invert");
Q_ASSERT(f);
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
Q_ASSERT(kfc);
/**
@@ -215,7 +215,7 @@ void KisFilterTest::testBlurFilterApplicationRect()
KisFilterSP f = KisFilterRegistry::instance()->value("blur");
Q_ASSERT(f);
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
Q_ASSERT(kfc);
f->process(src1, dst1, 0, filterRect, kfc);
diff --git a/libs/image/tests/kis_image_test.cpp b/libs/image/tests/kis_image_test.cpp
index c8db0dfbd72089f37a4bbd01fbda8ab734afd2f8..477d93672939a09fb32d0f3e5a249519f1201535 100644
--- a/libs/image/tests/kis_image_test.cpp
+++ b/libs/image/tests/kis_image_test.cpp
@@ -167,7 +167,7 @@ void KisImageTest::testConvertImageColorSpace()
KisFilterSP filter = KisFilterRegistry::instance()->value("blur");
Q_ASSERT(filter);
- KisFilterConfigurationSP configuration = filter->defaultConfiguration(0);
+ KisFilterConfigurationSP configuration = filter->defaultConfiguration();
Q_ASSERT(configuration);
KisLayerSP blur1 = new KisAdjustmentLayer(image, "blur1", configuration, 0);
diff --git a/libs/image/tests/kis_layer_test.cpp b/libs/image/tests/kis_layer_test.cpp
index 3b3386c30c2191f656c6dfebb2823a8fe4e66cb2..086bb152718068e53857a5dea4db17154695ec21 100644
--- a/libs/image/tests/kis_layer_test.cpp
+++ b/libs/image/tests/kis_layer_test.cpp
@@ -246,8 +246,8 @@ void KisLayerTest::testMasksChangeRect()
KisFilterSP filter = KisFilterRegistry::instance()->value("blur");
Q_ASSERT(filter);
- KisFilterConfigurationSP configuration1 = filter->defaultConfiguration(0);
- KisFilterConfigurationSP configuration2 = filter->defaultConfiguration(0);
+ KisFilterConfigurationSP configuration1 = filter->defaultConfiguration();
+ KisFilterConfigurationSP configuration2 = filter->defaultConfiguration();
filterMask1->setFilter(configuration1);
filterMask2->setFilter(configuration2);
diff --git a/libs/image/tests/kis_recorded_filter_action_test.cpp b/libs/image/tests/kis_recorded_filter_action_test.cpp
index 86675031db366fee28b0c92a6a1e03270f6e58de..94677fcb8b74529729d4b3b5da1bc83f43cd57f0 100644
--- a/libs/image/tests/kis_recorded_filter_action_test.cpp
+++ b/libs/image/tests/kis_recorded_filter_action_test.cpp
@@ -34,7 +34,7 @@ void KisRecordedFilterActionTest::testCreation()
{
const KoColorSpace * cs = KoColorSpaceRegistry::instance()->rgb8();
KisFilterSP f = KisFilterRegistry::instance()->value("invert");
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
KisImageSP image = new KisImage(0, 10, 10, cs, "merge test");
KisPaintLayerSP layer = new KisPaintLayer(image, "test", OPACITY_OPAQUE_U8);
diff --git a/libs/image/tests/kis_simple_update_queue_test.cpp b/libs/image/tests/kis_simple_update_queue_test.cpp
index 9024f60a9253a862da22aaebde6d3bcc94442743..f3905268ade81db6b5df4263a2339d10c7bc47ac 100644
--- a/libs/image/tests/kis_simple_update_queue_test.cpp
+++ b/libs/image/tests/kis_simple_update_queue_test.cpp
@@ -167,7 +167,7 @@ void KisSimpleUpdateQueueTest::testChecksum()
KisFilterSP filter = KisFilterRegistry::instance()->value("blur");
Q_ASSERT(filter);
- KisFilterConfigurationSP configuration = filter->defaultConfiguration(0);
+ KisFilterConfigurationSP configuration = filter->defaultConfiguration();
KisTestableSimpleUpdateQueue queue;
diff --git a/libs/image/tests/kis_update_scheduler_test.cpp b/libs/image/tests/kis_update_scheduler_test.cpp
index 7c1f182a7c93d8ace1404b035c6edcd8b1e1b3c5..65845a6e0c91385ffb7380b7c24c462c530192d9 100644
--- a/libs/image/tests/kis_update_scheduler_test.cpp
+++ b/libs/image/tests/kis_update_scheduler_test.cpp
@@ -51,7 +51,7 @@ KisImageSP KisUpdateSchedulerTest::buildTestingImage()
KisFilterSP filter = KisFilterRegistry::instance()->value("blur");
Q_ASSERT(filter);
- KisFilterConfigurationSP configuration = filter->defaultConfiguration(0);
+ KisFilterConfigurationSP configuration = filter->defaultConfiguration();
Q_ASSERT(configuration);
KisPaintLayerSP paintLayer1 = new KisPaintLayer(image, "paint1", OPACITY_OPAQUE_U8);
diff --git a/libs/image/tests/kis_walkers_test.cpp b/libs/image/tests/kis_walkers_test.cpp
index c202c671ce9fc3ca5b3fad01b246e464605b379a..9b110ec048a215632e96deefdf64d602da4e1d2d 100644
--- a/libs/image/tests/kis_walkers_test.cpp
+++ b/libs/image/tests/kis_walkers_test.cpp
@@ -329,7 +329,7 @@ void KisWalkersTest::testVisitingWithTopmostMask()
filterMask1->initSelection(groupLayer);
KisFilterSP filter = KisFilterRegistry::instance()->value("blur");
Q_ASSERT(filter);
- KisFilterConfigurationSP configuration1 = filter->defaultConfiguration(0);
+ KisFilterConfigurationSP configuration1 = filter->defaultConfiguration();
filterMask1->setFilter(configuration1);
image->addNode(paintLayer1, image->rootLayer());
@@ -843,8 +843,8 @@ void KisWalkersTest::testMasksVisiting()
KisFilterSP filter = KisFilterRegistry::instance()->value("blur");
Q_ASSERT(filter);
- KisFilterConfigurationSP configuration1 = filter->defaultConfiguration(0);
- KisFilterConfigurationSP configuration2 = filter->defaultConfiguration(0);
+ KisFilterConfigurationSP configuration1 = filter->defaultConfiguration();
+ KisFilterConfigurationSP configuration2 = filter->defaultConfiguration();
filterMask1->setFilter(configuration1);
filterMask2->setFilter(configuration2);
@@ -916,8 +916,8 @@ void KisWalkersTest::testMasksVisitingNoFilthy()
KisFilterSP filter = KisFilterRegistry::instance()->value("blur");
Q_ASSERT(filter);
- KisFilterConfigurationSP configuration1 = filter->defaultConfiguration(0);
- KisFilterConfigurationSP configuration2 = filter->defaultConfiguration(0);
+ KisFilterConfigurationSP configuration1 = filter->defaultConfiguration();
+ KisFilterConfigurationSP configuration2 = filter->defaultConfiguration();
filterMask1->setFilter(configuration1);
filterMask2->setFilter(configuration2);
@@ -993,8 +993,8 @@ void KisWalkersTest::testMasksOverlapping()
KisFilterSP invertFilter = KisFilterRegistry::instance()->value("invert");
Q_ASSERT(blurFilter);
Q_ASSERT(invertFilter);
- KisFilterConfigurationSP blurConfiguration = blurFilter->defaultConfiguration(0);
- KisFilterConfigurationSP invertConfiguration = invertFilter->defaultConfiguration(0);
+ KisFilterConfigurationSP blurConfiguration = blurFilter->defaultConfiguration();
+ KisFilterConfigurationSP invertConfiguration = invertFilter->defaultConfiguration();
filterMask1->setFilter(invertConfiguration);
filterMask2->setFilter(blurConfiguration);
@@ -1151,14 +1151,14 @@ void KisWalkersTest::testRectsChecksum()
walker.collectRects(adjustmentLayer, dirtyRect);
QCOMPARE(walker.checksumValid(), true);
- configuration = filter->defaultConfiguration(0);
+ configuration = filter->defaultConfiguration();
adjustmentLayer->setFilter(configuration);
QCOMPARE(walker.checksumValid(), false);
walker.recalculate(dirtyRect);
QCOMPARE(walker.checksumValid(), true);
- configuration = filter->defaultConfiguration(0);
+ configuration = filter->defaultConfiguration();
configuration->setProperty("halfWidth", 20);
configuration->setProperty("halfHeight", 20);
adjustmentLayer->setFilter(configuration);
@@ -1167,7 +1167,7 @@ void KisWalkersTest::testRectsChecksum()
walker.recalculate(dirtyRect);
QCOMPARE(walker.checksumValid(), true);
- configuration = filter->defaultConfiguration(0);
+ configuration = filter->defaultConfiguration();
configuration->setProperty("halfWidth", 21);
configuration->setProperty("halfHeight", 21);
adjustmentLayer->setFilter(configuration);
diff --git a/libs/koplugin/KisMimeDatabase.cpp b/libs/koplugin/KisMimeDatabase.cpp
index de7d11687affac7d73ab37a0b44272972d91c383..637a24c81d95e36587ae04443c55fde70dbc7435 100644
--- a/libs/koplugin/KisMimeDatabase.cpp
+++ b/libs/koplugin/KisMimeDatabase.cpp
@@ -118,6 +118,9 @@ QStringList KisMimeDatabase::suffixesForMimeType(const QString &mimeType)
QMimeType mime = db.mimeTypeForName(mimeType);
if (mime.name() != "application/octet-stream" && !mime.suffixes().isEmpty()) {
QString preferredSuffix = mime.preferredSuffix();
+ if (mimeType == "image/x-tga") {
+ preferredSuffix = "tga";
+ }
QStringList suffixes = mime.suffixes();
if (preferredSuffix != suffixes.first()) {
suffixes.removeAll(preferredSuffix);
diff --git a/libs/odf/tests/TestNumberStyle.cpp b/libs/odf/tests/TestNumberStyle.cpp
index dcf1d5b673755fc4306136fd5846b0c544745a29..8b72c2a4fa5da8bbcd46fe78969ae69e92e48a61 100644
--- a/libs/odf/tests/TestNumberStyle.cpp
+++ b/libs/odf/tests/TestNumberStyle.cpp
@@ -81,7 +81,7 @@ void TestNumberStyle::testTime()
f.formatStr = "hh:mm:ss";
QCOMPARE(KoOdfNumberStyles::format("0.524259259259", f), QString("12:34:56"));
QCOMPARE(KoOdfNumberStyles::format("test", f), QString("test"));
- QCOMPARE(KoOdfNumberStyles::format("123", f), QString("13:54:25"));
+ QCOMPARE(KoOdfNumberStyles::format("123", f), QString("00:00:00"));
QCOMPARE(KoOdfNumberStyles::format("1.23", f), QString("05:31:12"));
}
@@ -120,12 +120,15 @@ void TestNumberStyle::testPercent()
void TestNumberStyle::testScientific()
{
+ QEXPECT_FAIL("", "min-exponent-digits not handled", Continue);
QCOMPARE(escapeLocals(KoOdfNumberStyles::formatScientific(345678, "0.00E+000")), QString("3.456780E+05"));
KoOdfNumberStyles::NumericStyleFormat f;
f.type = KoOdfNumberStyles::Scientific;
f.precision = 3;
+ QEXPECT_FAIL("", "min-exponent-digits not handled", Continue);
QCOMPARE(escapeLocals(KoOdfNumberStyles::format("0.2", f)), QString("2.000E-01"));
+ QEXPECT_FAIL("", "min-exponent-digits not handled", Continue);
QCOMPARE(escapeLocals(KoOdfNumberStyles::format("1.23", f)), QString("1.230E+00"));
QCOMPARE(escapeLocals(KoOdfNumberStyles::format("test", f)), QString("test"));
}
diff --git a/libs/pigment/CMakeLists.txt b/libs/pigment/CMakeLists.txt
index 67d1e68a313330552bba0d35edbb8e72f5a4ca37..83e157f6c3c7d0610146247a39a1297a7b653758 100644
--- a/libs/pigment/CMakeLists.txt
+++ b/libs/pigment/CMakeLists.txt
@@ -96,13 +96,6 @@ endif()
add_library(kritapigment SHARED ${kritapigment_SRCS})
generate_export_header(kritapigment)
-if (HAVE_VC)
- target_link_libraries(kritapigment PUBLIC KF5::I18n KF5::ConfigCore)
- if (NOT PACKAGERS_BUILD)
- set_property(TARGET kritapigment APPEND PROPERTY COMPILE_OPTIONS "${Vc_ARCHITECTURE_FLAGS}")
- endif()
-endif()
-
target_include_directories( kritapigment
PUBLIC
$
@@ -114,6 +107,7 @@ target_link_libraries( kritapigment
kritaplugin
${EXTRA_LIBRARIES}
KF5::I18n
+ KF5::ConfigCore
Qt5::Core
Qt5::Gui
Qt5::Xml
diff --git a/libs/pigment/KoColorModelStandardIds.cpp b/libs/pigment/KoColorModelStandardIds.cpp
index d70f2e9a87703e9cfa7b8ee3cdff5f7dc9cc4b77..3f89b530d38d3d12cfca4d194d94a591a98f9d30 100644
--- a/libs/pigment/KoColorModelStandardIds.cpp
+++ b/libs/pigment/KoColorModelStandardIds.cpp
@@ -23,16 +23,16 @@
const KoID AlphaColorModelID("A", ki18n("Alpha mask"));
-const KoID RGBAColorModelID("RGBA", ki18n("RGB"));
-const KoID XYZAColorModelID("XYZA", ki18n("XYZ"));
-const KoID LABAColorModelID("LABA", ki18n("L*a*b*"));
-const KoID CMYKAColorModelID("CMYKA", ki18n("CMYK"));
-const KoID GrayAColorModelID("GRAYA", ki18n("Grayscale"));
+const KoID RGBAColorModelID("RGBA", ki18n("RGB/Alpha"));
+const KoID XYZAColorModelID("XYZA", ki18n("XYZ/Alpha"));
+const KoID LABAColorModelID("LABA", ki18n("L*a*b*/Alpha"));
+const KoID CMYKAColorModelID("CMYKA", ki18n("CMYK/Alpha"));
+const KoID GrayAColorModelID("GRAYA", ki18n("Grayscale/Alpha"));
const KoID GrayColorModelID("GRAY", ki18n("Grayscale (without transparency)"));
-const KoID YCbCrAColorModelID("YCbCrA", ki18n("YCbCr"));
+const KoID YCbCrAColorModelID("YCbCrA", ki18n("YCbCr/Alpha"));
-const KoID Integer8BitsColorDepthID("U8", ki18n("8 Bits"));
-const KoID Integer16BitsColorDepthID("U16", ki18n("16 Bits"));
-const KoID Float16BitsColorDepthID("F16", ki18n("16 Bits Float"));
-const KoID Float32BitsColorDepthID("F32", ki18n("32 Bits Float"));
-const KoID Float64BitsColorDepthID("F64", ki18n("64 Bits Float"));
+const KoID Integer8BitsColorDepthID("U8", ki18n("8-bit integer/channel"));
+const KoID Integer16BitsColorDepthID("U16", ki18n("16-bit integer/channel"));
+const KoID Float16BitsColorDepthID("F16", ki18n("16-bit float/channel"));
+const KoID Float32BitsColorDepthID("F32", ki18n("32-bit float/channel"));
+const KoID Float64BitsColorDepthID("F64", ki18n("64-bit float/channel"));
diff --git a/libs/pigment/compositeops/KoOptimizedCompositeOpFactory.cpp b/libs/pigment/compositeops/KoOptimizedCompositeOpFactory.cpp
index efa8614d85bc957ba77644aa261fd088888e4ff8..90a8d1f6219240e4bb02b1eb0ac2e33a41a0fac4 100644
--- a/libs/pigment/compositeops/KoOptimizedCompositeOpFactory.cpp
+++ b/libs/pigment/compositeops/KoOptimizedCompositeOpFactory.cpp
@@ -25,13 +25,6 @@
#endif
-static struct ArchReporter {
- ArchReporter() {
- createOptimizedClass(0);
- }
-} StaticReporter;
-
-
KoCompositeOp* KoOptimizedCompositeOpFactory::createAlphaDarkenOp32(const KoColorSpace *cs)
{
return createOptimizedClass >(cs);
diff --git a/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch.cpp b/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch.cpp
index f817b5571e0aebd903c21ad9f5aed08646f2e4e1..a12679be06da9775fa2c9f2038a0ce9df7a36b9d 100644
--- a/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch.cpp
+++ b/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch.cpp
@@ -67,24 +67,3 @@ KoOptimizedCompositeOpFactoryPerArch::create(param);
}
-
-#define __stringify(_s) #_s
-#define stringify(_s) __stringify(_s)
-
-inline void printFeatureSupported(const QString &feature, Vc::Implementation impl)
-{
- dbgPigment << "\t" << feature << "\t---\t" << (Vc::isImplementationSupported(impl) ? "yes" : "no");
-}
-
-template<>
-KoReportCurrentArch::ReturnType
-KoReportCurrentArch::create(ParamType)
-{
- dbgPigment << "Compiled for arch:" << Vc::CurrentImplementation::current();
- dbgPigment << "Features supported:";
- printFeatureSupported("SSE2", Vc::SSE2Impl);
- printFeatureSupported("SSSE3", Vc::SSSE3Impl);
- printFeatureSupported("SSE4.1", Vc::SSE41Impl);
- printFeatureSupported("AVX ", Vc::AVXImpl);
- printFeatureSupported("AVX2 ", Vc::AVX2Impl);
-}
diff --git a/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch.h b/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch.h
index e582ac7af3b4f66bd3e76714f1bb2a4364d57cf2..353d525e1f0ae666f899b40129f770804179eb72 100644
--- a/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch.h
+++ b/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch.h
@@ -50,13 +50,5 @@ struct KoOptimizedCompositeOpFactoryPerArch
static ReturnType create(ParamType param);
};
-struct KoReportCurrentArch
-{
- typedef void* ParamType;
- typedef void ReturnType;
-
- template
- static ReturnType create(ParamType);
-};
#endif /* KOOPTIMIZEDCOMPOSITEOPFACTORYPERARCH_H */
diff --git a/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch_Scalar.cpp b/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch_Scalar.cpp
index 62c586845ce2dc96ceab0575f61176cb902004d9..0f8aed551fc68cbc7f618092ea77bce4b192a165 100644
--- a/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch_Scalar.cpp
+++ b/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch_Scalar.cpp
@@ -55,10 +55,3 @@ KoOptimizedCompositeOpFactoryPerArch::create(param);
}
-
-template<>
-KoReportCurrentArch::ReturnType
-KoReportCurrentArch::create(ParamType)
-{
- dbgPigment << "Legacy integer arithmetics implementation";
-}
diff --git a/libs/pigment/compositeops/KoVcMultiArchBuildSupport.h b/libs/pigment/compositeops/KoVcMultiArchBuildSupport.h
index bb5153bdb1b1dba47f1495c41cbd0eab3d38a683..2bdd069a74197e520b59dc57279196d1f99ae057 100644
--- a/libs/pigment/compositeops/KoVcMultiArchBuildSupport.h
+++ b/libs/pigment/compositeops/KoVcMultiArchBuildSupport.h
@@ -57,18 +57,10 @@ namespace Vc {
};
}
-#ifdef DO_PACKAGERS_BUILD
-#ifdef __GNUC__
-#warning "Packagers build is not available without the presence of Vc library. Disabling."
-#endif
-#undef DO_PACKAGERS_BUILD
-#endif
#endif /* HAVE_VC */
-#ifdef DO_PACKAGERS_BUILD
-
#include
#include
#include
@@ -91,7 +83,7 @@ createOptimizedClass(typename FactoryType::ParamType param)
qWarning() << "WARNING: vector instructions disabled by \'amdDisableVectorWorkaround\' option!";
return FactoryType::template create(param);
}
-
+#ifdef HAVE_VC
/**
* We use SSE2, SSSE3, SSE4.1, AVX and AVX2.
* The rest are integer and string instructions mostly.
@@ -109,24 +101,12 @@ createOptimizedClass(typename FactoryType::ParamType param)
} else if (Vc::isImplementationSupported(Vc::SSE2Impl)) {
return FactoryType::template create(param);
} else {
+#endif
return FactoryType::template create(param);
+#ifdef HAVE_VC
}
-}
-
-#else /* DO_PACKAGERS_BUILD */
-
-/**
- * When doing not a packager's build we have one architecture only,
- * so the factory methods are simplified
- */
+#endif
-template
-typename FactoryType::ReturnType
-createOptimizedClass(typename FactoryType::ParamType param)
-{
- return FactoryType::template create(param);
}
-#endif /* DO_PACKAGERS_BUILD */
-
#endif /* __KOVCMULTIARCHBUILDSUPPORT_H */
diff --git a/libs/ui/CMakeLists.txt b/libs/ui/CMakeLists.txt
index 1de8fb8eff9d0c3e0d3b6aae30e4fd04136726d9..bbc3ae076a3f2c0aab7b2bd6f27e79e8bc9cbcb5 100644
--- a/libs/ui/CMakeLists.txt
+++ b/libs/ui/CMakeLists.txt
@@ -378,6 +378,7 @@ if(WIN32)
)
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
endif()
+
set(kritaui_LIB_SRCS
${kritaui_LIB_SRCS}
kis_animation_frame_cache.cpp
@@ -385,6 +386,7 @@ endif()
canvas/kis_animation_player.cpp
kis_animation_exporter.cpp
kis_animation_importer.cpp
+ KisSyncedAudioPlayback.cpp
)
if(UNIX)
@@ -489,6 +491,10 @@ target_link_libraries(kritaui KF5::CoreAddons KF5::Completion KF5::I18n KF5::Ite
kritaimpex kritacolor kritaimage kritalibbrush kritawidgets kritawidgetutils ${PNG_LIBRARIES} ${EXIV2_LIBRARIES}
)
+if (HAVE_QT_MULTIMEDIA)
+ target_link_libraries(kritaui Qt5::Multimedia)
+endif()
+
if (HAVE_KIO)
target_link_libraries(kritaui KF5::KIOCore)
endif()
diff --git a/libs/ui/KisDocument.cpp b/libs/ui/KisDocument.cpp
index fcc45345b2a1cbfaf8c15e710b9d6c9fd54e8fa8..f54e28b5bd856d2a838ce1cdb544b35ec6db17e6 100644
--- a/libs/ui/KisDocument.cpp
+++ b/libs/ui/KisDocument.cpp
@@ -676,7 +676,7 @@ bool KisDocument::saveFile(const QString &filePath, KisPropertiesConfigurationSP
Q_ASSERT(!tempororaryFileName.isEmpty());
//qDebug() << "saving to tempory file" << tempororaryFileName;
- status = d->importExportManager->exportDocument(tempororaryFileName, outputMimeType, !d->isExporting , exportConfiguration);
+ status = d->importExportManager->exportDocument(tempororaryFileName, filePath, outputMimeType, !d->isExporting , exportConfiguration);
ret = (status == KisImportExportFilter::OK);
suppressErrorDialog = (isAutosaving() || status == KisImportExportFilter::UserCancelled || status == KisImportExportFilter::BadConversionGraph);
@@ -897,11 +897,14 @@ bool KisDocument::isModified() const
QPixmap KisDocument::generatePreview(const QSize& size)
{
- if (d->image) {
- QRect bounds = d->image->bounds();
+ KisImageSP image = d->image;
+ if (d->savingImage) image = d->savingImage;
+
+ if (image) {
+ QRect bounds = image->bounds();
QSize newSize = bounds.size();
newSize.scale(size, Qt::KeepAspectRatio);
- QPixmap px = QPixmap::fromImage(d->image->convertToQImage(newSize, 0));
+ QPixmap px = QPixmap::fromImage(image->convertToQImage(newSize, 0));
if (px.size() == QSize(0,0)) {
px = QPixmap(newSize);
QPainter gc(&px);
@@ -909,6 +912,7 @@ QPixmap KisDocument::generatePreview(const QSize& size)
gc.fillRect(px.rect(), checkBrush);
gc.end();
}
+ return px;
}
return QPixmap(size);
}
@@ -1674,7 +1678,7 @@ bool KisDocument::prepareLocksForSaving()
if (locker.successfullyLocked()) {
copiedImage = d->image->clone(true);
}
- else {
+ else if (!isAutosaving()) {
// even though it is a recovery operation, we should ensure we do not enter saving twice!
std::unique_lock> l(d->savingLock, std::try_to_lock);
@@ -1682,6 +1686,7 @@ bool KisDocument::prepareLocksForSaving()
d->lastErrorMessage = i18n("The image was still busy while saving. Your saved image might be incomplete.");
d->image->lock();
copiedImage = d->image->clone(true);
+ copiedImage->initialRefreshGraph();
d->image->unlock();
}
}
diff --git a/libs/ui/KisImportExportFilter.cpp b/libs/ui/KisImportExportFilter.cpp
index 5def976d74a2495d7fcfa5819c4592c06096efbc..dd4f62d995df4e48a912262e518bb7449ba80bef 100644
--- a/libs/ui/KisImportExportFilter.cpp
+++ b/libs/ui/KisImportExportFilter.cpp
@@ -37,6 +37,7 @@ public:
QPointer updater;
QByteArray mime;
QString filename;
+ QString realFilename;
bool batchmode;
QMap capabilities;
@@ -69,12 +70,16 @@ KisImportExportFilter::~KisImportExportFilter()
delete d;
}
-
QString KisImportExportFilter::filename() const
{
return d->filename;
}
+QString KisImportExportFilter::realFilename() const
+{
+ return d->realFilename;
+}
+
bool KisImportExportFilter::batchMode() const
{
return d->batchmode;
@@ -91,6 +96,12 @@ void KisImportExportFilter::setFilename(const QString &filename)
d->filename = filename;
}
+void KisImportExportFilter::setRealFilename(const QString &filename)
+{
+ d->realFilename = filename;
+}
+
+
void KisImportExportFilter::setMimeType(const QString &mime)
{
d->mime = mime.toLatin1();
diff --git a/libs/ui/KisImportExportFilter.h b/libs/ui/KisImportExportFilter.h
index 48c60dddafafef9ecf7addfbf6e6b32fc8f31e01..2cf439499cad3d2371b404f02f5bb08dd7613f7a 100644
--- a/libs/ui/KisImportExportFilter.h
+++ b/libs/ui/KisImportExportFilter.h
@@ -95,6 +95,7 @@ public:
void setBatchMode(bool batchmode);
void setFilename(const QString &filename);
+ void setRealFilename(const QString &filename);
void setMimeType(const QString &mime);
void setUpdater(QPointer updater);
@@ -153,6 +154,7 @@ protected:
KisImportExportFilter(QObject *parent = 0);
QString filename() const;
+ QString realFilename() const;
bool batchMode() const;
QByteArray mimeType() const;
diff --git a/libs/ui/KisImportExportManager.cpp b/libs/ui/KisImportExportManager.cpp
index 0df753375aff566f4d7caa6f68c7862ae4f8a5b3..06c2e679063b8e82057e63ff07b6b2e9c01fd8ec 100644
--- a/libs/ui/KisImportExportManager.cpp
+++ b/libs/ui/KisImportExportManager.cpp
@@ -37,6 +37,7 @@
#include
#include
+#include
#include
#include
#include
@@ -81,12 +82,12 @@ KisImportExportManager::~KisImportExportManager()
KisImportExportFilter::ConversionStatus KisImportExportManager::importDocument(const QString& location, const QString& mimeType)
{
- return convert(Import, location, mimeType, false, 0);
+ return convert(Import, location, location, mimeType, false, 0);
}
-KisImportExportFilter::ConversionStatus KisImportExportManager::exportDocument(const QString& location, QByteArray& mimeType, bool showWarnings, KisPropertiesConfigurationSP exportConfiguration)
+KisImportExportFilter::ConversionStatus KisImportExportManager::exportDocument(const QString& location, const QString& realLocation, QByteArray& mimeType, bool showWarnings, KisPropertiesConfigurationSP exportConfiguration)
{
- return convert(Export, location, mimeType, showWarnings, exportConfiguration);
+ return convert(Export, location, realLocation, mimeType, showWarnings, exportConfiguration);
}
// The static method to figure out to which parts of the
@@ -171,7 +172,9 @@ KisImportExportFilter *KisImportExportManager::filterForMimeType(const QString &
}
}
qDeleteAll(list);
- filter->setMimeType(mimetype);
+ if (filter) {
+ filter->setMimeType(mimetype);
+ }
return filter;
}
@@ -190,7 +193,28 @@ void KisImportExportManager::setProgresUpdater(KoProgressUpdater *updater)
d->progressUpdater = updater;
}
-KisImportExportFilter::ConversionStatus KisImportExportManager::convert(KisImportExportManager::Direction direction, const QString &location, const QString &mimeType, bool showWarnings, KisPropertiesConfigurationSP exportConfiguration)
+QString KisImportExportManager::askForAudioFileName(const QString &defaultDir, QWidget *parent)
+{
+ KoFileDialog dialog(parent, KoFileDialog::ImportFiles, "ImportAudio");
+
+ if (!defaultDir.isEmpty()) {
+ dialog.setDefaultDir(defaultDir);
+ }
+
+ QStringList mimeTypes;
+ mimeTypes << "audio/mpeg";
+ mimeTypes << "audio/ogg";
+ mimeTypes << "audio/vorbis";
+ mimeTypes << "audio/vnd.wave";
+ mimeTypes << "audio/flac";
+
+ dialog.setMimeTypeFilters(mimeTypes);
+ dialog.setCaption(i18nc("@titile:window", "Open Audio"));
+
+ return dialog.filename();
+}
+
+KisImportExportFilter::ConversionStatus KisImportExportManager::convert(KisImportExportManager::Direction direction, const QString &location, const QString& realLocation, const QString &mimeType, bool showWarnings, KisPropertiesConfigurationSP exportConfiguration)
{
QString typeName = mimeType;
@@ -204,6 +228,7 @@ KisImportExportFilter::ConversionStatus KisImportExportManager::convert(KisImpor
}
filter->setFilename(location);
+ filter->setRealFilename(realLocation);
filter->setBatchMode(batchMode());
filter->setMimeType(typeName);
diff --git a/libs/ui/KisImportExportManager.h b/libs/ui/KisImportExportManager.h
index 6a29700ea14000bffd9b9629096569d8f260fdc5..bd07d42ad7bee1abe2730833827cba92bcf66e5c 100644
--- a/libs/ui/KisImportExportManager.h
+++ b/libs/ui/KisImportExportManager.h
@@ -83,7 +83,7 @@ public:
* and when the method returns @p mimeType contains this mimetype.
* Oh, well, export is a C++ keyword ;)
*/
- KisImportExportFilter::ConversionStatus exportDocument(const QString &location, QByteArray &mimeType, bool showWarnings = true, KisPropertiesConfigurationSP exportConfiguration = 0);
+ KisImportExportFilter::ConversionStatus exportDocument(const QString &location, const QString& realLocation, QByteArray &mimeType, bool showWarnings = true, KisPropertiesConfigurationSP exportConfiguration = 0);
///@name Static API
//@{
@@ -119,13 +119,15 @@ public:
void setProgresUpdater(KoProgressUpdater *updater);
+ static QString askForAudioFileName(const QString &defaultDir, QWidget *parent);
+
private Q_SLOTS:
private:
- KisImportExportFilter::ConversionStatus convert(Direction direction, const QString &location, const QString &mimeType, bool showWarnings, KisPropertiesConfigurationSP exportConfiguration);
+ KisImportExportFilter::ConversionStatus convert(Direction direction, const QString &location, const QString& realLocation, const QString &mimeType, bool showWarnings, KisPropertiesConfigurationSP exportConfiguration);
// Private API
KisImportExportManager(const KisImportExportManager& rhs);
diff --git a/libs/ui/KisMainWindow.cpp b/libs/ui/KisMainWindow.cpp
index 88856e3b8f039980586a1092c93f9e430363fb9a..a83b591a853058d3195181f4bc912759c3dc3c0b 100644
--- a/libs/ui/KisMainWindow.cpp
+++ b/libs/ui/KisMainWindow.cpp
@@ -202,7 +202,7 @@ public:
KisAction *saveActionAs {0};
// KisAction *printAction;
// KisAction *printActionPreview;
- KisAction *exportPdf {0};
+// KisAction *exportPdf {0};
KisAction *importAnimation {0};
KisAction *closeAll {0};
// KisAction *reloadFile;
@@ -954,7 +954,7 @@ bool KisMainWindow::saveDocument(KisDocument *document, bool saveas)
// don't want to be reminded about overwriting files etc.
bool justChangingFilterOptions = false;
- KoFileDialog dialog(this, KoFileDialog::SaveFile, "OpenDocument");
+ KoFileDialog dialog(this, KoFileDialog::SaveFile, "SaveAs");
dialog.setCaption(i18n("untitled"));
if (d->isExporting && !d->lastExportUrl.isEmpty()) {
dialog.setDefaultDir(d->lastExportUrl.toLocalFile());
@@ -1293,7 +1293,7 @@ void KisMainWindow::slotFileNew()
colorProfile,
i18n("Unnamed"));
- item.icon = "application-x-krita";
+ item.icon = "document-new";
startupWidget->addCustomDocumentWidget(item.widget, item.title, item.icon);
@@ -1313,7 +1313,7 @@ void KisMainWindow::slotFileNew()
i18n("Unnamed"));
item.title = i18n("Create from Clipboard");
- item.icon = "klipper";
+ item.icon = "tab-new";
startupWidget->addCustomDocumentWidget(item.widget, item.title, item.icon);
@@ -1967,6 +1967,7 @@ void KisMainWindow::setToolbarList(QList toolbarList)
void KisMainWindow::slotDocumentTitleModified(const QString &caption, bool mod)
{
+ updateCaption();
updateCaption(caption, mod);
updateReloadFileAction(d->activeView ? d->activeView->document() : 0);
}
@@ -2243,11 +2244,10 @@ void KisMainWindow::createActions()
d->redo = actionManager->createStandardAction(KStandardAction::Redo, this, SLOT(redo()));
d->redo->setActivationFlags(KisAction::ACTIVE_IMAGE);
- d->exportPdf = actionManager->createAction("file_export_pdf");
- connect(d->exportPdf, SIGNAL(triggered()), this, SLOT(exportToPdf()));
+// d->exportPdf = actionManager->createAction("file_export_pdf");
+// connect(d->exportPdf, SIGNAL(triggered()), this, SLOT(exportToPdf()));
d->importAnimation = actionManager->createAction("file_import_animation");
- d->importAnimation->setActivationFlags(KisAction::IMAGE_HAS_ANIMATION);
connect(d->importAnimation, SIGNAL(triggered()), this, SLOT(importAnimation()));
d->closeAll = actionManager->createAction("file_close_all");
@@ -2323,6 +2323,14 @@ void KisMainWindow::applyToolBarLayout()
if (isPlastiqueStyle) {
toolBar->setContentsMargins(0, 0, 0, 2);
}
+ //Hide text for buttons with an icon in the toolbar
+ Q_FOREACH (QAction *ac, toolBar->actions()){
+ if (ac->icon().pixmap(QSize(1,1)).isNull() == false){
+ ac->setPriority(QAction::LowPriority);
+ }else {
+ ac->setIcon(QIcon());
+ }
+ }
}
}
diff --git a/libs/ui/KisMainWindow.h b/libs/ui/KisMainWindow.h
index 628ea29fdd81f4c5298724d439499a4a45ea57ff..218b5d904220b7e2ceff424978938eb8ea871127 100644
--- a/libs/ui/KisMainWindow.h
+++ b/libs/ui/KisMainWindow.h
@@ -216,6 +216,7 @@ public Q_SLOTS:
*/
void slotFileSave();
+ // XXX: disabled
KisPrintJob* exportToPdf(QString pdfFileName = QString());
void slotProgress(int value);
diff --git a/libs/ui/KisOpenPane.cpp b/libs/ui/KisOpenPane.cpp
index 07fd700381ed5beecbdca79cf671d4e2ed099d49..0872b35fbb3bd097315422a9c4c02272fa1e91c8 100644
--- a/libs/ui/KisOpenPane.cpp
+++ b/libs/ui/KisOpenPane.cpp
@@ -316,7 +316,13 @@ QTreeWidgetItem* KisOpenPane::addPane(const QString &title, const QString &iconN
int id = d->m_widgetStack->addWidget(widget);
KoSectionListItem* listItem = new KoSectionListItem(d->m_sectionList, title, sortWeight, id);
- listItem->setIcon(0, KisIconUtils::loadIcon(iconName));
+
+ // resizes icons so they are a bit smaller
+ QIcon icon = KisIconUtils::loadIcon(iconName);
+ QPixmap iconPixmap = icon.pixmap(32, 32);
+
+ QIcon finalIcon(iconPixmap);
+ listItem->setIcon(0, finalIcon);
return listItem;
}
@@ -328,17 +334,20 @@ QTreeWidgetItem* KisOpenPane::addPane(const QString& title, const QPixmap& icon,
}
int id = d->m_widgetStack->addWidget(widget);
+
+ int iconSize = 32;
+
KoSectionListItem* listItem = new KoSectionListItem(d->m_sectionList, title, sortWeight, id);
if (!icon.isNull()) {
QImage image = icon.toImage();
- if ((image.width() > 48) || (image.height() > 48)) {
- image = image.scaled(48, 48, Qt::KeepAspectRatio, Qt::SmoothTransformation);
+ if ((image.width() > iconSize) || (image.height() > iconSize)) {
+ image = image.scaled(iconSize, iconSize, Qt::KeepAspectRatio, Qt::SmoothTransformation);
}
image = image.convertToFormat(QImage::Format_ARGB32);
- image = image.copy((image.width() - 48) / 2, (image.height() - 48) / 2, 48, 48);
+ image = image.copy((image.width() - iconSize) / 2, (image.height() - iconSize) / 2, iconSize, iconSize);
listItem->setIcon(0, QIcon(QPixmap::fromImage(image)));
}
diff --git a/libs/ui/KisResourceBundle.cpp b/libs/ui/KisResourceBundle.cpp
index a4f9da1af424922145434a7d8b7a3e461b366e33..c09117ae4424c3de524a7535305c833e5fb7248c 100644
--- a/libs/ui/KisResourceBundle.cpp
+++ b/libs/ui/KisResourceBundle.cpp
@@ -54,6 +54,7 @@ KisResourceBundle::KisResourceBundle(QString const& fileName)
{
setName(QFileInfo(fileName).baseName());
m_metadata["generator"] = "Krita (" + KritaVersionWrapper::versionString(true) + ")";
+
}
KisResourceBundle::~KisResourceBundle()
@@ -813,12 +814,12 @@ bool KisResourceBundle::isInstalled()
}
-QStringList KisResourceBundle::resourceTypes()
+QStringList KisResourceBundle::resourceTypes() const
{
return m_manifest.types();
}
-QList KisResourceBundle::resources(const QString &resType)
+QList KisResourceBundle::resources(const QString &resType) const
{
QList references = m_manifest.files(resType);
@@ -863,7 +864,6 @@ void KisResourceBundle::setThumbnail(QString filename)
if (QFileInfo(filename).exists()) {
m_thumbnail = QImage(filename);
m_thumbnail = m_thumbnail.scaled(256, 256, Qt::KeepAspectRatio, Qt::SmoothTransformation);
- Q_ASSERT(!m_thumbnail.isNull());
}
else {
m_thumbnail = QImage(256, 256, QImage::Format_ARGB32);
@@ -871,6 +871,8 @@ void KisResourceBundle::setThumbnail(QString filename)
gc.fillRect(0, 0, 256, 256, Qt::red);
gc.end();
}
+
+ setImage(m_thumbnail);
}
void KisResourceBundle::writeMeta(const char *metaTag, const QString &metaKey, KoXmlWriter *writer)
@@ -1000,3 +1002,9 @@ void KisResourceBundle::recreateBundle(QScopedPointer &oldStore)
file.setFileName(newStoreName);
file.rename(filename());
}
+
+
+int KisResourceBundle::resourceCount() const
+{
+ return m_manifest.files().count();
+}
diff --git a/libs/ui/KisResourceBundle.h b/libs/ui/KisResourceBundle.h
index ec9a74e5f77677a83aa5e5aaaf3f014c94b1f4f0..a52128f7727da816bf505ef4aa4cdd85860f611c 100644
--- a/libs/ui/KisResourceBundle.h
+++ b/libs/ui/KisResourceBundle.h
@@ -105,7 +105,7 @@ public:
bool isInstalled();
/**
* @brief setInstalled
- * This allows you to set installed or uninstalled upon loading. This is used with blacklists.
+ * This allows you to set installed or uninstalled upon loading. This is used with blacklists.
*/
void setInstalled(bool install);
@@ -132,9 +132,9 @@ public:
void recreateBundle(QScopedPointer &oldStore);
- QStringList resourceTypes();
- QList resources(const QString &resType);
-
+ QStringList resourceTypes() const;
+ QList resources(const QString &resType = QString::null) const;
+ int resourceCount() const;
private:
void writeMeta(const char *metaTag, const QString &metaKey, KoXmlWriter *writer);
@@ -153,7 +153,7 @@ private:
QList m_workspacesMd5Installed;
QList m_presetsMd5Installed;
QString m_bundleVersion;
-
+
};
#endif // KORESOURCEBUNDLE_H
diff --git a/libs/ui/KisSaveGroupVisitor.cpp b/libs/ui/KisSaveGroupVisitor.cpp
index 056da129d329aa615dfd067d167be62032b8899a..b23e6d1f961d3bdffafe1e30736b671cda98cd67 100644
--- a/libs/ui/KisSaveGroupVisitor.cpp
+++ b/libs/ui/KisSaveGroupVisitor.cpp
@@ -105,7 +105,7 @@ bool KisSaveGroupVisitor::visit(KisGroupLayer *layer)
KisDocument *exportDocument = KisPart::instance()->createDocument();
- KisImageWSP dst = new KisImage(exportDocument->createUndoStore(), r.width(), r.height(), m_image->colorSpace(), layer->name());
+ KisImageSP dst = new KisImage(exportDocument->createUndoStore(), r.width(), r.height(), m_image->colorSpace(), layer->name());
dst->setResolution(m_image->xRes(), m_image->yRes());
exportDocument->setCurrentImage(dst);
KisPaintLayer* paintLayer = new KisPaintLayer(dst, "projection", layer->opacity());
diff --git a/libs/ui/KisSyncedAudioPlayback.cpp b/libs/ui/KisSyncedAudioPlayback.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8a3b815b6564f08c7be61544aaad021bce8d77fd
--- /dev/null
+++ b/libs/ui/KisSyncedAudioPlayback.cpp
@@ -0,0 +1,143 @@
+#include "KisSyncedAudioPlayback.h"
+
+#include "config-qtmultimedia.h"
+
+#ifdef HAVE_QT_MULTIMEDIA
+#include
+#else
+class QIODevice;
+
+#include
+
+namespace {
+
+ class QMediaPlayer : public QObject {
+ Q_OBJECT
+ public:
+
+ enum Error
+ {
+ NoError,
+ ResourceError,
+ FormatError,
+ NetworkError,
+ AccessDeniedError,
+ ServiceMissingError,
+ MediaIsPlaylist
+ };
+
+ enum State
+ {
+ StoppedState,
+ PlayingState,
+ PausedState
+ };
+
+ State state() const { return StoppedState; }
+
+ void play() {}
+ void stop() {}
+
+ qint64 position() const { return 0; }
+ qreal playbackRate() const { return 1.0; }
+ void setPosition(qint64) {}
+ void setPlaybackRate(qreal) {}
+ void setVolume(int) {}
+ void setMedia(const QUrl&, QIODevice * device = 0) { Q_UNUSED(device);}
+ QString errorString() const { return QString(); }
+
+ Q_SIGNALS:
+ void error(Error value);
+ };
+}
+#endif
+
+
+
+#include
+
+
+
+struct KisSyncedAudioPlayback::Private
+{
+ QMediaPlayer player;
+ qint64 tolerance = 200;
+};
+
+
+KisSyncedAudioPlayback::KisSyncedAudioPlayback(const QString &fileName)
+ : QObject(0),
+ m_d(new Private)
+{
+ QFileInfo fileInfo(fileName);
+ Q_ASSERT(fileInfo.exists());
+
+ m_d->player.setMedia(QUrl::fromLocalFile(fileInfo.absoluteFilePath()));
+ m_d->player.setVolume(50);
+
+ connect(&m_d->player, SIGNAL(error(QMediaPlayer::Error)), SLOT(slotOnError()));
+}
+
+KisSyncedAudioPlayback::~KisSyncedAudioPlayback()
+{
+}
+
+void KisSyncedAudioPlayback::setSoundOffsetTolerance(qint64 value)
+{
+ m_d->tolerance = value;
+}
+
+void KisSyncedAudioPlayback::syncWithVideo(qint64 position)
+{
+ if (qAbs(position - m_d->player.position()) > m_d->tolerance) {
+ m_d->player.setPosition(position);
+ }
+}
+
+bool KisSyncedAudioPlayback::isPlaying() const
+{
+ return m_d->player.state() == QMediaPlayer::PlayingState;
+}
+
+void KisSyncedAudioPlayback::setVolume(qreal value)
+{
+ m_d->player.setVolume(qRound(100.0 * value));
+}
+
+void KisSyncedAudioPlayback::setSpeed(qreal value)
+{
+ if (qFuzzyCompare(value, m_d->player.playbackRate())) return;
+
+ if (m_d->player.state() == QMediaPlayer::PlayingState) {
+ const qint64 oldPosition = m_d->player.position();
+
+ m_d->player.stop();
+ m_d->player.setPlaybackRate(value);
+ m_d->player.setPosition(oldPosition);
+ m_d->player.play();
+ } else {
+ m_d->player.setPlaybackRate(value);
+ }
+}
+
+void KisSyncedAudioPlayback::play(qint64 startPosition)
+{
+ m_d->player.setPosition(startPosition);
+ m_d->player.play();
+}
+
+void KisSyncedAudioPlayback::stop()
+{
+ m_d->player.stop();
+}
+
+void KisSyncedAudioPlayback::slotOnError()
+{
+#ifdef HAVE_QT_MULTIMEDIA
+ emit error(m_d->player.media().canonicalUrl().toLocalFile(), m_d->player.errorString());
+#endif
+}
+
+#ifndef HAVE_QT_MULTIMEDIA
+#include "KisSyncedAudioPlayback.moc"
+#endif
diff --git a/libs/ui/KisSyncedAudioPlayback.h b/libs/ui/KisSyncedAudioPlayback.h
new file mode 100644
index 0000000000000000000000000000000000000000..2286a934f08085e1fb5b0de97b24c02a7a485c3c
--- /dev/null
+++ b/libs/ui/KisSyncedAudioPlayback.h
@@ -0,0 +1,37 @@
+#ifndef KISSYNCEDAUDIOPLAYBACK_H
+#define KISSYNCEDAUDIOPLAYBACK_H
+
+#include
+#include
+
+class KisSyncedAudioPlayback : public QObject
+{
+ Q_OBJECT
+public:
+ KisSyncedAudioPlayback(const QString &fileName);
+ virtual ~KisSyncedAudioPlayback();
+
+ void setSoundOffsetTolerance(qint64 value);
+ void syncWithVideo(qint64 position);
+
+ bool isPlaying() const;
+
+ void setVolume(qreal value);
+
+public Q_SLOTS:
+ void setSpeed(qreal value);
+ void play(qint64 startPosition);
+ void stop();
+
+Q_SIGNALS:
+ void error(const QString &filename, const QString &message);
+
+private Q_SLOTS:
+ void slotOnError();
+
+private:
+ struct Private;
+ const QScopedPointer m_d;
+};
+
+#endif // KISSYNCEDAUDIOPLAYBACK_H
diff --git a/libs/ui/KisTemplate.cpp b/libs/ui/KisTemplate.cpp
index 7cb09c54596f2d5cbb6db1ce2f4521c0babed95b..3b09f642895c465bf42233e099b26eb097c0a5fe 100644
--- a/libs/ui/KisTemplate.cpp
+++ b/libs/ui/KisTemplate.cpp
@@ -65,7 +65,20 @@ const QPixmap &KisTemplate::loadPicture()
return m_pixmap;
}
else { // relative path
- QString filename = KoResourcePaths::findResource("kis_pics", m_picture + ".png");
+
+
+ // each template folder should have a light and dark version of the icon that will be for light and dark themes
+ QString themePrefix;
+ if( KisIconUtils::useDarkIcons() ) {
+ themePrefix = "dark_";
+ } else {
+ themePrefix = "light_";
+ }
+
+
+ QString filenameBuilder = themePrefix.append(m_picture).append(".png");
+ QString filename = KoResourcePaths::findResource("kis_pics", filenameBuilder);
+
if (filename.isEmpty()) {
}
diff --git a/libs/ui/KisViewManager.cpp b/libs/ui/KisViewManager.cpp
index bcf0f5f5b0a89ec8e3c6b12ddc745a88cd62de40..612646e18e25ac1f314b007b278b478e8bb8da72 100644
--- a/libs/ui/KisViewManager.cpp
+++ b/libs/ui/KisViewManager.cpp
@@ -350,30 +350,6 @@ void KisViewManager::setCurrentView(KisView *view)
d->viewConnections.clear();
}
- // Restore the last used brush preset, color and background color.
- if (first) {
- KisConfig cfg;
- KisPaintOpPresetResourceServer * rserver = KisResourceServerProvider::instance()->paintOpPresetServer();
- QString lastPreset = cfg.readEntry("LastPreset", QString("Basic_tip_default"));
- KisPaintOpPresetSP preset = rserver->resourceByName(lastPreset);
- if (!preset) {
- preset = rserver->resourceByName("Basic_tip_default");
- }
-
- if (!preset) {
- preset = rserver->resources().first();
- }
- if (preset) {
- paintOpBox()->restoreResource(preset.data());
- }
-
- const KoColorSpace *cs = KoColorSpaceRegistry::instance()->rgb8();
- KoColor foreground(Qt::black, cs);
- d->canvasResourceProvider.setFGColor(cfg.readKoColor("LastForeGroundColor",foreground));
- KoColor background(Qt::white, cs);
- d->canvasResourceProvider.setBGColor(cfg.readKoColor("LastBackGroundColor",background));
-
- }
d->softProof->setChecked(view->softProofing());
d->gamutCheck->setChecked(view->gamutCheck());
@@ -386,6 +362,31 @@ void KisViewManager::setCurrentView(KisView *view)
// connect(canvasController()->proxyObject, SIGNAL(documentMousePositionChanged(QPointF)), d->statusBar, SLOT(documentMousePositionChanged(QPointF)));
d->currentImageView = imageView;
+ // Restore the last used brush preset, color and background color.
+ if (first) {
+ KisConfig cfg;
+ KisPaintOpPresetResourceServer * rserver = KisResourceServerProvider::instance()->paintOpPresetServer();
+ QString lastPreset = cfg.readEntry("LastPreset", QString("Basic_tip_default"));
+ KisPaintOpPresetSP preset = rserver->resourceByName(lastPreset);
+ if (!preset) {
+ preset = rserver->resourceByName("Basic_tip_default");
+ }
+
+ if (!preset) {
+ preset = rserver->resources().first();
+ }
+ if (preset) {
+ paintOpBox()->restoreResource(preset.data());
+ }
+
+ const KoColorSpace *cs = KoColorSpaceRegistry::instance()->rgb8();
+ KoColor foreground(Qt::black, cs);
+ d->canvasResourceProvider.setFGColor(cfg.readKoColor("LastForeGroundColor",foreground));
+ KoColor background(Qt::white, cs);
+ d->canvasResourceProvider.setBGColor(cfg.readKoColor("LastBackGroundColor",background));
+
+ }
+
KisCanvasController *canvasController = dynamic_cast(d->currentImageView->canvasController());
d->viewConnections.addUniqueConnection(&d->nodeManager, SIGNAL(sigNodeActivated(KisNodeSP)), doc->image(), SLOT(requestStrokeEndActiveNode()));
@@ -411,7 +412,7 @@ void KisViewManager::setCurrentView(KisView *view)
imageView->zoomManager()->setShowRulers(d->showRulersAction->isChecked());
imageView->zoomManager()->setRulersTrackMouse(d->rulersTrackMouseAction->isChecked());
-
+
showHideScrollbars();
}
@@ -454,6 +455,8 @@ void KisViewManager::setCurrentView(KisView *view)
resourceProvider()->slotImageSizeChanged();
resourceProvider()->slotOnScreenResolutionChanged();
+
+
Q_EMIT viewChanged();
}
diff --git a/libs/ui/canvas/kis_animation_player.cpp b/libs/ui/canvas/kis_animation_player.cpp
index 116a7f356992ef38f313cb2004d736370b504220..5641c603deb717d1d719b1d96d1b598b50079879 100644
--- a/libs/ui/canvas/kis_animation_player.cpp
+++ b/libs/ui/canvas/kis_animation_player.cpp
@@ -35,11 +35,20 @@
#include "kis_image_animation_interface.h"
#include "kis_time_range.h"
#include "kis_signal_compressor.h"
+#include
+#include
#include
#include
#include
+#include "KisSyncedAudioPlayback.h"
+#include "kis_signal_compressor_with_param.h"
+
+#include "KisViewManager.h"
+#include "kis_icon_utils.h"
+
+
using namespace boost::accumulators;
typedef accumulator_set > FpsAccumulator;
@@ -58,7 +67,9 @@ public:
expectedFrame(0),
lastTimerInterval(0),
lastPaintedFrame(0),
- playbackStatisticsCompressor(1000, KisSignalCompressor::FIRST_INACTIVE)
+ playbackStatisticsCompressor(1000, KisSignalCompressor::FIRST_INACTIVE),
+ stopAudioOnScrubbingCompressor(100, KisSignalCompressor::POSTPONE),
+ audioOffsetTolerance(-1)
{}
KisAnimationPlayer *q;
@@ -71,7 +82,6 @@ public:
int initialFrame;
int firstFrame;
int lastFrame;
- int fps;
qreal playbackSpeed;
KisCanvas2 *canvas;
@@ -95,6 +105,12 @@ public:
KisSignalCompressor playbackStatisticsCompressor;
+ QScopedPointer syncedAudio;
+ QScopedPointer > audioSyncScrubbingCompressor;
+ KisSignalCompressor stopAudioOnScrubbingCompressor;
+
+ int audioOffsetTolerance;
+
void stopImpl(bool doUpdates);
int incFrame(int frame, int inc) {
@@ -104,6 +120,13 @@ public:
}
return frame;
}
+
+ qint64 frameToMSec(int value, int fps) {
+ return qreal(value) / fps * 1000.0;
+ }
+ int msecToFrame(qint64 value, int fps) {
+ return qreal(value) * fps / 1000.0;
+ }
};
KisAnimationPlayer::KisAnimationPlayer(KisCanvas2 *canvas)
@@ -112,7 +135,6 @@ KisAnimationPlayer::KisAnimationPlayer(KisCanvas2 *canvas)
{
m_d->useFastFrameUpload = false;
m_d->playing = false;
- m_d->fps = 15;
m_d->canvas = canvas;
m_d->playbackSpeed = 1.0;
@@ -127,6 +149,25 @@ KisAnimationPlayer::KisAnimationPlayer(KisCanvas2 *canvas)
connect(&m_d->playbackStatisticsCompressor, SIGNAL(timeout()),
this, SIGNAL(sigPlaybackStatisticsUpdated()));
+
+ using namespace std::placeholders;
+ std::function callback(
+ std::bind(&KisAnimationPlayer::slotSyncScrubbingAudio, this, _1));
+
+ const int defaultScrubbingUdpatesDelay = 40; /* 40 ms == 25 fps */
+
+ m_d->audioSyncScrubbingCompressor.reset(
+ new KisSignalCompressorWithParam(defaultScrubbingUdpatesDelay, callback, KisSignalCompressor::FIRST_ACTIVE));
+
+ m_d->stopAudioOnScrubbingCompressor.setDelay(defaultScrubbingUdpatesDelay);
+ connect(&m_d->stopAudioOnScrubbingCompressor, SIGNAL(timeout()), SLOT(slotTryStopScrubbingAudio()));
+
+ connect(m_d->canvas->image()->animationInterface(), SIGNAL(sigFramerateChanged()), SLOT(slotUpdateAudioChunkLength()));
+ slotUpdateAudioChunkLength();
+
+ connect(m_d->canvas->image()->animationInterface(), SIGNAL(sigAudioChannelChanged()), SLOT(slotAudioChannelChanged()));
+ connect(m_d->canvas->image()->animationInterface(), SIGNAL(sigAudioVolumeChanged()), SLOT(slotAudioVolumeChanged()));
+ slotAudioChannelChanged();
}
KisAnimationPlayer::~KisAnimationPlayer()
@@ -138,6 +179,60 @@ void KisAnimationPlayer::slotUpdateDropFramesMode()
m_d->dropFramesMode = cfg.animationDropFrames();
}
+void KisAnimationPlayer::slotSyncScrubbingAudio(int msecTime)
+{
+ KIS_SAFE_ASSERT_RECOVER_RETURN(m_d->syncedAudio);
+
+ if (!m_d->syncedAudio->isPlaying()) {
+ m_d->syncedAudio->play(msecTime);
+ } else {
+ m_d->syncedAudio->syncWithVideo(msecTime);
+ }
+
+ if (!isPlaying()) {
+ m_d->stopAudioOnScrubbingCompressor.start();
+ }
+}
+
+void KisAnimationPlayer::slotTryStopScrubbingAudio()
+{
+ KIS_SAFE_ASSERT_RECOVER_RETURN(m_d->syncedAudio);
+ if (m_d->syncedAudio && !isPlaying()) {
+ m_d->syncedAudio->stop();
+ }
+}
+
+void KisAnimationPlayer::slotAudioChannelChanged()
+{
+
+ KisImageAnimationInterface *interface = m_d->canvas->image()->animationInterface();
+ QString fileName = interface->audioChannelFileName();
+ QFileInfo info(fileName);
+ if (info.exists() && !interface->isAudioMuted()) {
+ m_d->syncedAudio.reset(new KisSyncedAudioPlayback(info.absoluteFilePath()));
+ m_d->syncedAudio->setVolume(interface->audioVolume());
+ m_d->syncedAudio->setSoundOffsetTolerance(m_d->audioOffsetTolerance);
+
+ connect(m_d->syncedAudio.data(), SIGNAL(error(const QString &, const QString &)), SLOT(slotOnAudioError(const QString &, const QString &)));
+ } else {
+ m_d->syncedAudio.reset();
+ }
+}
+
+void KisAnimationPlayer::slotAudioVolumeChanged()
+{
+ KisImageAnimationInterface *interface = m_d->canvas->image()->animationInterface();
+ if (m_d->syncedAudio) {
+ m_d->syncedAudio->setVolume(interface->audioVolume());
+ }
+}
+
+void KisAnimationPlayer::slotOnAudioError(const QString &fileName, const QString &message)
+{
+ QString errorMessage(i18nc("floating on-canvas message", "Cannot open audio: \"%1\"\nError: %2", fileName, message));
+ m_d->canvas->viewManager()->showFloatingMessage(errorMessage, KisIconUtils::loadIcon("dialog-warning"));
+}
+
void KisAnimationPlayer::connectCancelSignals()
{
m_d->cancelStrokeConnections.addConnection(
@@ -170,6 +265,32 @@ void KisAnimationPlayer::disconnectCancelSignals()
m_d->cancelStrokeConnections.clear();
}
+void KisAnimationPlayer::slotUpdateAudioChunkLength()
+{
+ const KisImageAnimationInterface *animation = m_d->canvas->image()->animationInterface();
+ const int animationFramePeriod = qMax(1, 1000 / animation->framerate());
+
+ KisConfig cfg;
+ int scrubbingAudioUdpatesDelay = cfg.scrubbingAudioUpdatesDelay();
+
+ if (scrubbingAudioUdpatesDelay < 0) {
+
+ scrubbingAudioUdpatesDelay = qMax(1, animationFramePeriod);
+ }
+
+ m_d->audioSyncScrubbingCompressor->setDelay(scrubbingAudioUdpatesDelay);
+ m_d->stopAudioOnScrubbingCompressor.setDelay(scrubbingAudioUdpatesDelay);
+
+ m_d->audioOffsetTolerance = cfg.audioOffsetTolerance();
+ if (m_d->audioOffsetTolerance < 0) {
+ m_d->audioOffsetTolerance = animationFramePeriod;
+ }
+
+ if (m_d->syncedAudio) {
+ m_d->syncedAudio->setSoundOffsetTolerance(m_d->audioOffsetTolerance);
+ }
+}
+
void KisAnimationPlayer::slotUpdatePlaybackTimer()
{
m_d->timer->stop();
@@ -178,15 +299,20 @@ void KisAnimationPlayer::slotUpdatePlaybackTimer()
const KisTimeRange &range = animation->playbackRange();
if (!range.isValid()) return;
- m_d->fps = animation->framerate();
+ const int fps = animation->framerate();
m_d->initialFrame = animation->currentUITime();
m_d->firstFrame = range.start();
m_d->lastFrame = range.end();
m_d->expectedFrame = qBound(m_d->firstFrame, m_d->expectedFrame, m_d->lastFrame);
- m_d->expectedInterval = qreal(1000) / m_d->fps / m_d->playbackSpeed;
+ m_d->expectedInterval = qreal(1000) / fps / m_d->playbackSpeed;
m_d->lastTimerInterval = m_d->expectedInterval;
+
+ if (m_d->syncedAudio) {
+ m_d->syncedAudio->setSpeed(m_d->playbackSpeed);
+ }
+
m_d->timer->start(m_d->expectedInterval);
if (m_d->playbackTime.isValid()) {
@@ -207,10 +333,19 @@ void KisAnimationPlayer::play()
m_d->lastPaintedFrame = m_d->firstFrame;
connectCancelSignals();
+
+ if (m_d->syncedAudio) {
+ KisImageAnimationInterface *animationInterface = m_d->canvas->image()->animationInterface();
+ m_d->syncedAudio->play(m_d->frameToMSec(m_d->firstFrame, animationInterface->framerate()));
+ }
}
void KisAnimationPlayer::Private::stopImpl(bool doUpdates)
{
+ if (syncedAudio) {
+ syncedAudio->stop();
+ }
+
q->disconnectCancelSignals();
timer->stop();
@@ -260,6 +395,8 @@ void KisAnimationPlayer::slotUpdate()
void KisAnimationPlayer::uploadFrame(int frame)
{
+ KisImageAnimationInterface *animationInterface = m_d->canvas->image()->animationInterface();
+
if (frame < 0) {
const int currentTime = m_d->playbackTime.elapsed();
const int framesDiff = currentTime - m_d->nextFrameExpectedTime;
@@ -287,6 +424,15 @@ void KisAnimationPlayer::uploadFrame(int frame)
m_d->playbackStatisticsCompressor.start();
}
+ if (m_d->syncedAudio) {
+ const int msecTime = m_d->frameToMSec(frame, animationInterface->framerate());
+ if (isPlaying()) {
+ slotSyncScrubbingAudio(msecTime);
+ } else {
+ m_d->audioSyncScrubbingCompressor->start(msecTime);
+ }
+ }
+
if (m_d->canvas->frameCache() && m_d->canvas->frameCache()->uploadFrame(frame)) {
m_d->canvas->updateCanvas();
@@ -299,7 +445,7 @@ void KisAnimationPlayer::uploadFrame(int frame)
m_d->canvas->image()->unlock();
// no OpenGL cache or the frame just not cached yet
- m_d->canvas->image()->animationInterface()->switchCurrentTimeAsync(frame);
+ animationInterface->switchCurrentTimeAsync(frame);
emit sigFrameChanged();
}
diff --git a/libs/ui/canvas/kis_animation_player.h b/libs/ui/canvas/kis_animation_player.h
index 06e1d357168ccc1112a3907fe310f3379976b1dc..a7374eb0ddad9ae6a847a61b41b7b46c35897acb 100644
--- a/libs/ui/canvas/kis_animation_player.h
+++ b/libs/ui/canvas/kis_animation_player.h
@@ -58,6 +58,14 @@ public Q_SLOTS:
void slotUpdatePlaybackTimer();
void slotUpdateDropFramesMode();
+private Q_SLOTS:
+ void slotSyncScrubbingAudio(int msecTime);
+ void slotTryStopScrubbingAudio();
+ void slotUpdateAudioChunkLength();
+ void slotAudioChannelChanged();
+ void slotAudioVolumeChanged();
+ void slotOnAudioError(const QString &fileName, const QString &message);
+
Q_SIGNALS:
void sigFrameChanged();
void sigPlaybackStopped();
diff --git a/libs/ui/canvas/kis_grid_manager.cpp b/libs/ui/canvas/kis_grid_manager.cpp
index 2ed25b61ef3e298fcc74cad5efbcd77d24ca703f..4745eae88ce600e4b2bcfd40e395cad77cd09206 100644
--- a/libs/ui/canvas/kis_grid_manager.cpp
+++ b/libs/ui/canvas/kis_grid_manager.cpp
@@ -106,9 +106,9 @@ void KisGridManager::setView(QPointer imageView)
KisGridConfig config = imageView->document()->gridConfig();
setGridConfigImpl(config, false);
- emit sigRequestUpdateGridConfig(config);
- KisSignalsBlocker b1(m_toggleGrid, m_toggleSnapToGrid);
+ KisSignalsBlocker blocker(m_toggleGrid, m_toggleSnapToGrid);
+ Q_UNUSED(blocker);
m_toggleGrid->setChecked(config.showGrid());
m_toggleSnapToGrid->setChecked(config.snapToGrid());
}
diff --git a/libs/ui/dialogs/kis_dlg_adj_layer_props.cc b/libs/ui/dialogs/kis_dlg_adj_layer_props.cc
index 35509caf687cb254cc397626a2395c29623014e2..94db4175e72a8f7b590b52e718a3bd7bbaed6814 100644
--- a/libs/ui/dialogs/kis_dlg_adj_layer_props.cc
+++ b/libs/ui/dialogs/kis_dlg_adj_layer_props.cc
@@ -123,7 +123,7 @@ KisFilterConfigurationSP KisDlgAdjLayerProps::filterConfiguration() const
return config;
}
}
- return m_currentFilter->defaultConfiguration(m_paintDevice);
+ return m_currentFilter->defaultConfiguration();
}
QString KisDlgAdjLayerProps::layerName() const
diff --git a/libs/ui/dialogs/kis_dlg_file_layer.cpp b/libs/ui/dialogs/kis_dlg_file_layer.cpp
index 3b5ee82a1a4c20ff2fd10b9934b7bb9e43897e10..435d29caf12ab17b069ad535c69e260e81836a9f 100644
--- a/libs/ui/dialogs/kis_dlg_file_layer.cpp
+++ b/libs/ui/dialogs/kis_dlg_file_layer.cpp
@@ -83,8 +83,12 @@ KisFileLayer::ScalingMethod KisDlgFileLayer::scaleToImageResolution() const
QString KisDlgFileLayer::fileName() const
{
QString path = dlgWidget.wdgUrlRequester->fileName();
-
- if (!m_basePath.isEmpty() && QFileInfo(path).isAbsolute()) {
+ QFileInfo fi(path);
+ if (fi.isSymLink()) {
+ path = fi.symLinkTarget();
+ fi = QFileInfo(path);
+ }
+ if (!m_basePath.isEmpty() && fi.isAbsolute()) {
QDir directory(m_basePath);
path = directory.relativeFilePath(path);
}
diff --git a/libs/ui/dialogs/kis_dlg_filter.cpp b/libs/ui/dialogs/kis_dlg_filter.cpp
index 6d2121218df5188a63d005397b5c018f7883c859..15793d617d46346681d1e10ea700bf0295df0514 100644
--- a/libs/ui/dialogs/kis_dlg_filter.cpp
+++ b/libs/ui/dialogs/kis_dlg_filter.cpp
@@ -96,10 +96,13 @@ KisDlgFilter::KisDlgFilter(KisViewManager *view, KisNodeSP node, KisFilterManage
KConfigGroup group( KSharedConfig::openConfig(), "filterdialog");
d->uiFilterDialog.checkBoxPreview->setChecked(group.readEntry("showPreview", true));
+ restoreGeometry(KisConfig().readEntry("filterdialog/geometry", QByteArray()));
+
}
KisDlgFilter::~KisDlgFilter()
{
+ KisConfig().writeEntry("filterdialog/geometry", saveGeometry());
delete d;
}
@@ -220,15 +223,15 @@ void KisDlgFilter::resizeEvent(QResizeEvent* event)
{
QDialog::resizeEvent(event);
- // Workaround, after the initalisation don't center the dialog anymore
- if(d->resizeCount < 2) {
- QWidget* canvas = d->view->canvas();
- QRect rect(canvas->mapToGlobal(canvas->geometry().topLeft()), size());
- int deltaX = (canvas->geometry().width() - geometry().width())/2;
- int deltaY = (canvas->geometry().height() - geometry().height())/2;
- rect.translate(deltaX, deltaY);
- setGeometry(rect);
-
- d->resizeCount++;
- }
+// // Workaround, after the initalisation don't center the dialog anymore
+// if(d->resizeCount < 2) {
+// QWidget* canvas = d->view->canvas();
+// QRect rect(canvas->mapToGlobal(canvas->geometry().topLeft()), size());
+// int deltaX = (canvas->geometry().width() - geometry().width())/2;
+// int deltaY = (canvas->geometry().height() - geometry().height())/2;
+// rect.translate(deltaX, deltaY);
+// setGeometry(rect);
+
+// d->resizeCount++;
+// }
}
diff --git a/libs/ui/dialogs/kis_dlg_import_image_sequence.cpp b/libs/ui/dialogs/kis_dlg_import_image_sequence.cpp
index c3e7fa863a6838dcc061a7814ad7dfb70910ebcf..d518cfbc09e4471f10cc4e324316e17699cc2fac 100644
--- a/libs/ui/dialogs/kis_dlg_import_image_sequence.cpp
+++ b/libs/ui/dialogs/kis_dlg_import_image_sequence.cpp
@@ -47,41 +47,46 @@ private:
KisDlgImportImageSequence::KisDlgImportImageSequence(KisMainWindow *mainWindow, KisDocument *document) :
KoDialog(mainWindow),
- mainWindow(mainWindow),
- document(document)
+ m_mainWindow(mainWindow),
+ m_document(document)
{
setButtons(Ok | Cancel);
setDefaultButton(Ok);
QWidget * page = new QWidget(this);
- ui.setupUi(page);
+ m_ui.setupUi(page);
setMainWidget(page);
enableButtonOk(false);
- ui.cmbOrder->addItem(i18n("Ascending"), Ascending);
- ui.cmbOrder->addItem(i18n("Descending"), Descending);
- ui.cmbOrder->setCurrentIndex(0);
+ m_ui.cmbOrder->addItem(i18n("Ascending"), Ascending);
+ m_ui.cmbOrder->addItem(i18n("Descending"), Descending);
+ m_ui.cmbOrder->setCurrentIndex(0);
- ui.cmbSortMode->addItem(i18n("Alphabetical"), Natural);
- ui.cmbSortMode->addItem(i18n("Numerical"), Numerical);
- ui.cmbSortMode->setCurrentIndex(1);
+ m_ui.cmbSortMode->addItem(i18n("Alphabetical"), Natural);
+ m_ui.cmbSortMode->addItem(i18n("Numerical"), Numerical);
+ m_ui.cmbSortMode->setCurrentIndex(1);
- ui.lstFiles->setSelectionMode(QAbstractItemView::ExtendedSelection);
+ m_ui.lstFiles->setSelectionMode(QAbstractItemView::ExtendedSelection);
- connect(ui.btnAddImages, &QAbstractButton::clicked, this, &KisDlgImportImageSequence::slotAddFiles);
- connect(ui.btnRemove, &QAbstractButton::clicked, this, &KisDlgImportImageSequence::slotRemoveFiles);
- connect(ui.spinStep, SIGNAL(valueChanged(int)), this, SLOT(slotSkipChanged(int)));
- connect(ui.cmbOrder, SIGNAL(currentIndexChanged(int)), this, SLOT(slotOrderOptionsChanged(int)));
- connect(ui.cmbSortMode, SIGNAL(currentIndexChanged(int)), this, SLOT(slotOrderOptionsChanged(int)));
+ connect(m_ui.btnAddImages, &QAbstractButton::clicked, this, &KisDlgImportImageSequence::slotAddFiles);
+ connect(m_ui.btnRemove, &QAbstractButton::clicked, this, &KisDlgImportImageSequence::slotRemoveFiles);
+ connect(m_ui.spinStep, SIGNAL(valueChanged(int)), this, SLOT(slotSkipChanged(int)));
+ connect(m_ui.cmbOrder, SIGNAL(currentIndexChanged(int)), this, SLOT(slotOrderOptionsChanged(int)));
+ connect(m_ui.cmbSortMode, SIGNAL(currentIndexChanged(int)), this, SLOT(slotOrderOptionsChanged(int)));
+
+ // cold initialization of the controls
+ slotSkipChanged(m_ui.spinStep->value());
+ slotOrderOptionsChanged(m_ui.cmbOrder->currentIndex());
+ slotOrderOptionsChanged(m_ui.cmbSortMode->currentIndex());
}
QStringList KisDlgImportImageSequence::files()
{
QStringList list;
- for (int i=0; i < ui.lstFiles->count(); i++) {
- list.append(ui.lstFiles->item(i)->text());
+ for (int i=0; i < m_ui.lstFiles->count(); i++) {
+ list.append(m_ui.lstFiles->item(i)->text());
}
return list;
@@ -89,12 +94,12 @@ QStringList KisDlgImportImageSequence::files()
int KisDlgImportImageSequence::firstFrame()
{
- return ui.spinFirstFrame->value();
+ return m_ui.spinFirstFrame->value();
}
int KisDlgImportImageSequence::step()
{
- return ui.spinStep->value();
+ return m_ui.spinStep->value();
}
void KisDlgImportImageSequence::slotAddFiles()
@@ -103,13 +108,13 @@ void KisDlgImportImageSequence::slotAddFiles()
if (!urls.isEmpty()) {
Q_FOREACH(QString url, urls) {
- new ListItem(url, ui.lstFiles, &collator);
+ new ListItem(url, m_ui.lstFiles, &m_collator);
}
sortFileList();
}
- enableButtonOk(ui.lstFiles->count() > 0);
+ enableButtonOk(m_ui.lstFiles->count() > 0);
}
QStringList KisDlgImportImageSequence::showOpenFileDialog()
@@ -126,21 +131,21 @@ QStringList KisDlgImportImageSequence::showOpenFileDialog()
void KisDlgImportImageSequence::slotRemoveFiles()
{
- QList selected = ui.lstFiles->selectedItems();
+ QList selected = m_ui.lstFiles->selectedItems();
Q_FOREACH(QListWidgetItem *item, selected) {
delete item;
}
- enableButtonOk(ui.lstFiles->count() > 0);
+ enableButtonOk(m_ui.lstFiles->count() > 0);
}
void KisDlgImportImageSequence::slotSkipChanged(int)
{
- int documentFps = document->image()->animationInterface()->framerate();
- float sourceFps = 1.0f * documentFps / ui.spinStep->value();
+ int documentFps = m_document->image()->animationInterface()->framerate();
+ float sourceFps = 1.0f * documentFps / m_ui.spinStep->value();
- ui.lblFramerate->setText(i18n("Source fps: %1", sourceFps));
+ m_ui.lblFramerate->setText(i18n("Source fps: %1", sourceFps));
}
void KisDlgImportImageSequence::slotOrderOptionsChanged(int)
@@ -150,9 +155,9 @@ void KisDlgImportImageSequence::slotOrderOptionsChanged(int)
void KisDlgImportImageSequence::sortFileList()
{
- int order = ui.cmbOrder->currentData().toInt();
- bool numeric = ui.cmbSortMode->currentData().toInt() == Numerical;
+ int order = m_ui.cmbOrder->currentData().toInt();
+ bool numeric = m_ui.cmbSortMode->currentData().toInt() == Numerical;
- collator.setNumericMode(numeric);
- ui.lstFiles->sortItems((order == Ascending) ? Qt::AscendingOrder : Qt::DescendingOrder);
+ m_collator.setNumericMode(numeric);
+ m_ui.lstFiles->sortItems((order == Ascending) ? Qt::AscendingOrder : Qt::DescendingOrder);
}
diff --git a/libs/ui/dialogs/kis_dlg_import_image_sequence.h b/libs/ui/dialogs/kis_dlg_import_image_sequence.h
index e0647232ec6c0b918c4f706de27ab25908c2e411..438a43330ea0d65840a14bf1f56860c89bb455b1 100644
--- a/libs/ui/dialogs/kis_dlg_import_image_sequence.h
+++ b/libs/ui/dialogs/kis_dlg_import_image_sequence.h
@@ -32,7 +32,7 @@ class KisDlgImportImageSequence : public KoDialog
Q_OBJECT
public:
- KisDlgImportImageSequence(KisMainWindow *mainWindow, KisDocument *document);
+ KisDlgImportImageSequence(KisMainWindow *m_mainWindow, KisDocument *m_document);
QStringList showOpenFileDialog();
QStringList files();
@@ -49,9 +49,9 @@ private:
void sortFileList();
private:
- Ui_WdgImportImageSequence ui;
- KisMainWindow *mainWindow;
- KisDocument *document;
+ Ui_WdgImportImageSequence m_ui;
+ KisMainWindow *m_mainWindow;
+ KisDocument *m_document;
enum OrderingOptions {
Ascending = 1,
@@ -61,7 +61,7 @@ private:
};
class ListItem;
- QCollator collator;
+ QCollator m_collator;
};
#endif // KISDLGIMPORTIMAGESEQUENCE_H
diff --git a/libs/ui/dialogs/kis_dlg_preferences.cc b/libs/ui/dialogs/kis_dlg_preferences.cc
index ad11b2b206cb6efe8d60b87d6ca182f6905dc5db..fccce9d34f1f7526de2743467417840c032096d2 100644
--- a/libs/ui/dialogs/kis_dlg_preferences.cc
+++ b/libs/ui/dialogs/kis_dlg_preferences.cc
@@ -115,6 +115,12 @@ GeneralTab::GeneralTab(QWidget *_parent, const char *_name)
m_backupFileCheckBox->setChecked(cfg.backupFile());
m_showOutlinePainting->setChecked(cfg.showOutlineWhilePainting());
m_hideSplashScreen->setChecked(cfg.hideSplashScreen());
+
+ KConfigGroup group = KSharedConfig::openConfig()->group("File Dialogs");
+ m_chkNativeFileDialog->setChecked(!group.readEntry("DontUseNativeFileDialog", true));
+
+ intMaxBrushSize->setValue(cfg.readEntry("maximumBrushSize", 1000));
+
m_cmbMDIType->setCurrentIndex(cfg.readEntry("mdi_viewmode", (int)QMdiArea::TabbedView));
m_chkRubberBand->setChecked(cfg.readEntry("mdi_rubberband", cfg.useOpenGL()));
m_favoritePresetsSpinBox->setValue(cfg.favoritePresets());
@@ -146,6 +152,9 @@ void GeneralTab::setDefault()
m_backupFileCheckBox->setChecked(cfg.backupFile(true));
m_showOutlinePainting->setChecked(cfg.showOutlineWhilePainting(true));
m_hideSplashScreen->setChecked(cfg.hideSplashScreen(true));
+ m_chkNativeFileDialog->setChecked(false);
+ intMaxBrushSize->setValue(1000);
+
m_cmbMDIType->setCurrentIndex((int)QMdiArea::TabbedView);
m_chkRubberBand->setChecked(cfg.useOpenGL(true));
m_favoritePresetsSpinBox->setValue(cfg.favoritePresets(true));
@@ -179,7 +188,7 @@ bool GeneralTab::showRootLayer()
int GeneralTab::autoSaveInterval()
{
//convert to seconds
- return m_autosaveCheckBox->isChecked() ? m_autosaveSpinBox->value()*60 : 0;
+ return m_autosaveCheckBox->isChecked() ? m_autosaveSpinBox->value() * 60 : 0;
}
int GeneralTab::undoStackSize()
@@ -991,6 +1000,12 @@ bool KisDlgPreferences::editPreferences()
cfg.setShowRootLayer(dialog->m_general->showRootLayer());
cfg.setShowOutlineWhilePainting(dialog->m_general->showOutlineWhilePainting());
cfg.setHideSplashScreen(dialog->m_general->hideSplashScreen());
+
+ KConfigGroup group = KSharedConfig::openConfig()->group("File Dialogs");
+ group.writeEntry("DontUseNativeFileDialog", !dialog->m_general->m_chkNativeFileDialog->isChecked());
+
+ cfg.writeEntry("maximumBrushSize", dialog->m_general->intMaxBrushSize->value());
+
cfg.writeEntry("mdi_viewmode", dialog->m_general->mdiMode());
cfg.setMDIBackgroundColor(dialog->m_general->m_mdiColor->color().toQColor());
cfg.setMDIBackgroundImage(dialog->m_general->m_backgroundimage->text());
diff --git a/libs/ui/forms/wdggeneralsettings.ui b/libs/ui/forms/wdggeneralsettings.ui
index aaa37d1498754b5f85cc0da7742094911e5aeaab..d07bd91b5d31daf505eaac8a08ebaf4050029494 100644
--- a/libs/ui/forms/wdggeneralsettings.ui
+++ b/libs/ui/forms/wdggeneralsettings.ui
@@ -6,8 +6,8 @@
0
0
- 552
- 295
+ 759
+ 468
@@ -29,7 +29,7 @@
-
- 0
+ 3
@@ -464,202 +464,236 @@
Miscellaneous
-
+
-
-
-
- 10
+
+
+
+ 0
+ 0
+
-
- 10
+
+ Qt::RightToLeft
-
- 10
+
+ Autosave every:
-
- 10
+
+ true
-
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 75
+ 0
+
+
+
+ min
+
+
+ 1
+
+
+ 1440
+
+
+ 5
+
+
+ 15
+
+
+
+ -
+
+
+ Compress .kra files more (slows loading/saving)
+
+
+
+ -
+
+
+ Create backup file
+
+
+
+ -
+
+
+ On importing images as layers, convert to the image colorspace
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Undo stack size:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 75
+ 0
+
+
+
+ 0
+
+
+ 1000
+
+
+ 5
+
+
+ 30
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Number of Palette Presets
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 75
+ 0
+
+
+
10
- -
-
-
-
- 0
- 0
-
-
-
- Qt::RightToLeft
-
-
- Autosave every:
-
-
- true
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Undo stack size:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- Compress .kra files more (slows loading/saving)
-
-
-
- -
-
-
- Create backup file
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 75
- 0
-
-
-
- 10
-
-
- 30
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Favorite presets:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
+
+ 30
+
+
+
+ -
+
+
+ Show root layer
+
+
+
+ -
+
+
+ Hide splash screen on startup
+
+
+
+ -
+
+
+ Warning: if you enable this setting and the file dialogs do weird stuff, do not report a bug.
+
+
+ Enable native file dialogs (warning: may not work correctly on some systems)
+
+
+
+ -
+
+
+ Maximum brush size:
+
+
+
+ -
+
+ -
+
0
0
-
-
- 75
- 0
-
+
+ The maximum diameter of a brush in pixels.
- min
+ px
- 1
+ 100
- 1440
-
-
- 5
+ 10000
- 15
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 75
- 0
-
-
-
- 0
-
-
1000
-
- 5
-
-
- 30
-
- -
-
-
- Show root layer
-
-
-
- -
-
-
- Hide splash screen on startup
-
-
-
- -
-
+ -
+
- On importing images as layers, convert to the image colorspace
+ (Needs restart)
- -
+
-
Qt::Vertical
- 20
- 40
+ 504
+ 13
@@ -668,27 +702,9 @@
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
- KisIntParseSpinBox
- QSpinBox
-
-
KisColorButton
QPushButton
diff --git a/libs/ui/forms/wdgimageproperties.ui b/libs/ui/forms/wdgimageproperties.ui
index eb1196f2f05864c18707f1200c1f83f62a1bb531..6253bc15ab26416762c3124025fcd34b5ad92f15 100644
--- a/libs/ui/forms/wdgimageproperties.ui
+++ b/libs/ui/forms/wdgimageproperties.ui
@@ -6,213 +6,195 @@
0
0
- 448
- 568
+ 449
+ 322
New Image
-
- -
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 95
- 61
-
-
-
-
- -
-
- -
-
-
- Width:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- TextLabel
-
-
-
- -
-
-
- Height:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- TextLabel
-
-
-
- -
-
-
- Resolution:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
- -
-
-
- TextLabel
-
-
-
- -
-
-
- pixels-per-inch
-
-
- ppi
-
-
-
-
-
- -
-
-
- Background Color
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
- 0
- 20
-
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Expanding
-
-
-
- 95
- 61
-
-
-
-
-
-
-
- -
-
-
- Annotations
-
-
- -
-
-
- -
-
- -
-
-
- Type:
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TextLabel
-
-
-
-
-
- -
-
-
- true
-
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
- -
+
+ -
0
+
+
+ Dimensions
+
+
+ -
+
+
+ 12
+
+
+ 12
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Width:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ TextLabel
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Height:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ TextLabel
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Resolution:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ TextLabel
+
+
+
+ -
+
+
+ pixels-per-inch
+
+
+ ppi
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Background Color:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Background Opacity:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+
+
Image Color Space
-
-
+
+
-
@@ -322,6 +304,47 @@
+
+
+ Annotations
+
+
+ -
+
+
+ -
+
+ -
+
+
+ Type:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ TextLabel
+
+
+
+
+
+ -
+
+
+ true
+
+
+
+
+
diff --git a/libs/ui/input/kis_input_manager.cpp b/libs/ui/input/kis_input_manager.cpp
index 07b55ab1d9d2f210b184e16ab10398c9914ef9dd..0950dfa9a30bc147cea30e99946965ea0c1fea42 100644
--- a/libs/ui/input/kis_input_manager.cpp
+++ b/libs/ui/input/kis_input_manager.cpp
@@ -493,7 +493,6 @@ bool KisInputManager::eventFilterImpl(QEvent * event)
retval = d->matcher.touchBeginEvent(static_cast(event));
event->accept();
}
- // d->resetSavedTabletEvent(event->type());
break;
case QEvent::TouchUpdate: {
QTouchEvent *tevent = static_cast(event);
@@ -521,7 +520,6 @@ bool KisInputManager::eventFilterImpl(QEvent * event)
#endif
event->accept();
- // d->resetSavedTabletEvent(event->type());
break;
}
case QEvent::TouchEnd:
@@ -529,7 +527,6 @@ bool KisInputManager::eventFilterImpl(QEvent * event)
d->saveTouchEvent(static_cast(event));
retval = d->matcher.touchEndEvent(static_cast(event));
event->accept();
- // d->resetSavedTabletEvent(event->type());
delete d->lastTouchEvent;
d->lastTouchEvent = 0;
break;
@@ -576,12 +573,13 @@ void KisInputManager::slotToolChanged()
if (tool && tool->isInTextMode()) {
d->forwardAllEventsToTool = true;
d->matcher.suppressAllActions(true);
+ d->maskSyntheticEvents(tool->maskSyntheticEvents());
} else {
d->forwardAllEventsToTool = false;
d->matcher.suppressAllActions(false);
}
- d->maskSyntheticEvents(tool->maskSyntheticEvents());
+
}
QPointF KisInputManager::widgetToDocument(const QPointF& position)
diff --git a/libs/ui/input/kis_input_manager.h b/libs/ui/input/kis_input_manager.h
index 6a41dd0928c55c9043c6bedc81bb08aa09e00b15..50edf6c539cc1a41d72d3bfcf85f1a96ee6e0567 100644
--- a/libs/ui/input/kis_input_manager.h
+++ b/libs/ui/input/kis_input_manager.h
@@ -79,7 +79,6 @@ public:
* Event filter method. Overridden from QObject.
*/
bool eventFilter(QObject* object, QEvent* event );
- bool eventFilterImpl(QEvent * event);
void attachPriorityEventFilter(QObject *filter, int priority = 0);
void detachPriorityEventFilter(QObject *filter);
@@ -116,6 +115,7 @@ private Q_SLOTS:
void slotCompressedMoveEvent();
private:
+ bool eventFilterImpl(QEvent * event);
template
bool compressMoveEventCommon(Event *event);
diff --git a/libs/ui/input/wintab/kis_tablet_support_win.cpp b/libs/ui/input/wintab/kis_tablet_support_win.cpp
index 3d807ece7339ffb8e56bd28672ed3b4e3ec026f9..9c775daa59f4d3efe5678fa24ec59670797ec53f 100644
--- a/libs/ui/input/wintab/kis_tablet_support_win.cpp
+++ b/libs/ui/input/wintab/kis_tablet_support_win.cpp
@@ -219,7 +219,7 @@ static void handleTabletEvent(QWidget *windowWidget, const QPointF &local, const
if ((type == QEvent::TabletRelease || buttons == Qt::NoButton) && (qt_tablet_target != 0)) {
- dbgTablet << "releasing tablet target" << qt_tablet_target;
+ dbgInput << "releasing tablet target" << qt_tablet_target;
qt_tablet_target = 0;
}
diff --git a/libs/ui/kis_animation_exporter.cpp b/libs/ui/kis_animation_exporter.cpp
index 513a826ec603a65a27f55e8208b33d512b6583bf..3d536e0cda3fa6abbbc5053e78f13f12caf9fba9 100644
--- a/libs/ui/kis_animation_exporter.cpp
+++ b/libs/ui/kis_animation_exporter.cpp
@@ -22,6 +22,7 @@
#include
#include
#include
+#include
#include "KoFileDialog.h"
#include "KisDocument.h"
@@ -62,26 +63,6 @@ KisAnimationExporterUI::~KisAnimationExporterUI()
}
}
-KisImportExportFilter::ConversionStatus KisAnimationExporterUI::exportSequence(KisDocument *document)
-{
- KoFileDialog dialog(m_d->parentWidget, KoFileDialog::SaveFile, "exportsequence");
- dialog.setCaption(i18n("Export sequence"));
- dialog.setDefaultDir(QDesktopServices::storageLocation(QDesktopServices::PicturesLocation));
- dialog.setMimeTypeFilters(KisImportExportManager::mimeFilter(KisImportExportManager::Export));
- QString filename = dialog.filename();
-
- // if the user presses cancel, it returns empty
- if (filename.isEmpty()) return KisImportExportFilter::UserCancelled;
-
- const KisTimeRange fullClipRange = document->image()->animationInterface()->fullClipRange();
- int firstFrame = fullClipRange.start();
- int lastFrame = fullClipRange.end();
-
- m_d->exporter = new KisAnimationExportSaver(document, filename, firstFrame, lastFrame);
- return m_d->exporter->exportAnimation();
-}
-
-
struct KisAnimationExporter::Private
{
Private(KisDocument *document, int fromTime, int toTime)
@@ -114,6 +95,7 @@ struct KisAnimationExporter::Private
KisPaintDeviceSP tmpDevice;
KisPropertiesConfigurationSP exportConfiguration;
+ QProgressDialog progress;
};
@@ -143,15 +125,18 @@ void KisAnimationExporter::setSaveFrameCallback(SaveFrameCallback func)
KisImportExportFilter::ConversionStatus KisAnimationExporter::exportAnimation()
{
- QScopedPointer progress;
if (!m_d->batchMode) {
- QString message = i18n("Export frames...");
- progress.reset(new QProgressDialog(message, "", 0, 0, KisPart::instance()->currentMainwindow()));
- progress->setWindowModality(Qt::ApplicationModal);
- progress->setCancelButton(0);
- progress->setMinimumDuration(0);
- progress->setValue(0);
+ QString message = i18n("Preparing to export frames...");
+
+ m_d->progress.reset();
+ m_d->progress.setLabelText(message);
+ m_d->progress.setWindowModality(Qt::ApplicationModal);
+ m_d->progress.setCancelButton(0);
+ m_d->progress.setMinimumDuration(0);
+ m_d->progress.setValue(0);
+ m_d->progress.setMinimum(0);
+ m_d->progress.setMaximum(100);
emit m_d->document->statusBarMessage(message);
emit m_d->document->sigProgress(0);
@@ -183,7 +168,7 @@ KisImportExportFilter::ConversionStatus KisAnimationExporter::exportAnimation()
disconnect(m_d->document, SIGNAL(sigProgressCanceled()), this, SLOT(cancel()));
emit m_d->document->sigProgress(100);
emit m_d->document->clearStatusBarMessage();
- progress.reset();
+ m_d->progress.reset();
}
return m_d->status;
@@ -231,6 +216,12 @@ void KisAnimationExporter::frameReadyToSave()
qDebug() << result << time << m_d->lastFrame;
+ QString dialogText = QString("Exporting Frame ").append(QString::number(time)).append(" of ").append(QString::number(m_d->lastFrame));
+ int percentageProcessed = (float(time) / float(m_d->lastFrame) * 100);
+
+ m_d->progress.setLabelText(dialogText);
+ m_d->progress.setValue(int(percentageProcessed));
+
if (result == KisImportExportFilter::OK && time < m_d->lastFrame) {
m_d->currentFrame = time + 1;
m_d->image->animationInterface()->requestFrameRegeneration(m_d->currentFrame, m_d->image->bounds());
@@ -300,6 +291,9 @@ KisAnimationExportSaver::KisAnimationExportSaver(KisDocument *document, const QS
using namespace std::placeholders; // For _1 placeholder
m_d->exporter.setSaveFrameCallback(std::bind(&KisAnimationExportSaver::saveFrameCallback, this, _1, _2, _3));
+
+
+
}
KisAnimationExportSaver::~KisAnimationExportSaver()
@@ -308,6 +302,56 @@ KisAnimationExportSaver::~KisAnimationExportSaver()
KisImportExportFilter::ConversionStatus KisAnimationExportSaver::exportAnimation(KisPropertiesConfigurationSP cfg)
{
+ QFileInfo info(savedFilesMask());
+
+ QDir dir(info.absolutePath());
+ QStringList filesList = dir.entryList({ info.fileName() });
+
+ if (!filesList.isEmpty()) {
+ if (m_d->document->fileBatchMode()) {
+ return KisImportExportFilter::CreationError;
+ }
+
+ QStringList truncatedList = filesList;
+
+ while (truncatedList.size() > 3) {
+ truncatedList.takeLast();
+ }
+
+ QString exampleFiles = truncatedList.join(", ");
+ if (truncatedList.size() != filesList.size()) {
+ exampleFiles += QString(", ...");
+ }
+
+ QMessageBox::StandardButton result =
+ QMessageBox::warning(0,
+ i18n("Delete old frames?"),
+ i18n("Frames with the same naming "
+ "scheme exist in the destination "
+ "directory. They are going to be "
+ "deleted, continue?\n\n"
+ "Directory: %1\n"
+ "Files: %2",
+ info.absolutePath(), exampleFiles),
+ QMessageBox::Yes | QMessageBox::No,
+ QMessageBox::No);
+
+ if (result == QMessageBox::Yes) {
+ Q_FOREACH (const QString &file, filesList) {
+ if (!dir.remove(file)) {
+ QMessageBox::critical(0,
+ i18n("Failed to delete"),
+ i18n("Failed to delete an old frame file:\n\n"
+ "%1\n\n"
+ "Rendering cancelled.", dir.absoluteFilePath(file)));
+ return KisImportExportFilter::CreationError;
+ }
+ }
+ } else {
+ return KisImportExportFilter::UserCancelled;
+ }
+ }
+
m_d->exporter.setExportConfiguration(cfg);
return m_d->exporter.exportAnimation();
}
@@ -316,7 +360,7 @@ KisImportExportFilter::ConversionStatus KisAnimationExportSaver::saveFrameCallba
{
KisImportExportFilter::ConversionStatus status = KisImportExportFilter::OK;
- QString frameNumber = QString("%1").arg(time + m_d->sequenceNumberingOffset, 4, 10, QChar('0'));
+ QString frameNumber = QString("%1").arg(time - m_d->firstFrame + m_d->sequenceNumberingOffset, 4, 10, QChar('0'));
QString filename = m_d->filenamePrefix + frameNumber + m_d->filenameSuffix;
QRect rc = m_d->image->bounds();
diff --git a/libs/ui/kis_animation_exporter.h b/libs/ui/kis_animation_exporter.h
index 101b24f76e2f87212bc738d9f85a2c0d50399b22..fd7ef6999327117d70bd49aef79fdb3c6295d45e 100644
--- a/libs/ui/kis_animation_exporter.h
+++ b/libs/ui/kis_animation_exporter.h
@@ -39,7 +39,6 @@ public:
KisAnimationExporterUI(QWidget *parent);
virtual ~KisAnimationExporterUI();
- KisImportExportFilter::ConversionStatus exportSequence(KisDocument *document);
private:
struct Private;
diff --git a/libs/ui/kis_bookmarked_filter_configurations_model.cc b/libs/ui/kis_bookmarked_filter_configurations_model.cc
index db86ef39195cec4cfbf8130637da2da0ac22eca9..c7ae34d57946de00f6b2fddd9d31ba5b8d083ba8 100644
--- a/libs/ui/kis_bookmarked_filter_configurations_model.cc
+++ b/libs/ui/kis_bookmarked_filter_configurations_model.cc
@@ -54,6 +54,6 @@ KisFilterConfigurationSP KisBookmarkedFilterConfigurationsModel::configuration(c
{
KisFilterConfigurationSP config = dynamic_cast(KisBookmarkedConfigurationsModel::configuration(index).data());
if (config) return config;
- return d->filter->defaultConfiguration(d->thumb);
+ return d->filter->defaultConfiguration();
}
diff --git a/libs/ui/kis_categorized_item_delegate.cpp b/libs/ui/kis_categorized_item_delegate.cpp
index c5213aa254e8b1b33d74e688b0985b9a64c94e1f..bae0a43987adc608353eab2b9be305d1615882c9 100644
--- a/libs/ui/kis_categorized_item_delegate.cpp
+++ b/libs/ui/kis_categorized_item_delegate.cpp
@@ -46,16 +46,45 @@ void KisCategorizedItemDelegate::paint(QPainter* painter, const QStyleOptionView
if(!index.data(__CategorizedListModelBase::IsHeaderRole).toBool()) {
QStyleOptionViewItem sovi(option);
+
+
if (index.data(__CategorizedListModelBase::isLockableRole).toBool()) {
- bool locked = index.data(__CategorizedListModelBase::isLockedRole).toBool();
- const QIcon icon = locked ? KisIconUtils::loadIcon(koIconName("locked")) : KisIconUtils::loadIcon(koIconName("unlocked"));
+
const int iconSize = qMax(16, m_minimumItemHeight - 2);
+ bool locked = index.data(__CategorizedListModelBase::isLockedRole).toBool();
+
+
+ QIcon icon = locked ? KisIconUtils::loadIcon(koIconName("layer-locked")) : KisIconUtils::loadIcon(koIconName("layer-unlocked"));
+
+ // to be able to make an icon more transparent. we need to create a new image
+ // and use the QPainter to make a more transparent version of it.
+ QImage image(iconSize, iconSize, QImage::Format_ARGB32_Premultiplied);
+ image.fill(Qt::transparent); // needs to happen, otherwise 'junk' pixels are used (looks bad)
+
+ QPainter p(&image);
+ p.setCompositionMode(QPainter::CompositionMode_Source);
+
+
+ // make unlocked icons more hidden
+ if (locked) {
+ p.setOpacity(1.0);
+ } else {
+ p.setOpacity(0.14);
+ }
+
+ p.drawPixmap(0, 0, icon.pixmap(iconSize, QIcon::Normal) );
+ p.end();
+
+ icon = QIcon( QPixmap::fromImage(image) ); // the new icon is ready
+
+
sovi.decorationPosition = QStyleOptionViewItem::Right;
sovi.decorationAlignment = Qt::AlignRight;
sovi.decorationSize = QSize(iconSize, iconSize);
sovi.features |= QStyleOptionViewItem::HasDecoration;
sovi.icon = icon;
+
}
QStyledItemDelegate::paint(painter, sovi, index);
diff --git a/libs/ui/kis_composite_ops_model.cc b/libs/ui/kis_composite_ops_model.cc
index bd67b69c1991c030b1b0052f39ac5d490323dbe6..f26c7e5af800b03ff7e0d5b49e1cff83560e7902 100644
--- a/libs/ui/kis_composite_ops_model.cc
+++ b/libs/ui/kis_composite_ops_model.cc
@@ -27,7 +27,7 @@
#include "kis_config.h"
KoID KisCompositeOpListModel::favoriteCategory() {
- static KoID category("favorites", i18n("Favorites"));
+ static KoID category("favorites", ki18n("Favorites"));
return category;
}
diff --git a/libs/ui/kis_config.cc b/libs/ui/kis_config.cc
index 3609c12624e3f54227481d115a254cde90901f6b..b419827e058442f221c12cc261fd8645439f5f7e 100644
--- a/libs/ui/kis_config.cc
+++ b/libs/ui/kis_config.cc
@@ -930,7 +930,7 @@ void KisConfig::setSelectionViewSizeMinimum(qreal outlineSizeMinimum) const
int KisConfig::autoSaveInterval(bool defaultValue) const
{
- return (defaultValue ? 300 : m_cfg.readEntry("AutoSaveInterval", 300));
+ return (defaultValue ? 15 * 60 : m_cfg.readEntry("AutoSaveInterval", 15 * 60));
}
void KisConfig::setAutoSaveInterval(int seconds) const
@@ -1675,14 +1675,34 @@ bool KisConfig::animationDropFrames(bool defaultValue) const
return (defaultValue ? true : m_cfg.readEntry("animationDropFrames", true));
}
-int KisConfig::scribbingUpdatesDelay(bool defaultValue) const
+int KisConfig::scrubbingUpdatesDelay(bool defaultValue) const
{
- return (defaultValue ? 30 : m_cfg.readEntry("scribbingUpdatesDelay", 30));
+ return (defaultValue ? 30 : m_cfg.readEntry("scrubbingUpdatesDelay", 30));
}
-void KisConfig::setScribbingUpdatesDelay(int value)
+void KisConfig::setScrubbingUpdatesDelay(int value)
{
- m_cfg.writeEntry("scribbingUpdatesDelay", value);
+ m_cfg.writeEntry("scrubbingUpdatesDelay", value);
+}
+
+int KisConfig::scrubbingAudioUpdatesDelay(bool defaultValue) const
+{
+ return (defaultValue ? -1 : m_cfg.readEntry("scrubbingAudioUpdatesDelay", -1));
+}
+
+void KisConfig::setScrubbingAudioUpdatesDelay(int value)
+{
+ m_cfg.writeEntry("scrubbingAudioUpdatesDelay", value);
+}
+
+int KisConfig::audioOffsetTolerance(bool defaultValue) const
+{
+ return (defaultValue ? -1 : m_cfg.readEntry("audioOffsetTolerance", -1));
+}
+
+void KisConfig::setAudioOffsetTolerance(int value)
+{
+ m_cfg.writeEntry("audioOffsetTolerance", value);
}
bool KisConfig::switchSelectionCtrlAlt(bool defaultValue) const
diff --git a/libs/ui/kis_config.h b/libs/ui/kis_config.h
index 0854cd3d0c7897f0dda3f21186fe53de4795c678..f8dffd622128e4e64b32379ebd03fb8c3e402385 100644
--- a/libs/ui/kis_config.h
+++ b/libs/ui/kis_config.h
@@ -480,8 +480,14 @@ public:
bool animationDropFrames(bool defaultValue = false) const;
void setAnimationDropFrames(bool value);
- int scribbingUpdatesDelay(bool defaultValue = false) const;
- void setScribbingUpdatesDelay(int value);
+ int scrubbingUpdatesDelay(bool defaultValue = false) const;
+ void setScrubbingUpdatesDelay(int value);
+
+ int scrubbingAudioUpdatesDelay(bool defaultValue = false) const;
+ void setScrubbingAudioUpdatesDelay(int value);
+
+ int audioOffsetTolerance(bool defaultValue = false) const;
+ void setAudioOffsetTolerance(int value);
bool switchSelectionCtrlAlt(bool defaultValue = false) const;
void setSwitchSelectionCtrlAlt(bool value);
diff --git a/libs/ui/kis_filter_manager.cc b/libs/ui/kis_filter_manager.cc
index 541d5edd71b906272c9dad7998102306f5c42116..13e2fc6d5110ba1149d2961d5328997dbb06854b 100644
--- a/libs/ui/kis_filter_manager.cc
+++ b/libs/ui/kis_filter_manager.cc
@@ -240,7 +240,7 @@ void KisFilterManager::showFilterDialog(const QString &filterId)
d->filterDialog->setFilter(filter);
d->filterDialog->setVisible(true);
} else {
- apply(KisFilterConfigurationSP(filter->defaultConfiguration(d->view->activeNode()->original())));
+ apply(KisFilterConfigurationSP(filter->defaultConfiguration()));
finish();
}
}
diff --git a/libs/ui/kis_mask_manager.cc b/libs/ui/kis_mask_manager.cc
index a3963e8b7cc5a74cf798fb64cb063abdbe726c88..5a8618801104a4d0964b15d9cbb3623811ae2efd 100644
--- a/libs/ui/kis_mask_manager.cc
+++ b/libs/ui/kis_mask_manager.cc
@@ -208,7 +208,7 @@ void KisMaskManager::createFilterMask(KisNodeSP activeNode, KisPaintDeviceSP cop
// If we are supposed to not disturb the user, don't start asking them about things.
if(quiet) {
- KisFilterConfigurationSP filter = KisFilterRegistry::instance()->values().first()->defaultConfiguration(originalDevice);
+ KisFilterConfigurationSP filter = KisFilterRegistry::instance()->values().first()->defaultConfiguration();
if (filter) {
mask->setFilter(filter);
mask->setName(mask->name());
diff --git a/libs/ui/kis_mirror_manager.cpp b/libs/ui/kis_mirror_manager.cpp
index d9648519fbb3d656d2c55cd440e81fda12b6fa93..4cf19d7fc623d4cec6de052356ad8b468879d03b 100644
--- a/libs/ui/kis_mirror_manager.cpp
+++ b/libs/ui/kis_mirror_manager.cpp
@@ -20,6 +20,7 @@
#include "kis_mirror_manager.h"
#include "KisViewManager.h"
#include
+#include
#include
#include
@@ -43,6 +44,7 @@ void KisMirrorManager::setup(KActionCollection * collection)
{
m_mirrorCanvas = new KToggleAction(i18n("Mirror View"), this);
m_mirrorCanvas->setChecked(false);
+ m_mirrorCanvas->setIcon(KisIconUtils::loadIcon("mirror-view"));
collection->addAction("mirror_canvas", m_mirrorCanvas);
collection->setDefaultShortcut(m_mirrorCanvas, QKeySequence(Qt::Key_M));
diff --git a/libs/ui/kis_node_manager.cpp b/libs/ui/kis_node_manager.cpp
index 125f0f32cb80c460dc6af3ce4bd6d3f7a5ebcd43..0cd79fb48b11476f862216c1c3daf2467b06cafd 100644
--- a/libs/ui/kis_node_manager.cpp
+++ b/libs/ui/kis_node_manager.cpp
@@ -106,6 +106,8 @@ struct KisNodeManager::Private {
KisNodeList selectedNodes;
QPointer nodeJuggler;
+ KisNodeWSP previouslyActiveNode;
+
bool activateNodeImpl(KisNodeSP node);
QSignalMapper nodeCreationSignalMapper;
@@ -144,8 +146,11 @@ bool KisNodeManager::Private::activateNodeImpl(KisNodeSP node)
imageView->setCurrentNode(0);
maskManager.activateMask(0);
layerManager.activateLayer(0);
+ previouslyActiveNode = q->activeNode();
} else {
+ previouslyActiveNode = q->activeNode();
+
KoShape * shape = view->document()->shapeForNode(node);
KIS_ASSERT_RECOVER_RETURN_VALUE(shape, false);
@@ -247,6 +252,9 @@ void KisNodeManager::setup(KActionCollection * actionCollection, KisActionManage
action = actionManager->createAction("activatePreviousLayer");
connect(action, SIGNAL(triggered()), this, SLOT(activatePreviousNode()));
+ action = actionManager->createAction("switchToPreviouslyActiveNode");
+ connect(action, SIGNAL(triggered()), this, SLOT(switchToPreviouslyActiveNode()));
+
action = actionManager->createAction("save_node_as_image");
connect(action, SIGNAL(triggered()), this, SLOT(saveNodeAsImage()));
@@ -823,7 +831,7 @@ void KisNodeManager::activateNextNode()
KisNodeSP node = activeNode->nextSibling();
- while (node && node->childCount() > 0 && node->isEditable()) {
+ while (node && node->childCount() > 0) {
node = node->firstChild();
}
@@ -847,7 +855,7 @@ void KisNodeManager::activatePreviousNode()
KisNodeSP node;
- if (activeNode->childCount() > 0 && activeNode->isEditable()) {
+ if (activeNode->childCount() > 0) {
node = activeNode->lastChild();
}
else {
@@ -868,6 +876,13 @@ void KisNodeManager::activatePreviousNode()
}
}
+void KisNodeManager::switchToPreviouslyActiveNode()
+{
+ if (m_d->previouslyActiveNode && m_d->previouslyActiveNode->parent()) {
+ slotNonUiActivatedNode(m_d->previouslyActiveNode);
+ }
+}
+
void KisNodeManager::mergeLayer()
{
m_d->layerManager.mergeLayer();
diff --git a/libs/ui/kis_node_manager.h b/libs/ui/kis_node_manager.h
index 490c248b0faa9edcf038bc2ca64cb9496b425ca9..5253f0c9cc880363106fa8bba62bee0359fbbe4e 100644
--- a/libs/ui/kis_node_manager.h
+++ b/libs/ui/kis_node_manager.h
@@ -177,6 +177,7 @@ public Q_SLOTS:
void mirrorNode(KisNodeSP node, const KUndo2MagicString& commandName, Qt::Orientation orientation);
void activateNextNode();
void activatePreviousNode();
+ void switchToPreviouslyActiveNode();
/**
* move the active node up the nodestack.
diff --git a/libs/ui/kis_node_model.cpp b/libs/ui/kis_node_model.cpp
index 550b9baa46ff785a5d544df4048ab1d65332452b..83d319d62c85b547487b64acdbb8c1b19bd8eb35 100644
--- a/libs/ui/kis_node_model.cpp
+++ b/libs/ui/kis_node_model.cpp
@@ -476,6 +476,10 @@ QVariant KisNodeModel::data(const QModelIndex &index, int role) const
QSize size = node->extent().size();
size.scale(maxSize, maxSize, Qt::KeepAspectRatio);
+ if (size.width() == 0 || size.height() == 0) {
+ // No thumbnail can be shown if there isn't width or height...
+ return QVariant();
+ }
return node->createThumbnail(size.width(), size.height());
} else {
diff --git a/libs/ui/kis_paintop_box.cc b/libs/ui/kis_paintop_box.cc
index 228235dcfdfc2fa1f3f8ad638cbdaae5cff9627f..5aff453d397b711b439003b407b189975db5785e 100644
--- a/libs/ui/kis_paintop_box.cc
+++ b/libs/ui/kis_paintop_box.cc
@@ -283,7 +283,7 @@ KisPaintopBox::KisPaintopBox(KisViewManager *view, QWidget *parent, const char *
slFlow->setFixedHeight(iconsize);
slFlow->setBlockUpdateSignalOnDrag(true);
- slSize->setRange(0, 1000, 2);
+ slSize->setRange(0, cfg.readEntry("maximumBrushSize", 1000), 2);
slSize->setValue(100);
slSize->setSingleStep(1);
@@ -511,6 +511,7 @@ KisPaintopBox::~KisPaintopBox()
QMapIterator iter(m_tabletToolMap);
while (iter.hasNext()) {
iter.next();
+ //qDebug() << "Writing last used preset for" << iter.key().pointer << iter.key().uniqueID << iter.value().preset->name();
if ((iter.key().pointer) == QTabletEvent::Eraser) {
cfg.writeEntry(QString("LastEraser_%1").arg(iter.key().uniqueID) , iter.value().preset->name());
}
@@ -531,6 +532,7 @@ KisPaintopBox::~KisPaintopBox()
void KisPaintopBox::restoreResource(KoResource* resource)
{
KisPaintOpPreset* preset = dynamic_cast(resource);
+ //qDebug() << "restoreResource" << resource << preset;
if (preset) {
setCurrentPaintop(preset);
@@ -559,7 +561,7 @@ void KisPaintopBox::resourceSelected(KoResource* resource)
warnKrita << "failed to load the preset.";
}
}
-
+ //qDebug() << "resourceSelected" << resource->name();
setCurrentPaintop(preset);
m_presetsPopup->setPresetImage(preset->image());
@@ -571,11 +573,15 @@ void KisPaintopBox::setCurrentPaintop(const KoID& paintop)
{
KisPaintOpPresetSP preset = activePreset(paintop);
Q_ASSERT(preset && preset->settings());
+ //qDebug() << "setCurrentPaintop();" << paintop << preset;
setCurrentPaintop(preset);
}
void KisPaintopBox::setCurrentPaintop(KisPaintOpPresetSP preset)
{
+
+ //qDebug() << "setCurrentPaintop(); " << preset->name();
+
if (preset == m_resourceProvider->currentPreset()) {
return;
}
@@ -591,9 +597,6 @@ void KisPaintopBox::setCurrentPaintop(KisPaintOpPresetSP preset)
m_optionWidget->hide();
}
- m_paintOpPresetMap[m_resourceProvider->currentPreset()->paintOp()] = m_resourceProvider->currentPreset();
- m_tabletToolMap[m_currTabletToolID].preset = m_resourceProvider->currentPreset();
- m_tabletToolMap[m_currTabletToolID].paintOpID = m_resourceProvider->currentPreset()->paintOp();
}
if (!m_paintopOptionWidgets.contains(paintop))
@@ -624,9 +627,16 @@ void KisPaintopBox::setCurrentPaintop(KisPaintOpPresetSP preset)
QString pixFilename = KoResourcePaths::findResource("kis_images", paintOp->pixmap());
m_brushEditorPopupButton->setIcon(QIcon(pixFilename));
- m_presetsPopup->setCurrentPaintOp(paintop.id());
+ m_presetsPopup->setCurrentPaintOpId(paintop.id());
+
- if (m_presetsPopup->currentPaintOp() != paintop.id()) {
+ ////qDebug() << "\tsetting the new preset for" << m_currTabletToolID.uniqueID << "to" << preset->name();
+ m_paintOpPresetMap[m_resourceProvider->currentPreset()->paintOp()] = preset;
+ m_tabletToolMap[m_currTabletToolID].preset = preset;
+ m_tabletToolMap[m_currTabletToolID].paintOpID = preset->paintOp();
+
+
+ if (m_presetsPopup->currentPaintOpId() != paintop.id()) {
// Must change the paintop as the current one is not supported
// by the new colorspace.
dbgKrita << "current paintop " << paintop.name() << " was not set, not supported by colorspace";
@@ -643,6 +653,10 @@ void KisPaintopBox::slotUpdateOptionsWidgetPopup()
m_presetsPopup->resourceSelected(preset.data());
m_presetsPopup->updateViewSettings();
+
+ // the m_viewManager->image() is set earlier, but the reference will be missing when the stamp button is pressed
+ // need to later do some research on how and when we should be using weak shared pointers (WSP) that creates this situation
+ m_optionWidget->setImage(m_viewManager->image());
}
KisPaintOpPresetSP KisPaintopBox::defaultPreset(const KoID& paintOp)
@@ -689,6 +703,12 @@ void KisPaintopBox::updateCompositeOp(QString compositeOpID)
if (compositeOpID != m_currCompositeOpID) {
m_currCompositeOpID = compositeOpID;
}
+ if (compositeOpID == COMPOSITE_ERASE) {
+ m_eraseModeButton->setChecked(true);
+ }
+ else {
+ m_eraseModeButton->setChecked(false);
+ }
}
}
@@ -729,6 +749,7 @@ void KisPaintopBox::slotSetPaintop(const QString& paintOpId)
{
if (KisPaintOpRegistry::instance()->get(paintOpId) != 0) {
KoID id(paintOpId, KisPaintOpRegistry::instance()->get(paintOpId)->name());
+ //qDebug() << "slotsetpaintop" << id;
setCurrentPaintop(id);
}
}
@@ -737,6 +758,8 @@ void KisPaintopBox::slotInputDeviceChanged(const KoInputDevice& inputDevice)
{
TabletToolMap::iterator toolData = m_tabletToolMap.find(inputDevice);
+ //qDebug() << "slotInputDeviceChanged()" << inputDevice.device() << inputDevice.uniqueTabletId();
+
if (toolData == m_tabletToolMap.end()) {
KisConfig cfg;
KisPaintOpPresetResourceServer *rserver = KisResourceServerProvider::instance()->paintOpPresetServer(false);
@@ -746,19 +769,26 @@ void KisPaintopBox::slotInputDeviceChanged(const KoInputDevice& inputDevice)
}
else {
preset = rserver->resourceByName(cfg.readEntry(QString("LastPreset_%1").arg(inputDevice.uniqueTabletId()), "Basic_tip_default"));
+ //if (preset)
+ //qDebug() << "found stored preset " << preset->name() << "for" << inputDevice.uniqueTabletId();
+ //else
+ //qDebug() << "no preset fcound for" << inputDevice.uniqueTabletId();
}
if (!preset) {
preset = rserver->resourceByName("Basic_tip_default");
}
if (preset) {
+ //qDebug() << "inputdevicechanged 1" << preset;
setCurrentPaintop(preset);
}
}
else {
if (toolData->preset) {
+ //qDebug() << "inputdevicechanged 2" << toolData->preset;
setCurrentPaintop(toolData->preset);
}
else {
+ //qDebug() << "inputdevicechanged 3" << toolData->paintOpID;
setCurrentPaintop(toolData->paintOpID);
}
}
@@ -781,6 +811,7 @@ void KisPaintopBox::slotCanvasResourceChanged(int key, const QVariant &value)
* Update currently selected preset in both the popup widgets
*/
m_presetsChooserPopup->canvasResourceChanged(preset);
+
m_presetsPopup->currentPresetChanged(preset);
if (key == KisCanvasResourceProvider::CurrentCompositeOp) {
@@ -1106,6 +1137,7 @@ void KisPaintopBox::slotNextFavoritePreset()
void KisPaintopBox::slotSwitchToPreviousPreset()
{
if (m_resourceProvider->previousPreset()) {
+ //qDebug() << "slotSwitchToPreviousPreset();" << m_resourceProvider->previousPreset();
setCurrentPaintop(m_resourceProvider->previousPreset());
}
}
@@ -1237,7 +1269,7 @@ void KisPaintopBox::slotUpdateSelectionIcon()
m_vMirrorAction->setIcon(KisIconUtils::loadIcon("symmetry-vertical"));
KisConfig cfg;
- if (!cfg.toolOptionsInDocker()) {
+ if (!cfg.toolOptionsInDocker() && m_toolOptionsPopupButton) {
m_toolOptionsPopupButton->setIcon(KisIconUtils::loadIcon("configure"));
}
diff --git a/libs/ui/kis_popup_palette.cpp b/libs/ui/kis_popup_palette.cpp
index 79804fd8f3e1f99e39fd74979df9726a24dd8ca8..e89c2bb620eb4dfebe9fcb8506f22029dee7bcca 100644
--- a/libs/ui/kis_popup_palette.cpp
+++ b/libs/ui/kis_popup_palette.cpp
@@ -793,6 +793,11 @@ void KisPopupPalette::slotZoomToOneHundredPercentClicked() {
if (action) {
action->trigger();
}
+
+ // also move the zoom slider to 100% position so they are in sync
+ zoomCanvasSlider->setValue(100);
+
+
}
diff --git a/libs/ui/opengl/kis_opengl_canvas2.cpp b/libs/ui/opengl/kis_opengl_canvas2.cpp
index 4ddb1e3240b697e99877ae83c675996c62031e93..cd3b0db6d3a4ef9f860bd3c3b350e5a94820a5d7 100644
--- a/libs/ui/opengl/kis_opengl_canvas2.cpp
+++ b/libs/ui/opengl/kis_opengl_canvas2.cpp
@@ -56,10 +56,6 @@
static bool OPENGL_SUCCESS = false;
-typedef void (*kis_glLogicOp)(int);
-static kis_glLogicOp ptr_glLogicOp = 0;
-
-
struct KisOpenGLCanvas2::Private
{
public:
@@ -281,8 +277,6 @@ void KisOpenGLCanvas2::initializeGL()
glVertexAttribPointer(PROGRAM_VERTEX_ATTRIBUTE, 3, GL_FLOAT, GL_FALSE, 0, 0);
}
- ptr_glLogicOp = (kis_glLogicOp)(context()->getProcAddress("glLogicOp"));
-
Sync::init(context());
d->canvasInitialized = true;
@@ -382,14 +376,8 @@ void KisOpenGLCanvas2::paintToolOutline(const QPainterPath &path)
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
- // XXX: glLogicOp not in ES 2.0 -- it would be better to use another method.
- // It is defined in 3.1 core profile onward.
- // Actually, https://www.opengl.org/sdk/docs/man/html/glLogicOp.xhtml says it's in 2.0 onwards,
- // only not in ES, but we don't care about ES, so we could use the function directly.
glEnable(GL_COLOR_LOGIC_OP);
- if (ptr_glLogicOp) {
- ptr_glLogicOp(GL_XOR);
- }
+ glLogicOp(GL_XOR);
// Paint the tool outline
if (KisOpenGL::hasOpenGL3()) {
diff --git a/libs/ui/opengl/kis_opengl_canvas2.h b/libs/ui/opengl/kis_opengl_canvas2.h
index 5564498e6382b9661f7c1bc35f8538a96d801086..dd7939f5a42800d5772a654572d3ea09b693f34c 100644
--- a/libs/ui/opengl/kis_opengl_canvas2.h
+++ b/libs/ui/opengl/kis_opengl_canvas2.h
@@ -21,7 +21,7 @@
#define KIS_OPENGL_CANVAS_2_H
#include
-#include
+#include
#include "canvas/kis_canvas_widget_base.h"
#include "opengl/kis_opengl_image_textures.h"
@@ -42,7 +42,7 @@ class QPainterPath;
* in the qpainter canvas.
*
*/
-class KRITAUI_EXPORT KisOpenGLCanvas2 : public QOpenGLWidget, protected QOpenGLFunctions, public KisCanvasWidgetBase
+class KRITAUI_EXPORT KisOpenGLCanvas2 : public QOpenGLWidget, protected QOpenGLFunctions_3_0, public KisCanvasWidgetBase
{
Q_OBJECT
diff --git a/libs/ui/recorder/kis_recorded_filter_action_creator.cpp b/libs/ui/recorder/kis_recorded_filter_action_creator.cpp
index 60b768be535bcda6e77dd8f42b373bfa543d49f5..fcdf6d4ef5911548f742279eaf7cc6aa6d182a82 100644
--- a/libs/ui/recorder/kis_recorded_filter_action_creator.cpp
+++ b/libs/ui/recorder/kis_recorded_filter_action_creator.cpp
@@ -53,7 +53,7 @@ KisRecordedAction* KisRecordedFilterActionCreator::createAction() const
{
const KisFilter* filter = m_filterModel->indexToFilter(m_filterTree->currentIndex());
if(!filter) return 0;
- return new KisRecordedFilterAction(filter->name(), KisNodeQueryPath::fromString(""), filter, filter->defaultConfiguration(0));
+ return new KisRecordedFilterAction(filter->name(), KisNodeQueryPath::fromString(""), filter, filter->defaultConfiguration());
}
diff --git a/libs/ui/tests/filter_stroke_test.cpp b/libs/ui/tests/filter_stroke_test.cpp
index 256f47ecc95d44eb18a0d99b12e4bce8ec03e846..8210ef02b8ba7cf87b4119f52915a6d27db46300 100644
--- a/libs/ui/tests/filter_stroke_test.cpp
+++ b/libs/ui/tests/filter_stroke_test.cpp
@@ -57,7 +57,7 @@ protected:
KisFilterSP filter = KisFilterRegistry::instance()->value(m_filterName);
Q_ASSERT(filter);
- KisFilterConfigurationSP filterConfig = filter->defaultConfiguration(0);
+ KisFilterConfigurationSP filterConfig = filter->defaultConfiguration();
Q_ASSERT(filterConfig);
return new KisFilterStrokeStrategy(filter, KisFilterConfigurationSP(filterConfig), resources);
diff --git a/libs/ui/tests/kis_recorded_action_editor_test.cpp b/libs/ui/tests/kis_recorded_action_editor_test.cpp
index eaf5cde5de674c1527821e1f51cefe68613ad51f..3d00ce8d4010da66943ac4f42f7ea745c1e1837a 100644
--- a/libs/ui/tests/kis_recorded_action_editor_test.cpp
+++ b/libs/ui/tests/kis_recorded_action_editor_test.cpp
@@ -34,12 +34,12 @@ void KisRecordedActionEditorTest::testFilterEditorCreation()
KisRecordedActionEditorFactoryRegistry* reg = KisRecordedActionEditorFactoryRegistry::instance();
const KisFilter* blurFilter = KisFilterRegistry::instance()->get("blur");
KisRecordedFilterAction* blurFilterAction = new KisRecordedFilterAction(
- "hello", KisNodeQueryPath::fromString(""), blurFilter, blurFilter->defaultConfiguration(0));
+ "hello", KisNodeQueryPath::fromString(""), blurFilter, blurFilter->defaultConfiguration());
QVERIFY(reg->hasEditor(blurFilterAction));
QVERIFY(reg->createEditor(0, blurFilterAction));
const KisFilter* invertFilter = KisFilterRegistry::instance()->get("invert");
KisRecordedFilterAction* invertFilterAction = new KisRecordedFilterAction(
- "hello", KisNodeQueryPath::fromString(""), invertFilter, invertFilter->defaultConfiguration(0));
+ "hello", KisNodeQueryPath::fromString(""), invertFilter, invertFilter->defaultConfiguration());
QVERIFY(reg->hasEditor(invertFilterAction));
QVERIFY(reg->createEditor(0, invertFilterAction));
}
diff --git a/libs/ui/tests/util.h b/libs/ui/tests/util.h
index 14745d203fa710f5ef7c31d7236826a11feda533..3e7d0430aa536971f2809f9b5f064baf9eb4cfdf 100644
--- a/libs/ui/tests/util.h
+++ b/libs/ui/tests/util.h
@@ -127,13 +127,13 @@ KisDocument* createCompleteDocument(bool shouldMaskToShapeLayer = false)
cloneLayer1->setY(100);
KisSelectionSP pixelSelection = createPixelSelection(paintLayer1->paintDevice());
- KisFilterConfigurationSP kfc = KisFilterRegistry::instance()->get("pixelize")->defaultConfiguration(group2->projection());
+ KisFilterConfigurationSP kfc = KisFilterRegistry::instance()->get("pixelize")->defaultConfiguration();
Q_ASSERT(kfc);
KisAdjustmentLayerSP adjustmentLayer1 = new KisAdjustmentLayer(image, "adjustmentLayer1", kfc, pixelSelection);
kfc = 0; // kfc cannot be shared!
KisSelectionSP vectorSelection = createVectorSelection(paintLayer2->paintDevice(), image);
- kfc = KisFilterRegistry::instance()->get("pixelize")->defaultConfiguration(group2->projection());
+ kfc = KisFilterRegistry::instance()->get("pixelize")->defaultConfiguration();
KisAdjustmentLayerSP adjustmentLayer2 = new KisAdjustmentLayer(image, "adjustmentLayer2", kfc, vectorSelection);
kfc = 0; // kfc cannot be shared!
@@ -163,7 +163,7 @@ KisDocument* createCompleteDocument(bool shouldMaskToShapeLayer = false)
KisFilterMaskSP filterMask1 = new KisFilterMask();
filterMask1->setName("filterMask1");
- kfc = KisFilterRegistry::instance()->get("pixelize")->defaultConfiguration(group2->projection());
+ kfc = KisFilterRegistry::instance()->get("pixelize")->defaultConfiguration();
filterMask1->setFilter(kfc);
kfc = 0; // kfc cannot be shared!
@@ -173,7 +173,7 @@ KisDocument* createCompleteDocument(bool shouldMaskToShapeLayer = false)
KisFilterMaskSP filterMask2 = new KisFilterMask();
filterMask2->setName("filterMask2");
- kfc = KisFilterRegistry::instance()->get("pixelize")->defaultConfiguration(group2->projection());
+ kfc = KisFilterRegistry::instance()->get("pixelize")->defaultConfiguration();
filterMask2->setFilter(kfc);
kfc = 0; // kfc cannot be shared!
diff --git a/libs/ui/tool/kis_tool_paint.cc b/libs/ui/tool/kis_tool_paint.cc
index d5d4bfb8f70b488e39202c96210556c68ff0ddf2..facb703539a040a4283fd384ccfcd35e7f2bf4b0 100644
--- a/libs/ui/tool/kis_tool_paint.cc
+++ b/libs/ui/tool/kis_tool_paint.cc
@@ -94,7 +94,7 @@ KisToolPaint::KisToolPaint(KoCanvasBase * canvas, const QCursor & cursor)
m_supportOutline = false;
{
- const int maxSize = 1000;
+ int maxSize = KisConfig().readEntry("maximumBrushSize", 1000);
int brushSize = 1;
do {
diff --git a/libs/ui/wdgsplash.ui b/libs/ui/wdgsplash.ui
index 5c2369b3a9cf0bef3c8284f21b6eb2b279a21635..85eb0d7d3f51ac6407455b681afa277ebbdec291 100644
--- a/libs/ui/wdgsplash.ui
+++ b/libs/ui/wdgsplash.ui
@@ -324,7 +324,7 @@
true
-
+
0
0
@@ -335,6 +335,12 @@
286
+
+
+ 440
+ 281
+
+
diff --git a/libs/ui/widgets/kis_advanced_color_space_selector.cc b/libs/ui/widgets/kis_advanced_color_space_selector.cc
index 4f26cc52726f7eda303882476b47c2ed42eb46d2..2e6595e9f51647807984a2b536216ba9286ff64a 100644
--- a/libs/ui/widgets/kis_advanced_color_space_selector.cc
+++ b/libs/ui/widgets/kis_advanced_color_space_selector.cc
@@ -72,8 +72,6 @@ KisAdvancedColorSpaceSelector::KisAdvancedColorSpaceSelector(QWidget* parent, co
this, SLOT(fillLstProfiles()));
connect(d->colorSpaceSelector->lstProfile, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
this, SLOT(colorSpaceChanged()));
- connect(d->colorSpaceSelector->lstProfile, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
- this, SLOT(buttonUpdate()));
connect(this, SIGNAL(selectionChanged(bool)),
this, SLOT(fillDescription()));
connect(this, SIGNAL(selectionChanged(bool)), d->colorSpaceSelector->TongueWidget, SLOT(repaint()));
@@ -214,7 +212,7 @@ void KisAdvancedColorSpaceSelector::fillDescription()
if (currentColorSpace()->profile()->hasTRC()){
for (int i=0; i<=10; i++) {
QVector linear(3);
- linear.fill(i*0.1);
+ linear.fill(i*0.1);
currentColorSpace()->profile()->linearizeFloatValue(linear);
estimatedCurve = estimatedCurve + ", " + QString::number(linear[0]);
QPointF tonepoint(linear[0],i*0.1);
@@ -249,7 +247,7 @@ void KisAdvancedColorSpaceSelector::fillDescription()
if (currentColorSpace()->profile()->hasTRC()){
for (int i=0; i<=10; i++) {
QVector linear(3);
- linear.fill(i*0.1);
+ linear.fill(i*0.1);
currentColorSpace()->profile()->linearizeFloatValue(linear);
estimatedCurve = estimatedCurve + ", " + QString::number(linear[0]);
QPointF tonepoint(linear[0],i*0.1);
@@ -277,7 +275,7 @@ void KisAdvancedColorSpaceSelector::fillDescription()
if (currentColorSpace()->profile()->hasTRC()){
for (int i=0; i<=10; i++) {
QVector linear(3);
- linear.fill(i*0.1);
+ linear.fill(i*0.1);
currentColorSpace()->profile()->linearizeFloatValue(linear);
estimatedCurve = estimatedCurve + ", " + QString::number(linear[0]);
QPointF tonepoint(linear[0],i*0.1);
@@ -301,7 +299,7 @@ void KisAdvancedColorSpaceSelector::fillDescription()
if (currentColorSpace()->profile()->hasTRC()){
for (int i=0; i<=10; i++) {
QVector linear(3);
- linear.fill(i*0.1);
+ linear.fill(i*0.1);
currentColorSpace()->profile()->linearizeFloatValue(linear);
estimatedCurve = estimatedCurve + ", " + QString::number(linear[0]);
QPointF tonepoint(linear[0],i*0.1);
@@ -323,7 +321,7 @@ void KisAdvancedColorSpaceSelector::fillDescription()
if (currentColorSpace()->profile()->hasTRC()){
for (int i=0; i<=10; i++) {
QVector linear(3);
- linear.fill(i*0.1);
+ linear.fill(i*0.1);
currentColorSpace()->profile()->linearizeFloatValue(linear);
estimatedCurve = estimatedCurve + ", " + QString::number(linear[0]);
QPointF tonepoint(linear[0],i*0.1);
@@ -346,7 +344,7 @@ void KisAdvancedColorSpaceSelector::fillDescription()
if (currentColorSpace()->profile()->hasTRC()){
for (int i=0; i<=10; i++) {
QVector linear(3);
- linear.fill(i*0.1);
+ linear.fill(i*0.1);
currentColorSpace()->profile()->linearizeFloatValue(linear);
estimatedCurve = estimatedCurve + ", " + QString::number(linear[0]);
QPointF tonepoint(linear[0],i*0.1);
diff --git a/libs/ui/widgets/kis_filter_selector_widget.cc b/libs/ui/widgets/kis_filter_selector_widget.cc
index 3cbddbd8697412f7cb137088edecf0ac0fd48041..31450a5a365130986663345f90361b047381b3ab 100644
--- a/libs/ui/widgets/kis_filter_selector_widget.cc
+++ b/libs/ui/widgets/kis_filter_selector_widget.cc
@@ -198,8 +198,7 @@ void KisFilterSelectorWidget::setFilter(KisFilterSP f)
widget->layout()->setContentsMargins(0,0,0,0);
d->currentFilterConfigurationWidget->setView(d->view);
d->currentFilterConfigurationWidget->blockSignals(true);
- d->currentFilterConfigurationWidget->setConfiguration(
- d->currentFilter->defaultConfiguration(d->paintDevice));
+ d->currentFilterConfigurationWidget->setConfiguration(d->currentFilter->defaultConfiguration());
d->currentFilterConfigurationWidget->blockSignals(false);
d->uiFilterSelector.scrollArea->setContentsMargins(0,0,0,0);
d->uiFilterSelector.scrollArea->setMinimumWidth(widget->sizeHint().width() + 18);
@@ -288,7 +287,7 @@ KisFilterConfigurationSP KisFilterSelectorWidget::configuration()
return config;
}
} else if (d->currentFilter) {
- return d->currentFilter->defaultConfiguration(d->paintDevice);
+ return d->currentFilter->defaultConfiguration();
}
return 0;
diff --git a/libs/ui/widgets/kis_paintop_presets_popup.cpp b/libs/ui/widgets/kis_paintop_presets_popup.cpp
index 7438a4a98c5f69f748d64cacb7cb1e7f86df4b4a..df703f320c71bc239dfbde65433574da499dfa67 100644
--- a/libs/ui/widgets/kis_paintop_presets_popup.cpp
+++ b/libs/ui/widgets/kis_paintop_presets_popup.cpp
@@ -58,7 +58,7 @@
// ones from brush engine selector
#include
-#include "../kis_paint_ops_model.h"
+
@@ -227,9 +227,6 @@ KisPaintOpPresetsPopup::KisPaintOpPresetsPopup(KisCanvasResourceProvider * resou
connect(m_d->uiWdgPaintOpPresetSettings.txtPreset, SIGNAL(textChanged(QString)),
SLOT(slotWatchPresetNameLineEdit()));
- connect(m_d->uiWdgPaintOpPresetSettings.brushEgineComboBox, SIGNAL(activated(QString)),
- this, SIGNAL(paintopActivated(QString)));
-
// preset widget connections
connect(m_d->uiWdgPaintOpPresetSettings.presetWidget->smallPresetChooser, SIGNAL(resourceSelected(KoResource*)),
@@ -254,9 +251,6 @@ KisPaintOpPresetsPopup::KisPaintOpPresetsPopup(KisCanvasResourceProvider * resou
m_d->uiWdgPaintOpPresetSettings.wdgLodAvailability->setCanvasResourceManager(resourceProvider->resourceManager());
- // brush engine is changed
- connect(m_d->uiWdgPaintOpPresetSettings.brushEgineComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotPaintOpChanged(int)));
-
connect(resourceProvider->resourceManager(),
SIGNAL(canvasResourceChanged(int,QVariant)),
SLOT(slotResourceChanged(int, QVariant)));
@@ -270,7 +264,7 @@ KisPaintOpPresetsPopup::KisPaintOpPresetsPopup(KisCanvasResourceProvider * resou
resource(KisCanvasResourceProvider::LodAvailability));
- connect(m_d->uiWdgPaintOpPresetSettings.brushEgineComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotPaintOpChanged(int)));
+ connect(m_d->uiWdgPaintOpPresetSettings.brushEgineComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdatePaintOpFilter()));
}
@@ -434,7 +428,18 @@ void KisPaintOpPresetsPopup::resourceSelected(KoResource* resource)
m_d->uiWdgPaintOpPresetSettings.presetWidget->smallPresetChooser->setCurrentResource(resource);
m_d->uiWdgPaintOpPresetSettings.txtPreset->setText(resource->name());
slotWatchPresetNameLineEdit();
- m_d->uiWdgPaintOpPresetSettings.currentBrushNameLabel->setText(resource->name());
+
+ // find the display name of the brush engine and append it to the selected preset display
+ QString currentBrushEngineName;
+ for(int i=0; i < sortedBrushEnginesList.length(); i++) {
+ if (sortedBrushEnginesList.at(i).id == currentPaintOpId() ) {
+ currentBrushEngineName = sortedBrushEnginesList.at(i).name;
+ }
+ }
+
+ QString selectedBrush = resource->name().append(" (").append(currentBrushEngineName).append(" ").append("Engine").append(")");
+
+ m_d->uiWdgPaintOpPresetSettings.currentBrushNameLabel->setText(selectedBrush);
}
bool variantLessThan(const KisPaintOpInfo v1, const KisPaintOpInfo v2)
@@ -446,8 +451,10 @@ void KisPaintOpPresetsPopup::setPaintOpList(const QList< KisPaintOpFactory* >& l
{
m_d->uiWdgPaintOpPresetSettings.brushEgineComboBox->clear(); // reset combobox list just in case
+
// create a new list so we can sort it and populate the brush engine combo box
- QList sortedList;
+ sortedBrushEnginesList.clear(); // just in case this function is called again, don't keep adding to the list
+
for(int i=0; i < list.length(); i++) {
QString fileName = KoResourcePaths::findResource("kis_images", list.at(i)->pixmap());
@@ -464,54 +471,30 @@ void KisPaintOpPresetsPopup::setPaintOpList(const QList< KisPaintOpFactory* >& l
paintOpInfo.icon = pixmap;
paintOpInfo.priority = list.at(i)->priority();
- sortedList.append(paintOpInfo);
+ sortedBrushEnginesList.append(paintOpInfo);
}
- qStableSort(sortedList.begin(), sortedList.end(), variantLessThan );
+ qStableSort(sortedBrushEnginesList.begin(), sortedBrushEnginesList.end(), variantLessThan );
// add an "All" option at the front to show all presets
QPixmap emptyPixmap = QPixmap(22,22);
emptyPixmap.fill(palette().color(QPalette::Background));
- sortedList.push_front(KisPaintOpInfo(QString("all_options"), i18n("All"), QString(""), emptyPixmap, 0 ));
+ sortedBrushEnginesList.push_front(KisPaintOpInfo(QString("all_options"), i18n("All"), QString(""), emptyPixmap, 0 ));
// fill the list into the brush combo box
- for (int m = 0; m < sortedList.length(); m++) {
- m_d->uiWdgPaintOpPresetSettings.brushEgineComboBox->addItem(sortedList[m].icon, sortedList[m].name, QVariant(sortedList[m].id));
+ for (int m = 0; m < sortedBrushEnginesList.length(); m++) {
+ m_d->uiWdgPaintOpPresetSettings.brushEgineComboBox->addItem(sortedBrushEnginesList[m].icon, sortedBrushEnginesList[m].name, QVariant(sortedBrushEnginesList[m].id));
}
}
-void KisPaintOpPresetsPopup::setCurrentPaintOp(const QString& paintOpId)
+void KisPaintOpPresetsPopup::setCurrentPaintOpId(const QString& paintOpId)
{
- // iterate through the items and find the engine we need the combo box to switch to
- for (int i= 0; i < m_d->uiWdgPaintOpPresetSettings.brushEgineComboBox->count(); i++) {
-
- QVariant userData = m_d->uiWdgPaintOpPresetSettings.brushEgineComboBox->itemData(i); // grab paintOpID from data
- QString currentPaintOpId = userData.toString();
-
- if (paintOpId == currentPaintOpId) {
- m_d->uiWdgPaintOpPresetSettings.brushEgineComboBox->setCurrentIndex(i); // found it!
- }
- }
-
- // if the "all" option is set, set the filter to "", that way it clears the filter and shows everything
- QString paintOpFilter = paintOpId;
- if (paintOpFilter == "all_options") {
- paintOpFilter = "";
- }
-
- m_d->uiWdgPaintOpPresetSettings.presetWidget->setPresetFilter(paintOpFilter);
-
+ current_paintOpId = paintOpId;
}
-QString KisPaintOpPresetsPopup::currentPaintOp()
-{
- QVariant userData = m_d->uiWdgPaintOpPresetSettings.brushEgineComboBox->currentData(); // grab paintOpID from data
- QString currentPaintOpId = userData.toString();
- return currentPaintOpId;
-}
QString KisPaintOpPresetsPopup::currentPaintOpId() {
return current_paintOpId;
@@ -567,17 +550,16 @@ void KisPaintOpPresetsPopup::slotSwitchShowPresets(bool visible) {
m_d->uiWdgPaintOpPresetSettings.presetsContainer->setVisible(visible);
}
-void KisPaintOpPresetsPopup::slotPaintOpChanged(int index) {
-
- Q_UNUSED(index);
-
+void KisPaintOpPresetsPopup::slotUpdatePaintOpFilter() {
QVariant userData = m_d->uiWdgPaintOpPresetSettings.brushEgineComboBox->currentData(); // grab paintOpID from data
- QString currentPaintOpId = userData.toString();
+ QString filterPaintOpId = userData.toString();
- setCurrentPaintOp(currentPaintOpId);
- emit paintopActivated(currentPaintOpId); // tell the toolbar to change the active icon
-}
+ if (filterPaintOpId == "all_options") {
+ filterPaintOpId = "";
+ }
+ m_d->uiWdgPaintOpPresetSettings.presetWidget->setPresetFilter(filterPaintOpId);
+}
void KisPaintOpPresetsPopup::updateViewSettings()
{
@@ -585,8 +567,9 @@ void KisPaintOpPresetsPopup::updateViewSettings()
}
void KisPaintOpPresetsPopup::currentPresetChanged(KisPaintOpPresetSP preset)
-{
+{
m_d->uiWdgPaintOpPresetSettings.presetWidget->smallPresetChooser->setCurrentResource(preset.data());
+ setCurrentPaintOpId(preset->paintOp().id());
}
void KisPaintOpPresetsPopup::updateThemedIcons()
diff --git a/libs/ui/widgets/kis_paintop_presets_popup.h b/libs/ui/widgets/kis_paintop_presets_popup.h
index 1d24db9ebd0f1ad8355afc6c2c4a9e726a92f11b..02f6d50033c92b1380d627a7bc0b1b6ab67f9f6f 100644
--- a/libs/ui/widgets/kis_paintop_presets_popup.h
+++ b/libs/ui/widgets/kis_paintop_presets_popup.h
@@ -26,6 +26,7 @@
#include
#include
#include
+#include "../kis_paint_ops_model.h"
class QString;
class KisCanvasResourceProvider;
@@ -58,8 +59,7 @@ public:
void setPaintOpList(const QList& list);
- void setCurrentPaintOp(const QString & paintOpId);
- QString currentPaintOp();
+ void setCurrentPaintOpId(const QString & paintOpId);
/// returns the internal ID for the paint op (brush engine)
QString currentPaintOpId();
@@ -108,7 +108,7 @@ private Q_SLOTS:
void slotResourceChanged(int key, const QVariant &value);
void slotLodAvailabilityChanged(bool value);
void slotSwitchShowEditor(bool visible);
- void slotPaintOpChanged(int index);
+ void slotUpdatePaintOpFilter();
void slotSwitchShowPresets(bool visible);
@@ -118,6 +118,7 @@ private:
struct Private;
Private * const m_d;
QString current_paintOpId;
+ QList sortedBrushEnginesList;
};
diff --git a/libs/ui/widgets/kis_screen_color_picker.cpp b/libs/ui/widgets/kis_screen_color_picker.cpp
index ade1b633928803b880d975d88fdc07db0b3e4cb5..89c1be59a729b72cc716994f1bd681164a2a3a09 100644
--- a/libs/ui/widgets/kis_screen_color_picker.cpp
+++ b/libs/ui/widgets/kis_screen_color_picker.cpp
@@ -86,11 +86,7 @@ void KisScreenColorPicker::pickScreenColor()
this->installEventFilter(m_d->colorPickingEventFilter);
// If user pushes Escape, the last color before picking will be restored.
m_d->beforeScreenColorPicking = currentColor();
-#ifndef QT_NO_CURSOR
grabMouse(Qt::CrossCursor);
-#else
- grabMouse();
-#endif
#ifdef Q_OS_WIN32 // excludes WinCE and WinRT
// On Windows mouse tracking doesn't work over other processes's windows
@@ -167,7 +163,6 @@ bool KisScreenColorPicker::handleColorPickingMouseMove(QMouseEvent *e)
// If the cross is visible the grabbed color will be black most of the times
//cp->setCrossVisible(!cp->geometry().contains(e->pos()));
-
continueUpdateColorPicking(e->globalPos());
return true;
}
@@ -182,7 +177,6 @@ bool KisScreenColorPicker::handleColorPickingMouseButtonRelease(QMouseEvent *e)
bool KisScreenColorPicker::handleColorPickingKeyPress(QKeyEvent *e)
{
- //Q_Q(QColorDialog);
#if QT_VERSION >= 0x050600
if (e->matches(QKeySequence::Cancel)) {
#else
@@ -200,8 +194,7 @@ bool KisScreenColorPicker::handleColorPickingKeyPress(QKeyEvent *e)
void KisScreenColorPicker::releaseColorPicking()
{
- //Q_Q(QColorDialog);
- //cp->setCrossVisible(true);
+
removeEventFilter(m_d->colorPickingEventFilter);
releaseMouse();
#ifdef Q_OS_WIN32
@@ -223,8 +216,6 @@ void KisScreenColorPicker::changeEvent(QEvent *e)
void KisScreenColorPicker::updateColorPicking()
{
-#ifndef QT_NO_CURSOR
- //Q_Q(QColorDialog);
static QPoint lastGlobalPos;
QPoint newGlobalPos = QCursor::pos();
if (lastGlobalPos == newGlobalPos)
@@ -237,7 +228,6 @@ void KisScreenColorPicker::updateColorPicking()
m_d->dummyTransparentWindow.setPosition(newGlobalPos);
#endif
}
-#endif // ! QT_NO_CURSOR
}
void KisScreenColorPicker::continueUpdateColorPicking(const QPoint &globalPos)
@@ -251,7 +241,9 @@ void KisScreenColorPicker::continueUpdateColorPicking(const QPoint &globalPos)
}
// Event filter to be installed on the dialog while in color-picking mode.
-KisScreenColorPickingEventFilter::KisScreenColorPickingEventFilter(KisScreenColorPicker *w, QObject *parent) : QObject(parent), m_w(w)
+KisScreenColorPickingEventFilter::KisScreenColorPickingEventFilter(KisScreenColorPicker *w, QObject *parent)
+ : QObject(parent)
+ , m_w(w)
{}
bool KisScreenColorPickingEventFilter::eventFilter(QObject *, QEvent *event)
diff --git a/libs/ui/widgets/kis_wdg_generator.cpp b/libs/ui/widgets/kis_wdg_generator.cpp
index b52d8c9cd3253a93708343018772f60e627530e3..8dc3da51dba4bc9e8c6f9c07d34f3bfda1d47175 100644
--- a/libs/ui/widgets/kis_wdg_generator.cpp
+++ b/libs/ui/widgets/kis_wdg_generator.cpp
@@ -125,7 +125,7 @@ KisFilterConfigurationSP KisWdgGenerator::configuration()
return config;
}
} else {
- return d->currentGenerator->defaultConfiguration(0);
+ return d->currentGenerator->defaultConfiguration();
}
return 0;
}
@@ -152,7 +152,7 @@ void KisWdgGenerator::slotGeneratorActivated(int row)
} else {
d->centralWidget = widget;
widget->setView(d->view);
- widget->setConfiguration(d->currentGenerator->defaultConfiguration(d->dev));
+ widget->setConfiguration(d->currentGenerator->defaultConfiguration());
}
}
d->widgetLayout->addWidget(d->centralWidget, 0 , 0);
diff --git a/libs/widgets/KoResourceServer.h b/libs/widgets/KoResourceServer.h
index 6d54f0c9e3e0718f445462ddcdbd84a7a5e2016d..a003e490a7014df15b749a59961248267fbc5d06 100644
--- a/libs/widgets/KoResourceServer.h
+++ b/libs/widgets/KoResourceServer.h
@@ -510,7 +510,7 @@ public:
// don't use these method directly since it doesn't update views!
void delTag( KoResource* resource,const QString& tag)
{
- m_tagStore->delTag(resource,tag);
+ m_tagStore->delTag(resource, tag);
}
QStringList searchTag(const QString& lineEditText)
diff --git a/libs/widgets/KoResourceTagStore.cpp b/libs/widgets/KoResourceTagStore.cpp
index 21d3035ec2726ef2329f8f5db96b5e2fe37ff615..1b3022f6a6626f068a9e769cfa7f126acb9416f0 100644
--- a/libs/widgets/KoResourceTagStore.cpp
+++ b/libs/widgets/KoResourceTagStore.cpp
@@ -1,4 +1,4 @@
- /* This file is part of the KDE project
+/* This file is part of the KDE project
Copyright (c) 2011 Sven Langkamp
Copyright (C) 2011 Srikanth Tiyyagura
@@ -29,6 +29,8 @@
#include
+#define BLACKLISTED "blacklisted"
+
class Q_DECL_HIDDEN KoResourceTagStore::Private
{
public:
@@ -37,6 +39,8 @@ public:
QHash tagList;
+ QStringList blacklistedTags;
+
KoResourceServerBase *resourceServer;
};
@@ -80,34 +84,43 @@ void KoResourceTagStore::removeResource(const KoResource *resource)
QStringList KoResourceTagStore::tagNamesList() const
{
- return d->tagList.uniqueKeys();
+ QStringList tagList = d->tagList.uniqueKeys();
+ //qDebug() << "Taglist" << tagList << "blacklist" << d->blacklistedTags;
+ Q_FOREACH(const QString &tag, d->blacklistedTags) {
+ tagList.removeAll(tag);
+ }
+ return tagList;
}
void KoResourceTagStore::addTag(KoResource* resource, const QString& tag)
{
+ if (d->blacklistedTags.contains(tag)) {
+ //qDebug() << "Adding blacklisted tag" << tag;
+ d->blacklistedTags.removeAll(tag);
+ }
if (!resource) {
d->tagList.insert(tag, 0);
- return;
- }
-
- bool added = false;
-
- if (!d->md5ToTag.contains(resource->md5(), tag)) {
- added = true;
- d->md5ToTag.insert(resource->md5(), tag);
}
+ else {
+ bool added = false;
- if (!d->identifierToTag.contains(resource->filename())) {
- added = true;
- d->identifierToTag.insert(resource->filename(), tag);
- }
+ if (!d->md5ToTag.contains(resource->md5(), tag)) {
+ added = true;
+ d->md5ToTag.insert(resource->md5(), tag);
+ }
- if (added) {
- if (d->tagList.contains(tag)) {
- d->tagList[tag]++;
+ if (!d->identifierToTag.contains(resource->filename())) {
+ added = true;
+ d->identifierToTag.insert(resource->filename(), tag);
}
- else {
- d->tagList.insert(tag, 1);
+
+ if (added) {
+ if (d->tagList.contains(tag)) {
+ d->tagList[tag]++;
+ }
+ else {
+ d->tagList.insert(tag, 1);
+ }
}
}
}
@@ -128,6 +141,7 @@ void KoResourceTagStore::delTag(KoResource* resource, const QString& tag)
void KoResourceTagStore::delTag(const QString& tag)
{
+ //qDebug() << "delTag" << tag;
Q_FOREACH (const QByteArray &res, d->md5ToTag.keys(tag)) {
d->md5ToTag.remove(res, tag);
}
@@ -138,6 +152,8 @@ void KoResourceTagStore::delTag(const QString& tag)
Q_ASSERT(!d->md5ToTag.values().contains(tag));
Q_ASSERT(!d->identifierToTag.values().contains(tag));
d->tagList.remove(tag);
+ d->blacklistedTags << tag;
+ serializeTags();
}
QStringList KoResourceTagStore::searchTag(const QString& query) const
@@ -149,7 +165,7 @@ QStringList KoResourceTagStore::searchTag(const QString& query) const
QSet resources;
- foreach (QString tag, tagsList) {
+ Q_FOREACH (QString tag, tagsList) {
Q_FOREACH (const QByteArray &md5, d->md5ToTag.keys(tag)) {
KoResource *res = d->resourceServer->byMd5(md5);
if (res)
@@ -163,7 +179,7 @@ QStringList KoResourceTagStore::searchTag(const QString& query) const
}
QStringList filenames;
- foreach (const KoResource *res, resources) {
+ Q_FOREACH (const KoResource *res, resources) {
if (res) {
filenames << adjustedFileName(res->shortFilename());
}
@@ -185,7 +201,7 @@ void KoResourceTagStore::loadTags()
void KoResourceTagStore::writeXMLFile(const QString &tagstore)
{
- //qDebug() << "writing tags to" << tagstore;
+ //qDebug() << "writing tags to" << tagstore << "blacklisted" << d->blacklistedTags;
QFile f(tagstore);
if (!f.open(QIODevice::WriteOnly | QIODevice::Text)) {
@@ -202,28 +218,29 @@ void KoResourceTagStore::writeXMLFile(const QString &tagstore)
doc.appendChild(root);
QSet taggedResources;
- foreach (const QByteArray &md5, d->md5ToTag.keys()) {
+ Q_FOREACH (const QByteArray &md5, d->md5ToTag.keys()) {
KoResource *res = d->resourceServer->byMd5(md5);
if (res) {
taggedResources << res;
}
}
- foreach (const QString &identifier, d->identifierToTag.keys()) {
+ Q_FOREACH (const QString &identifier, d->identifierToTag.keys()) {
KoResource *res = d->resourceServer->byFileName(identifier);
if (res) {
taggedResources << res;
}
}
- foreach (const KoResource *res, taggedResources) {
+ Q_FOREACH (const KoResource *res, taggedResources) {
QDomElement resourceEl = doc.createElement("resource");
resourceEl.setAttribute("identifier", res->filename().replace(QDir::homePath(), QString("~")));
resourceEl.setAttribute("md5", QString(res->md5().toBase64()));
- foreach (const QString &tag, assignedTagsList(res)) {
+ Q_FOREACH (const QString &tag, assignedTagsList(res)) {
QDomElement tagEl = doc.createElement("tag");
+ tagEl.setAttribute(BLACKLISTED, "false");
tagEl.appendChild(doc.createTextNode(tag));
resourceEl.appendChild(tagEl);
}
@@ -232,11 +249,25 @@ void KoResourceTagStore::writeXMLFile(const QString &tagstore)
}
// Now write empty tags
- foreach (const QString &tag, d->tagList.uniqueKeys()) {
+ Q_FOREACH (const QString &tag, d->tagList.uniqueKeys()) {
if (d->tagList[tag] == 0) {
QDomElement resourceEl = doc.createElement("resource");
resourceEl.setAttribute("identifier", "dummy");
QDomElement tagEl = doc.createElement("tag");
+ tagEl.setAttribute(BLACKLISTED, d->blacklistedTags.contains(tag) ? "true" : "false");
+ tagEl.appendChild(doc.createTextNode(tag));
+ resourceEl.appendChild(tagEl);
+ root.appendChild(resourceEl);
+ }
+ }
+
+ // Now write blacklisted tags.
+ Q_FOREACH (const QString &tag, d->blacklistedTags) {
+ if (d->tagList[tag] == 0) {
+ QDomElement resourceEl = doc.createElement("resource");
+ resourceEl.setAttribute("identifier", "dummy");
+ QDomElement tagEl = doc.createElement("tag");
+ tagEl.setAttribute(BLACKLISTED, "true");
tagEl.appendChild(doc.createTextNode(tag));
resourceEl.appendChild(tagEl);
root.appendChild(resourceEl);
@@ -311,17 +342,25 @@ void KoResourceTagStore::readXMLFile(const QString &tagstore)
for (int j = 0; j < tagNodesList.count() ; j++) {
QDomElement tagEl = tagNodesList.at(j).toElement();
-
- if (identifier != "dummy") {
- QFileInfo fi(identifier);
- KoResource *res = d->resourceServer->byFileName(fi.fileName());
- addTag(res, tagEl.text());
+ bool blacklisted = (tagEl.attribute(BLACKLISTED, "false") == "true");
+ //qDebug() << "1 reading tag" << tagEl.text() << "blacklist" << blacklisted << d->blacklistedTags.contains(tagEl.text());
+ if (blacklisted || d->blacklistedTags.contains(tagEl.text())) {
+ if (!d->blacklistedTags.contains(tagEl.text())) {
+ d->blacklistedTags << tagEl.text();
+ }
}
else {
- addTag(0, tagEl.text());
+ if (identifier != "dummy") {
+ QFileInfo fi(identifier);
+ KoResource *res = d->resourceServer->byFileName(fi.fileName());
+ addTag(res, tagEl.text());
+ }
+ else {
+ addTag(0, tagEl.text());
+ }
+ d->md5ToTag.insert(resourceMD5, tagEl.text());
+ d->identifierToTag.insert(identifier, tagEl.text());
}
- d->md5ToTag.insert(resourceMD5, tagEl.text());
- d->identifierToTag.insert(identifier, tagEl.text());
}
}
else {
@@ -342,23 +381,32 @@ void KoResourceTagStore::readXMLFile(const QString &tagstore)
QDomNodeList tagNodesList = resourceNodesList.at(i).childNodes();
for (int j = 0; j < tagNodesList.count() ; j++) {
QDomElement tagEl = tagNodesList.at(j).toElement();
-
- if (res) {
- addTag(res, tagEl.text());
+ bool blacklisted = (tagEl.attribute(BLACKLISTED, "false") == "true");
+ //qDebug() << "2 reading tag" << tagEl.text() << "blacklist" << blacklisted << d->blacklistedTags.contains(tagEl.text());
+ if (blacklisted || d->blacklistedTags.contains(tagEl.text())) {
+ if (!d->blacklistedTags.contains(tagEl.text())) {
+ d->blacklistedTags << tagEl.text();
+ }
+ }
+ else {
+ if (res) {
+ addTag(res, tagEl.text());
+ }
+ d->md5ToTag.insert(resourceMD5, tagEl.text());
+ d->identifierToTag.insert(identifier, tagEl.text());
}
- d->md5ToTag.insert(resourceMD5, tagEl.text());
- d->identifierToTag.insert(identifier, tagEl.text());
}
}
}
}
+ //qDebug() << "blacklist" << d->blacklistedTags;
}
bool KoResourceTagStore::isServerResource(const QString &resourceName) const
{
bool removeChild = false;
QStringList extensionsList = d->resourceServer->extensions().split(':');
- foreach (QString extension, extensionsList) {
+ Q_FOREACH (QString extension, extensionsList) {
if (resourceName.contains(extension.remove('*'))) {
removeChild = true;
break;
@@ -377,7 +425,7 @@ QString KoResourceTagStore::adjustedFileName(const QString &fileName) const
QStringList KoResourceTagStore::removeAdjustedFileNames(QStringList fileNamesList) const
{
- foreach (const QString & fileName, fileNamesList) {
+ Q_FOREACH (const QString & fileName, fileNamesList) {
if (fileName.contains("-krita")) {
fileNamesList.append(fileName.split("-krita").takeFirst());
fileNamesList.removeAll(fileName);
diff --git a/libs/widgets/KoResourceTagStore.h b/libs/widgets/KoResourceTagStore.h
index 40ea625f107cfde5145df616094911376711d70b..0cc3435db9a5fc045779588e66e0b471bd45bf46 100644
--- a/libs/widgets/KoResourceTagStore.h
+++ b/libs/widgets/KoResourceTagStore.h
@@ -53,9 +53,10 @@ public:
/// the tag is added but unused
void addTag(KoResource* resource, const QString& tag);
- /// Remove the given tag for the given resource.
+ /// Remove the given tag for the given resource. It will be blacklisted if there are no users left.
void delTag(KoResource* resource, const QString& tag);
+ /// Remove the tag altogether. It will be blacklisted, too.
void delTag(const QString& tag);
/// @return a list of all the tags in this store
diff --git a/libs/widgets/KoTagChooserWidget.cpp b/libs/widgets/KoTagChooserWidget.cpp
index d18b494290803094dc58ce5596adce20c34a1c9c..a49ad9154461dbe65d09e0adc9acb4b41c97a5af 100644
--- a/libs/widgets/KoTagChooserWidget.cpp
+++ b/libs/widgets/KoTagChooserWidget.cpp
@@ -190,6 +190,7 @@ void KoTagChooserWidget::removeItem(QString item)
int pos = d->comboBox->findText(item);
if (pos >= 0) {
d->comboBox->removeItem(pos);
+ d->tags.removeOne(item);
}
}
diff --git a/libs/widgets/KoTagFilterWidget.cpp b/libs/widgets/KoTagFilterWidget.cpp
index f6866f594e55b43d8c4b7bb3044989a0db2a5d28..654bec1548fa585dfa6eea5d37280df2976f65d1 100644
--- a/libs/widgets/KoTagFilterWidget.cpp
+++ b/libs/widgets/KoTagFilterWidget.cpp
@@ -56,8 +56,8 @@ KoTagFilterWidget::KoTagFilterWidget(QWidget* parent): QWidget(parent)
"[Tagname] or ![Tagname] .
"
"Case sensitive and full name matching in-/exclusion: "
"\"ExactMatch\" or !\"ExactMatch\" .
"
- "Filter results cannot be saved for the All Presets view. "
- "In this view, pressing Enter or clearing the filter box will restore all items. "
+ "Filter results cannot be saved for the All Presets view. "
+ "In this view, pressing Enter or clearing the filter box will restore all items. "
"Create and/or switch to a different tag if you want to save filtered resources into named sets."
);
@@ -70,7 +70,7 @@ KoTagFilterWidget::KoTagFilterWidget(QWidget* parent): QWidget(parent)
"[Tagname] or ![Tagname] ."
"Case sensitive and full name matching in-/exclusion: "
"\"ExactMatch\" or !\"ExactMatch\" .
"
- "Pressing Enter or clicking the Save button will save the changes."
+ "Pressing Enter or clicking the Save button will save the changes."
);
QGridLayout* filterBarLayout = new QGridLayout;
@@ -78,7 +78,7 @@ KoTagFilterWidget::KoTagFilterWidget(QWidget* parent): QWidget(parent)
d->tagSearchLineEdit = new QLineEdit(this);
d->tagSearchLineEdit->setClearButtonEnabled(true);
- d->tagSearchLineEdit->setPlaceholderText(i18n("Enter resource filters here"));
+ d->tagSearchLineEdit->setPlaceholderText(i18n("Search"));
d->tagSearchLineEdit->setToolTip(d->tagSearchBarTooltip_saving_disabled);
d->tagSearchLineEdit->setEnabled(true);
diff --git a/libs/widgets/kis_file_name_requester.cpp b/libs/widgets/kis_file_name_requester.cpp
index b957c54f70bd11379b20444c5e1abc6ba7b98fea..db21da770ede460e05a914e93408e4ce6bab7175 100644
--- a/libs/widgets/kis_file_name_requester.cpp
+++ b/libs/widgets/kis_file_name_requester.cpp
@@ -95,5 +95,9 @@ void KisFileNameRequester::slotSelectFile()
Q_ASSERT(!m_mime_filter_list.isEmpty());
dialog.setMimeTypeFilters(m_mime_filter_list, m_mime_default_filter);
- setFileName(dialog.filename());
+ QString newFileName = dialog.filename();
+
+ if (!newFileName.isEmpty()) {
+ setFileName(newFileName);
+ }
}
diff --git a/libs/widgetutils/KoFileDialog.cpp b/libs/widgetutils/KoFileDialog.cpp
index 85538d4329ee0f8cddcf77a1be98dc6d67ac2d00..4ce93277e1a2b4cc7806cc66a515be444558bd70 100644
--- a/libs/widgetutils/KoFileDialog.cpp
+++ b/libs/widgetutils/KoFileDialog.cpp
@@ -59,6 +59,7 @@ public:
QString dialogName;
QString caption;
QString defaultDirectory;
+ QString proposedFileName;
QStringList filterList;
QString defaultFilter;
QScopedPointer fileDialog;
@@ -85,11 +86,14 @@ void KoFileDialog::setCaption(const QString &caption)
void KoFileDialog::setDefaultDir(const QString &defaultDir)
{
- //qDebug() << d->defaultDirectory << d->dialogName << getUsedDir(d->dialogName);
+ qDebug() << d->defaultDirectory << d->dialogName << getUsedDir(d->dialogName);
if (d->defaultDirectory.isEmpty()) {
QFileInfo f(defaultDir);
d->defaultDirectory = f.absoluteFilePath();
}
+ if (!QFileInfo(defaultDir).isDir()) {
+ d->proposedFileName = QFileInfo(defaultDir).fileName();
+ }
}
void KoFileDialog::setImageFilters()
@@ -127,19 +131,41 @@ QString KoFileDialog::selectedMimeType() const
void KoFileDialog::createFileDialog()
{
- //qDebug() << "createFileDialog. Parent:" << d->parent << "Caption:" << d->caption << "Default directory:" << d->defaultDirectory << "Default iflter:" << d->defaultFilter;
+ qDebug() << "createFileDialog. Parent:" << d->parent
+ << "Caption:" << d->caption
+ << "Default directory:" << d->defaultDirectory
+ << "proposed filename" << d->proposedFileName
+ << "Default filter:" << d->defaultFilter;
+
+ d->fileDialog.reset(new QFileDialog(d->parent, d->caption, d->defaultDirectory + "/" + d->proposedFileName));
+ KConfigGroup group = KSharedConfig::openConfig()->group("File Dialogs");
- d->fileDialog.reset(new QFileDialog(d->parent, d->caption, d->defaultDirectory));
- bool dontUseNative = false;
+ bool dontUseNative = true;
#ifdef Q_OS_UNIX
- if (qgetenv("XDG_CURRENT_DESKTOP") != "KDE") {
- dontUseNative = true;
+ if (qgetenv("XDG_CURRENT_DESKTOP") == "KDE") {
+ dontUseNative = false;
}
#endif
- d->fileDialog->setOption(QFileDialog::DontUseNativeDialog, dontUseNative);
+
+ d->fileDialog->setOption(QFileDialog::DontUseNativeDialog, group.readEntry("DontUseNativeFileDialog", dontUseNative));
+
+// qDebug() << "DontUseNativeDialog" << d->fileDialog->testOption(QFileDialog::DontUseNativeDialog)
+// << dontUseNative
+// << group.readEntry("DontUseNativeFileDialog", dontUseNative);
+
d->fileDialog->setOption(QFileDialog::DontConfirmOverwrite, false);
d->fileDialog->setOption(QFileDialog::HideNameFilterDetails, true);
+#ifdef Q_OS_OSX
+ QList urls = d->fileDialog->sidebarUrls();
+ QUrl volumes = QUrl::fromLocalFile("\/Volumes");
+ if (!urls.contains(volumes)) {
+ urls.append(volumes);
+ }
+
+ d->fileDialog->setSidebarUrls(urls);
+#endif
+
if (d->type == SaveFile) {
d->fileDialog->setAcceptMode(QFileDialog::AcceptSave);
d->fileDialog->setFileMode(QFileDialog::AnyFile);
@@ -166,12 +192,12 @@ void KoFileDialog::createFileDialog()
d->fileDialog->setNameFilters(d->filterList);
- if (!QFileInfo(d->defaultDirectory).isDir()) {
- //qDebug() << "Finding the right mimetype for the given file" << d->defaultDirectory;
- QString mime = KisMimeDatabase::mimeTypeForFile(d->defaultDirectory);
+ if (!d->proposedFileName.isEmpty()) {
+ qDebug() << "Finding the right mimetype for the given file" << d->defaultDirectory;
+ QString mime = KisMimeDatabase::mimeTypeForFile(d->proposedFileName);
QString description = KisMimeDatabase::descriptionForMimeType(mime);
Q_FOREACH(const QString &filter, d->filterList) {
- //qDebug() << "\tConsidering" << filter;
+ qDebug() << "\tConsidering" << filter;
if (filter.startsWith(description)) {
d->fileDialog->selectNameFilter(filter);
break;
@@ -389,6 +415,7 @@ void KoFileDialog::saveUsedDir(const QString &fileName,
{
if (dialogName.isEmpty()) return;
+ if (d->type == SaveFile) return;
QFileInfo fileInfo(fileName);
KConfigGroup group = KSharedConfig::openConfig()->group("File Dialogs");
diff --git a/libs/widgetutils/KoFileDialog.h b/libs/widgetutils/KoFileDialog.h
index c2e6607ebe91f85f3fa485f14781014682f4e16b..86f0b50794c5f47272cde77bd59b8afef76185bf 100644
--- a/libs/widgetutils/KoFileDialog.h
+++ b/libs/widgetutils/KoFileDialog.h
@@ -65,8 +65,14 @@ public:
void setCaption(const QString &caption);
+
+ /**
+ * Use the given filename as a proposal.
+ */
+ void setProposedFileName(const QString &filename);
+
/**
- * @brief setDefaultDir set the default directory to defaultDir
+ * @brief setDefaultDir set the default directory to defaultDir.
*
* @param defaultDir a path to a file or directory
*/
diff --git a/libs/widgetutils/KoResourcePaths.cpp b/libs/widgetutils/KoResourcePaths.cpp
index f4bfb97bd037265375b03499e586ea6dde8b7af4..f57b9428a5a372e7dfd466d8e5ed33df1fac8d1e 100644
--- a/libs/widgetutils/KoResourcePaths.cpp
+++ b/libs/widgetutils/KoResourcePaths.cpp
@@ -28,7 +28,6 @@
#include
#include
#include "kis_debug.h"
-
#include "WidgetUtilsDebug.h"
Q_GLOBAL_STATIC(KoResourcePaths, s_instance);
@@ -307,12 +306,13 @@ QString KoResourcePaths::findResourceInternal(const QString &type, const QString
Q_FOREACH (const QString &alias, aliases) {
resource = approot + "/share/" + alias + '/' + fileName;
debugWidgetUtils << "\t1" << resource;
+
if (QFile::exists(resource)) {
continue;
}
}
}
- if (resource.isEmpty() || !QFile::exists(resource)) {
+ if (resource.isEmpty() || !QFile::exists(resource)) {
QString approot = getApplicationRoot();
Q_FOREACH (const QString &alias, aliases) {
resource = approot + "/share/krita/" + alias + '/' + fileName;
diff --git a/libs/widgetutils/kis_icon_utils.cpp b/libs/widgetutils/kis_icon_utils.cpp
index 7022d118b9ed9b876115c6b1b35f98a14b727566..3fdba220d7d7e2a313240ddc63f134de1ffdc8ae 100644
--- a/libs/widgetutils/kis_icon_utils.cpp
+++ b/libs/widgetutils/kis_icon_utils.cpp
@@ -39,9 +39,9 @@ QIcon loadIcon(const QString &name)
{
// try load themed icon
- QColor background = qApp->palette().background().color();
- bool useDarkIcons = background.value() > 100;
- const char * const prefix = useDarkIcons ? "dark_" : "light_";
+
+
+ const char * const prefix = useDarkIcons() ? "dark_" : "light_";
QString realName = QLatin1String(prefix) + name;
@@ -110,6 +110,11 @@ QIcon loadIcon(const QString &name)
return icon;
}
+bool useDarkIcons() {
+ QColor background = qApp->palette().background().color();
+ return background.value() > 100;
+}
+
bool adjustIcon(QIcon *icon)
{
bool result = false;
diff --git a/libs/widgetutils/kis_icon_utils.h b/libs/widgetutils/kis_icon_utils.h
index 1fa7b05dc4f877c7803ee37261fe655e97463659..a7d397917159ecbbe978f0c8b20f15b9883b26a5 100644
--- a/libs/widgetutils/kis_icon_utils.h
+++ b/libs/widgetutils/kis_icon_utils.h
@@ -57,6 +57,12 @@ namespace KisIconUtils
*/
KRITAWIDGETUTILS_EXPORT QIcon loadIcon(const QString &name);
+ /**
+ * Should we use a dark or light themeed icon? Useful for images that are loaded
+ * dynamically like document templates instead of being in static resource files
+ */
+ KRITAWIDGETUTILS_EXPORT bool useDarkIcons();
+
/**
* This function updates an icon of \p object depending on its
* type. See updateIcon() overrides to see the supported types
diff --git a/packaging/language_tarball/create-l10n-symlink b/packaging/language_tarball/create-l10n-symlink
deleted file mode 100755
index a0b74167a7f8ffdfe34b2bc4b3fc9626fdbaf099..0000000000000000000000000000000000000000
--- a/packaging/language_tarball/create-l10n-symlink
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-if [ -z $1 ]; then
- echo "Usage: $0 NEW_I18N_FILENAME"
- exit 1
-fi
-
-
-CURRENT_FILE=~/web/build/krita-3.0-l10n-win-current.tar.gz
-NEW_FILE=~/web/build/$1
-
-if [ ! -f $NEW_FILE ]; then
- echo "File not exists: $NEW_FILE"
- exit 2
-fi
-
-if [ -e $CURRENT_FILE ]; then
- rm $CURRENT_FILE
-fi
-
-ln -s $NEW_FILE $CURRENT_FILE
-
diff --git a/packaging/language_tarball/l10n-gen b/packaging/language_tarball/l10n-gen
deleted file mode 100755
index 71e98b8cd7892564fdb4f122c6155678d7e3bcc5..0000000000000000000000000000000000000000
--- a/packaging/language_tarball/l10n-gen
+++ /dev/null
@@ -1,173 +0,0 @@
-#!/usr/bin/env python3
-
-import sys
-import os
-import optparse
-import subprocess
-import re
-import requests
-import fnmatch
-import shutil
-import tarfile
-import datetime
-import subprocess
-from tempfile import TemporaryDirectory
-
-class OptionParser(optparse.OptionParser):
- def __init__(self):
- super().__init__(self.usage)
-
- self.add_option('--ppa-testing', action="store_true", dest='ppa_testing')
- self.add_option('--ppa-2.9', action="store_true", dest='ppa_2_9')
- self.add_option('--win-2.9', action="store_true", dest='win_2_9')
- self.add_option('--win-3.0', action="store_true", dest='win_3_0')
-
- def parse(self):
- (self.options, self.args) = self.parse_args()
-
- usage = ''
-
-
-def get(filename, target, branch, base = 'svn://anonsvn.kde.org/home/kde'):
- print('GET: ' + os.path.join(target, filename), end='')
- url = os.path.join(base, branch, filename)
-
-
- with TemporaryDirectory() as temp_dir:
- error_code = subprocess.call(['svn', 'export', url, temp_dir],
- stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
-
- if (not error_code):
- target_path = os.path.join(target, os.path.dirname(filename))
- target_filename = os.path.join(target, filename)
- os.makedirs(target_path, exist_ok=True)
- shutil.move(os.path.join(temp_dir, os.path.basename(filename)), target_filename)
- print(' [OK]')
- else:
- print(' [NA]')
- #import pdb; pdb.set_trace()
- return False
-
- return True
-
-def get_translations(target, branch = 'branches/stable/l10n-kde4', build = False):
- shutil.rmtree(target)
-
- if get('subdirs', target, branch):
- with open(os.path.join(target, 'subdirs'), 'r') as subdirs_file:
- subdirs = subdirs_file.read()
-
- if target.endswith('win'):
- all_languages = 'https://quickgit.kde.org/?o=plain&a=blob&p=kdelibs.git&f=kdecore/localization/all_languages.desktop'
- print('GET: ' + all_languages, end='')
- req = requests.get(all_languages)
- if (req.status_code == 200):
- os.makedirs(os.path.join(target, 'locale'), exist_ok=True)
- with open(os.path.join(target, 'locale', 'all_languages'), 'wb') as file_all_languages:
- file_all_languages.write(req.content)
- print(' [OK]')
- else:
- print(' [NA]')
- return False
-
- languages = []
- if build and target.endswith('win'):
- os.makedirs(os.path.join(target, 'locale'), exist_ok=True)
-
- for lang in subdirs.split('\n'):
- if lang in ['', 'x-test']:
- continue
-
- if not get(lang + '/messages/calligra/krita.po', target, branch):
- continue
-
- if build:
- if not msgfmt(os.path.join(target, lang, 'messages/calligra/krita.po'), target, lang):
- return False
-
- ## these files are prepared by scripty
- #
- #po_files = [ 'calligra/desktop_calligra_krita.po',
- # 'calligra/krita.appdata.po',
- #]
-
- po_files = []
-
- if target.endswith('win'):
- ## these files are now installed by the 'ext_*' scripts
- # po_files.append('frameworks/desktop_frameworks_kconfig.po')
- # po_files.append('frameworks/kconfig5_qt.po')
- # po_files.append('frameworks/kwidgetsaddons5_qt.po')
- # po_files.append('frameworks/kcompletion5_qt.po')
- # po_files.append('frameworks/kcoreaddons5_qt.po')
- # po_files.append('frameworks/kitemviews5_qt.po')
- # po_files.append('frameworks/kwindowsystem5_qt.po')
- # po_files.append('frameworks/kwidgetsaddons5_qt.po')
-
- if get(os.path.join(lang, 'messages', 'entry.desktop'), target, branch) and build:
- os.rename(os.path.join(target, lang, 'messages', 'entry.desktop'), os.path.join(target, 'locale', lang, 'entry.desktop'))
-
- for po_file in po_files:
- if get(os.path.join(lang, 'messages', po_file), target, branch) and build:
- if not msgfmt(os.path.join(target, lang, 'messages', po_file), target, lang):
- return False
-
- if build:
- shutil.rmtree(os.path.join(target, lang))
-
- languages.append(lang)
-
- if target.endswith('win'):
- os.remove(os.path.join(target, 'subdirs'))
- if build:
- now = datetime.datetime.now()
- packagename = '{0}-{1}_{2}_{3}.tar.gz'.format(target, now.year, now.month, now.day)
- with tarfile.open(packagename, "w:gz") as tar:
- tar.add(os.path.join(target, 'locale'), arcname='locale')
- else:
- with open(os.path.join(target, 'subdirs'), 'w') as subdirs_file:
- subdirs_file.write('\n'.join(languages))
-
- else:
- print('\nCouldn\'t fetch subdirs. Aborting')
- return False
-
- return True
-
-def msgfmt(po_filename, target, lang):
- mo_filename = os.path.splitext(os.path.basename(po_filename))[0] + '.mo'
- mo_dirname = os.path.join(target, 'locale', lang, 'LC_MESSAGES')
- print('BLD: ' + os.path.join(mo_dirname, mo_filename), end = '')
- os.makedirs(mo_dirname, exist_ok=True)
- ret = subprocess.call(['msgfmt','-o', os.path.join(mo_dirname, mo_filename), po_filename])
- if (ret == 0):
- os.remove(po_filename)
- print(' [OK]')
- else:
- print(' [FAILED]')
- return False
- return True
-
-if __name__ == '__main__':
- parser = OptionParser()
- parser.parse()
-
- if len(sys.argv) == 1:
- parser.print_help()
- sys.exit(0)
-
-
- if parser.options.ppa_testing:
- get_translations('krita-testing-l10n')
-
- elif parser.options.ppa_2_9:
- get_translations('krita-2.9-l10n')
-
- elif parser.options.win_2_9:
- get_translations('krita-2.9-l10n-win', build=True)
-
- elif parser.options.win_3_0:
- get_translations('krita-3.0-l10n-win', branch = 'trunk/l10n-kf5', build = True)
-
- else:
- parser.print_help()
diff --git a/packaging/linux/appimage/build-krita.sh b/packaging/linux/appimage/build-krita.sh
index fbde58da0ed0353b60aecbadff2bd3b7510b3802..00a79f3913f23da59d718aee9346d812f4746c93 100644
--- a/packaging/linux/appimage/build-krita.sh
+++ b/packaging/linux/appimage/build-krita.sh
@@ -78,7 +78,6 @@ cmake3 ../krita \
-DCMAKE_INSTALL_PREFIX:PATH=/krita.appdir/usr \
-DDEFINE_NO_DEPRECATED=1 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
- -DPACKAGERS_BUILD=1 \
-DBUILD_TESTING=FALSE \
-DKDE4_BUILD_TESTS=FALSE \
-DHAVE_MEMORY_LEAK_TRACKER=FALSE
diff --git a/packaging/linux/appimage/build-release.sh b/packaging/linux/appimage/build-release.sh
index c927e4411cca983ae5bf33991301845c5c7f019f..1bf69d31b6b05492cdaa9bf48eb14d9da0d2ad44 100644
--- a/packaging/linux/appimage/build-release.sh
+++ b/packaging/linux/appimage/build-release.sh
@@ -69,7 +69,6 @@ cmake3 ../$RELEASE \
-DCMAKE_INSTALL_PREFIX:PATH=/krita.appdir/usr \
-DDEFINE_NO_DEPRECATED=1 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
- -DPACKAGERS_BUILD=1 \
-DBUILD_TESTING=FALSE \
-DKDE4_BUILD_TESTS=FALSE \
-DHAVE_MEMORY_LEAK_TRACKER=FALSE
diff --git a/packaging/linux/snap/setup/gui/krita.desktop b/packaging/linux/snap/setup/gui/krita.desktop
index ccdc21b9b73e0de02036d5d0f035fdf0e255f7f6..1ca80debea09e25d2b4214281908bd56afec3dce 100755
--- a/packaging/linux/snap/setup/gui/krita.desktop
+++ b/packaging/linux/snap/setup/gui/krita.desktop
@@ -96,6 +96,7 @@ GenericName[tr]=Sayısal Boyama
GenericName[ug]=سىفىرلىق رەسىم سىزغۇ
GenericName[uk]=Цифрове малювання
GenericName[x-test]=xxDigital Paintingxx
+GenericName[zh_CN]=数字绘画
MimeType=application/x-krita;image/openraster;application/x-krita-paintoppreset;
Comment=Pixel-based image manipulation program for the Calligra Suite
Comment[ca]=Programa de manipulació d'imatges basades en píxels per a la Suite Calligra
@@ -113,6 +114,7 @@ Comment[sk]=Program na manipuláciu s pixelmi pre Calligra Suite
Comment[sv]=Bildpunktsbaserat bildbehandlingsprogram för Calligra-sviten
Comment[uk]=Програма для роботи із растровими зображеннями для комплексу програм Calligra
Comment[x-test]=xxPixel-based image manipulation program for the Calligra Suitexx
+Comment[zh_CN]=Calligra 套件的位图图像处理程序
Type=Application
Icon=${SNAP}/meta/gui/calligrakrita.png
Categories=Qt;KDE;Graphics;
diff --git a/packaging/osx/notes.txt b/packaging/osx/notes.txt
index 94e812b815becee0a1c557c44c7e25fb52686822..a2875ce71307d908588edb7219849a346c7f035a 100644
--- a/packaging/osx/notes.txt
+++ b/packaging/osx/notes.txt
@@ -29,7 +29,7 @@ cmake ../krita/3rdparty/ -DCMAKE_INSTALL_PREFIX=$HOME/dev/i/ -DEXTERNALS_DOWNLOA
cmake line for qt creator
--DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DDEFINE_NO_DEPRECATED=1 -DPACKAGERS_BUILD=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$HOME/dev/i -DCMAKE_INCLUDE_PATH=$HOME/dev/i/include -DQT_QMAKE_EXECUTABLE=$HOME/dev/i/bin/qmake -DCMAKE_PREFIX_PATH=$HOME/dev/i
+-DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DDEFINE_NO_DEPRECATED=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$HOME/dev/i -DCMAKE_INCLUDE_PATH=$HOME/dev/i/include -DQT_QMAKE_EXECUTABLE=$HOME/dev/i/bin/qmake -DCMAKE_PREFIX_PATH=$HOME/dev/i
rm -rf ~/krita.app/
rm -rf ~/krita.dmg
diff --git a/packaging/osx/run-cmake-krita.sh b/packaging/osx/run-cmake-krita.sh
index fcf22f4c0f8c78e9fa98cb9f31ad5cbc25252ea8..588d4eeeda3ff429616d24354be5acd1939dc63d 100755
--- a/packaging/osx/run-cmake-krita.sh
+++ b/packaging/osx/run-cmake-krita.sh
@@ -4,5 +4,4 @@ cmake ../krita \
-DCMAKE_INSTALL_PREFIX=/Users/boud/dev/i \
-DDEFINE_NO_DEPRECATED=1 -DBUILD_TESTING=OFF \
-DKDE4_BUILD_TESTS=OFF \
- -DPACKAGERS_BUILD=ON \
-DBUNDLE_INSTALL_DIR=$HOME/dev/i/bin
diff --git a/packaging/windows/build.bat b/packaging/windows/build.bat
index cc2a70de8ea47526957a576a4c812207774fc1c4..68fc4649e4602fc09eec7749d13ab96d501e6af1 100644
--- a/packaging/windows/build.bat
+++ b/packaging/windows/build.bat
@@ -28,7 +28,7 @@ cmake --build . --config RelWithDebInfo --target ext_kwindowsystem
REM cmake --build . --config RelWithDebInfo --target ext_poppler
cd c:\dev\build
-cmake ..\krita -G"Visual Studio 14 Win64" -DBoost_DEBUG=OFF -DBOOST_INCLUDEDIR=c:\dev\i\include -DBOOST_DEBUG=ON -DBOOST_ROOT=c:\dev\i -DBOOST_LIBRARYDIR=c:\dev\i\lib -DCMAKE_INSTALL_PREFIX=c:\dev\i -DCMAKE_PREFIX_PATH=c:\dev\i -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DHAVE_MEMORY_LEAK_TRACKER=OFF -DPACKAGERS_BUILD=ON -Wno-dev -DDEFINE_NO_DEPRECATED=1
+cmake ..\krita -G"Visual Studio 14 Win64" -DBoost_DEBUG=OFF -DBOOST_INCLUDEDIR=c:\dev\i\include -DBOOST_DEBUG=ON -DBOOST_ROOT=c:\dev\i -DBOOST_LIBRARYDIR=c:\dev\i\lib -DCMAKE_INSTALL_PREFIX=c:\dev\i -DCMAKE_PREFIX_PATH=c:\dev\i -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DHAVE_MEMORY_LEAK_TRACKER=OFF -Wno-dev -DDEFINE_NO_DEPRECATED=1
copy c:\dev\i\lib\*.dll c:\dev\i\bin
copy "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\*.dll" c:\dev\i\bin
diff --git a/packaging/windows/build_krita.bat b/packaging/windows/build_krita.bat
new file mode 100644
index 0000000000000000000000000000000000000000..de5268123057df843e7b17daed670fd37ba83880
--- /dev/null
+++ b/packaging/windows/build_krita.bat
@@ -0,0 +1,20 @@
+set DLLTOOL_EXE=c:\TDM-GCC-64\x86_64-w64-mingw32\bin\dlltool.exe
+set MINGW_GCC_BIN=c:\TDM-GCC-64\bin\
+set BUILDROOT=c:\dev
+set BUILDDIR_INSTALL=%BUILDROOT%\i
+set PATH=c:\dev\i\bin;c:\dev\i\lib;c:\python35;%MINGW_GCC_BIN%;%PATH%
+cd c:\dev\build2
+
+set /P pkg_root=Insert krita source location:
+
+if [%pkg_root%] == [] (
+echo You entered an empty name!
+pause
+exit /B
+)
+
+cmake ..\%pkg_root% -G "MinGW Makefiles" -DBoost_DEBUG=OFF -DBOOST_INCLUDEDIR=c:\dev\i\include -DBOOST_DEBUG=ON -DBOOST_ROOT=c:\dev\i -DBOOST_LIBRARYDIR=c:\dev\i\lib -DCMAKE_INSTALL_PREFIX=c:\dev\i -DCMAKE_PREFIX_PATH=c:\dev\i -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DHAVE_MEMORY_LEAK_TRACKER=OFF -Wno-dev -DDEFINE_NO_DEPRECATED=1 -DFOUNDATION_BUILD=1
+
+mingw32-make -j4 install
+
+cd ..
diff --git a/packaging/windows/mxe.txt b/packaging/windows/mxe.txt
index 352dd4fb14282a986ae410d00e6d0724278e197e..ce1e19e48367b20078a9738ed2a53a588b9e652c 100644
--- a/packaging/windows/mxe.txt
+++ b/packaging/windows/mxe.txt
@@ -35,7 +35,7 @@ x86_64-w64-mingw32.shared-cmake --build . --target ext_poppler
# build krita
cd ../build
-x86_64-w64-mingw32.shared-cmake ../krita -DDEFINE_NO_DEPRECATED=1 -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DPACKAGERS_BUILD=ON
+x86_64-w64-mingw32.shared-cmake ../krita -DDEFINE_NO_DEPRECATED=1 -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF
make -j4 install
# to test, configure wine
diff --git a/packaging/windows/package_2.cmd b/packaging/windows/package_2.cmd
index a1536b5501a5cf345b9205e2415400d78e122985..5cbf0da2f4572b568fdf154b870b2eeb91ea61c0 100644
--- a/packaging/windows/package_2.cmd
+++ b/packaging/windows/package_2.cmd
@@ -243,7 +243,7 @@ xcopy /Y /S /I %BUILDDIR_INSTALL%\share\locale %pkg_root%\bin\locale
copy %BUILDDIR_SRC%\packaging\windows\krita.lnk %pkg_root%
:: windeployqt
-%BUILDDIR_INSTALL%\bin\windeployqt.exe --release -concurrent -network -printsupport -svg -xml %pkg_root%\bin\krita.exe
+%BUILDDIR_INSTALL%\bin\windeployqt.exe --release -concurrent -network -printsupport -svg -xml -multimedia %pkg_root%\bin\krita.exe
:: For chopping relative path
:: 512 should be enough
diff --git a/plugins/color/lcms2engine/colorspaces/cmyk_f32/CmykF32ColorSpace.h b/plugins/color/lcms2engine/colorspaces/cmyk_f32/CmykF32ColorSpace.h
index 8f36cf61f43dc5ad717c3b02ce7c714c6e4d0a50..d332c3997ee9129926f8caa83c9671ab5c3b47a4 100644
--- a/plugins/color/lcms2engine/colorspaces/cmyk_f32/CmykF32ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/cmyk_f32/CmykF32ColorSpace.h
@@ -88,7 +88,7 @@ public:
virtual QString name() const
{
- return i18n("CMYK (32 bits floating/channel)");
+ return QString("%1 (%2)").arg(CMYKAColorModelID.name()).arg(Float32BitsColorDepthID.name());
}
virtual KoID colorModelId() const
diff --git a/plugins/color/lcms2engine/colorspaces/cmyk_u16/CmykU16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/cmyk_u16/CmykU16ColorSpace.h
index 3af4c1d5249eb621baf1e3275ff52dff8abb7a93..215fd6b86fd609b3216833d94e12809e644f951c 100644
--- a/plugins/color/lcms2engine/colorspaces/cmyk_u16/CmykU16ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/cmyk_u16/CmykU16ColorSpace.h
@@ -84,7 +84,7 @@ public:
virtual QString name() const
{
- return i18n("CMYK (16-bit integer/channel)");
+ return QString("%1 (%2)").arg(CMYKAColorModelID.name()).arg(Integer16BitsColorDepthID.name());
}
virtual KoID colorModelId() const
diff --git a/plugins/color/lcms2engine/colorspaces/cmyk_u8/CmykU8ColorSpace.h b/plugins/color/lcms2engine/colorspaces/cmyk_u8/CmykU8ColorSpace.h
index d70e09528be5d40fc5ddbad2d501310867f8e24c..0e39156df365f217111a40ee8f5b40ea2e86b30b 100644
--- a/plugins/color/lcms2engine/colorspaces/cmyk_u8/CmykU8ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/cmyk_u8/CmykU8ColorSpace.h
@@ -82,7 +82,7 @@ public:
virtual QString name() const
{
- return i18n("CMYK (8-bit integer/channel)");
+ return QString("%1 (%2)").arg(CMYKAColorModelID.name()).arg(Integer8BitsColorDepthID.name());
}
virtual KoID colorModelId() const
diff --git a/plugins/color/lcms2engine/colorspaces/gray_f16/GrayF16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/gray_f16/GrayF16ColorSpace.h
index e99cf7afc25ba9aa2b1fa2edba6b6d5cd7397c2c..65bd44af4f38354822a511b6df4cde1532b3437f 100644
--- a/plugins/color/lcms2engine/colorspaces/gray_f16/GrayF16ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/gray_f16/GrayF16ColorSpace.h
@@ -83,7 +83,7 @@ public:
virtual QString name() const
{
- return i18n("Grayscale/Alpha (16-bit float/channel)");
+ return QString("%1 (%2)").arg(GrayAColorModelID.name()).arg(Float16BitsColorDepthID.name());
}
virtual KoID colorModelId() const
diff --git a/plugins/color/lcms2engine/colorspaces/gray_f32/GrayF32ColorSpace.h b/plugins/color/lcms2engine/colorspaces/gray_f32/GrayF32ColorSpace.h
index f5c07f2f8d114b02f0a15fbdb967370bcd4e7f04..0fcfcc82d3f3cc40d2bde8f16f8b5895ff0a3b20 100644
--- a/plugins/color/lcms2engine/colorspaces/gray_f32/GrayF32ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/gray_f32/GrayF32ColorSpace.h
@@ -83,7 +83,7 @@ public:
virtual QString name() const
{
- return i18n("Grayscale/Alpha (32-bit float/channel)");
+ return QString("%1 (%2)").arg(GrayAColorModelID.name()).arg(Float32BitsColorDepthID.name());
}
virtual KoID colorModelId() const
diff --git a/plugins/color/lcms2engine/colorspaces/gray_u16/GrayU16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/gray_u16/GrayU16ColorSpace.h
index cbe71f5837b75141819a2802726eac283a01bf4d..ba84fd0d9a21bddfdd4a1848efdca1b1909a9551 100644
--- a/plugins/color/lcms2engine/colorspaces/gray_u16/GrayU16ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/gray_u16/GrayU16ColorSpace.h
@@ -77,7 +77,7 @@ public:
virtual QString name() const
{
- return i18n("Grayscale (16-bit integer/channel)");
+ return QString("%1 (%2)").arg(GrayAColorModelID.name()).arg(Integer16BitsColorDepthID.name());
}
virtual KoID colorModelId() const
diff --git a/plugins/color/lcms2engine/colorspaces/gray_u8/GrayU8ColorSpace.h b/plugins/color/lcms2engine/colorspaces/gray_u8/GrayU8ColorSpace.h
index 40b245b10b8b500cfed529b410e8d2e8a51edad9..aa2416ee03d22e3319b4349767c65729a87f50cd 100644
--- a/plugins/color/lcms2engine/colorspaces/gray_u8/GrayU8ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/gray_u8/GrayU8ColorSpace.h
@@ -79,7 +79,7 @@ public:
virtual QString name() const
{
- return i18n("Grayscale (8-bit integer/channel)");
+ return QString("%1 (%2)").arg(GrayAColorModelID.name()).arg(Integer8BitsColorDepthID.name());
}
virtual KoID colorModelId() const
diff --git a/plugins/color/lcms2engine/colorspaces/lab_f32/LabF32ColorSpace.h b/plugins/color/lcms2engine/colorspaces/lab_f32/LabF32ColorSpace.h
index 9315c370ceaf54fce190d0152fd60121bb742126..1b427e6b9cef0c3af13e2da1be24ceecce29de98 100644
--- a/plugins/color/lcms2engine/colorspaces/lab_f32/LabF32ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/lab_f32/LabF32ColorSpace.h
@@ -85,7 +85,7 @@ public:
virtual QString name() const
{
- return i18n("L*a*b* (32-bit float/channel)");
+ return QString("%1 (%2)").arg(LABAColorModelID.name()).arg(Float32BitsColorDepthID.name());
}
virtual KoID colorModelId() const
diff --git a/plugins/color/lcms2engine/colorspaces/lab_u16/LabColorSpace.h b/plugins/color/lcms2engine/colorspaces/lab_u16/LabColorSpace.h
index 3e4b297032ac684936b39c62e8afe56b994829e1..1005fbd61e4487da7bd4c6c9b8ec17893a1f452b 100644
--- a/plugins/color/lcms2engine/colorspaces/lab_u16/LabColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/lab_u16/LabColorSpace.h
@@ -88,7 +88,7 @@ public:
virtual QString name() const
{
- return i18n("L*a*b* (16-bit integer/channel)");
+ return QString("%1 (%2)").arg(LABAColorModelID.name()).arg(Integer16BitsColorDepthID.name());
}
virtual KoID colorModelId() const
diff --git a/plugins/color/lcms2engine/colorspaces/lab_u8/LabU8ColorSpace.h b/plugins/color/lcms2engine/colorspaces/lab_u8/LabU8ColorSpace.h
index 7545823ee35e5df327f725de127821a570008a97..cbbd131f48bff8e63949c4fc825b7ee79e908a02 100644
--- a/plugins/color/lcms2engine/colorspaces/lab_u8/LabU8ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/lab_u8/LabU8ColorSpace.h
@@ -80,7 +80,7 @@ public:
virtual QString name() const
{
- return i18n("L*a*b* (8-bit integer/channel)");
+ return QString("%1 (%2)").arg(LABAColorModelID.name()).arg(Integer8BitsColorDepthID.name());
}
virtual KoID colorModelId() const
diff --git a/plugins/color/lcms2engine/colorspaces/rgb_f16/RgbF16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/rgb_f16/RgbF16ColorSpace.h
index c202988a583ef76368e74e5133201c08c0f693b2..a75cd9a4e8a2c0e74d91911da6f431d066f8a37c 100644
--- a/plugins/color/lcms2engine/colorspaces/rgb_f16/RgbF16ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/rgb_f16/RgbF16ColorSpace.h
@@ -78,7 +78,7 @@ public:
virtual QString name() const
{
- return i18n("RGBA (16-bit floating/channel)");
+ return QString("%1 (%2)").arg(RGBAColorModelID.name()).arg(Float16BitsColorDepthID.name());
}
virtual bool userVisible() const
diff --git a/plugins/color/lcms2engine/colorspaces/rgb_f32/RgbF32ColorSpace.h b/plugins/color/lcms2engine/colorspaces/rgb_f32/RgbF32ColorSpace.h
index 78d93d6c009c0d11461819bc55861bbb77e133ef..e5f2dbe2f770e86ad40bac87356a79760ad7019a 100644
--- a/plugins/color/lcms2engine/colorspaces/rgb_f32/RgbF32ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/rgb_f32/RgbF32ColorSpace.h
@@ -78,7 +78,7 @@ public:
virtual QString name() const
{
- return i18n("RGBA (32-bit floating/channel)");
+ return QString("%1 (%2)").arg(RGBAColorModelID.name()).arg(Float32BitsColorDepthID.name());
}
virtual bool userVisible() const
diff --git a/plugins/color/lcms2engine/colorspaces/rgb_u16/RgbU16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/rgb_u16/RgbU16ColorSpace.h
index 7b77312c717c554a5a9936297c121b4d9915f742..058518d306c35b7e4ff3cabffb088f083561c23c 100644
--- a/plugins/color/lcms2engine/colorspaces/rgb_u16/RgbU16ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/rgb_u16/RgbU16ColorSpace.h
@@ -71,7 +71,7 @@ public:
}
virtual QString name() const
{
- return i18n("RGB (16-bit integer/channel)");
+ return QString("%1 (%2)").arg(RGBAColorModelID.name()).arg(Integer16BitsColorDepthID.name());
}
virtual bool userVisible() const
diff --git a/plugins/color/lcms2engine/colorspaces/rgb_u8/RgbU8ColorSpace.h b/plugins/color/lcms2engine/colorspaces/rgb_u8/RgbU8ColorSpace.h
index 767fd713d0677dbe2c43ed71035c7ac832872ff7..208cf70bd4fe542c5483900c0d62b02d1cb0a9e8 100644
--- a/plugins/color/lcms2engine/colorspaces/rgb_u8/RgbU8ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/rgb_u8/RgbU8ColorSpace.h
@@ -86,7 +86,7 @@ public:
virtual QString name() const
{
- return i18n("RGB (8-bit integer/channel)");
+ return QString("%1 (%2)").arg(RGBAColorModelID.name()).arg(Integer8BitsColorDepthID.name());
}
virtual KoID colorModelId() const
diff --git a/plugins/color/lcms2engine/colorspaces/xyz_f16/XyzF16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/xyz_f16/XyzF16ColorSpace.h
index 1d1fc1741e6c90e7345e5b85660b1b263c6b45bc..f52a319184962db55e4eef89a801b20b9c805ae4 100644
--- a/plugins/color/lcms2engine/colorspaces/xyz_f16/XyzF16ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/xyz_f16/XyzF16ColorSpace.h
@@ -43,7 +43,7 @@ public:
virtual KoID colorDepthId() const
{
- return Float32BitsColorDepthID;
+ return Float16BitsColorDepthID;
}
virtual KoColorSpace *clone() const;
@@ -83,7 +83,7 @@ public:
virtual QString name() const
{
- return i18n("XYZ (32-bit float/channel)");
+ return QString("%1 (%2)").arg(XYZAColorModelID.name()).arg(Float16BitsColorDepthID.name());
}
virtual bool userVisible() const
diff --git a/plugins/color/lcms2engine/colorspaces/xyz_f32/XyzF32ColorSpace.h b/plugins/color/lcms2engine/colorspaces/xyz_f32/XyzF32ColorSpace.h
index 72c96a889bed32457484a10b4cc5bc805c029760..1119f9a5929a91efa43f35ad6d8f9fc49480ef4d 100644
--- a/plugins/color/lcms2engine/colorspaces/xyz_f32/XyzF32ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/xyz_f32/XyzF32ColorSpace.h
@@ -83,7 +83,7 @@ public:
virtual QString name() const
{
- return i18n("XYZ (32-bit float/channel)");
+ return QString("%1 (%2)").arg(XYZAColorModelID.name()).arg(Float32BitsColorDepthID.name());
}
virtual bool userVisible() const
diff --git a/plugins/color/lcms2engine/colorspaces/xyz_u16/XyzU16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/xyz_u16/XyzU16ColorSpace.h
index 7d53b906a8cc2bcf5be2e4e5f3af622ac84ebf98..6bee624555c78c32e880b78c97f368f443e9edc1 100644
--- a/plugins/color/lcms2engine/colorspaces/xyz_u16/XyzU16ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/xyz_u16/XyzU16ColorSpace.h
@@ -73,7 +73,7 @@ public:
}
virtual QString name() const
{
- return i18n("XYZ (16-bit integer/channel)");
+ return QString("%1 (%2)").arg(XYZAColorModelID.name()).arg(Integer16BitsColorDepthID.name());
}
virtual bool userVisible() const
{
diff --git a/plugins/color/lcms2engine/colorspaces/xyz_u8/XyzU8ColorSpace.h b/plugins/color/lcms2engine/colorspaces/xyz_u8/XyzU8ColorSpace.h
index a44046124cbeaa3c0bde846a8f2debc8ab871ecd..51883900c0c183bd2c9d184a5bfed884a91dcdf1 100644
--- a/plugins/color/lcms2engine/colorspaces/xyz_u8/XyzU8ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/xyz_u8/XyzU8ColorSpace.h
@@ -78,7 +78,7 @@ public:
virtual QString name() const
{
- return i18n("XYZ (8-bit integer/channel)");
+ return QString("%1 (%2)").arg(XYZAColorModelID.name()).arg(Integer8BitsColorDepthID.name());
}
virtual bool userVisible() const
diff --git a/plugins/color/lcms2engine/colorspaces/ycbcr_f32/YCbCrF32ColorSpace.h b/plugins/color/lcms2engine/colorspaces/ycbcr_f32/YCbCrF32ColorSpace.h
index ffb5dcf9103bfb00a23d8180d0f64c13fce28072..e8ca2f8ba37c431e5814ee19ef215355a02d9049 100644
--- a/plugins/color/lcms2engine/colorspaces/ycbcr_f32/YCbCrF32ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/ycbcr_f32/YCbCrF32ColorSpace.h
@@ -84,7 +84,7 @@ public:
virtual QString name() const
{
- return i18n("YCBCR (32-bit float/channel)");
+ return QString("%1 (%2)").arg(YCbCrAColorModelID.name()).arg(Float32BitsColorDepthID.name());
}
virtual bool userVisible() const
diff --git a/plugins/color/lcms2engine/colorspaces/ycbcr_u16/YCbCrU16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/ycbcr_u16/YCbCrU16ColorSpace.h
index a6e941e96e0ff887e48eed4bb0d97a2d18539a90..349a8b21676ee60b4551e737896e142c27cbd657 100644
--- a/plugins/color/lcms2engine/colorspaces/ycbcr_u16/YCbCrU16ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/ycbcr_u16/YCbCrU16ColorSpace.h
@@ -78,7 +78,7 @@ public:
virtual QString name() const
{
- return i18n("YCBCR (16-bit integer/channel)");
+ return QString("%1 (%2)").arg(YCbCrAColorModelID.name()).arg(Integer16BitsColorDepthID.name());
}
virtual bool userVisible() const
diff --git a/plugins/color/lcms2engine/colorspaces/ycbcr_u8/YCbCrU8ColorSpace.h b/plugins/color/lcms2engine/colorspaces/ycbcr_u8/YCbCrU8ColorSpace.h
index db0648ed0fd95489cbbdacfa6467cd7a46ccde51..0610c2ccc4caf1cfa2727dc51e35c12405acece9 100644
--- a/plugins/color/lcms2engine/colorspaces/ycbcr_u8/YCbCrU8ColorSpace.h
+++ b/plugins/color/lcms2engine/colorspaces/ycbcr_u8/YCbCrU8ColorSpace.h
@@ -78,7 +78,7 @@ public:
virtual QString name() const
{
- return i18n("YCBCR (8-bit integer/channel)");
+ return QString("%1 (%2)").arg(YCbCrAColorModelID.name()).arg(Integer8BitsColorDepthID.name());
}
virtual bool userVisible() const
diff --git a/plugins/dockers/animation/kis_time_based_item_model.cpp b/plugins/dockers/animation/kis_time_based_item_model.cpp
index 99ff688ca15e8b4e7fcebf56d08e8cfac0f955b5..74f133b854a9eb9a692b5ab9bc41151394d8b374 100644
--- a/plugins/dockers/animation/kis_time_based_item_model.cpp
+++ b/plugins/dockers/animation/kis_time_based_item_model.cpp
@@ -54,7 +54,6 @@ struct KisTimeBasedItemModel::Private
QScopedPointer > scrubbingCompressor;
-
int baseNumFrames() const {
if (image.isNull()) return 0;
@@ -86,7 +85,7 @@ KisTimeBasedItemModel::KisTimeBasedItemModel(QObject *parent)
std::bind(&KisTimeBasedItemModel::slotInternalScrubPreviewRequested, this, _1));
m_d->scrubbingCompressor.reset(
- new KisSignalCompressorWithParam(cfg.scribbingUpdatesDelay(), callback, KisSignalCompressor::FIRST_ACTIVE));
+ new KisSignalCompressorWithParam(cfg.scrubbingUpdatesDelay(), callback, KisSignalCompressor::FIRST_ACTIVE));
}
KisTimeBasedItemModel::~KisTimeBasedItemModel()
diff --git a/plugins/dockers/animation/timeline_frames_item_delegate.cpp b/plugins/dockers/animation/timeline_frames_item_delegate.cpp
index b67001b1fc5f1321f0d470ab1b4882b5579eae82..0ee1384ed43b09701a9e3bc8bd2e9c7928db6f5b 100644
--- a/plugins/dockers/animation/timeline_frames_item_delegate.cpp
+++ b/plugins/dockers/animation/timeline_frames_item_delegate.cpp
@@ -108,7 +108,7 @@ void TimelineFramesItemDelegate::drawBackground(QPainter *painter, const QModelI
bool active = index.data(TimelineFramesModel::ActiveLayerRole).toBool();
bool present = index.data(TimelineFramesModel::FrameExistsRole).toBool();
bool editable = index.data(TimelineFramesModel::FrameEditableRole).toBool();
- QVariant colorLabel = index.data(TimelineFramesModel::ColorLabel);
+ QVariant colorLabel = index.data(TimelineFramesModel::FrameColorLabelIndexRole);
QColor color = colorLabel.isValid() ? labelColors.at(colorLabel.toInt()) :
TimelineColorScheme::instance()->frameColor(present, active);
diff --git a/plugins/dockers/animation/timeline_frames_model.cpp b/plugins/dockers/animation/timeline_frames_model.cpp
index dc5d4ef97ea34b9c0681d290b506b744d46b4b98..d649712a00ce7f5cf3bb8331959221bdab31156f 100644
--- a/plugins/dockers/animation/timeline_frames_model.cpp
+++ b/plugins/dockers/animation/timeline_frames_model.cpp
@@ -46,6 +46,10 @@
#include "kis_projection_leaf.h"
#include "kis_time_range.h"
+#include "kis_node_view_color_scheme.h"
+#include "krita_utils.h"
+#include
+
struct TimelineFramesModel::Private
{
Private()
@@ -134,6 +138,12 @@ struct TimelineFramesModel::Private
frame->setColorLabel(color);
}
+ int layerColorLabel(int row) const {
+ KisNodeDummy *dummy = converter->dummyFromRow(row);
+ if (!dummy) return -1;
+ return dummy->node()->colorLabelIndex();
+ }
+
QVariant layerProperties(int row) const {
KisNodeDummy *dummy = converter->dummyFromRow(row);
if (!dummy) return QVariant();
@@ -220,6 +230,7 @@ void TimelineFramesModel::setDummiesFacade(KisDummiesFacadeBase *dummiesFacade,
KisDummiesFacadeBase *oldDummiesFacade = m_d->dummiesFacade;
if (m_d->dummiesFacade) {
+ m_d->image->animationInterface()->disconnect(this);
m_d->image->disconnect(this);
m_d->dummiesFacade->disconnect(this);
}
@@ -236,6 +247,10 @@ void TimelineFramesModel::setDummiesFacade(KisDummiesFacadeBase *dummiesFacade,
SLOT(slotDummyChanged(KisNodeDummy*)));
connect(m_d->image->animationInterface(),
SIGNAL(sigFullClipRangeChanged()), SIGNAL(sigInfiniteTimelineUpdateNeeded()));
+ connect(m_d->image->animationInterface(),
+ SIGNAL(sigAudioChannelChanged()), SIGNAL(sigAudioChannelChanged()));
+ connect(m_d->image->animationInterface(),
+ SIGNAL(sigAudioVolumeChanged()), SIGNAL(sigAudioChannelChanged()));
}
if (m_d->dummiesFacade != oldDummiesFacade) {
@@ -244,6 +259,7 @@ void TimelineFramesModel::setDummiesFacade(KisDummiesFacadeBase *dummiesFacade,
if (m_d->dummiesFacade) {
emit sigInfiniteTimelineUpdateNeeded();
+ emit sigAudioChannelChanged();
}
}
@@ -315,7 +331,7 @@ QVariant TimelineFramesModel::data(const QModelIndex &index, int role) const
case SpecialKeyframeExists: {
return m_d->specialKeyframeExists(index.row(), index.column());
}
- case ColorLabel: {
+ case FrameColorLabelIndexRole: {
int label = m_d->frameColorLabel(index.row(), index.column());
return label > 0 ? label : QVariant();
}
@@ -356,7 +372,7 @@ bool TimelineFramesModel::setData(const QModelIndex &index, const QVariant &valu
}
break;
}
- case ColorLabel: {
+ case FrameColorLabelIndexRole: {
m_d->setFrameColorLabel(index.row(), index.column(), value.toInt());
}
break;
@@ -422,6 +438,18 @@ QVariant TimelineFramesModel::headerData(int section, Qt::Orientation orientatio
if (!dummy) return QVariant();
return dummy->node()->useInTimeline();
}
+ case Qt::BackgroundRole: {
+ int label = m_d->layerColorLabel(section);
+ if (label > 0) {
+ KisNodeViewColorScheme scm;
+ QColor color = scm.colorLabel(label);
+ QPalette pal = qApp->palette();
+ color = KritaUtils::blendColors(color, pal.color(QPalette::Button), 0.3);
+ return QBrush(color);
+ } else {
+ return QVariant();
+ }
+ }
}
}
@@ -644,3 +672,36 @@ bool TimelineFramesModel::copyFrame(const QModelIndex &dstIndex)
return result;
}
+
+QString TimelineFramesModel::audioChannelFileName() const
+{
+ return m_d->image ? m_d->image->animationInterface()->audioChannelFileName() : QString();
+}
+
+void TimelineFramesModel::setAudioChannelFileName(const QString &fileName)
+{
+ KIS_SAFE_ASSERT_RECOVER_RETURN(m_d->image);
+ m_d->image->animationInterface()->setAudioChannelFileName(fileName);
+}
+
+bool TimelineFramesModel::isAudioMuted() const
+{
+ return m_d->image ? m_d->image->animationInterface()->isAudioMuted() : false;
+}
+
+void TimelineFramesModel::setAudioMuted(bool value)
+{
+ KIS_SAFE_ASSERT_RECOVER_RETURN(m_d->image);
+ m_d->image->animationInterface()->setAudioMuted(value);
+}
+
+qreal TimelineFramesModel::audioVolume() const
+{
+ return m_d->image ? m_d->image->animationInterface()->audioVolume() : 0.5;
+}
+
+void TimelineFramesModel::setAudioVolume(qreal value)
+{
+ KIS_SAFE_ASSERT_RECOVER_RETURN(m_d->image);
+ m_d->image->animationInterface()->setAudioVolume(value);
+}
diff --git a/plugins/dockers/animation/timeline_frames_model.h b/plugins/dockers/animation/timeline_frames_model.h
index 67a74a5be52b7cd9f4b9b108c4989cd45a4f295b..1d8435b987ae8c0cf0f335c0adc32e8065cb184b 100644
--- a/plugins/dockers/animation/timeline_frames_model.h
+++ b/plugins/dockers/animation/timeline_frames_model.h
@@ -51,6 +51,15 @@ public:
bool createFrame(const QModelIndex &dstIndex);
bool copyFrame(const QModelIndex &dstIndex);
+ QString audioChannelFileName() const;
+ void setAudioChannelFileName(const QString &fileName);
+
+ bool isAudioMuted() const;
+ void setAudioMuted(bool value);
+
+ qreal audioVolume() const;
+ void setAudioVolume(qreal value);
+
void setLastClickedIndex(const QModelIndex &index);
int rowCount(const QModelIndex &parent = QModelIndex()) const;
@@ -75,7 +84,7 @@ public:
TimelinePropertiesRole,
OtherLayersRole,
LayerUsedInTimelineRole,
- ColorLabel
+ FrameColorLabelIndexRole
};
// metatype is added by the original implementation
@@ -87,7 +96,7 @@ public:
struct NodeManipulationInterface {
- virtual ~NodeManipulationInterface() {};
+ virtual ~NodeManipulationInterface() {}
virtual KisLayerSP addPaintLayer() const = 0;
virtual void removeNode(KisNodeSP node) const = 0;
};
@@ -112,8 +121,9 @@ public Q_SLOTS:
Q_SIGNALS:
void requestCurrentNodeChanged(KisNodeSP node);
void sigInfiniteTimelineUpdateNeeded();
+ void sigAudioChannelChanged();
void sigEnsureRowVisible(int row);
-
+
private:
struct Private;
const QScopedPointer m_d;
diff --git a/plugins/dockers/animation/timeline_frames_view.cpp b/plugins/dockers/animation/timeline_frames_view.cpp
index cf9dcbf308a8318a7331b0f95ff21ae90e0f329c..eed643710515bf7299d88707022d76471560ddb4 100644
--- a/plugins/dockers/animation/timeline_frames_view.cpp
+++ b/plugins/dockers/animation/timeline_frames_view.cpp
@@ -28,6 +28,7 @@
#include
+#include
#include
#include
#include
@@ -53,6 +54,14 @@
#include "kis_signal_compressor.h"
#include "kis_time_range.h"
#include "kis_color_label_selector_widget.h"
+#include "kis_slider_spin_box.h"
+#include
+
+#include
+#include
+#include
+
+#include "config-qtmultimedia.h"
typedef QPair QItemViewPaintPair;
typedef QList QItemViewPaintPairs;
@@ -84,11 +93,19 @@ struct TimelineFramesView::Private
QToolButton *addLayersButton;
KisAction *showHideLayerAction;
+ QToolButton *audioOptionsButton;
+
KisColorLabelSelectorWidget *colorSelector;
QWidgetAction *colorSelectorAction;
KisColorLabelSelectorWidget *multiframeColorSelector;
QWidgetAction *multiframeColorSelectorAction;
+ QMenu *audioOptionsMenu;
+ QAction *openAudioAction;
+ QAction *audioMuteAction;
+ KisSliderSpinBox *volumeSlider;
+
+
QMenu *layerEditingMenu;
QMenu *existingLayersMenu;
@@ -149,6 +166,9 @@ TimelineFramesView::TimelineFramesView(QWidget *parent)
connect(horizontalScrollBar(), SIGNAL(valueChanged(int)), SLOT(slotUpdateInfiniteFramesCount()));
connect(horizontalScrollBar(), SIGNAL(sliderReleased()), SLOT(slotUpdateInfiniteFramesCount()));
+
+ /********** New Layer Menu ***********************************************************/
+
m_d->addLayersButton = new QToolButton(this);
m_d->addLayersButton->setAutoRaise(true);
m_d->addLayersButton->setIcon(KisIconUtils::loadIcon("addlayer"));
@@ -176,6 +196,50 @@ TimelineFramesView::TimelineFramesView(QWidget *parent)
m_d->addLayersButton->setMenu(m_d->layerEditingMenu);
+ /********** Audio Channel Menu *******************************************************/
+
+ m_d->audioOptionsButton = new QToolButton(this);
+ m_d->audioOptionsButton->setAutoRaise(true);
+ m_d->audioOptionsButton->setIcon(KisIconUtils::loadIcon("audio-none"));
+ m_d->audioOptionsButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ m_d->audioOptionsButton->setPopupMode(QToolButton::InstantPopup);
+
+ m_d->audioOptionsMenu = new QMenu(this);
+
+#ifndef HAVE_QT_MULTIMEDIA
+ m_d->audioOptionsMenu->addSection(i18nc("@item:inmenu", "Audio playback is not supported in this build!"));
+#endif
+
+ m_d->openAudioAction= new QAction("XXX", this);
+ connect(m_d->openAudioAction, SIGNAL(triggered()), this, SLOT(slotSelectAudioChannelFile()));
+ m_d->audioOptionsMenu->addAction(m_d->openAudioAction);
+
+ m_d->audioMuteAction = new QAction(i18nc("@item:inmenu", "Mute"), this);
+ m_d->audioMuteAction->setCheckable(true);
+ connect(m_d->audioMuteAction, SIGNAL(triggered(bool)), SLOT(slotAudioChannelMute(bool)));
+
+ m_d->audioOptionsMenu->addAction(m_d->audioMuteAction);
+ m_d->audioOptionsMenu->addAction(i18nc("@item:inmenu", "Remove audio"), this, SLOT(slotAudioChannelRemove()));
+
+ m_d->audioOptionsMenu->addSeparator();
+
+ m_d->volumeSlider = new KisSliderSpinBox(this);
+ m_d->volumeSlider->setRange(0, 100);
+ m_d->volumeSlider->setSuffix("%");
+ m_d->volumeSlider->setPrefix(i18nc("@item:inmenu, slider", "Volume:"));
+ m_d->volumeSlider->setSingleStep(1);
+ m_d->volumeSlider->setPageStep(10);
+ m_d->volumeSlider->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed);
+ connect(m_d->volumeSlider, SIGNAL(valueChanged(int)), SLOT(slotAudioVolumeChanged(int)));
+
+ QWidgetAction *volumeAction = new QWidgetAction(m_d->audioOptionsMenu);
+ volumeAction->setDefaultWidget(m_d->volumeSlider);
+ m_d->audioOptionsMenu->addAction(volumeAction);
+
+ m_d->audioOptionsButton->setMenu(m_d->audioOptionsMenu);
+
+ /********** Frame Editing Context Menu ***********************************************/
+
m_d->frameCreationMenu = new QMenu(this);
m_d->frameCreationMenu->addAction(KisAnimationUtils::addFrameActionName, this, SLOT(slotNewFrame()));
m_d->frameCreationMenu->addAction(KisAnimationUtils::duplicateFrameActionName, this, SLOT(slotCopyFrame()));
@@ -198,6 +262,8 @@ TimelineFramesView::TimelineFramesView(QWidget *parent)
m_d->multipleFrameEditingMenu->addAction(KisAnimationUtils::removeFramesActionName, this, SLOT(slotRemoveFrame()));
m_d->multipleFrameEditingMenu->addAction(m_d->multiframeColorSelectorAction);
+ /********** Zoom Button **************************************************************/
+
m_d->zoomDragButton = new KisZoomButton(this);
m_d->zoomDragButton->setAutoRaise(true);
m_d->zoomDragButton->setIcon(KisIconUtils::loadIcon("zoom-horizontal"));
@@ -240,11 +306,13 @@ void TimelineFramesView::updateGeometries()
const int minimalSize = availableHeight - 2 * margin;
resizeToMinimalSize(m_d->addLayersButton, minimalSize);
+ resizeToMinimalSize(m_d->audioOptionsButton, minimalSize);
resizeToMinimalSize(m_d->zoomDragButton, minimalSize);
int x = 2 * margin;
int y = (availableHeight - minimalSize) / 2;
m_d->addLayersButton->move(x, 2 * y);
+ m_d->audioOptionsButton->move(x + minimalSize + 2 * margin, 2 * y);
const int availableWidth = m_d->layersHeader->width();
@@ -271,10 +339,14 @@ void TimelineFramesView::setModel(QAbstractItemModel *model)
connect(m_d->model, SIGNAL(sigInfiniteTimelineUpdateNeeded()),
this, SLOT(slotUpdateInfiniteFramesCount()));
+ connect(m_d->model, SIGNAL(sigAudioChannelChanged()),
+ this, SLOT(slotUpdateAudioActions()));
+
connect(selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
&m_d->selectionChangedCompressor, SLOT(start()));
connect(m_d->model, SIGNAL(sigEnsureRowVisible(int)), SLOT(slotEnsureRowVisible(int)));
+ slotUpdateAudioActions();
}
void TimelineFramesView::setFramesPerSecond(int fps)
@@ -291,13 +363,13 @@ void TimelineFramesView::setFramesPerSecond(int fps)
void TimelineFramesView::slotZoomButtonPressed(qreal staticPoint)
{
m_d->zoomStillPointIndex =
- qIsNaN(staticPoint) ? currentIndex().column() : staticPoint;
+ qIsNaN(staticPoint) ? currentIndex().column() : staticPoint;
const int w = m_d->horizontalRuler->defaultSectionSize();
m_d->zoomStillPointOriginalOffset =
- w * m_d->zoomStillPointIndex -
- horizontalScrollBar()->value();
+ w * m_d->zoomStillPointIndex -
+ horizontalScrollBar()->value();
}
void TimelineFramesView::slotZoomButtonChanged(qreal zoomLevel)
@@ -315,21 +387,95 @@ void TimelineFramesView::slotZoomButtonChanged(qreal zoomLevel)
void TimelineFramesView::slotColorLabelChanged(int label)
{
Q_FOREACH(QModelIndex index, selectedIndexes()) {
- m_d->model->setData(index, label, TimelineFramesModel::ColorLabel);
+ m_d->model->setData(index, label, TimelineFramesModel::FrameColorLabelIndexRole);
}
KisImageConfig config;
config.setDefaultFrameColorLabel(label);
}
+void TimelineFramesView::slotSelectAudioChannelFile()
+{
+ if (!m_d->model) return;
+
+ QString defaultDir = QDesktopServices::storageLocation(QDesktopServices::MusicLocation);
+
+ const QString currentFile = m_d->model->audioChannelFileName();
+ QDir baseDir = QFileInfo(currentFile).absoluteDir();
+ if (baseDir.exists()) {
+ defaultDir = baseDir.absolutePath();
+ }
+
+ const QString result = KisImportExportManager::askForAudioFileName(defaultDir, this);
+ const QFileInfo info(result);
+
+ if (info.exists()) {
+ m_d->model->setAudioChannelFileName(info.absoluteFilePath());
+ }
+}
+
+void TimelineFramesView::slotAudioChannelMute(bool value)
+{
+ if (!m_d->model) return;
+
+ if (value != m_d->model->isAudioMuted()) {
+ m_d->model->setAudioMuted(value);
+ }
+}
+
+void TimelineFramesView::slotAudioChannelRemove()
+{
+ if (!m_d->model) return;
+ m_d->model->setAudioChannelFileName(QString());
+}
+
+void TimelineFramesView::slotUpdateAudioActions()
+{
+ if (!m_d->model) return;
+
+ const QString currentFile = m_d->model->audioChannelFileName();
+
+ if (currentFile.isEmpty()) {
+ m_d->openAudioAction->setText(i18nc("@item:inmenu", "Open audio..."));
+ } else {
+ QFileInfo info(currentFile);
+ m_d->openAudioAction->setText(i18nc("@item:inmenu", "Change audio (%1)...", info.fileName()));
+ }
+
+ m_d->audioMuteAction->setChecked(m_d->model->isAudioMuted());
+
+ QIcon audioIcon;
+ if (currentFile.isEmpty()) {
+ audioIcon = KisIconUtils::loadIcon("audio-none");
+ } else {
+ if (m_d->model->isAudioMuted()) {
+ audioIcon = KisIconUtils::loadIcon("audio-volume-mute");
+ } else {
+ audioIcon = KisIconUtils::loadIcon("audio-volume-high");
+ }
+ }
+
+ m_d->audioOptionsButton->setIcon(audioIcon);
+
+ m_d->volumeSlider->setEnabled(!m_d->model->isAudioMuted());
+
+ KisSignalsBlocker b(m_d->volumeSlider);
+ m_d->volumeSlider->setValue(qRound(m_d->model->audioVolume() * 100.0));
+}
+
+void TimelineFramesView::slotAudioVolumeChanged(int value)
+{
+ m_d->model->setAudioVolume(qreal(value) / 100.0);
+}
+
void TimelineFramesView::slotUpdateInfiniteFramesCount()
{
if (horizontalScrollBar()->isSliderDown()) return;
const int sectionWidth = m_d->horizontalRuler->defaultSectionSize();
const int calculatedIndex =
- (horizontalScrollBar()->value() +
- m_d->horizontalRuler->width() - 1) / sectionWidth;
+ (horizontalScrollBar()->value() +
+ m_d->horizontalRuler->width() - 1) / sectionWidth;
m_d->model->setLastVisibleFrame(calculatedIndex);
}
@@ -360,27 +506,27 @@ QItemSelectionModel::SelectionFlags TimelineFramesView::selectionCommand(const Q
*/
if (event &&
- (event->type() == QEvent::MouseButtonPress ||
- event->type() == QEvent::MouseButtonRelease) &&
- index.isValid()) {
+ (event->type() == QEvent::MouseButtonPress ||
+ event->type() == QEvent::MouseButtonRelease) &&
+ index.isValid()) {
const QMouseEvent *mevent = static_cast(event);
if (mevent->button() == Qt::RightButton &&
- selectionModel()->selectedIndexes().contains(index)) {
+ selectionModel()->selectedIndexes().contains(index)) {
// Allow calling context menu for multiple layers
return QItemSelectionModel::NoUpdate;
}
if (event->type() == QEvent::MouseButtonPress &&
- (mevent->modifiers() & Qt::ControlModifier)) {
+ (mevent->modifiers() & Qt::ControlModifier)) {
return QItemSelectionModel::NoUpdate;
}
if (event->type() == QEvent::MouseButtonRelease &&
- (mevent->modifiers() & Qt::ControlModifier)) {
+ (mevent->modifiers() & Qt::ControlModifier)) {
return QItemSelectionModel::Toggle;
}
@@ -434,8 +580,8 @@ void TimelineFramesView::slotDataChanged(const QModelIndex &topLeft, const QMode
for (int j = topLeft.column(); j <= bottomRight.column(); j++) {
QVariant value = m_d->model->data(
- m_d->model->index(topLeft.row(), j),
- TimelineFramesModel::ActiveFrameRole);
+ m_d->model->index(topLeft.row(), j),
+ TimelineFramesModel::ActiveFrameRole);
if (value.isValid() && value.toBool()) {
selectedColumn = j;
@@ -630,8 +776,8 @@ void TimelineFramesView::startDrag(Qt::DropActions supportedActions)
selectionModel()->clearSelection();
Q_FOREACH (const QModelIndex &idx, selectionBefore) {
QModelIndex newIndex =
- model()->index(idx.row() + selectionOffset.y(),
- idx.column() + selectionOffset.x());
+ model()->index(idx.row() + selectionOffset.y(),
+ idx.column() + selectionOffset.x());
selectionModel()->select(newIndex, QItemSelectionModel::Select);
}
}
@@ -693,8 +839,8 @@ void TimelineFramesView::mousePressEvent(QMouseEvent *event)
} else if (event->button() == Qt::LeftButton) {
m_d->initialDragPanPos = event->pos();
m_d->initialDragPanValue =
- QPoint(horizontalScrollBar()->value(),
- verticalScrollBar()->value());
+ QPoint(horizontalScrollBar()->value(),
+ verticalScrollBar()->value());
}
event->accept();
@@ -703,21 +849,21 @@ void TimelineFramesView::mousePressEvent(QMouseEvent *event)
int numSelectedItems = selectionModel()->selectedIndexes().size();
if (index.isValid() &&
- numSelectedItems <= 1 &&
- m_d->model->data(index, TimelineFramesModel::FrameEditableRole).toBool()) {
+ numSelectedItems <= 1 &&
+ m_d->model->data(index, TimelineFramesModel::FrameEditableRole).toBool()) {
model()->setData(index, true, TimelineFramesModel::ActiveLayerRole);
model()->setData(index, true, TimelineFramesModel::ActiveFrameRole);
setCurrentIndex(index);
if (model()->data(index, TimelineFramesModel::FrameExistsRole).toBool() ||
- model()->data(index, TimelineFramesModel::SpecialKeyframeExists).toBool()) {
+ model()->data(index, TimelineFramesModel::SpecialKeyframeExists).toBool()) {
{
- KisSignalsBlocker b(m_d->colorSelector);
- QVariant colorLabel = index.data(TimelineFramesModel::ColorLabel);
- int labelIndex = colorLabel.isValid() ? colorLabel.toInt() : 0;
- m_d->colorSelector->setCurrentIndex(labelIndex);
+ KisSignalsBlocker b(m_d->colorSelector);
+ QVariant colorLabel = index.data(TimelineFramesModel::FrameColorLabelIndexRole);
+ int labelIndex = colorLabel.isValid() ? colorLabel.toInt() : 0;
+ m_d->colorSelector->setCurrentIndex(labelIndex);
}
m_d->frameEditingMenu->exec(event->globalPos());
@@ -729,7 +875,7 @@ void TimelineFramesView::mousePressEvent(QMouseEvent *event)
bool haveFrames = false;
Q_FOREACH(QModelIndex index, selectedIndexes()) {
haveFrames |= index.data(TimelineFramesModel::FrameExistsRole).toBool();
- QVariant colorLabel = index.data(TimelineFramesModel::ColorLabel);
+ QVariant colorLabel = index.data(TimelineFramesModel::FrameColorLabelIndexRole);
if (colorLabel.isValid()) {
if (labelIndex == 0) {
labelIndex = colorLabel.toInt();
@@ -757,7 +903,7 @@ void TimelineFramesView::mousePressEvent(QMouseEvent *event)
}
m_d->lastPressedPosition =
- QPoint(horizontalOffset(), verticalOffset()) + event->pos();
+ QPoint(horizontalOffset(), verticalOffset()) + event->pos();
QAbstractItemView::mousePressEvent(event);
}
@@ -878,7 +1024,7 @@ void TimelineFramesView::slotNewFrame()
{
QModelIndex index = currentIndex();
if (!index.isValid() ||
- !m_d->model->data(index, TimelineFramesModel::FrameEditableRole).toBool()) {
+ !m_d->model->data(index, TimelineFramesModel::FrameEditableRole).toBool()) {
return;
}
@@ -890,7 +1036,7 @@ void TimelineFramesView::slotCopyFrame()
{
QModelIndex index = currentIndex();
if (!index.isValid() ||
- !m_d->model->data(index, TimelineFramesModel::FrameEditableRole).toBool()) {
+ !m_d->model->data(index, TimelineFramesModel::FrameEditableRole).toBool()) {
return;
}
diff --git a/plugins/dockers/animation/timeline_frames_view.h b/plugins/dockers/animation/timeline_frames_view.h
index 4a77116edc35774fa260df96f14c5b7ef7f3d555..0d05dd6172b3e9f967484db5a2a3d89b8b5f53fc 100644
--- a/plugins/dockers/animation/timeline_frames_view.h
+++ b/plugins/dockers/animation/timeline_frames_view.h
@@ -73,6 +73,12 @@ private Q_SLOTS:
void slotEnsureRowVisible(int row);
+ void slotSelectAudioChannelFile();
+ void slotAudioChannelMute(bool value);
+ void slotAudioChannelRemove();
+ void slotUpdateAudioActions();
+ void slotAudioVolumeChanged(int value);
+
private:
void setFramesPerSecond(int fps);
diff --git a/plugins/dockers/animation/timeline_layers_header.cpp b/plugins/dockers/animation/timeline_layers_header.cpp
index c789298bb1583929c8d284985a529bb8245831ac..7aa8b3a52fd5fe3250231ec2fb4d995f20334168 100644
--- a/plugins/dockers/animation/timeline_layers_header.cpp
+++ b/plugins/dockers/animation/timeline_layers_header.cpp
@@ -136,7 +136,7 @@ void TimelineLayersHeader::paintSection(QPainter *painter, const QRect &rect, in
QVector lines;
lines << QLine(x0, y0 + lineWidth / 2, x1, y0 + lineWidth / 2);
- lines << QLine(x0, y1 - lineWidth / 2, x1, y1 - lineWidth / 2);
+ lines << QLine(x0, y1 - lineWidth / 2, x1, y1 - lineWidth / 2);
painter->drawLines(lines);
diff --git a/plugins/dockers/defaultdockers/kis_layer_box.cpp b/plugins/dockers/defaultdockers/kis_layer_box.cpp
index a885a87ae92187bd3cb95735d976f60f5a057ca0..ca5fb89f82cab91d73ddc19909221c1b56d51e36 100644
--- a/plugins/dockers/defaultdockers/kis_layer_box.cpp
+++ b/plugins/dockers/defaultdockers/kis_layer_box.cpp
@@ -195,7 +195,8 @@ KisLayerBox::KisLayerBox()
KisAction *showGlobalSelectionMask = new KisAction(i18n("&Show Global Selection Mask"), this);
showGlobalSelectionMask->setObjectName("show-global-selection-mask");
- showGlobalSelectionMask->setToolTip(i18nc("@info:tooltip", "Shows global selection as a usual selection mask in Layers docker"));
+ showGlobalSelectionMask->setActivationFlags(KisAction::ACTIVE_IMAGE);
+ showGlobalSelectionMask->setToolTip(i18nc("@info:tooltip", "Shows global selection as a usual selection mask in Layers docker"));
showGlobalSelectionMask->setCheckable(true);
connect(showGlobalSelectionMask, SIGNAL(triggered(bool)), SLOT(slotEditGlobalSelection(bool)));
m_actions.append(showGlobalSelectionMask);
@@ -900,10 +901,10 @@ void KisLayerBox::watchOpacityChannel(KisKeyframeChannel *channel)
m_opacityChannel = channel;
if (m_opacityChannel) {
- connect(m_opacityChannel, &KisKeyframeChannel::sigKeyframeAdded, this, &KisLayerBox::slotOpacityKeyframeChanged);
- connect(m_opacityChannel, &KisKeyframeChannel::sigKeyframeRemoved, this, &KisLayerBox::slotOpacityKeyframeChanged);
- connect(m_opacityChannel, &KisKeyframeChannel::sigKeyframeMoved, this, &KisLayerBox::slotOpacityKeyframeMoved);
- connect(m_opacityChannel, &KisKeyframeChannel::sigKeyframeChanged, this, &KisLayerBox::slotOpacityKeyframeChanged);
+ connect(m_opacityChannel, SIGNAL(sigKeyframeAdded(KisKeyframeSP)), this, SLOT(slotOpacityKeyframeChanged(KisKeyframeSP)));
+ connect(m_opacityChannel, SIGNAL(sigKeyframeRemoved(KisKeyframeSP)), this, SLOT(slotOpacityKeyframeChanged(KisKeyframeSP)));
+ connect(m_opacityChannel, SIGNAL(sigKeyframeMoved(KisKeyframeSP)), this, SLOT(slotOpacityKeyframeMoved(KisKeyframeSP)));
+ connect(m_opacityChannel, SIGNAL(sigKeyframeChanged(KisKeyframeSP)), this, SLOT(slotOpacityKeyframeChanged(KisKeyframeSP)));
}
}
diff --git a/plugins/dockers/defaultdockers/kis_layer_box.h b/plugins/dockers/defaultdockers/kis_layer_box.h
index 7ec01f3743d356976c878441250d3a721f13512a..d2a2975d07cbf2f928e48c80f84b7fc0ca836f01 100644
--- a/plugins/dockers/defaultdockers/kis_layer_box.h
+++ b/plugins/dockers/defaultdockers/kis_layer_box.h
@@ -59,7 +59,7 @@ class KisKeyframeChannel;
/**
* A widget that shows a visualization of the layer structure.
- *
+ *
* The center of the layer box is KisNodeModel, which shows the actual layers.
* This widget adds docking functionality and command buttons.
*
@@ -160,7 +160,7 @@ private:
KisSignalCompressor m_colorLabelCompressor;
KisNodeSP m_activeNode;
- KisKeyframeChannel* m_opacityChannel {0};
+ QPointer m_opacityChannel;
bool m_blockOpacityUpdate {false};
};
diff --git a/plugins/dockers/griddocker/grid_config_widget.cpp b/plugins/dockers/griddocker/grid_config_widget.cpp
index 015c07e112857a5f8d35a91c58382a0c56b5c7c9..51010c66db88c18725cf19f8de92357eeeb68394 100644
--- a/plugins/dockers/griddocker/grid_config_widget.cpp
+++ b/plugins/dockers/griddocker/grid_config_widget.cpp
@@ -164,10 +164,6 @@ void GridConfigWidget::setGridConfigImpl(const KisGridConfig &value)
m_d->guiSignalsBlocked = false;
-
-
-
-
emit gridValueChanged();
}
diff --git a/plugins/dockers/historydocker/DlgConfigureHistoryDock.cpp b/plugins/dockers/historydocker/DlgConfigureHistoryDock.cpp
index 136ec75f48c35edf135739faf12b68bd8de184b6..ba05c7b4fbe3b73ae98b45c59e625c3f0f252923 100644
--- a/plugins/dockers/historydocker/DlgConfigureHistoryDock.cpp
+++ b/plugins/dockers/historydocker/DlgConfigureHistoryDock.cpp
@@ -25,7 +25,7 @@
#include
#include
-DlgConfigureHistoryDock::DlgConfigureHistoryDock(KUndo2QStack *stack, QWidget *parent)
+DlgConfigureHistoryDock::DlgConfigureHistoryDock(KisUndoView *view, KUndo2QStack *stack, QWidget *parent)
: KoDialog(parent)
, m_stack(stack)
{
@@ -36,7 +36,7 @@ DlgConfigureHistoryDock::DlgConfigureHistoryDock(KUndo2QStack *stack, QWidget *p
QFormLayout *form = new QFormLayout(page);
QCheckBox *chkCumulative = new QCheckBox(i18n("Enable Cumulative Undo"), page);
chkCumulative->setChecked(stack->useCumulativeUndoRedo());
- connect(chkCumulative, SIGNAL(toggled(bool)), m_stack, SLOT(toggleCumulativeUndoRedo()));
+ connect(chkCumulative, SIGNAL(toggled(bool)), view, SLOT(toggleCumulativeUndoRedo()));
form->addRow(chkCumulative, new QWidget(page));
@@ -48,7 +48,7 @@ DlgConfigureHistoryDock::DlgConfigureHistoryDock(KUndo2QStack *stack, QWidget *p
form->addRow(l, s);
s->setEnabled(chkCumulative->isChecked());
connect(chkCumulative, SIGNAL(toggled(bool)), s, SLOT(setEnabled(bool)));
- connect(s, SIGNAL(valueChanged(double)), m_stack, SLOT(setStackT1(double)));
+ connect(s, SIGNAL(valueChanged(double)), view, SLOT(setStackT1(double)));
QLabel *l1 = new QLabel(i18n("Group time"));
QDoubleSpinBox *s1 = new KisDoubleParseSpinBox();
@@ -58,7 +58,7 @@ DlgConfigureHistoryDock::DlgConfigureHistoryDock(KUndo2QStack *stack, QWidget *p
form->addRow(l1, s1);
s1->setEnabled(chkCumulative->isChecked());
connect(chkCumulative, SIGNAL(toggled(bool)), s1, SLOT(setEnabled(bool)));
- connect(s1, SIGNAL(valueChanged(double)), m_stack, SLOT(setStackT2(double)));
+ connect(s1, SIGNAL(valueChanged(double)), view, SLOT(setStackT2(double)));
QLabel *l2 = new QLabel(i18n("Split Strokes"));
QSpinBox *s2 = new KisIntParseSpinBox();
@@ -68,7 +68,7 @@ DlgConfigureHistoryDock::DlgConfigureHistoryDock(KUndo2QStack *stack, QWidget *p
form->addRow(l2, s2);
s2->setEnabled(chkCumulative->isChecked());
connect(chkCumulative, SIGNAL(toggled(bool)), s2, SLOT(setEnabled(bool)));
- connect(s2,SIGNAL(valueChanged(int)),SLOT(setStackN(int)));
+ connect(s2,SIGNAL(valueChanged(int)),SLOT(view(int)));
setMainWidget(page);
}
diff --git a/plugins/dockers/historydocker/DlgConfigureHistoryDock.h b/plugins/dockers/historydocker/DlgConfigureHistoryDock.h
index 2b5f8414e9b08ed218c78d62d96ba2827dd4540a..9f2545d8db50a9abbc01e90a8a303669ab0cf2e1 100644
--- a/plugins/dockers/historydocker/DlgConfigureHistoryDock.h
+++ b/plugins/dockers/historydocker/DlgConfigureHistoryDock.h
@@ -24,12 +24,13 @@
#include
#include
#include
+#include
class DlgConfigureHistoryDock : public KoDialog
{
Q_OBJECT
public:
- DlgConfigureHistoryDock(KUndo2QStack *stack, QWidget *parent = 0);
+ DlgConfigureHistoryDock(KisUndoView *view, KUndo2QStack *stack, QWidget *parent = 0);
private:
KUndo2QStack *m_stack;
};
diff --git a/plugins/dockers/historydocker/HistoryDock.cpp b/plugins/dockers/historydocker/HistoryDock.cpp
index d100ae4e330c59e412c090b03e9dd6eb1a59f058..f253d7f00189d06d8cac3e2034cc371535362a43 100644
--- a/plugins/dockers/historydocker/HistoryDock.cpp
+++ b/plugins/dockers/historydocker/HistoryDock.cpp
@@ -70,6 +70,6 @@ void HistoryDock::setCanvas(KoCanvasBase *canvas) {
}
void HistoryDock::configure()
{
- DlgConfigureHistoryDock dlg(m_undoView->stack(), this);
+ DlgConfigureHistoryDock dlg(m_undoView, m_undoView->stack(), this);
dlg.exec();
}
diff --git a/plugins/dockers/lut/lutdocker_dock.cpp b/plugins/dockers/lut/lutdocker_dock.cpp
index 3c109cb91fc554e1609ed0fe6db271752dea30ef..5e3e65a46d2e40566373eb0df127d0d1f303f641 100644
--- a/plugins/dockers/lut/lutdocker_dock.cpp
+++ b/plugins/dockers/lut/lutdocker_dock.cpp
@@ -446,8 +446,27 @@ void LutDockerDock::selectOcioConfiguration()
void LutDockerDock::resetOcioConfiguration()
{
- m_ocioConfig.reset();
KisConfig cfg;
+ if (cfg.ocioColorManagementMode() == m_colorManagement->currentIndex()
+ && cfg.useOcio() == m_chkUseOcio->isChecked()
+ && cfg.ocioLockColorVisualRepresentation() == m_btnConvertCurrentColor->isChecked()
+ && cfg.ocioConfigurationPath() == m_txtConfigurationPath->text()
+ ) {
+ return;
+ }
+
+ m_ocioConfig.reset();
+
+ if (cfg.ocioColorManagementMode() == m_colorManagement->currentIndex()
+ && cfg.useOcio() == m_chkUseOcio->isChecked()
+ && cfg.ocioLockColorVisualRepresentation() == m_btnConvertCurrentColor->isChecked()
+ && cfg.ocioConfigurationPath() == m_txtConfigurationPath->text()
+ ) {
+ return;
+ }
+
+ m_ocioConfig.reset();
+
try {
if (cfg.ocioColorManagementMode() == KisConfig::INTERNAL) {
m_ocioConfig = defaultRawProfile();
diff --git a/plugins/dockers/patterndocker/patterndocker_dock.cpp b/plugins/dockers/patterndocker/patterndocker_dock.cpp
index ccf6093c85187f6285efec46a084fa0232c32433..cb71ebc8367bb8e25ea4deddfabbefee41e7f5f6 100644
--- a/plugins/dockers/patterndocker/patterndocker_dock.cpp
+++ b/plugins/dockers/patterndocker/patterndocker_dock.cpp
@@ -34,6 +34,8 @@ PatternDockerDock::PatternDockerDock( )
m_patternChooser->setPreviewOrientation(Qt::Vertical);
m_patternChooser->setCurrentItem(0,0);
m_patternChooser->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+ m_patternChooser->setMinimumHeight(160);
+
setWidget(m_patternChooser);
}
diff --git a/plugins/extensions/animationrenderer/AnimationRenderer.cpp b/plugins/extensions/animationrenderer/AnimationRenderer.cpp
index 8a8edb67098230525d0f1af1bbc1f9b0e9003750..6ee8680e195b52e64cbf117b5446a0ae3178af7d 100644
--- a/plugins/extensions/animationrenderer/AnimationRenderer.cpp
+++ b/plugins/extensions/animationrenderer/AnimationRenderer.cpp
@@ -78,9 +78,6 @@ void AnimaterionRenderer::slotRenderAnimation()
KisConfig kisConfig;
KisPropertiesConfigurationSP cfg = new KisPropertiesConfiguration();
cfg->fromXML(kisConfig.exportConfiguration("IMAGESEQUENCE"));
- // Override the saved start/end with the ones from the image in case of using gui.
- cfg->setProperty("first_frame", image->animationInterface()->playbackRange().start());
- cfg->setProperty("last_frame", image->animationInterface()->playbackRange().end());
dlgAnimationRenderer.setSequenceConfiguration(cfg);
cfg->clearProperties();
@@ -91,6 +88,9 @@ void AnimaterionRenderer::slotRenderAnimation()
cfg->fromXML(kisConfig.exportConfiguration("FFMPEG_CONFIG"));
dlgAnimationRenderer.setEncoderConfiguration(cfg);
+ // update the UI to show the selected export options
+ dlgAnimationRenderer.updateExportUIOptions();
+
if (dlgAnimationRenderer.exec() == QDialog::Accepted) {
KisPropertiesConfigurationSP sequenceConfig = dlgAnimationRenderer.getSequenceConfiguration();
@@ -102,40 +102,44 @@ void AnimaterionRenderer::slotRenderAnimation()
.arg(extension);
KisAnimationExportSaver exporter(doc, baseFileName, sequenceConfig->getInt("first_frame"), sequenceConfig->getInt("last_frame"), sequenceConfig->getInt("sequence_start"));
- bool success = exporter.exportAnimation(dlgAnimationRenderer.getFrameExportConfiguration());
- Q_ASSERT(success);
- QString savedFilesMask = exporter.savedFilesMask();
-
- KisPropertiesConfigurationSP videoConfig = dlgAnimationRenderer.getVideoConfiguration();
- if (videoConfig) {
- kisConfig.setExportConfiguration("ANIMATION_RENDERER", videoConfig);
-
- KisPropertiesConfigurationSP encoderConfig = dlgAnimationRenderer.getEncoderConfiguration();
- if (encoderConfig) {
- kisConfig.setExportConfiguration("FFMPEG_CONFIG", encoderConfig);
- encoderConfig->setProperty("savedFilesMask", savedFilesMask);
- }
+ bool success = exporter.exportAnimation(dlgAnimationRenderer.getFrameExportConfiguration()) == KisImportExportFilter::OK;
- QSharedPointer encoder = dlgAnimationRenderer.encoderFilter();
- encoder->setMimeType(mimetype.toLatin1());
- QFile fi(videoConfig->getString("filename"));
- KisImportExportFilter::ConversionStatus res;
- if (!fi.open(QIODevice::WriteOnly)) {
- qWarning() << "Could not open" << fi.fileName() << "for writing!";
- res = KisImportExportFilter::CreationError;
- }
- else {
- res = encoder->convert(doc, &fi, encoderConfig);
- fi.close();
- }
- if (res != KisImportExportFilter::OK) {
- QMessageBox::critical(0, i18nc("@title:window", "Krita"), i18n("Could not render animation:\n%1", doc->errorMessage()));
- }
- if (videoConfig->getBool("delete_sequence", false)) {
- QDir d(sequenceConfig->getString("directory"));
- QStringList sequenceFiles = d.entryList(QStringList() << sequenceConfig->getString("basename") + "*." + extension, QDir::Files);
- Q_FOREACH(const QString &f, sequenceFiles) {
- d.remove(f);
+ // the folder could have been read-only or something else could happen
+ if (success) {
+ QString savedFilesMask = exporter.savedFilesMask();
+
+ KisPropertiesConfigurationSP videoConfig = dlgAnimationRenderer.getVideoConfiguration();
+ if (videoConfig) {
+ kisConfig.setExportConfiguration("ANIMATION_RENDERER", videoConfig);
+
+ KisPropertiesConfigurationSP encoderConfig = dlgAnimationRenderer.getEncoderConfiguration();
+ if (encoderConfig) {
+ kisConfig.setExportConfiguration("FFMPEG_CONFIG", encoderConfig);
+ encoderConfig->setProperty("savedFilesMask", savedFilesMask);
+ }
+
+ QSharedPointer encoder = dlgAnimationRenderer.encoderFilter();
+ encoder->setMimeType(mimetype.toLatin1());
+ QFile fi(videoConfig->getString("filename"));
+ KisImportExportFilter::ConversionStatus res;
+ if (!fi.open(QIODevice::WriteOnly)) {
+ qWarning() << "Could not open" << fi.fileName() << "for writing!";
+ res = KisImportExportFilter::CreationError;
+ }
+ else {
+ encoder->setFilename(fi.fileName());
+ res = encoder->convert(doc, &fi, encoderConfig);
+ fi.close();
+ }
+ if (res != KisImportExportFilter::OK) {
+ QMessageBox::critical(0, i18nc("@title:window", "Krita"), i18n("Could not render animation:\n%1", doc->errorMessage()));
+ }
+ if (videoConfig->getBool("delete_sequence", false)) {
+ QDir d(sequenceConfig->getString("directory"));
+ QStringList sequenceFiles = d.entryList(QStringList() << sequenceConfig->getString("basename") + "*." + extension, QDir::Files);
+ Q_FOREACH(const QString &f, sequenceFiles) {
+ d.remove(f);
+ }
}
}
}
@@ -154,8 +158,7 @@ void AnimaterionRenderer::slotRenderSequenceAgain()
if (!image->animationInterface()->hasAnimation()) return;
KisDocument *doc = m_view->document();
- doc->setFileProgressProxy();
- doc->setFileProgressUpdater(i18n("Export frames"));
+ doc->setFileProgressProxy(); doc->setFileProgressUpdater(i18n("Export frames"));
KisConfig kisConfig;
KisPropertiesConfigurationSP cfg = new KisPropertiesConfiguration();
diff --git a/plugins/extensions/animationrenderer/DlgAnimationRenderer.cpp b/plugins/extensions/animationrenderer/DlgAnimationRenderer.cpp
index 4f0b4c1939ff354260cec3d88f4a3f9cdc6afc7a..1f2131a9769b907f2a1c1cb6956e46a17749b3d1 100644
--- a/plugins/extensions/animationrenderer/DlgAnimationRenderer.cpp
+++ b/plugins/extensions/animationrenderer/DlgAnimationRenderer.cpp
@@ -50,6 +50,7 @@
DlgAnimationRenderer::DlgAnimationRenderer(KisDocument *doc, QWidget *parent)
: KoDialog(parent)
, m_image(doc->image())
+ , m_doc(doc)
, m_defaultFileName(QFileInfo(doc->url().toLocalFile()).completeBaseName())
{
KisConfig cfg;
@@ -58,8 +59,13 @@ DlgAnimationRenderer::DlgAnimationRenderer(KisDocument *doc, QWidget *parent)
setButtons(Ok | Cancel);
setDefaultButton(Ok);
+ if (m_defaultFileName.isEmpty()) {
+ m_defaultFileName = i18n("Untitled");
+ }
+
m_page = new WdgAnimaterionRenderer(this);
m_page->layout()->setMargin(0);
+
m_page->dirRequester->setMode(KoFileDialog::OpenDirectory);
QString lastLocation = cfg.readEntry("AnimationRenderer/last_sequence_export_location", QStandardPaths::writableLocation(QStandardPaths::PicturesLocation));
m_page->dirRequester->setFileName(lastLocation);
@@ -72,6 +78,11 @@ DlgAnimationRenderer::DlgAnimationRenderer(KisDocument *doc, QWidget *parent)
m_page->intEnd->setMaximum(doc->image()->animationInterface()->fullClipRange().end());
m_page->intEnd->setValue(doc->image()->animationInterface()->playbackRange().end());
+ QFileInfo audioFileInfo(doc->image()->animationInterface()->audioChannelFileName());
+ const bool hasAudio = audioFileInfo.exists();
+ m_page->chkIncludeAudio->setEnabled(hasAudio);
+ m_page->chkIncludeAudio->setChecked(hasAudio && !doc->image()->animationInterface()->isAudioMuted());
+
QStringList mimes = KisImportExportManager::mimeFilter(KisImportExportManager::Export);
mimes.sort();
Q_FOREACH(const QString &mime, mimes) {
@@ -87,7 +98,6 @@ DlgAnimationRenderer::DlgAnimationRenderer(KisDocument *doc, QWidget *parent)
}
setMainWidget(m_page);
- resize(m_page->sizeHint());
KoJsonTrader trader;
QListlist = trader.query("Krita/AnimationExporter", "");
@@ -129,7 +139,6 @@ DlgAnimationRenderer::DlgAnimationRenderer(KisDocument *doc, QWidget *parent)
qDeleteAll(list);
- connect(m_page->grpRender, SIGNAL(toggled(bool)), this, SLOT(toggleSequenceType(bool)));
connect(m_page->bnExportOptions, SIGNAL(clicked()), this, SLOT(sequenceMimeTypeSelected()));
connect(m_page->bnRenderOptions, SIGNAL(clicked()), this, SLOT(selectRenderOptions()));
@@ -137,19 +146,28 @@ DlgAnimationRenderer::DlgAnimationRenderer(KisDocument *doc, QWidget *parent)
m_page->ffmpegLocation->setMode(KoFileDialog::OpenFile);
connect(m_page->ffmpegLocation, SIGNAL(fileSelected(QString)), this, SLOT(ffmpegLocationChanged(QString)));
- m_page->grpRender->setChecked(cfg.readEntry("AnimationRenderer/render_animation", false));
- m_page->chkDeleteSequence->setChecked(cfg.readEntry("AnimationRenderer/delete_sequence", false));
m_page->cmbRenderType->setCurrentIndex(cfg.readEntry("AnimationRenderer/render_type", 0));
+
+
+ connect(m_page->shouldExportOnlyImageSequence, SIGNAL(toggled(bool)), this, SLOT(slotExportTypeChanged()));
+ connect(m_page->shouldExportOnlyVideo, SIGNAL(toggled(bool)), this, SLOT(slotExportTypeChanged()));
+ connect(m_page->shouldExportAll, SIGNAL(toggled(bool)), this, SLOT(slotExportTypeChanged()));
+
+ updateExportUIOptions();
+
+ // connect and cold init
connect(m_page->cmbRenderType, SIGNAL(currentIndexChanged(int)), this, SLOT(selectRenderType(int)));
+ selectRenderType(m_page->cmbRenderType->currentIndex());
+
+ resize(m_page->sizeHint());
}
DlgAnimationRenderer::~DlgAnimationRenderer()
{
KisConfig cfg;
- cfg.writeEntry("AnimationRenderer/render_animation", m_page->grpRender->isChecked());
+
cfg.writeEntry("AnimationRenderer/last_sequence_export_location", m_page->dirRequester->fileName());
cfg.writeEntry("AnimationRenderer/render_type", m_page->cmbRenderType->currentIndex());
- cfg.writeEntry("AnimationRenderer/delete_sequence", m_page->chkDeleteSequence->isChecked());
cfg.setCustomFFMpegPath(m_page->ffmpegLocation->fileName());
if (m_encoderConfigWidget) {
@@ -169,6 +187,7 @@ KisPropertiesConfigurationSP DlgAnimationRenderer::getSequenceConfiguration() co
{
KisPropertiesConfigurationSP cfg = new KisPropertiesConfiguration();
cfg->setProperty("basename", m_page->txtBasename->text());
+ cfg->setProperty("last_document_path", m_doc->localFilePath());
cfg->setProperty("directory", m_page->dirRequester->fileName());
cfg->setProperty("first_frame", m_page->intStart->value());
cfg->setProperty("last_frame", m_page->intEnd->value());
@@ -180,6 +199,13 @@ KisPropertiesConfigurationSP DlgAnimationRenderer::getSequenceConfiguration() co
void DlgAnimationRenderer::setSequenceConfiguration(KisPropertiesConfigurationSP cfg)
{
m_page->txtBasename->setText(cfg->getString("basename", "frame"));
+
+ if (cfg->getString("last_document_path") != m_doc->localFilePath()) {
+ cfg->removeProperty("first_frame");
+ cfg->removeProperty("last_frame");
+ cfg->removeProperty("sequence_start");
+ }
+
m_page->dirRequester->setFileName(cfg->getString("directory", QStandardPaths::writableLocation(QStandardPaths::PicturesLocation)));
m_page->intStart->setValue(cfg->getInt("first_frame", m_image->animationInterface()->playbackRange().start()));
m_page->intEnd->setValue(cfg->getInt("last_frame", m_image->animationInterface()->playbackRange().end()));
@@ -209,16 +235,13 @@ KisPropertiesConfigurationSP DlgAnimationRenderer::getFrameExportConfiguration()
return 0;
}
-bool DlgAnimationRenderer::renderToVideo() const
-{
- return m_page->grpRender->isChecked();
-}
-
KisPropertiesConfigurationSP DlgAnimationRenderer::getVideoConfiguration() const
{
- if (!m_page->grpRender->isChecked()) {
+ // don't continue if we are only exporting image sequence
+ if (m_page->shouldExportOnlyImageSequence->isChecked()) {
return 0;
}
+
KisPropertiesConfigurationSP cfg = new KisPropertiesConfiguration();
QString filename = m_page->videoFilename->fileName();
if (QFileInfo(filename).completeSuffix().isEmpty()) {
@@ -226,7 +249,15 @@ KisPropertiesConfigurationSP DlgAnimationRenderer::getVideoConfiguration() const
filename += "." + KisMimeDatabase::suffixesForMimeType(mimetype).first();
}
cfg->setProperty("filename", filename);
- cfg->setProperty("delete_sequence", m_page->chkDeleteSequence->isChecked());
+ cfg->setProperty("first_frame", m_page->intStart->value());
+ cfg->setProperty("last_frame", m_page->intEnd->value());
+ cfg->setProperty("sequence_start", m_page->sequenceStart->value());
+
+
+ // delete image sequence if we are only exporting out video
+ cfg->setProperty("delete_sequence", m_page->shouldExportOnlyVideo->isChecked());
+
+
return cfg;
}
@@ -236,9 +267,11 @@ void DlgAnimationRenderer::setVideoConfiguration(KisPropertiesConfigurationSP /*
KisPropertiesConfigurationSP DlgAnimationRenderer::getEncoderConfiguration() const
{
- if (!m_page->grpRender->isChecked()) {
+ // don't continue if we are only exporting image sequence
+ if (m_page->shouldExportOnlyImageSequence->isChecked()) {
return 0;
}
+
KisPropertiesConfigurationSP cfg = new KisPropertiesConfiguration();
if (m_encoderConfigWidget) {
cfg = m_encoderConfigWidget->configuration();
@@ -248,6 +281,7 @@ KisPropertiesConfigurationSP DlgAnimationRenderer::getEncoderConfiguration() con
cfg->setProperty("first_frame", m_page->intStart->value());
cfg->setProperty("last_frame", m_page->intEnd->value());
cfg->setProperty("sequence_start", m_page->sequenceStart->value());
+ cfg->setProperty("include_audio", m_page->chkIncludeAudio->isChecked());
return cfg;
}
@@ -274,6 +308,7 @@ void DlgAnimationRenderer::selectRenderType(int index)
m_defaultFileName = QFileInfo(m_page->videoFilename->fileName()).completeBaseName();
}
m_page->videoFilename->setMimeTypeFilters(QStringList() << mimetype, mimetype);
+
m_page->videoFilename->setFileName(m_defaultFileName + "." + KisMimeDatabase::suffixesForMimeType(mimetype).first());
}
@@ -311,17 +346,6 @@ void DlgAnimationRenderer::selectRenderOptions()
}
-void DlgAnimationRenderer::toggleSequenceType(bool toggle)
-{
- m_page->cmbMimetype->setEnabled(!toggle);
- for (int i = 0; i < m_page->cmbMimetype->count(); ++i) {
- if (m_page->cmbMimetype->itemData(i).toString() == "image/png") {
- m_page->cmbMimetype->setCurrentIndex(i);
- break;
- }
- }
-}
-
void DlgAnimationRenderer::sequenceMimeTypeSelected()
{
int index = m_page->cmbMimetype->currentIndex();
@@ -356,9 +380,24 @@ void DlgAnimationRenderer::ffmpegLocationChanged(const QString &s)
cfg.setCustomFFMpegPath(s);
}
+void DlgAnimationRenderer::updateExportUIOptions() {
+
+ KisConfig cfg;
+
+ // read in what type to export to. Defaults to image sequence only
+ QString exportType = cfg.readEntry("AnimationRenderer/export_type", "ImageSequence");
+ if (exportType == "ImageSequence") {
+ m_page->shouldExportOnlyImageSequence->setChecked(true);
+ } else if (exportType == "Video") {
+ m_page->shouldExportOnlyVideo->setChecked(true);
+ } else {
+ m_page->shouldExportAll->setChecked(true); // export to both
+ }
+}
+
void DlgAnimationRenderer::slotButtonClicked(int button)
{
- if (button == KoDialog::Ok && m_page->grpRender->isChecked()) {
+ if (button == KoDialog::Ok && !m_page->shouldExportOnlyImageSequence->isChecked()) {
QString ffmpeg = m_page->ffmpegLocation->fileName();
if (m_page->videoFilename->fileName().isEmpty()) {
QMessageBox::warning(this, i18nc("@title:window", "Krita"), i18n("Please enter a file name to render to."));
@@ -415,3 +454,53 @@ QString DlgAnimationRenderer::findFFMpeg()
return result;
}
+void DlgAnimationRenderer::slotExportTypeChanged()
+{
+ KisConfig cfg;
+
+ // if a video format needs to be outputted
+ if (m_page->shouldExportAll->isChecked() || m_page->shouldExportOnlyVideo->isChecked()) {
+
+ // videos always uses PNG for creating video, so disable the ability to change the format
+ m_page->cmbMimetype->setEnabled(false);
+ for (int i = 0; i < m_page->cmbMimetype->count(); ++i) {
+ if (m_page->cmbMimetype->itemData(i).toString() == "image/png") {
+ m_page->cmbMimetype->setCurrentIndex(i);
+ break;
+ }
+ }
+ }
+
+ // if only exporting video
+ if (m_page->shouldExportOnlyVideo) {
+ m_page->cmbMimetype->setEnabled(false); // allow to change image format
+ m_page->imageSequenceOptionsGroup->setVisible(false);
+ m_page->videoOptionsGroup->setVisible(false); //shrinks the horizontal space temporarily to help resize() work
+ m_page->videoOptionsGroup->setVisible(true);
+
+ cfg.writeEntry("AnimationRenderer/export_type", "Video");
+ }
+
+
+ // if only an image sequence needs to be output
+ if (m_page->shouldExportOnlyImageSequence->isChecked()) {
+ m_page->cmbMimetype->setEnabled(true); // allow to change image format
+ m_page->videoOptionsGroup->setVisible(false);
+ m_page->imageSequenceOptionsGroup->setVisible(true);
+
+ cfg.writeEntry("AnimationRenderer/export_type", "ImageSequence");
+ }
+
+ // show all options
+ if (m_page->shouldExportAll->isChecked() ) {
+ m_page->imageSequenceOptionsGroup->setVisible(true);
+ m_page->videoOptionsGroup->setVisible(true);
+
+ cfg.writeEntry("AnimationRenderer/export_type", "VideoAndImageSequence");
+ }
+
+
+ // for the resize to work as expected, try to hide elements first before displaying other ones.
+ // if the widget gets bigger at any point, the resize will use that, even if elements are hidden later to make it smaller
+ resize(m_page->sizeHint());
+}
diff --git a/plugins/extensions/animationrenderer/DlgAnimationRenderer.h b/plugins/extensions/animationrenderer/DlgAnimationRenderer.h
index 9d86a7a71043928d4982f5fd90ca8b4903e0e2bd..d8b60344a0d5a6b012f5d1028da27f26741286d4 100644
--- a/plugins/extensions/animationrenderer/DlgAnimationRenderer.h
+++ b/plugins/extensions/animationrenderer/DlgAnimationRenderer.h
@@ -58,8 +58,6 @@ public:
KisPropertiesConfigurationSP getFrameExportConfiguration() const;
- bool renderToVideo() const;
-
KisPropertiesConfigurationSP getVideoConfiguration() const;
void setVideoConfiguration(KisPropertiesConfigurationSP cfg);
@@ -68,14 +66,19 @@ public:
QSharedPointer encoderFilter() const;
+ // fires when the render animation action is called. makes sure the correct export type is selected for the UI
+ void updateExportUIOptions();
+
private Q_SLOTS:
void selectRenderType(int i);
void selectRenderOptions();
- void toggleSequenceType(bool toggle);
void sequenceMimeTypeSelected();
void ffmpegLocationChanged(const QString&);
+ void slotExportTypeChanged();
+
+
protected Q_SLOTS:
void slotButtonClicked(int button);
@@ -84,7 +87,8 @@ private:
static QString findFFMpeg();
- KisImageWSP m_image;
+ KisImageSP m_image;
+ KisDocument *m_doc;
WdgAnimaterionRenderer *m_page {0};
QList> m_renderFilters;
KisConfigWidget *m_encoderConfigWidget {0};
diff --git a/plugins/extensions/animationrenderer/wdg_animationrenderer.ui b/plugins/extensions/animationrenderer/wdg_animationrenderer.ui
index f60044edc7a99a6f63c9a4f0281843bf9f93572c..77ad96bac6210d3ab03c9e63d858c06c03e0b1f9 100644
--- a/plugins/extensions/animationrenderer/wdg_animationrenderer.ui
+++ b/plugins/extensions/animationrenderer/wdg_animationrenderer.ui
@@ -6,256 +6,381 @@
0
0
- 444
- 443
+ 904
+ 309
+
+
+ 0
+ 0
+
+
AnimationRenderer Image
-
- -
-
-
- Image Sequence
+
+
+ 18
+
+ -
+
+
+ 20
+
+
+ 0
+
+ -
+
+
+ Export:
+
+
+
+ -
+
+
+ Image Sequence
+
+
+
+ -
+
+
+ Video
+
+
+
+ -
+
+
+ Both
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+ 20
+
+ -
+
+
+ First frame:
+
+
+
+ -
+
+
+
+ 1
+ 0
+
+
+
+
+ -
+
+
+ Last frame:
+
+
+
+ -
+
+
+
+ 1
+ 0
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+ 25
-
- -
-
-
- Base name:
-
-
-
- -
-
-
- frame
-
-
-
- -
-
-
- Fi&le format:
-
-
- label_8
-
-
-
- -
-
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Video Options
+
+
-
-
-
-
- 2
- 0
-
-
-
- Select the file format for the image sequence. If you want to render to video or animated gif, you can only select PNG
-
-
+
+ -
+
+
+ Render as:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ -
+
+ -
+
+
+ -
+
+
+ Select the ffmpeg render options.
+
+
+ ...
+
+
+
+
+
+ -
+
+
+ Video Location:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 1
+ 0
+
+
+
+
+ -
+
+
+ FF&Mpeg:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ ffmpegLocation
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Include Audio
+
+
+
+
-
-
-
- Select the frame export options
+
+
+ Qt::Vertical
-
- ...
+
+
+ 20
+ 10
+
-
+
-
- -
-
-
- Render location:
-
-
-
- -
-
-
-
- 1
- 0
-
-
-
-
- -
-
-
- First frame:
-
-
-
- -
-
-
-
- 1
- 0
-
-
-
-
- -
-
-
- Last frame:
-
-
-
- -
-
-
-
- 1
- 0
-
-
-
-
- -
-
+
+
+ -
+
+
+ Image Sequence Options
+
+
-
-
-
- Naming sequence starts with:
-
-
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Base name:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+ -
+
+
+
+ 2
+ 0
+
+
+
+ Select the file format for the image sequence. If you want to render to video or animated gif, you can only select PNG
+
+
+
+ -
+
+
+ Select the frame export options
+
+
+ ...
+
+
+
+
+
+ -
+
+
+
+ 1
+ 0
+
+
+
+
+ -
+
+
+ Fi&le format:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ label_8
+
+
+
+ -
+
+
+
+ 1
+ 0
+
+
+
+
+ -
+
+
+ Image location:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ frame
+
+
+
+ -
+
+
+ Start numbering at:
+
+
+
+
-
-
-
-
- 1
- 0
-
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 10
+
-
+
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
+
+
+
- -
-
-
-
- 0
- 1
-
+ -
+
+
+ Qt::Vertical
-
- Render
+
+
+ 20
+ 10
+
-
- true
-
-
- false
-
-
- -
-
-
- Render as:
-
-
-
- -
-
- -
-
-
- -
-
-
- Select the ffmpeg render options.
-
-
- ...
-
-
-
-
-
- -
-
-
- File:
-
-
-
- -
-
-
-
- 1
- 0
-
-
-
-
- -
-
-
- FF&Mpeg:
-
-
- ffmpegLocation
-
-
-
- -
-
-
- -
-
-
- Delete Sequence After Rendering
-
-
- true
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
+
@@ -268,14 +393,8 @@
- txtBasename
cmbMimetype
- intStart
- intEnd
- sequenceStart
- grpRender
cmbRenderType
- chkDeleteSequence
diff --git a/plugins/extensions/resourcemanager/dlg_bundle_manager.cpp b/plugins/extensions/resourcemanager/dlg_bundle_manager.cpp
index b099d8fdf1212e57716f10e13412e015c0da8006..8d444ef860e0389ee37a00260c129472451cc4de 100644
--- a/plugins/extensions/resourcemanager/dlg_bundle_manager.cpp
+++ b/plugins/extensions/resourcemanager/dlg_bundle_manager.cpp
@@ -50,12 +50,12 @@ DlgBundleManager::DlgBundleManager(ResourceManager *resourceManager, KisActionMa
setDefaultButton(Ok);
m_ui->listActive->setIconSize(QSize(ICON_SIZE, ICON_SIZE));
- m_ui->listActive->setSelectionMode(QAbstractItemView::ExtendedSelection);
+ m_ui->listActive->setSelectionMode(QAbstractItemView::SingleSelection);
connect(m_ui->listActive, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(itemSelected(QListWidgetItem*,QListWidgetItem*)));
connect(m_ui->listActive, SIGNAL(itemClicked(QListWidgetItem*)), SLOT(itemSelected(QListWidgetItem*)));
m_ui->listInactive->setIconSize(QSize(ICON_SIZE, ICON_SIZE));
- m_ui->listInactive->setSelectionMode(QAbstractItemView::ExtendedSelection);
+ m_ui->listInactive->setSelectionMode(QAbstractItemView::SingleSelection);
connect(m_ui->listInactive, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(itemSelected(QListWidgetItem*,QListWidgetItem*)));
connect(m_ui->listInactive, SIGNAL(itemClicked(QListWidgetItem*)), SLOT(itemSelected(QListWidgetItem*)));
@@ -97,7 +97,6 @@ void DlgBundleManager::refreshListData()
m_ui->listInactive->clear();
m_ui->listActive->clear();
-
Q_FOREACH (const QString &f, bundleServer->blackListedFiles()) {
KisResourceBundle *bundle = new KisResourceBundle(f);
bundle->load();
@@ -231,6 +230,7 @@ void DlgBundleManager::itemSelected(QListWidgetItem *current, QListWidgetItem *)
}
}
+
if (bundle) {
m_currentBundle = bundle;
@@ -296,10 +296,13 @@ void DlgBundleManager::editBundle()
{
if (m_currentBundle) {
DlgCreateBundle dlg(m_currentBundle);
+ m_activeBundles.remove(m_currentBundle->filename());
+ m_currentBundle = 0;
if (dlg.exec() != QDialog::Accepted) {
return;
}
- m_resourceManager->saveBundle(dlg);
+ m_currentBundle = m_resourceManager->saveBundle(dlg);
+ refreshListData();
}
}
@@ -310,6 +313,7 @@ void DlgBundleManager::fillListWidget(QList bundles, QListW
Q_FOREACH (KisResourceBundle *bundle, bundles) {
QPixmap pixmap(ICON_SIZE, ICON_SIZE);
+ pixmap.fill(Qt::gray);
if (!bundle->image().isNull()) {
QImage scaled = bundle->image().scaled(ICON_SIZE, ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation);
int x = (ICON_SIZE - scaled.width()) / 2;
@@ -318,9 +322,6 @@ void DlgBundleManager::fillListWidget(QList bundles, QListW
gc.drawImage(x, y, scaled);
gc.end();
}
- else {
- pixmap.fill(Qt::gray);
- }
QListWidgetItem *item = new QListWidgetItem(pixmap, bundle->name());
item->setData(Qt::UserRole, bundle->md5());
@@ -371,6 +372,7 @@ void DlgBundleManager::slotCreateBundle() {
if (m_actionManager) {
KisAction *action = m_actionManager->actionByName("create_bundle");
action->trigger();
+ refreshListData();
}
}
diff --git a/plugins/extensions/resourcemanager/dlg_create_bundle.cpp b/plugins/extensions/resourcemanager/dlg_create_bundle.cpp
index b8d754f2c93c6b02782db6567f5dcd8ee0294820..daa5cc8abf89aa79fdd91fae0bb65c1a191cc846 100644
--- a/plugins/extensions/resourcemanager/dlg_create_bundle.cpp
+++ b/plugins/extensions/resourcemanager/dlg_create_bundle.cpp
@@ -77,6 +77,56 @@ DlgCreateBundle::DlgCreateBundle(KisResourceBundle *bundle, QWidget *parent)
m_ui->editWebsite->setText(bundle->getMeta("website"));
m_ui->editDescription->document()->setPlainText(bundle->getMeta("description"));
m_ui->lblPreview->setPixmap(QPixmap::fromImage(bundle->image().scaled(256, 256, Qt::KeepAspectRatio, Qt::SmoothTransformation)));
+
+ Q_FOREACH (const QString & resType, bundle->resourceTypes()) {
+ if (resType == "gradients") {
+ Q_FOREACH (const KoResource *res, bundle->resources(resType)) {
+ if (res) {
+ m_selectedGradients << res->shortFilename();
+ }
+ }
+
+ }
+ else if (resType == "patterns") {
+ Q_FOREACH (const KoResource *res, bundle->resources(resType)) {
+ if (res) {
+ m_selectedPatterns << res->shortFilename();
+ }
+ }
+
+ }
+ else if (resType == "brushes") {
+ Q_FOREACH (const KoResource *res, bundle->resources(resType)) {
+ if (res) {
+ m_selectedBrushes << res->shortFilename();
+ }
+ }
+
+ }
+ else if (resType == "palettes") {
+ Q_FOREACH (const KoResource *res, bundle->resources(resType)) {
+ if (res) {
+ m_selectedPalettes << res->shortFilename();
+ }
+ }
+
+ }
+ else if (resType == "workspaces") {
+ Q_FOREACH (const KoResource *res, bundle->resources(resType)) {
+ if (res) {
+ m_selectedWorkspaces << res->shortFilename();
+ }
+ }
+
+ }
+ else if (resType == "paintoppresets") {
+ Q_FOREACH (const KoResource *res, bundle->resources(resType)) {
+ if (res) {
+ m_selectedPresets << res->shortFilename();
+ }
+ }
+ }
+ }
}
else {
@@ -173,7 +223,7 @@ void DlgCreateBundle::accept()
else {
QFileInfo fileInfo(m_ui->lblSaveLocation->text() + "/" + name + ".bundle");
- if (fileInfo.exists()) {
+ if (fileInfo.exists() && !m_bundle) {
m_ui->editBundleName->setStyleSheet("border: 1px solid red");
QMessageBox::warning(this, i18nc("@title:window", "Krita"), i18n("A bundle with this name already exists."));
return;
@@ -375,7 +425,7 @@ void DlgCreateBundle::resourceTypeSelected(int idx)
void DlgCreateBundle::getPreviewImage()
{
KoFileDialog dialog(this, KoFileDialog::OpenFile, "BundlePreviewImage");
- dialog.setCaption(i18n("Select file to use as dynamic file layer."));
+ dialog.setCaption(i18n("Select file to use as bundle icon"));
dialog.setDefaultDir(QDesktopServices::storageLocation(QDesktopServices::PicturesLocation));
dialog.setMimeTypeFilters(KisImportExportManager::mimeFilter(KisImportExportManager::Import));
m_previewImage = dialog.filename();
@@ -385,3 +435,4 @@ void DlgCreateBundle::getPreviewImage()
}
+
diff --git a/plugins/extensions/resourcemanager/dlg_create_bundle.h b/plugins/extensions/resourcemanager/dlg_create_bundle.h
index d55ed1bd5af21720110fd244e4e3fc36950b4671..2d52b9c387acc4d5d33f2ddfa9680449a1fbc391 100644
--- a/plugins/extensions/resourcemanager/dlg_create_bundle.h
+++ b/plugins/extensions/resourcemanager/dlg_create_bundle.h
@@ -61,6 +61,7 @@ private Q_SLOTS:
void resourceTypeSelected(int idx);
void getPreviewImage();
+
private:
QWidget *m_page;
Ui::WdgDlgCreateBundle *m_ui;
diff --git a/plugins/extensions/resourcemanager/resourcemanager.cpp b/plugins/extensions/resourcemanager/resourcemanager.cpp
index 03f1a6b7090db9bf9ef348f3fed1aa5b3fc403a9..67fc7091e3937a448b95caf394cb5510b78e327e 100644
--- a/plugins/extensions/resourcemanager/resourcemanager.cpp
+++ b/plugins/extensions/resourcemanager/resourcemanager.cpp
@@ -27,6 +27,7 @@
#include
#include
+#include
#include
#include
@@ -128,9 +129,10 @@ void ResourceManager::slotCreateBundle()
saveBundle(dlgCreateBundle);
}
-void ResourceManager::saveBundle(const DlgCreateBundle &dlgCreateBundle)
+KisResourceBundle *ResourceManager::saveBundle(const DlgCreateBundle &dlgCreateBundle)
{
QString bundlePath = dlgCreateBundle.saveLocation() + "/" + dlgCreateBundle.bundleName() + ".bundle";
+
KisResourceBundle *newBundle = new KisResourceBundle(bundlePath);
newBundle->addMeta("name", dlgCreateBundle.bundleName());
@@ -139,6 +141,7 @@ void ResourceManager::saveBundle(const DlgCreateBundle &dlgCreateBundle)
newBundle->addMeta("license", dlgCreateBundle.license());
newBundle->addMeta("website", dlgCreateBundle.website());
newBundle->addMeta("description", dlgCreateBundle.description());
+ newBundle->setThumbnail(dlgCreateBundle.previewImage());
QStringList res = dlgCreateBundle.selectedBrushes();
Q_FOREACH (const QString &r, res) {
@@ -192,13 +195,23 @@ void ResourceManager::saveBundle(const DlgCreateBundle &dlgCreateBundle)
newBundle->addMeta("fileName", bundlePath);
newBundle->addMeta("created", QDate::currentDate().toString("dd/MM/yyyy"));
- newBundle->setThumbnail(dlgCreateBundle.previewImage());
-
if (!newBundle->save()) {
QMessageBox::critical(m_view->mainWindow(), i18nc("@title:window", "Krita"), i18n("Could not create the new bundle."));
}
+ else {
+ newBundle->setValid(true);
+ if (QDir(KisResourceServerProvider::instance()->resourceBundleServer()->saveLocation()) != QDir(QFileInfo(bundlePath).path())) {
+ newBundle->setFilename(KisResourceServerProvider::instance()->resourceBundleServer()->saveLocation() + "/" + dlgCreateBundle.bundleName() + ".bundle");
+ }
+ if (KisResourceServerProvider::instance()->resourceBundleServer()->resourceByName(newBundle->name())) {
+ KisResourceServerProvider::instance()->resourceBundleServer()->removeResourceFromServer(
+ KisResourceServerProvider::instance()->resourceBundleServer()->resourceByName(newBundle->name()));
+ }
+ KisResourceServerProvider::instance()->resourceBundleServer()->addResource(newBundle, true);
+ newBundle->load();
+ }
-
+ return newBundle;
}
void ResourceManager::slotManageBundles()
@@ -212,6 +225,7 @@ void ResourceManager::slotManageBundles()
QStringList ResourceManager::importResources(const QString &title, const QStringList &mimes) const
{
KoFileDialog dialog(m_view->mainWindow(), KoFileDialog::OpenFiles, "krita_resources");
+ dialog.setDefaultDir(QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
dialog.setCaption(title);
dialog.setMimeTypeFilters(mimes);
return dialog.filenames();
diff --git a/plugins/extensions/resourcemanager/resourcemanager.h b/plugins/extensions/resourcemanager/resourcemanager.h
index c199edd644a4681c0840e501119436f7adc48762..5da781c4d7575ff8a1b291ba15714a774907557c 100644
--- a/plugins/extensions/resourcemanager/resourcemanager.h
+++ b/plugins/extensions/resourcemanager/resourcemanager.h
@@ -37,7 +37,7 @@ class ResourceManager : public KisViewPlugin
public:
ResourceManager(QObject *parent, const QVariantList &);
virtual ~ResourceManager();
- void saveBundle(const DlgCreateBundle &dlgCreateBundle);
+ KisResourceBundle *saveBundle(const DlgCreateBundle &dlgCreateBundle);
private Q_SLOTS:
void slotCreateBundle();
@@ -53,7 +53,7 @@ private Q_SLOTS:
private:
-
+
QStringList importResources(const QString &title, const QStringList &mimes) const;
class Private;
diff --git a/plugins/extensions/resourcemanager/wdgdlgbundlemanager.ui b/plugins/extensions/resourcemanager/wdgdlgbundlemanager.ui
index bc3e6df22a465d50f8ac83327d33de71681a9bde..754784712aba035837ad29b06940cc5c5ea4eb6c 100644
--- a/plugins/extensions/resourcemanager/wdgdlgbundlemanager.ui
+++ b/plugins/extensions/resourcemanager/wdgdlgbundlemanager.ui
@@ -44,6 +44,19 @@
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Create New Bundle
+
+
+
@@ -185,19 +198,6 @@
- -
-
-
-
- 0
- 0
-
-
-
- Create New Bundle
-
-
-
-
@@ -297,7 +297,7 @@
false
- &Create a new bundle from this bundle
+ &Edit bundle...
@@ -365,6 +365,9 @@
+
+ true
+
Qt::AlignCenter
diff --git a/plugins/extensions/resourcemanager/wdgdlgcreatebundle.ui b/plugins/extensions/resourcemanager/wdgdlgcreatebundle.ui
index fbb3b6285e95a3a2671d72791309c6eb518e0277..cd6ffeae4130d457c5bc9a39a6b4db99bf812940 100644
--- a/plugins/extensions/resourcemanager/wdgdlgcreatebundle.ui
+++ b/plugins/extensions/resourcemanager/wdgdlgcreatebundle.ui
@@ -6,8 +6,8 @@
0
0
- 894
- 394
+ 895
+ 460
@@ -40,8 +40,14 @@
-
+
+ 12
+
-
+
+ 12
+
-
@@ -66,56 +72,57 @@
-
+
+ 12
+
-
-
-
-
- 0
- 0
-
+
+
+ 0
-
-
- 0
-
- -
-
-
-
- 0
- 250
-
-
-
- 2
-
-
-
- -
-
-
- Available
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
+
+ 12
+
+ -
+
+
+
+ 0
+ 350
+
+
+
+ 2
+
+
+
+ -
+
+
+ Available
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
-
+
+ 12
+
-
@@ -159,49 +166,44 @@
-
-
-
-
- 0
- 0
-
+
+
+ 12
-
- -
-
-
-
- 0
- 250
-
-
-
- 2
-
-
-
- -
-
-
- Selected
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
+ -
+
+
+
+ 0
+ 350
+
+
+
+ 2
+
+
+
+ -
+
+
+ Selected
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
@@ -215,6 +217,12 @@
Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing
+
+ 8
+
+
+ 8
+
-
@@ -309,6 +317,9 @@
-
+
+ 8
+
3
@@ -420,6 +431,9 @@
+
+ true
+
-
diff --git a/plugins/filters/blur/kis_blur_filter.cpp b/plugins/filters/blur/kis_blur_filter.cpp
index 7511a22ce245b2cd6c88cae9eb695b1b08e03dd7..46b62dbe0dcbdb457377cbdf54afb52bbcfa3661 100644
--- a/plugins/filters/blur/kis_blur_filter.cpp
+++ b/plugins/filters/blur/kis_blur_filter.cpp
@@ -49,7 +49,7 @@ KisConfigWidget * KisBlurFilter::createConfigurationWidget(QWidget* parent, cons
return new KisWdgBlur(parent);
}
-KisFilterConfigurationSP KisBlurFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisBlurFilter::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration(id().id(), 1);
config->setProperty("halfWidth", 5);
diff --git a/plugins/filters/blur/kis_blur_filter.h b/plugins/filters/blur/kis_blur_filter.h
index 8fcdf9823e848d93f768248f90e0ee26d0a9780f..87e48eba15acac2fcbe38ca60c15e717d7f86e86 100644
--- a/plugins/filters/blur/kis_blur_filter.h
+++ b/plugins/filters/blur/kis_blur_filter.h
@@ -38,7 +38,7 @@ public:
return KoID("blur", i18n("Blur"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
QRect neededRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const;
diff --git a/plugins/filters/blur/kis_gaussian_blur_filter.cpp b/plugins/filters/blur/kis_gaussian_blur_filter.cpp
index 47a59b4caf9d7a6aa549c57ad20a92236024bf72..40450579d541bb7056e37dc10f9577dc6174dd49 100644
--- a/plugins/filters/blur/kis_gaussian_blur_filter.cpp
+++ b/plugins/filters/blur/kis_gaussian_blur_filter.cpp
@@ -53,7 +53,7 @@ KisConfigWidget * KisGaussianBlurFilter::createConfigurationWidget(QWidget* pare
return new KisWdgGaussianBlur(parent);
}
-KisFilterConfigurationSP KisGaussianBlurFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisGaussianBlurFilter::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration(id().id(), 1);
config->setProperty("horizRadius", 5);
diff --git a/plugins/filters/blur/kis_gaussian_blur_filter.h b/plugins/filters/blur/kis_gaussian_blur_filter.h
index cb8349860f57b6279807d3cb53ff34ed09ad2d6d..eb5e18da390caebb95baf6fb0efbf213d30a54e7 100644
--- a/plugins/filters/blur/kis_gaussian_blur_filter.h
+++ b/plugins/filters/blur/kis_gaussian_blur_filter.h
@@ -40,7 +40,7 @@ public:
return KoID("gaussian blur", i18n("Gaussian Blur"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
QRect neededRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const;
diff --git a/plugins/filters/blur/kis_lens_blur_filter.cpp b/plugins/filters/blur/kis_lens_blur_filter.cpp
index a1bc478869d5a7f72c3750668272aa91cb446c46..01c42c5f010d4342ce6f25421c737e10a3e5e8b2 100644
--- a/plugins/filters/blur/kis_lens_blur_filter.cpp
+++ b/plugins/filters/blur/kis_lens_blur_filter.cpp
@@ -65,7 +65,7 @@ QSize KisLensBlurFilter::getKernelHalfSize(const KisFilterConfigurationSP config
return QSize(w, h);
}
-KisFilterConfigurationSP KisLensBlurFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisLensBlurFilter::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration(id().id(), 1);
config->setProperty("irisShape", "Pentagon (5)");
diff --git a/plugins/filters/blur/kis_lens_blur_filter.h b/plugins/filters/blur/kis_lens_blur_filter.h
index 1f66559fa07c4075d6761be0ff610411ae3f61e6..11a06fe7e4fcbe79b0bd7bee8c648f01b83d91ba 100644
--- a/plugins/filters/blur/kis_lens_blur_filter.h
+++ b/plugins/filters/blur/kis_lens_blur_filter.h
@@ -42,7 +42,7 @@ public:
return KoID("lens blur", i18n("Lens Blur"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
static QSize getKernelHalfSize(const KisFilterConfigurationSP config, int lod);
diff --git a/plugins/filters/blur/kis_motion_blur_filter.cpp b/plugins/filters/blur/kis_motion_blur_filter.cpp
index b691615361f1c106e76dce6f446dc9659f850054..690d5495f2c69cf602bf7217552497fd77fda0a7 100644
--- a/plugins/filters/blur/kis_motion_blur_filter.cpp
+++ b/plugins/filters/blur/kis_motion_blur_filter.cpp
@@ -54,7 +54,7 @@ KisConfigWidget * KisMotionBlurFilter::createConfigurationWidget(QWidget* parent
return new KisWdgMotionBlur(parent);
}
-KisFilterConfigurationSP KisMotionBlurFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisMotionBlurFilter::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration(id().id(), 1);
config->setProperty("blurAngle", 0);
diff --git a/plugins/filters/blur/kis_motion_blur_filter.h b/plugins/filters/blur/kis_motion_blur_filter.h
index 5a1c4e238b7de9c6ce0904390df79a0e93ebd310..940c469c10c5d7bad1fde176c04e07fe382ebfef 100644
--- a/plugins/filters/blur/kis_motion_blur_filter.h
+++ b/plugins/filters/blur/kis_motion_blur_filter.h
@@ -42,7 +42,7 @@ public:
return KoID("motion blur", i18n("Motion Blur"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
QRect neededRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const;
diff --git a/plugins/filters/colors/kis_color_to_alpha.cpp b/plugins/filters/colors/kis_color_to_alpha.cpp
index dd2ffba25833b246240673f0752db04b10379800..fb48d46adeeba3d03f5f9f40e5e8b58ba1c5ed53 100644
--- a/plugins/filters/colors/kis_color_to_alpha.cpp
+++ b/plugins/filters/colors/kis_color_to_alpha.cpp
@@ -49,7 +49,7 @@ KisConfigWidget * KisFilterColorToAlpha::createConfigurationWidget(QWidget* pare
return new KisWdgColorToAlpha(parent);
}
-KisFilterConfigurationSP KisFilterColorToAlpha::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisFilterColorToAlpha::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration("colortoalpha", 1);
config->setProperty("targetcolor", QColor(255, 255, 255));
diff --git a/plugins/filters/colors/kis_color_to_alpha.h b/plugins/filters/colors/kis_color_to_alpha.h
index 0fffc0d18c436a44b83e132c2ea367c38a16f96f..01a8e21b99c5aa71c1895302f7e4ecea285d4682 100644
--- a/plugins/filters/colors/kis_color_to_alpha.h
+++ b/plugins/filters/colors/kis_color_to_alpha.h
@@ -43,7 +43,7 @@ public:
public:
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP dev) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
};
#endif
diff --git a/plugins/filters/colors/wdgcolortoalphabase.ui b/plugins/filters/colors/wdgcolortoalphabase.ui
index 070138601afebf2d47bb9a0f387016682729d3a2..56629fb17783655be39de38c12951ee7dbcb8ecd 100644
--- a/plugins/filters/colors/wdgcolortoalphabase.ui
+++ b/plugins/filters/colors/wdgcolortoalphabase.ui
@@ -63,7 +63,7 @@
-
-
+
0
@@ -192,9 +192,9 @@
- KisVisualColorSelector
+ KoTriangleColorSelector
QWidget
-
+ KoTriangleColorSelector.h
1
diff --git a/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cpp b/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cpp
index 2401b0dce60dd6a97be3a1162cff3b2f411b54b5..d6c6d04a1a21189318a3d52a9b77f2c84baa6eef 100644
--- a/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cpp
+++ b/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cpp
@@ -171,7 +171,7 @@ KisConfigWidget * KisBrightnessContrastFilter::createConfigurationWidget(QWidget
return new KisBrightnessContrastConfigWidget(parent, dev);
}
-KisFilterConfigurationSP KisBrightnessContrastFilter::factoryConfiguration(const KisPaintDeviceSP)
+KisFilterConfigurationSP KisBrightnessContrastFilter::factoryConfiguration()
const
{
return new KisBrightnessContrastFilterConfiguration();
diff --git a/plugins/filters/colorsfilters/kis_brightness_contrast_filter.h b/plugins/filters/colorsfilters/kis_brightness_contrast_filter.h
index 6a0f8a9739b3f746128739e9b7f6e7fa8bc00366..1a4508ba1d17d775e598d4381f667dc847a8cdc0 100644
--- a/plugins/filters/colorsfilters/kis_brightness_contrast_filter.h
+++ b/plugins/filters/colorsfilters/kis_brightness_contrast_filter.h
@@ -91,7 +91,7 @@ public:
static inline KoID id() {
return KoID("brightnesscontrast", i18n("Brightness / Contrast"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
};
diff --git a/plugins/filters/colorsfilters/kis_color_balance_filter.cpp b/plugins/filters/colorsfilters/kis_color_balance_filter.cpp
index 58e21f2430d621dd5be3849f15fb5c4fd0986351..c4e856eb7d3b2ef76dc9e7f4a9de3f4ea0898f02 100644
--- a/plugins/filters/colorsfilters/kis_color_balance_filter.cpp
+++ b/plugins/filters/colorsfilters/kis_color_balance_filter.cpp
@@ -57,7 +57,7 @@ KoColorTransformation * KisColorBalanceFilter::createTransformation(const KoColo
return cs->createColorTransformation("ColorBalance" , params);
}
-KisFilterConfigurationSP KisColorBalanceFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisColorBalanceFilter::factoryConfiguration() const
{
KisColorTransformationConfigurationSP config = new KisColorTransformationConfiguration(id().id(), 0);
config->setProperty("cyan_red_midtones", 0);
diff --git a/plugins/filters/colorsfilters/kis_color_balance_filter.h b/plugins/filters/colorsfilters/kis_color_balance_filter.h
index d02d3dbb69b627541afc920d60686fc960480f10..d7303e3ef5348d68db240b7266b2875e5fbe374c 100644
--- a/plugins/filters/colorsfilters/kis_color_balance_filter.h
+++ b/plugins/filters/colorsfilters/kis_color_balance_filter.h
@@ -53,7 +53,7 @@ public:
return KoID("colorbalance", i18n("Color Balance"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
};
diff --git a/plugins/filters/colorsfilters/kis_desaturate_filter.cpp b/plugins/filters/colorsfilters/kis_desaturate_filter.cpp
index bf4e7b9d5fee1db1914d2c4f237b761d6a06b0cc..30a48acdbf3d9bd6a266d8569d2ab952041b0fec 100644
--- a/plugins/filters/colorsfilters/kis_desaturate_filter.cpp
+++ b/plugins/filters/colorsfilters/kis_desaturate_filter.cpp
@@ -80,7 +80,7 @@ KoColorTransformation* KisDesaturateFilter::createTransformation(const KoColorSp
return cs->createColorTransformation("desaturate_adjustment", params);
}
-KisFilterConfigurationSP KisDesaturateFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisDesaturateFilter::factoryConfiguration() const
{
KisColorTransformationConfigurationSP config = new KisColorTransformationConfiguration(id().id(), 1);
config->setProperty("type", 0);
diff --git a/plugins/filters/colorsfilters/kis_desaturate_filter.h b/plugins/filters/colorsfilters/kis_desaturate_filter.h
index 9095dacf52ce24f2b6a2dddf6a41e31d3257702e..874bf2998045c9970cb2a745108f469657cddde3 100644
--- a/plugins/filters/colorsfilters/kis_desaturate_filter.h
+++ b/plugins/filters/colorsfilters/kis_desaturate_filter.h
@@ -46,7 +46,7 @@ public:
return KoID("desaturate", i18n("Desaturate"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
};
diff --git a/plugins/filters/colorsfilters/kis_hsv_adjustment_filter.cpp b/plugins/filters/colorsfilters/kis_hsv_adjustment_filter.cpp
index 4854ec254cf0c4a905d5e4f89562f8d9ced42f5c..66e11a275559f07941755490157711de90a0cebb 100644
--- a/plugins/filters/colorsfilters/kis_hsv_adjustment_filter.cpp
+++ b/plugins/filters/colorsfilters/kis_hsv_adjustment_filter.cpp
@@ -117,7 +117,7 @@ KoColorTransformation* KisHSVAdjustmentFilter::createTransformation(const KoColo
return cs->createColorTransformation("hsv_adjustment", params);
}
-KisFilterConfigurationSP KisHSVAdjustmentFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisHSVAdjustmentFilter::factoryConfiguration() const
{
KisColorTransformationConfigurationSP config = new KisColorTransformationConfiguration(id().id(), 1);
config->setProperty("h", 0);
diff --git a/plugins/filters/colorsfilters/kis_hsv_adjustment_filter.h b/plugins/filters/colorsfilters/kis_hsv_adjustment_filter.h
index 678779c5c85fba85e173fcfc753ceb48fd48d831..934cbb9f15f9bf058c669f904e06b3fdde3d4989 100644
--- a/plugins/filters/colorsfilters/kis_hsv_adjustment_filter.h
+++ b/plugins/filters/colorsfilters/kis_hsv_adjustment_filter.h
@@ -51,7 +51,7 @@ public:
return KoID("hsvadjustment", i18n("HSV/HSL Adjustment"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
};
diff --git a/plugins/filters/colorsfilters/kis_perchannel_filter.cpp b/plugins/filters/colorsfilters/kis_perchannel_filter.cpp
index 3c3cce30d8c7f49e9d0164b2aeb17814b0f4cde1..5d92ce494a5f40eaa5bdba4a7814ff1f95be303d 100644
--- a/plugins/filters/colorsfilters/kis_perchannel_filter.cpp
+++ b/plugins/filters/colorsfilters/kis_perchannel_filter.cpp
@@ -475,7 +475,7 @@ KisConfigWidget * KisPerChannelFilter::createConfigurationWidget(QWidget *parent
return new KisPerChannelConfigWidget(parent, dev);
}
-KisFilterConfigurationSP KisPerChannelFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisPerChannelFilter::factoryConfiguration() const
{
return new KisPerChannelFilterConfiguration(0);
}
diff --git a/plugins/filters/colorsfilters/kis_perchannel_filter.h b/plugins/filters/colorsfilters/kis_perchannel_filter.h
index ce272ead29fa3844d54dcd0360078d39d8dafd7d..566734bd606c856225016685602dfe946509876f 100644
--- a/plugins/filters/colorsfilters/kis_perchannel_filter.h
+++ b/plugins/filters/colorsfilters/kis_perchannel_filter.h
@@ -85,7 +85,7 @@ public:
KisPerChannelFilter();
public:
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
virtual KoColorTransformation* createTransformation(const KoColorSpace* cs, const KisFilterConfigurationSP config) const;
diff --git a/plugins/filters/embossfilter/kis_emboss_filter.cpp b/plugins/filters/embossfilter/kis_emboss_filter.cpp
index 64981dae47636184f5fb83486f99ab164bd1f95b..0eed8d49ea9ac7a9bde4a56ce754200b184f7351 100644
--- a/plugins/filters/embossfilter/kis_emboss_filter.cpp
+++ b/plugins/filters/embossfilter/kis_emboss_filter.cpp
@@ -58,7 +58,7 @@ KisEmbossFilter::KisEmbossFilter() : KisFilter(id(), categoryEmboss(), i18n("&Em
setSupportsAdjustmentLayers(false);
}
-KisFilterConfigurationSP KisEmbossFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisEmbossFilter::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration(id().id(), 0);
config->setProperty("depth", 30);
diff --git a/plugins/filters/embossfilter/kis_emboss_filter.h b/plugins/filters/embossfilter/kis_emboss_filter.h
index 2744d2812fd469f2647cc8c87b1a2d0feeb22a1a..e441ea309311e63e4ce636059ab26bdc4c09f0b1 100644
--- a/plugins/filters/embossfilter/kis_emboss_filter.h
+++ b/plugins/filters/embossfilter/kis_emboss_filter.h
@@ -42,7 +42,7 @@ public:
public:
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
protected:
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
private:
inline int Lim_Max(int Now, int Up, int Max) const;
diff --git a/plugins/filters/fastcolortransfer/fastcolortransfer.cpp b/plugins/filters/fastcolortransfer/fastcolortransfer.cpp
index 558bb8522f06a88b5917e652770604149f5a9073..df9b68335458a15db0fdb745951d2ecad51876b1 100644
--- a/plugins/filters/fastcolortransfer/fastcolortransfer.cpp
+++ b/plugins/filters/fastcolortransfer/fastcolortransfer.cpp
@@ -69,10 +69,10 @@ KisConfigWidget * KisFilterFastColorTransfer::createConfigurationWidget(QWidget*
return new KisWdgFastColorTransfer(parent);
}
-KisFilterConfigurationSP KisFilterFastColorTransfer::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisFilterFastColorTransfer::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration(id().id(), 1);
- config->setProperty("filename", ""); // TODO: put an exemple image in share/krita, like a sunset that what's give the best results
+ config->setProperty("filename", "");
return config;
}
diff --git a/plugins/filters/fastcolortransfer/fastcolortransfer.h b/plugins/filters/fastcolortransfer/fastcolortransfer.h
index f906fe66be6d571dbefb5efdbc9dfbbb2f604ab0..592e1d4e31d90f7f8a3f2ebbb9352e78fe74fb48 100644
--- a/plugins/filters/fastcolortransfer/fastcolortransfer.h
+++ b/plugins/filters/fastcolortransfer/fastcolortransfer.h
@@ -49,7 +49,7 @@ public:
public:
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
};
#endif
diff --git a/plugins/filters/gradientmap/krita_filter_gradient_map.cpp b/plugins/filters/gradientmap/krita_filter_gradient_map.cpp
index 06b10db86e472717721962e6035a778b0b1ebcb7..1f4c2869c7bb7d1fee0773318b43daaf9d95784f 100644
--- a/plugins/filters/gradientmap/krita_filter_gradient_map.cpp
+++ b/plugins/filters/gradientmap/krita_filter_gradient_map.cpp
@@ -41,7 +41,7 @@ KritaFilterGradientMap::KritaFilterGradientMap() : KisFilter(id(), categoryMap()
setShowConfigurationWidget(true);
setSupportsLevelOfDetail(true);
setSupportsPainting(true);
- setSupportsAdjustmentLayers(true);
+ setSupportsAdjustmentLayers(false);
setSupportsThreading(true);
}
@@ -57,6 +57,10 @@ void KritaFilterGradientMap::processImpl(KisPaintDeviceSP device,
}
KoAbstractGradient *gradient = KoResourceServerProvider::instance()->gradientServer(false)->resourceByName(config->getString("gradientName"));
+ if (!gradient) {
+ qDebug() << "Could not find gradient" << config->getString("gradientName");
+ return;
+ }
KoColorSet *gradientCache = new KoColorSet();
for (int i=0; i<256; i++) {
@@ -84,7 +88,7 @@ void KritaFilterGradientMap::processImpl(KisPaintDeviceSP device,
}
-KisFilterConfigurationSP KritaFilterGradientMap::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KritaFilterGradientMap::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration("gradientmap", 1);
KoAbstractGradient *gradient = KoResourceServerProvider::instance()->gradientServer(false)->resources().first();
diff --git a/plugins/filters/gradientmap/krita_filter_gradient_map.h b/plugins/filters/gradientmap/krita_filter_gradient_map.h
index 6d805da010e4f2c28191721cfd3d612c23052229..4a3303175c7580ad2ceeda413a1f6002512b43a9 100644
--- a/plugins/filters/gradientmap/krita_filter_gradient_map.h
+++ b/plugins/filters/gradientmap/krita_filter_gradient_map.h
@@ -44,7 +44,7 @@ public:
const KisFilterConfigurationSP config,
KoUpdater *progressUpdater) const;
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
virtual KisConfigWidget* createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
};
diff --git a/plugins/filters/halftone/kis_halftone_filter.cpp b/plugins/filters/halftone/kis_halftone_filter.cpp
index c5782dde344f3bad90f9c5366e9b337988737202..9c8c9db5eafdbae3532b81d4655cd76f83a6b41c 100644
--- a/plugins/filters/halftone/kis_halftone_filter.cpp
+++ b/plugins/filters/halftone/kis_halftone_filter.cpp
@@ -171,10 +171,8 @@ void KisHalftoneFilter::processImpl(KisPaintDeviceSP device,
device->clearSelection(alpha);
}
-KisFilterConfigurationSP KisHalftoneFilter::factoryConfiguration(const KisPaintDeviceSP dev) const
+KisFilterConfigurationSP KisHalftoneFilter::factoryConfiguration() const
{
- Q_UNUSED(dev);
-
KisFilterConfigurationSP config = new KisFilterConfiguration("halftone", 1);
config->setProperty("cellSize", 8.0);
config->setProperty("patternAngle", 45.0);
diff --git a/plugins/filters/halftone/kis_halftone_filter.h b/plugins/filters/halftone/kis_halftone_filter.h
index bcdb18e4b44e955d31d5e392acd3d60628699b42..6c44db621abe4e4be9a7a20cde8907d975b21f95 100644
--- a/plugins/filters/halftone/kis_halftone_filter.h
+++ b/plugins/filters/halftone/kis_halftone_filter.h
@@ -77,7 +77,7 @@ public:
const KisFilterConfigurationSP config,
KoUpdater *progressUpdater) const;
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP dev) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
virtual KisConfigWidget *createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev) const;
diff --git a/plugins/filters/imageenhancement/kis_simple_noise_reducer.cpp b/plugins/filters/imageenhancement/kis_simple_noise_reducer.cpp
index 0d6dde31d64b7ffc64b139f866b059dd25820879..86b1e2e7ee990f5b541d470ed1931d98c5862eff 100644
--- a/plugins/filters/imageenhancement/kis_simple_noise_reducer.cpp
+++ b/plugins/filters/imageenhancement/kis_simple_noise_reducer.cpp
@@ -55,7 +55,7 @@ KisConfigWidget * KisSimpleNoiseReducer::createConfigurationWidget(QWidget* pare
return new KisMultiIntegerFilterWidget(id().id(), parent, id().id(), param);
}
-KisFilterConfigurationSP KisSimpleNoiseReducer::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisSimpleNoiseReducer::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration(id().id(), 0);
config->setProperty("threshold", 15);
@@ -80,7 +80,7 @@ void KisSimpleNoiseReducer::processImpl(KisPaintDeviceSP device,
int threshold, windowsize;
- KisFilterConfigurationSP config = _config ? _config : defaultConfiguration(device);
+ KisFilterConfigurationSP config = _config ? _config : defaultConfiguration();
if (progressUpdater) {
progressUpdater->setRange(0, applyRect.width() * applyRect.height());
diff --git a/plugins/filters/imageenhancement/kis_simple_noise_reducer.h b/plugins/filters/imageenhancement/kis_simple_noise_reducer.h
index 94899b488c6ca5e811c379d0cec79e874bab0bc1..a78ca450752b3666009e91dc3226feb2c3fd595c 100644
--- a/plugins/filters/imageenhancement/kis_simple_noise_reducer.h
+++ b/plugins/filters/imageenhancement/kis_simple_noise_reducer.h
@@ -42,7 +42,7 @@ public:
return KoID("gaussiannoisereducer", i18n("Gaussian Noise Reducer"));
}
protected:
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
};
#endif
diff --git a/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.cpp b/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.cpp
index d09b3b7f8ec4f0fcf6c11362aa2f0198da29aea0..8a425011dad483f9b3e1fe83b2380144e81d5e8b 100644
--- a/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.cpp
+++ b/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.cpp
@@ -51,7 +51,7 @@ KisConfigWidget * KisWaveletNoiseReduction::createConfigurationWidget(QWidget* p
return new KisMultiDoubleFilterWidget(id().id(), parent, id().id(), param);
}
-KisFilterConfigurationSP KisWaveletNoiseReduction::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisWaveletNoiseReduction::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration(id().id(), 0);
config->setProperty("threshold", BEST_WAVELET_THRESHOLD_VALUE);
@@ -68,7 +68,7 @@ void KisWaveletNoiseReduction::processImpl(KisPaintDeviceSP device,
// TODO take selections into account
float threshold;
- KisFilterConfigurationSP config = _config ? _config : defaultConfiguration(device);
+ KisFilterConfigurationSP config = _config ? _config : defaultConfiguration();
threshold = config->getDouble("threshold", BEST_WAVELET_THRESHOLD_VALUE);
diff --git a/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.h b/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.h
index 99858e2dfdc6a56c2e077d64fb2f023ae41f20e6..e6cbc43854209a14faec4d67ba268dc771b372c6 100644
--- a/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.h
+++ b/plugins/filters/imageenhancement/kis_wavelet_noise_reduction.h
@@ -50,7 +50,7 @@ public:
}
private:
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
};
diff --git a/plugins/filters/indexcolors/indexcolors.cpp b/plugins/filters/indexcolors/indexcolors.cpp
index 3e4aca223e1e9e91b7d806444a7086f376b8b0d8..87545925296b32ada887e7545e45e3fecead138a 100644
--- a/plugins/filters/indexcolors/indexcolors.cpp
+++ b/plugins/filters/indexcolors/indexcolors.cpp
@@ -84,7 +84,7 @@ KisConfigWidget* KisFilterIndexColors::createConfigurationWidget(QWidget* parent
return w;
}
-KisFilterConfigurationSP KisFilterIndexColors::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisFilterIndexColors::factoryConfiguration() const
{
KisColorTransformationConfigurationSP config = new KisColorTransformationConfiguration(id().id(), 0);
@@ -141,4 +141,4 @@ void KisIndexColorTransformation::transform(const quint8* src, quint8* dst, qint
}
}
-#include "indexcolors.moc"
\ No newline at end of file
+#include "indexcolors.moc"
diff --git a/plugins/filters/indexcolors/indexcolors.h b/plugins/filters/indexcolors/indexcolors.h
index 7bbe1bfb755165e47a0a7be426524154ef85bf89..943fe0d5be5351f866cb34882450bff7c6730286 100644
--- a/plugins/filters/indexcolors/indexcolors.h
+++ b/plugins/filters/indexcolors/indexcolors.h
@@ -50,7 +50,7 @@ public:
return KoID("indexcolors", i18n("Index Colors"));
}
protected:
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
};
class KisIndexColorTransformation : public KoColorTransformation
diff --git a/plugins/filters/levelfilter/kis_level_filter.cpp b/plugins/filters/levelfilter/kis_level_filter.cpp
index 1d479e2a2e111407947fd4a34ca0114302b1b7fd..35e8db9021bfcc16e64b1306b7d22e273927a1a3 100644
--- a/plugins/filters/levelfilter/kis_level_filter.cpp
+++ b/plugins/filters/levelfilter/kis_level_filter.cpp
@@ -279,7 +279,7 @@ KisPropertiesConfigurationSP KisLevelConfigWidget::configuration() const
config->setProperty("blackvalue", m_page.blackspin->value());
config->setProperty("whitevalue", m_page.whitespin->value());
- config->setProperty("gammavalue", m_page.ingradient->getGamma());
+ config->setProperty("gammavalue", m_page.gammaspin->value());
config->setProperty("outblackvalue", m_page.outblackspin->value());
config->setProperty("outwhitevalue", m_page.outwhitespin->value());
diff --git a/plugins/filters/levelfilter/kis_level_filter.h b/plugins/filters/levelfilter/kis_level_filter.h
index 114c074033ecc8057bbf218d40abf0a0aa13cbb9..d0fe6cf42ce7d3dd0c9dc66817fc7dbca85519d9 100644
--- a/plugins/filters/levelfilter/kis_level_filter.h
+++ b/plugins/filters/levelfilter/kis_level_filter.h
@@ -43,7 +43,7 @@ public:
public:
-// virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+// virtual KisFilterConfigurationSP factoryConfiguration() const;
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
virtual KoColorTransformation* createTransformation(const KoColorSpace* cs, const KisFilterConfigurationSP config) const;
diff --git a/plugins/filters/levelfilter/wdg_level.ui b/plugins/filters/levelfilter/wdg_level.ui
index 6661c6655cfd5e390bb7dd9f6ffc4fe654ba7b8b..faa3ea90a7145c3403e175693c262cba218290e8 100644
--- a/plugins/filters/levelfilter/wdg_level.ui
+++ b/plugins/filters/levelfilter/wdg_level.ui
@@ -6,8 +6,8 @@
0
0
- 259
- 332
+ 263
+ 344
@@ -158,8 +158,11 @@
QAbstractSpinBox::PlusMinus
+
+ 3
+
- 0.100000000000000
+ 0.001000000000000
10.000000000000000
diff --git a/plugins/filters/noisefilter/noisefilter.cpp b/plugins/filters/noisefilter/noisefilter.cpp
index 008db814821d627ea6e945993d49d2b39882a09d..c3e192b31d4ba66c28054629bff8bdaaacf8b4f3 100644
--- a/plugins/filters/noisefilter/noisefilter.cpp
+++ b/plugins/filters/noisefilter/noisefilter.cpp
@@ -67,7 +67,7 @@ KisFilterNoise::KisFilterNoise() : KisFilter(id(), categoryOther(), i18n("&Rando
setSupportsPainting(true);
}
-KisFilterConfigurationSP KisFilterNoise::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisFilterNoise::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration("noise", 1);
config->setProperty("level", 50);
diff --git a/plugins/filters/noisefilter/noisefilter.h b/plugins/filters/noisefilter/noisefilter.h
index dfd0570b9af6e5cdeb891bb42e947fa90b4fdcc6..6f3f36b088bcc36ac533f11e2c90a6a4b81af250 100644
--- a/plugins/filters/noisefilter/noisefilter.h
+++ b/plugins/filters/noisefilter/noisefilter.h
@@ -49,7 +49,7 @@ public:
static inline KoID id() {
return KoID("noise", i18n("Noise"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
};
diff --git a/plugins/filters/oilpaintfilter/kis_oilpaint_filter.cpp b/plugins/filters/oilpaintfilter/kis_oilpaint_filter.cpp
index 9b3b165b92e2907e61c712f1a50c32bddb67b75b..cb4e9eb8deaee5fae36e07945a9a5f24cd14ec98 100644
--- a/plugins/filters/oilpaintfilter/kis_oilpaint_filter.cpp
+++ b/plugins/filters/oilpaintfilter/kis_oilpaint_filter.cpp
@@ -206,11 +206,11 @@ KisConfigWidget * KisOilPaintFilter::createConfigurationWidget(QWidget* parent,
param.push_back(KisIntegerWidgetParam(1, 5, 1, i18n("Brush size"), "brushSize"));
param.push_back(KisIntegerWidgetParam(10, 255, 30, i18nc("smooth out the painting strokes the filter creates", "Smooth"), "smooth"));
KisMultiIntegerFilterWidget * w = new KisMultiIntegerFilterWidget(id().id(), parent, id().id(), param);
- w->setConfiguration(factoryConfiguration(0));
+ w->setConfiguration(factoryConfiguration());
return w;
}
-KisFilterConfigurationSP KisOilPaintFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisOilPaintFilter::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration("oilpaint", 1);
config->setProperty("brushSize", 1);
diff --git a/plugins/filters/oilpaintfilter/kis_oilpaint_filter.h b/plugins/filters/oilpaintfilter/kis_oilpaint_filter.h
index 570a7730fdaa024b31073fcb7cc200430a77335d..846ebdeaa023662173d8085507cd50bd2a8dbcee 100644
--- a/plugins/filters/oilpaintfilter/kis_oilpaint_filter.h
+++ b/plugins/filters/oilpaintfilter/kis_oilpaint_filter.h
@@ -38,7 +38,7 @@ public:
return KoID("oilpaint", i18n("Oilpaint"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
public:
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
diff --git a/plugins/filters/phongbumpmap/kis_phong_bumpmap_filter.cpp b/plugins/filters/phongbumpmap/kis_phong_bumpmap_filter.cpp
index a34b1b7e8ebbb98c119a202800a67b3789b689b1..4b7695d9627fe8ff3120daf13879b90ab6d72e04 100644
--- a/plugins/filters/phongbumpmap/kis_phong_bumpmap_filter.cpp
+++ b/plugins/filters/phongbumpmap/kis_phong_bumpmap_filter.cpp
@@ -189,7 +189,7 @@ void KisFilterPhongBumpmap::processImpl(KisPaintDeviceSP device,
if (progressUpdater) progressUpdater->setProgress(100);
}
-KisFilterConfigurationSP KisFilterPhongBumpmap::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisFilterPhongBumpmap::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration(id(), 2);
config->setProperty(PHONG_AMBIENT_REFLECTIVITY, 0.2);
diff --git a/plugins/filters/phongbumpmap/kis_phong_bumpmap_filter.h b/plugins/filters/phongbumpmap/kis_phong_bumpmap_filter.h
index 2c8abbc945ff7cb1b22b4ffee8cfcde83b098ec1..a2789db63481e287454c15a7ec8cc824a8385b3a 100644
--- a/plugins/filters/phongbumpmap/kis_phong_bumpmap_filter.h
+++ b/plugins/filters/phongbumpmap/kis_phong_bumpmap_filter.h
@@ -46,7 +46,7 @@ public:
QRect changedRect(const QRect &rect, const KisFilterConfigurationSP config, int lod) const;
virtual KisConfigWidget *createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev) const;
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
private:
//bool m_usenormalmap;
};
diff --git a/plugins/filters/pixelizefilter/kis_pixelize_filter.cpp b/plugins/filters/pixelizefilter/kis_pixelize_filter.cpp
index e6dff618e870d2c34480f880ccf42326b5702a88..f913f493570ec1e712eeb3c68c3c2974b479f8e2 100644
--- a/plugins/filters/pixelizefilter/kis_pixelize_filter.cpp
+++ b/plugins/filters/pixelizefilter/kis_pixelize_filter.cpp
@@ -132,7 +132,7 @@ KisConfigWidget * KisPixelizeFilter::createConfigurationWidget(QWidget* parent,
return new KisMultiIntegerFilterWidget(id().id(), parent, id().id(), param);
}
-KisFilterConfigurationSP KisPixelizeFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisPixelizeFilter::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration("pixelize", 1);
config->setProperty("pixelWidth", 10);
diff --git a/plugins/filters/pixelizefilter/kis_pixelize_filter.h b/plugins/filters/pixelizefilter/kis_pixelize_filter.h
index 19b1dfb705d413e135f63df138d42cf745555cd5..f1c73f6418178294e899d9601a3003c20bbacfd2 100644
--- a/plugins/filters/pixelizefilter/kis_pixelize_filter.h
+++ b/plugins/filters/pixelizefilter/kis_pixelize_filter.h
@@ -41,7 +41,7 @@ public:
public:
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
};
#endif
diff --git a/plugins/filters/posterize/posterize.cpp b/plugins/filters/posterize/posterize.cpp
index b9e82783bf7f4c5ee6ffe32345844c1ddf4b05ba..4b7628b8499680b28ba5b3529c2b88cf740fd57d 100644
--- a/plugins/filters/posterize/posterize.cpp
+++ b/plugins/filters/posterize/posterize.cpp
@@ -77,7 +77,7 @@ KisConfigWidget* KisFilterPosterize::createConfigurationWidget(QWidget* parent,
return new KisMultiIntegerFilterWidget(id().id(), parent, id().id(), param);
}
-KisFilterConfigurationSP KisFilterPosterize::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisFilterPosterize::factoryConfiguration() const
{
KisColorTransformationConfigurationSP config = new KisColorTransformationConfiguration(id().id(), 0);
config->setProperty("steps", 16);
diff --git a/plugins/filters/posterize/posterize.h b/plugins/filters/posterize/posterize.h
index e66016bb056b045c555a3145c0df75f1e22c5741..d306424c773005abc422052c6bf97f8ac10e8d3e 100644
--- a/plugins/filters/posterize/posterize.h
+++ b/plugins/filters/posterize/posterize.h
@@ -43,7 +43,7 @@ public:
return KoID("posterize", i18n("Posterize"));
}
protected:
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
};
class KisPosterizeColorTransformation : public KoColorTransformation
diff --git a/plugins/filters/raindropsfilter/kis_raindrops_filter.cpp b/plugins/filters/raindropsfilter/kis_raindrops_filter.cpp
index 1c061b2d3f0d77d2d0a85a461b1c2d77da735e3b..9fcb7109ab354221c374f5da0b02887b8e79baeb 100644
--- a/plugins/filters/raindropsfilter/kis_raindrops_filter.cpp
+++ b/plugins/filters/raindropsfilter/kis_raindrops_filter.cpp
@@ -385,11 +385,11 @@ KisConfigWidget * KisRainDropsFilter::createConfigurationWidget(QWidget* parent,
param.push_back(KisIntegerWidgetParam(1, 500, 80, i18n("Number"), "number"));
param.push_back(KisIntegerWidgetParam(1, 100, 30, i18n("Fish eyes"), "fishEyes"));
KisMultiIntegerFilterWidget * w = new KisMultiIntegerFilterWidget(id().id(), parent, id().id(), param);
- w->setConfiguration(factoryConfiguration(0));
+ w->setConfiguration(factoryConfiguration());
return w;
}
-KisFilterConfigurationSP KisRainDropsFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisRainDropsFilter::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration("raindrops", 2);
config->setProperty("dropsize", 80);
diff --git a/plugins/filters/raindropsfilter/kis_raindrops_filter.h b/plugins/filters/raindropsfilter/kis_raindrops_filter.h
index 61712794b5e048035d30c08c9d60aa8b88008692..b542ac62760355d678e0ce1b8172b8dc41e86806 100644
--- a/plugins/filters/raindropsfilter/kis_raindrops_filter.h
+++ b/plugins/filters/raindropsfilter/kis_raindrops_filter.h
@@ -39,7 +39,7 @@ public:
return KoID("raindrops", i18n("Raindrops"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
public:
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
private:
diff --git a/plugins/filters/randompickfilter/randompickfilter.cpp b/plugins/filters/randompickfilter/randompickfilter.cpp
index f871e9ddb1e54eeee38af51015ee149283b24fdd..d88c3f7a9a41e63c6d13a04101bc9bd8e1d762b7 100644
--- a/plugins/filters/randompickfilter/randompickfilter.cpp
+++ b/plugins/filters/randompickfilter/randompickfilter.cpp
@@ -131,7 +131,7 @@ KisConfigWidget * KisFilterRandomPick::createConfigurationWidget(QWidget* parent
return new KisWdgRandomPick((KisFilter*)this, (QWidget*)parent);
}
-KisFilterConfigurationSP KisFilterRandomPick::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisFilterRandomPick::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration("randompick", 1);
config->setProperty("level", 50);
diff --git a/plugins/filters/randompickfilter/randompickfilter.h b/plugins/filters/randompickfilter/randompickfilter.h
index 0937c67a0e444c4a27872410ba5fac97bd9562f6..6056a9fb448d31f47657a2ac00fbb24848ca56f0 100644
--- a/plugins/filters/randompickfilter/randompickfilter.h
+++ b/plugins/filters/randompickfilter/randompickfilter.h
@@ -49,7 +49,7 @@ public:
return KoID("randompick", i18n("Random Pick"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
public:
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
diff --git a/plugins/filters/roundcorners/kis_round_corners_filter.cpp b/plugins/filters/roundcorners/kis_round_corners_filter.cpp
index 3f12d65cc44550affcdf2160ca2c53b13607906c..5a244e524c4c37702edcbfa1c55297c39abf4bb2 100644
--- a/plugins/filters/roundcorners/kis_round_corners_filter.cpp
+++ b/plugins/filters/roundcorners/kis_round_corners_filter.cpp
@@ -130,7 +130,7 @@ KisConfigWidget * KisRoundCornersFilter::createConfigurationWidget(QWidget* pare
}
-KisFilterConfigurationSP KisRoundCornersFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisRoundCornersFilter::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration("roundcorners", 1);
config->setProperty("radius", 30);
diff --git a/plugins/filters/roundcorners/kis_round_corners_filter.h b/plugins/filters/roundcorners/kis_round_corners_filter.h
index 6afb1688de1aec47522a8c002379e0d9084b5b8a..2b9b25ea4fc3bf8e077921de59a7f31befb2019d 100644
--- a/plugins/filters/roundcorners/kis_round_corners_filter.h
+++ b/plugins/filters/roundcorners/kis_round_corners_filter.h
@@ -38,7 +38,7 @@ public:
static inline KoID id() {
return KoID("roundcorners", i18n("Round Corners"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
public:
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
private:
diff --git a/plugins/filters/smalltilesfilter/kis_small_tiles_filter.cpp b/plugins/filters/smalltilesfilter/kis_small_tiles_filter.cpp
index 5cd51d0df9c8889c216e12a97981e621dea6dd5c..0d1c3dd3c139c3276da7df6e7fb22b204ef29c6d 100644
--- a/plugins/filters/smalltilesfilter/kis_small_tiles_filter.cpp
+++ b/plugins/filters/smalltilesfilter/kis_small_tiles_filter.cpp
@@ -102,7 +102,7 @@ KisConfigWidget * KisSmallTilesFilter::createConfigurationWidget(QWidget* parent
}
-KisFilterConfigurationSP KisSmallTilesFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisSmallTilesFilter::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration("smalltiles", 1);
config->setProperty("numberOfTiles", 2);
diff --git a/plugins/filters/smalltilesfilter/kis_small_tiles_filter.h b/plugins/filters/smalltilesfilter/kis_small_tiles_filter.h
index c14495306eaf4bd8e709d9239c93a7e3ad16058b..72d045bf2a14f6a22e325f4e515b9d4cf5c8c8c8 100644
--- a/plugins/filters/smalltilesfilter/kis_small_tiles_filter.h
+++ b/plugins/filters/smalltilesfilter/kis_small_tiles_filter.h
@@ -41,7 +41,7 @@ public:
return KoID("smalltiles", i18n("Small Tiles"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
public:
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
diff --git a/plugins/filters/tests/kis_all_filter_test.cpp b/plugins/filters/tests/kis_all_filter_test.cpp
index acb4a12262bb1166306e51cf95aeb971d67cbcae..8eed780ab0de78c608db1dde1715d96786c8f85e 100644
--- a/plugins/filters/tests/kis_all_filter_test.cpp
+++ b/plugins/filters/tests/kis_all_filter_test.cpp
@@ -68,7 +68,7 @@ bool testFilterSrcNotIsDev(KisFilterSP f)
dev->convertFromQImage(qimage, 0, 0, 0);
// Get the predefined configuration from a file
- KisFilterConfigurationSP kfc = f->defaultConfiguration(dev);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
QFile file(QString(FILES_DATA_DIR) + QDir::separator() + f->id() + ".cfg");
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
@@ -108,7 +108,7 @@ bool testFilterNoTransaction(KisFilterSP f)
dev->convertFromQImage(qimage, 0, 0, 0);
// Get the predefined configuration from a file
- KisFilterConfigurationSP kfc = f->defaultConfiguration(dev);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
QFile file(QString(FILES_DATA_DIR) + QDir::separator() + f->id() + ".cfg");
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
@@ -154,7 +154,7 @@ bool testFilter(KisFilterSP f)
KisTransaction * cmd = new KisTransaction(kundo2_noi18n(f->name()), dev);
// Get the predefined configuration from a file
- KisFilterConfigurationSP kfc = f->defaultConfiguration(dev);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
QFile file(QString(FILES_DATA_DIR) + QDir::separator() + f->id() + ".cfg");
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
@@ -198,7 +198,7 @@ bool testFilterWithSelections(KisFilterSP f)
dev->convertFromQImage(qimage, 0, 0, 0);
// Get the predefined configuration from a file
- KisFilterConfigurationSP kfc = f->defaultConfiguration(dev);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
QFile file(QString(FILES_DATA_DIR) + QDir::separator() + f->id() + ".cfg");
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
diff --git a/plugins/filters/tests/kis_crash_filter_test.cpp b/plugins/filters/tests/kis_crash_filter_test.cpp
index dd770f210666349772dd6da8df2482175da0ac04..565216b7666ec0359d70f1df3c102dcbf55eb68d 100644
--- a/plugins/filters/tests/kis_crash_filter_test.cpp
+++ b/plugins/filters/tests/kis_crash_filter_test.cpp
@@ -38,7 +38,7 @@ bool KisCrashFilterTest::applyFilter(const KoColorSpace * cs, KisFilterSP f)
dev->convertFromQImage(qimage, 0, 0, 0);
// Get the predefined configuration from a file
- KisFilterConfigurationSP kfc = f->defaultConfiguration(dev);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
QFile file(QString(FILES_DATA_DIR) + QDir::separator() + f->id() + ".cfg");
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
diff --git a/plugins/filters/threshold/threshold.cpp b/plugins/filters/threshold/threshold.cpp
index fbd51dd2d0c6874ce269ca3e5f06dc44fb7d84ab..7d23faea0bacbdf77a6fb3b0f7b231aa330a6205 100644
--- a/plugins/filters/threshold/threshold.cpp
+++ b/plugins/filters/threshold/threshold.cpp
@@ -106,7 +106,7 @@ void KisFilterThreshold::processImpl(KisPaintDeviceSP device,
}
-KisFilterConfigurationSP KisFilterThreshold::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisFilterThreshold::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration("threshold", 1);
config->setProperty("threshold", 128);
diff --git a/plugins/filters/threshold/threshold.h b/plugins/filters/threshold/threshold.h
index 29b04d1381c5c0332d17a633707237c736fa39f3..ff84d21af0c3f25bbb8ebda10f985f4c47fe6142 100644
--- a/plugins/filters/threshold/threshold.h
+++ b/plugins/filters/threshold/threshold.h
@@ -58,7 +58,7 @@ public:
const KisFilterConfigurationSP config,
KoUpdater *progressUpdater) const;
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
virtual KisConfigWidget *createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev) const;
diff --git a/plugins/filters/unsharp/kis_unsharp_filter.cpp b/plugins/filters/unsharp/kis_unsharp_filter.cpp
index 96746914892029fd25746aad35b9cddda82f664b..db212bce42eef8fa4ffb4646470c1deff80425fa 100644
--- a/plugins/filters/unsharp/kis_unsharp_filter.cpp
+++ b/plugins/filters/unsharp/kis_unsharp_filter.cpp
@@ -62,7 +62,7 @@ KisConfigWidget * KisUnsharpFilter::createConfigurationWidget(QWidget* parent, c
return new KisWdgUnsharp(parent);
}
-KisFilterConfigurationSP KisUnsharpFilter::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisUnsharpFilter::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration(id().id(), 1);
config->setProperty("halfSize", 1);
diff --git a/plugins/filters/unsharp/kis_unsharp_filter.h b/plugins/filters/unsharp/kis_unsharp_filter.h
index 34bfb5d6d5644a81aa72c3f37446af43c522176a..5a59acedb5d92cd781b57f8e6001fce3c200f380 100644
--- a/plugins/filters/unsharp/kis_unsharp_filter.h
+++ b/plugins/filters/unsharp/kis_unsharp_filter.h
@@ -40,7 +40,7 @@ public:
}
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
QRect changedRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const;
QRect neededRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const;
diff --git a/plugins/filters/unsharp/tests/kis_unsharp_mask_test.cpp b/plugins/filters/unsharp/tests/kis_unsharp_mask_test.cpp
index 4ad7a551017bd43ec54a452bab462cbc83b6de6f..826da4297f202ccb73b9dff38d3f9bc7ec484719 100644
--- a/plugins/filters/unsharp/tests/kis_unsharp_mask_test.cpp
+++ b/plugins/filters/unsharp/tests/kis_unsharp_mask_test.cpp
@@ -42,7 +42,7 @@ void KisUnsharpMaskTest::testUnsharpWithTransparency()
KisFilterSP f = KisFilterRegistry::instance()->value("unsharp");
Q_ASSERT(f);
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
Q_ASSERT(kfc);
kfc->setProperty("halfSize", 3);
diff --git a/plugins/filters/wavefilter/wavefilter.cpp b/plugins/filters/wavefilter/wavefilter.cpp
index d468c6165ba959dae32c8e5de5bf0e8bca1d13d5..a711983e5cfeb18008e762b9f28ab7825d67287e 100644
--- a/plugins/filters/wavefilter/wavefilter.cpp
+++ b/plugins/filters/wavefilter/wavefilter.cpp
@@ -102,7 +102,7 @@ KisFilterWave::KisFilterWave() : KisFilter(id(), categoryOther(), i18n("&Wave...
}
-KisFilterConfigurationSP KisFilterWave::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisFilterWave::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration("wave", 1);
config->setProperty("horizontalwavelength", 50);
diff --git a/plugins/filters/wavefilter/wavefilter.h b/plugins/filters/wavefilter/wavefilter.h
index 16f435ef9757d30a5948ad669d6e0565ea9dd4dd..cd197a5cfe88b6a368d6e927210313380a9aef0a 100644
--- a/plugins/filters/wavefilter/wavefilter.h
+++ b/plugins/filters/wavefilter/wavefilter.h
@@ -51,7 +51,7 @@ public:
return KoID("wave", i18n("Wave"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
public:
virtual QRect neededRect(const QRect& rect, const KisFilterConfigurationSP config = 0, int lod = 0) const;
diff --git a/plugins/flake/textshape/kotext/KoTextEditor.cpp b/plugins/flake/textshape/kotext/KoTextEditor.cpp
index 8042707d7a251fdc7f6d15aebacf52094145c720..6824c52cbce5b1ddf3327bd6532cc20a640d07d0 100644
--- a/plugins/flake/textshape/kotext/KoTextEditor.cpp
+++ b/plugins/flake/textshape/kotext/KoTextEditor.cpp
@@ -257,127 +257,8 @@ const QTextCursor KoTextEditor::constCursor() const
return QTextCursor(d->caret);
}
-void KoTextEditor::registerTrackedChange(QTextCursor &selection, KoGenChange::Type changeType, const KUndo2MagicString &title, QTextFormat& format, QTextFormat& prevFormat, bool applyToWholeBlock)
+void KoTextEditor::registerTrackedChange(QTextCursor &/*selection*/, KoGenChange::Type /*changeType*/, const KUndo2MagicString &/*title*/, QTextFormat& /*format*/, QTextFormat& /*prevFormat*/, bool /*applyToWholeBlock*/)
{
- KoChangeTracker *changeTracker = KoTextDocument(d->document).changeTracker();
- if (!changeTracker || !changeTracker->recordChanges()) {
- // clear the ChangeTrackerId from the passed in selection, without recursively registring
- // change tracking again ;)
- int start = qMin(selection.position(), selection.anchor());
- int end = qMax(selection.position(), selection.anchor());
-
- QTextBlock block = selection.block();
- if (block.position() > start)
- block = block.document()->findBlock(start);
-
- while (block.isValid() && block.position() < end) {
- QTextBlock::iterator iter = block.begin();
- while (!iter.atEnd()) {
- QTextFragment fragment = iter.fragment();
- if (fragment.position() > end) {
- break;
- }
-
- if (fragment.position() + fragment.length() <= start) {
- ++iter;
- continue;
- }
-
- QTextCursor cursor(block);
- cursor.setPosition(fragment.position());
- QTextCharFormat fm = fragment.charFormat();
-
- if (fm.hasProperty(KoCharacterStyle::ChangeTrackerId)) {
- fm.clearProperty(KoCharacterStyle::ChangeTrackerId);
- int to = qMin(end, fragment.position() + fragment.length());
- cursor.setPosition(to, QTextCursor::KeepAnchor);
- cursor.setCharFormat(fm);
- iter = block.begin();
- } else {
- ++iter;
- }
- }
- block = block.next();
- }
- } else {
- if (changeType != KoGenChange::DeleteChange) {
- //first check if there already is an identical change registered just before or just after the selection. If so, merge appropriatly.
- //TODO implement for format change. handle the prevFormat/newFormat check.
- QTextCursor checker = QTextCursor(selection);
- int idBefore = 0;
- int idAfter = 0;
- int changeId = 0;
- int selectionBegin = qMin(checker.anchor(), checker.position());
- int selectionEnd = qMax(checker.anchor(), checker.position());
-
- checker.setPosition(selectionBegin);
- if (!checker.atBlockStart()) {
- int changeId = checker.charFormat().property(KoCharacterStyle::ChangeTrackerId).toInt();
- if (changeId && changeTracker->elementById(changeId)->getChangeType() == changeType)
- idBefore = changeId;
- } else {
- if (!checker.currentTable()) {
- int changeId = checker.blockFormat().intProperty(KoCharacterStyle::ChangeTrackerId);
- if (changeId && changeTracker->elementById(changeId)->getChangeType() == changeType)
- idBefore = changeId;
- } else {
- idBefore = checker.currentTable()->format().intProperty(KoCharacterStyle::ChangeTrackerId);
- if (!idBefore) {
- idBefore = checker.currentTable()->cellAt(checker).format().intProperty(KoCharacterStyle::ChangeTrackerId);
- }
- }
- }
-
- checker.setPosition(selectionEnd);
- if (!checker.atEnd()) {
- checker.movePosition(QTextCursor::NextCharacter);
- idAfter = changeTracker->mergeableId(changeType, title, checker.charFormat().property( KoCharacterStyle::ChangeTrackerId ).toInt());
- }
- changeId = (idBefore)?idBefore:idAfter;
-
- switch (changeType) {//TODO: this whole thing actually needs to be done like a visitor. If the selection contains several change regions, the parenting needs to be individualised.
- case KoGenChange::InsertChange:
- if (!changeId)
- changeId = changeTracker->getInsertChangeId(title, 0);
- break;
- case KoGenChange::FormatChange:
- if (!changeId)
- changeId = changeTracker->getFormatChangeId(title, format, prevFormat, 0);
- break;
- case KoGenChange::DeleteChange:
- //this should never be the case
- break;
- default:
- ;// do nothing
- }
-
- if (applyToWholeBlock) {
- selection.movePosition(QTextCursor::StartOfBlock);
- selection.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
- }
-
- QTextCharFormat f;
- f.setProperty(KoCharacterStyle::ChangeTrackerId, changeId);
- selection.mergeCharFormat(f);
-
- QTextBlock startBlock = selection.document()->findBlock(selection.anchor());
- QTextBlock endBlock = selection.document()->findBlock(selection.position());
-
- while (startBlock.isValid() && startBlock != endBlock) {
- startBlock = startBlock.next();
- QTextCursor cursor(startBlock);
- QTextBlockFormat blockFormat;
- blockFormat.setProperty(KoCharacterStyle::ChangeTrackerId, changeId);
- cursor.mergeBlockFormat(blockFormat);
-
- QTextCharFormat blockCharFormat = cursor.blockCharFormat();
- if (blockCharFormat.hasProperty(KoCharacterStyle::ChangeTrackerId)) {
- blockCharFormat.clearProperty(KoCharacterStyle::ChangeTrackerId);
- cursor.setBlockCharFormat(blockCharFormat);
- }
- }
- }
- }
}
// To figure out if a the blocks of the selection are write protected we need to
@@ -570,7 +451,7 @@ void KoTextEditor::insertInlineObject(KoInlineObject *inliner, KUndo2Command *cm
InsertInlineObjectCommand *insertInlineObjectCommand = new InsertInlineObjectCommand(inliner, d->document, topCommand);
Q_UNUSED(insertInlineObjectCommand);
d->caret.endEditBlock();
-
+
if (!cmd) {
addCommand(topCommand);
endEditBlock();
diff --git a/plugins/generators/pattern/patterngenerator.cpp b/plugins/generators/pattern/patterngenerator.cpp
index 1cb8889a885d4f6fdd49f68513bd8092a7a30c32..09dffd5cec5c38cd6116e4a19c843267e5f99b2b 100644
--- a/plugins/generators/pattern/patterngenerator.cpp
+++ b/plugins/generators/pattern/patterngenerator.cpp
@@ -66,7 +66,7 @@ KoPatternGenerator::KoPatternGenerator() : KisGenerator(id(), KoID("basic"), i18
setSupportsPainting(true);
}
-KisFilterConfigurationSP KoPatternGenerator::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KoPatternGenerator::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration("pattern", 1);
@@ -118,4 +118,4 @@ void KoPatternGenerator::generate(KisProcessingInformation dstInfo,
}
-#include "patterngenerator.moc"
\ No newline at end of file
+#include "patterngenerator.moc"
diff --git a/plugins/generators/pattern/patterngenerator.h b/plugins/generators/pattern/patterngenerator.h
index 36b7af3acb970dd19afd32a6637547e57295f266..3dbe8dddb43a79dc7a85511dd006271f5aa08513 100644
--- a/plugins/generators/pattern/patterngenerator.h
+++ b/plugins/generators/pattern/patterngenerator.h
@@ -52,7 +52,7 @@ public:
static inline KoID id() {
return KoID("pattern", i18n("Pattern"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
};
diff --git a/plugins/generators/solid/colorgenerator.cpp b/plugins/generators/solid/colorgenerator.cpp
index dd74c90121db688da7ec6f072fa257850570de69..b0631e0bb3548735362bac621b2e8091088e939b 100644
--- a/plugins/generators/solid/colorgenerator.cpp
+++ b/plugins/generators/solid/colorgenerator.cpp
@@ -59,7 +59,7 @@ KisColorGenerator::KisColorGenerator() : KisGenerator(id(), KoID("basic"), i18n(
setSupportsPainting(true);
}
-KisFilterConfigurationSP KisColorGenerator::factoryConfiguration(const KisPaintDeviceSP) const
+KisFilterConfigurationSP KisColorGenerator::factoryConfiguration() const
{
KisFilterConfigurationSP config = new KisFilterConfiguration("color", 1);
diff --git a/plugins/generators/solid/colorgenerator.h b/plugins/generators/solid/colorgenerator.h
index a141e7b1e4486e75c03b3c0e261234931063acda..abd8ef1f3a7f1483c0d0fb68545f1d9fd5f144b1 100644
--- a/plugins/generators/solid/colorgenerator.h
+++ b/plugins/generators/solid/colorgenerator.h
@@ -52,7 +52,7 @@ public:
static inline KoID id() {
return KoID("color", i18n("Color"));
}
- virtual KisFilterConfigurationSP factoryConfiguration(const KisPaintDeviceSP) const;
+ virtual KisFilterConfigurationSP factoryConfiguration() const;
virtual KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const;
};
diff --git a/plugins/impex/exr/krita_exr.desktop b/plugins/impex/exr/krita_exr.desktop
index 19d7f5d166b8b3a5305c6f4a0552b005e8f1f777..4890260c34be6fc270455935f5e36ddbc7ddd7d1 100644
--- a/plugins/impex/exr/krita_exr.desktop
+++ b/plugins/impex/exr/krita_exr.desktop
@@ -48,7 +48,7 @@ GenericName[uz]=Rasm chizish dasturi
GenericName[uz@cyrillic]=Расм чизиш дастури
GenericName[wa]=Programe po dessiner et apougnî des imådjes
GenericName[x-test]=xxApplication for Drawing and Handling of Imagesxx
-GenericName[zh_CN]=绘制和操纵图像的应用程序
+GenericName[zh_CN]=绘制和处理图像的应用程序
GenericName[zh_TW]=影像繪製與處理應用程式
Icon=calligrakrita
MimeType=image/exr;
diff --git a/plugins/impex/exr/tests/kis_exr_test.cpp b/plugins/impex/exr/tests/kis_exr_test.cpp
index 9b6d082dd5d412ae036611d7bc7fa3c685bd92ac..b4dd11325a08e9d051cb415ce7ea4234af7eb724 100644
--- a/plugins/impex/exr/tests/kis_exr_test.cpp
+++ b/plugins/impex/exr/tests/kis_exr_test.cpp
@@ -62,7 +62,7 @@ void KisExrTest::testRoundTrip()
QString typeName = KisMimeDatabase::mimeTypeForFile(savedFileName);
QByteArray mimeType(typeName.toLatin1());
- status = manager.exportDocument(savedFileName, mimeType);
+ status = manager.exportDocument(savedFileName, savedFileName, mimeType);
QVERIFY(QFileInfo(savedFileName).exists());
{
diff --git a/plugins/impex/kra/krita_kra.desktop b/plugins/impex/kra/krita_kra.desktop
index 08bb8f13b10249787f41944c21bd94203651d6da..4f8d2e503d67f2b045dfeb8ee57932569c757217 100644
--- a/plugins/impex/kra/krita_kra.desktop
+++ b/plugins/impex/kra/krita_kra.desktop
@@ -34,6 +34,7 @@ Name[hu]=Krita
Name[ia]=Krita
Name[is]=Krita
Name[it]=Krita
+Name[ja]=Krita
Name[kk]=Krita
Name[ko]=Krita
Name[lt]=Krita
diff --git a/plugins/impex/libkra/kis_kra_loader.cpp b/plugins/impex/libkra/kis_kra_loader.cpp
index b076d719bbcd8577483f0fbab7f67d06a2ac1cf1..fd5e6ce8447cd18a7d377259669b968395b56338 100644
--- a/plugins/impex/libkra/kis_kra_loader.cpp
+++ b/plugins/impex/libkra/kis_kra_loader.cpp
@@ -342,6 +342,8 @@ KisImageSP KisKraLoader::loadXML(const KoXmlElement& element)
loadGuides(e);
} else if (e.tagName() == "assistants") {
loadAssistantsList(e);
+ } else if (e.tagName() == "audio") {
+ loadAudio(e, image);
}
}
@@ -795,9 +797,9 @@ KisNodeSP KisKraLoader::loadFileLayer(const KoXmlElement& element, KisImageSP im
qApp->setOverrideCursor(Qt::ArrowCursor);
QString msg = i18nc(
"@info",
- "The file associated to a file layer with the name \"%1\" is not found. "
- "Expected path: "
- "%2 "
+ "The file associated to a file layer with the name \"%1\" is not found.\n\n"
+ "Expected path:\n"
+ "%2\n\n"
"Do you want to locate it manually?", name, fullPath);
int result = QMessageBox::warning(0, i18nc("@title:window", "File not found"), msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
@@ -862,7 +864,7 @@ KisNodeSP KisKraLoader::loadAdjustmentLayer(const KoXmlElement& element, KisImag
return 0; // XXX: We don't have this filter. We should warn about it!
}
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
// We'll load the configuration and the selection later.
layer = new KisAdjustmentLayer(image, name, kfc, 0);
@@ -915,7 +917,7 @@ KisNodeSP KisKraLoader::loadGeneratorLayer(const KoXmlElement& element, KisImage
return 0; // XXX: We don't have this generator. We should warn about it!
}
- KisFilterConfigurationSP kgc = generator->defaultConfiguration(0);
+ KisFilterConfigurationSP kgc = generator->defaultConfiguration();
// We'll load the configuration and the selection later.
layer = new KisGeneratorLayer(image, name, kgc, 0);
@@ -977,7 +979,7 @@ KisNodeSP KisKraLoader::loadFilterMask(const KoXmlElement& element, KisNodeSP pa
return 0; // XXX: We don't have this filter. We should warn about it!
}
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
// We'll load the configuration and the selection later.
mask = new KisFilterMask();
@@ -1103,3 +1105,52 @@ void KisKraLoader::loadGuides(const KoXmlElement& elem)
guides.loadFromXml(domElement);
m_d->document->setGuidesConfig(guides);
}
+
+void KisKraLoader::loadAudio(const KoXmlElement& elem, KisImageSP image)
+{
+ QDomDocument dom;
+ KoXml::asQDomElement(dom, elem);
+ QDomElement qElement = dom.firstChildElement();
+
+ QString fileName;
+ if (KisDomUtils::loadValue(qElement, "masterChannelPath", &fileName)) {
+ fileName = QDir::toNativeSeparators(fileName);
+
+ QDir baseDirectory = QFileInfo(m_d->document->localFilePath()).absoluteDir();
+ fileName = baseDirectory.absoluteFilePath(fileName);
+
+ QFileInfo info(fileName);
+
+ if (!info.exists()) {
+ qApp->setOverrideCursor(Qt::ArrowCursor);
+ QString msg = i18nc(
+ "@info",
+ "Audio channel file \"%1\" doesn't exist!\n\n"
+ "Expected path:\n"
+ "%2\n\n"
+ "Do you want to locate it manually?", info.fileName(), info.absoluteFilePath());
+
+ int result = QMessageBox::warning(0, i18nc("@title:window", "File not found"), msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
+
+ if (result == QMessageBox::Yes) {
+ info.setFile(KisImportExportManager::askForAudioFileName(info.absolutePath(), 0));
+ }
+
+ qApp->restoreOverrideCursor();
+ }
+
+ if (info.exists()) {
+ image->animationInterface()->setAudioChannelFileName(info.absoluteFilePath());
+ }
+ }
+
+ bool audioMuted = false;
+ if (KisDomUtils::loadValue(qElement, "audioMuted", &audioMuted)) {
+ image->animationInterface()->setAudioMuted(audioMuted);
+ }
+
+ qreal audioVolume = 0.5;
+ if (KisDomUtils::loadValue(qElement, "audioVolume", &audioVolume)) {
+ image->animationInterface()->setAudioVolume(audioVolume);
+ }
+}
diff --git a/plugins/impex/libkra/kis_kra_loader.h b/plugins/impex/libkra/kis_kra_loader.h
index 168dc243ad4c4fe221143f2e7c44f43b8d6be746..789cfdad2d8d555e51c8c7d983b3a805f6167b3c 100644
--- a/plugins/impex/libkra/kis_kra_loader.h
+++ b/plugins/impex/libkra/kis_kra_loader.h
@@ -103,6 +103,7 @@ private:
void loadAssistantsList(const KoXmlElement& elem);
void loadGrid(const KoXmlElement& elem);
void loadGuides(const KoXmlElement& elem);
+ void loadAudio(const KoXmlElement& elem, KisImageSP image);
private:
struct Private;
diff --git a/plugins/impex/libkra/kis_kra_saver.cpp b/plugins/impex/libkra/kis_kra_saver.cpp
index 2484dcadcebd00cf73cb341b0e3c3c38bb535836..bd749712ce5848e6f0a4a713d35863d25e7b5712 100644
--- a/plugins/impex/libkra/kis_kra_saver.cpp
+++ b/plugins/impex/libkra/kis_kra_saver.cpp
@@ -57,6 +57,9 @@
#include "kis_guides_config.h"
#include "KisProofingConfiguration.h"
+#include
+#include
+
using namespace KRA;
@@ -126,6 +129,7 @@ QDomElement KisKraSaver::saveXML(QDomDocument& doc, KisImageSP image)
saveAssistantsList(doc, imageElement);
saveGrid(doc,imageElement);
saveGuides(doc,imageElement);
+ saveAudio(doc,imageElement);
QDomElement animationElement = doc.createElement("animation");
KisDomUtils::saveValue(&animationElement, "framerate", image->animationInterface()->framerate());
@@ -418,3 +422,31 @@ bool KisKraSaver::saveGuides(QDomDocument& doc, QDomElement& element)
return true;
}
+bool KisKraSaver::saveAudio(QDomDocument& doc, QDomElement& element)
+{
+ const KisImageAnimationInterface *interface = m_d->doc->image()->animationInterface();
+ QString fileName = interface->audioChannelFileName();
+ if (fileName.isEmpty()) return true;
+
+ if (!QFileInfo::exists(fileName)) {
+ m_d->errorMessages << i18n("Audio channel file %1 doesn't exist!", fileName);
+ return false;
+ }
+
+ const QDir documentDir = QFileInfo(m_d->doc->localFilePath()).absoluteDir();
+ KIS_ASSERT_RECOVER_RETURN_VALUE(documentDir.exists(), false);
+
+ fileName = documentDir.relativeFilePath(fileName);
+ fileName = QDir::fromNativeSeparators(fileName);
+
+ KIS_ASSERT_RECOVER_RETURN_VALUE(!fileName.isEmpty(), false);
+
+ QDomElement audioElement = doc.createElement("audio");
+ KisDomUtils::saveValue(&audioElement, "masterChannelPath", fileName);
+ KisDomUtils::saveValue(&audioElement, "audioMuted", interface->isAudioMuted());
+ KisDomUtils::saveValue(&audioElement, "audioVolume", interface->audioVolume());
+ element.appendChild(audioElement);
+
+ return true;
+}
+
diff --git a/plugins/impex/libkra/kis_kra_saver.h b/plugins/impex/libkra/kis_kra_saver.h
index 810abcfd7ca90ea540df342a8e3c40357091ccf7..ae8368b9575137de8e7ba9fe9db8780974e48655 100644
--- a/plugins/impex/libkra/kis_kra_saver.h
+++ b/plugins/impex/libkra/kis_kra_saver.h
@@ -55,6 +55,7 @@ private:
bool saveAssistantsList(QDomDocument& doc, QDomElement& element);
bool saveGrid(QDomDocument& doc, QDomElement& element);
bool saveGuides(QDomDocument& doc, QDomElement& element);
+ bool saveAudio(QDomDocument& doc, QDomElement& element);
bool saveNodeKeyframes(KoStore *store, QString location, const KisNode *node);
struct Private;
Private * const m_d;
diff --git a/plugins/impex/libkra/tests/kis_kra_saver_test.cpp b/plugins/impex/libkra/tests/kis_kra_saver_test.cpp
index f023ac6fbf52ad4cb7a9e9e124aa4cbcd8a249dc..52945270e18d777fd494487fb7158590add569e0 100644
--- a/plugins/impex/libkra/tests/kis_kra_saver_test.cpp
+++ b/plugins/impex/libkra/tests/kis_kra_saver_test.cpp
@@ -181,7 +181,7 @@ void KisKraSaverTest::testRoundTripFillLayerColor()
Q_ASSERT(generator);
// warning: we pass null paint device to the default constructed value
- KisFilterConfigurationSP config = generator->factoryConfiguration(0);
+ KisFilterConfigurationSP config = generator->factoryConfiguration();
Q_ASSERT(config);
QVariant v;
@@ -197,7 +197,7 @@ void KisKraSaverTest::testRoundTripFillLayerPattern()
QVERIFY(generator);
// warning: we pass null paint device to the default constructed value
- KisFilterConfigurationSP config = generator->factoryConfiguration(0);
+ KisFilterConfigurationSP config = generator->factoryConfiguration();
QVERIFY(config);
QVariant v;
diff --git a/plugins/impex/ora/kis_open_raster_stack_load_visitor.cpp b/plugins/impex/ora/kis_open_raster_stack_load_visitor.cpp
index 7e193fc645f4c35e4e3f429107effc0ab0243a39..abf63d2f9a625bcf3fb0fbdd06751831023845fb 100644
--- a/plugins/impex/ora/kis_open_raster_stack_load_visitor.cpp
+++ b/plugins/impex/ora/kis_open_raster_stack_load_visitor.cpp
@@ -104,7 +104,6 @@ void KisOpenRasterStackLoadVisitor::loadImage()
dbgFile << ppVar(width) << ppVar(height);
d->image = new KisImage(d->undoStore, width, height, KoColorSpaceRegistry::instance()->rgb8(), "OpenRaster Image (name)");
-
for (QDomNode node2 = node.firstChild(); !node2.isNull(); node2 = node2.nextSibling()) {
if (node2.isElement() && node2.nodeName() == "stack") { // it's the root layer !
QDomElement subelem2 = node2.toElement();
@@ -193,10 +192,10 @@ void KisOpenRasterStackLoadVisitor::loadPaintLayer(const QDomElement& elem, KisP
dbgFile << "Loading was unsuccessful";
}
-void KisOpenRasterStackLoadVisitor::loadGroupLayer(const QDomElement& elem, KisGroupLayerSP gL)
+void KisOpenRasterStackLoadVisitor::loadGroupLayer(const QDomElement& elem, KisGroupLayerSP groupLayer)
{
- dbgFile << "Loading group layer";
- loadLayerInfo(elem, gL);
+ dbgFile << "Loading group layer" << d->image;
+ loadLayerInfo(elem, groupLayer);
for (QDomNode node = elem.firstChild(); !node.isNull(); node = node.nextSibling()) {
if (node.isElement()) {
QDomElement subelem = node.toElement();
@@ -211,7 +210,7 @@ void KisOpenRasterStackLoadVisitor::loadGroupLayer(const QDomElement& elem, KisG
passThrough = false;
}
layer->setPassThroughMode(passThrough);
- d->image->addNode(layer.data(), gL.data(), 0);
+ d->image->addNode(layer, groupLayer.data(), 0);
loadGroupLayer(subelem, layer);
} else if (node.nodeName() == "layer") {
QString filename = subelem.attribute("src");
@@ -224,10 +223,9 @@ void KisOpenRasterStackLoadVisitor::loadGroupLayer(const QDomElement& elem, KisG
d->image->setResolution(d->xRes, d->yRes);
// now get the device
KisPaintDeviceSP device = pngImage->projection();
- delete pngImage.data();
- KisPaintLayerSP layer = new KisPaintLayer(gL->image() , "", opacity * 255, device);
- d->image->addNode(layer.data(), gL.data(), 0);
+ KisPaintLayerSP layer = new KisPaintLayer(groupLayer->image() , "", opacity * 255, device);
+ d->image->addNode(layer, groupLayer, 0);
loadPaintLayer(subelem, layer);
dbgFile << "Loading was successful";
}
@@ -240,9 +238,9 @@ void KisOpenRasterStackLoadVisitor::loadGroupLayer(const QDomElement& elem, KisG
if (filterTypeSplit[0] == "applications" && filterTypeSplit[1] == "krita") {
f = KisFilterRegistry::instance()->value(filterTypeSplit[2]);
}
- KisFilterConfigurationSP kfc = f->defaultConfiguration(0);
- KisAdjustmentLayerSP layer = new KisAdjustmentLayer(gL->image() , "", kfc, KisSelectionSP(0));
- d->image->addNode(layer.data(), gL.data(), 0);
+ KisFilterConfigurationSP kfc = f->defaultConfiguration();
+ KisAdjustmentLayerSP layer = new KisAdjustmentLayer(groupLayer->image() , "", kfc, KisSelectionSP(0));
+ d->image->addNode(layer.data(), groupLayer.data(), 0);
loadAdjustmentLayer(subelem, layer);
} else {
diff --git a/plugins/impex/ora/kis_open_raster_stack_load_visitor.h b/plugins/impex/ora/kis_open_raster_stack_load_visitor.h
index 427860558ba71b7c30fc70f639f47e42e96629d1..45c00243987a5c2801a581d5d88b1de5a2f81f48 100644
--- a/plugins/impex/ora/kis_open_raster_stack_load_visitor.h
+++ b/plugins/impex/ora/kis_open_raster_stack_load_visitor.h
@@ -36,7 +36,7 @@ public:
void loadImage();
void loadPaintLayer(const QDomElement& elem, KisPaintLayerSP pL);
void loadAdjustmentLayer(const QDomElement& elem, KisAdjustmentLayerSP pL);
- void loadGroupLayer(const QDomElement& elem, KisGroupLayerSP gL);
+ void loadGroupLayer(const QDomElement& elem, KisGroupLayerSP groupLayer);
KisImageSP image();
vKisNodeSP activeNodes();
private:
diff --git a/plugins/impex/psd/psd_export.cc b/plugins/impex/psd/psd_export.cc
index 62041cdab115d6708f17af02358ceb0b05aa4dfd..e5369ca4b8ba0c13a870e84c730178b30d25d3c9 100644
--- a/plugins/impex/psd/psd_export.cc
+++ b/plugins/impex/psd/psd_export.cc
@@ -70,6 +70,7 @@ void psdExport::initializeCapabilities()
addCapability(KisExportCheckRegistry::instance()->get("MultiLayerCheck")->create(KisExportCheckBase::SUPPORTED));
addCapability(KisExportCheckRegistry::instance()->get("sRGBProfileCheck")->create(KisExportCheckBase::SUPPORTED));
addCapability(KisExportCheckRegistry::instance()->get("MultiLayerCheck")->create(KisExportCheckBase::SUPPORTED));
+ addCapability(KisExportCheckRegistry::instance()->get("NodeTypeCheck/KisTransparencyMask")->create(KisExportCheckBase::SUPPORTED));
addCapability(KisExportCheckRegistry::instance()->get("ColorModelHomogenousCheck")->create(KisExportCheckBase::UNSUPPORTED, i18nc("image conversion warning", "Your image contains one or more layers with a color model that is different from the image.")));
ImageSizeCheckFactory *factory = dynamic_cast(KisExportCheckRegistry::instance()->get("ImageSizeCheck"));
@@ -81,8 +82,8 @@ void psdExport::initializeCapabilities()
supportedColorModels << QPair()
<< QPair(RGBAColorModelID, Integer8BitsColorDepthID)
<< QPair(RGBAColorModelID, Integer16BitsColorDepthID)
- << QPair(RGBAColorModelID, Float16BitsColorDepthID)
- << QPair(RGBAColorModelID, Float32BitsColorDepthID)
+// << QPair(RGBAColorModelID, Float16BitsColorDepthID)
+// << QPair(RGBAColorModelID, Float32BitsColorDepthID)
<< QPair(GrayAColorModelID, Integer8BitsColorDepthID)
<< QPair(GrayAColorModelID, Integer16BitsColorDepthID)
<< QPair(CMYKAColorModelID, Integer8BitsColorDepthID)
diff --git a/plugins/impex/qml/qml_converter.cc b/plugins/impex/qml/qml_converter.cc
index 99c18a89d8e23254b86ad0e31de507e57593c628..f9085cfe4620dbdbf46075fc9b4178f28b1a4b3e 100644
--- a/plugins/impex/qml/qml_converter.cc
+++ b/plugins/impex/qml/qml_converter.cc
@@ -35,7 +35,7 @@ QMLConverter::~QMLConverter()
{
}
-KisImageBuilder_Result QMLConverter::buildFile(const QString &filename, QIODevice *io, KisImageSP image)
+KisImageBuilder_Result QMLConverter::buildFile(const QString &filename, const QString &realFilename, QIODevice *io, KisImageSP image)
{
QTextStream out(io);
out.setCodec("UTF-8");
@@ -46,9 +46,10 @@ KisImageBuilder_Result QMLConverter::buildFile(const QString &filename, QIODevic
out << "\n";
QFileInfo info(filename);
+ QFileInfo infoRealFile(realFilename);
KisNodeSP node = image->rootLayer()->firstChild();
- QString imageDir = info.baseName() + "_images";
- QString imagePath = info.absolutePath() + '/' + imageDir;
+ QString imageDir = infoRealFile.baseName() + "_images";
+ QString imagePath = infoRealFile.absolutePath() + '/' + imageDir;
if (node) {
QDir dir;
dir.mkpath(imagePath);
diff --git a/plugins/impex/qml/qml_converter.h b/plugins/impex/qml/qml_converter.h
index 9d20405d9fe963c59ffb353a40564b4c19148074..32224a20aa06d0563f3789d9d38c84f601c0b761 100644
--- a/plugins/impex/qml/qml_converter.h
+++ b/plugins/impex/qml/qml_converter.h
@@ -34,7 +34,7 @@ public:
QMLConverter();
virtual ~QMLConverter();
public:
- KisImageBuilder_Result buildFile(const QString &filename, QIODevice *io, KisImageSP image);
+ KisImageBuilder_Result buildFile(const QString &filename, const QString &realFilename, QIODevice *io, KisImageSP image);
private:
void writeString(QTextStream& out, int spacing, const QString& setting, const QString& value);
diff --git a/plugins/impex/qml/qml_export.cc b/plugins/impex/qml/qml_export.cc
index a09e8d8c1f6ca5429374177b4bd3a514c10faa19..d70a3278bb4bbec3b786ea19dc8365ac53ee70ad 100644
--- a/plugins/impex/qml/qml_export.cc
+++ b/plugins/impex/qml/qml_export.cc
@@ -47,7 +47,7 @@ KisImportExportFilter::ConversionStatus QMLExport::convert(KisDocument *document
Q_CHECK_PTR(image);
QMLConverter converter;
- KisImageBuilder_Result result = converter.buildFile(filename(), io, image);
+ KisImageBuilder_Result result = converter.buildFile(filename(), realFilename(), io, image);
if (result == KisImageBuilder_RESULT_OK) {
dbgFile << "success !";
return KisImportExportFilter::OK;
diff --git a/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.h b/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.h
index f639ca442f9fb9a17ffef5b4b74f2a74a67ce206..71b36b3e30aae492937cdb31a7c810616d7aa3d9 100644
--- a/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.h
+++ b/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.h
@@ -31,7 +31,7 @@
#include
// Pragma directives to reduce warnings from LibRaw header files.
-#if not defined(__APPLE__) && defined(__GNUC__)
+#if !defined(__APPLE__) && defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
@@ -46,7 +46,7 @@
#include
// Restore warnings
-#if not defined(__APPLE__) && defined(__GNUC__)
+#if !defined(__APPLE__) && defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
diff --git a/plugins/impex/spriter/kis_spriter_export.cpp b/plugins/impex/spriter/kis_spriter_export.cpp
index 85208bb429d12f575d9cb9926dec666126500165..7825478f27880c0f7d5d58c4c3b53654f64043a2 100644
--- a/plugins/impex/spriter/kis_spriter_export.cpp
+++ b/plugins/impex/spriter/kis_spriter_export.cpp
@@ -93,13 +93,17 @@ bool KisSpriterExport::savePaintDevice(KisPaintDeviceSP dev, const QString &file
return (res == KisImageBuilder_RESULT_OK);
}
-void KisSpriterExport::parseFolder(KisGroupLayerSP parentGroup, const QString &folderName, const QString &basePath)
+void KisSpriterExport::parseFolder(KisGroupLayerSP parentGroup, const QString &folderName, const QString &basePath, int *folderId)
{
// qDebug() << "parseFolder: parent" << parentGroup->name()
// << "folderName" << folderName
// << "basepath" << basePath;
- static int folderId = 0;
+ int currentFolder=0;
+ if(folderId == 0)
+ {
+ folderId = ¤tFolder;
+ }
QString pathName;
if (!folderName.isEmpty()) {
pathName = folderName + "/";
@@ -108,13 +112,13 @@ void KisSpriterExport::parseFolder(KisGroupLayerSP parentGroup, const QString &f
KisNodeSP child = parentGroup->lastChild();
while (child) {
if (child->visible() && child->inherits("KisGroupLayer")) {
- parseFolder(qobject_cast(child.data()), child->name().split(" ").first(), basePath + "/" + pathName);
+ parseFolder(qobject_cast(child.data()), child->name().split(" ").first(), basePath + "/" + pathName, folderId);
}
child = child->prevSibling();
}
Folder folder;
- folder.id = folderId;
+ folder.id = *folderId;
folder.name = folderName;
folder.groupName = parentGroup->name();
@@ -152,7 +156,7 @@ void KisSpriterExport::parseFolder(KisGroupLayerSP parentGroup, const QString &f
if (folder.files.size() > 0) {
//qDebug() << "Adding folder" << folder.id << folder.name << folder.groupName << folder.files.length();
m_folders.append(folder);
- folderId++;
+ (*folderId)++;
}
}
@@ -347,6 +351,18 @@ void KisSpriterExport::fillScml(QDomDocument &scml, const QString &entityName)
fileElement.setAttribute("name", file.name);
fileElement.setAttribute("width", QString::number(file.width, 'f', 2));
fileElement.setAttribute("height", QString::number(file.height, 'f', 2));
+ // qreal pivotX=0;
+ // qreal pivotY=1;
+ // Q_FOREACH(const SpriterObject &object, m_objects) {
+ // if(file.id == object.fileId)
+ // {
+ // pivotX = (0.0 -(object.fixLocalX / file.width));
+ // pivotY = (1.0 -(object.fixLocalY / file.height));
+ // break;
+ // }
+ // }
+ // fileElement.setAttribute("pivot_x", QString::number(pivotX, 'f', 2));
+ // fileElement.setAttribute("pivot_y", QString::number(pivotY, 'f', 2));
}
}
@@ -413,9 +429,6 @@ void KisSpriterExport::fillScml(QDomDocument &scml, const QString &entityName)
QString objectName = "object-" + file.baseName;
- qreal pivotX = (0.0 -(object.fixLocalX / file.width));
- qreal pivotY = (1.0 -(object.fixLocalY / file.height));
-
QDomElement timeline = scml.createElement("timeline");
animation.appendChild(timeline);
timeline.setAttribute("id", m_timelineid++);
@@ -430,10 +443,8 @@ void KisSpriterExport::fillScml(QDomDocument &scml, const QString &entityName)
key.appendChild(objectEl);
objectEl.setAttribute("folder", object.folderId);
objectEl.setAttribute("file", object.fileId);
- objectEl.setAttribute("x", "0");
- objectEl.setAttribute("y", "0");
- objectEl.setAttribute("pivot_x", QString::number(pivotX, 'f', 2));
- objectEl.setAttribute("pivot_y", QString::number(pivotY, 'f', 2));
+ objectEl.setAttribute("x", object.fixLocalX);
+ objectEl.setAttribute("y", object.fixLocalY);
objectEl.setAttribute("angle", QString::number(kisRadiansToDegrees(object.fixLocalAngle), 'f', 2));
objectEl.setAttribute("scale_x", QString::number(object.fixLocalScaleX, 'f', 2));
objectEl.setAttribute("scale_y", QString::number(object.fixLocalScaleY, 'f', 2));
diff --git a/plugins/impex/spriter/kis_spriter_export.h b/plugins/impex/spriter/kis_spriter_export.h
index 86daebf519e76cf917d18b7c058e6611aaea280b..d620f17493318df50029dd338542c5d47b24cd3b 100644
--- a/plugins/impex/spriter/kis_spriter_export.h
+++ b/plugins/impex/spriter/kis_spriter_export.h
@@ -115,7 +115,7 @@ public:
private:
bool savePaintDevice(KisPaintDeviceSP dev, const QString &fileName);
- void parseFolder(KisGroupLayerSP parentGroup, const QString &folderName, const QString &basePath);
+ void parseFolder(KisGroupLayerSP parentGroup, const QString &folderName, const QString &basePath, int *folderId = 0);
Bone *parseBone(const Bone *parent, KisGroupLayerSP groupLayer);
void fixBone(Bone *bone);
void fillScml(QDomDocument &scml, const QString &entityName);
diff --git a/plugins/impex/tiff/kis_tiff_converter.cc b/plugins/impex/tiff/kis_tiff_converter.cc
index a2ab89f984e11aa50addc4448051622653b7fbc7..dc0567a448c038ffcc30753994866d47d104b05d 100644
--- a/plugins/impex/tiff/kis_tiff_converter.cc
+++ b/plugins/impex/tiff/kis_tiff_converter.cc
@@ -283,17 +283,21 @@ KisImageBuilder_Result KisTIFFConverter::readTIFFDirectory(TIFF* image)
memcpy(rawdata.data(), EmbedBuffer, EmbedLen);
profile = KoColorSpaceRegistry::instance()->createColorProfile(colorSpaceId.first, colorSpaceId.second, rawdata);
}
- else {
- dbgFile << "No Profile found";
- }
// Check that the profile is used by the color space
if (profile && !KoColorSpaceRegistry::instance()->colorSpaceFactory(KoColorSpaceRegistry::instance()->colorSpaceId(colorSpaceId.first, colorSpaceId.second))->profileIsCompatible(profile)) {
- warnFile << "The profile " << profile->name() << " is not compatible with the color space model " << colorSpaceId.first << " " << colorSpaceId.second;
+ dbgFile << "The profile " << profile->name() << " is not compatible with the color space model " << colorSpaceId.first << " " << colorSpaceId.second;
profile = 0;
}
+ // Do not use the linear gamma profile for 16 bits/channel by default, tiff files are usually created with
+ // gamma correction. XXX: Should we ask the user?
+ if (!profile && colorSpaceId.first == RGBAColorModelID.id() && colorSpaceId.second == Integer16BitsColorDepthID.id()) {
+ profile = KoColorSpaceRegistry::instance()->profileByName("sRGB-elle-V2-srgbtrc.icc");
+ dbgFile << "Getting srgb profile" << profile;
+ }
+
// Retrieve a pointer to the colorspace
const KoColorSpace* cs = 0;
if (profile && profile->isSuitableForOutput()) {
@@ -303,6 +307,7 @@ KisImageBuilder_Result KisTIFFConverter::readTIFFDirectory(TIFF* image)
else {
cs = KoColorSpaceRegistry::instance()->colorSpace(colorSpaceId.first, colorSpaceId.second, 0);
}
+
if (cs == 0) {
dbgFile << "Colorspace" << colorSpaceId.first << colorSpaceId.second << " is not available, please check your installation.";
TIFFClose(image);
diff --git a/plugins/impex/video/video_saver.cpp b/plugins/impex/video/video_saver.cpp
index 13d2c65ff779118d985573f475b4fd2ad6f43f4a..c1d88794b5a32973e5b38ec6f5728d33ab881698 100644
--- a/plugins/impex/video/video_saver.cpp
+++ b/plugins/impex/video/video_saver.cpp
@@ -43,6 +43,7 @@
#include
#include
#include
+#include
#include "KisPart.h"
@@ -112,7 +113,7 @@ public:
<< "logPath" << logPath
<< "totalFrames" << totalFrames;
- QTemporaryFile progressFile("KritaFFmpegProgress.XXXXXX");
+ QTemporaryFile progressFile(QDir::tempPath() + QDir::separator() + "KritaFFmpegProgress.XXXXXX");
progressFile.open();
m_process.setStandardOutputFile(logPath);
@@ -221,9 +222,15 @@ KisImageBuilder_Result VideoSaver::encode(const QString &filename, KisProperties
KisImageAnimationInterface *animation = m_image->animationInterface();
const KisTimeRange fullRange = animation->fullClipRange();
- const KisTimeRange clipRange(configuration->getInt("firstframe", fullRange.start()), configuration->getInt("lastFrame"), fullRange.end());
const int frameRate = animation->framerate();
+ KIS_SAFE_ASSERT_RECOVER_NOOP(configuration->hasProperty("first_frame"));
+ KIS_SAFE_ASSERT_RECOVER_NOOP(configuration->hasProperty("last_frame"));
+ KIS_SAFE_ASSERT_RECOVER_NOOP(configuration->hasProperty("include_audio"));
+
+ const KisTimeRange clipRange(configuration->getInt("first_frame", fullRange.start()), configuration->getInt("last_frame", fullRange.end()));
+ const bool includeAudio = configuration->getBool("include_audio", true);
+
const QDir framesDir(configuration->getString("directory"));
QString resultFile;
@@ -246,6 +253,7 @@ KisImageBuilder_Result VideoSaver::encode(const QString &filename, KisProperties
{
QStringList args;
args << "-r" << QString::number(frameRate)
+ << "-start_number" << QString::number(clipRange.start())
<< "-i" << savedFilesMask
<< "-vf" << "palettegen"
<< "-y" << palettePath;
@@ -253,7 +261,7 @@ KisImageBuilder_Result VideoSaver::encode(const QString &filename, KisProperties
KisImageBuilder_Result result =
m_runner->runFFMpeg(args, i18n("Fetching palette..."),
framesDir.filePath("log_generate_palette_gif.log"),
- clipRange.duration() + clipRange.start());
+ clipRange.duration());
if (result != KisImageBuilder_RESULT_OK) {
return result;
@@ -263,18 +271,19 @@ KisImageBuilder_Result VideoSaver::encode(const QString &filename, KisProperties
{
QStringList args;
args << "-r" << QString::number(frameRate)
+ << "-start_number" << QString::number(clipRange.start())
<< "-i" << savedFilesMask
<< "-i" << palettePath
<< "-lavfi" << "[0:v][1:v] paletteuse"
<< additionalOptionsList
<< "-y" << resultFile;
- dbgFile << "savedFilesMask" << savedFilesMask << "start" << clipRange.start() << "duration" << clipRange.duration();
+ dbgFile << "savedFilesMask" << savedFilesMask << "start" << QString::number(clipRange.start()) << "duration" << clipRange.duration();
KisImageBuilder_Result result =
m_runner->runFFMpeg(args, i18n("Encoding frames..."),
framesDir.filePath("log_encode_gif.log"),
- clipRange.duration() + clipRange.start());
+ clipRange.duration());
if (result != KisImageBuilder_RESULT_OK) {
return result;
@@ -283,13 +292,31 @@ KisImageBuilder_Result VideoSaver::encode(const QString &filename, KisProperties
} else {
QStringList args;
args << "-r" << QString::number(frameRate)
- << "-i" << savedFilesMask
- << additionalOptionsList
+ << "-start_number" << QString::number(clipRange.start())
+ << "-i" << savedFilesMask;
+
+
+ QFileInfo audioFileInfo = animation->audioChannelFileName();
+ if (includeAudio && audioFileInfo.exists()) {
+ const int msecStart = clipRange.start() * 1000 / animation->framerate();
+ const int msecDuration = clipRange.duration() * 1000 / animation->framerate();
+
+ const QTime startTime = QTime::fromMSecsSinceStartOfDay(msecStart);
+ const QTime durationTime = QTime::fromMSecsSinceStartOfDay(msecDuration);
+ const QString ffmpegTimeFormat("H:m:s.zzz");
+
+ args << "-ss" << startTime.toString(ffmpegTimeFormat);
+ args << "-t" << durationTime.toString(ffmpegTimeFormat);
+
+ args << "-i" << audioFileInfo.absoluteFilePath();
+ }
+
+ args << additionalOptionsList
<< "-y" << resultFile;
result = m_runner->runFFMpeg(args, i18n("Encoding frames..."),
framesDir.filePath("log_encode.log"),
- clipRange.duration() + clipRange.start());
+ clipRange.duration());
}
return result;
diff --git a/plugins/paintops/dynadraw/kis_dyna_paintop_settings.cpp b/plugins/paintops/dynadraw/kis_dyna_paintop_settings.cpp
index 68c28c1237021485cbac3057d28c0780bf39c9e0..e315b9876b75919bf810897a804550c593326fd7 100644
--- a/plugins/paintops/dynadraw/kis_dyna_paintop_settings.cpp
+++ b/plugins/paintops/dynadraw/kis_dyna_paintop_settings.cpp
@@ -20,6 +20,7 @@
#include
#include
#include "kis_dynaop_option.h"
+#include
struct KisDynaPaintOpSettings::Private
{
@@ -88,7 +89,7 @@ QList KisDynaPaintOpSettings::uniformProperties(Kis
i18n("Diameter"),
settings, 0);
- prop->setRange(0, 1000);
+ prop->setRange(0, KisConfig().readEntry("maximumBrushSize", 1000));
prop->setSingleStep(1);
prop->setSuffix(i18n(" px"));
diff --git a/plugins/paintops/dynadraw/kis_dynaop_option.cpp b/plugins/paintops/dynadraw/kis_dynaop_option.cpp
index 9ca5d0cbe66c7845a0e882cb314672905a8d2478..398d1e738b053ba0e16bc6c7747e21018d77da29 100644
--- a/plugins/paintops/dynadraw/kis_dynaop_option.cpp
+++ b/plugins/paintops/dynadraw/kis_dynaop_option.cpp
@@ -17,7 +17,7 @@
*/
#include "kis_dynaop_option.h"
#include
-
+#include
#include
#include "ui_wdgdynaoptions.h"
@@ -33,7 +33,7 @@ public:
angleSlider->setSingleStep(1);
angleSlider->setSuffix(QChar(Qt::Key_degree));
- diameterDSSB->setRange(0, 1000, 0);
+ diameterDSSB->setRange(0, KisConfig().readEntry("maximumBrushSize", 1000), 0);
diameterDSSB->setValue(20);
diameterDSSB->setExponentRatio(3.0);
diff --git a/plugins/paintops/filterop/kis_filterop_settings.cpp b/plugins/paintops/filterop/kis_filterop_settings.cpp
index 876aa8b49832520fdb0a5df91cac4bfaf3edd30b..13aeef995e9422c8789fa9b78420920ba0fa67c3 100644
--- a/plugins/paintops/filterop/kis_filterop_settings.cpp
+++ b/plugins/paintops/filterop/kis_filterop_settings.cpp
@@ -53,7 +53,7 @@ KisFilterConfigurationSP KisFilterOpSettings::filterConfig() const
if (hasProperty(FILTER_ID)) {
KisFilterSP filter = KisFilterRegistry::instance()->get(getString(FILTER_ID));
if (filter) {
- KisFilterConfigurationSP configuration = filter->factoryConfiguration(0);
+ KisFilterConfigurationSP configuration = filter->factoryConfiguration();
configuration->fromXML(getString(FILTER_CONFIGURATION));
return configuration;
}
@@ -79,7 +79,7 @@ void KisFilterOpSettings::fromXML(const QDomElement& e)
if (hasProperty(FILTER_ID)) {
KisFilterSP filter = KisFilterRegistry::instance()->get(getString(FILTER_ID));
if (filter) {
- KisFilterConfigurationSP configuration = filter->factoryConfiguration(0);
+ KisFilterConfigurationSP configuration = filter->factoryConfiguration();
configuration->fromXML(element);
setProperty(FILTER_CONFIGURATION, configuration->toXML());
}
diff --git a/plugins/paintops/libpaintop/kis_auto_brush_widget.cpp b/plugins/paintops/libpaintop/kis_auto_brush_widget.cpp
index 94329dab3bf03fba028349a677926ab6ae54c0c9..83acd478aee6b361df0ec8abc1a4e4b1d8d95860 100644
--- a/plugins/paintops/libpaintop/kis_auto_brush_widget.cpp
+++ b/plugins/paintops/libpaintop/kis_auto_brush_widget.cpp
@@ -21,6 +21,10 @@
#include //MSVC requires that Vc come first
#include "kis_auto_brush_widget.h"
+#include
+#include
+#include
+
#include
#include
#include
@@ -52,7 +56,7 @@ KisAutoBrushWidget::KisAutoBrushWidget(QWidget *parent, const char* name)
connect((QObject*)comboBoxShape, SIGNAL(activated(int)), m_updateCompressor.data(), SLOT(start()));
- inputRadius->setRange(0, 1000, 2);
+ inputRadius->setRange(0, KSharedConfig::openConfig()->group("").readEntry("maximumBrushSize", 1000), 2);
inputRadius->setExponentRatio(3.0);
inputRadius->setSingleStep(1);
inputRadius->setValue(5);
diff --git a/plugins/paintops/libpaintop/kis_brush_chooser.cpp b/plugins/paintops/libpaintop/kis_brush_chooser.cpp
index dc2d6d5bcc2541224dc5e5a7d918587620d94c3e..8db32f1d86f58bf0d588d3be608892962597a28c 100644
--- a/plugins/paintops/libpaintop/kis_brush_chooser.cpp
+++ b/plugins/paintops/libpaintop/kis_brush_chooser.cpp
@@ -33,6 +33,10 @@
#include
#include
+#include
+#include
+#include
+
#include
#include
@@ -105,7 +109,7 @@ KisPredefinedBrushChooser::KisPredefinedBrushChooser(QWidget *parent, const char
setupUi(this);
- brushSizeSpinBox->setRange(0, 1000, 2);
+ brushSizeSpinBox->setRange(0, KSharedConfig::openConfig()->group("").readEntry("maximumBrushSize", 1000), 2);
brushSizeSpinBox->setValue(5);
brushSizeSpinBox->setExponentRatio(3.0);
brushSizeSpinBox->setSuffix(i18n(" px"));
diff --git a/plugins/paintops/libpaintop/kis_curve_option.h b/plugins/paintops/libpaintop/kis_curve_option.h
index 63d78ccfb11bf3bea09f1816758db2b39fc4ff65..d73837d991137f4742f06f9fe938a7bc24f55b52 100644
--- a/plugins/paintops/libpaintop/kis_curve_option.h
+++ b/plugins/paintops/libpaintop/kis_curve_option.h
@@ -118,10 +118,12 @@ public:
const qreal realScalingPart = hasScaling ? KisDynamicSensor::scalingToAdditive(scaling) : 0.0;
const qreal realAdditivePart = hasAdditive ? additive : 0;
- return
- wrapInRange(
- 2 * offset + constant * realScalingPart + realAdditivePart,
- -1.0, 1.0);
+ qreal value = wrapInRange(2 * offset + constant * realScalingPart + realAdditivePart, -1.0, 1.0);
+ if (qIsNaN(value)) {
+ qWarning() << "rotationLikeValue returns NaN!" << normalizedBaseAngle << absoluteAxesFlipped;
+ value = 0;
+ }
+ return value;
}
qreal sizeLikeValue() const {
diff --git a/plugins/paintops/libpaintop/kis_embedded_pattern_manager.cpp b/plugins/paintops/libpaintop/kis_embedded_pattern_manager.cpp
index d92c20f2b502886e8ad580999345ed1becc04cb5..d1973ff581f8e1784fca4d8ef210916955249283 100644
--- a/plugins/paintops/libpaintop/kis_embedded_pattern_manager.cpp
+++ b/plugins/paintops/libpaintop/kis_embedded_pattern_manager.cpp
@@ -115,14 +115,7 @@ KoPattern* KisEmbeddedPatternManager::loadEmbeddedPattern(const KisPropertiesCon
pattern = Private::tryLoadEmbeddedPattern(setting);
if (pattern) {
- KoPattern *existingPattern = Private::tryFetchPatternByMd5(pattern->md5());
- if (existingPattern) {
- delete pattern;
- pattern = existingPattern;
- }
- else {
- KoResourceServerProvider::instance()->patternServer()->addResource(pattern, false);
- }
+ KoResourceServerProvider::instance()->patternServer()->addResource(pattern, false);
}
diff --git a/plugins/paintops/libpaintop/kis_pressure_hsv_option.cpp b/plugins/paintops/libpaintop/kis_pressure_hsv_option.cpp
index 7e8641960aae369a03ce606aca02efc480388d99..cf6f63046da58e7af94764eaa5701816f98957e6 100644
--- a/plugins/paintops/libpaintop/kis_pressure_hsv_option.cpp
+++ b/plugins/paintops/libpaintop/kis_pressure_hsv_option.cpp
@@ -133,7 +133,6 @@ void KisPressureHSVOption::apply(KoColorTransformation* transfo, const KisPaintI
}
qreal value = computeRotationLikeValue(info, 0, false);
-
transfo->setParameter(d->paramId, value);
transfo->setParameter(3, 0); //sets the type to HSV.
transfo->setParameter(4, false); //sets the colorize to false.
diff --git a/plugins/tools/basictools/kis_tool_brush.cc b/plugins/tools/basictools/kis_tool_brush.cc
index b25a8fd2f58aa5d6fcd7b0c5e08aeffde0f3f414..1ab772f75ec3beaf538588f2c86dd122f9e0c87d 100644
--- a/plugins/tools/basictools/kis_tool_brush.cc
+++ b/plugins/tools/basictools/kis_tool_brush.cc
@@ -20,6 +20,7 @@
*/
#include "kis_tool_brush.h"
+#include
#include
#include
@@ -42,7 +43,7 @@
#define MAXIMUM_MAGNETISM 1000
-void KisToolBrush::addSmoothingAction(int enumId, const QString &id, const QString &name, KActionCollection *globalCollection)
+void KisToolBrush::addSmoothingAction(int enumId, const QString &id, const QString &name, const QIcon &icon, KActionCollection *globalCollection)
{
/**
* KisToolBrush is the base of several tools, but the actions
@@ -50,6 +51,7 @@ void KisToolBrush::addSmoothingAction(int enumId, const QString &id, const QStri
*/
if (!globalCollection->action(id)) {
QAction *action = new QAction(name, globalCollection);
+ action->setIcon(icon);
globalCollection->addAction(id, action);
}
@@ -70,11 +72,11 @@ KisToolBrush::KisToolBrush(KoCanvasBase * canvas)
KActionCollection *collection = this->canvas()->canvasController()->actionCollection();
- addSmoothingAction(KisSmoothingOptions::NO_SMOOTHING, "set_no_brush_smoothing", i18nc("@action", "Brush Smoothing: Disabled"), collection);
- addSmoothingAction(KisSmoothingOptions::SIMPLE_SMOOTHING, "set_simple_brush_smoothing", i18nc("@action", "Brush Smoothing: Basic"), collection);
- addSmoothingAction(KisSmoothingOptions::WEIGHTED_SMOOTHING, "set_weighted_brush_smoothing", i18nc("@action", "Brush Smoothing: Weighted"), collection);
- addSmoothingAction(KisSmoothingOptions::STABILIZER, "set_stabilizer_brush_smoothing", i18nc("@action", "Brush Smoothing: Stabilizer"), collection);
-
+ addSmoothingAction(KisSmoothingOptions::NO_SMOOTHING, "set_no_brush_smoothing", i18nc("@action", "Brush Smoothing: Disabled"), KisIconUtils::loadIcon("smoothing-no"), collection);
+ addSmoothingAction(KisSmoothingOptions::SIMPLE_SMOOTHING, "set_simple_brush_smoothing", i18nc("@action", "Brush Smoothing: Basic"), KisIconUtils::loadIcon("smoothing-basic"), collection);
+ addSmoothingAction(KisSmoothingOptions::WEIGHTED_SMOOTHING, "set_weighted_brush_smoothing", i18nc("@action", "Brush Smoothing: Weighted"), KisIconUtils::loadIcon("smoothing-weighted"), collection);
+ addSmoothingAction(KisSmoothingOptions::STABILIZER, "set_stabilizer_brush_smoothing", i18nc("@action", "Brush Smoothing: Stabilizer"), KisIconUtils::loadIcon("smoothing-stabilizer"), collection);
+
}
KisToolBrush::~KisToolBrush()
diff --git a/plugins/tools/basictools/kis_tool_brush.h b/plugins/tools/basictools/kis_tool_brush.h
index ab73c8e69aad6a55211ee7eb28405d6adc6e6a4e..e627ada171906a9693ef26051126ca984b321d30 100644
--- a/plugins/tools/basictools/kis_tool_brush.h
+++ b/plugins/tools/basictools/kis_tool_brush.h
@@ -114,7 +114,7 @@ Q_SIGNALS:
void stabilizeSensorsChanged();
private:
- void addSmoothingAction(int enumId, const QString &id, const QString &name, KActionCollection *globalCollection);
+ void addSmoothingAction(int enumId, const QString &id, const QString &name, const QIcon &icon, KActionCollection *globalCollection);
private:
QComboBox *m_cmbSmoothingType;
diff --git a/plugins/tools/selectiontools/kis_tool_select_contiguous.cc b/plugins/tools/selectiontools/kis_tool_select_contiguous.cc
index ef8499897abf00134913b8de6c77789a9e072465..c0cc3127bdc795505517f00a0c47d33184ddc2dc 100644
--- a/plugins/tools/selectiontools/kis_tool_select_contiguous.cc
+++ b/plugins/tools/selectiontools/kis_tool_select_contiguous.cc
@@ -79,7 +79,6 @@ void KisToolSelectContiguous::activate(ToolActivation toolActivation, const QSet
void KisToolSelectContiguous::beginPrimaryAction(KoPointerEvent *event)
{
-
KisToolSelectBase::beginPrimaryAction(event);
KisPaintDeviceSP dev;
@@ -93,19 +92,20 @@ void KisToolSelectContiguous::beginPrimaryAction(KoPointerEvent *event)
QApplication::setOverrideCursor(KisCursor::waitCursor());
+
QPoint pos = convertToIntPixelCoord(event);
QRect rc = currentImage()->bounds();
KisFillPainter fillpainter(dev);
fillpainter.setHeight(rc.height());
fillpainter.setWidth(rc.width());
fillpainter.setFillThreshold(m_fuzziness);
+ fillpainter.setFeather(m_feather);
+ fillpainter.setSizemod(m_sizemod);
KisImageWSP image = currentImage();
KisPaintDeviceSP sourceDevice = m_limitToCurrentLayer ? dev : image->projection();
image->lock();
- fillpainter.setFeather(m_feather);
- fillpainter.setSizemod(m_sizemod);
KisSelectionSP selection = fillpainter.createFloodSelection(pos.x(), pos.y(), sourceDevice);
image->unlock();
@@ -136,6 +136,7 @@ void KisToolSelectContiguous::beginPrimaryAction(KoPointerEvent *event)
KisSelectionToolHelper helper(kisCanvas, kundo2_i18n("Select Contiguous Area"));
helper.selectPixelSelection(selection->pixelSelection(), selectionAction());
QApplication::restoreOverrideCursor();
+
}
void KisToolSelectContiguous::paint(QPainter &painter, const KoViewConverter &converter)
diff --git a/plugins/tools/selectiontools/kis_tool_select_outline.cc b/plugins/tools/selectiontools/kis_tool_select_outline.cc
index 2dce8835b28f41a8f35d16b0b28941e84cb217c6..571b55f3e6c532e59e6dbb061343d6871ef0f9d9 100644
--- a/plugins/tools/selectiontools/kis_tool_select_outline.cc
+++ b/plugins/tools/selectiontools/kis_tool_select_outline.cc
@@ -161,7 +161,6 @@ void KisToolSelectOutline::finishSelectionAction()
if (m_points.count() > 2 &&
!helper.tryDeselectCurrentSelection(boundingViewRect, selectionAction())) {
-
QApplication::setOverrideCursor(KisCursor::waitCursor());
diff --git a/plugins/tools/tool_crop/wdg_tool_crop.ui b/plugins/tools/tool_crop/wdg_tool_crop.ui
index 962cde2a92941c9f0ec63922ac3be776617d6fff..20b92cc398dd94171f171ed00fd952f8919bed90 100644
--- a/plugins/tools/tool_crop/wdg_tool_crop.ui
+++ b/plugins/tools/tool_crop/wdg_tool_crop.ui
@@ -292,6 +292,9 @@
Ratio
+
+ 0.100000000000000
+
2
diff --git a/plugins/tools/tool_transform2/kis_tool_transform_config_widget.cpp b/plugins/tools/tool_transform2/kis_tool_transform_config_widget.cpp
index efc3de939cd39693695d05c6d291887bcd2be3d9..34b1e7cf1a9233ef3a6dc9ea856914fa6970c470 100644
--- a/plugins/tools/tool_transform2/kis_tool_transform_config_widget.cpp
+++ b/plugins/tools/tool_transform2/kis_tool_transform_config_widget.cpp
@@ -60,9 +60,9 @@ KisToolTransformConfigWidget::KisToolTransformConfigWidget(TransformTransactionP
cmbFilter->setToolTip(i18nc("@info:tooltip",
"Select filtering mode:\n"
"
"
- "Bilinear for areas with uniform color to avoid artifacts "
- "Bicubic for smoother results "
- "Lanczos3 for sharp results. May produce aerials."
+ "Bilinear for areas with uniform color to avoid artifacts "
+ "Bicubic for smoother results "
+ "Lanczos3 for sharp results. May produce aerials. "
" "));
connect(cmbFilter, SIGNAL(activated(const KoID &)),
this, SLOT(slotFilterChanged(const KoID &)));
@@ -229,11 +229,11 @@ KisToolTransformConfigWidget::KisToolTransformConfigWidget(TransformTransactionP
liquifySizePressureBox->setChecked(true);
connect(liquifySizePressureBox, SIGNAL(toggled(bool)), this, SLOT(liquifySizePressureChanged(bool)));
- liquifySizePressureBox->setToolTip(i18nc("@info:tooltip", "Scale Size value according to current stylus pressure"));
+ liquifySizePressureBox->setToolTip(i18nc("@info:tooltip", "Scale Size value according to current stylus pressure"));
liquifyAmountPressureBox->setChecked(true);
connect(liquifyAmountPressureBox, SIGNAL(toggled(bool)), this, SLOT(liquifyAmountPressureChanged(bool)));
- liquifyAmountPressureBox->setToolTip(i18nc("@info:tooltip", "Scale Amount value according to current stylus pressure"));
+ liquifyAmountPressureBox->setToolTip(i18nc("@info:tooltip", "Scale Amount value according to current stylus pressure"));
liquifyReverseDirectionChk->setChecked(false);
connect(liquifyReverseDirectionChk, SIGNAL(toggled(bool)), this, SLOT(liquifyReverseDirectionChanged(bool)));
diff --git a/sdk/tests/qimage_based_test.h b/sdk/tests/qimage_based_test.h
index 19d5b660b0d6a0238f6c429465199c1cfbce3dc5..ad666d2175729c48df0827aaa0763e178cd26d34 100644
--- a/sdk/tests/qimage_based_test.h
+++ b/sdk/tests/qimage_based_test.h
@@ -79,7 +79,7 @@ protected:
KisFilterSP filter = KisFilterRegistry::instance()->value("blur");
Q_ASSERT(filter);
- KisFilterConfigurationSP configuration = filter->defaultConfiguration(0);
+ KisFilterConfigurationSP configuration = filter->defaultConfiguration();
Q_ASSERT(configuration);
KisAdjustmentLayerSP blur1 = new KisAdjustmentLayer(image, "blur1", configuration, 0);