forked from openkylin/kylin-photo-viewer
!9 修复wayland下看图无法复制图片&添加painterpath头文件
Merge pull request !9 from zoujunnan0613/openkylin/yangtze
This commit is contained in:
commit
ca14a918bf
|
@ -1,3 +1,12 @@
|
||||||
|
kylin-photo-viewer (1.3.0.3-ok9build2) yangtze; urgency=medium
|
||||||
|
|
||||||
|
* BUG号:# issue I64UTA【看图】【需求15193】无法复制图片
|
||||||
|
* 需求号:无
|
||||||
|
* 其他改动说明:无
|
||||||
|
* 影响域:仅bug修复,无其他影响
|
||||||
|
|
||||||
|
-- zoujunnan <zoujunnan@kylinos.cn> Tue, 03 Jan 2023 18:43:28 +0800
|
||||||
|
|
||||||
kylin-photo-viewer (1.3.0.3-ok8) yangtze; urgency=medium
|
kylin-photo-viewer (1.3.0.3-ok8) yangtze; urgency=medium
|
||||||
|
|
||||||
* BUG号:无
|
* BUG号:无
|
||||||
|
|
|
@ -16,7 +16,14 @@ Rectangle {
|
||||||
property bool mouseIsDoubleClick: false
|
property bool mouseIsDoubleClick: false
|
||||||
signal changeImage(var nextOrBack)
|
signal changeImage(var nextOrBack)
|
||||||
signal doubleSignal()
|
signal doubleSignal()
|
||||||
|
signal copyShortCuts()
|
||||||
property int signListLength: variables.operateTime
|
property int signListLength: variables.operateTime
|
||||||
|
Shortcut {
|
||||||
|
sequence: StandardKey.Copy
|
||||||
|
onActivated: {
|
||||||
|
copyShortCuts()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Variables {
|
Variables {
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QVector4D>
|
#include <QVector4D>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
#include <QPainterPath>
|
||||||
#include "sizedate.h"
|
#include "sizedate.h"
|
||||||
#include "painterthick.h"
|
#include "painterthick.h"
|
||||||
#include "global/variable.h"
|
#include "global/variable.h"
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
#include <QPainterPath>
|
||||||
class PainterThick : public QCheckBox
|
class PainterThick : public QCheckBox
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -428,6 +428,7 @@ void ShowImageWidget::copy()
|
||||||
}
|
}
|
||||||
QMimeData *data = new QMimeData;
|
QMimeData *data = new QMimeData;
|
||||||
data->setUrls(copyfile);
|
data->setUrls(copyfile);
|
||||||
|
data->setText(m_imagePath);
|
||||||
|
|
||||||
QClipboard *clipBoard = QApplication::clipboard();
|
QClipboard *clipBoard = QApplication::clipboard();
|
||||||
clipBoard->setMimeData(data);
|
clipBoard->setMimeData(data);
|
||||||
|
@ -1116,6 +1117,7 @@ void ShowImageWidget::initQmlObject()
|
||||||
QObject::connect(m_qmlObj, SIGNAL(sendDropImagePath(QVariant)), this, SLOT(getDropImagePath(QVariant)));
|
QObject::connect(m_qmlObj, SIGNAL(sendDropImagePath(QVariant)), this, SLOT(getDropImagePath(QVariant)));
|
||||||
QObject::connect(m_qmlObj, SIGNAL(changeImage(QVariant)), this, SLOT(needChangeImage(QVariant)));
|
QObject::connect(m_qmlObj, SIGNAL(changeImage(QVariant)), this, SLOT(needChangeImage(QVariant)));
|
||||||
QObject::connect(m_qmlObj, SIGNAL(doubleSignal()), this, SIGNAL(doubleEventToMainWid()));
|
QObject::connect(m_qmlObj, SIGNAL(doubleSignal()), this, SIGNAL(doubleEventToMainWid()));
|
||||||
|
QObject::connect(m_qmlObj, SIGNAL(copyShortCuts()), this, SLOT(copyFromQml()));
|
||||||
//操作方式
|
//操作方式
|
||||||
connect(InteractiveQml::getInstance(), SIGNAL(operateWayChanged(QVariant)), m_qmlObj,
|
connect(InteractiveQml::getInstance(), SIGNAL(operateWayChanged(QVariant)), m_qmlObj,
|
||||||
SLOT(setOperateWay(QVariant)));
|
SLOT(setOperateWay(QVariant)));
|
||||||
|
@ -1401,6 +1403,12 @@ void ShowImageWidget::qmlAndWidgetConnectMovie(QObject *obj)
|
||||||
connect(obj, SIGNAL(buriedPoint()), this, SLOT(zoomBuriedPoint()));
|
connect(obj, SIGNAL(buriedPoint()), this, SLOT(zoomBuriedPoint()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ShowImageWidget::copyFromQml()
|
||||||
|
{
|
||||||
|
m_copyFromQml = true;
|
||||||
|
this->copy();
|
||||||
|
}
|
||||||
|
|
||||||
void ShowImageWidget::zoomBuriedPoint()
|
void ShowImageWidget::zoomBuriedPoint()
|
||||||
{
|
{
|
||||||
if (m_timer->isActive()) {
|
if (m_timer->isActive()) {
|
||||||
|
|
|
@ -94,6 +94,7 @@ public Q_SLOTS:
|
||||||
void textPaint(QVariant textContent, QVariant startPos, QVariant type);
|
void textPaint(QVariant textContent, QVariant startPos, QVariant type);
|
||||||
void blurPaint(QVariant blurRect);
|
void blurPaint(QVariant blurRect);
|
||||||
void zoomBuriedPoint();
|
void zoomBuriedPoint();
|
||||||
|
void copyFromQml();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -242,6 +243,8 @@ private:
|
||||||
bool m_hasConnectedNormal = false;
|
bool m_hasConnectedNormal = false;
|
||||||
bool m_hasConnectedMovie = false;
|
bool m_hasConnectedMovie = false;
|
||||||
|
|
||||||
|
bool m_copyFromQml = false;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void perRate(QString num, QString path); //改变工具栏的缩小的百分比
|
void perRate(QString num, QString path); //改变工具栏的缩小的百分比
|
||||||
void toShowImage(); //告诉主界面需要show和hide的控件
|
void toShowImage(); //告诉主界面需要show和hide的控件
|
||||||
|
|
Loading…
Reference in New Issue