Fix build: synchronize Request API, fix GmailSynchronizer, and migrate UI to Qt6 Widgets
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#ifndef EMAILCOMPOSERBRIDGE_H
|
||||
#define EMAILCOMPOSERBRIDGE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QStringList>
|
||||
#include <QByteArray>
|
||||
#include "mailitem.h"
|
||||
|
||||
class EmailComposerBridge : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit EmailComposerBridge(QObject *parent = nullptr);
|
||||
~EmailComposerBridge() override = default;
|
||||
|
||||
struct Attachment {
|
||||
QString fileName;
|
||||
QString filePath;
|
||||
QByteArray data;
|
||||
QString mimeType;
|
||||
};
|
||||
|
||||
MailItem createMailItem(const QString &to, const QString &cc, const QString &bcc,
|
||||
const QString &subject, const QString &body,
|
||||
const QString &accountId,
|
||||
const QVector<Attachment> &attachments = {});
|
||||
|
||||
QString renderBodyToHtml(const QString &plainText) const;
|
||||
|
||||
signals:
|
||||
void mailReadyToSend(const MailItem &mail);
|
||||
void mailSendFailed(const QString &errorMessage);
|
||||
};
|
||||
|
||||
#endif // EMAILCOMPOSERBRIDGE_H
|
||||
Reference in New Issue
Block a user