Compare commits

...

83 Commits

Author SHA1 Message Date
XMuli
50ed048344
docs: 更新文章 2023-03-22 21:10:30 +08:00
XMuli
d96b86633b
docs: update README 2023-03-11 16:17:41 +08:00
XMuli
4cee63e69e
docs: add index 2023-03-10 21:31:52 +08:00
XMuli
e76bc5e5e9
docs: update README 2023-03-10 01:57:24 +08:00
XMuli
ed5835339b
feat: CRLF / CR / LF
about NT/MAC/Linux OS
2023-03-10 01:34:12 +08:00
XMuli
f7d7e710e6
feat: change *.svg color 2023-03-10 01:31:08 +08:00
XMuli
c8771255e8
dosc: update README 2023-03-10 01:29:27 +08:00
XMuli
3ca6f8fe34
chroe: update QToolButtonAutoRaiseEx 2023-02-16 00:36:10 +08:00
XMuli
f5724bf850
feat: add "Factory Method" and "Abstract Factory" 2022-12-25 19:36:56 +08:00
XMuli
8ea61d1bc8
feat: feat: add Observer Pattern 2022-12-24 23:03:00 +08:00
XMuli
8a876a756e
feat: add Singleton Pattern 2022-12-24 01:30:52 +08:00
XMuli
ed401eda98
feat: add Observer Pattern 2022-12-24 01:21:23 +08:00
XMuli
492370ae45
feat: std::shared_ptr std::unique_ptr 2022-12-19 01:53:50 +08:00
XMuli
9894f88b7e
chroe: update .gitignore 2022-12-18 01:38:26 +08:00
XMuli
1f3a5e9638
feat: C++ implementation of unique_ptr 2022-12-18 01:37:51 +08:00
XMuli
fa8e6f3c8b
feat: CPlusPlus Studio 2022-12-17 19:48:56 +08:00
XMuli
07d3684eed feat: QToolButtonAutoRaiseEx 2022-10-20 16:23:15 +08:00
XMuli
1892ba3acf
feat: std::vector DeDuplication 2022-08-15 22:25:51 +08:00
XMuli
d76b7da449
docs: 更新文档 2022-07-30 20:33:42 +08:00
XMuli
e206c3594c
feat: change *.svg color 2022-07-30 20:20:17 +08:00
XMuli
f11a649101
docs: update README 2022-05-12 20:58:48 +08:00
XMuli
ad76dd0e33
feat: linux window auto-detect get rectangle 2022-05-08 23:14:51 +08:00
XMuli
c24fb83460
feat: Shortcut key to summon a new window, Esc does not respond after
pressing
2022-05-07 21:09:52 +08:00
XMuli
e7488b0cda
docs: update 2022-04-12 20:13:24 +08:00
XMuli
9e9a063251
docs: update 2022-04-04 01:23:26 +08:00
XMuli
e24c61a359
docs: 更新文章 2022-03-15 22:41:52 +08:00
XMuli
3e203c345c
feat: using output .txt 2022-03-14 20:40:13 +08:00
XMuli
6542643310
feat: using spdlog example 2022-03-14 20:13:33 +08:00
XMuli
8914ebf03d
feat: init Qt GUI project 2022-03-14 20:03:26 +08:00
XMuli
2410e74700
docs: update README 2022-03-11 12:56:25 +08:00
XMuli
33393cb858
feat: ExThreadSafety 2022-01-20 22:15:25 +08:00
XMuli
54b2ef6034
docs: update README 2021-10-09 21:57:41 +08:00
xmuli
065840a66d docs: update README 2021-09-30 12:31:36 +08:00
xmuli
404ec268bb feat: update README 2021-09-19 17:53:39 +08:00
xmuli
4a22632c9d feat: add "qt5.natvis" 2021-09-09 21:35:25 +08:00
xmuli
010f4ef5a2 feat: update 2021-09-02 22:29:21 +08:00
xmuli
89f03f85b7 feat: QtEvent 2021-07-08 01:19:34 +08:00
xmuli
38bee975ea feat: QtObjectTree 2021-07-04 22:03:17 +08:00
xmuli
c3c8a999ac feat: update 2021-07-03 01:42:43 +08:00
xmuli
a3041feaa4 feat: QtComboModeShow 2021-07-02 01:47:43 +08:00
xmuli
39bc540b04 feat: QtConnect 2021-06-26 18:51:46 +08:00
xmuli
ee6b9252ba feat: QtQMetaProperty 2021-06-25 00:33:26 +08:00
xmuli
db1690baf0 feat: QtProperty 2021-06-24 23:47:23 +08:00
xmuli
66af7d1d5b feat: QtCustomTypeAndQMetaType 2021-06-24 01:16:05 +08:00
xmuli
5233cb67f9 feat: QtQVariant 2021-06-23 00:33:21 +08:00
xmuli
4fc87d12f8 feat: QtMetaAboutClass 2021-06-22 23:29:53 +08:00
xmuli
cac25277a0 feat: Q_OBJECT 2021-06-21 23:44:17 +08:00
xmuli
f9e224204d feat: signal and slot principles; and moc principles (what is done)
signal 和 slot 原理;以及 moc 原理(做了什么内容)
2021-05-10 00:25:40 +08:00
xmuli
8bc8b0b039
feat: creator init project 2021-03-26 10:03:46 +08:00
xmuli
d5da4e5be4
docs: update .gitignore 2021-03-25 15:25:57 +08:00
xmuli
0f9fb98841
docs: README 2021-03-09 19:27:15 +08:00
xmuli
35d524ef67
docs: Other styles of themes using doxygen 2021-03-09 17:13:55 +08:00
xmuli
e8a8d781fa
docs: 添加 doxygen 的 qt4 style 主题
see: https://github.com/skozlovf/doxygen-qmi-style
2021-03-09 17:12:49 +08:00
xmuli
0e9b53fcea
docs: Set parameters for generating .qhp files (doxygen) 2021-03-08 16:53:37 +08:00
xmuli
c3b2240343
docs: Set the parameters for generating html (doxygen) 2021-03-08 15:54:46 +08:00
xmuli
f0ddee7580
feat: Add doxygen default template 2021-03-08 15:44:16 +08:00
xmuli
f45a74c6e6
docs: Adding comments to the function API
Use doxygen style to write
2021-03-08 15:34:18 +08:00
xmuli
6c268362a7
feat: Create an empty Qt Windows project 2021-03-08 15:28:39 +08:00
xmuli
1fbfcd0466
docs: update 2021-01-05 17:01:49 +08:00
xmuli
719cc020d3
docs: update 2020-11-15 16:58:46 +08:00
偕臧
221a3a79ca
docs: update 2020-10-31 23:59:20 +08:00
Flex Zhong
32742e80f8
docs: update README.md (#5) 2020-10-28 23:19:46 +08:00
偕臧
5dab4acc36
docs: update 2020-09-11 16:42:21 +08:00
xmuli
a274fa587a
📌 docs: update README.md 2020-08-04 14:43:24 +08:00
xmuli
757ddf6882
📌 docs: update README.md 2020-05-26 01:24:56 +08:00
xmuli
581b6fc2d1
📌 docs: update README.md 2020-05-18 17:19:04 +08:00
xmuli
aa99e942ad
feat: test gpg 2020-05-10 00:40:08 +08:00
xmuli
dd9e7b94ee 📌 docs: update README.md 2020-05-09 19:40:19 +08:00
xmuli
377af876bd feat: Meat-Object System
MeatObjectSystem(元对象系统)、Propert(属性和动态属性)和Q_CLASSINFO()(附加信息宏)的介绍和使用
2020-05-04 22:16:34 +08:00
xmuli
45a60b6c87 📌 docs: update README.md 2020-03-28 17:47:40 +08:00
xmuli
17dc1f5d42 feat: The custom control MySwitchButton has been implemented 2020-03-28 17:33:20 +08:00
touwoyimuli
7548546060 📌 docs: update README.md 2020-03-28 17:31:21 +08:00
touwoyimuli
8a9c93cc09 📌 docs: update README.md 2020-03-01 19:54:36 +08:00
touwoyimuli
47218a4787 📌 docs: update README.md 2020-03-01 19:16:40 +08:00
muli
1de27374cc feat: The custom control MySwitchButton has been implemented 2020-02-24 09:23:48 +08:00
muli
787a6061a8 feat: Improve MyStyle, MyStyleHelp, MyStylePainter (mostly written, but not over) 2020-02-22 12:43:23 +08:00
muli
77115da29d feat: Repaint the skin of a custom control, and the painting is complete
MyStyle has completed, QStylePainter's inheritance rewrite has not yet started
2020-02-20 00:47:18 +08:00
muli
158deb7c80 feat: adds multiple virtual functions inherited from QCommonStyle
public:
    virtual void polish(QWidget *widget) override;
    virtual void unpolish(QWidget *widget) override;
    virtual void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w) const override;
    virtual void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w) const override;
    virtual QRect subElementRect(SubElement subElement, const QStyleOption *option, const QWidget *widget) const override;
    virtual void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget) const override;
    virtual QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget) const override;
    virtual int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const override;
    virtual QSize sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w) const override;
    virtual int styleHint(StyleHint stylehint, const QStyleOption *opt, const QWidget *widget, QStyleHintReturn *returnData) const override;
2020-02-19 19:39:03 +08:00
muli
90dd4cdf25 feat: Overriding the GUI's QScroll control skin 2020-02-16 16:15:24 +08:00
muli
86e350df4c feat: Create class MyStyle: public QCommonStyle; and most of its overloaded virtual functions (prepared) 2020-02-16 15:58:25 +08:00
muli
5ab1057a74 docs:Add an open source license to the project: LICENSE-2.0 2020-02-16 14:27:06 +08:00
muli
29359f64b6 feat: Display several styles of the operating system through QStyleFactory 2020-02-14 00:09:27 +08:00
touwoyimuli
af5ee36cb5 📝 doc: Add some articles 2020-02-07 18:33:00 +08:00
248 changed files with 13949 additions and 988 deletions

734
.gitignore vendored
View File

@ -1,39 +1,695 @@
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
/noUpdate/
*.pro.user
./.DS_Store
*/.DS_Store
build-*/
.DS_Store
# Created by https://www.toptal.com/developers/gitignore/api/qt,cmake,c++,visualstudio,visualstudiocode,clion,macos,windows,linux
# Edit at https://www.toptal.com/developers/gitignore?templates=qt,cmake,c++,visualstudio,visualstudiocode,clion,macos,windows,linux
### C++ ###
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
### CLion ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
build*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### CLion Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/
# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml
# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/
# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$
# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml
# Azure Toolkit for IntelliJ plugin
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
.idea/**/azureSettings.xml
### 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/
### Linux ###
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### macOS Patch ###
# iCloud generated files
*.icloud
### Qt ###
# C++ objects and libs
*.so.*
# 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-*
*.qm
*.prl
# Qt unit tests
target_wrapper.*
# QtCreator
*.autosave
# QtCreator Qml
*.qmlproject.user
*.qmlproject.user.*
# QtCreator CMake
CMakeLists.txt.user*
# QtCreator 4.8< compilation database
# QtCreator local machine specific files for imported projects
*creator.user*
*_qmlcache.qrc
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
### VisualStudio ###
## 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
# 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
*.iobj
*.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
# 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
*.code-workspace
# Local History for Visual Studio Code
# Windows Installer files from build outputs
# JetBrains Rider
*.sln.iml
### VisualStudio Patch ###
# Additional files built by Visual Studio
# End of https://www.toptal.com/developers/gitignore/api/qt,cmake,c++,visualstudio,visualstudiocode,clion,macos,windows,linux

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "ExPicShot/3rdparty/spdlog"]
path = ExPicShot/3rdparty/spdlog
url = https://github.com/gabime/spdlog.git

View File

