aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/Decorations.hpp
blob: d58ee7f567a5e4dc4513324b2e7722e69b52d328 (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
31
#pragma once

#include "widgets/EdgeDecoration.hpp"
#include <QWidget>
#include <QtCore>
#include <optional>
#include <qwebengineprofile.h>

enum DecorationType : uint8_t {
  DecorationTop = 1,
  DecorationBottom = 2,
  DecorationLeft = 3,
  DecorationRight = 4,
};

class Decorations : public QWidget {
  Q_OBJECT

public:
  Decorations(QWidget *content_widget, QWebEngineProfile *profile, QWidget *parent = nullptr);

  void set_enabled(DecorationType type, bool enabled);

private:
  EdgeDecoration *decoration_top;
  EdgeDecoration *decoration_bottom;
  EdgeDecoration *decoration_left;
  EdgeDecoration *decoration_right;

  std::optional<EdgeDecoration *> get_decoration_widget(DecorationType type);
};