summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/rsettings.hpp32
-rw-r--r--include/rview.hpp36
2 files changed, 68 insertions, 0 deletions
diff --git a/include/rsettings.hpp b/include/rsettings.hpp
new file mode 100644
index 00000000..2d90fe3b
--- /dev/null
+++ b/include/rsettings.hpp
@@ -0,0 +1,32 @@
+/* ============================================================
+ * The rekonq project
+ * ============================================================
+ * SPDX-License-Identifier: GPL-3.0-only
+ * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
+ * ============================================================
+ * Description: rekonq settings interface
+ * ============================================================ */
+
+#pragma once
+
+#include <QObject>
+#include <QVariant>
+
+class RekonqSettings : public QObject {
+ Q_OBJECT
+
+public:
+ explicit RekonqSettings(QObject *parent = nullptr) : QObject(parent) {}
+ virtual ~RekonqSettings() = default;
+
+ virtual void beginGroup(const QString &prefix) = 0;
+ virtual void endGroup() = 0;
+
+ virtual void setValue(const QString &key, const QVariant &value) = 0;
+ [[nodiscard]] virtual QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const = 0;
+
+ [[nodiscard]] virtual QString filePath() const = 0;
+
+signals:
+ void changed(QString, QVariant);
+};
diff --git a/include/rview.hpp b/include/rview.hpp
new file mode 100644
index 00000000..46cba67c
--- /dev/null
+++ b/include/rview.hpp
@@ -0,0 +1,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 &);
+};