dde-dock/frame/util/imageutil.h
tsic404 e7b1bf420e fix: 修复预览花屏问题
更改传递tmp下文件描述符为管道文件描述符,使用管道传递预览图片数据

log: 修复预览花屏问题
2023-03-16 20:25:20 +08:00

28 lines
901 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Copyright (C) 2011 ~ 2018 Deepin Technology Co., Ltd.
// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef IMAGEUTIL_H
#define IMAGEUTIL_H
#include <QWidget>
#include <QPixmap>
#include <QSvgRenderer>
#include <QApplication>
class QCursor;
class ImageUtil
{
public:
static const QPixmap loadSvg(const QString &iconName, const QString &localPath, const int size, const qreal ratio);
static const QPixmap loadSvg(const QString &iconName, const QSize size, const qreal ratio = qApp->devicePixelRatio());
static QCursor* loadQCursorFromX11Cursor(const char* theme, const char* cursorName, int cursorSize);
// 加载窗口的预览图
static QPixmap loadWindowThumb(const QString &winInfoId); // 加载图片参数为windowId或者窗口的UUID
};
#endif // IMAGEUTIL_H