Warning, /maui/mauikit-filebrowsing/src/controls.5/NewTagDialog.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.14 0002 import QtQuick.Layouts 1.12 0003 import QtQuick.Controls 2.14 0004 0005 import org.mauikit.controls 1.3 as Maui 0006 import org.mauikit.filebrowsing 1.3 as FB 0007 0008 /** 0009 * NewTagDialog 0010 * A global sidebar for the application window that can be collapsed. 0011 * 0012 * 0013 * 0014 * 0015 * 0016 * 0017 */ 0018 Maui.InputDialog 0019 { 0020 id: control 0021 0022 property alias currentColor : _colorsRow.currentColor 0023 readonly property var defaultColors : ["#4DD0E1", "#9575CD", "#F06292", "#DCE775", "#FFD54F", "#FF8A65", "#90A4AE"] 0024 0025 title: i18nd("mauikitfilebrowsing", "New tags") 0026 message: i18nd("mauikitfilebrowsing", "Create new tags to organize your files. You can create multiple tags separated by a comma.") 0027 0028 onFinished: 0029 { 0030 for(var tag of text.split(",")) 0031 { 0032 FB.Tagging.tag(tag, control.currentColor, "") 0033 } 0034 } 0035 0036 textEntry.placeholderText: i18n("New tags") 0037 0038 Maui.ColorsRow 0039 { 0040 id: _colorsRow 0041 Layout.fillWidth: true 0042 0043 colors: control.defaultColors 0044 onColorPicked: currentColor = color 0045 } 0046 0047 Flow 0048 { 0049 Layout.fillWidth: true 0050 0051 visible: control.textEntry.text.length 0052 spacing: Maui.Style.defaultSpacing 0053 0054 Repeater 0055 { 0056 model: textEntry.text.split(",") 0057 0058 delegate: Maui.Chip 0059 { 0060 label.text: modelData 0061 showCloseButton: false 0062 color: control.currentColor 0063 iconSource: "tag" 0064 } 0065 } 0066 } 0067 0068 onClosed: 0069 { 0070 control.currentColor = "" 0071 } 0072 }