2024-03-08 12:10:58 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <sstream>
|
|
|
|
#include <string>
|
|
|
|
#include <unordered_map>
|
|
|
|
|
|
|
|
#include <QListWidgetItem>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
class Email : public QListWidgetItem {
|
|
|
|
public:
|
|
|
|
explicit Email(const std::string &str, size_t uid);
|
|
|
|
Email(const Email &e);
|
|
|
|
~Email() = default;
|
|
|
|
|
|
|
|
void setString(const std::string &str);
|
|
|
|
[[nodiscard]] const std::string &title() const;
|
|
|
|
[[nodiscard]] const std::string &message() const;
|
2024-12-19 18:51:41 -05:00
|
|
|
[[nodiscard]] const std::string &raw() const;
|
2024-03-08 12:10:58 -05:00
|
|
|
|
2024-12-19 18:51:41 -05:00
|
|
|
bool operator<(const QListWidgetItem &other) const override;
|
2024-03-08 12:10:58 -05:00
|
|
|
|
|
|
|
void parseEmailBody(std::stringstream &ss, std::string &line);
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::string titleS;
|
|
|
|
std::string messageS;
|
2024-12-19 18:51:41 -05:00
|
|
|
std::string rawMessageS;
|
2024-03-08 12:10:58 -05:00
|
|
|
size_t uid;
|
|
|
|
};
|