added more doc

This commit is contained in:
Patrizio Bekerle 2016-05-12 12:13:22 +02:00
parent 0d0d058eca
commit 46b8d38944
3 changed files with 49 additions and 13 deletions

43
doc/scripting/README.md Normal file
View file

@ -0,0 +1,43 @@
# QOwnNotes Scripting
## Methods and objects QOwnNotes provides
### Starting an external program in the background
#### Parameters
```cpp
/**
* QML wrapper to start a detached process
*
* @param executablePath the path of the executable
* @param parameters a list of parameter strings
* @return true on success, false otherwise
*/
bool startDetachedProcess(QString executablePath, QStringList parameters);
```
#### Usage in QML
```javascript
script.startDetachedProcess("/path/to/my/program", ["my parameter"]);
```
### Getting the path of the current note folder
#### Parameters
```cpp
/**
* QML wrapper to get the current note folder path
*
* @return the path of the current note folder
*/
QString currentNoteFolderPath();
```
#### Usage in QML
```javascript
var path = script.currentNoteFolderPath();
```

View file

@ -1,13 +0,0 @@
# QOwnNotes Scripting
## Methods and objects QOwnNotes provides
### Starting an external program in the background
```javascript
script.startDetachedProcess("/path/to/my/program", [fileName]);
```
```cpp
bool startDetachedProcess(QString executablePath, QStringList parameters);
```