2022-03-29 01:37:11 +02:00
|
|
|
import org.kde.falkon 1.0 as Falkon
|
|
|
|
import QtQuick 2.3
|
|
|
|
|
|
|
|
Falkon.PluginInterface {
|
|
|
|
|
|
|
|
init: function(state, settingsPath){
|
|
|
|
console.log(i18n('"Tutorial5" plugin loaded'))
|
|
|
|
}
|
|
|
|
|
|
|
|
testPlugin: function() {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
unload: function() {
|
|
|
|
console.log(i18n('"Tutorial5" plugin unloaded'))
|
|
|
|
}
|
|
|
|
|
|
|
|
function buttonClicked() {
|
|
|
|
Falkon.Notifications.create({
|
|
|
|
heading: i18n('QML Tutorial 5'),
|
|
|
|
message: i18n('Some message text body.'),
|
|
|
|
icon: 'falkon'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
Falkon.BrowserAction {
|
2022-03-29 09:13:17 +02:00
|
|
|
name: 'QML Tutorial 5'
|
|
|
|
identity: 'qml-tutorial-5-id'
|
|
|
|
title: i18n('Qml Tutorial 5')
|
2022-03-29 01:37:11 +02:00
|
|
|
toolTip: i18n('My little button')
|
|
|
|
icon: 'falkon'
|
|
|
|
location: Falkon.BrowserAction.NavigationToolBar | Falkon.BrowserAction.StatusBar
|
|
|
|
onClicked: buttonClicked()
|
|
|
|
popup: Rectangle {
|
|
|
|
width: 100;
|
|
|
|
height: 100;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|