@ -1,15 +1,14 @@
#-------------------------------------------------
#
# Project created by QtCreator 2019-11-07T16:47:52
# Project created by QtCreator 2021-03-08T15:28:01
#
#-------------------------------------------------
#xxxPrivate 继承 Q-xxxx-Private的话,是需要的添加 core-private有一些核心方法? 可能不开放)
QT += core gui core-private
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets widgets-private # 若是需要继承 widgets相关需要添加 widgets-private
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = custom-style
TARGET = CustomQch
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
@ -27,17 +26,13 @@ CONFIG += c++11
SOURCES += \
main.cpp \
Example.cpp \
ExMyStyle.cpp \
MyWidget/ExSwitchButton.cpp
ifmetwindow.cpp
HEADERS += \
Example.h \
ExMyStyle.h \
ExMyGlobal.h \
MyWidget/ExSwitchButton.h \
MyWidget/ExSwitchButton_p.h
ifmetwindow.h
FORMS += \
ifmetwindow.ui
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin

2503
CustomQch/Doxyfile Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
Qmi is a "**Q**t **Mi**nimal" theme for the Doxygen HTML documentation.
It based on official Qt4 documentation's style.
# How to setup
To use `qmi` style make the following changes in your Doxyfile:
# Project section
BRIEF_MEMBER_DESC = NO
# HTML section
HTML_HEADER = ${path_to_qmi}/header.html
HTML_FOOTER = ${path_to_qmi}/footer.html
HTML_STYLESHEET = ${path_to_qmi}/qmi.css
**NOTE**:
* If you use **_tree navigation panel_** then copy contents of the `navtree` dir to the documentation html dir.
* If you use **_search_** feature then copy contents of the `search` dir to the `html/search`.
# Examples
If you want to see `qmi` style in action then use the following links with examples:
* [Qwt docs](http://skozlovf.github.com/doxygen-qmi-style/qwt)
* [libxml++ docs](http://skozlovf.github.com/doxygen-qmi-style/libxmlpp) (with tree navigation and search)
## Screenshots
* **Main page**:
![](http://skozlovf.github.com/doxygen-qmi-style/shot1.png)
* **Index page**:
![](http://skozlovf.github.com/doxygen-qmi-style/shot2.png)
* **Member description**:
![](http://skozlovf.github.com/doxygen-qmi-style/shot3.png)

View File

@ -0,0 +1,16 @@
<!--BEGIN GENERATE_TREEVIEW-->
<li class="footer">$generatedby
<span class="qmi"><a href="http://github.com/skozlovf/doxygen-qmi-style">qmi style</a> |</span>
<a href="http://www.doxygen.org/index.html">doxygen</a> $doxygenversion </li>
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<hr class="footer"/><small>
<span class="qmi"><a href="http://github.com/skozlovf/doxygen-qmi-style">qmi style</a></span>
<address class="footer">
$generatedby <a href="http://www.doxygen.org/index.html">doxygen</a> $doxygenversion
</small></address>
<!--END !GENERATE_TREEVIEW-->
</body>
</html>

View File

@ -0,0 +1,48 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath$qmi.css" rel="stylesheet" type="text/css" />
$treeview
$search
$mathjax
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath$$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<!--td style="padding-left: 0.5em;"-->
<td>
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER--><span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

View File

@ -0,0 +1,117 @@
#nav-tree .children_ul {
margin:0;
padding:4px;
}
#nav-tree ul {
list-style:none outside none;
margin:0px;
padding:0px;
}
#nav-tree li {
white-space:nowrap;
margin:0px;
padding:0px;
}
#nav-tree .plus {
margin:0px;
}
#nav-tree .selected {
background-image: none;
background-color: #B0B0B0;
color: #fff;
}
#nav-tree img {
margin:0px;
padding:0px;
border:0px;
vertical-align: middle;
}
#nav-tree a {
text-decoration:none;
padding:0px;
margin:0px;
outline:none;
}
#nav-tree .label {
margin:0px;
padding:0px;
}
#nav-tree .label a {
padding:2px;
}
#nav-tree .selected a {
text-decoration:none;
padding:2px;
margin:0px;
color:#fff;
}
#nav-tree .children_ul {
margin:0px;
padding:0px;
}
#nav-tree .item {
margin:0px;
padding:0px;
}
#nav-tree {
padding: 0px 0px;
background-image:none;
background-color: #F6F6F6;
font-size:14px;
overflow:auto;
}
#doc-content {
overflow:auto;
display:block;
padding:0px;
margin:0px;
}
#side-nav {
padding:0 4px 0 0;
margin: 0px;
display:block;
position: absolute;
left: 0px;
width: 300px;
}
.ui-resizable .ui-resizable-handle {
display:block;
}
.ui-resizable-e {
background: none;
background-color: #EBEBEB;
cursor:e-resize;
height:100%;
right:0;
top:0;
width:4px;
}
.ui-resizable-handle {
display:none;
font-size:0.1px;
position:absolute;
z-index:1;
}
#nav-tree-contents {
margin: 6px 0px 0px 0px;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,233 @@
/*---------------- Search Box */
#FSearchBox {
float: left;
}
#MSearchBox {
white-space : nowrap;
position: absolute;
float: none;
display: inline;
margin-top: 3px;
right: 0px;
width: 170px;
z-index: 102;
}
#MSearchBox .left
{
display:block;
position:absolute;
left:10px;
width:20px;
height:19px;
background:url('search_l.png') no-repeat;
background-position:right;
}
#MSearchSelect {
display:block;
position:absolute;
width:20px;
height:19px;
}
.left #MSearchSelect {
left:4px;
}
.right #MSearchSelect {
right:5px;
}
#MSearchField {
display:block;
position:absolute;
height:19px;
background:url('search_m.png') repeat-x;
border:none;
width:116px;
margin-left:20px;
padding-left:4px;
color: #909090;
outline: none;
font: 9pt Arial, Verdana, sans-serif;
}
#FSearchBox #MSearchField {
margin-left:15px;
}
#MSearchBox .right {
display:block;
position:absolute;
right:10px;
top:0px;
width:20px;
height:19px;
background:url('search_r.png') no-repeat;
background-position:left;
}
#MSearchClose {
display: none;
position: absolute;
top: 4px;
background : none;
border: none;
margin: 0px 4px 0px 0px;
padding: 0px 0px;
outline: none;
}
.left #MSearchClose {
left: 6px;
}
.right #MSearchClose {
right: 2px;
}
.MSearchBoxActive #MSearchField {
color: #000000;
}
/*---------------- Search filter selection */
#MSearchSelectWindow {
display: none;
position: absolute;
left: 0; top: 0;
border: 1px solid #E6E6E6;
background-color: #F6F6F6;
z-index: 1;
padding-top: 4px;
padding-bottom: 4px;
-moz-border-radius: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
}
.SelectItem {
font: 8pt Arial, Verdana, sans-serif;
padding-left: 2px;
padding-right: 12px;
border: 0px;
}
span.SelectionMark {
margin-right: 4px;
font-family: monospace;
outline-style: none;
text-decoration: none;
}
a.SelectItem {
display: block;
outline-style: none;
color: #000000;
text-decoration: none;
padding-left: 6px;
padding-right: 12px;
}
a.SelectItem:focus,
a.SelectItem:active {
color: #000000;
outline-style: none;
text-decoration: none;
}
a.SelectItem:hover {
color: #FFFFFF;
background-color: #B0B0B0;
outline-style: none;
text-decoration: none;
cursor: pointer;
display: block;
}
/*---------------- Search results window */
iframe#MSearchResults {
width: 60ex;
height: 15em;
}
#MSearchResultsWindow {
display: none;
position: absolute;
left: 0; top: 0;
border: 1px solid #8A8A8A;
background-color: #F6F6F6;
}
/* ----------------------------------- */
#SRIndex {
clear:both;
padding-bottom: 15px;
}
.SREntry {
font-size: 10pt;
padding-left: 1ex;
}
.SRPage .SREntry {
font-size: 8pt;
padding: 1px 5px;
}
body.SRPage {
margin: 5px 2px;
}
.SRChildren {
padding-left: 3ex; padding-bottom: .5em
}
.SRPage .SRChildren {
display: none;
}
.SRSymbol {
font-weight: bold;
color: #00732F;
font-family: Arial, Verdana, sans-serif;
text-decoration: none;
outline: none;
}
a.SRScope {
display: block;
color: #00732F;
font-family: Arial, Verdana, sans-serif;
text-decoration: none;
outline: none;
}
a.SRSymbol:focus, a.SRSymbol:active,
a.SRScope:focus, a.SRScope:active {
text-decoration: underline;
}
.SRPage .SRStatus {
padding: 2px 5px;
font-size: 8pt;
font-style: italic;
}
.SRResult {
display: none;
}
DIV.searchresults {
margin-left: 10px;
margin-right: 10px;
}

21
CustomQch/ifmetwindow.cpp Normal file
View File

@ -0,0 +1,21 @@
#include "ifmetwindow.h"
#include "ui_ifmetwindow.h"
/*!
* \brief IfmetWindow::IfmetWindow
* \param parent
*/
IfmetWindow::IfmetWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::IfmetWindow)
{
ui->setupUi(this);
}
/*!
* \brief IfmetWindow::~IfmetWindow
*/
IfmetWindow::~IfmetWindow()
{
delete ui;
}

22
CustomQch/ifmetwindow.h Normal file
View File

@ -0,0 +1,22 @@
#ifndef IFMETWINDOW_H
#define IFMETWINDOW_H
#include <QMainWindow>
namespace Ui {
class IfmetWindow;
}
class IfmetWindow : public QMainWindow
{
Q_OBJECT
public:
explicit IfmetWindow(QWidget *parent = nullptr);
~IfmetWindow();
private:
Ui::IfmetWindow *ui;
};
#endif // IFMETWINDOW_H

24
CustomQch/ifmetwindow.ui Normal file
View File

@ -0,0 +1,24 @@
<ui version="4.0">
<class>IfmetWindow</class>
<widget class="QMainWindow" name="IfmetWindow" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle" >
<string>IfmetWindow</string>
</property>
<widget class="QMenuBar" name="menuBar" />
<widget class="QToolBar" name="mainToolBar" />
<widget class="QWidget" name="centralWidget" />
<widget class="QStatusBar" name="statusBar" />
</widget>
<layoutDefault spacing="6" margin="11" />
<pixmapfunction></pixmapfunction>
<resources/>
<connections/>
</ui>

27
CustomQch/main.cpp Normal file
View File

@ -0,0 +1,27 @@
#include "ifmetwindow.h"
#include <QApplication>
/*
* Copyright (C) 2021 All rights reserved.
*
* Author:
* github: https://github.com/xmuli
* blogs: https://ifmet.cn
*
* Qt Assistants 2021-03-08
*/
/*!
* \brief main
* \param argc
* \param argv
* \return
*/
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
IfmetWindow w;
w.show();
return a.exec();
}

6
DbSigSlot/CMakeLists.txt Normal file
View File

@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.7)
project(DbSigSlot)
set(CMAKE_CXX_STANDARD 14)
add_executable(DbSigSlot main.cpp object.cpp object.h db_object.cpp)

29
DbSigSlot/db_object.cpp Normal file
View File

@ -0,0 +1,29 @@
#include "object.h"
//db_object: 是由 moc 编译器 将 object.cpp 展开的内容(此处手写表示)
const char sig_names[] = "sig1()";
const char slot_names[] = "slot1()";
MetaObject Object::meta = {sig_names, slot_names};
void Object::sig1()
{
MetaObject::active(this, 0);
}
void Object::slot1()
{
cout << "-----------> this is slot1()";
}
// 槽的索引==> 槽函数
void Object::metacall(int idx)
{
switch (idx) {
case 0:
slot1();
break;
default:
break;
}
}

19
DbSigSlot/main.cpp Normal file
View File

@ -0,0 +1,19 @@
#include <iostream>
#include "object.h"
using namespace std;
// 目的:自行构造 moc 编译器,手动将 object.h --> db_bject.cpp (宏 和 moc 编译器处理的部分)
// 时间2021-003-26
// 作者:偕臧 ifmet.cn
// 下载https://github.com/xmuli/QtExamples
// 参考https://blog.csdn.net/perfectguyipeng/article/details/78082360
int main(int argc, char *argv[])
{
Object *obj1 = new Object();
Object *obj2 = new Object();
Object::db_connet(obj1, "sig1()", obj2, "slot1()");
obj1->testSignal();
return 0;
}

