Remove unused tasks library

This commit is contained in:
Nikita Lisitsa 2023-04-17 13:12:19 +03:00
parent 3c4ccbbf54
commit 4b59aa619d
3 changed files with 0 additions and 82 deletions

View file

@ -1,6 +0,0 @@
file(GLOB_RECURSE PSEMEK_TASKS_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "include/*.hpp")
file(GLOB_RECURSE PSEMEK_TASKS_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "source/*.cpp")
psemek_add_library(psemek-tasks ${PSEMEK_TASKS_HEADERS} ${PSEMEK_TASKS_SOURCES})
target_include_directories(psemek-tasks PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_link_libraries(psemek-tasks PUBLIC psemek-util psemek-log psemek-ui)

View file

@ -1,13 +0,0 @@
#pragma once
#include <psemek/ui/element.hpp>
#include <psemek/ui/element_factory.hpp>
#include <filesystem>
namespace psemek::tasks
{
std::shared_ptr<ui::element> make_ui(ui::element_factory & factory, std::filesystem::path const & storage);
}

View file

@ -1,63 +0,0 @@
#include <psemek/tasks/ui.hpp>
#include <psemek/ui/window.hpp>
#include <psemek/ui/grid_layout.hpp>
#include <psemek/ui/frame.hpp>
#include <psemek/ui/scroller.hpp>
#include <psemek/ui/button.hpp>
#include <psemek/util/recursive.hpp>
namespace psemek::tasks
{
std::shared_ptr<ui::element> make_ui(ui::element_factory & factory, std::filesystem::path const & storage)
{
(void)storage;
auto window = factory.make_window("Task manager");
auto grid = factory.make_grid_layout();
window->set_child(grid);
grid->set_size(1, 3);
auto frame_own_style = std::make_shared<ui::style>();
frame_own_style->bevel_width = 4;
frame_own_style->bevel_type = ui::bevel_type::down;
frame_own_style->shadow_offset = {0, 0};
auto frame_style = std::make_shared<ui::style>();
frame_style->text_scale = 1;
frame_style->bevel_width = 3;
for (int i = 0; i < grid->column_count(); ++i)
{
auto frame = factory.make_frame();
auto scroller = factory.make_scroller();
auto layout = factory.make_grid_layout();
frame->set_child(scroller);
scroller->set_child(layout);
grid->set(0, i, frame);
frame->set_own_style(frame_own_style);
frame->set_style(frame_style);
if (i == 1)
{
scroller->set_vertical_scroll(false);
scroller->set_horizontal_scroll(true);
}
auto add_button = util::recursive([&factory, layout](auto && self) -> void {
auto button = factory.make_button("Test");
button->on_click(self);
layout->add_row(button);
});
for (int j = 0; j < 5; ++j)
add_button();
}
return window;
}
}