quick commit
This commit is contained in:
@@ -13,13 +13,6 @@ class HyprlandService {
|
||||
|
||||
public:
|
||||
static constexpr int kWorkspaceSlotCount = 7;
|
||||
const char *kMonitorCommand = "hyprctl monitors -j";
|
||||
const char *kWorkspaceCommand = "hyprctl workspaces -j";
|
||||
const char *kClientsCommand = "hyprctl clients -j";
|
||||
|
||||
struct WindowState {
|
||||
int hyprId = -1;
|
||||
};
|
||||
|
||||
struct WorkspaceState {
|
||||
int hyprId = -1;
|
||||
@@ -64,6 +57,10 @@ class HyprlandService {
|
||||
}
|
||||
|
||||
private:
|
||||
const char *kMonitorCommand = "hyprctl monitors -j";
|
||||
const char *kWorkspaceCommand = "hyprctl workspaces -j";
|
||||
const char *kClientsCommand = "hyprctl clients -j";
|
||||
|
||||
HyprlandService();
|
||||
~HyprlandService();
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "components/todoEntry.hpp"
|
||||
#include "services/todoAdapter.hpp"
|
||||
|
||||
class TodoService {
|
||||
public:
|
||||
TodoService(sigc::signal<void()> refreshSignal);
|
||||
~TodoService();
|
||||
|
||||
std::map<int, TodoEntry *> getTodos();
|
||||
void init();
|
||||
void removeTodo(int id);
|
||||
TodoEntry *addTodo(std::string text, bool emitSignal = true, bool persist = true);
|
||||
void updateTodo(int id, std::string text);
|
||||
|
||||
private:
|
||||
void load();
|
||||
|
||||
int nextId = 1;
|
||||
std::map<int, TodoEntry *> todos;
|
||||
sigc::signal<void()> refreshSignal;
|
||||
|
||||
std::unique_ptr<ITodoAdapter> adapter;
|
||||
};
|
||||
@@ -1,21 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct TodoRecord {
|
||||
int id;
|
||||
std::string text;
|
||||
};
|
||||
|
||||
class ITodoAdapter {
|
||||
public:
|
||||
virtual ~ITodoAdapter() = default;
|
||||
|
||||
virtual bool init() = 0;
|
||||
virtual std::vector<TodoRecord> listTodos() = 0;
|
||||
|
||||
virtual int addTodo(const std::string &text) = 0;
|
||||
virtual bool removeTodo(int id) = 0;
|
||||
virtual bool updateTodo(int id, const std::string &text) = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user