bar can now toggle bluetooth power and discovery
This commit is contained in:
31
include/widgets/bluetooth.hpp
Normal file
31
include/widgets/bluetooth.hpp
Normal 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;
|
||||
};
|
||||
Reference in New Issue
Block a user