mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-12 00:00:44 -04:00
Moved RSTextBrowser::checkImage to ImageUtil for use in MimeTextEdit
This commit is contained in:
parent
44bb2c0f05
commit
7b28bf5256
7 changed files with 121 additions and 67 deletions
|
@ -22,15 +22,19 @@
|
|||
#define IMAGEUTIL_H
|
||||
|
||||
#include <QTextCursor>
|
||||
#include <QWidget>
|
||||
#include <QByteArray>
|
||||
#include <qiterator.h>
|
||||
|
||||
class QWidget;
|
||||
class QTextEdit;
|
||||
class QByteArray;
|
||||
|
||||
class ImageUtil
|
||||
{
|
||||
public:
|
||||
ImageUtil();
|
||||
|
||||
static bool checkImage(const QTextEdit *edit, const QPoint &pos, QRect *cursorRectStartOut = NULL, QRect *cursorRectLeftOut = NULL, QRect *cursorRectRightOut = NULL, QRect *cursorRectEndOut = NULL);
|
||||
static bool checkImage(const QTextEdit *edit, const QPoint &pos, QString &imageStr, QRect *cursorRectStartOut = NULL, QRect *cursorRectLeftOut = NULL, QRect *cursorRectRightOut = NULL, QRect *cursorRectEndOut = NULL);
|
||||
static void extractImage(QWidget *window, QTextCursor cursor, QString file = "");
|
||||
static void copyImage(QWidget *window, QTextCursor cursor);
|
||||
static bool optimizeSizeHtml(QString &html, const QImage& original, QImage &optimized, int maxPixels = -1, int maxBytes = -1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue