mirror of
https://github.com/pbek/QOwnNotes.git
synced 2025-06-29 05:19:55 +00:00
added more doc
This commit is contained in:
parent
0d0d058eca
commit
46b8d38944
3 changed files with 49 additions and 13 deletions
43
doc/scripting/README.md
Normal file
43
doc/scripting/README.md
Normal 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();
|
||||
```
|
|
@ -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);
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue