updated master to v5.0.0

This commit is contained in:
Niklas 2019-10-22 15:32:00 +02:00
commit 523271a890
405 changed files with 32469 additions and 2794 deletions

67
.circleci/config.yml Normal file
View File

@ -0,0 +1,67 @@
workflows:
version: 2
build:
jobs:
- build
version: 2
jobs:
build:
docker:
- image: buildpack-deps:bionic
steps:
- run:
name: Install pre deps
command: |
apt-get update -yqq \
&& apt-get install -yqq \
build-essential \
cmake \
gcc \
g++ \
qt5-default \
qt5-qmake \
qtmultimedia5-dev \
libqt5svg5-dev \
libx11-dev \
libavformat-dev \
libavcodec-dev \
libavutil-dev \
libswscale-dev \
libqt5x11extras5-dev \
libxcb-util-dev \
libxcb-cursor-dev \
libxcb1-dev \
- run:
name: QMake Version
command: qmake --version
- checkout
- run: git submodule sync
- run: git submodule update --init
- run:
name: LS
command: ls -lahR ~/project
- run:
name: Create Build Env
command: mkdir build && pwd && ls
- run:
name: Build
command: |
cd build && pwd && ls;
qmake ..;
make -j2;
cd ..;
- run:
name: Create Artifact Path
command: mkdir /kshare
- run:
name: Store Build
command: cp build/src/kshare /kshare/
- run:
name: Build Debian Package
command: |
cd packages/;
./makedeb.sh ci;
cp *.deb /kshare/
- store_artifacts:
path: /kshare/

View File

@ -1,3 +1,4 @@
# vim: set syntax=yaml :
AccessModifierOffset: -4
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
@ -24,7 +25,7 @@ IndentFunctionDeclarationAfterType: false
IndentWidth: 4
Language: Cpp
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
NamespaceIndentation: All
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 100

12
.gitignore vendored
View File

@ -38,13 +38,19 @@ CMakeLists.txt.user
Makefile
# Executable
KShare
./KShare
# Other
*.out
tags
*.Debug
*.kdev*
.clang
vgcore.*
*.Release
.*_history
.idea/
build/

32
AppVeyor/appveyor.yml Normal file
View File

@ -0,0 +1,32 @@
environment:
QTDIR: C:\Qt\5.9\mingw53_32
platform: x86
build_script:
- dir
- mkdir build
- cd build
- set PATH=%PATH%;%QTDIR%\bin;C:\Qt\Tools\mingw530_32\bin;C:\MinGW\msys\1.0\bin
- git submodule update --init --recursive
- curl -kLO https://ffmpeg.zeranoe.com/builds/win64/dev/ffmpeg-3.3.2-win64-dev.zip
- 7z x ffmpeg-3.3.2-win64-dev.zip
- set FFMPEG_DEV_PATH=%CD%\ffmpeg-3.3.2-win64-dev
- curl -kLO https://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-3.3.2-win64-shared.zip
- 7z x ffmpeg-3.3.2-win64-shared.zip
- set FFMPEG_SHARED_PATH=%cd%\ffmpeg-3.3.2-win64-shared
- curl -v -L --http1.1 --tlsv1.2 "https://downloads.sourceforge.net/project/qtav/depends/QtAV-depends-windows-x86+x64.7z" -o av.7z
- 7z x av.7z > NUL
- xcopy ffmpeg-3.3.2-win64-shared\* %QTDIR% /e /i /Y
- xcopy ffmpeg-3.3.2-win64-dev\* %QTDIR% /e /i /Y
- xcopy QtAV-depends-windows-x86+x64\* %QTDIR% /e /i /Y
- qmake CONFIG+=nopkg ../KShare.pro
- mingw32-make.exe -j%NUMBER_OF_PROCESSORS%
- copy src\release\kshare.exe ..\KShare.exe
- cd ..
- bash AppVeyor\make_installer.sh
artifacts:
- path: KShare.exe
name: Shared link
- path: installer.exe
name: Installer
- path: portable.zip
name: Portable version

View File

@ -0,0 +1,59 @@
#!/usr/bin/env bash
function addFile {
cp $1 . || (echo cp $1 failed ; return 1)
7z a -tzip portable.zip $(basename $1) > /dev/null
echo "Source: \"$(basename $1)\"; DestDir: \"{app}\"; Flags: ignoreversion" >> installer.iss
echo $1
}
function addFileIn {
name=$2\\$(basename $1)
mkdir -p $2
cp $1 $2 || (echo cp $name failed ; return 1)
7z a -tzip portable.zip $name > /dev/null
echo "Source: \"$name\"; DestDir: \"{app}\\$2\"; Flags: ignoreversion" >> installer.iss
echo $name
}
ver=$(cat src/main.cpp | grep setApplicationVersion | sed "s/\\s*a.setApplicationVersion(\"//g" | sed "s/\");//g")
cd packages/windows
cp ../../KShare.exe . || exit 3
7z a -tzip portable.zip KShare.exe
cp /c/Windows/System32/msvcr120.dll /c/projects/kshare/packages/windows/
sed "s/;VER;/$ver/" installer.iss.pattern.top > installer.iss
addFile ../../build/QtAV-depends-windows-x86+x64/bin/avcodec-57.dll
addFile ../../build/QtAV-depends-windows-x86+x64/bin/avformat-57.dll
addFile ../../build/QtAV-depends-windows-x86+x64/bin/avutil-55.dll
addFile ../../build/QtAV-depends-windows-x86+x64/bin/swresample-2.dll
addFile ../../build/QtAV-depends-windows-x86+x64/bin/swscale-4.dll
addFile /c/Qt/5.9/mingw53_32/bin/Qt5Core.dll
addFile /c/Qt/5.9/mingw53_32/bin/Qt5Network.dll
addFile /c/Qt/5.9/mingw53_32/bin/Qt5Gui.dll
addFile /c/Qt/5.9/mingw53_32/bin/Qt5Widgets.dll
addFile /c/Qt/5.9/mingw53_32/bin/Qt5WinExtras.dll
addFile /c/Qt/5.9/mingw53_32/bin/Qt5Multimedia.dll
addFileIn /c/Qt/5.9/mingw53_32/plugins/platforms/qwindows.dll platforms
addFileIn /c/Qt/5.9/mingw53_32/plugins/mediaservice/dsengine.dll mediaservice
addFile /c/Qt/5.9/mingw53_32/bin/LIBSTDC++-6.DLL
addFile /c/Qt/5.9/mingw53_32/bin/LIBWINPTHREAD-1.DLL
addFile /c/Qt/5.9/mingw53_32/bin/LIBGCC_S_DW2-1.DLL
addFile /c/OpenSSL-Win32/bin/libeay32.dll
addFile /c/OpenSSL-Win32/bin/ssleay32.dll
#addFile /c/OpenSSL-Win32/bin/msvcr120.dll
addFile /c/Windows/System32/msvcr120.dll
echo -----------------
ls /c/OpenSSL-Win32/bin/ -R
echo -----------------
cat installer.iss.pattern.bottom >> installer.iss
"C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss
cp Output/setup.exe ../../installer.exe || exit 1
cp portable.zip ../../ || exit 2

15
KShare.desktop Executable file
View File

@ -0,0 +1,15 @@
[Desktop Entry]
Name=KShare
Comment=The free and open source and cross platform screen sharing software.
GenericName=Screenshot Capture Utility
Exec=/usr/bin/kshare
Icon=/usr/share/pixmaps/KShare.png
Type=Application
StartupNotify=false
Categories=Qt;Utility;
StartupWMClass=KShare
Actions=StartInBackground
[Desktop Action StartInBackground]
Name=Start without showing the window
Exec=/usr/bin/kshare -b

View File

@ -1,157 +1,12 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-04-19T15:47:09
#
#-------------------------------------------------
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = KShare
TEMPLATE = app
CONFIG += c++11
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += main.cpp\
mainwindow.cpp \
cropeditor/cropeditor.cpp \
cropeditor/cropview.cpp \
cropeditor/cropscene.cpp \
uploaders/uploadersingleton.cpp \
screenshotter.cpp \
screenshotutil.cpp \
uploaders/default/imguruploader.cpp \
io/ioutils.cpp \
settings.cpp \
uploaders/default/clipboarduploader.cpp \
formatter.cpp \
uploaders/customuploader.cpp \
notifications.cpp \
hotkeying.cpp \
cropeditor/drawing/dotitem.cpp \
cropeditor/settings/brushpenselection.cpp \
cropeditor/drawing/bluritem.cpp \
cropeditor/drawing/pathitem.cpp \
cropeditor/drawing/lineitem.cpp \
cropeditor/drawing/textitem.cpp \
colorpicker/colorpickerscene.cpp \
worker/worker.cpp \
screenareaselector/screenareaselector.cpp \
recording/recordingpreview.cpp \
recording/recordingcontroller.cpp \
recording/recordingformats.cpp \
formats.cpp \
recording/encoders/encoder.cpp \
recording/encoders/encodersettings.cpp \
recording/encoders/encodersettingsdialog.cpp \
settingsdialog.cpp \
aboutbox.cpp \
cropeditor/drawing/eraseritem.cpp \
cropeditor/drawing/rectitem.cpp \
cropeditor/drawing/ellipseitem.cpp \
hotkeyinputdialog.cpp \
cropeditor/drawing/arrowitem.cpp \
uploaders/default/imgursettingsdialog.cpp \
uploaders/default/imgplusuploader.cpp
HEADERS += mainwindow.hpp \
cropeditor/cropeditor.hpp \
cropeditor/cropview.hpp \
cropeditor/cropscene.hpp \
uploaders/uploader.hpp \
uploaders/uploadersingleton.hpp \
screenshotter.hpp \
screenshotutil.hpp \
uploaders/default/imguruploader.hpp \
io/ioutils.hpp \
settings.hpp \
uploaders/default/clipboarduploader.hpp \
formatter.hpp \
uploaders/customuploader.hpp \
notifications.hpp \
hotkeying.hpp \
cropeditor/drawing/drawitem.hpp \
cropeditor/drawing/dotitem.hpp \
cropeditor/settings/brushpenselection.hpp \
cropeditor/drawing/bluritem.hpp \
cropeditor/drawing/pathitem.hpp \
cropeditor/drawing/lineitem.hpp \
cropeditor/drawing/textitem.hpp \
colorpicker/colorpickerscene.hpp \
platformbackend.hpp \
worker/worker.hpp \
screenareaselector/screenareaselector.hpp \
recording/recordingpreview.hpp \
recording/recordingcontroller.hpp \
recording/recordingformats.hpp \
formats.hpp \
recording/encoders/encoder.hpp \
recording/encoders/encodersettings.hpp \
recording/encoders/encodersettingsdialog.hpp \
settingsdialog.hpp \
aboutbox.hpp \
cropeditor/drawing/eraseritem.hpp \
cropeditor/drawing/rectitem.hpp \
cropeditor/drawing/ellipseitem.hpp \
hotkeyinputdialog.hpp \
cropeditor/drawing/arrowitem.hpp \
uploaders/default/imgursettingsdialog.hpp \
uploaders/default/imgplusuploader.hpp
CONFIG += link_pkgconfig
PKGCONFIG += libavformat libavcodec libswscale libavutil
mac {
SOURCES += $$PWD/platformspecifics/mac/macbackend.cpp
HEADERS += $$PWD/platformspecifics/mac/macbackend.hpp
LIBS += -framework Carbon
warning(Mac is on TODO);
} else:win32 {
SOURCES += $$PWD/platformspecifics/u32/u32backend.cpp
HEADERS += $$PWD/platformspecifics/u32/u32backend.hpp
LIBS += -luser32 -lkernel32 -lpthread
QT += winextras
} else:unix {
SOURCES += $$PWD/platformspecifics/x11/x11backend.cpp
HEADERS += $$PWD/platformspecifics/x11/x11backend.hpp
QT += x11extras
LIBS += -lxcb-cursor -lxcb-xfixes -lxcb
} else {
error(Unsupported platform);
}
FORMS += mainwindow.ui \
cropeditor/settings/brushpenselection.ui \
recording/encoders/encodersettingsdialog.ui \
settingsdialog.ui \
aboutbox.ui \
hotkeyinputdialog.ui \
uploaders/default/imgursettingsdialog.ui
TEMPLATE = subdirs
SUBDIRS += src
DISTFILES += \
README.md \
LICENSE \
OlderSystemFix.patch
RESOURCES += \
icon.qrc
ICON = icons/icon.ico
# Enable debug symbols
QMAKE_CFLAGS_DEBUG += -g
include(QHotkey/qhotkey.pri)
OlderSystemFix.patch \
AppVeyor/appveyor.yml \
AppVeyor/make_installer.sh \
.circleci/config.yml \
.travis.yml \
install.sh

View File

