@@ -9,8 +9,8 @@ import localdocs
9
9
Item {
10
10
id: root
11
11
12
- property string collection: " "
13
- property string folder_path: " "
12
+ property alias collection: collection . text
13
+ property alias folder_path: folderEdit . text
14
14
15
15
property int defaultChunkSize: 256
16
16
property int defaultRetrievalSize: 3
@@ -60,24 +60,19 @@ Item {
60
60
placeholderTextColor: theme .mutedTextColor
61
61
ToolTip .text : qsTr (" Name of the collection to add (Required)" )
62
62
ToolTip .visible : hovered
63
- onEditingFinished: {
64
- root .collection = text
65
- }
66
63
Accessible .role : Accessible .EditableText
67
64
Accessible .name : collection .text
68
65
Accessible .description : ToolTip .text
69
66
}
70
67
71
- MyTextField {
72
- id: folderLabel
68
+ MyDirectoryField {
69
+ id: folderEdit
73
70
anchors .left : collection .right
74
71
anchors .leftMargin : 10
75
72
anchors .right : browseButton .left
76
73
anchors .rightMargin : 10
77
74
anchors .verticalCenter : parent .verticalCenter
78
75
text: root .folder_path
79
- readOnly: true
80
- color: theme .textColor
81
76
placeholderText: qsTr (" Folder path..." )
82
77
placeholderTextColor: theme .mutedTextColor
83
78
ToolTip .text : qsTr (" Folder path to documents (Required)" )
@@ -100,7 +95,7 @@ Item {
100
95
text: qsTr (" Add" )
101
96
anchors .right : parent .right
102
97
anchors .verticalCenter : parent .verticalCenter
103
- enabled: root .collection !== " " && root .folder_path != " "
98
+ enabled: root .collection !== " " && root .folder_path !== " " && folderEdit . isValid
104
99
Accessible .role : Accessible .Button
105
100
Accessible .name : text
106
101
Accessible .description : qsTr (" Add button" )
0 commit comments