From 155256cbd9151b0be555afdfc76f44299784793f Mon Sep 17 00:00:00 2001 From: He MingYang Date: Thu, 10 Jun 2021 18:54:54 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=B7=A5=E7=A8=8B=E5=BB=BA=E7=AB=8B):=20O?= =?UTF-8?q?CR=E6=96=87=E5=AD=97=E8=AF=86=E5=88=AB=E5=B7=A5=E7=A8=8B?= =?UTF-8?q?=E5=BB=BA=E7=AB=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit no Log: no Change-Id: I6bb42a4ae96f000a1ee937d2c69d1f7e3208e7e3 --- CMakeLists.txt | 108 +++++ Makefile | 711 ++++++++++++++++++++++++++++ README.md | 79 ++++ assets/Tips_dark.svg | 9 + assets/Tips_light.svg | 9 + assets/appicon_dark.svg | 119 +++++ assets/appicon_light.svg | 119 +++++ assets/copy_dark.svg | 14 + assets/copy_light.svg | 14 + assets/distinguish_dark.svg | 20 + assets/distinguish_light.svg | 20 + assets/distinguish_normal_dark.svg | 24 + assets/distinguish_normal_light.svg | 28 ++ assets/download_dark.svg | 12 + assets/download_light.svg | 12 + assets/icon_toast_sucess_new.svg | 33 ++ assets/ocr_dark.svg | 20 + assets/ocr_light.svg | 20 + assets/tip_dark.svg | 9 + assets/tip_light.svg | 9 + com.deepin.Ocr.service | 3 + debian/changelog | 5 + debian/compat | 1 + debian/control | 13 + debian/copyright | 40 ++ debian/rules | 12 + debian/source/format | 1 + deepin-ocr.pro | 64 +++ resource.qrc | 17 + src/main.cpp | 102 ++++ src/mainwidget.cpp | 315 ++++++++++++ src/mainwidget.h | 66 +++ src/mainwindow.cpp | 55 +++ src/mainwindow.h | 44 ++ src/ocrapplication.cpp | 48 ++ src/ocrapplication.h | 47 ++ src/resulttextview.cpp | 44 ++ src/resulttextview.h | 27 ++ src/service/dbusocr_adaptor.cpp | 64 +++ src/service/dbusocr_adaptor.h | 67 +++ src/service/ocrinterface.cpp | 34 ++ src/service/ocrinterface.h | 92 ++++ src/textloadwidget.cpp | 13 + src/textloadwidget.h | 22 + src/view/imageview.cpp | 278 +++++++++++ src/view/imageview.h | 68 +++ translations.pri | 35 ++ translations/deepin-ocr_ar.ts | 68 +++ translations/deepin-ocr_bo.ts | 68 +++ translations/deepin-ocr_br.ts | 68 +++ translations/deepin-ocr_ca.ts | 68 +++ translations/deepin-ocr_cs.ts | 68 +++ translations/deepin-ocr_da.ts | 68 +++ translations/deepin-ocr_de.ts | 68 +++ translations/deepin-ocr_el.ts | 62 +++ translations/deepin-ocr_en_US.ts | 68 +++ translations/deepin-ocr_es.ts | 68 +++ translations/deepin-ocr_es_419.ts | 63 +++ translations/deepin-ocr_fa.ts | 61 +++ translations/deepin-ocr_fi.ts | 68 +++ translations/deepin-ocr_fr.ts | 68 +++ translations/deepin-ocr_gl_ES.ts | 68 +++ translations/deepin-ocr_he.ts | 62 +++ translations/deepin-ocr_hi_IN.ts | 61 +++ translations/deepin-ocr_hr.ts | 62 +++ translations/deepin-ocr_hu.ts | 68 +++ translations/deepin-ocr_id.ts | 62 +++ translations/deepin-ocr_it.ts | 68 +++ translations/deepin-ocr_ja.ts | 63 +++ translations/deepin-ocr_ko.ts | 68 +++ translations/deepin-ocr_lt.ts | 65 +++ translations/deepin-ocr_ms.ts | 68 +++ translations/deepin-ocr_ne.ts | 61 +++ translations/deepin-ocr_nl.ts | 68 +++ translations/deepin-ocr_pl.ts | 68 +++ translations/deepin-ocr_pt.ts | 68 +++ translations/deepin-ocr_pt_BR.ts | 68 +++ translations/deepin-ocr_ru.ts | 68 +++ translations/deepin-ocr_sk.ts | 63 +++ translations/deepin-ocr_sl.ts | 62 +++ translations/deepin-ocr_sq.ts | 68 +++ translations/deepin-ocr_sr.ts | 68 +++ translations/deepin-ocr_tr.ts | 68 +++ translations/deepin-ocr_ug.ts | 68 +++ translations/deepin-ocr_uk.ts | 68 +++ translations/deepin-ocr_zh_CN.ts | 68 +++ translations/deepin-ocr_zh_HK.ts | 68 +++ translations/deepin-ocr_zh_TW.ts | 68 +++ 88 files changed, 5685 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 Makefile create mode 100644 README.md create mode 100644 assets/Tips_dark.svg create mode 100644 assets/Tips_light.svg create mode 100644 assets/appicon_dark.svg create mode 100644 assets/appicon_light.svg create mode 100644 assets/copy_dark.svg create mode 100644 assets/copy_light.svg create mode 100644 assets/distinguish_dark.svg create mode 100644 assets/distinguish_light.svg create mode 100644 assets/distinguish_normal_dark.svg create mode 100644 assets/distinguish_normal_light.svg create mode 100644 assets/download_dark.svg create mode 100644 assets/download_light.svg create mode 100644 assets/icon_toast_sucess_new.svg create mode 100644 assets/ocr_dark.svg create mode 100644 assets/ocr_light.svg create mode 100644 assets/tip_dark.svg create mode 100644 assets/tip_light.svg create mode 100644 com.deepin.Ocr.service create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 deepin-ocr.pro create mode 100644 resource.qrc create mode 100644 src/main.cpp create mode 100644 src/mainwidget.cpp create mode 100644 src/mainwidget.h create mode 100644 src/mainwindow.cpp create mode 100644 src/mainwindow.h create mode 100644 src/ocrapplication.cpp create mode 100644 src/ocrapplication.h create mode 100644 src/resulttextview.cpp create mode 100644 src/resulttextview.h create mode 100644 src/service/dbusocr_adaptor.cpp create mode 100644 src/service/dbusocr_adaptor.h create mode 100644 src/service/ocrinterface.cpp create mode 100644 src/service/ocrinterface.h create mode 100644 src/textloadwidget.cpp create mode 100644 src/textloadwidget.h create mode 100644 src/view/imageview.cpp create mode 100644 src/view/imageview.h create mode 100644 translations.pri create mode 100644 translations/deepin-ocr_ar.ts create mode 100644 translations/deepin-ocr_bo.ts create mode 100644 translations/deepin-ocr_br.ts create mode 100644 translations/deepin-ocr_ca.ts create mode 100644 translations/deepin-ocr_cs.ts create mode 100644 translations/deepin-ocr_da.ts create mode 100644 translations/deepin-ocr_de.ts create mode 100644 translations/deepin-ocr_el.ts create mode 100644 translations/deepin-ocr_en_US.ts create mode 100644 translations/deepin-ocr_es.ts create mode 100644 translations/deepin-ocr_es_419.ts create mode 100644 translations/deepin-ocr_fa.ts create mode 100644 translations/deepin-ocr_fi.ts create mode 100644 translations/deepin-ocr_fr.ts create mode 100644 translations/deepin-ocr_gl_ES.ts create mode 100644 translations/deepin-ocr_he.ts create mode 100644 translations/deepin-ocr_hi_IN.ts create mode 100644 translations/deepin-ocr_hr.ts create mode 100644 translations/deepin-ocr_hu.ts create mode 100644 translations/deepin-ocr_id.ts create mode 100644 translations/deepin-ocr_it.ts create mode 100644 translations/deepin-ocr_ja.ts create mode 100644 translations/deepin-ocr_ko.ts create mode 100644 translations/deepin-ocr_lt.ts create mode 100644 translations/deepin-ocr_ms.ts create mode 100644 translations/deepin-ocr_ne.ts create mode 100644 translations/deepin-ocr_nl.ts create mode 100644 translations/deepin-ocr_pl.ts create mode 100644 translations/deepin-ocr_pt.ts create mode 100644 translations/deepin-ocr_pt_BR.ts create mode 100644 translations/deepin-ocr_ru.ts create mode 100644 translations/deepin-ocr_sk.ts create mode 100644 translations/deepin-ocr_sl.ts create mode 100644 translations/deepin-ocr_sq.ts create mode 100644 translations/deepin-ocr_sr.ts create mode 100644 translations/deepin-ocr_tr.ts create mode 100644 translations/deepin-ocr_ug.ts create mode 100644 translations/deepin-ocr_uk.ts create mode 100644 translations/deepin-ocr_zh_CN.ts create mode 100644 translations/deepin-ocr_zh_HK.ts create mode 100644 translations/deepin-ocr_zh_TW.ts diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..8d7e19f --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,108 @@ +#定义需要的cmake版本 +cmake_minimum_required(VERSION 3.10) +project(deepin-ocr) + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + +#先查找到这些qt相关的模块以供链接使用 +set(QtModule Core Gui Widgets DBus) +find_package(Qt5 REQUIRED ${QtModule}) + +#文件夹包含 +include_directories(src) +aux_source_directory(./src allSource) + + +FILE (GLOB allHeaders + ./src/mainwindow.h + ) + +FILE (GLOB allSource + ./src/mainwindow.cpp + ) + +# 翻译 + + + +#file(GLOB TS LIST_DIRECTORIES false ./translations/${PROJECT_NAME}*.ts) +#set_source_files_properties(${TS} + #PROPERTIES OUTPUT_LOCATION ${PROJECT_SOURCE_DIR}/translations) + +#qt5_create_translation(QM ${allSource} ${TS}) +#set(TS_FILES +# ./translations/deepin-ocr_zh_CN.ts +## ./translations/deepin-ocr_zh_TW.ts +# ./translations/deepin-ocr.ts) +#find_package(Qt${QT_VERSION} COMPONENTS ${REQUIRED_LIBS} LinguistTools REQUIRED) +#qt5_create_translation(QM_FILES ${CMAKE_CURRENT_SOURCE_DIR} ${TS_FILES} OPTIONS) +#qt5_add_translation(qmFiles ${TargetTsFiles}) +#set_source_files_properties(${qmfiles} PROPERTIES OUTPUT_LOCATION "translations") + +set(LINK_DIR lib) +link_directories(${LINK_DIR}) + + +add_executable(${PROJECT_NAME} ${allSource} ${allHeaders} "./src/main.cpp") +add_compile_definitions(LITE_DIV) + +#------------------添加第三方库begins--------------------------# +#使用第三方库需要用到的一个包 +#检查第三方库,然后取名3rd_lib +find_package(PkgConfig REQUIRED) +find_package(DtkCore REQUIRED) +find_package(DtkWidget REQUIRED) +find_package(DtkGui REQUIRED) + +#添加第三方库的所有文件夹路径到工程中来(注意 *_INCLUDE_DIRS) +target_include_directories(${PROJECT_NAME} PUBLIC ${3rd_lib_INCLUDE_DIRS}) + +target_include_directories(${PROJECT_NAME} PUBLIC ${3rd_lib_INCLUDE_DIRS} ${DtkWidget_INCLUDE_DIRS}) +if(DOTEST) + target_include_directories(${PROJECT_NAME_TEST} PUBLIC ${3rd_lib_INCLUDE_DIRS} ${DtkWidget_INCLUDE_DIRS}) +endif() + +target_link_libraries(${PROJECT_NAME} + ${DtkWidget_LIBRARIES} + ${Qt5Widgets_LIBRARIES} +) + + + + +find_package(Qt5LinguistTools REQUIRED) +#find_package(Qt${QT_VERSION} COMPONENTS ${REQUIRED_LIBS} LinguistTools REQUIRED) +file(GLOB TargetTsFiles LIST_DIRECTORIES false ./translations/deepin-ocr.ts) +#set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM 1) +qt5_create_translation(LangSrcs ${allSource} "ss.ts") +qt5_add_translation(${TargetTsFiles}) +#set_source_files_properties(${qmfiles} PROPERTIES OUTPUT_LOCATION "translations") + +#------------------添加第三方库end--------------------------# + +#将工程与这些模块链接起来 +qt5_use_modules(${PROJECT_NAME} ${QtModule}) + +if(DOTEST) +qt5_use_modules(${PROJECT_NAME_TEST} ${QtModule}) +endif() + + +# ------------------------------- install report script ------------------------------- +set(PREFIX /usr) +set(TranslationDir ${PREFIX}/share/${PROJECT_NAME}/translations/) + +install(TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}Targets + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION /usr/bin + INCLUDES DESTINATION allHeaders) + +#install +install(FILES ${LangSrcs} DESTINATION ${TranslationDir}) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..52cc043 --- /dev/null +++ b/Makefile @@ -0,0 +1,711 @@ +############################################################################# +# Makefile for building: deepin-ocr +# Generated by qmake (3.1) (Qt 5.11.3) +# Project: deepin-ocr.pro +# Template: app +# Command: /usr/lib/qt5/bin/qmake -o Makefile deepin-ocr.pro 'QMAKE_CFLAGS_RELEASE=-g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CFLAGS_DEBUG=-g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CXXFLAGS_RELEASE=-g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CXXFLAGS_DEBUG=-g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' QMAKE_LFLAGS_RELEASE=-Wl,-z,relro QMAKE_LFLAGS_DEBUG=-Wl,-z,relro QMAKE_STRIP=: PREFIX=/usr -- VERSION= LIB_INSTALL_DIR=/usr/lib/x86_64-linux-gnu DEFINES+=VERSION=1.0 +############################################################################# + +MAKEFILE = Makefile + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_GUI_LIB -DQT_DBUS_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB +CFLAGS = -pipe -g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) +CXXFLAGS = -pipe -g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) +INCPATH = -I. -I. -isystem /usr/include/libdtk-5.5.0/DWidget -isystem /usr/include/libdtk-5.4.12/DGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3 -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3/QtPrintSupport -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3 -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtX11Extras -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/libdtk-5.4.12/DCore -isystem /usr/include/x86_64-linux-gnu/qt5/QtDBus -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3/QtCore -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtConcurrent -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ +QMAKE = /usr/lib/qt5/bin/qmake +DEL_FILE = rm -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p +COPY = cp -f +COPY_FILE = cp -f +COPY_DIR = cp -f -R +INSTALL_FILE = install -m 644 -p +INSTALL_PROGRAM = install -m 755 -p +INSTALL_DIR = cp -f -R +QINSTALL = /usr/lib/qt5/bin/qmake -install qinstall +QINSTALL_PROGRAM = /usr/lib/qt5/bin/qmake -install qinstall -exe +DEL_FILE = rm -f +SYMLINK = ln -f -s +DEL_DIR = rmdir +MOVE = mv -f +TAR = tar -cf +COMPRESS = gzip -9f +DISTNAME = deepin-ocr1.0.0 +DISTDIR = /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/.tmp/deepin-ocr1.0.0 +LINK = g++ +LFLAGS = -Wl,-z,relro +LIBS = $(SUBLIBS) -ldtkwidget -ldtkgui -lQt5PrintSupport -lQt5Widgets -lQt5X11Extras -lQt5Gui -ldtkcore -lQt5DBus -lQt5Xml -lQt5Network -lQt5Concurrent -lQt5Core -lGL -lpthread +AR = ar cqs +RANLIB = +SED = sed +STRIP = : + +####### Output directory + +OBJECTS_DIR = ./ + +####### Files + +SOURCES = src/main.cpp \ + src/mainwindow.cpp \ + src/service/ocrinterface.cpp \ + src/service/dbusocr_adaptor.cpp \ + src/ocrapplication.cpp \ + src/mainwidget.cpp \ + src/textloadwidget.cpp \ + src/resulttextview.cpp \ + src/view/imageview.cpp qrc_resource.cpp \ + moc_mainwindow.cpp \ + moc_ocrinterface.cpp \ + moc_dbusocr_adaptor.cpp \ + moc_ocrapplication.cpp \ + moc_mainwidget.cpp \ + moc_resulttextview.cpp \ + moc_textloadwidget.cpp \ + moc_imageview.cpp +OBJECTS = main.o \ + mainwindow.o \ + ocrinterface.o \ + dbusocr_adaptor.o \ + ocrapplication.o \ + mainwidget.o \ + textloadwidget.o \ + resulttextview.o \ + imageview.o \ + qrc_resource.o \ + moc_mainwindow.o \ + moc_ocrinterface.o \ + moc_dbusocr_adaptor.o \ + moc_ocrapplication.o \ + moc_mainwidget.o \ + moc_resulttextview.o \ + moc_textloadwidget.o \ + moc_imageview.o +DIST = translations/deepin-ocr_en_US.ts \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_Attica.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KAuth.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCodecs.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCompletion.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigCore.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigGui.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigWidgets.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCoreAddons.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KDBusAddons.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KGlobalAccel.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KGuiAddons.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KI18n.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KIconThemes.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KItemViews.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KService.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KTextWidgets.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KWidgetsAddons.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KWindowSystem.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KXmlGui.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_designer.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcommon.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore5.5.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui5.5.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget5.5.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_help.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimedia.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_script.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_scripttools.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_svg.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uiplugin.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uitools.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_x11extras.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_SonnetCore.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_SonnetUi.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \ + .qmake.stash \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \ + translations.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dbuscommon.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dbusinterfaces.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dbusadaptors.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/opengl.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/uic.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \ + deepin-ocr.pro src/mainwindow.h \ + src/service/ocrinterface.h \ + src/service/dbusocr_adaptor.h \ + src/ocrapplication.h \ + src/mainwidget.h \ + src/resulttextview.h \ + src/textloadwidget.h \ + src/view/imageview.h src/main.cpp \ + src/mainwindow.cpp \ + src/service/ocrinterface.cpp \ + src/service/dbusocr_adaptor.cpp \ + src/ocrapplication.cpp \ + src/mainwidget.cpp \ + src/textloadwidget.cpp \ + src/resulttextview.cpp \ + src/view/imageview.cpp +QMAKE_TARGET = deepin-ocr +DESTDIR = +TARGET = deepin-ocr + + +first: all +####### Build rules + +$(TARGET): $(OBJECTS) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) + +Makefile: deepin-ocr.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_Attica.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KAuth.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCodecs.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCompletion.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigCore.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigGui.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigWidgets.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCoreAddons.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KDBusAddons.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KGlobalAccel.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KGuiAddons.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KI18n.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KIconThemes.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KItemViews.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KService.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KTextWidgets.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KWidgetsAddons.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KWindowSystem.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KXmlGui.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_designer.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcommon.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore5.5.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui5.5.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget5.5.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_help.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimedia.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_script.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_scripttools.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_svg.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uiplugin.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uitools.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_x11extras.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_SonnetCore.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_SonnetUi.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \ + .qmake.stash \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \ + translations.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dbuscommon.pri \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dbusinterfaces.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dbusadaptors.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/opengl.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/uic.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \ + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \ + deepin-ocr.pro \ + resource.qrc \ + /usr/lib/x86_64-linux-gnu/libQt5PrintSupport.prl \ + /usr/lib/x86_64-linux-gnu/libQt5Widgets.prl \ + /usr/lib/x86_64-linux-gnu/libQt5X11Extras.prl \ + /usr/lib/x86_64-linux-gnu/libQt5Gui.prl \ + /usr/lib/x86_64-linux-gnu/libQt5DBus.prl \ + /usr/lib/x86_64-linux-gnu/libQt5Xml.prl \ + /usr/lib/x86_64-linux-gnu/libQt5Network.prl \ + /usr/lib/x86_64-linux-gnu/libQt5Concurrent.prl \ + /usr/lib/x86_64-linux-gnu/libQt5Core.prl + $(QMAKE) -o Makefile deepin-ocr.pro 'QMAKE_CFLAGS_RELEASE=-g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CFLAGS_DEBUG=-g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CXXFLAGS_RELEASE=-g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CXXFLAGS_DEBUG=-g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' QMAKE_LFLAGS_RELEASE=-Wl,-z,relro QMAKE_LFLAGS_DEBUG=-Wl,-z,relro QMAKE_STRIP=: PREFIX=/usr -- VERSION= LIB_INSTALL_DIR=/usr/lib/x86_64-linux-gnu DEFINES+=VERSION=1.0 +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_Attica.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KAuth.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCodecs.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCompletion.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigCore.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigGui.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigWidgets.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCoreAddons.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KDBusAddons.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KGlobalAccel.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KGuiAddons.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KI18n.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KIconThemes.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KItemViews.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KService.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KTextWidgets.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KWidgetsAddons.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KWindowSystem.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KXmlGui.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_designer.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcommon.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore5.5.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui5.5.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget5.5.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_help.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimedia.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_script.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_scripttools.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_svg.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uiplugin.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uitools.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_x11extras.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_SonnetCore.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_SonnetUi.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf: +.qmake.stash: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf: +translations.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dbuscommon.pri: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dbusinterfaces.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/dbusadaptors.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/opengl.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/uic.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf: +/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf: +deepin-ocr.pro: +resource.qrc: +/usr/lib/x86_64-linux-gnu/libQt5PrintSupport.prl: +/usr/lib/x86_64-linux-gnu/libQt5Widgets.prl: +/usr/lib/x86_64-linux-gnu/libQt5X11Extras.prl: +/usr/lib/x86_64-linux-gnu/libQt5Gui.prl: +/usr/lib/x86_64-linux-gnu/libQt5DBus.prl: +/usr/lib/x86_64-linux-gnu/libQt5Xml.prl: +/usr/lib/x86_64-linux-gnu/libQt5Network.prl: +/usr/lib/x86_64-linux-gnu/libQt5Concurrent.prl: +/usr/lib/x86_64-linux-gnu/libQt5Core.prl: +qmake: FORCE + @$(QMAKE) -o Makefile deepin-ocr.pro 'QMAKE_CFLAGS_RELEASE=-g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CFLAGS_DEBUG=-g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CXXFLAGS_RELEASE=-g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CXXFLAGS_DEBUG=-g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' QMAKE_LFLAGS_RELEASE=-Wl,-z,relro QMAKE_LFLAGS_DEBUG=-Wl,-z,relro QMAKE_STRIP=: PREFIX=/usr -- VERSION= LIB_INSTALL_DIR=/usr/lib/x86_64-linux-gnu DEFINES+=VERSION=1.0 + +qmake_all: FORCE + + +all: Makefile $(TARGET) + +dist: distdir FORCE + (cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR) + +distdir: FORCE + @test -d $(DISTDIR) || mkdir -p $(DISTDIR) + $(COPY_FILE) --parents $(DIST) $(DISTDIR)/ + $(COPY_FILE) --parents resource.qrc $(DISTDIR)/ + $(COPY_FILE) --parents /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp $(DISTDIR)/ + $(COPY_FILE) --parents src/mainwindow.h src/service/ocrinterface.h src/service/dbusocr_adaptor.h src/ocrapplication.h src/mainwidget.h src/resulttextview.h src/textloadwidget.h src/view/imageview.h $(DISTDIR)/ + $(COPY_FILE) --parents src/main.cpp src/mainwindow.cpp src/service/ocrinterface.cpp src/service/dbusocr_adaptor.cpp src/ocrapplication.cpp src/mainwidget.cpp src/textloadwidget.cpp src/resulttextview.cpp src/view/imageview.cpp $(DISTDIR)/ + $(COPY_FILE) --parents /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_zh_CN.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_en_US.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_zh_HK.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_zh_TW.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_ar.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_br.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_ca.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_cs.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_da.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_de.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_es.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_fi.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_fr.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_gl_ES.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_hu.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_it.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_ko.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_ms.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_nl.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_pl.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_pt.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_pt_BR.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_ru.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_sq.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_sr.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_tr.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_uk.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_ug.ts /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/translations/deepin-ocr_bo.ts $(DISTDIR)/ + + +clean: compiler_clean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) *~ core *.core + + +distclean: clean + -$(DEL_FILE) $(TARGET) + -$(DEL_FILE) .qmake.stash + -$(DEL_FILE) Makefile + + +####### Sub-libraries + +mocclean: compiler_moc_header_clean compiler_moc_objc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_objc_header_make_all compiler_moc_source_make_all + +check: first + +benchmark: first + +compiler_rcc_make_all: qrc_resource.cpp +compiler_rcc_clean: + -$(DEL_FILE) qrc_resource.cpp +qrc_resource.cpp: resource.qrc \ + /usr/lib/qt5/bin/rcc \ + assets/distinguish_normal_dark.svg \ + assets/icon_toast_sucess_new.svg \ + assets/appicon_light.svg \ + assets/copy_light.svg \ + assets/distinguish_normal_light.svg \ + assets/appicon_dark.svg \ + assets/copy_dark.svg \ + assets/tip_dark.svg \ + assets/tip_light.svg \ + assets/download_light.svg \ + assets/distinguish_light.svg \ + assets/distinguish_dark.svg \ + assets/download_dark.svg + /usr/lib/qt5/bin/rcc -name resource resource.qrc -o qrc_resource.cpp + +compiler_moc_predefs_make_all: moc_predefs.h +compiler_moc_predefs_clean: + -$(DEL_FILE) moc_predefs.h +moc_predefs.h: /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp + g++ -pipe -g -O2 -fdebug-prefix-map=/home/hmy/Desktop/deepin-ocr/2/deepin-ocr=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -W -dM -E -o moc_predefs.h /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp + +compiler_moc_header_make_all: moc_mainwindow.cpp moc_ocrinterface.cpp moc_dbusocr_adaptor.cpp moc_ocrapplication.cpp moc_mainwidget.cpp moc_resulttextview.cpp moc_textloadwidget.cpp moc_imageview.cpp +compiler_moc_header_clean: + -$(DEL_FILE) moc_mainwindow.cpp moc_ocrinterface.cpp moc_dbusocr_adaptor.cpp moc_ocrapplication.cpp moc_mainwidget.cpp moc_resulttextview.cpp moc_textloadwidget.cpp moc_imageview.cpp +moc_mainwindow.cpp: src/mainwindow.h \ + moc_predefs.h \ + /usr/lib/qt5/bin/moc + /usr/lib/qt5/bin/moc $(DEFINES) --include /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/usr/include/libdtk-5.5.0/DWidget -I/usr/include/libdtk-5.4.12/DGui -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3/QtGui -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtX11Extras -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/libdtk-5.4.12/DCore -I/usr/include/x86_64-linux-gnu/qt5/QtDBus -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3/QtCore -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtConcurrent -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include src/mainwindow.h -o moc_mainwindow.cpp + +moc_ocrinterface.cpp: src/service/ocrinterface.h \ + moc_predefs.h \ + /usr/lib/qt5/bin/moc + /usr/lib/qt5/bin/moc $(DEFINES) --include /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/usr/include/libdtk-5.5.0/DWidget -I/usr/include/libdtk-5.4.12/DGui -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3/QtGui -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtX11Extras -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/libdtk-5.4.12/DCore -I/usr/include/x86_64-linux-gnu/qt5/QtDBus -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3/QtCore -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtConcurrent -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include src/service/ocrinterface.h -o moc_ocrinterface.cpp + +moc_dbusocr_adaptor.cpp: src/service/dbusocr_adaptor.h \ + moc_predefs.h \ + /usr/lib/qt5/bin/moc + /usr/lib/qt5/bin/moc $(DEFINES) --include /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/usr/include/libdtk-5.5.0/DWidget -I/usr/include/libdtk-5.4.12/DGui -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3/QtGui -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtX11Extras -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/libdtk-5.4.12/DCore -I/usr/include/x86_64-linux-gnu/qt5/QtDBus -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3/QtCore -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtConcurrent -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include src/service/dbusocr_adaptor.h -o moc_dbusocr_adaptor.cpp + +moc_ocrapplication.cpp: src/mainwindow.h \ + src/ocrapplication.h \ + moc_predefs.h \ + /usr/lib/qt5/bin/moc + /usr/lib/qt5/bin/moc $(DEFINES) --include /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/usr/include/libdtk-5.5.0/DWidget -I/usr/include/libdtk-5.4.12/DGui -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3/QtGui -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtX11Extras -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/libdtk-5.4.12/DCore -I/usr/include/x86_64-linux-gnu/qt5/QtDBus -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3/QtCore -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtConcurrent -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include src/ocrapplication.h -o moc_ocrapplication.cpp + +moc_mainwidget.cpp: src/resulttextview.h \ + src/textloadwidget.h \ + src/mainwidget.h \ + moc_predefs.h \ + /usr/lib/qt5/bin/moc + /usr/lib/qt5/bin/moc $(DEFINES) --include /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/usr/include/libdtk-5.5.0/DWidget -I/usr/include/libdtk-5.4.12/DGui -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3/QtGui -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtX11Extras -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/libdtk-5.4.12/DCore -I/usr/include/x86_64-linux-gnu/qt5/QtDBus -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3/QtCore -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtConcurrent -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include src/mainwidget.h -o moc_mainwidget.cpp + +moc_resulttextview.cpp: src/resulttextview.h \ + moc_predefs.h \ + /usr/lib/qt5/bin/moc + /usr/lib/qt5/bin/moc $(DEFINES) --include /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/usr/include/libdtk-5.5.0/DWidget -I/usr/include/libdtk-5.4.12/DGui -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3/QtGui -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtX11Extras -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/libdtk-5.4.12/DCore -I/usr/include/x86_64-linux-gnu/qt5/QtDBus -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3/QtCore -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtConcurrent -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include src/resulttextview.h -o moc_resulttextview.cpp + +moc_textloadwidget.cpp: src/textloadwidget.h \ + moc_predefs.h \ + /usr/lib/qt5/bin/moc + /usr/lib/qt5/bin/moc $(DEFINES) --include /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/usr/include/libdtk-5.5.0/DWidget -I/usr/include/libdtk-5.4.12/DGui -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3/QtGui -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtX11Extras -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/libdtk-5.4.12/DCore -I/usr/include/x86_64-linux-gnu/qt5/QtDBus -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3/QtCore -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtConcurrent -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include src/textloadwidget.h -o moc_textloadwidget.cpp + +moc_imageview.cpp: src/view/imageview.h \ + moc_predefs.h \ + /usr/lib/qt5/bin/moc + /usr/lib/qt5/bin/moc $(DEFINES) --include /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/home/hmy/Desktop/deepin-ocr/2/deepin-ocr -I/usr/include/libdtk-5.5.0/DWidget -I/usr/include/libdtk-5.4.12/DGui -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport/5.11.3/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.11.3/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.11.3/QtGui -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtX11Extras -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/libdtk-5.4.12/DCore -I/usr/include/x86_64-linux-gnu/qt5/QtDBus -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3 -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.11.3/QtCore -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtConcurrent -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include src/view/imageview.h -o moc_imageview.cpp + +compiler_moc_objc_header_make_all: +compiler_moc_objc_header_clean: +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_uic_make_all: +compiler_uic_clean: +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: +compiler_lex_clean: +compiler_clean: compiler_rcc_clean compiler_moc_predefs_clean compiler_moc_header_clean + +####### Compile + +main.o: src/main.cpp src/ocrapplication.h \ + src/mainwindow.h \ + src/service/ocrinterface.h \ + src/service/dbusocr_adaptor.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o src/main.cpp + +mainwindow.o: src/mainwindow.cpp src/mainwindow.h \ + src/mainwidget.h \ + src/resulttextview.h \ + src/textloadwidget.h \ + src/service/dbusocr_adaptor.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o src/mainwindow.cpp + +ocrinterface.o: src/service/ocrinterface.cpp src/service/ocrinterface.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ocrinterface.o src/service/ocrinterface.cpp + +dbusocr_adaptor.o: src/service/dbusocr_adaptor.cpp src/service/dbusocr_adaptor.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o dbusocr_adaptor.o src/service/dbusocr_adaptor.cpp + +ocrapplication.o: src/ocrapplication.cpp src/ocrapplication.h \ + src/mainwindow.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ocrapplication.o src/ocrapplication.cpp + +mainwidget.o: src/mainwidget.cpp src/mainwidget.h \ + src/resulttextview.h \ + src/textloadwidget.h \ + src/view/imageview.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwidget.o src/mainwidget.cpp + +textloadwidget.o: src/textloadwidget.cpp src/textloadwidget.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o textloadwidget.o src/textloadwidget.cpp + +resulttextview.o: src/resulttextview.cpp src/resulttextview.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o resulttextview.o src/resulttextview.cpp + +imageview.o: src/view/imageview.cpp src/view/imageview.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o imageview.o src/view/imageview.cpp + +qrc_resource.o: qrc_resource.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_resource.o qrc_resource.cpp + +moc_mainwindow.o: moc_mainwindow.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp + +moc_ocrinterface.o: moc_ocrinterface.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_ocrinterface.o moc_ocrinterface.cpp + +moc_dbusocr_adaptor.o: moc_dbusocr_adaptor.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_dbusocr_adaptor.o moc_dbusocr_adaptor.cpp + +moc_ocrapplication.o: moc_ocrapplication.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_ocrapplication.o moc_ocrapplication.cpp + +moc_mainwidget.o: moc_mainwidget.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwidget.o moc_mainwidget.cpp + +moc_resulttextview.o: moc_resulttextview.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_resulttextview.o moc_resulttextview.cpp + +moc_textloadwidget.o: moc_textloadwidget.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_textloadwidget.o moc_textloadwidget.cpp + +moc_imageview.o: moc_imageview.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_imageview.o moc_imageview.cpp + +####### Install + +install_target: first FORCE + @test -d $(INSTALL_ROOT)/usr/bin || mkdir -p $(INSTALL_ROOT)/usr/bin + -$(QINSTALL_PROGRAM) $(QMAKE_TARGET) $(INSTALL_ROOT)/usr/bin/$(QMAKE_TARGET) + -$(STRIP) $(INSTALL_ROOT)/usr/bin/$(QMAKE_TARGET) + +uninstall_target: FORCE + -$(DEL_FILE) $(INSTALL_ROOT)/usr/bin/$(QMAKE_TARGET) + -$(DEL_DIR) $(INSTALL_ROOT)/usr/bin/ + + +install_dbus_service: first FORCE + @test -d $(INSTALL_ROOT)/usr/share/dbus-1/services || mkdir -p $(INSTALL_ROOT)/usr/share/dbus-1/services + -$(QINSTALL) /home/hmy/Desktop/deepin-ocr/2/deepin-ocr/com.deepin.Ocr.service $(INSTALL_ROOT)/usr/share/dbus-1/services/com.deepin.Ocr.service + +uninstall_dbus_service: FORCE + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/dbus-1/services/com.deepin.Ocr.service + -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/dbus-1/services/ + + +install: install_target install_dbus_service FORCE + +uninstall: uninstall_target uninstall_dbus_service FORCE + +FORCE: + diff --git a/README.md b/README.md new file mode 100644 index 0000000..104d79f --- /dev/null +++ b/README.md @@ -0,0 +1,79 @@ +# deepin-ocr + +Deepin ocr is a . + +### Dependencies + +### Build dependencies + +_The **master** branch is current development branch, build dependencies may changes without update README.md, refer to `./debian/control` for a working build depends list_ + +* pkg-config +* libdtkwidget-dev +* Qt5(>=5.6) with modules: + * qt5-default + * qt5-qmake + * qtbase5-dev + + + + + +## Installation + +### Build from source code + +1. Make sure you have installed all dependencies. + +_Package name may be different between distros, if dde-file-manager is available from your distro, check the packaging script delivered from your distro is a better idea._ + +Assume you are using [Deepin](https://distrowatch.com/table.php?distribution=deepin) or other debian-based distro which got dde-file-manager delivered: + +``` shell +$ apt build-dep deepin-ocr +``` + +2. Build: + +``` +$ cd deepin-album +$ mkdir Build +$ cd Build +$ cmake .. +$ make +``` + +3. Install: + +``` +$ sudo make install +``` + +The executable binary file could be found at `/usr/bin/deepin-ocr ` + +## Usage + +Execute `deepin-ocr` + +## Documentations + + - [User Documentation](https://wikidev.uniontech.com/index.php?title=%E7%9B%B8%E5%86%8C) | [用户文档](https://wikidev.uniontech.com/index.php?title=%E7%9B%B8%E5%86%8C) + +## Getting help + + - [Official Forum](https://bbs.deepin.org/) + - [Developer Center](https://github.com/linuxdeepin/developer-center) + - [Gitter](https://gitter.im/orgs/linuxdeepin/rooms) + - [IRC Channel](https://webchat.freenode.net/?channels=deepin) + - [Wiki](https://wiki.deepin.org/) + +## Getting involved + +We encourage you to report issues and contribute changes + + - [Contribution guide for developers](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers-en) (English) + - [开发者代码贡献指南](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers) (中文) + +## License + +deepin-ocr is licensed under [GPLv3]( \ No newline at end of file diff --git a/assets/Tips_dark.svg b/assets/Tips_dark.svg new file mode 100644 index 0000000..8a36626 --- /dev/null +++ b/assets/Tips_dark.svg @@ -0,0 +1,9 @@ + + + 温馨提示 + + + + + + \ No newline at end of file diff --git a/assets/Tips_light.svg b/assets/Tips_light.svg new file mode 100644 index 0000000..464c1a5 --- /dev/null +++ b/assets/Tips_light.svg @@ -0,0 +1,9 @@ + + + 温馨提示 + + + + + + \ No newline at end of file diff --git a/assets/appicon_dark.svg b/assets/appicon_dark.svg new file mode 100644 index 0000000..2df3cc0 --- /dev/null +++ b/assets/appicon_dark.svg @@ -0,0 +1,119 @@ + + + 识图 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/appicon_light.svg b/assets/appicon_light.svg new file mode 100644 index 0000000..adc6c3b --- /dev/null +++ b/assets/appicon_light.svg @@ -0,0 +1,119 @@ + + + 识图 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/copy_dark.svg b/assets/copy_dark.svg new file mode 100644 index 0000000..d97da5b --- /dev/null +++ b/assets/copy_dark.svg @@ -0,0 +1,14 @@ + + + 复制 + + + + + + + + + + + \ No newline at end of file diff --git a/assets/copy_light.svg b/assets/copy_light.svg new file mode 100644 index 0000000..470a57d --- /dev/null +++ b/assets/copy_light.svg @@ -0,0 +1,14 @@ + + + 复制 + + + + + + + + + + + \ No newline at end of file diff --git a/assets/distinguish_dark.svg b/assets/distinguish_dark.svg new file mode 100644 index 0000000..493dc80 --- /dev/null +++ b/assets/distinguish_dark.svg @@ -0,0 +1,20 @@ + + + 识别文字 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/distinguish_light.svg b/assets/distinguish_light.svg new file mode 100644 index 0000000..4184025 --- /dev/null +++ b/assets/distinguish_light.svg @@ -0,0 +1,20 @@ + + + 识别文字 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/distinguish_normal_dark.svg b/assets/distinguish_normal_dark.svg new file mode 100644 index 0000000..024b3fe --- /dev/null +++ b/assets/distinguish_normal_dark.svg @@ -0,0 +1,24 @@ + + + 识别文字 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/distinguish_normal_light.svg b/assets/distinguish_normal_light.svg new file mode 100644 index 0000000..8af6b6c --- /dev/null +++ b/assets/distinguish_normal_light.svg @@ -0,0 +1,28 @@ + + + 识别文字 + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/download_dark.svg b/assets/download_dark.svg new file mode 100644 index 0000000..d58ad7e --- /dev/null +++ b/assets/download_dark.svg @@ -0,0 +1,12 @@ + + + 下载 + + + + + + + + + \ No newline at end of file diff --git a/assets/download_light.svg b/assets/download_light.svg new file mode 100644 index 0000000..7e450a7 --- /dev/null +++ b/assets/download_light.svg @@ -0,0 +1,12 @@ + + + 下载 + + + + + + + + + \ No newline at end of file diff --git a/assets/icon_toast_sucess_new.svg b/assets/icon_toast_sucess_new.svg new file mode 100644 index 0000000..7ea5209 --- /dev/null +++ b/assets/icon_toast_sucess_new.svg @@ -0,0 +1,33 @@ + + + + ok + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/ocr_dark.svg b/assets/ocr_dark.svg new file mode 100644 index 0000000..493dc80 --- /dev/null +++ b/assets/ocr_dark.svg @@ -0,0 +1,20 @@ + + + 识别文字 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/ocr_light.svg b/assets/ocr_light.svg new file mode 100644 index 0000000..4184025 --- /dev/null +++ b/assets/ocr_light.svg @@ -0,0 +1,20 @@ + + + 识别文字 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/tip_dark.svg b/assets/tip_dark.svg new file mode 100644 index 0000000..8a36626 --- /dev/null +++ b/assets/tip_dark.svg @@ -0,0 +1,9 @@ + + + 温馨提示 + + + + + + \ No newline at end of file diff --git a/assets/tip_light.svg b/assets/tip_light.svg new file mode 100644 index 0000000..464c1a5 --- /dev/null +++ b/assets/tip_light.svg @@ -0,0 +1,9 @@ + + + 温馨提示 + + + + + + \ No newline at end of file diff --git a/com.deepin.Ocr.service b/com.deepin.Ocr.service new file mode 100644 index 0000000..ca03175 --- /dev/null +++ b/com.deepin.Ocr.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=com.deepin.Ocr +Exec=/usr/bin/deepin-ocr --dbus diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..57ba8d1 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +deepin-ocr (1.0) unstable; urgency=medium + + * Pre-release for deepin-ocr 1.0 + + -- TagBuilder Fri, 10 May 2021 14:20:26 +0000 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +11 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..0b877ec --- /dev/null +++ b/debian/control @@ -0,0 +1,13 @@ +Source: deepin-ocr +Section: utils +Priority: optional +Maintainer: Deepin Packages Builder +Build-Depends: debhelper (>= 11), cmake, qtbase5-dev, pkg-config,libdtkwidget-dev +Standards-Version: 4.1.3 +Homepage: + +Package: deepin-ocr +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Ocr for UOS + Ocr is a text recognition software. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..810ab53 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,40 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: deepin-ocr +Upstream-Contact: https://github.com/linuxdeepin/deepin-ocr/issues +Source: https://github.com/linuxdeepin/deepin-ocr + +License: GPL-3+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFT diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..8ca1a79 --- /dev/null +++ b/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f +include /usr/share/dpkg/default.mk +export QT_SELECT=qt5 + +%: + dh $@ + +override_dh_auto_configure: + qmake + dh_auto_configure -- \ + -- VERSION=$(VERSION) LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) DEFINES+="VERSION=$(DEB_VERSION_UPSTREAM)" + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/deepin-ocr.pro b/deepin-ocr.pro new file mode 100644 index 0000000..a3845c4 --- /dev/null +++ b/deepin-ocr.pro @@ -0,0 +1,64 @@ +###################################################################### +# Automatically generated by qmake (3.1) Mon Jun 7 20:28:16 2021 +###################################################################### +TEMPLATE = app +TARGET = deepin-ocr +INCLUDEPATH += . + +# The following define makes your compiler warn you if you use any +# feature of Qt which has been marked as deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +# Input +HEADERS += src/mainwindow.h \ + src/service/ocrinterface.h \ + src/service/dbusocr_adaptor.h \ + src/ocrapplication.h \ + src/mainwidget.h \ + src/resulttextview.h \ + src/textloadwidget.h \ + src/view/imageview.h + +SOURCES += src/main.cpp \ + src/mainwindow.cpp \ + src/service/ocrinterface.cpp \ + src/service/dbusocr_adaptor.cpp \ + src/ocrapplication.cpp \ + src/mainwidget.cpp \ + src/textloadwidget.cpp \ + src/resulttextview.cpp \ + src/view/imageview.cpp + + +QT += dtkgui +QT += dtkwidget + + +#installs +target.path=/usr/bin + +#翻译 +isEmpty(TRANSLATIONS) { + include(./translations.pri) +} +TRANSLATIONS_COMPILED = $$TRANSLATIONS +TRANSLATIONS_COMPILED ~= s/\.ts/.qm/g +translations.path=/usr/share/deepin-ocr/translations +translations.files=$$TRANSLATIONS_COMPILED + +#Dbus文件 +dbus_service.path=/usr/share/dbus-1/services +dbus_service.files=./com.deepin.Ocr.service + + +INSTALLS += target dbus_service translations + +RESOURCES += \ + resource.qrc diff --git a/resource.qrc b/resource.qrc new file mode 100644 index 0000000..8a6d360 --- /dev/null +++ b/resource.qrc @@ -0,0 +1,17 @@ + + + assets/tip_dark.svg + assets/tip_light.svg + assets/download_light.svg + assets/icon_toast_sucess_new.svg + assets/download_dark.svg + assets/distinguish_normal_light.svg + assets/distinguish_normal_dark.svg + assets/distinguish_light.svg + assets/distinguish_dark.svg + assets/appicon_dark.svg + assets/appicon_light.svg + assets/copy_dark.svg + assets/copy_light.svg + + diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..79067a5 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,102 @@ +/* +* Copyright (C) 2020 ~ 2021 Deepin Technology Co., Ltd. +* +* Author: He MingYang Hao +* +* Maintainer: He MingYang +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ +#include "ocrapplication.h" +#include "service/ocrinterface.h" +#include "service/dbusocr_adaptor.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +int main(int argc, char *argv[]) +{ + + if (argc < 2) { + qDebug() << "Cant open a null file"; + return 0; + } + + + DGuiApplicationHelper::setUseInactiveColorGroup(false); +#if(DTK_VERSION < DTK_VERSION_CHECK(5,4,0,0)) + DApplication::loadDXcbPlugin(); + QScopedPointer app(new DApplication(argc, argv)); +#else + QScopedPointer app(DApplication::globalApplication(argc,argv)); +#endif + app->setOrganizationName("deepin"); + app->setApplicationName("deepin-ocr"); + app->setApplicationVersion("1.0"); + + Dtk::Core::DLogManager::registerConsoleAppender(); + Dtk::Core::DLogManager::registerFileAppender(); + + QCommandLineOption dbusOption(QStringList() << "u" << "dbus", "Start from dbus."); + QCommandLineParser cmdParser; + cmdParser.setApplicationDescription("deepin-Ocr"); + cmdParser.addHelpOption(); + cmdParser.addVersionOption(); + cmdParser.addOption(dbusOption); + cmdParser.process(*app); + + app->loadTranslator(); + + OcrApplication instance; + QDBusConnection dbus = QDBusConnection::sessionBus(); + + if (dbus.registerService("com.deepin.Ocr")) { + // 第一次启动 + // 注册Dbus服务和对象 + dbus.registerObject("/com/deepin/Ocr", &instance); + // 初始化适配器 + new DbusOcrAdaptor(&instance); + + if (cmdParser.isSet(dbusOption)) { + // 第一调用已 --dbus参数启动 + qDebug() << "dbus register waiting!"; + return app->exec(); + } + + instance.openFile(QString(argv[1])); + } else { + // 第二次运行此应用, + // 调用DBus接口,处理交给第一次调用的进程 + // 本进程退退出 + OcrInterface *pOcr = new OcrInterface("com.deepin.Ocr","/com/deepin/Ocr", QDBusConnection::sessionBus(), &instance); + qDebug() << __FUNCTION__ << __LINE__; + pOcr->openFile(QString(argv[1])); + //pOcr->openImage(QImage(QSize(500, 145), QImage::Format_RGB32)); + return 0; + } + + return app->exec(); +} + + diff --git a/src/mainwidget.cpp b/src/mainwidget.cpp new file mode 100644 index 0000000..f9c77dd --- /dev/null +++ b/src/mainwidget.cpp @@ -0,0 +1,315 @@ +#include "mainwidget.h" +#include "view/imageview.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#define App (static_cast(QCoreApplication::instance())) +MainWidget::MainWidget(QWidget *parent) : + DWidget(parent) +{ + setupUi(this); + DGuiApplicationHelper::ColorType themeType = DGuiApplicationHelper::instance()->themeType(); + setIcons(themeType); + + setupConnect(); + +} + +MainWidget::~MainWidget() +{ +// m_mainGridLayout->addLayout(m_buttonHorizontalLayout, 1, 0, 1, 1); + m_mainGridLayout->removeItem(m_buttonHorizontalLayout); + if (m_imageview) { + m_imageview->deleteLater(); + m_imageview = nullptr; + } + if (m_mainGridLayout) { + m_mainGridLayout->deleteLater(); + m_mainGridLayout = nullptr; + } + if (m_horizontalLayout) { + m_horizontalLayout->deleteLater(); + m_horizontalLayout = nullptr; + } + if (m_plainTextEdit) { + m_plainTextEdit->deleteLater(); + m_plainTextEdit = nullptr; + } + if (m_buttonHorizontalLayout) { + m_buttonHorizontalLayout->deleteLater(); + m_buttonHorizontalLayout = nullptr; + } + if (m_tipHorizontalLayout) { + m_tipHorizontalLayout->deleteLater(); + m_tipHorizontalLayout = nullptr; + } + if (m_tiplabel) { + m_tiplabel->deleteLater(); + m_tiplabel = nullptr; + } + if (m_copyBtn) { + m_copyBtn->deleteLater(); + m_copyBtn = nullptr; + } + if (m_exportBtn) { + m_exportBtn->deleteLater(); + m_exportBtn = nullptr; + } + if (m_tipIconLabel) { + m_tipIconLabel->deleteLater(); + m_tipIconLabel = nullptr; + } + +} + +void MainWidget::setupUi(QWidget *Widget) +{ + + DMainWindow *mainWindow = static_cast(this->parent()); + if (mainWindow) { + mainWindow->titlebar()->setMenuVisible(false); + } + m_mainGridLayout = new QGridLayout(Widget); + m_mainGridLayout->setSpacing(6); + m_mainGridLayout->setContentsMargins(0, 0, 0, 0); + m_mainGridLayout->setObjectName(QStringLiteral("gridLayout")); + + m_horizontalLayout = new QHBoxLayout(Widget); + m_horizontalLayout->setSpacing(0); + m_horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); + + m_plainTextEdit = new ResultTextView(Widget); + m_plainTextEdit->setObjectName(QStringLiteral("plainTextEdit")); + + if (!m_imageview) { + m_imageview = new ImageView(); + } + + m_horizontalLayout->addWidget(m_imageview); + m_horizontalLayout->addWidget(m_plainTextEdit); + m_horizontalLayout->setStretch(0, 1); + + m_mainGridLayout->addLayout(m_horizontalLayout, 0, 0, 1, 1); + m_mainGridLayout->setColumnStretch(0, 1); + + m_buttonHorizontalLayout = new QHBoxLayout(Widget); + m_buttonHorizontalLayout->setContentsMargins(20, 0, 59, 0); //表示控件与窗体的左右边距 +// m_buttonHorizontalLayout->setSpacing(30); + m_buttonHorizontalLayout->setObjectName(QStringLiteral("horizontalLayout_2")); + + m_tipHorizontalLayout = new QHBoxLayout(Widget); + + m_tipIconLabel = new DLabel(Widget); + m_tipIconLabel->setObjectName(QStringLiteral("tipIconLabel")); + + m_tipHorizontalLayout->addWidget(m_tipIconLabel); + + m_tiplabel = new DLabel(Widget); + m_tiplabel->setObjectName(QStringLiteral("tiplabel")); + + m_tipHorizontalLayout->addWidget(m_tiplabel); + + m_buttonHorizontalLayout->addLayout(m_tipHorizontalLayout); + QSpacerItem *horizontalSpacer = new QSpacerItem(159, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); m_buttonHorizontalLayout->addItem(horizontalSpacer); + m_buttonHorizontalLayout->addItem(horizontalSpacer); + + m_copyBtn = new DIconButton(Widget); + m_copyBtn->setObjectName(QStringLiteral("Copy")); + m_copyBtn->setMaximumSize(QSize(40, 40)); + + m_buttonHorizontalLayout->addWidget(m_copyBtn); + + m_exportBtn = new DIconButton(Widget); + m_exportBtn->setObjectName(QStringLiteral("Export")); + m_exportBtn->setMaximumSize(QSize(40, 40)); + + m_buttonHorizontalLayout->addWidget(m_exportBtn); + + + m_mainGridLayout->addLayout(m_buttonHorizontalLayout, 1, 0, 1, 1); + + + retranslateUi(Widget); + + QMetaObject::connectSlotsByName(Widget); + m_pwidget = new QWidget(this); + m_pwidget->setFocusPolicy(Qt::NoFocus); + m_pwidget->setAttribute(Qt::WA_TransparentForMouseEvents); + m_pwidget->setFixedSize(this->width(), this->height() - 23); + m_pwidget->move(0, 0); + + createLoadingUi(); +// deleteLoadingUi(); + +} + +void MainWidget::setupConnect() +{ + connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::paletteTypeChanged, this, &MainWidget::setIcons); + connect(m_exportBtn, &DIconButton::clicked, this, &MainWidget::slotExport); + connect(m_copyBtn, &DIconButton::clicked, this, &MainWidget::slotCopy); +} + +void MainWidget::retranslateUi(QWidget *Widget) +{ + Widget->setWindowTitle(QApplication::translate("Widget", "Widget", nullptr)); + m_tiplabel->setText(QApplication::translate("Widget", "Tips: The clearer the image is, the more accurate the text is", nullptr)); +// m_copyBtn->setText(QApplication::translate("Widget", "Copy", nullptr)); + // m_exportBtn->setText(QApplication::translate("Widget", "Export", nullptr)); +} + +void MainWidget::createLoadingUi() +{ + m_isLoading = true; + m_loadingWidget = new TextLoadWidget(this); + m_loadingWidget->resize(40, 40); + m_loadingWidget->show(); + m_loadingTip = new DLabel(tr("Recognizing"), this); + m_loadingTip->show(); + DGuiApplicationHelper::ColorType themeType = DGuiApplicationHelper::instance()->themeType(); + if (themeType == DGuiApplicationHelper::DarkType) { + m_imageview->setForegroundBrush(QColor(0, 0, 0, 150)); //设置场景的前景色,类似于遮罩 + } else { + m_imageview->setForegroundBrush(QColor(255, 255, 255, 150)); //设置场景的前景色,类似于遮罩 + } +} + +void MainWidget::deleteLoadingUi() +{ + m_isLoading = false; + if (m_loadingWidget) { + m_loadingWidget->deleteLater(); + m_loadingWidget = nullptr; + } + if (m_loadingTip) { + m_loadingTip->deleteLater(); + m_loadingTip = nullptr; + } + m_imageview->setForegroundBrush(QColor(0, 0, 0, 0)); //设置场景的前景色,类似于遮罩 +} + +void MainWidget::loadingUi() +{ + if (m_loadingWidget && m_loadingTip && m_plainTextEdit) { + int x = this->width() - m_plainTextEdit->width() / 2; + int y = this->height() / 2 - 50; + m_loadingWidget->move(x, y); + m_loadingTip->move(x - 20, y + 24); + } +} + +void MainWidget::openImage(const QString &path) +{ + QImage img(path); + m_imageview->openFilterImage(img); + m_imageview->fitWindow(); + m_imgName = path; +} + +void MainWidget::openImage(const QImage &img) +{ + m_imageview->openFilterImage(img); + m_imageview->fitWindow(); + m_imgName = ""; +} + +void MainWidget::resizeEvent(QResizeEvent *event) +{ + loadingUi(); + return DWidget::resizeEvent(event); +} + + +void MainWidget::slotCopy() +{ + QIcon icon(":/assets/icon_toast_sucess_new.svg"); + DFloatingMessage *pDFloatingMessage = new DFloatingMessage(DFloatingMessage::MessageType::TransientType, this); + pDFloatingMessage->setBlurBackgroundEnabled(true); + pDFloatingMessage->setMessage(tr("Copied")); + pDFloatingMessage->setIcon(icon); + pDFloatingMessage->raise(); + DMessageManager::instance()->sendMessage(this, pDFloatingMessage); + m_plainTextEdit->copy(); +} + +void MainWidget::slotExport() +{ + QStringList list = QStandardPaths::standardLocations(QStandardPaths::DownloadLocation); + QString download = ""; + if (list.size() > 0) { + download = list.at(0); + } else { + QStringList home = QStandardPaths::standardLocations(QStandardPaths::HomeLocation); + if (home.size() > 0) { + download = home.at(0) + "/Downloads"; + } + } + + QString fileName = QFileInfo(m_imgName).completeBaseName(); + QString file_path = QFileDialog::getSaveFileName(this, "save as", download + "/" + fileName, "*.txt"); + qDebug() << file_path; + + QString path = file_path + ".txt"; + QFile file(path); + if (file.open(QFile::WriteOnly | QFile::Text)) { + QTextStream out(&file); + out << m_plainTextEdit->document()->toPlainText(); + } +} + +void MainWidget::setIcons(DGuiApplicationHelper::ColorType themeType) +{ + if (themeType == DGuiApplicationHelper::DarkType) { + m_tipIconLabel->setPixmap(QPixmap(":/assets/tip_dark.svg")); + m_tipIconLabel->setFixedSize(QSize(14, 14)); + + m_copyBtn->setIcon(QIcon(":/assets/copy_dark.svg")); + m_copyBtn->setIconSize(QSize(36, 36)); + m_copyBtn->setFlat(true); + + m_exportBtn->setIcon(QIcon(":/assets/download_dark.svg")); + m_exportBtn->setIconSize(QSize(36, 36)); + m_exportBtn->setFlat(true); + + App->setWindowIcon(QIcon(":/assets/appicon_dark.svg")); + DMainWindow *mainWindow = static_cast(this->parent()); + if (mainWindow) { + mainWindow->titlebar()->setIcon(QIcon(":/assets/appicon_dark.svg")); + } + if (m_isLoading) { + m_imageview->setForegroundBrush(QColor(0, 0, 0, 150)); //设置场景的前景色,类似于遮罩 + } + } else { + m_tipIconLabel->setPixmap(QPixmap(":/assets/tip_light.svg")); + m_tipIconLabel->setFixedSize(QSize(14, 14)); + + m_copyBtn->setIcon(QIcon(":/assets/copy_light.svg")); + m_copyBtn->setIconSize(QSize(36, 36)); + m_copyBtn->setFlat(true); + + m_exportBtn->setIcon(QIcon(":/assets/download_light.svg")); + m_exportBtn->setIconSize(QSize(36, 36)); + m_exportBtn->setFlat(true); + + App->setWindowIcon(QIcon(":/assets/appicon_light.svg")); + DMainWindow *mainWindow = static_cast(this->parent()); + if (mainWindow) { + mainWindow->titlebar()->setIcon(QIcon(":/assets/appicon_light.svg")); + } + if (m_isLoading) { + m_imageview->setForegroundBrush(QColor(255, 255, 255, 150)); //设置场景的前景色,类似于遮罩 + } + } +} // setupUi diff --git a/src/mainwidget.h b/src/mainwidget.h new file mode 100644 index 0000000..59c523c --- /dev/null +++ b/src/mainwidget.h @@ -0,0 +1,66 @@ +#ifndef WIDGET_H +#define WIDGET_H + +#include +#include +#include +#include +#include + +#include "resulttextview.h" +#include "textloadwidget.h" +class QGridLayout; +class QHBoxLayout; +class ImageView; + +DWIDGET_USE_NAMESPACE + +class MainWidget : public DWidget +{ + Q_OBJECT + +public: + explicit MainWidget(QWidget *parent = nullptr); + ~MainWidget(); + + void setupUi(QWidget *Widget); + void setupConnect(); + void retranslateUi(QWidget *Widget); + + void createLoadingUi(); + void deleteLoadingUi(); + void loadingUi(); + + + void openImage(const QString &path); + void openImage(const QImage &img); +protected: + void resizeEvent(QResizeEvent *event); +private slots: + void setIcons(DGuiApplicationHelper::ColorType themeType); + + void slotCopy(); + void slotExport(); + +// void change() +private: + QGridLayout *m_mainGridLayout{nullptr}; + QHBoxLayout *m_horizontalLayout{nullptr}; + ResultTextView *m_plainTextEdit{nullptr}; + QHBoxLayout *m_buttonHorizontalLayout{nullptr}; + QHBoxLayout *m_tipHorizontalLayout{nullptr}; + DLabel *m_tiplabel{nullptr}; + DIconButton *m_copyBtn{nullptr}; + DIconButton *m_exportBtn{nullptr}; + ImageView *m_imageview{nullptr}; + DLabel *m_tipIconLabel{nullptr}; + + QString m_imgName; //当前图片绝对路径 + QWidget *m_pwidget{nullptr}; + TextLoadWidget *m_loadingWidget{nullptr}; + DLabel *m_loadingTip{nullptr}; + + bool m_isLoading{false}; +}; + +#endif // WIDGET_H diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp new file mode 100644 index 0000000..0976a68 --- /dev/null +++ b/src/mainwindow.cpp @@ -0,0 +1,55 @@ +/* +* Copyright (C) 2020 ~ 2021 Deepin Technology Co., Ltd. +* +* Author: He MingYang Hao +* +* Maintainer: He MingYang +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#include "mainwindow.h" +#include "mainwidget.h" +#include "service/dbusocr_adaptor.h" + +#include +#include +#include + +MainWindow::MainWindow(QWidget *parent) + : DMainWindow(parent) +{ + if (!m_mainWidget) { + m_mainWidget = new MainWidget(this); + } + this->setCentralWidget(m_mainWidget); +} + +MainWindow::~MainWindow() +{ + +} + + +bool MainWindow::openFile(const QString &filePaths) +{ + m_mainWidget->openImage(filePaths); + return true; +} + +bool MainWindow::openImage(const QImage &image) +{ + m_mainWidget->openImage(image); + return true; +} diff --git a/src/mainwindow.h b/src/mainwindow.h new file mode 100644 index 0000000..0f910b3 --- /dev/null +++ b/src/mainwindow.h @@ -0,0 +1,44 @@ +/* +* Copyright (C) 2020 ~ 2021 Deepin Technology Co., Ltd. +* +* Author: He MingYang Hao +* +* Maintainer: He MingYang +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + +class MainWidget; +DWIDGET_USE_NAMESPACE +class MainWindow : public DMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow() override; + + bool openFile(const QString &filePaths); + + bool openImage(const QImage &image); +private: + MainWidget *m_mainWidget{nullptr}; +}; +#endif // MAINWINDOW_H diff --git a/src/ocrapplication.cpp b/src/ocrapplication.cpp new file mode 100644 index 0000000..eb079c1 --- /dev/null +++ b/src/ocrapplication.cpp @@ -0,0 +1,48 @@ +/* +* Copyright (C) 2020 ~ 2021 Deepin Technology Co., Ltd. +* +* Author: He MingYang Hao +* +* Maintainer: He MingYang +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#include "ocrapplication.h" +#include "mainwindow.h" + + +OcrApplication::OcrApplication(QObject *parent) : QObject(parent) +{ + +} + +bool OcrApplication::openFile(QString filePath) +{ + qDebug() << __FUNCTION__ << __LINE__ << filePath; + MainWindow *win = new MainWindow(); + win->openFile(filePath); + win->resize(800, 600); + win->show(); + return true; +} + +void OcrApplication::openImage(QImage image) +{ + qDebug() << __FUNCTION__ << __LINE__ << image.size(); + MainWindow *win = new MainWindow(); + win->openImage(image); + win->resize(800, 600); + win->show(); +} diff --git a/src/ocrapplication.h b/src/ocrapplication.h new file mode 100644 index 0000000..9aa6471 --- /dev/null +++ b/src/ocrapplication.h @@ -0,0 +1,47 @@ +/* +* Copyright (C) 2020 ~ 2021 Deepin Technology Co., Ltd. +* +* Author: He MingYang Hao +* +* Maintainer: He MingYang +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + + +#ifndef OCRAPPLICATION_H +#define OCRAPPLICATION_H + +#include "mainwindow.h" +#include +#include + +class OcrApplication : public QObject +{ + Q_OBJECT +public: + explicit OcrApplication(QObject *parent = nullptr); + + Q_INVOKABLE bool openFile(QString filePath); + + Q_INVOKABLE void openImage(QImage image); + + +signals: + +public slots: + +}; + +#endif // OCRAPPLICATION_H diff --git a/src/resulttextview.cpp b/src/resulttextview.cpp new file mode 100644 index 0000000..673c3b4 --- /dev/null +++ b/src/resulttextview.cpp @@ -0,0 +1,44 @@ +#include "resulttextview.h" +#include + +ResultTextView::ResultTextView(QWidget *parent) + : m_Menu(nullptr), m_actCopy(nullptr), m_actCut(nullptr), m_actSelectAll(nullptr) +{ + Q_UNUSED(parent) + m_Menu = new QMenu(this); + m_actCopy = new QAction(this); + m_actCopy->setText(tr("Copy")); + m_actCut = new QAction(this); + m_actCut->setText(tr("Cut")); + m_actSelectAll = new QAction(this); + m_actSelectAll->setText(tr("SelectAll")); + + m_Menu->addAction(m_actSelectAll); + m_Menu->addAction(m_actCopy); + m_Menu->addAction(m_actCut); + + connect(m_actSelectAll, &QAction::triggered, this, [ = ]() { + emit this->selectAll(); + }); + connect(m_actCopy, &QAction::triggered, this, [ = ]() { + emit this->copy(); + }); + connect(m_actCut, &QAction::triggered, this, [ = ]() { + emit this->cut(); + }); +} + +void ResultTextView::contextMenuEvent(QContextMenuEvent *e) +{ + Q_UNUSED(e) + //当前是否有选中文本 + QString select_str = this->textCursor().selectedText(); + if (select_str.length() < 1) { + m_actCopy->setEnabled(false); + m_actCut->setEnabled(false); + } else { + m_actCopy->setEnabled(true); + m_actCut->setEnabled(true); + } + m_Menu->exec(QCursor::pos()); +} diff --git a/src/resulttextview.h b/src/resulttextview.h new file mode 100644 index 0000000..464157d --- /dev/null +++ b/src/resulttextview.h @@ -0,0 +1,27 @@ +#ifndef RESULTTEXTVIEW_H +#define RESULTTEXTVIEW_H + +#include +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +class ResultTextView : public DPlainTextEdit +{ + Q_OBJECT +public: + explicit ResultTextView(QWidget *parent = nullptr); + +protected: + void contextMenuEvent(QContextMenuEvent *e) override; + +private: + QMenu *m_Menu; + QAction *m_actCopy; + QAction *m_actCut; + QAction *m_actSelectAll; +}; + +#endif // RESULTTEXTVIEW_H diff --git a/src/service/dbusocr_adaptor.cpp b/src/service/dbusocr_adaptor.cpp new file mode 100644 index 0000000..daee46a --- /dev/null +++ b/src/service/dbusocr_adaptor.cpp @@ -0,0 +1,64 @@ +/* +* Copyright (C) 2020 ~ 2021 Deepin Technology Co., Ltd. +* +* Author: He MingYang Hao +* +* Maintainer: He MingYang +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + + +#include "dbusocr_adaptor.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DbusOcrAdaptor::DbusOcrAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +DbusOcrAdaptor::~DbusOcrAdaptor() +{ + // destructor +} + + +bool DbusOcrAdaptor::openFile(QString filePath) +{ + qDebug() << __FUNCTION__ << __LINE__; + QMetaObject::invokeMethod(parent(), "openFile", Q_ARG(QString, filePath)); + return true; +} + +void DbusOcrAdaptor::openImage(QByteArray images) +{ + qDebug() << __FUNCTION__ << __LINE__; + QByteArray data = images; + QString tmp_data = QString::fromLatin1(data.data(), data.size()); + QByteArray srcData = QByteArray::fromBase64(tmp_data.toLatin1()); + data = qUncompress(srcData); + QImage image; + image.loadFromData(data); + QMetaObject::invokeMethod(parent(), "openImage", Q_ARG(QImage, image)); +} diff --git a/src/service/dbusocr_adaptor.h b/src/service/dbusocr_adaptor.h new file mode 100644 index 0000000..409aecd --- /dev/null +++ b/src/service/dbusocr_adaptor.h @@ -0,0 +1,67 @@ +/* +* Copyright (C) 2020 ~ 2021 Deepin Technology Co., Ltd. +* +* Author: He MingYang Hao +* +* Maintainer: He MingYang +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ +#ifndef DBUSOCR_ADAPTOR_H +#define DBUSOCR_ADAPTOR_H + +#include +#include +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * @bref: dbusocr_adaptor 提供给外部程序调用的方法 +*/ +class DbusOcrAdaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "com.deepin.Ocr") + Q_CLASSINFO("D-Bus Introspection", "" + " \n" + + " \n" + " \n" + " \n" + + " \n" + " \n" + " \n" + " \n" + + " \n") +public: + explicit DbusOcrAdaptor(QObject *parent); + virtual ~DbusOcrAdaptor(); + +public Q_SLOTS: // METHODS + void openImage(QByteArray images); + + bool openFile(QString filePath); + +Q_SIGNALS: // SIGNALS +}; + +#endif // DBUSDRAW_ADAPTOR_H diff --git a/src/service/ocrinterface.cpp b/src/service/ocrinterface.cpp new file mode 100644 index 0000000..7dcfa64 --- /dev/null +++ b/src/service/ocrinterface.cpp @@ -0,0 +1,34 @@ +/* +* Copyright (C) 2020 ~ 2021 Deepin Technology Co., Ltd. +* +* Author: He MingYang Hao +* +* Maintainer: He MingYang +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ +#include "ocrinterface.h" +#include + +OcrInterface::OcrInterface(const QString &serviceName, const QString &ObjectPath, + const QDBusConnection &connection, QObject *parent) + : QDBusAbstractInterface(serviceName, ObjectPath, staticInterfaceName(), connection, parent) +{ + +} + +OcrInterface::~OcrInterface() +{ + +} diff --git a/src/service/ocrinterface.h b/src/service/ocrinterface.h new file mode 100644 index 0000000..d6fbdf8 --- /dev/null +++ b/src/service/ocrinterface.h @@ -0,0 +1,92 @@ +/* +* Copyright (C) 2020 ~ 2021 Deepin Technology Co., Ltd. +* +* Author: He MingYang Hao +* +* Maintainer: He MingYang +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ +#ifndef OCRINTERFACE_H +#define OCRINTERFACE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class OcrInterface: public QDBusAbstractInterface +{ + Q_OBJECT +public: + static inline const char *staticInterfaceName() + { + return "com.deepin.Ocr"; + } + +public: + /* + * @param: serviceName QDBusConnection 注册的服务名字 + * @param: ObjectPath QDBusConnection 注册的对象路径 + */ + OcrInterface(const QString &serviceName, const QString &ObjectPath, + const QDBusConnection &connection, QObject *parent = nullptr); + QDBusConnection dbus = QDBusConnection::sessionBus(); + ~OcrInterface(); + +public Q_SLOTS: // METHODS + /* + * @bref:openFile 通过路径打开图片文件 + * @param: filePath 图片的路径 + * @return: QDBusPendingReply + */ + inline QDBusPendingReply<> openFile(const QString &filePath) + { + return call(QStringLiteral("openFile"), filePath); + } + + /* + * @bref:openImages + * @param: image 图片 + * @return: QDBusPendingReply + * @note: + */ + inline QDBusPendingReply<> openImage(const QImage &image) + { + qDebug() << __FUNCTION__; + QByteArray data; + QBuffer buf(&data); + if (image.save(&buf, "PNG")) { + data = qCompress(data, 9); + data = data.toBase64(); + } + return call(QStringLiteral("openImage"), QVariant::fromValue(data)); + } + +Q_SIGNALS: // SIGNALS +}; + +namespace com { +namespace deepin { +typedef ::OcrInterface Ocr; +} +} +#endif // DRAWINTERFACE_H diff --git a/src/textloadwidget.cpp b/src/textloadwidget.cpp new file mode 100644 index 0000000..2f073c2 --- /dev/null +++ b/src/textloadwidget.cpp @@ -0,0 +1,13 @@ +#include "textloadwidget.h" +#include + +TextLoadWidget::TextLoadWidget(DWidget *parent) + : DWidget(parent) +{ + this->setWindowFlags(Qt::FramelessWindowHint); + setAttribute(Qt::WA_TranslucentBackground, true); + m_spinner = new DSpinner(this); + m_spinner->start(); + m_spinner->setFixedSize(24, 24); + m_spinner->show(); +} diff --git a/src/textloadwidget.h b/src/textloadwidget.h new file mode 100644 index 0000000..7e10638 --- /dev/null +++ b/src/textloadwidget.h @@ -0,0 +1,22 @@ +#ifndef TEXTLOADWIDGET_H +#define TEXTLOADWIDGET_H + +#include +#include +#include + +DWIDGET_USE_NAMESPACE +class QVBoxLayout; + +class TextLoadWidget : public DWidget +{ + Q_OBJECT +public: + TextLoadWidget(DWidget *parent = nullptr); +private : + DSpinner *m_spinner{nullptr}; + QVBoxLayout *m_vboxLayout{nullptr}; + DLabel *m_label{nullptr}; +}; + +#endif // TEXTLOADWIDGET_H diff --git a/src/view/imageview.cpp b/src/view/imageview.cpp new file mode 100644 index 0000000..3998aec --- /dev/null +++ b/src/view/imageview.cpp @@ -0,0 +1,278 @@ +#include "imageview.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +const qreal MAX_SCALE_FACTOR = 20.0; +const qreal MIN_SCALE_FACTOR = 0.029; +#define devicePixelRatioF devicePixelRatio +ImageView::ImageView(QWidget *parent): + QGraphicsView(parent) +{ + setMouseTracking(true); + setDragMode(ScrollHandDrag); + QGraphicsScene *scene = new QGraphicsScene(this); + setScene(scene); + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); +} + +void ImageView::openImage(const QString &path) +{ + if (scene()) { + + if (m_currentImage) { + delete m_currentImage; + m_currentImage = nullptr; + } + m_currentImage = new QImage(path); + + if (!m_currentImage->isNull()) { + QPixmap pic = QPixmap::fromImage(*m_currentImage); + + scene()->clear(); + m_pixmapItem = new QGraphicsPixmapItem(pic); + m_pixmapItem->setTransformationMode(Qt::SmoothTransformation); + QRectF rect = m_pixmapItem->boundingRect(); + setSceneRect(rect); + scene()->addItem(m_pixmapItem); + fitWindow(); + m_currentPath = path; + } else { + // App->setStackWidget(0); + } + m_FilterImage = image(); + } +} + +void ImageView::openFilterImage(QImage img) +{ + if (!img.isNull() && scene()) { + m_FilterImage = img; + } + QPixmap pic = QPixmap::fromImage(img); + if (!pic.isNull()) { + scene()->clear(); + m_pixmapItem = new QGraphicsPixmapItem(pic); + m_pixmapItem->setTransformationMode(Qt::SmoothTransformation); + QRectF rect = m_pixmapItem->boundingRect(); + setSceneRect(rect); + scene()->addItem(m_pixmapItem); + fitWindow(); + } + + +} +qreal ImageView::windowRelativeScale() const +{ + QRectF bf = sceneRect(); + if (this->window()->isFullScreen()) { + if (1.0 * (width()) / (height() + 15) > 1.0 * bf.width() / bf.height()) { + return 1.0 * (height() + 15) / bf.height(); + } else { + return 1.0 * (width()) / bf.width(); + } + } else { + if (1.0 * (width() - 20) / (height() - 180) > 1.0 * bf.width() / bf.height()) { + return 1.0 * (height() - 180) / bf.height(); + } else { + return 1.0 * (width() - 20) / bf.width(); + } + } +} +void ImageView::fitWindow() +{ + qreal wrs = windowRelativeScale(); + m_scal = wrs; + resetTransform(); + scale(wrs, wrs); + + // if (wrs - 1 > -0.01 && wrs - 1 < 0.01) { + // emit checkAdaptImageBtn(); + // } else { + // emit disCheckAdaptImageBtn(); + // } + m_isFitImage = false; + m_isFitWindow = true; + +} + +void ImageView::fitImage() +{ + resetTransform(); + m_scal = 1.0; + scale(1, 1); + m_isFitImage = true; + m_isFitWindow = false; +} + +void ImageView::RotateImage(const int &index) +{ + if (!m_pixmapItem && scene()) return; + QPixmap pixmap = m_pixmapItem->pixmap(); + QMatrix rotate; + rotate.rotate(index); + + pixmap = pixmap.transformed(rotate, Qt::FastTransformation); + pixmap.setDevicePixelRatio(devicePixelRatioF()); + scene()->clear(); + resetTransform(); + m_pixmapItem = new QGraphicsPixmapItem(pixmap); + m_pixmapItem->setTransformationMode(Qt::SmoothTransformation); + // Make sure item show in center of view after reload + QRectF rect = m_pixmapItem->boundingRect(); + setSceneRect(rect); + scene()->addItem(m_pixmapItem); + + autoFit(); + m_rotateAngel += index; + + m_FilterImage = image(); + + +} +void ImageView::savecurrentPic() +{ + QString filename = QFileDialog::getSaveFileName(this, tr("Save Image"), "", tr("Images (*.png *.bmp *.jpg)")); //选择路径 + image().save(filename); +} + +void ImageView::savecurrentPicAs() +{ + QFileDialog fileDialog; + QString fileName = fileDialog.getSaveFileName(this, tr("Open File"), "/home", tr("png")); + if (fileName == "") { + return; + } + QFile file(fileName); + if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { + QMessageBox::warning(this, tr("error"), tr("open file error")); + return; + } else { + image().save(fileName, "png"); + } +} + +void ImageView::openImage(QImage *img) +{ + if (!img->isNull() && scene()) { + QPixmap pic = QPixmap::fromImage(*img); + if (!pic.isNull()) { + scene()->clear(); + m_pixmapItem = new QGraphicsPixmapItem(pic); + m_pixmapItem->setTransformationMode(Qt::SmoothTransformation); + QRectF rect = m_pixmapItem->boundingRect(); + setSceneRect(rect); + scene()->addItem(m_pixmapItem); + fitWindow(); + } + } +} + +qreal ImageView::imageRelativeScale() const +{ + return transform().m11() / devicePixelRatioF(); +} +void ImageView::autoFit() +{ + if (image().isNull()) + return; + + QSize image_size = image().size(); + + // change some code in graphicsitem.cpp line100. + + if ((image_size.width() >= width() || image_size.height() >= height() - 150) && width() > 0 && + height() > 0) { + fitWindow(); + } else { + fitImage(); + } + +} + +void ImageView::mouseMoveEvent(QMouseEvent *event) +{ + return QGraphicsView::mouseMoveEvent(event); +} + + +const QImage ImageView::image() +{ + if (m_pixmapItem) { + return m_pixmapItem->pixmap().toImage(); + } else { + return QImage(); + } +} + +void ImageView::resizeEvent(QResizeEvent *event) +{ + + return QGraphicsView::resizeEvent(event); +} + +void ImageView::wheelEvent(QWheelEvent *event) +{ + qreal factor = qPow(1.2, event->delta() / 240.0); + scaleAtPoint(event->pos(), factor); + + event->accept(); +} +void ImageView::scaleAtPoint(QPoint pos, qreal factor) +{ + // Remember zoom anchor point. + const QPointF targetPos = pos; + const QPointF targetScenePos = mapToScene(targetPos.toPoint()); + + // Do the scaling. + setScaleValue(factor); + // Restore the zoom anchor point. + // + // The Basic idea here is we don't care how the scene is scaled or transformed, + // we just want to restore the anchor point to the target position we've + // remembered, in the coordinate of the view/viewport. + const QPointF curPos = mapFromScene(targetScenePos); + const QPointF centerPos = QPointF(width() / 2.0, height() / 2.0) + (curPos - targetPos); + const QPointF centerScenePos = mapToScene(centerPos.toPoint()); + centerOn(static_cast(centerScenePos.x()), static_cast(centerScenePos.y())); +} +void ImageView::setScaleValue(qreal v) +{ + //由于矩阵被旋转,通过矩阵获取缩放因子,计算缩放比例错误,因此记录过程中的缩放因子来判断缩放比例 + m_scal *= v; + qDebug() << m_scal; + scale(v, v); + //const qreal irs = imageRelativeScale() * devicePixelRatioF(); + // Rollback + if (v < 1 && /*irs <= MIN_SCALE_FACTOR)*/m_scal < 0.03) { + const qreal minv = MIN_SCALE_FACTOR / m_scal; + // if (minv < 1.09) return; + scale(minv, minv); + m_scal *= minv; + } else if (v > 1 && /*irs >= MAX_SCALE_FACTOR*/m_scal > 20) { + const qreal maxv = MAX_SCALE_FACTOR / m_scal; + scale(maxv, maxv); + m_scal *= maxv; + } else { + m_isFitImage = false; + m_isFitWindow = false; + } + +// qreal rescale = imageRelativeScale() * devicePixelRatioF(); + // if (rescale - 1 > -0.01 && rescale - 1 < 0.01) { + // emit checkAdaptImageBtn(); + // } else { + // emit disCheckAdaptImageBtn(); + // } + + +} diff --git a/src/view/imageview.h b/src/view/imageview.h new file mode 100644 index 0000000..74c3fc7 --- /dev/null +++ b/src/view/imageview.h @@ -0,0 +1,68 @@ +/* + *图像显示界面 +*/ +#ifndef IMAGEVIEW_H +#define IMAGEVIEW_H + +#include + +class QGraphicsPixmapItem; + + + +class ImageView : public QGraphicsView +{ + Q_OBJECT +public: + ImageView(QWidget *parent = nullptr); + //通过路径打开图片 + void openImage(const QString &path); + + //用于鼠标滚轮滑动 + qreal windowRelativeScale() const; + qreal imageRelativeScale() const; + void scaleAtPoint(QPoint pos, qreal factor); + void setScaleValue(qreal v); + //自适应窗口 + void autoFit(); + //鼠标移动事件 + void mouseMoveEvent(QMouseEvent *event) override; + + //返回当前图片img + const QImage image(); + void openFilterImage(QImage img); +public slots: + //适应窗口大小 + void fitWindow(); + //适应图片大小 + void fitImage(); + //旋转图片,感觉index角度,-为左,+为右 + void RotateImage(const int &index); + //保存图片 + void savecurrentPic(); + //另存为 + void savecurrentPicAs(); + //打开该图片 + void openImage(QImage *img); + + //窗口大小改变事件 + void resizeEvent(QResizeEvent *event) override; + //鼠标滚轮事件 + void wheelEvent(QWheelEvent *event) override; +protected: + + +private: + QString m_currentPath;//当前图片路径 + QGraphicsPixmapItem *m_pixmapItem{nullptr};//当前图像的item + bool m_isFitImage = false;//是否适应图片 + bool m_isFitWindow = false;//是否适应窗口 + qreal m_scal = 1.0; + int m_rotateAngel = 0; //旋转角度 + QImage *m_currentImage{nullptr};//当前原始图像 + QImage m_FilterImage{nullptr};//当前处理的图像 + QImage m_lightContrastImage{nullptr};//亮度曝光度图像 + +}; + +#endif // IMAGEVIEW_H diff --git a/translations.pri b/translations.pri new file mode 100644 index 0000000..9e8532e --- /dev/null +++ b/translations.pri @@ -0,0 +1,35 @@ +TRANSLATIONS += \ + $$PWD/translations/deepin-ocr_zh_CN.ts \ + $$PWD/translations/deepin-ocr_en_US.ts \ + $$PWD/translations/deepin-ocr_zh_HK.ts \ + $$PWD/translations/deepin-ocr_zh_TW.ts \ + $$PWD/translations/deepin-ocr_ar.ts \ + $$PWD/translations/deepin-ocr_br.ts \ + $$PWD/translations/deepin-ocr_ca.ts \ + $$PWD/translations/deepin-ocr_cs.ts \ + $$PWD/translations/deepin-ocr_da.ts \ + $$PWD/translations/deepin-ocr_de.ts \ + $$PWD/translations/deepin-ocr_es.ts \ + $$PWD/translations/deepin-ocr_fi.ts \ + $$PWD/translations/deepin-ocr_fr.ts \ + $$PWD/translations/deepin-ocr_gl_ES.ts \ + $$PWD/translations/deepin-ocr_hu.ts \ + $$PWD/translations/deepin-ocr_it.ts \ + $$PWD/translations/deepin-ocr_ko.ts \ + $$PWD/translations/deepin-ocr_ms.ts \ + $$PWD/translations/deepin-ocr_nl.ts \ + $$PWD/translations/deepin-ocr_pl.ts \ + $$PWD/translations/deepin-ocr_pt.ts \ + $$PWD/translations/deepin-ocr_pt_BR.ts \ + $$PWD/translations/deepin-ocr_ru.ts \ + $$PWD/translations/deepin-ocr_sq.ts \ + $$PWD/translations/deepin-ocr_sr.ts \ + $$PWD/translations/deepin-ocr_tr.ts \ + $$PWD/translations/deepin-ocr_uk.ts \ + $$PWD/translations/deepin-ocr_ug.ts \ + $$PWD/translations/deepin-ocr_bo.ts + + + +DISTFILES += \ + $$PWD/translations/deepin-ocr_en_US.ts diff --git a/translations/deepin-ocr_ar.ts b/translations/deepin-ocr_ar.ts new file mode 100644 index 0000000..99c388f --- /dev/null +++ b/translations/deepin-ocr_ar.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_bo.ts b/translations/deepin-ocr_bo.ts new file mode 100644 index 0000000..5a8a8cc --- /dev/null +++ b/translations/deepin-ocr_bo.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_br.ts b/translations/deepin-ocr_br.ts new file mode 100644 index 0000000..4f415f5 --- /dev/null +++ b/translations/deepin-ocr_br.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_ca.ts b/translations/deepin-ocr_ca.ts new file mode 100644 index 0000000..270c666 --- /dev/null +++ b/translations/deepin-ocr_ca.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_cs.ts b/translations/deepin-ocr_cs.ts new file mode 100644 index 0000000..fbc8bf1 --- /dev/null +++ b/translations/deepin-ocr_cs.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_da.ts b/translations/deepin-ocr_da.ts new file mode 100644 index 0000000..c9ecbc7 --- /dev/null +++ b/translations/deepin-ocr_da.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_de.ts b/translations/deepin-ocr_de.ts new file mode 100644 index 0000000..d6f88ec --- /dev/null +++ b/translations/deepin-ocr_de.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_el.ts b/translations/deepin-ocr_el.ts new file mode 100644 index 0000000..0e74182 --- /dev/null +++ b/translations/deepin-ocr_el.ts @@ -0,0 +1,62 @@ + + + CountdownTooltip + + + Click the tray icon +or press the shortcut again to stop recording + + + + + MainWindow + + + Deepin screen recorder + Kαταγραφέας Oθόνης Deepin + + + + Start recording + Έναρξη εγγραφής + + + + Select area + Επιλογή περιοχής + + + + RecordProcess + + + deepin-screen-recorder + deepin-screen-recorder + + + + View + Εμφάνιση + + + + Recording finished + + + + + Saved to + Αποθηκεύτηκε στο + + + + StartTooltip + + + Click or drag to +select the area to record + Κάντε κλικ ή σύρετε για να + επιλέξετε την περιοχή για εγγραφή + + + \ No newline at end of file diff --git a/translations/deepin-ocr_en_US.ts b/translations/deepin-ocr_en_US.ts new file mode 100644 index 0000000..e0ff05e --- /dev/null +++ b/translations/deepin-ocr_en_US.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_es.ts b/translations/deepin-ocr_es.ts new file mode 100644 index 0000000..61b324c --- /dev/null +++ b/translations/deepin-ocr_es.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_es_419.ts b/translations/deepin-ocr_es_419.ts new file mode 100644 index 0000000..770b1e4 --- /dev/null +++ b/translations/deepin-ocr_es_419.ts @@ -0,0 +1,63 @@ + + + CountdownTooltip + + + Click the tray icon +or press the shortcut again to stop recording + Haz clic en el icono de la bandeja o presiona nuevamente +el atajo de teclado para detener la grabación. + + + + MainWindow + + + Deepin screen recorder + Videograbadora Deepin + + + + Start recording + Empezar a grabar + + + + Select area + Seleccionar área + + + + RecordProcess + + + deepin-screen-recorder + deepin-screen-recorder + + + + View + Ver + + + + Recording finished + Grabación finalizada + + + + Saved to + Guardado en + + + + StartTooltip + + + Click or drag to +select the area to record + Hacer clic o arrastrar para +seleccionar la zona que grabar. + + + \ No newline at end of file diff --git a/translations/deepin-ocr_fa.ts b/translations/deepin-ocr_fa.ts new file mode 100644 index 0000000..b6f4086 --- /dev/null +++ b/translations/deepin-ocr_fa.ts @@ -0,0 +1,61 @@ + + + CountdownTooltip + + + Click the tray icon +or press the shortcut again to stop recording + + + + + MainWindow + + + Deepin screen recorder + + + + + Start recording + شروع ضبط + + + + Select area + ناحیه را انتخاب کنید + + + + RecordProcess + + + deepin-screen-recorder + + + + + View + + + + + Recording finished + + + + + Saved to + ذخیره در + + + + StartTooltip + + + Click or drag to +select the area to record + + + + \ No newline at end of file diff --git a/translations/deepin-ocr_fi.ts b/translations/deepin-ocr_fi.ts new file mode 100644 index 0000000..6952685 --- /dev/null +++ b/translations/deepin-ocr_fi.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_fr.ts b/translations/deepin-ocr_fr.ts new file mode 100644 index 0000000..91556fa --- /dev/null +++ b/translations/deepin-ocr_fr.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_gl_ES.ts b/translations/deepin-ocr_gl_ES.ts new file mode 100644 index 0000000..d5be18a --- /dev/null +++ b/translations/deepin-ocr_gl_ES.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_he.ts b/translations/deepin-ocr_he.ts new file mode 100644 index 0000000..920bb1b --- /dev/null +++ b/translations/deepin-ocr_he.ts @@ -0,0 +1,62 @@ + + + CountdownTooltip + + + Click the tray icon +or press the shortcut again to stop recording + + + + + MainWindow + + + Deepin screen recorder + מסריט המסך של Deepin + + + + Start recording + התחלה בהסרטה + + + + Select area + בחירת אזור + + + + RecordProcess + + + deepin-screen-recorder + deepin-screen-recorder + + + + View + תצוגה + + + + Recording finished + + + + + Saved to + נשמר אל + + + + StartTooltip + + + Click or drag to +select the area to record + יש ללחוץ או לגרור +כדי לבחור את האזור להסרטה + + + \ No newline at end of file diff --git a/translations/deepin-ocr_hi_IN.ts b/translations/deepin-ocr_hi_IN.ts new file mode 100644 index 0000000..0ab8ee0 --- /dev/null +++ b/translations/deepin-ocr_hi_IN.ts @@ -0,0 +1,61 @@ + + + CountdownTooltip + + + Click the tray icon +or press the shortcut again to stop recording + + + + + MainWindow + + + Deepin screen recorder + डीपिन स्क्रीन रिकॉर्डर + + + + Start recording + + + + + Select area + + + + + RecordProcess + + + deepin-screen-recorder + deepin-screen-recorder + + + + View + + + + + Recording finished + + + + + Saved to + + + + + StartTooltip + + + Click or drag to +select the area to record + + + + \ No newline at end of file diff --git a/translations/deepin-ocr_hr.ts b/translations/deepin-ocr_hr.ts new file mode 100644 index 0000000..e9f9858 --- /dev/null +++ b/translations/deepin-ocr_hr.ts @@ -0,0 +1,62 @@ + + + CountdownTooltip + + + Click the tray icon +or press the shortcut again to stop recording + + + + + MainWindow + + + Deepin screen recorder + Deepin snimač zaslona + + + + Start recording + Započni snimanje + + + + Select area + Odaberi područje + + + + RecordProcess + + + deepin-screen-recorder + deepin-snimač-zaslona + + + + View + Pogled + + + + Recording finished + + + + + Saved to + Spremljeno u + + + + StartTooltip + + + Click or drag to +select the area to record + Klikni ili privuci za +odabir područja snimanja + + + \ No newline at end of file diff --git a/translations/deepin-ocr_hu.ts b/translations/deepin-ocr_hu.ts new file mode 100644 index 0000000..57813b2 --- /dev/null +++ b/translations/deepin-ocr_hu.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_id.ts b/translations/deepin-ocr_id.ts new file mode 100644 index 0000000..019b0ad --- /dev/null +++ b/translations/deepin-ocr_id.ts @@ -0,0 +1,62 @@ + + + CountdownTooltip + + + Click the tray icon +or press the shortcut again to stop recording + + + + + MainWindow + + + Deepin screen recorder + Perekam layar deepin + + + + Start recording + Mulai merekam + + + + Select area + Pilih area + + + + RecordProcess + + + deepin-screen-recorder + deepin-screen-recorder + + + + View + Lihat + + + + Recording finished + + + + + Saved to + Simpan ke + + + + StartTooltip + + + Click or drag to +select the area to record + Klik atau seret ke +pilih area untuk rekam + + + \ No newline at end of file diff --git a/translations/deepin-ocr_it.ts b/translations/deepin-ocr_it.ts new file mode 100644 index 0000000..4b46c84 --- /dev/null +++ b/translations/deepin-ocr_it.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_ja.ts b/translations/deepin-ocr_ja.ts new file mode 100644 index 0000000..7755fdf --- /dev/null +++ b/translations/deepin-ocr_ja.ts @@ -0,0 +1,63 @@ + + + CountdownTooltip + + + Click the tray icon +or press the shortcut again to stop recording + 録画を停止するには、トレイアイコンをクリックするか、 +ショートカットキーをもう一度押してください + + + + MainWindow + + + Deepin screen recorder + Deepin スクリーンレコーダー + + + + Start recording + 録画を開始 + + + + Select area + 領域を選択 + + + + RecordProcess + + + deepin-screen-recorder + + + + + View + 表示 + + + + Recording finished + 録画が完了しました + + + + Saved to + + + + + StartTooltip + + + Click or drag to +select the area to record + 録画する領域をクリックまたはドラッグして +選択してください + + + \ No newline at end of file diff --git a/translations/deepin-ocr_ko.ts b/translations/deepin-ocr_ko.ts new file mode 100644 index 0000000..5eabe90 --- /dev/null +++ b/translations/deepin-ocr_ko.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_lt.ts b/translations/deepin-ocr_lt.ts new file mode 100644 index 0000000..eed5961 --- /dev/null +++ b/translations/deepin-ocr_lt.ts @@ -0,0 +1,65 @@ + + + CountdownTooltip + + + Click the tray icon +or press the shortcut again to stop recording + Norėdami stabdyti įrašinėjimą, +spustelėkite dėklo piktogramą +arba dar kartą paspauskite trumpinį + + + + MainWindow + + + Deepin screen recorder + Deepin ekrano rašytuvas + + + + Start recording + Pradėti įrašinėjimą + + + + Select area + Pasirinkti sritį + + + + RecordProcess + + + deepin-screen-recorder + deepin-screen-recorder + + + + View + Žiūrėti + + + + Recording finished + Įrašinėjimas užbaigtas + + + + Saved to + Įrašyta į + + + + StartTooltip + + + Click or drag to +select the area to record + Spustelėkite ir vilkite, +norėdami pasirinkti +įrašinėjimo sritį + + + \ No newline at end of file diff --git a/translations/deepin-ocr_ms.ts b/translations/deepin-ocr_ms.ts new file mode 100644 index 0000000..79c8ee5 --- /dev/null +++ b/translations/deepin-ocr_ms.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_ne.ts b/translations/deepin-ocr_ne.ts new file mode 100644 index 0000000..efb6634 --- /dev/null +++ b/translations/deepin-ocr_ne.ts @@ -0,0 +1,61 @@ + + + CountdownTooltip + + + Click the tray icon +or press the shortcut again to stop recording + ट्रे आइकनमा क्लिक गर्नुहोस् र रेकर्डिङ बन्द गर्न सर्टकट फेरि थिच्नुहोस् + + + + MainWindow + + + Deepin screen recorder + डिपिन स्क्रीन रेकर्डर + + + + Start recording + रेकर्डिङ सुरू गर्नुहोस् + + + + Select area + क्षेत्र चयन गर्नुहोस् + + + + RecordProcess + + + deepin-screen-recorder + डिपिन-स्क्रीन-रेकर्डर + + + + View + हेर्नुहोस् + + + + Recording finished + रेकर्ड समाप्त भयो + + + + Saved to + बचत गरियो + + + + StartTooltip + + + Click or drag to +select the area to record + रेकर्ड गर्न क्षेत्र चयन गर्न क्लिक गर्नुहोस् वा तान्नुहोस् + + + \ No newline at end of file diff --git a/translations/deepin-ocr_nl.ts b/translations/deepin-ocr_nl.ts new file mode 100644 index 0000000..e0c506e --- /dev/null +++ b/translations/deepin-ocr_nl.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_pl.ts b/translations/deepin-ocr_pl.ts new file mode 100644 index 0000000..74c2135 --- /dev/null +++ b/translations/deepin-ocr_pl.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_pt.ts b/translations/deepin-ocr_pt.ts new file mode 100644 index 0000000..326eb33 --- /dev/null +++ b/translations/deepin-ocr_pt.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_pt_BR.ts b/translations/deepin-ocr_pt_BR.ts new file mode 100644 index 0000000..8a33967 --- /dev/null +++ b/translations/deepin-ocr_pt_BR.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_ru.ts b/translations/deepin-ocr_ru.ts new file mode 100644 index 0000000..8786a83 --- /dev/null +++ b/translations/deepin-ocr_ru.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_sk.ts b/translations/deepin-ocr_sk.ts new file mode 100644 index 0000000..2c9996b --- /dev/null +++ b/translations/deepin-ocr_sk.ts @@ -0,0 +1,63 @@ + + + CountdownTooltip + + + Click the tray icon +or press the shortcut again to stop recording + Kliknite na ikonu +alebo stlačte klávesovú skratku pre zastavenie nahrávania + + + + MainWindow + + + Deepin screen recorder + Deepin nahrávanie obrazovky + + + + Start recording + Štart nahrávania + + + + Select area + Vybrať oblasť + + + + RecordProcess + + + deepin-screen-recorder + deepin-nahravanie-obrazovky + + + + View + Pohľad + + + + Recording finished + Nahrávanie dokončené + + + + Saved to + Uložené do + + + + StartTooltip + + + Click or drag to +select the area to record + Kliknutím alebo ťahaním +vyberte oblasť pre nahrávanie + + + \ No newline at end of file diff --git a/translations/deepin-ocr_sl.ts b/translations/deepin-ocr_sl.ts new file mode 100644 index 0000000..bf1938d --- /dev/null +++ b/translations/deepin-ocr_sl.ts @@ -0,0 +1,62 @@ + + + CountdownTooltip + + + Click the tray icon +or press the shortcut again to stop recording + + + + + MainWindow + + + Deepin screen recorder + Snemalnik zaslona Deepin + + + + Start recording + Začni snemanje + + + + Select area + Izberi območje + + + + RecordProcess + + + deepin-screen-recorder + snemalnik-zaslona-deepin + + + + View + Pogled + + + + Recording finished + + + + + Saved to + Shranjeno v + + + + StartTooltip + + + Click or drag to +select the area to record + Kliknite ali povlecite, +da izberete območje snemanja + + + \ No newline at end of file diff --git a/translations/deepin-ocr_sq.ts b/translations/deepin-ocr_sq.ts new file mode 100644 index 0000000..5ec4ab0 --- /dev/null +++ b/translations/deepin-ocr_sq.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_sr.ts b/translations/deepin-ocr_sr.ts new file mode 100644 index 0000000..ba46e4f --- /dev/null +++ b/translations/deepin-ocr_sr.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_tr.ts b/translations/deepin-ocr_tr.ts new file mode 100644 index 0000000..b7e6344 --- /dev/null +++ b/translations/deepin-ocr_tr.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_ug.ts b/translations/deepin-ocr_ug.ts new file mode 100644 index 0000000..4f41281 --- /dev/null +++ b/translations/deepin-ocr_ug.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_uk.ts b/translations/deepin-ocr_uk.ts new file mode 100644 index 0000000..ee405c8 --- /dev/null +++ b/translations/deepin-ocr_uk.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_zh_CN.ts b/translations/deepin-ocr_zh_CN.ts new file mode 100644 index 0000000..be30fd6 --- /dev/null +++ b/translations/deepin-ocr_zh_CN.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_zh_HK.ts b/translations/deepin-ocr_zh_HK.ts new file mode 100644 index 0000000..39d9ae9 --- /dev/null +++ b/translations/deepin-ocr_zh_HK.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + + diff --git a/translations/deepin-ocr_zh_TW.ts b/translations/deepin-ocr_zh_TW.ts new file mode 100644 index 0000000..13d31ea --- /dev/null +++ b/translations/deepin-ocr_zh_TW.ts @@ -0,0 +1,68 @@ + + + + + ImageView + + Save Image + + + + Images (*.png *.bmp *.jpg) + + + + Open File + + + + png + + + + error + + + + open file error + + + + + MainWidget + + Recognizing + + + + Copied + + + + + ResultTextView + + Copy + + + + Cut + + + + SelectAll + + + + + Widget + + Widget + + + + Tips: The clearer the image is, the more accurate the text is + + + +