#pragma once #include #include "components/button/iconButton.hpp" #include "connection/dbus/bluetooth.hpp" #include "gtkmm/box.h" #include "gtkmm/scrolledwindow.h" #include "widgets/controlCenter/bluetoothSettingsRow.hpp" class BluetoothSettings : public Gtk::Box { public: BluetoothSettings(); private: std::shared_ptr bluetoothController = BluetoothController::getInstance(); std::map activeBluetoothDevices; std::map> deviceRows; std::shared_ptr powerButton = std::make_shared(Icon::POWER_SETTINGS_NEW); std::shared_ptr scanButton = std::make_shared(Icon::BLUETOOTH_SEARCHING); Gtk::Box buttonRow; Gtk::Box connectedDevicesBox; Gtk::ScrolledWindow connectedDevicesScroll; Gtk::Box availableDevicesBox; Gtk::ScrolledWindow availableDevicesScroll; bool bluetoothIsPowered = false; bool bluetoothIsScanning = false; void addBluetoothDevice(const BluetoothDevice &device); void removeBluetoothDevice(const std::string &object_path); void updateBluetoothDevice(const BluetoothDevice &device); void setBluetoothPowered(bool powered); void setScanning(bool scanning); };