Warning, /maui/nota/src/views/widgets/PluginsDialog.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.13 0002 import QtQuick.Controls 2.13 0003 import QtQuick.Layouts 1.3 0004 0005 import org.mauikit.controls 1.2 as Maui 0006 0007 Maui.SettingsDialog 0008 { 0009 id: control 0010 0011 Maui.SectionGroup 0012 { 0013 title: i18n("Default Plugins") 0014 description: i18n("Activate or remove the default plugins") 0015 0016 Layout.fillWidth: true 0017 Layout.fillHeight: true 0018 0019 Maui.SectionItem 0020 { 0021 id: _qmlScene 0022 label1.text: i18n("QML Scene") 0023 label2.text: i18n("Load the current file in a QML scene.") 0024 0025 property QtObject object : null 0026 Switch 0027 { 0028 Layout.fillHeight: true 0029 checkable: true 0030 checked: _qmlScene.object 0031 onToggled: 0032 { 0033 if(checked) 0034 { 0035 if(!_qmlScene.object) 0036 { 0037 _qmlScene.object = control.load("qrc:/plugins/ActionBar.qml") 0038 } 0039 0040 }else 0041 { 0042 _qmlScene.object.destroy() 0043 } 0044 0045 } 0046 } 0047 } 0048 0049 Maui.SectionItem 0050 { 0051 id: _todos 0052 label1.text: i18n("ToDo") 0053 label2.text: i18n("List of to-do tasks.") 0054 0055 property QtObject object : null 0056 Switch 0057 { 0058 Layout.fillHeight: true 0059 checkable: true 0060 checked: _todos.object 0061 onToggled: 0062 { 0063 if(checked) 0064 { 0065 if(!_todos.object) 0066 { 0067 _todos.object = control.load("qrc:/plugins/ToDos.qml") 0068 } 0069 0070 }else 0071 { 0072 _todos.object.destroy() 0073 } 0074 0075 } 0076 } 0077 } 0078 0079 0080 0081 Maui.SectionItem 0082 { 0083 label1.text: i18n("Builder") 0084 label2.text: i18n("Configure a project to build and run.") 0085 } 0086 0087 Maui.SectionItem 0088 { 0089 label1.text: i18n("HTML Previewer") 0090 label2.text: i18n("Preview HTML code live.") 0091 } 0092 0093 } 0094 0095 0096 Maui.SectionGroup 0097 { 0098 title: i18n("Load Plugins") 0099 description: i18n("Activate or remove the third party plugins") 0100 0101 Layout.fillWidth: true 0102 Layout.fillHeight: true 0103 0104 spacing: 0 0105 Maui.SectionItem 0106 { 0107 label1.text: i18n("Builder") 0108 label2.text: i18n("Configure a project to build and run.") 0109 } 0110 } 0111 0112 0113 function load(url ) 0114 { 0115 const component = Qt.createComponent(url); 0116 console.log("Plugin status", component.errorString()) 0117 if (component.status === Component.Ready) 0118 { 0119 console.log("setting plugin <<", url) 0120 const object = component.createObject(editorView.plugin) 0121 return object 0122 } 0123 0124 return null 0125 } 0126 }