From 15faa626f7df7a3024dda5d11001347ed4573568 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 9 May 2019 20:52:43 +0200 Subject: Add tooltip buttons to frames. --- plugingui/frame.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugingui/frame.h') diff --git a/plugingui/frame.h b/plugingui/frame.h index e29bd3d..db26ea9 100644 --- a/plugingui/frame.h +++ b/plugingui/frame.h @@ -30,6 +30,7 @@ #include "font.h" #include "powerbutton.h" +#include "helpbutton.h" #include "widget.h" namespace GUI @@ -39,7 +40,7 @@ class FrameWidget : public Widget { public: - FrameWidget(Widget* parent, bool has_switch = false); + FrameWidget(Widget* parent, bool has_switch = false, bool has_help_text = false); virtual ~FrameWidget() = default; // From Widget: @@ -48,7 +49,8 @@ public: bool isSwitchedOn() { return is_switched_on; } - void setTitle(std::string const& title); + void setTitle(const std::string& title); + void setHelpText(const std::string& help_text); void setContent(Widget* content); void setOnSwitch(bool on); @@ -81,6 +83,7 @@ private: // switch bool is_switched_on; PowerButton power_button{this}; + HelpButton help_button{this}; void powerButtonStateChanged(bool clicked); -- cgit v1.2.3