56
DbSigSlot/object.cpp Normal file
View File

@ -0,0 +1,56 @@
#include "object.h"
#include <cstring>
static int findSignalIndex(const char *str, const char *subStr)
{
if (!str || !subStr || strlen(str) < strlen(subStr))
return -1;
int ret = strcmp(str, subStr);
if (ret == 0)
return ret;
else
return -1;
}
void Object::db_connet(Object *sender, const char *sig, Object *receiver, const char *slot)
{
int sig_idx = findSignalIndex(sender->meta.sig_names, sig);
int slot_idx = findSignalIndex(receiver->meta.slot_names, slot);
if (sig_idx == -1 || slot_idx == -1) {
cout<<"signal or slot not found!";
return;
} else {
Connection c = {receiver, slot_idx};
sender->connectionsMap.insert(pair<int, Connection>(sig_idx, c)); // connectionsMap 私有成员
}
}
void Object::testSignal()
{
db_emit sig1();
}
Object::Object()
{
}
Object::~Object()
{
}
// 通过 sender 的信号 idx ==> 槽函数
void MetaObject::active(Object *sender, int idx)
{
pair<ConnectionMapIt, ConnectionMapIt> ret;
ret = sender->connectionsMap.equal_range(idx); // 寻找[idx, )
for (ConnectionMapIt it = ret.first; it != ret.second; ++it) {
Connection c = (*it).second;
c.recviver->metacall(idx);
}
}

56
DbSigSlot/object.h Normal file
View File

@ -0,0 +1,56 @@
#ifndef OBJECT_H
#define OBJECT_H
#include <iostream>
#include <map>
using namespace std;
#define db_signals protected
#define db_slots
#define db_emit
class Object;
struct MetaObject // 元对象
{
const char *sig_names;
const char *slot_names;
static void active(Object *sender, int idx);
};
struct Connection
{
Object *recviver;
int method;
};
typedef multimap<int, Connection> ConnectionMap;
typedef multimap<int, Connection>::iterator ConnectionMapIt;
class Object
{
static MetaObject meta;
void metacall(int idx);
public:
static void db_connet(Object *sender, const char *sig, Object *receiver, const char *slot);
void testSignal();
public:
Object();
virtual ~Object();
db_signals:
void sig1();
// void sig2();
public db_slots:
void slot1();
// void slot2();
friend class MetaObject;
private:
ConnectionMap connectionsMap;
};
#endif // OBJECT_H

View File

@ -0,0 +1,41 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32802.440
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DeDuplication", "DeDuplication\DeDuplication.vcxproj", "{5FAA2373-0F7C-4CD9-BA01-564733CAF15C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Unique", "Unique\Unique.vcxproj", "{E65BD110-0E5A-44EE-B304-314596C38A9F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5FAA2373-0F7C-4CD9-BA01-564733CAF15C}.Debug|x64.ActiveCfg = Debug|x64
{5FAA2373-0F7C-4CD9-BA01-564733CAF15C}.Debug|x64.Build.0 = Debug|x64
{5FAA2373-0F7C-4CD9-BA01-564733CAF15C}.Debug|x86.ActiveCfg = Debug|Win32
{5FAA2373-0F7C-4CD9-BA01-564733CAF15C}.Debug|x86.Build.0 = Debug|Win32
{5FAA2373-0F7C-4CD9-BA01-564733CAF15C}.Release|x64.ActiveCfg = Release|x64
{5FAA2373-0F7C-4CD9-BA01-564733CAF15C}.Release|x64.Build.0 = Release|x64
{5FAA2373-0F7C-4CD9-BA01-564733CAF15C}.Release|x86.ActiveCfg = Release|Win32
{5FAA2373-0F7C-4CD9-BA01-564733CAF15C}.Release|x86.Build.0 = Release|Win32
{E65BD110-0E5A-44EE-B304-314596C38A9F}.Debug|x64.ActiveCfg = Debug|x64
{E65BD110-0E5A-44EE-B304-314596C38A9F}.Debug|x64.Build.0 = Debug|x64
{E65BD110-0E5A-44EE-B304-314596C38A9F}.Debug|x86.ActiveCfg = Debug|Win32
{E65BD110-0E5A-44EE-B304-314596C38A9F}.Debug|x86.Build.0 = Debug|Win32
{E65BD110-0E5A-44EE-B304-314596C38A9F}.Release|x64.ActiveCfg = Release|x64
{E65BD110-0E5A-44EE-B304-314596C38A9F}.Release|x64.Build.0 = Release|x64
{E65BD110-0E5A-44EE-B304-314596C38A9F}.Release|x86.ActiveCfg = Release|Win32
{E65BD110-0E5A-44EE-B304-314596C38A9F}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {95AA5051-90E8-4FA2-8BC0-4437FF90275A}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1 @@
#include "DeDuplication.h"

View File

@ -0,0 +1,54 @@
#pragma once
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <set>
using namespace std;
struct MyData
{
wstring name;
wstring md5;
};
class DeDuplication
{
private:
static bool cmpSort(const MyData& d1, const MyData& d2) { // 注意,必须是静态
// Simple example
return d1.md5 < d2.md5;
// Complex sample
//if (d1.md5 != d2.md5)
// return d1.md5 < d2.md5;
//else
// return d1.name < d2.name;
};
public:
void finally()
{
wcout.imbue(locale("", LC_CTYPE));
wcout << L"----------调整前--------" << endl;
for (const auto& it : m_vec)
wcout << L"[it.name]" << it.name << L"[it.md5]" << it.md5 << endl;
set<MyData, decltype(DeDuplication::cmpSort)*> s(&DeDuplication::cmpSort);
for (unsigned i = 0; i < m_vec.size(); ++i)
s.insert(m_vec[i]);
m_vec.assign(s.begin(), s.end());
wcout << L"----------调整后--------" << endl;
for (const auto& it : m_vec)
wcout << L"[it.name]" << it.name << L"[it.md5]" << it.md5 << endl;
};
private:
vector<MyData> m_vec = { { L"a1.exe", L"B9204B6362A65C248950D5A41F341DCC"},
{ L"a2.exe", L"B9204B6362A65C248950D5A41F341DCC"},
{ L"b1.exe", L"C96D1AA5D314954417C28A645ED72665"},
{ L"b2.exe", L"C96D1AA5D314954417C28A645ED72665"} };
};

View File

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{5faa2373-0f7c-4cd9-ba01-564733caf15c}</ProjectGuid>
<RootNamespace>DeDuplication</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="DeDuplication.cpp" />
<ClCompile Include="main.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="DeDuplication.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="DeDuplication.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="DeDuplication.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,13 @@
// DeDuplication.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include "DeDuplication.h"
int main()
{
DeDuplication deDup;
deDup.finally();
return 0;
}

View File

@ -0,0 +1,92 @@
// Unique.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <set>
using namespace std;
/* 对应教程
* STL vector : https://xmuli.blog.csdn.net/article/details/126322011
* STL std::set : https://xmuli.blog.csdn.net/article/details/126354597
*/
struct MyData
{
wstring name;
wstring md5;
// 方式一:重载类 < 函数
//bool operator<(const MyData& d) const noexcept {
// return md5 < d.md5;
//}
};
// 方式二:对自定义结构体类型,自定义比较函数 _Pr 【本次采用的方式】
bool cmpSort(const MyData& d1, const MyData& d2) {
// Simple example
return d1.md5 < d2.md5;
// Complex sample
//if (d1.md5 != d2.md5)
// return d1.md5 < d2.md5;
//else
// return d1.name < d2.name;
};
// 方式二变种:同二,但采用 Lambda 表达式(某些部分算法中会失效)
auto cmpSortLambda = [](const MyData& d1, const MyData& d2) {
return d1.md5 < d2.md5;
};
// 方式三:函数对象,略。更新,本来是写了略的,结果意外此处有意外的收获
struct cmpSortObj
{
bool operator()(const MyData& d1, const MyData& d2) const {
return d1.md5 < d2.md5;
}
};
// ************* std::unique 的自定义比较函数 *************
bool cmpUnique(const MyData& d1, const MyData& d2) {
return d1.md5 == d2.md5; // 非严格对象相等,可以达到目标,但会内存泄漏
//return d1.md5 == d2.md5 && d1.name == d2.name; // 满足语法和编译,但不满足实际需求
};
int main()
{
vector<MyData> vec = { { L"a1.exe", L"B9204B6362A65C248950D5A41F341DCC"},
{ L"a2.exe", L"B9204B6362A65C248950D5A41F341DCC"},
{ L"b1.exe", L"C96D1AA5D314954417C28A645ED72665"},
{ L"b2.exe", L"C96D1AA5D314954417C28A645ED72665"} };
wcout.imbue(locale("", LC_CTYPE));
wcout << L"----------调整前--------" << endl;
for (const auto& it : vec)
wcout << L"[it.name]" << it.name << L"[it.md5]" << it.md5 << endl;
// ************* 『一』vector, sort + unique *************
//sort(vec.begin(), vec.end(), cmpSort);
//auto ite = std::unique(vec.begin(), vec.end(), cmpUnique);
//vec.erase(ite, vec.end());
// ************* 『二』vector + set手动赋值 *************
//set<MyData, cmpSortObj> s; // "函数对象"创建 set 对象 --> OK
set<MyData, decltype(cmpSort)*> s(&cmpSort); // "定义普通函数 + decltype"创建 set 对象 --> OK: 编译、运行成功;调试也成功
//set<MyData, decltype(cmpSort)*> s; // --> Error: 编译、运行成功;调试会失败
for (unsigned i = 0; i < vec.size(); ++i)
s.insert(vec[i]); // 编译时,本行可验证上面创建 std::set 的结果
vec.assign(s.begin(), s.end());
// ************* 『三』vector + set构造函数 *************
// 效率不如『二』,故略
wcout << L"----------调整后--------" << endl;
for (const auto& it : vec)
wcout << L"[it.name]" << it.name << L"[it.md5]" << it.md5 << endl;
return 0;
}

View File

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{e65bd110-0e5a-44ee-b304-314596c38a9f}</ProjectGuid>
<RootNamespace>Unique</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Unique.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Unique.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

20
ExCRLF/CMakeLists.txt Normal file
View File

@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 3.14)
project(ExCRLF LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
add_executable(ExCRLF
main.cpp
)
target_link_libraries(ExCRLF Qt${QT_VERSION_MAJOR}::Core)

4
ExCRLF/bin/ExCRLF.txt Normal file
View File

@ -0,0 +1,4 @@
(abcdefg1234hijk) [FOXES](abcdefg1234hijk)
[FOXES](abcdefg1234hijk)
[FOXES](abcdefg1234hijk)
[FOXES]

48
ExCRLF/main.cpp Normal file
View File

@ -0,0 +1,48 @@
#include <QCoreApplication>
#include <QDebug>
#include <QFile>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
// QString s1 = "(abcdefg1234hijk)";
// QString s2 = "[FOXES]";
QString s1 = "(abcdefg1234hijk)\r[FOXES]";
QString s2 = "(abcdefg1234hijk)\n[FOXES]";
QString s3 = "(abcdefg1234hijk)\r\n[FOXES]";
QString s4 = "(abcdefg1234hijk)\n\r[FOXES]";
qDebug()<< "---------qDebug()----------";
qDebug()<< s1;
qDebug().noquote()<< s1;
qDebug()<< s2;
qDebug().noquote()<< s2;
qDebug()<< s3;
qDebug().noquote()<< s3;
qDebug()<< s4;
qDebug().noquote()<< s4;
qDebug()<< "---------cout----------";
cout << "(abcdefg1234hijk)\r[FOXES]";
cout.flush();
cout << "(abcdefg1234hijk)\n[FOXES]";
cout.flush();
cout << "(abcdefg1234hijk)\r\n[FOXES]";
cout.flush();
cout << "(abcdefg1234hijk)\n\r[FOXES]";
cout.flush();
QFile file("ExCRLF.txt");
file.open(QIODevice::WriteOnly | QIODevice::Text);
file.write("(abcdefg1234hijk)\r[FOXES]");
file.write("(abcdefg1234hijk)\n[FOXES]");
file.write("(abcdefg1234hijk)\r\n[FOXES]");
file.write("(abcdefg1234hijk)\n\r[FOXES]");
file.close();
return a.exec();
}

