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
|
||||
|
||||
* BUG号:无
|
||||
|
|
|
@ -16,7 +16,14 @@ Rectangle {
|
|||
property bool mouseIsDoubleClick: false
|
||||
signal changeImage(var nextOrBack)
|
||||
signal doubleSignal()
|
||||
signal copyShortCuts()
|
||||
property int signListLength: variables.operateTime
|
||||
Shortcut {
|
||||
sequence: StandardKey.Copy
|
||||
onActivated: {
|
||||
copyShortCuts()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Variables {
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <QMap>
|
||||
#include <QVector4D>
|
||||
#include <QVariant>
|
||||
#include <QPainterPath>
|
||||
#include "sizedate.h"
|
||||
#include "painterthick.h"
|
||||
#include "global/variable.h"
|
||||
|
|
|
@ -5,16 +5,17 @@
|
|||
#include <QWidget>
|
||||
#include <QCheckBox>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
class PainterThick : public QCheckBox
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PainterThick(int diameter, bool type, QColor color, QWidget *parent = nullptr);
|
||||
void paintEvent(QPaintEvent *event);
|
||||
int m_diameter;//按钮直径或长宽
|
||||
bool m_type = false;//判断是圆形粗细设置还是方形颜色设置--默认为圆形
|
||||
QColor m_color;//按钮颜色
|
||||
QString m_themeChange;//主题变化
|
||||
int m_diameter; //按钮直径或长宽
|
||||
bool m_type = false; //判断是圆形粗细设置还是方形颜色设置--默认为圆形
|
||||
QColor m_color; //按钮颜色
|
||||
QString m_themeChange; //主题变化
|
||||
};
|
||||
|
||||
#endif // PAINTERTHICK_H
|
||||
|
|
|
@ -428,6 +428,7 @@ void ShowImageWidget::copy()
|
|||
}
|
||||
QMimeData *data = new QMimeData;
|
||||
data->setUrls(copyfile);
|
||||
data->setText(m_imagePath);
|
||||
|
||||
QClipboard *clipBoard = QApplication::clipboard();
|
||||
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(changeImage(QVariant)), this, SLOT(needChangeImage(QVariant)));
|
||||
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,
|
||||
SLOT(setOperateWay(QVariant)));
|
||||
|
@ -1401,6 +1403,12 @@ void ShowImageWidget::qmlAndWidgetConnectMovie(QObject *obj)
|
|||
connect(obj, SIGNAL(buriedPoint()), this, SLOT(zoomBuriedPoint()));
|
||||
}
|
||||
|
||||
void ShowImageWidget::copyFromQml()
|
||||
{
|
||||
m_copyFromQml = true;
|
||||
this->copy();
|
||||
}
|
||||
|
||||
void ShowImageWidget::zoomBuriedPoint()
|
||||
{
|
||||
if (m_timer->isActive()) {
|
||||
|
|
|
@ -94,6 +94,7 @@ public Q_SLOTS:
|
|||
void textPaint(QVariant textContent, QVariant startPos, QVariant type);
|
||||
void blurPaint(QVariant blurRect);
|
||||
void zoomBuriedPoint();
|
||||
void copyFromQml();
|
||||
|
||||
|
||||
private:
|
||||
|
@ -242,6 +243,8 @@ private:
|
|||
bool m_hasConnectedNormal = false;
|
||||
bool m_hasConnectedMovie = false;
|
||||
|
||||
bool m_copyFromQml = false;
|
||||
|
||||
Q_SIGNALS:
|
||||
void perRate(QString num, QString path); //改变工具栏的缩小的百分比
|
||||
void toShowImage(); //告诉主界面需要show和hide的控件
|
||||
|
|
Loading…
Reference in New Issue