From 21298b131e0d11b1a8171334003220ba2a606b99 Mon Sep 17 00:00:00 2001 From: Juraj Oravec Date: Wed, 22 May 2019 17:07:24 +0200 Subject: [PATCH] Add 1. Introduction Signed-off-by: Juraj Oravec --- articles/1. Introduction.md | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 articles/1. Introduction.md diff --git a/articles/1. Introduction.md b/articles/1. Introduction.md new file mode 100644 index 0000000..266e351 --- /dev/null +++ b/articles/1. Introduction.md @@ -0,0 +1,44 @@ +# Falkon Python Tutorial - 1. Introduction + +Hello, in this series I would like to introduce and describe how to write extensions for [Falkon](https://www.falkon.org/) web browser with python. + +Starting with Falkon 3.2 there is support for installing extensions from store which can be found at [store.falkon.org](https://store.falkon.org/) + +Falkon supports extensions written in C++, Python and Qml. +This series will go over the Python implementation. + +## Requirements +1. Knowledge of C++ +Sadly, Falkon lacks documentation at this point in time, so only way to get some information is to browse through the source code. +In this series there will be provided links to Falkon mirror on [GitHub](https://github.com/KDE/falkon) to compensate for documentation. +2. The Falkon source code + * The source code for stable release of Falkon can be found at [download.kde.org/stable/falkon/](https://download.kde.org/stable/falkon/) + * The latest source code can be found at the [Phabricator](https://phabricator.kde.org/source/falkon/) +3. Knowledge of Python3, PySide2 and Qt +It is good to have Qt documentation and Qt development tools like [Qt Designer](https://doc.qt.io/qt-5/qtdesigner-manual.html) at hand. + +## Falkon module +To access Falkon specific features and functions inside the python script you need to use `Falkon` module. + +```python +import Falkon +``` + +The following part can be considered as cheat sheet. +This section will be enhanced over the time. + +### Getting Main Application instance +In C++ known as `mApp` macro. +In python we have to go the long way. + +```python +Falkon.MainApplication.instance() +``` + +### Getting static settings data +In C++ known as `qzSettings` macro +In python we have to go the long way. + +```python +Falkon.Settings.staticSettings() +```