73
ExChangeSVGColor/.gitignore vendored Normal file
View File

@ -0,0 +1,73 @@
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash
# qtcreator generated files
*.pro.user*
# xemacs temporary files
*.flc
# Vim temporary files
.*.swp
# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*
# MinGW generated files
*.Debug
*.Release
# Python byte code
*.pyc
# Binaries
# --------
*.dll
*.exe

View File

@ -0,0 +1,68 @@
cmake_minimum_required(VERSION 3.5)
project(ChangeSVGColor VERSION 0.1 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# QtCreator supports the following variables for Android, which are identical to qmake Android variables.
# Check https://doc.qt.io/qt/deployment-android.html for more information.
# They need to be set before the find_package( ...) calls below.
#if(ANDROID)
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
# if (ANDROID_ABI STREQUAL "armeabi-v7a")
# set(ANDROID_EXTRA_LIBS
# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libcrypto.so
# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libssl.so)
# endif()
#endif()
find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets Svg Xml REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets Svg Xml REQUIRED)
set(PROJECT_SOURCES
main.cpp
widget.cpp
widget.h
resource.qrc
)
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(ExQRect
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
else()
if(ANDROID)
add_library(ExQRect SHARED
${PROJECT_SOURCES}
)
else()
add_executable(ExQRect
${PROJECT_SOURCES}
)
endif()
endif()
target_link_libraries(ExQRect PRIVATE
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::Svg
Qt${QT_VERSION_MAJOR}::Xml
)
set_target_properties(ExQRect PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
)
if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(ExQRect)
endif()

View File

@ -0,0 +1,7 @@
### 效果:修改 `.svg` 的图片颜色,且不模糊(保持相同大小)
<img src="display.gif" width="100%"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

37
ExChangeSVGColor/main.cpp Normal file
View File

@ -0,0 +1,37 @@
#include "widget.h"
#include <QApplication>
#include <QMap>
#include <QString>
#include <QVector>
#include <QDebug>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Widget w;
w.show();
// QVector<QMap<QString, QString>> vLab;
// vLab.append(QMap<QString, QString>({"labRed", "#DB000F"}));
// vLab.append(QMap<QString, QString>({"labYellow", "#FFCF53"}));
// vLab.append(QMap<QString, QString>({"labGreen", "#12F63B"}));
// vLab.append(QMap<QString, QString>({"labBlue", "#0E70FF"}));
// vLab.append(QMap<QString, QString>({"labPink", "#FB4288"}));
// vLab.append(QMap<QString, QString>({"labBlack", "#323232"}));
// vLab.append(QMap<QString, QString>({"labWhite", "#FBFBFB"}));
// vLab.append(QMap<QString, QString>({"labPick", "#FFDB34"})); //
// qDebug() << vLab[2].first() << " ";
// QPushButton* btn = new QPushButton("btn123");
// QIcon icon("D:/projects/PicShot/src/resourcesicons/normal/gif.svg");
// btn->setIcon(icon);
// btn->show();
return a.exec();
}

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M796.444444 910.222222H484.977778V540.444444H853.333333V227.555556a56.888889 56.888889 0 0 0-56.888889-56.888889H484.977778v369.777777H113.777778V853.333333a56.888889 56.888889 0 0 0 56.888889 56.888889h625.777777z m56.888889-369.777778h56.888889V853.333333a113.777778 113.777778 0 0 1-113.777778 113.777778H170.666667a113.777778 113.777778 0 0 1-113.777778-113.777778V227.555556a113.777778 113.777778 0 0 1 113.777778-113.777778h625.777777a113.777778 113.777778 0 0 1 113.777778 113.777778v570.311111z" /></svg>

After

Width:  |  Height:  |  Size: 792 B

View File

@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/">
<file>mosaic.svg</file>
</qresource>
</RCC>

146
ExChangeSVGColor/widget.cpp Normal file
View File

@ -0,0 +1,146 @@
#include "widget.h"
#include <QPainter>
#include <QDebug>
// test
#include <QFile>
#include <QByteArray>
#include <QPainter>
#include <QPixmap>
#include <QIcon>
#include <QSvgRenderer>
#include <QDomElement>
#include <QDomElement>
#include <QIcon>
#include <QSize>
QIcon ChangeSVGColor(QString path, QString color, QSize size)
{
QFile file(path);
file.open(QIODevice::ReadOnly);
QByteArray baData = file.readAll();
QDomDocument doc;
doc.setContent(baData);
QDomElement elem = doc.documentElement(); // const 和 值传递
SetAttrRecur(elem, "path", "fill", color);
QSvgRenderer svgRenderer(doc.toByteArray());
// create pixmap target (could be a QImage)
// QPixmap pix(svgRenderer.defaultSize());
QPixmap pix(svgRenderer.defaultSize().scaled(size.width(), size.height(), Qt::KeepAspectRatio)); // fix: 修改 svg 颜色后略有模糊
pix.fill(Qt::transparent);
// create painter to act over pixmap
QPainter pixPainter(&pix);
// use renderer to render over painter which paints on pixmap
svgRenderer.render(&pixPainter);
QIcon myicon(pix);
return myicon;
}
void SetAttrRecur(QDomElement &elem, QString strtagname, QString strattr, QString strattrval)
{
// if it has the tagname then overwritte desired attribute
if (elem.tagName().compare(strtagname) == 0)
{
elem.setAttribute(strattr, strattrval);
}
// loop all children
for (int i = 0; i < elem.childNodes().count(); i++)
{
if (!elem.childNodes().at(i).isElement())
{
continue;
}
QDomElement t = elem.childNodes().at(i).toElement();
SetAttrRecur(t, strtagname, strattr, strattrval);
}
}
Widget::Widget(QWidget *parent)
: QWidget(parent)
, m_btn()
{
setWindowTitle("change .svg color");
resize(1600, 1000);
QIcon icon(ChangeSVGColor(":/mosaic.svg", QColor(Qt::green).name(), QSize(m_width, m_width)));
m_btn = new QToolButton(this);
m_btn->setCheckable(true);
m_btn->setToolButtonStyle(Qt::ToolButtonIconOnly);
m_btn->setAutoRaise(true); // 自动浮动模式
m_btn->setIcon(icon);
m_btn->setIconSize(QSize(m_width, m_width));
// m_btn->resize(200, 200);
m_btn->move(0, 0);
// QIcon icon2(":/mosaic.svg");
m_btn2 = new QToolButton(this);
m_btn2->setCheckable(true);
m_btn2->setToolButtonStyle(Qt::ToolButtonIconOnly);
m_btn2->setAutoRaise(false); // 自动浮动模式
m_btn2->setIcon(icon);
m_btn2->setIconSize(QSize(m_width, m_width));
// m_btn->resize(200, 200);
m_btn2->move(200, 0);
m_btn->show();
m_btn2->show();
connect(m_btn, &QToolButton::clicked, this, &Widget::onBtnChecked);
connect(m_btn2, &QToolButton::clicked, this, &Widget::onBtnChecked);
}
Widget::~Widget()
{
}
void Widget::paintEvent(QPaintEvent *event)
{
QPainter pa(this);
pa.setBrush(Qt::NoBrush);
pa.setPen(QPen(Qt::black, 1));
pa.setPen(Qt::blue);
QRect rt(200, 200, 200, 200);
pa.drawRect(rt);
QPoint pos(500, 200);
int off = 30;
pa.drawText(pos + QPoint(0, off * 0), QString("rt.x():%1 rt.y():%2 rt.width():%3 rt.height():%4")
.arg(rt.x()).arg(rt.y()).arg(rt.width()).arg(rt.height()));
pa.drawText(pos + QPoint(0, off * 1), QString("rt.left():%1 rt.top():%2 rt.right():%3 rt.bottom():%4")
.arg(rt.left()).arg(rt.top()).arg(rt.right()).arg(rt.bottom()));
pa.drawText(pos + QPoint(0, off * 2), QString("rt.topLeft().x():%1 rt.topLeft().y():%2 rt.bottomRight().x():%3 rt.bottomRight().y():%4")
.arg(rt.topLeft().x()).arg(rt.topLeft().y()).arg(rt.bottomRight().x()).arg(rt.bottomRight().y()));
update();
}
void Widget::onBtnChecked(bool checked)
{
QString path(":/mosaic.svg");
QIcon ico;
if (checked)
ico.addFile(path);
else
ico = ChangeSVGColor(path, QColor(Qt::green).name(), QSize(m_width, m_width));
auto bt = qobject_cast<QToolButton*>(sender());
bt->setIcon(ico);
}

32
ExChangeSVGColor/widget.h Normal file
View File

@ -0,0 +1,32 @@
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QPushButton>
#include <QToolButton>
class QDomElement;
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent = nullptr);
~Widget();
// QWidget interface
protected:
virtual void paintEvent(QPaintEvent *event) override;
public slots:
void onBtnChecked(bool checked);
private:
QToolButton* m_btn;
QToolButton* m_btn2;
const int m_width = 100;
};
void SetAttrRecur(QDomElement &elem, QString strtagname, QString strattr, QString strattrval);
#endif // WIDGET_H

View File

@ -0,0 +1,63 @@
cmake_minimum_required(VERSION 3.5)
project(ExIntelDete VERSION 0.1 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# QtCreator supports the following variables for Android, which are identical to qmake Android variables.
# Check https://doc.qt.io/qt/deployment-android.html for more information.
# They need to be set before the find_package( ...) calls below.
#if(ANDROID)
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
# if (ANDROID_ABI STREQUAL "armeabi-v7a")
# set(ANDROID_EXTRA_LIBS
# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libcrypto.so
# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libssl.so)
# endif()
#endif()
find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)
set(PROJECT_SOURCES
main.cpp
widget.cpp
widget.h
)
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(ExIntelDete
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
else()
if(ANDROID)
add_library(ExIntelDete SHARED
${PROJECT_SOURCES}
)
else()
add_executable(ExIntelDete
${PROJECT_SOURCES}
)
endif()
endif()
target_link_libraries(ExIntelDete PRIVATE Qt${QT_VERSION_MAJOR}::Widgets X11) # add X11
set_target_properties(ExIntelDete PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
)
if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(ExIntelDete)
endif()

101
ExIntelDete/main.cpp Normal file
View File

@ -0,0 +1,101 @@
#include "widget.h"
#include <QApplication>
#include <QList>
#include <QObject>
#include <QList>
#include <QDebug>
// X11 一种可能性是添加 QTextStream 包含该错误出现的位置。
// 至于 X11 相关的错误,请尝试将 X11 包含在 Qt 包含之后。
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/X.h>
#include <unistd.h>
// https://www.jianshu.com/p/c906fbe1ad00
// https://stackoverflow.com/questions/1201179/how-to-identify-top-level-x11-windows-using-xlib
// https://www.cnblogs.com/alalazy/p/12323089.html
class WindowsMatchingPid
{
public:
WindowsMatchingPid(Display *display, Window wRoot, unsigned long pid)
: _display(display)
, _pid(pid)
{
_atomPID = XInternAtom(display, "_NET_WM_PID", True);
if(_atomPID == None)
{
return;
}
search(wRoot);
}
const QList<Window> result() const { return _result; }
private:
unsigned long _pid;
Atom _atomPID;
Display *_display;
QList<Window> _result;
void search(Window w)
{
Atom type;
int format;
unsigned long nItems;
unsigned long bytesAfter;
unsigned char *propPID = 0;
if(Success == XGetWindowProperty(_display, w, _atomPID, 0, 1, False, XA_CARDINAL,
&type, &format, &nItems, &bytesAfter, &propPID))
{
if(propPID != 0)
{
if(_pid == *((unsigned long *)propPID))
_result.append(w);
XFree(propPID);
}
}
Window wRoot;
Window wParent;
Window *wChild;
unsigned nChildren;
if(0 != XQueryTree(_display, w, &wRoot, &wParent, &wChild, &nChildren))
{
for(unsigned i = 0; i < nChildren; i++)
search(wChild[i]);
}
}
};
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
// Widget w;
// w.show();
QList<QObject*> m_pformList;
int pid = getpid();
Display *display = XOpenDisplay(0);
WindowsMatchingPid match(display, XDefaultRootWindow(display), pid);
const QList<Window> result = match.result();
for(int i=0; i<result.count();i++)
{
unsigned long winId = (unsigned long)(result.at(i));
QWidget* win = QWidget::find(winId);
if(win!=NULL&&win->isWindow()&&win->isVisible()){
m_pformList.append((QObject*)win);
}
}
XCloseDisplay(display);
return a.exec();
}

