1

Add 1. Introduction

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2019-05-22 17:07:24 +02:00
commit 21298b131e
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07

View File

@ -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()
```