29 lines
633 B
C++
29 lines
633 B
C++
|
#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;
|
||
|
|
||
|
bool operator<(const QListWidgetItem &other) const;
|
||
|
|
||
|
void parseEmailBody(std::stringstream &ss, std::string &line);
|
||
|
|
||
|
private:
|
||
|
std::string titleS;
|
||
|
std::string messageS;
|
||
|
size_t uid;
|
||
|
};
|