Warning, /maui/pix/src/widgets/SettingsDialog.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.14 0002 import QtQuick.Controls 2.14 0003 import QtQml 2.14 0004 import QtQuick.Layouts 1.3 0005 0006 import org.mauikit.controls 1.3 as Maui 0007 import org.maui.pix 1.0 as Pix 0008 0009 Maui.SettingsDialog 0010 { 0011 id: control 0012 0013 Maui.SectionGroup 0014 { 0015 title: i18n("Behavior") 0016 // description: i18n("Configure the app behaviour.") 0017 0018 Maui.SectionItem 0019 { 0020 label1.text: i18n("Auto Reload") 0021 label2.text: i18n("Watch for changes in the collection sources.") 0022 0023 Switch 0024 { 0025 checkable: true 0026 checked: browserSettings.autoReload 0027 onToggled: browserSettings.autoReload = !browserSettings.autoReload 0028 } 0029 } 0030 0031 Maui.SectionItem 0032 { 0033 visible: Maui.Handy.isAndroid 0034 0035 label1.text: i18n("Dark Mode") 0036 label2.text: i18n("Switch between light and dark colorscheme.") 0037 0038 Switch 0039 { 0040 checked: browserSettings.darkMode 0041 onToggled: 0042 { 0043 browserSettings.darkMode = !browserSettings.darkMode 0044 setAndroidStatusBarColor() 0045 } 0046 } 0047 } 0048 } 0049 0050 Maui.SectionGroup 0051 { 0052 title: i18n("Collection") 0053 // description: i18n("Configure the app plugins and look & feel.") 0054 0055 Maui.SectionItem 0056 { 0057 label1.text: i18n("Fit") 0058 label2.text: i18n("Fit the previews and preserve the aspect ratio.") 0059 0060 Switch 0061 { 0062 checkable: true 0063 checked: browserSettings.fitPreviews 0064 onToggled: browserSettings.fitPreviews = !browserSettings.fitPreviews 0065 } 0066 } 0067 0068 Maui.SectionItem 0069 { 0070 label1.text: i18n("Image Titles") 0071 label2.text: i18n("Show the file name of the images.") 0072 0073 Switch 0074 { 0075 checkable: true 0076 checked: browserSettings.showLabels 0077 onToggled: browserSettings.showLabels = !browserSettings.showLabels 0078 } 0079 } 0080 0081 Maui.SectionItem 0082 { 0083 label1.text: i18n("Preview Size") 0084 label2.text: i18n("Size of the thumbnails in the collection views.") 0085 0086 Maui.ToolActions 0087 { 0088 id: _gridIconSizesGroup 0089 expanded: true 0090 autoExclusive: true 0091 display: ToolButton.TextOnly 0092 0093 Action 0094 { 0095 text: i18n("S") 0096 onTriggered: setPreviewSize(previewSizes.small) 0097 checked: previewSizes.small === browserSettings.previewSize 0098 } 0099 0100 Action 0101 { 0102 text: i18n("M") 0103 onTriggered: setPreviewSize(previewSizes.medium) 0104 checked: previewSizes.medium === browserSettings.previewSize 0105 0106 } 0107 0108 Action 0109 { 0110 text: i18n("X") 0111 onTriggered: setPreviewSize(previewSizes.large) 0112 checked: previewSizes.large === browserSettings.previewSize 0113 0114 } 0115 0116 Action 0117 { 0118 text: i18n("XL") 0119 onTriggered: setPreviewSize(previewSizes.extralarge) 0120 checked: previewSizes.extralarge === browserSettings.previewSize 0121 0122 } 0123 } 0124 } 0125 0126 Maui.SectionItem 0127 { 0128 label1.text: i18n("Sort by") 0129 label2.text: i18n("Change the sorting key.") 0130 0131 Maui.ToolActions 0132 { 0133 expanded: true 0134 autoExclusive: true 0135 display: ToolButton.TextOnly 0136 0137 Action 0138 { 0139 text: i18n("Title") 0140 onTriggered: browserSettings.sortBy = "title" 0141 checked: browserSettings.sortBy === "title" 0142 } 0143 0144 Action 0145 { 0146 text: i18n("Modified") 0147 onTriggered: browserSettings.sortBy = "modified" 0148 checked: browserSettings.sortBy === "modified" 0149 0150 } 0151 0152 Action 0153 { 0154 text: i18n("Size") 0155 onTriggered: browserSettings.sortBy = "size" 0156 checked: browserSettings.sortBy === "size" 0157 0158 } 0159 0160 Action 0161 { 0162 text: i18n("Date") 0163 onTriggered: browserSettings.sortBy = "date" 0164 checked: browserSettings.sortBy === "date" 0165 0166 } 0167 } 0168 } 0169 0170 Maui.SectionItem 0171 { 0172 label1.text: i18n("Sort Order") 0173 label2.text: i18n("Change the sorting order.") 0174 0175 Maui.ToolActions 0176 { 0177 expanded: true 0178 autoExclusive: true 0179 display: ToolButton.IconOnly 0180 0181 0182 Action 0183 { 0184 text: i18n("Ascending") 0185 icon.name: "view-sort-ascending" 0186 onTriggered: browserSettings.sortOrder = Qt.AscendingOrder 0187 checked: browserSettings.sortOrder === Qt.AscendingOrder 0188 } 0189 0190 Action 0191 { 0192 text: i18n("Descending") 0193 icon.name: "view-sort-descending" 0194 onTriggered: browserSettings.sortOrder = Qt.DescendingOrder 0195 checked: browserSettings.sortOrder === Qt.DescendingOrder 0196 } 0197 } 0198 } 0199 0200 0201 Maui.SectionItem 0202 { 0203 label1.text: i18n("GPS Tags") 0204 label2.text: i18n("Show GPS tags.") 0205 0206 Switch 0207 { 0208 checkable: true 0209 checked: browserSettings.gpsTags 0210 onToggled: browserSettings.gpsTags = !browserSettings.gpsTags 0211 } 0212 0213 Maui.Chip 0214 { 0215 text: i18n("Experimental feature.") 0216 0217 } 0218 } 0219 } 0220 0221 Maui.SectionGroup 0222 { 0223 title: i18n("Viewer") 0224 // description: i18n("Adjust the viewer panels and settings.") 0225 0226 Maui.SectionItem 0227 { 0228 label1.text: i18n("Tag Bar") 0229 label2.text: i18n("Easy way to add, remove and modify the tags of the current image.") 0230 0231 Switch 0232 { 0233 checkable: true 0234 checked: viewerSettings.tagBarVisible 0235 onToggled: toogleTagbar() 0236 } 0237 } 0238 0239 Maui.SectionItem 0240 { 0241 label1.text: i18n("Preview Bar") 0242 // label2.text: i18n("Show small thumbnail previews in the image viewer.") 0243 Switch 0244 { 0245 checkable: true 0246 checked: viewerSettings.previewBarVisible 0247 onToggled: tooglePreviewBar() 0248 } 0249 } 0250 } 0251 0252 Maui.SectionGroup 0253 { 0254 title: i18n("Sources") 0255 // description: i18n("Add new sources to manage and browse your image collection.") 0256 0257 ColumnLayout 0258 { 0259 Layout.fillWidth: true 0260 spacing: Maui.Style.space.medium 0261 0262 Repeater 0263 { 0264 id: _sourcesList 0265 0266 model: Pix.Collection.sourcesModel 0267 0268 0269 delegate: Maui.ListDelegate 0270 { 0271 Layout.fillWidth: true 0272 0273 template.iconSource: modelData.icon 0274 template.iconSizeHint: Maui.Style.iconSizes.small 0275 template.label1.text: modelData.label 0276 template.label2.text: modelData.path 0277 0278 template.content: ToolButton 0279 { 0280 icon.name: "edit-clear" 0281 flat: true 0282 onClicked: 0283 { 0284 Pix.Collection.removeSources(modelData.path) 0285 } 0286 } 0287 } 0288 } 0289 0290 Button 0291 { 0292 Layout.fillWidth: true 0293 text: i18n("Add") 0294 onClicked: 0295 { 0296 dialogLoader.sourceComponent= fmDialogComponent 0297 dialog.callback = function(urls) 0298 { 0299 Pix.Collection.addSources(urls) 0300 } 0301 0302 dialog.open() 0303 } 0304 } 0305 } 0306 } 0307 }