Happy clang

pull/2037/head
Viktar Lukashonak 2023-03-02 16:57:07 +03:00
parent 39bc54e3ad
commit 61a6c00c02
No known key found for this signature in database
GPG Key ID: 08A413AA87200A6F
42 changed files with 96 additions and 95 deletions

View File

@ -13,7 +13,7 @@ class AIconLabel : public ALabel {
const std::string &format, uint16_t interval = 0, bool ellipsize = false, const std::string &format, uint16_t interval = 0, bool ellipsize = false,
bool enable_click = false, bool enable_scroll = false); bool enable_click = false, bool enable_scroll = false);
virtual ~AIconLabel() = default; virtual ~AIconLabel() = default;
virtual auto update() -> void; auto update() -> void override;
protected: protected:
Gtk::Image image_; Gtk::Image image_;

View File

@ -14,7 +14,7 @@ class ALabel : public AModule {
uint16_t interval = 0, bool ellipsize = false, bool enable_click = false, uint16_t interval = 0, bool ellipsize = false, bool enable_click = false,
bool enable_scroll = false); bool enable_scroll = false);
virtual ~ALabel() = default; virtual ~ALabel() = default;
virtual auto update() -> void; auto update() -> void override;
virtual std::string getIcon(uint16_t, const std::string &alt = "", uint16_t max = 0); virtual std::string getIcon(uint16_t, const std::string &alt = "", uint16_t max = 0);
virtual std::string getIcon(uint16_t, const std::vector<std::string> &alts, uint16_t max = 0); virtual std::string getIcon(uint16_t, const std::vector<std::string> &alts, uint16_t max = 0);
@ -25,7 +25,7 @@ class ALabel : public AModule {
bool alt_ = false; bool alt_ = false;
std::string default_format_; std::string default_format_;
virtual bool handleToggle(GdkEventButton *const &e); bool handleToggle(GdkEventButton *const &e) override;
virtual std::string getState(uint8_t value, bool lesser = false); virtual std::string getState(uint8_t value, bool lesser = false);
}; };

View File

