Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e7e148127 | ||
|
|
afb6f5d374 | ||
|
|
b054fad57b | ||
|
|
3c62fb941a | ||
|
|
ced75acffd | ||
|
|
62f5150429 | ||
|
|
d1d895e65b | ||
|
|
4ec858cfc2 | ||
|
|
6945a69e57 | ||
|
|
3dbd0a97e6 | ||
|
|
0f14e9d570 | ||
|
|
7e34bfdb39 | ||
|
|
1df4276bfc | ||
|
|
9911356fe9 | ||
|
|
caa9d6ca77 | ||
|
|
6c3094088c | ||
|
|
d83f2a90aa | ||
|
|
d7b7a685ee | ||
|
|
fc1f7e8cdd | ||
|
|
73ebe3f85e | ||
|
|
e35bb2a3d5 | ||
|
|
bce032f974 | ||
|
|
11cf3364da | ||
|
|
db02b3e9e3 | ||
|
|
42cd3ce665 | ||
|
|
616c617363 | ||
|
|
06fd8e057a | ||
|
|
54ed6d2f02 | ||
|
|
98fa26d7a8 | ||
|
|
16b81ebf0b | ||
|
|
e6b0749ebd | ||
|
|
6f8bd22e2e | ||
|
|
7141809c7e | ||
|
|
ac1becd587 | ||
|
|
1f0701f450 | ||
|
|
5293f8b339 | ||
|
|
2a4746cdf2 | ||
|
|
4115b4e0c2 | ||
|
|
b935d27b89 | ||
|
|
0e70b19212 | ||
|
|
7a982a0453 | ||
|
|
efa5f30b8d | ||
|
|
917fdac0b8 | ||
|
|
c029096d11 | ||
|
|
8d35502f84 | ||
|
|
b14b56f079 | ||
|
|
51533433c1 | ||
|
|
1648a47ba7 | ||
|
|
397959f134 | ||
|
|
fa39c04a93 | ||
|
|
abee585ef9 | ||
|
|
2df404dd92 | ||
|
|
fc1009528e | ||
|
|
a93070f4de | ||
|
|
83b51369ae | ||
|
|
e35af90d58 | ||
|
|
a84ff57cba | ||
|
|
5ffc1bed64 | ||
|
|
0b2bf24645 | ||
|
|
cc32d1cd2f | ||
|
|
faa6ee5aa9 | ||
|
|
87b0d75767 | ||
|
|
526697d2f7 | ||
|
|
1b7f177ee0 | ||
|
|
816b86c170 | ||
|
|
9d4c41442f | ||
|
|
a973982976 | ||
|
|
130f73b5c5 | ||
|
|
ce21872bee | ||
|
|
26a4767680 | ||
|
|
81266cc1d5 | ||
|
|
9f47985e53 | ||
|
|
dfd71e4a21 | ||
|
|
b057d15631 | ||
|
|
d22f381a8c |
@@ -0,0 +1,477 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
build
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.tlog
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*.json
|
||||
coverage*.xml
|
||||
coverage*.info
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
|
||||
*.vbp
|
||||
|
||||
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||
*.dsw
|
||||
*.dsp
|
||||
|
||||
# Visual Studio 6 technical files
|
||||
*.ncb
|
||||
*.aps
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# Visual Studio History (VSHistory) files
|
||||
.vshistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
||||
# VS Code files for those working on multiple tools
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Windows Installer files from build outputs
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/cmake
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=cmake
|
||||
|
||||
### CMake ###
|
||||
CMakeLists.txt.user
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
CMakeScripts
|
||||
Testing
|
||||
Makefile
|
||||
cmake_install.cmake
|
||||
install_manifest.txt
|
||||
compile_commands.json
|
||||
CTestTestfile.cmake
|
||||
_deps
|
||||
|
||||
### CMake Patch ###
|
||||
# External projects
|
||||
*-prefix/
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/cmake
|
||||
!/Makefile
|
||||
|
||||
# C++ objects and libs
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.a
|
||||
*.la
|
||||
*.lai
|
||||
*.so
|
||||
*.so.*
|
||||
*.dll
|
||||
*.dylib
|
||||
|
||||
# Qt-es
|
||||
object_script.*.Release
|
||||
object_script.*.Debug
|
||||
*_plugin_import.cpp
|
||||
/.qmake.cache
|
||||
/.qmake.stash
|
||||
*.pro.user
|
||||
*.pro.user.*
|
||||
*.qbs.user
|
||||
*.qbs.user.*
|
||||
*.moc
|
||||
moc_*.cpp
|
||||
moc_*.h
|
||||
qrc_*.cpp
|
||||
ui_*.h
|
||||
*.qmlc
|
||||
*.jsc
|
||||
Makefile*
|
||||
*build-*
|
||||
*.prl
|
||||
|
||||
# Qt unit tests
|
||||
target_wrapper.*
|
||||
|
||||
# QtCreator
|
||||
*.autosave
|
||||
|
||||
# QtCreator Qml
|
||||
*.qmlproject.user
|
||||
*.qmlproject.user.*
|
||||
|
||||
# QtCreator CMake
|
||||
CMakeLists.txt.user*
|
||||
|
||||
# QtCreator 4.8< compilation database
|
||||
compile_commands.json
|
||||
|
||||
# QtCreator local machine specific files for imported projects
|
||||
*creator.user*
|
||||
|
||||
[Bb]uild/
|
||||
.vscode/
|
||||
.vs/
|
||||
|
After Width: | Height: | Size: 80 KiB |
@@ -0,0 +1,90 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(NotePad-- VERSION 1.22.0)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets Concurrent Network PrintSupport XmlPatterns)
|
||||
|
||||
# qscint 关键依赖库
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/src/qscint)
|
||||
|
||||
# 插件库包含
|
||||
# helloworld 动态插件库
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/src/plugin/helloworld)
|
||||
|
||||
# win下需要开启UNICODE进行支持TCHAR
|
||||
if(CMAKE_HOST_WIN32)
|
||||
add_definitions(-D_UNICODE -DUNICODE)
|
||||
endif()
|
||||
|
||||
|
||||
if(${PLUGIN_EN})
|
||||
if(${PLUGIN_EN} STREQUAL on)
|
||||
add_definitions(-DNO_PLUGIN=1)
|
||||
endif(${PLUGIN_EN})
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
file(GLOB UI_SRC ${PROJECT_SOURCE_DIR}/src/*.ui)
|
||||
set(UI_SRC ${UI_SRC} ${PROJECT_SOURCE_DIR}/src/cceditor/ccnotepad.ui)
|
||||
aux_source_directory(${PROJECT_SOURCE_DIR}/src SRC)
|
||||
aux_source_directory(${PROJECT_SOURCE_DIR}/src/cceditor SRC)
|
||||
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
# 添加 WIN32 保证主程序启动没有命令行
|
||||
list(APPEND WIN_RCS ${PROJECT_SOURCE_DIR}/src/RealCompareToMinGw.rc)
|
||||
add_executable(${PROJECT_NAME} WIN32 ${WIN_RCS} ${SRC} ${UI_SRC} ${PROJECT_SOURCE_DIR}/src/RealCompare.qrc)
|
||||
else()
|
||||
add_executable(${PROJECT_NAME} ${SRC} ${UI_SRC} ${PROJECT_SOURCE_DIR}/src/RealCompare.qrc)
|
||||
endif()
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src
|
||||
${PROJECT_SOURCE_DIR}/src/cceditor
|
||||
|
||||
${PROJECT_SOURCE_DIR}/src/qscint/src
|
||||
${PROJECT_SOURCE_DIR}/src/qscint/src/Qsci
|
||||
${PROJECT_SOURCE_DIR}/src/qscint/scintilla/src
|
||||
${PROJECT_SOURCE_DIR}/src/qscint/scintilla/include
|
||||
${PROJECT_SOURCE_DIR}/src/qscint/scintilla/lexlib
|
||||
${PROJECT_SOURCE_DIR}/src/qscint/scintilla/boostregex
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} qscint Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Concurrent Qt5::Network Qt5::PrintSupport Qt5::XmlPatterns)
|
||||
|
||||
# set(PROJECT_BINARY_DIR "${PROJECT_BINARY_DIR}/bin")
|
||||
# set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||
|
||||
if(CMAKE_HOST_UNIX)
|
||||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
DESTINATION "bin"
|
||||
)
|
||||
|
||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/src/linux/usr
|
||||
DESTINATION "/")
|
||||
|
||||
include(${PROJECT_SOURCE_DIR}/cmake/deb_package_config.cmake)
|
||||
include(CPack)
|
||||
elseif(CMAKE_HOST_WIN32)
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
DESTINATION "/")
|
||||
|
||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/build/bin/
|
||||
DESTINATION "/")
|
||||
# 设置软件版本
|
||||
set(CPACK_PACKAGE_NAME "NotePad--")
|
||||
set(CPACK_PACKAGE_DESCRIPTION "NotePad--")
|
||||
set(CPACK_PACKAGE_COPYRIGHT "Copyright (c) 2023")
|
||||
set(CPACK_PACKAGE_VERSION "1.22.0")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "1")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "22")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "0")
|
||||
|
||||
include(${PROJECT_SOURCE_DIR}/cmake/nsis_package_config.cmake)
|
||||
include(CPack)
|
||||
endif()
|
||||
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
@@ -1,40 +1,116 @@
|
||||
# notepad--
|
||||
一个支持windows/linux/mac的文本编辑器,目标是要替换notepad++,来自中国。
|
||||
|
||||
对比Notepad++而言,我们的优势是可以跨平台,支持linux mac操作系统。
|
||||
|
||||
严重声明,台湾是中国的一部分。
|
||||
|
||||
当前最新版下载:
|
||||
|
||||
https://github.com/cxasm/notepad--/releases/tag/notepad-v1.14
|
||||
|
||||
国内用户访问gitee https://gitee.com/cxasm/notepad--
|
||||
|
||||
<h3>说明1:windows下关联文件右键菜单“以Notepad--打开”的操作。</h3>
|
||||
|
||||
对于非安装版本,现在是个单文件,可以随意存放位置。关联文件右键打开菜单的操作如下:
|
||||
|
||||
1)你只需要把 Notepad--放在一个固定位置,然后不要移动程序位置。
|
||||
2)找到notepad--的位置,右键,以管理员权限运行,运行一次后,就会把当前右键位置注册到右键菜单中区。
|
||||
|
||||

|
||||
|
||||
只需要这样执行一次后,windows下就自动关联所有文件了。
|
||||
如果你移动了notepad--位置,都以管理员权限运行一次即可。
|
||||
|
||||
<h3>说明2:打开文件时显示看起来乱码,是以16进制打开的,怎么办?</h3>
|
||||
|
||||
这是因为Notepad--检测到该文件可能是二进制,以二进制只读打开,避免修改二进制文件而破坏文件。
|
||||
两个解决方式:
|
||||
1)右键文件标签,选择“重新以文本模式”打开。可以解决。
|
||||
2)永远解决办法:在选项-文件关联-中,把后缀yaml的自定义添加到关联中去。下次遇到yaml的文件,软件会自动识别为文本模式。
|
||||
|
||||
|
||||
支持mac m1 x64系统:
|
||||

|
||||
|
||||
支持皮肤切换:
|
||||

|
||||
|
||||

|
||||
# notepad--
|
||||
|
||||
[中文 ](README.md) | [English](README_EN.md)
|
||||
|
||||
## 项目简介
|
||||
|
||||
这是一个使用C++编写的文本编辑器Notepad--,可以支持Win/Linux/Mac平台。
|
||||
|
||||
我们的目标是要发展文本编辑类软件的国产可替代,重点在国产Uos系统、Mac 系统上发展。
|
||||
|
||||
一个支持windows/linux/mac的文本编辑器,目标是要国产替换同类软件,来自中国。
|
||||
|
||||
对比其它竞品Notepad类软件而言,我们的优势是可以跨平台,支持linux mac操作系统。
|
||||
|
||||
**鉴于某些Notepad竞品作者的不当言论,Notepad--的意义在于:减少一点错误言论,减少一点自以为是。**
|
||||
|
||||
**Notepad--的目标,致力于国产软件的可替代,专心做软件。**
|
||||
|
||||
**Notepad--不涉及政治。请不要在本项目讨论政治,发现一律删帖!**
|
||||
|
||||
您可以在这个项目提交bug或反馈问题。
|
||||
|
||||
本仓库与https://gitee.com/cxasm/notepad-- 是同一个软件。
|
||||
中国内使用https://gitee.com/cxasm/notepad-- 。国外使用本github库,该库会定期同步国内gitee库。
|
||||
由于作者在中国经常网络无法访问github,所以该库可能不会及时更新,还请见谅。
|
||||
|
||||
最新版本下载地址:https://gitee.com/cxasm/notepad--/releases/tag/v2.17
|
||||
|
||||
由于github访问经常断网,几乎没法提交代码。国内用户请访问 https://gitee.com/cxasm/notepad--
|
||||
NDD 支持插件编写功能,希望广大的CPP/QT开发者加入我们,插件功能均可以留上您的大名和捐赠渠道,希望
|
||||
开发者参与插件功能开发。
|
||||
|
||||
**鉴于Notepad--遭到反动竞品同类软件的匿名发帖诋毁,ndd项目申明:**
|
||||
|
||||
**Notepad--不涉及任何政治,更不会随意发布政治言论。**
|
||||
|
||||
对此Notepad--澄清如下:
|
||||
|
||||
[Ndd 对诋毁者们恶意歪曲事实的说明](https://github.com/cxasm/notepad--/wiki/Ndd-%E5%AF%B9%E8%AF%8B%E6%AF%81%E8%80%85%E4%BB%AC%E6%81%B6%E6%84%8F%E6%AD%AA%E6%9B%B2%E4%BA%8B%E5%AE%9E%E7%9A%84%E8%AF%B4%E6%98%8E)
|
||||
|
||||
[Ndd 对诋毁者们恶意歪曲事实的说明](https://gitee.com/cxasm/notepad--/wikis/Ndd-%E5%AF%B9%E8%AF%8B%E6%AF%81%E8%80%85%E4%BB%AC%E6%81%B6%E6%84%8F%E6%AD%AA%E6%9B%B2%E4%BA%8B%E5%AE%9E%E7%9A%84%E8%AF%B4%E6%98%8E)
|
||||
|
||||
|
||||
**最后强烈建议全体海内外同胞,务必禁用发表错误言论的软件,您可以选择用其它同类软件进行替代,比如vscode,notepad3,sublime都行。大家用实际行动拒绝错误言论软件, 不去评论它,不去关注它,不给它带来任何流量,则发布错误言论的人,终将自讨没趣而闭嘴。**
|
||||
|
||||
## 联络方式
|
||||
|
||||
QQ群:234879615(新开) 用户群,做NDD的问题反馈、功能建议等。
|
||||
|
||||
## 编译
|
||||
|
||||
**CMake工具链编译说明:**
|
||||
|
||||
- Ubuntu/Debian
|
||||
|
||||
1. 安装编译环境 `sudo apt-get install g++ make cmake`
|
||||
1. 安装qt工具和库 `sudo apt-get install qtbase5-dev qt5-qmake qtbase5-dev-tools libqt5printsupport5 libqt5xmlpatterns5-dev `
|
||||
1. 配置 `cmake -B build -DCMAKE_BUILD_TYPE=Release`
|
||||
1. 编译 `cd build && make -j`
|
||||
1. 打包 `cpack`
|
||||
|
||||
- ArchLinux
|
||||
|
||||
1. 安装编译环境 `sudo pacman -S gcc cmake make ninja`
|
||||
1. 安装 qt 工具和库 `sudo pacman -S qt5-tools qt5-base qt5-xmlpatterns`
|
||||
1. 配置 `cmake -S . -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -W no-dev`
|
||||
1. 编译 `ninja -C build && ninja -C build install`
|
||||
1. 打包: 使用 [AUR/notepad---git](https://aur.archlinux.org/packages/notepad---git) `yay -S notepad---git`
|
||||
1. 安装:
|
||||
- 预编译包添加 [ArchLinuxCN/notepad---git](https://github.com/archlinuxcn/repo) 镜像 `yay -S archlinuxcn/notepad---git`
|
||||
- 预编译包 [Debuginfod/notepad---git-debug](https://wiki.archlinux.org/title/Debuginfod) 包 `yay -S archlinuxcn/notepad---git-debug`
|
||||
|
||||
- openSUSE Tumbleweed
|
||||
|
||||
1. 安装编译环境和Qt工具库 `sudo zypper in -t pattern devel_C_C++ devel_basis devel_qt5 `
|
||||
1. 配置 `cmake -B build -DCMAKE_BUILD_TYPE=Release `
|
||||
1. 编译 `cd build && make -j `
|
||||
1. 打包使用 OBS (Open Build Service)
|
||||
|
||||
|
||||
最新版本下载地址:https://gitee.com/cxasm/notepad--/releases/tag/v2.15
|
||||
|
||||
|
||||
**Qt工程编译说明:**
|
||||
|
||||
1)使用qtcreator 或 vs 先打开qscint/src/qscintilla.pro 。先编译出这个qscintlla的依赖库。
|
||||
|
||||
2)再打开RealCompare.pro 加载后编译。
|
||||
|
||||
3)由于编译的平台较多,涉及windows/linux/mac,有任何编译问题,还请加qq群 959439826 。欢迎广大网友实现新功能后提交代码给我们。
|
||||
|
||||
代码上线不久,删除了商业的对比功能和注册功能(这部分有商业原因,请理解),除此以外,所有功能全部保留。
|
||||
|
||||
4)Arch Linux 及其衍生版可以通过 AUR 仓库安装:[notepad---git](https://aur.archlinux.org/packages/notepad---git)
|
||||
```
|
||||
yay -S notepad---git
|
||||
```
|
||||
|
||||
ndd在深度国产uos运行效果:
|
||||

|
||||
|
||||
|
||||
ndd在windows运行效果:
|
||||

|
||||
|
||||

|
||||
|
||||
ndd 在macOs运行效果:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
subtwo在redhat运行效果:
|
||||
|
||||

|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
# Notepad--
|
||||
|
||||
[中文 ](README.md) | [English](README_EN.md)
|
||||
|
||||
## Project Introduction
|
||||
|
||||
Introducing Notepad-- a text editor written in C++ that works seamlessly across Windows, Linux, and Mac platforms. Our aim is to eventually surpass Notepad++, with a particular focus on the Chinese UOS operating system. Unlike Notepad++, our advantage lies in our cross-platform compatibility and support for various OSes.
|
||||
|
||||
**The purpose of Notepad-- is to counteract some of the misguided remarks made by the author of Notepad++ and to promote a more humble and grounded perspective.**
|
||||
|
||||
If you come across any bugs or have any feedback, feel free to share it with us.
|
||||
|
||||
You can download the latest version at https://gitee.com/cxasm/notepad--/releases/tag/v2.0
|
||||
|
||||
We have recently added the plugin writing feature to Notepad-- and we hope that many CPP/QT developers will join us in this endeavor. If you develop a plugin, you can include your name and a donation channel.
|
||||
|
||||
Creating a free text editor requires support from users like you. If you'd like to contribute, please consider donating through WeChat.
|
||||
|
||||

|
||||
|
||||
## Compilation
|
||||
|
||||
**CMake Toolchain Compilation Instructions:**
|
||||
|
||||
- Ubuntu/Debian
|
||||
|
||||
1. Install compilation environment `sudo apt-get install g++ make cmake`
|
||||
1. Install qt tools and libraries `sudo apt-get install qtbase5-dev qt5-qmake qtbase5-dev-tools libqt5printsupport5 libqt5xmlpatterns5-dev `
|
||||
1. Configure `cmake -B build -DCMAKE_BUILD_TYPE=Release`
|
||||
1. Compile `cd build && make -j`
|
||||
1. Package `cpack`
|
||||
|
||||
- ArchLinux
|
||||
|
||||
1. Install compilation environment `sudo pacman -S gcc cmake make ninja`
|
||||
1. Install qt tools and libraries `sudo pacman -S qt5-tools qt5-base qt5-xmlpatterns `
|
||||
1. Configure `cmake -S . -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -W no-dev`
|
||||
1. Compile `ninja -C build && ninja -C build install`
|
||||
1. Package: use [AUR/notepad---git](https://aur.archlinux.org/packages/notepad---git) `yay -S notepad---git`
|
||||
1. Installation:
|
||||
- Pre-compiled package add [ArchLinuxCN/notepad---git](https://github.com/archlinuxcn/repo) mirror `yay -S archlinuxcn/notepad---git`
|
||||
- Pre-compiled package [Debuginfod/notepad---git-debug](https://wiki.archlinux.org/title/Debuginfod) package `yay -S archlinuxcn/notepad---git-debug`
|
||||
|
||||
**Qt Project Compilation Instructions:**
|
||||
|
||||
1) Start by opening qscint/src/qscintilla.pro in either Qt Creator or Visual Studio and compile the qscintilla dependency library.
|
||||
|
||||
2) Next, open RealCompare.pro and compile it after loading.
|
||||
|
||||
3) Due to the multi-platform compilation, involving Windows/Linux/MacOS, if there are any compilations or problems, please join qq group 959439826. We welcome contributions and code submissions from everyone.
|
||||
|
||||
Recently, the code was made available online. However, the commercial comparison function and registration function have been removed for commercial reasons. All other functions have been retained.
|
||||
|
||||
4) For Arch Linux and its derivatives, you can install Notepad-- through the AUR using the following command: [notepad---git](https://aur.archlinux.org/packages/notepad---git)
|
||||
```
|
||||
yay -S notepad---git
|
||||
```
|
||||
|
||||
## Preview
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
@@ -0,0 +1,15 @@
|
||||
## 第三方依赖
|
||||
|
||||
## 源码依赖
|
||||
|
||||
- [[GPL v3](src/qscint/LICENSE)] [QScintilla](https://riverbankcomputing.com/software/qscintilla/intro)
|
||||
- [GPL v3]
|
||||
- [boostregex](src/qscint/scintilla/boostregex)
|
||||
- [rgba_icons.h](src/rgba_icons.h)
|
||||
- [xmlMatchedTagsHighlighter.cpp](src/qscint/src/xmlMatchedTagsHighlighter.cpp)
|
||||
- [xmlMatchedTagsHighlighter.h](src/qscint/src/xmlMatchedTagsHighlighter.h)
|
||||
|
||||
## 开发、打包时依赖
|
||||
|
||||
- [[zlib/libpng](https://nsis.sourceforge.io/License)] [NSIS](https://nsis.sourceforge.io)
|
||||
打包工具
|
||||
@@ -0,0 +1,138 @@
|
||||
Ndd V1.23 发布 20230226
|
||||
功能:
|
||||
1 希望可以支持xml按照层次折叠和展开操作
|
||||
2 能否增加自动刷新和滚动文本功能,以及手动重新打开文件。提供tailf方式。
|
||||
3 建议 查找与替换 添加ESC键响应,ESC键退出查找替换窗体
|
||||
4 查找替换没有默认选中
|
||||
5 新窗口打开的文件,不能再拖放回去
|
||||
6 无法计算选中内容的行数
|
||||
7 json 格式化,提供json格式化插件,命令行插件等
|
||||
8 高清屏幕适配一些列问题
|
||||
9 能否支持在软件内设置文件关联。安装包支持
|
||||
10 希望记录一下关闭软件时的标签页
|
||||
11 增加md5/sha计算
|
||||
|
||||
改进:
|
||||
1 新建文件缩进参考线会消失
|
||||
2 XML 文件 注释部分文字偏小看不清
|
||||
3 关闭编辑器之后,编辑器的设置窗口还在,如果多次就会有下图的样子
|
||||
4 Ctrl+F时,建议文本框内的内容默认选中
|
||||
5 建议程序打开时tab页为最后关闭时tab页
|
||||
6 选中多个文件右键打开时会启动多个窗口,而非多个标签,
|
||||
7 双击英文句点全部文本都会高亮
|
||||
8 command只能-缩小,+没用 不能放大
|
||||
9 CTRL+F搜索框丢失焦点后,再用快捷键CTRL+F不能自动聚焦
|
||||
10 已设置的快捷键可以取消
|
||||
11 希望显示总字数
|
||||
12 Ctrl+S时,并不能删除.swp临时文件,建议隐藏.swp文件
|
||||
13 建议 增加 打开当前文件目录下 命令提示符的功能
|
||||
14 显示空格的问题
|
||||
15 鼠标选择文本后高亮
|
||||
|
||||
Ndd V1.22 预发布 20230202
|
||||
1 提供大文本、超大文本打开两种方式;并尽量显示行号。
|
||||
2 增加ASM语言的语法高亮;增加shell语法高亮。
|
||||
3 大文本打开时,显示行号。
|
||||
4 BUG: 超大文本打开乱码。
|
||||
5 批量查找窗口大小记住恢复。
|
||||
6 块注释崩溃。
|
||||
7 替换ctrl+h 自动填充选中内容,查找替换切换自动带过去关键字。
|
||||
8 查找结果框,可以放大缩小,避免看不清楚;完善配色。
|
||||
9 第一次安装后,新建NEW文件,下次打开无法自动恢复的问题。
|
||||
10 win10下面管理员授权打开文件后,旧文件修改跟随到新打开窗口
|
||||
11 解决一些列小bug等。
|
||||
12 提供ARCH LINUX的构建版本等。
|
||||
|
||||
|
||||
Ndd V1.21 预发布 20230107
|
||||
1 支持主题的修改,完善八种新主题
|
||||
2 初步支持插件开发
|
||||
3 小需求完善:批量替换支持进度条、支持web地址高亮双击打开
|
||||
4 解决反馈的bug
|
||||
|
||||
v1.21.1 小版本 20230125
|
||||
解决如下问题
|
||||
1 新增语法与文件后缀关联的设置。16A5Y1
|
||||
2 新增快捷键的管理与修改设置
|
||||
3 查找框完善:选中文本查找,字段自动填充到替换的查找框中。
|
||||
4 查找框完善:默认不选中文本查找时,查找框和替换框中默认填空,
|
||||
避免残留上次结果,让用户还需要手动去删除。gitee:16ALEJ
|
||||
5 用户反馈,默认字体14过大,修改为12
|
||||
6 查找结果太长时,增加查找结果框的水平滚动条功能。gitee:16A77D
|
||||
7 区块选择崩溃bug修复
|
||||
8 调整对比框中的配色问题
|
||||
9 解决右键菜单中清除标记颜色无效的bug
|
||||
10 解决ndd关闭后再打开,恢复出来的文件顺序可能不一样的问题
|
||||
11 解决gitee:169U01:关闭软件后重启,新建文件名称从原来的序号开始,导致重名。
|
||||
12 git169twc 打开文件时窗口没有还原
|
||||
|
||||
|
||||
Ndd V1.20 预发布 20221216
|
||||
1 增加文件列表,方便多文件时选中。
|
||||
2 增加快捷注释功能
|
||||
3 完善黑色配色
|
||||
4 完善大文本文件打开时选择的方式
|
||||
5 解决New0冒出问题
|
||||
6 打开文件时,如果在后台,窗口自动弹到前面
|
||||
7 菜单最近对比合入对比
|
||||
8 解决输入法有时会无法出现的bug
|
||||
9 提速,使用vs2019 qt515.7重新构建版本
|
||||
10 新增代码自动缩进的功能
|
||||
11 工具栏增加 缩放率 大小显示。ctrl+鼠标滑动,增加缩放率显示
|
||||
12 长行查找结构,进行截断处理,避免太长导致结果框慢
|
||||
|
||||
1.19 预发布 20221205 version26
|
||||
1 提供深色功能
|
||||
2 对比目录增加递归处理菜单项
|
||||
3 增加对比文件时的差异图
|
||||
4 完善查找功能、查找结果位置修正
|
||||
5 增加vb语法高亮等
|
||||
6 解决一系列发现的bug或其它小问题
|
||||
|
||||
1.18 预发布版本发布 20221120 version25
|
||||
1 字体风格提供全局一键修改全部功能
|
||||
2 对比可以直接拷贝粘贴内容进行对比
|
||||
3 记住窗口大小未知;查找结果位置记住;放大缩小率记住;下次打开恢复上述信息
|
||||
4 安装位置修改到x64安装目录
|
||||
5 支持书签下8种功能,快捷键F2切换书签等。
|
||||
6 解决一些列bug,如txt下字体大小显示不等宽;对比窗口行号不统一等;
|
||||
7 提高安全性,崩溃后下次打开无条件保存新旧文件等。
|
||||
8 提高打开速度。内部使用ini配置替换json格式等。
|
||||
|
||||
1.17.0 发布 20221108
|
||||
1.17 win10版本发布了,完成如下功能
|
||||
1 完成自定义编程语言风格 -- 给出一个基础版本,可自定义语言,添加关键词。
|
||||
2 语言风格全局设置,快捷一键全部弄成一样的字体样式
|
||||
3 查询关键字计数
|
||||
4 增加大小写转换功能
|
||||
5 使用了boot的正则表达式
|
||||
6 增加移除空行功能
|
||||
7 列编辑功能
|
||||
8 行编辑中16 种功能移植
|
||||
9 中文安装包
|
||||
10 对比卡死bug解决
|
||||
11 其它小功能。比如根据win linxu自动设置换行符号、长行显示不全等bug。
|
||||
|
||||
//5 1.3
|
||||
//6 1.4 20211027日
|
||||
//7 1.5 20211110日发布,是第一个真正意义上的稳定版本。
|
||||
//8 1.6 20211201发布,增加了网络消息中的6和7命令。第一次发布了notebook版本。
|
||||
//9 1.7 20211224日发布,增加了bin二进制的对比方式。暂时先在www.itdp.cn发布。
|
||||
//10 没有使用,单独给mac的一个版本做尝试
|
||||
//11 20210118日发布,单独发布ccompare和ccnotepad。notepad暂时在www.itdp.cn发布。这个版本中的linux 和 windows的 VERIFY_CODE 做了不同的区别。将二者分离出来
|
||||
//12 1.9 发布。
|
||||
//13 1.9.1 20220225发布,bin对比背景高亮。调整了界面美观度
|
||||
//版本号没有修改,换皮。20220525重新发布,不再继续维护修改了。
|
||||
因为编辑器的市场已经是红海,没必要死磕,考虑其它途径。就这样吧。
|
||||
//15 1.9.0 20220530左右发布。在uos上面第一次发布。
|
||||
//16 1.10.0 20220616左右发布。在uos上面发布了。增加查找高亮、Uos上右键关联打开等。
|
||||
//17 1.11.0 20220629左右编译发布,在Uos也发布了。增加单词高亮、自动保存、前后位置跳转等。
|
||||
//18 1.11.0 20220630 linux uos下面重新编译了下,版本直接修改为18,在网站发布。因为已经提交到uos商店中去了,后续再提交时,不修改版本,直接保持为18即可。
|
||||
//18 1.12.0 20220707 只发布了windows版本,修改为多线程、取消数据库db,修改为json存储格式。加速第一次运行时的速度处理。
|
||||
//19 1.13.0 20220802 只发布了windows版本,增加文件夹查找功能,美化界面。马上要发布uos版本。
|
||||
//19 1.13.0 20220803 大幅度改善查找文件框的设置,优化其显示。20220804发布了uos 1.13版本
|
||||
//21 1.14.0 20220901 大幅完善细节,中间有个20的版本做了皮肤风格的。本次对查找扩展、大量细节做了完善。已经发布了win10版本。
|
||||
//22 1.14.0 202209010 先发布了windows下面的版本、自动检测二进制文件或文本,支持大文本分块显示、合入文件对比的功能、提交了第一个版本的注册界面。
|
||||
理论上这个版本应该是一个里程碑式样的版本。先只发布了windows版本。mac和uos的在后面等稳定后再发布。
|
||||
//23 1.16.0 20221008 完善了大量细节,应该是更加完善的一个里程碑版本。目前windows mac 都已经发布,uos的还没有提交到商场,预计月底提交。
|
||||
//23 1.16.1 20221011 1.16里面存在问题,对比时会卡死,紧急解决了这个故障。使用nsis进行了打包,只发布了win10,后续还需要uos mac发布。
|
||||
@@ -0,0 +1,13 @@
|
||||
set(CPACK_GENERATOR "DEB")
|
||||
set(CPACK_PACKAGE_NAME "notepad--")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "a text editor like notepad++")
|
||||
set(CPACK_PACKAGE_CONTACT "coconil")
|
||||
|
||||
set(CPACK_PACKAGE_VERSION "1.22.0")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "1")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "22")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "0")
|
||||
|
||||
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
|
||||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5concurrent5,libqt5core5a,libqt5gui5,libqt5network5,libqt5printsupport5,libqt5xmlpatterns5")
|
||||
@@ -0,0 +1,59 @@
|
||||
set(CPACK_GENERATOR NSIS)
|
||||
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME}")
|
||||
# 维护人员
|
||||
set(CPACK_PACKAGE_CONTACT "XiaoPb")
|
||||
|
||||
set(P4_VERSION_INFO_CL_HIGH "0")
|
||||
set(P4_VERSION_INFO_CL_LOW "0")
|
||||
# set(CPACK_PACKAGE_VERSION_PATCH "0")
|
||||
|
||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
|
||||
|
||||
set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_NAME}V${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
|
||||
set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_NAME}V${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
|
||||
|
||||
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON")
|
||||
|
||||
set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/src/Resources/ico/txt (9).ico")
|
||||
set(CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/src/Resources/ico/txt (9).ico")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License")
|
||||
|
||||
set (CPACK_PACKAGE_EXECUTABLES "${PROJECT_NAME}" "${PROJECT_NAME}" )
|
||||
|
||||
# 设置 安装包属性信息
|
||||
set (CPACK_NSIS_DEFINES "
|
||||
${CPACK_NSIS_DEFINES}
|
||||
VIProductVersion ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${P4_VERSION_INFO_CL_HIGH}.${P4_VERSION_INFO_CL_LOW}
|
||||
VIFileVersion ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${P4_VERSION_INFO_CL_HIGH}.${P4_VERSION_INFO_CL_LOW}
|
||||
VIAddVersionKey /LANG=0 \\\"ProductName\\\" \\\"${CPACK_PACKAGE_NAME}\\\"
|
||||
VIAddVersionKey /LANG=0 \\\"ProductVersion\\\" \\\"v${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}${CPACK_PACKAGE_BUILD_TYPE_REVISION}\\\"
|
||||
VIAddVersionKey /LANG=0 \\\"Comments\\\" \\\"${CPACK_PACKAGE_DESCRIPTION}\\\"
|
||||
VIAddVersionKey /LANG=0 \\\"CompanyName\\\" \\\"${CPACK_PACKAGE_VENDOR}\\\"
|
||||
VIAddVersionKey /LANG=0 \\\"LegalCopyright\\\" \\\"${CPACK_PACKAGE_COPYRIGHT}\\\"
|
||||
VIAddVersionKey /LANG=0 \\\"FileDescription\\\" \\\"${CPACK_PACKAGE_NAME} Installer\\\"
|
||||
VIAddVersionKey /LANG=0 \\\"FileVersion\\\" \\\"v${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}${CPACK_PACKAGE_BUILD_TYPE_REVISION}\\\"
|
||||
"
|
||||
)
|
||||
|
||||
# 设置 安装时需要的环境变量
|
||||
set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
|
||||
WriteRegStr SHCTX \\\"Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\App Paths\\\\${PROJECT_NAME}\\\" \\\"\\\" \\\"$INSTDIR\\\\bin\\\\${PROJECT_NAME}.exe\\\"
|
||||
WriteRegStr SHCTX \\\"Software\\\\Classes\\\\${PROJECT_NAME}\\\\shell\\\" \\\"\\\" \\\"open\\\"
|
||||
WriteRegStr SHCTX \\\"Software\\\\Classes\\\\${PROJECT_NAME}\\\\shell\\\\open\\\\command\\\" \\\"\\\" \\\"$\\\\\\\"$INSTDIR\\\\bin\\\\${PROJECT_NAME}.exe$\\\\\\\" $\\\\\\\"%1$\\\\\\\"\\\"
|
||||
WriteRegStr SHCTX \\\"Software\\\\Classes\\\\.txt\\\\OpenWithProgids\\\" \\\"${PROJECT_NAME}\\\" \\\"\\\"
|
||||
WriteRegStr SHCTX \\\"Software\\\\Classes\\\\*\\\\shell\\\\${PROJECT_NAME}\\\" \\\"\\\" \\\"Edit with ${PROJECT_NAME}\\\"
|
||||
WriteRegStr SHCTX \\\"Software\\\\Classes\\\\*\\\\shell\\\\${PROJECT_NAME}\\\" \\\"Icon\\\" \\\"$INSTDIR\\\\bin\\\\${PROJECT_NAME}.exe\\\"
|
||||
WriteRegStr SHCTX \\\"Software\\\\Classes\\\\*\\\\shell\\\\${PROJECT_NAME}\\\\command\\\" \\\"\\\" \\\"$\\\\\\\"$INSTDIR\\\\bin\\\\${PROJECT_NAME}.exe$\\\\\\\" $\\\\\\\"%1$\\\\\\\"\\\"
|
||||
")
|
||||
|
||||
# 设置 卸载时需要的环境变量
|
||||
set (CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
|
||||
Delete \\\"$DESKTOP\\\\${PROJECT_NAME}.lnk\\\"
|
||||
Delete \\\"$SMPROGRAMS\\\\${PROJECT_NAME}.lnk\\\"
|
||||
DeleteRegKey SHCTX \\\"Software\\\\Classes\\\\*\\\\shell\\\\${PROJECT_NAME}\\\"
|
||||
DeleteRegKey SHCTX \\\"Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\App Paths\\\\bin\\\\${PROJECT_NAME}.exe\\\" \\\"\\\" \\\"$INSTDIR\\\\bin\\\\${PROJECT_NAME}.exe\\\"
|
||||
DeleteRegKey SHCTX \\\"Software\\\\${PROJECT_NAME}\\\"
|
||||
DeleteRegValue SHCTX \\\"Software\\\\Classes\\\\.txt\\\\OpenWithProgids\\\" \\\"${PROJECT_NAME}\\\"
|
||||
DeleteRegKey SHCTX \\\"Software\\\\Classes\\\\${PROJECT_NAME}\\\"
|
||||
")
|
||||
|
After Width: | Height: | Size: 245 KiB |
|
After Width: | Height: | Size: 569 KiB |
|
After Width: | Height: | Size: 519 KiB |
|
After Width: | Height: | Size: 671 KiB |
|
After Width: | Height: | Size: 224 KiB |
|
After Width: | Height: | Size: 524 KiB |
|
After Width: | Height: | Size: 311 KiB |
|
After Width: | Height: | Size: 334 KiB |
|
After Width: | Height: | Size: 311 KiB |
|
After Width: | Height: | Size: 326 KiB |
|
After Width: | Height: | Size: 579 KiB |
|
After Width: | Height: | Size: 541 KiB |
|
After Width: | Height: | Size: 345 KiB |
@@ -0,0 +1,20 @@
|
||||
QMAKE_CXX.QT_COMPILER_STDCXX = 199711L
|
||||
QMAKE_CXX.QMAKE_MSC_VER = 1929
|
||||
QMAKE_CXX.QMAKE_MSC_FULL_VER = 192930142
|
||||
QMAKE_CXX.COMPILER_MACROS = \
|
||||
QT_COMPILER_STDCXX \
|
||||
QMAKE_MSC_VER \
|
||||
QMAKE_MSC_FULL_VER
|
||||
QMAKE_CXX.INCDIRS = \
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\ATLMFC\\include" \
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\include" \
|
||||
"C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.19041.0\\ucrt" \
|
||||
"C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.19041.0\\shared" \
|
||||
"C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.19041.0\\um" \
|
||||
"C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.19041.0\\winrt" \
|
||||
"C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.19041.0\\cppwinrt"
|
||||
QMAKE_CXX.LIBDIRS = \
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\ATLMFC\\lib\\x64" \
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\lib\\x64" \
|
||||
"C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.19041.0\\ucrt\\x64" \
|
||||
"C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.19041.0\\um\\x64"
|
||||
@@ -0,0 +1,87 @@
|
||||
#pragma once
|
||||
#include <qobject.h>
|
||||
#include<QVector>
|
||||
#include<QMap>
|
||||
#include <QFuture>
|
||||
|
||||
#include <functional>
|
||||
#include "rcglobal.h"
|
||||
#include "Encode.h"
|
||||
|
||||
|
||||
class BlockUserData;
|
||||
class QFile;
|
||||
|
||||
|
||||
const int LEFT = 0;
|
||||
const int RIGHT = 1;
|
||||
|
||||
//对比bin二进制文件。
|
||||
const int MAX_BIN_SIZE = 1024 * 1024 * 10; //最大10M
|
||||
|
||||
typedef void(* CALL_FUNC)(void *, uchar *, int);
|
||||
|
||||
typedef struct lineFileInfo_ {
|
||||
qint32 lineNums; //行号码
|
||||
bool isLcsExist;//是否属于lcsline的一部分
|
||||
bool isEmptyLine; //是否是空白行,只包含换行符的行
|
||||
int code; //该行的字符编码
|
||||
int lineEndFormat; //行尾:见RC_LINE_FORM
|
||||
QByteArray md4;
|
||||
QString unicodeStr; //这个是包含行尾的换行符的
|
||||
lineFileInfo_()
|
||||
{
|
||||
isLcsExist = false;
|
||||
isEmptyLine = false;
|
||||
code = UNKOWN;
|
||||
lineEndFormat = UNKNOWN_LINE;
|
||||
}
|
||||
}LineFileInfo;
|
||||
|
||||
|
||||
|
||||
const int EMPTY_FILE = 0;
|
||||
const int SCAN_SUCCESS = 1;
|
||||
|
||||
class CmpareMode;
|
||||
|
||||
typedef struct ThreadFileCmpParameter_ {
|
||||
QString leftPath;
|
||||
QString rightPath;
|
||||
CmpareMode *resultCmpObj;
|
||||
|
||||
ThreadFileCmpParameter_(QString leftPath_, QString rightPath_)
|
||||
{
|
||||
leftPath = leftPath_;
|
||||
rightPath = rightPath_;
|
||||
resultCmpObj = nullptr;
|
||||
}
|
||||
|
||||
}ThreadFileCmpParameter;
|
||||
|
||||
class CmpareMode :public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CmpareMode();
|
||||
virtual ~CmpareMode();
|
||||
|
||||
static CODE_ID readLineFromFile(uchar * m_fileFpr, const int fileLength, const CODE_ID fileCode, QList<LineFileInfo>& lineInfoVec, QList<LineFileInfo>& blankLineInfoVec, int mode, int& maxLineSize);
|
||||
static CODE_ID judgeFinalTextCode(CODE_ID code, bool isExistUnKownCode, bool isExistGbk, bool isExistUtf8);
|
||||
static CODE_ID readLineFromFile(uchar * m_fileFpr, const int fileLength, const CODE_ID fileCode, QList<LineFileInfo>& lineInfoVec,int& maxLineSize, int& charsNums, bool &isMaybeHexFile);
|
||||
|
||||
static CODE_ID scanFileRealCode(QString filePath,int scanLineNum=200);
|
||||
static CODE_ID scanFileOutPut(CODE_ID code, QString filePath, QList<LineFileInfo>& outputLineInfoVec, int & maxLineSize, int & charsNums, bool &isHexFile);
|
||||
static CODE_ID scanFileOutPut(QFile& pFile, CODE_ID code, QString filePath, QString& outText, bool& existGrbledCode);
|
||||
|
||||
static CODE_ID getTextFileEncodeType(uchar* fileFpr, int fileLength, QString filePath="", bool isCheckHead = true);
|
||||
static bool tranUnicodeLeToUtf8Bytes(uchar* fileFpr, const int fileLength, QString& outUtf8Bytes, bool isSkipHead=false);
|
||||
static bool isUnicodeLeBomFile(uchar* fileFpr, int fileLength);
|
||||
private:
|
||||
|
||||
static bool recognizeTextCode(QByteArray & text, LineFileInfo & lineInfo, QString & outUnicodeText);
|
||||
quint32 static readLineFromFileWithUnicodeLe(uchar* m_fileFpr, const int fileLength, QList<LineFileInfo>& lineInfoVec, QList<LineFileInfo>& blankLineInfoVec,int mode, int &maxLineSize);
|
||||
|
||||
|
||||
};
|
||||
|
||||
@@ -0,0 +1,405 @@
|
||||
#include "Encode.h"
|
||||
#include <QTextCodec>
|
||||
#include <QtDebug>
|
||||
|
||||
/* 检查字符串编码的类。看了大量文献,结论如下:
|
||||
*如果是UTF BOM格式,或者UNICODE格式,其文件头部前几个字节(2-3)有一定的标识。由此标识直接按对应编码处理。
|
||||
*如果没有标识,默认就是UTF8(NO BOM) 与 ANSI(现在只考虑GBK)进行对比。
|
||||
*此时需要做统计分析。对所有行进行UTF8解析,如果按照UTF8解析错位再按照GBK解析。如果解析出GBK那么大概率认为文件是GBK编码的。
|
||||
*/
|
||||
|
||||
Encode::Encode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Encode::~Encode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CODE_ID Encode::getCodeByName(QString name)
|
||||
{
|
||||
CODE_ID id;
|
||||
|
||||
if (name == "unknown")
|
||||
{
|
||||
id = CODE_ID::UNKOWN;
|
||||
}
|
||||
else if (name == "UTF16-LE")
|
||||
{
|
||||
id = CODE_ID::UNICODE_LE;
|
||||
}
|
||||
else if (name == "UTF16-BE")
|
||||
{
|
||||
id = CODE_ID::UNICODE_BE;
|
||||
}
|
||||
else if (name == "UTF8")
|
||||
{
|
||||
id = CODE_ID::UTF8_NOBOM;
|
||||
}
|
||||
else if (name == "UTF8-BOM")
|
||||
{
|
||||
id = CODE_ID::UTF8_BOM;
|
||||
}
|
||||
else if (name == "GBK")
|
||||
{
|
||||
id = CODE_ID::GBK;
|
||||
}
|
||||
else if (name == "EUC-JP")
|
||||
{
|
||||
id = CODE_ID::EUC_JP;
|
||||
}
|
||||
else if (name == "Shift-JIS")
|
||||
{
|
||||
id = CODE_ID::Shift_JIS;
|
||||
}
|
||||
else if (name == "EUC-KR")
|
||||
{
|
||||
id = CODE_ID::EUC_KR;
|
||||
}
|
||||
else if (name == "KOI8-R")
|
||||
{
|
||||
id = CODE_ID::KOI8_R;
|
||||
}
|
||||
else if (name == "TSCII")
|
||||
{
|
||||
id = CODE_ID::TSCII;
|
||||
}
|
||||
else if (name == "TIS-620")
|
||||
{
|
||||
id = CODE_ID::TIS_620;
|
||||
}
|
||||
else
|
||||
{
|
||||
id = CODE_ID::UNKOWN;
|
||||
}
|
||||
|
||||
return id;
|
||||
|
||||
}
|
||||
|
||||
QString Encode::getLineEndById(RC_LINE_FORM id)
|
||||
{
|
||||
QString ret;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case PAD_LINE:
|
||||
case UNKNOWN_LINE:
|
||||
#ifdef WIN32
|
||||
ret = "Windows(CR LF)";
|
||||
#else
|
||||
ret = "Unix(LF)";
|
||||
#endif
|
||||
ret = "NULL";
|
||||
break;
|
||||
case UNIX_LINE:
|
||||
ret = "Unix(LF)";
|
||||
break;
|
||||
case DOS_LINE:
|
||||
ret = "Windows(CR LF)";
|
||||
break;
|
||||
case MAC_LINE:
|
||||
ret = "Mac(CR)";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
QString Encode::getCodeNameById(CODE_ID id)
|
||||
{
|
||||
QString ret;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case UNKOWN:
|
||||
ret = "unknown";
|
||||
break;
|
||||
case ANSI:
|
||||
ret = "unknown";
|
||||
break;
|
||||
case UNICODE_LE:
|
||||
ret = "UTF16-LE";
|
||||
break;
|
||||
case UNICODE_BE:
|
||||
ret = "UTF16-BE";
|
||||
break;
|
||||
case UTF8_NOBOM:
|
||||
ret = "UTF8";
|
||||
break;
|
||||
case UTF8_BOM:
|
||||
ret = "UTF8-BOM";
|
||||
break;
|
||||
case GBK:
|
||||
ret = "GBK";
|
||||
break;
|
||||
case EUC_JP:
|
||||
ret = "EUC-JP";
|
||||
break;
|
||||
case Shift_JIS:
|
||||
ret = "Shift-JIS";
|
||||
break;
|
||||
case EUC_KR:
|
||||
ret = "EUC-KR";
|
||||
break;
|
||||
case KOI8_R:
|
||||
ret = "KOI8-R";
|
||||
break;
|
||||
case TSCII:
|
||||
ret = "TSCII";
|
||||
break;
|
||||
case TIS_620:
|
||||
ret = "TIS-620";
|
||||
break;
|
||||
case BIG5:
|
||||
ret = "BIG5-HKSCS";
|
||||
break;
|
||||
default:
|
||||
ret = "unknown";
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
QByteArray Encode::getEncodeStartFlagByte(CODE_ID code)
|
||||
{
|
||||
QByteArray ret;
|
||||
|
||||
switch (code)
|
||||
{
|
||||
case UNICODE_LE:
|
||||
{
|
||||
ret.append((char)0xFF);
|
||||
ret.append((char)0xFE);
|
||||
}
|
||||
break;
|
||||
|
||||
case UNICODE_BE:
|
||||
{
|
||||
ret.append((char)0xFE);
|
||||
ret.append((char)0xFF);
|
||||
}
|
||||
break;
|
||||
|
||||
case UTF8_BOM:
|
||||
{
|
||||
ret.append((char)0xEF);
|
||||
ret.append((char)0xBB);
|
||||
ret.append((char)0xBF);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
CODE_ID Encode::DetectEncode(const uchar* pBuffer, int length, int &skip)
|
||||
{
|
||||
if (pBuffer[0] == 0xFF && pBuffer[1] == 0xFE)
|
||||
{
|
||||
skip = 2;
|
||||
return CODE_ID::UNICODE_LE; //skip 2
|
||||
}
|
||||
if (pBuffer[0] == 0xFE && pBuffer[1] == 0xFF)
|
||||
{
|
||||
skip = 2;
|
||||
return CODE_ID::UNICODE_BE; //skip 2
|
||||
}
|
||||
if (pBuffer[0] == 0xEF && pBuffer[1] == 0xBB && pBuffer[2] == 0xBF)
|
||||
{
|
||||
skip = 3;
|
||||
return CODE_ID::UTF8_BOM; //skip 3 with BOM
|
||||
}
|
||||
|
||||
// 不能知道是不是UTF8
|
||||
CODE_ID code = CheckUnicodeWithoutBOM(pBuffer, length);
|
||||
|
||||
skip = 0;
|
||||
return code; //skip 0
|
||||
|
||||
}
|
||||
|
||||
bool Encode::tranGbkToUNICODE(const char* pText, int length, QString &out)
|
||||
{
|
||||
QTextCodec::ConverterState state;
|
||||
|
||||
QTextCodec *codec = QTextCodec::codecForName("GBK");
|
||||
out = codec->toUnicode((const char *)pText, length, &state);
|
||||
if (state.invalidChars > 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Encode::tranUtf8ToUNICODE(const char* pText, int length, QString &out)
|
||||
{
|
||||
QTextCodec::ConverterState state;
|
||||
|
||||
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
|
||||
out = codec->toUnicode((const char *)pText, length, &state);
|
||||
if (state.invalidChars > 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//与getCodeNameById类似,但是返回的是QT系统支持的编码的字符串名称
|
||||
QString Encode::getQtCodecNameById(CODE_ID id)
|
||||
{
|
||||
QString ret;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case UNKOWN:
|
||||
case ANSI:
|
||||
ret = "unknown";
|
||||
break;
|
||||
case UNICODE_LE:
|
||||
ret = "UTF16-LE";
|
||||
break;
|
||||
case UNICODE_BE:
|
||||
ret = "UTF16-BE";
|
||||
break;
|
||||
case UTF8_NOBOM://qt没有这种
|
||||
case UTF8_BOM:
|
||||
ret = "UTF8";
|
||||
break;
|
||||
case GBK:
|
||||
ret = "GBK";
|
||||
break;
|
||||
case EUC_JP:
|
||||
ret = "EUC-JP";
|
||||
break;
|
||||
case Shift_JIS:
|
||||
ret = "Shift-JIS";
|
||||
break;
|
||||
case EUC_KR:
|
||||
ret = "EUC-KR";
|
||||
break;
|
||||
case KOI8_R:
|
||||
ret = "KOI8-R";
|
||||
break;
|
||||
case TSCII:
|
||||
ret = "TSCII";
|
||||
break;
|
||||
case TIS_620:
|
||||
ret = "TIS-620";
|
||||
break;
|
||||
case BIG5:
|
||||
ret = "Big5-HKSCS";
|
||||
break;
|
||||
default:
|
||||
ret = "unknown";
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
//将指定编码的字符串转换到unicode
|
||||
bool Encode::tranStrToUNICODE(CODE_ID code, const char* pText, int length, QString &out)
|
||||
{
|
||||
if (length < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
QTextCodec::ConverterState state;
|
||||
QTextCodec *codec = nullptr;
|
||||
|
||||
QString textCodeName = getQtCodecNameById(code);
|
||||
if (textCodeName.isEmpty() || textCodeName == "unknown")
|
||||
{
|
||||
//对于其它非识别编码,统一转换为utf8。减去让用户选择的麻烦
|
||||
//这里其实是有问题的。先这样简单处理
|
||||
codec = QTextCodec::codecForName("UTF-8");
|
||||
}
|
||||
else
|
||||
{
|
||||
codec = QTextCodec::codecForName(textCodeName.toStdString().c_str());
|
||||
}
|
||||
|
||||
if (codec == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
out = codec->toUnicode((const char *)pText, length, &state);
|
||||
if (state.invalidChars > 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 这里其实是穷举字符串的字符编码;ASNI utf8。目前只检测GBK和utf8;其它语种没有穷举
|
||||
*GB2312 GBK GB18030 三种差别见https://cloud.tencent.com/developer/article/1343240
|
||||
*关于编码的详细说明,见https://blog.csdn.net/libaineu2004/article/details/19245205
|
||||
*/
|
||||
//这里是有限检查utf8的,如果出现gbk,说明一定不是utf8,因为utf8检查到错误码。
|
||||
CODE_ID Encode::CheckUnicodeWithoutBOM(const uchar* pText, int length)
|
||||
{
|
||||
QTextCodec::ConverterState state;
|
||||
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
|
||||
const QString text = codec->toUnicode((const char *)pText, length, &state);
|
||||
if (state.invalidChars > 0) {
|
||||
/*不是UTF-8格式的文件,这里优先判断是不是UTF8,再判断是不是GBK;我们先做中文版;如果后续要做
|
||||
*国际版,其实不应该只检查GBK,而是应该检查本地ASCI码,包括ascii码*/
|
||||
QTextCodec::ConverterState state1;
|
||||
QTextCodec *codec1 = QTextCodec::codecForName("GBK");
|
||||
codec1->toUnicode((const char *)pText, length, &state1);
|
||||
if (state1.invalidChars > 0) {
|
||||
return CODE_ID::ANSI;
|
||||
}
|
||||
else
|
||||
{
|
||||
return CODE_ID::GBK;
|
||||
}
|
||||
}
|
||||
|
||||
return CODE_ID::UTF8_NOBOM;
|
||||
}
|
||||
|
||||
CODE_ID Encode::CheckUnicodeWithoutBOM(const uchar* pText, int length, QString &outUnicodeText)
|
||||
{
|
||||
QTextCodec::ConverterState state;
|
||||
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
|
||||
outUnicodeText = codec->toUnicode((const char *)pText, length, &state);
|
||||
if (state.invalidChars > 0) {
|
||||
/*不是UTF-8格式的文件,这里优先判断是不是UTF8,再判断是不是GBK;我们先做中文版;如果后续要做
|
||||
*国际版,其实不应该只检查GBK,而是因为检查本地ASCI码,包括ascii码*/
|
||||
QTextCodec::ConverterState state1;
|
||||
QTextCodec *codec1 = QTextCodec::codecForName("GBK");
|
||||
QString gbkStr = codec1->toUnicode((const char *)pText, length, &state1);
|
||||
if (state1.invalidChars > 0) {
|
||||
//如果也不是gbk,姑且按照utf8直接返回
|
||||
return CODE_ID::ANSI;
|
||||
}
|
||||
else
|
||||
{
|
||||
outUnicodeText = gbkStr;
|
||||
return CODE_ID::GBK;
|
||||
}
|
||||
}
|
||||
|
||||
return CODE_ID::UTF8_NOBOM;
|
||||
}
|
||||
|
||||
//检查是否全是ascii字符码
|
||||
bool Encode::CheckTextIsAllAscii(const uchar* pText, int length)
|
||||
{
|
||||
for (int i = 0; i < length; ++i)
|
||||
{
|
||||
if (*(pText + i) < 0 || *(pText + i) > 0x7F)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include <QtGlobal>
|
||||
|
||||
//#define GBK_
|
||||
#include "rcglobal.h"
|
||||
|
||||
|
||||
class Encode
|
||||
{
|
||||
public:
|
||||
Encode();
|
||||
~Encode();
|
||||
static CODE_ID getCodeByName(QString name);
|
||||
static QString getLineEndById(RC_LINE_FORM id);
|
||||
static QString getCodeNameById(CODE_ID id);
|
||||
static QByteArray getEncodeStartFlagByte(CODE_ID code);
|
||||
static CODE_ID DetectEncode(const uchar* pBuffer, int length,int &skip);
|
||||
static bool tranGbkToUNICODE(const char* pText, int length, QString &out);
|
||||
static bool tranUtf8ToUNICODE(const char * pText, int length, QString & out);
|
||||
static QString getQtCodecNameById(CODE_ID id);
|
||||
static bool tranStrToUNICODE(CODE_ID code, const char * pText, int length, QString & out);
|
||||
static CODE_ID CheckUnicodeWithoutBOM(const uchar * pText, int length);
|
||||
static CODE_ID CheckUnicodeWithoutBOM(const uchar * pText, int length, QString & outUnicodeText);
|
||||
static bool CheckTextIsAllAscii(const uchar * pText, int length);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,130 @@
|
||||
#include "MediatorDisplay.h"
|
||||
|
||||
|
||||
//这里如果直接让左右互相同步,互相影响,可能导致混乱。需要一个中间调停者模式,作为中间人去控制同步消息
|
||||
//中介者模式意图:用一个中介对象来封装一系列的对象交互,中介者使各对象不需要显式地相互引用,从而使其耦合松散,而且可以独立地改变它们之间的交互。
|
||||
//主要解决:对象与对象之间存在大量的关联关系,这样势必会导致系统的结构变得很复杂,同时若一个对象发生改变,我们也需要跟踪与之相关联的对象,同时做出相应的处理。
|
||||
//之前不使用该模式时,左右显示同步互相交互,时而发生消息混乱
|
||||
|
||||
MediatorDisplay::MediatorDisplay():QObject(nullptr)
|
||||
{
|
||||
m_leftLineNum = 0;
|
||||
m_rightLineNum = 0;
|
||||
m_leftScrollValue = 0;
|
||||
m_rightScrollValue = 0;
|
||||
|
||||
}
|
||||
|
||||
MediatorDisplay::~MediatorDisplay()
|
||||
{
|
||||
}
|
||||
|
||||
void MediatorDisplay::setLeftNum(int value)
|
||||
{
|
||||
m_leftLineNum = value;
|
||||
if (m_leftLineNum != m_rightLineNum)
|
||||
{
|
||||
emit syncCurLineNum(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MediatorDisplay::setRightNum(int value)
|
||||
{
|
||||
m_rightLineNum = value;
|
||||
if (m_leftLineNum != m_rightLineNum)
|
||||
{
|
||||
emit syncCurLineNum(1);
|
||||
}
|
||||
}
|
||||
|
||||
int MediatorDisplay::getLeftNum()
|
||||
{
|
||||
return m_leftLineNum;
|
||||
}
|
||||
|
||||
int MediatorDisplay::getRightNum()
|
||||
{
|
||||
return m_rightLineNum;
|
||||
}
|
||||
|
||||
void MediatorDisplay::setLeftScrollValue(int value)
|
||||
{
|
||||
if (m_leftScrollValue != value)
|
||||
{
|
||||
m_leftScrollValue = value;
|
||||
}
|
||||
|
||||
|
||||
//如果左右不相等,则推动对方去同步
|
||||
if (m_leftScrollValue != m_rightScrollValue)
|
||||
{
|
||||
emit syncCurScrollValue(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MediatorDisplay::setRightScrollValue(int value)
|
||||
{
|
||||
if (m_rightScrollValue != value)
|
||||
{
|
||||
m_rightScrollValue = value;
|
||||
}
|
||||
|
||||
|
||||
if (m_leftScrollValue != m_rightScrollValue)
|
||||
{
|
||||
emit syncCurScrollValue(1);
|
||||
}
|
||||
}
|
||||
|
||||
int MediatorDisplay::getLeftScrollValue()
|
||||
{
|
||||
return m_leftScrollValue;
|
||||
}
|
||||
|
||||
int MediatorDisplay::getRightScrollValue()
|
||||
{
|
||||
return m_rightScrollValue;
|
||||
}
|
||||
|
||||
|
||||
void MediatorDisplay::setLeftScrollXValue(int value)
|
||||
{
|
||||
if (m_leftScrollXValue != value)
|
||||
{
|
||||
m_leftScrollXValue = value;
|
||||
}
|
||||
|
||||
|
||||
//如果左右不相等,则推动对方去同步
|
||||
if (m_leftScrollXValue != m_rightScrollXValue)
|
||||
{
|
||||
emit syncCurScrollXValue(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MediatorDisplay::setRightScrollXValue(int value)
|
||||
{
|
||||
if (m_rightScrollXValue != value)
|
||||
{
|
||||
m_rightScrollXValue = value;
|
||||
}
|
||||
|
||||
|
||||
if (m_leftScrollXValue != m_rightScrollXValue)
|
||||
{
|
||||
emit syncCurScrollXValue(1);
|
||||
}
|
||||
}
|
||||
|
||||
int MediatorDisplay::getLeftScrollXValue()
|
||||
{
|
||||
return m_leftScrollXValue;
|
||||
}
|
||||
|
||||
int MediatorDisplay::getRightScrollXValue()
|
||||
{
|
||||
return m_rightScrollXValue;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
#pragma once
|
||||
#include <QObject>
|
||||
|
||||
class MediatorDisplay:public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MediatorDisplay();
|
||||
virtual ~MediatorDisplay();
|
||||
|
||||
void setLeftNum(int value);
|
||||
void setRightNum(int value);
|
||||
|
||||
int getLeftNum();
|
||||
int getRightNum();
|
||||
|
||||
void setLeftScrollValue(int value);
|
||||
void setRightScrollValue(int value);
|
||||
|
||||
int getLeftScrollValue();
|
||||
int getRightScrollValue();
|
||||
|
||||
void setLeftScrollXValue(int value);
|
||||
|
||||
void setRightScrollXValue(int value);
|
||||
|
||||
int getLeftScrollXValue();
|
||||
|
||||
int getRightScrollXValue();
|
||||
|
||||
signals:
|
||||
//当前行同步
|
||||
void syncCurLineNum(int direction);
|
||||
|
||||
//滚动条同步
|
||||
void syncCurScrollValue(int direction);
|
||||
|
||||
void syncCurScrollXValue(int direction);
|
||||
|
||||
private:
|
||||
//左右当前行的值
|
||||
int m_leftLineNum;
|
||||
int m_rightLineNum;
|
||||
|
||||
//左右滚动条的值
|
||||
int m_leftScrollValue;
|
||||
int m_rightScrollValue;
|
||||
|
||||
//左右滚动条的值x
|
||||
int m_leftScrollXValue;
|
||||
int m_rightScrollXValue;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
#include "MediatorFileTree.h"
|
||||
|
||||
/* 文件夹对比界面的中介者,使用中介者是为了让消息经过中介对象统一调度,避免左右互相依赖导致交互混乱
|
||||
*/
|
||||
|
||||
MediatorFileTree::MediatorFileTree() :QObject(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
MediatorFileTree::~MediatorFileTree()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MediatorFileTree::setLeftScrollValue(int value)
|
||||
{
|
||||
m_leftScrollValue = value;
|
||||
|
||||
//如果左右不相等,则推动对方去同步
|
||||
if (m_leftScrollValue != m_rightScrollValue)
|
||||
{
|
||||
emit syncCurScrollValue(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MediatorFileTree::setRightScrollValue(int value)
|
||||
{
|
||||
m_rightScrollValue = value;
|
||||
|
||||
if (m_leftScrollValue != m_rightScrollValue)
|
||||
{
|
||||
emit syncCurScrollValue(1);
|
||||
}
|
||||
}
|
||||
|
||||
int MediatorFileTree::getLeftScrollValue()
|
||||
{
|
||||
return m_leftScrollValue;
|
||||
}
|
||||
|
||||
int MediatorFileTree::getRightScrollValue()
|
||||
{
|
||||
return m_rightScrollValue;
|
||||
}
|
||||
|
||||
|
||||
//设置item。中介本身不保存ITEM,因为太多,发送消息给外面空间
|
||||
void MediatorFileTree::setLeftItemStatus(QString name, int status)
|
||||
{
|
||||
emit syncExpandStatus(name, RC_LEFT, status);
|
||||
}
|
||||
|
||||
void MediatorFileTree::setRightItemStatus(QString name, int status)
|
||||
{
|
||||
emit syncExpandStatus(name, RC_RIGHT, status);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#include <qobject.h>
|
||||
#include "rcglobal.h"
|
||||
|
||||
class MediatorFileTree :public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MediatorFileTree();
|
||||
virtual ~MediatorFileTree();
|
||||
|
||||
void setLeftScrollValue(int value);
|
||||
void setRightScrollValue(int value);
|
||||
int getLeftScrollValue();
|
||||
int getRightScrollValue();
|
||||
|
||||
void setLeftItemStatus(QString name, int status);
|
||||
void setRightItemStatus(QString name, int status);
|
||||
|
||||
|
||||
signals:
|
||||
//滚动条同步
|
||||
void syncCurScrollValue(int direction);
|
||||
|
||||
//同步展开和收起状态
|
||||
void syncExpandStatus(QString name, int direction, int status);
|
||||
|
||||
private:
|
||||
int m_leftScrollValue;
|
||||
int m_rightScrollValue;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
#include "QTreeWidgetSortItem.h"
|
||||
#include "rcglobal.h"
|
||||
|
||||
/* 自己重新实现一个QTreeWidgetSortItem,主要是为了重载函数的排序功能,不适应默认的名字排序,而是使用
|
||||
* 每个项自带的tip字符串排序。这样做是因为对齐的时候,有些空白对齐项目,并没有名称,就会导致无法排序
|
||||
*/
|
||||
int QTreeWidgetSortItem::s_sortType = 0;
|
||||
|
||||
bool QTreeWidgetSortItem::s_syncOrder = false;
|
||||
|
||||
QTreeWidgetSortItem::QTreeWidgetSortItem(int type):QTreeWidgetItem(type)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QTreeWidgetSortItem::QTreeWidgetSortItem(const QStringList &strings, int type):QTreeWidgetItem(strings, type)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QTreeWidgetSortItem::~QTreeWidgetSortItem()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool QTreeWidgetSortItem::operator<(const QTreeWidgetItem & other) const
|
||||
{
|
||||
if (s_sortType == 0)
|
||||
{
|
||||
if (!s_syncOrder) //按名称排序
|
||||
{
|
||||
//目录最大,放在文件前面。都是目录则按照名称排序
|
||||
if ((type() == RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
goto cmp_name;
|
||||
}
|
||||
else if ((type() == RC_DIR) && (other.type() != RC_DIR))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ((type() != RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
cmp_name:
|
||||
|
||||
QString a = this->data(0, Item_RelativePath).toString();
|
||||
QString b = other.data(0, Item_RelativePath).toString();
|
||||
|
||||
return (a.compare(b, Qt::CaseInsensitive) > 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
//同步序号,按序号进行排序
|
||||
#if 0
|
||||
if ((type() == RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
QString a = this->data(0, Item_RelativePath).toString();
|
||||
QString b = other.data(0, Item_RelativePath).toString();
|
||||
|
||||
return !(a.compare(b, Qt::CaseInsensitive) > 0);
|
||||
}
|
||||
else if ((type() == RC_DIR) && (other.type() != RC_DIR))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ((type() != RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
cmp_index:
|
||||
#endif
|
||||
//同步对方的操作。
|
||||
int a = this->data(0, Item_Index).toInt();
|
||||
int b = other.data(0, Item_Index).toInt();
|
||||
|
||||
return(a > b);
|
||||
}
|
||||
}
|
||||
else if (s_sortType == 1) //按大小排序
|
||||
{
|
||||
//目录最大,放在文件前面。都是目录则按照名称排序
|
||||
if ((type() == RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
|
||||
qint64 a = this->data(0, DIR_ITEM_MAXSIZE_FILE).toULongLong();
|
||||
qint64 b = other.data(0, DIR_ITEM_MAXSIZE_FILE).toULongLong();
|
||||
|
||||
return(a > b);
|
||||
#if 0
|
||||
QString a = this->data(0, Item_RelativePath).toString();
|
||||
QString b = other.data(0, Item_RelativePath).toString();
|
||||
|
||||
return (a.compare(b, Qt::CaseInsensitive) > 0);
|
||||
#endif
|
||||
}
|
||||
else if ((type() == RC_DIR) && (other.type() != RC_DIR))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ((type() != RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
int leftSize = this->text(1).toInt();
|
||||
int rightSize = other.text(1).toInt();
|
||||
|
||||
return(leftSize > rightSize);
|
||||
}
|
||||
else if (s_sortType == 2) //by 修改日期
|
||||
{
|
||||
//目录最大,放在文件前面。都是目录则按照名称排序
|
||||
if ((type() == RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
QString a = this->data(0, Item_RelativePath).toString();
|
||||
QString b = other.data(0, Item_RelativePath).toString();
|
||||
|
||||
return (a.compare(b, Qt::CaseInsensitive) > 0);
|
||||
}
|
||||
else if ((type() == RC_DIR) && (other.type() != RC_DIR))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ((type() != RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
QString a = this->text(2);
|
||||
QString b = other.text(2);
|
||||
|
||||
return(a.compare(b, Qt::CaseInsensitive) > 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
#include <qtreewidget.h>
|
||||
class QTreeWidgetSortItem : public QTreeWidgetItem
|
||||
{
|
||||
public:
|
||||
QTreeWidgetSortItem(int type);
|
||||
QTreeWidgetSortItem(const QStringList &strings, int type);
|
||||
virtual ~QTreeWidgetSortItem();
|
||||
virtual bool operator<(const QTreeWidgetItem &other) const override;
|
||||
|
||||
static void setSortColumn(int index)
|
||||
{
|
||||
s_sortType = index;
|
||||
}
|
||||
static void setSyncOrder(bool v)
|
||||
{
|
||||
s_syncOrder = v;
|
||||
}
|
||||
private :
|
||||
static int s_sortType;
|
||||
static bool s_syncOrder;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
#include "RcTreeWidget.h"
|
||||
#include "MediatorFileTree.h"
|
||||
|
||||
#include <QScrollBar>
|
||||
#include <QMenu>
|
||||
#include <QProcess>
|
||||
|
||||
RcTreeWidget::RcTreeWidget(QWidget *parent):QTreeWidget(parent), m_userAddMenu(nullptr)
|
||||
{
|
||||
|
||||
connect(this->verticalScrollBar(), &QScrollBar::valueChanged, this, &RcTreeWidget::slot_scrollValueChange);
|
||||
|
||||
//收起和伸开子项
|
||||
connect(this, &QTreeWidget::itemCollapsed, this, &RcTreeWidget::slot_itemCollapsed);
|
||||
connect(this, &QTreeWidget::itemExpanded, this, &RcTreeWidget::slot_itemExpanded);
|
||||
|
||||
setContextMenuPolicy(Qt::CustomContextMenu); //设置枚举值
|
||||
connect(this, &QTreeWidget::customContextMenuRequested, this, &RcTreeWidget::slot_ShowPopMenu);
|
||||
}
|
||||
|
||||
RcTreeWidget::~RcTreeWidget()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//给用户进行菜单增加的回调函数
|
||||
void RcTreeWidget::setContextUserDefineItemMenuCallBack(std::function<void(int dire,QMenu*, QTreeWidgetItem*)>* userAddMenu)
|
||||
{
|
||||
m_userAddMenu = userAddMenu;
|
||||
}
|
||||
|
||||
|
||||
//右键菜单
|
||||
void RcTreeWidget::slot_ShowPopMenu(const QPoint& pos)
|
||||
{
|
||||
QTreeWidgetItem* curItem = this->itemAt(pos);
|
||||
if (curItem != nullptr)
|
||||
{
|
||||
|
||||
QMenu* menu = new QMenu(this);
|
||||
|
||||
if (m_userAddMenu != nullptr)
|
||||
{
|
||||
(*m_userAddMenu)(m_direction, menu, curItem);
|
||||
}
|
||||
|
||||
QAction* action = menu->addAction(tr("Show File in Explorer"), this, [&]() {
|
||||
QString path = QString("%1/%2").arg(m_rootDir).arg(curItem->data(0, Qt::ToolTipRole).toString());
|
||||
showFileInExplorer(path);
|
||||
|
||||
});
|
||||
|
||||
//没有名称表示是对齐的item,不存在对应的文件,只是占位
|
||||
if (curItem->text(0).isEmpty())
|
||||
{
|
||||
action->setEnabled(false);
|
||||
}
|
||||
|
||||
if (menu)
|
||||
{
|
||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
menu->exec(QCursor::pos());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//点击收起的槽函数
|
||||
void RcTreeWidget::slot_itemCollapsed(QTreeWidgetItem *item)
|
||||
{
|
||||
QString name = item->data(0, Qt::ToolTipRole).toString();
|
||||
//左边变化,通知右边去改变
|
||||
if (m_direction == RC_LEFT)
|
||||
{
|
||||
//通知右边去收起
|
||||
m_mediator->setRightItemStatus(name,RC_COLLAPSED);
|
||||
}
|
||||
else
|
||||
{
|
||||
//通知左边去收起
|
||||
m_mediator->setLeftItemStatus(name, RC_COLLAPSED);
|
||||
}
|
||||
}
|
||||
|
||||
//点击展开的槽函数
|
||||
void RcTreeWidget::slot_itemExpanded(QTreeWidgetItem *item)
|
||||
{
|
||||
QString name = item->data(0, Qt::ToolTipRole).toString();
|
||||
|
||||
//左边变化,通知右边去改变
|
||||
if (m_direction == RC_LEFT)
|
||||
{
|
||||
//右边展开
|
||||
m_mediator->setRightItemStatus(name, RC_EXPANDED);
|
||||
}
|
||||
else
|
||||
{
|
||||
//左边收起
|
||||
m_mediator->setLeftItemStatus(name, RC_EXPANDED);
|
||||
}
|
||||
}
|
||||
|
||||
void RcTreeWidget::setDirection(RC_DIRECTION direction)
|
||||
{
|
||||
m_direction = direction;
|
||||
}
|
||||
|
||||
void RcTreeWidget::setMediator(MediatorFileTree *mediator)
|
||||
{
|
||||
m_mediator = mediator;
|
||||
|
||||
}
|
||||
|
||||
//滚动条值变化后的槽函数。一旦滚动则会出发这里,发送消息给中介,让中介去同步另外一方
|
||||
void RcTreeWidget::slot_scrollValueChange(int value)
|
||||
{
|
||||
if (m_direction == RC_LEFT)
|
||||
{
|
||||
if (m_mediator->getLeftScrollValue() != value)
|
||||
{
|
||||
m_mediator->setLeftScrollValue(value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_mediator->getRightScrollValue() != value)
|
||||
{
|
||||
m_mediator->setRightScrollValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//注意,这里一旦开始调整后,又会引发滚动条值的变化
|
||||
void RcTreeWidget::setVerticalValue(int value)
|
||||
{
|
||||
//不相等才需要设置
|
||||
if (verticalScrollBar()->value() != value)
|
||||
{
|
||||
//超过最大值,只能设置为最大值
|
||||
if (value > verticalScrollBar()->maximum())
|
||||
{
|
||||
verticalScrollBar()->setValue(verticalScrollBar()->maximum());
|
||||
}
|
||||
else
|
||||
{
|
||||
verticalScrollBar()->setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
#include <qtreewidget.h>
|
||||
#include <QPoint>
|
||||
#include <functional>
|
||||
#include <QMenu>
|
||||
|
||||
#include "rcglobal.h"
|
||||
|
||||
class MediatorFileTree;
|
||||
|
||||
class RcTreeWidget :public QTreeWidget
|
||||
{
|
||||
|
||||
public:
|
||||
RcTreeWidget(QWidget *parent=nullptr);
|
||||
~RcTreeWidget();
|
||||
|
||||
void setContextUserDefineItemMenuCallBack(std::function<void(int dire, QMenu*, QTreeWidgetItem*)>* userAddMenu);
|
||||
|
||||
void setDirection(RC_DIRECTION direction);
|
||||
void setMediator(MediatorFileTree * mediator);
|
||||
void setVerticalValue(int value);
|
||||
|
||||
void setRootDir(QString dir)
|
||||
{
|
||||
m_rootDir = dir;
|
||||
}
|
||||
|
||||
QString getRootDir()
|
||||
{
|
||||
return m_rootDir;
|
||||
}
|
||||
|
||||
public slots:
|
||||
void slot_scrollValueChange(int value);
|
||||
void slot_itemCollapsed(QTreeWidgetItem * item);
|
||||
void slot_itemExpanded(QTreeWidgetItem * item);
|
||||
void slot_ShowPopMenu(const QPoint& pos);
|
||||
private:
|
||||
MediatorFileTree * m_mediator;
|
||||
RC_DIRECTION m_direction;
|
||||
QString m_rootDir;
|
||||
|
||||
std::function<void(int dire, QMenu*, QTreeWidgetItem*)>* m_userAddMenu;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# ----------------------------------------------------
|
||||
# This file is generated by the Qt Visual Studio Tools.
|
||||
# ------------------------------------------------------
|
||||
|
||||
# This is a reminder that you are using a generated .pro file.
|
||||
# Remove it when you are finished editing this file.
|
||||
message("You are running qmake on a generated .pro file. This may not work!")
|
||||
|
||||
|
||||
HEADERS += ./RealCompare.h \
|
||||
$$PWD/diff.h \
|
||||
./CompareWin.h
|
||||
SOURCES += ./CompareWin.cpp \
|
||||
./main.cpp \
|
||||
./RealCompare.cpp
|
||||
FORMS += ./CompareWin.ui \
|
||||
./RealCompare.ui
|
||||
RESOURCES += RealCompare.qrc
|
||||
@@ -0,0 +1,79 @@
|
||||
TEMPLATE = app
|
||||
LANGUAGE = C++
|
||||
|
||||
TARGET = Notepad--
|
||||
|
||||
CONFIG += qt warn_on
|
||||
|
||||
QT += core gui widgets concurrent network xmlpatterns
|
||||
|
||||
|
||||
HEADERS += *.h \
|
||||
cceditor/ccnotepad.h \
|
||||
cceditor/filemanager.h
|
||||
|
||||
|
||||
SOURCES += *.cpp \
|
||||
cceditor/ccnotepad.cpp \
|
||||
cceditor/filemanager.cpp
|
||||
|
||||
|
||||
FORMS += *.ui \
|
||||
cceditor/ccnotepad.ui
|
||||
|
||||
|
||||
RESOURCES += RealCompare.qrc
|
||||
|
||||
INCLUDEPATH += qscint/src
|
||||
INCLUDEPATH += qscint/src/Qsci
|
||||
INCLUDEPATH += qscint/scintilla/include
|
||||
INCLUDEPATH += cceditor
|
||||
|
||||
#DEFINES += QSCINTILLA_DLL
|
||||
|
||||
TRANSLATIONS += realcompare_zh.ts
|
||||
|
||||
if(contains(QMAKE_HOST.arch, x86_64|loongarch64)){
|
||||
CONFIG(Debug, Debug|Release){
|
||||
DESTDIR = x64/Debug
|
||||
LIBS += -Lx64/Debug
|
||||
LIBS += -lqmyedit_qt5d
|
||||
}else{
|
||||
DESTDIR = x64/Release
|
||||
LIBS += -Lx64/Release
|
||||
LIBS += -lqmyedit_qt5
|
||||
#QMAKE_CXXFLAGS += /openmp
|
||||
}
|
||||
}
|
||||
unix{
|
||||
if(CONFIG(debug, Debug|Release)){
|
||||
LIBS += -L/home/yzw/build/CCNotePad/x64/Debug -lqmyedit_qt5
|
||||
|
||||
QMAKE_CXXFLAGS += -fopenmp
|
||||
LIBS += -lgomp -lpthread
|
||||
}else{
|
||||
LIBS += -L/home/yzw/build/CCNotePad/x64/Release -lqmyedit_qt5
|
||||
DESTDIR = x64/Release
|
||||
|
||||
QMAKE_CXXFLAGS += -fopenmp -O2
|
||||
LIBS += -lgomp -lpthread
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RC_FILE += RealCompare.rc
|
||||
unix
|
||||
{
|
||||
|
||||
INCLUDEPATH += $$PWD/.
|
||||
DEPENDPATH += $$PWD/.
|
||||
|
||||
|
||||
unix:!macx: LIBS += -L$$PWD/x64/Release/ -lqmyedit_qt5
|
||||
|
||||
INCLUDEPATH += $$PWD/x64/Release
|
||||
DEPENDPATH += $$PWD/x64/Release
|
||||
|
||||
unix:!macx: PRE_TARGETDEPS += $$PWD/x64/Release/libqmyedit_qt5.a
|
||||
}
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>Resources/img/dir.png</file>
|
||||
<file>Resources/img/file.png</file>
|
||||
<file>Resources/img/open.png</file>
|
||||
<file>Resources/img/open1.png</file>
|
||||
<file>Resources/img/save.png</file>
|
||||
<file>Resources/img/all.png</file>
|
||||
<file>Resources/img/same1.png</file>
|
||||
<file>Resources/img/diff1.png</file>
|
||||
<file>Resources/img/swap.png</file>
|
||||
<file>Resources/img/reload.png</file>
|
||||
<file>Resources/img/rule.png</file>
|
||||
<file>Resources/img/left3.png</file>
|
||||
<file>Resources/img/right3.png</file>
|
||||
<file>Resources/img/point.png</file>
|
||||
<file>Resources/img/main.png</file>
|
||||
<file>Resources/img/showchar.png</file>
|
||||
<file>Resources/img/hidechar.png</file>
|
||||
<file>Resources/img/reload2.png</file>
|
||||
<file>Resources/img/tran.png</file>
|
||||
<file>Resources/img/6688.png</file>
|
||||
<file>Resources/img/clear.png</file>
|
||||
<file>Resources/img/undo.png</file>
|
||||
<file>Resources/img/redo.png</file>
|
||||
<file>Resources/edit/global/close.png</file>
|
||||
<file>Resources/edit/global/closehover.png</file>
|
||||
<file>Resources/edit/global/needsave.png</file>
|
||||
<file>Resources/edit/global/noneedsave.png</file>
|
||||
<file>Resources/edit/global/notebook.png</file>
|
||||
<file>Resources/img/next.png</file>
|
||||
<file>Resources/img/pre.png</file>
|
||||
<file>Resources/edit/styledeepblue/rename.png</file>
|
||||
<file>realcompare_zh.qm</file>
|
||||
<file>Resources/edit/styleblack/rename.png</file>
|
||||
<file>Resources/img/bin.png</file>
|
||||
<file>Resources/img/info.png</file>
|
||||
<file>Resources/edit/styledeepblue/next.png</file>
|
||||
<file>Resources/edit/styledeepblue/pre.png</file>
|
||||
<file>Resources/edit/styledeepblue/goto.png</file>
|
||||
<file>Resources/edit/styledeepblue/bincmp.png</file>
|
||||
<file>Resources/img/strict.png</file>
|
||||
<file>Resources/img/1.png</file>
|
||||
<file>Resources/img/2.png</file>
|
||||
<file>Resources/img/3.png</file>
|
||||
<file>Resources/img/4.png</file>
|
||||
<file>Resources/img/5.png</file>
|
||||
<file>Resources/img/6.png</file>
|
||||
<file>Resources/img/next2.png</file>
|
||||
<file>Resources/img/pre2.png</file>
|
||||
<file>Resources/img/zoomin.png</file>
|
||||
<file>Resources/img/zoomout.png</file>
|
||||
<file>Resources/img/unequaldir.png</file>
|
||||
<file>Resources/img/unequalfile.png</file>
|
||||
<file>Resources/img/onlyfile.png</file>
|
||||
<file>Resources/img/showall.png</file>
|
||||
<file>Resources/img/diff.png</file>
|
||||
<file>Resources/img/tolerant.png</file>
|
||||
<file>Resources/img/needsave.png</file>
|
||||
<file>Resources/img/break.png</file>
|
||||
<file>Resources/img/pullopen.png</file>
|
||||
<file>notepad/closeAll.png</file>
|
||||
<file>notepad/closeFile.png</file>
|
||||
<file>notepad/closeTabButton.png</file>
|
||||
<file>notepad/closeTabButton_hover.png</file>
|
||||
<file>notepad/closeTabButton_inact.png</file>
|
||||
<file>notepad/closeTabButton_push.png</file>
|
||||
<file>notepad/copy.png</file>
|
||||
<file>notepad/cut.png</file>
|
||||
<file>notepad/find.png</file>
|
||||
<file>notepad/findReplace.png</file>
|
||||
<file>notepad/indentGuide.png</file>
|
||||
<file>notepad/invisibleChar.png</file>
|
||||
<file>notepad/newFile.png</file>
|
||||
<file>notepad/openFile.png</file>
|
||||
<file>notepad/paste.png</file>
|
||||
<file>notepad/redo.png</file>
|
||||
<file>notepad/saveAll.png</file>
|
||||
<file>notepad/saveFile.png</file>
|
||||
<file>notepad/undo.png</file>
|
||||
<file>notepad/wrap.png</file>
|
||||
<file>notepad/zoomIn.png</file>
|
||||
<file>notepad/zoomOut.png</file>
|
||||
<file>notepad/savetab.png</file>
|
||||
<file>notepad/close.png</file>
|
||||
<file>notepad/closehover.png</file>
|
||||
<file>notepad/cmpbin.png</file>
|
||||
<file>notepad/cmpdir.png</file>
|
||||
<file>notepad/cmpfile.png</file>
|
||||
<file>notepad/cmpfile1.png</file>
|
||||
<file>notepad/ecg.png</file>
|
||||
<file>notepad/go.png</file>
|
||||
<file>notepad/needsave.png</file>
|
||||
<file>notepad/next.png</file>
|
||||
<file>notepad/noneedsave.png</file>
|
||||
<file>notepad/pre.png</file>
|
||||
<file>notepad/rename.png</file>
|
||||
<file>Resources/edit/global/ndd.ico</file>
|
||||
<file>notepad/mark.png</file>
|
||||
<file>notepad/sign.png</file>
|
||||
<file>notepad/clearsign.png</file>
|
||||
<file>notepad/autosave.png</file>
|
||||
<file>qss/lightblue/arrow_bottom.png</file>
|
||||
<file>qss/lightblue/add_bottom.png</file>
|
||||
<file>qss/mystyle.qss</file>
|
||||
<file>qss/lightbluestyle.qss</file>
|
||||
<file>qss/lightblue/add_top.png</file>
|
||||
<file>mac.icns</file>
|
||||
<file>Resources/img/register.png</file>
|
||||
<file>notepad/rightClose.png</file>
|
||||
<file>Resources/img/bookmark.png</file>
|
||||
<file>Resources/img/refresh.png</file>
|
||||
<file>Resources/edit/styledeepblue/autosave.png</file>
|
||||
<file>Resources/edit/styledeepblue/clearsign.png</file>
|
||||
<file>Resources/edit/styledeepblue/closeall.png</file>
|
||||
<file>Resources/edit/styledeepblue/closefile.png</file>
|
||||
<file>Resources/edit/styledeepblue/copy.png</file>
|
||||
<file>Resources/edit/styledeepblue/crlf.png</file>
|
||||
<file>Resources/edit/styledeepblue/cut.png</file>
|
||||
<file>Resources/edit/styledeepblue/dircompare.png</file>
|
||||
<file>Resources/edit/styledeepblue/filecompare.png</file>
|
||||
<file>Resources/edit/styledeepblue/find.png</file>
|
||||
<file>Resources/edit/styledeepblue/indentGuide.png</file>
|
||||
<file>Resources/edit/styledeepblue/mark.png</file>
|
||||
<file>Resources/edit/styledeepblue/needsavebar.png</file>
|
||||
<file>Resources/edit/styledeepblue/newfile.png</file>
|
||||
<file>Resources/edit/styledeepblue/openfile.png</file>
|
||||
<file>Resources/edit/styledeepblue/paste.png</file>
|
||||
<file>Resources/edit/styledeepblue/redo.png</file>
|
||||
<file>Resources/edit/styledeepblue/replace.png</file>
|
||||
<file>Resources/edit/styledeepblue/sign.png</file>
|
||||
<file>Resources/edit/styledeepblue/transcode.png</file>
|
||||
<file>Resources/edit/styledeepblue/undo.png</file>
|
||||
<file>Resources/edit/styledeepblue/white.png</file>
|
||||
<file>Resources/edit/styledeepblue/zoomin.png</file>
|
||||
<file>Resources/edit/styledeepblue/zoomout.png</file>
|
||||
<file>Resources/edit/styledeepblue/needsaveall.png</file>
|
||||
<file>Resources/img/savedark.png</file>
|
||||
<file>Resources/img/opendark.png</file>
|
||||
<file>Resources/img/reloaddark.png</file>
|
||||
<file>Resources/img/vip.png</file>
|
||||
<file>Resources/img/vipdark.png</file>
|
||||
<file>Resources/edit/global/noneedsavedark.png</file>
|
||||
<file>Resources/img/diffall.png</file>
|
||||
<file>Resources/img/expand.png</file>
|
||||
<file>Resources/img/fold.png</file>
|
||||
<file>qss/common.qss</file>
|
||||
<file>notepad/tailf.png</file>
|
||||
<file>Resources/edit/styledeepblue/tailf.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -0,0 +1,38 @@
|
||||
#include <windows.h>
|
||||
|
||||
IDI_ICON1 ICON DISCARDABLE ".\\Resources\\edit\\global\\ndd.ico"
|
||||
|
||||
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,22,0,0
|
||||
PRODUCTVERSION 1,22,0,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_DLL
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "080404b0"
|
||||
BEGIN
|
||||
VALUE "FileDescription", "notepad-- v1.22.0\0"
|
||||
VALUE "FileVersion", "1.22.0.0\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2020-2023\0"
|
||||
VALUE "OriginalFilename", "Notepad--.exe\0"
|
||||
VALUE "ProductName", "notepad-- \0"
|
||||
VALUE "ProductVersion", "1.22.0.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0804, 1200
|
||||
END
|
||||
END
|
||||
/* End of Version info */
|
||||
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 618 B |
|
After Width: | Height: | Size: 650 B |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 735 B |
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1653643519286" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8215" width="48" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||
</style></defs><path d="M648.479968 0.00064h-511.99968A48.959969 48.959969 0 0 0 100.64031 15.36063 54.399966 54.399966 0 0 0 85.28032 51.200608v921.599424a48.959969 48.959969 0 0 0 15.35999 35.839978A50.559968 50.559968 0 0 0 136.480288 1024h751.039531a49.279969 49.279969 0 0 0 35.839977-15.35999 50.559968 50.559968 0 0 0 15.359991-35.839978V290.240459z" fill="#A5D940" p-id="8216"></path><path d="M938.719787 290.240459H699.679936a52.479967 52.479967 0 0 1-51.199968-51.199968V0.00064l290.239819 290.239819z" fill="#C4EAFF" p-id="8217"></path><path d="M407.520119 459.520353v29.759981H331.360166v198.719876H296.800188v-198.719876H220.320236v-29.759981zM462.240084 459.520353l55.679966 82.559948 55.679965-82.559948h42.559973l-77.439951 110.399931 82.879948 118.079926h-42.559974l-61.119961-90.559943-61.119962 90.559943h-42.559974l82.239949-118.079926-76.799952-110.399931zM815.199864 459.520353v29.759981h-76.159953v198.719876h-34.559978v-198.719876H629.27998v-29.759981z" fill="#FFFFFF" p-id="8218"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 735 B |
|
After Width: | Height: | Size: 412 B |
|
After Width: | Height: | Size: 315 B |
|
After Width: | Height: | Size: 282 B |
|
After Width: | Height: | Size: 315 B |
|
After Width: | Height: | Size: 333 B |
|
After Width: | Height: | Size: 279 B |
|
After Width: | Height: | Size: 244 B |
|
After Width: | Height: | Size: 922 B |
|
After Width: | Height: | Size: 66 KiB |
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve"> <image id="image0" width="16" height="16" x="0" y="0"
|
||||
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
|
||||
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABX1BMVEUAAACgpKDQ1NDAxc/P
|
||||
zs/AxMCwwLCfoJCfop/AmI+vh4+Ql5Dg6ODg4uDg5+/Q2N/Q2tCgr6+wn6DAoJ+PaHCQmJDAv8C/
|
||||
v7+wv6+gr7+gp7/w9//Qz9DAr5/fx5D/+M+fkIDPx8+fnJ/w9PC/t7+wt6/P0MDAx9+vqL+gn5+w
|
||||
qJC/oEDw31+/r0/AyLDf3d/v9ODw/P//9///9/D/8MDfz3/v0DDgyE/Av3/QyLDAt2DfyEDv0CCf
|
||||
gEDw5+Dw9O+gqKDPz8DAt8/Qt9DfsH/gxyDgwBCQkH/f3M+/t7D//P/g39/f0NDgwJ/fuC+ggEC/
|
||||
v6/v79/QzM/P1M/Q2ODAwKDQwC+vkEDQyMCwqGDg2DCvly//6O/w/fD///Df0M/At2+voF/v4NDQ
|
||||
4NDf3OBfT0Dg3+Dv7e+Pj4///+/g5/Dv6OD/8ODg9/Dv/++vr6+Ah4BweHBwdXBvbG////8Y2q+X
|
||||
AAAAAXRSTlMAQObYZgAAAAFiS0dEdN9tqG0AAAAHdElNRQfmBRsIAQRTVKkxAAAA+klEQVQY0y2L
|
||||
Z1PCQBRFH5tsRCEaC6KuWPLErgmo2NDYxWcHuwYbmlgJ8P9nzM54v90z50CEMUXlWlMU5JpbIBbX
|
||||
W9sMjbez8Hd0dkFC17qTPVpvn+hPDQwODYOJyZH0KB8bn5icmp6ZhRBYum5nsnPzC7nFpTCLIrOY
|
||||
wZTlldX82noITGeDs82t7Z3dvf3CQQgixA85Ozo+yZ2encdkQmqxdHF5lb++KdgSmKgWmXJ7d//g
|
||||
OmVVlYnjZh+fnl+E7SDGpGG8Vt5S71j2BJIvjTh+0Gfli4gEpSXwvsXPr0uYIeGWAKpI6Fm8avpB
|
||||
rVZPAPhBo1EPTA3+9wcoICtzAO/bXwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wNS0yN1QwODow
|
||||
MTowNCswMDowMHQN1joAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDUtMjdUMDg6MDE6MDQrMDA6
|
||||
MDAFUG6GAAAAAElFTkSuQmCC" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1655351318268" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8004" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||
</style></defs><path d="M192 0h448.1536L960 320v576c0 70.6944-57.3056 128-128 128H192C121.3056 1024 64 966.6944 64 896V128C64 57.3056 121.3056 0 192 0z" fill="#2696FF" p-id="8005"></path><path d="M417.7536 546.176h-60.8256v170.5728h-40.9216V546.176H256V512h161.7536v34.176z m94.3872 36.416L549.376 512h47.0528l-57.8304 101.5296 59.328 103.2192h-47.6032l-38.1824-71.7184-38.1952 71.7184h-47.6032l59.3408-103.2192L427.8528 512h47.0528l37.2352 70.592zM768 546.176h-60.8256v170.5728H666.24V546.176h-60.0064V512H768v34.176z" fill="#FFFFFF" opacity=".9" p-id="8006"></path><path d="M640 0l320 320H768c-70.6944 0-128-57.3056-128-128V0z" fill="#8FC6FE" p-id="8007"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1655351271993" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3721" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||
</style></defs><path d="M147.2 0C102.4 0 65.6 35.2 65.6 80v862.4c0 44.8 35.2 81.6 81.6 81.6h731.2c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0H147.2z" fill="#F9CA06" p-id="3722"></path><path d="M960 324.8v16H755.2s-100.8-19.2-97.6-107.2c0 0 3.2 91.2 96 91.2H960z" fill="#F7BC04" p-id="3723"></path><path d="M657.6 0v232c0 27.2 17.6 92.8 97.6 92.8H960L657.6 0z" fill="#FFFFFF" p-id="3724"></path><path d="M364.8 688h-52.8v161.6c0 6.4-4.8 11.2-12.8 11.2-6.4 0-11.2-4.8-11.2-11.2V688h-52.8c-4.8 0-9.6-3.2-9.6-9.6 0-6.4 4.8-11.2 9.6-11.2h129.6c4.8 0 9.6 4.8 9.6 11.2 0 6.4-4.8 9.6-9.6 9.6z m187.2 172.8c-4.8 0-8 0-9.6-3.2l-59.2-80-60.8 80c-1.6 3.2-4.8 3.2-8 3.2-6.4 0-11.2-4.8-11.2-11.2 0-1.6 0-4.8 1.6-6.4l62.4-81.6-57.6-78.4c-1.6-1.6-1.6-3.2-1.6-6.4 0-4.8 3.2-11.2 11.2-11.2 3.2 0 6.4 1.6 9.6 4.8l54.4 73.6 54.4-73.6c3.2-3.2 6.4-4.8 9.6-4.8 6.4 0 11.2 4.8 11.2 11.2 0 3.2 0 4.8-1.6 6.4l-57.6 76.8 62.4 83.2c0 1.6 1.6 4.8 1.6 6.4 0 6.4-4.8 11.2-11.2 11.2zM731.2 688h-52.8v161.6c0 6.4-4.8 11.2-12.8 11.2-6.4 0-11.2-4.8-11.2-11.2V688h-52.8c-4.8 0-9.6-3.2-9.6-9.6 0-6.4 4.8-11.2 9.6-11.2h129.6c4.8 0 9.6 4.8 9.6 11.2 0 6.4-4.8 9.6-9.6 9.6z" fill="#FFFFFF" p-id="3725"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 329 B |
|
After Width: | Height: | Size: 506 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 779 B |
|
After Width: | Height: | Size: 617 B |
|
After Width: | Height: | Size: 355 B |
|
After Width: | Height: | Size: 977 B |
|
After Width: | Height: | Size: 259 B |
|
After Width: | Height: | Size: 765 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 655 B |
|
After Width: | Height: | Size: 377 B |
|
After Width: | Height: | Size: 591 B |
|
After Width: | Height: | Size: 325 B |
|
After Width: | Height: | Size: 333 B |
|
After Width: | Height: | Size: 543 B |
|
After Width: | Height: | Size: 309 B |
|
After Width: | Height: | Size: 364 B |
|
After Width: | Height: | Size: 626 B |
|
After Width: | Height: | Size: 499 B |