11
ExIntelDete/widget.cpp Normal file
View File

@ -0,0 +1,11 @@
#include "widget.h"
Widget::Widget(QWidget *parent)
: QWidget(parent)
{
}
Widget::~Widget()
{
}

14
ExIntelDete/widget.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent = nullptr);
~Widget();
};
#endif // WIDGET_H

73
ExPicShot/.gitignore vendored Normal file
View File

@ -0,0 +1,73 @@
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash
# qtcreator generated files
*.pro.user*
# xemacs temporary files
*.flc
# Vim temporary files
.*.swp
# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*
# MinGW generated files
*.Debug
*.Release
# Python byte code
*.pyc
# Binaries
# --------
*.dll
*.exe

1
ExPicShot/3rdparty/spdlog vendored Submodule

@ -0,0 +1 @@
Subproject commit b1478d98f017f3a7644e6e3a16fab6a47a5c26ba

36
ExPicShot/CMakeLists.txt Normal file
View File

@ -0,0 +1,36 @@
cmake_minimum_required(VERSION 3.5)
project(ExPicShot VERSION 0.1 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)
include_directories(3rdparty/spdlog/include) # spdlog
set(PROJECT_SOURCES
main.cpp
widget.cpp
widget.h
)
add_executable(ExPicShot
${PROJECT_SOURCES}
)
target_link_libraries(ExPicShot PRIVATE Qt${QT_VERSION_MAJOR}::Widgets)
set_target_properties(ExPicShot PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
)

42
ExPicShot/main.cpp Normal file
View File

@ -0,0 +1,42 @@
#include "widget.h"
#include <QApplication>
#include "spdlog/spdlog.h"
#include "spdlog/logger.h"
#include "spdlog/sinks/basic_file_sink.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
// 方法一: 默认为彩色格式且输出到终端
// spdlog::info("Welcome to spdlog!");
// spdlog::error("Some error message with arg: {}", 1);
// spdlog::warn("Easy padding in numbers like {:08d}", 12);
// spdlog::critical("Support for int: {0:d}; hex: {0:x}; oct: {0:o}; bin: {0:b}", 42);
// spdlog::info("Support for floats {:03.2f}", 1.23456);
// spdlog::info("Positional args are {1} {0}..", "too", "supported");
// spdlog::info("{:<30}", "left aligned");
// 方法二: 默认格式输出到文本文件
auto logger = spdlog::basic_logger_mt("basic_logger", "logs/basic-log.txt");
logger->flush_on(spdlog::level::debug); // 遇到 err 级别缓冲区倾倒写入文本
//spdlog::flush_every(std::chrono::seconds(5));
logger->info("Welcome to spdlog!");
logger->error("Some error message with arg: {}", 1);
logger->warn("Easy padding in numbers like {:08d}", 12);
logger->critical("Support for int: {0:d}; hex: {0:x}; oct: {0:o}; bin: {0:b}", 42);
logger->info("Support for floats {:03.2f}", 1.23456);
logger->info("Positional args are {1} {0}..", "too", "supported");
logger->info("{:<30}", "left aligned");
logger->set_level(spdlog::level::debug); // Set global log level to debug
logger->debug("This message should be displayed..");
Widget w;
w.show();
return a.exec();
}

11
ExPicShot/widget.cpp Normal file
View File

@ -0,0 +1,11 @@
#include "widget.h"
Widget::Widget(QWidget *parent)
: QWidget(parent)
{
}
Widget::~Widget()
{
}

14
ExPicShot/widget.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent = nullptr);
~Widget();
};
#endif // WIDGET_H

View File

@ -0,0 +1,53 @@
/*******************************************************************
* Copyright (C) 2022 All rights reserved.
*
* Author: <xmulitech@gmail.com>
* GitHub: https://github.com/xmuli
* Blog: https://ifmet.cn
*
* Create: 2022.01.12
* Modify: 2022.01.14
* File: multithread.h
* Description: 线线
* atomic mutex
*
******************************************************************/
#ifndef MULTITHREAD_H
#define MULTITHREAD_H
#include <atomic>
#include <mutex>
#include <thread>
#include <iostream>
using namespace std;
// 方案一:定义为原子变量 atomic
//atomic<int> g_num = 0;
// 方案二:加锁 mutex
int g_num = 0;
mutex g_mutex;
void addition()
{
for (int i = 0; i < 5000; ++i) {
g_mutex.lock(); // 尝试和下一行的 cout 行互换位置
cout << "threadId:" << this_thread::get_id() << " g_num:" << g_num << endl;
g_num++;
g_mutex.unlock();
}
}
使
int main()
{
thread th1(addition);
thread th2(addition);
th1.join();
th2.join();
cout << "g_num:" << g_num << endl;
return 0;
}
#endif

View File

@ -0,0 +1,73 @@
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash
# qtcreator generated files
*.pro.user*
# xemacs temporary files
*.flc
# Vim temporary files
.*.swp
# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*
# MinGW generated files
*.Debug
*.Release
# Python byte code
*.pyc
# Binaries
# --------
*.dll
*.exe

View File

