summaryrefslogtreecommitdiff
path: root/include/rview.hpp
blob: 46cba67ce0769eac007cdbc359054df5195bf2e7 (plain)
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
32
33
34
35
36
/* ============================================================
 *     The rekonq project
 * ============================================================
 * SPDX-License-Identifier: GPL-3.0-only
 * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
 * ============================================================
 * Description: rekonq View interface
 * ============================================================ */

#pragma once

#include <QUrl>
#include <QWidget>

class RekonqView : public QWidget {
  Q_OBJECT

public:
  explicit RekonqView(const QUrl & = QUrl(), QWidget *parent = nullptr) : QWidget(parent) {}

  virtual void load(const QUrl &url) = 0;
  [[nodiscard]] virtual int progress() const = 0;

  [[nodiscard]] virtual QIcon icon() const = 0;
  [[nodiscard]] virtual QString title() const = 0;
  [[nodiscard]] virtual QUrl url() const = 0;

signals:
  void loadStarted();
  void loadProgress(int);
  void loadFinished();

  void iconChanged(const QIcon &);
  void titleChanged(const QString &);
  void urlChanged(const QUrl &);
};