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