emailQt/Email.hpp

29 lines
633 B
C++
Raw Normal View History

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