bar can now toggle bluetooth power and discovery

This commit is contained in:
2025-12-22 01:41:01 +01:00
parent 0101ea1ec0
commit 5a429a3b8b
31 changed files with 507 additions and 114 deletions

View File

@@ -0,0 +1,31 @@
#pragma once
#include <gtkmm/box.h>
#include "components/popover.hpp"
#include "gtkmm/button.h"
class BluetoothWidget : public Popover {
public:
BluetoothWidget(std::string icon, std::string title);
void setPowerState(bool state);
void setIsDiscovering(bool state);
sigc::signal<void(bool)> powerStateChangedSignal;
sigc::signal<void(bool)> isDiscoveringChangedSignal;
void update();
private:
bool isPowered = false;
bool isDiscovering = false;
Gtk::Box container;
Gtk::Box statusArea;
Gtk::Box *deviceList = nullptr;
Gtk::Button *scanButton = nullptr;
Gtk::Button *toggleButton = nullptr;
};