@ -0,0 +1,65 @@
cmake_minimum_required(VERSION 3.5)
project(CMakeAutoRaise VERSION 0.1 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
set(PROJECT_SOURCES
main.cpp
widget.cpp
widget.h
resources.qrc
testbtstyle.h
testbtstyle.cpp
)
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(CMakeAutoRaise
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
# Define target properties for Android with Qt 6 as:
# set_property(TARGET CMakeAutoRaise APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
# ${CMAKE_CURRENT_SOURCE_DIR}/android)
# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
else()
if(ANDROID)
add_library(CMakeAutoRaise SHARED
${PROJECT_SOURCES}
)
# Define properties for Android with Qt 5 after find_package() calls as:
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
else()
add_executable(CMakeAutoRaise
${PROJECT_SOURCES}
)
endif()
endif()
target_link_libraries(CMakeAutoRaise PRIVATE Qt${QT_VERSION_MAJOR}::Widgets)
set_target_properties(CMakeAutoRaise PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)
install(TARGETS CMakeAutoRaise
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(CMakeAutoRaise)
endif()

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M815.8208 258.3552v309.8624a42.5984 42.5984 0 0 1-42.8544 42.8032 39.936 39.936 0 0 1-41.8816-41.8816L729.6 355.84l-427.52 427.52a42.5984 42.5984 0 1 1-59.8528-59.7504l427.5712-427.5712-217.5488 2.816a51.2512 51.2512 0 0 1-35.7888-48.0256 42.5984 42.5984 0 0 1 42.8544-42.8544l302.7968-3.2768a45.9264 45.9264 0 0 1 53.6576 53.6576z" /></svg>

After

Width:  |  Height:  |  Size: 621 B

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M960 992H256A96 96 0 0 1 160 896V256A96 96 0 0 1 256 160h640A96 96 0 0 1 992 256v704a32 32 0 0 1-32 32zM256 224a32 32 0 0 0-32 32v640a32 32 0 0 0 32 32h672V256a32 32 0 0 0-32-32zM64 792.32a32 32 0 0 1-32-32V136.32A104.32 104.32 0 0 1 136.32 32H768a32 32 0 0 1 0 64H136.32a40.32 40.32 0 0 0-39.68 40.32v624a32 32 0 0 1-32.64 32z" /></svg>

After

Width:  |  Height:  |  Size: 617 B

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M544 643.2l131.2-131.2c12.8-12.8 32-12.8 44.8 0 12.8 12.8 12.8 32 0 44.8l-156.8 156.8c-25.6 25.6-64 25.6-89.6 0l-156.8-156.8c-12.8-12.8-12.8-32 0-44.8 12.8-12.8 32-12.8 44.8 0l121.6 121.6V160c0-19.2 12.8-32 32-32s32 12.8 32 32v483.2z m288-35.2c0-19.2 12.8-32 32-32s32 12.8 32 32v160c0 54.4-41.6 96-96 96h-576c-54.4 0-96-41.6-96-96v-160c0-19.2 12.8-32 32-32s32 12.8 32 32v160c0 19.2 12.8 32 32 32h576c19.2 0 32-12.8 32-32v-160z" /></svg>

After

Width:  |  Height:  |  Size: 716 B

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M510.5 104.8c55.1 0 108.5 10.8 158.7 32 48.6 20.5 92.2 50 129.6 87.4 37.5 37.5 66.9 81.1 87.4 129.6 21.3 50.3 32 103.7 32 158.7s-10.8 108.5-32 158.7c-20.5 48.6-50 92.2-87.4 129.6-37.5 37.5-81.1 66.9-129.6 87.4-50.3 21.3-103.7 32-158.7 32-55.1 0-108.5-10.8-158.7-32-48.6-20.5-92.2-50-129.6-87.4-37.5-37.5-66.9-81.1-87.4-129.6-21.3-50.3-32-103.7-32-158.7s10.8-108.5 32-158.7c20.5-48.6 50-92.2 87.4-129.6 37.5-37.5 81.1-66.9 129.6-87.4 50.2-21.2 103.6-32 158.7-32m0-40c-247.3 0-447.8 200.5-447.8 447.8s200.5 447.8 447.8 447.8S958.3 760 958.3 512.6 757.8 64.8 510.5 64.8z" /></svg>

After

Width:  |  Height:  |  Size: 858 B

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M766.4 269.6 552 484l214.4 214.4c18.4 18.4 18.4 48.8 0 68-18.4 18.4-48.8 18.4-68 0L484 552 269.6 765.6c-18.4 18.4-48.8 18.4-68 0-18.4-18.4-18.4-48.8 0-68L416 484 201.6 269.6c-18.4-18.4-18.4-48.8 0-68 18.4-18.4 48.8-18.4 68 0L484 416l214.4-214.4c18.4-18.4 48.8-18.4 68 0C784.8 220.8 784.8 251.2 766.4 269.6z" /></svg>

After

Width:  |  Height:  |  Size: 596 B

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M521.452308 103.975385c233.156923 0 423.778462 189.046154 423.778461 423.778461 0 233.156923-189.046154 423.778462-423.778461 423.778462-233.156923 0-422.203077-189.046154-422.203077-423.778462-1.575385-234.732308 189.046154-423.778462 422.203077-423.778461z" /></svg>

After

Width:  |  Height:  |  Size: 549 B

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M760 960H264c-110.5 0-200-89.5-200-200V264c0-110.5 89.5-200 200-200h496c110.5 0 200 89.5 200 200v496c0 110.5-89.5 200-200 200z" /></svg>

After

Width:  |  Height:  |  Size: 416 B

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M196.923077 512c0-105.550769 57.895385-140.603077 152.812308-140.603077 27.963077 0 64.590769 3.544615 81.92 9.846154v45.686154c-22.843077-7.483077-49.624615-11.027692-77.981539-11.027693-63.015385 0-94.129231 20.48-94.129231 96.098462 0 79.950769 27.569231 96.886154 91.372308 96.886154 13.784615 0 27.569231-0.393846 38.596923-3.150769v-67.741539H333.981538v-43.323077h110.67077v146.116923c-23.236923 6.301538-59.076923 11.815385-98.067693 11.815385-93.341538 0-149.661538-25.993846-149.661538-140.603077zM512.787692 375.335385h58.289231v273.32923h-58.289231V375.335385zM702.227692 420.233846v72.073846h115.79077v44.898462h-115.79077v111.458461h-58.28923V375.335385H827.076923v44.898461h-124.849231zM787.692308 129.969231c58.683077 0 106.338462 47.655385 106.338461 106.338461v551.384616c0 58.683077-47.655385 106.338462-106.338461 106.338461H236.307692c-58.683077 0-106.338462-47.655385-106.338461-106.338461V236.307692c0-58.683077 47.655385-106.338462 106.338461-106.338461h551.384616M787.692308 78.769231H236.307692C149.267692 78.769231 78.769231 149.267692 78.769231 236.307692v551.384616c0 87.04 70.498462 157.538462 157.538461 157.538461h551.384616c87.04 0 157.538462-70.498462 157.538461-157.538461V236.307692c0-87.04-70.498462-157.538462-157.538461-157.538461z" /></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M262.88 819.744l560-572.64c14.048-14.368 11.616-35.584-5.44-47.424-17.056-11.84-42.272-9.76-56.32 4.576l-560 572.64c-14.048 14.368-11.616 35.584 5.44 47.424 17.056 11.84 42.272 9.76 56.32-4.576z" /></svg>

After

Width:  |  Height:  |  Size: 484 B

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M796.444444 910.222222H484.977778V540.444444H853.333333V227.555556a56.888889 56.888889 0 0 0-56.888889-56.888889H484.977778v369.777777H113.777778V853.333333a56.888889 56.888889 0 0 0 56.888889 56.888889h625.777777z m56.888889-369.777778h56.888889V853.333333a113.777778 113.777778 0 0 1-113.777778 113.777778H170.666667a113.777778 113.777778 0 0 1-113.777778-113.777778V227.555556a113.777778 113.777778 0 0 1 113.777778-113.777778h625.777777a113.777778 113.777778 0 0 1 113.777778 113.777778v570.311111z" /></svg>

After

Width:  |  Height:  |  Size: 792 B

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M971.715765 167.574588a120.470588 120.470588 0 0 1 0 170.405647L325.511529 984.184471a120.470588 120.470588 0 0 1-85.172705 35.297882H34.635294V813.778824a120.470588 120.470588 0 0 1 35.297882-85.172706L716.197647 82.401882a120.470588 120.470588 0 0 1 170.405647 0l85.172706 85.172706z m-183.296 225.882353l-127.759059-127.759059-526.817882 526.817883a30.117647 30.117647 0 0 0-8.432942 16.564706l-0.421647 4.698353v115.350588H240.338824a30.117647 30.117647 0 0 0 17.648941-5.782588l3.614117-3.011765 526.817883-526.878118z m119.386353-161.972706L822.633412 146.371765a30.117647 30.117647 0 0 0-38.430118-3.493647l-4.21647 3.493647-55.416471 55.476706 127.698823 127.819294 55.536942-55.536941a30.117647 30.117647 0 0 0 3.493647-38.430118l-3.493647-4.156235z" /></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M609.834667 140.501333a42.624 42.624 0 0 1 60.330666 0l213.333334 213.333334c1.194667 1.194667 2.346667 2.517333 3.413333 3.84l0.682667 0.896a32.085333 32.085333 0 0 1 2.133333 3.2c0.298667 0.512 0.64 1.024 0.896 1.578666a49.536 49.536 0 0 1 2.261333 4.821334l0.938667 2.56 0.597333 1.962666 0.682667 2.773334 0.384 2.218666A38.229333 38.229333 0 0 1 896 384l-0.170667-3.669333a20.864 20.864 0 0 1 0.128 2.304L896 384l-0.042667 1.450667-0.128 2.218666a53.461333 53.461333 0 0 1-0.298666 2.730667l-0.384 2.218667c-0.170667 0.938667-0.426667 1.877333-0.64 2.773333a26.368 26.368 0 0 1-0.597334 1.962667c-0.256 0.853333-0.597333 1.664-0.896 2.517333a34.858667 34.858667 0 0 1-2.304 4.821333l-0.896 1.536a40.874667 40.874667 0 0 1-6.272 7.936l3.413334-3.84-0.298667 0.384-3.114667 3.498667-213.333333 213.333333a42.624 42.624 0 1 1-60.330667-60.330666L750.293333 426.666667H341.333333a128 128 0 0 0-127.786666 120.490666L213.333333 554.666667v298.666666a42.666667 42.666667 0 0 1-85.333333 0v-298.666666a213.333333 213.333333 0 0 1 213.333333-213.333334h408.96l-140.458666-140.501333a42.666667 42.666667 0 0 1-3.541334-56.32l3.541334-4.010667z" /></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M881.2 961.3H136c-42.2 0-76.5-34.3-76.5-76.5V139.5C59.5 97.3 93.8 63 136 63h745.2c42.2 0 76.5 34.3 76.5 76.5v745.2c0.1 42.2-34.3 76.6-76.5 76.6zM136 109.6c-16.5 0-29.9 13.4-29.9 29.9v745.2c0 16.5 13.4 29.9 29.9 29.9h745.2c16.5 0 29.9-13.4 29.9-29.9V139.5c0-16.5-13.4-29.9-29.9-29.9H136z" /></svg>

After

Width:  |  Height:  |  Size: 577 B

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M414.165333 567.168a42.624 42.624 0 1 1-60.330666 60.330667l-213.333334-213.333334-3.114666-3.498666-0.298667-0.341334-0.725333-0.938666a32.085333 32.085333 0 0 1-3.029334-4.736 49.536 49.536 0 0 1-2.304-4.821334l-0.938666-2.56-0.554667-1.92a65.621333 65.621333 0 0 1-0.682667-2.773333l-0.384-2.261333A43.52 43.52 0 0 1 128 384l0.170667 3.797333A66.261333 66.261333 0 0 1 128 384.810667V384v-0.810667c0-0.981333 0.085333-1.962667 0.170667-2.986666l0.298666-2.56 0.384-2.218667c0.170667-0.938667 0.426667-1.877333 0.64-2.773333l0.64-1.962667c0.256-0.853333 0.597333-1.664 0.896-2.517333a34.858667 34.858667 0 0 1 2.304-4.821334l0.896-1.536a40.874667 40.874667 0 0 1 6.272-7.936l-3.413333 3.84a42.112 42.112 0 0 1 3.413333-3.84l213.333334-213.333333a42.624 42.624 0 1 1 60.330666 60.330667L273.664 341.333333H682.666667a213.290667 213.290667 0 0 1 213.12 204.074667L896 554.666667v298.666666a42.666667 42.666667 0 0 1-85.333333 0v-298.666666a128 128 0 0 0-128-128H273.664l140.501333 140.501333z" /></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M845.6 349.6l-384 384c-14.4 14.4-34.4 17.6-52 10.4-5.6-2.4-11.2-5.6-16-10.4L178.4 518.4c-18.4-18.4-18.4-49.6 0-68 18.4-18.4 49.6-18.4 68 0L428 632l350.4-350.4c18.4-18.4 48.8-18.4 68 0C864.8 300.8 864.8 331.2 845.6 349.6z" /></svg>

After

Width:  |  Height:  |  Size: 510 B

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M928 752h-96v-448c0-54.4-41.6-96-96-96h-480v-128c0-19.2-12.8-32-32-32s-32 12.8-32 32v128h-96c-19.2 0-32 12.8-32 32s12.8 32 32 32h96v448c0 54.4 41.6 96 96 96h480v128c0 19.2 12.8 32 32 32s32-12.8 32-32v-128h96c19.2 0 32-12.8 32-32s-12.8-32-32-32z m-640 0c-19.2 0-32-12.8-32-32v-448h480c19.2 0 32 12.8 32 32v448h-480z" /></svg>

After

Width:  |  Height:  |  Size: 604 B

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M563.2 281.6V870.4a51.2 51.2 0 0 1-102.4 0V281.6H179.2a51.2 51.2 0 1 1 0-102.4h665.6a51.2 51.2 0 0 1 0 102.4H563.2z" /></svg>

After

Width:  |  Height:  |  Size: 406 B

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M544 201.6v470.4c0 19.2-12.8 32-32 32s-32-12.8-32-32v-460.8l-121.6 121.6c-12.8 12.8-32 12.8-44.8 0-12.8-12.8-12.8-32 0-44.8l156.8-156.8c25.6-25.6 64-25.6 89.6 0l156.8 156.8c12.8 12.8 12.8 32 0 44.8-12.8 12.8-32 12.8-44.8 0l-128-131.2z m288 406.4c0-19.2 12.8-32 32-32s32 12.8 32 32v160c0 54.4-41.6 96-96 96h-576c-54.4 0-96-41.6-96-96v-160c0-19.2 12.8-32 32-32s32 12.8 32 32v160c0 19.2 12.8 32 32 32h576c19.2 0 32-12.8 32-32v-160z" /></svg>

After

Width:  |  Height:  |  Size: 718 B

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>箭头</title>
<g id="箭头" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<path d="M17.5,5.75 L17.517448,5.75020172 C17.5374655,5.75066463 17.5574681,5.75192429 17.577404,5.7539807 L17.5,5.75 C17.5468456,5.75 17.592688,5.75429489 17.6371551,5.76251238 C17.6480328,5.76457582 17.6597261,5.76701468 17.671367,5.76973472 C17.6948272,5.77517085 17.7172835,5.78157935 17.7392836,5.78898031 C17.7490913,5.79230301 17.7594565,5.79602848 17.7697519,5.79998933 C17.7890942,5.80744952 17.8075139,5.815445 17.8255328,5.82413984 C17.8399909,5.83105843 17.8546244,5.8387019 17.8690453,5.84686081 C17.8865081,5.85681304 17.9036581,5.86746126 17.9203291,5.8787629 C17.9306612,5.88568532 17.9411291,5.89317572 17.9514416,5.90096775 C18.0081986,5.94390193 18.0585304,5.99447237 18.1010016,6.05126304 L18.0303301,5.96966991 C18.0673834,6.00672319 18.0997491,6.04668892 18.1274273,6.08883021 C18.1405922,6.10898514 18.1529723,6.12997247 18.164329,6.15158175 C18.1691626,6.16070362 18.1735192,6.16943437 18.1776949,6.17822959 C18.190442,6.20501812 18.2019466,6.23347789 18.2116971,6.26273953 C18.2139554,6.26968322 18.2158799,6.27575442 18.2177252,6.28184446 C18.2290814,6.31893395 18.2377062,6.35807689 18.2431534,6.39822944 L18.25,6.5 L18.25,13 C18.25,13.4142136 17.9142136,13.75 17.5,13.75 C17.1203042,13.75 16.806509,13.4678461 16.7568466,13.1017706 L16.75,13 L16.75,8.31 L7.03033009,18.0303301 C6.73743687,18.3232233 6.26256313,18.3232233 5.96966991,18.0303301 C5.70340335,17.7640635 5.6791973,17.3473998 5.89705176,17.0537883 L5.96966991,16.9696699 L15.688,7.25 L11,7.25 C10.6203042,7.25 10.306509,6.96784612 10.2568466,6.60177056 L10.25,6.5 C10.25,6.12030423 10.5321539,5.80650904 10.8982294,5.75684662 L11,5.75 L17.5,5.75 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>取消</title>
<g id="取消" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<line x1="17.5" y1="6.5" x2="6.5" y2="17.5" id="直线" stroke="#D02C2C" stroke-width="1.5" stroke-linecap="round"></line>
<line x1="17.5" y1="6.5" x2="6.5" y2="17.5" id="直线" stroke="#D02C2C" stroke-width="1.5" stroke-linecap="round" transform="translate(12.000000, 12.000000) scale(1, -1) translate(-12.000000, -12.000000) "></line>
</g>
</svg>

After

Width:  |  Height:  |  Size: 731 B

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>圆形</title>
<g id="圆形" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<path d="M12,5 C15.8659932,5 19,8.13400675 19,12 C19,15.8659932 15.8659932,19 12,19 C8.13400675,19 5,15.8659932 5,12 C5,8.13400675 8.13400675,5 12,5 Z M12,6.2 C8.79674845,6.2 6.2,8.79674845 6.2,12 C6.2,15.2032515 8.79674845,17.8 12,17.8 C15.2032515,17.8 17.8,15.2032515 17.8,12 C17.8,8.79674845 15.2032515,6.2 12,6.2 Z" id="矩形" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 760 B

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>确定</title>
<g id="确定" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<polyline id="路径-4" stroke="#FFFFFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" points="5.82274511 11.5621971 11.4741446 18.1666272 20.9002707 4.95776692"></polyline>
</g>
</svg>

After

Width:  |  Height:  |  Size: 579 B

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>录屏</title>
<g id="录屏" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<path d="M14,5 C15.6568542,5 17,6.34314575 17,8 L17,8.565 L18.9117099,7.29126821 C19.2041372,7.09631665 19.5899021,7.1504299 19.8187414,7.40355534 L19.8824352,7.48541328 C19.9590934,7.60040054 20,7.73550593 20,7.87370342 L20,7.87370342 L20,15.1262966 C20,15.5128959 19.6865993,15.8262966 19.3,15.8262966 C19.1618025,15.8262966 19.0266971,15.78539 18.9117099,15.7087318 L18.9117099,15.7087318 L17,14.434 L17,15 C17,16.6568542 15.6568542,18 14,18 L7,18 C5.34314575,18 4,16.6568542 4,15 L4,8 C4,6.34314575 5.34314575,5 7,5 L14,5 Z M14,6 L7,6 C5.9456382,6 5.08183488,6.81587779 5.00548574,7.85073766 L5,8 L5,15 C5,16.0543618 5.81587779,16.9181651 6.85073766,16.9945143 L7,17 L14,17 C15.0543618,17 15.9181651,16.1841222 15.9945143,15.1492623 L16,15 L16,8 C16,6.9456382 15.1841222,6.08183488 14.1492623,6.00548574 L14,6 Z M19,8.434 L17,9.767 L17,13.232 L19,14.565 L19,8.434 Z M9.5,9 C9.77614237,9 10,9.22385763 10,9.5 C10,9.77614237 9.77614237,10 9.5,10 L7.5,10 C7.22385763,10 7,9.77614237 7,9.5 C7,9.22385763 7.22385763,9 7.5,9 L9.5,9 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>马赛克</title>
<g id="马赛克" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<path d="M7,19 C5.8954305,19 5,18.1045695 5,17 L5,7 C5,5.8954305 5.8954305,5 7,5 L17,5 C18.1045695,5 19,5.8954305 19,7 L19,17 C19,18.0543618 18.1841222,18.9181651 17.1492623,18.9945143 L17,19 L17,19 L7,19 Z M17,6 L12,6 L12,12 L6,12 L6,17 C6,17.5128358 6.38604019,17.9355072 6.88337887,17.9932723 L7,18 L12,18 L12,12 L18,12 L18,7 C18,6.48716416 17.6139598,6.06449284 17.1166211,6.00672773 L17,6 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 849 B

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>画笔</title>
<g id="画笔" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<g id="编组" transform="translate(11.880771, 11.869229) rotate(-135.000000) translate(-11.880771, -11.869229) translate(8.780771, 2.350614)" fill="#FFFFFF" fill-rule="nonzero">
<path d="M3.1,7.59281015e-16 L6.2,3.72 L6.199,14.837 L6.2,14.83723 L6.2,16.03723 L6.199,16.037 L6.2,17.43723 C6.2,18.2717936 5.56103848,18.9571197 4.74563261,19.0306913 L4.6,19.03723 L1.6,19.03723 C0.7163444,19.03723 -2.1559345e-15,18.3208856 -1.9395013e-15,17.43723 L-1.9395013e-15,17.43723 L1.42025106e-15,3.72 L3.1,7.59281015e-16 Z M4.999,16.037 L1.199,16.037 L1.2,17.43723 C1.2,17.6029154 1.30073593,17.7450727 1.44430195,17.805796 L1.51938605,17.8291034 L1.6,17.83723 L4.6,17.83723 C4.8209139,17.83723 5,17.6581439 5,17.43723 L5,17.43723 L4.999,16.037 Z M3.1,1.87422996 L1.199,4.15422996 L1.199,14.837 L4.999,14.837 L4.999,4.15322996 L3.1,1.87422996 Z" id="形状结合"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1 @@
<?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="1659168242240" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2420" width="24" height="24" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M921.6 347.802L650.598 76.8c-9.625-9.626-22.528-14.95-36.198-14.95s-26.573 5.324-36.198 14.95L563.2 91.802c-14.848 14.848-25.6 40.806-25.6 61.798v51.2c0 7.27-5.427 20.429-10.598 25.6L384 373.402c-5.171 5.17-18.33 10.598-25.6 10.598h-51.2c-20.992 0-46.95 10.752-61.798 25.6L230.4 424.602c-19.968 19.968-19.968 52.428 0 72.396l79.514 79.514-253.44 329.472c-7.834 10.189-6.912 24.627 2.201 33.69 4.967 4.966 11.52 7.475 18.125 7.475 5.478 0 10.957-1.741 15.616-5.325l329.472-253.44 79.514 79.514c9.625 9.625 22.528 14.95 36.198 14.95s26.573-5.325 36.198-14.95l15.002-15.002c14.848-14.848 25.6-40.806 25.6-61.798v-51.2c0-7.27 5.427-20.43 10.598-25.6L768 471.296c5.171-5.171 18.33-10.598 25.6-10.598h51.2c20.992 0 46.95-10.752 61.798-25.6l15.002-15.002c9.626-9.626 14.95-22.528 14.95-36.198s-5.324-26.573-14.95-36.199zM216.78 781.619l129.69-168.601 38.912 38.912-168.601 129.69zM870.4 399.002c-5.171 5.17-18.33 10.598-25.6 10.598h-51.2c-20.992 0-46.95 10.752-61.798 25.6L588.8 578.202c-14.848 14.848-25.6 40.806-25.6 61.798v51.2c0 7.27-5.427 20.429-10.598 25.6l-14.95 14.95h-0.052v0.052L266.598 460.8l15.002-15.002c5.171-5.17 18.33-10.598 25.6-10.598h51.2c20.992 0 46.95-10.752 61.798-25.6L563.2 266.598c14.848-14.848 25.6-40.806 25.6-61.798v-51.2c0-7.27 5.427-20.429 10.598-25.6l15.002-15.002L885.402 384 870.4 399.002z" p-id="2421" fill="#8a8a8a"></path></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>矩形</title>
<g id="矩形" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect x="0" y="0" width="24" height="24"></rect>
<path d="M17,5 C18.1045695,5 19,5.8954305 19,7 L19,17 C19,18.1045695 18.1045695,19 17,19 L7,19 C5.8954305,19 5,18.1045695 5,17 L5,7 C5,5.8954305 5.8954305,5 7,5 L17,5 Z M17,6 L7,6 C6.48716416,6 6.06449284,6.38604019 6.00672773,6.88337887 L6,7 L6,17 C6,17.5128358 6.38604019,17.9355072 6.88337887,17.9932723 L7,18 L17,18 C17.5128358,18 17.9355072,17.6139598 17.9932723,17.1166211 L18,17 L18,7 C18,6.48716416 17.6139598,6.06449284 17.1166211,6.00672773 L17,6 Z" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 876 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>恢复</title>
<g id="恢复" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="撤回" transform="translate(12.000000, 12.000000) scale(-1, 1) translate(-12.000000, -12.000000) ">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<path d="M5.5,12 C5.5,8.41014913 8.41014913,5.5 12,5.5 C15.5898509,5.5 18.5,8.41014913 18.5,12 C18.5,15.5898509 15.5898509,18.5 12,18.5" id="路径" stroke="#FFFFFF" stroke-width="1.2" stroke-linecap="round"></path>
<polyline id="路径-3" stroke="#FFFFFF" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" points="3.01366785 9.35170917 5.27397858 12.8633205 8.6733206 10.5360334"></polyline>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 943 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>撤回</title>
<g id="撤回" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g>
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<path d="M5.5,12 C5.5,8.41014913 8.41014913,5.5 12,5.5 C15.5898509,5.5 18.5,8.41014913 18.5,12 C18.5,15.5898509 15.5898509,18.5 12,18.5" id="路径" stroke="#FFFFFF" stroke-width="1.2" stroke-linecap="round"></path>
<polyline id="路径-3" stroke="#FFFFFF" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" points="3.01366785 9.35170917 5.27397858 12.8633205 8.6733206 10.5360334"></polyline>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 839 B

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 25" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>保存</title>
<g id="保存" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<g id="编组-2" transform="translate(12.000000, 14.054998) rotate(-225.000000) translate(-12.000000, -14.054998) translate(4.260715, 6.315713)" stroke="#FFFFFF" stroke-linecap="round">
<line x1="8.25064835" y1="7.22792206" x2="7.0349259e-13" y2="15.4785704" id="直线" stroke-width="1.5"></line>
<polyline id="路径" stroke-width="1.5" stroke-linejoin="round" points="2.75064835 7.07106781 8.25064835 7.22792206 8.4075026 12.7279221"></polyline>
<polyline id="路径-5" stroke-width="1.2" stroke-linejoin="round" points="13.7108035 12.3743687 15.4785704 10.6066017 4.87196869 3.72648913e-13 3.10420174 1.76776695"></polyline>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>标注</title>
<g id="标注" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<path d="M12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 C16.418278,20 20,16.418278 20,12 C20,7.581722 16.418278,4 12,4 Z M13.068,6.976 L13.068,15.67 L15.084,15.67 L15.084,17 L9.204,17 L9.204,15.67 L11.458,15.67 L11.458,8.782 L9.61,8.782 L9.61,7.76 C10.576,7.592 11.262,7.34 11.85,6.976 L11.85,6.976 L13.068,6.976 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 922 B

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>模糊</title>
<g id="模糊" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<path d="M17,5 C18.1045695,5 19,5.8954305 19,7 L19,17 C19,18.1045695 18.1045695,19 17,19 L7,19 C5.8954305,19 5,18.1045695 5,17 L5,7 C5,5.8954305 5.8954305,5 7,5 L17,5 Z M17,6 L7,6 C6.48716416,6 6.06449284,6.38604019 6.00672773,6.88337887 L6,7 L6,17 C6,17.5128358 6.38604019,17.9355072 6.88337887,17.9932723 L7,18 L17,18 C17.5128358,18 17.9355072,17.6139598 17.9932723,17.1166211 L18,17 L18,7 C18,6.48716416 17.6139598,6.06449284 17.1166211,6.00672773 L17,6 Z M11.5107308,14.3372987 C11.7023348,14.4650347 11.8793655,14.6130021 12.03883,14.7785117 L12.1923283,14.949769 L12.3841106,15.1799078 C13.1103357,16.0513778 14.4055234,16.1691222 15.2769935,15.4428971 C15.4511463,15.2977698 15.5997687,15.1250704 15.7171358,14.9320272 L15.7992113,14.7835434 L16.0527864,14.2763932 C16.176281,14.029404 16.4766175,13.9292918 16.7236068,14.0527864 C16.9431528,14.1625594 17.0466478,14.4120593 16.980202,14.639617 L16.9472136,14.7236068 L16.6936385,15.230757 C16.5052142,15.6076056 16.2408522,15.9413898 15.9171779,16.2111184 C14.6712673,17.2493772 12.8428813,17.1274496 11.7441507,15.9646204 L11.6158894,15.8200922 L11.424107,15.5899534 C11.2891214,15.4279706 11.131472,15.28631 10.9560306,15.169349 C9.9486614,14.4977696 8.5876046,14.7699809 7.91602515,15.7773501 C7.76284892,16.0071144 7.45241425,16.0692014 7.2226499,15.9160251 C6.99288556,15.7628489 6.93079862,15.4524142 7.08397485,15.2226499 C8.06190677,13.755752 10.0438329,13.3593668 11.5107308,14.3372987 Z M11.5107308,11.3372987 C11.7023348,11.4650347 11.8793655,11.6130021 12.03883,11.7785117 L12.1923283,11.949769 L12.3841106,12.1799078 C13.1103357,13.0513778 14.4055234,13.1691222 15.2769935,12.4428971 C15.4511463,12.2977698 15.5997687,12.1250704 15.7171358,11.9320272 L15.7992113,11.7835434 L16.0527864,11.2763932 C16.176281,11.029404 16.4766175,10.9292918 16.7236068,11.0527864 C16.9431528,11.1625594 17.0466478,11.4120593 16.980202,11.639617 L16.9472136,11.7236068 L16.6936385,12.230757 C16.5052142,12.6076056 16.2408522,12.9413898 15.9171779,13.2111184 C14.6712673,14.2493772 12.8428813,14.1274496 11.7441507,12.9646204 L11.6158894,12.8200922 L11.424107,12.5899534 C11.2891214,12.4279706 11.131472,12.28631 10.9560306,12.169349 C9.9486614,11.4977696 8.5876046,11.7699809 7.91602515,12.7773501 C7.76284892,13.0071144 7.45241425,13.0692014 7.2226499,12.9160251 C6.99288556,12.7628489 6.93079862,12.4524142 7.08397485,12.2226499 C8.06190677,10.755752 10.0438329,10.3593668 11.5107308,11.3372987 Z M11.5107308,8.33729872 C11.7023348,8.46503472 11.8793655,8.61300213 12.03883,8.77851169 L12.1923283,8.94976901 L12.3841106,9.1799078 C13.1103357,10.0513778 14.4055234,10.1691222 15.2769935,9.44289715 C15.4511463,9.2977698 15.5997687,9.12507035 15.7171358,8.93202721 L15.7992113,8.78354336 L16.0527864,8.2763932 C16.176281,8.02940395 16.4766175,7.92929178 16.7236068,8.0527864 C16.9431528,8.1625594 17.0466478,8.41205933 16.980202,8.63961698 L16.9472136,8.7236068 L16.6936385,9.23075696 C16.5052142,9.60760555 16.2408522,9.94138983 15.9171779,10.2111184 C14.6712673,11.2493772 12.8428813,11.1274496 11.7441507,9.9646204 L11.6158894,9.8200922 L11.424107,9.58995341 C11.2891214,9.42797063 11.131472,9.28630995 10.9560306,9.16934901 C9.9486614,8.49776955 8.5876046,8.76998091 7.91602515,9.7773501 C7.76284892,10.0071144 7.45241425,10.0692014 7.2226499,9.91602515 C6.99288556,9.76284892 6.93079862,9.45241425 7.08397485,9.2226499 C8.06190677,7.75575203 10.0438329,7.3593668 11.5107308,8.33729872 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>文字</title>
<g id="文字" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<path d="M12.641734,4.61065099 L12.6930126,4.71323616 L18.6930126,19.2132362 C18.8513879,19.5959765 18.6695041,20.0346373 18.2867638,20.1930126 C17.9359186,20.33819 17.5380845,20.1974552 17.3522259,19.8781837 L17.3069874,19.7867638 L15.2228036,14.75 L8.77680361,14.75 L6.69301262,19.7867638 C6.54783527,20.1376091 6.16714018,20.3196791 5.80989168,20.2255984 L5.71323616,20.1930126 C5.36239088,20.0478353 5.18032088,19.6671402 5.27440161,19.3098917 L5.30698738,19.2132362 L11.3069874,4.71323616 C11.5475319,4.1319202 12.3366513,4.09772514 12.641734,4.61065099 Z M12,6.962 L9.39780361,13.25 L14.6018036,13.25 L12,6.962 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,28 @@
#include "testbtstyle.h"
#include "widget.h"
#include <QApplication>
#include <QStyleFactory>
#include <QString>
#include <QDebug>
int main(int argc, char *argv[])
{
qApp->setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication a(argc, argv);
// Widget w;
// w.show();
QStringList listStyle = QStyleFactory::keys();
foreach(QString val, listStyle)
qDebug()<<val<<" ";
QApplication::setStyle("Windows"); // macintosh Windows Fusion
auto t = new TestBTStyle();
t->setWindowTitle("MacOS 12.6 + Qt 5.15.2 + Style: Windows");
t->show();
return a.exec();
}

View File

@ -0,0 +1,37 @@
<RCC>
<qresource prefix="/">
<file>icons/normal/arrow.svg</file>
<file>icons/normal/copy.svg</file>
<file>icons/normal/download.svg</file>
<file>icons/normal/ellipse.svg</file>
<file>icons/normal/exit.svg</file>
<file>icons/normal/fill-ellipse.svg</file>
<file>icons/normal/fill-rect.svg</file>
<file>icons/normal/gif.svg</file>
<file>icons/normal/line.svg</file>
<file>icons/normal/mosaic.svg</file>
<file>icons/normal/pen.svg</file>
<file>icons/normal/recover.svg</file>
<file>icons/normal/rectangle.svg</file>
<file>icons/normal/revoke.svg</file>
<file>icons/normal/right.svg</file>
<file>icons/normal/screenshot.svg</file>
<file>icons/normal/text.svg</file>
<file>icons/normal/update.svg</file>
<file>icons/tool/arrow.svg</file>
<file>icons/tool/cancel.svg</file>
<file>icons/tool/ellipse.svg</file>
<file>icons/tool/finish.svg</file>
<file>icons/tool/gif.svg</file>
<file>icons/tool/mosaic.svg</file>
<file>icons/tool/pen.svg</file>
<file>icons/tool/pin.svg</file>
<file>icons/tool/rectangle.svg</file>
<file>icons/tool/renewal.svg</file>
<file>icons/tool/revocation.svg</file>
<file>icons/tool/save.svg</file>
<file>icons/tool/serialnumber.svg</file>
<file>icons/tool/smooth.svg</file>
<file>icons/tool/text.svg</file>
</qresource>
</RCC>

View File

@ -0,0 +1,83 @@
#include "testbtstyle.h"
#include "QtGui/qpainter.h"
#include <QHBoxLayout>
#include <QDir>
#include <QDebug>
#include <QFileInfo>
TestBTStyle::TestBTStyle(QWidget *parent)
{
// QString filePath = "/Users/winks/Desktop/projects/QtExamples/QToolButtonAutoRaiseEx/CMakeAutoRaise/icons/normal";
// QString filePath = "/Users/winks/Desktop/projects/QtExamples/QToolButtonAutoRaiseEx/CMakeAutoRaise/icons/tool";
QString filePath = "D:/projects/QtExamples/QToolButtonAutoRaiseEx/CMakeAutoRaise/icons/normal";
QDir *dir=new QDir(filePath);
QStringList filter;
QList<QFileInfo> *fileInfo=new QList<QFileInfo>(dir->entryInfoList(filter));
// for(int i = 0;i<fileInfo->count(); i++)
// {
// qDebug()<<fileInfo->at(i).filePath();
// qDebug()<<fileInfo->at(i).fileName();
// }
auto layout = new QHBoxLayout(this);
QStringList listName;
for(int i = 0;i<fileInfo->count(); i++)
{
if (fileInfo->at(i).fileName() == "." || fileInfo->at(i).fileName() == "..")
continue;
listName << fileInfo->at(i).fileName();
}
// Link: https://www.cnblogs.com/liming19680104/p/13929838.html
// 16)、border-style 类型Border Style
// 边框边界线的样式(虚线、实线、点划线等),默认为 none
// 以下类支持此属性:
// QAbstractItemView 子类QAbstractSpinBox 子类QCheckBoxQComboBoxQFrameQGroupBox
// QLabelQPushButtonQRadioButtonQSplitterQTextEditQToolTipQLineEditQMenu
// QMenuBar(注意:没有 QDialog 和 QWidget)
// 边框样式种类:
// solid 实线
// dotted 点状边框
// none无边框
// dashed 虚线
// double 双线
// groove 定义3D凹槽边框。其效果取决于border-color的值
// ridge 定义3D垄状边框。其效果取决于 border-color的值
// inset 定义3D inset边框。其效果取决于 border-color的值
// outset 定义3D outset边框。其效果取决于 border-color的值
const int width = 24;
for (const auto &it : listName){
auto tb = new QToolButton();
tb->setStyleSheet("border-style:none");
tb->setObjectName(it);
tb->setToolButtonStyle(Qt::ToolButtonIconOnly);
tb->setAutoRaise(true);
tb->setIcon(QIcon(":/icons/normal/" + it));
// tb->setIcon(QIcon(":/icons/tool/" + it));
tb->setIconSize(QSize(width, width) * 2);
tb->setContentsMargins(0, 0, 0, 0);
tb->setFixedSize(QSize(width, width) * 2);
tb->setToolTip(it);
tb->setChecked(false);
tb->setCheckable(true);
layout->addWidget(tb);
}
}
void TestBTStyle::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event)
QPainter pa(this);
pa.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
pa.setPen(Qt::NoPen);
pa.setBrush(QColor(255, 255, 255, 0.7 * 255));
const int round = 4;
pa.drawRoundedRect(contentsRect().adjusted(1, 1, -1, -1), round, round);
}

View File

@ -0,0 +1,23 @@
#ifndef TESTBTSTYLE_H
#define TESTBTSTYLE_H
#include <QWidget>
#include <QVector>
#include <QToolButton>
#include <vector>
class TestBTStyle : public QWidget
{
Q_OBJECT
public:
TestBTStyle(QWidget *parent = nullptr);
protected:
void paintEvent(QPaintEvent *event) override;
private:
QVector<QToolButton *> m_vItem;
std::vector<std::pair<QString, bool>> m_vTbName;
};
#endif // TESTBTSTYLE_H

View File

@ -0,0 +1,11 @@
#include "widget.h"
Widget::Widget(QWidget *parent)
: QWidget(parent)
{
}
Widget::~Widget()
{
}

View File

@ -0,0 +1,14 @@
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent = nullptr);
~Widget();
};
#endif // WIDGET_H

