diff --git a/.tx/config b/.tx/config index 4d511975..a3e6d2d9 100644 --- a/.tx/config +++ b/.tx/config @@ -3,14 +3,15 @@ host = https://www.transifex.com minimum_perc = 80 mode = developer -[deepin-image-viewer.deepin-image-viewer] +[o:linuxdeepin:p:deepin-image-viewer:r:deepin-image-viewer] file_filter = src/translations/deepin-image-viewer_.ts source_file = src/translations/deepin-image-viewer.ts source_lang = en type = QT -[deepin-image-viewer.desktop] +[o:linuxdeepin:p:deepin-image-viewer:r:desktop] file_filter = src/translations/desktop/desktop_.ts source_file = src/translations/desktop/desktop.ts +preTranslate_file = src/deepin-image-viewer.desktop source_lang = en type = QT diff --git a/src/main.cpp b/src/main.cpp index 3235f439..bc72a4d6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -51,6 +51,7 @@ int main(int argc, char *argv[]) // 请在此处注册需要导入到QML中的C++类型 // 例如: engine.rootContext()->setContextProperty("Utils", new Utils); + // @uri org.deepin.image.viewer const QString uri("org.deepin.image.viewer"); qmlRegisterType(uri.toUtf8().data(), 1, 0, "ImageInfo"); qmlRegisterType(uri.toUtf8().data(), 1, 0, "ImageSourceModel"); @@ -59,14 +60,14 @@ int main(int argc, char *argv[]) // QML全局单例 GlobalControl control; - engine.rootContext()->setContextProperty("GControl", &control); + qmlRegisterSingletonInstance(uri.toUtf8().data(), 1, 0, "GControl", &control); GlobalStatus status; - engine.rootContext()->setContextProperty("GStatus", &status); + qmlRegisterSingletonInstance(uri.toUtf8().data(), 1, 0, "GStatus", &status); FileControl fileControl; - engine.rootContext()->setContextProperty("fileControl", &fileControl); + qmlRegisterSingletonInstance(uri.toUtf8().data(), 1, 0, "FileControl", &fileControl); // 光标位置查询工具 CursorTool cursorTool; - engine.rootContext()->setContextProperty("cursorTool", &cursorTool); + qmlRegisterSingletonInstance(uri.toUtf8().data(), 1, 0, "CursorTool", &cursorTool); // 解析命令行参数 QString cliParam = fileControl.parseCommandlineGetPath(); diff --git a/src/qml/FullImageView.qml b/src/qml/FullImageView.qml index 759d564c..2801ff02 100644 --- a/src/qml/FullImageView.qml +++ b/src/qml/FullImageView.qml @@ -6,223 +6,207 @@ import QtQuick.Window 2.11 import QtGraphicalEffects 1.0 import org.deepin.dtk 1.0 import org.deepin.image.viewer 1.0 as IV - import "./Utils" Item { id: fullThumbnail + // 是否启用动画效果,用于强制更新组件位置而不使用动画效果 + property bool enableAnimation: false + // 鼠标是否进入当前的视图 property bool isEnterCurrentView: true // 是否标题栏和底栏需要隐藏(仅判断普通模式) property bool needBarHideInNormalMode: false - // 是否启用动画效果,用于强制更新组件位置而不使用动画效果 - property bool enableAnimation: false - - anchors.fill: parent - - // 切换标题栏和工具栏显示状态 - function switchTopAndBottomBarState() { - // 判断当前标题栏、工具栏处于是否隐藏模式下 - if (needBarHideInNormalMode || window.isFullScreen) { - //判断当前标题栏、工具栏是否已隐藏 - if (Window.height <= thumbnailViewBackGround.y) { - // 全屏下不展示标题栏 - titleRect.animationShow = !window.isFullScreen - thumbnailViewBackGround.animationShow = true - } else { - titleRect.animationShow = false - thumbnailViewBackGround.animationShow = false - } - } - } //判断工具栏和标题栏的显示隐藏 function animationAll() { - if (GStatus.animationBlock) { - return + if (IV.GStatus.animationBlock) { + return; } // 打开界面不计算标题栏显隐 - if (GStatus.stackPage === Number(IV.Types.OpenImagePage)) { - return + if (IV.GStatus.stackPage === Number(IV.Types.OpenImagePage)) { + return; } // 根据当前不同捕获行为获取光标值 - var mouseX = imageViewerArea.usingCapture ? imageViewerArea.captureX : imageViewerArea.mouseX - var mouseY = imageViewerArea.usingCapture ? imageViewerArea.captureY : imageViewerArea.mouseY + var mouseX = imageViewerArea.usingCapture ? imageViewerArea.captureX : imageViewerArea.mouseX; + var mouseY = imageViewerArea.usingCapture ? imageViewerArea.captureY : imageViewerArea.mouseY; // 判断光标是否离开了窗口 - var cursorInWidnow = mouseX >= 0 && mouseX <= Window.width - && mouseY >= 0 && mouseY <= Window.height + var cursorInWidnow = mouseX >= 0 && mouseX <= Window.width && mouseY >= 0 && mouseY <= Window.height; // 工具栏显示的热区高度,窗口高度 - 工具栏距底部高度(工具栏高 70px + 边距 10px) - var bottomHotspotHeight = Window.height - GStatus.showBottomY + var bottomHotspotHeight = Window.height - IV.GStatus.showBottomY; // 按缩放比例计算是否需要显示标题/工具栏,默认显示 - var imageScaleNeedShow = true + var imageScaleNeedShow = true; if (imageViewer.targetImageReady) { // 显示图像的像素高度 - var imagePaintedHeight = imageViewer.targetImage.paintedHeight - * imageViewer.targetImage.scale + var imagePaintedHeight = imageViewer.targetImage.paintedHeight * imageViewer.targetImage.scale; // 显示图像的组件高度(组件高度不会随着缩放变更,是组件在布局内的高度) - var imageCompoHeight = imageViewer.targetImage.height - - imageScaleNeedShow = Boolean(imagePaintedHeight <= imageCompoHeight) + var imageCompoHeight = imageViewer.targetImage.height; + imageScaleNeedShow = Boolean(imagePaintedHeight <= imageCompoHeight); } - if (window.isFullScreen) { // 全屏时特殊处理 if (mouseY > bottomHotspotHeight) { - thumbnailViewBackGround.animationShow = true + thumbnailViewBackGround.animationShow = true; } else { - titleRect.animationShow = false - thumbnailViewBackGround.animationShow = false + titleRect.animationShow = false; + thumbnailViewBackGround.animationShow = false; } } else { // 判断是否弹出标题栏和缩略图栏 - var needShowTopBottom = false - if ((Window.height <= GStatus.minHideHeight - || Window.width <= GStatus.minWidth) - && (mouseY <= bottomHotspotHeight) - && (mouseY >= GStatus.titleHeight)) { + var needShowTopBottom = false; + if ((Window.height <= IV.GStatus.minHideHeight || Window.width <= IV.GStatus.minWidth) && (mouseY <= bottomHotspotHeight) && (mouseY >= IV.GStatus.titleHeight)) { // 窗口大小大于最小大小,光标不在热区内 - needShowTopBottom = false + needShowTopBottom = false; } else if (imageScaleNeedShow) { // 缩放范围高度未超过显示范围高度限制时时,不会隐藏工具/标题栏,根据高度而非宽度计算 - needShowTopBottom = true - } else if (cursorInWidnow - && ((mouseY > bottomHotspotHeight - && mouseY <= Window.height) - || (0 < mouseY && mouseY < GStatus.titleHeight))) { + needShowTopBottom = true; + } else if (cursorInWidnow && ((mouseY > bottomHotspotHeight && mouseY <= Window.height) || (0 < mouseY && mouseY < IV.GStatus.titleHeight))) { // 当缩放范围超过工具/标题栏且光标在工具/标题栏范围,显示工具/标题栏 - needShowTopBottom = true + needShowTopBottom = true; } else { - needShowTopBottom = false + needShowTopBottom = false; } - - titleRect.animationShow = needShowTopBottom - thumbnailViewBackGround.animationShow = needShowTopBottom - - needBarHideInNormalMode = !needShowTopBottom + titleRect.animationShow = needShowTopBottom; + thumbnailViewBackGround.animationShow = needShowTopBottom; + needBarHideInNormalMode = !needShowTopBottom; } // 光标不在切换按钮纵向判断的热区(处于标题栏/工具栏区域)时,隐藏左右切换按钮 // 判断是否弹出图片切换按钮 - var needShowLeftRightBtn = false - if (GStatus.titleHeight < mouseY && mouseY < bottomHotspotHeight - && isEnterCurrentView && cursorInWidnow) { - if (mouseX >= Window.width - GStatus.switchImageHotspotWidth - && mouseX <= Window.width) { + var needShowLeftRightBtn = false; + if (IV.GStatus.titleHeight < mouseY && mouseY < bottomHotspotHeight && isEnterCurrentView && cursorInWidnow) { + if (mouseX >= Window.width - IV.GStatus.switchImageHotspotWidth && mouseX <= Window.width) { // 光标处于切换下一张按钮区域 - needShowLeftRightBtn = true - } else if (mouseX <= GStatus.switchImageHotspotWidth - && mouseX >= 0) { + needShowLeftRightBtn = true; + } else if (mouseX <= IV.GStatus.switchImageHotspotWidth && mouseX >= 0) { // 光标处于切换上一张按钮区域 - needShowLeftRightBtn = true + needShowLeftRightBtn = true; } } - - floatLeftButton.animationShow = needShowLeftRightBtn - floatRightButton.animationShow = needShowLeftRightBtn + floatLeftButton.animationShow = needShowLeftRightBtn; + floatRightButton.animationShow = needShowLeftRightBtn; } //判断工具栏和标题栏的显示隐藏 function changeSizeMoveAll() { // 打开界面不计算标题栏显隐 - if (GStatus.stackPage === Number(IV.Types.OpenImagePage)) { - return + if (IV.GStatus.stackPage === Number(IV.Types.OpenImagePage)) { + return; } // 工具栏显示的热区高度,窗口高度 - 工具栏距底部高度(工具栏高 70px + 边距 10px) - var bottomHotspotHeight = Window.height - GStatus.showBottomY + var bottomHotspotHeight = Window.height - IV.GStatus.showBottomY; // 按缩放比例计算是否需要显示标题/工具栏 - var imageScaleNeedShow = true + var imageScaleNeedShow = true; if (imageViewer.targetImageReady) { // 显示图像的像素高度 - var imagePaintedHeight = imageViewer.targetImage.paintedHeight - * imageViewer.targetImage.scale + var imagePaintedHeight = imageViewer.targetImage.paintedHeight * imageViewer.targetImage.scale; // 显示图像的组件高度(组件高度不会随着缩放变更,是组件在布局内的高度) - var imageCompoHeight = imageViewer.targetImage.height - - imageScaleNeedShow = Boolean(imagePaintedHeight <= imageCompoHeight) + var imageCompoHeight = imageViewer.targetImage.height; + imageScaleNeedShow = Boolean(imagePaintedHeight <= imageCompoHeight); } // 变更大小时的位置变更不触发动画效果 - fullThumbnail.enableAnimation = false + fullThumbnail.enableAnimation = false; // 刷新标题栏/底部栏的位置 if (window.isFullScreen) { if (imageViewerArea.mouseY > bottomHotspotHeight) { - thumbnailViewBackGround.animationShow = true + thumbnailViewBackGround.animationShow = true; } else { - titleRect.animationShow = false - thumbnailViewBackGround.animationShow = false + titleRect.animationShow = false; + thumbnailViewBackGround.animationShow = false; } - } else if ((Window.height <= GStatus.minHideHeight - || Window.width <= GStatus.minWidth) - && (imageViewerArea.mouseY <= bottomHotspotHeight) - && imageViewerArea.mouseY >= GStatus.titleHeight) { - titleRect.animationShow = false - thumbnailViewBackGround.animationShow = false - } else if (imageViewerArea.mouseY > bottomHotspotHeight - || imageViewerArea.mouseY < GStatus.titleHeight - || imageScaleNeedShow) { - titleRect.animationShow = true - thumbnailViewBackGround.animationShow = true + } else if ((Window.height <= IV.GStatus.minHideHeight || Window.width <= IV.GStatus.minWidth) && (imageViewerArea.mouseY <= bottomHotspotHeight) && imageViewerArea.mouseY >= IV.GStatus.titleHeight) { + titleRect.animationShow = false; + thumbnailViewBackGround.animationShow = false; + } else if (imageViewerArea.mouseY > bottomHotspotHeight || imageViewerArea.mouseY < IV.GStatus.titleHeight || imageScaleNeedShow) { + titleRect.animationShow = true; + thumbnailViewBackGround.animationShow = true; } else { - titleRect.animationShow = false - thumbnailViewBackGround.animationShow = false + titleRect.animationShow = false; + thumbnailViewBackGround.animationShow = false; } - thumbnailViewBackGround.updatePosition() + thumbnailViewBackGround.updatePosition(); // 刷新左右切换按钮的位置 - var showLeftRightButton = false - if (imageViewerArea.mouseX <= 100 - && imageViewerArea.mouseX <= Window.width - && isEnterCurrentView) { - showLeftRightButton = true - } else if (imageViewerArea.mouseX >= Window.width - 100 - && imageViewerArea.mouseX >= 0 && isEnterCurrentView) { - showLeftRightButton = true + var showLeftRightButton = false; + if (imageViewerArea.mouseX <= 100 && imageViewerArea.mouseX <= Window.width && isEnterCurrentView) { + showLeftRightButton = true; + } else if (imageViewerArea.mouseX >= Window.width - 100 && imageViewerArea.mouseX >= 0 && isEnterCurrentView) { + showLeftRightButton = true; } - floatLeftButton.animationShow = showLeftRightButton - floatRightButton.animationShow = showLeftRightButton - floatLeftButton.updatePosition() - floatRightButton.updatePosition() + floatLeftButton.animationShow = showLeftRightButton; + floatRightButton.animationShow = showLeftRightButton; + floatLeftButton.updatePosition(); + floatRightButton.updatePosition(); + fullThumbnail.enableAnimation = true; + } - fullThumbnail.enableAnimation = true + // 切换标题栏和工具栏显示状态 + function switchTopAndBottomBarState() { + // 判断当前标题栏、工具栏处于是否隐藏模式下 + if (needBarHideInNormalMode || window.isFullScreen) { + //判断当前标题栏、工具栏是否已隐藏 + if (Window.height <= thumbnailViewBackGround.y) { + // 全屏下不展示标题栏 + titleRect.animationShow = !window.isFullScreen; + thumbnailViewBackGround.animationShow = true; + } else { + titleRect.animationShow = false; + thumbnailViewBackGround.animationShow = false; + } + } } + anchors.fill: parent + + Component.onCompleted: { + changeSizeMoveAll(); + } onHeightChanged: { - changeSizeMoveAll() + changeSizeMoveAll(); } - onWidthChanged: { - changeSizeMoveAll() + changeSizeMoveAll(); } ImageViewer { id: imageViewer + anchors.fill: parent } // 缩放变更时触发显示/隐藏标题栏/底部栏 Connections { + function onScaleChanged() { + delayAnimationTimer.start(); + } + enabled: imageViewer.targetImageReady target: imageViewer.targetImage - onScaleChanged: delayAnimationTimer.start() } // 旋转图片时 targetImage 和 scale (1.0) 可能均不变更,获取旋转状态触发标题栏缩放 Connections { - target: GControl - onCurrentRotationChanged: delayAnimationTimer.start() + function onCurrentRotationChanged() { + delayAnimationTimer.start(); + } + + target: IV.GControl } Timer { id: delayAnimationTimer - repeat: false + interval: 10 + repeat: false + onTriggered: animationAll() } @@ -232,31 +216,32 @@ Item { property bool animationShow: false function updatePosition() { - floatLeftButton.x = animationShow ? 20 : -50 + floatLeftButton.x = animationShow ? 20 : -50; } checked: false - enabled: GControl.hasPreviousImage - visible: enabled - anchors { - top: parent.top - topMargin: GStatus.titleHeight + (parent.height - GStatus.titleHeight - - GStatus.showBottomY) / 2 - } - width: 50 + enabled: IV.GControl.hasPreviousImage height: 50 icon.name: "icon_previous" - - onAnimationShowChanged: updatePosition() - onClicked: GControl.previousImage() + visible: enabled + width: 50 Behavior on x { enabled: fullThumbnail.enableAnimation + NumberAnimation { duration: 200 easing.type: Easing.InOutQuad } } + + onAnimationShowChanged: updatePosition() + onClicked: IV.GControl.previousImage() + + anchors { + top: parent.top + topMargin: IV.GStatus.titleHeight + (parent.height - IV.GStatus.titleHeight - IV.GStatus.showBottomY) / 2 + } } FloatingButton { @@ -265,82 +250,82 @@ Item { property bool animationShow: false function updatePosition() { - floatRightButton.x = animationShow ? Window.width - 70 : Window.width + floatRightButton.x = animationShow ? Window.width - 70 : Window.width; } checked: false - enabled: GControl.hasNextImage - visible: enabled - anchors { - top: parent.top - topMargin: GStatus.titleHeight + (parent.height - GStatus.titleHeight - - GStatus.showBottomY) / 2 - } - width: 50 + enabled: IV.GControl.hasNextImage height: 50 icon.name: "icon_next" - - onAnimationShowChanged: updatePosition() - onClicked: GControl.nextImage() + visible: enabled + width: 50 Behavior on x { enabled: fullThumbnail.enableAnimation + NumberAnimation { duration: 200 easing.type: Easing.InOutQuad } } + + onAnimationShowChanged: updatePosition() + onClicked: IV.GControl.nextImage() + + anchors { + top: parent.top + topMargin: IV.GStatus.titleHeight + (parent.height - IV.GStatus.titleHeight - IV.GStatus.showBottomY) / 2 + } } MouseArea { id: imageViewerArea - property bool usingCapture: false // 是否使用定时捕获光标位置 property int captureX: 0 // 当前的光标X坐标值 property int captureY: 0 // 当前的光标Y坐标值 - anchors.fill: imageViewer + property bool usingCapture: false // 是否使用定时捕获光标位置 + acceptedButtons: Qt.LeftButton + anchors.fill: imageViewer hoverEnabled: true - onMouseYChanged: { - animationAll() - mouse.accepted = false - } - onEntered: { - isEnterCurrentView = true - animationAll() + isEnterCurrentView = true; + animationAll(); } - onExited: { - isEnterCurrentView = false - animationAll() + isEnterCurrentView = false; + animationAll(); // 当光标移出当前捕获范围时触发(不一定移出了窗口) - cursorTool.setCaptureCursor(true) - imageViewerArea.usingCapture = true + IV.CursorTool.setCaptureCursor(true); + imageViewerArea.usingCapture = true; + } + onMouseYChanged: { + animationAll(); + mouse.accepted = false; } Connections { - target: cursorTool - onCursorPosChanged: { + function onCursorPosChanged(x, y) { if (imageViewerArea.usingCapture) { - var pos = mapFromGlobal(x, y) - imageViewerArea.captureX = pos.x - imageViewerArea.captureY = pos.y + var pos = mapFromGlobal(x, y); + imageViewerArea.captureX = pos.x; + imageViewerArea.captureY = pos.y; // 根据光标位置计算工具、标题、侧边栏的收缩弹出 - animationAll() + animationAll(); // 若光标已移出界面,停止捕获光标位置 - var cursorInWidnow = pos.x >= 0 && pos.x <= window.width - && pos.y >= 0 && pos.y <= window.height + var cursorInWidnow = pos.x >= 0 && pos.x <= window.width && pos.y >= 0 && pos.y <= window.height; if (!cursorInWidnow) { - cursorTool.setCaptureCursor(false) - imageViewerArea.usingCapture = false + IV.CursorTool.setCaptureCursor(false); + imageViewerArea.usingCapture = false; } } } + + target: IV.CursorTool } } @@ -350,29 +335,26 @@ Item { property bool animationShow: true function updatePosition() { - thumbnailViewBackGround.y - = animationShow ? Window.height - GStatus.showBottomY : Window.height + thumbnailViewBackGround.y = animationShow ? Window.height - IV.GStatus.showBottomY : Window.height; } anchors.right: parent.right anchors.rightMargin: (parent.width - width) / 2 - // 根据拓展的列表宽度计算, 20px为工具栏和主窗口间的间距 2x10px - width: parent.width - 20 < thumbnailListView.btnContentWidth - + thumbnailListView.listContentWidth ? parent.width - - 20 : thumbnailListView.btnContentWidth - + thumbnailListView.listContentWidth height: 70 - y: Window.height - GStatus.showBottomY - - onAnimationShowChanged: updatePosition() + // 根据拓展的列表宽度计算, 20px为工具栏和主窗口间的间距 2x10px + width: parent.width - 20 < thumbnailListView.btnContentWidth + thumbnailListView.listContentWidth ? parent.width - 20 : thumbnailListView.btnContentWidth + thumbnailListView.listContentWidth + y: Window.height - IV.GStatus.showBottomY Behavior on y { enabled: fullThumbnail.enableAnimation + NumberAnimation { duration: 200 easing.type: Easing.InOutQuad } } + + onAnimationShowChanged: updatePosition() } ThumbnailListView { @@ -386,24 +368,21 @@ Item { FloatingNotice { id: floatLabel - visible: false anchors.bottom: parent.bottom - anchors.bottomMargin: thumbnailViewBackGround.height + GStatus.floatMargin + anchors.bottomMargin: thumbnailViewBackGround.height + IV.GStatus.floatMargin anchors.left: parent.left anchors.leftMargin: parent.width / 2 - 50 opacity: 0.7 + visible: false Timer { interval: 1500 - running: parent.visible repeat: false + running: parent.visible + onTriggered: { - parent.visible = false + parent.visible = false; } } } - - Component.onCompleted: { - changeSizeMoveAll() - } } diff --git a/src/qml/ImageDelegate/BaseImageDelegate.qml b/src/qml/ImageDelegate/BaseImageDelegate.qml index 9cba782f..e57944d4 100644 --- a/src/qml/ImageDelegate/BaseImageDelegate.qml +++ b/src/qml/ImageDelegate/BaseImageDelegate.qml @@ -14,7 +14,7 @@ Item { property url source property int type: IV.Types.NullImage property int status: Image.Null - property bool isCurrentImage: index === GControl.currentIndex + property bool isCurrentImage: index === IV.GControl.currentIndex property Image targetImage property alias targetImageInfo: imageInfo diff --git a/src/qml/ImageDelegate/DynamicImageDelegate.qml b/src/qml/ImageDelegate/DynamicImageDelegate.qml index 1baffaaf..f3cc5fc7 100644 --- a/src/qml/ImageDelegate/DynamicImageDelegate.qml +++ b/src/qml/ImageDelegate/DynamicImageDelegate.qml @@ -3,7 +3,6 @@ // SPDX-License-Identifier: GPL-3.0-or-later import QtQuick 2.11 - import "../Utils" BaseImageDelegate { @@ -11,22 +10,22 @@ BaseImageDelegate { property bool needInit: true + inputHandler: imageInput status: image.status targetImage: image - inputHandler: imageInput AnimatedImage { id: image - height: delegate.height - width: delegate.width asynchronous: true cache: false clip: true fillMode: Image.PreserveAspectFit - smooth: true + height: delegate.height scale: 1.0 + smooth: true source: delegate.source + width: delegate.width } ImageInputHandler { @@ -39,13 +38,14 @@ BaseImageDelegate { // 动图在首次加载,状态变更为 Ready 时,paintedWidth 可能未更新,为0 // 手动复位图片状态,调整缩放比例 Connections { - enabled: needInit - target: image - onPaintedWidthChanged: { + function onPaintedWidthChanged() { if (image.paintedWidth > 0) { - needInit = false - delegate.reset() + needInit = false; + delegate.reset(); } } + + enabled: needInit + target: image } } diff --git a/src/qml/ImageDelegate/MultiImageDelegate.qml b/src/qml/ImageDelegate/MultiImageDelegate.qml index 2be8c017..04749b38 100644 --- a/src/qml/ImageDelegate/MultiImageDelegate.qml +++ b/src/qml/ImageDelegate/MultiImageDelegate.qml @@ -28,10 +28,10 @@ BaseImageDelegate { flickDeceleration: 500 currentIndex: { if (isCurrentImage) { - return GControl.currentFrameIndex - } else if (index === GControl.currentIndex + 1) { + return IV.GControl.currentFrameIndex + } else if (index === IV.GControl.currentIndex + 1) { return 0 - } else if (index === GControl.currentIndex - 1) { + } else if (index === IV.GControl.currentIndex - 1) { return count - 1 } @@ -40,7 +40,7 @@ BaseImageDelegate { // 当处理双击缩放界面时,由于坐标变更,可能误触导致图片滑动 // 调整为在缩放动作时不处理滑动操作 - interactive: !GStatus.fullScreenAnimating && GStatus.viewInteractive + interactive: !IV.GStatus.fullScreenAnimating && IV.GStatus.viewInteractive model: IV.ImageInfo.Ready === targetImageInfo.status ? targetImageInfo.frameCount : 0 delegate: Loader { width: multiImageDelegate.width @@ -112,17 +112,17 @@ BaseImageDelegate { } onCurrentIndexChanged: { - if (isCurrentImage && currentIndex != GControl.currentFrameIndex) { - GControl.currentFrameIndex = currentIndex + if (isCurrentImage && currentIndex != IV.GControl.currentFrameIndex) { + IV.GControl.currentFrameIndex = currentIndex } } onMovementStarted: { - GStatus.viewFlicking = true + IV.GStatus.viewFlicking = true } onMovementEnded: { - GStatus.viewFlicking = false + IV.GStatus.viewFlicking = false } } } diff --git a/src/qml/ImageDelegate/NormalImageDelegate.qml b/src/qml/ImageDelegate/NormalImageDelegate.qml index faaae4e8..297e3c49 100644 --- a/src/qml/ImageDelegate/NormalImageDelegate.qml +++ b/src/qml/ImageDelegate/NormalImageDelegate.qml @@ -4,49 +4,49 @@ import QtQuick 2.11 import org.deepin.image.viewer 1.0 as IV - import "../Utils" BaseImageDelegate { id: delegate + inputHandler: imageInput status: image.status targetImage: image - inputHandler: imageInput Image { id: image - height: delegate.height - width: delegate.width asynchronous: true cache: false - smooth: true - mipmap: true fillMode: Image.PreserveAspectFit + height: delegate.height + mipmap: true scale: 1.0 + smooth: true source: "image://ImageLoad/" + delegate.source + width: delegate.width } ImageInputHandler { id: imageInput anchors.fill: parent + isRotatable: IV.FileControl.isRotatable(delegate.source) targetImage: image.status === Image.Ready ? image : null - isRotatable: fileControl.isRotatable(delegate.source) } Connections { - enabled: isCurrentImage - target: GControl - onCurrentRotationChanged: { + function onCurrentRotationChanged() { // Note: 确保缓存中的数据已刷新后更新界面 // 0 为复位,缓存中的数据已转换,无需再次加载 - if (0 !== GControl.currentRotation) { - var temp = image.source - image.source = "" - image.source = temp + if (0 !== IV.GControl.currentRotation) { + var temp = image.source; + image.source = ""; + image.source = temp; } } + + enabled: isCurrentImage + target: IV.GControl } } diff --git a/src/qml/ImageViewer.qml b/src/qml/ImageViewer.qml index c0fa173d..eb686084 100644 --- a/src/qml/ImageViewer.qml +++ b/src/qml/ImageViewer.qml @@ -9,33 +9,56 @@ import QtQuick.Layouts 1.11 import QtQuick.Shapes 1.11 import org.deepin.dtk 1.0 import org.deepin.image.viewer 1.0 as IV - import "./ImageDelegate" import "./LiveText" Item { id: imageViewer - // Note: 对于SVG、动图等特殊类型图片,使用 targeImage 获取的图片 sourceSize 存在差异, - // 可能为零或导致缩放模糊,调整为使用从文件中读取的原始大小计算。 - // 图片旋转后同样会交换宽度和高度,更新缓存的图片源宽高信息 - property alias targetImageInfo: currentImageInfo - // Image 类型的对象,空图片、错误图片、消失图片等异常为 null - property alias targetImage: view.currentImage - property bool targetImageReady: (null !== view.currentImage) - && (Image.Ready === view.currentImage.status) - // current rotate property int currentRotate: 0 // 记录图像缩放,用于在窗口缩放时,根据前后窗口变化保持图片缩放比例 property bool enableChangeDisplay: true property real lastDisplayScaleWidth: 0 + // Image 类型的对象,空图片、错误图片、消失图片等异常为 null + property alias targetImage: view.currentImage + + // Note: 对于SVG、动图等特殊类型图片,使用 targeImage 获取的图片 sourceSize 存在差异, + // 可能为零或导致缩放模糊,调整为使用从文件中读取的原始大小计算。 + // 图片旋转后同样会交换宽度和高度,更新缓存的图片源宽高信息 + property alias targetImageInfo: currentImageInfo + property bool targetImageReady: (null !== view.currentImage) && (Image.Ready === view.currentImage.status) + + // 退出全屏展示图片 + function escBack() { + IV.GStatus.showImageInfo = false; + showNormal(); + showfullAnimation.start(); + } + + function exitLiveText() { + view.exitLiveText(); + } + + function fitImage() { + if (targetImageReady) { + // 按图片原始大小执行缩放 + targetImage.scale = targetImageInfo.width / targetImage.paintedWidth; + } + } + + function fitWindow() { + // 默认状态的图片即适应窗口大小(使用 Image.PreserveAspectFit) + if (targetImageReady) { + targetImage.scale = 1.0; + } + } // 窗口拖拽大小变更时保持图片的显示缩放比例 function keepImageDisplayScale() { if (!targetImageReady) { - return + return; } // 当前缩放比例与匹配窗口的图片缩放比例比较,不一致则保持缩放比例 @@ -43,103 +66,71 @@ Item { if (0 !== lastDisplayScaleWidth) { // Note: 拖拽窗口时将保持 scale ,但 paintedWidth / paintedHeight 将变更 // 因此在此处设置缩放比例时屏蔽重复设置,以保留缩放比例 - enableChangeDisplay = false - targetImage.scale = lastDisplayScaleWidth / targetImage.paintedWidth - enableChangeDisplay = true + enableChangeDisplay = false; + targetImage.scale = lastDisplayScaleWidth / targetImage.paintedWidth; + enableChangeDisplay = true; } else { - lastDisplayScaleWidth = targetImage.paintedWidth * targetImage.scale + lastDisplayScaleWidth = targetImage.paintedWidth * targetImage.scale; } } else { // 一致则保持匹配窗口 - fitWindow() - } - } - - function showScaleFloatLabel() { - // 不存在的图片不弹出缩放提示框 - if (!targetImageReady) { - return - } - - // 图片实际缩放比值 绘制像素宽度 / 图片原始像素宽度 - var readableScale = targetImage.paintedWidth * targetImage.scale - / targetImageInfo.width * 100 - if (readableScale.toFixed(0) > 2000 && readableScale.toFixed(0) <= 3000) { - floatLabel.displayStr = "2000%" - } else if (readableScale.toFixed(0) < 2 && readableScale.toFixed(0) >= 0) { - floatLabel.displayStr = "2%" - } else if (readableScale.toFixed(0) >= 2 && readableScale.toFixed(0) <= 2000) { - floatLabel.displayStr = readableScale.toFixed(0) + "%" + fitWindow(); } - - floatLabel.visible = true } function recalculateLiveText() { - if (targetImageReady - && IV.Types.DynamicImage !== currentImageInfo.type) { - exitLiveText() - startLiveText() - } - } - - function startLiveText() { - console.debug("function startLiveText()") - view.startLiveTextAnalyze() - } - - function exitLiveText() { - view.exitLiveText() - } - - function fitImage() { - if (targetImageReady) { - // 按图片原始大小执行缩放 - targetImage.scale = targetImageInfo.width / targetImage.paintedWidth - } - } - - function fitWindow() { - // 默认状态的图片即适应窗口大小(使用 Image.PreserveAspectFit) - if (targetImageReady) { - targetImage.scale = 1.0 + if (targetImageReady && IV.Types.DynamicImage !== currentImageInfo.type) { + exitLiveText(); + startLiveText(); } } function rotateImage(angle) { if (targetImageReady) { - GControl.currentRotation += angle + IV.GControl.currentRotation += angle; } } // 触发全屏展示图片 function showPanelFullScreen() { - view.exitLiveText() - GStatus.showImageInfo = false - - showFullScreen() - view.contentItem.forceActiveFocus() - showfullAnimation.start() + view.exitLiveText(); + IV.GStatus.showImageInfo = false; + showFullScreen(); + view.contentItem.forceActiveFocus(); + showfullAnimation.start(); } - // 退出全屏展示图片 - function escBack() { - GStatus.showImageInfo = false + function showScaleFloatLabel() { + // 不存在的图片不弹出缩放提示框 + if (!targetImageReady) { + return; + } - showNormal() - showfullAnimation.start() + // 图片实际缩放比值 绘制像素宽度 / 图片原始像素宽度 + var readableScale = targetImage.paintedWidth * targetImage.scale / targetImageInfo.width * 100; + if (readableScale.toFixed(0) > 2000 && readableScale.toFixed(0) <= 3000) { + floatLabel.displayStr = "2000%"; + } else if (readableScale.toFixed(0) < 2 && readableScale.toFixed(0) >= 0) { + floatLabel.displayStr = "2%"; + } else if (readableScale.toFixed(0) >= 2 && readableScale.toFixed(0) <= 2000) { + floatLabel.displayStr = readableScale.toFixed(0) + "%"; + } + floatLabel.visible = true; } - onWidthChanged: keepImageDisplayScale() - onHeightChanged: keepImageDisplayScale() + function startLiveText() { + console.debug("function startLiveText()"); + view.startLiveTextAnalyze(); + } + onHeightChanged: keepImageDisplayScale() onTargetImageChanged: { // 部分多页图 targetImage 变更时不会重复触发 targetImageReady ,在此处进行备用的判断 if (IV.Types.DynamicImage !== currentImageInfo.type) { // 适配窗口 - recalculateLiveText() + recalculateLiveText(); } else { - exitLiveText() + exitLiveText(); } } @@ -147,83 +138,92 @@ Item { onTargetImageReadyChanged: { if (IV.Types.DynamicImage !== currentImageInfo.type) { // 适配窗口 - recalculateLiveText() + recalculateLiveText(); } - - showScaleFloatLabel() + showScaleFloatLabel(); // 重置保留的缩放状态 - lastDisplayScaleWidth = 0 + lastDisplayScaleWidth = 0; } + onWidthChanged: keepImageDisplayScale() Connections { - enabled: targetImageReady - target: targetImage - ignoreUnknownSignals: true + function onPaintedHeightChanged() { + recalculateLiveText(); + } - onXChanged: recalculateLiveText() - onYChanged: recalculateLiveText() - onPaintedWidthChanged: recalculateLiveText() - onPaintedHeightChanged: recalculateLiveText() + function onPaintedWidthChanged() { + recalculateLiveText(); + } - onScaleChanged: { + function onScaleChanged() { // 图片实际缩放比值 绘制像素宽度 / 图片原始像素宽度 - var readableScale = targetImage.paintedWidth * targetImage.scale - / targetImageInfo.width * 100 + var readableScale = targetImage.paintedWidth * targetImage.scale / targetImageInfo.width * 100; // 缩放限制在 2% ~ 2000% ,变更后再次进入此函数处理 if (readableScale < 2) { - targetImage.scale = targetImageInfo.width * 0.02 / targetImage.paintedWidth - return + targetImage.scale = targetImageInfo.width * 0.02 / targetImage.paintedWidth; + return; } else if (readableScale > 2000) { - targetImage.scale = targetImageInfo.width * 20 / targetImage.paintedWidth - return + targetImage.scale = targetImageInfo.width * 20 / targetImage.paintedWidth; + return; } // 处于保持效果缩放状态时,保留之前的缩放比例 if (enableChangeDisplay) { - lastDisplayScaleWidth = targetImage.paintedWidth * targetImage.scale + lastDisplayScaleWidth = targetImage.paintedWidth * targetImage.scale; // 显示缩放框 - showScaleFloatLabel() + showScaleFloatLabel(); } // 重新文本识别 - recalculateLiveText() + recalculateLiveText(); } + + function onXChanged() { + recalculateLiveText(); + } + + function onYChanged() { + recalculateLiveText(); + } + + enabled: targetImageReady + ignoreUnknownSignals: true + target: targetImage } // 触发切换全屏状态 Connections { - target: GStatus - - onShowFullScreenChanged: { - if (window.isFullScreen !== GStatus.showFullScreen) { + function onShowFullScreenChanged() { + if (window.isFullScreen !== IV.GStatus.showFullScreen) { // 关闭详细信息窗口 - GStatus.showImageInfo = false - - GStatus.showFullScreen ? showPanelFullScreen() : escBack() + IV.GStatus.showImageInfo = false; + IV.GStatus.showFullScreen ? showPanelFullScreen() : escBack(); } } + + target: IV.GStatus } PropertyAnimation { id: showfullAnimation - target: parent.Window.window - from: 0 - to: 1 - property: "opacity" duration: 200 easing.type: Easing.InExpo + from: 0 + property: "opacity" + target: parent.Window.window + to: 1 onRunningChanged: { - GStatus.fullScreenAnimating = running + IV.GStatus.fullScreenAnimating = running; // 动画结束时,重置缩放状态 if (!running && targetImageReady) { // 匹配缩放处理 if (targetImageInfo.height < targetImage.height) { - targetImage.scale = targetImageInfo.width / targetImage.paintedWidth + targetImage.scale = targetImageInfo.width / targetImage.paintedWidth; } else { - targetImage.scale = 1.0 + targetImage.scale = 1.0; } } } @@ -232,45 +232,49 @@ Item { //缩放快捷键 Shortcut { sequence: "Ctrl+=" + onActivated: { - targetImage.scale = targetImage.scale / 0.9 + targetImage.scale = targetImage.scale / 0.9; } } Shortcut { sequence: "Ctrl+-" + onActivated: { - targetImage.scale = targetImage.scale * 0.9 + targetImage.scale = targetImage.scale * 0.9; } } Shortcut { sequence: "Up" + onActivated: { - targetImage.scale = targetImage.scale / 0.9 + targetImage.scale = targetImage.scale / 0.9; } } Shortcut { sequence: "Down" + onActivated: { - targetImage.scale = targetImage.scale * 0.9 + targetImage.scale = targetImage.scale * 0.9; } } Shortcut { sequence: "Ctrl+Shift+/" + onActivated: { - var screenPos = mapToGlobal(parent.x, parent.y) - fileControl.showShortcutPanel( - screenPos.x + parent.Window.width / 2, - screenPos.y + parent.Window.height / 2) + var screenPos = mapToGlobal(parent.x, parent.y); + IV.FileControl.showShortcutPanel(screenPos.x + parent.Window.width / 2, screenPos.y + parent.Window.height / 2); } } // 图片滑动视图的上层组件 Item { id: viewBackground + anchors.fill: parent } @@ -283,63 +287,101 @@ Item { property Image currentImage: { if (view.currentItem) { if (view.currentItem.item) { - return view.currentItem.item.targetImage + return view.currentItem.item.targetImage; } } - return null + return null; + } + + //live text退出函数 + function exitLiveText() { + console.debug("live exit"); + liveTextAnalyzer.breakAnalyze(); + ltw.clearLive(); + liveTextTimer.stop(); + } + + //live text分析函数 + //缩放和切换需要重新执行此函数 + function liveTextAnalyze() { + console.debug("Live Text analyze start"); + viewBackground.grabToImage(function (result) { + //截取当前控件显示 + liveTextAnalyzer.setImage(result.image); //设置分析图片 + liveTextAnalyzer.analyze(currentIndex); //执行分析(异步执行,函数会立即返回) + // result.saveToFile("/home/user/Desktop/viewer.png") //保存截取的图片,debug用 + }); + } + + //live text执行函数 + function runLiveText(resultCanUse, token) { + console.debug("function runLiveText", token, currentIndex); + if (resultCanUse && token == currentIndex) { + //这里无视警告,就是需要js的==来进行自动类型转换 + console.debug("run live start"); + ltw.drawRect(liveTextAnalyzer.liveBlock()); + ltw.visible = true; + } + } + + //live text分析启动控制 + function startLiveTextAnalyze() { + if (targetImageReady && IV.Types.DynamicImage !== currentImageInfo.type) { + liveTextTimer.restart(); + } } - // 设置滑动视图的父组件以获取完整的OCR图片信息 - parent: viewBackground // WARNING: 目前 ListView 组件屏蔽输入处理,窗口拖拽依赖底层的 ApplicationWindow // 因此不允许 ListView 的区域超过标题栏,图片缩放超过显示区域无妨。 // 显示图片上下边界距边框 50px (标题栏宽度),若上下间隔不一致时,进行拖拽、导航定位或需减去(间隔差/2) // 在全屏时无上下边框 anchors.horizontalCenter: parent.horizontalCenter - y: window.isFullScreen ? 0 : GStatus.titleHeight - height: window.isFullScreen ? parent.height : (parent.height - (GStatus.titleHeight * 2)) - width: parent.width + boundsBehavior: Flickable.StopAtBounds + boundsMovement: Flickable.FollowBoundsBehavior cacheBuffer: 100 - interactive: !GStatus.fullScreenAnimating && GStatus.viewInteractive - preferredHighlightBegin: 0 - preferredHighlightEnd: 0 - highlightRangeMode: ListView.StrictlyEnforceRange + currentIndex: IV.GControl.currentIndex + flickDeceleration: 500 + height: window.isFullScreen ? parent.height : (parent.height - (IV.GStatus.titleHeight * 2)) highlightMoveDuration: 0 + highlightRangeMode: ListView.StrictlyEnforceRange + interactive: !IV.GStatus.fullScreenAnimating && IV.GStatus.viewInteractive + model: IV.GControl.globalModel orientation: ListView.Horizontal + + // 设置滑动视图的父组件以获取完整的OCR图片信息 + parent: viewBackground + preferredHighlightBegin: 0 + preferredHighlightEnd: 0 snapMode: ListView.SnapOneItem - flickDeceleration: 500 - boundsMovement: Flickable.FollowBoundsBehavior - boundsBehavior: Flickable.StopAtBounds + width: parent.width + y: window.isFullScreen ? 0 : IV.GStatus.titleHeight - currentIndex: GControl.currentIndex - model: GControl.globalModel delegate: Loader { id: swipeViewItemLoader - property url source: model.imageUrl property alias frameCount: imageInfo.frameCount + property url imageSource: model.imageUrl active: { if (ListView.isCurrentItem) { - return true + return true; } - if (view.currentIndex - 1 === index - || view.currentIndex + 1 === index) { - return true + if (view.currentIndex - 1 === index || view.currentIndex + 1 === index) { + return true; } - return false + return false; } - visible: active asynchronous: true - width: view.width height: view.height + visible: active + width: view.width onActiveChanged: { if (active && imageInfo.delegateSource) { setSource(imageInfo.delegateSource, { - "source": swipeViewItemLoader.source, - "type": imageInfo.type - }) + "source": swipeViewItemLoader.imageSource, + "type": imageInfo.type + }); } } @@ -351,101 +393,94 @@ Item { property bool isCurrentItem: swipeViewItemLoader.ListView.isCurrentItem function checkDelegateSource() { - if (IV.ImageInfo.Ready !== status - && IV.ImageInfo.Error !== status) { - return + if (IV.ImageInfo.Ready !== status && IV.ImageInfo.Error !== status) { + return; } - if (!imageInfo.exists) { - delegateSource = "qrc:/qml/ImageDelegate/NonexistImageDelegate.qml" - return + delegateSource = "qrc:/qml/ImageDelegate/NonexistImageDelegate.qml"; + return; } - switch (type) { case IV.Types.NormalImage: - delegateSource = "qrc:/qml/ImageDelegate/NormalImageDelegate.qml" - return + delegateSource = "qrc:/qml/ImageDelegate/NormalImageDelegate.qml"; + return; case IV.Types.DynamicImage: - delegateSource = "qrc:/qml/ImageDelegate/DynamicImageDelegate.qml" - return + delegateSource = "qrc:/qml/ImageDelegate/DynamicImageDelegate.qml"; + return; case IV.Types.SvgImage: - delegateSource = "qrc:/qml/ImageDelegate/SvgImageDelegate.qml" - return + delegateSource = "qrc:/qml/ImageDelegate/SvgImageDelegate.qml"; + return; case IV.Types.MultiImage: - delegateSource = "qrc:/qml/ImageDelegate/MultiImageDelegate.qml" - return + delegateSource = "qrc:/qml/ImageDelegate/MultiImageDelegate.qml"; + return; default: // Default is damaged image. - delegateSource = "qrc:/qml/ImageDelegate/DamagedImageDelegate.qml" - return + delegateSource = "qrc:/qml/ImageDelegate/DamagedImageDelegate.qml"; + return; } } // WARNING: 由于 Delegate 组件宽度关联的 view.width ,ListView 会计算 Delegate 大小 // Loader 在构造时直接设置图片链接会导致数据提前加载,破坏了延迟加载策略 // 调整机制,不在激活状态的图片信息置为空,在需要加载时设置图片链接 - source: swipeViewItemLoader.active ? swipeViewItemLoader.source : "" + source: swipeViewItemLoader.active ? swipeViewItemLoader.imageSource : "" onDelegateSourceChanged: { if (swipeViewItemLoader.active && delegateSource) { setSource(delegateSource, { - "source": swipeViewItemLoader.source, - "type": imageInfo.type - }) + "source": swipeViewItemLoader.imageSource, + "type": imageInfo.type + }); } } - onStatusChanged: checkDelegateSource() - onIsCurrentItemChanged: checkDelegateSource() // InfoChange 在图片文件变更时触发,此时图片文件路径不变,文件内容被替换、删除 onInfoChanged: { if (isCurrentItem) { - GControl.currentFrameIndex = 0 + IV.GControl.currentFrameIndex = 0; } - - checkDelegateSource() - var temp = delegateSource - delegateSource = "" - delegateSource = temp + checkDelegateSource(); + var temp = delegateSource; + delegateSource = ""; + delegateSource = temp; } + onIsCurrentItemChanged: checkDelegateSource() + onStatusChanged: checkDelegateSource() } } + Component.onCompleted: { + liveTextAnalyzer.analyzeFinished.connect(runLiveText); + } onCurrentIndexChanged: { // 当通过界面拖拽导致索引变更,需要调整多页图索引范围 - if (view.currentIndex < GControl.currentIndex) { - GControl.previousImage() - } else if (view.currentIndex > GControl.currentIndex) { - GControl.nextImage() + if (view.currentIndex < IV.GControl.currentIndex) { + IV.GControl.previousImage(); + } else if (view.currentIndex > IV.GControl.currentIndex) { + IV.GControl.nextImage(); } } - - onMovementStarted: { - GStatus.viewFlicking = true - } - onMovementEnded: { - GStatus.viewFlicking = false + IV.GStatus.viewFlicking = false; } - - Component.onCompleted: { - liveTextAnalyzer.analyzeFinished.connect(runLiveText) + onMovementStarted: { + IV.GStatus.viewFlicking = true; } BusyIndicator { anchors.centerIn: parent - width: 48 height: 48 running: visible visible: { if (view.currentItem.status === Loader.Loading) { - return true + return true; } else if (view.currentItem.item) { - return view.currentItem.item.status === Image.Loading + return view.currentItem.item.status === Image.Loading; } // 非确定状态都为加载,以避免启动时的白屏过长 - return true + return true; } + width: 48 } // 实况文本背景遮罩 @@ -458,68 +493,28 @@ Item { visible: highlightTextButton.checked && highlightTextButton.visible onVisibleChanged: { - var target = view.currentImage + var target = view.currentImage; if (null !== target) { - width = target.paintedWidth * target.scale - height = target.paintedHeight * target.scale + width = target.paintedWidth * target.scale; + height = target.paintedHeight * target.scale; } } } - //live text分析函数 - //缩放和切换需要重新执行此函数 - function liveTextAnalyze() { - console.debug("Live Text analyze start") - viewBackground.grabToImage(function (result) { - //截取当前控件显示 - liveTextAnalyzer.setImage(result.image) //设置分析图片 - liveTextAnalyzer.analyze(currentIndex) //执行分析(异步执行,函数会立即返回) - // result.saveToFile("/home/user/Desktop/viewer.png") //保存截取的图片,debug用 - }) - } - - //live text执行函数 - function runLiveText(resultCanUse, token) { - console.debug("function runLiveText", token, currentIndex) - if (resultCanUse && token == currentIndex) { - //这里无视警告,就是需要js的==来进行自动类型转换 - console.debug("run live start") - ltw.drawRect(liveTextAnalyzer.liveBlock()) - ltw.visible = true - } - } - - //live text退出函数 - function exitLiveText() { - console.debug("live exit") - liveTextAnalyzer.breakAnalyze() - ltw.clearLive() - liveTextTimer.stop() - } - - //live text分析启动控制 - function startLiveTextAnalyze() { - if (targetImageReady - && IV.Types.DynamicImage !== currentImageInfo.type) { - liveTextTimer.restart() - } - } - //live text分析启动延迟 Timer { id: liveTextTimer interval: 1500 - running: false repeat: false + running: false onTriggered: { - if (fileControl.isCanSupportOcr(GControl.currentSource) - && targetImageReady - && IV.Types.DynamicImage !== currentImageInfo.type) { + var supportOcr = IV.FileControl.isCanSupportOcr(IV.GControl.currentSource); + if (supportOcr && targetImageReady && IV.Types.DynamicImage !== currentImageInfo.type) { // 执行条件和OCR按钮使能条件一致 - view.liveTextAnalyze() - running = false + view.liveTextAnalyze(); + running = false; } } } @@ -528,19 +523,20 @@ Item { IV.ImageInfo { id: currentImageInfo - frameIndex: GControl.currentFrameIndex - source: GControl.currentSource + frameIndex: IV.GControl.currentFrameIndex + source: IV.GControl.currentSource } Connections { - target: GStatus - onViewFlickingChanged: { - if (GStatus.viewFlicking) { - view.exitLiveText() + function onViewFlickingChanged() { + if (IV.GStatus.viewFlicking) { + view.exitLiveText(); } else { - view.startLiveTextAnalyze() + view.startLiveTextAnalyze(); } } + + target: IV.GStatus } LiveTextWidget { @@ -557,67 +553,71 @@ Item { property bool isHighlight: false checked: isHighlight - width: 50 height: 50 - visible: false parent: imageViewerArea + visible: false + width: 50 z: parent.z + 100 + + // 高亮时不弹出工具栏栏以方便选取 + onCheckedChanged: { + IV.GStatus.animationBlock = checked; + } + onClicked: { + isHighlight = !isHighlight; + } + onVisibleChanged: { + if (!visible) { + IV.GStatus.animationBlock = false; + } + } + anchors { - right: parent.right - rightMargin: 100 bottom: parent.bottom bottomMargin: thumbnailViewBackGround.height + 20 + right: parent.right + rightMargin: 100 } DciIcon { - width: 45 - height: 45 Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom + height: 45 name: "icon_recognition_highlight" - } - - onClicked: { - isHighlight = !isHighlight - } - - // 高亮时不弹出工具栏栏以方便选取 - onCheckedChanged: { - GStatus.animationBlock = checked - } - onVisibleChanged: { - if (!visible) { - GStatus.animationBlock = false - } + width: 45 } } //rename窗口 ReName { id: renamedialog + } // 右键菜单 ViewRightMenu { id: rightMenu + // 拷贝快捷键冲突:选中实况文本时,屏蔽拷贝图片的快捷键 + copyableConfig: !ltw.currentHasSelect + + // 菜单销毁后也需要发送信号,否则可能未正常送达 + Component.onDestruction: { + IV.GStatus.showRightMenu = false; + } onClosed: { - GStatus.showRightMenu = false - imageViewer.forceActiveFocus() + IV.GStatus.showRightMenu = false; + imageViewer.forceActiveFocus(); } Connections { - target: GStatus - onShowRightMenuChanged: { - if (GStatus.showRightMenu) { - rightMenu.popup(cursorTool.currentCursorPos()) - rightMenu.focus = true + function onShowRightMenuChanged() { + if (IV.GStatus.showRightMenu) { + rightMenu.popup(IV.CursorTool.currentCursorPos()); + rightMenu.focus = true; } } - } - // 菜单销毁后也需要发送信号,否则可能未正常送达 - Component.onDestruction: { - GStatus.showRightMenu = false + target: IV.GStatus } } @@ -626,10 +626,10 @@ Item { id: infomationDig function show() { - GStatus.showImageInfo = true + IV.GStatus.showImageInfo = true; } - active: GStatus.showImageInfo + active: IV.GStatus.showImageInfo asynchronous: true // 图片属性信息窗口 source: "qrc:/qml/InformationDialog/InformationDialog.qml" @@ -639,19 +639,20 @@ Item { Loader { id: naviLoader - active: GStatus.enableNavigation && null !== targetImage - && targetImage.scale > 1 + active: IV.GStatus.enableNavigation && null !== targetImage && targetImage.scale > 1 + height: 112 + width: 150 + + sourceComponent: NavigationWidget { + anchors.fill: parent + targetImage: view.currentImage + } + anchors { bottom: parent.bottom bottomMargin: 109 left: parent.left leftMargin: 15 } - width: 150 - height: 112 - sourceComponent: NavigationWidget { - anchors.fill: parent - targetImage: view.currentImage - } } } diff --git a/src/qml/InformationDialog/InformationDialog.qml b/src/qml/InformationDialog/InformationDialog.qml index 3d99a0ec..3464b448 100644 --- a/src/qml/InformationDialog/InformationDialog.qml +++ b/src/qml/InformationDialog/InformationDialog.qml @@ -11,8 +11,8 @@ import org.deepin.image.viewer 1.0 as IV DialogWindow { property int leftX: 20 property int topY: 70 - property string fileName: fileControl.slotGetFileNameSuffix(filePath) - property url filePath: GControl.currentSource + property string fileName: IV.FileControl.slotGetFileNameSuffix(filePath) + property url filePath: IV.GControl.currentSource flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.MSWindowsFixedSizeDialogHint | Qt.WindowStaysOnTopHint visible: false @@ -73,7 +73,7 @@ DialogWindow { PropertyItemDelegate { title: qsTr("Size") - description: fileControl.slotGetInfo("FileSize", filePath) + description: IV.FileControl.slotGetInfo("FileSize", filePath) corners: RoundRectangle.BottomLeftCorner } @@ -85,7 +85,7 @@ DialogWindow { PropertyItemDelegate { title: qsTr("Type") - description: fileControl.slotFileSuffix(filePath, false) + description: IV.FileControl.slotFileSuffix(filePath, false) corners: RoundRectangle.BottomRightCorner } } @@ -97,14 +97,14 @@ DialogWindow { PropertyActionItemDelegate { Layout.fillWidth: true title: qsTr("Date captured") - description: fileControl.slotGetInfo("DateTimeOriginal", filePath) + description: IV.FileControl.slotGetInfo("DateTimeOriginal", filePath) corners: RoundRectangle.TopCorner } PropertyActionItemDelegate { Layout.fillWidth: true title: qsTr("Date modified") - description: fileControl.slotGetInfo("DateTimeDigitized", filePath) + description: IV.FileControl.slotGetInfo("DateTimeDigitized", filePath) corners: RoundRectangle.BottomCorner } } @@ -122,80 +122,80 @@ DialogWindow { PropertyItemDelegate { contrlImplicitWidth: 66 title: qsTr("Aperture") - description: fileControl.slotGetInfo("ApertureValue", filePath) + description: IV.FileControl.slotGetInfo("ApertureValue", filePath) corners: RoundRectangle.TopLeftCorner } PropertyItemDelegate { contrlImplicitWidth: 106 title: qsTr("Exposure program") - description: fileControl.slotGetInfo("ExposureProgram", filePath) + description: IV.FileControl.slotGetInfo("ExposureProgram", filePath) Layout.fillWidth: true } PropertyItemDelegate { contrlImplicitWidth: 86 title: qsTr("Focal length") - description: fileControl.slotGetInfo("FocalLength", filePath) + description: IV.FileControl.slotGetInfo("FocalLength", filePath) corners: RoundRectangle.TopRightCorner } PropertyItemDelegate { contrlImplicitWidth: 66 title: qsTr("ISO") - description: fileControl.slotGetInfo("ISOSpeedRatings", filePath) + description: IV.FileControl.slotGetInfo("ISOSpeedRatings", filePath) } PropertyItemDelegate { contrlImplicitWidth: 106 title: qsTr("Exposure mode") - description: fileControl.slotGetInfo("ExposureMode", filePath) + description: IV.FileControl.slotGetInfo("ExposureMode", filePath) Layout.fillWidth: true } PropertyItemDelegate { contrlImplicitWidth: 86 title: qsTr("Exposure time") - description: fileControl.slotGetInfo("ExposureTime", filePath) + description: IV.FileControl.slotGetInfo("ExposureTime", filePath) } PropertyItemDelegate { contrlImplicitWidth: 66 title: qsTr("Flash") - description: fileControl.slotGetInfo("Flash", filePath) + description: IV.FileControl.slotGetInfo("Flash", filePath) } PropertyItemDelegate { contrlImplicitWidth: 106 title: qsTr("Flash compensation") - description: fileControl.slotGetInfo("FlashExposureComp", filePath) + description: IV.FileControl.slotGetInfo("FlashExposureComp", filePath) Layout.fillWidth: true } PropertyItemDelegate { contrlImplicitWidth: 86 title: qsTr("Max aperture") - description: fileControl.slotGetInfo("MaxApertureValue", filePath) + description: IV.FileControl.slotGetInfo("MaxApertureValue", filePath) } PropertyItemDelegate { contrlImplicitWidth: 66 title: qsTr("Colorspace") - description: fileControl.slotGetInfo("ColorSpace", filePath) + description: IV.FileControl.slotGetInfo("ColorSpace", filePath) corners: RoundRectangle.BottomLeftCorner } PropertyItemDelegate { contrlImplicitWidth: 106 title: qsTr("Metering mode") - description: fileControl.slotGetInfo("MeteringMode", filePath) + description: IV.FileControl.slotGetInfo("MeteringMode", filePath) Layout.fillWidth: true } PropertyItemDelegate { contrlImplicitWidth: 86 title: qsTr("White balance") - description: fileControl.slotGetInfo("WhiteBalance", filePath) + description: IV.FileControl.slotGetInfo("WhiteBalance", filePath) corners: RoundRectangle.BottomRightCorner } } @@ -203,14 +203,14 @@ DialogWindow { PropertyItemDelegate { contrlImplicitWidth: 240 title: qsTr("Device model") - description: fileControl.slotGetInfo("Model", filePath) + description: IV.FileControl.slotGetInfo("Model", filePath) corners: RoundRectangle.AllCorner } PropertyItemDelegate { contrlImplicitWidth: 240 title: qsTr("Lens model") - description: fileControl.slotGetInfo("LensType", filePath) + description: IV.FileControl.slotGetInfo("LensType", filePath) corners: RoundRectangle.AllCorner } @@ -231,7 +231,7 @@ DialogWindow { // 窗口关闭时复位组件状态 onClosing: { fileNameProp.reset() - GStatus.showImageInfo = false + IV.GStatus.showImageInfo = false } // 图片变更时复位组件状态(切换时关闭重命名框) @@ -244,8 +244,8 @@ DialogWindow { IV.ImageInfo { id: imageInfo - frameIndex: GControl.currentFrameIndex - source: GControl.currentSource + frameIndex: IV.GControl.currentFrameIndex + source: IV.GControl.currentSource } } diff --git a/src/qml/InformationDialog/PropertyActionItemDelegate.qml b/src/qml/InformationDialog/PropertyActionItemDelegate.qml index 4d4f3e8a..8cd603f7 100644 --- a/src/qml/InformationDialog/PropertyActionItemDelegate.qml +++ b/src/qml/InformationDialog/PropertyActionItemDelegate.qml @@ -33,11 +33,11 @@ Control { if (showPicLabel.visible) { showPicLabel.visible = false // 每次显示编辑框时显示为图片名称 - nameedit.text = fileControl.slotGetFileName(GControl.currentSource) + nameedit.text = IV.FileControl.slotGetFileName(IV.GControl.currentSource) } else { var name = nameedit.text - if (!fileControl.isShowToolTip(GControl.currentSource, name) && name.length > 0) { - fileControl.slotFileReName(name, GControl.currentSource) + if (!IV.FileControl.isShowToolTip(IV.GControl.currentSource, name) && name.length > 0) { + IV.FileControl.slotFileReName(name, IV.GControl.currentSource) } showPicLabel.visible = true } @@ -62,7 +62,7 @@ Control { id: nameedit visible: !showPicLabel.visible - text: fileControl.slotGetFileName(GControl.currentSource) + text: IV.FileControl.slotGetFileName(IV.GControl.currentSource) anchors { topMargin: 5 leftMargin: 10 @@ -71,7 +71,7 @@ Control { focus: true selectByMouse: true alertText: qsTr("The file already exists, please use another name") - showAlert: fileControl.isShowToolTip(GControl.currentSource, nameedit.text) && nameedit.visible + showAlert: IV.FileControl.isShowToolTip(IV.GControl.currentSource, nameedit.text) && nameedit.visible height: 20 // 限制输入特殊字符 validator: RegExpValidator { diff --git a/src/qml/LiveText/LiveBlockRubberBand.qml b/src/qml/LiveText/LiveBlockRubberBand.qml index 20aa119a..4cdda5ce 100644 --- a/src/qml/LiveText/LiveBlockRubberBand.qml +++ b/src/qml/LiveText/LiveBlockRubberBand.qml @@ -3,24 +3,26 @@ // SPDX-License-Identifier: GPL-3.0-or-later import QtQuick 2.11 +import org.deepin.image.viewer 1.0 as IV Item { id: root + function setActiveColor(color) { + rect.color = color; + } + visible: false - function setActiveColor(color) { - rect.color = color + Component.onCompleted: { + rect.color = IV.CursorTool.activeColor(); + IV.CursorTool.activeColorChanged.connect(setActiveColor); } Rectangle { id: rect - opacity: 0.15 - anchors.fill: parent - } - Component.onCompleted: { - rect.color = cursorTool.activeColor() - cursorTool.activeColorChanged.connect(setActiveColor) + anchors.fill: parent + opacity: 0.15 } } diff --git a/src/qml/LiveText/LiveTextWidget.qml b/src/qml/LiveText/LiveTextWidget.qml index 6129c3d1..87487c4f 100644 --- a/src/qml/LiveText/LiveTextWidget.qml +++ b/src/qml/LiveText/LiveTextWidget.qml @@ -7,149 +7,181 @@ import QtQuick.Window 2.11 import QtQuick.Controls 2.4 import QtQuick.Layouts 1.11 import org.deepin.dtk 1.0 - +import org.deepin.image.viewer 1.0 as IV import "LiveBlockController.js" as BlockLoader Item { id: root - visible: false - //广播信号 - //退出Live Text模式 - signal liveExit() + //block汇总 + property var blockArray: new Array + property bool currentHasSelect: false //清除选择效果,参数为发出此信号的index,-1表示全部清除且只有root可以发出 signal clearSelect(int pressesIndex) - //鼠标在block中点击,此时要初始化所有block的选择能力,鼠标按下的X坐标,鼠标按下的Y坐标 - signal mousePressedInBlock(int pressX, int pressY) + //广播信号 + //退出Live Text模式 + signal liveExit //鼠标在整个Live区域中移动,此时鼠标必定是保持press状态,参数为当前鼠标的X坐标,当前鼠标的Y坐标 signal mouseMoveInLive(int moveX, int moveY) + //鼠标在block中点击,此时要初始化所有block的选择能力,鼠标按下的X坐标,鼠标按下的Y坐标 + signal mousePressedInBlock(int pressX, int pressY) + //鼠标在block中释放,此时要解除所有block的选择状态 - signal mouseReleasedInBlock() + signal mouseReleasedInBlock - //block汇总 - property var blockArray : new Array + function clearLive() { + root.visible = false; + liveExit(); + + // 销毁控件 + for (var i = 0; i != blockArray.length; ++i) { + var rectDetail = blockArray[i]; + // 信号连接需显式断开 + // 清除选择 + clearSelect.disconnect(rectDetail.clearSelect); + // 框选相关 + // 广播信号发出 + mousePressedInBlock.disconnect(rectDetail.mousePressed); + mouseMoveInLive.disconnect(rectDetail.mouseAxisChanged); + mouseReleasedInBlock.disconnect(rectDetail.mouseReleased); + //触发广播信号 + rectDetail.blockPressed.disconnect(mousePressedInBlock); + rectDetail.blockMouseMoved.disconnect(mouseMoveInLive); + rectDetail.blockMouseReleased.disconnect(mouseReleasedInBlock); + // 弹出菜单 + rectDetail.blockMenu.disconnect(doPopMenu); + rectDetail.destroy(); + } + blockArray = []; + highlightTextButton.visible = false; + + // 清除选中标记 + currentHasSelect = false; + } + + function doPopMenu() { + liveMenu.popup(); + } + + function doTextCopy() { + var currentData; + var result = ""; + for (var i = 0; i != blockArray.length; ++i) { + currentData = blockArray[i].getSelectedText(); + if (currentData.length !== 0) { + result = result + currentData + "\n"; + } + } + IV.FileControl.copyText(result); + } + + function doTextSelectAll() { + for (var i = 0; i != blockArray.length; ++i) { + blockArray[i].selectAll(); + } + currentHasSelect = haveSelect(); + } //目前暂时只能处理对齐的矩形框 //blocks: QList> function drawRect(blocks) { - if(blockArray.length != 0) { - liveExit() - blockArray.length = [] + if (blockArray.length != 0) { + liveExit(); + blockArray.length = []; } - - for(var id = 0;id !== blocks.length;id++) { - BlockLoader.createBlockObjects(root) - var rectDetail = BlockLoader.block - rectDetail.index = id - rectDetail.width = blocks[id][2] - blocks[id][0] - rectDetail.height = blocks[id][5] - blocks[id][3] - rectDetail.x = blocks[id][0] - rectDetail.y = blocks[id][1] - rectDetail.setCharLocations(liveTextAnalyzer.charBox(id)) - //控件销毁 - liveExit.connect(rectDetail.destroy) + for (var id = 0; id !== blocks.length; id++) { + BlockLoader.createBlockObjects(root); + var rectDetail = BlockLoader.block; + rectDetail.index = id; + rectDetail.width = blocks[id][2] - blocks[id][0]; + rectDetail.height = blocks[id][5] - blocks[id][3]; + rectDetail.x = blocks[id][0]; + rectDetail.y = blocks[id][1]; + rectDetail.setCharLocations(liveTextAnalyzer.charBox(id)); + //控件销毁在 clearLive() 处理(需断开信号连接) //清除选择 - clearSelect.connect(rectDetail.clearSelect) + clearSelect.connect(rectDetail.clearSelect); //框选相关 //广播信号发出 - mousePressedInBlock.connect(rectDetail.mousePressed) - mouseMoveInLive.connect(rectDetail.mouseAxisChanged) - mouseReleasedInBlock.connect(rectDetail.mouseReleased) + mousePressedInBlock.connect(rectDetail.mousePressed); + mouseMoveInLive.connect(rectDetail.mouseAxisChanged); + mouseReleasedInBlock.connect(rectDetail.mouseReleased); //触发广播信号 - rectDetail.blockPressed.connect(mousePressedInBlock) - rectDetail.blockMouseMoved.connect(mouseMoveInLive) - rectDetail.blockMouseReleased.connect(mouseReleasedInBlock) + rectDetail.blockPressed.connect(mousePressedInBlock); + rectDetail.blockMouseMoved.connect(mouseMoveInLive); + rectDetail.blockMouseReleased.connect(mouseReleasedInBlock); //弹出菜单 - rectDetail.blockMenu.connect(doPopMenu) + rectDetail.blockMenu.connect(doPopMenu); //保存 - blockArray.push(rectDetail) + blockArray.push(rectDetail); } - - highlightTextButton.visible = blockArray.length > 0 - highlightTextButton.isHighlight = false + highlightTextButton.visible = blockArray.length > 0; + highlightTextButton.isHighlight = false; } - function doTextCopy() { - var currentData - var result = "" - for(var i = 0;i != blockArray.length;++i) { - currentData = blockArray[i].getSelectedText() - if(currentData.length !== 0) { - result = result + currentData + "\n" + function haveSelect() { + var have = false; + for (var i = 0; i != blockArray.length; ++i) { + if (blockArray[i].getSelectedTextCount() !== 0) { + have = true; + break; } } - fileControl.copyText(result) + return have; } - function doTextSelectAll() { - for(var i = 0;i != blockArray.length;++i) { - blockArray[i].selectAll() - } - } + visible: false - function doPopMenu() { - liveMenu.popup() + onMouseReleasedInBlock: { + currentHasSelect = haveSelect(); } - function clearLive() { - root.visible = false - liveExit() - blockArray = [] - highlightTextButton.visible = false - } + Menu { + id: liveMenu - function haveSelect() { - var have = false - for(var i = 0;i != blockArray.length;++i) { - if(blockArray[i].getSelectedTextCount() !== 0) { - have = true - break + onVisibleChanged: { + if (visible == true) { + copyItem.enabled = haveSelect(); } } - return have - } - - Menu { - id: liveMenu MenuItem { id: copyItem + text: qsTr("Copy (Ctrl+C)") + onTriggered: { - doTextCopy() + doTextCopy(); } Shortcut { + enabled: currentHasSelect sequence: "Ctrl+C" - enabled: parent.enabled + onActivated: { - doTextCopy() + Qt.callLater(doTextCopy); } } } MenuItem { text: qsTr("Select all (Ctrl+A)") + onTriggered: { - doTextSelectAll() + doTextSelectAll(); } Shortcut { sequence: "Ctrl+A" + onActivated: { - doTextSelectAll() + doTextSelectAll(); } } } - - onVisibleChanged: { - if(visible == true) { - copyItem.enabled = haveSelect() - } - } } } diff --git a/src/qml/MainStack.qml b/src/qml/MainStack.qml index 9d44c8bb..9205e17b 100755 --- a/src/qml/MainStack.qml +++ b/src/qml/MainStack.qml @@ -11,53 +11,60 @@ import org.deepin.image.viewer 1.0 as IV Item { id: stackView - anchors.fill: parent - // 打开图片对话框 function openImageDialog() { if (Loader.Ready === fileDialogLoader.status) { - fileDialogLoader.item.open() + fileDialogLoader.item.open(); } else { - fileDialogLoader.active = true + fileDialogLoader.active = true; } } // 设置当前使用的图片源 function setSourcePath(path) { - if (fileControl.isCurrentWatcherDir(path)) { + if (IV.FileControl.isCurrentWatcherDir(path)) { // 更新当前文件路径 - GControl.currentSource = path + IV.GControl.currentSource = path; } else { - var sourcePaths = fileControl.getDirImagePath(path) + var sourcePaths = IV.FileControl.getDirImagePath(path); if (sourcePaths.length > 0) { - GControl.setImageFiles(sourcePaths, path) + IV.GControl.setImageFiles(sourcePaths, path); // 记录当前读取的图片信息 - fileControl.resetImageFiles(sourcePaths) - - console.log("Load image info", path) - - switchImageView() + IV.FileControl.resetImageFiles(sourcePaths); + console.log("Load image info", path); + switchImageView(); } else { - switchOpenImage() + switchOpenImage(); } } } - function switchOpenImage() { - GStatus.stackPage = Number(IV.Types.OpenImagePage) - window.title = "" - contentLoader.setSource("qrc:/qml/OpenImageWidget.qml") + function switchImageView() { + IV.GStatus.stackPage = Number(IV.Types.ImageViewPage); + contentLoader.setSource("qrc:/qml/FullImageView.qml"); } - function switchImageView() { - GStatus.stackPage = Number(IV.Types.ImageViewPage) - contentLoader.setSource("qrc:/qml/FullImageView.qml") + function switchOpenImage() { + IV.GStatus.stackPage = Number(IV.Types.OpenImagePage); + window.title = ""; + contentLoader.setSource("qrc:/qml/OpenImageWidget.qml"); } function switchSliderShow() { - if (Number(IV.Types.ImageViewPage) === GStatus.stackPage) { - GStatus.stackPage = Number(IV.Types.SliderShowPage) - contentLoader.setSource("qrc:/qml/SliderShow.qml") + if (Number(IV.Types.ImageViewPage) === IV.GStatus.stackPage) { + IV.GStatus.stackPage = Number(IV.Types.SliderShowPage); + contentLoader.setSource("qrc:/qml/SliderShow.qml"); + } + } + + anchors.fill: parent + + Component.onCompleted: { + // main.cpp 从命令行启动时取得命令行参数,判断默认加载界面 + if (IV.GStatus.stackPage === Number(IV.Types.ImageViewPage)) { + switchImageView(); + } else { + switchOpenImage(); } } @@ -73,17 +80,19 @@ Item { } Connections { - target: fileControl // 关联外部通过 DBus 等方式触发调用看图 - onOpenImageFile: { - setSourcePath(fileName) + function onOpenImageFile() { + setSourcePath(fileName); } + + target: IV.FileControl } // 标题栏 ViewTopTitle { id: titleRect + z: parent.z + 1 } @@ -100,20 +109,18 @@ Item { anchors.fill: parent - onEntered: { - background.color = "gray" - drag.accept(Qt.CopyAction) - } - onDropped: { if (drop.hasUrls && drop.urls.length !== 0) { - setSourcePath(drop.urls[0]) + setSourcePath(drop.urls[0]); } } - + onEntered: { + background.color = "gray"; + drag.accept(Qt.CopyAction); + } onExited: { - background.color = "white" - console.log("onExited") + background.color = "white"; + console.log("onExited"); } } @@ -122,58 +129,44 @@ Item { active: false asynchronous: true + sourceComponent: FileDialog { id: fileDialog - title: qsTr("Select pictures") folder: shortcuts.pictures + nameFilters: ["Image files (*.jpg *.png *.bmp *.gif *.ico *.jpe " + "*.jps *.jpeg *.jng *.koala *.koa *.lbm " + "*.iff *.mng *.pbm *.pbmraw *.pcd *.pcx " + "*.pgm *.pgmraw *.ppm *.ppmraw *.ras *.tga " + "*.targa *.tiff *.tif *.wbmp *.psd *.cut *.xbm " + "*.xpm *.dds *.fax *.g3 *.sgi *.exr *.pct *.pic " + "*.pict *.webp *.jxr *.mrw *.raf *.mef *.raw *.orf " + "*.djvu *.or2 *.icns *.dng *.svg *.nef *.pef *.pxm *.pnm)"] selectMultiple: true - nameFilters: ["Image files (*.jpg *.png *.bmp *.gif *.ico *.jpe " - + "*.jps *.jpeg *.jng *.koala *.koa *.lbm " - + "*.iff *.mng *.pbm *.pbmraw *.pcd *.pcx " - + "*.pgm *.pgmraw *.ppm *.ppmraw *.ras *.tga " - + "*.targa *.tiff *.tif *.wbmp *.psd *.cut *.xbm " - + "*.xpm *.dds *.fax *.g3 *.sgi *.exr *.pct *.pic " - + "*.pict *.webp *.jxr *.mrw *.raf *.mef *.raw *.orf " - + "*.djvu *.or2 *.icns *.dng *.svg *.nef *.pef *.pxm *.pnm)"] - - onAccepted: { - stackView.setSourcePath(fileDialog.fileUrls[0]) - } + title: qsTr("Select pictures") Component.onCompleted: { - fileDialog.open() + fileDialog.open(); + } + onAccepted: { + stackView.setSourcePath(fileDialog.fileUrls[0]); } } } // 快捷键打开帮助手册 Shortcut { - enabled: true autoRepeat: false + enabled: true sequence: "F1" + onActivated: { - D.ApplicationHelper.handleHelpAction() + D.ApplicationHelper.handleHelpAction(); } } // 打开图片文件 Shortcut { sequence: "Ctrl+O" + onActivated: { // 不在动画展示状态 - if (Number(IV.Types.SliderShowPage) !== GStatus.stackPage) { - openImageDialog() + if (Number(IV.Types.SliderShowPage) !== IV.GStatus.stackPage) { + openImageDialog(); } } } - - Component.onCompleted: { - // main.cpp 从命令行启动时取得命令行参数,判断默认加载界面 - if (GStatus.stackPage === Number(IV.Types.ImageViewPage)) { - switchImageView() - } else { - switchOpenImage() - } - } } diff --git a/src/qml/NavigationWidget.qml b/src/qml/NavigationWidget.qml index af937106..5a0652da 100644 --- a/src/qml/NavigationWidget.qml +++ b/src/qml/NavigationWidget.qml @@ -7,113 +7,108 @@ import QtQuick.Window 2.11 import QtQuick.Controls 2.4 import QtQuick.Controls.Styles 1.2 import QtGraphicalEffects 1.0 +import org.deepin.image.viewer 1.0 as IV Item { - // 指向的图片对象 - property Image targetImage - property bool imageNeedNavi: false property bool enableRefresh: true + property bool imageNeedNavi: false + property real imgBottom: 0 // 使用浮点,避免精度丢失导致拖拽边界有细微偏差 property real imgLeft: 0 - property real imgTop: 0 property real imgRight: 0 - property real imgBottom: 0 - - width: 150 - height: 112 - visible: GStatus.enableNavigation && imageNeedNavi + property real imgTop: 0 + // 指向的图片对象 + property Image targetImage function refreshNaviMask() { if (enableRefresh) { - delayRefreshTimer.start() + delayRefreshTimer.start(); } } function refreshNaviMaskImpl() { if (!targetImage) { - imageNeedNavi = false - return + imageNeedNavi = false; + return; } // 图片实际绘制大小 - var paintedWidth = targetImage.paintedWidth * targetImage.scale - var paintedHeight = targetImage.paintedHeight * targetImage.scale + var paintedWidth = targetImage.paintedWidth * targetImage.scale; + var paintedHeight = targetImage.paintedHeight * targetImage.scale; // 绘制区域未超过窗口显示区域 if (paintedWidth <= Window.width && paintedHeight <= Window.height) { - imageNeedNavi = false - return + imageNeedNavi = false; + return; } - imageNeedNavi = true + imageNeedNavi = true; // 获取横坐标偏移及宽度 - var xOffset = (currentImage.width - currentImage.paintedWidth) / 2 + var xOffset = (currentImage.width - currentImage.paintedWidth) / 2; if (paintedWidth < Window.width) { - maskArea.x = xOffset - maskArea.width = currentImage.paintedWidth + maskArea.x = xOffset; + maskArea.width = currentImage.paintedWidth; } else { // 图片显示宽度 + 超过窗口的图片宽度偏移量 - var expandWidth = paintedWidth - Window.width - var xRatio = ((expandWidth / 2) - targetImage.x) / paintedWidth - maskArea.x = xOffset + currentImage.paintedWidth * xRatio - - var widthRatio = Window.width / paintedWidth - maskArea.width = currentImage.paintedWidth * widthRatio + var expandWidth = paintedWidth - Window.width; + var xRatio = ((expandWidth / 2) - targetImage.x) / paintedWidth; + maskArea.x = xOffset + currentImage.paintedWidth * xRatio; + var widthRatio = Window.width / paintedWidth; + maskArea.width = currentImage.paintedWidth * widthRatio; } - - var yOffset = (currentImage.height - currentImage.paintedHeight) / 2 + var yOffset = (currentImage.height - currentImage.paintedHeight) / 2; if (paintedHeight < Window.height) { - maskArea.y = yOffset - maskArea.height = currentImage.paintedHeight + maskArea.y = yOffset; + maskArea.height = currentImage.paintedHeight; } else { - var expandHeight = paintedHeight - Window.height - var yRatio = ((expandHeight / 2) - targetImage.y) / paintedHeight - maskArea.y = yOffset + currentImage.paintedHeight * yRatio - - var heightRatio = Window.height / paintedHeight - maskArea.height = currentImage.paintedHeight * heightRatio + var expandHeight = paintedHeight - Window.height; + var yRatio = ((expandHeight / 2) - targetImage.y) / paintedHeight; + maskArea.y = yOffset + currentImage.paintedHeight * yRatio; + var heightRatio = Window.height / paintedHeight; + maskArea.height = currentImage.paintedHeight * heightRatio; } } function updateImagePositionBasedOnMask() { - enableRefresh = false + enableRefresh = false; // 根据按键位置更新图片展示区域 - var xOffset = maskArea.x - imgLeft - var yOffset = maskArea.y - imgTop + var xOffset = maskArea.x - imgLeft; + var yOffset = maskArea.y - imgTop; // 按当前蒙皮位置映射图片位置 - var xRatio = xOffset / currentImage.paintedWidth - var yRatio = yOffset / currentImage.paintedHeight + var xRatio = xOffset / currentImage.paintedWidth; + var yRatio = yOffset / currentImage.paintedHeight; // 图片实际绘制大小 - var paintedWidth = targetImage.paintedWidth * targetImage.scale - var paintedHeight = targetImage.paintedHeight * targetImage.scale - + var paintedWidth = targetImage.paintedWidth * targetImage.scale; + var paintedHeight = targetImage.paintedHeight * targetImage.scale; if (paintedWidth < Window.width) { - targetImage.x = 0 + targetImage.x = 0; } else { // 取得比例相对偏移位置 - 超过窗口的图片显示宽度 - var imageXOffset = (paintedWidth - Window.width) / 2 - targetImage.x = imageXOffset - paintedWidth * xRatio + var imageXOffset = (paintedWidth - Window.width) / 2; + targetImage.x = imageXOffset - paintedWidth * xRatio; } - if (paintedHeight < Window.height) { - targetImage.y = 0 + targetImage.y = 0; } else { - var imageYOffset = (paintedHeight - Window.height) / 2 - targetImage.y = imageYOffset - paintedHeight * yRatio + var imageYOffset = (paintedHeight - Window.height) / 2; + targetImage.y = imageYOffset - paintedHeight * yRatio; } - - enableRefresh = true + enableRefresh = true; } + height: 112 + visible: IV.GStatus.enableNavigation && imageNeedNavi + width: 150 + onTargetImageChanged: { if (targetImage) { // 立即刷新 - refreshNaviMaskImpl() + refreshNaviMaskImpl(); // transformOrigin 需在图片中心 if (Item.Center !== targetImage.transformOrigin) { - console.warn("Image transform origin error, not center!") + console.warn("Image transform origin error, not center!"); } } } @@ -121,21 +116,22 @@ Item { Timer { id: delayRefreshTimer - repeat: false interval: 1 + repeat: false + onTriggered: refreshNaviMaskImpl() } Connections { - target: undefined === targetImage ? null : targetImage enabled: undefined !== targetImage && enableRefresh ignoreUnknownSignals: true + target: undefined === targetImage ? null : targetImage - onXChanged: refreshNaviMask() - onYChanged: refreshNaviMask() - onPaintedWidthChanged: refreshNaviMask() onPaintedHeightChanged: refreshNaviMask() + onPaintedWidthChanged: refreshNaviMask() onScaleChanged: refreshNaviMask() + onXChanged: refreshNaviMask() + onYChanged: refreshNaviMask() } // 背景图片绘制区域 @@ -143,14 +139,15 @@ Item { id: imageRect anchors.fill: parent - radius: 10 color: Qt.rgba(255, 255, 255, 0.4) layer.enabled: true + radius: 10 + layer.effect: OpacityMask { maskSource: Rectangle { - width: imageRect.width height: imageRect.height radius: imageRect.radius + width: imageRect.width } } @@ -161,17 +158,15 @@ Item { asynchronous: true cache: false fillMode: Image.PreserveAspectFit - source: "image://ImageLoad/" + GControl.currentSource + "#frame_" - + GControl.currentFrameIndex + source: "image://ImageLoad/" + IV.GControl.currentSource + "#frame_" + IV.GControl.currentFrameIndex onStatusChanged: { if (Image.Ready === status) { - imgLeft = (currentImage.width - currentImage.paintedWidth) / 2 - imgTop = (currentImage.height - currentImage.paintedHeight) / 2 - imgRight = imgLeft + currentImage.paintedWidth - imgBottom = imgTop + currentImage.paintedHeight - - refreshNaviMaskImpl() + imgLeft = (currentImage.width - currentImage.paintedWidth) / 2; + imgTop = (currentImage.height - currentImage.paintedHeight) / 2; + imgRight = imgLeft + currentImage.paintedWidth; + imgBottom = imgTop + currentImage.paintedHeight; + refreshNaviMaskImpl(); } } } @@ -179,21 +174,23 @@ Item { // 退出按钮 ToolButton { - anchors { - right: parent.right - top: parent.top - rightMargin: 3 - topMargin: 3 - } - width: 22 height: 22 + width: 22 z: 100 + background: Rectangle { radius: 50 } onClicked: { - GStatus.enableNavigation = false + IV.GStatus.enableNavigation = false; + } + + anchors { + right: parent.right + rightMargin: 3 + top: parent.top + topMargin: 3 } Image { @@ -206,10 +203,10 @@ Item { Rectangle { id: maskArea - opacity: 0.4 - color: "black" - border.width: 1 border.color: "white" + border.width: 1 + color: "black" + opacity: 0.4 } // 允许拖动范围 @@ -217,32 +214,30 @@ Item { id: mouseArea anchors.fill: parent - drag.target: maskArea drag.axis: Drag.XAndYAxis + drag.maximumX: imgRight - maskArea.width + drag.maximumY: imgBottom - maskArea.height // 以图片的范围来限制拖动范围 drag.minimumX: imgLeft - drag.maximumX: imgRight - maskArea.width drag.minimumY: imgTop - drag.maximumY: imgBottom - maskArea.height + drag.target: maskArea + + onPositionChanged: { + if (mouseArea.pressed) { + updateImagePositionBasedOnMask(); + } + } // 拖拽与主界面的联动 onPressed: { - maskArea.x = Math.max(mouseX - maskArea.width / 2, 0) - maskArea.y = Math.max(mouseY - maskArea.height / 2, 0) + maskArea.x = Math.max(mouseX - maskArea.width / 2, 0); + maskArea.y = Math.max(mouseY - maskArea.height / 2, 0); // 限定鼠标点击的蒙皮在图片内移动 - maskArea.x = Math.max(imgLeft, Math.min(maskArea.x, - imgRight - maskArea.width)) - maskArea.y = Math.max(imgTop, Math.min(maskArea.y, - imgBottom - maskArea.height)) + maskArea.x = Math.max(imgLeft, Math.min(maskArea.x, imgRight - maskArea.width)); + maskArea.y = Math.max(imgTop, Math.min(maskArea.y, imgBottom - maskArea.height)); // 根据按键位置更新图片展示区域 - updateImagePositionBasedOnMask() - } - - onPositionChanged: { - if (mouseArea.pressed) { - updateImagePositionBasedOnMask() - } + updateImagePositionBasedOnMask(); } } } diff --git a/src/qml/OpenImageWidget.qml b/src/qml/OpenImageWidget.qml index 53573c67..cc498f19 100644 --- a/src/qml/OpenImageWidget.qml +++ b/src/qml/OpenImageWidget.qml @@ -4,37 +4,39 @@ import QtQuick 2.11 import QtQuick.Controls 2.4 -import org.deepin.dtk 1.0 as DTK +import org.deepin.dtk 1.0 + +Control { + id: control -Rectangle { anchors.fill: parent - color: backcontrol.DTK.ColorSelector.backgroundColor - DTK.ActionButton { + DciIcon { id: openWidgetImage anchors.centerIn: parent - icon { - name: "import_photo" - width: 128 - height: 128 - } + // TODO: 当前图标文件存在异常,仅有亮色主题 + name: "import_photo" + sourceSize.height: 128 + sourceSize.width: 128 + theme: DTK.themeType } - DTK.RecommandButton { + RecommandButton { id: openFileBtn - width: 300 + font.capitalization: Font.MixedCase height: 35 + text: qsTr("Open Image") + width: 300 + + onClicked: stackView.openImageDialog() + anchors { - top: openWidgetImage.bottom - topMargin: 10 left: openWidgetImage.left leftMargin: -86 + top: openWidgetImage.bottom + topMargin: 10 } - font.capitalization: Font.MixedCase - text: qsTr("Open Image") - - onClicked: stackView.openImageDialog() } } diff --git a/src/qml/ReName.qml b/src/qml/ReName.qml index 819b94ca..3a55d340 100644 --- a/src/qml/ReName.qml +++ b/src/qml/ReName.qml @@ -7,111 +7,141 @@ import QtQuick.Window 2.10 import QtQuick.Controls 2.4 import QtQuick.Layouts 1.11 import org.deepin.dtk 1.0 +import org.deepin.image.viewer 1.0 as IV DialogWindow { id: renamedialog property string filesuffix: ".jpg" - visible: false - width: 400 - height: 180 - minimumWidth: 400 - maximumWidth: 400 - minimumHeight: 180 - maximumHeight: 180 - modality: Qt.WindowModal - flags: Qt.Window | Qt.WindowCloseButtonHint | Qt.WindowStaysOnTopHint - icon: "deepin-image-viewer" + function renameFile() { + IV.FileControl.slotFileReName(nameedit.text, IV.GControl.currentSource); + renamedialog.visible = false; + } function setFileName(name) { - nameedit.text = name + nameedit.text = name; } function setFileSuffix(suffix) { - filesuffix = suffix + filesuffix = suffix; + } + + flags: Qt.Window | Qt.WindowCloseButtonHint | Qt.WindowStaysOnTopHint + height: 180 + icon: "deepin-image-viewer" + maximumHeight: 180 + maximumWidth: 400 + minimumHeight: 180 + minimumWidth: 400 + modality: Qt.WindowModal + visible: false + width: 400 + + onVisibleChanged: { + if (visible) { + setFileName(IV.FileControl.slotGetFileName(IV.GControl.currentSource)); + setFileSuffix(IV.FileControl.slotFileSuffix(IV.GControl.currentSource)); + setX(window.x + window.width / 2 - width / 2); + setY(window.y + window.height / 2 - height / 2); + } } Text { id: renametitle - anchors { - left: parent.left - leftMargin: 46 - top: parent.top + property Palette textColor: Palette { + normal: ("black") + normalDark: ("white") } - width: 308 - height: 24 + + color: ColorSelector.textColor font.pixelSize: 16 + height: 24 + horizontalAlignment: Text.AlignHCenter text: qsTr("Input a new name") textFormat: Text.PlainText verticalAlignment: Text.AlignBottom - horizontalAlignment: Text.AlignHCenter + width: 308 + + anchors { + left: parent.left + leftMargin: 46 + top: parent.top + } } LineEdit { id: nameedit - anchors { - top: renametitle.bottom - topMargin: 16 - } - width: 380 - height: 36 - font: DTK.fontManager.t5 + alertText: qsTr("The file already exists, please use another name") focus: true + font: DTK.fontManager.t5 + height: 36 maximumLength: 255 - filesuffix.length + selectByMouse: true + showAlert: IV.FileControl.isShowToolTip(IV.GControl.currentSource, nameedit.text) + width: 380 + validator: RegExpValidator { regExp: /^[^ \\.\\\\/\':\\*\\?\"<>|%&][^\\\\/\':\\*\\?\"<>|%&]*/ } - selectByMouse: true - alertText: qsTr("The file already exists, please use another name") - showAlert: fileControl.isShowToolTip(GControl.currentSource, nameedit.text) + + Keys.onPressed: event => { + switch (event.key) { + case Qt.Key_Return: + case Qt.Key_Enter: + renameFile(); + break; + case Qt.Key_Escape: + renamedialog.visible = false; + break; + default: + break; + } + } + + anchors { + top: renametitle.bottom + topMargin: 16 + } } Button { id: cancelbtn - anchors { - top: nameedit.bottom - topMargin: 10 - right: nameedit.right - } + font.pixelSize: 16 + height: 36 text: qsTr("Cancel") width: 185 - height: 36 - font.pixelSize: 16 onClicked: { - renamedialog.visible = false + renamedialog.visible = false; } - } - - Button { - id: enterbtn anchors { + right: nameedit.right top: nameedit.bottom topMargin: 10 - left: nameedit.left } - width: 185 + } + + RecommandButton { + id: enterbtn + + enabled: !IV.FileControl.isShowToolTip(IV.GControl.currentSource, nameedit.text) && nameedit.text.length > 0 height: 36 text: qsTr("Confirm") - enabled: !fileControl.isShowToolTip(GControl.currentSource, nameedit.text) && nameedit.text.length > 0 + width: 185 onClicked: { - fileControl.slotFileReName(nameedit.text, GControl.currentSource); - renamedialog.visible = false + renameFile(); } - } - onVisibleChanged: { - if (visible) { - setFileName(fileControl.slotGetFileName(GControl.currentSource)) - setFileSuffix(fileControl.slotFileSuffix(GControl.currentSource)) - setX(window.x + window.width / 2 - width / 2) - setY(window.y + window.height / 2 - height / 2) + anchors { + left: nameedit.left + top: nameedit.bottom + topMargin: 10 } } } diff --git a/src/qml/SliderShow.qml b/src/qml/SliderShow.qml index bebad47a..6d78397f 100644 --- a/src/qml/SliderShow.qml +++ b/src/qml/SliderShow.qml @@ -5,88 +5,92 @@ import QtQuick 2.11 import QtQuick.Controls 2.4 import org.deepin.dtk 1.0 +import org.deepin.image.viewer 1.0 as IV Item { id: sliderShow - // 减少重复触发,变更后单独更新图片源 - property alias source: fadeInOutImage.imageSource property bool autoRun: false - anchors.fill: parent + // 减少重复触发,变更后单独更新图片源 + property alias source: fadeInOutImage.imageSource - function restart() { - autoRun = true - fadeInOutImage.restart() + function outSliderShow() { + showNormal(); + stackView.switchImageView(); } - function outSliderShow() { - showNormal() - stackView.switchImageView() + function restart() { + autoRun = true; + fadeInOutImage.restart(); } function switchNextImage() { - if (!GControl.hasNextImage) { - GControl.firstImage() + if (!IV.GControl.hasNextImage) { + IV.GControl.firstImage(); } else { - GControl.nextImage() + IV.GControl.nextImage(); } - - source = "image://ImageLoad/" + GControl.currentSource + "#frame_" + GControl.currentFrameIndex + source = "image://ImageLoad/" + IV.GControl.currentSource + "#frame_" + IV.GControl.currentFrameIndex; } function switchPreviousImage() { - if (!GControl.hasPreviousImage) { - GControl.lastImage() + if (!IV.GControl.hasPreviousImage) { + IV.GControl.lastImage(); } else { - GControl.previousImage() + IV.GControl.previousImage(); } + source = "image://ImageLoad/" + IV.GControl.currentSource + "#frame_" + IV.GControl.currentFrameIndex; + } - source = "image://ImageLoad/" + GControl.currentSource + "#frame_" + GControl.currentFrameIndex + anchors.fill: parent + + Component.onCompleted: { + source = "image://ImageLoad/" + IV.GControl.currentSource + "#frame_" + IV.GControl.currentFrameIndex; + showFullScreen(); + restart(); } Timer { id: timer interval: 3000 - running: autoRun repeat: true + running: autoRun onTriggered: switchNextImage() } SFadeInOut { id: fadeInOutImage + anchors.fill: parent } MouseArea { id: sliderArea - anchors.fill: parent acceptedButtons: Qt.LeftButton | Qt.RightButton + anchors.fill: parent cursorShape: "BlankCursor" hoverEnabled: true onClicked: { if (mouse.button === Qt.RightButton) { - sliderMenu.popup() + sliderMenu.popup(); } } - - onDoubleClicked: outSliderShow() onCursorShapeChanged: sliderCursorTimer.start() - + onDoubleClicked: outSliderShow() onMouseXChanged: { - sliderArea.cursorShape = "ArrowCursor" + sliderArea.cursorShape = "ArrowCursor"; } - onMouseYChanged: { - sliderArea.cursorShape = "ArrowCursor" + sliderArea.cursorShape = "ArrowCursor"; if (mouseY > height - 100) { - showSliderAnimation.start() + showSliderAnimation.start(); } else { - hideSliderAnimation.start() + hideSliderAnimation.start(); } } @@ -94,112 +98,114 @@ Item { id: sliderCursorTimer interval: 3000 // 设置定时器定时时间为500ms,默认1000ms - running: true // 是否开启定时,默认是false,当为true的时候,进入此界面就开始定时 repeat: true // 是否重复定时,默认为false + running: true // 是否开启定时,默认是false,当为true的时候,进入此界面就开始定时 + onTriggered: sliderArea.cursorShape = "BlankCursor" } NumberAnimation { id: hideSliderAnimation - target: sliderFloatPanel - from: sliderFloatPanel.y - to: screen.height - property: "y" duration: 200 easing.type: Easing.InOutQuad + from: sliderFloatPanel.y + property: "y" + target: sliderFloatPanel + to: screen.height } NumberAnimation { id: showSliderAnimation - target: sliderFloatPanel - from: sliderFloatPanel.y - to: screen.height - 80 - property: "y" duration: 200 easing.type: Easing.InOutQuad + from: sliderFloatPanel.y + property: "y" + target: sliderFloatPanel + to: screen.height - 80 } FloatingPanel { id: sliderFloatPanel - width: 232 height: 70 + width: 232 Component.onCompleted: { - sliderFloatPanel.x = (screen.width - width) / 2 - sliderFloatPanel.y = screen.height - 80 + sliderFloatPanel.x = (screen.width - width) / 2; + sliderFloatPanel.y = screen.height - 80; } Row { height: 50 + spacing: 10 + anchors { left: parent.left leftMargin: 10 top: parent.top topMargin: parent.height / 2 - height / 2 } - spacing: 10 IconButton { id: sliderPrevious - icon.name: "icon_previous" - width: 50 - height: parent.height ToolTip.delay: 500 + ToolTip.text: qsTr("Previous") ToolTip.timeout: 5000 ToolTip.visible: hovered - ToolTip.text: qsTr("Previous") + height: parent.height + icon.name: "icon_previous" + width: 50 onClicked: { - switchPreviousImage() - autoRun = false + switchPreviousImage(); + autoRun = false; } } IconButton { id: sliderPause - icon.name: autoRun ? "icon_suspend" : "icon_play_start" - width: 50 - height: parent.height ToolTip.delay: 500 + ToolTip.text: autoRun ? qsTr("Pause") : qsTr("Play") ToolTip.timeout: 5000 ToolTip.visible: hovered - ToolTip.text: autoRun ? qsTr("Pause") : qsTr("Play") + height: parent.height + icon.name: autoRun ? "icon_suspend" : "icon_play_start" + width: 50 onClicked: { - autoRun = !autoRun + autoRun = !autoRun; } } IconButton { id: sliderNext - icon.name: "icon_next" - width: 50 - height: parent.height ToolTip.delay: 500 + ToolTip.text: qsTr("Next") ToolTip.timeout: 5000 ToolTip.visible: hovered - ToolTip.text: qsTr("Next") + height: parent.height + icon.name: "icon_next" + width: 50 onClicked: { - switchNextImage() - autoRun = false + switchNextImage(); + autoRun = false; } } ActionButton { - icon.name: "entry_clear" - width: 24 - height: parent.height ToolTip.delay: 500 + ToolTip.text: qsTr("Exit") ToolTip.timeout: 5000 ToolTip.visible: hovered - ToolTip.text: qsTr("Exit") + height: parent.height + icon.name: "entry_clear" + width: 24 onClicked: outSliderShow() } @@ -215,39 +221,35 @@ Item { MenuItem { text: autoRun ? qsTr("Pause") : qsTr("Play") + onTriggered: { - autoRun = !autoRun + autoRun = !autoRun; } // 添加处理快捷键,播放幻灯片时暂停/播放 Shortcut { id: pauseShortCut - sequence: "Space" // 进行幻灯片播放时允许响应空格快捷键处理暂停/播放 enabled: sliderShow.visible + sequence: "Space" onActivated: { - autoRun = !autoRun + autoRun = !autoRun; } } } MenuItem { text: qsTr("Exit") + onTriggered: outSliderShow() Shortcut { sequence: "Esc" + onActivated: outSliderShow() } } } - - Component.onCompleted: { - source = "image://ImageLoad/" + GControl.currentSource + "#frame_" + GControl.currentFrameIndex - - showFullScreen() - restart() - } } diff --git a/src/qml/ThumbnailDelegate/MultiThumnailDelegate.qml b/src/qml/ThumbnailDelegate/MultiThumnailDelegate.qml index 70b2043f..6e409e79 100644 --- a/src/qml/ThumbnailDelegate/MultiThumnailDelegate.qml +++ b/src/qml/ThumbnailDelegate/MultiThumnailDelegate.qml @@ -12,22 +12,35 @@ BaseThumbnailDelegate { // 请求的显示宽度 property real requestWidth: { // 最少需要保留两张图片显示的大小 - var minWidth = 30 + 11 + var minWidth = 30 + 11; // 计算允许的多页图显示宽度,宽度计算以当前界面窗口的宽度计算,此处取宽度值 - var enableWidth = GStatus.thumbnailVaildWidth - (30 * 2) - 20 - enableWidth = Math.max(enableWidth, minWidth) + var enableWidth = IV.GStatus.thumbnailVaildWidth - (30 * 2) - 20; + enableWidth = Math.max(enableWidth, minWidth); // 每张子图片最多占用30px,间隔1px - var curMultiImageWidth = (31 * listView.count) - 1 - var multiViewWidth = Math.min(619, Math.min(curMultiImageWidth, enableWidth)) - return multiViewWidth + var curMultiImageWidth = (31 * listView.count) - 1; + var multiViewWidth = Math.min(619, Math.min(curMultiImageWidth, enableWidth)); + return multiViewWidth; } height: 50 + imgRadius: 4 shader.visible: true shader.z: 1 y: 15 - imgRadius: 4 + + // NOTE: 直接设置宽度将被Loader宽度覆盖,使用状态可同时取得动画效果 + states: [ + State { + name: "active" + when: IV.ImageInfo.Ready === imageInfo.status + + PropertyChanges { + target: multiThumnailDelegate + width: multiThumnailDelegate.requestWidth + } + } + ] ListView { id: listView @@ -36,28 +49,44 @@ BaseThumbnailDelegate { property int preferredItemWidth: Math.min(Math.max(10, (width - 30) / (count - 1)), 30) anchors.fill: parent - orientation: Qt.Horizontal + // 上层存在另一 ListView 底部缩略图栏,此 ListView 设置拖动不可超过边界,不影响二者的拖拽效果 + boundsBehavior: Flickable.StopAtBounds cacheBuffer: 200 - spacing: 1 + clip: true + currentIndex: IV.GControl.currentFrameIndex focus: true + highlightFollowsCurrentItem: true // 使用范围模式,允许高亮缩略图在preferredHighlightBegin~End的范围外,使缩略图填充空白区域 highlightRangeMode: ListView.ApplyRange - highlightFollowsCurrentItem: true + model: imageInfo.frameCount + orientation: Qt.Horizontal // 使焦点图片尽量显示在缩略图栏中部 preferredHighlightBegin: width / 2 - 25 preferredHighlightEnd: width / 2 + 25 - // 上层存在另一 ListView 底部缩略图栏,此 ListView 设置拖动不可超过边界,不影响二者的拖拽效果 - boundsBehavior: Flickable.StopAtBounds - clip: true - currentIndex: GControl.currentFrameIndex + spacing: 1 - model: imageInfo.frameCount delegate: Item { id: delegateItem height: listView.height width: listView.preferredItemWidth + // 焦点状态的图片单独展示 + states: State { + name: "active" + when: ListView.isCurrentItem + + PropertyChanges { + target: delegateItem + width: 30 + } + + PropertyChanges { + border.width: 1 + target: imgBorder + } + } + ThumbnailImage { id: img @@ -71,9 +100,9 @@ BaseThumbnailDelegate { id: imgBorder anchors.fill: parent - color: parent.ListView.isCurrentItem ? "transparent" : Qt.rgba(0, 0, 0, 0.3) - border.width: 0 border.color: "white" + border.width: 0 + color: parent.ListView.isCurrentItem ? "transparent" : Qt.rgba(0, 0, 0, 0.3) } MouseArea { @@ -82,23 +111,7 @@ BaseThumbnailDelegate { onClicked: { // 向外发送多页图帧号切换事件 - GControl.currentFrameIndex = index - } - } - - // 焦点状态的图片单独展示 - states: State { - name: "active" - when: ListView.isCurrentItem - - PropertyChanges { - target: delegateItem - width: 30 - } - - PropertyChanges { - target: imgBorder - border.width: 1 + IV.GControl.currentFrameIndex = index; } } } @@ -107,10 +120,10 @@ BaseThumbnailDelegate { onCurrentIndexChanged: { // 特殊处理,防止默认显示首个缩略图时采用Center的策略会被遮挡部分 if (0 == currentIndex) { - positionViewAtBeginning() + positionViewAtBeginning(); } else { // 尽可能将高亮缩略图显示在列表中 - positionViewAtIndex(currentIndex, ListView.Center) + positionViewAtIndex(currentIndex, ListView.Center); } } } @@ -118,19 +131,7 @@ BaseThumbnailDelegate { // 进入代理时,图片信息一定加载完成 IV.ImageInfo { id: imageInfo + source: multiThumnailDelegate.source } - - // NOTE: 直接设置宽度将被Loader宽度覆盖,使用状态可同时取得动画效果 - states: [ - State { - name: "active" - when: IV.ImageInfo.Ready === imageInfo.status - - PropertyChanges { - target: multiThumnailDelegate - width: multiThumnailDelegate.requestWidth - } - } - ] } diff --git a/src/qml/ThumbnailDelegate/NormalThumbnailDelegate.qml b/src/qml/ThumbnailDelegate/NormalThumbnailDelegate.qml index d1a70580..55cadcd0 100644 --- a/src/qml/ThumbnailDelegate/NormalThumbnailDelegate.qml +++ b/src/qml/ThumbnailDelegate/NormalThumbnailDelegate.qml @@ -13,6 +13,28 @@ BaseThumbnailDelegate { // 判断是否为多页图 property bool isMultiImage: IV.Types.MultiImage === img.type + states: [ + // 激活状态 + State { + name: "active" + when: isCurrentItem && !isMultiImage + + PropertyChanges { + height: 50 + imgRadius: 4 + target: normalThumbnailDelegate + width: height + y: 15 + } + + PropertyChanges { + target: normalThumbnailDelegate.shader + visible: true + z: 1 + } + } + ] + Item { anchors.fill: parent visible: true @@ -26,47 +48,45 @@ BaseThumbnailDelegate { Rectangle { id: maskRect + anchors.fill: img - visible: false radius: imgRadius + visible: false } OpacityMask { id: imgMask + anchors.fill: img - source: img maskSource: maskRect + source: img } } // 执行旋转操作后,重新读取缓存数据,更新图片状态 Connections { - enabled: isCurrentItem - target: GControl - onCurrentRotationChanged: { + function onCurrentRotationChanged() { // Note: 确保缓存中的数据已刷新后更新界面 // 0 为复位,缓存中的数据已转换,无需再次加载 - if (0 !== GControl.currentRotation) { - img.reset() + if (0 !== IV.GControl.currentRotation) { + img.reset(); } } + + enabled: isCurrentItem + target: IV.GControl } // 图片数角标 Loader { id: anchorLoader - height: 14 - width: Math.max(20, implicitWidth) - anchors { - right: parent.right - bottom: parent.bottom - } - // 非多页图无需实例化 active: isMultiImage + height: 14 // 仅多页图显示角标(为焦点时不加载) visible: isMultiImage + width: Math.max(20, implicitWidth) sourceComponent: Rectangle { id: anchorRect @@ -79,16 +99,16 @@ BaseThumbnailDelegate { id: anchorLabel anchors.fill: parent - topPadding: 3 bottomPadding: 3 + font.pixelSize: 11 + font.weight: Font.DemiBold + horizontalAlignment: Text.AlignHCenter leftPadding: 2 rightPadding: 2 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.weight: Font.DemiBold - font.pixelSize: 11 // 取得当前索引的图片帧号 text: (img.frameCount <= 999) ? img.frameCount : "999+" + topPadding: 3 + verticalAlignment: Text.AlignVCenter background: Rectangle { implicitHeight: 14 @@ -97,12 +117,13 @@ BaseThumbnailDelegate { gradient: Gradient { GradientStop { - position: 0.0 color: "#FFC3C3C3" + position: 0.0 } + GradientStop { - position: 1.0 color: "#FFD8D8D8" + position: 1.0 } } } @@ -111,22 +132,27 @@ BaseThumbnailDelegate { // 图片角标的内阴影 InnerShadow { anchors.fill: anchorLabel - verticalOffset: -1 color: Qt.rgba(0, 0, 0, 0.1) source: anchorLabel + verticalOffset: -1 } // 图片角标的外阴影 DropShadow { anchors.fill: anchorLabel - verticalOffset: 1 cached: true + color: Qt.rgba(0, 0, 0, 0.3) radius: 2 samples: 4 - color: Qt.rgba(0, 0, 0, 0.3) source: anchorLabel + verticalOffset: 1 } } + + anchors { + bottom: parent.bottom + right: parent.right + } } MouseArea { @@ -136,30 +162,8 @@ BaseThumbnailDelegate { hoverEnabled: true onClicked: { - GControl.currentFrameIndex = 0 - GControl.currentIndex = index + IV.GControl.currentFrameIndex = 0; + IV.GControl.currentIndex = index; } } - - states: [ - // 激活状态 - State { - name: "active" - when: isCurrentItem && !isMultiImage - - PropertyChanges { - target: normalThumbnailDelegate - y: 15 - height: 50 - width: height - imgRadius: 4 - } - - PropertyChanges { - target: normalThumbnailDelegate.shader - visible: true - z: 1 - } - } - ] } diff --git a/src/qml/ThumbnailDelegate/ThumbnailImage.qml b/src/qml/ThumbnailDelegate/ThumbnailImage.qml index 4c8046b3..43b67012 100644 --- a/src/qml/ThumbnailDelegate/ThumbnailImage.qml +++ b/src/qml/ThumbnailDelegate/ThumbnailImage.qml @@ -8,17 +8,17 @@ import org.deepin.image.viewer 1.0 as IV Item { id: thumbnailImage - property alias image: contentImage property alias frameCount: imageInfo.frameCount - property url source property int frameIndex: 0 + property alias image: contentImage + property url source property int status: imageInfo.status property int type function reset() { - var temp = contentImage.source - contentImage.source = "" - contentImage.source = temp + var temp = contentImage.source; + contentImage.source = ""; + contentImage.source = temp; } Image { @@ -39,21 +39,19 @@ Item { source: thumbnailImage.source onStatusChanged: { - var imageSource = "image://ThumbnailLoad/" + thumbnailImage.source - + "#frame_" + thumbnailImage.frameIndex + var imageSource = "image://ThumbnailLoad/" + thumbnailImage.source + "#frame_" + thumbnailImage.frameIndex; if (IV.ImageInfo.Error === imageInfo.status) { if (imageInfo.hasCachedThumbnail) { - contentImage.source = imageSource + contentImage.source = imageSource; } else { - contentImage.source = "qrc:/res/picture_damaged_58.svg" + contentImage.source = "qrc:/res/picture_damaged_58.svg"; } - } else if (IV.ImageInfo.Ready === imageInfo.status) { - contentImage.source = imageSource + contentImage.source = imageSource; } // 更新类型,不直接绑定 - thumbnailImage.type = imageInfo.type + thumbnailImage.type = imageInfo.type; } } } diff --git a/src/qml/ThumbnailListView.qml b/src/qml/ThumbnailListView.qml index b0d84fd3..6d3a74f2 100644 --- a/src/qml/ThumbnailListView.qml +++ b/src/qml/ThumbnailListView.qml @@ -12,76 +12,76 @@ import org.deepin.image.viewer 1.0 as IV Item { id: thumbnailView - property Image targetImage + // 除ListView外其它按键的占用宽度 + property int btnContentWidth: switchArrowLayout.width + leftRowLayout.width + rightRowLayout.width + deleteButton.width property bool imageIsNull: null === targetImage // 用于外部获取当前缩略图栏内容的长度,用于布局, 10px为焦点缩略图不在ListView中的边框像素宽度(radius = 4 * 1.25) property int listContentWidth: bottomthumbnaillistView.contentWidth + 10 - // 除ListView外其它按键的占用宽度 - property int btnContentWidth: switchArrowLayout.width + leftRowLayout.width - + rightRowLayout.width + deleteButton.width + property Image targetImage function deleteCurrentImage() { - if (!fileControl.deleteImagePath(GControl.currentSource)) { + if (!IV.FileControl.deleteImagePath(IV.GControl.currentSource)) { // 取消删除文件 - return + return; } - - GControl.removeImage(GControl.currentSource) - if (0 === GControl.imageCount) { - stackView.switchOpenImage() + IV.GControl.removeImage(IV.GControl.currentSource); + if (0 === IV.GControl.imageCount) { + stackView.switchOpenImage(); } } - function previous() { + function next() { // 切换时滑动视图不响应拖拽等触屏操作 - GStatus.viewInteractive = false - GControl.previousImage() - GStatus.viewInteractive = true + IV.GStatus.viewInteractive = false; + IV.GControl.nextImage(); + IV.GStatus.viewInteractive = true; } - function next() { + function previous() { // 切换时滑动视图不响应拖拽等触屏操作 - GStatus.viewInteractive = false - GControl.nextImage() - GStatus.viewInteractive = true + IV.GStatus.viewInteractive = false; + IV.GControl.previousImage(); + IV.GStatus.viewInteractive = true; } Binding { delayed: true - target: GStatus property: "thumbnailVaildWidth" + target: IV.GStatus value: window.width - 20 - thumbnailListView.btnContentWidth } Row { id: switchArrowLayout + leftPadding: 10 + spacing: 10 + anchors { left: parent.left verticalCenter: parent.verticalCenter } - spacing: 10 - leftPadding: 10 IconButton { id: previousButton - enabled: GControl.hasPreviousImage - width: 50 - height: 50 - icon.name: "icon_previous" ToolTip.delay: 500 + ToolTip.text: qsTr("Previous") ToolTip.timeout: 5000 ToolTip.visible: hovered - ToolTip.text: qsTr("Previous") + enabled: IV.GControl.hasPreviousImage + height: 50 + icon.name: "icon_previous" + width: 50 onClicked: { - previous() + previous(); } Shortcut { sequence: "Left" + onActivated: previous() } } @@ -89,21 +89,22 @@ Item { IconButton { id: nextButton - enabled: GControl.hasNextImage - width: 50 - height: 50 - icon.name: "icon_next" ToolTip.delay: 500 + ToolTip.text: qsTr("Next") ToolTip.timeout: 5000 ToolTip.visible: hovered - ToolTip.text: qsTr("Next") + enabled: IV.GControl.hasNextImage + height: 50 + icon.name: "icon_next" + width: 50 onClicked: next() Shortcut { sequence: "Right" + onActivated: { - next() + next(); } } } @@ -112,68 +113,67 @@ Item { Row { id: leftRowLayout + leftPadding: 40 + rightPadding: 20 + spacing: 10 + anchors { left: switchArrowLayout.right verticalCenter: parent.verticalCenter } - spacing: 10 - leftPadding: 40 - rightPadding: 20 IconButton { id: fitImageButton - anchors.leftMargin: 30 - width: 50 - height: 50 - icon.name: "icon_11" - enabled: !imageIsNull ToolTip.delay: 500 + ToolTip.text: qsTr("Original size") ToolTip.timeout: 5000 ToolTip.visible: hovered - ToolTip.text: qsTr("Original size") + anchors.leftMargin: 30 + enabled: !imageIsNull + height: 50 + icon.name: "icon_11" + width: 50 onClicked: { - imageViewer.fitImage() - imageViewer.recalculateLiveText() + imageViewer.fitImage(); + imageViewer.recalculateLiveText(); } } IconButton { id: fitWindowButton - width: 50 - height: 50 - icon.name: "icon_self-adaption" - enabled: !imageIsNull ToolTip.delay: 500 + ToolTip.text: qsTr("Fit to window") ToolTip.timeout: 5000 ToolTip.visible: hovered - ToolTip.text: qsTr("Fit to window") + enabled: !imageIsNull + height: 50 + icon.name: "icon_self-adaption" + width: 50 onClicked: { - imageViewer.fitWindow() - imageViewer.recalculateLiveText() + imageViewer.fitWindow(); + imageViewer.recalculateLiveText(); } } IconButton { id: rotateButton - width: 50 + ToolTip.delay: 500 + ToolTip.text: qsTr("Rotate") + ToolTip.timeout: 5000 + ToolTip.visible: hovered + enabled: !imageIsNull && IV.FileControl.isRotatable(IV.GControl.currentSource) height: 50 icon.name: "icon_rotate" - enabled: !imageIsNull && fileControl.isRotatable( - GControl.currentSource) + width: 50 onClicked: { - imageViewer.rotateImage(-90) + imageViewer.rotateImage(-90); } - - ToolTip.delay: 500 - ToolTip.timeout: 5000 - ToolTip.visible: hovered - ToolTip.text: qsTr("Rotate") } } @@ -186,36 +186,31 @@ Item { function rePositionView() { // 特殊处理,防止默认显示首个缩略图时采用Center的策略会被遮挡部分 if (0 === currentIndex) { - positionViewAtBeginning() + positionViewAtBeginning(); } else { // 尽可能将高亮缩略图显示在列表中 - positionViewAtIndex(currentIndex, ListView.Center) + positionViewAtIndex(currentIndex, ListView.Center); } } - anchors { - left: leftRowLayout.right - right: rightRowLayout.left - verticalCenter: parent.verticalCenter - } + cacheBuffer: 60 + clip: true + focus: true + height: thumbnailView.height + 10 + highlightFollowsCurrentItem: true // 使用范围模式,允许高亮缩略图在preferredHighlightBegin~End的范围外,使缩略图填充空白区域 highlightRangeMode: ListView.ApplyRange - highlightFollowsCurrentItem: true - height: thumbnailView.height + 10 - width: thumbnailView.width - thumbnailView.btnContentWidth + model: IV.GControl.globalModel + orientation: Qt.Horizontal preferredHighlightBegin: width / 2 - 25 preferredHighlightEnd: width / 2 + 25 - clip: true spacing: 4 - focus: true - orientation: Qt.Horizontal - cacheBuffer: 60 + width: thumbnailView.width - thumbnailView.btnContentWidth - model: GControl.globalModel delegate: Loader { id: thumbnailItemLoader - property url source: model.imageUrl + property url imageSource: model.imageUrl active: true asynchronous: true @@ -227,8 +222,8 @@ Item { onActiveChanged: { if (active && imageInfo.delegateSource) { setSource(imageInfo.delegateSource, { - "source": thumbnailItemLoader.source - }) + "source": thumbnailItemLoader.imageSource + }); } } @@ -239,149 +234,149 @@ Item { property bool isCurrentItem: thumbnailItemLoader.ListView.isCurrentItem function checkDelegateSource() { - if (IV.ImageInfo.Ready !== status - && IV.ImageInfo.Error !== status) { - return + if (IV.ImageInfo.Ready !== status && IV.ImageInfo.Error !== status) { + return; } - if (IV.Types.MultiImage === type && isCurrentItem) { - delegateSource = "qrc:/qml/ThumbnailDelegate/MultiThumnailDelegate.qml" + delegateSource = "qrc:/qml/ThumbnailDelegate/MultiThumnailDelegate.qml"; } else { - delegateSource = "qrc:/qml/ThumbnailDelegate/NormalThumbnailDelegate.qml" + delegateSource = "qrc:/qml/ThumbnailDelegate/NormalThumbnailDelegate.qml"; } } - source: thumbnailItemLoader.source + source: thumbnailItemLoader.imageSource onDelegateSourceChanged: { if (thumbnailItemLoader.active && delegateSource) { setSource(delegateSource, { - "source": thumbnailItemLoader.source - }) + "source": thumbnailItemLoader.imageSource + }); } } - onStatusChanged: checkDelegateSource() + // 图片被删除、替换,重设当前图片组件 + onInfoChanged: { + checkDelegateSource(); + var temp = delegateSource; + delegateSource = ""; + delegateSource = temp; + } onIsCurrentItemChanged: { - checkDelegateSource() + checkDelegateSource(); // 切换图片涉及多页图时,由于列表内容宽度变更,焦点item定位异常,延迟定位 if (IV.Types.MultiImage === type) { - bottomthumbnaillistView.lastIsMultiImage = true - delayUpdateTimer.start() + bottomthumbnaillistView.lastIsMultiImage = true; + delayUpdateTimer.start(); } else if (bottomthumbnaillistView.lastIsMultiImage) { - delayUpdateTimer.start() - bottomthumbnaillistView.lastIsMultiImage = false + delayUpdateTimer.start(); + bottomthumbnaillistView.lastIsMultiImage = false; } } - - // 图片被删除、替换,重设当前图片组件 - onInfoChanged: { - checkDelegateSource() - - var temp = delegateSource - delegateSource = "" - delegateSource = temp - } + onStatusChanged: checkDelegateSource() } } + footer: Rectangle { + width: 5 + } // 添加两组空的表头表尾用于占位,防止在边界的高亮缩略图被遮挡, 5px为不在ListView中维护的焦点缩略图边框的宽度 radius = 4 * 1.25 header: Rectangle { width: 5 } - footer: Rectangle { - width: 5 + Component.onCompleted: { + bottomthumbnaillistView.currentIndex = IV.GControl.currentIndex; + forceLayout(); + rePositionView(); } //滑动联动主视图 onCurrentIndexChanged: { if (currentItem) { - currentItem.forceActiveFocus() + currentItem.forceActiveFocus(); } // 直接定位,屏蔽动画效果 - rePositionView() + rePositionView(); // 仅在边缘缩略图时进行二次定位 if (0 === currentIndex || currentIndex === (count - 1)) { - delayUpdateTimer.start() + delayUpdateTimer.start(); } } + anchors { + left: leftRowLayout.right + right: rightRowLayout.left + verticalCenter: parent.verticalCenter + } + Connections { - target: GControl - onCurrentIndexChanged: { - bottomthumbnaillistView.currentIndex = GControl.currentIndex + function onCurrentIndexChanged() { + bottomthumbnaillistView.currentIndex = IV.GControl.currentIndex; } + + target: IV.GControl } Connections { - target: GStatus - - onFullScreenAnimatingChanged: { + function onFullScreenAnimatingChanged() { // 动画结束时处理 - if (!GStatus.fullScreenAnimating) { + if (!IV.GStatus.fullScreenAnimating) { // 当缩放界面时,缩略图栏重新进行了布局计算,导致高亮缩略图可能不居中 if (0 == bottomthumbnaillistView.currentIndex) { - bottomthumbnaillistView.positionViewAtBeginning() + bottomthumbnaillistView.positionViewAtBeginning(); } else { // 尽可能将高亮缩略图显示在列表中 - bottomthumbnaillistView.positionViewAtIndex( - bottomthumbnaillistView.currentIndex, - ListView.Center) + bottomthumbnaillistView.positionViewAtIndex(bottomthumbnaillistView.currentIndex, ListView.Center); } } } + + target: IV.GStatus } Timer { id: delayUpdateTimer - repeat: false interval: 100 + repeat: false + onTriggered: { - bottomthumbnaillistView.forceLayout() - bottomthumbnaillistView.rePositionView() + bottomthumbnaillistView.forceLayout(); + bottomthumbnaillistView.rePositionView(); } } - - Component.onCompleted: { - bottomthumbnaillistView.currentIndex = GControl.currentIndex - forceLayout() - rePositionView() - } } Row { id: rightRowLayout + leftPadding: 20 + rightPadding: 20 + spacing: 10 + anchors { right: deleteButton.left verticalCenter: parent.verticalCenter } - spacing: 10 - leftPadding: 20 - rightPadding: 20 IconButton { id: ocrButton - width: 50 - height: 50 - enabled: fileControl.isCanSupportOcr(GControl.currentSource) - && !imageIsNull - icon.name: "icon_character_recognition" ToolTip.delay: 500 + ToolTip.text: qsTr("Extract text") ToolTip.timeout: 5000 ToolTip.visible: hovered - ToolTip.text: qsTr("Extract text") + enabled: IV.FileControl.isCanSupportOcr(IV.GControl.currentSource) && !imageIsNull + height: 50 + icon.name: "icon_character_recognition" + width: 50 onClicked: { - GControl.submitImageChangeImmediately() - fileControl.ocrImage(GControl.currentSource, - GControl.currentFrameIndex) + IV.GControl.submitImageChangeImmediately(); + IV.FileControl.ocrImage(IV.GControl.currentSource, IV.GControl.currentFrameIndex); } } } @@ -389,22 +384,23 @@ Item { IconButton { id: deleteButton - anchors { - right: parent.right - rightMargin: 10 - verticalCenter: parent.verticalCenter - } - enabled: fileControl.isCanDelete(GControl.currentSource) - width: 50 - height: 50 - icon.name: "icon_delete" - icon.source: "qrc:/res/dcc_delete_36px.svg" - icon.color: enabled ? "red" : "ffffff" ToolTip.delay: 500 + ToolTip.text: qsTr("Delete") ToolTip.timeout: 5000 ToolTip.visible: hovered - ToolTip.text: qsTr("Delete") + enabled: IV.FileControl.isCanDelete(IV.GControl.currentSource) + height: 50 + icon.color: enabled ? "red" : "ffffff" + icon.name: "icon_delete" + icon.source: "qrc:/res/dcc_delete_36px.svg" + width: 50 onClicked: deleteCurrentImage() + + anchors { + right: parent.right + rightMargin: 10 + verticalCenter: parent.verticalCenter + } } } diff --git a/src/qml/Utils/FloatingNotice.qml b/src/qml/Utils/FloatingNotice.qml index b25eb99e..2d8485ed 100644 --- a/src/qml/Utils/FloatingNotice.qml +++ b/src/qml/Utils/FloatingNotice.qml @@ -9,15 +9,16 @@ import QtQml 2.11 //浮动提示框定义 Item { id: root - visible: false property string displayStr: "" + visible: false + Rectangle { color: "#EEEEEE" + height: 45 radius: 20 width: 90 - height: 45 Text { anchors.centerIn: parent diff --git a/src/qml/Utils/ImageInputHandler.qml b/src/qml/Utils/ImageInputHandler.qml index bd57dc3e..6705de64 100644 --- a/src/qml/Utils/ImageInputHandler.qml +++ b/src/qml/Utils/ImageInputHandler.qml @@ -9,112 +9,111 @@ import org.deepin.image.viewer 1.0 as IV Item { id: imageInput - property Image targetImage: null // 仅部分图片允许旋转 property bool isRotatable: false + property Image targetImage: null function reset() { // 复位时立即刷新 - mouseArea.updateDragRect() + mouseArea.updateDragRect(); } // 绘制区域变更时,刷新区域 Connections { + function onPaintedHeightChanged() { + mouseArea.delayUpdateDragRect(); + } + + function onPaintedWidthChanged() { + mouseArea.delayUpdateDragRect(); + } + + function onScaleChanged() { + mouseArea.delayUpdateDragRect(); + } + enabled: null !== targetImage target: targetImage - - onPaintedHeightChanged: mouseArea.delayUpdateDragRect() - onPaintedWidthChanged: mouseArea.delayUpdateDragRect() - onScaleChanged: mouseArea.delayUpdateDragRect() } // 外部创建会覆盖 Flickable 组件 MouseArea { id: mouseArea - anchors.fill: parent - acceptedButtons: Qt.LeftButton | Qt.RightButton - drag.axis: Drag.XAndYAxis - drag.target: targetImage ? targetImage : undefined - function delayUpdateDragRect() { if (null !== imageInput.targetImage) { if (imageInput.targetImage.scale < 1.0) { - updateDragRect() - return + updateDragRect(); + return; } } - - delayUpdateTimer.start() + delayUpdateTimer.start(); } function updateDragRect() { if (null === imageInput.targetImage) { - return + return; } - if (targetImage.scale <= 1.0) { - drag.minimumX = 0 - drag.minimumY = 0 - drag.maximumX = 0 - drag.maximumY = 0 - imageInput.targetImage.x = 0 - imageInput.targetImage.y = 0 - + drag.minimumX = 0; + drag.minimumY = 0; + drag.maximumX = 0; + drag.maximumY = 0; + imageInput.targetImage.x = 0; + imageInput.targetImage.y = 0; } else { var pixelWidthDelta = imageInput.targetImage.paintedWidth * imageInput.targetImage.scale - Window.width; - drag.maximumX = pixelWidthDelta > 0 ? pixelWidthDelta / 2 : 0 - drag.minimumX = -drag.maximumX + drag.maximumX = pixelWidthDelta > 0 ? pixelWidthDelta / 2 : 0; + drag.minimumX = -drag.maximumX; var pixelHeightDelta = imageInput.targetImage.paintedHeight * imageInput.targetImage.scale - Window.height; - drag.maximumY = pixelHeightDelta > 0 ? pixelHeightDelta / 2 : 0 - drag.minimumY = -drag.maximumY - - imageInput.targetImage.x = Math.max(drag.minimumX, Math.min(imageInput.targetImage.x, drag.maximumX)) - imageInput.targetImage.y = Math.max(drag.minimumY, Math.min(imageInput.targetImage.y, drag.maximumY)) + drag.maximumY = pixelHeightDelta > 0 ? pixelHeightDelta / 2 : 0; + drag.minimumY = -drag.maximumY; + imageInput.targetImage.x = Math.max(drag.minimumX, Math.min(imageInput.targetImage.x, drag.maximumX)); + imageInput.targetImage.y = Math.max(drag.minimumY, Math.min(imageInput.targetImage.y, drag.maximumY)); } } - onPressed: { - if (Qt.RightButton === mouse.button) { - GStatus.showRightMenu = true - } - } + acceptedButtons: Qt.LeftButton | Qt.RightButton + anchors.fill: parent + drag.axis: Drag.XAndYAxis + drag.target: targetImage ? targetImage : undefined onDoubleClicked: { - if (GStatus.stackPage === IV.Types.ImageViewPage) { - console.warn("show full screen") - GStatus.showFullScreen = !GStatus.showFullScreen + if (IV.GStatus.stackPage === IV.Types.ImageViewPage) { + console.warn("show full screen"); + IV.GStatus.showFullScreen = !IV.GStatus.showFullScreen; + } + } + onPressed: { + if (Qt.RightButton === mouse.button) { + IV.GStatus.showRightMenu = true; } } - onWheel: { if (null === imageInput.targetImage) { - return + return; } - - var detla = wheel.angleDelta.y / 120 + var detla = wheel.angleDelta.y / 120; // 通过Keys缓存的状态可能不准确,在焦点移出时release事件没有正确捕获, // 修改为通过当前事件传入的按键按下信息判断 if (Qt.ControlModifier & wheel.modifiers) { - detla > 0 ? GControl.previousImage() : GControl.nextImage() + detla > 0 ? IV.GControl.previousImage() : IV.GControl.nextImage(); } else { if (undefined === imageInput.targetImage) { - return + return; } // 缓存当前的坐标信息 - var mapPoint = mapToItem(imageInput.targetImage, wheel.x, wheel.y) + var mapPoint = mapToItem(imageInput.targetImage, wheel.x, wheel.y); if (detla > 0) { - imageInput.targetImage.scale = imageInput.targetImage.scale / 0.9 + imageInput.targetImage.scale = imageInput.targetImage.scale / 0.9; } else { - imageInput.targetImage.scale = imageInput.targetImage.scale * 0.9 + imageInput.targetImage.scale = imageInput.targetImage.scale * 0.9; } - - var restorePoint = mapFromItem(imageInput.targetImage, mapPoint.x, mapPoint.y) - imageInput.targetImage.x = imageInput.targetImage.x - restorePoint.x + wheel.x - imageInput.targetImage.y = imageInput.targetImage.y - restorePoint.y + wheel.y - - delayUpdateDragRect() + var restorePoint = mapFromItem(imageInput.targetImage, mapPoint.x, mapPoint.y); + imageInput.targetImage.x = imageInput.targetImage.x - restorePoint.x + wheel.x; + imageInput.targetImage.y = imageInput.targetImage.y - restorePoint.y + wheel.y; + delayUpdateDragRect(); } } @@ -133,56 +132,52 @@ Item { PinchArea { id: imagePinchArea + property double oldRotate: 0 + // 记录旧的缩放大小,防止拖拽时未保留当前状态 property double oldScale: 0 - property double oldRotate: 0 anchors.fill: parent enabled: null !== targetImage - onPinchStarted: { - // 缩放和旋转都至少需要2指操作 - if (pinch.pointCount !== 2) { - pinch.accepted = false - return - } - - oldScale = targetImage.scale - oldRotate = targetImage.rotation - pinch.accepted = true - } - - onPinchUpdated: { - // 不设置边界,通过 onCurrentScaleChanged 处理限制缩放范围在 2% ~ 2000% - targetImage.scale = pinch.scale * imagePinchArea.oldScale - - if (isRotatable) { - targetImage.rotation = pinch.rotation + oldRotate - } - } - onPinchFinished: { // 更新界面缩放大小 - targetImage.scale = pinch.scale * imagePinchArea.oldScale + targetImage.scale = pinch.scale * imagePinchArea.oldScale; // 判断当前图片是否允许旋转 if (isRotatable) { // 计算旋转角度,限制在旋转梯度为90度,以45度为分界点 if (Math.abs(pinch.rotation) > 45) { // 区分正反旋转方向 - var isClockWise = pinch.rotation > 0 + var isClockWise = pinch.rotation > 0; // 计算绝对角度值 var rotateAngle = Math.floor((Math.abs(pinch.rotation) + 45) / 90) * 90; // 触摸旋转保存属于低频率操作,可立即保存文件 - GControl.currentRotation += isClockWise ? rotateAngle : -rotateAngle - GControl.submitImageChangeImmediately() + IV.GControl.currentRotation += isClockWise ? rotateAngle : -rotateAngle; + IV.GControl.submitImageChangeImmediately(); } else { - targetImage.rotation = imagePinchArea.oldRotate + targetImage.rotation = imagePinchArea.oldRotate; } } - - mouseArea.updateDragRect() + mouseArea.updateDragRect(); + } + onPinchStarted: { + // 缩放和旋转都至少需要2指操作 + if (pinch.pointCount !== 2) { + pinch.accepted = false; + return; + } + oldScale = targetImage.scale; + oldRotate = targetImage.rotation; + pinch.accepted = true; + } + onPinchUpdated: { + // 不设置边界,通过 onCurrentScaleChanged 处理限制缩放范围在 2% ~ 2000% + targetImage.scale = pinch.scale * imagePinchArea.oldScale; + if (isRotatable) { + targetImage.rotation = pinch.rotation + oldRotate; + } } // 多点触控区域,处理触摸屏上的点击、双击、长按事件 @@ -194,17 +189,17 @@ Item { // 判断是否允许切换标题栏和工具栏状态 property bool enableSwitchState: true + // 双击动作处理 + function doubleClickProcess() { + IV.GStatus.showFullScreen = !IV.GStatus.showFullScreen; + } + anchors.fill: parent - minimumTouchPoints: 1 maximumTouchPoints: 3 + minimumTouchPoints: 1 // 仅处理触摸事件,鼠标点击事件由MouseArea处理 mouseEnabled: false - // 双击动作处理 - function doubleClickProcess() { - GStatus.showFullScreen = !GStatus.showFullScreen - } - onReleased: { // 触摸状态下,单指点击需要弹出隐藏的标题栏和工具栏(即立即显示) if (touchPoints.length === 1 && !menuHideTimer.running) { @@ -213,29 +208,29 @@ Item { fullThumbnail.switchTopAndBottomBarState(); } // 复位状态 - enableSwitchState = true + enableSwitchState = true; // 进行双击动作判断 if (doubleClicekdTimer.running) { - doubleClickProcess() - doubleClicekdTimer.stop() + doubleClickProcess(); + doubleClicekdTimer.stop(); } else { - doubleClicekdTimer.restart() + doubleClicekdTimer.restart(); } } } // 获取当前实时触摸点数 onTouchUpdated: { - currentTouchPointsCount = touchPoints.length + currentTouchPointsCount = touchPoints.length; } // 用于记录菜单隐藏的定时器 Timer { id: menuHideTimer - running: !GStatus.showRightMenu interval: 400 + running: !IV.GStatus.showRightMenu } // 双击触发定时器 双击间隔400ms内触发全屏展示 @@ -249,15 +244,16 @@ Item { Timer { id: pressHoldTimer + interval: 400 + // 仅一个触点按下时,延时400ms触发右键菜单 running: multiPointTouchArea.currentTouchPointsCount === 1 - interval: 400 onTriggered: { - GStatus.showImageInfo = false - multiPointTouchArea.enableSwitchState = false + IV.GStatus.showImageInfo = false; + multiPointTouchArea.enableSwitchState = false; // 弹出右键菜单 - GStatus.showRightMenu = true + IV.GStatus.showRightMenu = true; } } } diff --git a/src/qml/Utils/RightMenuItem.qml b/src/qml/Utils/RightMenuItem.qml index 50ebba06..562b4183 100644 --- a/src/qml/Utils/RightMenuItem.qml +++ b/src/qml/Utils/RightMenuItem.qml @@ -6,7 +6,8 @@ import QtQuick 2.0 import QtQuick.Window 2.11 import QtQuick.Controls 2.4 import org.deepin.dtk 1.0 +import org.deepin.image.viewer 1.0 as IV MenuItem { - height: visible ? GStatus.rightMenuItemHeight : 0 + height: visible ? IV.GStatus.rightMenuItemHeight : 0 } diff --git a/src/qml/ViewRightMenu.qml b/src/qml/ViewRightMenu.qml index 40003eef..be56c19b 100644 --- a/src/qml/ViewRightMenu.qml +++ b/src/qml/ViewRightMenu.qml @@ -8,43 +8,47 @@ import QtQuick.Controls 2.4 import QtQuick.Layouts 1.11 import org.deepin.dtk 1.0 import org.deepin.image.viewer 1.0 as IV - import "./Utils" Menu { id: optionMenu - property url imageSource: GControl.currentSource + // 处理拷贝快捷键冲突 + property bool copyableConfig: true + property bool deletable: !isNullImage && IV.FileControl.isCanDelete(imageSource) + property url imageSource: IV.GControl.currentSource property bool isNullImage: imageInfo.type === IV.Types.NullImage - property bool readable: !isNullImage && fileControl.isCanReadable(imageSource) - property bool renamable: !isNullImage && fileControl.isCanRename(imageSource) - property bool rotatable: !isNullImage && fileControl.isRotatable(imageSource) - property bool deletable: !isNullImage && fileControl.isCanDelete(imageSource) - property bool supportOcr: !isNullImage && fileControl.isCanSupportOcr(imageSource) - property bool supportWallpaper: !isNullImage && fileControl.isSupportSetWallpaper(imageSource) + property bool readable: !isNullImage && IV.FileControl.isCanReadable(imageSource) + property bool renamable: !isNullImage && IV.FileControl.isCanRename(imageSource) + property bool rotatable: !isNullImage && IV.FileControl.isRotatable(imageSource) + property bool supportOcr: !isNullImage && IV.FileControl.isCanSupportOcr(imageSource) + property bool supportWallpaper: !isNullImage && IV.FileControl.isSupportSetWallpaper(imageSource) + maxVisibleItems: 20 x: 250 y: 600 - maxVisibleItems: 20 RightMenuItem { id: rightFullscreen function switchFullScreen() { - GStatus.showFullScreen = !GStatus.showFullScreen + IV.GStatus.showFullScreen = !IV.GStatus.showFullScreen; } text: !window.isFullScreen ? qsTr("Fullscreen") : qsTr("Exit fullscreen") + onTriggered: switchFullScreen() Shortcut { sequence: "F11" + onActivated: rightFullscreen.switchFullScreen() } Shortcut { enabled: window.isFullScreen sequence: "Esc" + onActivated: rightFullscreen.switchFullScreen() } } @@ -54,16 +58,16 @@ Menu { visible: !isNullImage onTriggered: { - optionMenu.close() - fileControl.showPrintDialog(imageSource) + optionMenu.close(); + IV.FileControl.showPrintDialog(imageSource); } Shortcut { sequence: "Ctrl+P" onActivated: { - optionMenu.close() - fileControl.showPrintDialog(imageSource) + optionMenu.close(); + IV.FileControl.showPrintDialog(imageSource); } } } @@ -73,16 +77,17 @@ Menu { visible: supportOcr onTriggered: { - GControl.submitImageChangeImmediately() - fileControl.ocrImage(imageSource, GControl.currentFrameIndex) + IV.GControl.submitImageChangeImmediately(); + IV.FileControl.ocrImage(imageSource, IV.GControl.currentFrameIndex); } Shortcut { - sequence: "Alt+O" enabled: supportOcr + sequence: "Alt+O" + onActivated: { - GControl.submitImageChangeImmediately() - fileControl.ocrImage(imageSource, GControl.currentFrameIndex) + IV.GControl.submitImageChangeImmediately(); + IV.FileControl.ocrImage(imageSource, IV.GControl.currentFrameIndex); } } } @@ -91,19 +96,21 @@ Menu { text: qsTr("Slide show") onTriggered: { - stackView.switchSliderShow() + stackView.switchSliderShow(); } Shortcut { sequence: "F5" + onActivated: { - stackView.switchSliderShow() + stackView.switchSliderShow(); } } } MenuSeparator { id: firstSeparator + } RightMenuItem { @@ -111,16 +118,17 @@ Menu { visible: readable onTriggered: { - GControl.submitImageChangeImmediately() - fileControl.copyImage(imageSource) + IV.GControl.submitImageChangeImmediately(); + IV.FileControl.copyImage(imageSource); } Shortcut { + enabled: readable && copyableConfig sequence: "Ctrl+C" - enabled: readable + onActivated: { - GControl.submitImageChangeImmediately() - fileControl.copyImage(imageSource) + IV.GControl.submitImageChangeImmediately(); + IV.FileControl.copyImage(imageSource); } } } @@ -130,14 +138,15 @@ Menu { visible: renamable onTriggered: { - renamedialog.show() + renamedialog.show(); } Shortcut { - sequence: "F2" enabled: renamable + sequence: "F2" + onActivated: { - renamedialog.show() + renamedialog.show(); } } } @@ -147,14 +156,15 @@ Menu { visible: deletable onTriggered: { - thumbnailListView.deleteCurrentImage() + thumbnailListView.deleteCurrentImage(); } Shortcut { - sequence: "Delete" enabled: deletable + sequence: "Delete" + onActivated: { - thumbnailListView.deleteCurrentImage() + thumbnailListView.deleteCurrentImage(); } } } @@ -163,7 +173,7 @@ Menu { MenuSeparator { // 不显示分割条时调整高度,防止菜单项间距不齐 height: visible ? firstSeparator.height : 0 - visible: fileControl.isCanReadable(imageSource) || fileControl.isCanDelete(imageSource) + visible: IV.FileControl.isCanReadable(imageSource) || IV.FileControl.isCanDelete(imageSource) } RightMenuItem { @@ -171,14 +181,15 @@ Menu { visible: rotatable onTriggered: { - imageViewer.rotateImage(90) + imageViewer.rotateImage(90); } Shortcut { - sequence: "Ctrl+R" enabled: rotatable + sequence: "Ctrl+R" + onActivated: { - imageViewer.rotateImage(90) + imageViewer.rotateImage(90); } } } @@ -188,14 +199,15 @@ Menu { visible: rotatable onTriggered: { - imageViewer.rotateImage(-90) + imageViewer.rotateImage(-90); } Shortcut { - sequence: "Ctrl+Shift+R" enabled: rotatable + sequence: "Ctrl+Shift+R" + onActivated: { - imageViewer.rotateImage(-90) + imageViewer.rotateImage(-90); } } } @@ -203,17 +215,14 @@ Menu { RightMenuItem { id: enableNavigation - visible: !isNullImage - && window.height > GStatus.minHideHeight - && window.width > GStatus.minWidth - text: !GStatus.enableNavigation ? qsTr("Show navigation window") : qsTr("Hide navigation window") + text: !IV.GStatus.enableNavigation ? qsTr("Show navigation window") : qsTr("Hide navigation window") + visible: !isNullImage && window.height > IV.GStatus.minHideHeight && window.width > IV.GStatus.minWidth onTriggered: { if (!parent.visible) { - return + return; } - - GStatus.enableNavigation = !GStatus.enableNavigation + IV.GStatus.enableNavigation = !IV.GStatus.enableNavigation; } } @@ -222,16 +231,17 @@ Menu { visible: supportWallpaper onTriggered: { - GControl.submitImageChangeImmediately() - fileControl.setWallpaper(imageSource) + IV.GControl.submitImageChangeImmediately(); + IV.FileControl.setWallpaper(imageSource); } Shortcut { - sequence: "Ctrl+F9" enabled: supportWallpaper + sequence: "Ctrl+F9" + onActivated: { - GControl.submitImageChangeImmediately() - fileControl.setWallpaper(imageSource) + IV.GControl.submitImageChangeImmediately(); + IV.FileControl.setWallpaper(imageSource); } } } @@ -240,14 +250,15 @@ Menu { text: qsTr("Display in file manager") onTriggered: { - fileControl.displayinFileManager(imageSource) + IV.FileControl.displayinFileManager(imageSource); } Shortcut { - sequence: "Alt+D" enabled: parent.visible + sequence: "Alt+D" + onActivated: { - fileControl.displayinFileManager(imageSource) + IV.FileControl.displayinFileManager(imageSource); } } } @@ -256,27 +267,29 @@ Menu { text: qsTr("Image info") onTriggered: { - infomationDig.show() + infomationDig.show(); } Shortcut { - sequence: "Ctrl+I" enabled: parent.visible + sequence: "Ctrl+I" + onActivated: { - infomationDig.show() + infomationDig.show(); } } } IV.ImageInfo { id: imageInfo + source: imageSource onStatusChanged: { if (IV.ImageInfo.Ready === imageInfo.status) { - isNullImage = (imageInfo.type === IV.Types.NullImage) + isNullImage = (imageInfo.type === IV.Types.NullImage); } else { - isNullImage = true + isNullImage = true; } } } diff --git a/src/qml/ViewTopTitle.qml b/src/qml/ViewTopTitle.qml index 663f6817..7d82f428 100644 --- a/src/qml/ViewTopTitle.qml +++ b/src/qml/ViewTopTitle.qml @@ -10,32 +10,42 @@ import org.deepin.dtk 1.0 import org.deepin.image.viewer 1.0 as IV Rectangle { - property string iconName: "deepin-image-viewer" property bool animationShow: true - - onAnimationShowChanged: { - y = animationShow ? 0 : -GStatus.titleHeight - } + property string iconName: "deepin-image-viewer" anchors.top: window.top - width: window.width - height: GStatus.titleHeight + height: IV.GStatus.titleHeight visible: !window.isFullScreen - color: titlecontrol.ColorSelector.backgroundColor + width: window.width + + // color: titlecontrol.ColorSelector.backgroundColor gradient: Gradient { GradientStop { - position: 0.0 color: titlecontrol.ColorSelector.backgroundColor1 + position: 0.0 } + GradientStop { - position: 1.0 color: titlecontrol.ColorSelector.backgroundColor2 + position: 1.0 } } + Behavior on y { + enabled: visible + + NumberAnimation { + duration: 200 + easing.type: Easing.InOutQuad + } + } + + onAnimationShowChanged: { + y = animationShow ? 0 : -IV.GStatus.titleHeight; + } Control { id: titlecontrol - hoverEnabled: true // 开启 Hover 属性 + property Palette backgroundColor1: Palette { normal: Qt.rgba(255 / 255, 255 / 255, 255 / 255, 0.6) normalDark: Qt.rgba(26 / 255, 26 / 255, 26 / 255, 0.6) @@ -44,102 +54,103 @@ Rectangle { normal: Qt.rgba(255 / 255, 255 / 255, 255 / 255, 0.02) normalDark: Qt.rgba(26 / 255, 26 / 255, 26 / 255, 0.02) } + + hoverEnabled: true // 开启 Hover 属性 } ActionButton { - anchors.top: parent.top - anchors.topMargin: GStatus.actionMargin anchors.left: parent.left - anchors.leftMargin: GStatus.actionMargin + anchors.leftMargin: IV.GStatus.actionMargin + anchors.top: parent.top + anchors.topMargin: IV.GStatus.actionMargin + icon { + height: 32 name: iconName width: 32 - height: 32 } } // 捕获标题栏部分鼠标事件,部分事件将穿透,由底层 ApplicationWindow 处理 IV.MouseTrackItem { id: trackItem - anchors.fill: parent - onPressedChanged: { - // 点击标题栏时屏蔽动画计算效果 - GStatus.animationBlock = pressed - } + anchors.fill: parent onDoubleClicked: { // 切换窗口最大化状态 - title.toggleWindowState() + title.toggleWindowState(); + } + onPressedChanged: { + // 点击标题栏时屏蔽动画计算效果 + IV.GStatus.animationBlock = pressed; } } TitleBar { id: title + anchors.fill: parent + // 使用自定的文本 + content: Loader { + active: true + + sourceComponent: Label { + // 自动隐藏多余文本 + elide: Text.ElideRight + horizontalAlignment: Text.AlignHCenter + text: title.title + textFormat: Text.PlainText + verticalAlignment: Text.AlignVCenter + } + } menu: Menu { + onVisibleChanged: { + IV.GStatus.animationBlock = visible; + } + // 打开图片动作项 Action { id: openImageAction text: qsTr("Open image") + onTriggered: { // 发送打开窗口信号 - stackView.openImageDialog() + stackView.openImageDialog(); } } MenuSeparator { } + ThemeMenu { } + MenuSeparator { } + HelpAction { } + AboutAction { aboutDialog: AboutDialog { - width: 360 + companyLogo: IV.FileControl.getCompanyLogo() + description: qsTr("Image Viewer is an image viewing tool with fashion interface and smooth performance.") height: 362 - productName: qsTr("Image Viewer") + license: qsTr("%1 is released under %2").arg(productName).arg("GPLV3") productIcon: "deepin-image-viewer" + productName: qsTr("Image Viewer") version: qsTr("Version") + ": %1".arg(Qt.application.version) - description: qsTr("Image Viewer is an image viewing tool with fashion interface and smooth performance.") - license: qsTr("%1 is released under %2").arg(productName).arg("GPLV3") - companyLogo: fileControl.getCompanyLogo() - websiteName: DTK.deepinWebsiteName websiteLink: DTK.deepinWebsiteLink + websiteName: DTK.deepinWebsiteName + width: 360 } } - QuitAction { - } - onVisibleChanged: { - GStatus.animationBlock = visible - } - } - - // 使用自定的文本 - content: Loader { - active: true - - sourceComponent: Label { - textFormat: Text.PlainText - text: title.title - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - // 自动隐藏多余文本 - elide: Text.ElideRight + QuitAction { } } } - - Behavior on y { - enabled: visible - NumberAnimation { - duration: 200 - easing.type: Easing.InOutQuad - } - } } diff --git a/src/qml/main.qml b/src/qml/main.qml index 558392da..9f6716ff 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -7,40 +7,43 @@ import QtQuick 2.11 import QtQuick.Window 2.11 import QtQuick.Controls 2.4 import org.deepin.dtk 1.0 +import org.deepin.image.viewer 1.0 as IV ApplicationWindow { id: window property bool isFullScreen: window.visibility === Window.FullScreen - signal sigTitlePress() + signal sigTitlePress // 设置 dtk 风格窗口 DWindow.enabled: true - visible: true - minimumHeight: GStatus.minHeight - minimumWidth: GStatus.minWidth - width: fileControl.getlastWidth() - height: fileControl.getlastHeight() flags: Qt.Window | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint | Qt.WindowTitleHint + height: IV.FileControl.getlastHeight() + minimumHeight: IV.GStatus.minHeight + minimumWidth: IV.GStatus.minWidth + visible: true + width: IV.FileControl.getlastWidth() - onWidthChanged: { - if (window.visibility != Window.FullScreen - && window.visibility != Window.Maximized) { - fileControl.setSettingWidth(width) + Component.onCompleted: { + if (IV.FileControl.isCheckOnly()) { + setX(screen.width / 2 - width / 2); + setY(screen.height / 2 - height / 2); } } - + onClosing: { + IV.FileControl.saveSetting(); //保存信息 + IV.FileControl.terminateShortcutPanelProcess(); //结束快捷键面板进程 + } onHeightChanged: { - if (window.visibility != Window.FullScreen - && window.visibility != Window.Maximized) { - fileControl.setSettingHeight(height) + if (window.visibility != Window.FullScreen && window.visibility != Window.Maximized) { + IV.FileControl.setSettingHeight(height); } } - - onClosing: { - fileControl.saveSetting() //保存信息 - fileControl.terminateShortcutPanelProcess() //结束快捷键面板进程 + onWidthChanged: { + if (window.visibility != Window.FullScreen && window.visibility != Window.Maximized) { + IV.FileControl.setSettingWidth(width); + } } MainStack { @@ -48,16 +51,10 @@ ApplicationWindow { } Connections { - target: GControl - onCurrentSourceChanged: { - window.title = fileControl.slotGetFileName(GControl.currentSource) + fileControl.slotFileSuffix(GControl.currentSource) + function onCurrentSourceChanged() { + window.title = IV.FileControl.slotGetFileName(IV.GControl.currentSource) + IV.FileControl.slotFileSuffix(IV.GControl.currentSource); } - } - Component.onCompleted: { - if (fileControl.isCheckOnly()) { - setX(screen.width / 2 - width / 2) - setY(screen.height / 2 - height / 2) - } + target: IV.GControl } } diff --git a/src/translations/deepin-image-viewer.ts b/src/translations/deepin-image-viewer.ts index b8faf578..6e14d0b4 100644 --- a/src/translations/deepin-image-viewer.ts +++ b/src/translations/deepin-image-viewer.ts @@ -100,13 +100,6 @@ Live Text - - ImageViewer - - Image file not found - Image file not found - - InformationDialog @@ -209,16 +202,26 @@ Select all (Ctrl+A) + + MainStack + + Select pictures + Select pictures + + + + NonexistImageDelegate + + Image file not found + Image file not found + + OpenImageWidget Open Image Open Image - - Select pictures - Select pictures - PropertyActionItemDelegate diff --git a/src/translations/deepin-image-viewer_am_ET.ts b/src/translations/deepin-image-viewer_am_ET.ts index ebdd0a4d..2cbfec9b 100644 --- a/src/translations/deepin-image-viewer_am_ET.ts +++ b/src/translations/deepin-image-viewer_am_ET.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - በ ሙሉ መመልከቻ ዘዴ + በ ሙሉ መመልከቻ ዘዴ - Help - + Exit fullscreen + ከ ሙሉ መመልከቻ ዘዴ መውጫ - Display shortcuts - + Extract text + - Display in file manager - በ ፋይል አስተዳዳሪ ውስጥ ማሳያ + Slide show + ተንሸራታች ማሳያ - Slide show - ተንሸራታች ማሳያ + Rename + እንደገና መሰየሚያ Copy - ኮፒ + ኮፒ Delete - ማጥፊያ - - - Set as wallpaper - እንደ ግድግዳ ወረቀት ማሰናጃ + ማጥፊያ Rotate clockwise - ማዞሪያ ከ ግራ ወደ ቀኝ + ማዞሪያ ከ ግራ ወደ ቀኝ Rotate counterclockwise - ማዞሪያ ከ ቀኝ ወደ ግራ + ማዞሪያ ከ ቀኝ ወደ ግራ - Zoom in - + Set as wallpaper + እንደ ግድግዳ ወረቀት ማሰናጃ - Zoom out - + Display in file manager + በ ፋይል አስተዳዳሪ ውስጥ ማሳያ + + + Image info + የ ምስል መረጃ Previous - ያለፈው + ያለፈው Next - ይቀጥሉ + ይቀጥሉ - Settings - + Zoom in + - Exit fullscreen - ከ ሙሉ መመልከቻ ዘዴ መውጫ + Zoom out + - Extract text - + Open + - Rename - እንደገና መሰየሚያ + Print + ማተሚያ - Image info - የ ምስል መረጃ + Image Viewing + ምስል በ መመልከት ላይ - Open - + Help + እርዳታ - Image Viewing - + Display shortcuts + አቋራጭ ማሳያ - Print - + Settings + ማሰናጃ Select all - + Live Text - - - - - ImageViewer - - Image file not found - + InformationDialog Basic info - + Size - + Date captured - + Date modified - + የ ተሻሻለበት ቀን Details - + Aperture - + ብርሃን መቆጣጠሪያ Exposure program - + የ ተጋለጠበት ፕሮግራም Focal length - + የ ትኩረት እርዝመት ISO - + ISO Exposure mode - + የ ተጋለጠበት ዘዴ Exposure time - + የ ተጋለጠበት ጊዜ Flash - + ፍላሽ Flash compensation - + ፍላሽ ማካካሻ Colorspace - + የ ቀለም ቦታ Metering mode - + የ ብርሃን ፍጥነት White balance - + ነጭ ማካካሻ Lens model - + የ ሌንስ አይነት File name - + Dimensions - + Type - + አይነት Max aperture - + ከፍተኛ ብርሃን መቆጣጠሪያ Device model - + LiveTextWidget Copy (Ctrl+C) - + Select all (Ctrl+A) - + - OpenImageWidget + MainStack - Open Image - + Select pictures + + + + NonexistImageDelegate - Select pictures - + Image file not found + + + + + OpenImageWidget + + Open Image + PropertyActionItemDelegate The file already exists, please use another name - + QObject Image Viewer - + day - + Image Viewer is an image viewing tool with fashion interface and smooth performance. - + ReName Input a new name - + The file already exists, please use another name - + Cancel - + መሰረዣ Confirm - + SliderShow Previous - ያለፈው + ያለፈው Pause - + Play - + Next - ይቀጥሉ + ይቀጥሉ Exit - + መውጫ ThumbnailListView Next - ይቀጥሉ + ይቀጥሉ Previous - ያለፈው + ያለፈው Original size - + Fit to window - + በ መስኮቱ ልክ Rotate - + Extract text - + Delete - ማጥፊያ + ማጥፊያ ViewRightMenu Fullscreen - በ ሙሉ መመልከቻ ዘዴ + በ ሙሉ መመልከቻ ዘዴ Exit fullscreen - ከ ሙሉ መመልከቻ ዘዴ መውጫ + ከ ሙሉ መመልከቻ ዘዴ መውጫ Print - + ማተሚያ Extract text - + Slide show - ተንሸራታች ማሳያ + ተንሸራታች ማሳያ Copy - ኮፒ + ኮፒ Rename - እንደገና መሰየሚያ + እንደገና መሰየሚያ Delete - ማጥፊያ + ማጥፊያ Rotate clockwise - ማዞሪያ ከ ግራ ወደ ቀኝ + ማዞሪያ ከ ግራ ወደ ቀኝ Rotate counterclockwise - ማዞሪያ ከ ቀኝ ወደ ግራ + ማዞሪያ ከ ቀኝ ወደ ግራ Show navigation window - + የ መቃኛ መስኮት ማሳያ Hide navigation window - + የ መቃኛ መስኮት መደበቂያ Set as wallpaper - እንደ ግድግዳ ወረቀት ማሰናጃ + እንደ ግድግዳ ወረቀት ማሰናጃ Display in file manager - በ ፋይል አስተዳዳሪ ውስጥ ማሳያ + በ ፋይል አስተዳዳሪ ውስጥ ማሳያ Image info - የ ምስል መረጃ + የ ምስል መረጃ ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + Image Viewer - + Version - + %1 is released under %2 - + + + + Open image + - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_ar.ts b/src/translations/deepin-image-viewer_ar.ts index 1d8804ff..2e0bff02 100644 --- a/src/translations/deepin-image-viewer_ar.ts +++ b/src/translations/deepin-image-viewer_ar.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - شاشة كاملة + ملء الشاشة - Help - + Exit fullscreen + الخروج من وضع ملء الشاشة - Display shortcuts - + Extract text + استخراج النص - Display in file manager - عرض في مدير الملفات + Slide show + عرض الشرائح - Slide show - عرض الشرائح + Rename + إعادة التسمية Copy - نسخ + نسخ Delete - حذف - - - Set as wallpaper - تعيين كخلفية + حذف Rotate clockwise - تدوير باتجاه عقارب الساعة + تدوير باتجاه عقارب الساعة Rotate counterclockwise - تدوير عكس اتجاه عقارب الساعة + تدوير عكس اتجاه عقارب الساعة - Zoom in - + Set as wallpaper + تعيين كخلفية - Zoom out - + Display in file manager + عرض في مدير الملفات + + + Image info + معلومات الصورة Previous - السابق + السابق Next - التالي + التالي - Settings - + Zoom in + تكبير - Exit fullscreen - الخروج من وضع ملء الشاشة + Zoom out + تصغير - Extract text - + Open + فتح - Rename - إعادة التسمية + Print + طباعة - Image info - معلومات الصورة + Image Viewing + عرض الصورة - Open - + Help + مساعدة - Image Viewing - + Display shortcuts + اختصارات العرض - Print - + Settings + الإعدادات Select all - + تحديد الكل Live Text - - - - - ImageViewer - - Image file not found - + نص مباشر InformationDialog Basic info - + المعلومات الأساسية Size - + حجم Date captured - + تم حفظ التاريخ Date modified - + تاريخ التعديل Details - + التفاصيل Aperture - + فتحة العدسة Exposure program - + برنامج التعرض Focal length - + البعد البؤري ISO - + ISO Exposure mode - + وضع التعرض Exposure time - + وقت التعرض Flash - + فلاش Flash compensation - + تعويض الفلاش Colorspace - + مساحة اﻷلوان Metering mode - + وضع القياس White balance - + توازن اللون الأبيض Lens model - + طراز العدسة File name - + اسم الملف Dimensions - + الأبعاد Type - + النوع Max aperture - + أقصى فتحة Device model - + طراز الجهاز LiveTextWidget Copy (Ctrl+C) - + نسخ (Ctrl+C) Select all (Ctrl+A) - + تحديد الكل (Ctrl + A) - OpenImageWidget + MainStack - Open Image - + Select pictures + اختيار الصور + + + NonexistImageDelegate - Select pictures - + Image file not found + لم يتم العثور على أي صورة + + + + OpenImageWidget + + Open Image + قتح الصورة. PropertyActionItemDelegate The file already exists, please use another name - + الملف موجود بالفعل ، يرجى استخدام اسم آخر QObject Image Viewer - عارض الصور + عارض الصور day - + يوم Image Viewer is an image viewing tool with fashion interface and smooth performance. - + عرض صور ديبين هو أداة لعرض الصور بواجهة أنيقة وأداء سلس. ReName Input a new name - + ادخال اسم جديد The file already exists, please use another name - + الملف موجود بالفعل ، يرجى استخدام اسم آخر Cancel - + إلغاء Confirm - + موافق SliderShow Previous - السابق + السابق Pause - + ايقاف مؤقت Play - + تشغيل Next - التالي + التالي Exit - + خروج ThumbnailListView Next - التالي + التالي Previous - السابق + السابق Original size - + الحجم الأصلي Fit to window - + ملء النافذة Rotate - + استدارة Extract text - + استخراج النص Delete - حذف + حذف ViewRightMenu Fullscreen - شاشة كاملة + ملء الشاشة Exit fullscreen - الخروج من وضع ملء الشاشة + الخروج من وضع ملء الشاشة Print - + طباعة Extract text - + استخراج النص Slide show - عرض الشرائح + عرض الشرائح Copy - نسخ + نسخ Rename - إعادة التسمية + إعادة التسمية Delete - حذف + حذف Rotate clockwise - تدوير باتجاه عقارب الساعة + تدوير باتجاه عقارب الساعة Rotate counterclockwise - تدوير عكس اتجاه عقارب الساعة + تدوير عكس اتجاه عقارب الساعة Show navigation window - + إظهار نافذة التنقل Hide navigation window - + إخفاء نافذة التنقل Set as wallpaper - تعيين كخلفية + تعيين كخلفية Display in file manager - عرض في مدير الملفات + عرض في مدير الملفات Image info - معلومات الصورة + معلومات الصورة ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + عرض صور ديبين هو أداة لعرض الصور بواجهة أنيقة وأداء سلس. Image Viewer - عارض الصور + عارض الصور Version - + الإصدار %1 is released under %2 - + + + + Open image + فتح صورة - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_ast.ts b/src/translations/deepin-image-viewer_ast.ts index 02a5164e..adb6eea9 100644 --- a/src/translations/deepin-image-viewer_ast.ts +++ b/src/translations/deepin-image-viewer_ast.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - Pantalla completa + Pantalla completa - Help - + Exit fullscreen + Colar de pantalla completa - Display shortcuts - + Extract text + - Display in file manager - Amosar nel xestor de ficheros + Slide show + Diapositiva - Slide show - Diapositiva + Rename + Renomar Copy - Copiar + Copiar Delete - Desaniciar - - - Set as wallpaper - Afitar como fondu de pantalla + Desaniciar Rotate clockwise - Voltiar a drecha + Voltiar a drecha Rotate counterclockwise - Voltiar a esquierda + Voltiar a esquierda - Zoom in - + Set as wallpaper + Afitar como fondu de pantalla - Zoom out - + Display in file manager + Amosar nel xestor de ficheros + + + Image info + Información d'imaxe Previous - Anterior + Anterior Next - Siguiente + Siguiente - Settings - + Zoom in + - Exit fullscreen - Colar de pantalla completa + Zoom out + - Extract text - + Open + - Rename - Renomar + Print + Imprentar - Image info - Información d'imaxe + Image Viewing + Visión d'imáxenes - Open - + Help + Ayuda - Image Viewing - + Display shortcuts + Amosar atayos - Print - + Settings + Axustes Select all - + Live Text - - - - - ImageViewer - - Image file not found - + InformationDialog Basic info - + Size - + Date captured - + Date modified - + Data de modificación Details - + Aperture - + Apertura Exposure program - + Programa d'esposición Focal length - + Llonxitú focal ISO - + ISO Exposure mode - + Mou d'esposición Exposure time - + Tiempu d'esposición Flash - + Flax Flash compensation - + Compensación de flax Colorspace - + Espaciu de colores Metering mode - + Mou de midición White balance - + Balance de blancos Lens model - + Modelu de lente File name - + Dimensions - + Type - + Triba Max aperture - + Apertura máx. Device model - + LiveTextWidget Copy (Ctrl+C) - + Select all (Ctrl+A) - + - OpenImageWidget + MainStack - Open Image - + Select pictures + + + + NonexistImageDelegate - Select pictures - + Image file not found + + + + + OpenImageWidget + + Open Image + PropertyActionItemDelegate The file already exists, please use another name - + QObject Image Viewer - + Visor d'imáxenes day - + Image Viewer is an image viewing tool with fashion interface and smooth performance. - + ReName Input a new name - + The file already exists, please use another name - + Cancel - + Encaboxar Confirm - + SliderShow Previous - Anterior + Anterior Pause - + Play - + Next - Siguiente + Siguiente Exit - + Colar ThumbnailListView Next - Siguiente + Siguiente Previous - Anterior + Anterior Original size - + Fit to window - + Axustar a la ventana Rotate - + Extract text - + Delete - Desaniciar + Desaniciar ViewRightMenu Fullscreen - Pantalla completa + Pantalla completa Exit fullscreen - Colar de pantalla completa + Colar de pantalla completa Print - + Imprentar Extract text - + Slide show - Diapositiva + Diapositiva Copy - Copiar + Copiar Rename - Renomar + Renomar Delete - Desaniciar + Desaniciar Rotate clockwise - Voltiar a drecha + Voltiar a drecha Rotate counterclockwise - Voltiar a esquierda + Voltiar a esquierda Show navigation window - + Amosar ventana de navegación Hide navigation window - + Anubrir ventana de navegación Set as wallpaper - Afitar como fondu de pantalla + Afitar como fondu de pantalla Display in file manager - Amosar nel xestor de ficheros + Amosar nel xestor de ficheros Image info - Información d'imaxe + Información d'imaxe ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + Image Viewer - + Visor d'imáxenes Version - + %1 is released under %2 - + + + + Open image + - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_az.ts b/src/translations/deepin-image-viewer_az.ts index 083da923..b741a29c 100644 --- a/src/translations/deepin-image-viewer_az.ts +++ b/src/translations/deepin-image-viewer_az.ts @@ -98,13 +98,6 @@ Canlı mətn - - ImageViewer - - Image file not found - Şəkil faylı tapılmadı - - InformationDialog @@ -207,16 +200,26 @@ Hamısını seç (Ctrl+A) + + MainStack + + Select pictures + Şəkilləri seç + + + + NonexistImageDelegate + + Image file not found + Şəkil faylı tapılmadı + + OpenImageWidget Open Image Şəkili açın - - Select pictures - Şəkilləri seç - PropertyActionItemDelegate @@ -396,7 +399,7 @@ Open image - + Şəkli açın \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_bg.ts b/src/translations/deepin-image-viewer_bg.ts index 35e24718..b56d3c0d 100644 --- a/src/translations/deepin-image-viewer_bg.ts +++ b/src/translations/deepin-image-viewer_bg.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - Цял екран + Цял екран - Help - + Exit fullscreen + Изход от цял екран - Display shortcuts - + Extract text + - Display in file manager - Показване във файлов менидджър + Slide show + Прожекция - Slide show - Слайд шоу + Rename + Преименуване Copy - Копиране + Копиране Delete - Премахване - - - Set as wallpaper - Задай, като тапет + Премахване Rotate clockwise - Завъртане по часовниковата стрелка + Завъртане по часовниковата стрелка Rotate counterclockwise - Завъртане обратно на часовниковата стрелка + Завъртане обратно на часовниковата стрелка - Zoom in - + Set as wallpaper + Задаване като тапет - Zoom out - + Display in file manager + Показване във файлов мениджър + + + Image info + Информация за изображението Previous - Предишно + Предишно Next - Следващ + Следващ - Settings - + Zoom in + - Exit fullscreen - Изход от цял екран + Zoom out + - Extract text - + Open + - Rename - Преименуване + Print + Печат - Image info - Информация за изображението + Image Viewing + Преглед на изображение - Open - + Help + Помощ - Image Viewing - + Display shortcuts + Покажи клавишните комбинации - Print - + Settings + Настройки Select all - + Live Text - - - - - ImageViewer - - Image file not found - + InformationDialog Basic info - + Size - + Date captured - + Дата на заснемане Date modified - + Дата на промяна Details - + Aperture - + Апертура Exposure program - + Програма за експониране Focal length - + Фокусно разстояние ISO - + ISO Exposure mode - + Режим на експониране Exposure time - + Време на експониране Flash - + Светкавица Flash compensation - + Корекция на светкавицата Colorspace - + Оцветяване Metering mode - + Режим на измерване White balance - + Баланс на бялото Lens model - + Модел на обектива File name - + Dimensions - + Type - + Тип Max aperture - + Максимална апертура Device model - + LiveTextWidget Copy (Ctrl+C) - + Select all (Ctrl+A) - + - OpenImageWidget + MainStack - Open Image - Отваряне на изображение + Select pictures + + + + NonexistImageDelegate - Select pictures - + Image file not found + + + + + OpenImageWidget + + Open Image + Отваряне на изображение PropertyActionItemDelegate The file already exists, please use another name - + QObject Image Viewer - + Преглед на изображение day - + Image Viewer is an image viewing tool with fashion interface and smooth performance. - + ReName Input a new name - + The file already exists, please use another name - + Cancel - + Отказ Confirm - + SliderShow Previous - Предишно + Предишно Pause - + Play - + Next - Следващ + Следващ Exit - + Изход ThumbnailListView Next - Следващ + Следващ Previous - Предишно + Предишно Original size - + Fit to window - + Оразмеряване според прозореца Rotate - + Extract text - + Delete - Премахване + Премахване ViewRightMenu Fullscreen - Цял екран + Цял екран Exit fullscreen - Изход от цял екран + Изход от цял екран Print - + Печат Extract text - + Slide show - Слайд шоу + Прожекция Copy - Копиране + Копиране Rename - Преименуване + Преименуване Delete - Премахване + Премахване Rotate clockwise - Завъртане по часовниковата стрелка + Завъртане по часовниковата стрелка Rotate counterclockwise - Завъртане обратно на часовниковата стрелка + Завъртане обратно на часовниковата стрелка Show navigation window - + Покажи прозореца за управление Hide navigation window - + Скрий прозореца за управление Set as wallpaper - Задай, като тапет + Задаване като тапет Display in file manager - Показване във файлов менидджър + Показване във файлов мениджър Image info - Информация за изображението + Информация за изображението ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + Image Viewer - + Преглед на изображение Version - + %1 is released under %2 - + + + + Open image + - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_bo.ts b/src/translations/deepin-image-viewer_bo.ts index 00856e1e..6b6983a8 100644 --- a/src/translations/deepin-image-viewer_bo.ts +++ b/src/translations/deepin-image-viewer_bo.ts @@ -91,18 +91,11 @@ Select all - + ཆ་ཚང་འདེམས། Live Text - - - - - ImageViewer - - Image file not found - པར་གྱི་ཡིག་ཆ་ཪྙེད་མ་བྱུང་། + གནས་ཚུལ་དངོས་ཀྱི་ཡིག་ཆ། @@ -113,7 +106,7 @@ Size - + ཆེ་ཆུང་། Date captured @@ -177,7 +170,7 @@ File name - + ཡིག་ཆའི་མིང་། Dimensions @@ -193,18 +186,32 @@ Device model - + སྒྲིག་ཆས་ཀྱི་བཟོ་རྟགས། LiveTextWidget Copy (Ctrl+C) - + པར་སློག(Ctrl+C) Select all (Ctrl+A) - + ཆ་ཚང་འདེམས། (Ctrl+A) + + + + MainStack + + Select pictures + རི་མོ་འདེམས་པ། + + + + NonexistImageDelegate + + Image file not found + པར་གྱི་ཡིག་ཆ་ཪྙེད་མ་བྱུང་། @@ -213,16 +220,12 @@ Open Image པར་ཁ་ཕྱེ་བ། - - Select pictures - - PropertyActionItemDelegate The file already exists, please use another name - + ཡིག་ཆ་འདི་འདུག་པས། མིང་གཞན་བེད་སྤྱོད་བྱོས། @@ -248,7 +251,7 @@ The file already exists, please use another name - + ཡིག་ཆ་འདི་འདུག་པས། མིང་གཞན་བེད་སྤྱོད་བྱོས། Cancel @@ -294,7 +297,7 @@ Original size - + གདོད་མའི་ཆེ་ཆུང་། Fit to window @@ -302,7 +305,7 @@ Rotate - + སྐོར་བ། Extract text @@ -388,15 +391,15 @@ Version - + པར་གཞི། %1 is released under %2 - + %1བརྩི་སྲུང་། %2ཆིངས་ཡིག་ཁྱབ་བསྒྲགས། Open image - + རི་མོ་ཁ་ཕྱེ་བ། \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_ca.ts b/src/translations/deepin-image-viewer_ca.ts index 89bc22b4..c0cecc44 100644 --- a/src/translations/deepin-image-viewer_ca.ts +++ b/src/translations/deepin-image-viewer_ca.ts @@ -98,13 +98,6 @@ Text viu - - ImageViewer - - Image file not found - No s'ha trobat cap fitxer d'imatge. - - InformationDialog @@ -207,16 +200,26 @@ Selecciona-ho tot (Ctrl+A) + + MainStack + + Select pictures + Seleccioneu imatges + + + + NonexistImageDelegate + + Image file not found + No s'ha trobat cap fitxer d'imatge. + + OpenImageWidget Open Image Obre la imatge - - Select pictures - Seleccioneu imatges - PropertyActionItemDelegate @@ -396,7 +399,7 @@ Open image - + Obre la imatge \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_cs.ts b/src/translations/deepin-image-viewer_cs.ts index d0d4dbc9..f50ec149 100644 --- a/src/translations/deepin-image-viewer_cs.ts +++ b/src/translations/deepin-image-viewer_cs.ts @@ -91,18 +91,11 @@ Select all - + Vybrat vše Live Text - - - - - ImageViewer - - Image file not found - Soubor s obrázkem nenalezen. + Živý text @@ -157,7 +150,7 @@ Flash compensation - Náhrada za blesk + Korekce intenzity záblesku Colorspace @@ -207,22 +200,32 @@ Vybrat vše (Ctrl+A) + + MainStack + + Select pictures + Vybrat obrázky + + + + NonexistImageDelegate + + Image file not found + Soubor s obrázkem nenalezen. + + OpenImageWidget Open Image Otevřít obrázek - - Select pictures - Vybrat obrázky - PropertyActionItemDelegate The file already exists, please use another name - Soubor již existuje, použijte jiný název + Soubor už existuje – použijte jiný název @@ -248,7 +251,7 @@ The file already exists, please use another name - Soubor již existuje, použijte jiný název + Soubor už existuje – použijte jiný název Cancel @@ -396,7 +399,7 @@ Open image - + Otevřít obrázek \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_da.ts b/src/translations/deepin-image-viewer_da.ts index 5764e72d..1cf90281 100644 --- a/src/translations/deepin-image-viewer_da.ts +++ b/src/translations/deepin-image-viewer_da.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - Fuldskærm + Fuldskærm - Help - + Exit fullscreen + Forlad fuldskærm - Display shortcuts - + Extract text + - Display in file manager - Vis i filhåndtering + Slide show + Diasshow - Slide show - Diasshow + Rename + Omdøb Copy - Kopiér + Kopiér Delete - Slet - - - Set as wallpaper - Sæt som tapet + Slet Rotate clockwise - Rotér med uret + Rotér med uret Rotate counterclockwise - Rotér mod uret + Rotér mod uret - Zoom in - + Set as wallpaper + Sæt som tapet - Zoom out - + Display in file manager + Vis i filhåndtering + + + Image info + Billedinfo Previous - Forrige + Forrige Next - Næste + Næste - Settings - + Zoom in + Zoom ind - Exit fullscreen - Forlad fuldskærm + Zoom out + Zoom ud - Extract text - + Open + Åbn - Rename - Omdøb + Print + Udskriv - Image info - Billedinfo + Image Viewing + Billedvisning - Open - + Help + Hjælp - Image Viewing - + Display shortcuts + Vis genveje - Print - + Settings + Indstillinger Select all - + Live Text - - - - - ImageViewer - - Image file not found - + InformationDialog Basic info - + Grundlæggende info Size - + Date captured - + Optagelsesdato Date modified - + Ændringsdato Details - + Detaljer Aperture - + Blænde Exposure program - + Eksponeringsprogram Focal length - + Brændvidde ISO - + ISO Exposure mode - + Eksponeringstilstand Exposure time - + Eksponeringstid Flash - + Blitz Flash compensation - + Blitzkompensering Colorspace - + Farverum Metering mode - + Målingstilstand White balance - + Hvidbalance Lens model - + Linsemodel File name - + Dimensions - + Dimensioner Type - + Type Max aperture - + Maks. blænde Device model - + LiveTextWidget Copy (Ctrl+C) - + Select all (Ctrl+A) - + - OpenImageWidget + MainStack - Open Image - Åbn billede + Select pictures + + + + NonexistImageDelegate - Select pictures - + Image file not found + Billedfil ikke fundet + + + + OpenImageWidget + + Open Image + Åbn billede PropertyActionItemDelegate The file already exists, please use another name - + QObject Image Viewer - Billedfremviser + Billedfremviser day - + Image Viewer is an image viewing tool with fashion interface and smooth performance. - + Billedfremviser er et værktøj til billedfremvisning med flot brugerflade og god ydelse. ReName Input a new name - + Indtast et nyt navn The file already exists, please use another name - + Cancel - + Annuller Confirm - + Bekræft SliderShow Previous - Forrige + Forrige Pause - + Pause Play - + Afspil Next - Næste + Næste Exit - + Afslut ThumbnailListView Next - Næste + Næste Previous - Forrige + Forrige Original size - + Fit to window - + Tilpas til vindue Rotate - + Extract text - + Delete - Slet + Slet ViewRightMenu Fullscreen - Fuldskærm + Fuldskærm Exit fullscreen - Forlad fuldskærm + Forlad fuldskærm Print - + Udskriv Extract text - + Slide show - Diasshow + Diasshow Copy - Kopiér + Kopiér Rename - Omdøb + Omdøb Delete - Slet + Slet Rotate clockwise - Rotér med uret + Rotér med uret Rotate counterclockwise - Rotér mod uret + Rotér mod uret Show navigation window - + Vis navigationsvindue Hide navigation window - + Skjul navigationsvindue Set as wallpaper - Sæt som tapet + Sæt som tapet Display in file manager - Vis i filhåndtering + Vis i filhåndtering Image info - Billedinfo + Billedinfo ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + Billedfremviser er et værktøj til billedfremvisning med flot brugerflade og god ydelse. Image Viewer - Billedfremviser + Billedfremviser Version - + %1 is released under %2 - + + + + Open image + - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_de.ts b/src/translations/deepin-image-viewer_de.ts index 2ac67d67..755b248d 100644 --- a/src/translations/deepin-image-viewer_de.ts +++ b/src/translations/deepin-image-viewer_de.ts @@ -98,13 +98,6 @@ Live-Text - - ImageViewer - - Image file not found - Bilddatei nicht gefunden - - InformationDialog @@ -207,16 +200,26 @@ Alles auswählen (Ctrl+A) + + MainStack + + Select pictures + Bilder auswählen + + + + NonexistImageDelegate + + Image file not found + Bilddatei nicht gefunden + + OpenImageWidget Open Image Bild öffnen - - Select pictures - Bilder auswählen - PropertyActionItemDelegate @@ -392,11 +395,11 @@ %1 is released under %2 - %1 ist unter der %2 veröffentlicht + %1 ist unter %2 veröffentlicht Open image - + Bild öffnen \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_el.ts b/src/translations/deepin-image-viewer_el.ts index a924fbbe..06302c53 100644 --- a/src/translations/deepin-image-viewer_el.ts +++ b/src/translations/deepin-image-viewer_el.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - Πλήρης οθόνη + Πλήρης οθόνη - Help - + Exit fullscreen + Έξοδος από πλήρη οθόνη - Display shortcuts - + Extract text + - Display in file manager - Προβολή στον διαχειριστή αρχείον + Slide show + Παρουσίαση εικόνων - Slide show - Παρουσίαση εικόνων + Rename + Μετονομασία Copy - Αντιγραφή + Αντιγραφή Delete - - - - Set as wallpaper - Θέσε ως ταπετσαρία + Διαγραφή Rotate clockwise - Περιστροφή δεξιά + Περιστροφή δεξιά Rotate counterclockwise - Περιστροφή αριστερά + Περιστροφή αριστερά - Zoom in - + Set as wallpaper + Θέσε ως ταπετσαρία - Zoom out - + Display in file manager + Προβολή στον διαχειριστή αρχείον + + + Image info + Πληροφοριες εικονας Previous - Προηγούμενο + Προηγούμενο Next - Επόμενο + Επόμενο - Settings - + Zoom in + - Exit fullscreen - + Zoom out + - Extract text - + Open + - Rename - Μετονομασία + Print + Εκτύπωση - Image info - Πληροφοριες εικονας + Image Viewing + Προβολή εικόνας - Open - + Help + - Image Viewing - + Display shortcuts + Προβολή συντομεύσεων - Print - + Settings + Ρυθμίσεις Select all - + Live Text - - - - - ImageViewer - - Image file not found - + InformationDialog Basic info - + Size - + Date captured - + Date modified - + Ημερομηνία επεξεργασίας Details - + Aperture - + Διάφραγμα Exposure program - + Πρόγραμμα έκθεσης Focal length - + Εστίαση ISO - + ISO Exposure mode - + Λειτουργία έκθεσης Exposure time - + Χρόνος έκθεσης Flash - + Φλάς Flash compensation - + Ένταση φλάς Colorspace - + Χρωματικός χώρος Metering mode - + Λειτουργία μέτρησης White balance - + Ισορροπία λευκού Lens model - + Μοντέλο φακού File name - + Dimensions - + Type - + Τύπος Max aperture - + Μέγιστο Διάφραγμα Device model - + LiveTextWidget Copy (Ctrl+C) - + Select all (Ctrl+A) - + - OpenImageWidget + MainStack - Open Image - + Select pictures + + + + NonexistImageDelegate - Select pictures - + Image file not found + + + + + OpenImageWidget + + Open Image + PropertyActionItemDelegate The file already exists, please use another name - + QObject Image Viewer - + day - + Image Viewer is an image viewing tool with fashion interface and smooth performance. - + ReName Input a new name - + The file already exists, please use another name - + Cancel - + Ακύρωση Confirm - + SliderShow Previous - Προηγούμενο + Προηγούμενο Pause - + Play - + Next - Επόμενο + Επόμενο Exit - + ThumbnailListView Next - Επόμενο + Επόμενο Previous - Προηγούμενο + Προηγούμενο Original size - + Fit to window - + Rotate - + Extract text - + Delete - + Διαγραφή ViewRightMenu Fullscreen - Πλήρης οθόνη + Πλήρης οθόνη Exit fullscreen - + Έξοδος από πλήρη οθόνη Print - + Εκτύπωση Extract text - + Slide show - Παρουσίαση εικόνων + Παρουσίαση εικόνων Copy - Αντιγραφή + Αντιγραφή Rename - Μετονομασία + Μετονομασία Delete - + Διαγραφή Rotate clockwise - Περιστροφή δεξιά + Περιστροφή δεξιά Rotate counterclockwise - Περιστροφή αριστερά + Περιστροφή αριστερά Show navigation window - + Hide navigation window - + Set as wallpaper - Θέσε ως ταπετσαρία + Θέσε ως ταπετσαρία Display in file manager - Προβολή στον διαχειριστή αρχείον + Προβολή στον διαχειριστή αρχείον Image info - Πληροφοριες εικονας + Πληροφοριες εικονας ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + Image Viewer - + Version - + %1 is released under %2 - + + + + Open image + - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_es.ts b/src/translations/deepin-image-viewer_es.ts index c9534748..9d32ed63 100644 --- a/src/translations/deepin-image-viewer_es.ts +++ b/src/translations/deepin-image-viewer_es.ts @@ -98,13 +98,6 @@ Texto en vivo - - ImageViewer - - Image file not found - No se encontró el archivo de imagen - - InformationDialog @@ -207,16 +200,26 @@ Seleccionar todo (Ctrl+A) + + MainStack + + Select pictures + Seleccionar imágenes + + + + NonexistImageDelegate + + Image file not found + No se encontró el archivo de imagen + + OpenImageWidget Open Image Abrir imagen - - Select pictures - Seleccionar imágenes - PropertyActionItemDelegate @@ -392,11 +395,11 @@ %1 is released under %2 - %1 se libera bajo %2 + %1 se publica bajo la licencia %2 Open image - + Abrir imagen \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_et.ts b/src/translations/deepin-image-viewer_et.ts index 4568747f..aa4d729f 100644 --- a/src/translations/deepin-image-viewer_et.ts +++ b/src/translations/deepin-image-viewer_et.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - Täisekraan + Täisekraan - Help - + Exit fullscreen + Välju täisekraanilt - Display shortcuts - + Extract text + - Display in file manager - Näita failihalduris + Slide show + Slaidiseanss - Slide show - Slaidiseanss + Rename + Nimeta ümber Copy - Kopeeri + Kopeeri Delete - Kustuta - - - Set as wallpaper - Määra taustapildiks + Kustuta Rotate clockwise - Pööra päripäeva + Pööra päripäeva Rotate counterclockwise - Pööra vastupäeva + Pööra vastupäeva - Zoom in - + Set as wallpaper + Määra taustapildiks - Zoom out - + Display in file manager + Näita failihalduris + + + Image info + Pildi info Previous - Eelmine + Eelmine Next - Järgmine + Järgmine - Settings - + Zoom in + - Exit fullscreen - Välju täisekraanilt + Zoom out + - Extract text - + Open + Ava - Rename - Nimeta ümber + Print + Prindi - Image info - Pildi info + Image Viewing + Pildi vaatamine - Open - + Help + Abiinfo - Image Viewing - + Display shortcuts + Näita otseteid - Print - + Settings + Seaded Select all - + Live Text - - - - - ImageViewer - - Image file not found - + InformationDialog Basic info - + Põhiinfo Size - + Date captured - + Pildistamise kuupäev Date modified - + Muutmise kuupäev Details - + Üksikasjad Aperture - + Avasuurus Exposure program - + Focal length - + Fookuskaugus ISO - + ISO Exposure mode - + Exposure time - + Flash - + Välk Flash compensation - + Colorspace - + Värviruum Metering mode - + White balance - + Lens model - + File name - + Dimensions - + Mõõdud Type - + Liik Max aperture - + Device model - + LiveTextWidget Copy (Ctrl+C) - + Select all (Ctrl+A) - + - OpenImageWidget + MainStack - Open Image - Ava pilt + Select pictures + + + + NonexistImageDelegate - Select pictures - + Image file not found + Pildifaili ei leitud + + + + OpenImageWidget + + Open Image + Ava pilt PropertyActionItemDelegate The file already exists, please use another name - + QObject Image Viewer - + day - + Image Viewer is an image viewing tool with fashion interface and smooth performance. - + ReName Input a new name - + Sisesta uus nimi The file already exists, please use another name - + Cancel - + Loobu Confirm - + Kinnita SliderShow Previous - Eelmine + Eelmine Pause - + Paus Play - + Esita Next - Järgmine + Järgmine Exit - + Välju ThumbnailListView Next - Järgmine + Järgmine Previous - Eelmine + Eelmine Original size - + Fit to window - + Mahuta aknasse Rotate - + Extract text - + Delete - Kustuta + Kustuta ViewRightMenu Fullscreen - Täisekraan + Täisekraan Exit fullscreen - Välju täisekraanilt + Välju täisekraanilt Print - + Prindi Extract text - + Slide show - Slaidiseanss + Slaidiseanss Copy - Kopeeri + Kopeeri Rename - Nimeta ümber + Nimeta ümber Delete - Kustuta + Kustuta Rotate clockwise - Pööra päripäeva + Pööra päripäeva Rotate counterclockwise - Pööra vastupäeva + Pööra vastupäeva Show navigation window - + Hide navigation window - + Set as wallpaper - Määra taustapildiks + Määra taustapildiks Display in file manager - Näita failihalduris + Näita failihalduris Image info - Pildi info + Pildi info ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + Image Viewer - + Version - + %1 is released under %2 - + + + + Open image + - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_fa.ts b/src/translations/deepin-image-viewer_fa.ts index 02bab62c..63668fe2 100644 --- a/src/translations/deepin-image-viewer_fa.ts +++ b/src/translations/deepin-image-viewer_fa.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - تمام صفحه + تمام صفحه - Help - + Exit fullscreen + خروج از تمام صفحه - Display shortcuts - + Extract text + - Display in file manager - نمایش در مدیر فایل + Slide show + نمایش اسلاید - Slide show - نمایش اسلاید + Rename + تغییر اسم Copy - کپی + کپی Delete - حذف - - - Set as wallpaper - تنظیم به عنوان تصویر پس زمینه + حذف Rotate clockwise - چرخش در جهت عقربه های ساعت + چرخش در جهت عقربه های ساعت Rotate counterclockwise - چرخش در جهت خلاف عقربه های ساعت + چرخش در جهت خلاف عقربه های ساعت - Zoom in - + Set as wallpaper + تنظیم به عنوان تصویر پس زمینه - Zoom out - + Display in file manager + نمایش در مدیر فایل + + + Image info + اطلاعات تصویر Previous - قبلی + قبلی Next - بعدی + بعدی - Settings - + Zoom in + - Exit fullscreen - خروج از تمام صفحه + Zoom out + - Extract text - + Open + - Rename - تغییر اسم + Print + چاپ - Image info - اطلاعات تصویر + Image Viewing + مشاهده تصویر - Open - + Help + راهنما - Image Viewing - + Display shortcuts + نمایش میانبرها - Print - + Settings + تنظیمات Select all - + Live Text - - - - - ImageViewer - - Image file not found - + InformationDialog Basic info - + Size - + Date captured - + تاریخ گرفتن عکس Date modified - + تاریخ اصلاح شدن Details - + Aperture - + دیافراگم Exposure program - + برنامه نوردهی Focal length - + فاصله کانونی ISO - + ایزو Exposure mode - + حالت نوردهی Exposure time - + زمان نوردهی Flash - + فلش Flash compensation - + خسارت فلاش Colorspace - + فضای رنگی Metering mode - + حالت نورسنجی White balance - + تراز سفیدی Lens model - + مدل لنز File name - + Dimensions - + Type - + نوع Max aperture - + حداکثر دیافراگم Device model - + LiveTextWidget Copy (Ctrl+C) - + Select all (Ctrl+A) - + - OpenImageWidget + MainStack - Open Image - باز کردن تصویر + Select pictures + + + + NonexistImageDelegate - Select pictures - + Image file not found + + + + + OpenImageWidget + + Open Image + باز کردن تصویر PropertyActionItemDelegate The file already exists, please use another name - + QObject Image Viewer - + نمایشگر تصویر day - + Image Viewer is an image viewing tool with fashion interface and smooth performance. - + ReName Input a new name - + The file already exists, please use another name - + Cancel - + لغو Confirm - + SliderShow Previous - قبلی + قبلی Pause - + Play - + Next - بعدی + بعدی Exit - + خروج ThumbnailListView Next - بعدی + بعدی Previous - قبلی + قبلی Original size - + Fit to window - + متناسب با پنجره Rotate - + Extract text - + Delete - حذف + حذف ViewRightMenu Fullscreen - تمام صفحه + تمام صفحه Exit fullscreen - خروج از تمام صفحه + خروج از تمام صفحه Print - + چاپ Extract text - + Slide show - نمایش اسلاید + نمایش اسلاید Copy - کپی + کپی Rename - تغییر اسم + تغییر اسم Delete - حذف + حذف Rotate clockwise - چرخش در جهت عقربه های ساعت + چرخش در جهت عقربه های ساعت Rotate counterclockwise - چرخش در جهت خلاف عقربه های ساعت + چرخش در جهت خلاف عقربه های ساعت Show navigation window - + نمایش پنجره ناوبری Hide navigation window - + پنهان کردن پنجره ناوبری Set as wallpaper - تنظیم به عنوان تصویر پس زمینه + تنظیم به عنوان تصویر پس زمینه Display in file manager - نمایش در مدیر فایل + نمایش در مدیر فایل Image info - اطلاعات تصویر + اطلاعات تصویر ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + Image Viewer - + نمایشگر تصویر Version - + %1 is released under %2 - + + + + Open image + - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_fi.ts b/src/translations/deepin-image-viewer_fi.ts index 2efaefa2..69cd8732 100644 --- a/src/translations/deepin-image-viewer_fi.ts +++ b/src/translations/deepin-image-viewer_fi.ts @@ -91,18 +91,11 @@ Select all - + Valitse kaikki Live Text - - - - - ImageViewer - - Image file not found - Kuvatiedostoa ei löytynyt + Elävä teksti @@ -113,7 +106,7 @@ Size - + Koko Date captured @@ -177,7 +170,7 @@ File name - + Tiedoston nimi Dimensions @@ -193,18 +186,32 @@ Device model - + Laitteen malli LiveTextWidget Copy (Ctrl+C) - + Kopioi (Ctrl+C) Select all (Ctrl+A) - + Valitse kaikki (Ctrl+A) + + + + MainStack + + Select pictures + Valitse kuvat + + + + NonexistImageDelegate + + Image file not found + Kuvatiedostoa ei löytynyt @@ -213,16 +220,12 @@ Open Image Avaa kuva - - Select pictures - - PropertyActionItemDelegate The file already exists, please use another name - + Tiedosto on jo olemassa, käytä toista nimeä @@ -248,7 +251,7 @@ The file already exists, please use another name - + Tiedosto on jo olemassa, käytä toista nimeä Cancel @@ -294,7 +297,7 @@ Original size - + Alkuperäinen koko Fit to window @@ -302,7 +305,7 @@ Rotate - + Käännä Extract text @@ -388,15 +391,15 @@ Version - + Versio %1 is released under %2 - + %1 on julkaistu %2 alla Open image - + Avaa kuva \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_fr.ts b/src/translations/deepin-image-viewer_fr.ts index cf5f66ab..018dff29 100644 --- a/src/translations/deepin-image-viewer_fr.ts +++ b/src/translations/deepin-image-viewer_fr.ts @@ -91,18 +91,11 @@ Select all - + Sélectionnez tout Live Text - - - - - ImageViewer - - Image file not found - Fichier image non trouvé + Texte en direct @@ -113,7 +106,7 @@ Size - + Taille Date captured @@ -177,7 +170,7 @@ File name - + Nom de fichier Dimensions @@ -193,18 +186,32 @@ Device model - + Modèle d'appareil LiveTextWidget Copy (Ctrl+C) - + Copier (CTRL+C) Select all (Ctrl+A) - + Sélectionner tout (CTRL+A) + + + + MainStack + + Select pictures + Sélectionnez des images + + + + NonexistImageDelegate + + Image file not found + Fichier image non trouvé @@ -213,16 +220,12 @@ Open Image Ouvrir une image - - Select pictures - - PropertyActionItemDelegate The file already exists, please use another name - + Le fichier existe déjà, veuillez utiliser un nom différent @@ -248,7 +251,7 @@ The file already exists, please use another name - + Le fichier existe déjà, veuillez utiliser un nom différent Cancel @@ -294,7 +297,7 @@ Original size - + Taille originale Fit to window @@ -302,7 +305,7 @@ Rotate - + Rotation Extract text @@ -388,15 +391,15 @@ Version - + Version %1 is released under %2 - + %1 est réalisé sous %2 Open image - + Ouvrir image \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_gl_ES.ts b/src/translations/deepin-image-viewer_gl_ES.ts index 88a2f572..5392bbf6 100644 --- a/src/translations/deepin-image-viewer_gl_ES.ts +++ b/src/translations/deepin-image-viewer_gl_ES.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - Pantalla completa + Pantalla completa - Help - + Exit fullscreen + Saír da pantalla completa - Display shortcuts - + Extract text + - Display in file manager - Visualizar no xestor de ficheiros + Slide show + Presentación - Slide show - Presentación + Rename + Renomear Copy - Copiar + Copiar Delete - Eliminar - - - Set as wallpaper - Establecer como fondo de pantalla + Eliminar Rotate clockwise - Rotar á dereita + Xira en sentido horario Rotate counterclockwise - Rotar á esquerda + Xire en sentido antihorario - Zoom in - + Set as wallpaper + Establecer como fondo de pantalla - Zoom out - + Display in file manager + Visualizar no xestor de ficheiros + + + Image info + Información da imaxe Previous - Anterior + Anterior Next - Seguinte + Posterior - Settings - + Zoom in + Ampliar - Exit fullscreen - Saír da pantalla completa + Zoom out + Afastar - Extract text - + Open + Abrir - Rename - Renomear + Print + Imprimir - Image info - Información da imaxe + Image Viewing + Vendo imaxe - Open - + Help + Axuda - Image Viewing - + Display shortcuts + Amosar atallos - Print - + Settings + Axustes Select all - + Live Text - - - - - ImageViewer - - Image file not found - + InformationDialog Basic info - + Información básica Size - + Date captured - + Data de captura Date modified - + Data da modificación Details - + Detalles Aperture - + Apertura Exposure program - + Programa de exposición Focal length - + Distancia focal ISO - + ISO Exposure mode - + Modo de exposición Exposure time - + Tempo de exposición Flash - + Flash Flash compensation - + Compensación de flash Colorspace - + Espazo de cor Metering mode - + Modo de medición White balance - + Balance de brancos Lens model - + Modelo de lente File name - + Dimensions - + Dimensións Type - + Tipo Max aperture - + Máxima apertura Device model - + LiveTextWidget Copy (Ctrl+C) - + Select all (Ctrl+A) - + - OpenImageWidget + MainStack - Open Image - Abrir imaxe + Select pictures + + + + NonexistImageDelegate - Select pictures - + Image file not found + Non se atopou a imaxe + + + + OpenImageWidget + + Open Image + Abrir imaxe PropertyActionItemDelegate The file already exists, please use another name - + QObject Image Viewer - Visualizador de imaxes + Visualizador de imaxes day - + Image Viewer is an image viewing tool with fashion interface and smooth performance. - + Image Viewer é unha ferramenta de visualización de imaxes con interface de moda e bo funcionamento. ReName Input a new name - + Poña un novo nome The file already exists, please use another name - + Cancel - + Cancelar Confirm - + Confirmar SliderShow Previous - Anterior + Anterior Pause - + Parar Play - + Reproducir Next - Seguinte + Posterior Exit - + Saír ThumbnailListView Next - Seguinte + Posterior Previous - Anterior + Anterior Original size - + Fit to window - + Axustar á xanela Rotate - + Extract text - + Delete - Eliminar + Eliminar ViewRightMenu Fullscreen - Pantalla completa + Pantalla completa Exit fullscreen - Saír da pantalla completa + Saír da pantalla completa Print - + Imprimir Extract text - + Slide show - Presentación + Presentación Copy - Copiar + Copiar Rename - Renomear + Renomear Delete - Eliminar + Eliminar Rotate clockwise - Rotar á dereita + Xira en sentido horario Rotate counterclockwise - Rotar á esquerda + Xire en sentido antihorario Show navigation window - + Amosar xanela de navegación Hide navigation window - + Ocultar xanela de navegación Set as wallpaper - Establecer como fondo de pantalla + Establecer como fondo de pantalla Display in file manager - Visualizar no xestor de ficheiros + Visualizar no xestor de ficheiros Image info - Información da imaxe + Información da imaxe ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + Image Viewer é unha ferramenta de visualización de imaxes con interface de moda e bo funcionamento. Image Viewer - Visualizador de imaxes + Visualizador de imaxes Version - + %1 is released under %2 - + + + + Open image + - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_he.ts b/src/translations/deepin-image-viewer_he.ts index 654d1c53..b4c123d1 100644 --- a/src/translations/deepin-image-viewer_he.ts +++ b/src/translations/deepin-image-viewer_he.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - + מסך מלא - Help - + Exit fullscreen + יציאה ממסך מלא - Display shortcuts - + Extract text + חילוץ טקסט - Display in file manager - + Slide show + מצגת - Slide show - + Rename + שינוי שם Copy - + העתקה Delete - - - - Set as wallpaper - + מחיקה Rotate clockwise - + הטייה עם כיוון השעון Rotate counterclockwise - + הטייה נגד כיוון השעון - Zoom in - + Set as wallpaper + הגדרה כתמונת רקע - Zoom out - + Display in file manager + הצגה במנהל הקבצים + + + Image info + פרטי התמונה Previous - + הקודם Next - + הבא - Settings - + Zoom in + התקרבות - Exit fullscreen - + Zoom out + התרחקות - Extract text - + Open + פתיחה - Rename - שינוי שם + Print + הדפסה - Image info - + Image Viewing + צפייה בתמונות - Open - + Help + עזרה - Image Viewing - + Display shortcuts + הצגת קיצורי דרך - Print - + Settings + הגדרות Select all - + בחירה בהכול Live Text - - - - - ImageViewer - - Image file not found - + טקסט חי InformationDialog Basic info - + פרטים בסיסיים Size - + גודל Date captured - + מועד הצילום Date modified - + מועד השינוי Details - + פרטים Aperture - + צמצם Exposure program - + תכנית חשיפה Focal length - + אורך מוקד ISO - + חשיפה Exposure mode - + מצב חשיפה Exposure time - + זמן חשיפה Flash - + מבזק Flash compensation - + פיצוי מבזק Colorspace - + מרחב צבע Metering mode - + מצב מדידה White balance - + איזון לבן Lens model - + דגם העדשה File name - + שם הקובץ Dimensions - + ממדים Type - + סוג Max aperture - + צמצם מרבי Device model - + דגם התקן LiveTextWidget Copy (Ctrl+C) - + העתקה (Ctrl+C) Select all (Ctrl+A) - + בחירה בהכול (Ctrl+A) - OpenImageWidget + MainStack - Open Image - + Select pictures + בחירת תמונות + + + NonexistImageDelegate - Select pictures - + Image file not found + קובץ התמונה לא נמצא + + + + OpenImageWidget + + Open Image + פתיחת תמונה PropertyActionItemDelegate The file already exists, please use another name - + הקובץ כבר קיים, נא להשתמש בשם אחר QObject Image Viewer - + מציג תמונות day - + יום Image Viewer is an image viewing tool with fashion interface and smooth performance. - + מציג התמונות הוא כלי להצגת תמונות עם מראה אופנתי וביצועים חלקים. ReName Input a new name - + נא למלא שם חדש The file already exists, please use another name - + הקובץ כבר קיים, נא להשתמש בשם אחר Cancel - + ביטול Confirm - + אישור SliderShow Previous - + הקודם Pause - + השהיה Play - + נגינה Next - + הבא Exit - + יציאה ThumbnailListView Next - + הבא Previous - + הקודם Original size - + הגודל המקורי Fit to window - + התאמה לחלון Rotate - + סיבוב Extract text - + חילוץ טקסט Delete - + מחיקה ViewRightMenu Fullscreen - + מסך מלא Exit fullscreen - + יציאה ממסך מלא Print - + הדפסה Extract text - + חילוץ טקסט Slide show - + מצגת Copy - + העתקה Rename - שינוי שם + שינוי שם Delete - + מחיקה Rotate clockwise - + הטייה עם כיוון השעון Rotate counterclockwise - + הטייה נגד כיוון השעון Show navigation window - + הצגת חלון ניווט Hide navigation window - + הסתרת חלון ניווט Set as wallpaper - + הגדרה כתמונת רקע Display in file manager - + הצגה במנהל הקבצים Image info - + פרטי התמונה ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + מציג התמונות הוא כלי להצגת תמונות עם מראה אופנתי וביצועים חלקים. Image Viewer - + מציג תמונות Version - + גרסה %1 is released under %2 - + %1 כפוף לתנאי %2 + + + Open image + פתיחת תמונה - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_hr.ts b/src/translations/deepin-image-viewer_hr.ts index 4fd98ec1..7b45304e 100644 --- a/src/translations/deepin-image-viewer_hr.ts +++ b/src/translations/deepin-image-viewer_hr.ts @@ -91,20 +91,13 @@ Select all - + Odaberi sve Live Text - - ImageViewer - - Image file not found - Slikovna datoteka nije nađena - - InformationDialog @@ -207,16 +200,26 @@ Odaberi sve (Ctrl+A) + + MainStack + + Select pictures + Odaberi slike + + + + NonexistImageDelegate + + Image file not found + Slikovna datoteka nije nađena + + OpenImageWidget Open Image Otvori sliku - - Select pictures - Odaberi slike - PropertyActionItemDelegate @@ -396,7 +399,7 @@ Open image - + Otvori sliku \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_hu.ts b/src/translations/deepin-image-viewer_hu.ts index 54b4fd6c..d5fd8a1e 100644 --- a/src/translations/deepin-image-viewer_hu.ts +++ b/src/translations/deepin-image-viewer_hu.ts @@ -98,13 +98,6 @@ Élő szöveg - - ImageViewer - - Image file not found - A képfájl nem található - - InformationDialog @@ -207,16 +200,26 @@ Összes kijelölése (Ctrl+A) + + MainStack + + Select pictures + Képek kiválasztása + + + + NonexistImageDelegate + + Image file not found + A képfájl nem található + + OpenImageWidget Open Image Kép megnyitása - - Select pictures - Képek kiválasztása - PropertyActionItemDelegate @@ -396,7 +399,7 @@ Open image - + Kép megnyitása \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_id.ts b/src/translations/deepin-image-viewer_id.ts index d39cc0b7..09d1326c 100644 --- a/src/translations/deepin-image-viewer_id.ts +++ b/src/translations/deepin-image-viewer_id.ts @@ -98,13 +98,6 @@ - - ImageViewer - - Image file not found - Gambar tidak ditemukan - - InformationDialog @@ -207,16 +200,26 @@ + + MainStack + + Select pictures + + + + + NonexistImageDelegate + + Image file not found + Gambar tidak ditemukan + + OpenImageWidget Open Image Buka Gambar - - Select pictures - - PropertyActionItemDelegate diff --git a/src/translations/deepin-image-viewer_it.ts b/src/translations/deepin-image-viewer_it.ts index aeec256f..f06e956e 100644 --- a/src/translations/deepin-image-viewer_it.ts +++ b/src/translations/deepin-image-viewer_it.ts @@ -91,18 +91,11 @@ Select all - + Seleziona tutto Live Text - - - - - ImageViewer - - Image file not found - File immagine non trovato + Testo live @@ -113,7 +106,7 @@ Size - + Dimensioni Date captured @@ -177,7 +170,7 @@ File name - + Nome file Dimensions @@ -193,18 +186,32 @@ Device model - + Modello del dispositivo LiveTextWidget Copy (Ctrl+C) - + Copia (Ctrl+C) Select all (Ctrl+A) - + Seleziona tutto (Ctrl+A) + + + + MainStack + + Select pictures + Seleziona immagini + + + + NonexistImageDelegate + + Image file not found + File immagine non trovato @@ -213,16 +220,12 @@ Open Image Apri immagine - - Select pictures - - PropertyActionItemDelegate The file already exists, please use another name - + Il file esiste già, utilizza un altro nome @@ -249,7 +252,7 @@ Localizzazione italiana a cura di Massimo A. Carofano. The file already exists, please use another name - + Il file esiste già, utilizza un altro nome Cancel @@ -295,7 +298,7 @@ Localizzazione italiana a cura di Massimo A. Carofano. Original size - + Dimensioni originali Fit to window @@ -303,7 +306,7 @@ Localizzazione italiana a cura di Massimo A. Carofano. Rotate - + Ruota Extract text @@ -390,15 +393,15 @@ Localizzazione italiana a cura di Massimo A. Carofano. Version - + Versione %1 is released under %2 - + %1 rilasciato secondo %2 Open image - + Apri immagine \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_ko.ts b/src/translations/deepin-image-viewer_ko.ts index 2caa91a9..b6b313fd 100644 --- a/src/translations/deepin-image-viewer_ko.ts +++ b/src/translations/deepin-image-viewer_ko.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - 전체화면 + 전체화면 - Help - + Exit fullscreen + 전체화면 종료 - Display shortcuts - + Extract text + - Display in file manager - 파일 관리도구에 표시 + Slide show + 슬라이드 표시 - Slide show - 슬라이드 표시 + Rename + 이름 변경 Copy - 복사 + 복사 Delete - 삭제 - - - Set as wallpaper - 바탕화면으로 설정 + 삭제 Rotate clockwise - 시계 방향으로 회전 + 시계 방향으로 회전 Rotate counterclockwise - 시계 반대 방향으로 회전 + 시계 반대 방향으로 회전 - Zoom in - + Set as wallpaper + 바탕화면으로 설정 - Zoom out - + Display in file manager + 파일 관리도구에 표시 + + + Image info + 이미지 정보 Previous - 이전 + 이전 Next - 다음 + 다음 - Settings - + Zoom in + 확대 - Exit fullscreen - 전체화면 종료 + Zoom out + 축소 - Extract text - + Open + 열기 - Rename - 이름 변경 + Print + 인쇄 - Image info - 이미지 정보 + Image Viewing + 이미지 보는 중 - Open - + Help + 도움말 - Image Viewing - + Display shortcuts + 단축키 표시 - Print - + Settings + 설정 Select all - + Live Text - - - - - ImageViewer - - Image file not found - + InformationDialog Basic info - + 기본 정보 Size - + Date captured - + 캡처된 날짜 Date modified - + 수정된 날짜 Details - + 상세 정보 Aperture - + 조리개 Exposure program - + 노출 프로그램 Focal length - + 초점 거리 ISO - + ISO Exposure mode - + 노출 모드 Exposure time - + 노출 시간 Flash - + 플래시 Flash compensation - + 플래시 보정 Colorspace - + 색상공간 Metering mode - + 미터링 모드 White balance - + 화이트 밸런스 Lens model - + 렌즈 모델 File name - + Dimensions - + 치수 Type - + 형식 Max aperture - + 최대 조리개 Device model - + LiveTextWidget Copy (Ctrl+C) - + Select all (Ctrl+A) - + - OpenImageWidget + MainStack - Open Image - 이미지 열기 + Select pictures + + + + NonexistImageDelegate - Select pictures - + Image file not found + 이미지 파일을 찾을 수 없음 + + + + OpenImageWidget + + Open Image + 이미지 열기 PropertyActionItemDelegate The file already exists, please use another name - + QObject Image Viewer - 이미지 보기도구 + 이미지 보기도구 day - + Image Viewer is an image viewing tool with fashion interface and smooth performance. - + 이미지 보기도구는 인기있는 인터페이스와 원활한 성능을 갖춘 이미지보기 도구입니다. ReName Input a new name - + 새 이름 입력 The file already exists, please use another name - + Cancel - + 취소 Confirm - + 확인 SliderShow Previous - 이전 + 이전 Pause - + 일시중지 Play - + 재생 Next - 다음 + 다음 Exit - + 종료 ThumbnailListView Next - 다음 + 다음 Previous - 이전 + 이전 Original size - + Fit to window - + 창에 맞춤 Rotate - + Extract text - + Delete - 삭제 + 삭제 ViewRightMenu Fullscreen - 전체화면 + 전체화면 Exit fullscreen - 전체화면 종료 + 전체화면 종료 Print - + 인쇄 Extract text - + Slide show - 슬라이드 표시 + 슬라이드 표시 Copy - 복사 + 복사 Rename - 이름 변경 + 이름 변경 Delete - 삭제 + 삭제 Rotate clockwise - 시계 방향으로 회전 + 시계 방향으로 회전 Rotate counterclockwise - 시계 반대 방향으로 회전 + 시계 반대 방향으로 회전 Show navigation window - + 탐색 창 표시 Hide navigation window - + 탐색 창 숨기기 Set as wallpaper - 바탕화면으로 설정 + 바탕화면으로 설정 Display in file manager - 파일 관리도구에 표시 + 파일 관리도구에 표시 Image info - 이미지 정보 + 이미지 정보 ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + 이미지 보기도구는 인기있는 인터페이스와 원활한 성능을 갖춘 이미지보기 도구입니다. Image Viewer - 이미지 보기도구 + 이미지 보기도구 Version - + %1 is released under %2 - + + + + Open image + - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_lt.ts b/src/translations/deepin-image-viewer_lt.ts index 3ab622c1..35257706 100644 --- a/src/translations/deepin-image-viewer_lt.ts +++ b/src/translations/deepin-image-viewer_lt.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - Visas ekranas + Visas ekranas - Help - + Exit fullscreen + Išeiti iš viso ekrano - Display shortcuts - + Extract text + - Display in file manager - Rodyti failų tvarkytuvėje + Slide show + Skaidrių rodymas - Slide show - Skaidrių rodymas + Rename + Pervadinti Copy - Kopijuoti + Kopijuoti Delete - Ištrinti - - - Set as wallpaper - Nustatyti kaip darbalaukio foną + Ištrinti Rotate clockwise - Pasukti pagal laikrodžio rodyklę + Pasukti pagal laikrodžio rodyklę Rotate counterclockwise - Pasukti prieš laikrodžio rodyklę + Pasukti prieš laikrodžio rodyklę - Zoom in - + Set as wallpaper + Nustatyti kaip darbalaukio foną - Zoom out - + Display in file manager + Rodyti failų tvarkytuvėje + + + Image info + Paveikslo informacija Previous - Ankstesnis + Ankstesnis Next - Kitas + Kitas - Settings - + Zoom in + Didinti - Exit fullscreen - Išeiti iš viso ekrano + Zoom out + Mažinti - Extract text - + Open + Atverti - Rename - Pervadinti + Print + Spausdinti - Image info - Paveikslo informacija + Image Viewing + Paveikslo žiūrėjimas - Open - + Help + Žinynas - Image Viewing - + Display shortcuts + Rodyti trumpinius - Print - + Settings + Nustatymai Select all - + Live Text - - - - - ImageViewer - - Image file not found - + InformationDialog Basic info - + Pagrindinė informacija Size - + Date captured - + Fotografavimo data Date modified - + Keitimo data Details - + Išsamiau Aperture - + Diafragma Exposure program - + Išlaikymo programa Focal length - + Židinio nuotolis ISO - + ISO Exposure mode - + Išlaikymo veiksena Exposure time - + Išlaikymas Flash - + Blykstė Flash compensation - + Blykstės kompensavimas Colorspace - + Spalvų erdvė Metering mode - + Matavimo veiksena White balance - + Baltos spalvos balansas Lens model - + Objektyvo modelis File name - + Dimensions - + Matmenys Type - + Tipas Max aperture - + Didžiausia diafragma Device model - + LiveTextWidget Copy (Ctrl+C) - + Select all (Ctrl+A) - + - OpenImageWidget + MainStack - Open Image - Atverti paveikslą + Select pictures + + + + NonexistImageDelegate - Select pictures - + Image file not found + Paveikslas nerastas + + + + OpenImageWidget + + Open Image + Atverti paveikslą PropertyActionItemDelegate The file already exists, please use another name - + QObject Image Viewer - Paveikslų žiūryklė + Paveikslų žiūryklė day - + Image Viewer is an image viewing tool with fashion interface and smooth performance. - + Paveikslų žiūryklė yra paveikslų peržiūros įrankis su šiuolaikine sąsaja ir glotniu našumu. ReName Input a new name - + Įveskite naują pavadinimą The file already exists, please use another name - + Cancel - + Atsisakyti Confirm - + Patvirtinti SliderShow Previous - Ankstesnis + Ankstesnis Pause - + Pristabdyti Play - + Paleisti Next - Kitas + Kitas Exit - + Išeiti ThumbnailListView Next - Kitas + Kitas Previous - Ankstesnis + Ankstesnis Original size - + Fit to window - + Talpinti į langą Rotate - + Extract text - + Delete - Ištrinti + Ištrinti ViewRightMenu Fullscreen - Visas ekranas + Visas ekranas Exit fullscreen - Išeiti iš viso ekrano + Išeiti iš viso ekrano Print - + Spausdinti Extract text - + Slide show - Skaidrių rodymas + Skaidrių rodymas Copy - Kopijuoti + Kopijuoti Rename - Pervadinti + Pervadinti Delete - Ištrinti + Ištrinti Rotate clockwise - Pasukti pagal laikrodžio rodyklę + Pasukti pagal laikrodžio rodyklę Rotate counterclockwise - Pasukti prieš laikrodžio rodyklę + Pasukti prieš laikrodžio rodyklę Show navigation window - + Rodyti naršymo langą Hide navigation window - + Slėpti naršymo langą Set as wallpaper - Nustatyti kaip darbalaukio foną + Nustatyti kaip darbalaukio foną Display in file manager - Rodyti failų tvarkytuvėje + Rodyti failų tvarkytuvėje Image info - Paveikslo informacija + Paveikslo informacija ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + Paveikslų žiūryklė yra paveikslų peržiūros įrankis su šiuolaikine sąsaja ir glotniu našumu. Image Viewer - Paveikslų žiūryklė + Paveikslų žiūryklė Version - + %1 is released under %2 - + + + + Open image + - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_ms.ts b/src/translations/deepin-image-viewer_ms.ts index 097966f9..26fe15e2 100644 --- a/src/translations/deepin-image-viewer_ms.ts +++ b/src/translations/deepin-image-viewer_ms.ts @@ -98,13 +98,6 @@ Teks Langsung - - ImageViewer - - Image file not found - Fail imej tidak ditemui - - InformationDialog @@ -207,16 +200,26 @@ Pilih semua (Ctrl+A) + + MainStack + + Select pictures + Pilih gambar + + + + NonexistImageDelegate + + Image file not found + Fail imej tidak ditemui + + OpenImageWidget Open Image Buka Imej - - Select pictures - Pilih gambar - PropertyActionItemDelegate @@ -396,7 +399,7 @@ Open image - + Buka imej \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_ne.ts b/src/translations/deepin-image-viewer_ne.ts index 821e1613..e8c8c37b 100644 --- a/src/translations/deepin-image-viewer_ne.ts +++ b/src/translations/deepin-image-viewer_ne.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - पूर्णस्क्रीन + पूर्णस्क्रीन - Help - + Exit fullscreen + पूर्णस्क्रीनबाट बाहिर निस्कनुहोस् - Display shortcuts - + Extract text + - Display in file manager - फाइल प्रबन्धकमा प्रदर्शन गर्नुहोस् + Slide show + स्लाइड शो - Slide show - स्लाइड शो + Rename + नाम बदल्नुहोस् Copy - कपि गर्नुहोस् + कपि Delete - हटाउनु होस् - - - Set as wallpaper - वालपेपरको रूपमा सेट गर्नुहोस् + हटाउनु होस् Rotate clockwise - घडीको दिशामा घुमाउनुहोस् + घडीको दिशामा घुमाउनुहोस् Rotate counterclockwise - घडिको उल्टो दिशामा घुमाउनुहोस् + घडिको उल्टो दिशामा घुमाउनुहोस् - Zoom in - + Set as wallpaper + वालपेपरको रूपमा सेट गर्नुहोस् - Zoom out - + Display in file manager + फाइल प्रबन्धकमा प्रदर्शन गर्नुहोस् + + + Image info + छवि जानकारी Previous - अघिल्लो + अघिल्लो Next - अर्को + अर्को - Settings - + Zoom in + जुम इन गर्नुहोस् - Exit fullscreen - पूर्णस्क्रीनबाट बाहिर निस्कनुहोस् + Zoom out + जुम आउट गर्नुहोस् - Extract text - + Open + खोल्नुहोस् - Rename - नाम बदल्नुहोस् + Print + प्रिन्ट गर्नुहोस् - Image info - छवि जानकारी + Image Viewing + छवि अवलोकन - Open - + Help + मद्दत - Image Viewing - + Display shortcuts + सर्टकट प्रदर्शन गर्नुहोस् - Print - + Settings + सेटिंग्स Select all - + Live Text - - - - - ImageViewer - - Image file not found - + InformationDialog Basic info - + आधारभूत जानकारी Size - + Date captured - + मिति कब्जा गरियो Date modified - + मिति परिमार्जित Details - + विवरण Aperture - + एपर्चर Exposure program - + एक्सपोजर प्रोग्राम Focal length - + फोकल लम्बाई ISO - + ISO Exposure mode - + एक्सपोजर मोड Exposure time - + एक्सपोजर समय Flash - + फ्ल्यास Flash compensation - + फ्ल्यास क्षतिपूर्ति Colorspace - + कलरस्पेस Metering mode - + मिटरिंग मोड White balance - + सेतो सन्तुलन Lens model - + लेन्स मोडेल File name - + Dimensions - + आयाम Type - + प्रकार Max aperture - + अधिकतम एपर्चर Device model - + LiveTextWidget Copy (Ctrl+C) - + Select all (Ctrl+A) - + - OpenImageWidget + MainStack - Open Image - छवि खोल्नुहोस् + Select pictures + + + + NonexistImageDelegate - Select pictures - + Image file not found + छवि फाईल फेला परेन + + + + OpenImageWidget + + Open Image + छवि खोल्नुहोस् PropertyActionItemDelegate The file already exists, please use another name - + QObject Image Viewer - इमेज विएवेर + इमेज विएवेर day - + Image Viewer is an image viewing tool with fashion interface and smooth performance. - + छवि दर्शक फेशन इन्टरफेस र चिल्लो प्रदर्शनको साथ छवि दृश्य उपकरण हो। ReName Input a new name - + The file already exists, please use another name - + Cancel - + रद्द गर्नुहोस् Confirm - + SliderShow Previous - अघिल्लो + अघिल्लो Pause - + Play - + Next - अर्को + अर्को Exit - + ThumbnailListView Next - अर्को + अर्को Previous - अघिल्लो + अघिल्लो Original size - + Fit to window - + विन्डोमा फिट Rotate - + Extract text - + Delete - हटाउनु होस् + हटाउनु होस् ViewRightMenu Fullscreen - पूर्णस्क्रीन + पूर्णस्क्रीन Exit fullscreen - पूर्णस्क्रीनबाट बाहिर निस्कनुहोस् + पूर्णस्क्रीनबाट बाहिर निस्कनुहोस् Print - + प्रिन्ट गर्नुहोस् Extract text - + Slide show - स्लाइड शो + स्लाइड शो Copy - कपि गर्नुहोस् + कपि Rename - नाम बदल्नुहोस् + नाम बदल्नुहोस् Delete - हटाउनु होस् + हटाउनु होस् Rotate clockwise - घडीको दिशामा घुमाउनुहोस् + घडीको दिशामा घुमाउनुहोस् Rotate counterclockwise - घडिको उल्टो दिशामा घुमाउनुहोस् + घडिको उल्टो दिशामा घुमाउनुहोस् Show navigation window - + नेभिगेसन विन्डो देखाउनुहोस् Hide navigation window - + नेभिगेसन विन्डो लुकाउनुहोस् Set as wallpaper - वालपेपरको रूपमा सेट गर्नुहोस् + वालपेपरको रूपमा सेट गर्नुहोस् Display in file manager - फाइल प्रबन्धकमा प्रदर्शन गर्नुहोस् + फाइल प्रबन्धकमा प्रदर्शन गर्नुहोस् Image info - छवि जानकारी + छवि जानकारी ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + छवि दर्शक फेशन इन्टरफेस र चिल्लो प्रदर्शनको साथ छवि दृश्य उपकरण हो। Image Viewer - इमेज विएवेर + इमेज विएवेर Version - + %1 is released under %2 - + + + + Open image + - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_nl.ts b/src/translations/deepin-image-viewer_nl.ts index 3ae34e99..8b8c21a7 100644 --- a/src/translations/deepin-image-viewer_nl.ts +++ b/src/translations/deepin-image-viewer_nl.ts @@ -3,11 +3,11 @@ FileControl Fullscreen - Beeldvullend + Schermvullende weergave Exit fullscreen - Beeldvullende modus afsluiten + Schermvullende weergave verlaten Extract text @@ -95,14 +95,7 @@ Live Text - Live-ondersteuning - - - - ImageViewer - - Image file not found - Afbeelding niet aangetroffen + Live-tekst @@ -207,16 +200,26 @@ Alles selecteren (Ctrl+A) + + MainStack + + Select pictures + Afbeeldingen selecteren + + + + NonexistImageDelegate + + Image file not found + Afbeelding niet aangetroffen + + OpenImageWidget Open Image Afbeelding openen - - Select pictures - Afbeeldingen selecteren - PropertyActionItemDelegate @@ -237,7 +240,7 @@ Image Viewer is an image viewing tool with fashion interface and smooth performance. - Afbeeldingen is een programma om afbeeldingen te tonen met een stijlvolle vormgeving en vloeiende prestaties. + Met Afbeeldingen kun je al je foto's en afbeeldingen bekijken. Het programma is voorzien van een stijlvolle vormgeving en vloeiende prestaties. @@ -298,7 +301,7 @@ Fit to window - Aanpassen aan venster + Inpassen Rotate @@ -317,11 +320,11 @@ ViewRightMenu Fullscreen - Beeldvullend + Schermvullende weergave Exit fullscreen - Beeldvullende modus afsluiten + Schermvullende weergave verlaten Print @@ -380,7 +383,7 @@ ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - Afbeeldingen is een programma om afbeeldingen te tonen met een stijlvolle vormgeving en vloeiende prestaties. + Met Afbeeldingen kun je al je foto's en afbeeldingen bekijken. Het programma is voorzien van een stijlvolle vormgeving en vloeiende prestaties. Image Viewer @@ -396,7 +399,7 @@ Open image - + Afbeelding openen \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_pl.ts b/src/translations/deepin-image-viewer_pl.ts index 0827acb0..f8900831 100644 --- a/src/translations/deepin-image-viewer_pl.ts +++ b/src/translations/deepin-image-viewer_pl.ts @@ -98,13 +98,6 @@ Tekst na żywo - - ImageViewer - - Image file not found - Nie odnaleziono obrazu - - InformationDialog @@ -153,11 +146,11 @@ Flash - Lampa błyskowa + Flesz Flash compensation - Korekcja lampy błyskowej + Kompensacja flesza Colorspace @@ -207,16 +200,26 @@ Zaznacz wszystko (Ctrl+A) + + MainStack + + Select pictures + Zaznacz zdjęcia + + + + NonexistImageDelegate + + Image file not found + Nie odnaleziono obrazu + + OpenImageWidget Open Image Otwórz obraz - - Select pictures - Zaznacz zdjęcia - PropertyActionItemDelegate @@ -267,7 +270,7 @@ Pause - Pauza + Wstrzymaj Play @@ -396,7 +399,7 @@ Open image - + Otwórz obraz \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_pt.ts b/src/translations/deepin-image-viewer_pt.ts index 0e341a82..d5217dae 100644 --- a/src/translations/deepin-image-viewer_pt.ts +++ b/src/translations/deepin-image-viewer_pt.ts @@ -98,13 +98,6 @@ Texto ao vivo - - ImageViewer - - Image file not found - Ficheiro de imagem não encontrado - - InformationDialog @@ -207,16 +200,26 @@ Selecionar tudo (Ctrl+A) + + MainStack + + Select pictures + Selecionar imagens + + + + NonexistImageDelegate + + Image file not found + Ficheiro de imagem não encontrado + + OpenImageWidget Open Image Abrir imagem - - Select pictures - Selecionar imagens - PropertyActionItemDelegate @@ -396,7 +399,7 @@ Open image - + Abrir imagem \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_pt_BR.ts b/src/translations/deepin-image-viewer_pt_BR.ts index 4053fef1..4c98b852 100644 --- a/src/translations/deepin-image-viewer_pt_BR.ts +++ b/src/translations/deepin-image-viewer_pt_BR.ts @@ -91,33 +91,26 @@ Select all - + Selecionar tudo Live Text - - - - - ImageViewer - - Image file not found - Nenhuma imagem encontrada + Texto em tempo real InformationDialog Basic info - Informação básica + Informações básicas Size - + Tamanho Date captured - Data da captura + Data de captura Date modified @@ -177,7 +170,7 @@ File name - + Nome do arquivo Dimensions @@ -193,18 +186,32 @@ Device model - + Modelo do dispositivo LiveTextWidget Copy (Ctrl+C) - + Copiar (Ctrl+C) Select all (Ctrl+A) - + Selecionar tudo (Ctrl+A) + + + + MainStack + + Select pictures + Selecionar imagens + + + + NonexistImageDelegate + + Image file not found + Nenhuma imagem encontrada @@ -213,16 +220,12 @@ Open Image Abrir Imagem - - Select pictures - - PropertyActionItemDelegate The file already exists, please use another name - + O arquivo já existe, use outro nome @@ -248,7 +251,7 @@ The file already exists, please use another name - + O arquivo já existe, use outro nome Cancel @@ -294,7 +297,7 @@ Original size - + Tamanho original Fit to window @@ -302,7 +305,7 @@ Rotate - + Girar Extract text @@ -388,15 +391,15 @@ Version - + Versão %1 is released under %2 - + %1 é liberado sob %2 Open image - + Abrir imagem \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_ru.ts b/src/translations/deepin-image-viewer_ru.ts index 8a9f1718..c9d51408 100644 --- a/src/translations/deepin-image-viewer_ru.ts +++ b/src/translations/deepin-image-viewer_ru.ts @@ -98,13 +98,6 @@ - - ImageViewer - - Image file not found - Файл изображения не найден - - InformationDialog @@ -207,16 +200,26 @@ + + MainStack + + Select pictures + + + + + NonexistImageDelegate + + Image file not found + Файл изображения не найден + + OpenImageWidget Open Image Открыть Изображение - - Select pictures - - PropertyActionItemDelegate diff --git a/src/translations/deepin-image-viewer_sk.ts b/src/translations/deepin-image-viewer_sk.ts index ed39f731..6721da9b 100644 --- a/src/translations/deepin-image-viewer_sk.ts +++ b/src/translations/deepin-image-viewer_sk.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - Celá obrazovka + Celá obrazovka - Help - + Exit fullscreen + Ukončiť celú obrazovku - Display shortcuts - + Extract text + - Display in file manager - Zobraziť v správcovi súborov + Slide show + Sled snímkov - Slide show - Sled snímkov + Rename + Premenovať Copy - Kopírovať + Kopírovať Delete - Odstrániť - - - Set as wallpaper - Nastaviť ako pozadie + Odstrániť Rotate clockwise - Otočiť v smere hodinových ručičiek + Otočiť v smere hodinových ručičiek Rotate counterclockwise - Otočiť proti smeru hodinových ručičiek + Otočiť proti smeru hodinových ručičiek - Zoom in - + Set as wallpaper + Nastaviť ako pozadie - Zoom out - + Display in file manager + Zobraziť v správcovi súborov + + + Image info + Informácie o obrázku Previous - Predchádzajúca + Predchádzajúca Next - Ďalej + Ďalej - Settings - + Zoom in + - Exit fullscreen - Ukončiť celú obrazovku + Zoom out + - Extract text - + Open + - Rename - Premenovať + Print + Tlač - Image info - Informácie o obrázku + Image Viewing + Zobrazenie obrázkov - Open - + Help + Pomoc - Image Viewing - + Display shortcuts + Zobrazenie skratiek - Print - + Settings + Nastavenia Select all - + Live Text - - - - - ImageViewer - - Image file not found - + InformationDialog Basic info - + Size - + Date captured - + Dátum fotografovania Date modified - + Dátum úpravy Details - + Aperture - + Clona Exposure program - + Program expozície Focal length - + Ohnisková vzdialenosť ISO - + ISO Exposure mode - + Režim expozície Exposure time - + Čas expozície Flash - + Blesk Flash compensation - + Korekcia zábleskovej expozície Colorspace - + Farebný priestor Metering mode - + Režim merania White balance - + Vyváženie bielej Lens model - + Model objektívu File name - + Dimensions - + Type - + Typ Max aperture - + Maximálna clona Device model - + LiveTextWidget Copy (Ctrl+C) - + Select all (Ctrl+A) - + - OpenImageWidget + MainStack - Open Image - + Select pictures + + + + NonexistImageDelegate - Select pictures - + Image file not found + + + + + OpenImageWidget + + Open Image + PropertyActionItemDelegate The file already exists, please use another name - + QObject Image Viewer - + Prehliadač obrázkov day - + Image Viewer is an image viewing tool with fashion interface and smooth performance. - + ReName Input a new name - + The file already exists, please use another name - + Cancel - + Zrušiť Confirm - + SliderShow Previous - Predchádzajúca + Predchádzajúca Pause - + Play - + Next - Ďalej + Ďalej Exit - + Ukončiť ThumbnailListView Next - Ďalej + Ďalej Previous - Predchádzajúca + Predchádzajúca Original size - + Fit to window - + Prispôsobiť oknu Rotate - + Extract text - + Delete - Odstrániť + Odstrániť ViewRightMenu Fullscreen - Celá obrazovka + Celá obrazovka Exit fullscreen - Ukončiť celú obrazovku + Ukončiť celú obrazovku Print - + Tlač Extract text - + Slide show - Sled snímkov + Sled snímkov Copy - Kopírovať + Kopírovať Rename - Premenovať + Premenovať Delete - Odstrániť + Odstrániť Rotate clockwise - Otočiť v smere hodinových ručičiek + Otočiť v smere hodinových ručičiek Rotate counterclockwise - Otočiť proti smeru hodinových ručičiek + Otočiť proti smeru hodinových ručičiek Show navigation window - + Zobraziť okno navigácie Hide navigation window - + Skryť okno navigácie Set as wallpaper - Nastaviť ako pozadie + Nastaviť ako pozadie Display in file manager - Zobraziť v správcovi súborov + Zobraziť v správcovi súborov Image info - Informácie o obrázku + Informácie o obrázku ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + Image Viewer - + Prehliadač obrázkov Version - + %1 is released under %2 - + + + + Open image + - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_sl.ts b/src/translations/deepin-image-viewer_sl.ts index 05faffc7..7b5353e6 100644 --- a/src/translations/deepin-image-viewer_sl.ts +++ b/src/translations/deepin-image-viewer_sl.ts @@ -91,18 +91,11 @@ Select all - + Izberi vse Live Text - - - - - ImageViewer - - Image file not found - Slika ni bila najdena + Besedilo v živo @@ -113,7 +106,7 @@ Size - + Velikost Date captured @@ -177,7 +170,7 @@ File name - + Ime datoteke Dimensions @@ -193,18 +186,32 @@ Device model - + Model naprave LiveTextWidget Copy (Ctrl+C) - + Kopiraj (Ctrl+C) Select all (Ctrl+A) - + Izberi vse (Ctrl+A) + + + + MainStack + + Select pictures + Izberi slike + + + + NonexistImageDelegate + + Image file not found + Slika ni bila najdena @@ -213,16 +220,12 @@ Open Image Odpri sliko - - Select pictures - - PropertyActionItemDelegate The file already exists, please use another name - + Datoteka že obstaja. Izberite drugo ime @@ -248,7 +251,7 @@ The file already exists, please use another name - + Datoteka že obstaja. Izberite drugo ime Cancel @@ -294,7 +297,7 @@ Original size - + Velikost originala Fit to window @@ -302,7 +305,7 @@ Rotate - + Zavrti Extract text @@ -388,15 +391,15 @@ Version - + Različica %1 is released under %2 - + %1 je objavljen(a) pod %2 Open image - + Odpri sliko \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_sq.ts b/src/translations/deepin-image-viewer_sq.ts index c26776c1..3315368d 100644 --- a/src/translations/deepin-image-viewer_sq.ts +++ b/src/translations/deepin-image-viewer_sq.ts @@ -98,18 +98,11 @@ - - ImageViewer - - Image file not found - S’u gjet kartelë figure - - InformationDialog Basic info - Të dhëna elementare + Hollësi elementare Size @@ -121,7 +114,7 @@ Date modified - Datë kur u ndryshua + Datë ndryshimi Details @@ -207,16 +200,26 @@ Përzgjidhe krejt (Ctrl+A) + + MainStack + + Select pictures + Përzgjidhni foto + + + + NonexistImageDelegate + + Image file not found + S’u gjet kartelë figure + + OpenImageWidget Open Image Hap Figurë - - Select pictures - Përzgjidhni foto - PropertyActionItemDelegate @@ -279,7 +282,7 @@ Exit - Dil + Dalje @@ -396,7 +399,7 @@ Open image - + Hapni figurë \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_sr.ts b/src/translations/deepin-image-viewer_sr.ts index 6bb8bd57..416fa57a 100644 --- a/src/translations/deepin-image-viewer_sr.ts +++ b/src/translations/deepin-image-viewer_sr.ts @@ -98,13 +98,6 @@ - - ImageViewer - - Image file not found - Датотека слике није пронађена - - InformationDialog @@ -207,16 +200,26 @@ + + MainStack + + Select pictures + + + + + NonexistImageDelegate + + Image file not found + Датотека слике није пронађена + + OpenImageWidget Open Image Отвори слику - - Select pictures - - PropertyActionItemDelegate diff --git a/src/translations/deepin-image-viewer_sv.ts b/src/translations/deepin-image-viewer_sv.ts index 94e7f8f9..ee3af598 100644 --- a/src/translations/deepin-image-viewer_sv.ts +++ b/src/translations/deepin-image-viewer_sv.ts @@ -1,400 +1,405 @@ - - - + FileControl Fullscreen - Fullskärm + Fullskärm - Help - + Exit fullscreen + Avsluta fullskärm - Display shortcuts - + Extract text + - Display in file manager - Visa i filhanteraren + Slide show + Bildspel - Slide show - Bildspel + Rename + Ändra namn Copy - Kopiera + Kopiera Delete - Radera - - - Set as wallpaper - Ange som bakgrundsbild + Radera Rotate clockwise - Rotera medurs + Rotera medurs Rotate counterclockwise - Rotera moturs + Rotera moturs - Zoom in - + Set as wallpaper + Ange som bakgrundsbild - Zoom out - + Display in file manager + Visa i filhanteraren + + + Image info + Bildinformation Previous - Föregående + Föregående Next - Nästa + Nästa - Settings - + Zoom in + - Exit fullscreen - Avsluta fullskärm + Zoom out + - Extract text - + Open + - Rename - Ändra namn + Print + Skriv ut - Image info - Bildinformation + Image Viewing + Bildvisare - Open - + Help + Hjälp - Image Viewing - + Display shortcuts + Visa genvägar - Print - + Settings + Inställningar Select all - + Live Text - - - - - ImageViewer - - Image file not found - + InformationDialog Basic info - + Size - + Date captured - + Fotodatum Date modified - + Ändringsdatum Details - + Aperture - + Bländaröppning Exposure program - + Exponeringsprogram Focal length - + Brännvidd ISO - + ISO Exposure mode - + Exponeringsläge Exposure time - + Exponeringstid Flash - + Blixt Flash compensation - + Blixtkompensering Colorspace - + Färgrymd Metering mode - + Ljusmätningsmetod White balance - + Vitbalans Lens model - + Linsmodell File name - + Dimensions - + Type - + Typ Max aperture - + Max bländaröppning Device model - + LiveTextWidget Copy (Ctrl+C) - + Select all (Ctrl+A) - + - OpenImageWidget + MainStack - Open Image - Öppna bild + Select pictures + + + + NonexistImageDelegate - Select pictures - + Image file not found + + + + + OpenImageWidget + + Open Image + Öppna bild PropertyActionItemDelegate The file already exists, please use another name - + QObject Image Viewer - + Bildvisare day - + Image Viewer is an image viewing tool with fashion interface and smooth performance. - + ReName Input a new name - + The file already exists, please use another name - + Cancel - + Avbryt Confirm - + SliderShow Previous - Föregående + Föregående Pause - + Play - + Next - Nästa + Nästa Exit - + Avsluta ThumbnailListView Next - Nästa + Nästa Previous - Föregående + Föregående Original size - + Fit to window - + Anpassa till fönster Rotate - + Extract text - + Delete - Radera + Radera ViewRightMenu Fullscreen - Fullskärm + Fullskärm Exit fullscreen - Avsluta fullskärm + Avsluta fullskärm Print - + Skriv ut Extract text - + Slide show - Bildspel + Bildspel Copy - Kopiera + Kopiera Rename - Ändra namn + Ändra namn Delete - Radera + Radera Rotate clockwise - Rotera medurs + Rotera medurs Rotate counterclockwise - Rotera moturs + Rotera moturs Show navigation window - + Visa navigeringsfönster Hide navigation window - + Göm navigeringsfönster Set as wallpaper - Ange som bakgrundsbild + Ange som bakgrundsbild Display in file manager - Visa i filhanteraren + Visa i filhanteraren Image info - Bildinformation + Bildinformation ViewTopTitle Image Viewer is an image viewing tool with fashion interface and smooth performance. - + Image Viewer - + Bildvisare Version - + %1 is released under %2 - + + + + Open image + - + \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_tr.ts b/src/translations/deepin-image-viewer_tr.ts index f9b0efaf..e3161b1e 100644 --- a/src/translations/deepin-image-viewer_tr.ts +++ b/src/translations/deepin-image-viewer_tr.ts @@ -91,18 +91,11 @@ Select all - + Tümünü seç Live Text - - - - - ImageViewer - - Image file not found - Görsel dosya bulunamadı + Canlı Metin @@ -113,7 +106,7 @@ Size - + Boyut Date captured @@ -177,7 +170,7 @@ File name - + Dosya adı Dimensions @@ -193,18 +186,32 @@ Device model - + Aygıt modeli LiveTextWidget Copy (Ctrl+C) - + Kopyala (Ctrl+C) Select all (Ctrl+A) - + Tümünü seç (Ctrl+A) + + + + MainStack + + Select pictures + Resimleri seçiniz + + + + NonexistImageDelegate + + Image file not found + Görsel dosya bulunamadı @@ -213,16 +220,12 @@ Open Image Görüntü Aç - - Select pictures - - PropertyActionItemDelegate The file already exists, please use another name - + Dosya zaten mevcut, lütfen başka bir ad kullanın @@ -248,7 +251,7 @@ The file already exists, please use another name - + Dosya zaten mevcut, lütfen başka bir ad kullanın Cancel @@ -294,7 +297,7 @@ Original size - + Orijinal boyut Fit to window @@ -302,7 +305,7 @@ Rotate - + Döndür Extract text @@ -388,15 +391,15 @@ Version - + Sürüm %1 is released under %2 - + %1 altında %2 yayınlandı Open image - + Resmi aç \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_ug.ts b/src/translations/deepin-image-viewer_ug.ts index c8cd357d..5df73d39 100644 --- a/src/translations/deepin-image-viewer_ug.ts +++ b/src/translations/deepin-image-viewer_ug.ts @@ -91,18 +91,11 @@ Select all - + ھەممىنى تاللاش Live Text - - - - - ImageViewer - - Image file not found - رەسىم ھۆججىتى بايقالمىدى + توردىكى تېكىست @@ -113,7 +106,7 @@ Size - + سىغىمى Date captured @@ -177,7 +170,7 @@ File name - + ھۆججەت نامى Dimensions @@ -193,18 +186,32 @@ Device model - + ئۈسكۈنە تىپى LiveTextWidget Copy (Ctrl+C) - + كۆپەيتىش (Ctrl+C) Select all (Ctrl+A) - + ھەممىنى تاللاش (Ctrl+A) + + + + MainStack + + Select pictures + سۈرەت تاللاڭ + + + + NonexistImageDelegate + + Image file not found + رەسىم ھۆججىتى بايقالمىدى @@ -213,16 +220,12 @@ Open Image رەسىمنى ئېچىش - - Select pictures - - PropertyActionItemDelegate The file already exists, please use another name - + بۇ ھۆججەت مەۋجۇت، باشقا نام ئىشلىتىڭ @@ -248,7 +251,7 @@ The file already exists, please use another name - + بۇ ھۆججەت مەۋجۇت، باشقا نام ئىشلىتىڭ Cancel @@ -294,7 +297,7 @@ Original size - + ئەسلى سىغىمى Fit to window @@ -302,7 +305,7 @@ Rotate - + ئايلاندۇرۇش Extract text @@ -388,15 +391,15 @@ Version - + نەشرى %1 is released under %2 - + %1 كېلىشىم %2 گە ئەمەل قىلغان ئاساستا ئېلان قىلىندى Open image - + رەسىمنى ئېچىش \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_uk.ts b/src/translations/deepin-image-viewer_uk.ts index 81c577d9..bcf0c280 100644 --- a/src/translations/deepin-image-viewer_uk.ts +++ b/src/translations/deepin-image-viewer_uk.ts @@ -98,13 +98,6 @@ Інтерактивний текст - - ImageViewer - - Image file not found - Файл зображення не знайдено - - InformationDialog @@ -207,16 +200,26 @@ Позначити усе (Ctrl+A) + + MainStack + + Select pictures + Позначте зображення + + + + NonexistImageDelegate + + Image file not found + Файл зображення не знайдено + + OpenImageWidget Open Image Відкрити зображення - - Select pictures - Позначте зображення - PropertyActionItemDelegate @@ -396,7 +399,7 @@ Open image - + Відкрити зображення \ No newline at end of file diff --git a/src/translations/deepin-image-viewer_zh_CN.ts b/src/translations/deepin-image-viewer_zh_CN.ts index 773b3239..acd79b55 100644 --- a/src/translations/deepin-image-viewer_zh_CN.ts +++ b/src/translations/deepin-image-viewer_zh_CN.ts @@ -98,13 +98,6 @@ 实况文本 - - ImageViewer - - Image file not found - 未发现图片文件 - - InformationDialog @@ -207,16 +200,26 @@ 全选 (Ctrl+A) + + MainStack + + Select pictures + 选择图片 + + + + NonexistImageDelegate + + Image file not found + 未发现图片文件 + + OpenImageWidget Open Image 打开图片 - - Select pictures - 选择图片 - PropertyActionItemDelegate diff --git a/src/translations/deepin-image-viewer_zh_HK.ts b/src/translations/deepin-image-viewer_zh_HK.ts index 61a1ddfc..9cab323a 100644 --- a/src/translations/deepin-image-viewer_zh_HK.ts +++ b/src/translations/deepin-image-viewer_zh_HK.ts @@ -98,13 +98,6 @@ 實況文本 - - ImageViewer - - Image file not found - 未發現圖片文件 - - InformationDialog @@ -207,16 +200,26 @@ 全選 (Ctrl+A) + + MainStack + + Select pictures + 選擇圖片 + + + + NonexistImageDelegate + + Image file not found + 未發現圖片文件 + + OpenImageWidget Open Image 打開圖片 - - Select pictures - 選擇圖片 - PropertyActionItemDelegate diff --git a/src/translations/deepin-image-viewer_zh_TW.ts b/src/translations/deepin-image-viewer_zh_TW.ts index bf28da44..8b25df97 100644 --- a/src/translations/deepin-image-viewer_zh_TW.ts +++ b/src/translations/deepin-image-viewer_zh_TW.ts @@ -98,13 +98,6 @@ 實況文字 - - ImageViewer - - Image file not found - 未發現圖片文件 - - InformationDialog @@ -207,16 +200,26 @@ 全選 (Ctrl+A) + + MainStack + + Select pictures + 選擇圖片 + + + + NonexistImageDelegate + + Image file not found + 未發現圖片文件 + + OpenImageWidget Open Image 打開圖片 - - Select pictures - 選擇圖片 - PropertyActionItemDelegate diff --git a/src/translations/desktop/desktop_cs.ts b/src/translations/desktop/desktop_cs.ts index f170a473..64f5107d 100644 --- a/src/translations/desktop/desktop_cs.ts +++ b/src/translations/desktop/desktop_cs.ts @@ -1 +1 @@ -desktopDeepin Image ViewerProhlížeč obrázkůImage ViewerProhlížeč obrázkůImage;Viewer;Jpg;Jpeg;Png;obrázek;prohlížeč;JPGg;JPEG;PNG; \ No newline at end of file +desktopDeepin Image ViewerDeepin Prohlížeč obrázkůImage ViewerProhlížeč obrázkůImage;Viewer;Jpg;Jpeg;Png;obrázek;prohlížeč;JPGg;JPEG;PNG; \ No newline at end of file diff --git a/src/translations/desktop/desktop_he.ts b/src/translations/desktop/desktop_he.ts index 4acb75a7..150739ff 100644 --- a/src/translations/desktop/desktop_he.ts +++ b/src/translations/desktop/desktop_he.ts @@ -1 +1 @@ -desktopDeepin Image Viewerמציג התמונות של DeepinImage ViewerImage;Viewer;Jpg;Jpeg;Png; \ No newline at end of file +desktopDeepin Image Viewerמציג התמונות של DeepinImage Viewerמציג תמונותImage;Viewer;Jpg;Jpeg;Png;תמונה;מציג;Jpg;Jpeg;Png; \ No newline at end of file