@ -12,10 +12,10 @@ namespace waybar {
class AModule : public IModule { class AModule : public IModule {
public: public:
virtual ~AModule(); virtual ~AModule();
virtual auto update() -> void; auto update() -> void override;
virtual auto refresh(int) -> void{}; virtual auto refresh(int) -> void{};
virtual operator Gtk::Widget &(); operator Gtk::Widget &() override;
virtual auto doAction(const std::string& name) -> void; auto doAction(const std::string& name) -> void override;
Glib::Dispatcher dp; Glib::Dispatcher dp;

View File

@ -14,8 +14,8 @@ class Group : public AModule {
public: public:
Group(const std::string&, const Bar&, const Json::Value&); Group(const std::string&, const Bar&, const Json::Value&);
~Group() = default; ~Group() = default;
auto update() -> void; auto update() -> void override;
operator Gtk::Widget&(); operator Gtk::Widget&() override;
Gtk::Box box; Gtk::Box box;
}; };

View File

@ -40,8 +40,8 @@ class Backlight : public ALabel {
public: public:
Backlight(const std::string &, const Json::Value &); Backlight(const std::string &, const Json::Value &);
~Backlight(); virtual ~Backlight();
auto update() -> void; auto update() -> void override;
private: private:
template <class ForwardIt> template <class ForwardIt>
@ -51,7 +51,7 @@ class Backlight : public ALabel {
template <class ForwardIt, class Inserter> template <class ForwardIt, class Inserter>
static void enumerate_devices(ForwardIt first, ForwardIt last, Inserter inserter, udev *udev); static void enumerate_devices(ForwardIt first, ForwardIt last, Inserter inserter, udev *udev);
bool handleScroll(GdkEventScroll *e); bool handleScroll(GdkEventScroll *e) override;
const std::string preferred_device_; const std::string preferred_device_;
static constexpr int EPOLL_MAX_EVENTS = 16; static constexpr int EPOLL_MAX_EVENTS = 16;

View File

@ -29,8 +29,8 @@ namespace fs = std::filesystem;
class Battery : public ALabel { class Battery : public ALabel {
public: public:
Battery(const std::string&, const Json::Value&); Battery(const std::string&, const Json::Value&);
~Battery(); virtual ~Battery();
auto update() -> void; auto update() -> void override;
private: private:
static inline const fs::path data_dir_ = "/sys/class/power_supply/"; static inline const fs::path data_dir_ = "/sys/class/power_supply/";

View File

@ -45,8 +45,8 @@ class Bluetooth : public ALabel {
public: public:
Bluetooth(const std::string&, const Json::Value&); Bluetooth(const std::string&, const Json::Value&);
~Bluetooth() = default; virtual ~Bluetooth() = default;
auto update() -> void; auto update() -> void override;
private: private:
static auto onInterfaceAddedOrRemoved(GDBusObjectManager*, GDBusObject*, GDBusInterface*, static auto onInterfaceAddedOrRemoved(GDBusObjectManager*, GDBusObject*, GDBusInterface*,

View File

@ -23,8 +23,8 @@ enum class CldMode {
class Clock final : public ALabel { class Clock final : public ALabel {
public: public:
Clock(const std::string&, const Json::Value&); Clock(const std::string&, const Json::Value&);
~Clock() = default; virtual ~Clock() = default;
auto update() -> void; auto update() -> void override;
auto doAction(const std::string& name) -> void override; auto doAction(const std::string& name) -> void override;
private: private:

View File

@ -17,8 +17,8 @@ namespace waybar::modules {
class Cpu : public ALabel { class Cpu : public ALabel {
public: public:
Cpu(const std::string&, const Json::Value&); Cpu(const std::string&, const Json::Value&);
~Cpu() = default; virtual ~Cpu() = default;
auto update() -> void; auto update() -> void override;
private: private:
double getCpuLoad(); double getCpuLoad();

View File

@ -15,9 +15,9 @@ namespace waybar::modules {
class Custom : public ALabel { class Custom : public ALabel {
public: public:
Custom(const std::string&, const std::string&, const Json::Value&); Custom(const std::string&, const std::string&, const Json::Value&);
~Custom(); virtual ~Custom();
auto update() -> void; auto update() -> void override;
void refresh(int /*signal*/); void refresh(int /*signal*/) override;
private: private:
void delayWorker(); void delayWorker();
@ -25,8 +25,8 @@ class Custom : public ALabel {
void parseOutputRaw(); void parseOutputRaw();
void parseOutputJson(); void parseOutputJson();
void handleEvent(); void handleEvent();
bool handleScroll(GdkEventScroll* e); bool handleScroll(GdkEventScroll* e) override;
bool handleToggle(GdkEventButton* const& e); bool handleToggle(GdkEventButton* const& e) override;
const std::string name_; const std::string name_;
std::string text_; std::string text_;

View File

@ -14,8 +14,8 @@ namespace waybar::modules {
class Disk : public ALabel { class Disk : public ALabel {
public: public:
Disk(const std::string&, const Json::Value&); Disk(const std::string&, const Json::Value&);
~Disk() = default; virtual ~Disk() = default;
auto update() -> void; auto update() -> void override;
private: private:
util::SleeperThread thread_; util::SleeperThread thread_;

View File

@ -18,8 +18,8 @@ namespace waybar::modules {
class Gamemode : public AModule { class Gamemode : public AModule {
public: public:
Gamemode(const std::string &, const Json::Value &); Gamemode(const std::string &, const Json::Value &);
~Gamemode(); virtual ~Gamemode();
auto update() -> void; auto update() -> void override;
private: private:
const std::string DEFAULT_ICON_NAME = "input-gaming-symbolic"; const std::string DEFAULT_ICON_NAME = "input-gaming-symbolic";
@ -39,7 +39,7 @@ class Gamemode : public AModule {
const Glib::VariantContainerBase &arguments); const Glib::VariantContainerBase &arguments);
void getData(); void getData();
bool handleToggle(GdkEventButton *const &); bool handleToggle(GdkEventButton *const &) override;
// Config // Config
std::string format = DEFAULT_FORMAT; std::string format = DEFAULT_FORMAT;

View File

@ -10,12 +10,12 @@ namespace waybar::modules::hyprland {
class Language : public waybar::ALabel, public EventHandler { class Language : public waybar::ALabel, public EventHandler {
public: public:
Language(const std::string&, const waybar::Bar&, const Json::Value&); Language(const std::string&, const waybar::Bar&, const Json::Value&);
~Language(); virtual ~Language();
auto update() -> void; auto update() -> void override;
private: private:
void onEvent(const std::string&); void onEvent(const std::string&) override;
void initLanguage(); void initLanguage();
std::string getShortFrom(const std::string&); std::string getShortFrom(const std::string&);

View File

@ -10,12 +10,12 @@ namespace waybar::modules::hyprland {
class Submap : public waybar::ALabel, public EventHandler { class Submap : public waybar::ALabel, public EventHandler {
public: public:
Submap(const std::string&, const waybar::Bar&, const Json::Value&); Submap(const std::string&, const waybar::Bar&, const Json::Value&);
~Submap(); virtual ~Submap();
auto update() -> void; auto update() -> void override;
private: private:
void onEvent(const std::string&); void onEvent(const std::string&) override;
std::mutex mutex_; std::mutex mutex_;
const Bar& bar_; const Bar& bar_;

View File

@ -12,14 +12,14 @@ namespace waybar::modules::hyprland {
class Window : public waybar::ALabel, public EventHandler { class Window : public waybar::ALabel, public EventHandler {
public: public:
Window(const std::string&, const waybar::Bar&, const Json::Value&); Window(const std::string&, const waybar::Bar&, const Json::Value&);
~Window(); virtual ~Window();
auto update() -> void; auto update() -> void override;
private: private:
int getActiveWorkspaceID(std::string); int getActiveWorkspaceID(std::string);
std::string getLastWindowTitle(int); std::string getLastWindowTitle(int);
void onEvent(const std::string&); void onEvent(const std::string&) override;
bool separate_outputs; bool separate_outputs;
std::mutex mutex_; std::mutex mutex_;

View File

@ -13,13 +13,13 @@ class IdleInhibitor : public ALabel {
public: public:
IdleInhibitor(const std::string&, const waybar::Bar&, const Json::Value&); IdleInhibitor(const std::string&, const waybar::Bar&, const Json::Value&);
~IdleInhibitor(); virtual ~IdleInhibitor();
auto update() -> void; auto update() -> void override;
static std::list<waybar::AModule*> modules; static std::list<waybar::AModule*> modules;
static bool status; static bool status;
private: private:
bool handleToggle(GdkEventButton* const& e); bool handleToggle(GdkEventButton* const& e) override;
void toggleStatus(); void toggleStatus();
const Bar& bar_; const Bar& bar_;

View File

@ -17,8 +17,9 @@ namespace waybar::modules {
class Image : public AModule { class Image : public AModule {
public: public:
Image(const std::string&, const Json::Value&); Image(const std::string&, const Json::Value&);
auto update() -> void; virtual ~Image() = default;
void refresh(int /*signal*/); auto update() -> void override;
void refresh(int /*signal*/) override;
private: private:
void delayWorker(); void delayWorker();

View File

@ -12,12 +12,12 @@ namespace waybar::modules {
class Inhibitor : public ALabel { class Inhibitor : public ALabel {
public: public:
Inhibitor(const std::string&, const waybar::Bar&, const Json::Value&); Inhibitor(const std::string&, const waybar::Bar&, const Json::Value&);
~Inhibitor() override; virtual ~Inhibitor();
auto update() -> void; auto update() -> void override;
auto activated() -> bool; auto activated() -> bool;
private: private:
auto handleToggle(::GdkEventButton* const& e) -> bool; auto handleToggle(::GdkEventButton* const& e) -> bool override;
const std::unique_ptr<::GDBusConnection, void (*)(::GDBusConnection*)> dbus_; const std::unique_ptr<::GDBusConnection, void (*)(::GDBusConnection*)> dbus_;
const std::string inhibitors_; const std::string inhibitors_;

View File

@ -14,8 +14,8 @@ namespace waybar::modules {
class JACK : public ALabel { class JACK : public ALabel {
public: public:
JACK(const std::string &, const Json::Value &); JACK(const std::string &, const Json::Value &);
~JACK() = default; virtual ~JACK() = default;
auto update() -> void; auto update() -> void override;
int bufSize(jack_nframes_t size); int bufSize(jack_nframes_t size);
int sampleRate(jack_nframes_t rate); int sampleRate(jack_nframes_t rate);

View File

@ -19,8 +19,8 @@ namespace waybar::modules {
class KeyboardState : public AModule { class KeyboardState : public AModule {
public: public:
KeyboardState(const std::string&, const waybar::Bar&, const Json::Value&); KeyboardState(const std::string&, const waybar::Bar&, const Json::Value&);
~KeyboardState(); virtual ~KeyboardState();
auto update() -> void; auto update() -> void override;
private: private:
auto tryAddDevice(const std::string&) -> void; auto tryAddDevice(const std::string&) -> void;

View File

@ -13,8 +13,8 @@ namespace waybar::modules {
class Memory : public ALabel { class Memory : public ALabel {
public: public:
Memory(const std::string&, const Json::Value&); Memory(const std::string&, const Json::Value&);
~Memory() = default; virtual ~Memory() = default;
auto update() -> void; auto update() -> void override;
private: private:
void parseMeminfo(); void parseMeminfo();

View File

@ -37,7 +37,7 @@ class MPD : public ALabel {
public: public:
MPD(const std::string&, const Json::Value&); MPD(const std::string&, const Json::Value&);
virtual ~MPD() noexcept = default; virtual ~MPD() noexcept = default;
auto update() -> void; auto update() -> void override;
private: private:
std::string getTag(mpd_tag_type type, unsigned idx = 0) const; std::string getTag(mpd_tag_type type, unsigned idx = 0) const;

View File

@ -19,9 +19,9 @@ namespace waybar::modules::mpris {
class Mpris : public AModule { class Mpris : public AModule {
public: public:
Mpris(const std::string&, const Json::Value&); Mpris(const std::string&, const Json::Value&);
~Mpris(); virtual ~Mpris();
auto update() -> void; auto update() -> void override;
bool handleToggle(GdkEventButton* const&); bool handleToggle(GdkEventButton* const&) override;
private: private:
static auto onPlayerNameAppeared(PlayerctlPlayerManager*, PlayerctlPlayerName*, gpointer) -> void; static auto onPlayerNameAppeared(PlayerctlPlayerManager*, PlayerctlPlayerName*, gpointer) -> void;

View File

@ -21,8 +21,8 @@ namespace waybar::modules {
class Network : public ALabel { class Network : public ALabel {
public: public:
Network(const std::string&, const Json::Value&); Network(const std::string&, const Json::Value&);
~Network(); virtual ~Network();
auto update() -> void; auto update() -> void override;
private: private:
static const uint8_t MAX_RETRY = 5; static const uint8_t MAX_RETRY = 5;

View File

@ -14,8 +14,8 @@ namespace waybar::modules {
class Pulseaudio : public ALabel { class Pulseaudio : public ALabel {
public: public:
Pulseaudio(const std::string&, const Json::Value&); Pulseaudio(const std::string&, const Json::Value&);
~Pulseaudio(); virtual ~Pulseaudio();
auto update() -> void; auto update() -> void override;
private: private:
static void subscribeCb(pa_context*, pa_subscription_event_type_t, uint32_t, void*); static void subscribeCb(pa_context*, pa_subscription_event_type_t, uint32_t, void*);
@ -25,7 +25,7 @@ class Pulseaudio : public ALabel {
static void serverInfoCb(pa_context*, const pa_server_info*, void*); static void serverInfoCb(pa_context*, const pa_server_info*, void*);
static void volumeModifyCb(pa_context*, int, void*); static void volumeModifyCb(pa_context*, int, void*);
bool handleScroll(GdkEventScroll* e); bool handleScroll(GdkEventScroll* e) override;
const std::vector<std::string> getPulseIcon() const; const std::vector<std::string> getPulseIcon() const;
pa_threaded_mainloop* mainloop_; pa_threaded_mainloop* mainloop_;

View File

@ -11,7 +11,7 @@ namespace waybar::modules::river {
class Layout : public waybar::ALabel { class Layout : public waybar::ALabel {
public: public:
Layout(const std::string &, const waybar::Bar &, const Json::Value &); Layout(const std::string &, const waybar::Bar &, const Json::Value &);
~Layout(); virtual ~Layout();
// Handlers for wayland events // Handlers for wayland events
void handle_name(const char *name); void handle_name(const char *name);

View File

@ -11,7 +11,7 @@ namespace waybar::modules::river {
class Mode : public waybar::ALabel { class Mode : public waybar::ALabel {
public: public:
Mode(const std::string &, const waybar::Bar &, const Json::Value &); Mode(const std::string &, const waybar::Bar &, const Json::Value &);
~Mode(); virtual ~Mode();
// Handlers for wayland events // Handlers for wayland events
void handle_mode(const char *mode); void handle_mode(const char *mode);

View File

@ -14,7 +14,7 @@ namespace waybar::modules::river {
class Tags : public waybar::AModule { class Tags : public waybar::AModule {
public: public:
Tags(const std::string &, const waybar::Bar &, const Json::Value &); Tags(const std::string &, const waybar::Bar &, const Json::Value &);
~Tags(); virtual ~Tags();
// Handlers for wayland events // Handlers for wayland events
void handle_focused_tags(uint32_t tags); void handle_focused_tags(uint32_t tags);

View File

@ -13,7 +13,7 @@ namespace waybar::modules::river {
class Window : public waybar::ALabel { class Window : public waybar::ALabel {
public: public:
Window(const std::string &, const waybar::Bar &, const Json::Value &); Window(const std::string &, const waybar::Bar &, const Json::Value &);
~Window(); virtual ~Window();
// Handlers for wayland events // Handlers for wayland events
void handle_focused_view(const char *title); void handle_focused_view(const char *title);

View File

@ -10,8 +10,8 @@ namespace waybar::modules {
class Clock : public ALabel { class Clock : public ALabel {
public: public:
Clock(const std::string&, const Json::Value&); Clock(const std::string&, const Json::Value&);
~Clock() = default; virtual ~Clock() = default;
auto update() -> void; auto update() -> void override;
private: private:
util::SleeperThread thread_; util::SleeperThread thread_;

View File

@ -12,12 +12,12 @@ namespace waybar::modules {
class Sndio : public ALabel { class Sndio : public ALabel {
public: public:
Sndio(const std::string &, const Json::Value &); Sndio(const std::string &, const Json::Value &);
~Sndio(); virtual ~Sndio();
auto update() -> void; auto update() -> void override;
auto set_desc(struct sioctl_desc *, unsigned int) -> void; auto set_desc(struct sioctl_desc *, unsigned int) -> void;
auto put_val(unsigned int, unsigned int) -> void; auto put_val(unsigned int, unsigned int) -> void;
bool handleScroll(GdkEventScroll *); bool handleScroll(GdkEventScroll *) override;
bool handleToggle(GdkEventButton *const &); bool handleToggle(GdkEventButton *const &) override;
private: private:
auto connect_to_sndio() -> void; auto connect_to_sndio() -> void;

View File

@ -13,8 +13,8 @@ namespace waybar::modules::SNI {
class Tray : public AModule { class Tray : public AModule {
public: public:
Tray(const std::string&, const Bar&, const Json::Value&); Tray(const std::string&, const Bar&, const Json::Value&);
~Tray() = default; virtual ~Tray() = default;
auto update() -> void; auto update() -> void override;
private: private:
void onAdd(std::unique_ptr<Item>& item); void onAdd(std::unique_ptr<Item>& item);

View File

@ -17,8 +17,8 @@ namespace waybar::modules::sway {
class Language : public ALabel, public sigc::trackable { class Language : public ALabel, public sigc::trackable {
public: public:
Language(const std::string& id, const Json::Value& config); Language(const std::string& id, const Json::Value& config);
~Language() = default; virtual ~Language() = default;
auto update() -> void; auto update() -> void override;
private: private:
enum class DispayedShortFlag { None = 0, ShortName = 1, ShortDescription = 1 << 1 }; enum class DispayedShortFlag { None = 0, ShortName = 1, ShortDescription = 1 << 1 };

View File

@ -13,8 +13,8 @@ namespace waybar::modules::sway {
class Mode : public ALabel, public sigc::trackable { class Mode : public ALabel, public sigc::trackable {
public: public:
Mode(const std::string&, const Json::Value&); Mode(const std::string&, const Json::Value&);
~Mode() = default; virtual ~Mode() = default;
auto update() -> void; auto update() -> void override;
private: private:
void onEvent(const struct Ipc::ipc_response&); void onEvent(const struct Ipc::ipc_response&);

View File

@ -15,8 +15,8 @@ namespace waybar::modules::sway {
class Scratchpad : public ALabel { class Scratchpad : public ALabel {
public: public:
Scratchpad(const std::string&, const Json::Value&); Scratchpad(const std::string&, const Json::Value&);
~Scratchpad() = default; virtual ~Scratchpad() = default;
auto update() -> void; auto update() -> void override;
private: private:
auto getTree() -> void; auto getTree() -> void;

View File

@ -15,8 +15,8 @@ namespace waybar::modules::sway {
class Window : public AIconLabel, public sigc::trackable { class Window : public AIconLabel, public sigc::trackable {
public: public:
Window(const std::string&, const waybar::Bar&, const Json::Value&); Window(const std::string&, const waybar::Bar&, const Json::Value&);
~Window() = default; virtual ~Window() = default;
auto update() -> void; auto update() -> void override;
private: private:
void setClass(std::string classname, bool enable); void setClass(std::string classname, bool enable);

View File

@ -18,8 +18,8 @@ namespace waybar::modules::sway {
class Workspaces : public AModule, public sigc::trackable { class Workspaces : public AModule, public sigc::trackable {
public: public:
Workspaces(const std::string&, const waybar::Bar&, const Json::Value&); Workspaces(const std::string&, const waybar::Bar&, const Json::Value&);
~Workspaces() = default; virtual ~Workspaces() = default;
auto update() -> void; auto update() -> void override;
private: private:
static constexpr std::string_view workspace_switch_cmd_ = "workspace {} \"{}\""; static constexpr std::string_view workspace_switch_cmd_ = "workspace {} \"{}\"";
@ -37,7 +37,7 @@ class Workspaces : public AModule, public sigc::trackable {
const std::string getCycleWorkspace(std::vector<Json::Value>::iterator, bool prev) const; const std::string getCycleWorkspace(std::vector<Json::Value>::iterator, bool prev) const;
uint16_t getWorkspaceIndex(const std::string& name) const; uint16_t getWorkspaceIndex(const std::string& name) const;
std::string trimWorkspaceName(std::string); std::string trimWorkspaceName(std::string);
bool handleScroll(GdkEventScroll*); bool handleScroll(GdkEventScroll*) override;
const Bar& bar_; const Bar& bar_;
std::vector<Json::Value> workspaces_; std::vector<Json::Value> workspaces_;

View File

@ -12,8 +12,8 @@ namespace waybar::modules {
class Temperature : public ALabel { class Temperature : public ALabel {
public: public:
Temperature(const std::string&, const Json::Value&); Temperature(const std::string&, const Json::Value&);
~Temperature() = default; virtual ~Temperature() = default;
auto update() -> void; auto update() -> void override;
private: private:
float getTemperature(); float getTemperature();

View File

@ -19,8 +19,8 @@ namespace waybar::modules::upower {
class UPower : public AModule { class UPower : public AModule {
public: public:
UPower(const std::string &, const Json::Value &); UPower(const std::string &, const Json::Value &);
~UPower(); virtual ~UPower();
auto update() -> void; auto update() -> void override;
private: private:
typedef std::unordered_map<std::string, UpDevice *> Devices; typedef std::unordered_map<std::string, UpDevice *> Devices;
@ -45,7 +45,7 @@ class UPower : public AModule {
void resetDevices(); void resetDevices();
void removeDevices(); void removeDevices();
bool show_tooltip_callback(int, int, bool, const Glib::RefPtr<Gtk::Tooltip> &tooltip); bool show_tooltip_callback(int, int, bool, const Glib::RefPtr<Gtk::Tooltip> &tooltip);
bool handleToggle(GdkEventButton *const &); bool handleToggle(GdkEventButton *const &) override;
std::string timeToString(gint64 time); std::string timeToString(gint64 time);
const std::string getDeviceStatus(UpDeviceState &state); const std::string getDeviceStatus(UpDeviceState &state);

View File

@ -24,7 +24,7 @@ class UPowerTooltip : public Gtk::Window {
public: public:
UPowerTooltip(uint iconSize, uint tooltipSpacing, uint tooltipPadding); UPowerTooltip(uint iconSize, uint tooltipSpacing, uint tooltipPadding);
~UPowerTooltip(); virtual ~UPowerTooltip();
uint updateTooltip(Devices& devices); uint updateTooltip(Devices& devices);
}; };

View File

@ -11,8 +11,8 @@ namespace waybar::modules {
class User : public AIconLabel { class User : public AIconLabel {
public: public:
User(const std::string&, const Json::Value&); User(const std::string&, const Json::Value&);
~User() = default; virtual ~User() = default;
auto update() -> void; auto update() -> void override;
bool handleToggle(GdkEventButton* const& e) override; bool handleToggle(GdkEventButton* const& e) override;

View File

@ -13,8 +13,8 @@ namespace waybar::modules {
class Wireplumber : public ALabel { class Wireplumber : public ALabel {
public: public:
Wireplumber(const std::string&, const Json::Value&); Wireplumber(const std::string&, const Json::Value&);
~Wireplumber(); virtual ~Wireplumber();
auto update() -> void; auto update() -> void override;
private: private:
void loadRequiredApiModules(); void loadRequiredApiModules();