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;
|
||||
};
|
||||
@@ -1,19 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/popover.hpp"
|
||||
#include "services/todo.hpp"
|
||||
#include <string>
|
||||
|
||||
class TodoPopover : public Popover {
|
||||
|
||||
public:
|
||||
public:
|
||||
TodoPopover(std::string icon, std::string title);
|
||||
|
||||
void update();
|
||||
private:
|
||||
|
||||
private:
|
||||
std::string name;
|
||||
TodoService* todoService = nullptr;
|
||||
TodoService *todoService = nullptr;
|
||||
Gtk::Box container;
|
||||
Gtk::Box inputArea;
|
||||
Gtk::Box* todoList = nullptr;
|
||||
Gtk::Box *todoList = nullptr;
|
||||
};
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <gtkmm/image.h>
|
||||
#include <gtkmm/picture.h>
|
||||
#include <gtkmm/popovermenu.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -37,8 +36,8 @@ class TrayIconWidget : public Gtk::Button {
|
||||
Glib::RefPtr<Gio::MenuModel> menuModel;
|
||||
sigc::connection menuChangedConnection;
|
||||
bool menuPopupPending = false;
|
||||
double pendingX = 0.0;
|
||||
double pendingY = 0.0;
|
||||
double pendingX = 0.0;
|
||||
double pendingY = 0.0;
|
||||
|
||||
void on_primary_released(int n_press, double x, double y);
|
||||
void on_secondary_released(int n_press, double x, double y);
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "components/popover.hpp"
|
||||
#include <gtkmm/button.h>
|
||||
#include <gtkmm/popover.h>
|
||||
|
||||
#include "components/popover.hpp"
|
||||
|
||||
class WebWidget : public Popover {
|
||||
public:
|
||||
public:
|
||||
WebWidget(std::string icon, std::string title, std::string url);
|
||||
private:
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtkmm/box.h>
|
||||
#include <gtkmm/label.h>
|
||||
#include <gtkmm/gestureclick.h>
|
||||
#include <gtkmm/label.h>
|
||||
#include <sigc++/connection.h>
|
||||
|
||||
#include "services/hyprland.hpp"
|
||||
@@ -18,7 +18,7 @@ class WorkspaceIndicator : public Gtk::Box {
|
||||
sigc::connection workspaceConnection;
|
||||
sigc::connection monitorConnection;
|
||||
std::map<int, Gtk::Label *> workspaceLabels;
|
||||
std::map<int, Glib::RefPtr<Gtk::GestureClick>> workspaceGestures;
|
||||
std::map<int, Glib::RefPtr<Gtk::GestureClick>> workspaceGestures;
|
||||
|
||||
void rebuild();
|
||||
void on_workspace_update();
|
||||
|
||||
Reference in New Issue
Block a user