@ -1,4 +1,4 @@
Copyright (c) 2017 ArsenArsen
Copyright (c) 2018 ArsenArsen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@ -1,7 +1,7 @@
diff --git a/recording/encoders/encoder.cpp b/recording/encoders/encoder.cpp
diff --git a/src/recording/encoders/encoder.cpp b/src/recording/encoders/encoder.cpp
index 481ba40..c04d32b 100644
--- a/recording/encoders/encoder.cpp
+++ b/recording/encoders/encoder.cpp
--- a/src/recording/encoders/encoder.cpp
+++ b/src/recording/encoders/encoder.cpp
@@ -64,8 +64,8 @@ Encoder::Encoder(QString &targetFile, QSize res, CodecSettings *settings) {
if (ret < 0) throwAVErr(ret, "codec open");
if (codec->capabilities & AV_CODEC_CAP_DR1) avcodec_align_dimensions(out->enc, &out->enc->width, &out->enc->height);

View File

@ -1,21 +1,25 @@
# KShare
A [ShareX](https://getsharex.com/) inspired cross platform utility written with Qt.
A [ShareX](https://getsharex.com/) inspired cross platform utility written with Qt.
Originally written by [ArsenArsen](https://github.com/ArsenArsen) and here enhanced with [these](https://github.com/Gurkengewuerz/KShare/projects/1) features.
| | Linux | Windows |
|--------|-------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| master | [![CircleCI](https://circleci.com/gh/Gurkengewuerz/KShare/tree/master.svg?style=svg)](https://circleci.com/gh/Gurkengewuerz/KShare/tree/master) | [![Build status](https://ci.appveyor.com/api/projects/status/ujxmg1dk7f5p8ijh/branch/master?svg=true)](https://ci.appveyor.com/project/Gurkengewuerz/kshare/branch/master) |
| dev | [![CircleCI](https://circleci.com/gh/Gurkengewuerz/KShare/tree/dev.svg?style=svg)](https://circleci.com/gh/Gurkengewuerz/KShare/tree/dev) | [![Build status](https://ci.appveyor.com/api/projects/status/ujxmg1dk7f5p8ijh/branch/dev?svg=true)](https://ci.appveyor.com/project/Gurkengewuerz/kshare/branch/dev) |
|Linux|Windows|OS X|
|:---:|:-----:|:--:|
|[![Build Status](https://nativeci.arsenarsen.com/job/KShare/badge/icon)](https://nativeci.arsenarsen.com/job/KShare)| [![Build Status](https://nativeci.arsenarsen.com/job/KShare%20Windows%20x86_64/badge/icon)](https://nativeci.arsenarsen.com/job/KShare%20Windows%20x86_64/)| Soon |
## Screenshot
Made with KShare itself, of course :)
![](http://i.imgur.com/ffWvCun.png)
Made with KShare itself, of course :)
![](https://i.imgur.com/oJrCNkq.png)
## Usage
See the [wiki](https://gitlab.com/ArsenArsen/KShare/wikis/home).
See the [wiki](https://github.com/ArsenArsen/KShare/wiki).
Please note that KShare is not compatiable with Wayland due to some permission issues. Please use X.Org instead.
## Dependencies
* Qt 5 Widgets
* Qt 5 GUI
* Qt 5 Network
* Qt 5 Multimedia
* Qt 5 X11Extras | Winextras
* [QHotkey](https://github.com/Skycoder42/QHotkey)
* libavformat
@ -23,42 +27,36 @@ See the [wiki](https://gitlab.com/ArsenArsen/KShare/wikis/home).
* libavutil
* libswscale
Additionally, on Linux, you require:
* XCB
* XCB xfixes
* XCB cursor
* Notifications Daemon with org.freedesktop.notifications DBus support (like dunst)
Despite the name implying so, this project does not depend on the KDE API at all.
## Goals
See the [project board](https://gitlab.com/ArsenArsen/KShare/boards)
## Install
### **NOTE:** These links are temporarily down and will be fixed with the next release. Current (potentially unstable) development builds are available at [this location](https://nativeci.arsenarsen.com/job/KShare%20(dev))
|Distro|Link|
|:----:|:--:|
|Arch Linux (development)|[kshare-git](https://aur.archlinux.org/packages/kshare-git/)|
|Ubuntu (development)|[Ubuntu .deb](https://nativeci.arsenarsen.com/job/KShare/lastSuccessfulBuild/artifact/packages/simpleName.deb)|
|Ubuntu/Debian (development)|[.deb](https://nativeci.arsenarsen.com/job/KShare%20\(dev\)/main=linux/lastSuccessfulBuild/artifact/packages/simpleName.deb)|
|Arch Linux |[kshare](https://aur.archlinux.org/packages/kshare/)|
|Ubuntu |[Ubuntu .deb](https://nativeci.arsenarsen.com/job/KShare%20Stable/lastSuccessfulBuild/artifact/packages/simpleName.deb)|
I do plan to make a Debian packages.
|Ubuntu/Debian |[.deb](https://nativeci.arsenarsen.com/job/KShare%20\(master\)/main=linux/lastSuccessfulBuild/artifact/packages/simpleName.deb)|
For other UNIX-like platforms, and MSYS2 (for Windows):
You have to obtain the dependencies though.
```bash
git clone https://gitlab.com/ArsenArsen/KShare.git
git clone --recursive https://github.com/ArsenArsen/KShare.git
cd KShare
qmake // Might be qmake-qt5 on your system
qmake # Might be qmake-qt5 on your system
make
```
On systems with FFMpeg pre-3.1 you need to apply `OlderSystemFix.patch` to `recording/encoders/encoder.cpp`.
On systems with FFMpeg pre-3.1 you need to apply `OlderSystemFix.patch` to `src/recording/encoders/encoder.cpp`.
On systems with Qt pre-5.7 you need to install the Qt version from their website.
You can attempt to `curl https://raw.githubusercontent.com/ArsenArsen/KShare/master/install.sh | bash`
## Support (and contact)
There's a few ways to get support, you can:
* join `#kshare` on [Freenode](https://webchat.freenode.net/?channels=kshare)
* open an issue
You can find more details [here](https://blog.arsenarsen.com/posts/compiling-kshare-on-linux-mac-os-x-and-windows-final-revision)
If someone can answer, they probably will.
###### Started on 19th of April 2017 to bring some attention and improvement to Linux screenshotting.
###### Started on 19th of April 2017 by [ArsenArsen](https://github.com/ArsenArsen) to bring some attention and improvement to Linux screenshotting.

View File

@ -1,319 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AboutBox</class>
<widget class="QDialog" name="AboutBox">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>531</width>
<height>231</height>
</rect>
</property>
<property name="windowTitle">
<string>About KShare</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/icons/icon.svg&quot; width=&quot;50&quot; style=&quot;vertical-align: middle;&quot;/&gt;&lt;span style=&quot; font-weight:600; vertical-align:middle;&quot;&gt; KShare&lt;/span&gt;&lt;span style=&quot; vertical-align:middle;&quot;&gt; - The free and open source and cross platform screen sharing software&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Version %0&lt;br/&gt;Links: &lt;a href=&quot;https://github.com/ArsenArsen/KShare&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;Source code&lt;/span&gt;&lt;/a&gt;, &lt;a href=&quot;https://github.com/ArsenArsen/KShare/issues&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;Issue tracker&lt;/span&gt;&lt;/a&gt;, &lt;a href=&quot;http://kshare.arsenarsen.com&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;Website&lt;/span&gt;&lt;/a&gt;, &lt;a href=&quot;https://patreon.com/arsen&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;Patreon&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QTextBrowser" name="textBrowser">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This software uses and possibly bundles Qt, OpenSSL, FFMpeg, and QHotkey, whose licenses are respectively:&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;------------------------------ &lt;/span&gt;&lt;a href=&quot;http://code.qt.io/cgit/qt/qt5.git/tree/LICENSE.LGPLv3&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; text-decoration: underline; color:#007af4;&quot;&gt;Qt&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;GNU LESSER GENERAL PUBLIC LICENSE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;Contact: &lt;/span&gt;&lt;a href=&quot;http://www.qt.io/licensing/&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; text-decoration: underline; color:#007af4;&quot;&gt;http://www.qt.io/licensing/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;You may use, distribute and copy the Qt Toolkit under the terms of&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;GNU Lesser General Public License version 3, which is displayed below.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;This license makes reference to the version 3 of the GNU General&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;Public License, which you can find in the &lt;/span&gt;&lt;a href=&quot;http://code.qt.io/cgit/qt/qt5.git/tree/LICENSE.LGPLv3&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; text-decoration: underline; color:#007af4;&quot;&gt;LICENSE.GPLv3&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt; file.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;------------------------------ &lt;/span&gt;&lt;a href=&quot;https://www.openssl.org/source/license.html&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;OpenSSL&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;LICENSE ISSUES&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;==============&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;The OpenSSL toolkit stays under a double license, i.e. both the conditions of&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;the OpenSSL License and the original SSLeay license apply to the toolkit.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;See below for the actual license texts.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;OpenSSL License&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;---------------&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;/* ====================================================================&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* Copyright (c) 1998-2017 The OpenSSL Project. All rights reserved.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* Redistribution and use in source and binary forms, with or without&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* modification, are permitted provided that the following conditions&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* are met:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* 1. Redistributions of source code must retain the above copyright&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* notice, this list of conditions and the following disclaimer. &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* 2. Redistributions in binary form must reproduce the above copyright&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* notice, this list of conditions and the following disclaimer in&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* the documentation and/or other materials provided with the&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* distribution.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* 3. All advertising materials mentioning features or use of this&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* software must display the following acknowledgment:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* &amp;quot;This product includes software developed by the OpenSSL Project&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* for use in the OpenSSL Toolkit. (http://www.openssl.org/)&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* 4. The names &amp;quot;OpenSSL Toolkit&amp;quot; and &amp;quot;OpenSSL Project&amp;quot; must not be used to&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* endorse or promote products derived from this software without&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* prior written permission. For written permission, please contact&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* openssl-core@openssl.org.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* 5. Products derived from this software may not be called &amp;quot;OpenSSL&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* nor may &amp;quot;OpenSSL&amp;quot; appear in their names without prior written&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* permission of the OpenSSL Project.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* 6. Redistributions of any form whatsoever must retain the following&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* acknowledgment:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* &amp;quot;This product includes software developed by the OpenSSL Project&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* for use in the OpenSSL Toolkit (http://www.openssl.org/)&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* OF THE POSSIBILITY OF SUCH DAMAGE.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* ====================================================================&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* This product includes cryptographic software written by Eric Young&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* (eay@cryptsoft.com). This product includes software written by Tim&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* Hudson (tjh@cryptsoft.com).&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;*/&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;Original SSLeay License&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;-----------------------&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* All rights reserved.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* This package is an SSL implementation written&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* by Eric Young (eay@cryptsoft.com).&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* The implementation was written so as to conform with Netscapes SSL.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* This library is free for commercial and non-commercial use as long as&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* the following conditions are aheared to. The following conditions&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* apply to all code found in this distribution, be it the RC4, RSA,&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* lhash, DES, etc., code; not just the SSL code. The SSL documentation&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* included with this distribution is covered by the same copyright terms&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* except that the holder is Tim Hudson (tjh@cryptsoft.com).&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* Copyright remains Eric Young's, and as such any Copyright notices in&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* the code are not to be removed.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* If this package is used in a product, Eric Young should be given attribution&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* as the author of the parts of the library used.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* This can be in the form of a textual message at program startup or&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* in documentation (online or textual) provided with the package.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* Redistribution and use in source and binary forms, with or without&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* modification, are permitted provided that the following conditions&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* are met:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* 1. Redistributions of source code must retain the copyright&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* notice, this list of conditions and the following disclaimer.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* 2. Redistributions in binary form must reproduce the above copyright&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* notice, this list of conditions and the following disclaimer in the&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* documentation and/or other materials provided with the distribution.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* 3. All advertising materials mentioning features or use of this software&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* must display the following acknowledgement:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* &amp;quot;This product includes cryptographic software written by&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* Eric Young (eay@cryptsoft.com)&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* The word 'cryptographic' can be left out if the rouines from the library&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* being used are not cryptographic related :-).&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* 4. If you include any Windows specific code (or a derivative thereof) from &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* the apps directory (application code) you must include an acknowledgement:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* &amp;quot;This product includes software written by Tim Hudson (tjh@cryptsoft.com)&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* SUCH DAMAGE.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* The licence and distribution terms for any publically available version or&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* derivative of this code cannot be changed. i.e. this code cannot simply be&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* copied and put under another distribution licence&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* [including the GNU Public Licence.]&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;*/&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;------------------------------ &lt;/span&gt;&lt;a href=&quot;https://github.com/FFmpeg/FFmpeg/blob/master/LICENSE.md&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;FFMpeg&lt;/span&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:xx-large; font-weight:600;&quot;&gt;License&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Most files in FFmpeg are under the GNU Lesser General Public License version 2.1 or later (LGPL v2.1+). Read the file &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;COPYING.LGPLv2.1&lt;/span&gt; for details. Some other files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to FFmpeg.&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Some optional parts of FFmpeg are licensed under the GNU General Public License version 2 or later (GPL v2+). See the file &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;COPYING.GPLv2&lt;/span&gt; for details. None of these parts are used by default, you have to explicitly pass &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;--enable-gpl&lt;/span&gt; to configure to activate them. In this case, FFmpeg's license changes to GPL v2+.&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Specifically, the GPL parts of FFmpeg are:&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;libpostproc&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;optional x86 optimization in the files &lt;/li&gt;
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 2;&quot;&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;libavcodec/x86/flac_dsp_gpl.asm&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;libavcodec/x86/idct_mmx.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;libavfilter/x86/vf_removegrain.asm&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;the following building and testing tools &lt;/li&gt;
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 2;&quot;&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;compat/solaris/make_sunver.pl&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;doc/t2h.pm&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;doc/texi2pod.pl&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;libswresample/swresample-test.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;tests/checkasm/*&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;tests/tiny_ssim.c&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;the following filters in libavfilter: &lt;/li&gt;&lt;/ul&gt;
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 2;&quot;&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_blackframe.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_boxblur.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_colormatrix.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_cover_rect.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_cropdetect.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_delogo.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_eq.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_find_rect.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_fspp.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_geq.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_histeq.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_hqdn3d.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_interlace.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_kerndeint.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_mcdeint.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_mpdecimate.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_owdenoise.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_perspective.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_phase.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_pp.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_pp7.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_pullup.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_repeatfields.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_sab.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_smartblur.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_spp.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_stereo3d.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_super2xsai.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_tinterlace.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_uspp.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vsrc_mptestsrc.c&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then the configure parameter &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;--enable-version3&lt;/span&gt; will activate this licensing option for you. Read the file &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;COPYING.LGPLv3&lt;/span&gt; or, if you have enabled GPL parts, &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;COPYING.GPLv3&lt;/span&gt; to learn the exact legal terms that apply in this case.&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;There are a handful of files under other licensing terms, namely:&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The files &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;libavcodec/jfdctfst.c&lt;/span&gt;, &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;libavcodec/jfdctint_template.c&lt;/span&gt; and &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;libavcodec/jrevdct.c&lt;/span&gt; are taken from libjpeg, see the top of the files for licensing details. Specifically note that you must credit the IJG in the documentation accompanying your program if you only distribute executables. You must also indicate any changes including additions and deletions to those three files in the documentation.&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;tests/reference.pnm&lt;/span&gt; is under the expat license.&lt;/li&gt;&lt;/ul&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a name=&quot;user-content-external-libraries&quot;&gt;&lt;/a&gt;&lt;span style=&quot; font-size:x-large; font-weight:600;&quot;&gt;E&lt;/span&gt;&lt;span style=&quot; font-size:x-large; font-weight:600;&quot;&gt;xternal libraries&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;FFmpeg can be combined with a number of external libraries, which sometimes affect the licensing of binaries resulting from the combination.&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a name=&quot;user-content-compatible-libraries&quot;&gt;&lt;/a&gt;&lt;span style=&quot; font-size:large; font-weight:600;&quot;&gt;C&lt;/span&gt;&lt;span style=&quot; font-size:large; font-weight:600;&quot;&gt;ompatible libraries&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The following libraries are under GPL:&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;frei0r&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;libcdio&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;librubberband&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;libvidstab&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;libx264&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;libx265&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;libxavs&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;libxvid&lt;/li&gt;&lt;/ul&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;When combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by passing &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;--enable-gpl&lt;/span&gt; to configure.&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The OpenCORE and VisualOn libraries are under the Apache License 2.0. That license is incompatible with the LGPL v2.1 and the GPL v2, but not with version 3 of those licenses. So to combine these libraries with FFmpeg, the license version needs to be upgraded by passing &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;--enable-version3&lt;/span&gt; to configure.&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a name=&quot;user-content-incompatible-libraries&quot;&gt;&lt;/a&gt;&lt;span style=&quot; font-size:large; font-weight:600;&quot;&gt;I&lt;/span&gt;&lt;span style=&quot; font-size:large; font-weight:600;&quot;&gt;ncompatible libraries&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;There are certain libraries you can combine with FFmpeg whose licenses are not compatible with the GPL and/or the LGPL. If you wish to enable these libraries, even in circumstances that their license may be incompatible, pass &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;--enable-nonfree&lt;/span&gt; to configure. But note that if you enable any of these libraries the resulting binary will be under a complex license mix that is more restrictive than the LGPL and that may result in additional obligations. It is possible that these restrictions cause the resulting binary to be unredistributable.&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The Fraunhofer FDK AAC and OpenSSL libraries are under licenses which are incompatible with the GPLv2 and v3. To the best of our knowledge, they are compatible with the LGPL.&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The NVENC library, while its header file is licensed under the compatible MIT license, requires a proprietary binary blob at run time, and is deemed to be incompatible with the GPL. We are not certain if it is compatible with the LGPL, but we require &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;--enable-nonfree&lt;/span&gt; even with LGPL configurations in case it is not.&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;------------------------------ &lt;/span&gt;&lt;a href=&quot;https://github.com/Skycoder42/QHotkey/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;QHotkey&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;Copyright (c) 2016, Felix Barz&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;All rights reserved.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;Redistribution and use in source and binary forms, with or without&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;modification, are permitted provided that the following conditions are met:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* Redistributions of source code must retain the above copyright notice, this&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt; list of conditions and the following disclaimer.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* Redistributions in binary form must reproduce the above copyright notice,&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt; this list of conditions and the following disclaimer in the documentation&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt; and/or other materials provided with the distribution.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;* Neither the name of QHotkey nor the names of its&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt; contributors may be used to endorse or promote products derived from&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt; this software without specific prior written permission.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &amp;quot;AS IS&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>AboutBox</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>AboutBox</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -1,75 +0,0 @@
#include "colorpickerscene.hpp"
#include <QApplication>
#include <QClipboard>
#include <QGraphicsEllipseItem>
#include <QGraphicsPixmapItem>
#include <QGraphicsTextItem>
#include <QTimer>
ColorPickerScene::ColorPickerScene(QPixmap pixmap, QWidget *parentWidget)
: QGraphicsScene(), QGraphicsView(this, parentWidget) {
setFrameShape(QFrame::NoFrame); // Time taken to solve: A george99g and 38 minutes.
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setWindowFlags(windowFlags() | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform | QPainter::HighQualityAntialiasing);
setCursor(QCursor(Qt::CrossCursor));
setMouseTracking(true);
setWindowTitle("KShare Color Picker");
setGeometry(pixmap.rect());
setAttribute(Qt::WA_DeleteOnClose);
pItem = addPixmap(pixmap);
pItem->setZValue(-2);
ellipse = addEllipse(QRectF(QCursor::pos(), QSize(20, 20)), QPen(Qt::cyan), Qt::NoBrush);
QFont font("Monospace");
font.setStyleHint(QFont::Monospace);
text = addText("#hiyouu", font);
textBackground = addRect(text->boundingRect(), Qt::NoPen, QBrush(Qt::black));
text->setPos(QCursor::pos() + QPoint(25, 0));
textBackground->setPos(text->pos());
textBackground->setZValue(-1);
color = pItem->pixmap().toImage().pixelColor(QCursor::pos());
text->setPlainText(color.name());
ellipse->setBrush(color);
image = pixmap.toImage();
show();
}
void ColorPickerScene::mouseMoveEvent(QGraphicsSceneMouseEvent *event) {
color = image.pixelColor(event->scenePos().toPoint());
text->setPlainText(color.name());
ellipse->setBrush(color);
qreal bottom = rect().bottom(); // max y
qreal right = rect().right(); // max x
qreal width = text->boundingRect().width();
qreal height = text->boundingRect().height();
QPointF origPoint = event->scenePos() + QPoint(25, 0);
QPointF scopePoint = event->scenePos();
QPointF resPoint = origPoint;
if (origPoint.x() + width > right) {
scopePoint -= QPoint(20, 0);
resPoint -= QPoint(50 + width, 0);
}
if (origPoint.y() + height > bottom) {
scopePoint -= QPoint(0, 20);
resPoint -= QPoint(0, height);
}
ellipse->setRect(QRectF(scopePoint, QSize(20, 20)));
text->setPos(resPoint);
textBackground->setPos(text->pos());
}
void ColorPickerScene::keyPressEvent(QKeyEvent *event) {
if (event->key() == Qt::Key_Return) QApplication::clipboard()->setText(color.name());
if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Escape) close();
}
void ColorPickerScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *) {
QApplication::clipboard()->setText(color.name());
close();
}

View File

@ -1,325 +0,0 @@
#include "cropscene.hpp"
#include <QColorDialog>
#include <QDebug>
#include <QFontDialog>
#include <QGraphicsPolygonItem>
#include <QGraphicsSceneContextMenuEvent>
#include <QGraphicsView>
#include <QMenu>
#include <QTimer>
#include <cropeditor/drawing/arrowitem.hpp>
#include <cropeditor/drawing/bluritem.hpp>
#include <cropeditor/drawing/dotitem.hpp>
#include <cropeditor/drawing/ellipseitem.hpp>
#include <cropeditor/drawing/eraseritem.hpp>
#include <cropeditor/drawing/lineitem.hpp>
#include <cropeditor/drawing/pathitem.hpp>
#include <cropeditor/drawing/rectitem.hpp>
#include <cropeditor/drawing/textitem.hpp>
#include <cropeditor/settings/brushpenselection.hpp>
#include <functional>
#include <settings.hpp>
CropScene::CropScene(QObject *parent, QPixmap pixmap)
: QGraphicsScene(parent), drawingSelectionMaker([] { return nullptr; }), prevButtons(Qt::NoButton),
_brush(Qt::SolidPattern), _font(settings::settings().value("font", QFont()).value<QFont>()) {
_pixmap = pixmap;
pen().setColor(settings::settings().value("penColor", pen().color()).value<QColor>());
pen().setCosmetic(settings::settings().value("penCosmetic", pen().isCosmetic()).toBool());
pen().setWidthF(settings::settings().value("penWidth", pen().widthF()).toFloat());
brush().setColor(settings::settings().value("brushColor", brush().color()).value<QColor>());
brush().setStyle((Qt::BrushStyle)settings::settings().value("brushStyle", (int)Qt::SolidPattern).toInt());
addDrawingAction(menu, "Dot", [] { return new DotItem; });
addDrawingAction(menu, "Path", [] { return new PathItem; });
addDrawingAction(menu, "Blur", [] { return new BlurItem; });
addDrawingAction(menu, "Straight line", [] { return new LineItem; });
addDrawingAction(menu, "Text", [] { return new TextItem; });
addDrawingAction(menu, "Rectangle", [] { return new RectItem; });
addDrawingAction(menu, "Ellipse", [] { return new EllipseItem; });
addDrawingAction(menu, "Arrow", [] { return new ArrowItem; });
menu.addSeparator();
addDrawingAction(menu, "Eraser", [] { return new EraserItem; });
QAction *clear = menu.addAction("Clear all drawing");
connect(clear, &QAction::triggered, [&] {
auto its = items();
for (auto i : its) {
if (i != rect && i != polyItem && i->zValue() != -1) removeItem(i);
}
});
QAction *reset = menu.addAction("Reset pen selection");
connect(reset, &QAction::triggered, [&] { setDrawingSelection("None", [] { return nullptr; }); });
menu.addSeparator();
QAction *settings = new QAction;
settings->setText("Settings");
menu.addSeparator();
display = menu.addAction(drawingName);
display->setDisabled(true);
connect(settings, &QAction::triggered, [&] {
hide();
BrushPenSelection(this).exec();
show();
});
menu.addAction(settings);
magnifier = addPixmap(pixmap.copy(0, 0, 11, 11).scaled(110, 110));
magnifierBox = addRect(magnifier->boundingRect(), QPen(Qt::cyan));
magnifier->setZValue(1);
magnifierBox->setZValue(1.1);
magnifierBox->setParentItem(magnifier);
magnifierHint = addText("ptr: (0, 0)\nsel: (0, 0, 0, 0)");
magnifierHint->setParentItem(magnifier);
magnifierHint->setY(magnifier->boundingRect().height());
QColor c(Qt::cyan);
c.setAlphaF(.25);
magnifierHintBox = addRect(magnifierHint->boundingRect(), Qt::NoPen, c);
magnifierHintBox->setParentItem(magnifierHint);
magnifierHintBox->setZValue(1);
magnifierHint->setZValue(1.1);
initMagnifierGrid();
updateMag(QPointF(0, 0));
connect(menu.addAction("Set Font"), &QAction::triggered, this, &CropScene::fontAsk);
QTimer::singleShot(0, [&] {
QPolygonF poly;
poly.append(sceneRect().topLeft());
poly.append(sceneRect().topRight());
poly.append(sceneRect().bottomRight());
poly.append(sceneRect().bottomLeft());
polyItem = new QGraphicsPolygonItem(poly);
polyItem->setBrush(QBrush(QColor(0, 0, 0, 191)));
polyItem->setPen(QPen(Qt::NoPen));
addItem(polyItem);
});
}
CropScene::~CropScene() {
delete drawingSelection;
}
QPen &CropScene::pen() {
return _pen;
}
QBrush &CropScene::brush() {
return _brush;
}
QFont &CropScene::font() {
return _font;
}
void CropScene::setDrawingSelection(QString name, std::function<DrawItem *()> drawAction) {
this->setFocus();
drawingSelectionMaker = drawAction;
drawingSelection = drawAction();
drawingName = name;
if (drawingSelection)
if (!drawingSelection->init(this)) setDrawingSelection("None", [] { return nullptr; });
}
void CropScene::hide() {
setVisible(false);
}
void CropScene::show() {
setVisible(true);
}
void CropScene::setVisible(bool visible) {
for (auto view : views()) {
if (view->isVisible()) fullscreen |= view->isFullScreen();
view->setVisible(visible);
if (visible && fullscreen) view->showFullScreen();
}
}
void CropScene::fontAsk() {
hide();
bool ok = false;
QFont font = QFontDialog::getFont(&ok, this->font(), nullptr, "Font to use");
if (ok) _font = font;
show();
}
void CropScene::mouseMoveEvent(QGraphicsSceneMouseEvent *e) {
updateMag(e->scenePos());
auto buttons = e->buttons();
if (e->modifiers() & Qt::ControlModifier && buttons == Qt::LeftButton) {
QTransform stupidThing = views()[0]->transform();
auto item = itemAt(e->scenePos(), stupidThing);
if (item && item != polyItem && item != rect && item->zValue() != -1) {
QPointF delta = e->scenePos() - e->lastScenePos();
item->moveBy(delta.x(), delta.y());
}
return;
}
if (buttons == Qt::LeftButton || (prevButtons == Qt::NoButton && prevButtons != buttons)) {
if (drawingSelection) {
drawingSelection->mouseDragEvent(e, this);
} else {
QPointF p = e->scenePos();
if (rect == nullptr) {
rect = new QGraphicsRectItem(p.x(), p.y(), 1, 1);
initPos = p;
QPen pen(Qt::NoBrush, 1);
pen.setColor(Qt::cyan);
rect->setPen(pen);
rect->setZValue(-0.1);
addItem(rect);
} else {
if (prevButtons == Qt::NoButton) {
initPos = p;
rect->setRect(p.x(), p.y(), 1, 1);
} else {
rect->setRect(QRect(qMin(initPos.x(), p.x()), qMin(initPos.y(), p.y()), qAbs(initPos.x() - p.x()),
qAbs(initPos.y() - p.y())));
}
}
QPolygonF poly;
QPointF theMagicWikipediaPoint(rect->rect().right(), sceneRect().bottom());
poly << sceneRect().topLeft();
poly << sceneRect().topRight();
poly << sceneRect().bottomRight();
poly << theMagicWikipediaPoint;
poly << rect->rect().bottomRight();
poly << rect->rect().topRight();
poly << rect->rect().topLeft();
poly << rect->rect().bottomLeft();
poly << rect->rect().bottomRight();
poly << theMagicWikipediaPoint;
poly << sceneRect().bottomLeft();
poly << sceneRect().topLeft();
this->polyItem->setPolygon(poly);
e->accept();
}
}
prevButtons = buttons;
}
void CropScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *e) {
if (drawingSelection) {
drawingSelection->mouseDragEndEvent(e, this);
delete drawingSelection;
drawingSelection = drawingSelectionMaker();
if (drawingSelection)
if (!drawingSelection->init(this)) setDrawingSelection("None", [] { return nullptr; });
} else if (settings::settings().value("quickMode", false).toBool())
done(true);
prevButtons = Qt::NoButton;
}
void CropScene::mousePressEvent(QGraphicsSceneMouseEvent *e) {
if (e->modifiers() & Qt::AltModifier) {
QTransform stupidThing = views()[0]->transform();
auto item = itemAt(e->scenePos(), stupidThing);
if (item && item != polyItem && item != rect && item->zValue() != -1) {
removeItem(item);
}
}
}
void CropScene::wheelEvent(QGraphicsSceneWheelEvent *event) {
int pixCnt = settings::settings().value("magnifierPixelCount", 11).toInt();
if (pixCnt % 2 == 0) pixCnt++;
if (pixCnt > 20) return;
if (event->delta() > 0 && pixCnt < 19)
settings::settings().setValue("magnifierPixelCount", pixCnt += 2);
else if (pixCnt > 1)
settings::settings().setValue("magnifierPixelCount", pixCnt -= 2);
for (auto item : gridRectsX) delete item;
gridRectsX.clear();
for (auto item : gridRectsY) delete item;
gridRectsY.clear();
initMagnifierGrid();
updateMag(event->scenePos());
}
void CropScene::addDrawingAction(QMenu &menu, QString name, std::function<DrawItem *()> item) {
QAction *action = new QAction;
action->setText(name);
connect(action, &QAction::triggered, [this, item, name](bool) { setDrawingSelection(name, item); });
menu.addAction(action);
}
void CropScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *e) {
display->setText(drawingName);
menu.exec(e->screenPos());
e->accept();
}
void CropScene::keyReleaseEvent(QKeyEvent *event) {
if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter || event->key() == Qt::Key_Escape)
done(event->key() != Qt::Key_Escape);
}
void CropScene::updateMag(QPointF scenePos) {
QString rectStr("(0, 0, 0, 0)");
if (rect) {
rectStr = "(%0, %1, %2, %3)";
rectStr = rectStr.arg(rect->rect().x()).arg(rect->rect().y()).arg(rect->rect().width()).arg(rect->rect().height());
}
magnifierHint->setPlainText(QString("ptr: (%0, %1)\nsel: %2").arg(scenePos.x()).arg(scenePos.y()).arg(rectStr));
magnifierHintBox->setRect(magnifierHint->boundingRect());
int pixCnt = settings::settings().value("magnifierPixelCount", 11).toInt();
if (pixCnt % 2 == 0) pixCnt++;
QPointF magnifierTopLeft = scenePos - QPointF(pixCnt / 2., pixCnt / 2.);
QPointF magnifierPos = scenePos + QPointF(5, 5);
magnifier->setPos(magnifierPos);
magnifier->setPixmap(_pixmap.copy(magnifierTopLeft.x(), magnifierTopLeft.y(), pixCnt, pixCnt).scaled(110, 110));
QPointF bottomRight = magnifierHintBox->sceneBoundingRect().bottomRight();
if (magnifier->sceneBoundingRect().bottom() > bottomRight.y())
bottomRight.setY(magnifier->sceneBoundingRect().bottom());
if (magnifier->sceneBoundingRect().right() > bottomRight.x())
bottomRight.setX(magnifier->sceneBoundingRect().right());
if (bottomRight.x() > sceneRect().right())
magnifierPos -= QPointF(qMax(130., magnifierHintBox->boundingRect().width()), 0);
if (bottomRight.y() > sceneRect().bottom())
magnifierPos -= QPointF(0, 130 + magnifierHintBox->boundingRect().height());
magnifier->setPos(magnifierPos);
}
void CropScene::initMagnifierGrid() {
QColor c(Qt::cyan);
c.setAlphaF(.25);
int pixCnt = settings::settings().value("magnifierPixelCount", 11).toInt();
if (pixCnt % 2 == 0) pixCnt++;
for (int i = 0; i < pixCnt; i++) {
auto gridRectX = addRect(0, i * 110. / pixCnt, 110, 110. / pixCnt, QPen(Qt::black, 0.5));
auto gridRectY = addRect(i * 110. / pixCnt, 0, 110. / pixCnt, 110, QPen(Qt::black, 0.5));
gridRectX->setParentItem(magnifierBox);
gridRectY->setParentItem(magnifierBox);
gridRectX->setZValue(1);
gridRectY->setZValue(1);
gridRectsX.append(gridRectX);
gridRectsY.append(gridRectY);
if (i == (pixCnt / 2)) {
gridRectX->setBrush(c);
gridRectY->setBrush(c);
}
}
}
void CropScene::done(bool notEsc) {
if (notEsc && rect) {
rect->setPen(QPen(Qt::NoPen));
magnifier->setVisible(false);
magnifierBox->setVisible(false);
magnifierHint->setVisible(false);
magnifierHintBox->setVisible(false);
emit closedWithRect(rect->rect().toRect());
} else
emit closedWithRect(QRect());
}

View File

@ -1,80 +0,0 @@
#ifndef CROPSCENE_HPP
#define CROPSCENE_HPP
#include <QFont>
#include <QGraphicsRectItem>
#include <QGraphicsScene>
#include <QGraphicsSceneContextMenuEvent>
#include <QGraphicsSceneMouseEvent>
#include <QKeyEvent>
#include <QMenu>
#include <functional>
class CropScene;
#include <cropeditor/drawing/drawitem.hpp>
class CropScene : public QGraphicsScene {
Q_OBJECT
public:
CropScene(QObject *parent, QPixmap pixmap);
~CropScene();
QPen &pen();
QBrush &brush();
QFont &font();
void setDrawingSelection(QString name, std::function<DrawItem *()> drawAction);
QPixmap pixmap() {
return _pixmap;
}
QGraphicsPolygonItem *polyItm() {
return polyItem;
}
QGraphicsRectItem *selRect() {
return rect;
}
void hide();
void show();
void setVisible(bool visible);
public slots:
void fontAsk();
signals:
void closedWithRect(QRect rect);
protected:
void mouseMoveEvent(QGraphicsSceneMouseEvent *e) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent *e) override;
void mousePressEvent(QGraphicsSceneMouseEvent *e) override;
void wheelEvent(QGraphicsSceneWheelEvent *event) override; // WHEEEEEEL
void contextMenuEvent(QGraphicsSceneContextMenuEvent *e) override;
void keyReleaseEvent(QKeyEvent *e) override;
private:
void updateMag(QPointF scenePos);
void initMagnifierGrid();
void addDrawingAction(QMenu &menu, QString name, std::function<DrawItem *()> item);
void done(bool notEsc);
bool fullscreen;
std::function<DrawItem *()> drawingSelectionMaker;
QFlags<Qt::MouseButton> prevButtons;
QPixmap _pixmap;
QGraphicsRectItem *rect = nullptr;
QGraphicsPixmapItem *magnifier = nullptr;
QGraphicsRectItem *magnifierBox = nullptr;
QGraphicsTextItem *magnifierHint = nullptr;
QGraphicsRectItem *magnifierHintBox = nullptr;
QPointF initPos;
QPen _pen;
QBrush _brush;
QFont _font;
QGraphicsPolygonItem *polyItem = nullptr;
DrawItem *drawingSelection = nullptr;
QMenu menu;
QString drawingName = "None";
QAction *display;
QList<QGraphicsRectItem *> gridRectsX;
QList<QGraphicsRectItem *> gridRectsY;
};
#endif // CROPSCENE_HPP

View File

@ -1,12 +0,0 @@
#ifndef CROPVIEW_HPP
#define CROPVIEW_HPP
#include <QGraphicsView>
#include <QKeyEvent>
class CropView : public QGraphicsView {
public:
CropView(QGraphicsScene *scene);
};
#endif // CROPVIEW_HPP

View File

@ -1,14 +0,0 @@
#include "dotitem.hpp"
DotItem::DotItem() {
}
DotItem::~DotItem() {
}
void DotItem::mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) {
scene->addEllipse(e->pos().x() - 1.5, e->pos().y() - 1.5, 3, 3, scene->pen(), scene->brush())->setPos(e->scenePos());
}
void DotItem::mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) {
}

View File

@ -1,18 +0,0 @@
#ifndef DOTITEM_HPP
#define DOTITEM_HPP
#include "../cropscene.hpp"
#include "drawitem.hpp"
class DotItem : public DrawItem {
public:
DotItem();
~DotItem();
QString name() {
return "Dots (drag to add)";
}
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene);
void mouseDragEndEvent(QGraphicsSceneMouseEvent *e, CropScene *scene);
};
#endif // DOTITEM_HPP

View File

@ -1,12 +0,0 @@
#include "ellipseitem.hpp"
void EllipseItem::mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) {
if (!ellie) {
ellie = scene->addEllipse(e->scenePos().x(), e->scenePos().y(), 0, 0, scene->pen(), scene->brush());
initPos = e->scenePos();
} else {
auto p = e->scenePos();
ellie->setRect(QRectF(qMin(initPos.x(), p.x()), qMin(initPos.y(), p.y()), qAbs(initPos.x() - p.x()),
qAbs(initPos.y() - p.y())));
}
}

View File

@ -1,16 +0,0 @@
#include "eraseritem.hpp"
EraserItem::EraserItem() {
}
EraserItem::~EraserItem() {
}
void EraserItem::mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) {
for (auto i : scene->items()) {
if (i->contains(e->scenePos()) && i->zValue() != -1 && i != scene->polyItm() && i != scene->selRect()) {
scene->removeItem(i);
break;
}
}
}

3
docs/Gemfile Normal file
View File

@ -0,0 +1,3 @@
source 'https://rubygems.org'
gem "github-pages", group: :jekyll_plugins

216
docs/Gemfile.lock Normal file
View File

@ -0,0 +1,216 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.8)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
colorator (1.1.0)
ethon (0.10.1)
ffi (>= 1.3.0)
execjs (2.7.0)
faraday (0.13.0)
multipart-post (>= 1.2, < 3)
ffi (1.9.18)
forwardable-extended (2.6.0)
gemoji (3.0.0)
github-pages (155)
activesupport (= 4.2.8)
github-pages-health-check (= 1.3.5)
jekyll (= 3.5.2)
jekyll-avatar (= 0.4.2)
jekyll-coffeescript (= 1.0.1)
jekyll-default-layout (= 0.1.4)
jekyll-feed (= 0.9.2)
jekyll-gist (= 1.4.1)
jekyll-github-metadata (= 2.8.0)
jekyll-mentions (= 1.2.0)
jekyll-optional-front-matter (= 0.2.0)
jekyll-paginate (= 1.1.0)
jekyll-readme-index (= 0.1.0)
jekyll-redirect-from (= 0.12.1)
jekyll-relative-links (= 0.4.1)
jekyll-sass-converter (= 1.5.0)
jekyll-seo-tag (= 2.2.3)
jekyll-sitemap (= 1.0.0)
jekyll-swiss (= 0.4.0)
jekyll-theme-architect (= 0.1.0)
jekyll-theme-cayman (= 0.1.0)
jekyll-theme-dinky (= 0.1.0)
jekyll-theme-hacker (= 0.1.0)
jekyll-theme-leap-day (= 0.1.0)
jekyll-theme-merlot (= 0.1.0)
jekyll-theme-midnight (= 0.1.0)
jekyll-theme-minimal (= 0.1.0)
jekyll-theme-modernist (= 0.1.0)
jekyll-theme-primer (= 0.5.0)
jekyll-theme-slate (= 0.1.0)
jekyll-theme-tactile (= 0.1.0)
jekyll-theme-time-machine (= 0.1.0)
jekyll-titles-from-headings (= 0.4.0)
jemoji (= 0.8.0)
kramdown (= 1.13.2)
liquid (= 4.0.0)
listen (= 3.0.6)
mercenary (~> 0.3)
minima (= 2.1.1)
rouge (= 1.11.1)
terminal-table (~> 1.4)
github-pages-health-check (1.3.5)
addressable (~> 2.3)
net-dns (~> 0.8)
octokit (~> 4.0)
public_suffix (~> 2.0)
typhoeus (~> 0.7)
html-pipeline (2.7.0)
activesupport (>= 2)
nokogiri (>= 1.4)
i18n (0.8.6)
jekyll (3.5.2)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-avatar (0.4.2)
jekyll (~> 3.0)
jekyll-coffeescript (1.0.1)
coffee-script (~> 2.2)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.9.2)
jekyll (~> 3.3)
jekyll-gist (1.4.1)
octokit (~> 4.2)
jekyll-github-metadata (2.8.0)
jekyll (~> 3.1)
octokit (~> 4.0, != 4.4.0)
jekyll-mentions (1.2.0)
activesupport (~> 4.0)
html-pipeline (~> 2.3)
jekyll (~> 3.0)
jekyll-optional-front-matter (0.2.0)
jekyll (~> 3.0)
jekyll-paginate (1.1.0)
jekyll-readme-index (0.1.0)
jekyll (~> 3.0)
jekyll-redirect-from (0.12.1)
jekyll (~> 3.3)
jekyll-relative-links (0.4.1)
jekyll (~> 3.3)
jekyll-sass-converter (1.5.0)
sass (~> 3.4)
jekyll-seo-tag (2.2.3)
jekyll (~> 3.3)
jekyll-sitemap (1.0.0)
jekyll (~> 3.3)
jekyll-swiss (0.4.0)
jekyll-theme-architect (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-cayman (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-dinky (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-hacker (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-leap-day (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-merlot (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-midnight (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-minimal (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-modernist (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-primer (0.5.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.2)
jekyll-theme-slate (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-tactile (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-time-machine (0.1.0)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-titles-from-headings (0.4.0)
jekyll (~> 3.3)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
jemoji (0.8.0)
activesupport (~> 4.0)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0)
kramdown (1.13.2)
liquid (4.0.0)
listen (3.0.6)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9.7)
mercenary (0.3.6)
mini_portile2 (2.2.0)
minima (2.1.1)
jekyll (~> 3.3)
minitest (5.10.3)
multipart-post (2.0.0)
net-dns (0.8.0)
nokogiri (1.8.0)
mini_portile2 (~> 2.2.0)
octokit (4.7.0)
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.14.0)
forwardable-extended (~> 2.6)
public_suffix (2.0.5)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (1.11.1)
safe_yaml (1.0.4)
sass (3.5.1)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.3)
thread_safe (~> 0.1)
unicode-display_width (1.3.0)
PLATFORMS
ruby
DEPENDENCIES
github-pages
BUNDLED WITH
1.15.3

View File

@ -1 +1,2 @@
theme: jekyll-theme-minimal
categories: [wiki]

66
docs/_layouts/layout.html Normal file
View File

@ -0,0 +1,66 @@
<!doctype html>
<html lang="{{ site.lang | default: "en-US" }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
{% seo %}
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
<meta name="viewport" content="width=device-width">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="wrapper">
<header>
<h1>{{ site.title | default: site.github.repository_name }}</h1>
<p>{{ site.description | default: site.github.project_tagline }}</p>
<p><a href="/wiki">Click here to visit the wiki</a></p>
{% if site.github.is_project_page %}
<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub <small>{{ github_name }}</small></a></p>
{% endif %}
{% if site.github.is_user_page %}
<p class="view"><a href="{{ site.github.owner_url }}">View My GitHub Profile</a></p>
{% endif %}
{% if site.show_downloads %}
<ul>
<li><a href="{{ site.github.zip_url }}">Download <strong>ZIP File</strong></a></li>
<li><a href="{{ site.github.tar_url }}">Download <strong>TAR Ball</strong></a></li>
<li><a href="{{ site.github.repository_url }}">View On <strong>GitHub</strong></a></li>
</ul>
{% endif %}
</header>
<section>
{{ content }}
</section>
<footer>
<p>Copyright (c) ArsenArsen 2017</p>
{% if site.github.is_project_page %}
<p>This project is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p>
{% endif %}
<p><small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<script src="{{ '/assets/js/scale.fix.js' | relative_url }}"></script>
{% if site.google_analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
</body>
</html>

View File

@ -0,0 +1,75 @@
<!doctype html>
<html lang="{{ site.lang | default: "en-US" }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
{% seo %}
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
<meta name="viewport" content="width=device-width">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="wrapper">
<header>
<h1>{{ site.title | default: site.github.repository_name }}</h1>
<p>{{ site.description | default: site.github.project_tagline }}</p>
<p><a href="/">Click here to go back to the homepage</a></p>
{% for page in site.pages %}
{% if page.categories contains 'wiki' %}
<a href="{{ page.url }}">{{ page.title }}</a><br />
{% endif %}
{% endfor %}
<br />
<br />
{% if site.github.is_project_page %}
<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub <small>{{ github_name }}</small></a></p>
{% endif %}
{% if site.github.is_user_page %}
<p class="view"><a href="{{ site.github.owner_url }}">View My GitHub Profile</a></p>
{% endif %}
{% if site.show_downloads %}
<ul>
<li><a href="{{ site.github.zip_url }}">Download <strong>ZIP File</strong></a></li>
<li><a href="{{ site.github.tar_url }}">Download <strong>TAR Ball</strong></a></li>
<li><a href="{{ site.github.repository_url }}">View On <strong>GitHub</strong></a></li>
</ul>
{% endif %}
</header>
<section>
{{ content }}
</section>
<footer>
<p>Copyright (c) ArsenArsen 2017</p>
{% if site.github.is_project_page %}
<p>This project is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p>
{% endif %}
<p><small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<script src="{{ '/assets/js/scale.fix.js' | relative_url }}"></script>
{% if site.google_analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
</body>
</html>

View File

@ -0,0 +1,13 @@
---
---
@import "{{ site.theme }}";
/* stupid css killed the cat */
header ul {
background: none;
border-radius: 0px;
border: 0px solid #e0e0e0;
}

View File

@ -1,6 +1,10 @@
---
layout: layout
---
# **KShare**
## The free open source and cross platform screen sharing software
###### Inspired by [ShareX](https://getsharex.com)
KShare is a screenshotting utility built using Qt and written in C++.
It has many features, including:
@ -14,31 +18,36 @@ It has many features, including:
* Automatic upload/clipboard copying,
* Hotkeys,
* Color picker, and last but not least,
* Custom upload destinations
* Custom upload destinations,
* Upload from clipboard,
* Upload History,
* Crossplatform,
* Windows 10 Darkmode
## Enough talking, show us how it looks
The main window is rather simple, with only a log, and a button in it:
![image1](http://i.imgur.com/QOebwEM.png)
The main window is rather simple, with only a log, and a button in it:
![image1](https://i.imgur.com/Tnrj90b.png)
The settings have quite a bit more going on:
![image2](http://i.imgur.com/kZzQzGr.png)
The settings have quite a bit more going on:
![image2](https://i.imgur.com/GFN2jCU.png)
The area selection editor is simple:
![image3](http://i.imgur.com/kyWZk3p.jpg)
The area selection editor is simple:
![image3](https://i.imgur.com/Cbi8YsL.png)
And the color picker is the simplest thing ever:
And the color picker is the simplest thing ever:
![image4](http://i.imgur.com/VIeGbdQ.jpg)
The way you select the area to record is by resizing this simple widget:
The way you select the area to record is by resizing this simple widget:
![image5](http://i.imgur.com/0iXFHnm.png)
And when you start recording there is a simple preview shown:
And when you start recording there is a simple preview shown:
![image6](http://i.imgur.com/6fu33TR.png)
## Download
Currently, the only good download I provide is for Arch Linux and Ubuntu 17.04
The Arch download is on the AUR as `kshare` and `kshare-git`,
and the Ubuntu build is a .deb found on my CI: [kshare.deb](https://nativeci.arsenarsen.com/job/KShare/73/artifact/packages/simpleName.deb)
The OS X and Debian/Ubuntu builds can be found here: [CI](https://nativeci.arsenarsen.com/job/KShare%20(master\))
There is a windows build on [AppVeyor]()
## Wait.. how do I actually use this?

42
docs/wiki/Basic-usage.md Normal file
View File

@ -0,0 +1,42 @@
---
title: Basic Usage
categories: [wiki]
layout: wikipage
---
# Basic usage
When you start the app (with no arguments, discussed later) a window is popped up, and a tray icon is made.
## The window
![](http://i.imgur.com/QOebwEM.png)
The main window is a log window with a settings button.
The menu bar has a `File` menu. It has two options, `Quit`, which exits ~~no need to press it :^)~~, and `About`, which contains licensing information:
![](http://i.imgur.com/4fVJb1w.png)
There is a second menu, namely `Screenshot`. It has two options, area, and fullscreen capture. See below.
The third, `Utility`, menu has the color picker in it.
The fourth and final menu, `Recording`, has a start and stop recording button.
## The tray
![](http://i.imgur.com/quVDzRN.png)
The tray consists of a small, but nice, icon made by @BriannaFoxwell. Upon right clicking it you get the context menu shown above. The menu is rather simple, containing basic controls, and screenshotting options.
These options will be explained below.
## Screenshotting options
### Area capture
Area capture takes a snapshot of the screen, and shows you a fullscreen editor for you to select a region in. This editor is explained in a section below.
### Fullscreen capture
Fullscreen capture takes a snapshot of the entire screen and skips the editor part. Straight to the destination (explained later as well).
### Active window capture
Takes the active window and uploads it straight to your destination of choice
## Crop Editor
Crop Editor is a window you can use to select the area of the screen to upload. It consists of a grey overlay and a re-sizable rectangle. The rectangle is resized by holding the mouse buttons. When you let go of the button, a new selection will start replacing the old one. On the first press the same thing happens.
Press `Escape` to cancel, and `Return`, or `Enter` to submit.
Oh. And you can draw with the bar that appears on the top.

45
docs/wiki/Destinations.md Normal file
View File

@ -0,0 +1,45 @@
---
title: Destinations
categories: [wiki]
layout: wikipage
---
# Destinations
Destinations determine where your image goes
There is a set of default uploaders, two, to be exact.
## Default uploaders:
### imgur
Uploads your image to imgur.
### clipboard
Copies your image to clipboard.
## Custom uploaders
Placed into `CONFIG PATH/KShare/uploaders`
Eg: `$HOME/.config/KShare/uploaders`
All uploaders have to be `.uploader` files!
Custom uploaders can be added, and are made with JSON, and follow this template:
```js
{
"name": "", // String, required
"desc": "", // String, optional
"method": "", // String, default: "POST", for now, just POST. Request more if you need them
"target": "", // URL, required
"format": "", // String, default: "json", can be `x-www-form-urlencoded` or `json` or `multipart-form-data`. Setting to `PLAIN` will make the body ignored and only the image sent.
"base64": false, // Optional, makes the data base64
"body": {}, // A JSON object, where one of the nodes can be a string in the format `/ANYTHING/`. In `ANYTHING`, `%contenttype` is replaced with the image type and `%imagedata` is replaced with the image encoded with `imageformat`. Unless you use multipart, see below
"return": "" // Return pathspec. `|` copies the entire body, `.path.to.node` copies the value of the node. The dot IS IMPORTANT. Without it, nothing happens. If one of the nodes is not a string, the string is copied, if one is an object, recursion continues, if one is null, nothing is copied, otherwise the node is JSON stringified. Only supports JSON for now.
}
```
Note that QJson does not support comments.
### Multipart
Multipart is obviously made out of multiple parts. The way you define a multipart body is:
```js
[
{
"__HeaderName": "HeaderValue", // No limit here. Must start with __, which is removed later.
"body": { /* same way you define it for anything json */ }, // Can be string. Strings matching `/.../` are processed same way as in a json field.
"name": "files[]" // Info to add to Content-Disposition (eg part name, filename, ...)
}
]
```
This would go in the `body` field of the above JSON.

View File

@ -0,0 +1,29 @@
---
title: Encoder Settings
categories: [wiki]
layout: wikipage
---
# Encoder settings
The encoders used can be customized to a high degree. Every encoder besides GIF has some settings.
![](http://i.imgur.com/O8nfeos.png)
## Image encoder settings
The only option here is quality, by default it uses the default for the format you use. You can change it by unticking format default. [More info](http://doc.qt.io/qt-5/qpixmap.html#save)
## Video encoder settings
The common settings are bitrate and GOP size.
GOP Size is the size of a group of pictures.
Bitrate is the target bitrate.
### h264/h265
The H.26[45] MP4 codec has a few presets to choose. The recommended is to choose the slowest one you can cope with.
I recommend medium.
CRF is the constant rate factor of this video stream, and again I recommend leaving the default value, `23`.
### VP9
VP9 is the WebP codec. Only option it has is lossless encoding, and you want it off, trust me.
### GIF
GIF has no options. It's terrible whatever you do to it.

23
docs/wiki/Hotkeys.md Normal file
View File

@ -0,0 +1,23 @@
---
title: Hotkeys
categories: [wiki]
layout: wikipage
---
# Hotkeys
Hotkeys are configured in the settings UI.
![](http://i.imgur.com/esYoMWo.png)
Currently available hotkeys are:
## Fullscreen image
This bind lets you take a fullscreen image and upload it instantly.
## Area image
Equivalent to `Take area shot` and `Screenshot -> Area`. Takes a snapshot and opens the crop editor.
## Active window
Equivalent to `Active window` and `Screenshot -> Active window`. Takes a snapshot of the active window and sends it.
## Color picker
Opens the color picker
## Recording start/stop
Starts and stops recording
## Editing hotkeys
All binds can be modified using by double clicking the hotkey name.
You can either type the hotkey in or press record and press the key combination you want on your keyboard

23
docs/wiki/Settings.md Normal file
View File

@ -0,0 +1,23 @@
---
title: Settings
categories: [wiki]
layout: wikipage
---
# Settings
## Destination
![](http://i.imgur.com/540REFK.png)
Select the active destination. Adding more is possible and explained it Custom Uploaders
**Default:** `imgur`
## Filename scheme
![](http://i.imgur.com/RHHEO3K.png)
Used to generate filenames. Extensions are placed in place of `%ext`. `%(DATE FORMAT)date` can be used to replace the date format with a format as specified by [this documentation page](http://doc.qt.io/qt-5/qdatetime.html#toString)
**Default:** `Screenshot %(yyyy-MM-dd HH-mm-ss)date.%ext`
## Delay before taking a screenshot
![](http://i.imgur.com/j0D7OqI.png)
Applies only to the buttons in menus. Hotkeys do not follow this rule. In seconds. Mostly used to let animations fade.
Min: `0.00`
Max: `99.99`
**Default:** `0.25`
## Hotkeys
**Explained on a separate page.**

34
docs/wiki/Tools.md Normal file
View File

@ -0,0 +1,34 @@
---
title: Tools
categories: [wiki]
layout: wikipage
---
# Drawing
![](http://i.imgur.com/5nWhpqw.png)
On-screen drawing is pretty simple. Right click in the crop editor to show a pen selection tool. When you click on a pen it will stay selected until you press `Reset`.
You can move drawings around by Ctrl+Dragging them
## Available pens:
### Free draw (pen icon)
Makes a path where your mouse went.
### Blur (badly made blurred rectangle icon)
Allows you to set a rectangle to blur out.
### Straight line
A line between where you start and end dragging
### Text
Asks you to insert some text.
**WARNING:** Avoid pressing esc
### Rectangle
Drag to draw a rectangle
### Ellipse
Drag to draw an ellipse
### Arrow
Draws an arrow from start to end of your drag
### Eraser[](https://www.youtube.com/watch?v=OjGrcJ4lZCc)
Removes all items you drag your mouse over
### Clear all drawings
Removes all drawings
### Reset
Allows you to choose a region to cut for the final result.

11
docs/wiki/index.md Normal file
View File

@ -0,0 +1,11 @@
---
title: Index
categories: [wiki]
layout: wikipage
---
# Welcome to the KShare wiki!
The cross platform screenshotting utility
# Usage
See the [`Basic usage`](/wiki/Basic-Usage.html) page

View File

@ -0,0 +1,15 @@
{
"name": "Gurkengewuerz Share",
"target": "https://share.example.com/index.php?token=XXXXXXXXXXXXXXXXX",
"format": "multipart-form-data",
"body": [
{
"__Content-Type": "/%contenttype/",
"filename": "/%filename/",
"name": "file",
"body": "/%imagedata/"
}
],
"return": "|"
}

View File

@ -0,0 +1,11 @@
{
"name": "PictShare",
"desc" : "Example",
"target": ".../backend.php",
"base64": true,
"format": "x-www-form-urlencoded",
"body": {
"base64": "/data:%contenttype;base64,%imagedata/"
},
"return": ".url"
}

15
examples/pomf.uploader Normal file
View File

@ -0,0 +1,15 @@
{
"name": "Uploader name",
"target": "POMF endpoint",
"format": "multipart-form-data",
"body": [
{
"__Content-Type": "/%contenttype/",
"filename": "/image.%format/",
"name": "files[]",
"body": "/%imagedata/"
}
],
"return": ".files.0.url",
"return_prepend": "Add only if the host does not fill out url"
}

View File

@ -1,17 +0,0 @@
#ifndef FORMATS_HPP
#define FORMATS_HPP
#include <QString>
namespace formats {
enum class Normal { PNG, JPG, None };
QString normalFormatName(Normal format);
Normal normalFormatFromName(QString format);
QString normalFormatMIME(Normal format);
enum class Recording { GIF, WebM, MP4, None };
QString recordingFormatName(Recording format);
Recording recordingFormatFromName(QString format);
QString recordingFormatMIME(Recording format);
}
#endif // FORMATS_HPP

View File

@ -1,17 +0,0 @@
#include "formatter.hpp"
#include <QDateTime>
#include <QStringList>
QString formatter::format(QString toFormat, QString ext) {
QRegExp dateRegex("%\\((.+)\\)date");
dateRegex.indexIn(toFormat);
QStringList capturedTexts(dateRegex.capturedTexts());
QString formatted(toFormat);
QDateTime date = QDateTime::currentDateTime();
for (int i = 0; i < capturedTexts.length(); i += 2) {
formatted = formatted.replace(capturedTexts.at(i), date.toString(capturedTexts.at(i + 1)));
}
formatted = formatted.replace(QRegExp("%(?!%)ext"), ext);
return formatted;
}

View File

@ -1,15 +0,0 @@
#ifndef HOTKEYING_HPP
#define HOTKEYING_HPP
#include <QKeySequence>
#include <QString>
#include <functional>
namespace hotkeying {
void hotkey(QString seqName, QKeySequence seq, std::function<void()> func);
bool valid(QString seq);
void load(QString seqName, std::function<void()> func, QString def = QString());
QString sequence(QString seqName);
}
#endif // HOTKEYING_HPP

View File

@ -1,6 +0,0 @@
<RCC>
<qresource prefix="/">
<file>icons/icon.png</file>
<file>icons/icon.svg</file>
</qresource>
</RCC>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

37
install.sh Executable file
View File

@ -0,0 +1,37 @@
#!/usr/bin/env bash
uname=$(uname)
function installIfNeeded {
brew ls --versions $1 > /dev/null
if [[ ! $? = 0 ]]; then brew install $1
else brew upgrade $1; fi
}
resultfile=""
if [[ "$uname" = "Darwin" ]]; then
export PATH="/usr/local/opt/qt/bin:$PATH"
command -v brew >/dev/null || { echo "Homebrew is required!"; exit }
installIfNeeded qt
installIfNeeded ffmpeg
installIfNeeded pkg-config
installIfNeeded git
brew link --force qt
resultfile="$(pwd)/KShare/build/KShare.app/"
elif [[ "$uname" = "Linux" ]]; then
echo "Please install Qt5 GUI, Widgets, Networking, and X11 Extras, qmake, ffmpeg development files, git, and pkgconfig"
sh
resultfile="$(pwd)/KShare/build/src/KShare"
else echo "Unsupported OS!" && exit 1; fi
git clone --recursive https://github.com/Gurkengewuerz/KShare.git || exit 2
cd KShare
mkdir build || exit 3
cd build
qmake-qt5 .. || qmake .. || exit 4
make || exit 5
echo "------------------------------------------------------"
echo "Resulting file is $resultfile"
if [[ "$uname" = "Linux" ]]; then echo "To link the file into path, run sudo ln -s $resultfile /usr/bin/kshare"; fi
cd ..
echo "To update, go to $(pwd), git pull, cd build, and \`make\`"
echo "------------------------------------------------------"

View File

@ -1,29 +0,0 @@
#ifndef IOUTILS_HPP
#define IOUTILS_HPP
#include <QJsonDocument>
#include <QJsonObject>
#include <QNetworkAccessManager>
#include <QUrl>
#include <functional>
namespace ioutils {
extern QNetworkAccessManager networkManager;
void getJson(QUrl target, QList<QPair<QString, QString>> headers, std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback);
void postJson(QUrl target,
QList<QPair<QString, QString>> headers,
QByteArray body,
std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback);
void getData(QUrl target, QList<QPair<QString, QString>> headers, std::function<void(QByteArray, QNetworkReply *)> callback);
void postData(QUrl target, QList<QPair<QString, QString>> headers, QByteArray body, std::function<void(QByteArray, QNetworkReply *)> callback);
void postMultipart(QUrl target,
QList<QPair<QString, QString>> headers,
QHttpMultiPart *body,
std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback);
void postMultipartData(QUrl target,
QList<QPair<QString, QString>> headers,
QHttpMultiPart *body,
std::function<void(QByteArray, QNetworkReply *)> callback);
}
#endif // IOUTILS_HPP

View File

@ -1,94 +0,0 @@
#include "mainwindow.hpp"
#include "screenshotutil.hpp"
#include "ui_mainwindow.h"
#include <QApplication>
#include <QCommandLineParser>
#include <QDebug>
#include <QScreen>
#include <QtGlobal>
#include <formatter.hpp>
#include <iostream>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
}
#include <QListWidget>
#include <notifications.hpp>
#include <platformbackend.hpp>
#include <worker/worker.hpp>
bool verbose = false;
// I've experiments to run
// There is research to be done
// On the people who are
// still alive
bool stillAlive = true;
#define LOGACT(lvl) \
std::cout << lvl << stdMsg << "\n"; \
if (stillAlive && MainWindow::inst() && MainWindow::inst()->valid()) { \
MainWindow::inst()->ui->logBox->addItem(lvl + msg); \
}
void handler(QtMsgType type, const QMessageLogContext &, const QString &msg) {
std::string stdMsg = msg.toStdString();
switch (type) {
case QtDebugMsg:
if (verbose) {
LOGACT("DEBUG: ")
}
break;
case QtInfoMsg:
LOGACT("INFO: ")
if (stillAlive) notifications::notifyNolog("KShare", msg);
break;
case QtWarningMsg:
LOGACT("WARN: ")
if (stillAlive) notifications::notifyNolog("KShare Warning", msg, QSystemTrayIcon::Warning);
break;
case QtCriticalMsg:
LOGACT("CRIT: ")
if (stillAlive) notifications::notifyNolog("KShare Critical Error", msg, QSystemTrayIcon::Critical);
break;
case QtFatalMsg:
LOGACT("FATAL: ")
if (stillAlive) notifications::notifyNolog("KShare Fatal Error", msg, QSystemTrayIcon::Critical);
break;
}
}
int main(int argc, char *argv[]) {
av_register_all();
qInstallMessageHandler(handler);
QApplication a(argc, argv);
a.setQuitOnLastWindowClosed(false);
a.setApplicationName("KShare");
a.setOrganizationName("ArsenArsen");
a.setApplicationVersion("4.1");
QCommandLineParser parser;
parser.addHelpOption();
QCommandLineOption h({ "b", "background" }, "Does not show the main window, starts in tray.");
QCommandLineOption v({ "v", "verbose" }, "Enables QtDebugMsg outputs");
QCommandLineOption ver({ "ver", "version" }, "Prints KShare version");
parser.addOption(h);
parser.addOption(v);
parser.addOption(ver);
parser.process(a);
if (parser.isSet(ver)) {
printf("%s %s\n", a.applicationName().toLocal8Bit().constData(), a.applicationVersion().toLocal8Bit().constData());
return 0;
}
verbose = parser.isSet(v);
MainWindow w;
Worker::init();
a.connect(&a, &QApplication::aboutToQuit, Worker::end);
a.connect(&a, &QApplication::aboutToQuit, [] { stillAlive = false; });
if (!parser.isSet(h)) w.show();
return a.exec();
}

View File

@ -1,165 +0,0 @@
#include "mainwindow.hpp"
#include "aboutbox.hpp"
#include "screenshotter.hpp"
#include "screenshotutil.hpp"
#include "settingsdialog.hpp"
#include "ui_mainwindow.h"
#include <QMessageBox>
#include <colorpicker/colorpickerscene.hpp>
#include <formats.hpp>
#include <hotkeying.hpp>
#include <platformbackend.hpp>
#include <recording/recordingformats.hpp>
#include <settings.hpp>
#include <uploaders/uploadersingleton.hpp>
MainWindow *MainWindow::instance;
void MainWindow::rec() {
if (controller->isRunning()) return;
auto f
= static_cast<formats::Recording>(settings::settings().value("recording/format", (int)formats::Recording::None).toInt());
if (f >= formats::Recording::None) return;
RecordingContext *ctx = new RecordingContext;
RecordingFormats *format = new RecordingFormats(f);
ctx->consumer = format->getConsumer();
ctx->finalizer = format->getFinalizer();
ctx->validator = format->getValidator();
ctx->format = format->getFormat();
ctx->postUploadTask = format->getPostUploadTask();
ctx->anotherFormat = format->getAnotherFormat();
controller->start(ctx);
}
void addHotkey(QString name, std::function<void()> action) {
hotkeying::load(name, action);
}
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) {
instance = this;
ui->setupUi(this);
setWindowIcon(QIcon(":/icons/icon.svg"));
tray = new QSystemTrayIcon(windowIcon(), this);
tray->setToolTip("KShare");
tray->setVisible(true);
QMenu *menu = new QMenu(this);
QAction *quit = new QAction("Quit", this);
QAction *shtoggle = new QAction("Show/Hide", this);
QAction *fullscreen = new QAction("Take fullscreen shot", this);
QAction *area = new QAction("Take area shot", this);
#ifdef PLATFORM_CAPABILITY_ACTIVEWINDOW
QAction *active = new QAction("Screenshot active window", this);
connect(active, &QAction::triggered, this, [] { screenshotter::activeDelayed(); });
#endif
QAction *picker = new QAction("Show color picker", this);
QAction *rec = new QAction("Record screen", this);
QAction *recoff = new QAction("Stop recording", this);
menu->addActions({ quit, shtoggle, picker });
menu->addSeparator();
menu->addActions({ fullscreen, area, active });
#ifdef PLATFORM_CAPABILITY_ACTIVEWINDOW
menu->addAction(area);
#endif
menu->addSeparator();
menu->addActions({ rec, recoff });
connect(quit, &QAction::triggered, this, &MainWindow::quit);
connect(shtoggle, &QAction::triggered, this, &MainWindow::toggleVisible);
connect(picker, &QAction::triggered, [] { ColorPickerScene::showPicker(); });
connect(tray, &QSystemTrayIcon::messageClicked, this, &MainWindow::toggleVisible);
connect(tray, &QSystemTrayIcon::activated, this, [this](QSystemTrayIcon::ActivationReason reason) {
if (reason == QSystemTrayIcon::DoubleClick) toggleVisible();
});
connect(fullscreen, &QAction::triggered, this, [] { screenshotter::fullscreenDelayed(); });
connect(area, &QAction::triggered, this, [] { screenshotter::areaDelayed(); });
connect(rec, &QAction::triggered, this, &MainWindow::rec);
connect(recoff, &QAction::triggered, [this] { controller->end(); });
connect(ui->settings, &QPushButton::clicked, this, &MainWindow::on_actionSettings_triggered);
tray->setContextMenu(menu);
addHotkey("fullscreen", [] { screenshotter::fullscreen(); });
addHotkey("area", [] { screenshotter::area(); });
addHotkey("active", [] { screenshotter::active(); });
addHotkey("picker", [] { ColorPickerScene::showPicker(); });
addHotkey("recordingstop", [&] { controller->end(); });
addHotkey("recordingstart", [&] { this->rec(); });
auto errors = UploaderSingleton::inst().errors();
for (auto err : errors) ui->logBox->addItem(QString("ERROR: ") + err.what());
setWindowTitle("KShare v" + QApplication::applicationVersion());
val = true;
}
MainWindow::~MainWindow() {
delete ui;
}
bool MainWindow::valid() {
return val;
}
MainWindow *MainWindow::inst() {
return instance;
}
void MainWindow::closeEvent(QCloseEvent *event) {
if (settings::settings().value("hideOnClose", true).toBool()) {
event->ignore();
hide();
} else
QApplication::exit(0);
}
void MainWindow::quit() {
QCoreApplication::quit();
}
void MainWindow::toggleVisible() {
this->setVisible(!this->isVisible());
if (this->isVisible()) {
this->raise(); // that didn't work
this->setWindowState(Qt::WindowActive); // maybe that works
this->activateWindow(); // maybe that works
}
}
void MainWindow::on_actionQuit_triggered() {
quit();
}
void MainWindow::on_actionFullscreen_triggered() {
screenshotter::fullscreenDelayed();
}
void MainWindow::on_actionArea_triggered() {
screenshotter::areaDelayed();
}
void MainWindow::on_actionStart_triggered() {
rec();
}
void MainWindow::on_actionStop_triggered() {
controller->end();
}
void MainWindow::on_actionColor_Picker_triggered() {
ColorPickerScene::showPicker();
}
void MainWindow::on_actionSettings_triggered() {
SettingsDialog *dialog = new SettingsDialog(this);
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
}
void MainWindow::on_actionAbout_triggered() {
AboutBox *box = new AboutBox(this);
box->setAttribute(Qt::WA_DeleteOnClose);
box->show();
}
void MainWindow::on_actionActive_window_triggered() {
screenshotter::activeDelayed();
}

View File

@ -1,143 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>352</width>
<height>220</height>
</rect>
</property>
<property name="windowTitle">
<string>KShare</string>
</property>
<property name="windowIcon">
<iconset>
<normaloff>:/icons/icon.jpg</normaloff>:/icons/icon.jpg</iconset>
</property>
<widget class="QWidget" name="centralWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0" colspan="2">
<widget class="QPushButton" name="settings">
<property name="text">
<string>Settings</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Log</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QListWidget" name="logBox"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>352</width>
<height>25</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>Fi&amp;le</string>
</property>
<addaction name="actionSettings"/>
<addaction name="actionAbout"/>
<addaction name="separator"/>
<addaction name="actionQuit"/>
</widget>
<widget class="QMenu" name="menuScreenshot">
<property name="title">
<string>Scree&amp;nshot</string>
</property>
<addaction name="actionFullscreen"/>
<addaction name="actionArea"/>
<addaction name="actionActive_window"/>
</widget>
<widget class="QMenu" name="menuUtilities">
<property name="title">
<string>&amp;Utilities</string>
</property>
<addaction name="actionColor_Picker"/>
</widget>
<widget class="QMenu" name="menuRecording">
<property name="title">
<string>&amp;Recording</string>
</property>
<addaction name="actionStart"/>
<addaction name="actionStop"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuScreenshot"/>
<addaction name="menuUtilities"/>
<addaction name="menuRecording"/>
</widget>
<widget class="QStatusBar" name="statusBar"/>
<action name="actionQuit">
<property name="text">
<string>&amp;Quit</string>
</property>
</action>
<action name="actionFullscreen">
<property name="text">
<string>&amp;Fullscreen</string>
</property>
</action>
<action name="actionArea">
<property name="text">
<string>&amp;Area</string>
</property>
</action>
<action name="actionColor_Picker">
<property name="text">
<string>&amp;Color Picker</string>
</property>
</action>
<action name="actionStart">
<property name="text">
<string>Start</string>
</property>
</action>
<action name="actionStop">
<property name="text">
<string>Stop</string>
</property>
</action>
<action name="actionSettings">
<property name="text">
<string>Settings</string>
</property>
</action>
<action name="actionAbout">
<property name="text">
<string>About</string>
</property>
</action>
<action name="actionActive_window">
<property name="text">
<string>Active window</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections/>
</ui>

View File

@ -1,17 +0,0 @@
#include "notifications.hpp"
#include "mainwindow.hpp"
#include "ui_mainwindow.h"
#include <QStatusBar>
void notifications::notify(QString title, QString body, QSystemTrayIcon::MessageIcon icon) {
if (!MainWindow::inst() || !MainWindow::inst()->valid()) return;
notifyNolog(title, body, icon);
MainWindow::inst()->ui->logBox->addItem(title + ": " + body);
}
void notifications::notifyNolog(QString title, QString body, QSystemTrayIcon::MessageIcon icon) {
if (!MainWindow::inst()) return;
MainWindow::inst()->tray->showMessage(title, body, icon, 5000);
MainWindow::inst()->statusBar()->showMessage(title + ": " + body);
}

View File

@ -1,12 +0,0 @@
#ifndef NOTIFICATIONS_HPP
#define NOTIFICATIONS_HPP
#include <QString>
#include <QSystemTrayIcon>
namespace notifications {
void notify(QString title, QString body, QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::Information);
void notifyNolog(QString title, QString body, QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::Information);
}
#endif // NOTIFICATIONS_HPP

View File

@ -0,0 +1,40 @@
# Maintainer: Gurkengewuerz <niklas@mc8051.de>
pkgname=kshare-git
pkgver=v4.1.r196.gc38161b
pkgrel=1
pkgdesc="The free and open source and cross platform screen sharing software."
arch=('i686' 'x86_64')
url="https://github.com/Gurkengewuerz/KShare"
license=('MIT')
provides=(kshare)
conflicts=(kshare)
depends=(qt5-base qt5-x11extras qt5-svg xcb-util-cursor ffmpeg libxfixes)
makedepends=(git pkg-config)
source=(git+https://github.com/Gurkengewuerz/KShare.git#branch=dev)
sha1sums=('SKIP')
pkgver() {
cd KShare
echo "v4.1.r196.gc38161b"
}
prepare() {
cd KShare
git submodule update --init --recursive
}
build() {
cd KShare
qmake
make
}
package() {
cd KShare
install -Dm755 src/kshare "$pkgdir/usr/bin/kshare"
install -Dm644 src/icons/icon.png "$pkgdir/usr/share/pixmaps/KShare.png"
install -Dm644 KShare.desktop "$pkgdir/usr/share/applications/KShare.desktop"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
}

View File

@ -0,0 +1,35 @@
# Maintainer: Gurkengewuerz <niklas@mc8051.de>
pkgname=kshare
pkgver=v5.0.0
pkgrel=1
conflicts=("kshare-git")
pkgdesc="The free and open source and cross platform screen sharing software."
arch=('i686' 'x86_64')
url="https://github.com/Gurkengewuerz/KShare"
license=('MIT')
provides=('kshare=$pkgver')
depends=(qt5-base qt5-x11extras qt5-svg xcb-util-cursor ffmpeg libxfixes)
makedepends=(git pkg-config)
source=(git+https://github.com/Gurkengewuerz/KShare.git)
sha1sums=('SKIP')
prepare() {
cd KShare
git submodule update --init --recursive
}
build() {
cd KShare
qmake
make
}
package() {
cd KShare
install -Dm755 src/kshare "$pkgdir/usr/bin/kshare"
install -Dm644 src/icons/icon.png "$pkgdir/usr/share/pixmaps/KShare.png"
install -Dm644 KShare.desktop "$pkgdir/usr/share/applications/KShare.desktop"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
}

View File

@ -4,6 +4,6 @@ Architecture: all
Essential: no
Section: contrib
Priority: optional
Depends: qt5-default (>=5.7.0), libqt5x11extras5 (>=5.7.0), libavcodec57 (>=3.2.0), libavformat57 (>=3.2.0), libswscale4 (>=3.2.0), libavutil55 (>=3.2.0), libxcb-cursor0 (>=0.1.0), libxcb1 (>=1.11.0), libxcb-xfixes0 (>=1.11.0)
Depends: libqt5gui5 (>=5.7.0), libqt5svg5 (>=5.7.0), libqt5x11extras5 (>=5.7.0), libqt5multimedia5 (>=5.7.0), libqt5multimedia5-plugins (>=5.7.0), libavcodec57 (>=3.2.0), libavformat57 (>=3.2.0), libswscale4 (>=3.2.0), libavutil55 (>=3.2.0), libxcb-cursor0 (>=0.1.0), libxcb1 (>=1.11.0), libxcb-xfixes0 (>=1.11.0), libxcb-util0 (>=0.3.8)|libxcb-util1 (>=0.3.8), libxcb-xfixes0 (>=1.11.0)
Maintainer: ArsenArsen <arsenarsentmc@outlook.com>
Description: The free open source and cross platform screen sharing software

View File

@ -0,0 +1,15 @@
[Desktop Entry]
Name=KShare
Comment=A ShareX inspired cross platform screen capture utility written with Qt.
GenericName=Screenshot Capture Utility
Exec=/usr/bin/kshare
Icon=/usr/share/pixmaps/KShare.png
Type=Application
StartupNotify=false
Categories=Qt;Utility;
StartupWMClass=KSharee
Actions=StartInBackground
[Desktop Action StartInBackground]
Name=Start without showing the window
Exec=kshare -b

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

20
packages/macos/Info.plist Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
<string>KShare</string>
<key>CFBundleIdentifier</key>
<string>com.arsenarsen.KShare</string>
</dict>
</plist>

View File

@ -1,26 +1,36 @@
#!/usr/bin/env bash
VERSION=$(grep setApplicationVersion ../src/main.cpp | head -n1 | cut -d \" -f2)
echo "Make Debian package for v$VERSION" >&2
cp deb work -r
sed "s/%ver/$VERSION/g" deb/DEBIAN/control > work/DEBIAN/control
mkdir -p work/usr/bin
if [[ "$1" == "" ]]
then
echo "Provide a version with arg1" >&2
exit 1
fi
[[ ! -d work ]] && cp deb work -r
sed "s/%ver/$1/g" deb/DEBIAN/control > work/DEBIAN/control
mkdir -p work/usr/bin
mkdir compiling
cd compiling
qmake ../../KShare.pro
if make
then
cd ..
cp compiling/KShare work/usr/bin/kshare
echo "Fresh Compile Binary" >&2
mkdir compiling
cd compiling
qmake ../../KShare.pro
if make
then
cd ..
cp compiling/src/kshare work/usr/bin/kshare
else
rm -rf compiling
echo "Failed to make!"
exit 2
fi
else
rm -rf compiling
echo "Failed to make!"
exit 2
echo "Using pre-compiled binary (please only use in circleci)" >&2
pwd
cp ../build/src/kshare work/usr/bin/kshare
fi
cd work
md5sum usr/bin/kshare > DEBIAN/md5sums
md5sum usr/bin/kshare usr/share/applications/KShare.desktop > DEBIAN/md5sums
cd ..
dpkg-deb -b work/
mv work.deb kshare_v${VERSION}.deb
rm -rf work

View File

@ -0,0 +1,255 @@
Copyright (c) 2017 ArsenArsen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This software uses and possibly bundles Qt, OpenSSL, FFMpeg, and QHotkey, whose licenses are respectively:
------------------------------ Qt:
GNU LESSER GENERAL PUBLIC LICENSE
The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
Contact: http://www.qt.io/licensing/
You may use, distribute and copy the Qt Toolkit under the terms of
GNU Lesser General Public License version 3, which is displayed below.
This license makes reference to the version 3 of the GNU General
Public License, which you can find in the LICENSE.GPLv3 file.
------------------------------ OpenSSL:
LICENSE ISSUES
==============
The OpenSSL toolkit stays under a double license, i.e. both the conditions of
the OpenSSL License and the original SSLeay license apply to the toolkit.
See below for the actual license texts.
OpenSSL License
---------------
/* ====================================================================
* Copyright (c) 1998-2017 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* openssl-core@openssl.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED 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 OpenSSL PROJECT OR
* ITS 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.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
Original SSLeay License
-----------------------
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young (eay@cryptsoft.com).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
*
* Copyright remains Eric Young's, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)"
* The word 'cryptographic' can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/
------------------------------ FFMpeg:
License
Most files in FFmpeg are under the GNU Lesser General Public License version 2.1 or later (LGPL v2.1+). Read the file COPYING.LGPLv2.1 for details. Some other files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to FFmpeg.
Some optional parts of FFmpeg are licensed under the GNU General Public License version 2 or later (GPL v2+). See the file COPYING.GPLv2 for details. None of these parts are used by default, you have to explicitly pass --enable-gpl to configure to activate them. In this case, FFmpeg's license changes to GPL v2+.
Specifically, the GPL parts of FFmpeg are:
libpostproc
optional x86 optimization in the files
libavcodec/x86/flac_dsp_gpl.asm
libavcodec/x86/idct_mmx.c
libavfilter/x86/vf_removegrain.asm
the following building and testing tools
compat/solaris/make_sunver.pl
doc/t2h.pm
doc/texi2pod.pl
libswresample/swresample-test.c
tests/checkasm/*
tests/tiny_ssim.c
the following filters in libavfilter:
vf_blackframe.c
vf_boxblur.c
vf_colormatrix.c
vf_cover_rect.c
vf_cropdetect.c
vf_delogo.c
vf_eq.c
vf_find_rect.c
vf_fspp.c
vf_geq.c
vf_histeq.c
vf_hqdn3d.c
vf_interlace.c
vf_kerndeint.c
vf_mcdeint.c
vf_mpdecimate.c
vf_owdenoise.c
vf_perspective.c
vf_phase.c
vf_pp.c
vf_pp7.c
vf_pullup.c
vf_repeatfields.c
vf_sab.c
vf_smartblur.c
vf_spp.c
vf_stereo3d.c
vf_super2xsai.c
vf_tinterlace.c
vf_uspp.c
vsrc_mptestsrc.c
Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then the configure parameter --enable-version3 will activate this licensing option for you. Read the file COPYING.LGPLv3 or, if you have enabled GPL parts, COPYING.GPLv3 to learn the exact legal terms that apply in this case.
There are a handful of files under other licensing terms, namely:
The files libavcodec/jfdctfst.c, libavcodec/jfdctint_template.c and libavcodec/jrevdct.c are taken from libjpeg, see the top of the files for licensing details. Specifically note that you must credit the IJG in the documentation accompanying your program if you only distribute executables. You must also indicate any changes including additions and deletions to those three files in the documentation.
tests/reference.pnm is under the expat license.
External libraries
FFmpeg can be combined with a number of external libraries, which sometimes affect the licensing of binaries resulting from the combination.
Compatible libraries
The following libraries are under GPL:
frei0r
libcdio
librubberband
libvidstab
libx264
libx265
libxavs
libxvid
When combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by passing --enable-gpl to configure.
The OpenCORE and VisualOn libraries are under the Apache License 2.0. That license is incompatible with the LGPL v2.1 and the GPL v2, but not with version 3 of those licenses. So to combine these libraries with FFmpeg, the license version needs to be upgraded by passing --enable-version3 to configure.
Incompatible libraries
There are certain libraries you can combine with FFmpeg whose licenses are not compatible with the GPL and/or the LGPL. If you wish to enable these libraries, even in circumstances that their license may be incompatible, pass --enable-nonfree to configure. But note that if you enable any of these libraries the resulting binary will be under a complex license mix that is more restrictive than the LGPL and that may result in additional obligations. It is possible that these restrictions cause the resulting binary to be unredistributable.
The Fraunhofer FDK AAC and OpenSSL libraries are under licenses which are incompatible with the GPLv2 and v3. To the best of our knowledge, they are compatible with the LGPL.
The NVENC library, while its header file is licensed under the compatible MIT license, requires a proprietary binary blob at run time, and is deemed to be incompatible with the GPL. We are not certain if it is compatible with the LGPL, but we require --enable-nonfree even with LGPL configurations in case it is not.
------------------------------ QHotkey:
Copyright (c) 2016, Felix Barz
All rights reserved.
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 QHotkey 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.

View File

@ -0,0 +1,11 @@
;Source: "FILE"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

View File

@ -0,0 +1,37 @@
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "KShare"
#define MyAppVersion ";VER;"
#define MyAppPublisher "ArsenArsen"
#define MyAppURL "http://kshare.arsenarsen.com/"
#define MyAppExeName "KShare.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{4D052A58-8982-4FB0-A542-22D1E3936AA9}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
LicenseFile=LICENSE.txt
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "KShare.exe"; DestDir: "{app}"; Flags: ignoreversion

View File

@ -1,13 +0,0 @@
#include "macbackend.hpp"
QPixmap PlatformBackend::getCursor() {
#warning "TODO: Mac backend"
return std::tuple<QPoint, QPixmap>(QPoint(0, 0), QPixmap());
// Not Monday: https://developer.apple.com/reference/appkit/nscursor/1527062-image
// Some on how to do NSImage -> QPixmap: http://stackoverflow.com/a/2468961/3809164
// This is gonna be easier than with Windows
}
pid_t PlatformBackend::pid() {
return getpid();
}

View File

@ -1,171 +0,0 @@
#include "encoder.hpp"
#include <settings.hpp>
extern "C" {
#include <libavutil/imgutils.h>
#include <libavutil/opt.h>
}
inline void throwAVErr(int ret, std::string section) {
char err[AV_ERROR_MAX_STRING_SIZE];
av_make_error_string(err, AV_ERROR_MAX_STRING_SIZE, ret);
std::string newString(err);
throw std::runtime_error("Error during: " + section + ": " + newString);
}
#define OR_DEF(s, e1, e2) s ? s->e1 : e2
Encoder::Encoder(QString &targetFile, QSize res, CodecSettings *settings) {
int ret;
// Format
ret = avformat_alloc_output_context2(&fc, NULL, NULL, targetFile.toLocal8Bit().constData());
if (ret < 0) throwAVErr(ret, "format alloc");
// Stream
out->st = avformat_new_stream(fc, NULL);
if (!out->st) throw std::runtime_error("Unable to allocate video context");
out->st->id = fc->nb_streams - 1;
if (fc->oformat->flags & AVFMT_GLOBALHEADER) fc->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
av_dump_format(fc, 0, targetFile.toLocal8Bit().constData(), 1);
// Codec
if (!fc->oformat->video_codec) throw std::runtime_error("Video codec not found");
codec = avcodec_find_encoder(fc->oformat->video_codec);
if (!codec) throw std::runtime_error("Video codec not found");
out->enc = avcodec_alloc_context3(codec);
if (!out->enc) throw std::runtime_error("Unable to allocate video context");
int fps = settings::settings().value("recording/framerate", 30).toInt();
out->enc->codec_id = codec->id;
out->enc->codec = codec;
out->enc->bit_rate = OR_DEF(settings, bitrate, 400000);
out->enc->width = res.width() % 2 ? res.width() - 1 : res.width();
out->enc->height = res.height() % 2 ? res.height() - 1 : res.height();
size = QSize(out->enc->width, out->enc->height);
out->st->time_base = { 1, fps };
out->enc->time_base = out->st->time_base;
out->enc->gop_size = OR_DEF(settings, gopSize, 12);
out->enc->pix_fmt = AV_PIX_FMT_YUV420P; // blaze it
AVDictionary *dict = NULL;
if (out->enc->codec_id == AV_CODEC_ID_GIF)
out->enc->pix_fmt = AV_PIX_FMT_RGB8;
else if (out->enc->codec_id == AV_CODEC_ID_H264 || out->enc->codec_id == AV_CODEC_ID_H265) {
av_dict_set(&dict, "preset", settings ? settings->h264Profile.toLocal8Bit().constData() : "medium", 0);
av_dict_set_int(&dict, "crf", OR_DEF(settings, h264Crf, 12), 0);
} else if (out->enc->codec_id == AV_CODEC_ID_VP8 || out->enc->codec_id == AV_CODEC_ID_VP9)
av_dict_set_int(&dict, "lossless", OR_DEF(settings, vp9Lossless, false), 0);
ret = avcodec_open2(out->enc, codec, &dict);
av_dict_free(&dict);
if (ret < 0) throwAVErr(ret, "codec open");
if (codec->capabilities & AV_CODEC_CAP_DR1) avcodec_align_dimensions(out->enc, &out->enc->width, &out->enc->height);
ret = avcodec_parameters_from_context(out->st->codecpar, out->enc);
if (ret < 0) throwAVErr(ret, "stream opt copy");
// Frames
out->frame = av_frame_alloc();
if (!out->frame) {
throw std::runtime_error("frame alloc");
}
out->frame->format = out->enc->pix_fmt;
out->frame->width = out->enc->width;
out->frame->height = out->enc->height;
ret = av_frame_get_buffer(out->frame, 32);
if (ret < 0) throwAVErr(ret, "frame buffer alloc");
// Writer
ret = avio_open(&fc->pb, targetFile.toLocal8Bit().constData(), AVIO_FLAG_WRITE);
if (ret < 0) throwAVErr(ret, "writer open");
ret = avformat_write_header(fc, NULL);
if (ret < 0) throwAVErr(ret, "write header");
success = true;
}
void Encoder::setFrameRGB(QImage img) {
uint8_t *rgb = (uint8_t *)img.bits();
int ret = av_frame_make_writable(out->frame);
if (ret < 0) throwAVErr(ret, "setFrameRGB");
int lineSize[1] = { img.bytesPerLine() };
out->sws = sws_getCachedContext(out->sws, out->enc->width, out->enc->height, AV_PIX_FMT_RGB24, out->enc->width,
out->enc->height, (AVPixelFormat)out->frame->format, 0, 0, 0, 0);
sws_scale(out->sws, (const uint8_t *const *)&rgb, lineSize, 0, out->enc->height, out->frame->data, out->frame->linesize);
out->frame->pts = out->nextPts++;
}
Encoder::~Encoder() {
end();
}
bool Encoder::addFrame(QImage frm) {
if (!success) return false;
if (frm.size() != size) frm = frm.copy(QRect(QPoint(0, 0), size));
if (frm.format() != QImage::Format_RGB888) frm = frm.convertToFormat(QImage::Format_RGB888);
setFrameRGB(frm);
AVPacket pkt;
pkt.size = 0;
pkt.data = NULL;
av_init_packet(&pkt);
int ret = avcodec_send_frame(out->enc, out->frame);
if (ret == AVERROR(EAGAIN)) {
do {
ret = avcodec_receive_packet(out->enc, &pkt);
if (ret < 0) {
if (ret != AVERROR(EAGAIN))
throwAVErr(ret, "receive packet");
else
break;
}
av_packet_rescale_ts(&pkt, out->enc->time_base, out->st->time_base);
pkt.stream_index = out->st->index;
ret = av_interleaved_write_frame(fc, &pkt);
} while (ret >= 0);
if (ret < 0 && ret != AVERROR(EAGAIN)) {
av_packet_unref(&pkt);
throwAVErr(ret, "send frame");
}
}
av_packet_unref(&pkt);
if (ret < 0 && ret != AVERROR(EAGAIN)) throwAVErr(ret, "send frame");
return true;
}
bool Encoder::isRunning() {
return success;
}
bool Encoder::end() {
if (ended) return false;
ended = true;
if (!success) {
goto cleanup;
}
avcodec_send_frame(out->enc, NULL);
int ret;
AVPacket pkt;
pkt.size = 0;
pkt.data = NULL;
av_init_packet(&pkt);
do {
ret = avcodec_receive_packet(out->enc, &pkt);
if (ret < 0) break;
av_packet_rescale_ts(&pkt, out->enc->time_base, out->st->time_base);
pkt.stream_index = out->st->index;
av_interleaved_write_frame(fc, &pkt);
} while (ret >= 0);
av_write_trailer(fc);
cleanup:
avcodec_free_context(&out->enc);
av_frame_free(&out->frame);
sws_freeContext(out->sws);
delete out;
if (!(fc->oformat->flags & AVFMT_NOFILE)) //
avio_closep(&fc->pb);
avformat_free_context(fc);
return success;
}

View File

@ -1,36 +0,0 @@
#include "screenshotter.hpp"
#include "cropeditor/cropeditor.hpp"
#include "mainwindow.hpp"
#include "screenshotutil.hpp"
#include "uploaders/uploadersingleton.hpp"
#include <QDoubleSpinBox>
#include <QTimer>
#include <platformbackend.hpp>
#include <settings.hpp>
void screenshotter::area() {
CropEditor *editor = new CropEditor(screenshotutil::fullscreen(settings::settings().value("captureCursor", true).toBool()));
QObject::connect(editor, &CropEditor::cropped, [&](QPixmap pixmap) { UploaderSingleton::inst().upload(pixmap); });
}
void screenshotter::fullscreen() {
UploaderSingleton::inst().upload(screenshotutil::fullscreen(settings::settings().value("captureCursor", true).toBool()));
}
void screenshotter::areaDelayed() {
QTimer::singleShot(settings::settings().value("delay", 0.5).toFloat() * 1000, &screenshotter::area);
}
void screenshotter::fullscreenDelayed() {
QTimer::singleShot(settings::settings().value("delay", 0.5).toFloat() * 1000, &screenshotter::fullscreen);
}
void screenshotter::activeDelayed() {
QTimer::singleShot(settings::settings().value("delay", 0.5).toFloat() * 1000, &screenshotter::active);
}
void screenshotter::active() {
#ifdef PLATFORM_CAPABILITY_ACTIVEWINDOW
UploaderSingleton::inst().upload(screenshotutil::window(PlatformBackend::inst().getActiveWID()));
#endif
}

View File

@ -1,15 +0,0 @@
#ifndef SCREENSHOTTER_HPP
#define SCREENSHOTTER_HPP
namespace screenshotter {
void fullscreen();
void fullscreenDelayed();
void area();
void areaDelayed();
void activeDelayed();
void active();
}
#endif // SCREENSHOTTER_HPP

View File

@ -1,63 +0,0 @@
#include "screenshotutil.hpp"
#include <QApplication>
#include <QClipboard>
#include <QDebug>
#include <QPainter>
#include <QPixmap>
#include <QScreen>
#include <platformbackend.hpp>
QPixmap screenshotutil::fullscreen(bool cursor) {
QPixmap image;
QPainter painter;
// Hack for https://bugreports.qt.io/browse/QTBUG-58110
static QStringList qVer = QString(qVersion()).split('.');
#ifdef Q_OS_LINUX
if (qVer.at(0).toInt() == 5 && qVer.at(1).toInt() < 9) {
image = window(0);
painter.begin(&image);
} else {
#endif
int height = 0, width = 0;
for (QScreen *screen : QApplication::screens()) {
QRect geo = screen->geometry();
width = qMax(geo.left() + geo.width(), width);
height = qMax(geo.top() + geo.height(), height);
}
image = QPixmap(width, height);
image.fill(Qt::transparent);
width = 0;
painter.begin(&image);
for (QScreen *screen : QApplication::screens()) {
QPixmap currentScreen = window(0, screen);
painter.drawPixmap(screen->geometry().topLeft(), currentScreen);
width += screen->size().width();
}
#ifdef Q_OS_LINUX
}
#endif
#ifdef PLATFORM_CAPABILITY_CURSOR
if (cursor) {
auto cursorData = PlatformBackend::inst().getCursor();
painter.drawPixmap(QCursor::pos() - std::get<0>(cursorData), std::get<1>(cursorData));
}
#endif
painter.end();
return image;
}
QPixmap screenshotutil::window(WId wid, QScreen *w) {
return w->grabWindow(wid);
}
void screenshotutil::toClipboard(QString value) {
QApplication::clipboard()->setText(value);
}
QPixmap screenshotutil::fullscreenArea(bool cursor, qreal x, qreal y, qreal w, qreal h) {
return fullscreen(cursor).copy(x, y, w, h);
}

View File

@ -1,14 +0,0 @@
#ifndef SCREENSHOTUTIL_HPP
#define SCREENSHOTUTIL_HPP
#include <QApplication>
#include <QWidget>
namespace screenshotutil {
QPixmap fullscreen(bool cursor = true);
QPixmap fullscreenArea(bool cursor = true, qreal x = 0, qreal y = 0, qreal w = -1, qreal h = -1);
QPixmap window(WId wid, QScreen *w = QApplication::primaryScreen());
void toClipboard(QString value);
}
#endif // SCREENSHOTUTIL_HPP

View File

@ -1,17 +0,0 @@
#include "settings.hpp"
#include <QMutex>
#include <QStandardPaths>
QMutex *lock = new QMutex;
QSettings &settings::settings() {
QMutexLocker l(lock);
static QDir configDir(QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation));
if (configDir.dirName() != "KShare") {
configDir.mkdir("KShare");
configDir.cd("KShare");
}
static QSettings settings(configDir.absoluteFilePath("settings.ini"), QSettings::IniFormat);
return settings;
}

View File

@ -4,7 +4,7 @@
#include <QDialog>
namespace Ui {
class AboutBox;
class AboutBox;
}
class AboutBox : public QDialog {

328
src/aboutbox.ui Normal file
View File

@ -0,0 +1,328 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AboutBox</class>
<widget class="QDialog" name="AboutBox">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>670</width>
<height>470</height>
</rect>
</property>
<property name="windowTitle">
<string>About KShare</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/icons/icon.svg&quot; width=&quot;50&quot; style=&quot;vertical-align: middle;&quot;/&gt;&lt;span style=&quot; font-weight:600; vertical-align:middle;&quot;&gt; KShare&lt;/span&gt;&lt;span style=&quot; vertical-align:middle;&quot;&gt; - The free and open source and cross platform screen sharing software&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Version %0&lt;br/&gt;Links: &lt;a href=&quot;https://github.com/ArsenArsen/KShare&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;Source code&lt;/span&gt;&lt;/a&gt;, &lt;a href=&quot;https://github.com/ArsenArsen/KShare/issues&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;Issue tracker&lt;/span&gt;&lt;/a&gt;, &lt;a href=&quot;http://kshare.arsenarsen.com&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;Website&lt;/span&gt;&lt;/a&gt;, &lt;a href=&quot;https://patreon.com/arsen&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;Patreon&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QTextBrowser" name="textBrowser">
<property name="html">
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;This software uses and possibly bundles Qt, OpenSSL, FFMpeg, and QHotkey, whose licenses are respectively:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Icons made by &lt;a href=&quot;https://www.flaticon.com/authors/maxim-basinski&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Maxim Basinski&lt;/span&gt;&lt;/a&gt; from &lt;a href=&quot;https://www.flaticon.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;www.flaticon.com&lt;/span&gt;&lt;/a&gt; is licensed by &lt;a href=&quot;http://creativecommons.org/licenses/by/3.0/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;CC 3.0 BY&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;------------------------------ &lt;/span&gt;&lt;a href=&quot;http://code.qt.io/cgit/qt/qt5.git/tree/LICENSE.LGPLv3&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt; text-decoration: underline; color:#007af4;&quot;&gt;Qt&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;GNU LESSER GENERAL PUBLIC LICENSE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;Contact: &lt;/span&gt;&lt;a href=&quot;http://www.qt.io/licensing/&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt; text-decoration: underline; color:#007af4;&quot;&gt;http://www.qt.io/licensing/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;You may use, distribute and copy the Qt Toolkit under the terms of&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;GNU Lesser General Public License version 3, which is displayed below.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;This license makes reference to the version 3 of the GNU General&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;Public License, which you can find in the &lt;/span&gt;&lt;a href=&quot;http://code.qt.io/cgit/qt/qt5.git/tree/LICENSE.LGPLv3&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt; text-decoration: underline; color:#007af4;&quot;&gt;LICENSE.GPLv3&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt; file.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;------------------------------ &lt;/span&gt;&lt;a href=&quot;https://www.openssl.org/source/license.html&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#007af4;&quot;&gt;OpenSSL&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;LICENSE ISSUES&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;==============&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;The OpenSSL toolkit stays under a double license, i.e. both the conditions of&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;the OpenSSL License and the original SSLeay license apply to the toolkit.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;See below for the actual license texts.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;OpenSSL License&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;---------------&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;/* ====================================================================&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* Copyright (c) 1998-2017 The OpenSSL Project. All rights reserved.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* Redistribution and use in source and binary forms, with or without&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* modification, are permitted provided that the following conditions&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* are met:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* 1. Redistributions of source code must retain the above copyright&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* notice, this list of conditions and the following disclaimer. &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* 2. Redistributions in binary form must reproduce the above copyright&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* notice, this list of conditions and the following disclaimer in&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* the documentation and/or other materials provided with the&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* distribution.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* 3. All advertising materials mentioning features or use of this&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* software must display the following acknowledgment:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* &amp;quot;This product includes software developed by the OpenSSL Project&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* for use in the OpenSSL Toolkit. (http://www.openssl.org/)&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* 4. The names &amp;quot;OpenSSL Toolkit&amp;quot; and &amp;quot;OpenSSL Project&amp;quot; must not be used to&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* endorse or promote products derived from this software without&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* prior written permission. For written permission, please contact&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* openssl-core@openssl.org.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* 5. Products derived from this software may not be called &amp;quot;OpenSSL&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* nor may &amp;quot;OpenSSL&amp;quot; appear in their names without prior written&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* permission of the OpenSSL Project.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* 6. Redistributions of any form whatsoever must retain the following&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* acknowledgment:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* &amp;quot;This product includes software developed by the OpenSSL Project&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* for use in the OpenSSL Toolkit (http://www.openssl.org/)&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* OF THE POSSIBILITY OF SUCH DAMAGE.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* ====================================================================&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* This product includes cryptographic software written by Eric Young&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* (eay@cryptsoft.com). This product includes software written by Tim&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* Hudson (tjh@cryptsoft.com).&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;*/&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;Original SSLeay License&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;-----------------------&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* All rights reserved.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;*&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* This package is an SSL implementation written&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* by Eric Young (eay@cryptsoft.com).&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* The implementation was written so as to conform with Netscapes SSL.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* This library is free for commercial and non-commercial use as long as&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* the following conditions are aheared to. The following conditions&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* apply to all code found in this distribution, be it the RC4, RSA,&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* lhash, DES, etc., code; not just the SSL code. The SSL documentation&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* included with this distribution is covered by the same copyright terms&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* except that the holder is Tim Hudson (tjh@cryptsoft.com).&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* Copyright remains Eric Young's, and as such any Copyright notices in&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* the code are not to be removed.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* If this package is used in a product, Eric Young should be given attribution&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* as the author of the parts of the library used.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* This can be in the form of a textual message at program startup or&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* in documentation (online or textual) provided with the package.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* Redistribution and use in source and binary forms, with or without&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* modification, are permitted provided that the following conditions&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* are met:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* 1. Redistributions of source code must retain the copyright&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* notice, this list of conditions and the following disclaimer.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* 2. Redistributions in binary form must reproduce the above copyright&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* notice, this list of conditions and the following disclaimer in the&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* documentation and/or other materials provided with the distribution.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* 3. All advertising materials mentioning features or use of this software&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* must display the following acknowledgement:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* &amp;quot;This product includes cryptographic software written by&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* Eric Young (eay@cryptsoft.com)&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* The word 'cryptographic' can be left out if the rouines from the library&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* being used are not cryptographic related :-).&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* 4. If you include any Windows specific code (or a derivative thereof) from &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* the apps directory (application code) you must include an acknowledgement:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* &amp;quot;This product includes software written by Tim Hudson (tjh@cryptsoft.com)&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* SUCH DAMAGE.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* The licence and distribution terms for any publically available version or&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* derivative of this code cannot be changed. i.e. this code cannot simply be&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* copied and put under another distribution licence&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* [including the GNU Public Licence.]&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;*/&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;------------------------------ &lt;/span&gt;&lt;a href=&quot;https://github.com/FFmpeg/FFmpeg/blob/master/LICENSE.md&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#007af4;&quot;&gt;FFMpeg&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;License&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Most files in FFmpeg are under the GNU Lesser General Public License version 2.1 or later (LGPL v2.1+). Read the file &lt;/span&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;COPYING.LGPLv2.1&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; for details. Some other files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to FFmpeg.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Some optional parts of FFmpeg are licensed under the GNU General Public License version 2 or later (GPL v2+). See the file &lt;/span&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;COPYING.GPLv2&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; for details. None of these parts are used by default, you have to explicitly pass &lt;/span&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;--enable-gpl&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; to configure to activate them. In this case, FFmpeg's license changes to GPL v2+.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Specifically, the GPL parts of FFmpeg are:&lt;/span&gt;&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;libpostproc&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;optional x86 optimization in the files &lt;/li&gt;
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 2;&quot;&gt;&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;libavcodec/x86/flac_dsp_gpl.asm&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;libavcodec/x86/idct_mmx.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;libavfilter/x86/vf_removegrain.asm&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;the following building and testing tools &lt;/li&gt;
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 2;&quot;&gt;&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;compat/solaris/make_sunver.pl&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;doc/t2h.pm&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;doc/texi2pod.pl&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;libswresample/swresample-test.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;tests/checkasm/*&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;tests/tiny_ssim.c&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;the following filters in libavfilter: &lt;/li&gt;&lt;/ul&gt;
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 2;&quot;&gt;&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_blackframe.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_boxblur.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_colormatrix.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_cover_rect.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_cropdetect.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_delogo.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_eq.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_find_rect.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_fspp.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_geq.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_histeq.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_hqdn3d.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_interlace.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_kerndeint.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_mcdeint.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_mpdecimate.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_owdenoise.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_perspective.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_phase.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_pp.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_pp7.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_pullup.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_repeatfields.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_sab.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_smartblur.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_spp.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_stereo3d.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_super2xsai.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_tinterlace.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vf_uspp.c&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;vsrc_mptestsrc.c&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then the configure parameter &lt;/span&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;--enable-version3&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; will activate this licensing option for you. Read the file &lt;/span&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;COPYING.LGPLv3&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; or, if you have enabled GPL parts, &lt;/span&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;COPYING.GPLv3&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; to learn the exact legal terms that apply in this case.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;There are a handful of files under other licensing terms, namely:&lt;/span&gt;&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The files &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;libavcodec/jfdctfst.c&lt;/span&gt;, &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;libavcodec/jfdctint_template.c&lt;/span&gt; and &lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;libavcodec/jrevdct.c&lt;/span&gt; are taken from libjpeg, see the top of the files for licensing details. Specifically note that you must credit the IJG in the documentation accompanying your program if you only distribute executables. You must also indicate any changes including additions and deletions to those three files in the documentation.&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono';&quot;&gt;tests/reference.pnm&lt;/span&gt; is under the expat license.&lt;/li&gt;&lt;/ul&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a name=&quot;user-content-external-libraries&quot;&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;E&lt;/span&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;xternal libraries&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;FFmpeg can be combined with a number of external libraries, which sometimes affect the licensing of binaries resulting from the combination.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a name=&quot;user-content-compatible-libraries&quot;&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;C&lt;/span&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;ompatible libraries&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;The following libraries are under GPL:&lt;/span&gt;&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;frei0r&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;libcdio&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;librubberband&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;libvidstab&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;libx264&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;libx265&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;libxavs&lt;/li&gt;
&lt;li style=&quot; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;libxvid&lt;/li&gt;&lt;/ul&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;When combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by passing &lt;/span&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;--enable-gpl&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; to configure.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;The OpenCORE and VisualOn libraries are under the Apache License 2.0. That license is incompatible with the LGPL v2.1 and the GPL v2, but not with version 3 of those licenses. So to combine these libraries with FFmpeg, the license version needs to be upgraded by passing &lt;/span&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;--enable-version3&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; to configure.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a name=&quot;user-content-incompatible-libraries&quot;&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;I&lt;/span&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;ncompatible libraries&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;There are certain libraries you can combine with FFmpeg whose licenses are not compatible with the GPL and/or the LGPL. If you wish to enable these libraries, even in circumstances that their license may be incompatible, pass &lt;/span&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;--enable-nonfree&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; to configure. But note that if you enable any of these libraries the resulting binary will be under a complex license mix that is more restrictive than the LGPL and that may result in additional obligations. It is possible that these restrictions cause the resulting binary to be unredistributable.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;The Fraunhofer FDK AAC and OpenSSL libraries are under licenses which are incompatible with the GPLv2 and v3. To the best of our knowledge, they are compatible with the LGPL.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;The NVENC library, while its header file is licensed under the compatible MIT license, requires a proprietary binary blob at run time, and is deemed to be incompatible with the GPL. We are not certain if it is compatible with the LGPL, but we require &lt;/span&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;--enable-nonfree&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; even with LGPL configurations in case it is not.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;------------------------------ &lt;/span&gt;&lt;a href=&quot;https://github.com/Skycoder42/QHotkey/&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#007af4;&quot;&gt;QHotkey&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;Copyright (c) 2016, Felix Barz&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;All rights reserved.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;Redistribution and use in source and binary forms, with or without&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;modification, are permitted provided that the following conditions are met:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* Redistributions of source code must retain the above copyright notice, this&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt; list of conditions and the following disclaimer.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* Redistributions in binary form must reproduce the above copyright notice,&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt; this list of conditions and the following disclaimer in the documentation&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt; and/or other materials provided with the distribution.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;* Neither the name of QHotkey nor the names of its&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt; contributors may be used to endorse or promote products derived from&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt; this software without specific prior written permission.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &amp;quot;AS IS&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Mono'; font-size:10pt;&quot;&gt;OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="icon.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>AboutBox</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>AboutBox</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -0,0 +1,62 @@
#include "clipboardcopy.hpp"
#include <QClipboard>
#include <QMimeData>
#include <QClipboard>
#include <QApplication>
#include <QFile>
#include <QFileInfo>
#include <QString>
#include <QMimeDatabase>
#include <QPixmap>
#include <QTemporaryFile>
#include <QIODevice>
#include <QTextStream>
#include <QUrl>
#include <logger.hpp>
#include <io/ioutils.hpp>
#include <notifications.hpp>
#include <uploaders/uploadersingleton.hpp>
void clipboardcopy::copyClipboard() {
const QClipboard *clipboard = QApplication::clipboard();
const QMimeData *mimeData = clipboard->mimeData();
if(mimeData->hasImage()) {
QPixmap map = qvariant_cast<QPixmap>(mimeData->imageData());
UploaderSingleton::inst().upload(map, false);
} else if(mimeData->hasText()) {
#ifdef Q_OS_WIN
QUrl fileUrl(mimeData->text());
QFileInfo fileInfo(fileUrl.toLocalFile());
#else
QFileInfo fileInfo(mimeData->text());
#endif
if(fileInfo.exists() && fileInfo.isReadable() && fileInfo.isFile()) {
QMimeDatabase db;
QMimeType mimeType = db.mimeTypeForFile(fileInfo);
QString type = mimeType.name();
QFile file(fileInfo.absoluteFilePath());
UploaderSingleton::inst().upload(file);
} else if (fileInfo.exists() && fileInfo.isReadable() && fileInfo.isDir()) {
notifications::notify("KShare - Directory is not uploadable", fileInfo.absolutePath(), QSystemTrayIcon::Warning);
notifications::playSound(notifications::Sound::ERROR);
} else {
QTemporaryFile tmpFile;
tmpFile.setAutoRemove(true);
if(tmpFile.open()) {
QTextStream stream(&tmpFile);
stream.setCodec("UTF-8");
stream << mimeData->text();
stream.flush();
tmpFile.seek(0);
UploaderSingleton::inst().upload(tmpFile);
} else {
logger::warn("Can not open tmp file");
notifications::playSound(notifications::Sound::ERROR);
}
}
} else {
notifications::notify("Unsupported File Format", "Can not upload clipboard", QSystemTrayIcon::Warning);
notifications::playSound(notifications::Sound::ERROR);
}
}

View File

@ -0,0 +1,10 @@
#ifndef KSHARE_CLIPBOARDCOPY_HPP
#define KSHARE_CLIPBOARDCOPY_HPP
namespace clipboardcopy {
void copyClipboard();
}
#endif //KSHARE_CLIPBOARDCOPY_HPP

View File

@ -0,0 +1,42 @@
#include "colorpickerscene.hpp"
#include <QApplication>
#include <QClipboard>
#include <QGraphicsEllipseItem>
#include <QGraphicsPixmapItem>
#include <QGraphicsTextItem>
#include <QTimer>
#include <logger.hpp>
#include <screenoverlay/screenoverlayview.hpp>
#include <settings.hpp>
ColorPickerScene::ColorPickerScene(QPixmap pixmap, QWidget *parentWidget)
: ScreenOverlay(pixmap, parentWidget), ScreenOverlayView(this, parentWidget), image(pixmap.toImage()) {
setWindowTitle(tr("KShare Color Picker"));
setAttribute(Qt::WA_DeleteOnClose);
setCursor(Qt::BlankCursor);
activateWindow();
setGeometry(pixmap.rect());
ScreenOverlay::show();
}
void ColorPickerScene::keyPressEvent(QKeyEvent *event) {
color = image.pixelColor(cursorPos().toPoint());
if (event->key() == Qt::Key_Return) {
QApplication::clipboard()->setText(color.name());
logger::info(tr("Copied hex code to clipboard."));
}
if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Escape) close();
}
void ColorPickerScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *) {
color = image.pixelColor(cursorPos().toPoint());
QApplication::clipboard()->setText(color.name());
close();
logger::info(tr("Copied hex code to clipboard."));
}
QString ColorPickerScene::generateHint() {
color = image.pixelColor(cursorPos().toPoint());
return color.name();
}

View File

@ -5,28 +5,28 @@
#include <QGraphicsScene>
#include <QGraphicsSceneMouseEvent>
#include <QGraphicsTextItem>
#include <QGraphicsView>
#include <QKeyEvent>
#include <QTimer>
#include <screenshotutil.hpp>
#include <screenoverlay/screenoverlay.hpp>
#include <screenoverlay/screenoverlayview.hpp>
#include <utils.hpp>
class ColorPickerScene : public QGraphicsScene, public QGraphicsView {
class ColorPickerScene : public ScreenOverlay, public ScreenOverlayView {
Q_DECLARE_TR_FUNCTIONS(ColorPickerScene)
public:
ColorPickerScene(QPixmap pixmap, QWidget *parentWidget);
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
ColorPickerScene(QPixmap pixmap, QWidget *parent = nullptr);
void keyPressEvent(QKeyEvent *event) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent *) override;
static void showPicker() {
new ColorPickerScene(screenshotutil::fullscreen(), 0);
new ColorPickerScene(utils::fullscreen());
}
protected:
QString generateHint() override;
private:
QImage image;
QColor color;
QGraphicsEllipseItem *ellipse = 0;
QGraphicsPixmapItem *pItem = 0;
QGraphicsTextItem *text;
QGraphicsRectItem *textBackground;
};
#endif // COLORPICKERSCENE_HPP

View File

@ -8,22 +8,24 @@
#include <QScreen>
#include <QTimer>
#include <settings.hpp>
#include <utils.hpp>
CropEditor::CropEditor(QPixmap image, QObject *parent) : QObject(parent) {
scene = new CropScene(parent, image);
view = new CropView(scene);
qreal ratio = QApplication::primaryScreen()->devicePixelRatio();
view->raise();
QGraphicsPixmapItem *pixmapItem = new QGraphicsPixmapItem(image);
pixmapItem->setZValue(-1);
pixmapItem->setScale(1 / ratio);
scene->addItem(pixmapItem);
scene->setSceneRect(image.rect());
view->resize(image.width(), image.height());
view->setMinimumSize(image.size());
view->move(settings::settings().value("cropx", 0).toInt(), settings::settings().value("cropy", 0).toInt());
view->setWindowTitle("KShare Crop Editor");
view->show();
QPoint p = utils::smallestScreenCoordinate()
+ QPoint(settings::settings().value("cropx", 0).toInt(), settings::settings().value("cropy", 0).toInt());
view->move(p.x(), p.y());
view->setWindowTitle(tr("KShare Crop Editor"));
view->activateWindow();
scene->show();
connect(scene, &CropScene::closedWithRect, this, &CropEditor::crop);
}

View File

@ -0,0 +1,344 @@
// vim: set sw=4 tw=4 :
#include "cropscene.hpp"
#include "selectionrectangle.hpp"
#include <QApplication>
#include <QColorDialog>
#include <QFontDialog>
#include <QGraphicsPolygonItem>
#include <QGraphicsProxyWidget>
#include <QGraphicsSceneContextMenuEvent>
#include <QGraphicsView>
#include <QMenu>
#include <QMenuBar>
#include <QScreen>
#include <QTimer>
#include <cropeditor/drawing/arrowitem.hpp>
#include <cropeditor/drawing/bluritem.hpp>
#include <cropeditor/drawing/ellipseitem.hpp>
#include <cropeditor/drawing/eraseritem.hpp>
#include <cropeditor/drawing/highlighter.hpp>
#include <cropeditor/drawing/lineitem.hpp>
#include <cropeditor/drawing/pathitem.hpp>
#include <cropeditor/drawing/rectitem.hpp>
#include <cropeditor/drawing/textitem.hpp>
#include <cropeditor/settings/brushpenselection.hpp>
#include <functional>
#include <settings.hpp>
CropScene::CropScene(QObject *parent, QPixmap pixmap)
: ScreenOverlay(pixmap, parent), drawingSelectionMaker([] { return nullptr; }), prevButtons(Qt::NoButton),
_brush(Qt::SolidPattern), _font(settings::settings().value("font", QFont()).value<QFont>()) {
pen().setColor(settings::settings().value("penColor", pen().color()).value<QColor>());
pen().setCosmetic(settings::settings().value("penCosmetic", pen().isCosmetic()).toBool());
pen().setWidthF(settings::settings().value("penWidth", pen().widthF()).toReal());
brush().setColor(settings::settings().value("brushColor", brush().color()).value<QColor>());
brush().setStyle(
static_cast<Qt::BrushStyle>(settings::settings().value("brushStyle", static_cast<int>(Qt::SolidPattern)).toInt()));
setHighlight(settings::settings().value("highlightColor", QColor(Qt::cyan)).value<QColor>());
menu = new QMenuBar;
addDrawingAction(menu, tr("Free draw"), ":/icons/pencil.png", [] { return new PathItem; });
addDrawingAction(menu, tr("Blur"), ":/icons/blur.png", [] { return new BlurItem; });
addDrawingAction(menu, tr("Straight line"), ":/icons/line.png", [] { return new LineItem; });
addDrawingAction(menu, tr("Text"), ":/icons/text.png", [] { return new TextItem; });
addDrawingAction(menu, tr("Rectangle"), ":/icons/rectangle.png", [] { return new RectItem; });
addDrawingAction(menu, tr("Highlighter"), ":/icons/highlighter.png", [] { return new Highlighter; });
addDrawingAction(menu, tr("Ellipse"), ":/icons/circle.png", [] { return new EllipseItem; });
addDrawingAction(menu, tr("Arrow"), ":/icons/arrow.png", [] { return new ArrowItem; });
menu->addSeparator();
addDrawingAction(menu, tr("Eraser"), ":/icons/erase.png", [] { return new EraserItem; });
QAction *clear = menu->addAction("");
clear->setToolTip(tr("Clear all drawing"));
clear->setIcon(QIcon(":/icons/delete.png"));
connect(clear, &QAction::triggered, [&] {
auto its = items();
for (auto i : its) {
if (i != polyItem && i != rect && i->zValue() != -1 && i != proxyMenu && i != hint && i->zValue() != 199) {
removeItem(i);
}
}
});
addDrawingAction(menu, tr("None"), ":/icons/crop.png", [] { return nullptr; });
menu->addSeparator();
QAction *settings = menu->addAction("");
settings->setToolTip(tr("Settings"));
settings->setIcon(QIcon(":/icons/settings.png"));
connect(settings, &QAction::triggered, [&] {
hide();
BrushPenSelection(this).exec();
show();
});
menu->addSeparator();
display = menu->addAction(drawingName);
display->setDisabled(true);
QAction *fonts = menu->addAction("");
fonts->setIcon(QIcon(":/icons/fontsettings.png"));
connect(fonts, &QAction::triggered, this, &CropScene::fontAsk);
menu->addAction(fonts);
menu->addSeparator();
QAction *confirm = menu->addAction("");
confirm->setToolTip(tr("Confirm"));
confirm->setIcon(QIcon(":/icons/accept.png"));
connect(confirm, &QAction::triggered, [this] { done(true); });
menu->addAction(confirm);
QAction *cancel = menu->addAction("");
cancel->setToolTip(tr("Cancel"));
cancel->setIcon(QIcon(":/icons/cancel.png"));
connect(cancel, &QAction::triggered, [this] { done(false); });
menu->addAction(cancel);
addItem(hint);
hint->setPos(5, 5);
hint->setZValue(2);
hint->setVisible(settings::settings().value("crophint", true).toBool());
QPolygonF poly;
QRect prect = pixmap.rect();
poly.append(prect.topLeft());
poly.append(prect.topRight());
poly.append(prect.bottomRight());
poly.append(prect.bottomLeft());
polyItem = new QGraphicsPolygonItem(poly);
polyItem->setBrush(QBrush(QColor(0, 0, 0, settings::settings().value("overlayAlpha", 96).toInt())));
polyItem->setPen(QPen(Qt::NoPen));
polyItem->setZValue(1);
addItem(polyItem);
auto widget = addWidget(menu);
widget->setFlag(QGraphicsItem::ItemIsMovable, true);
widget->setZValue(100);
widget->setPos(100, 100);
proxyMenu = widget;
QTimer::singleShot(0, [&, widget] {
auto screen = QApplication::primaryScreen();
int w = screen->geometry().width();
widget->setPos(views()[0]->mapToScene(
QPoint(screen->geometry().x() + (w - widget->boundingRect().width()) / 2, screen->geometry().y() + 100)));
setGrid(settings::settings().value("gridEnabled", true).toBool());
});
}
CropScene::~CropScene() {
delete drawingSelection;
}
QPen &CropScene::pen() {
return _pen;
}
QBrush &CropScene::brush() {
return _brush;
}
QFont &CropScene::font() {
return _font;
}
void CropScene::setDrawingSelection(QString name, std::function<DrawItem *()> drawAction) {
if (drawingSelection) {
delete drawingSelection;
drawingSelection = 0;
}
this->setFocus();
drawingSelectionMaker = drawAction;
drawingSelection = drawAction();
drawingName = name;
display->setText(drawingName);
if (drawingSelection)
if (!drawingSelection->init(this)) setDrawingSelection(tr("None"), [] { return nullptr; });
menu->adjustSize();
auto screen = QApplication::primaryScreen();
int w = screen->geometry().width();
proxyMenu->setPos(views()[0]->mapToScene(
QPoint(screen->geometry().x() + (w - proxyMenu->boundingRect().width()) / 2, screen->geometry().y() + 100)));
}
QGraphicsItem *CropScene::whichItem(QPointF scenePos) {
for (auto item : items()) {
if (item->sceneBoundingRect().contains(scenePos))
if (item != polyItem && item != rect && item->zValue() != 199 && item->zValue() != -1) return item;
}
return nullptr;
}
void CropScene::fontAsk() {
hide();
bool ok = false;
QFont font = QFontDialog::getFont(&ok, this->font(), this->views()[0], "Font to use");
if (ok) _font = font;
show();
}
void CropScene::mouseMoved(QGraphicsSceneMouseEvent *e, QPointF cursorPos, QPointF delta) {
hint->setVisible(settings::settings().value("crophint").toBool() && !hint->sceneBoundingRect().contains(cursorPos));
if (rect && !drawingRect) {
// qAbs(e->scenePos().<axis>() - rect->rect().<edge>()) < 10
bool close = false;
QRectF newRect = rect->rect();
if (qAbs(e->scenePos().x() - rect->rect().right()) < 10) {
if (qAbs(e->scenePos().y() - rect->rect().bottom()) < 10) {
close = true;
views()[0]->setCursor(Qt::SizeFDiagCursor);
if (e->buttons() & Qt::LeftButton) newRect.setBottomRight(cursorPos);
} else if (qAbs(e->scenePos().y() - rect->rect().top()) < 10) {
close = true;
views()[0]->setCursor(Qt::SizeBDiagCursor);
if (e->buttons() & Qt::LeftButton) newRect.setTopRight(cursorPos);
}
} else if (qAbs(e->scenePos().x() - rect->rect().left()) < 10) {
if (qAbs(e->scenePos().y() - rect->rect().top()) < 10) {
close = true;
views()[0]->setCursor(Qt::SizeFDiagCursor);
if (e->buttons() & Qt::LeftButton) newRect.setTopLeft(cursorPos);
} else if (qAbs(e->scenePos().y() - rect->rect().bottom()) < 10) {
close = true;
views()[0]->setCursor(Qt::SizeBDiagCursor);
if (e->buttons() & Qt::LeftButton) newRect.setBottomLeft(cursorPos);
}
}
if (!close) {
views()[0]->setCursor(Qt::BlankCursor);
} else {
rect->setRect(newRect);
prevButtons = e->buttons();
updatePoly();
return;
}
}
auto buttons = e->buttons();
if (e->modifiers() & Qt::ControlModifier && buttons == Qt::LeftButton) {
auto item = whichItem(cursorPos);
if (item) item->moveBy(delta.x(), delta.y());
return;
}
if (buttons == Qt::LeftButton) {
if (!proxyMenu->sceneBoundingRect().contains(cursorPos)) {
if (drawingSelection) {
drawingSelection->mouseDragEvent(e, this);
} else {
QPointF p = cursorPos;
if (!drawingRect || rect == nullptr) {
if (rect) {
delete rect;
rect = nullptr;
}
drawingRect = true;
rect = new SelectionRectangle(p.x(), p.y(), 1, 1);
initPos = p;
QPen pen(Qt::NoBrush, 1);
pen.setColor(highlight());
rect->setPen(pen);
rect->setZValue(1);
addItem(rect);
} else {
if (prevButtons == Qt::NoButton && !keyboardActiveSelection()) {
initPos = p;
rect->setRect(p.x(), p.y(), 1, 1);
} else {
rect->setRect(QRect(qMin(initPos.x(), p.x()), qMin(initPos.y(), p.y()),
qAbs(initPos.x() - p.x()), qAbs(initPos.y() - p.y())));
}
}
updatePoly();
}
}
}
prevButtons = buttons;
setMagVisibility(!proxyMenu->sceneBoundingRect().contains(cursorPos));
}
void CropScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *e) {
drawingRect = false;
if (drawingSelection) {
drawingSelection->mouseDragEndEvent(e, this);
setDrawingSelection(drawingName, drawingSelectionMaker);
} else if (!proxyMenu->sceneBoundingRect().contains(e->scenePos()) && settings::settings().value("quickMode", false).toBool()) {
done(true);
}
prevButtons = Qt::NoButton;
if (e->modifiers() & Qt::ControlModifier) e->accept();
QGraphicsScene::mouseReleaseEvent(e);
}
void CropScene::mousePressEvent(QGraphicsSceneMouseEvent *e) {
if (e->modifiers() & Qt::AltModifier) {
auto item = whichItem(cursorPos());
if (item && item != proxyMenu) removeItem(item);
}
if (e->modifiers() & Qt::ControlModifier) e->accept();
QGraphicsScene::mousePressEvent(e);
}
void CropScene::addDrawingAction(QMenuBar *menu, QString name, QString icon, std::function<DrawItem *()> item) {
QAction *action = menu->addAction("");
action->setToolTip(name);
action->setIcon(QIcon(icon));
connect(action, &QAction::triggered, [this, item, name](bool) { setDrawingSelection(name, item); });
}
void CropScene::keyReleaseEvent(QKeyEvent *event) {
if (((event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) && !drawingSelection) || event->key() == Qt::Key_Escape)
done(event->key() != Qt::Key_Escape);
else if (event->key() == Qt::Key_F1) {
bool enabled = !settings::settings().value("crophint", true).toBool();
hint->setVisible(enabled);
settings::settings().setValue("crophint", enabled);
}
if (event->modifiers() & Qt::ControlModifier) event->accept();
}
void CropScene::updatePoly() {
QPolygonF poly;
QPointF theMagicWikipediaPoint(rect->rect().right(), sceneRect().bottom());
poly << sceneRect().topLeft();
poly << sceneRect().topRight();
poly << sceneRect().bottomRight();
poly << theMagicWikipediaPoint;
poly << rect->rect().bottomRight();
poly << rect->rect().topRight();
poly << rect->rect().topLeft();
poly << rect->rect().bottomLeft();
poly << rect->rect().bottomRight();
poly << theMagicWikipediaPoint;
poly << sceneRect().bottomLeft();
poly << sceneRect().topLeft();
this->polyItem->setPolygon(poly);
}
void CropScene::done(bool notEsc) {
if (notEsc && rect) {
QRectF rect2 = rect->rect();
hint->setVisible(false);
rect->setRect(QRect(-100, -100, 0, 0));
proxyMenu->setVisible(false);
hideMag();
emit closedWithRect(rect2.toRect());
} else
emit closedWithRect(QRect());
}
QString CropScene::generateHint() {
QString rectStr("(-1, -1, 0, 0)");
if (rect) {
rectStr = "(%0, %1, %2, %3)";
rectStr = rectStr.arg(qRound(rect->rect().x()))
.arg(qRound(rect->rect().y()))
.arg(qRound(rect->rect().width()))
.arg(qRound(rect->rect().height()));
}
return QString("ptr: (%0, %1)\nsel: %2").arg(qRound(cursorPos().x())).arg(qRound(cursorPos().y())).arg(rectStr);
}

View File

@ -0,0 +1,87 @@
#ifndef CROPSCENE_HPP
#define CROPSCENE_HPP
#include <QFont>
#include <QGraphicsScene>
#include <QGraphicsSceneContextMenuEvent>
#include <QGraphicsSceneMouseEvent>
#include <QKeyEvent>
#include <QMenu>
#include <QMenuBar>
#include <cropeditor/selectionrectangle.hpp>
#include <functional>
#include <screenoverlay/screenoverlay.hpp>
#include <screenoverlay/screenoverlayview.hpp>
#include <utils.hpp>
class CropScene;
#include <cropeditor/drawing/drawitem.hpp>
class CropScene : public ScreenOverlay {
Q_OBJECT
public:
CropScene(QObject *parent, QPixmap pixmap);
~CropScene();
QPen &pen();
QBrush &brush();
QFont &font();
void setDrawingSelection(QString name, std::function<DrawItem *()> drawAction);
QGraphicsPolygonItem *polyItm() {
return polyItem;
}
QGraphicsRectItem *selRect() {
return rect;
}
QGraphicsItem *whichItem(QPointF scenePos);
void setVisible(bool visible);
public slots:
void fontAsk();
signals:
void closedWithRect(QRect rect);
protected:
void mouseMoved(QGraphicsSceneMouseEvent *e, QPointF cursorPos, QPointF delta) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent *e) override;
void mousePressEvent(QGraphicsSceneMouseEvent *e) override;
void keyReleaseEvent(QKeyEvent *e) override;
QString generateHint() override;
private slots:
void done(bool notEsc = true);
private:
void updatePoly();
void addDrawingAction(QMenuBar *menu, QString name, QString icon, std::function<DrawItem *()> item);
std::function<DrawItem *()> drawingSelectionMaker;
QFlags<Qt::MouseButton> prevButtons;
QGraphicsRectItem *rect = nullptr;
bool drawingRect = true;
QPointF initPos;
QPen _pen;
QBrush _brush;
QFont _font;
QGraphicsPolygonItem *polyItem = nullptr;
DrawItem *drawingSelection = nullptr;
QMenuBar *menu = nullptr;
QGraphicsProxyWidget *proxyMenu = nullptr;
QString drawingName = "None";
QAction *display;
QGraphicsPixmapItem *hint
= new QGraphicsPixmapItem(utils::renderText(tr( //
"Press F1 to toggle this hint\n"
"\tHold Shift to slow the cursor down\n"
"\tCtrl+Drag a thing to move it around\n"
"\tAlt+Click a drawing to remove it\n"
"\tPress Return/Enter to finish\n"
"\tPress ESC to cancel\n"
"\tUse the menu bar to draw\n"
"\tNOTE: You must select 'Crop' before closing the editor\n"
"\tIf you do not it will not close."),
5,
QColor(0, 0, 0, 125),
Qt::white));
};
#endif // CROPSCENE_HPP

View File

@ -0,0 +1,20 @@
#include "cropview.hpp"
#include <settings.hpp>
#include <utils.hpp>
CropView::CropView(QGraphicsScene *scene) : ScreenOverlayView(scene) {
setCursor(Qt::BlankCursor);
}
CropView::~CropView() {
}
void CropView::showEvent(QShowEvent *) {
QPoint p = utils::smallestScreenCoordinate()
+ QPoint(settings::settings().value("cropx", 0).toInt(), settings::settings().value("cropy", 0).toInt());
if (QApplication::screens().size() == 1) showFullScreen();
move(p);
setWindowTitle(tr("KShare Crop Editor"));
activateWindow();
}

View File

@ -0,0 +1,18 @@
#ifndef CROPVIEW_HPP
#define CROPVIEW_HPP
#include <QCoreApplication>
#include <QKeyEvent>
#include <screenoverlay/screenoverlayview.hpp>
class CropView : public ScreenOverlayView {
Q_DECLARE_TR_FUNCTIONS(CropScene)
public:
CropView(QGraphicsScene *scene);
~CropView();
protected:
void showEvent(QShowEvent *e) override;
};
#endif // CROPVIEW_HPP

View File

@ -2,9 +2,9 @@
#include <QtMath>
#include <settings.hpp>
void ArrowItem::mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) {
void ArrowItem::mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) {
if (init.isNull()) {
init = e->scenePos();
init = scene->cursorPos();
line = scene->addLine(QLineF(init, init), scene->pen());
QPainterPath poly;
qreal w = settings::settings().value("arrow/width", 20).toDouble() / 2;
@ -14,8 +14,9 @@ void ArrowItem::mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) {
poly.lineTo(QPoint(w, h));
head = scene->addPath(poly, scene->pen(), scene->brush());
} else {
line->setLine(QLineF(init, e->scenePos()));
head->setRotation(270 + qRadiansToDegrees(qAtan2((init.y() - e->scenePos().y()), (init.x() - e->scenePos().x()))));
line->setLine(QLineF(init, scene->cursorPos()));
head->setRotation(
270 + qRadiansToDegrees(qAtan2((init.y() - scene->cursorPos().y()), (init.x() - scene->cursorPos().x()))));
}
head->setPos(e->scenePos());
head->setPos(scene->cursorPos());
}

View File

@ -11,7 +11,7 @@ public:
QString name() override {
return "Arrow";
}
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) override;
void mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) override;
void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override {
}

View File

@ -9,26 +9,28 @@ bool BlurItem::init(CropScene *) {
blurHints.setFlag(QGraphicsBlurEffect::PerformanceHint, settings::settings().value("blur/performanceHint", true).toBool());
blurHints.setFlag(QGraphicsBlurEffect::QualityHint, settings::settings().value("blur/qualityHint", false).toBool());
effect->setBlurHints(blurHints);
effect->setBlurRadius(settings::settings().value("blurRadius", 5.).toDouble());
effect->setBlurRadius(settings::settings().value("blur/radius", 5.).toDouble());
return true;
}
void BlurItem::mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) {
void BlurItem::mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) {
if (pos.isNull()) {
pos = e->scenePos();
rect = scene->addRect(QRect(e->scenePos().toPoint(), QSize(1, 1)), QPen(Qt::cyan), Qt::NoBrush);
pos = scene->cursorPos();
rect = scene->addRect(QRect(scene->cursorPos().toPoint(), QSize(1, 1)), QPen(scene->highlight()), Qt::NoBrush);
pixmap = scene->addPixmap(scene->pixmap().copy(rect->rect().toRect()));
pixmap->setPos(e->scenePos());
pixmap->setZValue(rect->zValue() - 0.1);
pixmap->setPos(scene->cursorPos());
pixmap->setGraphicsEffect(effect);
} else {
QPointF p = e->scenePos();
QPointF p = scene->cursorPos();
rect->setRect(QRect(qMin(pos.x(), p.x()), qMin(pos.y(), p.y()), qAbs(pos.x() - p.x()), qAbs(pos.y() - p.y())));
pixmap->setPixmap(scene->pixmap().copy(rect->rect().toRect()));
auto area = rect->rect();
if (area.width() > 1 && area.height() > 1 && area.top() > 1 && area.left() > 1)
pixmap->setPixmap(scene->pixmap().copy(rect->rect().toRect()));
pixmap->setPos(rect->rect().topLeft());
}
}
void BlurItem::mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) {
if (rect != nullptr) rect->setPen(Qt::NoPen);
delete rect;
rect = 0;
}

View File

@ -7,20 +7,20 @@
class BlurItem : public DrawItem {
public:
QString name() {
QString name() override {
return "Blur";
}
~BlurItem() {
}
bool init(CropScene *) override;
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) override;
void mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) override;
void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override;
private:
QGraphicsBlurEffect *effect;
QPointF pos;
QGraphicsRectItem *rect;
QGraphicsRectItem *rect = 0;
QGraphicsPixmapItem *pixmap;
};

View File

@ -0,0 +1,12 @@
#include "ellipseitem.hpp"
void EllipseItem::mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) {
if (!ellie) {
ellie = scene->addEllipse(scene->cursorPos().x(), scene->cursorPos().y(), 0, 0, scene->pen(), scene->brush());
initPos = scene->cursorPos();
} else {
auto p = scene->cursorPos();
ellie->setRect(QRectF(qMin(initPos.x(), p.x()), qMin(initPos.y(), p.y()), qAbs(initPos.x() - p.x()),
qAbs(initPos.y() - p.y())));
}
}

View File

@ -7,12 +7,12 @@ class EllipseItem : public DrawItem {
public:
EllipseItem() {
}
QString name() {
QString name() override {
return "Blur";
}
~EllipseItem() {
}
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) override;
void mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) override;
void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override {
}

View File

@ -0,0 +1,16 @@
#include "eraseritem.hpp"
EraserItem::EraserItem() {
}
EraserItem::~EraserItem() {
}
void EraserItem::mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) {
for (auto i : scene->items()) {
if (i->contains(scene->cursorPos()) && i->zValue() != -1 && i != scene->polyItm() && i != scene->selRect()) {
scene->removeItem(i);
break;
}
}
}

View File

@ -10,7 +10,7 @@ public:
QString name() override {
return "Eraser";
}
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) override;
void mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) override;
void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override {
}
};

View File

@ -0,0 +1,37 @@
#include "highlighter.hpp"
#include <QImage>
void Highlighter::mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) {
if (pos.isNull()) {
pos = scene->cursorPos();
rect = scene->addRect(QRect(scene->cursorPos().toPoint(), QSize(1, 1)), QPen(scene->highlight()), Qt::NoBrush);
pixmap = scene->addPixmap(scene->pixmap().copy(rect->rect().toRect()));
pixmap->setPos(scene->cursorPos());
} else {
QPointF p = scene->cursorPos();
rect->setRect(QRect(qMin(pos.x(), p.x()), qMin(pos.y(), p.y()), qAbs(pos.x() - p.x()), qAbs(pos.y() - p.y())));
auto area = rect->rect();
if (area.width() > 1 && area.height() > 1 && area.top() > 1 && area.left() > 1) {
// toImage conversion needed for access to the underlying image data for altering
auto pm = scene->pixmap().copy(rect->rect().toRect()).toImage();
if (pm.format() != QImage::Format_RGB32) {
pm = pm.convertToFormat(QImage::Format_RGB32);
}
for (int y = 0; y < pm.height(); y++) {
QRgb *line = (QRgb *)pm.scanLine(y);
for (int x = 0; x < pm.width(); x++) {
QRgb &pix = line[x];
pix = qRgb(qMin(255, qRed(pix)), qMin(255, qGreen(pix)), 0);
}
}
pixmap->setPixmap(QPixmap::fromImage(pm));
}
pixmap->setPos(rect->rect().topLeft());
}
}
void Highlighter::mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) {
delete rect;
rect = 0;
}

View File

@ -0,0 +1,21 @@
#ifndef HIGHLIGHTER_HPP
#define HIGHLIGHTER_HPP
#include "drawitem.hpp"
#include <QPointF>
class Highlighter : public DrawItem {
public:
QString name() override {
return "Highlighter";
}
void mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) override;
void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override;
private:
QPointF pos;
QGraphicsRectItem *rect = 0;
QGraphicsPixmapItem *pixmap;
};
#endif /* HIGHLIGHTER_HPP */

View File

@ -3,12 +3,12 @@
LineItem::LineItem() {
}
void LineItem::mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) {
void LineItem::mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) {
if (init.isNull()) {
init = e->scenePos();
init = scene->cursorPos();
line = scene->addLine(QLineF(init, init), scene->pen());
} else {
line->setLine(QLineF(init, e->scenePos()));
line->setLine(QLineF(init, scene->cursorPos()));
}
}

View File

@ -9,7 +9,7 @@ public:
QString name() override {
return "Straight line";
}
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) override;
void mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) override;
void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override;
private:

View File

@ -9,13 +9,13 @@ PathItem::~PathItem() {
delete path;
}
void PathItem::mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) {
void PathItem::mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) {
if (path == nullptr) {
path = new QPainterPath(e->scenePos());
path = new QPainterPath(scene->cursorPos());
pathItem = scene->addPath(*path, scene->pen(),
settings::settings().value("brushPath", false).toBool() ? scene->brush() : QBrush());
} else {
path->quadTo(path->currentPosition(), e->scenePos());
path->quadTo(path->currentPosition(), scene->cursorPos());
pathItem->setPath(*path);
}
}

View File

@ -11,7 +11,7 @@ public:
QString name() {
return "Path";
}
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene);
void mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene);
void mouseDragEndEvent(QGraphicsSceneMouseEvent *e, CropScene *scene);
private:

View File

@ -6,14 +6,14 @@ RectItem::RectItem() {
RectItem::~RectItem() {
}
void RectItem::mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) {
void RectItem::mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) {
if (!rect) {
rect = scene->addRect(e->scenePos().x(), e->scenePos().y(), 0, 0);
rect = scene->addRect(scene->cursorPos().x(), scene->cursorPos().y(), 0, 0);
rect->setBrush(scene->brush());
rect->setPen(scene->pen());
initPos = e->scenePos();
initPos = scene->cursorPos();
} else {
auto p = e->scenePos();
auto p = scene->cursorPos();
rect->setRect(
QRect(qMin(initPos.x(), p.x()), qMin(initPos.y(), p.y()), qAbs(initPos.x() - p.x()), qAbs(initPos.y() - p.y())));
}

View File

@ -10,7 +10,7 @@ public:
QString name() override {
return "Rectangle";
}
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) override;
void mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) override;
void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override;
private:

View File

@ -5,20 +5,21 @@
bool TextItem::init(CropScene *s) {
bool ok;
s->hide();
text = QInputDialog::getText(nullptr, "Text to add", "Input", QLineEdit::Normal, QString(), &ok);
text = QInputDialog::getText(nullptr, tr("Text to add"), tr("Input"), QLineEdit::Normal, QString(), &ok);
s->show();
return ok;
}
void TextItem::mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) {
void TextItem::mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) {
if (!textItem) {
textItem = scene->addSimpleText(text, scene->font());
textItem->setPos(e->scenePos());
textItem->setPos(scene->cursorPos());
textItem->setPen(scene->pen().color());
textItem->setBrush(scene->pen().color());
} else {
auto ee
= 180 + qRadiansToDegrees(qAtan2((textItem->pos().y() - e->scenePos().y()), (textItem->pos().x() - e->scenePos().x())));
auto ee = 180
+ qRadiansToDegrees(qAtan2((textItem->pos().y() - scene->cursorPos().y()),
(textItem->pos().x() - scene->cursorPos().x())));
textItem->setRotation(ee);
}
}

View File

@ -2,13 +2,15 @@
#define TEXTITEM_HPP
#include "drawitem.hpp"
#include <QApplication>
#include <QGraphicsSimpleTextItem>
class TextItem : public DrawItem {
Q_DECLARE_TR_FUNCTIONS(TextItem)
public:
QString name() override;
bool init(CropScene *s) override;
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) override;
void mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) override;
void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override;
private:

View File

@ -0,0 +1,42 @@
#include "selectionrectangle.hpp"
#include <QGraphicsScene>
#include <QGraphicsSceneMouseEvent>
#include <QGraphicsView>
SelectionRectangle::SelectionRectangle() {
}
SelectionRectangle::SelectionRectangle(qreal x, qreal y, qreal w, qreal h, QGraphicsItem *parent)
: QGraphicsRectItem(x, y, w, h, parent) {
}
SelectionRectangle::SelectionRectangle(QRectF rect, QGraphicsItem *parent)
: SelectionRectangle(rect.left(), rect.top(), rect.width(), rect.height(), parent) {
}
void SelectionRectangle::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *widget) {
QRect rect = this->rect().toRect();
if (rect.height() > 30 && rect.width() > 30) {
painter->setPen(Qt::NoPen);
painter->setBrush(pen().color());
// Before you panick, the <angle> * 16 things are needed because here angles are 1/16th of their value
// The <x/y> - 10 is accounting for sizes.
// Trail and error ftw
// Bottom left
painter->drawPie(rect.left() - 10, rect.bottom() - 10, 20, 20, 0, 90 * 16);
// Top right
painter->drawPie(rect.right() - 10, rect.bottom() - 10, 20, 20, 90 * 16, 90 * 16);
// Top left
painter->drawPie(rect.left() - 10, rect.top() - 10, 20, 20, 270 * 16, 90 * 16);
// Top right
painter->drawPie(rect.right() - 10, rect.top() - 10, 20, 20, 180 * 16, 90 * 16);
}
painter->setBrush(brush());
painter->setPen(pen());
QGraphicsRectItem::paint(painter, options, widget);
}

View File

@ -0,0 +1,17 @@
#ifndef SELECTIONRECTANGLE_HPP
#define SELECTIONRECTANGLE_HPP
#include <QGraphicsRectItem>
#include <QPainter>
class SelectionRectangle : public QGraphicsRectItem {
public:
SelectionRectangle();
explicit SelectionRectangle(qreal x, qreal y, qreal w, qreal h, QGraphicsItem *parent = nullptr);
explicit SelectionRectangle(QRectF rect, QGraphicsItem *parent = nullptr);
protected:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *widget) override;
};
#endif // SELECTIONRECTANGLE_HPP

Some files were not shown because too many files have changed in this diff Show More