blob: 350ceec4597687eb28f80638425dbe6e16cf82c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#pragma once
#include "appost.h"
#include "apbase.h"
#include "fields.h"
#include <vector>
#include <list>
// APQuestion represents an ActivityPub Question Object
class APQuestion : public APPost {
public:
APQuestion();
// A post that will be built from strings, including attachments
APQuestion(APObjectFields fields);
~APQuestion() {};
QString get_html_render(HtmlRenderDetails render_info);
protected:
struct PollOption {
QString name;
int votes;
};
typedef std::vector<PollOption> PollOptionList;
QDateTime end_time;
QDateTime closed_time;
int total_votes = 0;
PollOptionList options;
QString get_html_poll_options(HtmlRenderDetails render_info);
};
|