aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/EdgeDecoration.hpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/widgets/EdgeDecoration.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/widgets/EdgeDecoration.hpp b/src/widgets/EdgeDecoration.hpp
index 3ee0ab5..f627636 100644
--- a/src/widgets/EdgeDecoration.hpp
+++ b/src/widgets/EdgeDecoration.hpp
@@ -9,6 +9,7 @@
#include "utils.hpp"
#include "widgets/WebView.hpp"
+#include "widgets/WebViewStack.hpp"
class EdgeDecoration : public QWidget {
Q_OBJECT
@@ -19,9 +20,18 @@ public:
void set_size(uint16_t size_value);
void set_html(const QString &content);
void set_enabled(bool enabled_value);
+ void set_url(const QUrl &url) {
+ if (!webview.has_value())
+ return;
+ webview.value()->setUrl(url);
+ }
DEFINE_GETTER(is_enabled, enabled)
+ std::optional<WebViewId> get_view_id() {
+ return webview.has_value() ? std::make_optional(webview.value()->get_id()) : std::nullopt;
+ }
+
private:
bool vertical;
std::optional<WebView *> webview = std::nullopt;