| semilimes mcu sdk 1.1.2 semilimes Software Development Kit for microcontrollers

Loading...
Searching...
No Matches
fc_event_picker.h
1#ifndef _fc_event_picker_
2#define _fc_event_picker_
3
4#include "../defines.h"
5
6 class FcEventPicker
7{
8 private:
9 SmeJson json_data;
10 char* json = nullptr;
11 char* jsonArray = nullptr;
12 char* jsonArray2 = nullptr;
13
14 public:
15// is a string that can hold list or buttons value. It will change how the events are displayed upon a date selection in the semilimes app
17 char eventsDisplayMode[2][8] = {"list", "buttons"};
18
19// Function: ~FcEventPicker
20
21// distructor of the class, frees up the memory occupied by the array/s
22
23// Prototype:
24// ~FcEventPicker()
25
26// Parameters:
27
28// Returns:
30 ~FcEventPicker()
31 {
32 delete[] json;
33 delete[] jsonArray;
34 delete[] jsonArray2;
35 json = nullptr;
36 jsonArray = nullptr;
37 jsonArray2 = nullptr;
38 }
39
40// Function: FcEventPicker.set
41
42// A calendar-shaped form component which allows the user to navigate through events and pick one or more for sending it out in a form submission
43
44// Prototype:
45// void FcEventPicker::set(const char* refname, const char* title, bool reqSel, bool multiSelection, const char* eventsDisplayMode);
46
47// Parameters:
54
55// Returns:
57 void set(const char* refname, const char* title, bool reqSel, bool multiSelection, const char* eventsDisplayMode);
58
59
60// Function: FcEventPicker.addValue
61
62// is an array that contains one or more selected events when the form is submitted
63
64// Prototype:
65// void FcEventPicker::addValue(const char* value);
66
67// Parameters:
69
70// Returns:
72 void addValue(const char* value);
73
74
75// Function: FcEventPicker.appendValues
76
77// Prototype:
78// void FcEventPicker::appendValues();
79
80// Append the selected Values
81
83
84// Returns:
86 void appendValues();
87
88
89// Function: FcEventPicker.addEvent
90
91// is an array of predetermined events that populate the calendar widget displayed in the semilimes app
92
93// Prototype:
94// void FcEventPicker::addEvent(const char* id, int start, const char* title, const char* description, const char* referenceBucketId, const char* additionalInfo);
95
96// Parameters:
103
104// Returns:
106 void addEvent(const char* id, int start, const char* title, const char* description, const char* referenceBucketId, const char* additionalInfo);
107
108
109// Function: FcEventPicker.appendValues
110
111// Append the selected options
112
113// Prototype:
115
116// Parameters:
117
118// Returns:
120 void appendEvents();
121
122
123// Function: FcEventPicker.get
124
125// return the json script
126
127// Prototype:
128// void FcEventPicker::get();
129
130// Parameters:
131
132// Returns:
134 char* get();
135};
136
137#endif
FcEventPicker
Definition fc_event_picker.h:7
FcEventPicker::get
char * get()
Definition fc_event_picker.cpp:163
FcEventPicker::set
void set(const char *refname, const char *title, bool reqSel, bool multiSelection, const char *eventsDisplayMode)
Definition fc_event_picker.cpp:21
FcEventPicker::appendEvents
void appendEvents()
Definition fc_event_picker.cpp:141
FcEventPicker::addEvent
void addEvent(const char *id, int start, const char *title, const char *description, const char *referenceBucketId, const char *additionalInfo)
Definition fc_event_picker.cpp:104
FcEventPicker::addValue
void addValue(const char *value)
Definition fc_event_picker.cpp:48
FcEventPicker::~FcEventPicker
~FcEventPicker()
Definition fc_event_picker.h:30
FcEventPicker::appendValues
void appendValues()
Definition fc_event_picker.cpp:76
FcEventPicker::eventsDisplayMode
char eventsDisplayMode[2][8]
Definition fc_event_picker.h:17