Warning, /maui/mauikit/demo.6/src/controls/PopupsPage.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 0002 import QtQuick.Controls 0003 import QtQuick.Layouts 0004 0005 import org.mauikit.controls as Maui 0006 0007 DemoPage 0008 { 0009 id: control 0010 title: i18n("Popups") 0011 0012 Maui.SectionGroup 0013 { 0014 title: control.title 0015 spacing: control.spacing 0016 0017 DemoSection 0018 { 0019 title: i18n("Popup") 0020 0021 Popup 0022 { 0023 id: _popup1 0024 } 0025 0026 Popup 0027 { 0028 id: _popup2 0029 filling: true 0030 0031 Button 0032 { 0033 anchors.centerIn: parent 0034 text: i18n("Close") 0035 onClicked: _popup2.close() 0036 } 0037 } 0038 0039 Button 0040 { 0041 text: i18n("Normal") 0042 onClicked: _popup1.open() 0043 } 0044 0045 0046 Button 0047 { 0048 text: i18n("Filled") 0049 onClicked: _popup2.open() 0050 } 0051 } 0052 0053 DemoSection 0054 { 0055 title: i18n("PopupPage") 0056 0057 Maui.PopupPage 0058 { 0059 id: _popupPage 0060 hint: 1 0061 0062 title: i18n("Title") 0063 0064 Rectangle 0065 { 0066 Layout.fillWidth: true 0067 implicitHeight: 40 0068 color: "magenta" 0069 } 0070 0071 Rectangle 0072 { 0073 Layout.fillWidth: true 0074 implicitHeight: 40 0075 color: "magenta" 0076 } 0077 0078 Rectangle 0079 { 0080 Layout.fillWidth: true 0081 implicitHeight: 40 0082 color: "magenta" 0083 } 0084 0085 Rectangle 0086 { 0087 Layout.fillWidth: true 0088 implicitHeight: 40 0089 color: "magenta" 0090 } 0091 } 0092 0093 Button 0094 { 0095 text: i18n("Open") 0096 onClicked: _popupPage.open() 0097 } 0098 0099 } 0100 0101 DemoSection 0102 { 0103 title: i18n("Dialog") 0104 0105 Dialog 0106 { 0107 id: _dialog 0108 width: 300 0109 height: 300 0110 0111 standardButtons: Dialog.Ok | Dialog.Close 0112 } 0113 0114 0115 Button 0116 { 0117 text: i18n("Open") 0118 onClicked: _dialog.open() 0119 } 0120 } 0121 0122 DemoSection 0123 { 0124 title: i18n("InfoDialog") 0125 0126 Maui.InfoDialog 0127 { 0128 id: _infoDialog 0129 0130 title: "Title" 0131 message: i18n("Info message about some important information fo the end user to act upon.") 0132 template.iconSource: "dialog-info" 0133 standardButtons: Dialog.Ok | Dialog.Close 0134 } 0135 0136 0137 Button 0138 { 0139 text: i18n("Open") 0140 onClicked: _infoDialog.open() 0141 } 0142 } 0143 0144 DemoSection 0145 { 0146 title: i18n("InputDialog") 0147 0148 Maui.InputDialog 0149 { 0150 id: _inputDialog 0151 0152 title: "Title" 0153 message: i18n("Info message about some important information fo the end user to act upon.") 0154 template.iconSource: "dialog-info" 0155 standardButtons: Dialog.Ok | Dialog.Close 0156 0157 Rectangle 0158 { 0159 Layout.fillWidth: true 0160 implicitHeight: 100 0161 color: "blue" 0162 } 0163 0164 } 0165 0166 0167 Button 0168 { 0169 text: i18n("Open") 0170 onClicked: _inputDialog.open() 0171 } 0172 } 0173 0174 DemoSection 0175 { 0176 title: i18n("ContextualMenu") 0177 0178 Maui.ContextualMenu 0179 { 0180 id: _menu 0181 0182 title: "Title" 0183 0184 Maui.MenuItemActionRow 0185 { 0186 Action 0187 { 0188 icon.name: "love" 0189 } 0190 0191 Action 0192 { 0193 icon.name: "list-add" 0194 } 0195 0196 Action 0197 { 0198 icon.name: "view-list-icons" 0199 } 0200 } 0201 0202 MenuItem 0203 { 0204 text: i18n("Menu 1") 0205 } 0206 0207 MenuItem 0208 { 0209 text: i18n("Menu 2") 0210 } 0211 0212 MenuItem 0213 { 0214 text: i18n("Menu 3") 0215 } 0216 } 0217 0218 0219 Button 0220 { 0221 text: i18n("Open Menu") 0222 onClicked: _menu.show() 0223 } 0224 } 0225 0226 DemoSection 0227 { 0228 title: i18n("SettingsDialog") 0229 0230 Maui.SettingsDialog 0231 { 0232 id: _settings 0233 0234 0235 Component 0236 { 0237 id: _samplePage2 0238 0239 Maui.SettingsPage 0240 { 0241 title: "Subpage" 0242 0243 Maui.SectionGroup 0244 { 0245 title: i18n("Menu 3") 0246 0247 Maui.SectionItem 0248 { 0249 label1.text: "Sample title" 0250 label2.text: "Description" 0251 0252 Switch{} 0253 } 0254 0255 Maui.SectionItem 0256 { 0257 label1.text: "Sample title" 0258 label2.text: "Description" 0259 0260 Switch{} 0261 } 0262 0263 Maui.SectionItem 0264 { 0265 label1.text: "Sample title" 0266 label2.text: "Description" 0267 0268 Switch{} 0269 } 0270 } 0271 } 0272 } 0273 0274 Maui.SectionGroup 0275 { 0276 title: i18n("Menu 1") 0277 0278 Maui.SectionItem 0279 { 0280 label1.text: "Sample title" 0281 label2.text: "Description" 0282 0283 Switch{} 0284 } 0285 0286 Maui.SectionItem 0287 { 0288 label1.text: "Sample title" 0289 label2.text: "Description" 0290 0291 Switch{} 0292 } 0293 0294 Maui.SectionItem 0295 { 0296 label1.text: "Sample title" 0297 label2.text: "Description" 0298 0299 Switch{} 0300 } 0301 } 0302 0303 Maui.SectionGroup 0304 { 0305 title: i18n("Menu 2") 0306 0307 Maui.SectionItem 0308 { 0309 label1.text: "Sample title" 0310 label2.text: "Description" 0311 0312 ToolButton 0313 { 0314 checkable: true 0315 onToggled: _settings.addPage(_samplePage2) 0316 icon.name: "go-next" 0317 } 0318 } 0319 0320 Maui.SectionItem 0321 { 0322 label1.text: "Sample title" 0323 label2.text: "Description" 0324 0325 Button{text: "Test"} 0326 } 0327 0328 Maui.SectionItem 0329 { 0330 label1.text: "Sample title" 0331 label2.text: "Description" 0332 0333 TextField 0334 { 0335 Layout.fillWidth: true 0336 } 0337 } 0338 } 0339 } 0340 0341 0342 Button 0343 { 0344 text: i18n("Open Dialog") 0345 onClicked: _settings.open() 0346 } 0347 } 0348 0349 0350 } 0351 }