Storia
 
Loading...
Searching...
No Matches
timeLine.h
Go to the documentation of this file.
1#pragma once
2#include "pch.h"
3
4struct Event {
5 std::string title;
6 int year;
7 int victims;
8 std::string partOfBulgaria;
9 std::string leader;
10 std::string countries;
11 std::string description;
12 std::string username;
14};
15
16class Timeline {
17public:
18 Timeline();
19
20 void loadDefaultEvents();
21 void loadEventsFromJson(const std::string& fileName);
22
23 void addEvent(std::string title, int year, int victims, std::string partOfBulgaria, std::string leader, std::string countries, std::string description, std::string username);
24 void saveEventsToJson(const std::string& fileName);
25
26 void editEvent(const std::string& fileName, int year);
27 void deleteEvent(const std::string& fileName, int year);
28
29 void displayEvents();
30 void displayEvent();
31 void chooseEventsToCompare(Ui& ui);
32private:
33 void compareEvents(Event event1, Event event2, Ui& ui);
34
35 Event* head;
36};
37
void saveEventsToJson(const std::string &fileName)
Definition timeLine.cpp:56
void loadDefaultEvents()
Definition timeLine.cpp:9
void deleteEvent(const std::string &fileName, int year)
Definition timeLine.cpp:151
void displayEvents()
Definition timeLine.cpp:113
void chooseEventsToCompare(Ui &ui)
Definition timeLine.cpp:267
void editEvent(const std::string &fileName, int year)
Definition timeLine.cpp:35
void addEvent(std::string title, int year, int victims, std::string partOfBulgaria, std::string leader, std::string countries, std::string description, std::string username)
Definition timeLine.cpp:16
void loadEventsFromJson(const std::string &fileName)
Definition timeLine.cpp:91
Timeline()
Definition timeLine.cpp:4
void displayEvent()
Definition timeLine.cpp:126
Definition userInterface.h:7
Definition timeLine.h:4
int victims
Definition timeLine.h:7
std::string username
Definition timeLine.h:12
std::string description
Definition timeLine.h:11
std::string partOfBulgaria
Definition timeLine.h:8
int year
Definition timeLine.h:6
std::string leader
Definition timeLine.h:9
Event * next
Definition timeLine.h:13
std::string countries
Definition timeLine.h:10
std::string title
Definition timeLine.h:5