2022-12-31 15:41:01 +01:00
|
|
|
#pragma once
|
2019-09-24 16:08:12 +02:00
|
|
|
|
|
|
|
#include <QMimeData>
|
|
|
|
#include <QString>
|
|
|
|
|
2022-12-31 15:41:01 +01:00
|
|
|
#include <memory>
|
|
|
|
|
2019-09-24 16:08:12 +02:00
|
|
|
namespace chatterino {
|
2022-12-31 15:41:01 +01:00
|
|
|
|
|
|
|
class ResizingTextEdit;
|
|
|
|
class Channel;
|
|
|
|
using ChannelPtr = std::shared_ptr<Channel>;
|
|
|
|
|
2019-10-22 17:21:46 +02:00
|
|
|
struct RawImageData {
|
2019-09-24 16:08:12 +02:00
|
|
|
QByteArray data;
|
2019-10-22 17:21:46 +02:00
|
|
|
QString format;
|
2020-06-13 14:53:09 +02:00
|
|
|
QString filePath;
|
2019-09-24 16:08:12 +02:00
|
|
|
};
|
2020-01-03 14:43:05 +01:00
|
|
|
|
2019-09-25 22:21:26 +02:00
|
|
|
void upload(QByteArray imageData, ChannelPtr channel,
|
|
|
|
ResizingTextEdit &textEdit, std::string format);
|
2019-10-22 17:21:46 +02:00
|
|
|
void upload(RawImageData imageData, ChannelPtr channel,
|
2019-09-25 22:21:26 +02:00
|
|
|
ResizingTextEdit &textEdit);
|
|
|
|
void upload(const QMimeData *source, ChannelPtr channel,
|
|
|
|
ResizingTextEdit &outputTextEdit);
|
2022-12-31 15:41:01 +01:00
|
|
|
|
2019-09-24 16:08:12 +02:00
|
|
|
} // namespace chatterino
|