#pragma once #include #include #include #include #include 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; [[nodiscard]] const std::string &raw() const; bool operator<(const QListWidgetItem &other) const override; void parseEmailBody(std::stringstream &ss, std::string &line); private: std::string titleS; std::string messageS; std::string rawMessageS; size_t uid; };