mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 10:05:52 +00:00
Add color for events and source tags
This commit is contained in:
parent
d208fc6ca4
commit
4bca7fac3e
12 changed files with 95 additions and 39 deletions
|
@ -24,7 +24,8 @@ class Mirai
|
|||
void addSource(
|
||||
const std::string &name, const std::string &type, std::unique_ptr<DataProvider> &&source
|
||||
);
|
||||
void editSource(int id, const std::string &name, const std::string &path);
|
||||
void
|
||||
editSource(int id, const std::string &name, const std::string &color, const std::string &path);
|
||||
void deleteSource(int id);
|
||||
void unloadAllSources();
|
||||
void save();
|
||||
|
|
|
@ -32,6 +32,7 @@ struct createEventParams {
|
|||
|
||||
struct SourceConstructor {
|
||||
std::string name;
|
||||
std::string color;
|
||||
DataProvider *sourceDataProvider;
|
||||
};
|
||||
|
||||
|
@ -39,7 +40,8 @@ class Source
|
|||
{
|
||||
public:
|
||||
Source(SourceConstructor params)
|
||||
: data(params.sourceDataProvider), name_(params.name), type_("FileSystemMarkdown")
|
||||
: data(params.sourceDataProvider), name_(params.name), color_(params.color),
|
||||
type_("FileSystemMarkdown")
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -56,9 +58,11 @@ class Source
|
|||
|
||||
std::string name() const;
|
||||
std::string type() const;
|
||||
std::string color() const;
|
||||
DataProvider *dataProvider();
|
||||
|
||||
void setName(const std::string &name);
|
||||
void setColor(const std::string &color);
|
||||
|
||||
void createTask(const createTaskParams &task);
|
||||
void removeTask(const Task &task);
|
||||
|
@ -92,6 +96,7 @@ class Source
|
|||
|
||||
std::string name_;
|
||||
std::string type_;
|
||||
std::string color_;
|
||||
DataProvider *data;
|
||||
};
|
||||
} // namespace mirai
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue