1
0
Fork 0
mirror of https://github.com/marty-oehme/scripts.git synced 2025-12-09 13:32:46 +00:00

added more scripts

This commit is contained in:
Patrizio Bekerle 2017-05-16 19:20:53 +02:00
parent 08280d1462
commit aae29180c9
No known key found for this signature in database
GPG key ID: 2E9FFD770DABE838
5 changed files with 89 additions and 1 deletions

View file

@ -0,0 +1,29 @@
import QtQml 2.0
/**
* This script creates a menu item and a button that adds a "favorite" tag to the current note
*/
QtObject {
/**
* Initializes the custom action
*/
function init() {
// create the menu entry
script.registerCustomAction("favoriteNote", "Favorite note", "fav", "bookmark-new");
}
/**
* This function is invoked when a custom action is triggered
* in the menu or via button
*
* @param identifier string the identifier defined in registerCustomAction
*/
function customActionInvoked(identifier) {
switch (identifier) {
// add a "favorite" tag to the current note
case "favoriteNote":
script.tagCurrentNote("favorite");
break;
}
}
}

7
favorite-note/info.json Normal file
View file

@ -0,0 +1,7 @@
{
"name": "Favorite note",
"identifier": "favorite-note",
"script": "favorite-note.qml",
"version": "0.1",
"description" : "This script creates a menu item and a button that adds a \"favorite\" tag to the current note."
}