aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/EdgeDecoration.hpp
blob: c83227a8835bb831a69c4873766ea38a95f8dc20 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once

#include <QWidget>
#include <QtCore>
#include <cstdint>
#include <qwebengineprofile.h>
#include <qwebengineview.h>

#include "widgets/WebView.hpp"

class EdgeDecoration : public QWidget {
  Q_OBJECT

public:
  EdgeDecoration(bool vertical, QWebEngineProfile *profile, QWidget *parent = nullptr);

  void set_size(uint16_t size_value);
  void set_html(const QString &content);
  void set_enabled(bool enabled_value);

private:
  bool vertical;
  WebView *webview = nullptr;
  QWebEngineProfile *profile;
  bool enabled;
  QString html_content;
  uint16_t size = 24;

  void setup_webview();
};