Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/assets/cursors/bucket.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/assets/cursors/bucket.png differ diff -Nru photoflare-1.5.7/build.sh photoflare-1.6.0/build.sh --- photoflare-1.5.7/build.sh 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/build.sh 2019-09-17 21:28:37.000000000 +0000 @@ -5,7 +5,7 @@ export QT_SELECT=qt5 apt-get update -q -apt-get install -y qtbase5-dev qttools5-dev-tools libgraphicsmagick++-dev +apt-get install -y qtbase5-dev qttools5-dev-tools libgraphicsmagick++-dev libomp-dev qmake PhotoFlare.pro make diff -Nru photoflare-1.5.7/debian/changelog photoflare-1.6.0/debian/changelog --- photoflare-1.5.7/debian/changelog 2019-02-19 06:54:57.000000000 +0000 +++ photoflare-1.6.0/debian/changelog 2018-11-24 05:58:00.000000000 +0000 @@ -1,37 +1,21 @@ -photoflare (1.5.7-1) unstable; urgency=medium +photoflare (1.6.0-1dhor~disco) disco; urgency=medium - * New upstream release. - * Remove ftbfs_hurd.patch: upstream applied. - * Bump Standards-Version: 4.3.0 (no changes needed). + * Added new User documentation as Github pages. + * Added custom cursor for Paint Bucket tool. + * Fixed incorrect tool being selected when you change tab. + * Improved aboutDialog credits layout so titles can be translated. + * Added Flatpak packaging manifest. + * Added keyboard shortcut for Select All. + * Improved Dock layout and Zoom settings to be translatable. + * Added zoom direction feature to Preferences. + * Added buttons to add/remove filters on batch/automate dialog. + * Added keyboard shortcut for original zoom. (Ctrl+0) + * Added OpenMP to use multiple threads for graphicsmagick filters. - -- Dylan Aïssi Tue, 19 Feb 2019 07:54:57 +0100 + -- Dariusz Duma Sat, 24 Nov 2018 06:58:00 +0100 -photoflare (1.5.6.1-1) unstable; urgency=medium +photoflare (1.5-1dhor~xenial) xenial; urgency=medium - * New upstream release. - * Add patch to fix FTBFS on Hurd. + * Initial release (Closes: #nnnn) - -- Dylan Aïssi Thu, 06 Dec 2018 19:39:11 +0100 - -photoflare (1.5.6-1) unstable; urgency=medium - - * New upstream release. - - -- Dylan Aïssi Sat, 24 Nov 2018 15:25:16 +0100 - -photoflare (1.5.5.1-1) unstable; urgency=medium - - * New upstream release. - * Update my email address. - * Remove all patches: upstream applied. - * AppStream file and pixmaps icon are now installed by upstream. - * Add qt5-image-formats-plugins to Depends. - * Bump Standards-Version: 4.2.1 (no changes needed). - - -- Dylan Aïssi Wed, 07 Nov 2018 07:21:33 +0100 - -photoflare (1.5.4-1) unstable; urgency=medium - - * Initial release. (Closes: #901871, LP: #1711644) - - -- Dylan Aïssi Mon, 25 Jun 2018 18:28:05 +0200 + -- Dariusz Duma Wed, 27 Dec 2017 20:31:42 +0100 diff -Nru photoflare-1.5.7/debian/compat photoflare-1.6.0/debian/compat --- photoflare-1.5.7/debian/compat 2019-02-19 06:54:57.000000000 +0000 +++ photoflare-1.6.0/debian/compat 2017-12-27 19:31:45.000000000 +0000 @@ -1 +1 @@ -11 +9 diff -Nru photoflare-1.5.7/debian/control photoflare-1.6.0/debian/control --- photoflare-1.5.7/debian/control 2019-02-19 06:54:57.000000000 +0000 +++ photoflare-1.6.0/debian/control 2018-11-24 05:58:00.000000000 +0000 @@ -1,24 +1,25 @@ Source: photoflare -Maintainer: Debian PhotoTools Maintainers -Uploaders: Dylan Aïssi Section: graphics Priority: optional -Build-Depends: debhelper (>= 11), - libgraphicsmagick++-dev, - qtbase5-dev (>= 5.6), - qttools5-dev-tools -Standards-Version: 4.3.0 -Vcs-Browser: https://salsa.debian.org/debian-phototools-team/photoflare -Vcs-Git: https://salsa.debian.org/debian-phototools-team/photoflare.git +Maintainer: Dariusz Duma +Build-Depends: debhelper (>=9), + qt5-default, + libomp-dev, + libgraphicsmagick++1-dev, + qt5-qmake, + qt5-image-formats-plugins, + qttools5-dev-tools +Standards-Version: 4.1.4 Homepage: http://photoflare.io/ +#Vcs-Git: git://anonscm.debian.org/collab-maint/photofiltrelx.git +#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/photofiltrelx.git Package: photoflare Architecture: any -Depends: ${misc:Depends}, - ${shlibs:Depends}, - qt5-image-formats-plugins -Description: Simple but powerful Image Editor - PhotoFlare is an effort to bring quick, simple but powerful image editing to - the masses. PhotoFlare is inspired by the image editor PhotoFiltre which is - available only on another OS. PhotoFlare is designed for beginner users with - the aim to give them a tool easy to learn and use. +Conflicts: photofiltre-lx-studio +Replaces: photofiltre-lx-studio +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Simple but powerful Cross Platform image editor + Simple but powerful Cross Platform image editor originally inspired by the + PhotoFiltre image editor on Windows. Created with C++ 11, Qt Framework and + the Graphicsmagick library. diff -Nru photoflare-1.5.7/debian/copyright photoflare-1.6.0/debian/copyright --- photoflare-1.5.7/debian/copyright 2019-02-19 06:54:57.000000000 +0000 +++ photoflare-1.6.0/debian/copyright 2017-12-27 19:31:45.000000000 +0000 @@ -1,66 +1,38 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: PhotoFlare -Upstream-Contact: Dylan Coakley -Source: https://github.com/PhotoFlare/photoflare/ +Upstream-Name: photoflare +Source: Files: * -Copyright: 2015-2018 Dylan Coakley -License: GPL-3+ - -Files: external/qt-solutions/common.pri - external/qt-solutions/qtsingleapplication/* -Copyright: 2013 Digia Plc and/or its subsidiary(-ies). Part of the Qt Solutions component. -License: BSD-3-clause -Comment: QtSingleApplication cannot be individually packaged. See - https://alioth-lists.debian.net/pipermail/pkg-kde-talk/2013-June/001813.html +Copyright: + +License: + + + . + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines Files: debian/* -Copyright: 2018 Dylan Aïssi -License: GPL-3+ - -License: GPL-3+ +Copyright: 2017 dhor +License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License - along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with this program. If not, see . On Debian systems, the complete text of the GNU General - Public License can be found in `/usr/share/common-licenses/GPL-3'. + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". -License: BSD-3-clause - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - . - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - . - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - . - Neither the name of the nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. +# Please avoid picking licenses with terms that are more restrictive than the +# packaged work, as it may make Debian's contributions unacceptable upstream. diff -Nru photoflare-1.5.7/debian/README.Debian photoflare-1.6.0/debian/README.Debian --- photoflare-1.5.7/debian/README.Debian 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/debian/README.Debian 2017-12-27 19:31:45.000000000 +0000 @@ -0,0 +1,6 @@ +photoflare for Debian +-------------------- + + + + -- dhor Wed, 27 Dec 2017 20:31:42 +0100 diff -Nru photoflare-1.5.7/debian/README.source photoflare-1.6.0/debian/README.source --- photoflare-1.5.7/debian/README.source 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/debian/README.source 2017-12-27 19:31:45.000000000 +0000 @@ -0,0 +1,10 @@ +photoflare for Debian +-------------------- + + + + + + -- dhor Wed, 27 Dec 2017 20:31:42 +0100 + diff -Nru photoflare-1.5.7/debian/rules photoflare-1.6.0/debian/rules --- photoflare-1.5.7/debian/rules 2019-02-19 06:54:57.000000000 +0000 +++ photoflare-1.6.0/debian/rules 2018-11-24 05:58:00.000000000 +0000 @@ -1,8 +1,18 @@ #!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all export QT_SELECT=qt5 %: - dh $@ + dh $@ + + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) + diff -Nru photoflare-1.5.7/debian/watch photoflare-1.6.0/debian/watch --- photoflare-1.5.7/debian/watch 2019-02-19 06:54:57.000000000 +0000 +++ photoflare-1.6.0/debian/watch 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -version=4 -opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/photoflare-$1\.tar\.gz/ \ - https://github.com/PhotoFlare/photoflare/tags .*/v?(\d\S+)\.tar\.gz diff -Nru photoflare-1.5.7/docs/allshortcuts.html photoflare-1.6.0/docs/allshortcuts.html --- photoflare-1.5.7/docs/allshortcuts.html 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/docs/allshortcuts.html 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,122 @@ +--- +layout: default +--- + + +

Keyboard shortcuts

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Menu + + Shortcut + + Action +
FileCtrl+NLaunch the New file dialog.
FileCtrl+OLaunch the Open file dialog.
FileCtrl+SSave the current file.
FileCtrl+Shift+SSave the current file with a new file name.
FileCtrl+Shift+WCloses the current file.
FileCtrl+PPrint the current file.
FileCtrl+JLaunch the Image properties dialog.
FileCtrl+QQuit the application.
EditCtrl+CCopy current image.
EditCtrl+VPaste current image.
EditCtrl+Shift+VPaste current image as new image.
ImageCtrl+HLaunch the Resize image dialog.
ImageCtrl+UDuplicate the current image into a new tab.
ImageCtrl+Shift+HCrop the current image based on your selected area.
SelectionCtrl+ASelect the whole current image as your selected area.
ViewCtrl+LShow/hide the toolpalette.
ViewCtrl+Shift(+)+Increase zoom level.
ViewCtrl(+)-Decrease zoom level.
ViewCtrl+0Original zoom level. (100%)
ViewCtrl+FSet application to full screen.
+

+ Return to table of contents >> +

+ + \ No newline at end of file diff -Nru photoflare-1.5.7/docs/batch.html photoflare-1.6.0/docs/batch.html --- photoflare-1.5.7/docs/batch.html 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/docs/batch.html 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,26 @@ +--- +layout: default +--- + + +

Batch processing/Automation

+

+ Launch via "Tools >> Automate/Batch..." or via the toolbar button. +

+

Add your source files and set the output folder

+ +

Adjust image size or canvas size

+ +

Adjust brightness, contrast, saturation or gamma correction

+ +

Apply any of the available filters

+ +

Rotate or flip

+ +

Final summary screen - Click Ok to confirm

+ +

+ Return to table of contents >> +

+ + \ No newline at end of file diff -Nru photoflare-1.5.7/docs/_config.yml photoflare-1.6.0/docs/_config.yml --- photoflare-1.5.7/docs/_config.yml 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/docs/_config.yml 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1 @@ +theme: jekyll-theme-slate \ No newline at end of file diff -Nru photoflare-1.5.7/docs/creating.html photoflare-1.6.0/docs/creating.html --- photoflare-1.5.7/docs/creating.html 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/docs/creating.html 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,22 @@ +--- +layout: default +--- + + +

Creating a new image

+

+ Images are created by using the New file dialog. +

+

Menu:
"File >> New..."

+

keyboard shortcut:
"Ctrl+N" (View all shortcuts)

+

Button:

+
    +
  • The top area shows the preview of dimensions in pixels. (Important if you are using Cm/Inches below)
  • +
  • The bottom area allows you to select the width, height, unit to use (Pixels,Cm,Inches), Background colour and Preset size.
  • +
+ +

+ Return to table of contents >> +

+ + \ No newline at end of file diff -Nru photoflare-1.5.7/docs/crop.html photoflare-1.6.0/docs/crop.html --- photoflare-1.5.7/docs/crop.html 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/docs/crop.html 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,17 @@ +--- +layout: default +--- + + +

Cropping images

+

+ To crop an image use the PointerTool (first tool in the palette). Left click and drag to select an area to crop. Right click to bring up the context menu. Select the "Crop" option. +

+

Menu:
"Image >> Crop"

+

keyboard shortcut:
"Ctrl+Shift+H" (View all shortcuts)

+ +

+ Return to table of contents >> +

+ + \ No newline at end of file diff -Nru photoflare-1.5.7/docs/gradients.html photoflare-1.6.0/docs/gradients.html --- photoflare-1.5.7/docs/gradients.html 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/docs/gradients.html 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,17 @@ +--- +layout: default +--- + + +

Gradients

+

+ Launch via the toolbar button. Easily create gradients via the Gradient dialog. You can select the gradient colours, direction and what type of gradient you would like. Gradients can be created on new images or applied to existing images. +

+

Button:

+ + +

+ Return to table of contents >> +

+ + \ No newline at end of file diff -Nru photoflare-1.5.7/docs/hue.html photoflare-1.6.0/docs/hue.html --- photoflare-1.5.7/docs/hue.html 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/docs/hue.html 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,19 @@ +--- +layout: default +--- + + +

Adjusting hue

+

+ Launch the Hue Variation dialog. You can adjust either the hue via "Colorize" or "Hue" option. +

+

Menu:
"Adjust >> Hue Variation..."

+

keyboard shortcut:
"Ctrl+H" (View all shortcuts)

+

Button:

+ + +

+ Return to table of contents >> +

+ + \ No newline at end of file Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/batch1.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/batch1.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/batch2.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/batch2.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/batch3.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/batch3.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/batch4.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/batch4.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/batch5.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/batch5.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/batch6.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/batch6.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/cropping.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/cropping.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/grad1.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/grad1.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/grad2.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/grad2.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/hue1.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/hue1.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/hue2.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/hue2.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/mode_1.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/mode_1.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/mode_2.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/mode_2.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/mode_toggle.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/mode_toggle.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/newDialog.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/newDialog.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/openDialog.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/openDialog.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/pref1.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/pref1.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/pref2.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/pref2.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/pref3.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/pref3.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/pref4.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/pref4.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/pref5.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/pref5.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/pref6.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/pref6.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/pref7.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/pref7.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/pref_comp.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/pref_comp.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/resizeDialog.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/resizeDialog.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/text1.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/text1.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/toolbar1/imgsize.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/toolbar1/imgsize.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/toolbar1/new.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/toolbar1/new.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/toolbar1/open.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/toolbar1/open.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/toolbar1/pref.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/toolbar1/pref.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/toolbar1/text.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/toolbar1/text.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/toolbar2/gradient.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/toolbar2/gradient.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/toolbar2/hue.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/toolbar2/hue.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/tools/Blur.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/tools/Blur.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/tools/Bucket.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/tools/Bucket.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/tools/ColourPicker.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/tools/ColourPicker.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/tools/Eraser.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/tools/Eraser.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/tools/Line.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/tools/Line.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/tools/PaintBrush-Plus.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/tools/PaintBrush-Plus.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/tools/PaintBrush.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/tools/PaintBrush.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/tools/Pointer.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/tools/Pointer.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/tools/Smudge.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/tools/Smudge.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/tools/Spraycan.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/tools/Spraycan.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/tools/Stamp.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/tools/Stamp.png differ Binary files /tmp/tmpVjft09/7E7QsijAUQ/photoflare-1.5.7/docs/images/tools/Wand.png and /tmp/tmpVjft09/b6ZGDYSqsm/photoflare-1.6.0/docs/images/tools/Wand.png differ diff -Nru photoflare-1.5.7/docs/index.html photoflare-1.6.0/docs/index.html --- photoflare-1.5.7/docs/index.html 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/docs/index.html 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,32 @@ +--- +layout: default +--- + + +

+ Photoflare is a cross-platform image editor with an aim to balance between powerful features and a very friendly graphical user interface. It suits a wide variety of different tasks and users who value a more nimble workflow. Features include basic image editing capabilities, paint brushes, image filters, colour adjustments and more advanced features such as Batch image processing. +

+ +

User manual

+

+ Welcome to the Photoflare user manual. This is information aimed at end users to help understand how to use the current features in the application. +

+ + +

Table of contents

+ + + \ No newline at end of file diff -Nru photoflare-1.5.7/docs/modes.html photoflare-1.6.0/docs/modes.html --- photoflare-1.5.7/docs/modes.html 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/docs/modes.html 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,26 @@ +--- +layout: default +--- + + +

Window modes

+

+ Using the Window modes will give you options on how you work with your images. To switch window mode use the Layout tab inside Preferences and select "Multi-Window mode". +

+ +

Tab mode

+

+ The default mode will be tabs. This should be familiar to most users. +

+ + +

MDI mode

+

+ The MDI option will use child windows inside the main (parent) window. This is a little less modern but some users prefer this option. +

+ +

+ Return to table of contents >> +

+ + \ No newline at end of file diff -Nru photoflare-1.5.7/docs/opening.html photoflare-1.6.0/docs/opening.html --- photoflare-1.5.7/docs/opening.html 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/docs/opening.html 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,27 @@ +--- +layout: default +--- + + +

Opening files

+

+ Open files with the Open file dialog. +

+

Menu:
"File >> Open..."

+

keyboard shortcut:
"Ctrl+O" (View all shortcuts)

+

Button:

+

Supported formats

+
    +
  • png
  • +
  • jpeg
  • +
  • gif
  • +
  • tiff
  • +
  • bmp
  • +
  • ico
  • +
+ +

+ Return to table of contents >> +

+ + \ No newline at end of file diff -Nru photoflare-1.5.7/docs/prefs.html photoflare-1.6.0/docs/prefs.html --- photoflare-1.5.7/docs/prefs.html 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/docs/prefs.html 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,71 @@ +--- +layout: default +--- + + +

Preferences

+

+ The Preferences dialog contains all of the settings for Photoflare's features. They are separated into sections to make them easy to understand. +

+

Menu:
"Tools >> Preferences"

+

Button:

+

Folders

+
    +
  • Opening folder - Default folder when opening files.
  • +
  • Remember previous opened folder - Always set location to the previously opened directory.
  • +
  • Saving folder - Default folder when saving files.
  • +
  • Remember previous save folder - Always set location to the previously saved directory.
  • +
+ + +

Saving

+
    +
  • When you click save .png will be selected by default.
  • +
  • Choose a format to select by default when you click save.
  • +
+ + +

Compression

+

+ Example of compression dialog when saving .jpg files. +

+ +
    +
  • When saving .jpg files you will get a dialog to choose your compression level.
  • +
  • If you prefer you can set your default compression. This option will not show the dialog but save your file with the compression value selected.
  • +
+ + +

Layout

+
    +
  • Multi Window Mode - Toggle between MDI and Tabs.
  • +
  • Default Toolpalette Location - Show the toolpalette on the right/left.
  • +
  • Zoom direction - Decides the zoom behaviour of the mouse scroll.
  • +
+ + +

Default values

+
    +
  • Default units - Choose the units you prefer to work with. This will be selected by default on the New file dialog/resize dialog. +
  • +
  • Memorize parameters - If enabled your parameters entered on all dialogs will be memorized.
  • +
+ + +

History

+
    +
  • Image history size - Set how many undo steps you want to allow.
  • +
+ + +

Startup

+
    +
  • Language - Pick your language. (EN, FR, NL, DE, TW_ZH, CZ)
  • +
  • Maximize on startup - Always maximize when application starts.
  • +
+ +

+ Return to table of contents >> +

+ + \ No newline at end of file diff -Nru photoflare-1.5.7/docs/resize.html photoflare-1.6.0/docs/resize.html --- photoflare-1.5.7/docs/resize.html 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/docs/resize.html 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,21 @@ +--- +layout: default +--- + + +

Resizing images

+

+ Resize images with the Image size dialog. +

+

Menu:
"Image >> Image size..."

+

keyboard shortcut:
"Ctrl+H" (View all shortcuts)

+

Button:

+

+ This has similar options to the new file dialog. One new option here is the "Lock ratio" option. This will keep the ratio of the image intact if you change the width/height. +

+ +

+ Return to table of contents >> +

+ + \ No newline at end of file diff -Nru photoflare-1.5.7/docs/text.html photoflare-1.6.0/docs/text.html --- photoflare-1.5.7/docs/text.html 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/docs/text.html 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,29 @@ +--- +layout: default +--- + + +

Add/Edit text

+

+ To add text to an image use the Text dialog. +

+

Menu:
"Image >> Text..."

+

Button:

+

Options

+
    +
  • Font colour
  • +
  • Font face
  • +
  • Font size
  • +
  • Alignment
  • +
  • Bold
  • +
  • Italic
  • +
  • Strike out
  • +
  • Underline
  • +
  • Antialias
  • +
+ +

+ Return to table of contents >> +

+ + \ No newline at end of file diff -Nru photoflare-1.5.7/docs/tools.html photoflare-1.6.0/docs/tools.html --- photoflare-1.5.7/docs/tools.html 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/docs/tools.html 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,60 @@ +--- +layout: default +--- + + +

Tools

+ +

Pointer tool

+

+ Create selections on an image. Selections can then be used to copy a section of an image or crop to the selected area. +

+

Colour picker

+

+ Pick a colour from an image and set this colour as either a primary (left click) or secondary colour(right click). +

+

Magic wand

+

+ Select areas of an image using edge detection. +

+

Line tool

+

+ Draw lines on an image. +

+

Paint bucket

+

+ Fill large areas on images with either a primary (left click) or secondary colour(right click). +

+

Spray can

+

+ Spray colour within a radius in a spread pattern. +

+

Paint brush

+

+ Standard paint brush with basic brushes. +

+

Advanced paint brush

+

+ Advanced paint brush with more options and artistic brush types. +

+

Clone Stamp

+

+ Clone a section/area of an image and use it as a stamp. +

+

Blur tool

+

+ Blur parts of an image by holding left click and moving the radius to areas you need to blur. +

+

Eraser tool

+

+ Basic eraser tool to remove your painting mistakes. +

+

Smudge tool

+

+ Smudge pixels together using the radius of the tool while holding left click. +

+

+ Return to table of contents >> +

+ + \ No newline at end of file diff -Nru photoflare-1.5.7/flatpak/flatpak_build.json photoflare-1.6.0/flatpak/flatpak_build.json --- photoflare-1.5.7/flatpak/flatpak_build.json 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/flatpak/flatpak_build.json 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,38 @@ +{ + "app-id": "io.photoflare_editor.photoflare", + "runtime": "org.kde.Platform", + "runtime-version": "5.11", + "sdk": "org.kde.Platform", + "command": "photoflare", + "modules": [ + { + "name": "graphicsmagick", + "builddir": true, + "config-opts": [ + "--enable-shared", + "--with-modules", + "--with-perl", + "--with-quantum-depth=16", + "--with-threads" + ], + "sources": [ + { + "type": "archive", + "url": "http://ftp.icm.edu.pl/pub/unix/graphics/GraphicsMagick/1.3/GraphicsMagick-1.3.29.tar.gz", + "sha256":"de820cd10597205941a7e9d02c2e679231e92e8e769c204ef09034d2279ad453" + } + ] + }, + { + "name": "photoflare", + "buildsystem": "qmake", + "sources": [ + { + "type": "git", + "url": "https://github.com/PhotoFlare/photoflare.git", + "commit": "a2b8c0da81811000e17c2e008de43a27523b4f2f" + } + ] + } + ] +} diff -Nru photoflare-1.5.7/.github/FUNDING.yml photoflare-1.6.0/.github/FUNDING.yml --- photoflare-1.5.7/.github/FUNDING.yml 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/.github/FUNDING.yml 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +custom: https://photoflare.io/donate/ diff -Nru photoflare-1.5.7/.github/README.md photoflare-1.6.0/.github/README.md --- photoflare-1.5.7/.github/README.md 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/.github/README.md 2019-09-17 21:28:37.000000000 +0000 @@ -1,36 +1,43 @@ # PhotoFlare -[![DebianBadge](https://badges.debian.net/badges/debian/testing/photoflare/version.svg)](https://packages.debian.org/testing/photoflare) -[![GitHub release](https://img.shields.io/badge/Release-1.5.6.1-green.svg)](https://github.com/PhotoFlare/photoflare/releases) [![License: GPL v3+](https://img.shields.io/badge/License-GPL-yellowgreen.svg)](https://www.gnu.org/licenses/gpl-3.0) [![Build Status](https://travis-ci.org/PhotoFlare/photoflare.svg?branch=master)](https://travis-ci.org/PhotoFlare/photoflare) -[![Snap Status](https://build.snapcraft.io/badge/PhotoFlare/photoflare.svg)](https://build.snapcraft.io/user/PhotoFlare/photoflare) +[![GitHub release](https://img.shields.io/badge/Release-1.5.9-green.svg)](https://github.com/PhotoFlare/photoflare/releases) +[![latest packaged version(s)](https://repology.org/badge/latest-versions/photoflare.svg)](https://repology.org/project/photoflare/versions) -Simple but powerful Cross Platform image editor originally inspired by the PhotoFiltre image editor on Windows. Created with C++ 17, Qt Framework and the Graphicsmagick library. +Photoflare is a cross-platform image editor with an aim to balance between powerful features and a very friendly graphical user interface. It suits a wide variety of different tasks and users who value a more nimble workflow. Features include basic image editing capabilities, paint brushes, image filters, colour adjustments and more advanced features such as Batch image processing. - + ## Documentation -Information on features and using the project will be available here. At the moment its a work in progress. +Information on current features and how to use the application will be +available here. (WIP) ## Building ### Dependencies +- G++/Clang on Linux, MSVC/Clang on Windows or Clang on MacOSX - libgraphicsmagick++-dev -- qt5-default (Ubuntu only) -- G++ on Linux, MinGW on Windows or Clang on MacOSX +- libomp-dev +- qt5-default (Ubuntu only) +**or** +- libc6-dev +- libqt5core5a-dev +- libqt5gui5-dev +- libqt5widgets5-dev -Compile using either by opening the .pro file with Qt Creator or use qmake passing the .pro file as a parameter. Full instructions for each platform available here +Compile using either by opening the .pro file with Qt Creator or use qmake passing the .pro file as a parameter. Full instructions for each platform available here ## Running ### Dependencies - libc6 - libgraphicsmagick++-q16-12 -- libqt5gui5 - libqt5core5a +- libqt5gui5 - libqt5widgets5 - libqt5printsupport5 +- libomp5 - qt5-image-formats-plugins (Optional - Extra file format support) ## Translations @@ -43,4 +50,4 @@ - Chinese (TW) - Czech -If you would like to add to this list then get in touch. Instructions on adding a translation is available here +If you would like to add to this list then get in touch. Instructions on adding a translation is available here diff -Nru photoflare-1.5.7/Icons.qrc photoflare-1.6.0/Icons.qrc --- photoflare-1.5.7/Icons.qrc 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/Icons.qrc 2019-09-17 21:28:37.000000000 +0000 @@ -103,5 +103,6 @@ assets/cursors/color-picker.png + assets/cursors/bucket.png diff -Nru photoflare-1.5.7/installers/deb/DEBIAN/control photoflare-1.6.0/installers/deb/DEBIAN/control --- photoflare-1.5.7/installers/deb/DEBIAN/control 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/installers/deb/DEBIAN/control 2019-09-17 21:28:37.000000000 +0000 @@ -1,5 +1,5 @@ Package: photoflare -Version: 1.5.6.1~bionic1 +Version: 1.5.9~bionic1 Architecture: amd64 Maintainer: Dylan Coakley Installed-Size: 5000 diff -Nru photoflare-1.5.7/installers/PhotoFlare.aip photoflare-1.6.0/installers/PhotoFlare.aip --- photoflare-1.5.7/installers/PhotoFlare.aip 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/installers/PhotoFlare.aip 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,487 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru photoflare-1.5.7/io.photoflare.photoflare.appdata.xml photoflare-1.6.0/io.photoflare.photoflare.appdata.xml --- photoflare-1.5.7/io.photoflare.photoflare.appdata.xml 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/io.photoflare.photoflare.appdata.xml 2019-09-17 21:28:37.000000000 +0000 @@ -1,10 +1,10 @@ - + io.photoflare.photoflare FSFAP GPL-3.0+ - PhotoFlare + Photoflare Simple but powerful Cross Platform Image Editor @@ -30,45 +30,45 @@ - http://photoflare.io - PhotoFlare + https://photoflare.io + Photoflare photoflare - + -
    -
  • Fixed the TextTool wrapping for text more than a single line.
  • -
  • Fixed the EraserTool incorrectly showing zero as the initial radius.
  • -
  • Fixed issue with the language path not detected correctly.
  • -
+
    +
  • Added custom cursor for Paint Bucket tool.
  • +
  • Fixed incorrect tool being selected when you change tab.
  • +
  • Improved aboutDialog credits layout so titles can be translated.
  • +
  • Added Flatpak packaging manifest.
  • +
  • Added keyboard shortcut for Select All.
  • +
  • Improved Dock layout and Zoom settings to be translatable.
  • +
  • Added zoom direction feature to Preferences.
  • +
  • Added buttons to add/remove filters on batch/automate dialog.
  • +
  • Added keyboard shortcut for original zoom. (Ctrl+0)
  • +
  • Added OpenMP to use multiple threads for graphicsmagick filters.
  • +
-
- + + -
    -
  • Improved layout of the Hue Dialog.
  • -
  • Improved rendering of scaled high resolution images. (8K)
  • -
  • Fixed Dockpalettes being able to close or float.
  • -
  • Fixed Advanced PaintBrush not painting via single click.
  • -
  • Fixed Basic PaintBrush not having a default opacity/pressure set.
  • -
  • Fixed Contrast increase/decrease not working with the latest graphicsmagick.
  • -
  • Fixed Gamma increase/decrease not working with the latest graphicsmagick.
  • -
  • Fixed TextDialog font not taking the colour previously selected after first use.
  • -
  • Fixed Filterbar being floatable causing issues outside program bounds.
  • -
  • Fixed Eraser tool width incorrect on mouse click.
  • -
  • Fixed text cut off on Restart button in Preferences for NL translation.
  • -
  • Fixed zoom +/- after using Original zoom from View menu.
  • -
  • Fixed Show grid with zero causing max consumption of resources.
  • -
  • Fixed Show grid without image causing crash.
  • -
  • Add 2560 x 1440 to the New dialog presets.
  • -
  • Add support for generating Snap installers on 18.04.
  • -
  • Add checkbox menu toggle for Fullscreen, Filterbar, Toolpalette and View grid.
  • -
+
    +
  • Added ability to transition from auto zoom to zoom step for zoom in.
  • +
  • Added keyboard shortcuts for zoom in/zoom out.
  • +
  • Added keyboard shortcut to toggle View > Full Screen.
  • +
  • Fixed the newdialog size preview having arrow controls and focus.
  • +
  • Fixed not being able to undo after pasting image.
  • +
  • Fixed whatIsThis not disabled on Windows during compile.
  • +
  • Fixed being able to resize certain dialogs.
  • +
  • Fixed Compression and History size sliders not updating on click.
  • +
  • Fixed Paste as New Image without any copied data.
  • +
  • Removed lots of compiler warnings.
  • +
-
+
diff -Nru photoflare-1.5.7/photoflare.1 photoflare-1.6.0/photoflare.1 --- photoflare-1.5.7/photoflare.1 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/photoflare.1 2019-09-17 21:28:37.000000000 +0000 @@ -1,5 +1,5 @@ .\" -.TH PHOTOFLARE "1" "December 2018" "1.5.6.1" +.TH PHOTOFLARE "1" "August 2019" "1.6.0" .SH NAME photoFlare \- Simple but powerful Cross Platform Image Editor .SH DESCRIPTION @@ -12,6 +12,6 @@ .br .BR https://github.com/PhotoFlare/photoflare .SH COPYRIGHT -Copyright \(co 2015\-2018 Dylan Coakley. +Copyright \(co 2015\-2019 Dylan Coakley. .br Distributed under the GNU GPL-3+ open source license. diff -Nru photoflare-1.5.7/PhotoFlare.pro photoflare-1.6.0/PhotoFlare.pro --- photoflare-1.5.7/PhotoFlare.pro 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/PhotoFlare.pro 2019-09-17 21:28:37.000000000 +0000 @@ -9,7 +9,7 @@ TARGET = photoflare TEMPLATE = app -CONFIG += c++17 +CONFIG += c++11 # This path is used in order to find all of the header files INCLUDEPATH += ./src/widgets \ @@ -30,6 +30,8 @@ linux|hurd { INCLUDEPATH += /usr/include/GraphicsMagick LIBS += -L/usr/lib -lGraphicsMagick++ + QMAKE_CXXFLAGS += -fopenmp + LIBS += -fopenmp } # Project settings for Mac OS. Adjust the paths as needed on your system. @@ -92,6 +94,7 @@ src/widgets/layermanager.cpp \ src/progress/batchprogress.cpp \ src/workers/filterworker.cpp \ + src/workers/filterworkermp.cpp \ src/tools/EraserTool.cpp \ src/toolSettings/erasersettingswidget.cpp \ src/tools/SmudgeTool.cpp \ @@ -145,6 +148,7 @@ src/widgets/colorboxwidget.h \ src/progress/batchprogress.h \ src/workers/filterworker.h \ + src/workers/filterworkermp.h \ src/tools/EraserTool.h \ src/toolSettings/erasersettingswidget.h \ src/tools/SmudgeTool.h \ diff -Nru photoflare-1.5.7/snap/snapcraft.yaml photoflare-1.6.0/snap/snapcraft.yaml --- photoflare-1.5.7/snap/snapcraft.yaml 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/snap/snapcraft.yaml 2019-09-17 21:28:37.000000000 +0000 @@ -1,13 +1,13 @@ name: photoflare -version: 1.5.5.1 +version: 1.6.0 summary: PhotoFlare description: Simple but powerful Cross Platform image editor icon: installers/deb/DEBIAN/usr/share/icons/hicolor/48x48/apps/photoflare.png type: app base: core18 -confinement: devmode -grade: devel +confinement: classic +grade: stable apps: photoflare: @@ -19,7 +19,7 @@ after: [desktop-qt5] source: https://github.com/PhotoFlare/photoflare.git source-type: git - source-tag: 'v1.5.5.1' + source-tag: 'v1.6.0' plugin: qmake qt-version: qt5 build-packages: diff -Nru photoflare-1.5.7/src/dialogs/aboutdialog.cpp photoflare-1.6.0/src/dialogs/aboutdialog.cpp --- photoflare-1.5.7/src/dialogs/aboutdialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/aboutdialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - About dialog class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// About dialog class for the PhotoFlare application. + #include #include @@ -16,32 +29,38 @@ { ui->setupUi(this); setFixedSize(size()); - ui->creditsTextArea->setVisible(false); - ui->creditsTextArea->setText(tr("Developers" - "
Commercial - ICS
Lead - Dylan Coakley" - "
Developer - Marek Mosna" - "
Developer - Dmitry Vasilenko" - "

Graphics" - "
Main icon - Robert BM" - "
Website graphics - Raqasa" - "
Application icons - Attari B" - "

Promotional Media" - "
Art Designer - Catherine Fister" - "
Advertising - Don Murphy" - "

Contributors" - "
Duzy Chan - Code" - "
Samuel Cowen - Code" - "
Richard Senior - GNU Autotools" - "
Alexandre Kharlamov - Code" - "
Michael Sheppard - Code" - "
Helene Levernieux - Project Icon" - "

Translators" - "
FR - Ludovic, Nerdouille" - "
NL - Freek Pol" - "
DE - Freacore" - "
zh_TW - Coolshou" - "

Special thanks" - "
I would like to thank Samantha for being an absolute gem of a person. You light up my life and I'm so glad to have found you.")); + ui->creditsWidget->setVisible(false); + + ui->devTextArea->setText( + tr("Commercial - ICS" + "
Lead - Dylan Coakley" + "
Developer - Marek Mosna" + "
Developer - Dmitry Vasilenko" + "
Debian package - Dylan Aissi" + "
AppImage package - probonopd") + ); + ui->graphicsTextArea->setText(tr("Main icon - Robert BM" + "
Website graphics - Raqasa" + "
Application icons - Attari B" + "
Art Designer - Catherine Hegedusich" + "
Advertising - Don Murphy") + ); + + ui->translateTextArea->setText(tr("FR - Ludovic, Nerdouille" + "
NL - Freek Pol" + "
DE - Freacore" + "
zh_TW - Coolshou") + ); + ui->contribTextArea->setText(tr("Duzy Chan - Code" + "
Samuel Cowen - Code" + "
Richard Senior - GNU Autotools" + "
Alexandre Kharlamov - Code" + "
Michael Sheppard - Code" + "
Helene Levernieux - Project Icon" + "

Special thanks" + "
I would like to thank Samantha for being an absolute gem of a person." + " You light up my life and I'm so glad to have found you.") + ); QString appName = qApp->applicationName().replace("p","P"); ui->appName->setText(appName); @@ -50,11 +69,7 @@ ui->appName->setFont(font); ui->appVersion->setText(qApp->applicationVersion()+tr(" Community Edition")); ui->appDescription->setText(tr("A simple but featureful editor.")); - ui->appUrl->setText(tr("http://www.photoflare.io")); - ui->appName->setAlignment(Qt::AlignCenter); - ui->appVersion->setAlignment(Qt::AlignCenter); - ui->appDescription->setAlignment(Qt::AlignCenter); - ui->appUrl->setAlignment(Qt::AlignCenter); + ui->appUrl->setText(tr("https://www.photoflare.io")); } aboutDialog::~aboutDialog() @@ -62,22 +77,20 @@ delete ui; } -void aboutDialog::on_pushButton_clicked() +void aboutDialog::on_closeButton_clicked() { close(); } -void aboutDialog::on_pushButton_2_clicked() +void aboutDialog::on_creditsButton_clicked() { - if (ui->creditsTextArea->isVisible()==false) + if (ui->creditsWidget->isVisible()==false) { - ui->creditsTextArea->setVisible(true); - creditsVisible=true; + ui->creditsWidget->setVisible(true); } - else if (ui->creditsTextArea->isVisible()==true) + else if (ui->creditsWidget->isVisible()==true) { - ui->creditsTextArea->setVisible(false); - creditsVisible=false; + ui->creditsWidget->setVisible(false); } } diff -Nru photoflare-1.5.7/src/dialogs/aboutdialog.h photoflare-1.6.0/src/dialogs/aboutdialog.h --- photoflare-1.5.7/src/dialogs/aboutdialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/aboutdialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,7 +1,18 @@ /* + This file is part of Photoflare. - About dialog class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ #ifndef ABOUTDIALOG_H @@ -22,12 +33,11 @@ ~aboutDialog(); private slots: - void on_pushButton_clicked(); - void on_pushButton_2_clicked(); + void on_closeButton_clicked(); + void on_creditsButton_clicked(); private: Ui::aboutDialog *ui; - bool creditsVisible; }; #endif // ABOUTDIALOG_H diff -Nru photoflare-1.5.7/src/dialogs/aboutdialog.ui photoflare-1.6.0/src/dialogs/aboutdialog.ui --- photoflare-1.5.7/src/dialogs/aboutdialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/aboutdialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -2,6 +2,9 @@ aboutDialog + + Qt::ApplicationModal + true @@ -9,8 +12,8 @@ 0 0 - 391 - 411 + 425 + 408 @@ -21,10 +24,10 @@ About - + - 270 + 310 370 99 27 @@ -39,7 +42,7 @@ 0 210 - 381 + 421 31 @@ -49,39 +52,48 @@ Qt::RichText + + Qt::AlignCenter + 0 250 - 381 + 421 20 TextLabel + + Qt::AlignCenter + 0 280 - 381 + 421 20 TextLabel + + Qt::AlignCenter + 0 300 - 381 + 421 20 @@ -91,6 +103,9 @@ Qt::RichText + + Qt::AlignCenter + true @@ -98,7 +113,7 @@ - 120 + 140 30 150 150 @@ -129,7 +144,7 @@ Qt::AlignCenter - + 20 @@ -142,21 +157,102 @@ C&redits - - - true - + 20 - 210 - 351 - 151 + 200 + 391 + 161 - - true + + 0 + + + Developers + + + + true + + + + 0 + 0 + 391 + 131 + + + + + 0 + 0 + + + + QFrame::NoFrame + + + true + + + + + + Graphics + + + + + 0 + 0 + 391 + 131 + + + + QFrame::NoFrame + + + + + + Translators + + + + + 0 + 0 + 391 + 131 + + + + QFrame::NoFrame + + + + + + Contributors + + + + + 0 + 0 + 391 + 131 + + + + QFrame::NoFrame + + + diff -Nru photoflare-1.5.7/src/dialogs/batchdialog.cpp photoflare-1.6.0/src/dialogs/batchdialog.cpp --- photoflare-1.5.7/src/dialogs/batchdialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/batchdialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Batch dialog class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Batch dialog class for the PhotoFlare application. + //#include #include #include @@ -263,6 +276,7 @@ void batchDialog::mousePressEvent(QComboBox* obj, QMouseEvent *e) { + Q_UNUSED(obj); if(!ui->backgroundColorComboBox->isVisible()) { e->accept(); @@ -378,24 +392,24 @@ char batchDialog::rotate() const { - if(!ui->rotateCheckBox->isChecked()) - return 0; if(ui->rotate90radioButton->isChecked()) return Rotate90CW; - if(ui->rotate90ccwRadioButton->isChecked()) + else if(ui->rotate90ccwRadioButton->isChecked()) return Rotate90CCW; - if(ui->rotate180RadioButton->isChecked()) + else if(ui->rotate180RadioButton->isChecked()) return Rotate180; + else + return 0; } char batchDialog::flip() const { - if(!ui->flipCheckBox->isChecked()) - return 0; if(ui->flipVerticalRadioButton) return FlipVertical; - if(ui->flipHorizontalRadioButton) + else if(ui->flipHorizontalRadioButton) return FlipHorizontal; + else + return 0; } void batchDialog::on_addFilesButton_clicked() @@ -468,6 +482,7 @@ void batchDialog::on_outFormat_currentIndexChanged(int index) { + Q_UNUSED(index); d->outFormat = ui->outFormat->currentText(); } @@ -543,3 +558,13 @@ ui->listWidget->setIconSize(QSize(64,64)); ui->listWidget->addItem(itm); } + +void batchDialog::on_addFilterButton_clicked() +{ + on_listWidget_2_doubleClicked(ui->listWidget_2->currentIndex()); +} + +void batchDialog::on_removeFilterButton_clicked() +{ + on_listWidget_3_doubleClicked(ui->listWidget_3->currentIndex()); +} diff -Nru photoflare-1.5.7/src/dialogs/batchdialog.h photoflare-1.6.0/src/dialogs/batchdialog.h --- photoflare-1.5.7/src/dialogs/batchdialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/batchdialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef BATCHDIALOG_H -#define BATCHDIALOG_H - /* + This file is part of Photoflare. - Batch dialog class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef BATCHDIALOG_H +#define BATCHDIALOG_H + #include #include #include "imagepositionwidget.h" @@ -106,6 +117,10 @@ void addItemToFileListWidget(QString filePath); + void on_addFilterButton_clicked(); + + void on_removeFilterButton_clicked(); + private: Ui::batchDialog *ui; BatchDialogPrivate *d; diff -Nru photoflare-1.5.7/src/dialogs/batchdialog.ui photoflare-1.6.0/src/dialogs/batchdialog.ui --- photoflare-1.5.7/src/dialogs/batchdialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/batchdialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -2,6 +2,9 @@ batchDialog + + Qt::ApplicationModal + 0 @@ -229,6 +232,9 @@ 0 + + 1.000000000000000 + 9999.000000000000000 @@ -254,6 +260,9 @@ 0 + + 1.000000000000000 + 9999.000000000000000 @@ -285,7 +294,7 @@ 10 90 - 131 + 171 17 @@ -308,6 +317,9 @@ 0 + + 1.000000000000000 + 9999.000000000000000 @@ -375,6 +387,9 @@ 0 + + 1.000000000000000 + 9999.000000000000000 @@ -947,6 +962,38 @@ + + + + 350 + 100 + 41 + 25 + + + + Qt::NoFocus + + + > + + + + + + 350 + 170 + 41 + 25 + + + + Qt::NoFocus + + + < + + @@ -972,7 +1019,7 @@ 10 60 - 121 + 151 17 @@ -1017,7 +1064,7 @@ 10 40 - 121 + 141 17 @@ -1049,7 +1096,7 @@ 10 40 - 91 + 141 17 @@ -1068,7 +1115,7 @@ 10 60 - 111 + 151 17 diff -Nru photoflare-1.5.7/src/dialogs/checkupdatedialog.cpp photoflare-1.6.0/src/dialogs/checkupdatedialog.cpp --- photoflare-1.5.7/src/dialogs/checkupdatedialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/checkupdatedialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Dialog for checking version updates. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Dialog for checking version updates. + //#include #include @@ -21,6 +34,7 @@ ui(new Ui::checkupdateDialog) { ui->setupUi(this); + setFixedSize(size()); ui->downloadButton->setVisible(false); QNetworkAccessManager *manager = new QNetworkAccessManager(this); @@ -65,6 +79,6 @@ void checkupdateDialog::on_downloadButton_clicked() { - QString link = "http://photoflare.io/downloads/"; + QString link = "https://photoflare.io/downloads/"; QDesktopServices::openUrl(QUrl(link)); } diff -Nru photoflare-1.5.7/src/dialogs/checkupdatedialog.h photoflare-1.6.0/src/dialogs/checkupdatedialog.h --- photoflare-1.5.7/src/dialogs/checkupdatedialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/checkupdatedialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef CHECKUPDATEDIALOG_H #define CHECKUPDATEDIALOG_H diff -Nru photoflare-1.5.7/src/dialogs/checkupdatedialog.ui photoflare-1.6.0/src/dialogs/checkupdatedialog.ui --- photoflare-1.5.7/src/dialogs/checkupdatedialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/checkupdatedialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -3,7 +3,7 @@ checkupdateDialog - Qt::NonModal + Qt::ApplicationModal diff -Nru photoflare-1.5.7/src/dialogs/colourmanagerdialog.cpp photoflare-1.6.0/src/dialogs/colourmanagerdialog.cpp --- photoflare-1.5.7/src/dialogs/colourmanagerdialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/colourmanagerdialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Dialog for managing colour palettes + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Dialog for managing colour palettes + //#include #include diff -Nru photoflare-1.5.7/src/dialogs/colourmanagerdialog.h photoflare-1.6.0/src/dialogs/colourmanagerdialog.h --- photoflare-1.5.7/src/dialogs/colourmanagerdialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/colourmanagerdialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef COLOURMANAGERDIALOG_H #define COLOURMANAGERDIALOG_H diff -Nru photoflare-1.5.7/src/dialogs/colourmanagerdialog.ui photoflare-1.6.0/src/dialogs/colourmanagerdialog.ui --- photoflare-1.5.7/src/dialogs/colourmanagerdialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/colourmanagerdialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -2,6 +2,9 @@ colourManagerDialog + + Qt::ApplicationModal + 0 diff -Nru photoflare-1.5.7/src/dialogs/compressiondialog.cpp photoflare-1.6.0/src/dialogs/compressiondialog.cpp --- photoflare-1.5.7/src/dialogs/compressiondialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/compressiondialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Compression dialog to give user option to set compression on save. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Compression dialog to give user option to set compression on save. + #include "compressiondialog.h" #include "ui_compressiondialog.h" @@ -39,3 +52,8 @@ { this->enableSaveImage = false; } + +void CompressionDialog::on_horizontalSlider_valueChanged(int value) +{ + ui->valueLabel->setText(QString::number(value)); +} diff -Nru photoflare-1.5.7/src/dialogs/compressiondialog.h photoflare-1.6.0/src/dialogs/compressiondialog.h --- photoflare-1.5.7/src/dialogs/compressiondialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/compressiondialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef COMPRESSIONDIALOG_H -#define COMPRESSIONDIALOG_H - /* + This file is part of Photoflare. - Compression dialog to give user option to set compression on save. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef COMPRESSIONDIALOG_H +#define COMPRESSIONDIALOG_H + #include namespace Ui { @@ -30,6 +41,8 @@ void on_buttonBox_rejected(); + void on_horizontalSlider_valueChanged(int value); + private: Ui::CompressionDialog *ui; }; diff -Nru photoflare-1.5.7/src/dialogs/compressiondialog.ui photoflare-1.6.0/src/dialogs/compressiondialog.ui --- photoflare-1.5.7/src/dialogs/compressiondialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/compressiondialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -2,6 +2,9 @@ CompressionDialog + + Qt::ApplicationModal + 0 @@ -80,7 +83,7 @@ QSlider::TicksBelow - 5 + 10 diff -Nru photoflare-1.5.7/src/dialogs/dropshadowdialog.cpp photoflare-1.6.0/src/dialogs/dropshadowdialog.cpp --- photoflare-1.5.7/src/dialogs/dropshadowdialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/dropshadowdialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,22 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + +// Dropshadow dialog class for the PhotoFlare application. + #include "dropshadowdialog.h" #include "ui_dropshadowdialog.h" #include "../Settings.h" @@ -10,6 +29,7 @@ ui(new Ui::dropshadowDialog) { ui->setupUi(this); + setFixedSize(size()); for(int i=Qt::white; i <= Qt::yellow; i++) { diff -Nru photoflare-1.5.7/src/dialogs/dropshadowdialog.h photoflare-1.6.0/src/dialogs/dropshadowdialog.h --- photoflare-1.5.7/src/dialogs/dropshadowdialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/dropshadowdialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef DROPSHADOWDIALOG_H #define DROPSHADOWDIALOG_H diff -Nru photoflare-1.5.7/src/dialogs/dropshadowdialog.ui photoflare-1.6.0/src/dialogs/dropshadowdialog.ui --- photoflare-1.5.7/src/dialogs/dropshadowdialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/dropshadowdialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -2,6 +2,9 @@ dropshadowDialog + + Qt::ApplicationModal + 0 diff -Nru photoflare-1.5.7/src/dialogs/gradientdialog.cpp photoflare-1.6.0/src/dialogs/gradientdialog.cpp --- photoflare-1.5.7/src/dialogs/gradientdialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/gradientdialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Gradient dialog class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Gradient dialog class for the PhotoFlare application. + #include #include #include @@ -242,3 +255,67 @@ } settings.endGroup(); } + +void GradientDialog::on_directionN_clicked(bool checked) +{ + if(!checked) + { + ui->directionN->setChecked(true); + } +} + +void GradientDialog::on_directionNE_clicked(bool checked) +{ + if(!checked) + { + ui->directionNE->setChecked(true); + } +} + +void GradientDialog::on_directionE_clicked(bool checked) +{ + if(!checked) + { + ui->directionE->setChecked(true); + } +} + +void GradientDialog::on_directionSE_clicked(bool checked) +{ + if(!checked) + { + ui->directionSE->setChecked(true); + } +} + +void GradientDialog::on_directionS_clicked(bool checked) +{ + if(!checked) + { + ui->directionS->setChecked(true); + } +} + +void GradientDialog::on_directionSW_clicked(bool checked) +{ + if(!checked) + { + ui->directionSW->setChecked(true); + } +} + +void GradientDialog::on_directionW_clicked(bool checked) +{ + if(!checked) + { + ui->directionW->setChecked(true); + } +} + +void GradientDialog::on_directionNW_clicked(bool checked) +{ + if(!checked) + { + ui->directionNW->setChecked(true); + } +} diff -Nru photoflare-1.5.7/src/dialogs/gradientdialog.h photoflare-1.6.0/src/dialogs/gradientdialog.h --- photoflare-1.5.7/src/dialogs/gradientdialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/gradientdialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef GRADIENTDIALOG_H -#define GRADIENTDIALOG_H - /* + This file is part of Photoflare. - Gradient dialog class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef GRADIENTDIALOG_H +#define GRADIENTDIALOG_H + #include #include @@ -53,6 +64,22 @@ void readSettings(QWidget* window); + void on_directionN_clicked(bool checked); + + void on_directionNE_clicked(bool checked); + + void on_directionE_clicked(bool checked); + + void on_directionSE_clicked(bool checked); + + void on_directionS_clicked(bool checked); + + void on_directionSW_clicked(bool checked); + + void on_directionW_clicked(bool checked); + + void on_directionNW_clicked(bool checked); + private: Ui::GradientDialog *ui; Direction m_direction; diff -Nru photoflare-1.5.7/src/dialogs/gradientdialog.ui photoflare-1.6.0/src/dialogs/gradientdialog.ui --- photoflare-1.5.7/src/dialogs/gradientdialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/gradientdialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -2,6 +2,9 @@ GradientDialog + + Qt::ApplicationModal + 0 @@ -184,7 +187,7 @@ - true + false false diff -Nru photoflare-1.5.7/src/dialogs/huedialog.cpp photoflare-1.6.0/src/dialogs/huedialog.cpp --- photoflare-1.5.7/src/dialogs/huedialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/huedialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,8 +1,22 @@ /* + This file is part of Photoflare. - Hue dialog class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ + +// Hue dialog class for the PhotoFlare application. + #include #include #include @@ -122,7 +136,7 @@ } } -void HueDialog::on_method1_toggled(bool checked) +void HueDialog::on_method1_toggled() { on_horizontalSlider_valueChanged(ui->horizontalSlider->value()); } diff -Nru photoflare-1.5.7/src/dialogs/huedialog.h photoflare-1.6.0/src/dialogs/huedialog.h --- photoflare-1.5.7/src/dialogs/huedialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/huedialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef HUEDIALOG_H -#define HUEDIALOG_H - /* + This file is part of Photoflare. - Hue dialog class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef HUEDIALOG_H +#define HUEDIALOG_H + #include namespace Ui { @@ -31,7 +42,7 @@ private slots: void on_horizontalSlider_valueChanged(int value); - void on_method1_toggled(bool checked); + void on_method1_toggled(); void setColor(const QColor &color, QWidget *colorLabel); void showColorDialog(QWidget *colorLabel); QColor getColorFromLabel(QWidget *colorLabel) const; diff -Nru photoflare-1.5.7/src/dialogs/huedialog.ui photoflare-1.6.0/src/dialogs/huedialog.ui --- photoflare-1.5.7/src/dialogs/huedialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/huedialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -2,6 +2,9 @@ HueDialog + + Qt::ApplicationModal + 0 diff -Nru photoflare-1.5.7/src/dialogs/imagepropertiesdialog.cpp photoflare-1.6.0/src/dialogs/imagepropertiesdialog.cpp --- photoflare-1.5.7/src/dialogs/imagepropertiesdialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/imagepropertiesdialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - ImageProperties dialog class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// ImageProperties dialog class for the PhotoFlare application. + #include "imagepropertiesdialog.h" #include "ui_imagepropertiesdialog.h" diff -Nru photoflare-1.5.7/src/dialogs/imagepropertiesdialog.h photoflare-1.6.0/src/dialogs/imagepropertiesdialog.h --- photoflare-1.5.7/src/dialogs/imagepropertiesdialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/imagepropertiesdialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef IMAGEPROPERTIESDIALOG_H -#define IMAGEPROPERTIESDIALOG_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - ImageProperties dialog class for the PhotoFlare application. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef IMAGEPROPERTIESDIALOG_H +#define IMAGEPROPERTIESDIALOG_H + #include class ImagePropertiesPrivate; diff -Nru photoflare-1.5.7/src/dialogs/imagepropertiesdialog.ui photoflare-1.6.0/src/dialogs/imagepropertiesdialog.ui --- photoflare-1.5.7/src/dialogs/imagepropertiesdialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/imagepropertiesdialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -2,6 +2,9 @@ imagePropertiesDialog + + Qt::ApplicationModal + 0 diff -Nru photoflare-1.5.7/src/dialogs/NewDialog.cpp photoflare-1.6.0/src/dialogs/NewDialog.cpp --- photoflare-1.5.7/src/dialogs/NewDialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/NewDialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Dialog for creating a new image. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Dialog for creating a new image. + //#include #include @@ -35,20 +48,22 @@ ui(new Ui::NewDialog) { ui->setupUi(this); + setFixedSize(size()); - width_px = 1024; - height_px = 768; - imageRatio = (width_px/height_px); + // Set default values + original_width_px = 0; + original_height_px = 0; currentUnit = SETTINGS->getUnit(); ui->imageResCombo->setCurrentIndex(PPI); ui->imageWHcombo->setCurrentIndex(currentUnit); - //Standard ppi + // Standard PPI ui->imageRvalue->setValue(96.0); ui->pixelWvalue->setValue(width_px); ui->pixelHvalue->setValue(height_px); ui->memoryValue->setValue((((width_px * height_px) * 3)/1024)/1024); ui->lockedRatioButton->setChecked(true); + // Setup Colour combobox colours for(int i=Qt::white; i <= Qt::yellow; i++) { QPixmap pixmap(QSize(ui->backgroundColorComboBox->width(),ui->backgroundColorComboBox->height())); @@ -89,6 +104,8 @@ void NewDialog::setImageSize(QSize size) { + original_width_px = size.width(); + original_height_px =size.height(); ui->imageWvalue->setValue(size.width()); ui->imageHvalue->setValue(size.height()); } @@ -224,7 +241,14 @@ void NewDialog::on_imageHvalue_valueChanged(double value) { Q_UNUSED(value); - imageRatio = (width_px/height_px); + if(original_width_px>0) + { + imageRatio = (original_width_px/original_height_px); + } + else + { + imageRatio = (width_px/height_px); + } float resoulution_in = ui->imageRvalue->value(); if(ui->imageResCombo->currentIndex() == PPM) resoulution_in = resoulution_in * CM_IN_INCH; @@ -255,7 +279,14 @@ void NewDialog::on_imageWvalue_valueChanged(double value) { Q_UNUSED(value); - imageRatio = (width_px/height_px); + if(original_width_px>0) + { + imageRatio = (original_width_px/original_height_px); + } + else + { + imageRatio = (width_px/height_px); + } float resoulution_in = ui->imageRvalue->value(); if(ui->imageResCombo->currentIndex() == PPM) resoulution_in = resoulution_in * CM_IN_INCH; diff -Nru photoflare-1.5.7/src/dialogs/NewDialog.h photoflare-1.6.0/src/dialogs/NewDialog.h --- photoflare-1.5.7/src/dialogs/NewDialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/NewDialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef NEWDIALOG_H -#define NEWDIALOG_H - /* + This file is part of Photoflare. - Dialog for creating a new image. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef NEWDIALOG_H +#define NEWDIALOG_H + #include #include #include "imagepositionwidget.h" @@ -70,6 +81,8 @@ double imageRatio; float width_px; float height_px; + float original_width_px; + float original_height_px; int currentUnit; }; diff -Nru photoflare-1.5.7/src/dialogs/NewDialog.ui photoflare-1.6.0/src/dialogs/NewDialog.ui --- photoflare-1.5.7/src/dialogs/NewDialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/NewDialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -2,6 +2,9 @@ NewDialog + + Qt::ApplicationModal + 0 @@ -18,6 +21,12 @@ New + + false + + + false + @@ -163,12 +172,18 @@ 27 + + Qt::NoFocus + true true + + QAbstractSpinBox::NoButtons + 0 @@ -185,9 +200,15 @@ 27 + + Qt::NoFocus + true + + QAbstractSpinBox::NoButtons + 0 @@ -204,9 +225,15 @@ 27 + + Qt::NoFocus + true + + QAbstractSpinBox::NoButtons + 9999999.000000000000000 diff -Nru photoflare-1.5.7/src/dialogs/outerframedialog.cpp photoflare-1.6.0/src/dialogs/outerframedialog.cpp --- photoflare-1.5.7/src/dialogs/outerframedialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/outerframedialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Outerframe dialog class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Outerframe dialog class for the PhotoFlare application. + #include #include "outerframedialog.h" diff -Nru photoflare-1.5.7/src/dialogs/outerframedialog.h photoflare-1.6.0/src/dialogs/outerframedialog.h --- photoflare-1.5.7/src/dialogs/outerframedialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/outerframedialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef OUTERFRAMEDIALOG_H -#define OUTERFRAMEDIALOG_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - Outerframe dialog class for the PhotoFlare application. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef OUTERFRAMEDIALOG_H +#define OUTERFRAMEDIALOG_H + #include #include #include diff -Nru photoflare-1.5.7/src/dialogs/outerframedialog.ui photoflare-1.6.0/src/dialogs/outerframedialog.ui --- photoflare-1.5.7/src/dialogs/outerframedialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/outerframedialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -2,6 +2,9 @@ OuterFrameDialog + + Qt::ApplicationModal + 0 diff -Nru photoflare-1.5.7/src/dialogs/plugindialog.cpp photoflare-1.6.0/src/dialogs/plugindialog.cpp --- photoflare-1.5.7/src/dialogs/plugindialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/plugindialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #include "plugindialog.h" #include "ui_plugindialog.h" diff -Nru photoflare-1.5.7/src/dialogs/plugindialog.h photoflare-1.6.0/src/dialogs/plugindialog.h --- photoflare-1.5.7/src/dialogs/plugindialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/plugindialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef PLUGINDIALOG_H #define PLUGINDIALOG_H diff -Nru photoflare-1.5.7/src/dialogs/plugindialog.ui photoflare-1.6.0/src/dialogs/plugindialog.ui --- photoflare-1.5.7/src/dialogs/plugindialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/plugindialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -2,6 +2,9 @@ PluginDialog + + Qt::ApplicationModal + 0 diff -Nru photoflare-1.5.7/src/dialogs/prefsdialog.cpp photoflare-1.6.0/src/dialogs/prefsdialog.cpp --- photoflare-1.5.7/src/dialogs/prefsdialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/prefsdialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Preferences dialog class. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Preferences dialog class. + #include #include #include @@ -36,14 +49,21 @@ ui->compressionSlider->setValue(SETTINGS->getCompressionDefaultValue().toInt()); //Layout tab - QStringList toolList(QStringList() << "Right" << "Left"); + QStringList toolList(QStringList() << tr("Right") << tr("Left")); ui->toolPaletteLocation->addItems(toolList); - if(SETTINGS->getDockLayout() == "Left") + if(SETTINGS->getDockLayout() == "1") { ui->toolPaletteLocation->setCurrentIndex(1); } + QStringList zoomList(QStringList() << tr("Default") << tr("Inverted")); + ui->zoomDirection->addItems(zoomList); + if(SETTINGS->getZoomDirection() == "1") + { + ui->zoomDirection->setCurrentIndex(1); + } + //Default values tab ui->memorizeParams->setChecked(SETTINGS->getMemParamsEnabled()); ui->unitsCBox->setCurrentIndex(SETTINGS->getUnit()); @@ -109,14 +129,8 @@ SETTINGS->setPreviouslyOpenedSave(ui->previousOpenedSaveEnabled->isChecked()); //Layout tab - if(ui->toolPaletteLocation->currentIndex() == 0) - { - SETTINGS->setDockLayout("Right"); - } - else - { - SETTINGS->setDockLayout("Left"); - } + SETTINGS->setDockLayout(QString::number(ui->toolPaletteLocation->currentIndex())); + SETTINGS->setZoomDirection(QString::number(ui->zoomDirection->currentIndex())); //Default values tab SETTINGS->setMemParamsEnabled(ui->memorizeParams->isChecked()); @@ -178,23 +192,34 @@ ui->compressionValue->setText(val); } +void prefsDialog::on_compressionSlider_valueChanged(int value) +{ + QString val = QString::number(value); + ui->compressionValue->setText(val); +} + void prefsDialog::on_historySlider_sliderMoved(int position) { QString val = QString::number(position); ui->history_value->setText(val); } +void prefsDialog::on_historySlider_valueChanged(int value) +{ + QString val = QString::number(value); + ui->history_value->setText(val); +} + void prefsDialog::on_restartButton_clicked() { // Save language before we quit set_user_language(); qApp->quit(); - QProcess* proc = new QProcess(); - proc->start(QCoreApplication::applicationFilePath()); + QProcess::startDetached(QCoreApplication::applicationFilePath()); } -void prefsDialog::on_comboBoxLanguage_currentIndexChanged(const QString &arg1) +void prefsDialog::on_comboBoxLanguage_currentIndexChanged() { ui->restartButton->show(); } diff -Nru photoflare-1.5.7/src/dialogs/prefsdialog.h photoflare-1.6.0/src/dialogs/prefsdialog.h --- photoflare-1.5.7/src/dialogs/prefsdialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/prefsdialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef PREFSDIALOG_H -#define PREFSDIALOG_H - /* + This file is part of Photoflare. - Preferences dialog class. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef PREFSDIALOG_H +#define PREFSDIALOG_H + #include namespace Ui { @@ -36,10 +47,14 @@ void set_user_language(); - void on_comboBoxLanguage_currentIndexChanged(const QString &arg1); + void on_comboBoxLanguage_currentIndexChanged(); void on_buttonBox_rejected(); + void on_compressionSlider_valueChanged(int value); + + void on_historySlider_valueChanged(int value); + private: Ui::prefsDialog *ui; QString flagPath; diff -Nru photoflare-1.5.7/src/dialogs/prefsdialog.ui photoflare-1.6.0/src/dialogs/prefsdialog.ui --- photoflare-1.5.7/src/dialogs/prefsdialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/prefsdialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -2,6 +2,9 @@ prefsDialog + + Qt::ApplicationModal + 0 @@ -213,7 +216,7 @@ 30 130 - 501 + 471 29 @@ -312,6 +315,29 @@ + + + + 20 + 140 + 111 + 17 + + + + Zoom direction + + + + + + 20 + 160 + 191 + 25 + + + @@ -391,7 +417,7 @@ 30 40 - 391 + 471 29 diff -Nru photoflare-1.5.7/src/dialogs/textdialog.cpp photoflare-1.6.0/src/dialogs/textdialog.cpp --- photoflare-1.5.7/src/dialogs/textdialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/textdialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Text dialog class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Text dialog class for the PhotoFlare application. + #include #include @@ -26,7 +39,6 @@ ui->plainTextEdit->setFocus(); ui->emptyWarning->hide(); ui->alignleftButton->setChecked(true); - positionFont; if(SETTINGS->getMemParamsEnabled()) { diff -Nru photoflare-1.5.7/src/dialogs/textdialog.h photoflare-1.6.0/src/dialogs/textdialog.h --- photoflare-1.5.7/src/dialogs/textdialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/textdialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef TEXTDIALOG_H -#define TEXTDIALOG_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - Text dialog class for the PhotoFlare application. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef TEXTDIALOG_H +#define TEXTDIALOG_H + #include namespace Ui { diff -Nru photoflare-1.5.7/src/dialogs/textdialog.ui photoflare-1.6.0/src/dialogs/textdialog.ui --- photoflare-1.5.7/src/dialogs/textdialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/textdialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -2,6 +2,9 @@ textDialog + + Qt::ApplicationModal + 0 diff -Nru photoflare-1.5.7/src/dialogs/transparentdialog.cpp photoflare-1.6.0/src/dialogs/transparentdialog.cpp --- photoflare-1.5.7/src/dialogs/transparentdialog.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/transparentdialog.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Transparent dialog class. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Transparent dialog class - Used to replace a selected colour with transparency. + #include #include "transparentdialog.h" @@ -30,10 +43,6 @@ delete ui; } -void TransparentDialog::on_horizontalSlider_sliderMoved(int value) -{ -} - void TransparentDialog::setColor(QRgb color) { m_color = QColor(color); diff -Nru photoflare-1.5.7/src/dialogs/transparentdialog.h photoflare-1.6.0/src/dialogs/transparentdialog.h --- photoflare-1.5.7/src/dialogs/transparentdialog.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/transparentdialog.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef TRANSPARENTDIALOG_H -#define TRANSPARENTDIALOG_H - /* + This file is part of Photoflare. - Transparent dialog class. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef TRANSPARENTDIALOG_H +#define TRANSPARENTDIALOG_H + #include namespace Ui { @@ -25,18 +36,11 @@ QColor color() {return m_color;} int tolerance(); private slots: - void on_horizontalSlider_sliderMoved(int position); - void on_horizontalSlider_valueChanged(int value); - void on_pushButton_clicked(); - void on_pushButton_2_clicked(); - void on_pushButton_3_clicked(); - void readSettings(QWidget* window); - void writeSettings(QWidget* window); signals: diff -Nru photoflare-1.5.7/src/dialogs/transparentdialog.ui photoflare-1.6.0/src/dialogs/transparentdialog.ui --- photoflare-1.5.7/src/dialogs/transparentdialog.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/dialogs/transparentdialog.ui 2019-09-17 21:28:37.000000000 +0000 @@ -2,6 +2,9 @@ TransparentDialog + + Qt::ApplicationModal + 0 @@ -11,7 +14,7 @@ - Transparent color + Transparent colour diff -Nru photoflare-1.5.7/src/main.cpp photoflare-1.6.0/src/main.cpp --- photoflare-1.5.7/src/main.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/main.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - PhotoFlare main program. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// PhotoFlare main program. + //#include #include @@ -22,94 +35,96 @@ { QtSingleApplication app("PhotoFlare", argc, argv); - // Remove WhatIsThis from Window Controls - //app.setAttribute(Qt::AA_DisableWindowContextHelpButton); //required in newer Qt versions + // Remove WhatIsThis from Window Controls (Windows only) + #ifdef WIN32 + app.setAttribute(Qt::AA_DisableWindowContextHelpButton); //required in newer Qt versions + #endif + + if(!app.isRunning()) + { + app.setApplicationName(QObject::tr("photoflare")); + app.setApplicationVersion(QObject::tr("1.6.0")); + app.setOrganizationDomain(QObject::tr("photoflare.io")); + + // Setup Default settings + QString loc = QStandardPaths::locate(QStandardPaths::ConfigLocation, QString(), QStandardPaths::LocateDirectory)+"photoflare.io"; + if(QDir(loc).exists() == false) + { + SETTINGS->setDefaultSettings(); + } - if(!app.isRunning()) + // Set language based on System locale + if(SETTINGS->getUserLanguage() == "notset") { - app.setApplicationName(QObject::tr("photoflare")); - app.setApplicationVersion(QObject::tr("1.5.7")); - app.setOrganizationDomain(QObject::tr("photoflare.io")); - - // Setup Default settings - QString loc = QStandardPaths::locate(QStandardPaths::ConfigLocation, QString(), QStandardPaths::LocateDirectory)+"photoflare.io"; - if(QDir(loc).exists() == false) - { - SETTINGS->setDefaultSettings(); - } - - // Set language based on System locale - if(SETTINGS->getUserLanguage() == "notset") - { - QString sysLanguage = QLocale::languageToString(QLocale::system().language()); - QString lang; - - if(sysLanguage == "English") - { - lang = "en"; - } - else if(sysLanguage == "French") - { - lang = "fr"; - } - else if(sysLanguage == "German") - { - lang = "de"; - } - else if(sysLanguage == "Dutch") - { - lang = "nl"; - } - else if(sysLanguage == "Chinese") - { - lang = "zh_TW"; - } - else if(sysLanguage == "Czech") - { - lang = "cs"; - } - SETTINGS->setUserLanguage(lang); - } - - QTranslator translator; - app.installTranslator(&translator); - - QStringList paths = QStandardPaths::standardLocations(QStandardPaths::DataLocation); - for(int i = 0;i < paths.length(); i++) - { - QFileInfo check_file(paths[i]+"/languages/"+SETTINGS->getUserLanguage()+".qm"); //for installers - //QFileInfo check_file("languages/"+SETTINGS->getUserLanguage()+".qm"); //local builds - if(check_file.exists() && check_file.isFile()) - { - translator.load(SETTINGS->getUserLanguage()+".qm", paths[i]+"/languages/"); //for installers - //translator.load(SETTINGS->getUserLanguage()+".qm", "languages/"); //local builds - } - } - MainWindow w; - w.show(); - - if(argc > 1) - { - for (int i = 1; i < argc; ++i) - { - w.handleMessage(QString(argv[i])); - } + QString sysLanguage = QLocale::languageToString(QLocale::system().language()); + QString lang; + + if(sysLanguage == "English") + { + lang = "en"; + } + else if(sysLanguage == "French") + { + lang = "fr"; + } + else if(sysLanguage == "German") + { + lang = "de"; + } + else if(sysLanguage == "Dutch") + { + lang = "nl"; + } + else if(sysLanguage == "Chinese") + { + lang = "zh_TW"; } + else if(sysLanguage == "Czech") + { + lang = "cs"; + } + SETTINGS->setUserLanguage(lang); + } - app.setActivationWindow(&w, true); - QObject::connect(&app, SIGNAL(messageReceived(QString)), &w, SLOT(handleMessage(QString))); + QTranslator translator; + app.installTranslator(&translator); - return app.exec(); + QStringList paths = QStandardPaths::standardLocations(QStandardPaths::DataLocation); + for(int i = 0;i < paths.length(); i++) + { + QFileInfo check_file(paths[i]+"/languages/"+SETTINGS->getUserLanguage()+".qm"); //for installers + //QFileInfo check_file("languages/"+SETTINGS->getUserLanguage()+".qm"); //local builds + if(check_file.exists() && check_file.isFile()) + { + translator.load(SETTINGS->getUserLanguage()+".qm", paths[i]+"/languages/"); //for installers + //translator.load(SETTINGS->getUserLanguage()+".qm", "languages/"); //local builds + } } - else + MainWindow w; + w.show(); + + if(argc > 1) + { + for (int i = 1; i < argc; ++i) + { + w.handleMessage(QString(argv[i])); + } + } + + app.setActivationWindow(&w, true); + QObject::connect(&app, SIGNAL(messageReceived(QString)), &w, SLOT(handleMessage(QString))); + + return app.exec(); + } + else + { + if(argc > 1) { - if(argc > 1) + for (int i = 1; i < argc; ++i) { - for (int i = 1; i < argc; ++i) - { - app.sendMessage(QString(argv[i])); - } + app.sendMessage(QString(argv[i])); } } - return 0; + } + return 0; } diff -Nru photoflare-1.5.7/src/mainwindow.cpp photoflare-1.6.0/src/mainwindow.cpp --- photoflare-1.5.7/src/mainwindow.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/mainwindow.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Main window class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Main window class for the PhotoFlare application. + //#include #include @@ -76,6 +89,9 @@ #include "workers/BatchProcessWorker.h" #include "progress/batchprogress.h" #include "workers/filterworker.h" +#include "workers/filterworkermp.h" + +#include #define PAINT_BRUSH ToolManager::instance()->paintBrush() #define PAINT_BRUSH_ADV ToolManager::instance()->paintBrushAdv() @@ -114,7 +130,7 @@ ui->mdiArea->setViewMode(QMdiArea::TabbedView); } - if(SETTINGS->getDockLayout() == "Left") + if(SETTINGS->getDockLayout() == "1") { addDockWidget(Qt::LeftDockWidgetArea, ui->dockWidget_palette); addDockWidget(Qt::LeftDockWidgetArea, ui->dockWidgetSettings); @@ -301,6 +317,26 @@ batchLbl->setText(tr("Working...")); } +void MainWindow::applyThreadedFilterMP(QString filterName, double dV) +{ + QThread *thread = new QThread(); + FilterWorkerMP *worker = new FilterWorkerMP(); + worker->setFilter(filterName); + + PaintWidget *widget = getCurrentPaintWidget(); + if(widget) + worker->setImage(widget->image()); + worker->setDoubleVal(dV); + worker->setParent(this); + worker->moveToThread(thread); + + connect(thread, SIGNAL(started()), worker, SLOT(process())); + connect(worker, SIGNAL(filterProcessFinished(QImage)), this, SLOT(on_image_filtered(QImage))); + thread->start(); + + batchLbl->setText(tr("Working...")); +} + /* | FILE MENU | @@ -348,7 +384,7 @@ { for(int i=0;igetPreviouslyOpened() == true) @@ -379,7 +415,7 @@ QImageReader reader(fileName); reader.setDecideFormatFromContent(true); // Autodetect file type without depending on extension - if(info.completeSuffix() != "jpg" && info.completeSuffix() != reader.format() && fileTypeSupported(reader.supportedImageFormats(),reader.format())) + if(info.completeSuffix().toLower() != "jpg" && info.completeSuffix() != reader.format() && fileTypeSupported(reader.supportedImageFormats(),reader.format())) { int ret = QMessageBox::warning(this, tr("Incorrect file extension detected"), @@ -406,7 +442,7 @@ return newFileName; } -void MainWindow::openFile(const QString& fileName, bool direct) +void MainWindow::openFile(const QString& fileName) { if(!fileExists(fileName)) { @@ -429,7 +465,7 @@ { QFileInfo fileInfo(message); if(fileInfo.exists()) - openFile(QString(fileInfo.absoluteFilePath()),true); + openFile(QString(fileInfo.absoluteFilePath())); } void MainWindow::on_actionRevert_triggered() @@ -461,7 +497,7 @@ { QAction* action = ui->menuRecent_Files->addAction(fileName); connect(action, &QAction::triggered, [this, fileName] () { - openFile(fileName,false); + openFile(fileName); }); } } @@ -539,7 +575,7 @@ int quality = -1; - if(SETTINGS->getCompressionDialogEnabled() && fileNameSuffix == "jpg" || fileNameSuffix == "jpeg") + if(SETTINGS->getCompressionDialogEnabled() && (fileNameSuffix == "jpg" || fileNameSuffix == "jpeg")) { CompressionDialog dlg; dlg.exec(); @@ -738,6 +774,8 @@ QClipboard *clipboard = QApplication::clipboard(); widget->setPaintTool(MOUSE_POINTER); MOUSE_POINTER->setOverlayImage(clipboard->image()); + m_toolSelected = "pointer"; + refreshTools(); } else { @@ -757,6 +795,7 @@ void MainWindow::on_actionPaste_as_new_image_triggered() { + on_actionCopy_triggered(); PaintWidget *widget = getCurrentPaintWidget(); QClipboard *clipboard = QApplication::clipboard(); if(clipboard->mimeData()->hasImage()) @@ -871,10 +910,11 @@ dialog.setWindowTitle("Resize Image"); dialog.setMode(NewDialog::ResizeImage); dialog.setImageSize(widget->image().size()); - if (dialog.exec()) + if (dialog.exec() == QDialog::Accepted) + { widget->setImage(widget->image().scaled(dialog.newImageSize())); - - updateStatusArea(dialog.newImageSize().width(),dialog.newImageSize().height()); + updateStatusArea(dialog.newImageSize().width(),dialog.newImageSize().height()); + } } void MainWindow::on_actionCanvas_Size_triggered() @@ -1208,7 +1248,7 @@ { PaintWidget *widget = getCurrentPaintWidget(); if (widget) - applyThreadedFilter("dustreduction"); + applyThreadedFilterMP("dustreduction"); } void MainWindow::on_actionDespeckle_triggered() @@ -1229,21 +1269,21 @@ { PaintWidget *widget = getCurrentPaintWidget(); if (widget) - applyThreadedFilter("impulseNoise"); + applyThreadedFilterMP("impulseNoise"); } void MainWindow::on_actionLaplacian_triggered() { PaintWidget *widget = getCurrentPaintWidget(); if (widget) - applyThreadedFilter("laplacianNoise"); + applyThreadedFilterMP("laplacianNoise"); } void MainWindow::on_actionPoisson_triggered() { PaintWidget *widget = getCurrentPaintWidget(); if (widget) - applyThreadedFilter("poissonNoise"); + applyThreadedFilterMP("poissonNoise"); } void MainWindow::on_actionGrayScale_triggered() @@ -1299,7 +1339,7 @@ { PaintWidget *widget = getCurrentPaintWidget(); if (widget) - applyThreadedFilter("oil"); + applyThreadedFilterMP("oil"); } void MainWindow::on_actionCharcoal_Drawing_triggered() @@ -1429,6 +1469,10 @@ widget->showGrid(i); ui->actionShow_grid->setChecked(true); } + else + { + ui->actionShow_grid->setChecked(false); + } } else { @@ -1436,14 +1480,73 @@ ui->actionShow_grid->setChecked(false); } } + else + { + ui->actionShow_grid->setChecked(false); + } +} + +/* + * TODO + * - This needs to work in the opposite way to getNextZoom. + * - Needed to transition from autoZoom to stepZoom if users clicks zoom out. + * (Autozoom happens after opening an image) +*/ + +void MainWindow::getPrevZoomFromScale(QString scaletext) +{ + int count = this->zoomCombo->count(); + for(int i=count;i>=0;i--) + { + int a = this->zoomCombo->itemText(i).replace("%","").toInt(); + int b = scaletext.replace("%","").toInt(); + + //qDebug() << "a" << a; + //qDebug() << "b" << b; + + if(b > a) + { + //qDebug() << "i" << i; + //qDebug()<< this->zoomCombo->itemText(i); + this->zoomCombo->setCurrentIndex(i-1); + break; + } + } +} + +void MainWindow::getNextZoomFromScale(QString scaletext) +{ + int count = this->zoomCombo->count(); + for(int i=1;izoomCombo->itemText(i).replace("%","").toInt(); + int b = scaletext.replace("%","").toInt(); + + if(a > b) + { + this->zoomCombo->setCurrentIndex(i-1); + break; + } + } } void MainWindow::on_actionZoom_in_triggered() { - this->zoomCombo->setCurrentIndex(this->zoomCombo->currentIndex()+1); - if(this->zoomCombo->currentText() == "") + if(this->zoomCombo->currentIndex()==0) { - this->zoomCombo->setCurrentIndex(this->zoomCombo->currentIndex()+1); + getNextZoomFromScale(this->zoomCombo->currentText()); + } + else + { + if(this->zoomCombo->currentIndex()+1 < this->zoomCombo->count() && this->zoomCombo->currentIndex()>0) + { + this->zoomCombo->setCurrentIndex(this->zoomCombo->currentIndex()+1); + } + + if(this->zoomCombo->currentText() == "") + { + this->zoomCombo->setCurrentIndex(this->zoomCombo->currentIndex()+1); + } } PaintWidget *widget = getCurrentPaintWidget(); @@ -1455,7 +1558,12 @@ void MainWindow::on_actionZoom_out_triggered() { - if(this->zoomCombo->currentIndex() > 0) + if(this->zoomCombo->currentIndex()==0) + { + getPrevZoomFromScale(this->zoomCombo->currentText()); + } + + if(this->zoomCombo->currentIndex()-1 > 1) { this->zoomCombo->setCurrentIndex(this->zoomCombo->currentIndex()-1); } @@ -1482,16 +1590,6 @@ } } -void MainWindow::on_actionAuto_zoom_triggered() -{ - PaintWidget *widget = getCurrentPaintWidget(); - widget->autoScale(); - connect(widget, &PaintWidget::zoomChanged, [this] (float scale) { - this->zoomCombo->setItemText(0, QString::number((int)(scale*100)).append("%")); - this->zoomCombo->setCurrentIndex(0); - }); -} - void MainWindow::on_actionFull_screen_triggered() { if(this->isFullScreen()) @@ -1702,7 +1800,7 @@ if (widget) { MOUSE_POINTER->onCrop(); - widget->onSelectionChanged(QRect()); + widget->onSelectionChanged(QPolygon()); } } @@ -2025,7 +2123,10 @@ void MainWindow::onSubWindowActivated(QMdiSubWindow *window) { - Q_UNUSED(window) + Q_UNUSED(window); + // Set the previously selected tool as active + refreshTools(); + PaintWidget *widget = getCurrentPaintWidget(); if (widget) { @@ -2215,8 +2316,14 @@ ui->actionDuplicate->setShortcut(QString("Ctrl+U")); ui->actionImage_Size->setShortcut(QString("Ctrl+H")); ui->actionCrop->setShortcut(QString("Ctrl+Shift+H")); + // Selection Menu + ui->actionSelect_all->setShortcut(QString("Ctrl+A")); //View Menu ui->actionToolpalette->setShortcut(QString("Ctrl+L")); + ui->actionZoom_in->setShortcut(QKeySequence::ZoomIn); + ui->actionZoom_out->setShortcut(QKeySequence::ZoomOut); + ui->actionOriginal_size->setShortcut(QString("Ctrl+0")); + ui->actionFull_screen->setShortcut(QString("Ctrl+F")); } /* @@ -2300,42 +2407,44 @@ { PaintWidget *widget = getCurrentPaintWidget(); if (widget) - applyThreadedFilter("contrastplus"); + + applyThreadedFilterMP("contrastplus"); + } void MainWindow::on_actionContrastminus_triggered() { PaintWidget *widget = getCurrentPaintWidget(); if (widget) - applyThreadedFilter("contrastminus"); + applyThreadedFilterMP("contrastminus"); } void MainWindow::on_actionSaturationplus_triggered() { PaintWidget *widget = getCurrentPaintWidget(); if (widget) - applyThreadedFilter("saturationplus"); + applyThreadedFilterMP("saturationplus"); } void MainWindow::on_actionSaturationminus_triggered() { PaintWidget *widget = getCurrentPaintWidget(); if (widget) - applyThreadedFilter("saturationminus"); + applyThreadedFilterMP("saturationminus"); } void MainWindow::on_actionGammaCorrectplus_triggered() { PaintWidget *widget = getCurrentPaintWidget(); if (widget) - applyThreadedFilter("gammacorrectplus"); + applyThreadedFilterMP("gammacorrectplus"); } void MainWindow::on_actionGammaCorrectminus_triggered() { PaintWidget *widget = getCurrentPaintWidget(); if (widget) - applyThreadedFilter("gammacorrectminus"); + applyThreadedFilterMP("gammacorrectminus"); } void MainWindow::on_actionGradient_triggered() @@ -2425,10 +2534,6 @@ subWindow->widget()->deleteLater(); break; } - case QEvent::LanguageChange: - { - ui->retranslateUi(this); - } default: qt_noop(); } diff -Nru photoflare-1.5.7/src/mainwindow.h photoflare-1.6.0/src/mainwindow.h --- photoflare-1.5.7/src/mainwindow.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/mainwindow.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - /* + This file is part of Photoflare. - Main window class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + #include #include #include @@ -45,7 +56,7 @@ ~MainWindow(); PaintWidget* getCurrentPaintWidget(); - void openFile(const QString& fileName, bool direct); + void openFile(const QString& fileName); public slots: void handleMessage(const QString& message); @@ -212,6 +223,8 @@ QString prepareFile(const QString& fileName); bool fileTypeSupported(QList formats, QString ext); + void getNextZoomFromScale(QString scaletext); + void getPrevZoomFromScale(QString scaletext); protected: void closeEvent(QCloseEvent *event); @@ -223,7 +236,6 @@ void addPaintWidget(PaintWidget *widget); void addTab(PaintWidget *widget); void addChildWindow(PaintWidget *widget); - void on_actionAuto_zoom_triggered(); void saveContent(); bool saveImage(const QString &fileName, int quality); bool handleCloseChildWindow(QMdiSubWindow *subWindow); @@ -236,6 +248,7 @@ void clearStatusArea(); void applyThreadedFilter(QString filterName, double doubleVal = 0.0); + void applyThreadedFilterMP(QString filterName, double doubleVal = 0.0); Ui::MainWindow *ui; QString m_toolSelected; diff -Nru photoflare-1.5.7/src/mainwindow.ui photoflare-1.6.0/src/mainwindow.ui --- photoflare-1.5.7/src/mainwindow.ui 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/mainwindow.ui 2019-09-17 21:28:37.000000000 +0000 @@ -364,7 +364,6 @@ - diff -Nru photoflare-1.5.7/src/managers/FilterManager.cpp photoflare-1.6.0/src/managers/FilterManager.cpp --- photoflare-1.5.7/src/managers/FilterManager.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/managers/FilterManager.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,25 @@ /* + This file is part of Photoflare. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + +/* Filter manager class. Some of the filters are implemented by ImageMagick through the Magick++ API. - + Others use Qt QGraphics methods. */ //#include @@ -19,6 +35,7 @@ #include #include #include + //#include #include "FilterManager.h" @@ -138,7 +155,7 @@ if(useContrast) { QImage modifiedImage = applyEffectToImage(image, e); - QImage newImage = setContrast(modifiedImage,5,0); + QImage newImage = setContrast(modifiedImage,5); return newImage; } else @@ -303,19 +320,13 @@ QImage FilterManager::grayscale(const QImage &image) { - QImage modifiedImage = image.convertToFormat(image.hasAlphaChannel() ? - QImage::Format_ARGB32 : QImage::Format_RGB32); + Magick::Image *magickImage = d->fromQtImage(image); + magickImage->modulate(100,0,0); - unsigned int *data = (unsigned int*)modifiedImage.bits(); - int pixelCount = modifiedImage.width() * modifiedImage.height(); + QImage modifiedImage = d->toQtImage(magickImage); + delete magickImage; - // Convert each pixel to grayscale - for(int i = 0; i < pixelCount; ++i) { - int val = qGray(*data); - *data = qRgba(val, val, val, qAlpha(*data)); - ++data; - } - return modifiedImage; + return modifiedImage; } QImage FilterManager::oldPhoto(const QImage &image) @@ -590,60 +601,19 @@ return image.transformed(QMatrix().rotate(90.0)); } -static Magick::ChannelType channelById(int channelId) +QImage FilterManager::setBrightness(const QImage &image, int brightness) { - switch(channelId) - { - case 0: - return Magick::AllChannels; - case 1: - return Magick::RedChannel; - case 2: - return Magick::GreenChannel; - case 3: - return Magick::BlueChannel; - case 4: - return Magick::CyanChannel; - case 5: - return Magick::MagentaChannel; - case 6: - return Magick::YellowChannel; - default: - return Magick::AllChannels; - } -} - -QImage FilterManager::setBrightness(const QImage &image, int brightness, int channelId) -{ - //16.04 - /* - Magick::Image *magickImage = d->fromQtImage(image); - magickImage->modulate(brightness + 100.0f, 100.0f, 100.0f); - - QImage modifiedImage = d->toQtImage(magickImage); - delete magickImage; + Magick::Image *magickImage = d->fromQtImage(image); + magickImage->modulate(brightness + 100.0f, 100.0f, 100.0f); - return modifiedImage; - */ - - Q_UNUSED(channelId); - QImage modifiedImage = image; + QImage modifiedImage = d->toQtImage(magickImage); + delete magickImage; - for(int i=0; ifromQtImage(image); magickImage->modulate(100.0f, saturation + 100.0f, 100.0f); @@ -653,9 +623,8 @@ return modifiedImage; } -QImage FilterManager::setContrast(const QImage &image, int contrast, int channelId) +QImage FilterManager::setContrast(const QImage &image, int contrast) { - Q_UNUSED(channelId); Magick::Image *magickImage = d->fromQtImage(image); magickImage->contrast(contrast); @@ -665,9 +634,8 @@ return modifiedImage; } -QImage FilterManager::setGamma(const QImage &image, double gamma, int channelId) +QImage FilterManager::setGamma(const QImage &image, double gamma) { - Q_UNUSED(channelId); Magick::Image *magickImage = d->fromQtImage(image); magickImage->gamma(gamma, gamma, gamma); @@ -770,10 +738,10 @@ magickImage->floodFillColor(pos.x(), pos.y(), Magick::ColorRGB(0,0,0)); QPolygon polygon; - for(int j=0; jrows(); j++) + for(unsigned int j=0; jrows(); j++) { bool marked = false; - for(int i=0; icolumns(); i++) + for(unsigned int i=0; icolumns(); i++) { if(color && magickImage->pixelColor(i,j) == targetColor) { @@ -783,11 +751,9 @@ if((i == magickImage->columns() - 1) && marked) marked = false; - if(magickImage->pixelColor(i,j) == Magick::ColorRGB (0, 0, 0) && !marked || - magickImage->pixelColor(i,j) != Magick::ColorRGB(0, 0, 0) && marked ) + if( (magickImage->pixelColor(i,j) == Magick::ColorRGB (0, 0, 0) && !marked) || (magickImage->pixelColor(i,j) != Magick::ColorRGB(0, 0, 0) && marked) ) { polygon<rows(); j>0; j--) { bool marked = false; - for(int i=magickImage->columns(); i>0; i--) + for(unsigned int i=magickImage->columns(); i>0; i--) { if((i == magickImage->columns() - 1) && marked) marked = false; - if(magickImage->pixelColor(i,j) == Magick::ColorRGB(0, 0, 0) && !marked || - magickImage->pixelColor(i,j) != Magick::ColorRGB(0, 0, 0) && marked ) + if((magickImage->pixelColor(i,j) == Magick::ColorRGB(0, 0, 0) && !marked) || (magickImage->pixelColor(i,j) != Magick::ColorRGB(0, 0, 0) && marked) ) { polygon<colorFuzz(tolerance); - for(int j=0; jrows(); j++) + for(unsigned int j=0; jrows(); j++) { - for(int i=0; icolumns(); i++) + for(unsigned int i=0; icolumns(); i++) { Magick::Color color = magickImage->pixelColor(i,j); if(color.alpha() != 1.0f && color == targetColor) diff -Nru photoflare-1.5.7/src/managers/FilterManager.h photoflare-1.6.0/src/managers/FilterManager.h --- photoflare-1.5.7/src/managers/FilterManager.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/managers/FilterManager.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,14 +1,23 @@ -#ifndef FILTERMANAGER_H -#define FILTERMANAGER_H - /* + This file is part of Photoflare. - Filter manager class. - - Some of the filters are implemented by ImageMagick through the Magick++ API. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef FILTERMANAGER_H +#define FILTERMANAGER_H + #include class FilterManagerPrivate; @@ -48,10 +57,10 @@ QImage rotateCCW(const QImage &image); QImage rotateCW(const QImage &image); - QImage setBrightness(const QImage &image, int brightness, int channel); - QImage setSaturation(const QImage &image, int saturation, int channel); - QImage setContrast(const QImage &image, int contrast, int channel); - QImage setGamma(const QImage &image, double gamma, int channel); + QImage setBrightness(const QImage &image, int brightness); + QImage setSaturation(const QImage &image, int saturation); + QImage setContrast(const QImage &image, int contrast); + QImage setGamma(const QImage &image, double gamma); QImage emboss(const QImage &image); QImage trim(const QImage &image); diff -Nru photoflare-1.5.7/src/managers/ToolManager.cpp photoflare-1.6.0/src/managers/ToolManager.cpp --- photoflare-1.5.7/src/managers/ToolManager.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/managers/ToolManager.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Tools manager class. Handles the different drawing tools. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Tools manager class. Handles the different drawing tools. + #include "ToolManager.h" #include "./ColourPickerTool.h" #include "./PaintBrushTool.h" diff -Nru photoflare-1.5.7/src/managers/ToolManager.h photoflare-1.6.0/src/managers/ToolManager.h --- photoflare-1.5.7/src/managers/ToolManager.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/managers/ToolManager.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,19 @@ /* + This file is part of Photoflare. - Tools manager class. Handles the different drawing tools. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. -*/ + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ #ifndef TOOLMANAGER_H #define TOOLMANAGER_H diff -Nru photoflare-1.5.7/src/progress/batchprogress.cpp photoflare-1.6.0/src/progress/batchprogress.cpp --- photoflare-1.5.7/src/progress/batchprogress.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/progress/batchprogress.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #include "batchprogress.h" #include "ui_batchprogress.h" diff -Nru photoflare-1.5.7/src/progress/batchprogress.h photoflare-1.6.0/src/progress/batchprogress.h --- photoflare-1.5.7/src/progress/batchprogress.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/progress/batchprogress.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef BATCHPREGRESS_H #define BATCHPREGRESS_H diff -Nru photoflare-1.5.7/src/progress/QProgressIndicator.cpp photoflare-1.6.0/src/progress/QProgressIndicator.cpp --- photoflare-1.5.7/src/progress/QProgressIndicator.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/progress/QProgressIndicator.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,11 +1,23 @@ /* + This file is part of Photoflare. - Generic class to show progress. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ -#include +// Generic class to show progress. +#include #include "QProgressIndicator.h" QProgressIndicator::QProgressIndicator(QWidget* parent) diff -Nru photoflare-1.5.7/src/progress/QProgressIndicator.h photoflare-1.6.0/src/progress/QProgressIndicator.h --- photoflare-1.5.7/src/progress/QProgressIndicator.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/progress/QProgressIndicator.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef QPROGRESSINDICATOR_H #define QPROGRESSINDICATOR_H diff -Nru photoflare-1.5.7/src/Settings.cpp photoflare-1.6.0/src/Settings.cpp --- photoflare-1.5.7/src/Settings.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/Settings.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Settings class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Settings class for the PhotoFlare application. + #include #include @@ -27,6 +40,7 @@ compressionDefaultValue = settings.value("compressionDefaultValue").toString(); historyLimit = settings.value("historyLimit").toString(); dockLayout = settings.value("dockLayout").toString(); + zoomDirection = settings.value("zoomDirection").toString(); memDialogParams = settings.value("memorizeParamsEnabled").toBool(); unit = settings.value("unit").toInt(); } @@ -58,6 +72,7 @@ QString compressionDefaultValue; QString historyLimit; QString dockLayout; + QString zoomDirection; bool memDialogParams; int unit; QSettings settings; @@ -97,7 +112,8 @@ d->setValue("compressionDefaultEnabled", false); d->setValue("compressionDefaultValue", 90); d->setValue("compressionDialogEnabled", true); - d->setValue("dockLayout", "Right"); + d->setValue("dockLayout", "0"); + d->setValue("zoomDirection", "0"); d->setValue("historyLimit", 24); d->setValue("memorizeParamsEnabled", true); d->setValue("prevOpened", false); @@ -302,6 +318,17 @@ return d->dockLayout; } +void Settings::setZoomDirection(const QString val) +{ + d->zoomDirection = val; + d->setValue("zoomDirection",val); +} + +QString Settings::getZoomDirection() const +{ + return d->zoomDirection; +} + void Settings::setMemParamsEnabled(bool enabled) { d->memDialogParams = enabled; diff -Nru photoflare-1.5.7/src/Settings.h photoflare-1.6.0/src/Settings.h --- photoflare-1.5.7/src/Settings.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/Settings.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef SETTINGS_H -#define SETTINGS_H - /* + This file is part of Photoflare. - Settings class for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef SETTINGS_H +#define SETTINGS_H + #include #define SETTINGS Settings::instance() @@ -52,6 +63,8 @@ QString getHistoryLimit() const; void setDockLayout(const QString val); QString getDockLayout() const; + void setZoomDirection(const QString val); + QString getZoomDirection() const; void setMemParamsEnabled(bool enabled); bool getMemParamsEnabled() const; void setUnit(int); diff -Nru photoflare-1.5.7/src/tools/BlurTool.cpp photoflare-1.6.0/src/tools/BlurTool.cpp --- photoflare-1.5.7/src/tools/BlurTool.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/BlurTool.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - BlurTool - Blur while dragging the mouse. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// BlurTool - Blur while dragging the mouse. + #include "BlurTool.h" #include "PaintWidget.h" diff -Nru photoflare-1.5.7/src/tools/BlurTool.h photoflare-1.6.0/src/tools/BlurTool.h --- photoflare-1.5.7/src/tools/BlurTool.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/BlurTool.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef BLURTOOL_H #define BLURTOOL_H @@ -20,7 +37,7 @@ void setRadius(int radius); void setPressure(int pressure); - QCursor getCursor(); + QCursor getCursor() override; void setCapStyle(Qt::PenCapStyle capStyle); diff -Nru photoflare-1.5.7/src/tools/ColourPickerTool.cpp photoflare-1.6.0/src/tools/ColourPickerTool.cpp --- photoflare-1.5.7/src/tools/ColourPickerTool.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/ColourPickerTool.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - ColourPickerTool - Select colours from the image for the ColourBoxWidget. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// ColourPickerTool - Select colours from the image for the ColourBoxWidget. + #include "ColourPickerTool.h" #include "../mainwindow.h" #include "../widgets/PaintWidget.h" diff -Nru photoflare-1.5.7/src/tools/ColourPickerTool.h photoflare-1.6.0/src/tools/ColourPickerTool.h --- photoflare-1.5.7/src/tools/ColourPickerTool.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/ColourPickerTool.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef COLOURPICKERTOOL_H #define COLOURPICKERTOOL_H diff -Nru photoflare-1.5.7/src/tools/EraserTool.cpp photoflare-1.6.0/src/tools/EraserTool.cpp --- photoflare-1.5.7/src/tools/EraserTool.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/EraserTool.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - EraserTool - Erase pixels while dragging the mouse. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// EraserTool - Erase pixels while dragging the mouse. + #include "EraserTool.h" #include "PaintWidget.h" diff -Nru photoflare-1.5.7/src/tools/EraserTool.h photoflare-1.6.0/src/tools/EraserTool.h --- photoflare-1.5.7/src/tools/EraserTool.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/EraserTool.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef ERASERTOOL_H #define ERASERTOOL_H @@ -14,7 +31,7 @@ int width() const; void onMousePress(const QPoint &pos, Qt::MouseButton button) override; void onMouseMove(const QPoint &pos) override; - QCursor getCursor(); + QCursor getCursor() override; private: EraserToolPrivate *d; diff -Nru photoflare-1.5.7/src/tools/LineTool.cpp photoflare-1.6.0/src/tools/LineTool.cpp --- photoflare-1.5.7/src/tools/LineTool.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/LineTool.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - LineTool - Draw various lines on the image. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// LineTool - Draw various lines on the image. + #include "LineTool.h" #include diff -Nru photoflare-1.5.7/src/tools/LineTool.h photoflare-1.6.0/src/tools/LineTool.h --- photoflare-1.5.7/src/tools/LineTool.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/LineTool.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef LINETOOL_H #define LINETOOL_H @@ -16,7 +33,7 @@ void onMouseMove(const QPoint &pos) override; void onMouseRelease(const QPoint &pos) override; - QCursor getCursor(); + QCursor getCursor() override; public slots: void setPrimaryColor(const QColor &color); void setSecondaryColor(const QColor &color); diff -Nru photoflare-1.5.7/src/tools/MagicWandTool.cpp photoflare-1.6.0/src/tools/MagicWandTool.cpp --- photoflare-1.5.7/src/tools/MagicWandTool.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/MagicWandTool.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - MagicWandTool - Select areas on the image. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// MagicWandTool - Select areas on the image. + #include "MagicWandTool.h" #include "../mainwindow.h" #include "../widgets/PaintWidget.h" diff -Nru photoflare-1.5.7/src/tools/MagicWandTool.h photoflare-1.6.0/src/tools/MagicWandTool.h --- photoflare-1.5.7/src/tools/MagicWandTool.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/MagicWandTool.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef MAGICWANDTTOOL_H #define MAGICWANDTTOOL_H diff -Nru photoflare-1.5.7/src/tools/PaintBrushAdvTool.cpp photoflare-1.6.0/src/tools/PaintBrushAdvTool.cpp --- photoflare-1.5.7/src/tools/PaintBrushAdvTool.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/PaintBrushAdvTool.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - PaintBrushAdvTool - Paint with different brush styles. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// PaintBrushAdvTool - Paint with different brush styles. + #include "PaintBrushAdvTool.h" #include diff -Nru photoflare-1.5.7/src/tools/PaintBrushAdvTool.h photoflare-1.6.0/src/tools/PaintBrushAdvTool.h --- photoflare-1.5.7/src/tools/PaintBrushAdvTool.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/PaintBrushAdvTool.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef PAINTBRUSHADVTOOL_H #define PAINTBRUSHADVTOOL_H @@ -27,7 +44,7 @@ void setFade(bool fade); void setStep(int step); - QCursor getCursor(); + QCursor getCursor() override; void onMousePress(const QPoint &pos, Qt::MouseButton button) override; void onMouseMove(const QPoint &pos) override; diff -Nru photoflare-1.5.7/src/tools/PaintBrushTool.cpp photoflare-1.6.0/src/tools/PaintBrushTool.cpp --- photoflare-1.5.7/src/tools/PaintBrushTool.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/PaintBrushTool.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - PaintBrushTool - Paint using basic styles. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// PaintBrushTool - Paint using basic styles. + #include #include "PaintBrushTool.h" diff -Nru photoflare-1.5.7/src/tools/PaintBrushTool.h photoflare-1.6.0/src/tools/PaintBrushTool.h --- photoflare-1.5.7/src/tools/PaintBrushTool.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/PaintBrushTool.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef PAINTBRUSHTOOL_H #define PAINTBRUSHTOOL_H @@ -26,7 +43,7 @@ void setPressure(int value) const; int pressure() const; - QCursor getCursor(); + QCursor getCursor() override; void setCapStyle(Qt::PenCapStyle capStyle); diff -Nru photoflare-1.5.7/src/tools/PaintBucketTool.cpp photoflare-1.6.0/src/tools/PaintBucketTool.cpp --- photoflare-1.5.7/src/tools/PaintBucketTool.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/PaintBucketTool.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - PaintBucketTool - Flood fill areas. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// PaintBucketTool - Flood fill areas. + #include "PaintBucketTool.h" #include "../mainwindow.h" #include "../widgets/PaintWidget.h" @@ -31,3 +44,8 @@ break; } } + +QCursor PaintBucketTool::getCursor() +{ + return QCursor(QPixmap (QString(":/cursors/assets/cursors/bucket.png"))); +} diff -Nru photoflare-1.5.7/src/tools/PaintBucketTool.h photoflare-1.6.0/src/tools/PaintBucketTool.h --- photoflare-1.5.7/src/tools/PaintBucketTool.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/PaintBucketTool.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef PAINTBUCKETTOOL_H #define PAINTBUCKETTOOL_H @@ -13,6 +30,7 @@ virtual ~PaintBucketTool(); void onMousePress(const QPoint &pos, Qt::MouseButton button) override; + QCursor getCursor() override; signals: void floodFillPrimaryColor(const QPoint&); diff -Nru photoflare-1.5.7/src/tools/PointerTool.cpp photoflare-1.6.0/src/tools/PointerTool.cpp --- photoflare-1.5.7/src/tools/PointerTool.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/PointerTool.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - PointerTool - Selection and cropping. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// PointerTool - Selection and cropping. + #include "PointerTool.h" #include @@ -45,6 +58,7 @@ : Tool(parent) , d(new PointerToolPrivate) { + this->setObjectName("PointerTool"); setupRightClickMenu(false); } @@ -57,7 +71,7 @@ { const QRect &rect = QRect(d->firstPos, d->secondPos); d->secondPos = d->firstPos; - emit selectionChanged(QRect()); + emit selectionChanged(QPolygon()); emit crop(rect); } @@ -113,6 +127,7 @@ d->image = image; d->imagePos = QPoint(0,0); emit overlaid(m_paintDevice, d->image, QPainter::CompositionMode_SourceOver); + emit cursorChanged(Qt::OpenHandCursor); } void PointerTool::onMousePress(const QPoint &pos, Qt::MouseButton button) @@ -171,10 +186,13 @@ emit cursorChanged(Qt::OpenHandCursor); } } - break; - case Qt::RightButton: { - setupRightClickMenu(true); - } + break; + case Qt::RightButton: + { + setupRightClickMenu(true); + } + break; + default: break; } } @@ -187,12 +205,22 @@ { if(d->selectionMode == HAND) { + float scaledVal = 2.00; + + if(m_scale < 0.5) + { + scaledVal = 5.00; + } + else if(m_scale > 1) { + scaledVal = 1.00; + } + const QImage *image = dynamic_cast(m_paintDevice); QImage surface = QImage(image->size(), QImage::Format_ARGB32_Premultiplied); QPainter painter(&surface); painter.setCompositionMode(QPainter::CompositionMode_Source); painter.fillRect(surface.rect(), Qt::transparent); - QPen pen = QPen(QBrush(), (5*m_scale), Qt::DashLine); + QPen pen = QPen(QBrush(), (scaledVal), Qt::DashLine); pen.setColor(Qt::red); painter.setPen(pen); @@ -269,7 +297,7 @@ { if(d->firstPos == d->secondPos) { - emit selectionChanged(QRect()); + emit selectionChanged(QPolygon()); } else { @@ -301,6 +329,7 @@ void PointerTool::onKeyPressed(QKeyEvent *keyEvent) { + Q_UNUSED(keyEvent); /* QRect rect(d->firstPos,d->secondPos); diff -Nru photoflare-1.5.7/src/tools/PointerTool.h photoflare-1.6.0/src/tools/PointerTool.h --- photoflare-1.5.7/src/tools/PointerTool.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/PointerTool.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef POINTERTOOL_H #define POINTERTOOL_H diff -Nru photoflare-1.5.7/src/tools/SmudgeTool.cpp photoflare-1.6.0/src/tools/SmudgeTool.cpp --- photoflare-1.5.7/src/tools/SmudgeTool.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/SmudgeTool.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - SmudgeTool - Smudge pixels while dragging the mouse. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// SmudgeTool - Smudge pixels while dragging the mouse. + #include "SmudgeTool.h" #include "PaintWidget.h" diff -Nru photoflare-1.5.7/src/tools/SmudgeTool.h photoflare-1.6.0/src/tools/SmudgeTool.h --- photoflare-1.5.7/src/tools/SmudgeTool.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/SmudgeTool.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef SMUDGETOOL_H #define SMUDGETOOL_H @@ -12,7 +29,7 @@ SmudgeTool(QObject *parent = 0); ~SmudgeTool(); - QCursor getCursor(); + QCursor getCursor() override; void setRadius(int radius); void setPressure(int pressure); diff -Nru photoflare-1.5.7/src/tools/SprayCanTool.cpp photoflare-1.6.0/src/tools/SprayCanTool.cpp --- photoflare-1.5.7/src/tools/SprayCanTool.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/SprayCanTool.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #include "SprayCanTool.h" #include diff -Nru photoflare-1.5.7/src/tools/SprayCanTool.h photoflare-1.6.0/src/tools/SprayCanTool.h --- photoflare-1.5.7/src/tools/SprayCanTool.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/SprayCanTool.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef SPRAYCANTOOL_H #define SPRAYCANTOOL_H @@ -25,7 +42,7 @@ void onMousePress(const QPoint &pos, Qt::MouseButton button) override; void onMouseMove(const QPoint &pos) override; void onMouseRelease(const QPoint &pos) override; - QCursor getCursor(); + QCursor getCursor() override; public slots: void setPrimaryColor(const QColor &color); @@ -33,7 +50,7 @@ private: void fillPattern(); - void timerEvent(QTimerEvent *event); + void timerEvent(QTimerEvent *event) override; private: SprayCanToolPrivate *d; }; diff -Nru photoflare-1.5.7/src/tools/StampTool.cpp photoflare-1.6.0/src/tools/StampTool.cpp --- photoflare-1.5.7/src/tools/StampTool.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/StampTool.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - StampTool - Clone an area of an image and paint it over the image. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// StampTool - Clone an area of an image and paint it over the image. + #include "StampTool.h" #include "PaintWidget.h" diff -Nru photoflare-1.5.7/src/tools/StampTool.h photoflare-1.6.0/src/tools/StampTool.h --- photoflare-1.5.7/src/tools/StampTool.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/StampTool.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef STAMPTOOL_H #define STAMPTOOL_H @@ -24,7 +41,7 @@ void setPrecise(bool precise); void setDiffuse(bool diffuse); - QCursor getCursor(); + QCursor getCursor() override; void setCapStyle(Qt::PenCapStyle capStyle); diff -Nru photoflare-1.5.7/src/tools/TextTool.cpp photoflare-1.6.0/src/tools/TextTool.cpp --- photoflare-1.5.7/src/tools/TextTool.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/TextTool.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - TextTool - Put text on the image. Tool not present in the Toolpalette but launched from the TextDialog. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// TextTool - Put text on the image. Tool not present in the Toolpalette but launched from the TextDialog. + #include "TextTool.h" #include @@ -22,7 +35,6 @@ QPoint firstPos; QPoint secondPos; - QRect textRect; QString text; QFont font; @@ -75,7 +87,8 @@ void TextTool::previewText() { - if (m_paintDevice) { + if (m_paintDevice) + { const QImage *image = dynamic_cast(m_paintDevice); QImage surface = QImage(image->size(), QImage::Format_ARGB32_Premultiplied); @@ -102,7 +115,8 @@ void TextTool::drawText() { - if (m_paintDevice) { + if (m_paintDevice) + { QPainter painter(m_paintDevice); painter.setPen(d->color); painter.setFont(d->font); @@ -145,7 +159,8 @@ void TextTool::onMouseMove(const QPoint &pos) { d->secondPos = pos; - if(d->previewMode) { + if(d->previewMode) + { d->textRect.moveTo(pos); previewText(); } @@ -153,9 +168,7 @@ void TextTool::onMouseRelease(const QPoint &pos) { - if(d->previewMode && - d->firstPos == d->secondPos && - d->textRect.contains(pos)) + if(d->previewMode && d->firstPos == d->secondPos && d->textRect.contains(pos)) { emit editText(d->text, d->font, d->color); } diff -Nru photoflare-1.5.7/src/tools/TextTool.h photoflare-1.6.0/src/tools/TextTool.h --- photoflare-1.5.7/src/tools/TextTool.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/TextTool.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef TEXTTOOL_H #define TEXTTOOL_H diff -Nru photoflare-1.5.7/src/tools/Tool.cpp photoflare-1.6.0/src/tools/Tool.cpp --- photoflare-1.5.7/src/tools/Tool.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/Tool.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,11 +1,23 @@ /* + This file is part of Photoflare. - Generic Tool class. All Tools will extend this class. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ -#include "Tool.h" +// Generic Tool class. All Tools will extend this class. +#include "Tool.h" #include Tool::Tool(QObject *parent) diff -Nru photoflare-1.5.7/src/tools/Tool.h photoflare-1.6.0/src/tools/Tool.h --- photoflare-1.5.7/src/tools/Tool.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/tools/Tool.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef TOOL_H #define TOOL_H diff -Nru photoflare-1.5.7/src/toolSettings/BlurSettingsWidget.cpp photoflare-1.6.0/src/toolSettings/BlurSettingsWidget.cpp --- photoflare-1.5.7/src/toolSettings/BlurSettingsWidget.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/BlurSettingsWidget.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Widget for BlurTool settings. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for BlurTool settings. + #include "BlurSettingsWidget.h" #include "ui_BlurSettingsWidget.h" diff -Nru photoflare-1.5.7/src/toolSettings/BlurSettingsWidget.h photoflare-1.6.0/src/toolSettings/BlurSettingsWidget.h --- photoflare-1.5.7/src/toolSettings/BlurSettingsWidget.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/BlurSettingsWidget.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,25 @@ -#ifndef BLURSETTINGSWIDGET_H -#define BLURSETTINGSWIDGET_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - Widget for BlurTool settings. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for BlurTool settings. + +#ifndef BLURSETTINGSWIDGET_H +#define BLURSETTINGSWIDGET_H + #include namespace Ui { diff -Nru photoflare-1.5.7/src/toolSettings/erasersettingswidget.cpp photoflare-1.6.0/src/toolSettings/erasersettingswidget.cpp --- photoflare-1.5.7/src/toolSettings/erasersettingswidget.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/erasersettingswidget.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #include "erasersettingswidget.h" #include "ui_erasersettingswidget.h" diff -Nru photoflare-1.5.7/src/toolSettings/erasersettingswidget.h photoflare-1.6.0/src/toolSettings/erasersettingswidget.h --- photoflare-1.5.7/src/toolSettings/erasersettingswidget.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/erasersettingswidget.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef ERASERSETTINGSWIDGET_H #define ERASERSETTINGSWIDGET_H diff -Nru photoflare-1.5.7/src/toolSettings/LineSettingsWidget.cpp photoflare-1.6.0/src/toolSettings/LineSettingsWidget.cpp --- photoflare-1.5.7/src/toolSettings/LineSettingsWidget.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/LineSettingsWidget.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Widget for LineTool settings. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for LineTool settings. + #include #include "LineSettingsWidget.h" diff -Nru photoflare-1.5.7/src/toolSettings/LineSettingsWidget.h photoflare-1.6.0/src/toolSettings/LineSettingsWidget.h --- photoflare-1.5.7/src/toolSettings/LineSettingsWidget.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/LineSettingsWidget.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,25 @@ -#ifndef LINESETTINGSWIDGET_H -#define LINESETTINGSWIDGET_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - Widget for LineTool settings. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for LineTool settings. + +#ifndef LINESETTINGSWIDGET_H +#define LINESETTINGSWIDGET_H + #include namespace Ui { diff -Nru photoflare-1.5.7/src/toolSettings/MagicWandSettingsWidget.cpp photoflare-1.6.0/src/toolSettings/MagicWandSettingsWidget.cpp --- photoflare-1.5.7/src/toolSettings/MagicWandSettingsWidget.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/MagicWandSettingsWidget.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Widget for MagicWandTool settings. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for MagicWandTool settings. + #include "MagicWandSettingsWidget.h" #include "ui_MagicWandSettingsWidget.h" diff -Nru photoflare-1.5.7/src/toolSettings/MagicWandSettingsWidget.h photoflare-1.6.0/src/toolSettings/MagicWandSettingsWidget.h --- photoflare-1.5.7/src/toolSettings/MagicWandSettingsWidget.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/MagicWandSettingsWidget.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,25 @@ -#ifndef MAGICWANDSETTINGSWIDGET_H -#define MAGICWANDSETTINGSWIDGET_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - Widget for MagicWandTool settings. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for MagicWandTool settings. + +#ifndef MAGICWANDSETTINGSWIDGET_H +#define MAGICWANDSETTINGSWIDGET_H + #include namespace Ui { diff -Nru photoflare-1.5.7/src/toolSettings/PaintBrushAdvSettingsWidget.cpp photoflare-1.6.0/src/toolSettings/PaintBrushAdvSettingsWidget.cpp --- photoflare-1.5.7/src/toolSettings/PaintBrushAdvSettingsWidget.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/PaintBrushAdvSettingsWidget.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Widget for AdvancedPaintbrushTool settings. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for AdvancedPaintbrushTool settings. + #include "PaintBrushAdvSettingsWidget.h" #include "ui_PaintBrushAdvSettingsWidget.h" diff -Nru photoflare-1.5.7/src/toolSettings/PaintBrushAdvSettingsWidget.h photoflare-1.6.0/src/toolSettings/PaintBrushAdvSettingsWidget.h --- photoflare-1.5.7/src/toolSettings/PaintBrushAdvSettingsWidget.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/PaintBrushAdvSettingsWidget.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,25 @@ -#ifndef PAINTBRUSHADVSETTINGSWIDGET_H -#define PAINTBRUSHADVSETTINGSWIDGET_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - Widget for AdvancedPaintbrushTool settings. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +//Widget for AdvancedPaintbrushTool settings. + +#ifndef PAINTBRUSHADVSETTINGSWIDGET_H +#define PAINTBRUSHADVSETTINGSWIDGET_H + #include namespace Ui { diff -Nru photoflare-1.5.7/src/toolSettings/PaintBrushSettingsWidget.cpp photoflare-1.6.0/src/toolSettings/PaintBrushSettingsWidget.cpp --- photoflare-1.5.7/src/toolSettings/PaintBrushSettingsWidget.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/PaintBrushSettingsWidget.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Widget for PaintBrushTool settings. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for PaintBrushTool settings. + #include "PaintBrushSettingsWidget.h" #include "ui_PaintBrushSettingsWidget.h" diff -Nru photoflare-1.5.7/src/toolSettings/PaintBrushSettingsWidget.h photoflare-1.6.0/src/toolSettings/PaintBrushSettingsWidget.h --- photoflare-1.5.7/src/toolSettings/PaintBrushSettingsWidget.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/PaintBrushSettingsWidget.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,25 @@ -#ifndef PAINTBRUSHSETTINGSWIDGET_H -#define PAINTBRUSHSETTINGSWIDGET_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - Widget for PaintBrushTool settings. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for PaintBrushTool settings. + +#ifndef PAINTBRUSHSETTINGSWIDGET_H +#define PAINTBRUSHSETTINGSWIDGET_H + #include namespace Ui { diff -Nru photoflare-1.5.7/src/toolSettings/pointersettingswidget.cpp photoflare-1.6.0/src/toolSettings/pointersettingswidget.cpp --- photoflare-1.5.7/src/toolSettings/pointersettingswidget.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/pointersettingswidget.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #include "pointersettingswidget.h" #include "ui_pointersettingswidget.h" @@ -12,7 +29,7 @@ ui->checkBoxStroke->setHidden(true); ui->checkBoxFill->setHidden(true); - ui->square_sel->setDisabled(true); + ui->square_sel->setHidden(true); // Hide until we have more selection types available ui->circle_sel->setHidden(true); } diff -Nru photoflare-1.5.7/src/toolSettings/pointersettingswidget.h photoflare-1.6.0/src/toolSettings/pointersettingswidget.h --- photoflare-1.5.7/src/toolSettings/pointersettingswidget.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/pointersettingswidget.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef POINTERSETTINGSWIDGET_H #define POINTERSETTINGSWIDGET_H diff -Nru photoflare-1.5.7/src/toolSettings/SmudgeSettingsWidget.cpp photoflare-1.6.0/src/toolSettings/SmudgeSettingsWidget.cpp --- photoflare-1.5.7/src/toolSettings/SmudgeSettingsWidget.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/SmudgeSettingsWidget.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Widget for SmudgeTool settings. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for SmudgeTool settings. + #include "SmudgeSettingsWidget.h" #include "ui_smudgesettingswidget.h" diff -Nru photoflare-1.5.7/src/toolSettings/SmudgeSettingsWidget.h photoflare-1.6.0/src/toolSettings/SmudgeSettingsWidget.h --- photoflare-1.5.7/src/toolSettings/SmudgeSettingsWidget.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/SmudgeSettingsWidget.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,25 @@ -#ifndef SMUDGESETTINGSWIDGET_H -#define SMUDGESETTINGSWIDGET_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - Widget for SmudgeTool settings. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for SmudgeTool settings. + +#ifndef SMUDGESETTINGSWIDGET_H +#define SMUDGESETTINGSWIDGET_H + #include namespace Ui { diff -Nru photoflare-1.5.7/src/toolSettings/SprayCanSettingsWidget.cpp photoflare-1.6.0/src/toolSettings/SprayCanSettingsWidget.cpp --- photoflare-1.5.7/src/toolSettings/SprayCanSettingsWidget.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/SprayCanSettingsWidget.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Widget for SprayCanTool settings. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for SprayCanTool settings. + #include "SprayCanSettingsWidget.h" #include "ui_SprayCanSettingsWidget.h" diff -Nru photoflare-1.5.7/src/toolSettings/SprayCanSettingsWidget.h photoflare-1.6.0/src/toolSettings/SprayCanSettingsWidget.h --- photoflare-1.5.7/src/toolSettings/SprayCanSettingsWidget.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/SprayCanSettingsWidget.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,25 @@ -#ifndef SPRAYCANSETTINGSWIDGET_H -#define SPRAYCANSETTINGSWIDGET_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - Widget for SprayCanTool settings. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for SprayCanTool settings. + +#ifndef SPRAYCANSETTINGSWIDGET_H +#define SPRAYCANSETTINGSWIDGET_H + #include namespace Ui { diff -Nru photoflare-1.5.7/src/toolSettings/StampSettingsWidget.cpp photoflare-1.6.0/src/toolSettings/StampSettingsWidget.cpp --- photoflare-1.5.7/src/toolSettings/StampSettingsWidget.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/StampSettingsWidget.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,21 @@ /* + This file is part of Photoflare. - Widget for StampTool settings. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for StampTool settings. #include "StampSettingsWidget.h" #include "ui_StampSettingsWidget.h" diff -Nru photoflare-1.5.7/src/toolSettings/StampSettingsWidget.h photoflare-1.6.0/src/toolSettings/StampSettingsWidget.h --- photoflare-1.5.7/src/toolSettings/StampSettingsWidget.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/toolSettings/StampSettingsWidget.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,25 @@ -#ifndef STAMPSETTINGSWIDGET_H -#define STAMPSETTINGSWIDGET_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - Widget for StampTool settings. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget for StampTool settings. + +#ifndef STAMPSETTINGSWIDGET_H +#define STAMPSETTINGSWIDGET_H + #include namespace Ui { diff -Nru photoflare-1.5.7/src/widgets/brushtypecombobox.cpp photoflare-1.6.0/src/widgets/brushtypecombobox.cpp --- photoflare-1.5.7/src/widgets/brushtypecombobox.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/widgets/brushtypecombobox.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Special combo to hold Brush Types. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Special combo to hold Brush Types. + #include #include #include diff -Nru photoflare-1.5.7/src/widgets/brushtypecombobox.h photoflare-1.6.0/src/widgets/brushtypecombobox.h --- photoflare-1.5.7/src/widgets/brushtypecombobox.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/widgets/brushtypecombobox.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef BRUSHTYPECOMBOBOX_H -#define BRUSHTYPECOMBOBOX_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - Special combo to hold Brush Types. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef BRUSHTYPECOMBOBOX_H +#define BRUSHTYPECOMBOBOX_H + #include class QComboBoxEventsInterface diff -Nru photoflare-1.5.7/src/widgets/colorboxwidget.cpp photoflare-1.6.0/src/widgets/colorboxwidget.cpp --- photoflare-1.5.7/src/widgets/colorboxwidget.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/widgets/colorboxwidget.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Widget to choose colors. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Widget to choose colors. + #include #include diff -Nru photoflare-1.5.7/src/widgets/colorboxwidget.h photoflare-1.6.0/src/widgets/colorboxwidget.h --- photoflare-1.5.7/src/widgets/colorboxwidget.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/widgets/colorboxwidget.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef COLORBOXWIDGET_H -#define COLORBOXWIDGET_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - Widget to choose colors. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef COLORBOXWIDGET_H +#define COLORBOXWIDGET_H + #include namespace Ui { diff -Nru photoflare-1.5.7/src/widgets/imagepositionwidget.cpp photoflare-1.6.0/src/widgets/imagepositionwidget.cpp --- photoflare-1.5.7/src/widgets/imagepositionwidget.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/widgets/imagepositionwidget.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Image position widget for the PhotoFlare application. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Image position widget for the PhotoFlare application. + #include "imagepositionwidget.h" #include "ui_imagepositionwidget.h" //#include diff -Nru photoflare-1.5.7/src/widgets/imagepositionwidget.h photoflare-1.6.0/src/widgets/imagepositionwidget.h --- photoflare-1.5.7/src/widgets/imagepositionwidget.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/widgets/imagepositionwidget.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef IMAGEPOSITIONWIDGET_H -#define IMAGEPOSITIONWIDGET_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - Image position widget for the PhotoFlare application. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef IMAGEPOSITIONWIDGET_H +#define IMAGEPOSITIONWIDGET_H + #include namespace Ui { diff -Nru photoflare-1.5.7/src/widgets/layermanager.cpp photoflare-1.6.0/src/widgets/layermanager.cpp --- photoflare-1.5.7/src/widgets/layermanager.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/widgets/layermanager.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #include "layermanager.h" #include "ui_layermanager.h" diff -Nru photoflare-1.5.7/src/widgets/layermanager.h photoflare-1.6.0/src/widgets/layermanager.h --- photoflare-1.5.7/src/widgets/layermanager.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/widgets/layermanager.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef LAYERMANAGER_H #define LAYERMANAGER_H diff -Nru photoflare-1.5.7/src/widgets/PaintWidget.cpp photoflare-1.6.0/src/widgets/PaintWidget.cpp --- photoflare-1.5.7/src/widgets/PaintWidget.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/widgets/PaintWidget.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,27 +1,37 @@ /* + This file is part of Photoflare. - Paint widget class. Handles the drawing area. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Paint widget class. Handles the drawing area. + //#include #include #include #include -#include -#include #include -#include #include #include #include +#include "../Settings.h" #include "PaintWidget.h" #include "./Tool.h" #include "QProgressIndicator.h" -#include "src/Settings.h" class PaintWidgetPrivate : public QGraphicsScene { @@ -37,7 +47,6 @@ isSelectionVisible = true; hotspotVisible = false; - selection = QRect(); } ~PaintWidgetPrivate() { @@ -65,12 +74,17 @@ painter.drawImage(0, 0, image); if(isSelectionVisible) { - float scaledVal = 3.00/scale; + float scaledVal = 2.00; int cornerSize = 50; if(scale < 0.5) { cornerSize = 100; + scaledVal = 5.00; + } + else if(scale > 1) { + cornerSize = 20; + scaledVal = 1.00; } //Draw the selection hotspots @@ -184,7 +198,7 @@ if (currentTool) { currentTool->onMouseRelease(QPoint(event->scenePos().x(), event->scenePos().y())); - if(imageChanged) + if(q->selection().size()==0 && imageChanged) { q->onContentChanged(); q->contentChanged(); @@ -449,8 +463,19 @@ { const QPointF p0scene = mapToScene(event->pos()); float scaleFactor = 1.1f; + bool zoomDirection; + + // Zoom in or out depending on user preference + if(SETTINGS->getZoomDirection()=="0") + { + zoomDirection = event->delta() > 0; + } + else + { + zoomDirection = event->delta() < 0; + } - if(event->delta() > 0) + if(zoomDirection) { d->scale = d->scale / scaleFactor; d->scale = (d->scale < 0.1f) ? 0.1f : d->scale; diff -Nru photoflare-1.5.7/src/widgets/PaintWidget.h photoflare-1.6.0/src/widgets/PaintWidget.h --- photoflare-1.5.7/src/widgets/PaintWidget.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/widgets/PaintWidget.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,12 +1,23 @@ -#ifndef PAINTWIDGET_H -#define PAINTWIDGET_H - /* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - Paint widget class. Handles the drawing area. + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +#ifndef PAINTWIDGET_H +#define PAINTWIDGET_H + #include class PaintWidgetPrivate; diff -Nru photoflare-1.5.7/src/workers/BatchProcessWorker.cpp photoflare-1.6.0/src/workers/BatchProcessWorker.cpp --- photoflare-1.5.7/src/workers/BatchProcessWorker.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/workers/BatchProcessWorker.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,9 +1,22 @@ /* + This file is part of Photoflare. - Worker class for the BatchDialog to process the files. + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . */ +// Worker class for the BatchDialog to process the files. + //#include #include @@ -152,10 +165,10 @@ break; } - image = FilterManager::instance()->setBrightness(image, m_params->brightness(), m_params->brightnessChannel()); - image = FilterManager::instance()->setSaturation(image, m_params->saturation(), m_params->saturationChannel()); - image = FilterManager::instance()->setContrast(image, m_params->contrast(), m_params->contrastChannel()); - image = FilterManager::instance()->setGamma(image, m_params->gamma(), m_params->gammaChannel()); + image = FilterManager::instance()->setBrightness(image, m_params->brightness()); + image = FilterManager::instance()->setSaturation(image, m_params->saturation()); + image = FilterManager::instance()->setContrast(image, m_params->contrast()); + image = FilterManager::instance()->setGamma(image, m_params->gamma()); QString newFile = m_params->outDir() + "/" + QFileInfo(file).baseName()+m_params->outputFormat(); emit fileProcessFinished(newFile, image); diff -Nru photoflare-1.5.7/src/workers/BatchProcessWorker.h photoflare-1.6.0/src/workers/BatchProcessWorker.h --- photoflare-1.5.7/src/workers/BatchProcessWorker.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/workers/BatchProcessWorker.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef BATCHPROCESSWORKER_H #define BATCHPROCESSWORKER_H diff -Nru photoflare-1.5.7/src/workers/filterworker.cpp photoflare-1.6.0/src/workers/filterworker.cpp --- photoflare-1.5.7/src/workers/filterworker.cpp 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/workers/filterworker.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,22 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + +// Worker class for the application to apply the filters. (Single threaded - Not all filters work with OpenMP) + #include "filterworker.h" #include "FilterManager.h" #include "PaintWidget.h" @@ -30,35 +49,35 @@ if(currentFilter == "gammacorrectminus") { - newImage = FilterManager::instance()->setGamma(currentImage, 0.9, 0); + newImage = FilterManager::instance()->setGamma(currentImage, 0.9); } else if(currentFilter == "gammacorrectplus") { - newImage = FilterManager::instance()->setGamma(currentImage, 1.1, 0); + newImage = FilterManager::instance()->setGamma(currentImage, 1.1); } else if(currentFilter == "saturationminus") { - newImage = FilterManager::instance()->setSaturation(currentImage, -15, 0); + newImage = FilterManager::instance()->setSaturation(currentImage, -15); } else if(currentFilter == "saturationplus") { - newImage = FilterManager::instance()->setSaturation(currentImage, +15, 0); + newImage = FilterManager::instance()->setSaturation(currentImage, +15); } else if(currentFilter == "contrastminus") { - newImage = FilterManager::instance()->setContrast(currentImage, 0.5, 0); + newImage = FilterManager::instance()->setContrast(currentImage, 0.5); } else if(currentFilter == "contrastplus") { - newImage = FilterManager::instance()->setContrast(currentImage, 1.0, 0); + newImage = FilterManager::instance()->setContrast(currentImage, 1.0); } else if(currentFilter == "brightminus") { - newImage = FilterManager::instance()->setBrightness(currentImage, -5, 0); + newImage = FilterManager::instance()->setBrightness(currentImage, -5); } else if(currentFilter == "brightplus") { - newImage = FilterManager::instance()->setBrightness(currentImage, 5, 0); + newImage = FilterManager::instance()->setBrightness(currentImage, 5); } else if(currentFilter == "flipHorz") { diff -Nru photoflare-1.5.7/src/workers/filterworker.h photoflare-1.6.0/src/workers/filterworker.h --- photoflare-1.5.7/src/workers/filterworker.h 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/src/workers/filterworker.h 2019-09-17 21:28:37.000000000 +0000 @@ -1,3 +1,20 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + #ifndef FILTERWORKER_H #define FILTERWORKER_H diff -Nru photoflare-1.5.7/src/workers/filterworkermp.cpp photoflare-1.6.0/src/workers/filterworkermp.cpp --- photoflare-1.5.7/src/workers/filterworkermp.cpp 1970-01-01 00:00:00.000000000 +0000 +++ photoflare-1.6.0/src/workers/filterworkermp.cpp 2019-09-17 21:28:37.000000000 +0000 @@ -0,0 +1,276 @@ +/* + This file is part of Photoflare. + + Photoflare is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Photoflare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Photoflare. If not, see . +*/ + +// Worker class for the application to apply the filters. (Multi threaded using OpenMP) + +#include "filterworkermp.h" +#include "FilterManager.h" +#include "PaintWidget.h" +#include +#include +#include "omp.h" + +//#include + +FilterWorkerMP::FilterWorkerMP(QObject *parent) : QObject(parent) +{ + +} + +void FilterWorkerMP::setImage(QImage image) +{ + currentImage = image; +} + +void FilterWorkerMP::setFilter(QString filter) +{ + currentFilter = filter; +} + +void FilterWorkerMP::setDoubleVal(double v) +{ + currentDouble = v; +} + +void FilterWorkerMP::process() +{ + QImage newImage = currentImage; + + int maxThreads = omp_get_max_threads(); + int w = currentImage.width(); + int h = currentImage.height(); + + #pragma omp parallel shared(currentImage, newImage) firstprivate(maxThreads, w, h) +{ + #pragma omp for schedule(dynamic) nowait + for(int thread=0;threadsetGamma(currentImageSlice, 0.9); + } + else if(currentFilter == "gammacorrectplus") + { + newImageSlice = FilterManager::instance()->setGamma(currentImageSlice, 1.1); + } + else if(currentFilter == "saturationminus") + { + newImageSlice = FilterManager::instance()->setSaturation(currentImageSlice, -15); + } + else if(currentFilter == "saturationplus") + { + newImageSlice = FilterManager::instance()->setSaturation(currentImageSlice, +15); + } + else if(currentFilter == "contrastminus") + { + newImageSlice = FilterManager::instance()->setContrast(currentImageSlice, 0.5); + } + else if(currentFilter == "contrastplus") + { + newImageSlice = FilterManager::instance()->setContrast(currentImageSlice, 1.0); + } + else if(currentFilter == "brightminus") + { + newImageSlice = FilterManager::instance()->setBrightness(currentImageSlice, -5); + } + else if(currentFilter == "brightplus") + { + newImageSlice = FilterManager::instance()->setBrightness(currentImageSlice, 5); + } + else if(currentFilter == "flipHorz") + { + newImageSlice = FilterManager::instance()->flipHorz(currentImageSlice); + } + else if(currentFilter == "flipVert") + { + newImageSlice = FilterManager::instance()->flipVert(currentImageSlice); + } + else if(currentFilter == "rotateCCW") + { + newImageSlice = FilterManager::instance()->rotateCCW(currentImageSlice); + } + else if(currentFilter == "rotateCW") + { + newImageSlice = FilterManager::instance()->rotateCW(currentImageSlice); + } + else if(currentFilter == "trim") + { + newImageSlice = FilterManager::instance()->trim(currentImageSlice); + } + else if(currentFilter == "dropShadow") + { + newImageSlice = FilterManager::instance()->dropShadow(currentImageSlice, 5, 40, Qt::black,0,10); + } + else if(currentFilter == "autoLevels") + { + newImageSlice = FilterManager::instance()->autoLevels(currentImageSlice); + } + else if(currentFilter == "autoContrast") + { + newImageSlice = FilterManager::instance()->autoContrast(currentImageSlice); + } + else if(currentFilter == "negative") + { + newImageSlice = FilterManager::instance()->negative(currentImageSlice); + } + else if(currentFilter == "setOpacity") + { + newImageSlice = FilterManager::instance()->setOpacity(currentImageSlice,currentDouble); + } + else if(currentFilter == "soften") + { + newImageSlice = FilterManager::instance()->soften(currentImageSlice); + } + else if(currentFilter == "blur") + { + newImageSlice = FilterManager::instance()->blur(currentImageSlice); + } + else if(currentFilter == "sharpen") + { + newImageSlice = FilterManager::instance()->sharpen(currentImageSlice); + } + else if(currentFilter == "reinforce") + { + newImageSlice = FilterManager::instance()->reinforce(currentImageSlice); + } + else if(currentFilter == "dustreduction") + { + newImageSlice = FilterManager::instance()->dustreduction(currentImageSlice); + } + else if(currentFilter == "deSpeckle") + { + newImageSlice = FilterManager::instance()->deSpeckle(currentImageSlice); + } + else if(currentFilter == "gaussianNoise") + { + newImageSlice = FilterManager::instance()->gaussianNoise(currentImageSlice); + } + else if(currentFilter == "impulseNoise") + { + newImageSlice = FilterManager::instance()->impulseNoise(currentImageSlice); + } + else if(currentFilter == "laplacianNoise") + { + newImageSlice = FilterManager::instance()->laplacianNoise(currentImageSlice); + } + else if(currentFilter == "poissonNoise") + { + newImageSlice = FilterManager::instance()->poissonNoise(currentImageSlice); + } + else if(currentFilter == "grayscale") + { + newImageSlice = FilterManager::instance()->grayscale(currentImageSlice); + } + else if(currentFilter == "oldPhoto") + { + newImageSlice = FilterManager::instance()->oldPhoto(currentImageSlice); + } + else if(currentFilter == "sepia") + { + newImageSlice = FilterManager::instance()->sepia(currentImageSlice); + } + else if(currentFilter == "equalizeColours") + { + newImageSlice = FilterManager::instance()->equalizeColours(currentImageSlice); + } + else if(currentFilter == "normalize") + { + newImageSlice = FilterManager::instance()->normalize(currentImageSlice); + } + else if(currentFilter == "blackwhite") + { + newImageSlice = FilterManager::instance()->blackwhite(currentImageSlice); + } + else if(currentFilter == "oil") + { + newImageSlice = FilterManager::instance()->oilPaint(currentImageSlice); + } + else if(currentFilter == "charcoal") + { + newImageSlice = FilterManager::instance()->charcoal(currentImageSlice); + } + else if(currentFilter == "solarize") + { + newImageSlice = FilterManager::instance()->solarize(currentImageSlice); + } + else if(currentFilter == "motionBlur") + { + newImageSlice = FilterManager::instance()->motionBlur(currentImageSlice); + } + else if(currentFilter == "swirl") + { + newImageSlice = FilterManager::instance()->swirl(currentImageSlice); + } + else if(currentFilter == "wave") + { + newImageSlice = FilterManager::instance()->wave(currentImageSlice); + } + else if(currentFilter == "implode") + { + newImageSlice = FilterManager::instance()->implode(currentImageSlice); + } + else if(currentFilter == "explode") + { + newImageSlice = FilterManager::instance()->explode(currentImageSlice); + } + else if(currentFilter == "cropToCenter") + { + newImageSlice = FilterManager::instance()->cropToCenter(currentImageSlice); + } + else if(currentFilter == "simpleFrame") + { + newImageSlice = FilterManager::instance()->simpleFrame(currentImageSlice); + } + else if(currentFilter == "advFrame") + { + newImageSlice = FilterManager::instance()->advFrame(currentImageSlice); + } + else if(currentFilter == "emboss") + { + newImageSlice = FilterManager::instance()->emboss(currentImageSlice); + } + else if(currentFilter == "monoChromeEdges") + { + newImageSlice = FilterManager::instance()->monoChromeEdges(currentImageSlice); + } + else if(currentFilter == "colourthreshold") + { + newImageSlice = FilterManager::instance()->colourthreshold(currentImageSlice); + } + + + for(int y=0; y. +*/ + +#ifndef FILTERWORKERMP_H +#define FILTERWORKERMP_H + +#include +#include "../mainwindow.h" + +class FilterWorkerMP : public QObject +{ + Q_OBJECT +public: + //FilterWorker(); + explicit FilterWorkerMP(QObject *parent = 0); + void setParent(MainWindow* parent){m_parent = parent;} + void setImage(QImage image); + void setFilter(QString filter); + void setDoubleVal(double v); + +public slots: + void process(); + +signals: + void filterProcessFinished(QImage image); + +private: + MainWindow* m_parent; + QImage currentImage; + QString currentFilter; + double currentDouble; +}; + +#endif // FILTERWORKERMP_H diff -Nru photoflare-1.5.7/.travis.yml photoflare-1.6.0/.travis.yml --- photoflare-1.5.7/.travis.yml 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/.travis.yml 2019-09-17 21:28:37.000000000 +0000 @@ -1,15 +1,15 @@ language: cpp compiler: gcc sudo: require -dist: trusty +dist: xenial before_install: - - sudo add-apt-repository ppa:beineri/opt-qt-5.10.1-trusty -y + - sudo add-apt-repository ppa:beineri/opt-qt-5.10.1-xenial -y - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - sudo apt-get update install: - - sudo apt-get -y install libc6 qt510base qt510tools gcc-8 + - sudo apt-get -y install libc6 libgl1-mesa-dev qt510base qt510tools gcc-8 libomp-dev - source /opt/qt5*/bin/qt5*-env.sh script: diff -Nru photoflare-1.5.7/versions/stable.json photoflare-1.6.0/versions/stable.json --- photoflare-1.5.7/versions/stable.json 2019-02-17 22:50:48.000000000 +0000 +++ photoflare-1.6.0/versions/stable.json 2019-09-17 21:28:37.000000000 +0000 @@ -1 +1 @@ -1.5.6.1 +1.5.9