1
FalkonTutorials/qml/extensions/qml_tutorial_7/main.qml

44 lines
1.1 KiB
QML
Raw Normal View History

import org.kde.falkon 1.0 as Falkon
import QtQuick.Controls 2.3
import QtQuick 2.3
Falkon.PluginInterface {
init: function(state, settingsPath) {
console.log(i18n('"Tutorial7" plugin loaded'))
}
testPlugin: function() {
return true
}
unload: function() {
console.log(i18n('"Tutorial7" plugin unloaded'))
}
/* Taken from "Hello Qml" example */
Falkon.SideBar {
name: 'qml-tutorial7-sidebar'
title: i18n('Tutorial 7 - QML SideBar')
icon: 'falkon'
checkable: true
shortcut: 'Ctrl+Shift+Alt+S'
Rectangle {
Image {
source: 'qrc:/icons/other/startpage.svg'
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.right: parent.right
}
Button {
text: i18n('Hello Qml Plugin')
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
}
}
}
}