View File

@ -0,0 +1,73 @@
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash
# qtcreator generated files
*.pro.user*
# xemacs temporary files
*.flc
# Vim temporary files
.*.swp
# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*
# MinGW generated files
*.Debug
*.Release
# Python byte code
*.pyc
# Binaries
# --------
*.dll
*.exe

View File

@ -0,0 +1,26 @@
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++17
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
main.cpp \
widget.cpp \
testbtstyle.cpp
HEADERS += \
widget.h \
testbtstyle.h
RESOURCES += resources.qrc \
resources.qrc
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M815.8208 258.3552v309.8624a42.5984 42.5984 0 0 1-42.8544 42.8032 39.936 39.936 0 0 1-41.8816-41.8816L729.6 355.84l-427.52 427.52a42.5984 42.5984 0 1 1-59.8528-59.7504l427.5712-427.5712-217.5488 2.816a51.2512 51.2512 0 0 1-35.7888-48.0256 42.5984 42.5984 0 0 1 42.8544-42.8544l302.7968-3.2768a45.9264 45.9264 0 0 1 53.6576 53.6576z" /></svg>

After

Width:  |  Height:  |  Size: 621 B

View File

@ -0,0 +1 @@
<?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 class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#515151" d="M960 992H256A96 96 0 0 1 160 896V256A96 96 0 0 1 256 160h640A96 96 0 0 1 992 256v704a32 32 0 0 1-32 32zM256 224a32 32 0 0 0-32 32v640a32 32 0 0 0 32 32h672V256a32 32 0 0 0-32-32zM64 792.32a32 32 0 0 1-32-32V136.32A104.32 104.32 0 0 1 136.32 32H768a32 32 0 0 1 0 64H136.32a40.32 40.32 0 0 0-39.68 40.32v624a32 32 0 0 1-32.64 32z" /></svg>

After

Width:  |  Height:  |  Size: 617 B

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