mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-02 01:13:19 +00:00
Remove unused code
This commit is contained in:
parent
2e1e5db5ea
commit
f2f472a595
10 changed files with 6 additions and 170 deletions
|
@ -12,28 +12,22 @@
|
|||
#include "mirai-core/MarkdownDataProvider.h"
|
||||
#include "mirai-core/Mirai.h"
|
||||
#include "selenite/palette.h"
|
||||
#include "slint.h"
|
||||
#include "slint_string.h"
|
||||
#include "ui.h"
|
||||
#include <bits/chrono.h>
|
||||
#include <cassert>
|
||||
#include <charconv>
|
||||
#include <chrono>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <ostream>
|
||||
#include <print>
|
||||
#include <ranges>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
AppWindow::AppWindow(mirai::Mirai *miraiInstance)
|
||||
: miraiInstance_(miraiInstance), settingsWindow_(miraiInstance), view_(miraiInstance)
|
||||
: miraiInstance_(miraiInstance), view_(miraiInstance)
|
||||
{
|
||||
sources_ = std::make_shared<slint::VectorModel<ui::Source>>();
|
||||
days_ = std::make_shared<slint::VectorModel<ui::Day>>();
|
||||
|
@ -120,20 +114,6 @@ void AppWindow::setupCallbacks()
|
|||
miraiInstance_->onSourceDeleted([&](int id) {
|
||||
refreshModels();
|
||||
});
|
||||
actions().on_open_settings_window([&]() {
|
||||
settingsWindow_.open();
|
||||
});
|
||||
actions().on_open_add_source_window([&]() {
|
||||
// addSourceWindow_.open();
|
||||
});
|
||||
/*actions().on_open_edit_source_window([&](int sourceId) {*/
|
||||
/*auto source = miraiInstance_->getSourceById(sourceId);*/
|
||||
/*assert(source);*/
|
||||
/*editSourceWindow_.open(source);*/
|
||||
/*});*/
|
||||
actions().on_open_add_event_window([&]() {
|
||||
// editEventWindow_.open();
|
||||
});
|
||||
|
||||
actions().on_task_clicked([&](int sourceId, int taskId) {
|
||||
auto source = miraiInstance_->getSourceById(sourceId);
|
||||
|
@ -264,24 +244,6 @@ void AppWindow::setupCallbacks()
|
|||
view_.update();
|
||||
reloadTasks();
|
||||
});
|
||||
|
||||
/*actions().on_save_event([&](ui::SaveEventParams newEventParams) {*/
|
||||
/*const ui::Date &date = newEventParams.date;*/
|
||||
/*const std::string dateStr = SlintDateToStdString(date);*/
|
||||
/*auto source = miraiInstance_->getSourceById(newEventParams.sourceId);*/
|
||||
/*assert(source);*/
|
||||
/*auto event = source->getEventById(newEventParams.id);*/
|
||||
/*assert(event);*/
|
||||
/*event->setTitle(std::string(newEventParams.title));*/
|
||||
/*event->setStartTime(SlintTimeToMiraiTime(newEventParams.startsAt));*/
|
||||
/*event->setEndTime(SlintTimeToMiraiTime(newEventParams.endsAt));*/
|
||||
|
||||
/*// TODO we can't change the date of the event for now.*/
|
||||
|
||||
/*miraiInstance_->save();*/
|
||||
/*view_.update();*/
|
||||
/*reloadTasks();*/
|
||||
/*});*/
|
||||
}
|
||||
|
||||
std::shared_ptr<slint::VectorModel<slint::SharedString>>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue