├── .github └── FUNDING.yml ├── .gitignore ├── CMakeLists.txt ├── ChangeLog ├── Doxyfile ├── LICENSE ├── README.md ├── TTKCommon ├── CMakeLists.txt ├── TTKApplication │ ├── TTKApplication.pri │ ├── TTKCoreApplication.pri │ ├── TTKGuiApplication.pri │ ├── ttkapplication.cpp │ ├── ttkapplication.h │ ├── ttkcoreapplication.cpp │ ├── ttkcoreapplication.h │ ├── ttkguiapplication.cpp │ ├── ttkguiapplication.h │ ├── ttklocalpeer.cpp │ ├── ttklocalpeer.h │ ├── ttklockedfile.cpp │ ├── ttklockedfile.h │ ├── ttklockedfile_unix.cpp │ └── ttklockedfile_win.cpp ├── TTKCommon.pri ├── TTKCommon.pro ├── TTKDumper │ ├── CMakeLists.txt │ ├── TTKDumper.pro │ ├── TTKDumper.rc │ ├── miniprocess.cpp │ ├── miniprocess.h │ ├── ttkdumper.cpp │ └── ttkdumper.h ├── TTKLibrary │ ├── CMakeLists.txt │ ├── TTKLibrary.pro │ ├── TTKLibrary.qrc │ ├── TTKLibrary.rc │ ├── resource │ │ └── shadow │ │ │ ├── lb_bottom.png │ │ │ ├── lb_left.png │ │ │ ├── lb_left_bottom.png │ │ │ ├── lb_left_top.png │ │ │ ├── lb_right.png │ │ │ ├── lb_right_bottom.png │ │ │ ├── lb_right_top.png │ │ │ └── lb_top.png │ ├── ttkabstractbufferinterface.h │ ├── ttkabstractmovedialog.cpp │ ├── ttkabstractmovedialog.h │ ├── ttkabstractmoveresizewidget.cpp │ ├── ttkabstractmoveresizewidget.h │ ├── ttkabstractmovewidget.cpp │ ├── ttkabstractmovewidget.h │ ├── ttkabstractnetwork.cpp │ ├── ttkabstractnetwork.h │ ├── ttkabstractresizeinterface.h │ ├── ttkabstracttablewidget.cpp │ ├── ttkabstracttablewidget.h │ ├── ttkabstractthread.cpp │ ├── ttkabstractthread.h │ ├── ttkabstractxml.cpp │ ├── ttkabstractxml.h │ ├── ttkany.cpp │ ├── ttkany.h │ ├── ttkclickedgroup.cpp │ ├── ttkclickedgroup.h │ ├── ttkclickedlabel.cpp │ ├── ttkclickedlabel.h │ ├── ttkclickedslider.cpp │ ├── ttkclickedslider.h │ ├── ttkcommandline.cpp │ ├── ttkcommandline.h │ ├── ttkconcurrent.h │ ├── ttkconcurrentqueue.h │ ├── ttkcryptographichash.cpp │ ├── ttkcryptographichash.h │ ├── ttkdefer.h │ ├── ttkdesktopscreen.cpp │ ├── ttkdesktopscreen.h │ ├── ttkdispatchmanager.cpp │ ├── ttkdispatchmanager.h │ ├── ttkeventloop.cpp │ ├── ttkeventloop.h │ ├── ttkfileassociation.cpp │ ├── ttkfileassociation.h │ ├── ttkfileinterface.h │ ├── ttkfunctor.h │ ├── ttkglobalinterface.cpp │ ├── ttkglobalinterface.h │ ├── ttkitemdelegate.cpp │ ├── ttkitemdelegate.h │ ├── ttklexicalcast.h │ ├── ttklibrary.h │ ├── ttklibraryversion.h │ ├── ttklogoutput.cpp │ ├── ttklogoutput.h │ ├── ttkoptional.h │ ├── ttkplatformsystem.cpp │ ├── ttkplatformsystem.h │ ├── ttksmartptr.h │ ├── ttkspinlock.h │ ├── ttkstringliterals.h │ ├── ttkstringview.h │ ├── ttksuperenum.cpp │ ├── ttksuperenum.h │ ├── ttktabbutton.cpp │ ├── ttktabbutton.h │ ├── ttkthemelinelabel.cpp │ ├── ttkthemelinelabel.h │ ├── ttktime.cpp │ ├── ttktime.h │ ├── ttktoastlabel.cpp │ ├── ttktoastlabel.h │ ├── ttktree.h │ ├── ttkunsortedmap.h │ └── ttkvariant.h ├── TTKRun │ ├── TTKRun.pri │ ├── ttkrunobject.cpp │ └── ttkrunobject.h ├── base │ ├── ttkcompat.h │ ├── ttkglobal.h │ ├── ttklogger.h │ ├── ttkmoduleexport.h │ ├── ttkprivate.h │ ├── ttkqtcompat.h │ ├── ttkqtglobal.h │ ├── ttkqtobject.h │ ├── ttksingleton.h │ └── ttktraits.h ├── compat │ ├── compat.h │ ├── compat.pri │ ├── int128.h │ ├── integer.h │ ├── strlcat.c │ └── strlcpy.c ├── config.pri ├── config │ ├── CMakeLists.txt │ ├── config.pro │ ├── config.tests │ │ ├── default │ │ │ ├── default.cpp │ │ │ └── default.pro │ │ ├── strlcat │ │ │ ├── strlcat.cpp │ │ │ └── strlcat.pro │ │ └── strlcpy │ │ │ ├── strlcpy.cpp │ │ │ └── strlcpy.pro │ ├── main.cpp │ ├── ttkconfig.h.cmake │ └── ttkconfig.h.qmake ├── ttkobject.h └── ttkversion.h ├── TTKModule ├── CMakeLists.txt ├── TTKCore.rc ├── TTKImage │ ├── CMakeLists.txt │ ├── TTKBarcodeMaker │ │ ├── CMakeLists.txt │ │ ├── TTKBarcodeMaker.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ └── mainwindow.h │ ├── TTKFontPng │ │ ├── CMakeLists.txt │ │ ├── TTKFontPng.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ └── mainwindow.h │ ├── TTKGaussianBlur │ │ ├── CMakeLists.txt │ │ ├── TTKGaussianBlur.pro │ │ ├── gaussianblur.cpp │ │ ├── gaussianblur.h │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ ├── mainwindow.h │ │ └── mainwindow.ui │ ├── TTKGetColor │ │ ├── CMakeLists.txt │ │ ├── TTKGetColor.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ ├── mainwindow.h │ │ └── mainwindow.ui │ ├── TTKGifWidget │ │ ├── CMakeLists.txt │ │ ├── TTKGifWidget.pro │ │ ├── gif.h │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ ├── mainwindow.h │ │ └── mainwindow.ui │ ├── TTKIcoHelper │ │ ├── CMakeLists.txt │ │ ├── TTKIcoHelper.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ ├── mainwindow.h │ │ └── mainwindow.ui │ ├── TTKIconMaker │ │ ├── CMakeLists.txt │ │ ├── TTKIconMaker.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ └── mainwindow.h │ ├── TTKImage.pro │ ├── TTKImageView │ │ ├── CMakeLists.txt │ │ ├── TTKImageView.pro │ │ ├── TTKImageView.qrc │ │ ├── image │ │ │ ├── btn_next_normal.png │ │ │ └── btn_pre_normal.png │ │ ├── imageview.cpp │ │ ├── imageview.h │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ ├── mainwindow.h │ │ └── mainwindow.ui │ ├── TTKPngHelper │ │ ├── CMakeLists.txt │ │ ├── TTKPngHelper.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ ├── mainwindow.h │ │ └── mainwindow.ui │ ├── TTKQRCodeMaker │ │ ├── CMakeLists.txt │ │ ├── TTKQRCodeMaker.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ └── mainwindow.h │ ├── TTKQRCodeReader │ │ ├── CMakeLists.txt │ │ ├── TTKQRCodeReader.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ └── mainwindow.h │ ├── TTKWaterWave │ │ ├── CMakeLists.txt │ │ ├── TTKWaterWave.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ ├── mainwindow.h │ │ ├── mainwindow.ui │ │ ├── waterwave.cpp │ │ └── waterwave.h │ └── TTKWebPMaker │ │ ├── CMakeLists.txt │ │ ├── TTKWebPMaker.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ └── mainwindow.h ├── TTKModule.pro ├── TTKNetwork │ ├── CMakeLists.txt │ ├── TTKDownloadLimit │ │ ├── CMakeLists.txt │ │ ├── TTKDownloadLimit.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ ├── mainwindow.h │ │ └── mainwindow.ui │ ├── TTKNetTraffic │ │ ├── CMakeLists.txt │ │ ├── TTKNetTraffic.pro │ │ ├── TTKNetTraffic.qrc │ │ ├── helper.cpp │ │ ├── helper.h │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ ├── mainwindow.h │ │ ├── qss │ │ │ ├── Style1.qss │ │ │ ├── Style2.qss │ │ │ ├── Style3.qss │ │ │ ├── Style4.qss │ │ │ ├── branch-closed.png │ │ │ ├── branch-end.png │ │ │ ├── branch-more.png │ │ │ ├── branch-more1.png │ │ │ ├── branch-open.png │ │ │ ├── checkbox_checked.png │ │ │ ├── checkbox_checked_hover.png │ │ │ ├── checkbox_checked_pressed.png │ │ │ ├── checkbox_unchecked.png │ │ │ ├── checkbox_unchecked_hover.png │ │ │ ├── checkbox_unchecked_pressed.png │ │ │ ├── close.png │ │ │ ├── close_hover.png │ │ │ ├── cpu.png │ │ │ ├── down_arrow.png │ │ │ ├── down_arrow_disabled.png │ │ │ ├── down_arrow_hover.png │ │ │ ├── downarrow.png │ │ │ ├── frame.png │ │ │ ├── left_arrow.png │ │ │ ├── left_arrow_hover.png │ │ │ ├── maximize.png │ │ │ ├── maximize_hover.png │ │ │ ├── maximized.png │ │ │ ├── maximized_hover.png │ │ │ ├── mem.png │ │ │ ├── minimize.png │ │ │ ├── minimize_hover.png │ │ │ ├── radiobutton_checked.png │ │ │ ├── radiobutton_checked_hover.png │ │ │ ├── radiobutton_checked_pressed.png │ │ │ ├── radiobutton_unchecked.png │ │ │ ├── radiobutton_unchecked_hover.png │ │ │ ├── radiobutton_unchecked_pressed.png │ │ │ ├── right_arrow.png │ │ │ ├── right_arrow_hover.png │ │ │ ├── setup.png │ │ │ ├── sizegrip.png │ │ │ ├── sizegrip1.png │ │ │ ├── spindown.png │ │ │ ├── spindown_hover.png │ │ │ ├── spindown_off.png │ │ │ ├── spindown_pressed.png │ │ │ ├── spinup.png │ │ │ ├── spinup_hover.png │ │ │ ├── spinup_off.png │ │ │ ├── spinup_pressed.png │ │ │ ├── ubuntu.png │ │ │ ├── up_arrow.png │ │ │ ├── up_arrow_disabled.png │ │ │ ├── up_arrow_hover.png │ │ │ └── vline.png │ │ ├── res │ │ │ └── avnets │ │ ├── settingwidget.cpp │ │ ├── settingwidget.h │ │ ├── ttkcpumemorylabel.cpp │ │ ├── ttkcpumemorylabel.h │ │ ├── ttknettrafficlabel.cpp │ │ └── ttknettrafficlabel.h │ ├── TTKNetwork.pro │ └── TTKSocket │ │ ├── CMakeLists.txt │ │ ├── TTKSocket.pro │ │ ├── cn.ts │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ ├── mainwindow.h │ │ ├── mainwindow.ui │ │ ├── tcpclient.cpp │ │ ├── tcpclient.h │ │ ├── tcpserver.cpp │ │ └── tcpserver.h ├── TTKText │ ├── CMakeLists.txt │ ├── TTKBarrage │ │ ├── CMakeLists.txt │ │ ├── TTKBarrage.pro │ │ ├── TTKBarrage.qrc │ │ ├── cn.ts │ │ ├── core │ │ │ ├── barrageanimation.cpp │ │ │ ├── barrageanimation.h │ │ │ └── barragecore.h │ │ ├── main.cpp │ │ ├── resource │ │ │ ├── barrageStyle.png │ │ │ ├── color │ │ │ │ ├── Black.png │ │ │ │ ├── Blue.png │ │ │ │ ├── Green.png │ │ │ │ ├── Indigo.png │ │ │ │ ├── Orange.png │ │ │ │ ├── Origin.png │ │ │ │ ├── Purple.png │ │ │ │ ├── Red.png │ │ │ │ ├── White.png │ │ │ │ └── Yellow.png │ │ │ ├── off.png │ │ │ ├── on.png │ │ │ ├── video_menu.png │ │ │ ├── video_pause.png │ │ │ ├── video_play.png │ │ │ └── video_volumn.png │ │ ├── videoview.cpp │ │ ├── videoview.h │ │ └── widget │ │ │ ├── barrageedit.cpp │ │ │ ├── barrageedit.h │ │ │ ├── barragewidget.cpp │ │ │ ├── barragewidget.h │ │ │ ├── videocontrol.cpp │ │ │ └── videocontrol.h │ ├── TTKCaseTransform │ │ ├── CMakeLists.txt │ │ ├── TTKCaseTransform.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ └── mainwindow.h │ ├── TTKChardet │ │ ├── CMakeLists.txt │ │ ├── TTKChardet.pro │ │ ├── ascii.cpp │ │ ├── ascii.h │ │ ├── big5.cpp │ │ ├── big5.h │ │ ├── checker.cpp │ │ ├── checker.h │ │ ├── checkerhelper.cpp │ │ ├── checkerhelper.h │ │ ├── gb18030.cpp │ │ ├── gb18030.h │ │ ├── gbk.cpp │ │ ├── gbk.h │ │ ├── iso2022_jp.cpp │ │ ├── iso2022_jp.h │ │ ├── main.cpp │ │ ├── shiftjis.cpp │ │ ├── shiftjis.h │ │ ├── utf8.cpp │ │ └── utf8.h │ ├── TTKChinese2Pinyin │ │ ├── CMakeLists.txt │ │ ├── TTKChinese2Pinyin.pro │ │ ├── TTKChinese2Pinyin.qrc │ │ ├── chinesehelper.cpp │ │ ├── chinesehelper.h │ │ ├── main.cpp │ │ ├── pinyinhelper.cpp │ │ ├── pinyinhelper.h │ │ ├── pinyinresource.cpp │ │ ├── pinyinresource.h │ │ └── resource │ │ │ ├── mutil_pinyin │ │ │ ├── pinyin │ │ │ └── single_pinyin │ ├── TTKCodeCount │ │ ├── CMakeLists.txt │ │ ├── TTKCodeCount.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ ├── mainwindow.h │ │ └── mainwindow.ui │ ├── TTKCodeLines │ │ ├── CMakeLists.txt │ │ ├── TTKCodeLines.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ └── mainwindow.h │ ├── TTKHashTransform │ │ ├── CMakeLists.txt │ │ ├── TTKHashTransform.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ └── mainwindow.h │ ├── TTKRandomPassword │ │ ├── CMakeLists.txt │ │ ├── TTKRandomPassword.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ └── mainwindow.h │ ├── TTKRandomUuid │ │ ├── CMakeLists.txt │ │ ├── TTKRandomUuid.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ └── mainwindow.h │ ├── TTKText.pro │ ├── TTKTimestampTransform │ │ ├── CMakeLists.txt │ │ ├── TTKTimestampTransform.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ └── mainwindow.h │ ├── TTKUrlEncode │ │ ├── CMakeLists.txt │ │ ├── TTKUrlEncode.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ └── mainwindow.h │ └── TTKUtf16Transform │ │ ├── CMakeLists.txt │ │ ├── TTKUtf16Transform.pro │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ └── mainwindow.h └── TTKTools │ ├── CMakeLists.txt │ ├── TTKCPUMemery │ ├── CMakeLists.txt │ ├── TTKCPUMemery.pro │ ├── main.cpp │ ├── mainwindow.cpp │ ├── mainwindow.h │ ├── mainwindow.ui │ ├── showcpumemory.cpp │ ├── showcpumemory.h │ ├── showdevicesize.cpp │ └── showdevicesize.h │ └── TTKTools.pro ├── TTKResource ├── lb_app_logo.ico └── logo_banner.png ├── TTKThirdParty ├── CMakeLists.txt ├── TTKThirdParty.pri ├── TTKThirdParty.pro ├── TTKThirdParty.rc ├── qrencode │ ├── QRencode.pri │ ├── README.txt │ ├── bitstream.c │ ├── bitstream.h │ ├── config.h │ ├── global.h │ ├── mask.c │ ├── mask.h │ ├── mmask.c │ ├── mmask.h │ ├── mqrspec.c │ ├── mqrspec.h │ ├── qrencode.c │ ├── qrencode.h │ ├── qrencode_inner.h │ ├── qrinput.c │ ├── qrinput.h │ ├── qrspec.c │ ├── qrspec.h │ ├── rscode.c │ ├── rscode.h │ ├── rsecc.c │ ├── rsecc.h │ ├── split.c │ └── split.h └── zxing │ ├── ZXing.pri │ ├── bigint │ ├── .gitignore │ ├── BigInteger.cc │ ├── BigInteger.hh │ ├── BigIntegerAlgorithms.cc │ ├── BigIntegerAlgorithms.hh │ ├── BigIntegerLibrary.hh │ ├── BigIntegerUtils.cc │ ├── BigIntegerUtils.hh │ ├── BigUnsigned.cc │ ├── BigUnsigned.hh │ ├── BigUnsignedInABase.cc │ ├── BigUnsignedInABase.hh │ ├── ChangeLog │ ├── NumberlikeArray.hh │ └── README │ ├── win32 │ └── zxing │ │ ├── iconv.h │ │ ├── stdint.h │ │ └── win_iconv.c │ └── zxing │ ├── BarcodeFormat.cpp │ ├── BarcodeFormat.h │ ├── Binarizer.cpp │ ├── Binarizer.h │ ├── BinaryBitmap.cpp │ ├── BinaryBitmap.h │ ├── ChecksumException.cpp │ ├── ChecksumException.h │ ├── DecodeHints.cpp │ ├── DecodeHints.h │ ├── Exception.cpp │ ├── Exception.h │ ├── FormatException.cpp │ ├── FormatException.h │ ├── IllegalStateException.h │ ├── InvertedLuminanceSource.cpp │ ├── InvertedLuminanceSource.h │ ├── LuminanceSource.cpp │ ├── LuminanceSource.h │ ├── MultiFormatReader.cpp │ ├── MultiFormatReader.h │ ├── NotFoundException.h │ ├── Reader.cpp │ ├── Reader.h │ ├── ReaderException.h │ ├── Result.cpp │ ├── Result.h │ ├── ResultIO.cpp │ ├── ResultPoint.cpp │ ├── ResultPoint.h │ ├── ResultPointCallback.cpp │ ├── ResultPointCallback.h │ ├── ZXing.h │ ├── aztec │ ├── AztecDetectorResult.cpp │ ├── AztecDetectorResult.h │ ├── AztecReader.cpp │ ├── AztecReader.h │ ├── decoder │ │ ├── Decoder.h │ │ └── Decoder1.cpp │ └── detector │ │ ├── Detector.h │ │ └── Detector1.cpp │ ├── common │ ├── Array.h │ ├── BitArray.cpp │ ├── BitArray.h │ ├── BitArrayIO.cpp │ ├── BitMatrix.cpp │ ├── BitMatrix.h │ ├── BitSource.cpp │ ├── BitSource.h │ ├── CharacterSetECI.cpp │ ├── CharacterSetECI.h │ ├── Counted.h │ ├── DecoderResult.cpp │ ├── DecoderResult.h │ ├── DetectorResult.cpp │ ├── DetectorResult.h │ ├── GlobalHistogramBinarizer.cpp │ ├── GlobalHistogramBinarizer.h │ ├── GreyscaleLuminanceSource.cpp │ ├── GreyscaleLuminanceSource.h │ ├── GreyscaleRotatedLuminanceSource.cpp │ ├── GreyscaleRotatedLuminanceSource.h │ ├── GridSampler.cpp │ ├── GridSampler.h │ ├── HybridBinarizer.cpp │ ├── HybridBinarizer.h │ ├── IllegalArgumentException.cpp │ ├── IllegalArgumentException.h │ ├── PerspectiveTransform.cpp │ ├── PerspectiveTransform.h │ ├── Point.h │ ├── Str.cpp │ ├── Str.h │ ├── StringUtils.cpp │ ├── StringUtils.h │ ├── detector │ │ ├── JavaMath.h │ │ ├── MathUtils.h │ │ ├── MonochromeRectangleDetector.cpp │ │ ├── MonochromeRectangleDetector.h │ │ ├── WhiteRectangleDetector.cpp │ │ └── WhiteRectangleDetector.h │ └── reedsolomon │ │ ├── GenericGF.cpp │ │ ├── GenericGF.h │ │ ├── GenericGFPoly.cpp │ │ ├── GenericGFPoly.h │ │ ├── ReedSolomonDecoder.cpp │ │ ├── ReedSolomonDecoder.h │ │ ├── ReedSolomonException.cpp │ │ └── ReedSolomonException.h │ ├── datamatrix │ ├── DataMatrixReader.cpp │ ├── DataMatrixReader.h │ ├── Version.h │ ├── Version1.cpp │ ├── decoder │ │ ├── BitMatrixParser.h │ │ ├── BitMatrixParser1.cpp │ │ ├── DataBlock.h │ │ ├── DataBlock1.cpp │ │ ├── DecodedBitStreamParser.h │ │ ├── DecodedBitStreamParser1.cpp │ │ ├── Decoder.h │ │ └── Decoder2.cpp │ └── detector │ │ ├── CornerPoint.cpp │ │ ├── CornerPoint.h │ │ ├── Detector.h │ │ ├── Detector2.cpp │ │ ├── DetectorException.cpp │ │ └── DetectorException.h │ ├── multi │ ├── ByQuadrantReader.cpp │ ├── ByQuadrantReader.h │ ├── GenericMultipleBarcodeReader.cpp │ ├── GenericMultipleBarcodeReader.h │ ├── MultipleBarcodeReader.cpp │ ├── MultipleBarcodeReader.h │ └── qrcode │ │ ├── QRCodeMultiReader.cpp │ │ ├── QRCodeMultiReader.h │ │ └── detector │ │ ├── MultiDetector.cpp │ │ ├── MultiDetector.h │ │ ├── MultiFinderPatternFinder.h │ │ └── MultiFinderPatternFinder1.cpp │ ├── oned │ ├── CodaBarReader.cpp │ ├── CodaBarReader.h │ ├── Code128Reader.cpp │ ├── Code128Reader.h │ ├── Code39Reader.cpp │ ├── Code39Reader.h │ ├── Code93Reader.cpp │ ├── Code93Reader.h │ ├── EAN13Reader.cpp │ ├── EAN13Reader.h │ ├── EAN8Reader.cpp │ ├── EAN8Reader.h │ ├── ITFReader.cpp │ ├── ITFReader.h │ ├── MultiFormatOneDReader.cpp │ ├── MultiFormatOneDReader.h │ ├── MultiFormatUPCEANReader.cpp │ ├── MultiFormatUPCEANReader.h │ ├── OneDReader.cpp │ ├── OneDReader.h │ ├── OneDResultPoint.cpp │ ├── OneDResultPoint.h │ ├── UPCAReader.cpp │ ├── UPCAReader.h │ ├── UPCEANReader.cpp │ ├── UPCEANReader.h │ ├── UPCEReader.cpp │ └── UPCEReader.h │ ├── pdf417 │ ├── PDF417Reader.cpp │ ├── PDF417Reader.h │ ├── decoder │ │ ├── BitMatrixParser.h │ │ ├── BitMatrixParser2.cpp │ │ ├── DecodedBitStreamParser.h │ │ ├── DecodedBitStreamParser2.cpp │ │ ├── Decoder.h │ │ ├── Decoder3.cpp │ │ └── ec │ │ │ ├── ErrorCorrection.cpp │ │ │ ├── ErrorCorrection.h │ │ │ ├── ModulusGF.cpp │ │ │ ├── ModulusGF.h │ │ │ ├── ModulusPoly.cpp │ │ │ └── ModulusPoly.h │ └── detector │ │ ├── Detector.h │ │ ├── Detector3.cpp │ │ ├── LinesSampler.cpp │ │ └── LinesSampler.h │ └── qrcode │ ├── ErrorCorrectionLevel.cpp │ ├── ErrorCorrectionLevel.h │ ├── FormatInformation.cpp │ ├── FormatInformation.h │ ├── QRCodeReader.cpp │ ├── QRCodeReader.h │ ├── Version.h │ ├── Version2.cpp │ ├── decoder │ ├── BitMatrixParser.h │ ├── BitMatrixParser3.cpp │ ├── DataBlock.h │ ├── DataBlock2.cpp │ ├── DataMask.cpp │ ├── DataMask.h │ ├── DecodedBitStreamParser.h │ ├── DecodedBitStreamParser3.cpp │ ├── Decoder.h │ ├── Decoder4.cpp │ ├── Mode.cpp │ └── Mode.h │ └── detector │ ├── AlignmentPattern.cpp │ ├── AlignmentPattern.h │ ├── AlignmentPatternFinder.cpp │ ├── AlignmentPatternFinder.h │ ├── Detector.h │ ├── Detector4.cpp │ ├── FinderPattern.cpp │ ├── FinderPattern.h │ ├── FinderPatternFinder.h │ ├── FinderPatternFinder2.cpp │ ├── FinderPatternInfo.cpp │ └── FinderPatternInfo.h ├── TTKTinyTools.pri ├── TTKTinyTools.pro ├── TTKUi ├── CMakeLists.txt ├── TTKModule.qrc ├── TTKUi.pro └── TTKUi.rc ├── TTKUtils ├── linux_time.sh ├── make_cert.bat └── resource │ ├── LICENSE.QT-LICENSE-AGREEMENT │ ├── README.txt │ └── qicon.dll └── TTKVersion.pri /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | github: [Greedysky] 3 | patreon: # Replace with a single Patreon username 4 | open_collective: # Replace with a single Open Collective username 5 | ko_fi: # Replace with a single Ko-fi username 6 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 7 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 8 | liberapay: # Replace with a single Liberapay username 9 | issuehunt: # Replace with a single IssueHunt username 10 | otechie: # Replace with a single Otechie username 11 | custom: ['https://greedysky.github.io/sponsor'] 12 | 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # C++ objects and libs 2 | *.slo 3 | *.lo 4 | *.o 5 | *.a 6 | *.la 7 | *.lai 8 | 9 | # QtCreator 10 | *.bak 11 | *.autosave 12 | 13 | # Qt 14 | *.user 15 | *.user.* 16 | *.aps 17 | *.prl 18 | *.moc 19 | *moc_* 20 | qrc_*.cpp 21 | ui_*.h 22 | 23 | # Build 24 | Makefile* 25 | *build-* 26 | 27 | # Other 28 | *.*-pre1 29 | *.*~ 30 | *.uxf 31 | 32 | # Windows 33 | Thumbs.db 34 | ehthumbs.db 35 | Desktop.ini 36 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | v3.1.0.0 Final 2025.05.05 2 | 优化部分交互逻辑 3 | 优化其他一些细节 4 | 5 | ... 6 | 7 | -------------------------------------------------------------------------------- /TTKCommon/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Library Module project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | cmake_minimum_required(VERSION 3.0.0) 20 | 21 | add_subdirectory(config) 22 | add_subdirectory(TTKLibrary) 23 | add_subdirectory(TTKDumper) 24 | -------------------------------------------------------------------------------- /TTKCommon/TTKApplication/TTKApplication.pri: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Library Module project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | QT += core gui network 20 | greaterThan(QT_MAJOR_VERSION, 4){ #Qt5 21 | QT += widgets 22 | } 23 | 24 | INCLUDEPATH += $$PWD 25 | 26 | HEADERS += \ 27 | $$PWD/ttklocalpeer.h \ 28 | $$PWD/ttkapplication.h 29 | 30 | SOURCES += \ 31 | $$PWD/ttklocalpeer.cpp \ 32 | $$PWD/ttkapplication.cpp 33 | -------------------------------------------------------------------------------- /TTKCommon/TTKApplication/TTKCoreApplication.pri: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Library Module project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | QT += core network 20 | 21 | INCLUDEPATH += $$PWD 22 | 23 | HEADERS += \ 24 | $$PWD/ttklocalpeer.h \ 25 | $$PWD/ttkcoreapplication.h 26 | 27 | SOURCES += \ 28 | $$PWD/ttklocalpeer.cpp \ 29 | $$PWD/ttkcoreapplication.cpp 30 | -------------------------------------------------------------------------------- /TTKCommon/TTKApplication/TTKGuiApplication.pri: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Library Module project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | QT += core gui network 20 | 21 | INCLUDEPATH += $$PWD 22 | 23 | HEADERS += \ 24 | $$PWD/ttklocalpeer.h \ 25 | $$PWD/ttkguiapplication.h 26 | 27 | SOURCES += \ 28 | $$PWD/ttklocalpeer.cpp \ 29 | $$PWD/ttkguiapplication.cpp 30 | -------------------------------------------------------------------------------- /TTKCommon/TTKApplication/ttklockedfile.cpp: -------------------------------------------------------------------------------- 1 | #include "ttklockedfile.h" 2 | 3 | TTKLockedFile::TTKLockedFile() noexcept 4 | : QFile() 5 | { 6 | #ifdef Q_OS_WIN 7 | m_wmutex = 0; 8 | m_rmutex = 0; 9 | #endif 10 | m_lock_mode = NoLock; 11 | } 12 | 13 | TTKLockedFile::TTKLockedFile(const QString &name) noexcept 14 | : QFile(name) 15 | { 16 | #ifdef Q_OS_WIN 17 | m_wmutex = 0; 18 | m_rmutex = 0; 19 | #endif 20 | m_lock_mode = NoLock; 21 | } 22 | 23 | bool TTKLockedFile::open(OpenMode mode) 24 | { 25 | if (mode & QIODevice::Truncate) { 26 | qWarning("TTKLockedFile::open(): Truncate mode not allowed."); 27 | return false; 28 | } 29 | return QFile::open(mode); 30 | } 31 | 32 | bool TTKLockedFile::isLocked() const noexcept 33 | { 34 | return m_lock_mode != NoLock; 35 | } 36 | 37 | TTKLockedFile::LockMode TTKLockedFile::lockMode() const noexcept 38 | { 39 | return m_lock_mode; 40 | } 41 | -------------------------------------------------------------------------------- /TTKCommon/TTKCommon.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Library Module project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | TEMPLATE = subdirs 20 | CONFIG += ordered 21 | SUBDIRS += config TTKLibrary TTKDumper 22 | -------------------------------------------------------------------------------- /TTKCommon/TTKDumper/TTKDumper.rc: -------------------------------------------------------------------------------- 1 | #if defined(UNDER_CE) 2 | include 3 | #else 4 | #include 5 | #endif 6 | #include "../ttkversion.h" 7 | 8 | VS_VERSION_INFO VERSIONINFO 9 | FILEVERSION TTK_RC_FILEVERSION 10 | PRODUCTVERSION TTK_RC_FILEVERSION 11 | FILEFLAGSMASK 0x3fL 12 | 13 | #ifdef _DEBUG 14 | FILEFLAGS VS_FF_DEBUG 15 | #else 16 | FILEFLAGS 0x0L 17 | #endif 18 | 19 | FILEOS VOS__WINDOWS32 20 | FILETYPE VFT_DLL 21 | FILESUBTYPE 0x0L 22 | BEGIN 23 | BLOCK "StringFileInfo" 24 | BEGIN 25 | BLOCK "080404b0" 26 | BEGIN 27 | VALUE "CompanyName", TTK_RC_COMPANY 28 | VALUE "FileDescription", "TTKDumper" 29 | VALUE "FileVersion", TTK_RC_PRODUCTVERSION 30 | VALUE "LegalCopyright", TTK_RC_COPYRIGHT 31 | VALUE "ProductName", "TTKDumper" 32 | VALUE "ProductVersion", TTK_RC_PRODUCTVERSION 33 | END 34 | END 35 | BLOCK "VarFileInfo" 36 | BEGIN 37 | VALUE "Translation", 0x804, 1200 38 | END 39 | END 40 | -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/TTKLibrary.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resource/shadow/lb_bottom.png 4 | resource/shadow/lb_left.png 5 | resource/shadow/lb_right.png 6 | resource/shadow/lb_top.png 7 | resource/shadow/lb_left_top.png 8 | resource/shadow/lb_right_top.png 9 | resource/shadow/lb_left_bottom.png 10 | resource/shadow/lb_right_bottom.png 11 | 12 | 13 | -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/TTKLibrary.rc: -------------------------------------------------------------------------------- 1 | #if defined(UNDER_CE) 2 | include 3 | #else 4 | #include 5 | #endif 6 | #include "ttklibraryversion.h" 7 | 8 | VS_VERSION_INFO VERSIONINFO 9 | FILEVERSION TTK_RC_FILEVERSION 10 | PRODUCTVERSION TTK_RC_FILEVERSION 11 | FILEFLAGSMASK 0x3fL 12 | 13 | #ifdef _DEBUG 14 | FILEFLAGS VS_FF_DEBUG 15 | #else 16 | FILEFLAGS 0x0L 17 | #endif 18 | 19 | FILEOS VOS__WINDOWS32 20 | FILETYPE VFT_DLL 21 | FILESUBTYPE 0x0L 22 | BEGIN 23 | BLOCK "StringFileInfo" 24 | BEGIN 25 | BLOCK "080404b0" 26 | BEGIN 27 | VALUE "CompanyName", TTK_RC_COMPANY 28 | VALUE "FileDescription", "TTKLibrary" 29 | VALUE "FileVersion", TTK_RC_PRODUCTVERSION 30 | VALUE "LegalCopyright", TTK_RC_COPYRIGHT 31 | VALUE "ProductName", "TTKLibrary" 32 | VALUE "ProductVersion", TTK_RC_PRODUCTVERSION 33 | END 34 | END 35 | BLOCK "VarFileInfo" 36 | BEGIN 37 | VALUE "Translation", 0x804, 1200 38 | END 39 | END 40 | -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/resource/shadow/lb_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKCommon/TTKLibrary/resource/shadow/lb_bottom.png -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/resource/shadow/lb_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKCommon/TTKLibrary/resource/shadow/lb_left.png -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/resource/shadow/lb_left_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKCommon/TTKLibrary/resource/shadow/lb_left_bottom.png -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/resource/shadow/lb_left_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKCommon/TTKLibrary/resource/shadow/lb_left_top.png -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/resource/shadow/lb_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKCommon/TTKLibrary/resource/shadow/lb_right.png -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/resource/shadow/lb_right_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKCommon/TTKLibrary/resource/shadow/lb_right_bottom.png -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/resource/shadow/lb_right_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKCommon/TTKLibrary/resource/shadow/lb_right_top.png -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/resource/shadow/lb_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKCommon/TTKLibrary/resource/shadow/lb_top.png -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/ttkabstractthread.cpp: -------------------------------------------------------------------------------- 1 | #include "ttkabstractthread.h" 2 | 3 | TTKAbstractThread::TTKAbstractThread(QObject *parent) 4 | : QThread(parent), 5 | m_running(true) 6 | { 7 | 8 | } 9 | 10 | void TTKAbstractThread::stop() 11 | { 12 | m_running = false; 13 | if(isRunning()) 14 | { 15 | quit(); 16 | wait(); 17 | } 18 | } 19 | 20 | void TTKAbstractThread::start() 21 | { 22 | m_running = true; 23 | QThread::start(); 24 | } 25 | 26 | void TTKAbstractThread::run() 27 | { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/ttkany.cpp: -------------------------------------------------------------------------------- 1 | #include "ttkany.h" 2 | 3 | TTKAny::TTKAny() noexcept 4 | : m_type(std::type_index(typeid(void))) 5 | { 6 | 7 | } 8 | 9 | TTKAny::TTKAny(const TTKAny &other) noexcept 10 | : m_ptr(other.clone()) 11 | , m_type(other.m_type) 12 | { 13 | 14 | } 15 | 16 | TTKAny::TTKAny(TTKAny &&other) noexcept 17 | : m_ptr(std::move(other.m_ptr)) 18 | , m_type(std::move(other.m_type)) 19 | { 20 | 21 | } 22 | 23 | bool TTKAny::isNull() const noexcept 24 | { 25 | return !bool(m_ptr); 26 | } 27 | 28 | TTKAny& TTKAny::operator=(const TTKAny &other) noexcept 29 | { 30 | if(m_ptr == other.m_ptr) 31 | { 32 | return *this; 33 | } 34 | 35 | m_ptr = other.clone(); 36 | m_type = other.m_type; 37 | return *this; 38 | } 39 | -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/ttkclickedgroup.cpp: -------------------------------------------------------------------------------- 1 | #include "ttkclickedgroup.h" 2 | 3 | TTKClickedGroup::TTKClickedGroup(QObject *parent) 4 | : QObject(parent) 5 | { 6 | 7 | } 8 | 9 | void TTKClickedGroup::mapped(QWidget *widget) 10 | { 11 | m_container << widget; 12 | connect(widget, SIGNAL(clicked()), this, SLOT(update())); 13 | } 14 | 15 | void TTKClickedGroup::update() 16 | { 17 | QWidget *widget = TTKObjectCast(QWidget*, sender()); 18 | if(!widget) 19 | { 20 | return; 21 | } 22 | 23 | int index = -1; 24 | for(int i = 0; i < m_container.count(); ++i) 25 | { 26 | if(m_container[i] == widget) 27 | { 28 | index = i; 29 | break; 30 | } 31 | } 32 | 33 | if(index == -1) 34 | { 35 | return; 36 | } 37 | 38 | Q_EMIT clicked(index); 39 | } 40 | -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/ttkclickedlabel.cpp: -------------------------------------------------------------------------------- 1 | #include "ttkclickedlabel.h" 2 | 3 | #include 4 | 5 | TTKClickedLabel::TTKClickedLabel(QWidget *parent) 6 | : QLabel(parent) 7 | , m_blockOption(false) 8 | { 9 | setCursor(Qt::PointingHandCursor); 10 | } 11 | 12 | TTKClickedLabel::TTKClickedLabel(const QString &text, QWidget *parent) 13 | : QLabel(text, parent) 14 | , m_blockOption(false) 15 | { 16 | setCursor(Qt::PointingHandCursor); 17 | } 18 | 19 | void TTKClickedLabel::mousePressEvent(QMouseEvent *event) 20 | { 21 | // QLabel::mousePressEvent(event); 22 | if(event->button() == Qt::LeftButton && !m_blockOption) 23 | { 24 | Q_EMIT clicked(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/ttkeventloop.cpp: -------------------------------------------------------------------------------- 1 | #include "ttkeventloop.h" 2 | 3 | TTKEventLoop::TTKEventLoop(QObject *parent) 4 | : QEventLoop(parent) 5 | { 6 | m_timer.setInterval(10 * TTK_DN_S2MS); 7 | connect(&m_timer, SIGNAL(timeout()), SLOT(quit())); 8 | } 9 | 10 | TTKEventLoop::~TTKEventLoop() 11 | { 12 | quit(); 13 | } 14 | 15 | void TTKEventLoop::setTimeout(int msec) 16 | { 17 | m_timer.setInterval(msec); 18 | } 19 | 20 | int TTKEventLoop::exec(ProcessEventsFlags flags) 21 | { 22 | m_timer.start(); 23 | return QEventLoop::exec(flags); 24 | } 25 | 26 | void TTKEventLoop::quit() 27 | { 28 | m_timer.stop(); 29 | return QEventLoop::quit(); 30 | } 31 | 32 | void TTKEventLoop::exit() 33 | { 34 | m_timer.stop(); 35 | return QEventLoop::exit(); 36 | } 37 | -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/ttksuperenum.cpp: -------------------------------------------------------------------------------- 1 | #include "ttksuperenum.h" 2 | 3 | #include 4 | 5 | TTKSuperEnum::TTKSuperEnum(const QString &value) 6 | : m_enumValue() 7 | { 8 | int enumValue = 0; 9 | const QStringList &enums = value.split(','); 10 | 11 | for(QString data : qAsConst(enums)) 12 | { 13 | const int pos = data.indexOf('='); 14 | if(pos != TTKSuperEnum::Null) 15 | { 16 | const QString &v = data.right(data.length() - pos - 1).trimmed(); 17 | enumValue = v.toInt(nullptr, (v.startsWith("0x") || v.startsWith("0X")) ? 16 : 10); 18 | data = data.left(pos); 19 | } 20 | 21 | m_enumValue[enumValue] = data.trimmed(); 22 | enumValue++; 23 | } 24 | } 25 | 26 | QString TTKSuperEnum::keyToString(int value) const noexcept 27 | { 28 | if(TTKSuperEnum::Null == value) 29 | { 30 | return "Null"; 31 | } 32 | 33 | const auto &it = m_enumValue.find(value); 34 | return it != m_enumValue.end() ? it->second : "Invalid"; 35 | } 36 | 37 | int TTKSuperEnum::stringToKey(const QString &name) const noexcept 38 | { 39 | if("Null" == name) 40 | { 41 | return TTKSuperEnum::Null; 42 | } 43 | 44 | for(auto &&item : qAsConst(m_enumValue)) 45 | { 46 | if(item.second == name) 47 | { 48 | return item.first; 49 | } 50 | } 51 | return TTKSuperEnum::Null; 52 | } 53 | -------------------------------------------------------------------------------- /TTKCommon/TTKLibrary/ttkthemelinelabel.cpp: -------------------------------------------------------------------------------- 1 | #include "ttkthemelinelabel.h" 2 | 3 | #include 4 | 5 | TTKThemeLineLabel::TTKThemeLineLabel(QWidget *parent) 6 | : QLabel(parent) 7 | { 8 | 9 | } 10 | 11 | void TTKThemeLineLabel::paintEvent(QPaintEvent *) 12 | { 13 | const QFontMetrics ftm(font()); 14 | const int w = QtFontWidth(ftm, text()) + 15; 15 | 16 | QPainter painter(this); 17 | painter.setFont(font()); 18 | painter.drawText(rect(), Qt::AlignLeft | Qt::AlignVCenter, text()); 19 | 20 | painter.setPen(QPen(QColor(0, 0, 0, 25), 1)); 21 | painter.drawLine(w, height() / 2, width(), height() / 2); 22 | } 23 | -------------------------------------------------------------------------------- /TTKCommon/base/ttkmoduleexport.h: -------------------------------------------------------------------------------- 1 | #ifndef TTKMODULEEXPORT_H 2 | #define TTKMODULEEXPORT_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Library Module project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include "ttkqtcompat.h" 23 | 24 | #ifdef TTK_LIBRARY 25 | # define TTK_MODULE_EXPORT Q_DECL_EXPORT 26 | #else 27 | # define TTK_MODULE_EXPORT Q_DECL_IMPORT 28 | #endif 29 | 30 | #endif // TTKMODULEEXPORT_H 31 | -------------------------------------------------------------------------------- /TTKCommon/compat/compat.pri: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Library Module project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../config.pri) 20 | 21 | INCLUDEPATH += \ 22 | $$PWD \ 23 | $$PWD/../ 24 | 25 | HEADERS += $$PWD/compat.h 26 | 27 | SOURCES += \ 28 | $$PWD/strlcat.c \ 29 | $$PWD/strlcpy.c 30 | -------------------------------------------------------------------------------- /TTKCommon/compat/integer.h: -------------------------------------------------------------------------------- 1 | #ifndef INTEGER_H 2 | #define INTEGER_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Library Module project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #if (defined __SIZEOF_INT128__ && __SIZEOF_INT128__ == 16) || defined _GLIBCXX_USE_INT128 23 | using TTKInt128 = __extension__ __int128; 24 | using TTKUInt128 = __extension__ unsigned __int128; 25 | #else 26 | #include "int128.h" 27 | using TTKInt128 = int128_t; 28 | using TTKUInt128 = uint128_t; 29 | #endif 30 | 31 | #endif // INTEGER_H 32 | -------------------------------------------------------------------------------- /TTKCommon/config.pri: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Library Module project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | GENERATE_PWD = $$DESTDIR/../Generate 20 | 21 | INCLUDEPATH += $$GENERATE_PWD 22 | 23 | HEADERS += $$GENERATE_PWD/ttkconfig.h 24 | -------------------------------------------------------------------------------- /TTKCommon/config/config.tests/default/default.cpp: -------------------------------------------------------------------------------- 1 | 2 | int main(int argc, char *argv[]) 3 | { 4 | return 0; 5 | } 6 | -------------------------------------------------------------------------------- /TTKCommon/config/config.tests/default/default.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Library Module project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | CONFIG -= qt 20 | CONFIG += console 21 | 22 | SOURCES = default.cpp 23 | -------------------------------------------------------------------------------- /TTKCommon/config/config.tests/strlcat/strlcat.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | char v[2] = {}; 6 | strlcat(v, "1", 2); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /TTKCommon/config/config.tests/strlcat/strlcat.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Library Module project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | CONFIG -= qt 20 | CONFIG += console 21 | 22 | SOURCES = strlcat.cpp 23 | -------------------------------------------------------------------------------- /TTKCommon/config/config.tests/strlcpy/strlcpy.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | char v[2] = {}; 6 | strlcpy(v, "1", 2); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /TTKCommon/config/config.tests/strlcpy/strlcpy.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Library Module project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | CONFIG -= qt 20 | CONFIG += console 21 | 22 | SOURCES = strlcpy.cpp 23 | -------------------------------------------------------------------------------- /TTKCommon/config/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | int main(int argc, char *argv[]) 3 | { 4 | (void)argc; 5 | (void)argv; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /TTKCommon/config/ttkconfig.h.cmake: -------------------------------------------------------------------------------- 1 | #ifndef TTKCONFIG_H 2 | #define TTKCONFIG_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Library Module project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #if @HAVE_STRLCAT@ 23 | # define HAVE_STRLCAT 24 | #endif 25 | 26 | #if @HAVE_STRLCPY@ 27 | # define HAVE_STRLCPY 28 | #endif 29 | 30 | #endif // TTKCONFIG_H 31 | -------------------------------------------------------------------------------- /TTKCommon/config/ttkconfig.h.qmake: -------------------------------------------------------------------------------- 1 | #ifndef TTKCONFIG_H 2 | #define TTKCONFIG_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Library Module project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #if $$HAVE_STRLCAT 23 | # define HAVE_STRLCAT 24 | #endif 25 | 26 | #if $$HAVE_STRLCPY 27 | # define HAVE_STRLCPY 28 | #endif 29 | 30 | #endif // TTKCONFIG_H 31 | -------------------------------------------------------------------------------- /TTKModule/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | cmake_minimum_required(VERSION 3.0.0) 20 | 21 | if(WIN32) 22 | set(MODULE_RC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/TTKCore.rc) 23 | endif() 24 | 25 | set(QT_LINK_LIBS TTKLibrary TTKUi TTKThirdParty) 26 | 27 | add_subdirectory(TTKImage) 28 | add_subdirectory(TTKNetwork) 29 | add_subdirectory(TTKText) 30 | add_subdirectory(TTKTools) 31 | -------------------------------------------------------------------------------- /TTKModule/TTKCore.rc: -------------------------------------------------------------------------------- 1 | #if defined(UNDER_CE) 2 | include 3 | #else 4 | #include 5 | #endif 6 | #include "../TTKCommon/ttkversion.h" 7 | 8 | IDI_ICON1 ICON DISCARDABLE "../TTKResource/lb_app_logo.ico" 9 | 10 | VS_VERSION_INFO VERSIONINFO 11 | FILEVERSION TTK_RC_FILEVERSION 12 | PRODUCTVERSION TTK_RC_FILEVERSION 13 | FILEFLAGSMASK 0x3fL 14 | 15 | #ifdef _DEBUG 16 | FILEFLAGS VS_FF_DEBUG 17 | #else 18 | FILEFLAGS 0x0L 19 | #endif 20 | 21 | FILEOS VOS__WINDOWS32 22 | FILETYPE VFT_DLL 23 | FILESUBTYPE 0x0L 24 | BEGIN 25 | BLOCK "StringFileInfo" 26 | BEGIN 27 | BLOCK "080404b0" 28 | BEGIN 29 | VALUE "CompanyName", TTK_RC_COMPANY 30 | VALUE "FileDescription", "TTKTinyTools" 31 | VALUE "FileVersion", TTK_RC_PRODUCTVERSION 32 | VALUE "LegalCopyright", TTK_RC_COPYRIGHT 33 | VALUE "ProductName", "TTKTinyTools" 34 | VALUE "ProductVersion", TTK_RC_PRODUCTVERSION 35 | END 36 | END 37 | BLOCK "VarFileInfo" 38 | BEGIN 39 | VALUE "Translation", 0x804, 1200 40 | END 41 | END 42 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKBarcodeMaker/TTKBarcodeMaker.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKBarcodeMaker 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKBarcodeMaker/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mainwindow.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.savePng("1111111111111"); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKBarcodeMaker/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include 23 | #include "ttkmoduleexport.h" 24 | 25 | class TTK_MODULE_EXPORT MainWindow 26 | { 27 | public: 28 | void savePng(const QString &id); 29 | QPixmap render(const QString &id); 30 | 31 | }; 32 | 33 | #endif // MAINWINDOW_H 34 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKFontPng/TTKFontPng.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKFontPng 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKFontPng/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mainwindow.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.saveIcon("c://Font_Path", 20, 20, 20, 0x2313); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKFontPng/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ttkdesktopscreen.h" 3 | 4 | #include 5 | #include 6 | 7 | static QPixmap transFontToPixmap(const QFont &newFont, int w, int h, int fontSize, int iconIndex) 8 | { 9 | QLabel widget; 10 | widget.setAttribute(Qt::WA_TranslucentBackground); 11 | widget.setFixedSize(w, h); 12 | widget.setAlignment(Qt::AlignCenter); 13 | widget.setText(QChar(iconIndex)); 14 | 15 | QFont font = newFont; 16 | font.setPointSize(fontSize); 17 | widget.setFont(font); 18 | 19 | return TTKDesktopScreen::grabWidget(&widget, widget.rect()); 20 | } 21 | 22 | 23 | QPixmap MainWindow::saveIcon(const QString &fontPath, int w, int h, int fontSize, int iconIndex) 24 | { 25 | const int fontId = QFontDatabase::addApplicationFont(fontPath); 26 | const QStringList &fontNames = QFontDatabase::applicationFontFamilies(fontId); 27 | return fontNames.isEmpty() ? QPixmap() : transFontToPixmap(QFont(fontNames[0]), w, h, fontSize, iconIndex); 28 | } 29 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKFontPng/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include 23 | #include "ttkmoduleexport.h" 24 | 25 | class TTK_MODULE_EXPORT MainWindow 26 | { 27 | public: 28 | QPixmap saveIcon(const QString &fontPath, int w, int h, int fontSize, int iconIndex); 29 | 30 | }; 31 | 32 | #endif // MAINWINDOW_H 33 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKGaussianBlur/TTKGaussianBlur.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKGaussianBlur 22 | 23 | HEADERS += \ 24 | $$PWD/mainwindow.h \ 25 | $$PWD/gaussianblur.h 26 | 27 | SOURCES += \ 28 | $$PWD/main.cpp \ 29 | $$PWD/mainwindow.cpp \ 30 | $$PWD/gaussianblur.cpp 31 | 32 | FORMS += $$PWD/mainwindow.ui 33 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKGaussianBlur/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mainwindow.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.show(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKGaussianBlur/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ui_mainwindow.h" 3 | #include "gaussianblur.h" 4 | 5 | #include 6 | 7 | MainWindow::MainWindow(QWidget *parent) 8 | : QWidget(parent), 9 | m_ui(new Ui::MainWindow) 10 | { 11 | m_ui->setupUi(this); 12 | 13 | m_ui->valueSlider->setRange(1, 100); 14 | 15 | connect(m_ui->openButton, SIGNAL(clicked(bool)), SLOT(openImage())); 16 | connect(m_ui->valueSlider, SIGNAL(valueChanged(int)), SLOT(radiusChanged(int))); 17 | } 18 | 19 | MainWindow::~MainWindow() 20 | { 21 | delete m_ui; 22 | } 23 | 24 | void MainWindow::openImage() 25 | { 26 | m_path = QFileDialog::getOpenFileName(this, "Please Image", "", "Image Files (*.png *.bmp *.jpg)"); 27 | if(m_path.isEmpty()) 28 | { 29 | return; 30 | } 31 | 32 | m_ui->valueSlider->setValue(1); 33 | m_ui->originPixLabel->setPixmap(QPixmap(m_path)); 34 | m_ui->resultPixLabel->setPixmap(QPixmap(m_path)); 35 | } 36 | 37 | void MainWindow::radiusChanged(int value) 38 | { 39 | if(m_path.isEmpty()) 40 | { 41 | return; 42 | } 43 | 44 | QImage image(m_path); 45 | GaussianBlur().gaussBlur(image, value); 46 | m_ui->resultPixLabel->setPixmap(QPixmap::fromImage(image)); 47 | } 48 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKGetColor/TTKGetColor.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKGetColor 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | 29 | FORMS += $$PWD/mainwindow.ui 30 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKGetColor/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mainwindow.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.show(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKGifWidget/TTKGifWidget.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKGifWidget 22 | 23 | CONFIG += warn_off 24 | 25 | HEADERS += $$PWD/mainwindow.h 26 | 27 | SOURCES += \ 28 | $$PWD/main.cpp \ 29 | $$PWD/mainwindow.cpp 30 | 31 | FORMS += $$PWD/mainwindow.ui 32 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKGifWidget/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | #include 4 | #include 5 | 6 | int main(int argc, char *argv[]) 7 | { 8 | QApplication a(argc, argv); 9 | 10 | QTextCodec *codec = QTextCodec::codecForName("UTF-8"); 11 | QTextCodec::setCodecForLocale(codec); 12 | #if !TTK_QT_VERSION_CHECK(5,0,0) 13 | QTextCodec::setCodecForCStrings(codec); 14 | QTextCodec::setCodecForTr(codec); 15 | #endif 16 | 17 | MainWindow w; 18 | w.show(); 19 | 20 | return a.exec(); 21 | } 22 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKIcoHelper/TTKIcoHelper.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKIcoHelper 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | 29 | FORMS += $$PWD/mainwindow.ui 30 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKIcoHelper/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mainwindow.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.show(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKIconMaker/TTKIconMaker.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKIconMaker 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKIconMaker/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mainwindow.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.save(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKIconMaker/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include 23 | #include "ttkmoduleexport.h" 24 | 25 | class TTK_MODULE_EXPORT MainWindow 26 | { 27 | public: 28 | void save(); 29 | 30 | private: 31 | void save(const QString &path, const QSize &size); 32 | 33 | private: 34 | QImage source_; 35 | 36 | }; 37 | 38 | #endif // MAINWINDOW_H 39 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKImage.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | TEMPLATE = subdirs 20 | CONFIG += ordered 21 | SUBDIRS += TTKGetColor TTKGifWidget TTKPngHelper TTKGaussianBlur TTKFontPng TTKBarcodeMaker TTKWebPMaker \ 22 | TTKQRCodeReader TTKQRCodeMaker TTKIcoHelper TTKIconMaker TTKImageView TTKWaterWave 23 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKImageView/TTKImageView.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKImageView 22 | 23 | INCLUDEPATH += $$PWD 24 | 25 | HEADERS += \ 26 | $$PWD/mainwindow.h \ 27 | $$PWD/imageview.h 28 | 29 | SOURCES += \ 30 | $$PWD/main.cpp \ 31 | $$PWD/mainwindow.cpp \ 32 | $$PWD/imageview.cpp 33 | 34 | FORMS += $$PWD/mainwindow.ui 35 | 36 | RESOURCES += $$PWD/$${TARGET}.qrc 37 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKImageView/TTKImageView.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | image/btn_next_normal.png 4 | image/btn_pre_normal.png 5 | 6 | 7 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKImageView/image/btn_next_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKImage/TTKImageView/image/btn_next_normal.png -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKImageView/image/btn_pre_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKImage/TTKImageView/image/btn_pre_normal.png -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKImageView/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mainwindow.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.show(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKImageView/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ui_mainwindow.h" 3 | 4 | #include 5 | 6 | MainWindow::MainWindow(QWidget *parent) 7 | : QWidget(parent), 8 | m_ui(new Ui::MainWindow) 9 | { 10 | m_ui->setupUi(this); 11 | 12 | connect(m_ui->btnOpen, SIGNAL(clicked()), SLOT(openFileButtonClicked())); 13 | connect(m_ui->ckFill, SIGNAL(clicked(bool)), SLOT(fillButtonChanged(bool))); 14 | connect(m_ui->ckFade, SIGNAL(clicked(bool)), SLOT(fadeButtonChanged(bool))); 15 | connect(m_ui->ckKeyMove, SIGNAL(clicked(bool)), SLOT(keyMoveButtonChanged(bool))); 16 | } 17 | 18 | MainWindow::~MainWindow() 19 | { 20 | delete m_ui; 21 | } 22 | 23 | void MainWindow::openFileButtonClicked() 24 | { 25 | const QString &path = QFileDialog::getExistingDirectory(this, "选择文件夹"); 26 | if(!path.isEmpty()) 27 | { 28 | m_ui->labPath->setText(path); 29 | m_ui->imageView->load(path); 30 | } 31 | } 32 | 33 | void MainWindow::fillButtonChanged(bool state) 34 | { 35 | m_ui->imageView->setFill(state); 36 | } 37 | 38 | void MainWindow::fadeButtonChanged(bool state) 39 | { 40 | m_ui->imageView->setFade(state); 41 | } 42 | 43 | void MainWindow::keyMoveButtonChanged(bool state) 44 | { 45 | m_ui->imageView->setKeyMove(state); 46 | } 47 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKPngHelper/TTKPngHelper.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKPngHelper 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | 29 | FORMS += $$PWD/mainwindow.ui 30 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKPngHelper/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mainwindow.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.show(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKQRCodeMaker/TTKQRCodeMaker.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | include($$PWD/../../../TTKThirdParty/TTKThirdParty.pri) 21 | 22 | TARGET = TTKQRCodeMaker 23 | 24 | HEADERS += $$PWD/mainwindow.h 25 | 26 | SOURCES += \ 27 | $$PWD/main.cpp \ 28 | $$PWD/mainwindow.cpp 29 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKQRCodeMaker/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mainwindow.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.savePng("1111111111111"); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKQRCodeMaker/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include 23 | #include "ttkmoduleexport.h" 24 | 25 | class TTK_MODULE_EXPORT MainWindow 26 | { 27 | public: 28 | void savePng(const QString &text); 29 | 30 | }; 31 | 32 | #endif // MAINWINDOW_H 33 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKQRCodeReader/TTKQRCodeReader.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | include($$PWD/../../../TTKThirdParty/TTKThirdParty.pri) 21 | 22 | TARGET = TTKQRCodeReader 23 | 24 | HEADERS += $$PWD/mainwindow.h 25 | 26 | SOURCES += \ 27 | $$PWD/main.cpp \ 28 | $$PWD/mainwindow.cpp 29 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKQRCodeReader/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mainwindow.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.decodeImage(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKWaterWave/TTKWaterWave.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKWaterWave 22 | 23 | HEADERS += \ 24 | $$PWD/mainwindow.h \ 25 | $$PWD/waterwave.h 26 | 27 | SOURCES += \ 28 | $$PWD/main.cpp \ 29 | $$PWD/mainwindow.cpp \ 30 | $$PWD/waterwave.cpp 31 | 32 | FORMS += $$PWD/mainwindow.ui 33 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKWaterWave/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mainwindow.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.show(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKWebPMaker/TTKWebPMaker.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKWebPMaker 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKWebPMaker/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mainwindow.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.makeWebP(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKWebPMaker/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | #include 4 | 5 | void MainWindow::makeWebP() 6 | { 7 | const QStringList &filePaths = QFileDialog::getOpenFileNames(nullptr, "Save Path", TTK_DOT, "Image Files (*.png *.jpg)"); 8 | 9 | if(filePaths.isEmpty()) 10 | { 11 | return; 12 | } 13 | 14 | for(const auto &filePath : qAsConst(filePaths)) 15 | { 16 | QImage(filePath).save(filePath, "WEBP", 100); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /TTKModule/TTKImage/TTKWebPMaker/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include 23 | #include "ttkmoduleexport.h" 24 | 25 | class TTK_MODULE_EXPORT MainWindow 26 | { 27 | public: 28 | void makeWebP(); 29 | 30 | }; 31 | 32 | #endif // MAINWINDOW_H 33 | -------------------------------------------------------------------------------- /TTKModule/TTKModule.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | TEMPLATE = subdirs 20 | CONFIG += ordered 21 | SUBDIRS += TTKImage TTKNetwork TTKTools TTKText 22 | -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | cmake_minimum_required(VERSION 3.0.0) 20 | 21 | add_subdirectory(TTKDownloadLimit) 22 | add_subdirectory(TTKNetTraffic) 23 | add_subdirectory(TTKSocket) 24 | -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKDownloadLimit/TTKDownloadLimit.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKDownloadLimit 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | 29 | FORMS += $$PWD/mainwindow.ui 30 | -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKDownloadLimit/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.show(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "mainwindow.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | QApplication a(argc, argv); 8 | 9 | QTextCodec *codec = QTextCodec::codecForName("UTF-8"); 10 | QTextCodec::setCodecForLocale(codec); 11 | #if !TTK_QT_VERSION_CHECK(5,0,0) 12 | QTextCodec::setCodecForCStrings(codec); 13 | QTextCodec::setCodecForTr(codec); 14 | #endif 15 | 16 | QFile file(":/qss/Style3.qss"); 17 | if(file.open(QIODevice::ReadOnly)) 18 | { 19 | qApp->setStyleSheet(file.readAll()); 20 | file.close(); 21 | } 22 | 23 | MainWindow w; 24 | w.show(); 25 | 26 | return a.exec(); 27 | } 28 | -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/branch-closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/branch-closed.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/branch-end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/branch-end.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/branch-more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/branch-more.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/branch-more1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/branch-more1.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/branch-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/branch-open.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/checkbox_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/checkbox_checked.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/checkbox_checked_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/checkbox_checked_hover.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/checkbox_checked_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/checkbox_checked_pressed.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/checkbox_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/checkbox_unchecked.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/checkbox_unchecked_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/checkbox_unchecked_hover.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/checkbox_unchecked_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/checkbox_unchecked_pressed.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/close.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/close_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/close_hover.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/cpu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/cpu.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/down_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/down_arrow.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/down_arrow_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/down_arrow_disabled.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/down_arrow_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/down_arrow_hover.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/downarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/downarrow.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/frame.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/left_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/left_arrow.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/left_arrow_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/left_arrow_hover.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/maximize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/maximize.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/maximize_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/maximize_hover.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/maximized.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/maximized.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/maximized_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/maximized_hover.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/mem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/mem.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/minimize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/minimize.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/minimize_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/minimize_hover.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/radiobutton_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/radiobutton_checked.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/radiobutton_checked_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/radiobutton_checked_hover.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/radiobutton_checked_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/radiobutton_checked_pressed.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/radiobutton_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/radiobutton_unchecked.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/radiobutton_unchecked_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/radiobutton_unchecked_hover.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/radiobutton_unchecked_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/radiobutton_unchecked_pressed.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/right_arrow.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/right_arrow_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/right_arrow_hover.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/setup.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/sizegrip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/sizegrip.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/sizegrip1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/sizegrip1.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/spindown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/spindown.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/spindown_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/spindown_hover.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/spindown_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/spindown_off.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/spindown_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/spindown_pressed.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/spinup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/spinup.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/spinup_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/spinup_hover.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/spinup_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/spinup_off.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/spinup_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/spinup_pressed.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/ubuntu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/ubuntu.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/up_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/up_arrow.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/up_arrow_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/up_arrow_disabled.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/up_arrow_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/up_arrow_hover.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetTraffic/qss/vline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKNetwork/TTKNetTraffic/qss/vline.png -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKNetwork.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | TEMPLATE = subdirs 20 | CONFIG += ordered 21 | SUBDIRS += TTKSocket TTKDownloadLimit TTKNetTraffic 22 | -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKSocket/TTKSocket.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKSocket 22 | 23 | TRANSLATIONS += $$PWD/cn.ts 24 | 25 | HEADERS += \ 26 | $$PWD/mainwindow.h \ 27 | $$PWD/tcpclient.h \ 28 | $$PWD/tcpserver.h 29 | 30 | SOURCES += \ 31 | $$PWD/main.cpp \ 32 | $$PWD/mainwindow.cpp \ 33 | $$PWD/tcpclient.cpp \ 34 | $$PWD/tcpserver.cpp 35 | 36 | FORMS += $$PWD/mainwindow.ui 37 | -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKSocket/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | #include 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | QApplication a(argc, argv); 8 | 9 | QTranslator translator; 10 | if(!translator.load("cn.qm")) 11 | { 12 | qDebug("Load translation error"); 13 | } 14 | a.installTranslator(&translator); 15 | 16 | MainWindow w; 17 | w.show(); 18 | 19 | return a.exec(); 20 | } 21 | -------------------------------------------------------------------------------- /TTKModule/TTKNetwork/TTKSocket/tcpclient.cpp: -------------------------------------------------------------------------------- 1 | #include "tcpclient.h" 2 | 3 | #include 4 | 5 | TcpClient::TcpClient(int clientID, QObject *parent) 6 | : QTcpSocket(parent), 7 | m_clientID(clientID) 8 | { 9 | connect(this, SIGNAL(readyRead()), SLOT(readData())); 10 | connect(this, SIGNAL(disconnected()), SLOT(disConnect())); 11 | } 12 | 13 | int TcpClient::clientID() const 14 | { 15 | return m_clientID; 16 | } 17 | 18 | void TcpClient::readData() 19 | { 20 | ClientData pair; 21 | pair.m_clientID = m_clientID; 22 | pair.m_ip = peerAddress().toString(); 23 | pair.m_port = peerPort(); 24 | Q_EMIT clientReadData(pair, readAll()); 25 | } 26 | 27 | void TcpClient::disConnect() 28 | { 29 | ClientData pair; 30 | pair.m_clientID = m_clientID; 31 | pair.m_ip = peerAddress().toString(); 32 | pair.m_port = peerPort(); 33 | Q_EMIT clientDisConnect(pair); 34 | } 35 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/TTKBarrage.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resource/video_play.png 4 | resource/video_pause.png 5 | resource/video_volumn.png 6 | resource/video_menu.png 7 | resource/barrageStyle.png 8 | resource/on.png 9 | resource/off.png 10 | 11 | 12 | resource/color/Black.png 13 | resource/color/Blue.png 14 | resource/color/Green.png 15 | resource/color/Indigo.png 16 | resource/color/Orange.png 17 | resource/color/Origin.png 18 | resource/color/Purple.png 19 | resource/color/Red.png 20 | resource/color/White.png 21 | resource/color/Yellow.png 22 | 23 | 24 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/core/barrageanimation.cpp: -------------------------------------------------------------------------------- 1 | #include "barrageanimation.h" 2 | #include "barragecore.h" 3 | 4 | BarrageAnimation::BarrageAnimation(QObject *parent) 5 | : QPropertyAnimation(parent) 6 | { 7 | initialize(); 8 | } 9 | 10 | BarrageAnimation::BarrageAnimation(QObject *target, const QByteArray &propertyName, QObject *parent) 11 | : QPropertyAnimation(target, propertyName, parent) 12 | { 13 | initialize(); 14 | } 15 | 16 | void BarrageAnimation::animationFinished() 17 | { 18 | setDuration(TTK::random(10000) + TTK_DN_S2MS); 19 | setSize(m_parentSize); 20 | start(); 21 | } 22 | 23 | void BarrageAnimation::setSize(const QSize &size) 24 | { 25 | m_parentSize = size; 26 | int randHeight = TTK::random(size.height()); 27 | setStartValue(QPoint(0, randHeight)); 28 | setEndValue(QPoint(size.width(), randHeight)); 29 | } 30 | 31 | void BarrageAnimation::initialize() 32 | { 33 | TTK::initRandom(); 34 | setDuration(TTK::random(10000) + TTK_DN_S2MS); 35 | setEasingCurve(QEasingCurve::Linear); 36 | 37 | connect(this, SIGNAL(finished()), SLOT(animationFinished())); 38 | } 39 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "videoview.h" 5 | 6 | int main(int argc, char *argv[]) 7 | { 8 | QApplication a(argc, argv); 9 | 10 | QTranslator translator; 11 | if(!translator.load("cn.qm")) 12 | { 13 | qWarning("Load translation error"); 14 | } 15 | a.installTranslator(&translator); 16 | 17 | VideoView v; 18 | v.show(); 19 | 20 | return a.exec(); 21 | } 22 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/barrageStyle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/barrageStyle.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/color/Black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/color/Black.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/color/Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/color/Blue.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/color/Green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/color/Green.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/color/Indigo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/color/Indigo.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/color/Orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/color/Orange.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/color/Origin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/color/Origin.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/color/Purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/color/Purple.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/color/Red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/color/Red.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/color/White.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/color/White.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/color/Yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/color/Yellow.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/off.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/on.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/video_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/video_menu.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/video_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/video_pause.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/video_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/video_play.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKBarrage/resource/video_volumn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKModule/TTKText/TTKBarrage/resource/video_volumn.png -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKCaseTransform/TTKCaseTransform.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKCaseTransform 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKCaseTransform/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.toUpper("LOWER"); 10 | w.toLower("UPPER"); 11 | 12 | return a.exec(); 13 | } 14 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKCaseTransform/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | QString MainWindow::toUpper(const QString &str) 4 | { 5 | return str.toUpper(); 6 | } 7 | 8 | QString MainWindow::toLower(const QString &str) 9 | { 10 | return str.toLower(); 11 | } 12 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKCaseTransform/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include "ttkmoduleexport.h" 23 | 24 | class TTK_MODULE_EXPORT MainWindow 25 | { 26 | public: 27 | QString toUpper(const QString &str); 28 | QString toLower(const QString &str); 29 | 30 | }; 31 | 32 | #endif // MAINWINDOW_H 33 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKChardet/ascii.cpp: -------------------------------------------------------------------------------- 1 | #include "ascii.h" 2 | 3 | AsciiChecker::AsciiChecker() 4 | : AbstractChecker("ascii") 5 | { 6 | 7 | } 8 | 9 | bool AsciiChecker::detect(const string &str) const 10 | { 11 | for(unsigned char ch : qAsConst(str)) 12 | { 13 | if(ch >> 7) // whether the first bit is 1 14 | { 15 | return false; 16 | } 17 | } 18 | return true; 19 | } 20 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKChardet/ascii.h: -------------------------------------------------------------------------------- 1 | #ifndef TTKASCIICHECKER_H 2 | #define TTKASCIICHECKER_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include "checker.h" 23 | 24 | class TTK_MODULE_EXPORT AsciiChecker : public AbstractChecker 25 | { 26 | public: 27 | AsciiChecker(); 28 | 29 | virtual bool detect(const string &str) const override final; 30 | 31 | }; 32 | 33 | #endif // TTKASCIICHECKER_H 34 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKChardet/big5.h: -------------------------------------------------------------------------------- 1 | #ifndef TTKBIG5CHECKER_H 2 | #define TTKBIG5CHECKER_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include "checker.h" 23 | 24 | class TTK_MODULE_EXPORT Big5Checker : public AbstractChecker 25 | { 26 | public: 27 | Big5Checker(); 28 | 29 | virtual bool detect(const string &str) const override final; 30 | 31 | private: 32 | bool checkTwoBytes(const unsigned char *buffer) const; 33 | 34 | }; 35 | 36 | #endif // TTKBIG5CHECKER_H 37 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKChardet/checker.cpp: -------------------------------------------------------------------------------- 1 | #include "checker.h" 2 | 3 | AbstractChecker::AbstractChecker(const string &name) 4 | : m_name(name) 5 | { 6 | 7 | } 8 | 9 | AbstractChecker::~AbstractChecker() 10 | { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKChardet/gb18030.h: -------------------------------------------------------------------------------- 1 | #ifndef TTKGB18030CHECKER_H 2 | #define TTKGB18030CHECKER_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include "checker.h" 23 | 24 | class TTK_MODULE_EXPORT GB18030Checker : public AbstractChecker 25 | { 26 | public: 27 | GB18030Checker(); 28 | 29 | virtual bool detect(const string &str) const override final; 30 | 31 | }; 32 | 33 | #endif // TTKGB18030CHECKER_H 34 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKChardet/gbk.cpp: -------------------------------------------------------------------------------- 1 | #include "gbk.h" 2 | 3 | GBKChecker::GBKChecker() 4 | : AbstractChecker("gbk") 5 | { 6 | 7 | } 8 | 9 | bool GBKChecker::detect(const string &str) const 10 | { 11 | int index = -1; 12 | int length = TTKStaticCast(int, str.length()); 13 | const unsigned char* buffer = (const unsigned char*)str.c_str(); 14 | while(index + 1 < length) 15 | { 16 | if(*buffer <= 0x7F) 17 | { 18 | index += 1; 19 | buffer += 1; 20 | } 21 | 22 | if(checkTwoBytes(buffer)) 23 | { 24 | index += 2; 25 | buffer += 2; 26 | } 27 | else 28 | { 29 | break; 30 | } 31 | } 32 | return index + 1 == length; 33 | } 34 | 35 | bool GBKChecker::checkTwoBytes(const unsigned char *buffer) const 36 | { 37 | bool fValid = (*buffer >= 0x81 && *buffer <= 0xFE); 38 | ++buffer; 39 | bool sValid = (*buffer >= 40 && *buffer <= 0xFE && *buffer != 0x7F); 40 | return fValid && sValid; 41 | } 42 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKChardet/gbk.h: -------------------------------------------------------------------------------- 1 | #ifndef TTKGBKCHECKER_H 2 | #define TTKGBKCHECKER_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include "checker.h" 23 | 24 | class TTK_MODULE_EXPORT GBKChecker : public AbstractChecker 25 | { 26 | public: 27 | GBKChecker(); 28 | 29 | virtual bool detect(const string &str) const override final; 30 | 31 | private: 32 | bool checkTwoBytes(const unsigned char *buffer) const; 33 | 34 | }; 35 | 36 | #endif // TTKGBKCHECKER_H 37 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKChardet/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "checkerhelper.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QCoreApplication a(argc, argv); 7 | 8 | CheckerHelper helper; 9 | helper.detect("Test"); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKChardet/shiftjis.h: -------------------------------------------------------------------------------- 1 | #ifndef TTKSHIFTJISCHECKER_H 2 | #define TTKSHIFTJISCHECKER_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include "checker.h" 23 | 24 | class TTK_MODULE_EXPORT ShiftJISChecker : public AbstractChecker 25 | { 26 | public: 27 | ShiftJISChecker(); 28 | 29 | virtual bool detect(const string &str) const override final; 30 | 31 | }; 32 | 33 | #endif // TTKSHIFTJISCHECKER_H 34 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKChardet/utf8.h: -------------------------------------------------------------------------------- 1 | #ifndef TTKUTF8CHECKER_H 2 | #define TTKUTF8CHECKER_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include "checker.h" 23 | 24 | class TTK_MODULE_EXPORT UTF8Checker : public AbstractChecker 25 | { 26 | public: 27 | UTF8Checker(); 28 | 29 | virtual bool detect(const string &str) const override final; 30 | 31 | }; 32 | 33 | #endif // UTF8CHECKER_H 34 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKChinese2Pinyin/TTKChinese2Pinyin.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resource/single_pinyin 4 | resource/mutil_pinyin 5 | resource/pinyin 6 | 7 | 8 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKChinese2Pinyin/main.cpp: -------------------------------------------------------------------------------- 1 | #include "pinyinhelper.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | PinyinHelper pinyin; 9 | qDebug() << pinyin.convertToPinyinString("我们", TTK_SPACE); 10 | 11 | ChineseHelper chinese; 12 | qDebug() << chinese.convertToTraditionalChinese("我们"); 13 | 14 | return a.exec(); 15 | } 16 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKChinese2Pinyin/pinyinresource.cpp: -------------------------------------------------------------------------------- 1 | #include "pinyinresource.h" 2 | 3 | #include 4 | #include 5 | 6 | TTKStringMap PinyinResource::pinyinResource() 7 | { 8 | return resource(":/data/pinyin"); 9 | } 10 | 11 | TTKStringMap PinyinResource::mutilPinyinResource() 12 | { 13 | return resource(":/data/mutil_pinyin"); 14 | } 15 | 16 | TTKStringMap PinyinResource::chineseResource() 17 | { 18 | return resource(":/data/single_pinyin"); 19 | } 20 | 21 | TTKStringMap PinyinResource::resource(const QString &resourceName) 22 | { 23 | TTKStringMap map; 24 | QFile file(resourceName); 25 | if(!file.open(QIODevice::ReadOnly)) 26 | { 27 | return map; 28 | } 29 | 30 | QTextStream in(&file); 31 | #if TTK_QT_VERSION_CHECK(6,0,0) 32 | in.setEncoding(QStringConverter::Utf8); 33 | #else 34 | in.setCodec("UTF-8"); 35 | #endif 36 | 37 | QString line; 38 | while(!(line = in.readLine()).isEmpty()) 39 | { 40 | const QStringList &tokens = line.trimmed().split("="); 41 | if(tokens.count() >= 2) 42 | { 43 | map.insert(tokens[0], tokens[1]); 44 | } 45 | } 46 | 47 | file.close(); 48 | return map; 49 | } 50 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKCodeCount/TTKCodeCount.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKCodeCount 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | 29 | FORMS += $$PWD/mainwindow.ui 30 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKCodeCount/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.show(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKCodeLines/TTKCodeLines.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKCodeLines 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKCodeLines/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.codeLines({}); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKCodeLines/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include "ttkmoduleexport.h" 23 | 24 | class TTK_MODULE_EXPORT MainWindow 25 | { 26 | public: 27 | void codeLines(const QString &path); 28 | 29 | }; 30 | 31 | #endif // MAINWINDOW_H 32 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKHashTransform/TTKHashTransform.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKHash16Transform 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKHashTransform/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.setSource("Test"); 10 | w.calculateMD5(); 11 | 12 | return a.exec(); 13 | } 14 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKRandomPassword/TTKRandomPassword.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKRandomPassword 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKRandomPassword/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.randomPassword(16, true, true, true); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKRandomPassword/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | #include 4 | 5 | MainWindow::MainWindow() 6 | { 7 | srand(QDateTime::currentMSecsSinceEpoch()); 8 | } 9 | 10 | QString MainWindow::randomPassword(const int length, const bool number, const bool english, const bool caseSensitive) 11 | { 12 | QString password; 13 | QString table; 14 | 15 | const QString numberTable = "0123456789"; 16 | const QString lowercaseCharacters = "abcdefghijklmnopqrstuvwxyz"; 17 | const QString upperCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 18 | 19 | if(number) 20 | { 21 | table += numberTable; 22 | } 23 | 24 | if(english) 25 | { 26 | if(caseSensitive) 27 | { 28 | table += lowercaseCharacters; 29 | table += upperCharacters; 30 | } 31 | else 32 | { 33 | table += lowercaseCharacters; 34 | } 35 | } 36 | 37 | if(table.isEmpty()) 38 | { 39 | return {}; 40 | } 41 | 42 | for(int index = 0; index < length; ++index) 43 | { 44 | password += table.at(rand() % table.length()); 45 | } 46 | 47 | return password; 48 | } 49 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKRandomPassword/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include "ttkmoduleexport.h" 23 | 24 | class TTK_MODULE_EXPORT MainWindow 25 | { 26 | public: 27 | MainWindow(); 28 | 29 | QString randomPassword(const int length, const bool number, const bool english, const bool caseSensitive); 30 | 31 | }; 32 | 33 | #endif // MAINWINDOW_H 34 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKRandomUuid/TTKRandomUuid.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKRandomUuid 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKRandomUuid/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.encode("Test"); 10 | w.decode("Test"); 11 | 12 | return a.exec(); 13 | } 14 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKRandomUuid/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | #include 4 | 5 | QString MainWindow::encode(const QString &str) 6 | { 7 | return QUrl::toPercentEncoding(str, "/:?=&%"); 8 | } 9 | 10 | QString MainWindow::decode(const QString &str) 11 | { 12 | return QUrl::fromPercentEncoding(str.toUtf8()); 13 | } 14 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKRandomUuid/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include "ttkmoduleexport.h" 23 | 24 | class TTK_MODULE_EXPORT MainWindow 25 | { 26 | public: 27 | QString encode(const QString &str); 28 | QString decode(const QString &str); 29 | 30 | }; 31 | 32 | #endif // MAINWINDOW_H 33 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKTimestampTransform/TTKTimestampTransform.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKTimestampTransform 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKTimestampTransform/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.currentDateTime(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKTimestampTransform/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | #include 4 | 5 | QString MainWindow::currentDateTime() 6 | { 7 | return QString::number(QDateTime::currentDateTime().toMSecsSinceEpoch() * 1000); 8 | } 9 | 10 | QString MainWindow::fromString(const QString &stamp) 11 | { 12 | if(stamp.length() == 13) 13 | { 14 | return QDateTime::fromMSecsSinceEpoch(stamp.toLongLong()).toString(TTK_DATE_TIMES_FORMAT); 15 | } 16 | else if(stamp.length() == 10) 17 | { 18 | return QDateTime::fromMSecsSinceEpoch(stamp.toInt() * 1000).toString(TTK_DATE_TIMES_FORMAT); 19 | } 20 | return {}; 21 | } 22 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKTimestampTransform/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include "ttkmoduleexport.h" 23 | 24 | class TTK_MODULE_EXPORT MainWindow 25 | { 26 | public: 27 | QString currentDateTime(); 28 | QString fromString(const QString &stamp); 29 | 30 | }; 31 | 32 | #endif // MAINWINDOW_H 33 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKUrlEncode/TTKUrlEncode.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKUrlEncode 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKUrlEncode/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.generateUUID(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKUrlEncode/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | #include 4 | 5 | QString MainWindow::generateUUID() 6 | { 7 | return QUuid::createUuid().toString().mid(1, 36); 8 | } 9 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKUrlEncode/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include "ttkmoduleexport.h" 23 | 24 | class TTK_MODULE_EXPORT MainWindow 25 | { 26 | public: 27 | QString generateUUID(); 28 | 29 | }; 30 | 31 | #endif // MAINWINDOW_H 32 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKUtf16Transform/TTKUtf16Transform.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKUtf16Transform 22 | 23 | HEADERS += $$PWD/mainwindow.h 24 | 25 | SOURCES += \ 26 | $$PWD/main.cpp \ 27 | $$PWD/mainwindow.cpp 28 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKUtf16Transform/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.toUtf16("Test"); 10 | w.fromUtf16("Test"); 11 | 12 | return a.exec(); 13 | } 14 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKUtf16Transform/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | QString MainWindow::toUtf16(const QString &str) 4 | { 5 | QString target; 6 | for(const QChar &c : qAsConst(str)) 7 | { 8 | if(c.unicode() > 0xff) 9 | { 10 | target += "\\u"; 11 | target += QString::number(c.unicode(), 16).toUpper().rightJustified(4, '0'); 12 | } 13 | else 14 | { 15 | target += c; 16 | } 17 | } 18 | 19 | return target; 20 | } 21 | 22 | QString MainWindow::fromUtf16(const QString &str) 23 | { 24 | QString source = str; 25 | QString target; 26 | while(!source.isEmpty()) 27 | { 28 | if((source.length() >= 6) && source.startsWith("\\u")) 29 | { 30 | target += QChar(ushort(source.mid(2, 4).toUShort(nullptr, 16))); 31 | source.remove(0, 6); 32 | } 33 | else 34 | { 35 | target += source.at(0); 36 | source.remove(0, 1); 37 | } 38 | } 39 | 40 | return target; 41 | } 42 | -------------------------------------------------------------------------------- /TTKModule/TTKText/TTKUtf16Transform/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | /*************************************************************************** 5 | * This file is part of the TTK Tiny Tools project 6 | * Copyright (C) 2015 - 2025 Greedysky Studio 7 | 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | 18 | * You should have received a copy of the GNU Lesser General Public License along 19 | * with this program; If not, see . 20 | ***************************************************************************/ 21 | 22 | #include "ttkmoduleexport.h" 23 | 24 | class TTK_MODULE_EXPORT MainWindow 25 | { 26 | public: 27 | QString toUtf16(const QString &str); 28 | QString fromUtf16(const QString &str); 29 | 30 | }; 31 | 32 | #endif // MAINWINDOW_H 33 | -------------------------------------------------------------------------------- /TTKModule/TTKTools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | cmake_minimum_required(VERSION 3.0.0) 20 | 21 | add_subdirectory(TTKCPUMemery) 22 | -------------------------------------------------------------------------------- /TTKModule/TTKTools/TTKCPUMemery/TTKCPUMemery.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | include($$PWD/../../../TTKTinyTools.pri) 20 | 21 | TARGET = TTKCPUMemery 22 | 23 | HEADERS += \ 24 | $$PWD/mainwindow.h \ 25 | $$PWD/showcpumemory.h \ 26 | $$PWD/showdevicesize.h 27 | 28 | SOURCES += \ 29 | $$PWD/main.cpp \ 30 | $$PWD/mainwindow.cpp \ 31 | $$PWD/showcpumemory.cpp \ 32 | $$PWD/showdevicesize.cpp 33 | 34 | FORMS += $$PWD/mainwindow.ui 35 | -------------------------------------------------------------------------------- /TTKModule/TTKTools/TTKCPUMemery/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mainwindow.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | 8 | MainWindow w; 9 | w.show(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /TTKModule/TTKTools/TTKCPUMemery/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ui_mainwindow.h" 3 | #include "showcpumemory.h" 4 | #include "showdevicesize.h" 5 | 6 | MainWindow::MainWindow(QWidget *parent) 7 | : QWidget(parent), 8 | m_ui(new Ui::MainWindow) 9 | { 10 | m_ui->setupUi(this); 11 | initialize(); 12 | } 13 | 14 | MainWindow::~MainWindow() 15 | { 16 | delete m_ui; 17 | } 18 | 19 | void MainWindow::initialize() 20 | { 21 | ShowCPUMemory *showCPUMemory = new ShowCPUMemory(this); 22 | showCPUMemory->setLab(m_ui->labCPUMemory); 23 | showCPUMemory->start(1000); 24 | 25 | ShowDeviceSize::instance()->setTableWidget(m_ui->tableWidget); 26 | ShowDeviceSize::instance()->load(); 27 | } 28 | -------------------------------------------------------------------------------- /TTKModule/TTKTools/TTKCPUMemery/mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 600 10 | 300 11 | 12 | 13 | 14 | TTKCPUMemery 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | CPU : 0% 内存 : 0% ( 已用 0 MB / 共 0 MB ) 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /TTKModule/TTKTools/TTKTools.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | TEMPLATE = subdirs 20 | CONFIG += ordered 21 | SUBDIRS += TTKCPUMemery 22 | -------------------------------------------------------------------------------- /TTKResource/lb_app_logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKResource/lb_app_logo.ico -------------------------------------------------------------------------------- /TTKResource/logo_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKResource/logo_banner.png -------------------------------------------------------------------------------- /TTKThirdParty/TTKThirdParty.pri: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | INCLUDEPATH += \ 20 | $$PWD \ 21 | $$PWD/qrencode \ 22 | $$PWD/zxing 23 | -------------------------------------------------------------------------------- /TTKThirdParty/TTKThirdParty.rc: -------------------------------------------------------------------------------- 1 | #if defined(UNDER_CE) 2 | include 3 | #else 4 | #include 5 | #endif 6 | #include "../TTKCommon/ttkversion.h" 7 | 8 | VS_VERSION_INFO VERSIONINFO 9 | FILEVERSION TTK_RC_FILEVERSION 10 | PRODUCTVERSION TTK_RC_FILEVERSION 11 | FILEFLAGSMASK 0x3fL 12 | 13 | #ifdef _DEBUG 14 | FILEFLAGS VS_FF_DEBUG 15 | #else 16 | FILEFLAGS 0x0L 17 | #endif 18 | 19 | FILEOS VOS__WINDOWS32 20 | FILETYPE VFT_DLL 21 | FILESUBTYPE 0x0L 22 | BEGIN 23 | BLOCK "StringFileInfo" 24 | BEGIN 25 | BLOCK "080404b0" 26 | BEGIN 27 | VALUE "CompanyName", TTK_RC_COMPANY 28 | VALUE "FileDescription", "TTKThirdParty" 29 | VALUE "FileVersion", TTK_RC_PRODUCTVERSION 30 | VALUE "LegalCopyright", TTK_RC_COPYRIGHT 31 | VALUE "ProductName", "TTKThirdParty" 32 | VALUE "ProductVersion", TTK_RC_PRODUCTVERSION 33 | END 34 | END 35 | BLOCK "VarFileInfo" 36 | BEGIN 37 | VALUE "Translation", 0x804, 1200 38 | END 39 | END 40 | -------------------------------------------------------------------------------- /TTKThirdParty/qrencode/README.txt: -------------------------------------------------------------------------------- 1 | https://github.com/fukuchi/libqrencode -------------------------------------------------------------------------------- /TTKThirdParty/qrencode/global.h: -------------------------------------------------------------------------------- 1 | /* 2 | * qrencode - QR Code encoder 3 | * 4 | * Reed solomon encoder. This code is taken from Phil Karn's libfec then 5 | * editted and packed into a pair of .c and .h files. 6 | * 7 | * Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q 8 | * (libfec is released under the GNU Lesser General Public License.) 9 | * 10 | * Copyright (C) 2006-2011 Kentaro Fukuchi 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or any later version. 16 | * 17 | * This library is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | * Lesser General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Lesser General Public 23 | * License along with this library; if not, write to the Free Software 24 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 25 | */ 26 | 27 | #ifndef GLOBAL_H 28 | #define GLOBAL_H 29 | 30 | #ifdef _WIN32 31 | #define EXTRAS_EXPORT __declspec(dllexport) 32 | #else 33 | #define EXTRAS_EXPORT 34 | #endif 35 | 36 | #endif /* GLOBAL_H */ 37 | -------------------------------------------------------------------------------- /TTKThirdParty/qrencode/rsecc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * qrencode - QR Code encoder 3 | * 4 | * Reed solomon error correction code encoder specialized for QR code. 5 | * This code is rewritten by Kentaro Fukuchi, referring to the FEC library 6 | * developed by Phil Karn (KA9Q). 7 | * 8 | * Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q 9 | * Copyright (C) 2014-2017 Kentaro Fukuchi 10 | * 11 | * This library is free software; you can redistribute it and/or 12 | * modify it under the terms of the GNU Lesser General Public 13 | * License as published by the Free Software Foundation; either 14 | * version 2.1 of the License, or any later version. 15 | * 16 | * This library is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public 22 | * License along with this library; if not, write to the Free Software 23 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 24 | */ 25 | 26 | #ifndef RSECC_H 27 | #define RSECC_H 28 | 29 | #include "global.h" 30 | 31 | extern EXTRAS_EXPORT int RSECC_encode(size_t data_length, size_t ecc_length, const unsigned char *data, unsigned char *ecc); 32 | 33 | #endif /* RSECC_H */ 34 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/bigint/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | sample 3 | testsuite 4 | testsuite.expected 5 | testsuite.out 6 | testsuite.err 7 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/bigint/BigIntegerAlgorithms.hh: -------------------------------------------------------------------------------- 1 | #ifndef BIGINTEGERALGORITHMS_H 2 | #define BIGINTEGERALGORITHMS_H 3 | 4 | #include "BigInteger.hh" 5 | 6 | /* Some mathematical algorithms for big integers. 7 | * This code is new and, as such, experimental. */ 8 | 9 | // Returns the greatest common divisor of a and b. 10 | BigUnsigned gcd(BigUnsigned a, BigUnsigned b); 11 | 12 | /* Extended Euclidean algorithm. 13 | * Given m and n, finds gcd g and numbers r, s such that r*m + s*n == g. */ 14 | void extendedEuclidean(BigInteger m, BigInteger n, 15 | BigInteger &g, BigInteger &r, BigInteger &s); 16 | 17 | /* Returns the multiplicative inverse of x modulo n, or throws an exception if 18 | * they have a common factor. */ 19 | BigUnsigned modinv(const BigInteger &x, const BigUnsigned &n); 20 | 21 | // Returns (base ^ exponent) % modulus. 22 | BigUnsigned modexp(const BigInteger &base, const BigUnsigned &exponent, 23 | const BigUnsigned &modulus); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/bigint/BigIntegerLibrary.hh: -------------------------------------------------------------------------------- 1 | // This header file includes all of the library header files. 2 | 3 | #include "NumberlikeArray.hh" 4 | #include "BigUnsigned.hh" 5 | #include "BigInteger.hh" 6 | #include "BigIntegerAlgorithms.hh" 7 | #include "BigUnsignedInABase.hh" 8 | #include "BigIntegerUtils.hh" 9 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/win32/zxing/iconv.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIBICONV_H 2 | #define _LIBICONV_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | typedef void* iconv_t; 8 | iconv_t iconv_open(const char *tocode, const char *fromcode); 9 | int iconv_close(iconv_t cd); 10 | size_t iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif//_LIBICONV_H -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/BarcodeFormat.cpp: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | /* 3 | * Created by Christian Brunschen on 13/05/2008. 4 | * Copyright 2008 ZXing authors All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | #include 20 | 21 | const char* zxing::BarcodeFormat::barcodeFormatNames[] = { 22 | 0, 23 | "AZTEC", 24 | "CODABAR", 25 | "CODE_39", 26 | "CODE_93", 27 | "CODE_128", 28 | "DATA_MATRIX", 29 | "EAN_8", 30 | "EAN_13", 31 | "ITF", 32 | "MAXICODE", 33 | "PDF_417", 34 | "QR_CODE", 35 | "RSS_14", 36 | "RSS_EXPANDED", 37 | "UPC_A", 38 | "UPC_E", 39 | "UPC_EAN_EXTENSION" 40 | }; 41 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/Binarizer.cpp: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | /* 3 | * Binarizer.cpp 4 | * zxing 5 | * 6 | * Created by Ralf Kistner on 16/10/2009. 7 | * Copyright 2008 ZXing authors All rights reserved. 8 | * Modified by Lukasz Warchol on 02/02/2010. 9 | * 10 | * Licensed under the Apache License, Version 2.0 (the "License"); 11 | * you may not use this file except in compliance with the License. 12 | * You may obtain a copy of the License at 13 | * 14 | * http://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, software 17 | * distributed under the License is distributed on an "AS IS" BASIS, 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | * See the License for the specific language governing permissions and 20 | * limitations under the License. 21 | */ 22 | 23 | #include 24 | 25 | namespace zxing { 26 | 27 | Binarizer::Binarizer(Ref source) : source_(source) { 28 | } 29 | 30 | Binarizer::~Binarizer() { 31 | } 32 | 33 | Ref Binarizer::getLuminanceSource() const { 34 | return source_; 35 | } 36 | 37 | int Binarizer::getWidth() const { 38 | return source_->getWidth(); 39 | } 40 | 41 | int Binarizer::getHeight() const { 42 | return source_->getHeight(); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/ChecksumException.cpp: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | /* 3 | * ChecksumException.cpp 4 | * zxing 5 | * 6 | * Created by Christian Brunschen on 13/05/2008. 7 | * Copyright 2008 ZXing authors All rights reserved. 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #include 23 | 24 | using zxing::ChecksumException; 25 | 26 | ChecksumException::ChecksumException() throw() {} 27 | ChecksumException::ChecksumException(const char *msg) throw() : ReaderException(msg) {} 28 | ChecksumException::~ChecksumException() throw() {} 29 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/ChecksumException.h: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | 3 | #ifndef __CHECKSUM_EXCEPTION_H__ 4 | #define __CHECKSUM_EXCEPTION_H__ 5 | 6 | /* 7 | * Copyright 20011 ZXing authors 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #include 23 | 24 | namespace zxing { 25 | class ChecksumException : public ReaderException { 26 | typedef ReaderException Base; 27 | public: 28 | ChecksumException() throw(); 29 | ChecksumException(const char *msg) throw(); 30 | ~ChecksumException() throw(); 31 | }; 32 | } 33 | 34 | #endif // __CHECKSUM_EXCEPTION_H__ 35 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/Exception.cpp: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | /* 3 | * Exception.cpp 4 | * ZXing 5 | * 6 | * Created by Christian Brunschen on 03/06/2008. 7 | * Copyright 2008-2011 ZXing authors All rights reserved. 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | 21 | */ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | using zxing::Exception; 28 | 29 | void Exception::deleteMessage() { 30 | delete [] message; 31 | } 32 | 33 | char const* Exception::copy(char const* msg) { 34 | char* message = 0; 35 | if (msg) { 36 | int l = static_cast(strlen(msg)+1); 37 | if (l) { 38 | message = new char[l]; 39 | strcpy(message, msg); 40 | } 41 | } 42 | return message; 43 | } 44 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/FormatException.cpp: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | /* 3 | * FormatException.cpp 4 | * zxing 5 | * 6 | * Created by Christian Brunschen on 13/05/2008. 7 | * Copyright 2008 ZXing authors All rights reserved. 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #include 23 | 24 | namespace zxing { 25 | 26 | FormatException::FormatException() {} 27 | 28 | FormatException::FormatException(const char *msg) : 29 | ReaderException(msg) { 30 | } 31 | 32 | FormatException::~FormatException() throw() { 33 | } 34 | 35 | FormatException const& 36 | FormatException::getFormatInstance() { 37 | static FormatException instance; 38 | return instance; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/FormatException.h: -------------------------------------------------------------------------------- 1 | #ifndef __FORMAT_EXCEPTION_H__ 2 | #define __FORMAT_EXCEPTION_H__ 3 | 4 | /* 5 | * FormatException.h 6 | * zxing 7 | * 8 | * Copyright 2010 ZXing authors All rights reserved. 9 | * 10 | * Licensed under the Apache License, Version 2.0 (the "License"); 11 | * you may not use this file except in compliance with the License. 12 | * You may obtain a copy of the License at 13 | * 14 | * http://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, software 17 | * distributed under the License is distributed on an "AS IS" BASIS, 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | * See the License for the specific language governing permissions and 20 | * limitations under the License. 21 | */ 22 | 23 | #include 24 | 25 | namespace zxing { 26 | 27 | class FormatException : public ReaderException { 28 | public: 29 | FormatException(); 30 | FormatException(const char *msg); 31 | ~FormatException() throw(); 32 | 33 | static FormatException const& getFormatInstance(); 34 | }; 35 | 36 | } 37 | #endif // __FORMAT_EXCEPTION_H__ 38 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/IllegalStateException.h: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | 3 | #ifndef __ILLEGAL_STATE_EXCEPTION_H__ 4 | #define __ILLEGAL_STATE_EXCEPTION_H__ 5 | 6 | /* 7 | * Copyright 20011 ZXing authors 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may illegal use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #include 23 | 24 | namespace zxing { 25 | 26 | class IllegalStateException : public ReaderException { 27 | public: 28 | IllegalStateException() throw() {} 29 | IllegalStateException(const char *msg) throw() : ReaderException(msg) {} 30 | ~IllegalStateException() throw() {} 31 | }; 32 | 33 | } 34 | 35 | #endif // __ILLEGAL_STATE_EXCEPTION_H__ 36 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/NotFoundException.h: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | 3 | #ifndef __NOT_FOUND_EXCEPTION_H__ 4 | #define __NOT_FOUND_EXCEPTION_H__ 5 | 6 | /* 7 | * Copyright 20011 ZXing authors 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #include 23 | 24 | namespace zxing { 25 | 26 | class NotFoundException : public ReaderException { 27 | public: 28 | NotFoundException() throw() {} 29 | NotFoundException(const char *msg) throw() : ReaderException(msg) {} 30 | ~NotFoundException() throw() {} 31 | }; 32 | 33 | } 34 | 35 | #endif // __NOT_FOUND_EXCEPTION_H__ 36 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/Reader.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Reader.cpp 3 | * zxing 4 | * 5 | * Created by Christian Brunschen on 13/05/2008. 6 | * Copyright 2008 ZXing authors All rights reserved. 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #include 22 | 23 | namespace zxing { 24 | 25 | Reader::~Reader() { } 26 | 27 | Ref Reader::decode(Ref image) { 28 | return decode(image, DecodeHints::DEFAULT_HINT); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/Reader.h: -------------------------------------------------------------------------------- 1 | #ifndef __READER_H__ 2 | #define __READER_H__ 3 | 4 | /* 5 | * Reader.h 6 | * zxing 7 | * 8 | * Copyright 2010 ZXing authors All rights reserved. 9 | * 10 | * Licensed under the Apache License, Version 2.0 (the "License"); 11 | * you may not use this file except in compliance with the License. 12 | * You may obtain a copy of the License at 13 | * 14 | * http://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, software 17 | * distributed under the License is distributed on an "AS IS" BASIS, 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | * See the License for the specific language governing permissions and 20 | * limitations under the License. 21 | */ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | namespace zxing { 28 | 29 | class TTK_MODULE_EXPORT Reader : public Counted { 30 | protected: 31 | Reader() {} 32 | public: 33 | virtual Ref decode(Ref image); 34 | virtual Ref decode(Ref image, DecodeHints hints) = 0; 35 | virtual ~Reader(); 36 | }; 37 | 38 | } 39 | 40 | #endif // __READER_H__ 41 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/ReaderException.h: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | #ifndef __READER_EXCEPTION_H__ 3 | #define __READER_EXCEPTION_H__ 4 | 5 | /* 6 | * ReaderException.h 7 | * zxing 8 | * 9 | * Copyright 2010 ZXing authors All rights reserved. 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #include 25 | 26 | namespace zxing { 27 | 28 | class ReaderException : public Exception { 29 | public: 30 | ReaderException() throw() {} 31 | ReaderException(char const* msg) throw() : Exception(msg) {} 32 | ~ReaderException() throw() {} 33 | }; 34 | 35 | } 36 | 37 | #endif // __READER_EXCEPTION_H__ 38 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/ResultIO.cpp: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | /* 3 | * ResultIO.cpp 4 | * zxing 5 | * 6 | * Created by Christian Brunschen on 13/05/2008. 7 | * Copyright 2008 ZXing authors All rights reserved. 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #include 23 | 24 | using zxing::Result; 25 | using std::ostream; 26 | 27 | ostream& zxing::operator<<(ostream &out, Result& result) { 28 | if (result.text_ != 0) { 29 | out << result.text_->getText(); 30 | } else { 31 | out << "[" << result.rawBytes_->size() << " bytes]"; 32 | } 33 | return out; 34 | } 35 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/ResultPointCallback.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ResultPointCallback.cpp 3 | * zxing 4 | * 5 | * Copyright 2010 ZXing authors All rights reserved. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #include 21 | 22 | namespace zxing { 23 | 24 | ResultPointCallback::~ResultPointCallback() {} 25 | 26 | } 27 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/ResultPointCallback.h: -------------------------------------------------------------------------------- 1 | #ifndef __RESULT_POINT_CALLBACK_H__ 2 | #define __RESULT_POINT_CALLBACK_H__ 3 | 4 | /* 5 | * ResultPointCallback.h 6 | * zxing 7 | * 8 | * Copyright 2010 ZXing authors All rights reserved. 9 | * 10 | * Licensed under the Apache License, Version 2.0 (the "License"); 11 | * you may not use this file except in compliance with the License. 12 | * You may obtain a copy of the License at 13 | * 14 | * http://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, software 17 | * distributed under the License is distributed on an "AS IS" BASIS, 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | * See the License for the specific language governing permissions and 20 | * limitations under the License. 21 | */ 22 | 23 | #include 24 | 25 | namespace zxing { 26 | 27 | class ResultPoint; 28 | 29 | class TTK_MODULE_EXPORT ResultPointCallback : public Counted { 30 | protected: 31 | ResultPointCallback() {} 32 | public: 33 | virtual void foundPossibleResultPoint(ResultPoint const& point) = 0; 34 | virtual ~ResultPointCallback(); 35 | }; 36 | 37 | } 38 | 39 | #endif // __RESULT_POINT_CALLBACK_H__ 40 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/common/BitArrayIO.cpp: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | /* 3 | * Copyright 2010 ZXing authors. All rights reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #include 19 | 20 | using zxing::BitArray; 21 | using std::ostream; 22 | 23 | ostream& zxing::operator << (ostream& os, BitArray const& ba) { 24 | for (int i = 0, size = ba.getSize(); i < size; i++) { 25 | if ((i & 0x07) == 0) { 26 | os << ' '; 27 | } 28 | os << (ba.get(i) ? 'X' : '.'); 29 | } 30 | return os; 31 | } 32 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/common/DetectorResult.cpp: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | /* 3 | * DetectorResult.cpp 4 | * zxing 5 | * 6 | * Created by Christian Brunschen on 14/05/2008. 7 | * Copyright 2008 ZXing authors All rights reserved. 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #include 23 | 24 | namespace zxing { 25 | 26 | DetectorResult::DetectorResult(Ref bits, 27 | ArrayRef< Ref > points) 28 | : bits_(bits), points_(points) { 29 | } 30 | 31 | Ref DetectorResult::getBits() { 32 | return bits_; 33 | } 34 | 35 | ArrayRef< Ref > DetectorResult::getPoints() { 36 | return points_; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/common/DetectorResult.h: -------------------------------------------------------------------------------- 1 | #ifndef __DETECTOR_RESULT_H__ 2 | #define __DETECTOR_RESULT_H__ 3 | 4 | /* 5 | * DetectorResult.h 6 | * zxing 7 | * 8 | * Copyright 2010 ZXing authors All rights reserved. 9 | * 10 | * Licensed under the Apache License, Version 2.0 (the "License"); 11 | * you may not use this file except in compliance with the License. 12 | * You may obtain a copy of the License at 13 | * 14 | * http://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, software 17 | * distributed under the License is distributed on an "AS IS" BASIS, 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | * See the License for the specific language governing permissions and 20 | * limitations under the License. 21 | */ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | namespace zxing { 29 | 30 | class DetectorResult : public Counted { 31 | private: 32 | Ref bits_; 33 | ArrayRef< Ref > points_; 34 | 35 | public: 36 | DetectorResult(Ref bits, ArrayRef< Ref > points); 37 | Ref getBits(); 38 | ArrayRef< Ref > getPoints(); 39 | }; 40 | 41 | } 42 | 43 | #endif // __DETECTOR_RESULT_H__ 44 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/common/IllegalArgumentException.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * IllegalArgumentException.cpp 3 | * zxing 4 | * 5 | * Created by Christian Brunschen on 06/05/2008. 6 | * Copyright 2008 Google UK. All rights reserved. 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #include 22 | 23 | using zxing::IllegalArgumentException; 24 | 25 | IllegalArgumentException::IllegalArgumentException() : Exception() {} 26 | IllegalArgumentException::IllegalArgumentException(const char *msg) : Exception(msg) {} 27 | IllegalArgumentException::~IllegalArgumentException() throw() {} 28 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/common/IllegalArgumentException.h: -------------------------------------------------------------------------------- 1 | #ifndef __ILLEGAL_ARGUMENT_EXCEPTION_H__ 2 | #define __ILLEGAL_ARGUMENT_EXCEPTION_H__ 3 | 4 | /* 5 | * IllegalArgumentException.h 6 | * zxing 7 | * 8 | * Copyright 2010 ZXing authors All rights reserved. 9 | * 10 | * Licensed under the Apache License, Version 2.0 (the "License"); 11 | * you may not use this file except in compliance with the License. 12 | * You may obtain a copy of the License at 13 | * 14 | * http://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, software 17 | * distributed under the License is distributed on an "AS IS" BASIS, 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | * See the License for the specific language governing permissions and 20 | * limitations under the License. 21 | */ 22 | 23 | #include 24 | 25 | namespace zxing { 26 | 27 | class IllegalArgumentException : public Exception { 28 | public: 29 | IllegalArgumentException(); 30 | IllegalArgumentException(const char *msg); 31 | ~IllegalArgumentException() throw(); 32 | }; 33 | 34 | } 35 | 36 | #endif // __ILLEGAL_ARGUMENT_EXCEPTION_H__ 37 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/common/Point.h: -------------------------------------------------------------------------------- 1 | #ifndef __POINT_H__ 2 | #define __POINT_H__ 3 | 4 | /* 5 | * Point.h 6 | * zxing 7 | * 8 | * Copyright 2010 ZXing authors All rights reserved. 9 | * 10 | * Licensed under the Apache License, Version 2.0 (the "License"); 11 | * you may not use this file except in compliance with the License. 12 | * You may obtain a copy of the License at 13 | * 14 | * http://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, software 17 | * distributed under the License is distributed on an "AS IS" BASIS, 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | * See the License for the specific language governing permissions and 20 | * limitations under the License. 21 | */ 22 | 23 | namespace zxing { 24 | class PointI { 25 | public: 26 | int x; 27 | int y; 28 | }; 29 | 30 | class Point { 31 | public: 32 | Point() : x(0.0f), y(0.0f) {}; 33 | Point(float x_, float y_) : x(x_), y(y_) {}; 34 | 35 | float x; 36 | float y; 37 | }; 38 | 39 | class Line { 40 | public: 41 | Line(Point start_, Point end_) : start(start_), end(end_) {}; 42 | 43 | Point start; 44 | Point end; 45 | }; 46 | } 47 | #endif // POINT_H_ 48 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/common/detector/JavaMath.h: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | #ifndef __ZXING_COMMON_DETECTOR_MATH_H__ 3 | #define __ZXING_COMMON_DETECTOR_MATH_H__ 4 | /* 5 | * Copyright 2012 ZXing authors All rights reserved. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #include 21 | 22 | namespace zxing { 23 | namespace common { 24 | namespace detector { 25 | 26 | class Math { 27 | private: 28 | Math(); 29 | ~Math(); 30 | public: 31 | 32 | // Java standard Math.round 33 | static inline int round(float a) { 34 | return (int)std::floor(a +0.5f); 35 | } 36 | 37 | }; 38 | 39 | } 40 | } 41 | } 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/common/reedsolomon/ReedSolomonException.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ReedSolomonException.cpp 3 | * zxing 4 | * 5 | * Created by Christian Brunschen on 06/05/2008. 6 | * Copyright 2008 Google UK. All rights reserved. 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #include 22 | 23 | namespace zxing { 24 | ReedSolomonException::ReedSolomonException(const char *msg) throw() : 25 | Exception(msg) { 26 | } 27 | ReedSolomonException::~ReedSolomonException() throw() { 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/common/reedsolomon/ReedSolomonException.h: -------------------------------------------------------------------------------- 1 | #ifndef __REED_SOLOMON_EXCEPTION_H__ 2 | #define __REED_SOLOMON_EXCEPTION_H__ 3 | 4 | /* 5 | * ReedSolomonException.h 6 | * zxing 7 | * 8 | * Copyright 2010 ZXing authors All rights reserved. 9 | * 10 | * Licensed under the Apache License, Version 2.0 (the "License"); 11 | * you may not use this file except in compliance with the License. 12 | * You may obtain a copy of the License at 13 | * 14 | * http://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, software 17 | * distributed under the License is distributed on an "AS IS" BASIS, 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | * See the License for the specific language governing permissions and 20 | * limitations under the License. 21 | */ 22 | 23 | #include 24 | 25 | namespace zxing { 26 | class ReedSolomonException : public Exception { 27 | public: 28 | ReedSolomonException(const char *msg) throw(); 29 | ~ReedSolomonException() throw(); 30 | }; 31 | } 32 | 33 | #endif // __REED_SOLOMON_EXCEPTION_H__ 34 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/datamatrix/DataMatrixReader.h: -------------------------------------------------------------------------------- 1 | #ifndef __DATA_MATRIX_READER_H__ 2 | #define __DATA_MATRIX_READER_H__ 3 | 4 | /* 5 | * DataMatrixReader.h 6 | * zxing 7 | * 8 | * Created by Luiz Silva on 09/02/2010. 9 | * Copyright 2010 ZXing authors All rights reserved. 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | namespace zxing { 29 | namespace datamatrix { 30 | 31 | class DataMatrixReader : public Reader { 32 | private: 33 | Decoder decoder_; 34 | 35 | public: 36 | DataMatrixReader(); 37 | virtual Ref decode(Ref image, DecodeHints hints); 38 | virtual ~DataMatrixReader(); 39 | 40 | }; 41 | 42 | } 43 | } 44 | 45 | #endif // __DATA_MATRIX_READER_H__ 46 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/datamatrix/detector/CornerPoint.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * CornerPoint.cpp 3 | * zxing 4 | * 5 | * Created by Luiz Silva on 09/02/2010. 6 | * Copyright 2010 ZXing authors All rights reserved. 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #include 22 | 23 | 24 | namespace zxing { 25 | namespace datamatrix { 26 | 27 | using namespace std; 28 | 29 | CornerPoint::CornerPoint(float posX, float posY) : 30 | ResultPoint(posX,posY), counter_(0) { 31 | } 32 | 33 | int CornerPoint::getCount() const { 34 | return counter_; 35 | } 36 | 37 | void CornerPoint::incrementCount() { 38 | counter_++; 39 | } 40 | 41 | bool CornerPoint::equals(Ref other) const { 42 | return posX_ == other->getX() && posY_ == other->getY(); 43 | } 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/datamatrix/detector/CornerPoint.h: -------------------------------------------------------------------------------- 1 | #ifndef __CORNER_FINDER_H__ 2 | #define __CORNER_FINDER_H__ 3 | 4 | /* 5 | * CornerPoint.h 6 | * zxing 7 | * 8 | * Created by Luiz Silva on 09/02/2010. 9 | * Copyright 2010 ZXing authors All rights reserved. 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #include 25 | #include 26 | 27 | namespace zxing { 28 | namespace datamatrix { 29 | 30 | class CornerPoint : public ResultPoint { 31 | private: 32 | int counter_; 33 | 34 | public: 35 | CornerPoint(float posX, float posY); 36 | int getCount() const; 37 | void incrementCount(); 38 | bool equals(Ref other) const; 39 | }; 40 | } 41 | } 42 | 43 | #endif // __CORNER_FINDER_H__ 44 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/datamatrix/detector/DetectorException.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * DetectorException.cpp 3 | * 4 | * Created on: Aug 26, 2011 5 | * Author: luiz 6 | */ 7 | 8 | #include "DetectorException.h" 9 | 10 | namespace zxing { 11 | namespace datamatrix { 12 | 13 | DetectorException::DetectorException(const char *msg) : 14 | Exception(msg) { 15 | 16 | } 17 | 18 | DetectorException::~DetectorException() throw () { 19 | // TODO Auto-generated destructor stub 20 | } 21 | 22 | } 23 | } /* namespace zxing */ 24 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/datamatrix/detector/DetectorException.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DetectorException.h 3 | * 4 | * Created on: Aug 26, 2011 5 | * Author: luiz 6 | */ 7 | 8 | #ifndef DETECTOREXCEPTION_H_ 9 | #define DETECTOREXCEPTION_H_ 10 | 11 | #include 12 | 13 | namespace zxing { 14 | namespace datamatrix { 15 | 16 | class DetectorException : public Exception { 17 | public: 18 | DetectorException(const char *msg); 19 | virtual ~DetectorException() throw(); 20 | }; 21 | } /* namespace nexxera */ 22 | } /* namespace zxing */ 23 | #endif /* DETECTOREXCEPTION_H_ */ 24 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/multi/ByQuadrantReader.h: -------------------------------------------------------------------------------- 1 | #ifndef __BY_QUADRANT_READER_H__ 2 | #define __BY_QUADRANT_READER_H__ 3 | 4 | /* 5 | * Copyright 2011 ZXing authors All rights reserved. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | namespace zxing { 26 | namespace multi { 27 | 28 | class ByQuadrantReader : public Reader { 29 | private: 30 | Reader& delegate_; 31 | 32 | public: 33 | ByQuadrantReader(Reader& delegate); 34 | virtual ~ByQuadrantReader(); 35 | virtual Ref decode(Ref image); 36 | virtual Ref decode(Ref image, DecodeHints hints); 37 | }; 38 | 39 | } 40 | } 41 | 42 | #endif // __BY_QUADRANT_READER_H__ 43 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/multi/MultipleBarcodeReader.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 ZXing authors All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | namespace zxing { 20 | namespace multi { 21 | 22 | MultipleBarcodeReader::~MultipleBarcodeReader() { } 23 | 24 | std::vector > MultipleBarcodeReader::decodeMultiple(Ref image) { 25 | return decodeMultiple(image, DecodeHints::DEFAULT_HINT); 26 | } 27 | 28 | } // End zxing::multi namespace 29 | } // End zxing namespace 30 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/multi/qrcode/QRCodeMultiReader.h: -------------------------------------------------------------------------------- 1 | #ifndef __QRCODE_MULTI_READER_H__ 2 | #define __QRCODE_MULTI_READER_H__ 3 | 4 | /* 5 | * Copyright 2011 ZXing authors All rights reserved. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #include 21 | #include 22 | 23 | namespace zxing { 24 | namespace multi { 25 | 26 | class QRCodeMultiReader: public zxing::qrcode::QRCodeReader, public MultipleBarcodeReader { 27 | public: 28 | QRCodeMultiReader(); 29 | virtual ~QRCodeMultiReader(); 30 | virtual std::vector > decodeMultiple(Ref image, DecodeHints hints); 31 | }; 32 | 33 | } 34 | } 35 | 36 | #endif // __QRCODE_MULTI_READER_H__ 37 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/multi/qrcode/detector/MultiDetector.h: -------------------------------------------------------------------------------- 1 | #ifndef __MULTI_DETECTOR_H__ 2 | #define __MULTI_DETECTOR_H__ 3 | 4 | /* 5 | * Copyright 2011 ZXing authors 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace zxing { 25 | namespace multi { 26 | 27 | class MultiDetector : public zxing::qrcode::Detector { 28 | public: 29 | MultiDetector(Ref image); 30 | virtual ~MultiDetector(); 31 | virtual std::vector > detectMulti(DecodeHints hints); 32 | }; 33 | 34 | } 35 | } 36 | 37 | #endif // __MULTI_DETECTOR_H__ 38 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/oned/EAN8Reader.h: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | #ifndef __EAN_8_READER_H__ 3 | #define __EAN_8_READER_H__ 4 | 5 | /* 6 | * EAN8Reader.h 7 | * ZXing 8 | * 9 | * Copyright 2010 ZXing authors All rights reserved. 10 | * 11 | * Licensed under the Apache License, Version 2.0 (the "License"); 12 | * you may not use this file except in compliance with the License. 13 | * You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | */ 23 | 24 | #include 25 | #include 26 | 27 | namespace zxing { 28 | namespace oned { 29 | 30 | class EAN8Reader : public UPCEANReader { 31 | private: 32 | std::vector decodeMiddleCounters; 33 | 34 | public: 35 | EAN8Reader(); 36 | 37 | int decodeMiddle(Ref row, 38 | Range const& startRange, 39 | std::string& resultString); 40 | 41 | BarcodeFormat getBarcodeFormat(); 42 | }; 43 | 44 | } 45 | } 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/oned/MultiFormatOneDReader.h: -------------------------------------------------------------------------------- 1 | #ifndef __MULTI_FORMAT_ONED_READER_H__ 2 | #define __MULTI_FORMAT_ONED_READER_H__ 3 | /* 4 | * MultiFormatOneDReader.h 5 | * ZXing 6 | * 7 | * Copyright 2010 ZXing authors All rights reserved. 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #include 23 | 24 | namespace zxing { 25 | namespace oned { 26 | class MultiFormatOneDReader : public OneDReader { 27 | 28 | private: 29 | std::vector > readers; 30 | public: 31 | MultiFormatOneDReader(DecodeHints hints); 32 | 33 | Ref decodeRow(int rowNumber, Ref row); 34 | }; 35 | } 36 | } 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/oned/MultiFormatUPCEANReader.h: -------------------------------------------------------------------------------- 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 2 | #ifndef __MULTI_FORMAT_UPC_EAN_READER_H__ 3 | #define __MULTI_FORMAT_UPC_EAN_READER_H__ 4 | /* 5 | * MultiFormatUPCEANReader.h 6 | * ZXing 7 | * 8 | * Copyright 2010 ZXing authors All rights reserved. 9 | * 10 | * Licensed under the Apache License, Version 2.0 (the "License"); 11 | * you may not use this file except in compliance with the License. 12 | * You may obtain a copy of the License at 13 | * 14 | * http://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, software 17 | * distributed under the License is distributed on an "AS IS" BASIS, 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | * See the License for the specific language governing permissions and 20 | * limitations under the License. 21 | */ 22 | 23 | #include 24 | 25 | namespace zxing { 26 | namespace oned { 27 | 28 | class UPCEANReader; 29 | 30 | class MultiFormatUPCEANReader : public OneDReader { 31 | private: 32 | std::vector< Ref > readers; 33 | public: 34 | MultiFormatUPCEANReader(DecodeHints hints); 35 | Ref decodeRow(int rowNumber, Ref row); 36 | }; 37 | 38 | } 39 | } 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/oned/OneDResultPoint.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * OneDResultPoint.cpp 3 | * ZXing 4 | * 5 | * Copyright 2010 ZXing authors All rights reserved. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #include "OneDResultPoint.h" 21 | 22 | namespace zxing { 23 | namespace oned { 24 | 25 | OneDResultPoint::OneDResultPoint(float posX, float posY) : ResultPoint(posX,posY) { 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/oned/OneDResultPoint.h: -------------------------------------------------------------------------------- 1 | #ifndef __ONED_RESULT_POINT_H__ 2 | #define __ONED_RESULT_POINT_H__ 3 | /* 4 | * OneDResultPoint.h 5 | * ZXing 6 | * 7 | * Copyright 2010 ZXing authors All rights reserved. 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | #include 22 | #include 23 | 24 | namespace zxing { 25 | namespace oned { 26 | 27 | class OneDResultPoint : public ResultPoint { 28 | 29 | public: 30 | OneDResultPoint(float posX, float posY); 31 | }; 32 | } 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /TTKThirdParty/zxing/zxing/qrcode/decoder/Decoder.h: -------------------------------------------------------------------------------- 1 | #ifndef __DECODER_H__ 2 | #define __DECODER_H__ 3 | 4 | /* 5 | * Decoder.h 6 | * zxing 7 | * 8 | * Copyright 2010 ZXing authors All rights reserved. 9 | * 10 | * Licensed under the Apache License, Version 2.0 (the "License"); 11 | * you may not use this file except in compliance with the License. 12 | * You may obtain a copy of the License at 13 | * 14 | * http://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, software 17 | * distributed under the License is distributed on an "AS IS" BASIS, 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | * See the License for the specific language governing permissions and 20 | * limitations under the License. 21 | */ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | namespace zxing { 30 | namespace qrcode { 31 | 32 | class Decoder { 33 | private: 34 | ReedSolomonDecoder rsDecoder_; 35 | 36 | void correctErrors(ArrayRef bytes, int numDataCodewords); 37 | 38 | public: 39 | Decoder(); 40 | Ref decode(Ref bits); 41 | }; 42 | 43 | } 44 | } 45 | 46 | #endif // __DECODER_H__ 47 | -------------------------------------------------------------------------------- /TTKTinyTools.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | TEMPLATE = subdirs 20 | CONFIG += ordered 21 | SUBDIRS += TTKCommon TTKUi TTKThirdParty TTKModule 22 | -------------------------------------------------------------------------------- /TTKUi/TTKModule.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | ../TTKResource/lb_app_logo.ico 4 | 5 | 6 | -------------------------------------------------------------------------------- /TTKUi/TTKUi.pro: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | TEMPLATE = lib 20 | msvc:CONFIG += staticlib 21 | CONFIG += plugin lib 22 | 23 | include($$PWD/../TTKVersion.pri) 24 | 25 | DESTDIR = $$OUT_PWD/../bin/$$TTK_VERSION 26 | TARGET = TTKUi 27 | 28 | RESOURCES += $$PWD/TTKModule.qrc 29 | 30 | win32:RC_FILE = $$PWD/$${TARGET}.rc 31 | -------------------------------------------------------------------------------- /TTKUi/TTKUi.rc: -------------------------------------------------------------------------------- 1 | #if defined(UNDER_CE) 2 | include 3 | #else 4 | #include 5 | #endif 6 | #include "../TTKCommon/ttkversion.h" 7 | 8 | VS_VERSION_INFO VERSIONINFO 9 | FILEVERSION TTK_RC_FILEVERSION 10 | PRODUCTVERSION TTK_RC_FILEVERSION 11 | FILEFLAGSMASK 0x3fL 12 | 13 | #ifdef _DEBUG 14 | FILEFLAGS VS_FF_DEBUG 15 | #else 16 | FILEFLAGS 0x0L 17 | #endif 18 | 19 | FILEOS VOS__WINDOWS32 20 | FILETYPE VFT_DLL 21 | FILESUBTYPE 0x0L 22 | BEGIN 23 | BLOCK "StringFileInfo" 24 | BEGIN 25 | BLOCK "080404b0" 26 | BEGIN 27 | VALUE "CompanyName", TTK_RC_COMPANY 28 | VALUE "FileDescription", "TTKUi" 29 | VALUE "FileVersion", TTK_RC_PRODUCTVERSION 30 | VALUE "LegalCopyright", TTK_RC_COPYRIGHT 31 | VALUE "ProductName", "TTKUi" 32 | VALUE "ProductVersion", TTK_RC_PRODUCTVERSION 33 | END 34 | END 35 | BLOCK "VarFileInfo" 36 | BEGIN 37 | VALUE "Translation", 0x804, 1200 38 | END 39 | END 40 | -------------------------------------------------------------------------------- /TTKUtils/linux_time.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | find . -exec touch -c -m -d "2025-05-05 12:00" {} \; 3 | -------------------------------------------------------------------------------- /TTKUtils/resource/README.txt: -------------------------------------------------------------------------------- 1 | 是基于Qt的自定义小工具集合 2 | TTKTinyTools 3 | 4 | Offical web page: https://github.com/Greedysky/TTKTinyTools 5 | Bug tracker: https://github.com/Greedysky/TTKTinyTools/issues 6 | Maintainer: Greedysky 7 | License: GNU Lesser General Public License Version 3 for TTKCommon modules 8 | GNU Lesser General Public License Version 3 for other modules 9 | 10 | 本软件仅供学习交流,不可用于商业用途,否则后果自负 11 | Copyright(C) 2015 - 2025 Greedysky All Rights Reserved 12 | -------------------------------------------------------------------------------- /TTKUtils/resource/qicon.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Greedysky/TTKTinyTools/0165117033af32f53d0fadcad9086a7ffd170e63/TTKUtils/resource/qicon.dll -------------------------------------------------------------------------------- /TTKVersion.pri: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * This file is part of the TTK Tiny Tools project 3 | # * Copyright (C) 2015 - 2025 Greedysky Studio 4 | # 5 | # * This program is free software; you can redistribute it and/or modify 6 | # * it under the terms of the GNU Lesser General Public License as published by 7 | # * the Free Software Foundation; either version 3 of the License, or 8 | # * (at your option) any later version. 9 | # 10 | # * This program is distributed in the hope that it will be useful, 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # * GNU Lesser General Public License for more details. 14 | # 15 | # * You should have received a copy of the GNU Lesser General Public License along 16 | # * with this program; If not, see . 17 | # *************************************************************************** 18 | 19 | UI_DIR = ./.build/ui 20 | MOC_DIR = ./.build/moc 21 | OBJECTS_DIR = ./.build/obj 22 | RCC_DIR = ./.build/rcc 23 | 24 | greaterThan(QT_MAJOR_VERSION, 4): DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050400 QT_DEPRECATED_WARNINGS 25 | 26 | # update time 2025.05.05 27 | TTK_VERSION = 3.1.0.0 28 | --------------------------------------------------------------------------------