41 lines
963 B
QML
41 lines
963 B
QML
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 {
|
|
name: 'QML Tutorial 5'
|
|
identity: 'qml-tutorial-5-id'
|
|
title: i18n('Qml Tutorial 5')
|
|
toolTip: i18n('My little button')
|
|
icon: 'falkon'
|
|
location: Falkon.BrowserAction.NavigationToolBar | Falkon.BrowserAction.StatusBar
|
|
onClicked: buttonClicked()
|
|
popup: Rectangle {
|
|
width: 100;
|
|
height: 100;
|
|
}
|
|
}
|
|
|
|
}
|