From f9748f8cce6ed5dc202c0d3cda76dc640f38b305 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 13 Sep 2011 14:38:26 +0200 Subject: Remove uilib and QtUiTools from QtBase The code gets moved into the qttools repository, where it belongs naturally. Change-Id: Ia50bfe212ead3365d5c3bcb24d2c5e92e2e9de8e --- .gitignore | 2 - examples/examples.pro | 2 - .../uitools/multipleinheritance/calculatorform.cpp | 65 - .../uitools/multipleinheritance/calculatorform.h | 62 - .../uitools/multipleinheritance/calculatorform.ui | 303 - examples/uitools/multipleinheritance/main.cpp | 56 - .../multipleinheritance.desktop | 11 - .../multipleinheritance/multipleinheritance.pro | 19 - examples/uitools/textfinder/forms/input.txt | 9 - examples/uitools/textfinder/forms/textfinder.ui | 89 - examples/uitools/textfinder/main.cpp | 55 - examples/uitools/textfinder/textfinder.cpp | 155 - examples/uitools/textfinder/textfinder.desktop | 11 - examples/uitools/textfinder/textfinder.h | 74 - examples/uitools/textfinder/textfinder.pro | 17 - examples/uitools/textfinder/textfinder.qrc | 6 - examples/uitools/uitools.pro | 14 - src/modules/qt_uilib.pri | 13 - src/modules/qt_uitools.pri | 17 - src/src.pro | 5 +- src/tools/uic/qclass_lib_map.h | 1 - src/uitools/quiloader.cpp | 954 --- src/uitools/quiloader.h | 105 - src/uitools/quiloader_p.h | 109 - src/uitools/uitools.pro | 59 - sync.profile | 6 - tests/auto/compilerwarnings/data/test_cpp.txt | 2 - tests/auto/other/headersclean/headersclean.pro | 1 - tests/auto/other/headersclean/tst_headersclean.cpp | 4 +- tests/auto/uiloader/.gitignore | 1 - tests/auto/uiloader/README.TXT | 93 - tests/auto/uiloader/WTC0090dca226c8.ini | 11 - .../baseline/Dialog_with_Buttons_Bottom.ui | 71 - .../uiloader/baseline/Dialog_with_Buttons_Right.ui | 71 - .../uiloader/baseline/Dialog_without_Buttons.ui | 18 - tests/auto/uiloader/baseline/Main_Window.ui | 27 - tests/auto/uiloader/baseline/Widget.ui | 41 - tests/auto/uiloader/baseline/addlinkdialog.ui | 112 - tests/auto/uiloader/baseline/addtorrentform.ui | 266 - .../auto/uiloader/baseline/authenticationdialog.ui | 129 - tests/auto/uiloader/baseline/backside.ui | 208 - tests/auto/uiloader/baseline/batchtranslation.ui | 236 - tests/auto/uiloader/baseline/bookmarkdialog.ui | 161 - tests/auto/uiloader/baseline/bookwindow.ui | 149 - tests/auto/uiloader/baseline/browserwidget.ui | 199 - tests/auto/uiloader/baseline/calculator.ui | 406 - tests/auto/uiloader/baseline/calculatorform.ui | 303 - tests/auto/uiloader/baseline/certificateinfo.ui | 85 - tests/auto/uiloader/baseline/chatdialog.ui | 79 - tests/auto/uiloader/baseline/chatmainwindow.ui | 185 - tests/auto/uiloader/baseline/chatsetnickname.ui | 149 - tests/auto/uiloader/baseline/config.ui | 2528 ------ tests/auto/uiloader/baseline/connectdialog.ui | 150 - tests/auto/uiloader/baseline/controller.ui | 64 - tests/auto/uiloader/baseline/cookies.ui | 106 - tests/auto/uiloader/baseline/cookiesexceptions.ui | 184 - tests/auto/uiloader/baseline/css_borderimage.ui | 125 - .../baseline/css_borderimage_allwidgets.ui | 247 - .../baseline/css_borderradius_allwidgets.ui | 458 - .../uiloader/baseline/css_buttons_background.ui | 271 - .../uiloader/baseline/css_combobox_background.ui | 306 - tests/auto/uiloader/baseline/css_exemple_coffee.ui | 469 -- .../auto/uiloader/baseline/css_exemple_pagefold.ui | 656 -- tests/auto/uiloader/baseline/css_exemple_usage.ui | 91 - tests/auto/uiloader/baseline/css_frames.ui | 319 - tests/auto/uiloader/baseline/css_groupboxes.ui | 150 - .../uiloader/baseline/css_itemview_task258382.ui | 179 - tests/auto/uiloader/baseline/css_qprogressbar.ui | 125 - tests/auto/uiloader/baseline/css_qtabwidget.ui | 224 - tests/auto/uiloader/baseline/css_qtbug6855.ui | 57 - .../baseline/css_qtbug7737_borderimageradius.ui | 44 - tests/auto/uiloader/baseline/css_scroll.ui | 601 -- .../auto/uiloader/baseline/css_scrollarea_base.ui | 197 - tests/auto/uiloader/baseline/css_splitter.ui | 63 - tests/auto/uiloader/baseline/css_tab_border.ui | 104 - .../auto/uiloader/baseline/css_tab_closebutton.ui | 128 - tests/auto/uiloader/baseline/css_tab_task213374.ui | 306 - .../uiloader/baseline/css_task255849_downarrow.ui | 144 - .../uiloader/baseline/css_task259226_spinboxes.ui | 83 - tests/auto/uiloader/baseline/default.ui | 329 - tests/auto/uiloader/baseline/dialog.ui | 47 - tests/auto/uiloader/baseline/downloaditem.ui | 134 - tests/auto/uiloader/baseline/downloads.ui | 83 - tests/auto/uiloader/baseline/embeddeddialog.ui | 87 - tests/auto/uiloader/baseline/filespage.ui | 79 - tests/auto/uiloader/baseline/filternamedialog.ui | 67 - tests/auto/uiloader/baseline/filterpage.ui | 125 - tests/auto/uiloader/baseline/finddialog.ui | 265 - tests/auto/uiloader/baseline/formwindowsettings.ui | 311 - tests/auto/uiloader/baseline/generalpage.ui | 69 - tests/auto/uiloader/baseline/gridpanel.ui | 144 - tests/auto/uiloader/baseline/helpdialog.ui | 404 - tests/auto/uiloader/baseline/history.ui | 106 - tests/auto/uiloader/baseline/identifierpage.ui | 132 - tests/auto/uiloader/baseline/imagedialog.ui | 389 - tests/auto/uiloader/baseline/images/arrow-down.png | Bin 1006 -> 0 bytes tests/auto/uiloader/baseline/images/arrow-up.png | Bin 927 -> 0 bytes .../auto/uiloader/baseline/images/borderimage.png | Bin 1672 -> 0 bytes .../uiloader/baseline/images/checkbox_checked.png | Bin 263 -> 0 bytes .../baseline/images/checkbox_checked_hover.png | Bin 266 -> 0 bytes .../baseline/images/checkbox_checked_pressed.png | Bin 425 -> 0 bytes .../baseline/images/checkbox_unchecked.png | Bin 159 -> 0 bytes .../baseline/images/checkbox_unchecked_hover.png | Bin 159 -> 0 bytes .../baseline/images/checkbox_unchecked_pressed.png | Bin 320 -> 0 bytes tests/auto/uiloader/baseline/images/down_arrow.png | Bin 175 -> 0 bytes .../baseline/images/down_arrow_disabled.png | Bin 174 -> 0 bytes tests/auto/uiloader/baseline/images/frame.png | Bin 253 -> 0 bytes tests/auto/uiloader/baseline/images/pagefold.png | Bin 1545 -> 0 bytes tests/auto/uiloader/baseline/images/pushbutton.png | Bin 533 -> 0 bytes .../uiloader/baseline/images/pushbutton_hover.png | Bin 525 -> 0 bytes .../baseline/images/pushbutton_pressed.png | Bin 513 -> 0 bytes .../baseline/images/radiobutton_checked.png | Bin 355 -> 0 bytes .../baseline/images/radiobutton_checked_hover.png | Bin 532 -> 0 bytes .../images/radiobutton_checked_pressed.png | Bin 599 -> 0 bytes .../baseline/images/radiobutton_unchecked.png | Bin 240 -> 0 bytes .../images/radiobutton_unchecked_hover.png | Bin 492 -> 0 bytes .../images/radiobutton_unchecked_pressed.png | Bin 556 -> 0 bytes tests/auto/uiloader/baseline/images/sizegrip.png | Bin 129 -> 0 bytes tests/auto/uiloader/baseline/images/spindown.png | Bin 276 -> 0 bytes .../uiloader/baseline/images/spindown_hover.png | Bin 268 -> 0 bytes .../auto/uiloader/baseline/images/spindown_off.png | Bin 249 -> 0 bytes .../uiloader/baseline/images/spindown_pressed.png | Bin 264 -> 0 bytes tests/auto/uiloader/baseline/images/spinup.png | Bin 283 -> 0 bytes .../auto/uiloader/baseline/images/spinup_hover.png | Bin 277 -> 0 bytes tests/auto/uiloader/baseline/images/spinup_off.png | Bin 274 -> 0 bytes .../uiloader/baseline/images/spinup_pressed.png | Bin 277 -> 0 bytes .../baseline/images/splitter_horizontal.png | Bin 199 -> 0 bytes .../uiloader/baseline/images/splitter_vertical.png | Bin 193 -> 0 bytes tests/auto/uiloader/baseline/images/up_arrow.png | Bin 197 -> 0 bytes .../uiloader/baseline/images/up_arrow_disabled.png | Bin 172 -> 0 bytes tests/auto/uiloader/baseline/inputpage.ui | 79 - tests/auto/uiloader/baseline/installdialog.ui | 118 - tests/auto/uiloader/baseline/languagesdialog.ui | 160 - tests/auto/uiloader/baseline/listwidgeteditor.ui | 226 - tests/auto/uiloader/baseline/mainwindow.ui | 502 -- tests/auto/uiloader/baseline/mainwindowbase.ui | 1214 --- tests/auto/uiloader/baseline/mydialog.ui | 47 - tests/auto/uiloader/baseline/myform.ui | 130 - tests/auto/uiloader/baseline/newactiondialog.ui | 202 - .../uiloader/baseline/newdynamicpropertydialog.ui | 106 - tests/auto/uiloader/baseline/newform.ui | 153 - tests/auto/uiloader/baseline/orderdialog.ui | 198 - tests/auto/uiloader/baseline/outputpage.ui | 95 - tests/auto/uiloader/baseline/pagefold.ui | 349 - tests/auto/uiloader/baseline/paletteeditor.ui | 264 - .../uiloader/baseline/paletteeditoradvancedbase.ui | 617 -- tests/auto/uiloader/baseline/passworddialog.ui | 111 - tests/auto/uiloader/baseline/pathpage.ui | 114 - tests/auto/uiloader/baseline/phrasebookbox.ui | 211 - tests/auto/uiloader/baseline/plugindialog.ui | 153 - tests/auto/uiloader/baseline/preferencesdialog.ui | 165 - .../baseline/previewconfigurationwidget.ui | 91 - tests/auto/uiloader/baseline/previewdialogbase.ui | 224 - tests/auto/uiloader/baseline/previewwidget.ui | 238 - tests/auto/uiloader/baseline/previewwidgetbase.ui | 340 - tests/auto/uiloader/baseline/proxy.ui | 104 - tests/auto/uiloader/baseline/qfiledialog.ui | 320 - tests/auto/uiloader/baseline/qpagesetupwidget.ui | 353 - .../uiloader/baseline/qprintpropertieswidget.ui | 70 - .../auto/uiloader/baseline/qprintsettingsoutput.ui | 371 - tests/auto/uiloader/baseline/qprintwidget.ui | 116 - .../auto/uiloader/baseline/qsqlconnectiondialog.ui | 224 - tests/auto/uiloader/baseline/qtgradientdialog.ui | 121 - tests/auto/uiloader/baseline/qtgradienteditor.ui | 1377 --- tests/auto/uiloader/baseline/qtgradientview.ui | 135 - .../auto/uiloader/baseline/qtgradientviewdialog.ui | 121 - .../uiloader/baseline/qtresourceeditordialog.ui | 180 - tests/auto/uiloader/baseline/qttoolbardialog.ui | 207 - tests/auto/uiloader/baseline/querywidget.ui | 163 - tests/auto/uiloader/baseline/remotecontrol.ui | 228 - tests/auto/uiloader/baseline/saveformastemplate.ui | 166 - tests/auto/uiloader/baseline/settings.ui | 262 - tests/auto/uiloader/baseline/signalslotdialog.ui | 129 - tests/auto/uiloader/baseline/sslclient.ui | 190 - tests/auto/uiloader/baseline/sslerrors.ui | 110 - tests/auto/uiloader/baseline/statistics.ui | 242 - tests/auto/uiloader/baseline/stringlisteditor.ui | 265 - tests/auto/uiloader/baseline/stylesheeteditor.ui | 171 - tests/auto/uiloader/baseline/tabbedbrowser.ui | 233 - tests/auto/uiloader/baseline/tablewidgeteditor.ui | 403 - tests/auto/uiloader/baseline/tetrixwindow.ui | 164 - tests/auto/uiloader/baseline/textfinder.ui | 89 - tests/auto/uiloader/baseline/topicchooser.ui | 116 - tests/auto/uiloader/baseline/translatedialog.ui | 301 - .../auto/uiloader/baseline/translationsettings.ui | 107 - tests/auto/uiloader/baseline/treewidgeteditor.ui | 379 - tests/auto/uiloader/baseline/trpreviewtool.ui | 189 - tests/auto/uiloader/baseline/validators.ui | 467 - .../auto/uiloader/baseline/wateringconfigdialog.ui | 446 - tests/auto/uiloader/desert.ini | 11 - tests/auto/uiloader/dole.ini | 11 - tests/auto/uiloader/gravlaks.ini | 11 - tests/auto/uiloader/jackychan.ini | 11 - tests/auto/uiloader/jeunehomme.ini | 11 - tests/auto/uiloader/kangaroo.ini | 11 - tests/auto/uiloader/kayak.ini | 11 - tests/auto/uiloader/scruffy.ini | 11 - tests/auto/uiloader/troll15.ini | 11 - tests/auto/uiloader/tst_screenshot/README.TXT | 13 - tests/auto/uiloader/tst_screenshot/main.cpp | 209 - .../uiloader/tst_screenshot/tst_screenshot.pro | 8 - tests/auto/uiloader/tundra.ini | 11 - tests/auto/uiloader/uiloader.pro | 3 - tests/auto/uiloader/uiloader/tst_uiloader.cpp | 107 - tests/auto/uiloader/uiloader/uiloader.cpp | 814 -- tests/auto/uiloader/uiloader/uiloader.h | 109 - tests/auto/uiloader/uiloader/uiloader.pro | 30 - tests/auto/uiloader/wartburg.ini | 11 - tools/uilib/abstractformbuilder.cpp | 3154 ------- tools/uilib/abstractformbuilder.h | 283 - tools/uilib/container.h | 82 - tools/uilib/container.qdoc | 199 - tools/uilib/customwidget.h | 101 - tools/uilib/customwidget.qdoc | 295 - tools/uilib/extension.h | 109 - tools/uilib/formbuilder.cpp | 550 -- tools/uilib/formbuilder.h | 110 - tools/uilib/formbuilderextra.cpp | 533 -- tools/uilib/formbuilderextra_p.h | 276 - tools/uilib/formscriptrunner.cpp | 208 - tools/uilib/formscriptrunner_p.h | 120 - tools/uilib/properties.cpp | 681 -- tools/uilib/properties_p.h | 176 - tools/uilib/qdesignerexportwidget.h | 66 - tools/uilib/resourcebuilder.cpp | 180 - tools/uilib/resourcebuilder_p.h | 104 - tools/uilib/textbuilder.cpp | 84 - tools/uilib/textbuilder_p.h | 93 - tools/uilib/ui4.cpp | 8907 -------------------- tools/uilib/ui4_p.h | 3603 -------- tools/uilib/uilib.pri | 34 - tools/uilib/uilib_global.h | 64 - tools/uilib/widgets.table | 148 - 233 files changed, 2 insertions(+), 52574 deletions(-) delete mode 100644 examples/uitools/multipleinheritance/calculatorform.cpp delete mode 100644 examples/uitools/multipleinheritance/calculatorform.h delete mode 100644 examples/uitools/multipleinheritance/calculatorform.ui delete mode 100644 examples/uitools/multipleinheritance/main.cpp delete mode 100644 examples/uitools/multipleinheritance/multipleinheritance.desktop delete mode 100644 examples/uitools/multipleinheritance/multipleinheritance.pro delete mode 100644 examples/uitools/textfinder/forms/input.txt delete mode 100644 examples/uitools/textfinder/forms/textfinder.ui delete mode 100644 examples/uitools/textfinder/main.cpp delete mode 100644 examples/uitools/textfinder/textfinder.cpp delete mode 100644 examples/uitools/textfinder/textfinder.desktop delete mode 100644 examples/uitools/textfinder/textfinder.h delete mode 100644 examples/uitools/textfinder/textfinder.pro delete mode 100644 examples/uitools/textfinder/textfinder.qrc delete mode 100644 examples/uitools/uitools.pro delete mode 100644 src/modules/qt_uilib.pri delete mode 100644 src/modules/qt_uitools.pri delete mode 100644 src/uitools/quiloader.cpp delete mode 100644 src/uitools/quiloader.h delete mode 100644 src/uitools/quiloader_p.h delete mode 100644 src/uitools/uitools.pro delete mode 100644 tests/auto/uiloader/.gitignore delete mode 100644 tests/auto/uiloader/README.TXT delete mode 100644 tests/auto/uiloader/WTC0090dca226c8.ini delete mode 100644 tests/auto/uiloader/baseline/Dialog_with_Buttons_Bottom.ui delete mode 100644 tests/auto/uiloader/baseline/Dialog_with_Buttons_Right.ui delete mode 100644 tests/auto/uiloader/baseline/Dialog_without_Buttons.ui delete mode 100644 tests/auto/uiloader/baseline/Main_Window.ui delete mode 100644 tests/auto/uiloader/baseline/Widget.ui delete mode 100644 tests/auto/uiloader/baseline/addlinkdialog.ui delete mode 100644 tests/auto/uiloader/baseline/addtorrentform.ui delete mode 100644 tests/auto/uiloader/baseline/authenticationdialog.ui delete mode 100644 tests/auto/uiloader/baseline/backside.ui delete mode 100644 tests/auto/uiloader/baseline/batchtranslation.ui delete mode 100644 tests/auto/uiloader/baseline/bookmarkdialog.ui delete mode 100644 tests/auto/uiloader/baseline/bookwindow.ui delete mode 100644 tests/auto/uiloader/baseline/browserwidget.ui delete mode 100644 tests/auto/uiloader/baseline/calculator.ui delete mode 100644 tests/auto/uiloader/baseline/calculatorform.ui delete mode 100644 tests/auto/uiloader/baseline/certificateinfo.ui delete mode 100644 tests/auto/uiloader/baseline/chatdialog.ui delete mode 100644 tests/auto/uiloader/baseline/chatmainwindow.ui delete mode 100644 tests/auto/uiloader/baseline/chatsetnickname.ui delete mode 100644 tests/auto/uiloader/baseline/config.ui delete mode 100644 tests/auto/uiloader/baseline/connectdialog.ui delete mode 100644 tests/auto/uiloader/baseline/controller.ui delete mode 100644 tests/auto/uiloader/baseline/cookies.ui delete mode 100644 tests/auto/uiloader/baseline/cookiesexceptions.ui delete mode 100644 tests/auto/uiloader/baseline/css_borderimage.ui delete mode 100644 tests/auto/uiloader/baseline/css_borderimage_allwidgets.ui delete mode 100644 tests/auto/uiloader/baseline/css_borderradius_allwidgets.ui delete mode 100644 tests/auto/uiloader/baseline/css_buttons_background.ui delete mode 100644 tests/auto/uiloader/baseline/css_combobox_background.ui delete mode 100644 tests/auto/uiloader/baseline/css_exemple_coffee.ui delete mode 100644 tests/auto/uiloader/baseline/css_exemple_pagefold.ui delete mode 100644 tests/auto/uiloader/baseline/css_exemple_usage.ui delete mode 100644 tests/auto/uiloader/baseline/css_frames.ui delete mode 100644 tests/auto/uiloader/baseline/css_groupboxes.ui delete mode 100644 tests/auto/uiloader/baseline/css_itemview_task258382.ui delete mode 100644 tests/auto/uiloader/baseline/css_qprogressbar.ui delete mode 100644 tests/auto/uiloader/baseline/css_qtabwidget.ui delete mode 100644 tests/auto/uiloader/baseline/css_qtbug6855.ui delete mode 100644 tests/auto/uiloader/baseline/css_qtbug7737_borderimageradius.ui delete mode 100644 tests/auto/uiloader/baseline/css_scroll.ui delete mode 100644 tests/auto/uiloader/baseline/css_scrollarea_base.ui delete mode 100644 tests/auto/uiloader/baseline/css_splitter.ui delete mode 100644 tests/auto/uiloader/baseline/css_tab_border.ui delete mode 100644 tests/auto/uiloader/baseline/css_tab_closebutton.ui delete mode 100644 tests/auto/uiloader/baseline/css_tab_task213374.ui delete mode 100644 tests/auto/uiloader/baseline/css_task255849_downarrow.ui delete mode 100644 tests/auto/uiloader/baseline/css_task259226_spinboxes.ui delete mode 100644 tests/auto/uiloader/baseline/default.ui delete mode 100644 tests/auto/uiloader/baseline/dialog.ui delete mode 100644 tests/auto/uiloader/baseline/downloaditem.ui delete mode 100644 tests/auto/uiloader/baseline/downloads.ui delete mode 100644 tests/auto/uiloader/baseline/embeddeddialog.ui delete mode 100644 tests/auto/uiloader/baseline/filespage.ui delete mode 100644 tests/auto/uiloader/baseline/filternamedialog.ui delete mode 100644 tests/auto/uiloader/baseline/filterpage.ui delete mode 100644 tests/auto/uiloader/baseline/finddialog.ui delete mode 100644 tests/auto/uiloader/baseline/formwindowsettings.ui delete mode 100644 tests/auto/uiloader/baseline/generalpage.ui delete mode 100644 tests/auto/uiloader/baseline/gridpanel.ui delete mode 100644 tests/auto/uiloader/baseline/helpdialog.ui delete mode 100644 tests/auto/uiloader/baseline/history.ui delete mode 100644 tests/auto/uiloader/baseline/identifierpage.ui delete mode 100644 tests/auto/uiloader/baseline/imagedialog.ui delete mode 100644 tests/auto/uiloader/baseline/images/arrow-down.png delete mode 100644 tests/auto/uiloader/baseline/images/arrow-up.png delete mode 100644 tests/auto/uiloader/baseline/images/borderimage.png delete mode 100644 tests/auto/uiloader/baseline/images/checkbox_checked.png delete mode 100644 tests/auto/uiloader/baseline/images/checkbox_checked_hover.png delete mode 100644 tests/auto/uiloader/baseline/images/checkbox_checked_pressed.png delete mode 100644 tests/auto/uiloader/baseline/images/checkbox_unchecked.png delete mode 100644 tests/auto/uiloader/baseline/images/checkbox_unchecked_hover.png delete mode 100644 tests/auto/uiloader/baseline/images/checkbox_unchecked_pressed.png delete mode 100644 tests/auto/uiloader/baseline/images/down_arrow.png delete mode 100644 tests/auto/uiloader/baseline/images/down_arrow_disabled.png delete mode 100644 tests/auto/uiloader/baseline/images/frame.png delete mode 100644 tests/auto/uiloader/baseline/images/pagefold.png delete mode 100644 tests/auto/uiloader/baseline/images/pushbutton.png delete mode 100644 tests/auto/uiloader/baseline/images/pushbutton_hover.png delete mode 100644 tests/auto/uiloader/baseline/images/pushbutton_pressed.png delete mode 100644 tests/auto/uiloader/baseline/images/radiobutton_checked.png delete mode 100644 tests/auto/uiloader/baseline/images/radiobutton_checked_hover.png delete mode 100644 tests/auto/uiloader/baseline/images/radiobutton_checked_pressed.png delete mode 100644 tests/auto/uiloader/baseline/images/radiobutton_unchecked.png delete mode 100644 tests/auto/uiloader/baseline/images/radiobutton_unchecked_hover.png delete mode 100644 tests/auto/uiloader/baseline/images/radiobutton_unchecked_pressed.png delete mode 100644 tests/auto/uiloader/baseline/images/sizegrip.png delete mode 100644 tests/auto/uiloader/baseline/images/spindown.png delete mode 100644 tests/auto/uiloader/baseline/images/spindown_hover.png delete mode 100644 tests/auto/uiloader/baseline/images/spindown_off.png delete mode 100644 tests/auto/uiloader/baseline/images/spindown_pressed.png delete mode 100644 tests/auto/uiloader/baseline/images/spinup.png delete mode 100644 tests/auto/uiloader/baseline/images/spinup_hover.png delete mode 100644 tests/auto/uiloader/baseline/images/spinup_off.png delete mode 100644 tests/auto/uiloader/baseline/images/spinup_pressed.png delete mode 100644 tests/auto/uiloader/baseline/images/splitter_horizontal.png delete mode 100644 tests/auto/uiloader/baseline/images/splitter_vertical.png delete mode 100644 tests/auto/uiloader/baseline/images/up_arrow.png delete mode 100644 tests/auto/uiloader/baseline/images/up_arrow_disabled.png delete mode 100644 tests/auto/uiloader/baseline/inputpage.ui delete mode 100644 tests/auto/uiloader/baseline/installdialog.ui delete mode 100644 tests/auto/uiloader/baseline/languagesdialog.ui delete mode 100644 tests/auto/uiloader/baseline/listwidgeteditor.ui delete mode 100644 tests/auto/uiloader/baseline/mainwindow.ui delete mode 100644 tests/auto/uiloader/baseline/mainwindowbase.ui delete mode 100644 tests/auto/uiloader/baseline/mydialog.ui delete mode 100644 tests/auto/uiloader/baseline/myform.ui delete mode 100644 tests/auto/uiloader/baseline/newactiondialog.ui delete mode 100644 tests/auto/uiloader/baseline/newdynamicpropertydialog.ui delete mode 100644 tests/auto/uiloader/baseline/newform.ui delete mode 100644 tests/auto/uiloader/baseline/orderdialog.ui delete mode 100644 tests/auto/uiloader/baseline/outputpage.ui delete mode 100644 tests/auto/uiloader/baseline/pagefold.ui delete mode 100644 tests/auto/uiloader/baseline/paletteeditor.ui delete mode 100644 tests/auto/uiloader/baseline/paletteeditoradvancedbase.ui delete mode 100644 tests/auto/uiloader/baseline/passworddialog.ui delete mode 100644 tests/auto/uiloader/baseline/pathpage.ui delete mode 100644 tests/auto/uiloader/baseline/phrasebookbox.ui delete mode 100644 tests/auto/uiloader/baseline/plugindialog.ui delete mode 100644 tests/auto/uiloader/baseline/preferencesdialog.ui delete mode 100644 tests/auto/uiloader/baseline/previewconfigurationwidget.ui delete mode 100644 tests/auto/uiloader/baseline/previewdialogbase.ui delete mode 100644 tests/auto/uiloader/baseline/previewwidget.ui delete mode 100644 tests/auto/uiloader/baseline/previewwidgetbase.ui delete mode 100644 tests/auto/uiloader/baseline/proxy.ui delete mode 100644 tests/auto/uiloader/baseline/qfiledialog.ui delete mode 100644 tests/auto/uiloader/baseline/qpagesetupwidget.ui delete mode 100644 tests/auto/uiloader/baseline/qprintpropertieswidget.ui delete mode 100644 tests/auto/uiloader/baseline/qprintsettingsoutput.ui delete mode 100644 tests/auto/uiloader/baseline/qprintwidget.ui delete mode 100644 tests/auto/uiloader/baseline/qsqlconnectiondialog.ui delete mode 100644 tests/auto/uiloader/baseline/qtgradientdialog.ui delete mode 100644 tests/auto/uiloader/baseline/qtgradienteditor.ui delete mode 100644 tests/auto/uiloader/baseline/qtgradientview.ui delete mode 100644 tests/auto/uiloader/baseline/qtgradientviewdialog.ui delete mode 100644 tests/auto/uiloader/baseline/qtresourceeditordialog.ui delete mode 100644 tests/auto/uiloader/baseline/qttoolbardialog.ui delete mode 100644 tests/auto/uiloader/baseline/querywidget.ui delete mode 100644 tests/auto/uiloader/baseline/remotecontrol.ui delete mode 100644 tests/auto/uiloader/baseline/saveformastemplate.ui delete mode 100644 tests/auto/uiloader/baseline/settings.ui delete mode 100644 tests/auto/uiloader/baseline/signalslotdialog.ui delete mode 100644 tests/auto/uiloader/baseline/sslclient.ui delete mode 100644 tests/auto/uiloader/baseline/sslerrors.ui delete mode 100644 tests/auto/uiloader/baseline/statistics.ui delete mode 100644 tests/auto/uiloader/baseline/stringlisteditor.ui delete mode 100644 tests/auto/uiloader/baseline/stylesheeteditor.ui delete mode 100644 tests/auto/uiloader/baseline/tabbedbrowser.ui delete mode 100644 tests/auto/uiloader/baseline/tablewidgeteditor.ui delete mode 100644 tests/auto/uiloader/baseline/tetrixwindow.ui delete mode 100644 tests/auto/uiloader/baseline/textfinder.ui delete mode 100644 tests/auto/uiloader/baseline/topicchooser.ui delete mode 100644 tests/auto/uiloader/baseline/translatedialog.ui delete mode 100644 tests/auto/uiloader/baseline/translationsettings.ui delete mode 100644 tests/auto/uiloader/baseline/treewidgeteditor.ui delete mode 100644 tests/auto/uiloader/baseline/trpreviewtool.ui delete mode 100644 tests/auto/uiloader/baseline/validators.ui delete mode 100644 tests/auto/uiloader/baseline/wateringconfigdialog.ui delete mode 100644 tests/auto/uiloader/desert.ini delete mode 100644 tests/auto/uiloader/dole.ini delete mode 100644 tests/auto/uiloader/gravlaks.ini delete mode 100644 tests/auto/uiloader/jackychan.ini delete mode 100644 tests/auto/uiloader/jeunehomme.ini delete mode 100644 tests/auto/uiloader/kangaroo.ini delete mode 100644 tests/auto/uiloader/kayak.ini delete mode 100644 tests/auto/uiloader/scruffy.ini delete mode 100644 tests/auto/uiloader/troll15.ini delete mode 100644 tests/auto/uiloader/tst_screenshot/README.TXT delete mode 100644 tests/auto/uiloader/tst_screenshot/main.cpp delete mode 100644 tests/auto/uiloader/tst_screenshot/tst_screenshot.pro delete mode 100644 tests/auto/uiloader/tundra.ini delete mode 100644 tests/auto/uiloader/uiloader.pro delete mode 100644 tests/auto/uiloader/uiloader/tst_uiloader.cpp delete mode 100644 tests/auto/uiloader/uiloader/uiloader.cpp delete mode 100644 tests/auto/uiloader/uiloader/uiloader.h delete mode 100644 tests/auto/uiloader/uiloader/uiloader.pro delete mode 100644 tests/auto/uiloader/wartburg.ini delete mode 100644 tools/uilib/abstractformbuilder.cpp delete mode 100644 tools/uilib/abstractformbuilder.h delete mode 100644 tools/uilib/container.h delete mode 100644 tools/uilib/container.qdoc delete mode 100644 tools/uilib/customwidget.h delete mode 100644 tools/uilib/customwidget.qdoc delete mode 100644 tools/uilib/extension.h delete mode 100644 tools/uilib/formbuilder.cpp delete mode 100644 tools/uilib/formbuilder.h delete mode 100644 tools/uilib/formbuilderextra.cpp delete mode 100644 tools/uilib/formbuilderextra_p.h delete mode 100644 tools/uilib/formscriptrunner.cpp delete mode 100644 tools/uilib/formscriptrunner_p.h delete mode 100644 tools/uilib/properties.cpp delete mode 100644 tools/uilib/properties_p.h delete mode 100644 tools/uilib/qdesignerexportwidget.h delete mode 100644 tools/uilib/resourcebuilder.cpp delete mode 100644 tools/uilib/resourcebuilder_p.h delete mode 100644 tools/uilib/textbuilder.cpp delete mode 100644 tools/uilib/textbuilder_p.h delete mode 100644 tools/uilib/ui4.cpp delete mode 100644 tools/uilib/ui4_p.h delete mode 100644 tools/uilib/uilib.pri delete mode 100644 tools/uilib/uilib_global.h delete mode 100644 tools/uilib/widgets.table diff --git a/.gitignore b/.gitignore index 8ce55a5f5d..119b6287df 100644 --- a/.gitignore +++ b/.gitignore @@ -275,8 +275,6 @@ work #generated module def and version header files mkspecs/modules/qt_*.pri mkspecs/qmodule.pri -src/uitools/qtuitoolsversion.h -tools/uilib/qtdesignerversion.h #unit tests executables diff --git a/examples/examples.pro b/examples/examples.pro index 23271ebe53..93f4b6180f 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -27,7 +27,6 @@ SUBDIRS = \ tools \ tutorials \ widgets \ - uitools \ touch \ gestures } @@ -41,7 +40,6 @@ symbian: SUBDIRS = \ draganddrop \ mainwindows \ sql \ - uitools \ animation \ gestures \ xml diff --git a/examples/uitools/multipleinheritance/calculatorform.cpp b/examples/uitools/multipleinheritance/calculatorform.cpp deleted file mode 100644 index ae1312f558..0000000000 --- a/examples/uitools/multipleinheritance/calculatorform.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include "calculatorform.h" - - -//! [0] -CalculatorForm::CalculatorForm(QWidget *parent) - : QWidget(parent) -{ - setupUi(this); -} -//! [0] - -//! [1] -void CalculatorForm::on_inputSpinBox1_valueChanged(int value) -{ - outputWidget->setText(QString::number(value + inputSpinBox2->value())); -} -//! [1] - -//! [2] -void CalculatorForm::on_inputSpinBox2_valueChanged(int value) -{ - outputWidget->setText(QString::number(value + inputSpinBox1->value())); -} -//! [2] diff --git a/examples/uitools/multipleinheritance/calculatorform.h b/examples/uitools/multipleinheritance/calculatorform.h deleted file mode 100644 index 9b8c8880bf..0000000000 --- a/examples/uitools/multipleinheritance/calculatorform.h +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef CALCULATORFORM_H -#define CALCULATORFORM_H - -//! [0] -#include "ui_calculatorform.h" -//! [0] - -//! [1] -class CalculatorForm : public QWidget, private Ui::CalculatorForm -{ - Q_OBJECT - -public: - CalculatorForm(QWidget *parent = 0); - -private slots: - void on_inputSpinBox1_valueChanged(int value); - void on_inputSpinBox2_valueChanged(int value); -}; -//! [1] - -#endif diff --git a/examples/uitools/multipleinheritance/calculatorform.ui b/examples/uitools/multipleinheritance/calculatorform.ui deleted file mode 100644 index dda0e62ddd..0000000000 --- a/examples/uitools/multipleinheritance/calculatorform.ui +++ /dev/null @@ -1,303 +0,0 @@ - - - - - CalculatorForm - - - CalculatorForm - - - - 0 - 0 - 276 - 98 - - - - - 5 - 5 - 0 - 0 - - - - Calculator Builder - - - - - - - 9 - - - 6 - - - - - - - - 1 - - - 6 - - - - - - - - 1 - - - 6 - - - - - label - - - - 1 - 1 - 45 - 19 - - - - Input 1 - - - - - - - inputSpinBox1 - - - - 1 - 26 - 45 - 25 - - - - true - - - - - - - - - label_3 - - - - 54 - 1 - 7 - 52 - - - - + - - - Qt::AlignCenter - - - - - - - - - - 1 - - - 6 - - - - - label_2 - - - - 1 - 1 - 45 - 19 - - - - Input 2 - - - - - - - inputSpinBox2 - - - - 1 - 26 - 45 - 25 - - - - true - - - - - - - - - label_3_2 - - - - 120 - 1 - 7 - 52 - - - - = - - - Qt::AlignCenter - - - - - - - - - - 1 - - - 6 - - - - - label_2_2_2 - - - - 1 - 1 - 37 - 17 - - - - Output - - - - - - - outputWidget - - - - 1 - 24 - 37 - 27 - - - - QFrame::Box - - - QFrame::Sunken - - - 0 - - - Qt::AlignAbsolute|Qt::AlignBottom|Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignHorizontal_Mask|Qt::AlignJustify|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing|Qt::AlignVCenter|Qt::AlignVertical_Mask - - - - - - - - - - - verticalSpacer - - - - 85 - 69 - 20 - 20 - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - horizontalSpacer - - - - 188 - 26 - 79 - 20 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - diff --git a/examples/uitools/multipleinheritance/main.cpp b/examples/uitools/multipleinheritance/main.cpp deleted file mode 100644 index 56ba8efe53..0000000000 --- a/examples/uitools/multipleinheritance/main.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include "calculatorform.h" - -//! [0] -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - CalculatorForm calculator; -#if defined(Q_OS_SYMBIAN) - calculator.showMaximized(); -#else - calculator.show(); -#endif - return app.exec(); -} -//! [0] diff --git a/examples/uitools/multipleinheritance/multipleinheritance.desktop b/examples/uitools/multipleinheritance/multipleinheritance.desktop deleted file mode 100644 index 7e652f972b..0000000000 --- a/examples/uitools/multipleinheritance/multipleinheritance.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Version=1.0 -Type=Application -Terminal=false -Name=Multiple Inheritance -Exec=/opt/usr/bin/multipleinheritance -Icon=multipleinheritance -X-Window-Icon= -X-HildonDesk-ShowInToolbar=true -X-Osso-Type=application/x-executable diff --git a/examples/uitools/multipleinheritance/multipleinheritance.pro b/examples/uitools/multipleinheritance/multipleinheritance.pro deleted file mode 100644 index 7e64967416..0000000000 --- a/examples/uitools/multipleinheritance/multipleinheritance.pro +++ /dev/null @@ -1,19 +0,0 @@ -#! [0] -SOURCES = calculatorform.cpp main.cpp -HEADERS = calculatorform.h -FORMS = calculatorform.ui -#! [0] - -# install -target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/uitools/multipleinheritance -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/uitools/multipleinheritance -INSTALLS += target sources - -symbian { - TARGET.UID3 = 0xA000D7C1 - CONFIG += qt_example -} -QT += widgets -maemo5: CONFIG += qt_example - diff --git a/examples/uitools/textfinder/forms/input.txt b/examples/uitools/textfinder/forms/input.txt deleted file mode 100644 index 29dfe5d6c6..0000000000 --- a/examples/uitools/textfinder/forms/input.txt +++ /dev/null @@ -1,9 +0,0 @@ -These forms are processed at run-time to produce dynamically-generated user interfaces. -In order to generate a form at run-time, a resource file containing a UI file is needed. -Applications that use the form handling classes need to be configured to be built against -the QtUiTools module. This is done by including the following declaration in a qmake project -file to ensure that the application is compiled and linked appropriately. A form loader object, -provided by the QUiLoader class, is used to construct the user interface. This user interface -can be retrieved from any QIODevice; for example, a QFile object can be used to obtain a form -stored in a project's resources. The QUiLoader::load() function takes the user interface -description contained in the file and constructs the form widget. \ No newline at end of file diff --git a/examples/uitools/textfinder/forms/textfinder.ui b/examples/uitools/textfinder/forms/textfinder.ui deleted file mode 100644 index af05192dbd..0000000000 --- a/examples/uitools/textfinder/forms/textfinder.ui +++ /dev/null @@ -1,89 +0,0 @@ - - Form - - - - 0 - 0 - 378 - 158 - - - - Find Text - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - - - - &Keyword: - - - lineEdit - - - - - - - &Find - - - - - - - - - - - - Qt::Vertical - - - - 20 - 16 - - - - - - - - - - lineEdit - returnPressed() - findButton - animateClick() - - - 261 - 17 - - - 320 - 17 - - - - - diff --git a/examples/uitools/textfinder/main.cpp b/examples/uitools/textfinder/main.cpp deleted file mode 100644 index 2fe9b715d1..0000000000 --- a/examples/uitools/textfinder/main.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include "textfinder.h" - -//! [0] -int main(int argc, char *argv[]) -{ - Q_INIT_RESOURCE(textfinder); - QApplication app(argc, argv); - - TextFinder *textFinder = new TextFinder; - textFinder->show(); - - return app.exec(); -} -//! [0] diff --git a/examples/uitools/textfinder/textfinder.cpp b/examples/uitools/textfinder/textfinder.cpp deleted file mode 100644 index 041c36f218..0000000000 --- a/examples/uitools/textfinder/textfinder.cpp +++ /dev/null @@ -1,155 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include "textfinder.h" - -//! [0] -TextFinder::TextFinder(QWidget *parent) - : QWidget(parent) -{ - QWidget *formWidget = loadUiFile(); - -//! [1] - ui_findButton = findChild("findButton"); - ui_textEdit = findChild("textEdit"); - ui_lineEdit = findChild("lineEdit"); -//! [0] //! [1] - -//! [2] - QMetaObject::connectSlotsByName(this); -//! [2] - -//! [3a] - loadTextFile(); -//! [3a] - -//! [3b] - QVBoxLayout *layout = new QVBoxLayout; - layout->addWidget(formWidget); - setLayout(layout); -//! [3b] - -//! [3c] - setWindowTitle(tr("Text Finder")); - isFirstTime = true; -} -//! [3c] - -//! [4] -QWidget* TextFinder::loadUiFile() -{ - QUiLoader loader; - - QFile file(":/forms/textfinder.ui"); - file.open(QFile::ReadOnly); - - QWidget *formWidget = loader.load(&file, this); - file.close(); - - return formWidget; -} -//! [4] - -//! [5] -void TextFinder::loadTextFile() -{ - QFile inputFile(":/forms/input.txt"); - inputFile.open(QIODevice::ReadOnly); - QTextStream in(&inputFile); - QString line = in.readAll(); - inputFile.close(); - - ui_textEdit->append(line); - ui_textEdit->setUndoRedoEnabled(false); - ui_textEdit->setUndoRedoEnabled(true); -} -//! [5] - -//! [6] //! [7] -void TextFinder::on_findButton_clicked() -{ - QString searchString = ui_lineEdit->text(); - QTextDocument *document = ui_textEdit->document(); - - bool found = false; - - if (isFirstTime == false) - document->undo(); - - if (searchString.isEmpty()) { - QMessageBox::information(this, tr("Empty Search Field"), - "The search field is empty. Please enter a word and click Find."); - } else { - - QTextCursor highlightCursor(document); - QTextCursor cursor(document); - - cursor.beginEditBlock(); -//! [6] - - QTextCharFormat plainFormat(highlightCursor.charFormat()); - QTextCharFormat colorFormat = plainFormat; - colorFormat.setForeground(Qt::red); - - while (!highlightCursor.isNull() && !highlightCursor.atEnd()) { - highlightCursor = document->find(searchString, highlightCursor, QTextDocument::FindWholeWords); - - if (!highlightCursor.isNull()) { - found = true; - highlightCursor.movePosition(QTextCursor::WordRight, - QTextCursor::KeepAnchor); - highlightCursor.mergeCharFormat(colorFormat); - } - } - -//! [8] - cursor.endEditBlock(); -//! [7] //! [9] - isFirstTime = false; - - if (found == false) { - QMessageBox::information(this, tr("Word Not Found"), - "Sorry, the word cannot be found."); - } - } -} -//! [8] //! [9] diff --git a/examples/uitools/textfinder/textfinder.desktop b/examples/uitools/textfinder/textfinder.desktop deleted file mode 100644 index e1911cc61c..0000000000 --- a/examples/uitools/textfinder/textfinder.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Version=1.0 -Type=Application -Terminal=false -Name=Text Finder -Exec=/opt/usr/bin/textfinder -Icon=textfinder -X-Window-Icon= -X-HildonDesk-ShowInToolbar=true -X-Osso-Type=application/x-executable diff --git a/examples/uitools/textfinder/textfinder.h b/examples/uitools/textfinder/textfinder.h deleted file mode 100644 index c3cd030cb2..0000000000 --- a/examples/uitools/textfinder/textfinder.h +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef TEXTFINDER_H -#define TEXTFINDER_H - -#include - -QT_BEGIN_NAMESPACE -class QPushButton; -class QTextEdit; -class QLineEdit; -QT_END_NAMESPACE - -//! [0] -class TextFinder : public QWidget -{ - Q_OBJECT - -public: - TextFinder(QWidget *parent = 0); - -private slots: - void on_findButton_clicked(); - -private: - QWidget* loadUiFile(); - void loadTextFile(); - - QPushButton *ui_findButton; - QTextEdit *ui_textEdit; - QLineEdit *ui_lineEdit; - bool isFirstTime; -}; -//! [0] - -#endif diff --git a/examples/uitools/textfinder/textfinder.pro b/examples/uitools/textfinder/textfinder.pro deleted file mode 100644 index 337b7216e4..0000000000 --- a/examples/uitools/textfinder/textfinder.pro +++ /dev/null @@ -1,17 +0,0 @@ -CONFIG += uitools -HEADERS = textfinder.h -RESOURCES = textfinder.qrc -SOURCES = textfinder.cpp main.cpp - -# install -target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/uitools/textfinder -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro forms -sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/uitools/textfinder -INSTALLS += target sources - -symbian: CONFIG += qt_example -QT += widgets -maemo5: CONFIG += qt_example - -symbian: warning(This example does not work on Symbian platform) -simulator: warning(This example does not work on Simulator platform) diff --git a/examples/uitools/textfinder/textfinder.qrc b/examples/uitools/textfinder/textfinder.qrc deleted file mode 100644 index a4cea8a77d..0000000000 --- a/examples/uitools/textfinder/textfinder.qrc +++ /dev/null @@ -1,6 +0,0 @@ - - - forms/textfinder.ui - forms/input.txt - - \ No newline at end of file diff --git a/examples/uitools/uitools.pro b/examples/uitools/uitools.pro deleted file mode 100644 index f17de666fb..0000000000 --- a/examples/uitools/uitools.pro +++ /dev/null @@ -1,14 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS = multipleinheritance - -!wince*:!symbian:contains(QT_BUILD_PARTS, tools): SUBDIRS += textfinder - -# install -target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/uitools -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS uitools.pro README -sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/uitools -INSTALLS += target sources - -symbian: CONFIG += qt_example -QT += widgets -maemo5: CONFIG += qt_example diff --git a/src/modules/qt_uilib.pri b/src/modules/qt_uilib.pri deleted file mode 100644 index 04616ac6af..0000000000 --- a/src/modules/qt_uilib.pri +++ /dev/null @@ -1,13 +0,0 @@ -QT.uilib.VERSION = 5.0.0 -QT.uilib.MAJOR_VERSION = 5 -QT.uilib.MINOR_VERSION = 0 -QT.uilib.PATCH_VERSION = 0 - -QT.uilib.name = QtUiLib -QT.uilib.bins = $$QT_MODULE_BIN_BASE -QT.uilib.includes = $$QT_MODULE_INCLUDE_BASE/QtDesigner -QT.uilib.private_includes = $$QT_MODULE_INCLUDE_BASE/QtDesigner/$$QT.uilib.VERSION -QT.uilib.sources = $$QT_MODULE_BASE/tools/uilib -QT.uilib.plugins = $$QT_MODULE_PLUGIN_BASE -QT.uilib.imports = $$QT_MODULE_IMPORT_BASE -QT.uilib.depends = xml diff --git a/src/modules/qt_uitools.pri b/src/modules/qt_uitools.pri deleted file mode 100644 index 128a20cfd7..0000000000 --- a/src/modules/qt_uitools.pri +++ /dev/null @@ -1,17 +0,0 @@ -QT.uitools.VERSION = 5.0.0 -QT.uitools.MAJOR_VERSION = 5 -QT.uitools.MINOR_VERSION = 0 -QT.uitools.PATCH_VERSION = 0 - -QT.uitools.name = QtUiTools -QT.uitools.bins = $$QT_MODULE_BIN_BASE -QT.uitools.includes = $$QT_MODULE_INCLUDE_BASE/QtUiTools -QT.uitools.private_includes = $$QT_MODULE_INCLUDE_BASE/QtUiTools/$$QT.uitools.VERSION -QT.uitools.sources = $$QT_MODULE_BASE/src/uitools -QT.uitools.libs = $$QT_MODULE_LIB_BASE -QT.uitools.plugins = $$QT_MODULE_PLUGIN_BASE -QT.uitools.imports = $$QT_MODULE_IMPORT_BASE -QT.uitools.depends = xml -QT.uitools.DEFINES = QT_UITOOLS_LIB - -QT_CONFIG += uitools diff --git a/src/src.pro b/src/src.pro index 4263c0eb92..a0e504a39e 100644 --- a/src/src.pro +++ b/src/src.pro @@ -10,7 +10,7 @@ SRC_SUBDIRS += src_corelib !cross_compile { win32:!wince*: SRC_SUBDIRS += src_tools_idc } -SRC_SUBDIRS += src_network src_sql src_gui src_xml src_uitools src_widgets src_printsupport src_testlib src_platformsupport +SRC_SUBDIRS += src_network src_sql src_gui src_xml src_widgets src_printsupport src_testlib src_platformsupport nacl: SRC_SUBDIRS -= src_network src_testlib !symbian:contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus @@ -36,8 +36,6 @@ src_v8.subdir = $$QT_SOURCE_TREE/src/v8 src_v8.target = sub-v8 src_xml.subdir = $$QT_SOURCE_TREE/src/xml src_xml.target = sub-xml -src_uitools.subdir = $$QT_SOURCE_TREE/src/uitools -src_uitools.target = sub-uitools src_dbus.subdir = $$QT_SOURCE_TREE/src/dbus src_dbus.target = sub-dbus src_gui.subdir = $$QT_SOURCE_TREE/src/gui @@ -68,7 +66,6 @@ src_platformsupport.target = sub-platformsupport src_widgets.depends = src_corelib src_gui src_tools_uic embedded: src_gui.depends += src_network src_xml.depends = src_corelib - src_uitools.depends = src_corelib src_widgets src_dbus.depends = src_corelib src_xml src_network.depends = src_corelib src_opengl.depends = src_gui src_widgets diff --git a/src/tools/uic/qclass_lib_map.h b/src/tools/uic/qclass_lib_map.h index 09d275d8a1..795a8c12cf 100644 --- a/src/tools/uic/qclass_lib_map.h +++ b/src/tools/uic/qclass_lib_map.h @@ -1078,7 +1078,6 @@ QT_CLASS_LIB(QDoubleValidator, QtWidgets, qvalidator.h) QT_CLASS_LIB(QRegExpValidator, QtWidgets, qvalidator.h) QT_CLASS_LIB(QWorkspace, QtWidgets, qworkspace.h) QT_CLASS_LIB(QScriptEngineDebugger, QtScriptTools, qscriptenginedebugger.h) -QT_CLASS_LIB(QUiLoader, QtUiTools, quiloader.h) QT_CLASS_LIB(QDesignerComponents, QtDesigner, qdesigner_components.h) QT_CLASS_LIB(QExtensionFactory, QtDesigner, default_extensionfactory.h) QT_CLASS_LIB(QAbstractExtensionFactory, QtDesigner, extension.h) diff --git a/src/uitools/quiloader.cpp b/src/uitools/quiloader.cpp deleted file mode 100644 index 19d4277aed..0000000000 --- a/src/uitools/quiloader.cpp +++ /dev/null @@ -1,954 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -#include "quiloader.h" -#include "quiloader_p.h" -#include "customwidget.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -typedef QMap widget_map; -Q_GLOBAL_STATIC(widget_map, g_widgets) - -class QUiLoader; -class QUiLoaderPrivate; - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal -{ -#endif - -class TranslatingTextBuilder : public QTextBuilder -{ -public: - TranslatingTextBuilder(bool trEnabled, const QByteArray &className) : - m_trEnabled(trEnabled), m_className(className) {} - - virtual QVariant loadText(const DomProperty *icon) const; - - virtual QVariant toNativeValue(const QVariant &value) const; - -private: - bool m_trEnabled; - QByteArray m_className; -}; - -QVariant TranslatingTextBuilder::loadText(const DomProperty *text) const -{ - const DomString *str = text->elementString(); - if (!str) - return QVariant(); - if (str->hasAttributeNotr()) { - const QString notr = str->attributeNotr(); - if (notr == QLatin1String("true") || notr == QLatin1String("yes")) - return QVariant::fromValue(str->text()); - } - QUiTranslatableStringValue strVal; - strVal.setValue(str->text().toUtf8()); - if (str->hasAttributeComment()) - strVal.setComment(str->attributeComment().toUtf8()); - return QVariant::fromValue(strVal); -} - -QVariant TranslatingTextBuilder::toNativeValue(const QVariant &value) const -{ - if (value.canConvert()) { - QUiTranslatableStringValue tsv = qvariant_cast(value); - if (!m_trEnabled) - return QString::fromUtf8(tsv.value().data()); - return QVariant::fromValue( - QApplication::translate(m_className, tsv.value(), tsv.comment(), - QCoreApplication::UnicodeUTF8)); - } - if (value.canConvert()) - return QVariant::fromValue(qvariant_cast(value)); - return value; -} - -// This is "exported" to linguist -const QUiItemRolePair qUiItemRoles[] = { - { Qt::DisplayRole, Qt::DisplayPropertyRole }, -#ifndef QT_NO_TOOLTIP - { Qt::ToolTipRole, Qt::ToolTipPropertyRole }, -#endif -#ifndef QT_NO_STATUSTIP - { Qt::StatusTipRole, Qt::StatusTipPropertyRole }, -#endif -#ifndef QT_NO_WHATSTHIS - { Qt::WhatsThisRole, Qt::WhatsThisPropertyRole }, -#endif - { -1 , -1 } -}; - -static void recursiveReTranslate(QTreeWidgetItem *item, const QByteArray &class_name) -{ - const QUiItemRolePair *irs = qUiItemRoles; - - int cnt = item->columnCount(); - for (int i = 0; i < cnt; ++i) { - for (unsigned j = 0; irs[j].shadowRole >= 0; j++) { - QVariant v = item->data(i, irs[j].shadowRole); - if (v.isValid()) { - QUiTranslatableStringValue tsv = qvariant_cast(v); - const QString text = QApplication::translate(class_name, - tsv.value(), tsv.comment(), - QCoreApplication::UnicodeUTF8); - item->setData(i, irs[j].realRole, text); - } - } - } - - cnt = item->childCount(); - for (int i = 0; i < cnt; ++i) - recursiveReTranslate(item->child(i), class_name); -} - -template -static void reTranslateWidgetItem(T *item, const QByteArray &class_name) -{ - const QUiItemRolePair *irs = qUiItemRoles; - - for (unsigned j = 0; irs[j].shadowRole >= 0; j++) { - QVariant v = item->data(irs[j].shadowRole); - if (v.isValid()) { - QUiTranslatableStringValue tsv = qvariant_cast(v); - const QString text = QApplication::translate(class_name, - tsv.value(), tsv.comment(), - QCoreApplication::UnicodeUTF8); - item->setData(irs[j].realRole, text); - } - } -} - -static void reTranslateTableItem(QTableWidgetItem *item, const QByteArray &class_name) -{ - if (item) - reTranslateWidgetItem(item, class_name); -} - -#define RETRANSLATE_SUBWIDGET_PROP(mainWidget, setter, propName) \ - do { \ - QVariant v = mainWidget->widget(i)->property(propName); \ - if (v.isValid()) { \ - QUiTranslatableStringValue tsv = qvariant_cast(v); \ - const QString text = QApplication::translate(m_className, \ - tsv.value(), tsv.comment(), \ - QCoreApplication::UnicodeUTF8); \ - mainWidget->setter(i, text); \ - } \ - } while (0) - -class TranslationWatcher: public QObject -{ - Q_OBJECT - -public: - TranslationWatcher(QObject *parent, const QByteArray &className): - QObject(parent), - m_className(className) - { - } - - virtual bool eventFilter(QObject *o, QEvent *event) - { - if (event->type() == QEvent::LanguageChange) { - foreach (const QByteArray &prop, o->dynamicPropertyNames()) { - if (prop.startsWith(PROP_GENERIC_PREFIX)) { - const QByteArray propName = prop.mid(sizeof(PROP_GENERIC_PREFIX) - 1); - const QUiTranslatableStringValue tsv = - qvariant_cast(o->property(prop)); - const QString text = QApplication::translate(m_className, - tsv.value(), tsv.comment(), - QCoreApplication::UnicodeUTF8); - o->setProperty(propName, text); - } - } - if (0) { -#ifndef QT_NO_TABWIDGET - } else if (QTabWidget *tabw = qobject_cast(o)) { - const int cnt = tabw->count(); - for (int i = 0; i < cnt; ++i) { - RETRANSLATE_SUBWIDGET_PROP(tabw, setTabText, PROP_TABPAGETEXT); -# ifndef QT_NO_TOOLTIP - RETRANSLATE_SUBWIDGET_PROP(tabw, setTabToolTip, PROP_TABPAGETOOLTIP); -# endif -# ifndef QT_NO_WHATSTHIS - RETRANSLATE_SUBWIDGET_PROP(tabw, setTabWhatsThis, PROP_TABPAGEWHATSTHIS); -# endif - } -#endif -#ifndef QT_NO_LISTWIDGET - } else if (QListWidget *listw = qobject_cast(o)) { - const int cnt = listw->count(); - for (int i = 0; i < cnt; ++i) - reTranslateWidgetItem(listw->item(i), m_className); -#endif -#ifndef QT_NO_TREEWIDGET - } else if (QTreeWidget *treew = qobject_cast(o)) { - if (QTreeWidgetItem *item = treew->headerItem()) - recursiveReTranslate(item, m_className); - const int cnt = treew->topLevelItemCount(); - for (int i = 0; i < cnt; ++i) { - QTreeWidgetItem *item = treew->topLevelItem(i); - recursiveReTranslate(item, m_className); - } -#endif -#ifndef QT_NO_TABLEWIDGET - } else if (QTableWidget *tablew = qobject_cast(o)) { - const int row_cnt = tablew->rowCount(); - const int col_cnt = tablew->columnCount(); - for (int j = 0; j < col_cnt; ++j) - reTranslateTableItem(tablew->horizontalHeaderItem(j), m_className); - for (int i = 0; i < row_cnt; ++i) { - reTranslateTableItem(tablew->verticalHeaderItem(i), m_className); - for (int j = 0; j < col_cnt; ++j) - reTranslateTableItem(tablew->item(i, j), m_className); - } -#endif -#ifndef QT_NO_COMBOBOX - } else if (QComboBox *combow = qobject_cast(o)) { - if (!qobject_cast(o)) { - const int cnt = combow->count(); - for (int i = 0; i < cnt; ++i) { - const QVariant v = combow->itemData(i, Qt::DisplayPropertyRole); - if (v.isValid()) { - QUiTranslatableStringValue tsv = qvariant_cast(v); - const QString text = QApplication::translate(m_className, - tsv.value(), tsv.comment(), - QCoreApplication::UnicodeUTF8); - combow->setItemText(i, text); - } - } - } -#endif -#ifndef QT_NO_TOOLBOX - } else if (QToolBox *toolw = qobject_cast(o)) { - const int cnt = toolw->count(); - for (int i = 0; i < cnt; ++i) { - RETRANSLATE_SUBWIDGET_PROP(toolw, setItemText, PROP_TOOLITEMTEXT); -# ifndef QT_NO_TOOLTIP - RETRANSLATE_SUBWIDGET_PROP(toolw, setItemToolTip, PROP_TOOLITEMTOOLTIP); -# endif - } -#endif - } - } - return false; - } - -private: - QByteArray m_className; -}; - -class FormBuilderPrivate: public QFormBuilder -{ - friend class QT_PREPEND_NAMESPACE(QUiLoader); - friend class QT_PREPEND_NAMESPACE(QUiLoaderPrivate); - typedef QFormBuilder ParentClass; - -public: - QUiLoader *loader; - - bool dynamicTr; - bool trEnabled; - - FormBuilderPrivate(): loader(0), dynamicTr(false), trEnabled(true), m_trwatch(0) {} - - QWidget *defaultCreateWidget(const QString &className, QWidget *parent, const QString &name) - { - return ParentClass::createWidget(className, parent, name); - } - - QLayout *defaultCreateLayout(const QString &className, QObject *parent, const QString &name) - { - return ParentClass::createLayout(className, parent, name); - } - - QAction *defaultCreateAction(QObject *parent, const QString &name) - { - return ParentClass::createAction(parent, name); - } - - QActionGroup *defaultCreateActionGroup(QObject *parent, const QString &name) - { - return ParentClass::createActionGroup(parent, name); - } - - virtual QWidget *createWidget(const QString &className, QWidget *parent, const QString &name) - { - if (QWidget *widget = loader->createWidget(className, parent, name)) { - widget->setObjectName(name); - return widget; - } - - return 0; - } - - virtual QLayout *createLayout(const QString &className, QObject *parent, const QString &name) - { - if (QLayout *layout = loader->createLayout(className, parent, name)) { - layout->setObjectName(name); - return layout; - } - - return 0; - } - - virtual QActionGroup *createActionGroup(QObject *parent, const QString &name) - { - if (QActionGroup *actionGroup = loader->createActionGroup(parent, name)) { - actionGroup->setObjectName(name); - return actionGroup; - } - - return 0; - } - - virtual QAction *createAction(QObject *parent, const QString &name) - { - if (QAction *action = loader->createAction(parent, name)) { - action->setObjectName(name); - return action; - } - - return 0; - } - - virtual void applyProperties(QObject *o, const QList &properties); - virtual QWidget *create(DomUI *ui, QWidget *parentWidget); - virtual QWidget *create(DomWidget *ui_widget, QWidget *parentWidget); - virtual bool addItem(DomWidget *ui_widget, QWidget *widget, QWidget *parentWidget); - -private: - QByteArray m_class; - TranslationWatcher *m_trwatch; -}; - -static QString convertTranslatable(const DomProperty *p, const QByteArray &className, - QUiTranslatableStringValue *strVal) -{ - if (p->kind() != DomProperty::String) - return QString(); - const DomString *dom_str = p->elementString(); - if (!dom_str) - return QString(); - if (dom_str->hasAttributeNotr()) { - const QString notr = dom_str->attributeNotr(); - if (notr == QLatin1String("yes") || notr == QLatin1String("true")) - return QString(); - } - strVal->setValue(dom_str->text().toUtf8()); - strVal->setComment(dom_str->attributeComment().toUtf8()); - if (strVal->value().isEmpty() && strVal->comment().isEmpty()) - return QString(); - return QApplication::translate(className, - strVal->value(), strVal->comment(), - QCoreApplication::UnicodeUTF8); -} - -void FormBuilderPrivate::applyProperties(QObject *o, const QList &properties) -{ - typedef QList DomPropertyList; - - QFormBuilder::applyProperties(o, properties); - - if (!m_trwatch) - m_trwatch = new TranslationWatcher(o, m_class); - - if (properties.empty()) - return; - - // Unlike string item roles, string properties are not loaded via the textBuilder - // (as they are "shadowed" by the property sheets in designer). So do the initial - // translation here. - bool anyTrs = false; - foreach (const DomProperty *p, properties) { - QUiTranslatableStringValue strVal; - const QString text = convertTranslatable(p, m_class, &strVal); - if (text.isEmpty()) - continue; - const QByteArray name = p->attributeName().toUtf8(); - if (dynamicTr) { - o->setProperty(PROP_GENERIC_PREFIX + name, QVariant::fromValue(strVal)); - anyTrs = trEnabled; - } - o->setProperty(name, text); - } - if (anyTrs) - o->installEventFilter(m_trwatch); -} - -QWidget *FormBuilderPrivate::create(DomUI *ui, QWidget *parentWidget) -{ - m_class = ui->elementClass().toUtf8(); - m_trwatch = 0; - setTextBuilder(new TranslatingTextBuilder(trEnabled, m_class)); - return QFormBuilder::create(ui, parentWidget); -} - -QWidget *FormBuilderPrivate::create(DomWidget *ui_widget, QWidget *parentWidget) -{ - QWidget *w = QFormBuilder::create(ui_widget, parentWidget); - if (w == 0) - return 0; - - if (0) { -#ifndef QT_NO_TABWIDGET - } else if (qobject_cast(w)) { -#endif -#ifndef QT_NO_LISTWIDGET - } else if (qobject_cast(w)) { -#endif -#ifndef QT_NO_TREEWIDGET - } else if (qobject_cast(w)) { -#endif -#ifndef QT_NO_TABLEWIDGET - } else if (qobject_cast(w)) { -#endif -#ifndef QT_NO_COMBOBOX - } else if (qobject_cast(w)) { - if (qobject_cast(w)) - return w; -#endif -#ifndef QT_NO_TOOLBOX - } else if (qobject_cast(w)) { -#endif - } else { - return w; - } - if (dynamicTr && trEnabled) - w->installEventFilter(m_trwatch); - return w; -} - -#define TRANSLATE_SUBWIDGET_PROP(mainWidget, attribute, setter, propName) \ - do { \ - if (const DomProperty *p##attribute = attributes.value(strings.attribute)) { \ - QUiTranslatableStringValue strVal; \ - const QString text = convertTranslatable(p##attribute, m_class, &strVal); \ - if (!text.isEmpty()) { \ - if (dynamicTr) \ - mainWidget->widget(i)->setProperty(propName, QVariant::fromValue(strVal)); \ - mainWidget->setter(i, text); \ - } \ - } \ - } while (0) - -bool FormBuilderPrivate::addItem(DomWidget *ui_widget, QWidget *widget, QWidget *parentWidget) -{ - if (parentWidget == 0) - return true; - - if (!ParentClass::addItem(ui_widget, widget, parentWidget)) - return false; - - // Check special cases. First: Custom container - const QString className = QLatin1String(parentWidget->metaObject()->className()); - if (!d->customWidgetAddPageMethod(className).isEmpty()) - return true; - - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - - if (0) { -#ifndef QT_NO_TABWIDGET - } else if (QTabWidget *tabWidget = qobject_cast(parentWidget)) { - const DomPropertyHash attributes = propertyMap(ui_widget->elementAttribute()); - const int i = tabWidget->count() - 1; - TRANSLATE_SUBWIDGET_PROP(tabWidget, titleAttribute, setTabText, PROP_TABPAGETEXT); -# ifndef QT_NO_TOOLTIP - TRANSLATE_SUBWIDGET_PROP(tabWidget, toolTipAttribute, setTabToolTip, PROP_TABPAGETOOLTIP); -# endif -# ifndef QT_NO_WHATSTHIS - TRANSLATE_SUBWIDGET_PROP(tabWidget, whatsThisAttribute, setTabWhatsThis, PROP_TABPAGEWHATSTHIS); -# endif -#endif -#ifndef QT_NO_TOOLBOX - } else if (QToolBox *toolBox = qobject_cast(parentWidget)) { - const DomPropertyHash attributes = propertyMap(ui_widget->elementAttribute()); - const int i = toolBox->count() - 1; - TRANSLATE_SUBWIDGET_PROP(toolBox, labelAttribute, setItemText, PROP_TOOLITEMTEXT); -# ifndef QT_NO_TOOLTIP - TRANSLATE_SUBWIDGET_PROP(toolBox, toolTipAttribute, setItemToolTip, PROP_TOOLITEMTOOLTIP); -# endif -#endif - } - - return true; -} - -#ifdef QFORMINTERNAL_NAMESPACE -} -#endif - -class QUiLoaderPrivate -{ -public: -#ifdef QFORMINTERNAL_NAMESPACE - QFormInternal::FormBuilderPrivate builder; -#else - FormBuilderPrivate builder; -#endif - - void setupWidgetMap() const; -}; - -void QUiLoaderPrivate::setupWidgetMap() const -{ - if (!g_widgets()->isEmpty()) - return; - -#define DECLARE_WIDGET(a, b) g_widgets()->insert(QLatin1String(#a), true); -#define DECLARE_LAYOUT(a, b) - -#include "widgets.table" - -#undef DECLARE_WIDGET -#undef DECLARE_WIDGET_1 -#undef DECLARE_LAYOUT -} - -/*! - \class QUiLoader - \inmodule QtUiTools - - \brief The QUiLoader class enables standalone applications to - dynamically create user interfaces at run-time using the - information stored in UI files or specified in plugin paths. - - In addition, you can customize or create your own user interface by - deriving your own loader class. - - If you have a custom component or an application that embeds \QD, you can - also use the QFormBuilder class provided by the QtDesigner module to create - user interfaces from UI files. - - The QUiLoader class provides a collection of functions allowing you to - create widgets based on the information stored in UI files (created - with \QD) or available in the specified plugin paths. The specified plugin - paths can be retrieved using the pluginPaths() function. Similarly, the - contents of a UI file can be retrieved using the load() function. For - example: - - \snippet doc/src/snippets/quiloader/mywidget.cpp 0 - - By including the user interface in the form's resources (\c myform.qrc), we - ensure that it will be present at run-time: - - \quotefile doc/src/snippets/quiloader/mywidget.qrc - - The availableWidgets() function returns a QStringList with the class names - of the widgets available in the specified plugin paths. To create these - widgets, simply use the createWidget() function. For example: - - \snippet doc/src/snippets/quiloader/main.cpp 0 - - To make a custom widget available to the loader, you can use the - addPluginPath() function; to remove all available widgets, you can call - the clearPluginPaths() function. - - The createAction(), createActionGroup(), createLayout(), and createWidget() - functions are used internally by the QUiLoader class whenever it has to - create an action, action group, layout, or widget respectively. For that - reason, you can subclass the QUiLoader class and reimplement these - functions to intervene the process of constructing a user interface. For - example, you might want to have a list of the actions created when loading - a form or creating a custom widget. - - For a complete example using the QUiLoader class, see the - \l{Calculator Builder Example}. - - \sa QtUiTools, QFormBuilder -*/ - -/*! - Creates a form loader with the given \a parent. -*/ -QUiLoader::QUiLoader(QObject *parent) - : QObject(parent), d_ptr(new QUiLoaderPrivate) -{ - Q_D(QUiLoader); - - d->builder.loader = this; - - QStringList paths; - foreach (const QString &path, QApplication::libraryPaths()) { - QString libPath = path; - libPath += QDir::separator(); - libPath += QLatin1String("designer"); - paths.append(libPath); - } - - d->builder.setPluginPath(paths); -} - -/*! - Destroys the loader. -*/ -QUiLoader::~QUiLoader() -{ -} - -/*! - Loads a form from the given \a device and creates a new widget with the - given \a parentWidget to hold its contents. - - \sa createWidget(), errorString() -*/ -QWidget *QUiLoader::load(QIODevice *device, QWidget *parentWidget) -{ - Q_D(QUiLoader); - // QXmlStreamReader will report errors on open failure. - if (!device->isOpen()) - device->open(QIODevice::ReadOnly|QIODevice::Text); - return d->builder.load(device, parentWidget); -} - -/*! - Returns a list naming the paths in which the loader will search when - locating custom widget plugins. - - \sa addPluginPath(), clearPluginPaths() -*/ -QStringList QUiLoader::pluginPaths() const -{ - Q_D(const QUiLoader); - return d->builder.pluginPaths(); -} - -/*! - Clears the list of paths in which the loader will search when locating - plugins. - - \sa addPluginPath(), pluginPaths() -*/ -void QUiLoader::clearPluginPaths() -{ - Q_D(QUiLoader); - d->builder.clearPluginPaths(); -} - -/*! - Adds the given \a path to the list of paths in which the loader will search - when locating plugins. - - \sa pluginPaths(), clearPluginPaths() -*/ -void QUiLoader::addPluginPath(const QString &path) -{ - Q_D(QUiLoader); - d->builder.addPluginPath(path); -} - -/*! - Creates a new widget with the given \a parent and \a name using the class - specified by \a className. You can use this function to create any of the - widgets returned by the availableWidgets() function. - - The function is also used internally by the QUiLoader class whenever it - creates a widget. Hence, you can subclass QUiLoader and reimplement this - function to intervene process of constructing a user interface or widget. - However, in your implementation, ensure that you call QUiLoader's version - first. - - \sa availableWidgets(), load() -*/ -QWidget *QUiLoader::createWidget(const QString &className, QWidget *parent, const QString &name) -{ - Q_D(QUiLoader); - return d->builder.defaultCreateWidget(className, parent, name); -} - -/*! - Creates a new layout with the given \a parent and \a name using the class - specified by \a className. - - The function is also used internally by the QUiLoader class whenever it - creates a widget. Hence, you can subclass QUiLoader and reimplement this - function to intervene process of constructing a user interface or widget. - However, in your implementation, ensure that you call QUiLoader's version - first. - - \sa createWidget(), load() -*/ -QLayout *QUiLoader::createLayout(const QString &className, QObject *parent, const QString &name) -{ - Q_D(QUiLoader); - return d->builder.defaultCreateLayout(className, parent, name); -} - -/*! - Creates a new action group with the given \a parent and \a name. - - The function is also used internally by the QUiLoader class whenever it - creates a widget. Hence, you can subclass QUiLoader and reimplement this - function to intervene process of constructing a user interface or widget. - However, in your implementation, ensure that you call QUiLoader's version - first. - - \sa createAction(), createWidget(), load() - */ -QActionGroup *QUiLoader::createActionGroup(QObject *parent, const QString &name) -{ - Q_D(QUiLoader); - return d->builder.defaultCreateActionGroup(parent, name); -} - -/*! - Creates a new action with the given \a parent and \a name. - - The function is also used internally by the QUiLoader class whenever it - creates a widget. Hence, you can subclass QUiLoader and reimplement this - function to intervene process of constructing a user interface or widget. - However, in your implementation, ensure that you call QUiLoader's version - first. - - \sa createActionGroup(), createWidget(), load() -*/ -QAction *QUiLoader::createAction(QObject *parent, const QString &name) -{ - Q_D(QUiLoader); - return d->builder.defaultCreateAction(parent, name); -} - -/*! - Returns a list naming all available widgets that can be built using the - createWidget() function, i.e all the widgets specified within the given - plugin paths. - - \sa pluginPaths(), createWidget() - -*/ -QStringList QUiLoader::availableWidgets() const -{ - Q_D(const QUiLoader); - - d->setupWidgetMap(); - widget_map available = *g_widgets(); - - foreach (QDesignerCustomWidgetInterface *plugin, d->builder.customWidgets()) { - available.insert(plugin->name(), true); - } - - return available.keys(); -} - - -/*! - \since 4.5 - Returns a list naming all available layouts that can be built using the - createLayout() function - - \sa createLayout() -*/ - -QStringList QUiLoader::availableLayouts() const -{ - QStringList rc; -#define DECLARE_WIDGET(a, b) -#define DECLARE_LAYOUT(a, b) rc.push_back(QLatin1String(#a)); - -#include "widgets.table" - -#undef DECLARE_WIDGET -#undef DECLARE_LAYOUT - return rc; -} - -/*! - Sets the working directory of the loader to \a dir. The loader will look - for other resources, such as icons and resource files, in paths relative to - this directory. - - \sa workingDirectory() -*/ - -void QUiLoader::setWorkingDirectory(const QDir &dir) -{ - Q_D(QUiLoader); - d->builder.setWorkingDirectory(dir); -} - -/*! - Returns the working directory of the loader. - - \sa setWorkingDirectory() -*/ - -QDir QUiLoader::workingDirectory() const -{ - Q_D(const QUiLoader); - return d->builder.workingDirectory(); -} - -/*! - \internal - \since 4.3 - - If \a enabled is true, the loader will be able to execute scripts. - Otherwise, execution of scripts will be disabled. - - \sa isScriptingEnabled() -*/ - -void QUiLoader::setScriptingEnabled(bool enabled) -{ - Q_D(QUiLoader); - d->builder.setScriptingEnabled(enabled); -} - -/*! - \internal - \since 4.3 - - Returns true if execution of scripts is enabled; returns false otherwise. - - \sa setScriptingEnabled() -*/ - -bool QUiLoader::isScriptingEnabled() const -{ - Q_D(const QUiLoader); - return d->builder.isScriptingEnabled(); -} - -/*! - \since 4.5 - - If \a enabled is true, user interfaces loaded by this loader will - automatically retranslate themselves upon receiving a language change - event. Otherwise, the user interfaces will not be retranslated. - - \sa isLanguageChangeEnabled() -*/ - -void QUiLoader::setLanguageChangeEnabled(bool enabled) -{ - Q_D(QUiLoader); - d->builder.dynamicTr = enabled; -} - -/*! - \since 4.5 - - Returns true if dynamic retranslation on language change is enabled; - returns false otherwise. - - \sa setLanguageChangeEnabled() -*/ - -bool QUiLoader::isLanguageChangeEnabled() const -{ - Q_D(const QUiLoader); - return d->builder.dynamicTr; -} - -/*! - \internal - \since 4.5 - - If \a enabled is true, user interfaces loaded by this loader will be - translated. Otherwise, the user interfaces will not be translated. - - \note This is orthogonal to languageChangeEnabled. - - \sa isLanguageChangeEnabled(), setLanguageChangeEnabled() -*/ - -void QUiLoader::setTranslationEnabled(bool enabled) -{ - Q_D(QUiLoader); - d->builder.trEnabled = enabled; -} - -/*! - \internal - \since 4.5 - - Returns true if translation is enabled; returns false otherwise. - - \sa setTranslationEnabled() -*/ - -bool QUiLoader::isTranslationEnabled() const -{ - Q_D(const QUiLoader); - return d->builder.trEnabled; -} - -/*! - Returns a human-readable description of the last error occurred in load(). - - \since 5.0 - \sa load() -*/ - -QString QUiLoader::errorString() const -{ - Q_D(const QUiLoader); - return d->builder.errorString(); -} - -QT_END_NAMESPACE - -#include "quiloader.moc" diff --git a/src/uitools/quiloader.h b/src/uitools/quiloader.h deleted file mode 100644 index 4adbb01c0e..0000000000 --- a/src/uitools/quiloader.h +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QUILOADER_H -#define QUILOADER_H - -#include -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class QWidget; -class QLayout; -class QAction; -class QActionGroup; -class QString; -class QIODevice; -class QDir; - -class QUiLoaderPrivate; -class QUiLoader : public QObject -{ - Q_OBJECT -public: - QUiLoader(QObject *parent = 0); - virtual ~QUiLoader(); - - QStringList pluginPaths() const; - void clearPluginPaths(); - void addPluginPath(const QString &path); - - QWidget *load(QIODevice *device, QWidget *parentWidget = 0); - QStringList availableWidgets() const; - QStringList availableLayouts() const; - - virtual QWidget *createWidget(const QString &className, QWidget *parent = 0, const QString &name = QString()); - virtual QLayout *createLayout(const QString &className, QObject *parent = 0, const QString &name = QString()); - virtual QActionGroup *createActionGroup(QObject *parent = 0, const QString &name = QString()); - virtual QAction *createAction(QObject *parent = 0, const QString &name = QString()); - - void setWorkingDirectory(const QDir &dir); - QDir workingDirectory() const; - - void setScriptingEnabled(bool enabled); - bool isScriptingEnabled() const; - - void setLanguageChangeEnabled(bool enabled); - bool isLanguageChangeEnabled() const; - - void setTranslationEnabled(bool enabled); - bool isTranslationEnabled() const; - - QString errorString() const; - -private: - QScopedPointer d_ptr; - Q_DECLARE_PRIVATE(QUiLoader) - Q_DISABLE_COPY(QUiLoader) -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QUILOADER_H diff --git a/src/uitools/quiloader_p.h b/src/uitools/quiloader_p.h deleted file mode 100644 index 3137e6fc8b..0000000000 --- a/src/uitools/quiloader_p.h +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QUILOADER_P_H -#define QUILOADER_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include - -// This file is here for use by the form preview in Linguist. If you change anything -// here or in the code which uses it, remember to adapt Linguist accordingly. - -#define PROP_GENERIC_PREFIX "_q_notr_" -#define PROP_TOOLITEMTEXT "_q_toolItemText_notr" -#define PROP_TOOLITEMTOOLTIP "_q_toolItemToolTip_notr" -#define PROP_TABPAGETEXT "_q_tabPageText_notr" -#define PROP_TABPAGETOOLTIP "_q_tabPageToolTip_notr" -#define PROP_TABPAGEWHATSTHIS "_q_tabPageWhatsThis_notr" - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class QUiTranslatableStringValue -{ -public: - QByteArray value() const { return m_value; } - void setValue(const QByteArray &value) { m_value = value; } - QByteArray comment() const { return m_comment; } - void setComment(const QByteArray &comment) { m_comment = comment; } - -private: - QByteArray m_value; - QByteArray m_comment; -}; - -struct QUiItemRolePair { - int realRole; - int shadowRole; -}; - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal -{ -#endif - -extern const QUiItemRolePair qUiItemRoles[]; - -#ifdef QFORMINTERNAL_NAMESPACE -} -#endif - -QT_END_NAMESPACE - -QT_END_HEADER - -Q_DECLARE_METATYPE(QUiTranslatableStringValue) - - -#endif // QUILOADER_P_H diff --git a/src/uitools/uitools.pro b/src/uitools/uitools.pro deleted file mode 100644 index be8c9c88a1..0000000000 --- a/src/uitools/uitools.pro +++ /dev/null @@ -1,59 +0,0 @@ -QPRO_PWD = $$PWD -TEMPLATE = lib -TARGET = $$qtLibraryTarget(QtUiTools) -QT = core - -CONFIG += qt staticlib module -MODULE = uitools -MODULE_PRI = ../modules/qt_uitools.pri \ - ../modules/qt_uilib.pri - -DESTDIR = $$QMAKE_LIBDIR_QT - -symbian { - TARGET.UID3 = 0x2001E628 - load(armcc_warnings) -} - -win32|mac:!macx-xcode:CONFIG += debug_and_release build_all - -DEFINES += QFORMINTERNAL_NAMESPACE QT_DESIGNER_STATIC QT_FORMBUILDER_NO_SCRIPT -isEmpty(QT_MAJOR_VERSION) { - VERSION=4.3.0 -} else { - VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} -} -load(qt_targets) -QMAKE_TARGET_PRODUCT = UiLoader -QMAKE_TARGET_DESCRIPTION = QUiLoader - -include(../../tools/uilib/uilib.pri) - -HEADERS += quiloader.h -SOURCES += quiloader.cpp - -include($$QT_BUILD_TREE/include/QtUiTools/headers.pri, "", true) -quitools_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES -quitools_headers.path = $$[QT_INSTALL_HEADERS]/QtUiTools -quitools_private_headers.files = $$SYNCQT.PRIVATE_HEADER_FILES -quitools_private_headers.path = $$[QT_INSTALL_HEADERS]/QtUiTools/$$QT.uitools.VERSION/QtUiTools/private -INSTALLS += quitools_headers quitools_private_headers - -# Uilib is from designer. -include($$QT_BUILD_TREE/include/QtDesigner/headers.pri, "", true) -quilib_headers.files = $$replace($$list($$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES), ^, ../../tools/uilib/) -quilib_headers.path = $$[QT_INSTALL_HEADERS]/QtDesigner -quilib_private_headers.files = $$replace($$list($$SYNCQT.PRIVATE_HEADER_FILES), ^, ../../tools/uilib/) -quilib_private_headers.path = $$[QT_INSTALL_HEADERS]/QtDesigner/$$QT.uilib.VERSION/QtDesigner/private -INSTALLS += quilib_headers quilib_private_headers - -target.path=$$[QT_INSTALL_LIBS] -INSTALLS += target - -unix|win32-g++* { - CONFIG += create_pc - QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS] - QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]/$$TARGET - QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS] - QMAKE_PKGCONFIG_DESTDIR = pkgconfig -} diff --git a/sync.profile b/sync.profile index e0d23ac3bf..7700a9fcc3 100644 --- a/sync.profile +++ b/sync.profile @@ -10,8 +10,6 @@ "QtNetwork" => "$basedir/src/network", "QtTest" => "$basedir/src/testlib", "QtDBus" => "$basedir/src/dbus", - "QtUiTools" => "$basedir/src/uitools", - "QtDesigner" => "$basedir/tools/uilib", "QtPlatformSupport" => "$basedir/src/platformsupport", ); %moduleheaders = ( # restrict the module headers to those found in relative path @@ -54,8 +52,6 @@ "network" => "#include \n", "opengl" => "#include \n", "xml" => "#include \n", - "uitools" => "#include \n", - "designer" => "#include \n", ); %modulepris = ( "QtCore" => "$basedir/src/modules/qt_core.pri", @@ -69,8 +65,6 @@ "QtTest" => "$basedir/src/modules/qt_testlib.pri", "QtV8" => "$basedir/src/modules/qt_v8.pri", "QtXml" => "$basedir/src/modules/qt_xml.pri", - "QtUiTools" => "$basedir/src/modules/qt_uitools.pri", - "QtDesigner" => "$basedir/src/modules/qt_uilib.pri", "QtPlatformSupport" => "$basedir/src/modules/qt_platformsupport.pri", ); diff --git a/tests/auto/compilerwarnings/data/test_cpp.txt b/tests/auto/compilerwarnings/data/test_cpp.txt index d1a5366c5d..4c3ab7131c 100644 --- a/tests/auto/compilerwarnings/data/test_cpp.txt +++ b/tests/auto/compilerwarnings/data/test_cpp.txt @@ -59,8 +59,6 @@ #include #endif -#include - #ifndef Q_OS_MAC int main(int, char **) { diff --git a/tests/auto/other/headersclean/headersclean.pro b/tests/auto/other/headersclean/headersclean.pro index d18dc1c0a2..39cce8cde0 100644 --- a/tests/auto/other/headersclean/headersclean.pro +++ b/tests/auto/other/headersclean/headersclean.pro @@ -1,7 +1,6 @@ load(qttest_p4) SOURCES += tst_headersclean.cpp QT = core network xml sql -CONFIG += uitools contains(QT_CONFIG,dbus): QT += dbus contains(QT_CONFIG,opengl): QT += opengl diff --git a/tests/auto/other/headersclean/tst_headersclean.cpp b/tests/auto/other/headersclean/tst_headersclean.cpp index 831e7fe50a..4cc11caf71 100644 --- a/tests/auto/other/headersclean/tst_headersclean.cpp +++ b/tests/auto/other/headersclean/tst_headersclean.cpp @@ -54,8 +54,6 @@ #include #include -#include - #ifndef QT_NO_OPENGL #include #endif @@ -72,4 +70,4 @@ public: }; QTEST_MAIN(tst_HeadersClean) -#include "tst_headersclean.moc" \ No newline at end of file +#include "tst_headersclean.moc" diff --git a/tests/auto/uiloader/.gitignore b/tests/auto/uiloader/.gitignore deleted file mode 100644 index a4b4e8f021..0000000000 --- a/tests/auto/uiloader/.gitignore +++ /dev/null @@ -1 +0,0 @@ -tst_uiloader diff --git a/tests/auto/uiloader/README.TXT b/tests/auto/uiloader/README.TXT deleted file mode 100644 index cbbf0ff774..0000000000 --- a/tests/auto/uiloader/README.TXT +++ /dev/null @@ -1,93 +0,0 @@ - ------------------------------------------------------------------------- - TESTING WIDGETS DEFINED IN *.UI FILES (SCREENSHOT COMPARISON) - ------------------------------------------------------------------------- - This test is based on dev/qt/tests/auto/atwrapper/ - - -HOW TO RUN THE TESTS - - Compile the necessary programs: - qmake - make - - Now there should be an executable 'uiloader'. - Run the tests: - ./uiloader - - - -CONFIGURATION - - The tests can be executed on different machines. For every machine there - is a config file .ini. - - If this file is not available the tests won't be run on the machine. - - Example kayak.ini: - - [General] - ftpBaseDir=/arthurtest - ftpHost=wartburg - ftpPass=anonymouspass - ftpUser=anonymous - output=testresults - - [engines] - 1\engine=uic - size=1 - - Don't modify the [engines] section. Later it will be used for styles. The - only thing you might want to modify is the ftpHost value. At the moment - wartburg is just a server on which we test the tests. - - The actual test server is: kramer.troll.no - - - -HOW IT WORKS - - There are 3 important folders: - - tst_uiloader/ Actual program executing the tests. - tst_screenshot/ Program to generate one *.png file out of *.ui - baseline/ This is a dir with *.ui files. - - ./uiloader (compiled from tst_uiloader) will use the tst_screenshot program - and the files in baseline/. - - In order to generate screenshots the *.ui files in baseline/ will be used. - Therefore a folder testresults/ (specified in the config) will be - created/used. - - Structure of testresults/: - - |-- testresults - | `-- i686 Linux g++-4 full-config That's buildKey(). - | `-- 4.5.0 Used Qt version. - | |-- uic Here are the generated images. - | |-- uic.baseline Baseline downloaded from server. - | |-- uic.diff Diff Images of failed tests. - | `-- uic.failed Generated images of failed tests. - - If there is no baseline at the server the results in uic/ will be uploaded - as a new baseline (first run for your machine). So to create a new baseline - on the server you just need to remove your folders there. - - On the server side there is a dir /arthurtest with following structure - (it will be created if it's not there): - - |-- arthurtest - | `-- - | `-- - | `-- - | |-- uic.baseline Baseline. - | |-- uic.diff Here the local diffs will be uploaded. - | `-- uic.failed Here the local failed files will be uploaded. - - After a test run the files in local uic.diff/ and uic.failed/ will be - uploaded to the server. - - For every run the uic.diff/ and uic.failed/ on the local and remote machine - will be cleared in order to place new files there. On the local side uic/ - gets cleared, too. - diff --git a/tests/auto/uiloader/WTC0090dca226c8.ini b/tests/auto/uiloader/WTC0090dca226c8.ini deleted file mode 100644 index 5cf6c4fee7..0000000000 --- a/tests/auto/uiloader/WTC0090dca226c8.ini +++ /dev/null @@ -1,11 +0,0 @@ -[General] -ftpBaseDir=/arthurtest -ftpHost=kramer-nokia.troll.no -ftpPass=anonymouspass -ftpUser=anonymous -output=testresults -threshold=20 - -[engines] -1\engine=uic -size=1 diff --git a/tests/auto/uiloader/baseline/Dialog_with_Buttons_Bottom.ui b/tests/auto/uiloader/baseline/Dialog_with_Buttons_Bottom.ui deleted file mode 100644 index 18d31ab915..0000000000 --- a/tests/auto/uiloader/baseline/Dialog_with_Buttons_Bottom.ui +++ /dev/null @@ -1,71 +0,0 @@ - - - - - Dialog - - - - 0 - 0 - 400 - 300 - - - - Dialog - - - - - 30 - 240 - 341 - 32 - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - buttonBox - accepted() - Dialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - Dialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/tests/auto/uiloader/baseline/Dialog_with_Buttons_Right.ui b/tests/auto/uiloader/baseline/Dialog_with_Buttons_Right.ui deleted file mode 100644 index 703d594f4f..0000000000 --- a/tests/auto/uiloader/baseline/Dialog_with_Buttons_Right.ui +++ /dev/null @@ -1,71 +0,0 @@ - - - - - Dialog - - - - 0 - 0 - 400 - 300 - - - - Dialog - - - - - 290 - 20 - 81 - 241 - - - - Qt::Vertical - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - buttonBox - accepted() - Dialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - Dialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/tests/auto/uiloader/baseline/Dialog_without_Buttons.ui b/tests/auto/uiloader/baseline/Dialog_without_Buttons.ui deleted file mode 100644 index 1be629818c..0000000000 --- a/tests/auto/uiloader/baseline/Dialog_without_Buttons.ui +++ /dev/null @@ -1,18 +0,0 @@ - - Dialog - - - - 0 - 0 - 400 - 300 - - - - Dialog - - - - - diff --git a/tests/auto/uiloader/baseline/Main_Window.ui b/tests/auto/uiloader/baseline/Main_Window.ui deleted file mode 100644 index e324db8292..0000000000 --- a/tests/auto/uiloader/baseline/Main_Window.ui +++ /dev/null @@ -1,27 +0,0 @@ - - - - - MainWindow - - - MainWindow - - - - 0 - 0 - 800 - 600 - - - - MainWindow - - - - - - - - diff --git a/tests/auto/uiloader/baseline/Widget.ui b/tests/auto/uiloader/baseline/Widget.ui deleted file mode 100644 index 9f6f60006c..0000000000 --- a/tests/auto/uiloader/baseline/Widget.ui +++ /dev/null @@ -1,41 +0,0 @@ - - Form - - - - 0 - 0 - 400 - 300 - - - - Form - - - - - - A label - - - - - - - A Group Box - - - - - - - PushButton - - - - - - - - diff --git a/tests/auto/uiloader/baseline/addlinkdialog.ui b/tests/auto/uiloader/baseline/addlinkdialog.ui deleted file mode 100644 index 3171159f97..0000000000 --- a/tests/auto/uiloader/baseline/addlinkdialog.ui +++ /dev/null @@ -1,112 +0,0 @@ - - AddLinkDialog - - - Insert Link - - - false - - - true - - - - - - - - Title: - - - - - - - - 337 - 0 - - - - - - - - URL: - - - - - - - - - - - - Qt::Vertical - - - - 0 - 0 - - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - AddLinkDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - AddLinkDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/tests/auto/uiloader/baseline/addtorrentform.ui b/tests/auto/uiloader/baseline/addtorrentform.ui deleted file mode 100644 index 950bb67119..0000000000 --- a/tests/auto/uiloader/baseline/addtorrentform.ui +++ /dev/null @@ -1,266 +0,0 @@ - - - - - AddTorrentFile - - - - 0 - 0 - 464 - 385 - - - - Add a torrent - - - false - - - true - - - - 8 - - - 6 - - - - - Select a torrent source - - - - 8 - - - 6 - - - - - Destination: - - - - - - - - - - Tracker URL: - - - - - - - Browse - - - true - - - - - - - File(s): - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - Size: - - - - - - - Creator: - - - - - - - Qt::NoFocus - - - true - - - QTextEdit::NoWrap - - - true - - - - - - - Qt::StrongFocus - - - - - - - <none> - - - - - - - Torrent file: - - - - - - - Browse - - - - - - - Comment: - - - - - - - <none> - - - - - - - <none> - - - - - - - 0 - - - - - - - - 10 - 40 - 364 - 33 - - - - - - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - - 131 - 31 - - - - - - - - false - - - &OK - - - - - - - &Cancel - - - - - - - - - - torrentFile - browseTorrents - torrentContents - destinationFolder - browseDestination - okButton - cancelButton - - - - - okButton - clicked() - AddTorrentFile - accept() - - - 278 - 253 - - - 96 - 254 - - - - - cancelButton - clicked() - AddTorrentFile - reject() - - - 369 - 253 - - - 179 - 282 - - - - - diff --git a/tests/auto/uiloader/baseline/authenticationdialog.ui b/tests/auto/uiloader/baseline/authenticationdialog.ui deleted file mode 100644 index 82d908cffb..0000000000 --- a/tests/auto/uiloader/baseline/authenticationdialog.ui +++ /dev/null @@ -1,129 +0,0 @@ - - Dialog - - - - 0 - 0 - 389 - 243 - - - - Http authentication required - - - - - - You need to supply a Username and a Password to access this site - - - false - - - - - - - Username: - - - - - - - - - - Password: - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - Site: - - - - - - - - 75 - true - - - - %1 at %2 - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - buttonBox - accepted() - Dialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - Dialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/tests/auto/uiloader/baseline/backside.ui b/tests/auto/uiloader/baseline/backside.ui deleted file mode 100644 index afa488c6f4..0000000000 --- a/tests/auto/uiloader/baseline/backside.ui +++ /dev/null @@ -1,208 +0,0 @@ - - BackSide - - - - 0 - 0 - 378 - 385 - - - - BackSide - - - - - - Settings - - - true - - - true - - - - - - Title: - - - - - - - Pad Navigator Example - - - - - - - Modified: - - - - - - - Extent - - - - - - - - - 42 - - - Qt::Horizontal - - - - - - - 42 - - - - - - - - - - - - - - - Other input - - - true - - - true - - - - - - - Widgets On Graphics View - - - - - QGraphicsProxyWidget - - - - QGraphicsWidget - - - - QObject - - - - - QGraphicsItem - - - - - QGraphicsLayoutItem - - - - - - - QGraphicsGridLayout - - - - QGraphicsLayout - - - - QGraphicsLayoutItem - - - - - - - QGraphicsLinearLayout - - - - QGraphicsLayout - - - - QGraphicsLayoutItem - - - - - - - - - - - - - groupBox - hostName - dateTimeEdit - horizontalSlider - spinBox - groupBox_2 - treeWidget - - - - - horizontalSlider - valueChanged(int) - spinBox - setValue(int) - - - 184 - 125 - - - 275 - 127 - - - - - spinBox - valueChanged(int) - horizontalSlider - setValue(int) - - - 272 - 114 - - - 190 - 126 - - - - - diff --git a/tests/auto/uiloader/baseline/batchtranslation.ui b/tests/auto/uiloader/baseline/batchtranslation.ui deleted file mode 100644 index 6cb2943606..0000000000 --- a/tests/auto/uiloader/baseline/batchtranslation.ui +++ /dev/null @@ -1,236 +0,0 @@ - - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - - databaseTranslationDialog - - - - 0 - 0 - 425 - 370 - - - - Qt Linguist - Batch Translation - - - - 9 - - - 6 - - - - - - 5 - 4 - 0 - 0 - - - - Options - - - - 9 - - - 6 - - - - - Only translate entries with no translation - - - true - - - - - - - Set translated entries to finished - - - true - - - - - - - - - - - 5 - 1 - 0 - 0 - - - - Phrase book preference - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - true - - - - - - - 0 - - - 6 - - - - - Move up - - - - - - - Move down - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - The batch translator will search through the selected phrasebooks in the order given above. - - - true - - - - - - - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - &Run - - - - - - - &Cancel - - - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/bookmarkdialog.ui b/tests/auto/uiloader/baseline/bookmarkdialog.ui deleted file mode 100644 index 2d6470c54c..0000000000 --- a/tests/auto/uiloader/baseline/bookmarkdialog.ui +++ /dev/null @@ -1,161 +0,0 @@ - - BookmarkDialog - - - - 0 - 0 - 450 - 135 - - - - - 0 - 0 - - - - Add Bookmark - - - - - - - - - - Bookmark: - - - - - - - Add in Folder: - - - - - - - - - - - - - - - - - - - - - - - - 25 - 20 - - - - + - - - - - - - Qt::Horizontal - - - - - - - - - true - - - - 0 - 0 - - - - - 1 - - - - - - - - - - New Folder - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - - BookmarkWidget - QTreeWidget -
bookmarkwidget.h
-
-
- - - - buttonBox - accepted() - BookmarkDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - BookmarkDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - -
diff --git a/tests/auto/uiloader/baseline/bookwindow.ui b/tests/auto/uiloader/baseline/bookwindow.ui deleted file mode 100644 index 659d324564..0000000000 --- a/tests/auto/uiloader/baseline/bookwindow.ui +++ /dev/null @@ -1,149 +0,0 @@ - - - - - BookWindow - - - - 0 - 0 - 601 - 420 - - - - Books - - - - - 9 - - - 6 - - - - - Books - - - - 9 - - - 6 - - - - - QAbstractItemView::SelectRows - - - - - - - Details - - - - - - <b>Title:</b> - - - - - - - true - - - - - - - <b>Author: </b> - - - - - - - true - - - - - - - <b>Genre:</b> - - - - - - - true - - - - - - - <b>Year:</b> - - - - - - - true - - - - - - 2100 - - - -1000 - - - - - - - <b>Rating:</b> - - - - - - - 5 - - - - - - - - - - - - - - - bookTable - titleEdit - authorEdit - genreEdit - yearEdit - - - - diff --git a/tests/auto/uiloader/baseline/browserwidget.ui b/tests/auto/uiloader/baseline/browserwidget.ui deleted file mode 100644 index 20946f0ede..0000000000 --- a/tests/auto/uiloader/baseline/browserwidget.ui +++ /dev/null @@ -1,199 +0,0 @@ - - - - - Browser - - - - 0 - 0 - 765 - 515 - - - - Qt SQL Browser - - - - 8 - - - 6 - - - - - - 7 - 7 - 0 - 0 - - - - Qt::Horizontal - - - - - 13 - 7 - 1 - 0 - - - - - - - 7 - 7 - 2 - 0 - - - - Qt::ActionsContextMenu - - - QAbstractItemView::SelectRows - - - - - - - - - 5 - 3 - 0 - 0 - - - - - 16777215 - 180 - - - - SQL Query - - - - 9 - - - 6 - - - - - - 7 - 3 - 0 - 0 - - - - - 0 - 18 - - - - - 0 - 120 - - - - - - - - 1 - - - 6 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - &Clear - - - - - - - &Submit - - - - - - - - - - - - false - - - &Insert Row - - - Inserts a new Row - - - - - false - - - &Delete Row - - - Deletes the current Row - - - - - - - ConnectionWidget - QTreeView -
connectionwidget.h
- 0 - -
-
- - sqlEdit - clearButton - submitButton - connectionWidget - table - - - -
diff --git a/tests/auto/uiloader/baseline/calculator.ui b/tests/auto/uiloader/baseline/calculator.ui deleted file mode 100644 index bb519ba2a6..0000000000 --- a/tests/auto/uiloader/baseline/calculator.ui +++ /dev/null @@ -1,406 +0,0 @@ - - Calculator - - - - 0 - 0 - 314 - 301 - - - - - 0 - 0 - - - - - 314 - 301 - - - - - 314 - 301 - - - - Calculator - - - - - 10 - 50 - 91 - 41 - - - - Backspace - - - - - - 110 - 50 - 91 - 41 - - - - Clear - - - - - - 210 - 50 - 91 - 41 - - - - Clear All - - - - - - 10 - 100 - 41 - 41 - - - - MC - - - - - - 10 - 150 - 41 - 41 - - - - MR - - - - - - 10 - 200 - 41 - 41 - - - - MS - - - - - - 10 - 250 - 41 - 41 - - - - M+ - - - - - - 60 - 100 - 41 - 41 - - - - 7 - - - - - - 110 - 100 - 41 - 41 - - - - 8 - - - - - - 160 - 100 - 41 - 41 - - - - 9 - - - - - - 60 - 150 - 41 - 41 - - - - 4 - - - - - - 110 - 150 - 41 - 41 - - - - 5 - - - - - - 160 - 150 - 41 - 41 - - - - 6 - - - - - - 60 - 200 - 41 - 41 - - - - 1 - - - - - - 110 - 200 - 41 - 41 - - - - 2 - - - - - - 160 - 200 - 41 - 41 - - - - 3 - - - - - - 60 - 250 - 41 - 41 - - - - 0 - - - - - - 110 - 250 - 41 - 41 - - - - . - - - - - - 160 - 250 - 41 - 41 - - - - +- - - - - - - 210 - 250 - 41 - 41 - - - - + - - - - - - 210 - 100 - 41 - 41 - - - - / - - - - - - 210 - 150 - 41 - 41 - - - - * - - - - - - 210 - 200 - 41 - 41 - - - - - - - - - - - 260 - 100 - 41 - 41 - - - - Sqrt - - - - - - 260 - 150 - 41 - 41 - - - - x^2 - - - - - - 260 - 200 - 41 - 41 - - - - 1/x - - - - - - 260 - 250 - 41 - 41 - - - - = - - - - - - 10 - 10 - 291 - 31 - - - - 15 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - - - - diff --git a/tests/auto/uiloader/baseline/calculatorform.ui b/tests/auto/uiloader/baseline/calculatorform.ui deleted file mode 100644 index dda0e62ddd..0000000000 --- a/tests/auto/uiloader/baseline/calculatorform.ui +++ /dev/null @@ -1,303 +0,0 @@ - - - - - CalculatorForm - - - CalculatorForm - - - - 0 - 0 - 276 - 98 - - - - - 5 - 5 - 0 - 0 - - - - Calculator Builder - - - - - - - 9 - - - 6 - - - - - - - - 1 - - - 6 - - - - - - - - 1 - - - 6 - - - - - label - - - - 1 - 1 - 45 - 19 - - - - Input 1 - - - - - - - inputSpinBox1 - - - - 1 - 26 - 45 - 25 - - - - true - - - - - - - - - label_3 - - - - 54 - 1 - 7 - 52 - - - - + - - - Qt::AlignCenter - - - - - - - - - - 1 - - - 6 - - - - - label_2 - - - - 1 - 1 - 45 - 19 - - - - Input 2 - - - - - - - inputSpinBox2 - - - - 1 - 26 - 45 - 25 - - - - true - - - - - - - - - label_3_2 - - - - 120 - 1 - 7 - 52 - - - - = - - - Qt::AlignCenter - - - - - - - - - - 1 - - - 6 - - - - - label_2_2_2 - - - - 1 - 1 - 37 - 17 - - - - Output - - - - - - - outputWidget - - - - 1 - 24 - 37 - 27 - - - - QFrame::Box - - - QFrame::Sunken - - - 0 - - - Qt::AlignAbsolute|Qt::AlignBottom|Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignHorizontal_Mask|Qt::AlignJustify|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing|Qt::AlignVCenter|Qt::AlignVertical_Mask - - - - - - - - - - - verticalSpacer - - - - 85 - 69 - 20 - 20 - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - horizontalSpacer - - - - 188 - 26 - 79 - 20 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/certificateinfo.ui b/tests/auto/uiloader/baseline/certificateinfo.ui deleted file mode 100644 index 3761fe8f50..0000000000 --- a/tests/auto/uiloader/baseline/certificateinfo.ui +++ /dev/null @@ -1,85 +0,0 @@ - - CertificateInfo - - - - 0 - 0 - 400 - 397 - - - - Display Certificate Information - - - - - - Certification Path - - - - - - - - - - - - Certificate Information - - - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - QDialogButtonBox::Close - - - - - - - - - - - buttonBox - clicked(QAbstractButton*) - CertificateInfo - accept() - - - 343 - 374 - - - 352 - 422 - - - - - diff --git a/tests/auto/uiloader/baseline/chatdialog.ui b/tests/auto/uiloader/baseline/chatdialog.ui deleted file mode 100644 index c85e0d0f55..0000000000 --- a/tests/auto/uiloader/baseline/chatdialog.ui +++ /dev/null @@ -1,79 +0,0 @@ - - ChatDialog - - - - 0 - 0 - 513 - 349 - - - - Chat - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - Qt::NoFocus - - - true - - - - - - - - 180 - 16777215 - - - - Qt::NoFocus - - - - - - - - - 0 - - - 6 - - - - - Message: - - - - - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/chatmainwindow.ui b/tests/auto/uiloader/baseline/chatmainwindow.ui deleted file mode 100644 index 0616dcb137..0000000000 --- a/tests/auto/uiloader/baseline/chatmainwindow.ui +++ /dev/null @@ -1,185 +0,0 @@ - - - - - ChatMainWindow - - - - 0 - 0 - 800 - 600 - - - - QtDBus Chat - - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - false - - - Messages sent and received from other users - - - true - - - - - - - 0 - - - 6 - - - - - Message: - - - messageLineEdit - - - - - - - - - - - 1 - 0 - 0 - 0 - - - - Sends a message to other people - - - - - - Send - - - - - - - - - - - - - 0 - 0 - 800 - 31 - - - - - Help - - - - - - File - - - - - - - - - - - - Quit - - - Ctrl+Q - - - - - About Qt... - - - - - Change nickname... - - - Ctrl+N - - - - - - chatHistory - messageLineEdit - sendButton - - - - - messageLineEdit - returnPressed() - sendButton - animateClick() - - - 299 - 554 - - - 744 - 551 - - - - - actionQuit - triggered(bool) - ChatMainWindow - close() - - - -1 - -1 - - - 399 - 299 - - - - - diff --git a/tests/auto/uiloader/baseline/chatsetnickname.ui b/tests/auto/uiloader/baseline/chatsetnickname.ui deleted file mode 100644 index fb9894e09f..0000000000 --- a/tests/auto/uiloader/baseline/chatsetnickname.ui +++ /dev/null @@ -1,149 +0,0 @@ - - - - - NicknameDialog - - - - 0 - 0 - 396 - 105 - - - - - 1 - 1 - 0 - 0 - - - - Set nickname - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - - 1 - 1 - 0 - 0 - - - - New nickname: - - - - - - - - - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - - 131 - 31 - - - - - - - - OK - - - - - - - Cancel - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - okButton - clicked() - NicknameDialog - accept() - - - 278 - 253 - - - 96 - 254 - - - - - cancelButton - clicked() - NicknameDialog - reject() - - - 369 - 253 - - - 179 - 282 - - - - - diff --git a/tests/auto/uiloader/baseline/config.ui b/tests/auto/uiloader/baseline/config.ui deleted file mode 100644 index bebe17b41f..0000000000 --- a/tests/auto/uiloader/baseline/config.ui +++ /dev/null @@ -1,2528 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - Config - - - - 0 - 0 - 600 - 650 - - - - Configure - - - true - - - - 6 - - - 8 - - - 8 - - - 8 - - - 8 - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Size - - - - 6 - - - 11 - - - 11 - - - 11 - - - 11 - - - - - 176x220 "SmartPhone" - - - - - - - 240x320 "PDA" - - - - - - - 320x240 "TV" / "QVGA" - - - - - - - 640x480 "VGA" - - - - - - - 800x600 - - - - - - - 1024x768 - - - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Custom - - - - - - - 1 - - - 1280 - - - 16 - - - 400 - - - - - - - 1 - - - 1024 - - - 16 - - - 300 - - - - - - - - - - - - Depth - - - - 6 - - - 11 - - - 11 - - - 11 - - - 11 - - - - - 1 bit monochrome - - - - - - - 4 bit grayscale - - - - - - - 8 bit - - - - - - - 12 (16) bit - - - - - - - 15 bit - - - - - - - 16 bit - - - - - - - 18 bit - - - - - - - 24 bit - - - - - - - 32 bit - - - - - - - 32 bit ARGB - - - - - - - - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Skin - - - - - - - - 0 - 0 - - - - - None - - - - - - - - - - Emulate touch screen (no mouse move) - - - - - - - Emulate LCD screen (Only with fixed zoom of 3.0 times magnification) - - - - - - - Qt::Vertical - - - - 20 - 10 - - - - - - - - - 0 - 0 - - - - <p>Note that any applications using the virtual framebuffer will be terminated if you change the Size or Depth <i>above</i>. You may freely modify the Gamma <i>below</i>. - - - true - - - - - - - Gamma - - - - 11 - - - 11 - - - 11 - - - 11 - - - 6 - - - 6 - - - - - Blue - - - - - - - - - - - - 128 - 128 - 128 - - - - - - - 0 - 0 - 255 - - - - - - - 127 - 127 - 255 - - - - - - - 38 - 38 - 255 - - - - - - - 0 - 0 - 127 - - - - - - - 0 - 0 - 170 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 220 - 220 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - 10 - 95 - 137 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - - 128 - 128 - 128 - - - - - - - 0 - 0 - 255 - - - - - - - 127 - 127 - 255 - - - - - - - 38 - 38 - 255 - - - - - - - 0 - 0 - 127 - - - - - - - 0 - 0 - 170 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 220 - 220 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - 10 - 95 - 137 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - - 128 - 128 - 128 - - - - - - - 0 - 0 - 255 - - - - - - - 127 - 127 - 255 - - - - - - - 38 - 38 - 255 - - - - - - - 0 - 0 - 127 - - - - - - - 0 - 0 - 170 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 220 - 220 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - 10 - 95 - 137 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - 400 - - - 100 - - - Qt::Horizontal - - - - - - - 1.0 - - - - - - - Green - - - - - - - - - - - - 128 - 128 - 128 - - - - - - - 0 - 255 - 0 - - - - - - - 127 - 255 - 127 - - - - - - - 38 - 255 - 38 - - - - - - - 0 - 127 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 220 - 220 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - 10 - 95 - 137 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - - 128 - 128 - 128 - - - - - - - 0 - 255 - 0 - - - - - - - 127 - 255 - 127 - - - - - - - 38 - 255 - 38 - - - - - - - 0 - 127 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 220 - 220 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - 10 - 95 - 137 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - - 128 - 128 - 128 - - - - - - - 0 - 255 - 0 - - - - - - - 127 - 255 - 127 - - - - - - - 38 - 255 - 38 - - - - - - - 0 - 127 - 0 - - - - - - - 0 - 170 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 220 - 220 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - 10 - 95 - 137 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - 400 - - - 100 - - - Qt::Horizontal - - - - - - - 1.0 - - - - - - - All - - - - - - - 1.0 - - - - - - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 127 - 127 - - - - - - - 170 - 170 - 170 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 220 - 220 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - 10 - 95 - 137 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 127 - 127 - - - - - - - 170 - 170 - 170 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 220 - 220 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - 10 - 95 - 137 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 127 - 127 - - - - - - - 170 - 170 - 170 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 220 - 220 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - 10 - 95 - 137 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - 400 - - - 100 - - - Qt::Horizontal - - - - - - - Red - - - - - - - 1.0 - - - - - - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 0 - 0 - - - - - - - 255 - 127 - 127 - - - - - - - 255 - 38 - 38 - - - - - - - 127 - 0 - 0 - - - - - - - 170 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 220 - 220 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - 10 - 95 - 137 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 0 - 0 - - - - - - - 255 - 127 - 127 - - - - - - - 255 - 38 - 38 - - - - - - - 127 - 0 - 0 - - - - - - - 170 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 220 - 220 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - 10 - 95 - 137 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 0 - 0 - - - - - - - 255 - 127 - 127 - - - - - - - 255 - 38 - 38 - - - - - - - 127 - 0 - 0 - - - - - - - 170 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 128 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 220 - 220 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - 10 - 95 - 137 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 232 - 232 - 232 - - - - - - - - 400 - - - 100 - - - Qt::Horizontal - - - - - - - Set all to 1.0 - - - - - - - - - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - &OK - - - true - - - true - - - - - - - &Cancel - - - true - - - - - - - - - - - GammaView - -
gammaview.h
-
-
- - - - size_width - valueChanged(int) - size_custom - click() - - - 152 - 193 - - - 94 - 199 - - - - - size_height - valueChanged(int) - size_custom - click() - - - 259 - 196 - - - 64 - 188 - - - - -
diff --git a/tests/auto/uiloader/baseline/connectdialog.ui b/tests/auto/uiloader/baseline/connectdialog.ui deleted file mode 100644 index bd062ebaaf..0000000000 --- a/tests/auto/uiloader/baseline/connectdialog.ui +++ /dev/null @@ -1,150 +0,0 @@ - - ConnectDialog - - - - 0 - 0 - 585 - 361 - - - - Configure Connection - - - - - - GroupBox - - - - - - Qt::ElideMiddle - - - - - - - - - Edit... - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - GroupBox - - - - - - Qt::ElideMiddle - - - - - - - - - Edit... - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - Show signals and slots inherited from QWidget - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - ConnectDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - ConnectDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/tests/auto/uiloader/baseline/controller.ui b/tests/auto/uiloader/baseline/controller.ui deleted file mode 100644 index 379015bf30..0000000000 --- a/tests/auto/uiloader/baseline/controller.ui +++ /dev/null @@ -1,64 +0,0 @@ - - Controller - - - - 0 - 0 - 255 - 111 - - - - Controller - - - - 9 - - - 6 - - - - - Controller - - - Qt::AlignCenter - - - - - - - Decelerate - - - - - - - Accelerate - - - - - - - Right - - - - - - - Left - - - - - - - - diff --git a/tests/auto/uiloader/baseline/cookies.ui b/tests/auto/uiloader/baseline/cookies.ui deleted file mode 100644 index c4bccc5483..0000000000 --- a/tests/auto/uiloader/baseline/cookies.ui +++ /dev/null @@ -1,106 +0,0 @@ - - CookiesDialog - - - - 0 - 0 - 550 - 370 - - - - Cookies - - - - - - Qt::Horizontal - - - - 252 - 20 - - - - - - - - - - - - - - - - &Remove - - - - - - - Remove &All Cookies - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - QDialogButtonBox::Ok - - - - - - - - - - SearchLineEdit - QLineEdit -
searchlineedit.h
-
- - EditTableView - QTableView -
edittableview.h
-
-
- - - - buttonBox - accepted() - CookiesDialog - accept() - - - 472 - 329 - - - 461 - 356 - - - - -
diff --git a/tests/auto/uiloader/baseline/cookiesexceptions.ui b/tests/auto/uiloader/baseline/cookiesexceptions.ui deleted file mode 100644 index 3d9ef62414..0000000000 --- a/tests/auto/uiloader/baseline/cookiesexceptions.ui +++ /dev/null @@ -1,184 +0,0 @@ - - CookiesExceptionsDialog - - - - 0 - 0 - 466 - 446 - - - - Cookie Exceptions - - - - - - New Exception - - - - - - - - Domain: - - - - - - - - - - - - - - Qt::Horizontal - - - - 81 - 25 - - - - - - - - false - - - Block - - - - - - - false - - - Allow For Session - - - - - - - false - - - Allow - - - - - - - - - - - - Exceptions - - - - - - Qt::Horizontal - - - - 252 - 20 - - - - - - - - - - - - - - &Remove - - - - - - - Remove &All - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Ok - - - - - - - - SearchLineEdit - QLineEdit -
searchlineedit.h
-
- - EditTableView - QTableView -
edittableview.h
-
-
- - - - buttonBox - accepted() - CookiesExceptionsDialog - accept() - - - 381 - 428 - - - 336 - 443 - - - - -
diff --git a/tests/auto/uiloader/baseline/css_borderimage.ui b/tests/auto/uiloader/baseline/css_borderimage.ui deleted file mode 100644 index 4a59ca2e08..0000000000 --- a/tests/auto/uiloader/baseline/css_borderimage.ui +++ /dev/null @@ -1,125 +0,0 @@ - - - Form - - - - 0 - 0 - 530 - 309 - - - - Form - - - QLabel { border-width: 28; color: #0f0; background-color: white; } - -#label_repeat_repeat { - border-image: url("images/borderimage.png") 28 repeat repeat; -} - -#label_stretch_repeat { - border-image: url("images/borderimage.png") 28 stretch repeat; -} - -#label_round_repeat { - border-image: url("images/borderimage.png") 28 round repeat; -} - - -#label_repeat_round { - border-image: url("images/borderimage.png") 28 repeat round; -} - -#label_stretch_round { - border-image: url("images/borderimage.png") 28 stretch round; -} - -#label_round_round { - border-image: url("images/borderimage.png") 28 round round; -} - -#label_repeat_stretch { - border-image: url("images/borderimage.png") 28 repeat stretch; -} - -#label_stretch_stretch { - border-image: url("images/borderimage.png") 28 stretch stretch; -} - -#label_round_stretch { - border-image: url("images/borderimage.png") 28 round stretch; -} - - - - - - - Strecth Stretch - - - - - - - Stretch Round - - - - - - - Stretch repeat - - - - - - - Round Stretch - - - - - - - Round Round - - - - - - - Round Repeat - - - - - - - Repeat Stretch - - - - - - - Repeat Round - - - - - - - Repeat Repeat - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_borderimage_allwidgets.ui b/tests/auto/uiloader/baseline/css_borderimage_allwidgets.ui deleted file mode 100644 index 0ece79a08a..0000000000 --- a/tests/auto/uiloader/baseline/css_borderimage_allwidgets.ui +++ /dev/null @@ -1,247 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 606 - 388 - - - - MainWindow - - - * { border-image: url("images/pushbutton.png") 6 6 6 6; border-width:6px; } - - - - - - - - - - - - Each widget should have a background image. including the top level - - - true - - - - - - - PushButton - - - - - - - 24 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - PushButton - - - - - - - - - - RadioButton - - - - - - - true - - - - - 0 - 0 - 260 - 197 - - - - - - - Qt::Horizontal - - - - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - CheckBox - - - - - - - CheckBox - - - - - - - - - - - - - - GroupBox - - - - - - CheckBox - - - - - - - Line Edit - - - - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - - - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - 0 - 0 - 606 - 36 - - - - - File - - - - - - - Edit - - - - - - - - - Open - - - - - Close - - - - - - diff --git a/tests/auto/uiloader/baseline/css_borderradius_allwidgets.ui b/tests/auto/uiloader/baseline/css_borderradius_allwidgets.ui deleted file mode 100644 index 8c5f57cb13..0000000000 --- a/tests/auto/uiloader/baseline/css_borderradius_allwidgets.ui +++ /dev/null @@ -1,458 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 698 - 589 - - - - MainWindow - - - * { - background: yellow; - padding: 2px; - border-radius: 4px; -} - -QGroupBox { - border: 1px solid gray; -} - -QAbstractButton { - background: cyan; -} - -QFrame, QMenuBar { - background: magenta; -} - -QLineEdit, QSpinBox { - background: white; -} - -#gb1 * { -} - -#gb2 * { - border: 1px solid blue; -} - -#gb3 * { - border: 0px solid blue; -} - -#gb4 * { - border-image: url("images/pushbutton.png") 6 6 6 6; - border-width:6px; -} - - - - - - - - No border - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - PushButton - - - - - - - - - - RadioButton - - - - - - - CheckBox - - - - - - - LineEdit - - - - - - - - ComboBox - - - - - - - - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - - - - - - - 0px border - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - PushButton - - - - - - - - - - RadioButton - - - - - - - CheckBox - - - - - - - LineEdit - - - - - - - - ComboBox - - - - - - - - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - - - - - - - border-image - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - PushButton - - - - - - - - - - RadioButton - - - - - - - CheckBox - - - - - - - LineEdit - - - - - - - - ComboBox - - - - - - - - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - - - - - - - 1px border - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - PushButton - - - - - - - - - - RadioButton - - - - - - - CheckBox - - - - - - - LineEdit - - - - - - - - ComboBox - - - - - - - - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - - - - - - - - - 0 - 0 - 698 - 24 - - - - - File - - - - - - - Edit - - - - - - - - - Open - - - - - Close - - - - - - diff --git a/tests/auto/uiloader/baseline/css_buttons_background.ui b/tests/auto/uiloader/baseline/css_buttons_background.ui deleted file mode 100644 index 3d80aeb4b4..0000000000 --- a/tests/auto/uiloader/baseline/css_buttons_background.ui +++ /dev/null @@ -1,271 +0,0 @@ - - - Dialog - - - - 0 - 0 - 449 - 254 - - - - Dialog - - - #box_color QAbstractButton { -background: pink; -color: purple; -} - -#box_gradiant QAbstractButton { - background-color: qconicalgradient(cx:0.5, cy:0.5, angle:0, stop:0 rgba(255, 255, 255, 255), stop:0.373979 rgba(255, 255, 255, 255), stop:0.373991 rgba(33, 30, 255, 255), stop:0.624018 rgba(33, 30, 255, 255), stop:0.624043 rgba(255, 0, 0, 255), stop:1 rgba(255, 0, 0, 255)); -color: cyan; -} - -#box_pixmap QAbstractButton { -background: url("images/pagefold.png") no-repeat top right; -color: yellow; -} - - - - - - - - color - - - - - - PushButton - - - - - - - ... - - - - - - - Qt::Horizontal - - - - 70 - 27 - - - - - - - - CheckBox - - - - - - - RadioButton - - - - - - - autoraise - - - true - - - - - - - Checked - - - true - - - true - - - - - - - - - - gradiant - - - - - - PushButton - - - - - - - ... - - - - - - - Qt::Horizontal - - - - 78 - 24 - - - - - - - - CheckBox - - - - - - - RadioButton - - - - - - - autoraise - - - true - - - - - - - Checked - - - true - - - true - - - - - - - - - - pixmap - - - - - - PushButton - - - - - - - ... - - - - - - - Qt::Horizontal - - - - 78 - 24 - - - - - - - - CheckBox - - - - - - - RadioButton - - - - - - - autoraise - - - true - - - - - - - Checked - - - true - - - true - - - - - - - - - - Qt::Vertical - - - - 20 - 51 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_combobox_background.ui b/tests/auto/uiloader/baseline/css_combobox_background.ui deleted file mode 100644 index 387b371976..0000000000 --- a/tests/auto/uiloader/baseline/css_combobox_background.ui +++ /dev/null @@ -1,306 +0,0 @@ - - - Dialog - - - - 0 - 0 - 295 - 229 - - - - Dialog - - - #box_color QComboBox { -background: pink; -color: purple; -} - -#box_gradiant QComboBox { - background-color: qconicalgradient(cx:0.5, cy:0.5, angle:0, stop:0 rgba(255, 255, 255, 255), stop:0.373979 rgba(255, 255, 255, 255), stop:0.373991 rgba(33, 30, 255, 255), stop:0.624018 rgba(33, 30, 255, 255), stop:0.624043 rgba(255, 0, 0, 255), stop:1 rgba(255, 0, 0, 255)); -color: cyan; -} - -#box_pixmap QAbstractButton { -background: url("images/pagefold.png") no-repeat top right; -color: yellow; -} - -#comboBox_A , #comboBox_B{ border: 3px solid #4e5; } - - - - - - - - color - - - false - - - - - - false - - - - Foo - - - - - Bar - - - - - Bouz - - - - - - - - - Foo - - - - - Bar - - - - - Bouz - - - - - - - - true - - - - Foo - - - - - Bar - - - - - Bouz - - - - - - - - - Foo - - - - - Bar - - - - - Bouz - - - - - - - - - ComboText - - - - - Bar - - - - - Bouz - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - color - - - false - - - - - - false - - - - Foo - - - - - Bar - - - - - Bouz - - - - - - - - - Foo - - - - - Bar - - - - - Bouz - - - - - - - - true - - - - Foo - - - - - Bar - - - - - Bouz - - - - - - - - - Foo - - - - - Bar - - - - - Bouz - - - - - - - - - ComboText - - - - - Bar - - - - - Bouz - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_exemple_coffee.ui b/tests/auto/uiloader/baseline/css_exemple_coffee.ui deleted file mode 100644 index 619f912a99..0000000000 --- a/tests/auto/uiloader/baseline/css_exemple_coffee.ui +++ /dev/null @@ -1,469 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 400 - 413 - - - - Style Sheet - - - .QWidget { - background-color: beige; -} - -/* Nice Windows-XP-style password character. */ -QLineEdit[echoMode="2"] { - lineedit-password-character: 9679; -} - -/* We provide a min-width and min-height for push buttons - so that they look elegant regardless of the width of the text. */ -QPushButton { - background-color: palegoldenrod; - border-width: 2px; - border-color: darkkhaki; - border-style: solid; - border-radius: 5; - padding: 3px; - min-width: 9ex; - min-height: 2.5ex; -} - -QPushButton:hover { - background-color: khaki; -} - -/* Increase the padding, so the text is shifted when the button is - pressed. */ -QPushButton:pressed { - padding-left: 5px; - padding-top: 5px; - background-color: #d0d67c; -} - -QLabel, QAbstractButton { - font: bold; -} - -/* Mark mandatory fields with a brownish color. */ -.mandatory { - color: brown; -} - -/* Bold text on status bar looks awful. */ -QStatusBar QLabel { - font: normal; -} - -QStatusBar::item { - border-width: 1; - border-color: darkkhaki; - border-style: solid; - border-radius: 2; -} - -QComboBox, QLineEdit, QSpinBox, QTextEdit, QListView { - background-color: cornsilk; - selection-color: #0a214c; - selection-background-color: #C19A6B; -} - -QListView { - show-decoration-selected: 1; -} - -QListView::item:hover { - background-color: wheat; -} - -/* We reserve 1 pixel space in padding. When we get the focus, - we kill the padding and enlarge the border. This makes the items - glow. */ -QLineEdit, QFrame { - border-width: 2px; - padding: 1px; - border-style: solid; - border-color: darkkhaki; - border-radius: 5px; -} - -/* As mentioned above, eliminate the padding and increase the border. */ -QLineEdit:focus, QFrame:focus { - border-width: 3px; - padding: 0px; -} - -/* A QLabel is a QFrame ... */ -QLabel { - border: none; - padding: 0; - background: none; -} - -/* A QToolTip is a QLabel ... */ -QToolTip { - border: 2px solid darkkhaki; - padding: 5px; - border-radius: 3px; - opacity: 200; -} - -/* Nice to have the background color change when hovered. */ -QRadioButton:hover, QCheckBox:hover { - background-color: wheat; -} - -/* Force the dialog's buttons to follow the Windows guidelines. */ -QDialogButtonBox { - button-layout: 0; -} - - - - - - - - 6 - - - 9 - - - - - QFrame::StyledPanel - - - - 9 - - - 6 - - - - - Please read the LICENSE file before checking - - - I &accept the terms and &conditions - - - - - - - Profession: - - - Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing - - - professionList - - - - - - - &Name: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - nameCombo - - - - - - - Check this if you are male - - - &Male - - - - - - - &Password: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - passwordEdit - - - - - - - Specify country of origin - - - Specify country of origin - - - 6 - - - - Egypt - - - - - France - - - - - Germany - - - - - India - - - - - Italy - - - - - Norway - - - - - Pakistan - - - - - - - - &Age: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - ageSpinBox - - - - - - - Country: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - countryCombo - - - - - - - Gender: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Specify your password - - - Specify your password - - - Password - - - QLineEdit::Password - - - - - - - Check this if you are female - - - &Female - - - - - - - Specify your age - - - Specify your age - - - 12 - - - 22 - - - - - - - Specify your name - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 61 - 20 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - Select your profession - - - Specify your name here - - - Specify your name here - - - 0 - - - - Developer - - - - - Student - - - - - Fisherman - - - - - - - - - - - - - 0 - 0 - 400 - 31 - - - - - &File - - - - - - - - &Help - - - - - - - - - - - &Exit - - - - - About Qt - - - - - Edit &Style... - - - - - About - - - - - - diff --git a/tests/auto/uiloader/baseline/css_exemple_pagefold.ui b/tests/auto/uiloader/baseline/css_exemple_pagefold.ui deleted file mode 100644 index d23fad34c4..0000000000 --- a/tests/auto/uiloader/baseline/css_exemple_pagefold.ui +++ /dev/null @@ -1,656 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 426 - 413 - - - - Style Sheet - - - /* Customize any plain widget that is a child of a QMainWindow. */ -QMainWindow > .QWidget { - background-color: gainsboro; - background-image: url(images/pagefold.png); - background-position: top right; - background-repeat: no-repeat -} - -/* Provide a padding for the layout inside the frame. The frame - exists only to provide a padding for the top-right image, so we - explicitly disable the border. */ -#mainFrame { - padding-right: 30px; - border-style: none; - border-image: none; /* since we set a border-image below */ -} - -/* mainFrame won't have this border-image since we have - explicitly set it to 'none' using a more specific selector. */ -QFrame, QLineEdit, QComboBox[editable="true"], QSpinBox { - border-image: url(images/frame.png) 4; - border-width: 3; -} - -QLabel { - border: none; - border-image: none; - padding: 0; - background: none; -} - -/* Make text in message boxes selectable. */ -QMessageBox { - /* LinksAccessibleByMouse | TextSelectableByMouse */ - messagebox-text-interaction-flags: 5; -} - -/* Set the selection colors for all widgets. */ -QWidget { - selection-color: black; - selection-background-color: Silver; - color: black; -} - -/* Make the entire row selected in item views. */ -QAbstractItemView { - show-decoration-selected: 1; -} - -/* Nice WindowsXP-style password character for password line edits. */ -QLineEdit[echoMode="2"] { - lineedit-password-character: 9679; -} - -/* Customize tooltips. */ -QToolTip { - background-color: rgb(200,200,255); - border-color: darkslategray; - border-width: 1px; - border-style: solid; - padding: 3px; - font: bold; - border-radius: 3px; - opacity: 200; -} - -/* Customize radio buttons. */ - -QRadioButton { - spacing: 5px; -} - -QRadioButton::indicator { - width: 13px; - height: 13px; -} - -QRadioButton::indicator::unchecked { - image: url(images/radiobutton_unchecked.png); -} - -QRadioButton::indicator:unchecked:hover { - image: url(images/radiobutton_unchecked_hover.png); -} - -QRadioButton::indicator:unchecked:pressed { - image: url(images/radiobutton_unchecked_pressed.png); -} - -QRadioButton::indicator::checked { - image: url(images/radiobutton_checked.png); -} - -QRadioButton::indicator:checked:hover { - image: url(images/radiobutton_checked_hover.png); -} - -QRadioButton::indicator:checked:pressed { - image: url(images/radiobutton_checked_pressed.png); -} - -/* Customize arrows. */ - -*::down-arrow, *::menu-indicator { - image: url(images/down_arrow.png); - width: 7px; - height: 7px; -} - -*::down-arrow:disabled, *::down-arrow:off { - image: url(images/down_arrow_disabled.png); -} - -*::up-arrow { - image: url(images/up_arrow.png); - width: 7px; - height: 7px; -} - -*::up-arrow:disabled, *::up-arrow:off { - image: url(images/up_arrow_disabled.png); -} - -/* Customize push buttons and comboboxes. Our read-only combobox - is very similar to a push button, so they share the same border image. */ - -QPushButton { - min-width: 4em; -} - -QPushButton, QComboBox[editable="false"], -QComboBox[editable="true"]::drop-down { - border-image: url(images/pushbutton.png) 5; - border-width: 5; -} - -QPushButton:hover, QComboBox[editable="false"]:hover, -QComboBox[editable="true"]::drop-down:hover, QMenuBar::item:hover { - border-image: url(images/pushbutton_hover.png) 5; - border-width: 5; -} - -QPushButton:pressed, QComboBox[editable="false"]:on, -QComboBox[editable="true"]::drop-down:on, QMenuBar::item:on { - border-image: url(images/pushbutton_pressed.png) 5; - border-width: 5; -} - -/* Customize read-only comboboxes. */ - -QComboBox[editable="false"] { - padding-left: 3px; - padding-right: 20px; /* space for the arrow */ -} - -QComboBox[editable="false"]::drop-down { - subcontrol-origin: padding; - subcontrol-position: top right; - width: 15px; - border-left-style: solid; - border-left-color: darkgray; - border-left-width: 1px; -} - -QComboBox[editable="false"]::down-arrow { - subcontrol-origin: content; - subcontrol-position: center; - position: relative; - left: 1px; /* 1 pixel dropdown border */ -} - -/* The combobox arrow is on when the popup is open. */ -QComboBox[editable="false"]::down-arrow:on { - position: relative; - top: 1px; - left: 2px; -} - -/* Customize editable comboboxes. */ - -QComboBox[editable="true"] { - padding-right: 16px; -} - -QComboBox[editable="true"]::drop-down { - subcontrol-origin: border; - subcontrol-position: top right; - width: 13px; - position: absolute; - top: 2px; - bottom: 2px; - right: 2px; -} - -QComboBox[editable="true"]::drop-down, -QComboBox[editable="true"]::drop-down:hover, -QComboBox[editable="true"]::drop-down:on { - border-width: 0px; - border-left-width: 3px; /* we need only left and center part */ -} - -/* Shift the arrow when it's open. */ -QComboBox[editable="true"]::down-arrow:on { - position: relative; - top: 1px; - left: 1px; -} - -/* Customize check boxes. */ -QCheckBox { - spacing: 5px; -} - -QCheckBox::indicator { - width: 13px; - height: 13px; -} - -QCheckBox::indicator:unchecked { - image: url(images/checkbox_unchecked.png); -} - -QCheckBox::indicator:unchecked:hover { - image: url(images/checkbox_unchecked_hover.png); -} - -QCheckBox::indicator:unchecked:pressed { - image: url(images/checkbox_unchecked_pressed.png); -} - -QCheckBox::indicator:checked { - image: url(images/checkbox_checked.png); -} - -QCheckBox::indicator:checked:hover { - image: url(images/checkbox_checked_hover.png); -} - -QCheckBox::indicator:checked:pressed { - image: url(images/checkbox_checked_pressed.png); -} - -/* Customize the size grip. */ -QSizeGrip { - image: url(images/sizegrip.png); - width: 16px; - height: 16px; -} - -/* Customize the menu bar. */ -QMenuBar { - border-image: none; - border-style: none; - border-width: 1px; - border-bottom-style: solid; - border-bottom-color: darkslategray; - padding: 2px; -} - -/* Customize spin boxes. */ - -QSpinBox { - padding-right: 15px; -} - -QSpinBox::up-button { - subcontrol-origin: border; - subcontrol-position: top right; - - width: 16px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */ - border-image: url(images/spinup.png) 1; - border-width: 1px; -} - -QSpinBox::up-button:hover { - border-image: url(images/spinup_hover.png) 1; -} - -QSpinBox::up-button:pressed { - border-image: url(images/spinup_pressed.png) 1; -} - -QSpinBox::down-button { - subcontrol-origin: border; - subcontrol-position: bottom right; - - width: 16px; - border-image: url(images/spindown.png) 1; - border-width: 1px; - border-top-width: 0; -} - -QSpinBox::down-button:hover { - border-image: url(images/spindown_hover.png) 1; -} - -QSpinBox::down-button:pressed { - border-image: url(images/spindown_pressed.png) 1; -} - - - - - - 6 - - - 9 - - - - - QFrame::StyledPanel - - - - 9 - - - 6 - - - - - Please read the LICENSE file before checking - - - I &accept the terms and &conditions - - - - - - - Profession: - - - Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing - - - professionList - - - - - - - &Name: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - nameCombo - - - - - - - Check this if you are male - - - &Male - - - - - - - &Password: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - passwordEdit - - - - - - - Specify country of origin - - - Specify country of origin - - - 6 - - - - Egypt - - - - - France - - - - - Germany - - - - - India - - - - - Italy - - - - - Norway - - - - - Pakistan - - - - - - - - &Age: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - ageSpinBox - - - - - - - Country: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - countryCombo - - - - - - - Gender: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Specify your password - - - Specify your password - - - Password - - - QLineEdit::Password - - - - - - - Check this if you are female - - - &Female - - - - - - - Specify your age - - - Specify your age - - - 12 - - - 22 - - - - - - - Specify your name - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 61 - 20 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - Select your profession - - - Specify your name here - - - Specify your name here - - - 0 - - - - Developer - - - - - Student - - - - - Fisherman - - - - - - - - - - - - - 0 - 0 - 426 - 29 - - - - - &File - - - - - - - - &Help - - - - - - - - - - - &Exit - - - - - About Qt - - - - - Edit &Style... - - - - - About - - - - - - diff --git a/tests/auto/uiloader/baseline/css_exemple_usage.ui b/tests/auto/uiloader/baseline/css_exemple_usage.ui deleted file mode 100644 index 0ddd2ed79e..0000000000 --- a/tests/auto/uiloader/baseline/css_exemple_usage.ui +++ /dev/null @@ -1,91 +0,0 @@ - - - Form - - - - 0 - 0 - 322 - 203 - - - - Form - - - QPushButton#evilButton { - background-color: red; - border-style: outset; - border-width: 2px; - border-radius: 10px; - border-color: beige; - font: bold 14px; - min-width: 10em; - padding: 6px; - } - QPushButton#evilButton:pressed { - background-color: rgb(224, 0, 0); - border-style: inset; - } - -QLineEdit { color: red } - QLineEdit[readOnly="true"] { color: gray } - - - - - - - Format C: - - - - - - - Qt::Horizontal - - - - 95 - 20 - - - - - - - - Foo - - - - - - - ReadOnly - - - true - - - - - - - Qt::Vertical - - - - 20 - 102 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_frames.ui b/tests/auto/uiloader/baseline/css_frames.ui deleted file mode 100644 index d1397bb1de..0000000000 --- a/tests/auto/uiloader/baseline/css_frames.ui +++ /dev/null @@ -1,319 +0,0 @@ - - - Form - - - - 0 - 0 - 884 - 327 - - - - Form - - - QLabel -{ - border: 2px dashed rgb(0, 85, 255) -} - -QGroupBox .QFrame { -margin: 20px 10px 5px 0px; -padding: 0px 10px 15px 20px; -} - -QGroupBox { -border: 5px solid white; -} - -#line1 { background-color: yellow; } -#line2 { background-color: pink; } -#line1, #line2 { - border: 1px solid rgb(170, 85, 255); -} - - -QFrame::no-frame { - background: orange; - border-color: #000; - } - - - - - - - - GroupBox - - - false - - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - Styled - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - Box - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - - - None - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - QFrame::StyledPanel - - - - - - Box Plain - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - Panel - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - - - - WinPanel - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - Qt::Vertical - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - 0 - - - This test that all the frame style can handle margins and paddings correctly - (and the background of this label should be orange) - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_groupboxes.ui b/tests/auto/uiloader/baseline/css_groupboxes.ui deleted file mode 100644 index 7f5464aa5e..0000000000 --- a/tests/auto/uiloader/baseline/css_groupboxes.ui +++ /dev/null @@ -1,150 +0,0 @@ - - - Form - - - - 0 - 0 - 400 - 300 - - - - Form - - - #groupBox_1:checked { color:magenta; } - -#groupBox_2 { background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(0, 0, 0, 255), stop:0.05 rgba(14, 8, 73, 255), stop:0.36 rgba(28, 17, 145, 255), stop:0.6 rgba(126, 14, 81, 255), stop:0.75 rgba(234, 11, 11, 255), stop:0.79 rgba(244, 70, 5, 255), stop:0.86 rgba(255, 136, 0, 255), stop:0.935 rgba(239, 236, 55, 255)); -color: rgb(33, 255, 181); } - -#groupBox_3 { padding: 20px; margin: 20px; } -#groupBox_3 QLabel { background-color: #46e; } - -#groupBox_4::title { subcontrol-position: bottom left; border: 1px solid white;} - -#groupBox_5::indicator {border: 1px solid white;} - -#groupBox_6 { border: 5px dashed pink;} - - - - - - GroupBox - - - true - - - - - - TextLabel - - - - - - - - - - GroupBox - - - true - - - - - - TextLabel - - - - - - - - - - GroupBox - - - true - - - - - - TextLabel - - - - - - - - - - GroupBox - - - true - - - - - - TextLabel - - - - - - - - - - GroupBox - - - true - - - - - - TextLabel - - - - - - - - - - GroupBox - - - true - - - - - - TextLabel - - - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_itemview_task258382.ui b/tests/auto/uiloader/baseline/css_itemview_task258382.ui deleted file mode 100644 index 11c56b4ba2..0000000000 --- a/tests/auto/uiloader/baseline/css_itemview_task258382.ui +++ /dev/null @@ -1,179 +0,0 @@ - - - Form - - - - 0 - 0 - 437 - 352 - - - - Form - - - ::item { border: 1px solid black; background-color: purple; } -::item {margin-left: 20px; } - -QAbstractItemView { selection-background-color: red; -show-decoration- selected: 0; - } - -::item:selected { background-color: yellow; } - - - - - - - 1 - - - - - New Column - - - - - New Item - - - - - New Item - - - - - New Item - - - - New Subitem - - - - New Subitem - - - - - New Item - - - - - New Item - - - - - - - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Column - - - - - New Column - - - - - New Column - - - - - New Column - - - - - mljkh mh mjl - - - - - h jlh mjklh - - - - - mjklh mlhj mjlh m - - - - - mlhj lmhj - - - - - mlkj l - - - - - mlkj - - - - - mlkj lmkj - - - - - mlkhj mlh - - - - - mlkj lmkj - - - - - mlkj lmkj - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_qprogressbar.ui b/tests/auto/uiloader/baseline/css_qprogressbar.ui deleted file mode 100644 index 6b3e2f0e9e..0000000000 --- a/tests/auto/uiloader/baseline/css_qprogressbar.ui +++ /dev/null @@ -1,125 +0,0 @@ - - - Form - - - - 0 - 0 - 326 - 170 - - - - Form - - - - - - QProgressBar { - border: 2px solid grey; - border-radius: 5px; - } - - QProgressBar::chunk { - background-color: #05B8CC; - width: 20px; - } - - QProgressBar { - border: 2px solid grey; - border-radius: 5px; - text-align: center; - } - - - 24 - - - - - - - QProgressBar::chunk { - background-color: #CD96CD; - width: 10px; - margin: 0.5px; - } - - QProgressBar { - border: 2px solid grey; - border-radius: 5px; - text-align: center; - } - - - 24 - - - - - - - QProgressBar:horizontal {border: 1px solid gray; border-radius: 3px; background: white; padding: 1px; } - QProgressBar::chunk:horizontal { background: qlineargradient(x1: 0, y1: 0.5, x2: 1, y2: 0.5, stop: 0 green, stop: 1 lightgrey);} - - - 25 - - - 100 - - - 75 - - - - - - - - - QProgressBar::chunk { -background: -qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, -stop:0 rgba(0, 0, 0,0), stop:0.5 rgba(235, 148, 61, 255), stop:1 rgba(0, 0, 0, 0)) ; - - width: 100px; - - } - - QProgressBar { - border: 2px dashed grey; - border-radius: 5px; - } - - - 0 - - - 0 - - - -1 - - - - - - - Qt::Vertical - - - - 20 - 41 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_qtabwidget.ui b/tests/auto/uiloader/baseline/css_qtabwidget.ui deleted file mode 100644 index 7c2d24f3af..0000000000 --- a/tests/auto/uiloader/baseline/css_qtabwidget.ui +++ /dev/null @@ -1,224 +0,0 @@ - - - Form - - - - 0 - 0 - 400 - 300 - - - - Form - - - - - - - - - QTabWidget::pane { / * The tab widget frame * / - border-top: 2px solid #C2C7CB; - } - - QTabWidget::tab-bar { - left: 5px; / * move to the right by 5px * / - } - - / * Style the tab using the tab sub-control. Note that - it reads QTabBar _not_ QTabWidget * / - QTabBar::tab { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #E1E1E1, stop: 0.4 #DDDDDD, - stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3); - border: 2px solid #C4C4C3; - border-bottom-color: #C2C7CB; / * same as the pane color * / - border-top-left-radius: 4px; - border-top-right-radius: 4px; - min-width: 8ex; - padding: 2px; - } - - QTabBar::tab:selected, QTabBar::tab:hover { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #fafafa, stop: 0.4 #f4f4f4, - stop: 0.5 #e7e7e7, stop: 1.0 #fafafa); - } - - QTabBar::tab:selected { - border-color: #9B9B9B; - border-bottom-color: #C2C7CB; / * same as pane color * / - } - - QTabBar::tab:!selected { - margin-top: 2px; / * make non-selected tabs look smaller * / - } - - - - - - 1 - - - - Tab 1 - - - - - Tab 2 - - - - - - - - - - - - - QTabWidget::pane { / * The tab widget frame * / - border-top: 2px solid #C2C7CB; - } - - QTabWidget::tab-bar { - left: 5px; / * move to the right by 5px * / - } - - / * Style the tab using the tab sub-control. Note that - it reads QTabBar _not_ QTabWidget * / - QTabBar::tab { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #E1E1E1, stop: 0.4 #DDDDDD, - stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3); - border: 2px solid #C4C4C3; - border-bottom-color: #C2C7CB; / * same as the pane color * / - border-top-left-radius: 4px; - border-top-right-radius: 4px; - min-width: 8ex; - padding: 2px; - } - - QTabBar::tab:selected, QTabBar::tab:hover { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #fafafa, stop: 0.4 #f4f4f4, - stop: 0.5 #e7e7e7, stop: 1.0 #fafafa); - } - - QTabBar::tab:selected { - border-color: #9B9B9B; - border-bottom-color: #C2C7CB; / * same as pane color * / - } - - QTabBar::tab:!selected { - margin-top: 2px; / * make non-selected tabs look smaller * / - } - - / * make use of negative margins for overlapping tabs * / - QTabBar::tab:selected { - / * expand/overlap to the left and right by 4px * / - margin-left: -4px; - margin-right: -4px; - } - - QTabBar::tab:first:selected { - margin-left: 0; / * the first selected tab has nothing to overlap with on the left * / - } - - QTabBar::tab:last:selected { - margin-right: 0; / * the last selected tab has nothing to overlap with on the right * / - } - - QTabBar::tab:only-one { - margin: 0; / * if there is only one tab, we don't want overlapping margins * / - } - - - 1 - - - - Tab 1 - - - - - Tab 2 - - - - - - - - - - - - - QTabWidget::pane { / * The tab widget frame * / - border-top: 2px solid #C2C7CB; - position: absolute; - top: -0.5em; - } - - QTabWidget::tab-bar { - alignment: center; - } - - / * Style the tab using the tab sub-control. Note that - it reads QTabBar _not_ QTabWidget * / - QTabBar::tab { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #E1E1E1, stop: 0.4 #DDDDDD, - stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3); - border: 2px solid #C4C4C3; - border-bottom-color: #C2C7CB; / * same as the pane color * / - border-top-left-radius: 4px; - border-top-right-radius: 4px; - min-width: 8ex; - padding: 2px; - } - - QTabBar::tab:selected, QTabBar::tab:hover { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #fafafa, stop: 0.4 #f4f4f4, - stop: 0.5 #e7e7e7, stop: 1.0 #fafafa); - } - - QTabBar::tab:selected { - border-color: #9B9B9B; - border-bottom-color: #C2C7CB; / * same as pane color * / - } - - - 1 - - - - Tab 1 - - - - - Tab 2 - - - - - - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_qtbug6855.ui b/tests/auto/uiloader/baseline/css_qtbug6855.ui deleted file mode 100644 index 0727f6ba99..0000000000 --- a/tests/auto/uiloader/baseline/css_qtbug6855.ui +++ /dev/null @@ -1,57 +0,0 @@ - - - Form - - - - 0 - 0 - 212 - 108 - - - - Form - - - QPushButton { padding: 20px; } - - - - - - Text not cropped - - - - - - - Qt::Horizontal - - - - 258 - 20 - - - - - - - - Qt::Vertical - - - - 20 - 218 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_qtbug7737_borderimageradius.ui b/tests/auto/uiloader/baseline/css_qtbug7737_borderimageradius.ui deleted file mode 100644 index 089cb76a1e..0000000000 --- a/tests/auto/uiloader/baseline/css_qtbug7737_borderimageradius.ui +++ /dev/null @@ -1,44 +0,0 @@ - - - Form - - - - 0 - 0 - 207 - 69 - - - - Form - - - QPushButton { border-image: url("images/pushbutton.png") 5 5 5 5; border-radius:8px; } - - - - - - Border image and radius - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_scroll.ui b/tests/auto/uiloader/baseline/css_scroll.ui deleted file mode 100644 index 6ac688604f..0000000000 --- a/tests/auto/uiloader/baseline/css_scroll.ui +++ /dev/null @@ -1,601 +0,0 @@ - - - Form - - - - 0 - 0 - 393 - 347 - - - - Form - - - QScrollArea { background:red; - border: 5px dashed blue; } -QScrollArea .QWidget { background:transparent; - border: 5px dotted green;} -QScrollArea::corner { background:yellow; } - - - QScrollBar:horizontal { - border: 2px solid green; - background: cyan; - height: 15px; - margin: 0px 40px 0 0px; - } - - QScrollBar::handle:horizontal { - background: gray; - min-width: 20px; - } - - QScrollBar::add-line:horizontal { - background: blue; - width: 16px; - subcontrol-position: right; - subcontrol-origin: margin; - border: 2px solid black; - } - - QScrollBar::sub-line:horizontal { - background: magenta; - width: 16px; - subcontrol-position: top right; - subcontrol-origin: margin; - border: 2px solid black; - position: absolute; - right: 20px; - } - - QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal { - width: 3px; - height: 3px; - background: pink; - } - - QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { - background: none; - } - - - - QScrollBar:vertical { - border: 2px solid grey; - background: #32CC99; - width: 15px; - margin: 20px 0px 20px 0px; - } - QScrollBar::handle:vertical { - background: white; - min-height: 20px; - } - QScrollBar::add-line:vertical { - border: 2px solid grey; - background: #32CC99; - height: 20px; - subcontrol-position: bottom; - subcontrol-origin: margin; - } - - QScrollBar::sub-line:vertical { - border: 2px solid grey; - background: #32CC99; - height: 20px; - subcontrol-position: top; - subcontrol-origin: margin; - } - - QScrollBar:left-arrow:vertical, QScrollBar::right-arrow:vertical { - border: 2px solid grey; - width: 3px; - height: 3px; - background: white; - } - - QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { - background: none; - } - - - - - - - - - - true - - - - - 0 - 0 - 520 - 532 - - - - - - - GroupBox - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - Qt::Vertical - - - - 20 - 81 - - - - - - - - - - - GroupBox - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - - - - GroupBox - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - - - - - - GroupBox - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - - - - GroupBox - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - - - - GroupBox - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - - - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_scrollarea_base.ui b/tests/auto/uiloader/baseline/css_scrollarea_base.ui deleted file mode 100644 index 495401f407..0000000000 --- a/tests/auto/uiloader/baseline/css_scrollarea_base.ui +++ /dev/null @@ -1,197 +0,0 @@ - - - Form - - - - 0 - 0 - 407 - 339 - - - - Form - - - QAbstractScrollArea { border: 2px dashed #e12; } -QHeaderView { border-color: blue; } - - - - - - - - Note that the task 257517 requires to scroll down, and check that the backgroud is still filled with the base color (white by default) - -x -x - -x -x - -x -x - -x -x - - - - - - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Row - - - - - New Column - - - - - New Column - - - - - New Column - - - - - New Column - - - - - New Column - - - - - New Column - - - - - New Column - - - - - New Column - - - - - New Column - - - - - New Column - - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'DejaVu Sans'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">x</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">x</p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">x</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">x</p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">x</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">x</p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">x</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">x</p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">x</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">x</p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_splitter.ui b/tests/auto/uiloader/baseline/css_splitter.ui deleted file mode 100644 index 99dbc180a9..0000000000 --- a/tests/auto/uiloader/baseline/css_splitter.ui +++ /dev/null @@ -1,63 +0,0 @@ - - - Form - - - - 0 - 0 - 424 - 364 - - - - Form - - - QSplitter::handle:vertical { - image: url(images/splitter_horizontal.png); - } - - QSplitter::handle:horizontal { - image: url(images/splitter_vertical.png); - } - -#big_splitter::handle { background-color: blue; border: 3px dashed green; height:50px; } - - - QSplitter::handle:hover { - background-color: qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 0, 0, 255), stop:0.17 rgba(255, 0, 0, 255), stop:0.18 rgba(255, 255, 255, 255), stop:0.210212 rgba(255, 255, 255, 255), stop:0.220212 rgba(0, 16, 255, 255), stop:0.279897 rgba(0, 16, 255, 255), stop:0.289897 rgba(255, 255, 255, 255), stop:0.32 rgba(255, 255, 255, 255), stop:0.33 rgba(255, 0, 0, 255), stop:1 rgba(255, 0, 0, 255)) - } - - QSplitter::handle:pressed { - background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(9, 41, 4, 255), stop:0.085 rgba(2, 79, 0, 255), stop:0.19 rgba(50, 147, 22, 255), stop:0.275 rgba(236, 191, 49, 255), stop:0.39 rgba(243, 61, 34, 255), stop:0.555 rgba(135, 81, 60, 255), stop:0.667 rgba(121, 75, 255, 255), stop:0.825 rgba(164, 255, 244, 255), stop:0.885 rgba(104, 222, 71, 255), stop:1 rgba(93, 128, 0, 255)); - } - - - - - - Qt::Horizontal - - - - Qt::Vertical - - - - - - - - Qt::Vertical - - - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_tab_border.ui b/tests/auto/uiloader/baseline/css_tab_border.ui deleted file mode 100644 index cefb9d8fd9..0000000000 --- a/tests/auto/uiloader/baseline/css_tab_border.ui +++ /dev/null @@ -1,104 +0,0 @@ - - - Form - - - - 0 - 0 - 379 - 277 - - - - Form - - - #tabWidget QTabBar::tab { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #E1E1E1, stop: 0.4 #DDDDDD, - stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3); - border: 2px solid #C4C4C3; - border-bottom-color: #C2C7CB; /* same as the pane color */ - border-top-left-radius: 4px; - border-top-right-radius: 4px; - padding: 2px; - } - -#tabWidget_2 QTabBar::tab { - border: 3px solid red; - } - -#tabWidget_3 QTabBar::tab { - margin: 5px; - } - - - - - - - - - 1 - - - true - - - - Tab 1 - - - - - Tab 2 - - - - - - - - 1 - - - false - - - - Tab 1 - - - - - Tab 2 - - - - - - - - 1 - - - true - - - - Tab 1 - - - - - Tab 2 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_tab_closebutton.ui b/tests/auto/uiloader/baseline/css_tab_closebutton.ui deleted file mode 100644 index 82bd2b5502..0000000000 --- a/tests/auto/uiloader/baseline/css_tab_closebutton.ui +++ /dev/null @@ -1,128 +0,0 @@ - - - Form - - - - 0 - 0 - 400 - 300 - - - - Form - - - *{} - -#tabWidget QTabBar::close-button -{ - background: blue; - border: 2px dotted red; - subcontrol-position: top; -} - - -#tabWidget_2 QTabBar::close-button -{ - image: url(images/checkbox_checked.png); - subcontrol-position: left; -} - -#tabWidget_2 QTabBar::close-button:hover -{ - image: url(images/checkbox_unchecked_hover.png); -} - - -#tabWidget_3 QTabBar::close-button -{ - border-image: url(images/pushbutton.png) 3px; - border-width:3px; -} - - - - - - - - - true - - - - Tab 1 - - - - - - Test the close button in the tabbar - - - true - - - - - - - - Tab 2 - - - - - - - - QTabWidget::East - - - 0 - - - true - - - - Tab 1 - - - - - Tab 2 - - - - - - - - QTabWidget::South - - - 0 - - - true - - - - Tab 1 - - - - - Tab 2 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_tab_task213374.ui b/tests/auto/uiloader/baseline/css_tab_task213374.ui deleted file mode 100644 index f3567aede0..0000000000 --- a/tests/auto/uiloader/baseline/css_tab_task213374.ui +++ /dev/null @@ -1,306 +0,0 @@ - - Dialog - - - - 0 - 0 - 400 - 646 - - - - Dialog - - - - - - -QTabBar::tab:bottom { - - min-width: 15px; - padding: 3px 15px 3px 10px; - border: 1px solid #7f7f7f; - - background: qlineargradient(x1: 0, y1: 1, x2: 0,y2: 0, - stop: .3 #FFFFFF, stop: 1 #909090); - border-bottom-right-radius: 35px 21px; - -} -QTabBar::tab:left { - padding: 10px 3px 15px 3px; - border: 1px solid #7f7f7f; - border-left-width: 0px; - background: qlineargradient(x1: 1, y1: 0, x2: 0,y2: 0, - stop: .3 #FFFFFF, stop: 1 #909090); - border-bottom-right-radius: 21px 35px; - margin-right: 2px; -} -QTabBar:right {subcontrol-origin: padding;} -QTabBar::tab:right { - padding: 10px 3px 15px 5px; - border: 1px solid #7f7f7f; - background: qlineargradient(x1: 0, y1: 0, x2: 1,y2: 0, - stop: .3 #FFFFFF, stop: 1 #909090); - border-bottom-left-radius: 21px 35px; - margin-left: 2px; -} -QTabBar::tab:bottom:!last { margin-right: -10px;} -QTabBar::tab:left:!last { margin-bottom: -10px;} -QTabBar::tab:right:!last { margin-bottom: -10px;} - -QTabBar::tab:bottom:selected { - background: qlineargradient(x1: 0, y1: 1, x2: 0,y2: 0, - stop: .3 #CFCFCF, stop: 1 #FFFFFF); -} -QTabBar::tab:left:selected { - background: qlineargradient(x1: 1, y1: 0, x2: 0,y2: 0, - stop: .3 #DFDFDF, stop: 1 #F0F0F0); -} -QTabBar::tab:right:selected { - background: qlineargradient(x1: 0, y1: 0, x2: 1,y2: 0, - stop: .3 #DFDFDF, stop: 1 #F0F0F0); -} - - - - - - QTabWidget::South - - - 3 - - - - Tab 1 - - - - - Page - - - - - Page - - - - - Tab 2 - - - - - - - - -QTabBar::tab:bottom { - - min-width: 15px; - padding: 3px 15px 3px 10px; - border: 1px solid #7f7f7f; - - background: qlineargradient(x1: 0, y1: 1, x2: 0,y2: 0, - stop: .3 #FFFFFF, stop: 1 #909090); - border-bottom-right-radius: 35px 21px; - -} -QTabBar::tab:left { - padding: 10px 3px 15px 3px; - border: 1px solid #7f7f7f; - border-left-width: 0px; - background: qlineargradient(x1: 1, y1: 0, x2: 0,y2: 0, - stop: .3 #FFFFFF, stop: 1 #909090); - border-bottom-right-radius: 21px 35px; - margin-right: 2px; -} -QTabBar:right {subcontrol-origin: padding;} -QTabBar::tab:right { - padding: 10px 3px 15px 5px; - border: 1px solid #7f7f7f; - background: qlineargradient(x1: 0, y1: 0, x2: 1,y2: 0, - stop: .3 #FFFFFF, stop: 1 #909090); - border-bottom-left-radius: 21px 35px; - margin-left: 2px; -} -QTabBar::tab:bottom:!last { margin-right: -10px;} -QTabBar::tab:left:!last { margin-bottom: -10px;} -QTabBar::tab:right:!last { margin-bottom: -10px;} - -QTabBar::tab:bottom:selected { - background: qlineargradient(x1: 0, y1: 1, x2: 0,y2: 0, - stop: .3 #CFCFCF, stop: 1 #FFFFFF); -} -QTabBar::tab:left:selected { - background: qlineargradient(x1: 1, y1: 0, x2: 0,y2: 0, - stop: .3 #DFDFDF, stop: 1 #F0F0F0); -} -QTabBar::tab:right:selected { - background: qlineargradient(x1: 0, y1: 0, x2: 1,y2: 0, - stop: .3 #DFDFDF, stop: 1 #F0F0F0); -} - - - - - - QTabWidget::East - - - 3 - - - - Tab 1 - - - - - Page - - - - - Page - - - - - Tab 2 - - - - - - - - -QTabBar::tab:bottom { - - min-width: 15px; - padding: 3px 15px 3px 10px; - border: 1px solid #7f7f7f; - - background: qlineargradient(x1: 0, y1: 1, x2: 0,y2: 0, - stop: .3 #FFFFFF, stop: 1 #909090); - border-bottom-right-radius: 35px 21px; - -} -QTabBar::tab:left { - padding: 10px 3px 15px 3px; - border: 1px solid #7f7f7f; - border-left-width: 0px; - background: qlineargradient(x1: 1, y1: 0, x2: 0,y2: 0, - stop: .3 #FFFFFF, stop: 1 #909090); - border-bottom-right-radius: 21px 35px; - margin-right: 2px; -} -QTabBar:right {subcontrol-origin: padding;} -QTabBar::tab:right { - padding: 10px 3px 15px 5px; - border: 1px solid #7f7f7f; - background: qlineargradient(x1: 0, y1: 0, x2: 1,y2: 0, - stop: .3 #FFFFFF, stop: 1 #909090); - border-bottom-left-radius: 21px 35px; - margin-left: 2px; -} -QTabBar::tab:bottom:!last { margin-right: -10px;} -QTabBar::tab:left:!last { margin-bottom: -10px;} -QTabBar::tab:right:!last { margin-bottom: -10px;} - -QTabBar::tab:bottom:selected { - background: qlineargradient(x1: 0, y1: 1, x2: 0,y2: 0, - stop: .3 #CFCFCF, stop: 1 #FFFFFF); -} -QTabBar::tab:left:selected { - background: qlineargradient(x1: 1, y1: 0, x2: 0,y2: 0, - stop: .3 #DFDFDF, stop: 1 #F0F0F0); -} -QTabBar::tab:right:selected { - background: qlineargradient(x1: 0, y1: 0, x2: 1,y2: 0, - stop: .3 #DFDFDF, stop: 1 #F0F0F0); -} - - - - - - QTabWidget::West - - - 3 - - - - Tab 1 - - - - - Page - - - - - Page - - - - - Tab 2 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - Dialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - Dialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/tests/auto/uiloader/baseline/css_task255849_downarrow.ui b/tests/auto/uiloader/baseline/css_task255849_downarrow.ui deleted file mode 100644 index d3e99b1613..0000000000 --- a/tests/auto/uiloader/baseline/css_task255849_downarrow.ui +++ /dev/null @@ -1,144 +0,0 @@ - - - Form - - - - 0 - 0 - 275 - 175 - - - - Form - - - /* Some widget were not displaying the arrow if only the arrow was set */ -*::down-arrow { image: url("images/arrow-down.png") } -*::up-arrow { image: url("images/arrow-up.png") } - - - - - - - - - - - - true - - - true - - - true - - - - 1 - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - - - - - - - foo - - - Qt::DownArrow - - - - - - - - - - Qt::NoContextMenu - - - PushButton - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/css_task259226_spinboxes.ui b/tests/auto/uiloader/baseline/css_task259226_spinboxes.ui deleted file mode 100644 index eb9ade316c..0000000000 --- a/tests/auto/uiloader/baseline/css_task259226_spinboxes.ui +++ /dev/null @@ -1,83 +0,0 @@ - - - Form - - - - 0 - 0 - 320 - 116 - - - - Form - - - #spinbox1::up-button{ - subcontrol-origin: border; - subcontrol-position: top left; - } -#spinbox1::down-button { - subcontrol-origin: border; - subcontrol-position: bottom left; - } - - -#spinbox2::up-button{ - subcontrol-origin: border; - subcontrol-position: center left; - left: 0px; - height: 100%; - top: 0px; - } -#spinbox2::down-button { - subcontrol-origin: border; - subcontrol-position: center right; - right: 0px; - height: 100%; - top: 0px; - } - - - -#spinbox3::up-button{ - subcontrol-origin: border; - subcontrol-position: top left; - } - - -#spinbox4 { padding: 20px 1px; } -#spinbox4::up-button{ - subcontrol-origin: border; - subcontrol-position: top center; - width:100%; - height: 20px; - } -#spinbox4::down-button { - subcontrol-origin: border; - subcontrol-position: bottom center; - width:100%; - height: 20px; - } - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/default.ui b/tests/auto/uiloader/baseline/default.ui deleted file mode 100644 index 431a40956e..0000000000 --- a/tests/auto/uiloader/baseline/default.ui +++ /dev/null @@ -1,329 +0,0 @@ - - MainWindow - - - - 0 - 0 - 388 - 413 - - - - MainWindow - - - - - 9 - - - 6 - - - - - &Name: - - - nameCombo - - - - - - - Specify your name - - - true - - - -1 - - - - Girish - - - - - Jasmin - - - - - Simon - - - - - Zack - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Check this if you are female - - - &Female - - - - - - - Please read the license before checking this - - - I &accept the terms and conditions - - - - - - - Check this if you are male - - - &Male - - - - - - - Gender: - - - - - - - Specify your age - - - Specify your age here - - - 12 - - - 22 - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - &Age: - - - ageSpinBox - - - - - - - &Password: - - - passwordEdit - - - - - - - Specify your password - - - Specify your password here - - - Password - - - QLineEdit::Password - - - - - - - Profession - - - professionList - - - - - - - &Country - - - professionList - - - - - - - Select your profession - - - Select your profession - - - Select your profession - - - 1 - - - - Developer - - - - - Student - - - - - Fisherman - - - - - - - - Specify your country - - - Specify your country here - - - 2 - - - - Germany - - - - - India - - - - - Norway - - - - - United States Of America - - - - - United Kingdom - - - - - - - - - - 0 - 0 - 388 - 21 - - - - - &File - - - - - - - - &Help - - - - - - - - - - - - &Exit - - - - - About Qt - - - - - Edit &Style - - - - - About - - - - - maleRadioButton - femaleRadioButton - ageSpinBox - passwordEdit - professionList - agreeCheckBox - - - - diff --git a/tests/auto/uiloader/baseline/dialog.ui b/tests/auto/uiloader/baseline/dialog.ui deleted file mode 100644 index e99d6fb3c4..0000000000 --- a/tests/auto/uiloader/baseline/dialog.ui +++ /dev/null @@ -1,47 +0,0 @@ - - Dialog - - - - 0 - 0 - 451 - 322 - - - - Dialog - - - - - - Load Image From File... - - - - - - - Launch two of these dialogs. In the first, press the top button and load an image from a file. In the second, press the bottom button and display the loaded image from shared memory. - - - Qt::AlignCenter - - - true - - - - - - - Display Image From Shared Memory - - - - - - - - diff --git a/tests/auto/uiloader/baseline/downloaditem.ui b/tests/auto/uiloader/baseline/downloaditem.ui deleted file mode 100644 index 4a0a0fd9aa..0000000000 --- a/tests/auto/uiloader/baseline/downloaditem.ui +++ /dev/null @@ -1,134 +0,0 @@ - - DownloadItem - - - - 0 - 0 - 423 - 110 - - - - Form - - - - 0 - - - - - - 0 - 0 - - - - Ico - - - - - - - - - - 0 - 0 - - - - Filename - - - - - - - 0 - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - Qt::Vertical - - - - 17 - 1 - - - - - - - - false - - - Try Again - - - - - - - Stop - - - - - - - Open - - - - - - - Qt::Vertical - - - - 17 - 5 - - - - - - - - - - - SqueezeLabel - QWidget -
squeezelabel.h
-
-
- - -
diff --git a/tests/auto/uiloader/baseline/downloads.ui b/tests/auto/uiloader/baseline/downloads.ui deleted file mode 100644 index a2e256935b..0000000000 --- a/tests/auto/uiloader/baseline/downloads.ui +++ /dev/null @@ -1,83 +0,0 @@ - - DownloadDialog - - - - 0 - 0 - 332 - 252 - - - - Downloads - - - - 0 - - - 0 - - - - - - - - - - false - - - Clean up - - - - - - - Qt::Horizontal - - - - 58 - 24 - - - - - - - - - - 0 Items - - - - - - - Qt::Horizontal - - - - 148 - 20 - - - - - - - - - EditTableView - QTableView -
edittableview.h
-
-
- - -
diff --git a/tests/auto/uiloader/baseline/embeddeddialog.ui b/tests/auto/uiloader/baseline/embeddeddialog.ui deleted file mode 100644 index f967b10085..0000000000 --- a/tests/auto/uiloader/baseline/embeddeddialog.ui +++ /dev/null @@ -1,87 +0,0 @@ - - embeddedDialog - - - - 0 - 0 - 407 - 134 - - - - Embedded Dialog - - - - - - Layout Direction: - - - layoutDirection - - - - - - - - Left to Right - - - - - Right to Left - - - - - - - - Select Font: - - - fontComboBox - - - - - - - - - - Style: - - - style - - - - - - - - - - Layout spacing: - - - spacing - - - - - - - Qt::Horizontal - - - - - - - - diff --git a/tests/auto/uiloader/baseline/filespage.ui b/tests/auto/uiloader/baseline/filespage.ui deleted file mode 100644 index d308b96646..0000000000 --- a/tests/auto/uiloader/baseline/filespage.ui +++ /dev/null @@ -1,79 +0,0 @@ - - FilesPage - - - - 0 - 0 - 417 - 242 - - - - Form - - - - - - Files: - - - true - - - - - - - - - - - 0 - 0 - - - - Remove - - - - - - - Remove All - - - - - - - Qt::Vertical - - - - 75 - 16 - - - - - - - - Qt::Vertical - - - - 20 - 31 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/filternamedialog.ui b/tests/auto/uiloader/baseline/filternamedialog.ui deleted file mode 100644 index be6f17dfb6..0000000000 --- a/tests/auto/uiloader/baseline/filternamedialog.ui +++ /dev/null @@ -1,67 +0,0 @@ - - FilterNameDialogClass - - - - 0 - 0 - 312 - 95 - - - - FilterNameDialog - - - - 9 - - - 6 - - - - - Filter Name: - - - - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/filterpage.ui b/tests/auto/uiloader/baseline/filterpage.ui deleted file mode 100644 index 7cda3d9bed..0000000000 --- a/tests/auto/uiloader/baseline/filterpage.ui +++ /dev/null @@ -1,125 +0,0 @@ - - FilterPage - - - - 0 - 0 - 419 - 243 - - - - Form - - - - - - Filter attributes for current documentation (comma separated list): - - - - - - - - - - Custom Filters - - - - - - 2 - - - - 1 - - - - - 2 - - - - - - - - Add - - - - - - - Remove - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/finddialog.ui b/tests/auto/uiloader/baseline/finddialog.ui deleted file mode 100644 index 913a868ad1..0000000000 --- a/tests/auto/uiloader/baseline/finddialog.ui +++ /dev/null @@ -1,265 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - FindDialog - - - - 0 - 0 - 414 - 170 - - - - - 0 - 0 - - - - Find - - - This window allows you to search for some text in the translation source file. - - - - 6 - - - 11 - - - - - 6 - - - 0 - - - - - 6 - - - 0 - - - - - &Find what: - - - led - - - - - - - Type in the text to search for. - - - - - - - - - Options - - - - 9 - - - 6 - - - - - Source texts are searched when checked. - - - &Source texts - - - true - - - - - - - Translations are searched when checked. - - - &Translations - - - true - - - - - - - Texts such as 'TeX' and 'tex' are considered as different when checked. - - - &Match case - - - - - - - Comments and contexts are searched when checked. - - - &Comments - - - true - - - - - - - Ignore &accelerators - - - true - - - - - - - - - - - - 6 - - - 0 - - - - - Click here to find the next occurrence of the text you typed in. - - - Find Next - - - true - - - false - - - - - - - Click here to close this window. - - - Cancel - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 51 - - - - - - - - - - - led - findNxt - cancel - comments - sourceText - translations - matchCase - - - - - cancel - clicked() - FindDialog - reject() - - - 372 - 58 - - - 373 - 109 - - - - - diff --git a/tests/auto/uiloader/baseline/formwindowsettings.ui b/tests/auto/uiloader/baseline/formwindowsettings.ui deleted file mode 100644 index fea18fe873..0000000000 --- a/tests/auto/uiloader/baseline/formwindowsettings.ui +++ /dev/null @@ -1,311 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - FormWindowSettings - - - - 0 - 0 - 433 - 465 - - - - Form Settings - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - Qt::Horizontal - - - - - - - 0 - - - 6 - - - - - Layout &Default - - - true - - - - 8 - - - 6 - - - - - &Spacing: - - - defaultSpacingSpinBox - - - - - - - &Margin: - - - defaultMarginSpinBox - - - - - - - - - - - - - - - - &Layout Function - - - true - - - - 8 - - - 6 - - - - - - - - - - - Ma&rgin: - - - marginFunctionLineEdit - - - - - - - Spa&cing: - - - spacingFunctionLineEdit - - - - - - - - - - - - &Author - - - - 8 - - - 6 - - - - - - - - - - - &Include Hints - - - - 8 - - - 6 - - - - - - - - - - - 0 - - - 6 - - - - - &Pixmap Function - - - true - - - - 8 - - - 6 - - - - - - - - - - - - - Qt::Vertical - - - - 111 - 115 - - - - - - - - Grid - - - - - - - - qdesigner_internal::GridPanel - QGroupBox -
gridpanel_p.h
- 1 -
-
- - authorLineEdit - defaultMarginSpinBox - defaultSpacingSpinBox - marginFunctionLineEdit - spacingFunctionLineEdit - pixmapFunctionLineEdit - - - - - buttonBox - accepted() - FormWindowSettings - accept() - - - 294 - 442 - - - 150 - 459 - - - - - buttonBox - rejected() - FormWindowSettings - reject() - - - 373 - 444 - - - 357 - 461 - - - - -
diff --git a/tests/auto/uiloader/baseline/generalpage.ui b/tests/auto/uiloader/baseline/generalpage.ui deleted file mode 100644 index 9c2babb0ae..0000000000 --- a/tests/auto/uiloader/baseline/generalpage.ui +++ /dev/null @@ -1,69 +0,0 @@ - - GeneralPage - - - - 0 - 0 - 417 - 243 - - - - Form - - - - - - Namespace: - - - - - - - - - - Virtual Folder: - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/gridpanel.ui b/tests/auto/uiloader/baseline/gridpanel.ui deleted file mode 100644 index adfdd3684a..0000000000 --- a/tests/auto/uiloader/baseline/gridpanel.ui +++ /dev/null @@ -1,144 +0,0 @@ - - qdesigner_internal::GridPanel - - - - 0 - 0 - 393 - 110 - - - - Form - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Grid - - - - - - - 0 - 0 - - - - Visible - - - - - - - Grid &X - - - m_deltaXSpinBox - - - - - - - 2 - - - 100 - - - - - - - - 0 - 0 - - - - Snap - - - - - - - - - Reset - - - - - - - Qt::Horizontal - - - - 20 - 20 - - - - - - - - - - Grid &Y - - - m_deltaYSpinBox - - - - - - - 2 - - - 100 - - - - - - - - 0 - 0 - - - - Snap - - - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/helpdialog.ui b/tests/auto/uiloader/baseline/helpdialog.ui deleted file mode 100644 index 133f3d2af4..0000000000 --- a/tests/auto/uiloader/baseline/helpdialog.ui +++ /dev/null @@ -1,404 +0,0 @@ - - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - - HelpDialog - - - - 0 - 0 - 274 - 417 - - - - Help - - - <b>Help</b><p>Choose the topic you want help on from the contents list, or search the index for keywords.</p> - - - - 0 - - - 6 - - - - - Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search. - - - - Con&tents - - - - 5 - - - 6 - - - - - Qt::CustomContextMenu - - - <b>Help topics organized by category.</b><p>Double-click an item to see the topics in that category. To view a topic, just double-click it.</p> - - - true - - - true - - - - column 1 - - - - - - - - - &Index - - - - 5 - - - 6 - - - - - &Look For: - - - editIndex - - - - - - - Enter keyword - - - <b>Enter a keyword.</b><p>The list will select an item that matches the entered string best.</p> - - - - - - - Qt::CustomContextMenu - - - <b>List of available help topics.</b><p>Double-click on an item to open its help page. If more than one is found, you must specify which page you want.</p> - - - - - - - - &Bookmarks - - - - 5 - - - 6 - - - - - Qt::CustomContextMenu - - - Displays the list of bookmarks. - - - true - - - - column 1 - - - - - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - Add new bookmark - - - Add the currently displayed page as a new bookmark. - - - &New - - - - - - - Delete bookmark - - - Delete the selected bookmark. - - - &Delete - - - - - - - - - - &Search - - - - 5 - - - 6 - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - Searching f&or: - - - termsEdit - - - - - - - Enter searchword(s). - - - <b>Enter search word(s).</b><p>Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.</p> - - - - - - - Qt::CustomContextMenu - - - <b>Found documents</b><p>This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.</p> - - - - - - - Found &Documents: - - - resultBox - - - - - - - 1 - - - 6 - - - - - Display the help page. - - - Display the help page for the full text search. - - - He&lp - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 61 - 21 - - - - - - - - Start searching. - - - Pressing this button starts the search. - - - &Search - - - false - - - - - - - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 3 - - - 6 - - - - - Preparing... - - - - - - - - - - - - - - tabWidget - listContents - editIndex - listIndex - listBookmarks - buttonAdd - buttonRemove - termsEdit - searchButton - helpButton - resultBox - - - - diff --git a/tests/auto/uiloader/baseline/history.ui b/tests/auto/uiloader/baseline/history.ui deleted file mode 100644 index 0944940e74..0000000000 --- a/tests/auto/uiloader/baseline/history.ui +++ /dev/null @@ -1,106 +0,0 @@ - - HistoryDialog - - - - 0 - 0 - 758 - 450 - - - - History - - - - - - Qt::Horizontal - - - - 252 - 20 - - - - - - - - - - - - - - - - &Remove - - - - - - - Remove &All - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - QDialogButtonBox::Ok - - - - - - - - - - SearchLineEdit - QLineEdit -
searchlineedit.h
-
- - EditTreeView - QTreeView -
edittreeview.h
-
-
- - - - buttonBox - accepted() - HistoryDialog - accept() - - - 472 - 329 - - - 461 - 356 - - - - -
diff --git a/tests/auto/uiloader/baseline/identifierpage.ui b/tests/auto/uiloader/baseline/identifierpage.ui deleted file mode 100644 index cd0df75638..0000000000 --- a/tests/auto/uiloader/baseline/identifierpage.ui +++ /dev/null @@ -1,132 +0,0 @@ - - IdentifierPage - - - - 0 - 0 - 417 - 242 - - - - Form - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - Create identifiers - - - - - - - Qt::Horizontal - - - - 161 - 20 - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 30 - 20 - - - - - - - - false - - - Global prefix: - - - true - - - - - - - false - - - - - - - false - - - Inherit prefix from file names - - - - - - - Qt::Vertical - - - - 20 - 31 - - - - - - - - - - globalButton - toggled(bool) - prefixLineEdit - setEnabled(bool) - - - 122 - 72 - - - 161 - 71 - - - - - diff --git a/tests/auto/uiloader/baseline/imagedialog.ui b/tests/auto/uiloader/baseline/imagedialog.ui deleted file mode 100644 index 1c5e546f2c..0000000000 --- a/tests/auto/uiloader/baseline/imagedialog.ui +++ /dev/null @@ -1,389 +0,0 @@ - - - ImageDialog - - - ImageDialog - - - - 0 - 0 - 320 - 180 - - - - Create Image - - - - - - - 9 - - - 6 - - - - - - - - 1 - - - 6 - - - - - widthLabel - - - - 1 - 27 - 67 - 22 - - - - QFrame::NoFrame - - - QFrame::Plain - - - Width: - - - Qt::AutoText - - - - - - - heightLabel - - - - 1 - 55 - 67 - 22 - - - - QFrame::NoFrame - - - QFrame::Plain - - - Height: - - - Qt::AutoText - - - - - - - colorDepthCombo - - - - 74 - 83 - 227 - 22 - - - - - 5 - 0 - 0 - 0 - - - - QComboBox::InsertAtBottom - - - - - - - nameLineEdit - - - - 74 - 83 - 227 - 22 - - - - - 5 - 0 - 1 - 0 - - - - Untitled image - - - QLineEdit::Normal - - - - - - - spinBox - - - - 74 - 1 - 227 - 20 - - - - - 5 - 0 - 0 - 0 - - - - QAbstractSpinBox::UpDownArrows - - - 32 - - - 1024 - - - 1 - - - - - - - spinBox_2 - - - - 74 - 27 - 227 - 22 - - - - - 5 - 0 - 0 - 0 - - - - QAbstractSpinBox::UpDownArrows - - - 32 - - - 1024 - - - 1 - - - - - - - nameLabel - - - - 1 - 1 - 67 - 20 - - - - QFrame::NoFrame - - - QFrame::Plain - - - Name: - - - Qt::AutoText - - - - - - - colorDepthLabel - - - - 1 - 83 - 67 - 22 - - - - QFrame::NoFrame - - - QFrame::Plain - - - Color depth: - - - Qt::AutoText - - - - - - - - - - - - - 9 - 121 - 302 - 18 - - - - Qt::Vertical - - - - - - - - - - 1 - - - 6 - - - - - - - - - 1 - 1 - 128 - 24 - - - - Qt::Horizontal - - - - - - - okButton - - - - 135 - 1 - 80 - 24 - - - - OK - - - - - - - cancelButton - - - - 221 - 1 - 80 - 24 - - - - Cancel - - - - - - - - - - nameLineEdit - spinBox - spinBox_2 - colorDepthCombo - okButton - cancelButton - - - - nameLineEdit - returnPressed() - okButton - animateClick() - - - -1 - 7 - - - -1 - 7 - - - - - diff --git a/tests/auto/uiloader/baseline/images/arrow-down.png b/tests/auto/uiloader/baseline/images/arrow-down.png deleted file mode 100644 index 7c9274f30c..0000000000 Binary files a/tests/auto/uiloader/baseline/images/arrow-down.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/arrow-up.png b/tests/auto/uiloader/baseline/images/arrow-up.png deleted file mode 100644 index 758a0d1afd..0000000000 Binary files a/tests/auto/uiloader/baseline/images/arrow-up.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/borderimage.png b/tests/auto/uiloader/baseline/images/borderimage.png deleted file mode 100644 index 199fc890f4..0000000000 Binary files a/tests/auto/uiloader/baseline/images/borderimage.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/checkbox_checked.png b/tests/auto/uiloader/baseline/images/checkbox_checked.png deleted file mode 100644 index cbf06f6513..0000000000 Binary files a/tests/auto/uiloader/baseline/images/checkbox_checked.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/checkbox_checked_hover.png b/tests/auto/uiloader/baseline/images/checkbox_checked_hover.png deleted file mode 100644 index fb4d4d3fdb..0000000000 Binary files a/tests/auto/uiloader/baseline/images/checkbox_checked_hover.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/checkbox_checked_pressed.png b/tests/auto/uiloader/baseline/images/checkbox_checked_pressed.png deleted file mode 100644 index 852fcc0306..0000000000 Binary files a/tests/auto/uiloader/baseline/images/checkbox_checked_pressed.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/checkbox_unchecked.png b/tests/auto/uiloader/baseline/images/checkbox_unchecked.png deleted file mode 100644 index 5f5465582a..0000000000 Binary files a/tests/auto/uiloader/baseline/images/checkbox_unchecked.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/checkbox_unchecked_hover.png b/tests/auto/uiloader/baseline/images/checkbox_unchecked_hover.png deleted file mode 100644 index 687364497e..0000000000 Binary files a/tests/auto/uiloader/baseline/images/checkbox_unchecked_hover.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/checkbox_unchecked_pressed.png b/tests/auto/uiloader/baseline/images/checkbox_unchecked_pressed.png deleted file mode 100644 index 6a768c44de..0000000000 Binary files a/tests/auto/uiloader/baseline/images/checkbox_unchecked_pressed.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/down_arrow.png b/tests/auto/uiloader/baseline/images/down_arrow.png deleted file mode 100644 index 85004aeaf6..0000000000 Binary files a/tests/auto/uiloader/baseline/images/down_arrow.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/down_arrow_disabled.png b/tests/auto/uiloader/baseline/images/down_arrow_disabled.png deleted file mode 100644 index d9eefed4c8..0000000000 Binary files a/tests/auto/uiloader/baseline/images/down_arrow_disabled.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/frame.png b/tests/auto/uiloader/baseline/images/frame.png deleted file mode 100644 index 05a600502e..0000000000 Binary files a/tests/auto/uiloader/baseline/images/frame.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/pagefold.png b/tests/auto/uiloader/baseline/images/pagefold.png deleted file mode 100644 index 69be8f2a38..0000000000 Binary files a/tests/auto/uiloader/baseline/images/pagefold.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/pushbutton.png b/tests/auto/uiloader/baseline/images/pushbutton.png deleted file mode 100644 index c7529ba02d..0000000000 Binary files a/tests/auto/uiloader/baseline/images/pushbutton.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/pushbutton_hover.png b/tests/auto/uiloader/baseline/images/pushbutton_hover.png deleted file mode 100644 index af0ef9d561..0000000000 Binary files a/tests/auto/uiloader/baseline/images/pushbutton_hover.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/pushbutton_pressed.png b/tests/auto/uiloader/baseline/images/pushbutton_pressed.png deleted file mode 100644 index f7381f752a..0000000000 Binary files a/tests/auto/uiloader/baseline/images/pushbutton_pressed.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/radiobutton_checked.png b/tests/auto/uiloader/baseline/images/radiobutton_checked.png deleted file mode 100644 index 8ab9157578..0000000000 Binary files a/tests/auto/uiloader/baseline/images/radiobutton_checked.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/radiobutton_checked_hover.png b/tests/auto/uiloader/baseline/images/radiobutton_checked_hover.png deleted file mode 100644 index d68cb009a7..0000000000 Binary files a/tests/auto/uiloader/baseline/images/radiobutton_checked_hover.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/radiobutton_checked_pressed.png b/tests/auto/uiloader/baseline/images/radiobutton_checked_pressed.png deleted file mode 100644 index e3cd5a59e4..0000000000 Binary files a/tests/auto/uiloader/baseline/images/radiobutton_checked_pressed.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/radiobutton_unchecked.png b/tests/auto/uiloader/baseline/images/radiobutton_unchecked.png deleted file mode 100644 index 321a9a1558..0000000000 Binary files a/tests/auto/uiloader/baseline/images/radiobutton_unchecked.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/radiobutton_unchecked_hover.png b/tests/auto/uiloader/baseline/images/radiobutton_unchecked_hover.png deleted file mode 100644 index 666a3b0bdd..0000000000 Binary files a/tests/auto/uiloader/baseline/images/radiobutton_unchecked_hover.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/radiobutton_unchecked_pressed.png b/tests/auto/uiloader/baseline/images/radiobutton_unchecked_pressed.png deleted file mode 100644 index c4b0567aa9..0000000000 Binary files a/tests/auto/uiloader/baseline/images/radiobutton_unchecked_pressed.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/sizegrip.png b/tests/auto/uiloader/baseline/images/sizegrip.png deleted file mode 100644 index 350583aaac..0000000000 Binary files a/tests/auto/uiloader/baseline/images/sizegrip.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/spindown.png b/tests/auto/uiloader/baseline/images/spindown.png deleted file mode 100644 index 7ff3c64926..0000000000 Binary files a/tests/auto/uiloader/baseline/images/spindown.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/spindown_hover.png b/tests/auto/uiloader/baseline/images/spindown_hover.png deleted file mode 100644 index 1486c4dfe4..0000000000 Binary files a/tests/auto/uiloader/baseline/images/spindown_hover.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/spindown_off.png b/tests/auto/uiloader/baseline/images/spindown_off.png deleted file mode 100644 index a90ab3f038..0000000000 Binary files a/tests/auto/uiloader/baseline/images/spindown_off.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/spindown_pressed.png b/tests/auto/uiloader/baseline/images/spindown_pressed.png deleted file mode 100644 index f6271cbde2..0000000000 Binary files a/tests/auto/uiloader/baseline/images/spindown_pressed.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/spinup.png b/tests/auto/uiloader/baseline/images/spinup.png deleted file mode 100644 index 1069dd00df..0000000000 Binary files a/tests/auto/uiloader/baseline/images/spinup.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/spinup_hover.png b/tests/auto/uiloader/baseline/images/spinup_hover.png deleted file mode 100644 index 884c8d77c5..0000000000 Binary files a/tests/auto/uiloader/baseline/images/spinup_hover.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/spinup_off.png b/tests/auto/uiloader/baseline/images/spinup_off.png deleted file mode 100644 index 02dad1fb29..0000000000 Binary files a/tests/auto/uiloader/baseline/images/spinup_off.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/spinup_pressed.png b/tests/auto/uiloader/baseline/images/spinup_pressed.png deleted file mode 100644 index b1843e2a1f..0000000000 Binary files a/tests/auto/uiloader/baseline/images/spinup_pressed.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/splitter_horizontal.png b/tests/auto/uiloader/baseline/images/splitter_horizontal.png deleted file mode 100644 index 66107cf548..0000000000 Binary files a/tests/auto/uiloader/baseline/images/splitter_horizontal.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/splitter_vertical.png b/tests/auto/uiloader/baseline/images/splitter_vertical.png deleted file mode 100644 index f907c0b576..0000000000 Binary files a/tests/auto/uiloader/baseline/images/splitter_vertical.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/up_arrow.png b/tests/auto/uiloader/baseline/images/up_arrow.png deleted file mode 100644 index e7f7ddb3a6..0000000000 Binary files a/tests/auto/uiloader/baseline/images/up_arrow.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/images/up_arrow_disabled.png b/tests/auto/uiloader/baseline/images/up_arrow_disabled.png deleted file mode 100644 index 4d2c27770f..0000000000 Binary files a/tests/auto/uiloader/baseline/images/up_arrow_disabled.png and /dev/null differ diff --git a/tests/auto/uiloader/baseline/inputpage.ui b/tests/auto/uiloader/baseline/inputpage.ui deleted file mode 100644 index e7cd3a0fad..0000000000 --- a/tests/auto/uiloader/baseline/inputpage.ui +++ /dev/null @@ -1,79 +0,0 @@ - - InputPage - - - - 0 - 0 - 417 - 242 - - - - Form - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - - 0 - 0 - - - - File name: - - - - - - - 0 - - - - - - - - ... - - - - - - - - - Qt::Vertical - - - - 20 - 31 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/installdialog.ui b/tests/auto/uiloader/baseline/installdialog.ui deleted file mode 100644 index 21a05da77e..0000000000 --- a/tests/auto/uiloader/baseline/installdialog.ui +++ /dev/null @@ -1,118 +0,0 @@ - - InstallDialog - - - - 0 - 0 - 436 - 245 - - - - Install Documentation - - - - - - Available Documentation: - - - - - - - - - - Install - - - - - - - Cancel - - - - - - - Close - - - - - - - Qt::Vertical - - - - 20 - 56 - - - - - - - - Installation Path: - - - - - - - - - - ... - - - - - - - Qt::Horizontal - - - - - - - - - - 0 - - - Qt::Horizontal - - - - - - - - - closeButton - clicked() - InstallDialog - accept() - - - 330 - 107 - - - 332 - 158 - - - - - diff --git a/tests/auto/uiloader/baseline/languagesdialog.ui b/tests/auto/uiloader/baseline/languagesdialog.ui deleted file mode 100644 index 93b490e9ed..0000000000 --- a/tests/auto/uiloader/baseline/languagesdialog.ui +++ /dev/null @@ -1,160 +0,0 @@ - - LanguagesDialog - - - - 0 - 0 - 400 - 300 - - - - Auxiliary Languages - - - - - - 0 - - - - Locale - - - - - File - - - - - - - - - - false - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Move selected language up</p></body></html> - - - up - - - - :/images/up.png:/images/up.png - - - - - - - false - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;">Move selected language down</p></body></html> - - - down - - - - :/images/down.png:/images/down.png - - - - - - - false - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Remove selected language</p></body></html> - - - remove - - - - :/images/editdelete.png:/images/editdelete.png - - - - - - - true - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Open auxiliary language files</p></body></html> - - - ... - - - - :/images/mac/fileopen.png:/images/mac/fileopen.png - - - - - - - Qt::Horizontal - - - - 121 - 20 - - - - - - - - OK - - - - - - - - - - - - - okButton - clicked() - LanguagesDialog - accept() - - - 352 - 39 - - - 233 - 29 - - - - - diff --git a/tests/auto/uiloader/baseline/listwidgeteditor.ui b/tests/auto/uiloader/baseline/listwidgeteditor.ui deleted file mode 100644 index fa7d962bdb..0000000000 --- a/tests/auto/uiloader/baseline/listwidgeteditor.ui +++ /dev/null @@ -1,226 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - qdesigner_internal::ListWidgetEditor - - - - 0 - 0 - 223 - 245 - - - - Dialog - - - - 6 - - - 9 - - - - - Items List - - - - - - Items List - - - - - - - - - New Item - - - &New - - - - - - - Delete Item - - - &Delete - - - - - - - Qt::Horizontal - - - - 16 - 10 - - - - - - - - Move Item Up - - - U - - - - - - - Move Item Down - - - D - - - - - - - - - - - Icon - - - - - - - - - - Qt::Horizontal - - - - 108 - 21 - - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - buttonBox - groupBox - - - - qdesigner_internal::IconSelector - QWidget -
iconselector_p.h
- 1 -
-
- - listWidget - newItemButton - deleteItemButton - moveItemUpButton - moveItemDownButton - - - - - buttonBox - accepted() - qdesigner_internal::ListWidgetEditor - accept() - - - 140 - 291 - - - 73 - 301 - - - - - buttonBox - rejected() - qdesigner_internal::ListWidgetEditor - reject() - - - 230 - 289 - - - 253 - 304 - - - - -
diff --git a/tests/auto/uiloader/baseline/mainwindow.ui b/tests/auto/uiloader/baseline/mainwindow.ui deleted file mode 100644 index f6eda4fdd6..0000000000 --- a/tests/auto/uiloader/baseline/mainwindow.ui +++ /dev/null @@ -1,502 +0,0 @@ - - MainWindow - - - - 0 - 0 - 829 - 813 - - - - MakeQPF - - - - - 9 - - - 6 - - - - - Font Properties - - - - 9 - - - 6 - - - - - Family: - - - - - - - - - - Pixel Size: - - - - - - - 1 - - - - - - - Weight: - - - - - - - - - - Italic - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - Glyph Coverage - - - - 9 - - - 6 - - - - - Choose from Unicode Codepoints: - - - true - - - - - - - 0 - - - 6 - - - - - - - - 0 - - - 6 - - - - - Select &All - - - - - - - &Deselect All - - - - - - - &Invert Selection - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Choose from Sample Text File (UTF-8 Encoded): - - - - - - - 0 - - - 6 - - - - - false - - - Path: - - - - - - - false - - - - - - - false - - - Browse... - - - - - - - false - - - TextLabel - - - - - - - - - - - - Preview - - - - 9 - - - 6 - - - - - - - - - - - Output Options - - - - 9 - - - 6 - - - - - Path: - - - - - - - - - - Browse... - - - - - - - Filename: - - - - - - - false - - - - - - - - - - 0 - - - 6 - - - - - Generate Pre-Rendered Font... - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - 0 - 0 - 829 - 29 - - - - - File - - - - - - - - - - - &Add Custom Font... - - - - - &Exit - - - - - - - action_Exit - triggered() - MainWindow - close() - - - -1 - -1 - - - 383 - 215 - - - - - chooseFromCodePoints - toggled(bool) - characterRangeView - setEnabled(bool) - - - 183 - 144 - - - 146 - 295 - - - - - chooseFromCodePoints - toggled(bool) - selectAll - setEnabled(bool) - - - 236 - 146 - - - 46 - 508 - - - - - chooseFromCodePoints - toggled(bool) - deselectAll - setEnabled(bool) - - - 280 - 147 - - - 158 - 502 - - - - - chooseFromCodePoints - toggled(bool) - invertSelection - setEnabled(bool) - - - 364 - 143 - - - 281 - 509 - - - - - chooseFromSampleFile - toggled(bool) - sampleFile - setEnabled(bool) - - - 134 - 544 - - - 64 - 569 - - - - - chooseFromSampleFile - toggled(bool) - browseSampleFile - setEnabled(bool) - - - 79 - 545 - - - 710 - 582 - - - - - chooseFromSampleFile - toggled(bool) - charCount - setEnabled(bool) - - - 274 - 544 - - - 790 - 569 - - - - - chooseFromSampleFile - toggled(bool) - label_5 - setEnabled(bool) - - - 112 - 541 - - - 37 - 579 - - - - - diff --git a/tests/auto/uiloader/baseline/mainwindowbase.ui b/tests/auto/uiloader/baseline/mainwindowbase.ui deleted file mode 100644 index 27fbdc9683..0000000000 --- a/tests/auto/uiloader/baseline/mainwindowbase.ui +++ /dev/null @@ -1,1214 +0,0 @@ - - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - - MainWindowBase - - - - 0 - 0 - 724 - 615 - - - - Qt Configuration - - - - - 0 - 28 - 724 - 587 - - - - - 8 - - - 4 - - - - - - 200 - 0 - - - - true - - - - - - - - Appearance - - - - 4 - - - 4 - - - - - GUI Style - - - - 8 - - - 4 - - - - - Select GUI &Style: - - - gstylecombo - - - - - - - - - - - - - - 5 - 4 - 0 - 0 - - - - Build Palette - - - - 8 - - - 4 - - - - - &3-D Effects: - - - buttonMainColor - - - - - - - - - - - 1 - 1 - 0 - 0 - - - - - 50 - 0 - - - - 1 - - - 0 - - - Window Back&ground: - - - Qt::AlignVCenter - - - 0 - - - buttonMainColor2 - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 70 - 20 - - - - - - - - &Tune Palette... - - - - - - - - - - - 5 - 7 - 0 - 0 - - - - Preview - - - - 8 - - - 4 - - - - - Select &Palette: - - - paletteCombo - - - - - - - - Active Palette - - - - - Inactive Palette - - - - - Disabled Palette - - - - - - - - - 7 - 7 - 0 - 0 - - - - - 410 - 260 - - - - - - - - - - - - Fonts - - - - 8 - - - 4 - - - - - Default Font - - - - 8 - - - 4 - - - - - true - - - false - - - - - - - true - - - false - - - - - - - true - - - true - - - false - - - - - - - &Style: - - - stylecombo - - - - - - - &Point Size: - - - psizecombo - - - - - - - F&amily: - - - familycombo - - - - - - - Sample Text - - - Qt::AlignHCenter - - - - - - - - - - Font Substitution - - - - 8 - - - 4 - - - - - 0 - - - 4 - - - - - S&elect or Enter a Family: - - - familysubcombo - - - - - - - true - - - true - - - false - - - - - - - - - QFrame::HLine - - - QFrame::Sunken - - - Qt::Horizontal - - - - - - - Current Substitutions: - - - - - - - - - - 0 - - - 4 - - - - - Up - - - - - - - Down - - - - - - - Remove - - - - - - - - - QFrame::HLine - - - QFrame::Sunken - - - Qt::Horizontal - - - - - - - 0 - - - 4 - - - - - Select s&ubstitute Family: - - - choosesubcombo - - - - - - - true - - - false - - - - - - - Add - - - - - - - - - - - - - Interface - - - - 7 - - - 4 - - - - - Feel Settings - - - - 8 - - - 4 - - - - - ms - - - 10000 - - - 10 - - - - - - - &Double Click Interval: - - - dcispin - - - - - - - No blinking - - - ms - - - 10000 - - - 9 - - - - - - - &Cursor Flash Time: - - - cfispin - - - - - - - lines - - - 20 - - - 1 - - - - - - - Wheel &Scroll Lines: - - - wslspin - - - - - - - Resolve symlinks in URLs - - - - - - - - - - GUI Effects - - - - 8 - - - 4 - - - - - &Enable - - - Alt+E - - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - - 0 - - - 4 - - - - - &Menu Effect: - - - menueffect - - - - - - - C&omboBox Effect: - - - comboeffect - - - - - - - &ToolTip Effect: - - - tooltipeffect - - - - - - - Tool&Box Effect: - - - toolboxeffect - - - - - - - 0 - - - true - - - - Disable - - - - - Animate - - - - - Fade - - - - - - - - - Disable - - - - - Animate - - - - - - - - - Disable - - - - - Animate - - - - - Fade - - - - - - - - - Disable - - - - - Animate - - - - - - - - - - - - - - Global Strut - - - - 8 - - - 4 - - - - - Minimum &Width: - - - strutwidth - - - - - - - Minimum Hei&ght: - - - strutheight - - - - - - - pixels - - - 1000 - - - - - - - pixels - - - 1000 - - - - - - - - - - Enhanced support for languages written right-to-left - - - - - - - XIM Input Style: - - - - - - - 0 - - - - On The Spot - - - - - Over The Spot - - - - - Off The Spot - - - - - Root - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 40 - - - - - - - - - Printer - - - - 8 - - - 4 - - - - - Enable Font embedding - - - true - - - - - - - - 5 - 7 - 0 - 0 - - - - Font Paths - - - - 8 - - - 4 - - - - - 0 - - - 4 - - - - - Up - - - - - - - Remove - - - - - - - Down - - - - - - - - - - - - 0 - - - 4 - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 20 - 20 - - - - - - - - Add - - - - - - - Browse... - - - - - - - Press the <b>Browse</b> button or enter a directory and press Enter to add them to the list. - - - - - - - - - - - - - - - - - - - - - 0 - 0 - 724 - 27 - - - - - - 0 - 0 - 800 - 480 - - - - &File - - - - - - - - - - - - 0 - 0 - 800 - 480 - - - - &Help - - - - - - - - - - - - - - &Save - - - Save - - - Ctrl+S - - - - - E&xit - - - Exit - - - - - - - - &About - - - About - - - - - - - - About &Qt - - - About Qt - - - - - - - Q3ListBox - -
q3listbox.h
- 0 - -
- - ColorButton - -
colorbutton.h
- 0 - -
- - Q3Frame - -
Qt3Support/Q3Frame
- 1 - -
- - PreviewFrame - -
previewframe.h
- 0 - -
- - Q3MainWindow - -
q3mainwindow.h
- 1 - -
-
- - helpview - TabWidget3 - familycombo - stylecombo - psizecombo - samplelineedit - familysubcombo - PushButton2 - PushButton3 - PushButton4 - choosesubcombo - PushButton1 - dcispin - cfispin - wslspin - effectcheckbox - menueffect - comboeffect - tooltipeffect - strutwidth - strutheight - sublistbox - - - -
diff --git a/tests/auto/uiloader/baseline/mydialog.ui b/tests/auto/uiloader/baseline/mydialog.ui deleted file mode 100644 index d765b30760..0000000000 --- a/tests/auto/uiloader/baseline/mydialog.ui +++ /dev/null @@ -1,47 +0,0 @@ - - - - - MyDialog - - - - 0 - 0 - 401 - 70 - - - - Mach 2! - - - - 9 - - - 6 - - - - - Join the life in the fastlane; - PCH enable your project today! - - - - - - - - &Quit - - - Alt+Q - - - - - - qPixmapFromMimeSource - - - diff --git a/tests/auto/uiloader/baseline/myform.ui b/tests/auto/uiloader/baseline/myform.ui deleted file mode 100644 index 00702e860a..0000000000 --- a/tests/auto/uiloader/baseline/myform.ui +++ /dev/null @@ -1,130 +0,0 @@ - - - - - Form - - - - 0 - 0 - 258 - 224 - - - - Export Document - - - - 8 - - - 6 - - - - - Export Options - - - - 8 - - - 6 - - - - - &DocBook - - - - - - - &LaTeX - - - true - - - - - - - Include p&ictures - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - &Compress - - - - - - - &HTML - - - - - - - &PostScript - - - - - - - PD&F - - - - - - - Include &metadata - - - - - - - Create inde&x - - - true - - - - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/newactiondialog.ui b/tests/auto/uiloader/baseline/newactiondialog.ui deleted file mode 100644 index ae6212f868..0000000000 --- a/tests/auto/uiloader/baseline/newactiondialog.ui +++ /dev/null @@ -1,202 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - qdesigner_internal::NewActionDialog - - - - 0 - 0 - 363 - 156 - - - - New Action... - - - - - - - - &Text: - - - editActionText - - - - - - - - 255 - 0 - - - - - - - - Object &name: - - - editObjectName - - - - - - - - - - &Icon: - - - iconSelector - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Qt::Vertical - - - - 0 - 0 - - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - qdesigner_internal::IconSelector - QWidget -
iconselector_p.h
- 1 -
-
- - editActionText - editObjectName - - - - - buttonBox - accepted() - qdesigner_internal::NewActionDialog - accept() - - - 165 - 162 - - - 291 - 94 - - - - - buttonBox - rejected() - qdesigner_internal::NewActionDialog - reject() - - - 259 - 162 - - - 293 - 128 - - - - -
diff --git a/tests/auto/uiloader/baseline/newdynamicpropertydialog.ui b/tests/auto/uiloader/baseline/newdynamicpropertydialog.ui deleted file mode 100644 index 2aa91f3e9e..0000000000 --- a/tests/auto/uiloader/baseline/newdynamicpropertydialog.ui +++ /dev/null @@ -1,106 +0,0 @@ - - qdesigner_internal::NewDynamicPropertyDialog - - - - 0 - 0 - 340 - 118 - - - - Create Dynamic Property - - - - - - - - - 220 - 0 - - - - - - - - - 0 - 0 - - - - Property Name - - - - - - - - - - - - horizontalSpacer - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 0 - 0 - - - - Property Type - - - - - - - - - - - - Qt::Vertical - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - false - - - - - - - - diff --git a/tests/auto/uiloader/baseline/newform.ui b/tests/auto/uiloader/baseline/newform.ui deleted file mode 100644 index 3f0a92dfb1..0000000000 --- a/tests/auto/uiloader/baseline/newform.ui +++ /dev/null @@ -1,153 +0,0 @@ - - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - - NewForm - - - - 0 - 0 - 495 - 319 - - - - New Form - - - - 9 - - - 6 - - - - - 1 - - - 6 - - - - - - 128 - 128 - - - - false - - - 1 - - - - 0 - - - - - - - - - 7 - 5 - 0 - 0 - - - - 1 - - - Choose a template for a preview - - - Qt::AlignCenter - - - 5 - - - - - - - - - QFrame::HLine - - - QFrame::Sunken - - - - - - - Show this Dialog on Startup - - - - - - - - - - - - QDialogButtonBox - QWidget -
qdialogbuttonbox.h
- 1 - -
-
- - -
diff --git a/tests/auto/uiloader/baseline/orderdialog.ui b/tests/auto/uiloader/baseline/orderdialog.ui deleted file mode 100644 index b44824778f..0000000000 --- a/tests/auto/uiloader/baseline/orderdialog.ui +++ /dev/null @@ -1,198 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - qdesigner_internal::OrderDialog - - - - 0 - 0 - 467 - 310 - - - - Change Page Order - - - - - - Page Order - - - - 6 - - - 9 - - - 9 - - - 9 - - - 9 - - - - - - 344 - 0 - - - - QAbstractItemView::InternalMove - - - QAbstractItemView::ContiguousSelection - - - QListView::Snap - - - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Move page up - - - - - - - Move page down - - - - - - - - 0 - 0 - - - - Qt::Vertical - - - - 20 - 99 - - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset - - - - - - - - - buttonBox - accepted() - qdesigner_internal::OrderDialog - accept() - - - 50 - 163 - - - 6 - 151 - - - - - buttonBox - rejected() - qdesigner_internal::OrderDialog - reject() - - - 300 - 160 - - - 348 - 148 - - - - - diff --git a/tests/auto/uiloader/baseline/outputpage.ui b/tests/auto/uiloader/baseline/outputpage.ui deleted file mode 100644 index 755f818085..0000000000 --- a/tests/auto/uiloader/baseline/outputpage.ui +++ /dev/null @@ -1,95 +0,0 @@ - - OutputPage - - - - 0 - 0 - 417 - 242 - - - - Form - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - - 0 - 0 - - - - Project file name: - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - Collection file name: - - - - - - - - 0 - 0 - - - - - - - - Qt::Vertical - - - - 20 - 20 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/pagefold.ui b/tests/auto/uiloader/baseline/pagefold.ui deleted file mode 100644 index 7ae313c331..0000000000 --- a/tests/auto/uiloader/baseline/pagefold.ui +++ /dev/null @@ -1,349 +0,0 @@ - - MainWindow - - - - 0 - 0 - 392 - 412 - - - - MainWindow - - - - - 9 - - - 6 - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 9 - - - 6 - - - - - Specify your name - - - true - - - -1 - - - - Girish - - - - - Jasmin - - - - - Simon - - - - - Zack - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Check this if you are female - - - &Female - - - - - - - Gender: - - - - - - - &Age: - - - ageSpinBox - - - - - - - Check this if you are male - - - &Male - - - - - - - &Name: - - - nameCombo - - - - - - - &Password: - - - passwordEdit - - - - - - - Specify your age - - - Specify your age - - - 12 - - - 22 - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - Please read the LICENSE file before checking - - - I &accept the terms and &conditions - - - - - - - Specify your password - - - Specify your password - - - Password - - - QLineEdit::Password - - - - - - - Select your profession - - - Specify your name here - - - Specify your name here - - - 0 - - - - Developer - - - - - Student - - - - - Fisherman - - - - - - - - Profession: - - - professionList - - - - - - - Specify country of origin - - - Specify country of origin - - - 6 - - - - Egypt - - - - - France - - - - - Germany - - - - - India - - - - - Italy - - - - - Korea - - - - - Norway - - - - - - - - Pro&fession - - - professionList - - - - - - - - - - - - 0 - 0 - 392 - 25 - - - - - &File - - - - - - - - &Help - - - - - - - - - - - - &Exit - - - - - About Qt - - - - - Edit &Style - - - - - About - - - - - - diff --git a/tests/auto/uiloader/baseline/paletteeditor.ui b/tests/auto/uiloader/baseline/paletteeditor.ui deleted file mode 100644 index 1cc6a18583..0000000000 --- a/tests/auto/uiloader/baseline/paletteeditor.ui +++ /dev/null @@ -1,264 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - qdesigner_internal::PaletteEditor - - - - 0 - 0 - 365 - 409 - - - - - 7 - 7 - 0 - 0 - - - - Edit Palette - - - - 9 - - - 6 - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - Tune Palette - - - - 9 - - - 6 - - - - - - 7 - 13 - 0 - 0 - - - - - - - - - - - - 0 - 200 - - - - - - - - Show Details - - - - - - - Compute Details - - - true - - - - - - - Quick - - - - - - - - - - - 5 - 7 - 0 - 0 - - - - Preview - - - - 8 - - - 6 - - - - - Disabled - - - - - - - Inactive - - - - - - - Active - - - true - - - - - - - - 7 - 7 - 0 - 0 - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - - QtColorButton - QToolButton -
qtcolorbutton.h
-
- - qdesigner_internal::PreviewFrame - QWidget -
previewframe.h
-
-
- - - - buttonBox - accepted() - qdesigner_internal::PaletteEditor - accept() - - - 180 - 331 - - - 134 - 341 - - - - - buttonBox - rejected() - qdesigner_internal::PaletteEditor - reject() - - - 287 - 329 - - - 302 - 342 - - - - -
diff --git a/tests/auto/uiloader/baseline/paletteeditoradvancedbase.ui b/tests/auto/uiloader/baseline/paletteeditoradvancedbase.ui deleted file mode 100644 index 4de888aa31..0000000000 --- a/tests/auto/uiloader/baseline/paletteeditoradvancedbase.ui +++ /dev/null @@ -1,617 +0,0 @@ - - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - - PaletteEditorAdvancedBase - - - PaletteEditorAdvancedBase - - - true - - - - 0 - 0 - 295 - 346 - - - - Tune Palette - - - true - - - <b>Edit Palette</b><p>Change the palette of the current widget or form.</p><p>Use a generated palette or select colors for each color group and each color role.</p><p>The palette can be tested with different widget layouts in the preview section.</p> - - - - unnamed - - - 11 - - - 6 - - - - - unnamed - - - 0 - - - 6 - - - - - TextLabel1 - - - Select &Palette: - - - paletteCombo - - - - - - - paletteCombo - - - - Active Palette - - - - - Inactive Palette - - - - - Disabled Palette - - - - - - - - - - ButtonGroup1 - - - - 5 - 4 - 0 - 0 - - - - Auto - - - - unnamed - - - 11 - - - 6 - - - - - checkBuildInactive - - - Build inactive palette from active - - - true - - - - - - - checkBuildDisabled - - - Build disabled palette from active - - - true - - - - - - - - - - groupCentral - - - Central color &roles - - - - unnamed - - - 11 - - - 6 - - - - - comboCentral - - - Choose central color role - - - <b>Select a color role.</b><p>Available central roles are: <ul> <li>Window - general background color.</li> <li>WindowText - general foreground color. </li> <li>Base - used as background color for e.g. text entry widgets, usually white or another light color. </li> <li>Text - the foreground color used with Base. Usually this is the same as WindowText, in what case it must provide good contrast both with Window and Base. </li> <li>Button - general button background color, where buttons need a background different from Window, as in the Macintosh style. </li> <li>ButtonText - a foreground color used with the Button color. </li> <li>Highlight - a color to indicate a selected or highlighted item. </li> <li>HighlightedText - a text color that contrasts to Highlight. </li> <li>BrightText - a text color that is very different from WindowText and contrasts well with e.g. black. </li> </ul> </p> - - - - Window - - - - - WindowText - - - - - Button - - - - - Base - - - - - Text - - - - - BrightText - - - - - ButtonText - - - - - Highlight - - - - - HighlightedText - - - - - - - - unnamed - - - 0 - - - 6 - - - - - - 20 - 20 - - - - Expanding - - - Horizontal - - - - - - - labelCentral - - - - 1 - 1 - 0 - 0 - - - - - 0 - 0 - - - - &Select Color: - - - buttonCentral - - - - - - - buttonCentral - - - - 0 - 0 - 0 - 0 - - - - Qt::TabFocus - - - Choose a color - - - Choose a color for the selected central color role. - - - - - - - - - - - - groupEffect - - - 3-D shadow &effects - - - - unnamed - - - 11 - - - 6 - - - - - unnamed - - - 0 - - - 6 - - - - - checkBuildEffect - - - Build &from button color - - - true - - - Generate shadings - - - Check to let 3D-effect colors be calculated from button-color. - - - - - - - comboEffect - - - Choose 3D-effect color role - - - <b>Select a color role.</b><p>Available effect roles are: <ul> <li>Light - lighter than Button color. </li> <li>Midlight - between Button and Light. </li> <li>Mid - between Button and Dark. </li> <li>Dark - darker than Button. </li> <li>Shadow - a very dark color. </li> </ul> - - - - Light - - - - - Midlight - - - - - Mid - - - - - Dark - - - - - Shadow - - - - - - - - - - unnamed - - - 0 - - - 6 - - - - - - 20 - 20 - - - - Expanding - - - Horizontal - - - - - - - labelEffect - - - - 1 - 1 - 0 - 0 - - - - - 0 - 0 - - - - Select Co&lor: - - - buttonEffect - - - - - - - buttonEffect - - - - 0 - 0 - 0 - 0 - - - - Qt::TabFocus - - - Choose a color - - - Choose a color for the selected effect color role. - - - - - - - - - - - - unnamed - - - 0 - - - 6 - - - - - - 20 - 20 - - - - Expanding - - - Horizontal - - - - - - - buttonOk - - - OK - - - true - - - true - - - Close dialog and apply all changes. - - - - - - - buttonCancel - - - Cancel - - - true - - - Close dialog and discard all changes. - - - - - - - - - - - ColorButton - -
colorbutton.h
- - 40 - 25 - - 0 - - 5 - 5 - - image0 - - color - pixmap - -
-
- - buttonOk - buttonCancel - paletteCombo - checkBuildInactive - checkBuildDisabled - comboCentral - buttonCentral - checkBuildEffect - comboEffect - buttonEffect - - - - 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 - - -
diff --git a/tests/auto/uiloader/baseline/passworddialog.ui b/tests/auto/uiloader/baseline/passworddialog.ui deleted file mode 100644 index 7c1665867a..0000000000 --- a/tests/auto/uiloader/baseline/passworddialog.ui +++ /dev/null @@ -1,111 +0,0 @@ - - PasswordDialog - - - - 0 - 0 - 399 - 148 - - - - Authentication Required - - - - - - - - DUMMY ICON - - - - - - - - 0 - 0 - - - - INTRO TEXT DUMMY - - - - - - - - - Username: - - - - - - - - - - Password: - - - - - - - QLineEdit::Password - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - PasswordDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - PasswordDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/tests/auto/uiloader/baseline/pathpage.ui b/tests/auto/uiloader/baseline/pathpage.ui deleted file mode 100644 index 89083915dd..0000000000 --- a/tests/auto/uiloader/baseline/pathpage.ui +++ /dev/null @@ -1,114 +0,0 @@ - - PathPage - - - - 0 - 0 - 417 - 243 - - - - Form - - - - - - - 0 - 0 - - - - File filters: - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - Documentation source file paths: - - - - - - - - - - - 0 - 0 - - - - Add - - - - - - - - 0 - 0 - - - - Remove - - - - - - - Qt::Vertical - - - - 20 - 51 - - - - - - - - Qt::Vertical - - - - 20 - 31 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/phrasebookbox.ui b/tests/auto/uiloader/baseline/phrasebookbox.ui deleted file mode 100644 index 66558ea28a..0000000000 --- a/tests/auto/uiloader/baseline/phrasebookbox.ui +++ /dev/null @@ -1,211 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - PhraseBookBox - - - - 0 - 0 - 596 - 454 - - - - Edit Phrase Book - - - This window allows you to add, modify, or delete phrases in a phrase book. - - - - - - - - - - &Translation: - - - targetLed - - - - - - - This is the phrase in the target language corresponding to the source phrase. - - - - - - - S&ource phrase: - - - sourceLed - - - - - - - This is a definition for the source phrase. - - - - - - - This is the phrase in the source language. - - - - - - - &Definition: - - - definitionLed - - - - - - - - - false - - - true - - - false - - - true - - - false - - - - - - - - - - - Click here to add the phrase to the phrase book. - - - &New Phrase - - - - - - - Click here to remove the phrase from the phrase book. - - - &Remove Phrase - - - - - - - Click here to save the changes made. - - - &Save - - - - - - - Click here to close this window. - - - Close - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 51 - - - - - - - - - - - sourceLed - targetLed - definitionLed - newBut - removeBut - saveBut - closeBut - - - - diff --git a/tests/auto/uiloader/baseline/plugindialog.ui b/tests/auto/uiloader/baseline/plugindialog.ui deleted file mode 100644 index d4bec98834..0000000000 --- a/tests/auto/uiloader/baseline/plugindialog.ui +++ /dev/null @@ -1,153 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - PluginDialog - - - - 0 - 0 - 401 - 331 - - - - Plugin Information - - - - 6 - - - 8 - - - 8 - - - 8 - - - 8 - - - - - TextLabel - - - true - - - - - - - Qt::ElideNone - - - - 1 - - - - - - - - TextLabel - - - true - - - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Close - - - - - - - - - buttonBox - rejected() - PluginDialog - reject() - - - 154 - 307 - - - 401 - 280 - - - - - diff --git a/tests/auto/uiloader/baseline/preferencesdialog.ui b/tests/auto/uiloader/baseline/preferencesdialog.ui deleted file mode 100644 index 3092fcb53c..0000000000 --- a/tests/auto/uiloader/baseline/preferencesdialog.ui +++ /dev/null @@ -1,165 +0,0 @@ - - PreferencesDialog - - - - 0 - 0 - 455 - 359 - - - - Preferences - - - true - - - - - - - - - - User Interface Mode - - - - - - - - - - - - - - - - - - - - - - Additional Template Paths - - - - - - - - - ... - - - - - - - ... - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - FontPanel - QGroupBox -
fontpanel.h
- 1 -
- - qdesigner_internal::GridPanel - QGroupBox -
gridpanel_p.h
- 1 -
- - qdesigner_internal::PreviewConfigurationWidget - QGroupBox -
previewconfigurationwidget_p.h
- 1 -
-
- - - - m_dialogButtonBox - accepted() - PreferencesDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - m_dialogButtonBox - rejected() - PreferencesDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - -
diff --git a/tests/auto/uiloader/baseline/previewconfigurationwidget.ui b/tests/auto/uiloader/baseline/previewconfigurationwidget.ui deleted file mode 100644 index 2f18766ff7..0000000000 --- a/tests/auto/uiloader/baseline/previewconfigurationwidget.ui +++ /dev/null @@ -1,91 +0,0 @@ - - PreviewConfigurationWidget - - - Form - - - Print/Preview Configuration - - - true - - - - - - Style - - - - - - - - - - Style sheet - - - - - - - - - - 149 - 0 - - - - - - - - ... - - - - - - - ... - - - - - - - - - Device skin - - - - - - - - - - - - ... - - - - - - - - - - qdesigner_internal::TextPropertyEditor - QLineEdit -
textpropertyeditor_p.h
-
-
- - -
diff --git a/tests/auto/uiloader/baseline/previewdialogbase.ui b/tests/auto/uiloader/baseline/previewdialogbase.ui deleted file mode 100644 index 593ee33577..0000000000 --- a/tests/auto/uiloader/baseline/previewdialogbase.ui +++ /dev/null @@ -1,224 +0,0 @@ - - PreviewDialogBase - - - - 0 - 0 - 733 - 479 - - - - Print Preview - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - &Paper Size: - - - paperSizeCombo - - - - - - - - 1 - 0 - 0 - 0 - - - - - - - - &Orientation: - - - paperOrientationCombo - - - - - - - - 1 - 0 - 0 - 0 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - - - 6 - - - - - 0 - - - false - - - true - - - false - - - 1 - - - - 1 - - - - - - - - - 5 - 5 - 1 - 0 - - - - - - - - - - 0 - - - 6 - - - - - false - - - - 7 - 0 - 1 - 0 - - - - 0 - - - false - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - - - - QScrollArea - QWidget -
qscrollarea.h
- 1 -
-
- - - - buttonBox - accepted() - PreviewDialogBase - accept() - - - 696 - 526 - - - 677 - 446 - - - - - buttonBox - rejected() - PreviewDialogBase - reject() - - - 587 - 529 - - - 547 - 448 - - - - -
diff --git a/tests/auto/uiloader/baseline/previewwidget.ui b/tests/auto/uiloader/baseline/previewwidget.ui deleted file mode 100644 index d38ab7cf30..0000000000 --- a/tests/auto/uiloader/baseline/previewwidget.ui +++ /dev/null @@ -1,238 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - qdesigner_internal::PreviewWidget - - - - 0 - 0 - 471 - 251 - - - - - 1 - 1 - 0 - 0 - - - - Preview Window - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - LineEdit - - - - - - - - ComboBox - - - - - - - - 0 - - - 6 - - - - - - - - PushButton - - - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - - - - - - 32767 - 50 - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - Qt::Horizontal - - - - - - - ButtonGroup2 - - - - 9 - - - 6 - - - - - CheckBox1 - - - true - - - - - - - CheckBox2 - - - - - - - - - - ButtonGroup - - - - 9 - - - 6 - - - - - RadioButton1 - - - true - - - - - - - RadioButton2 - - - - - - - RadioButton3 - - - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/previewwidgetbase.ui b/tests/auto/uiloader/baseline/previewwidgetbase.ui deleted file mode 100644 index 3e0570092d..0000000000 --- a/tests/auto/uiloader/baseline/previewwidgetbase.ui +++ /dev/null @@ -1,340 +0,0 @@ - - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - - PreviewWidgetBase - - - PreviewWidgetBase - - - - 0 - 0 - 378 - 236 - - - - - 1 - 1 - 0 - 0 - - - - Preview Window - - - - unnamed - - - 11 - - - 6 - - - - - unnamed - - - 0 - - - 6 - - - - - unnamed - - - 0 - - - 6 - - - - - ButtonGroup1 - - - ButtonGroup - - - - unnamed - - - 11 - - - 6 - - - - - RadioButton1 - - - RadioButton1 - - - true - - - - - - - RadioButton2 - - - RadioButton2 - - - - - - - RadioButton3 - - - RadioButton3 - - - - - - - - - - ButtonGroup2 - - - ButtonGroup2 - - - - unnamed - - - 11 - - - 6 - - - - - CheckBox1 - - - CheckBox1 - - - true - - - - - - - CheckBox2 - - - CheckBox2 - - - - - - - - - - ProgressBar1 - - - 50 - - - - - - - - - unnamed - - - 0 - - - 6 - - - - - LineEdit1 - - - LineEdit - - - - - - - ComboBox1 - - - - ComboBox - - - - - - - - unnamed - - - 0 - - - 6 - - - - - SpinBox1 - - - - - - - PushButton1 - - - PushButton - - - - - - - - - ScrollBar1 - - - Qt::Horizontal - - - - - - - Slider1 - - - Qt::Horizontal - - - - - - - textView - - - - 32767 - 50 - - - - true - - - <p> -<a href="http://qt.nokia.com">http://qt.nokia.com</a> -</p> -<p> -<a href="http://www.kde.org">http://www.kde.org</a> -</p> - - - - - - - - - - - - 20 - 20 - - - - Expanding - - - Vertical - - - - - - qPixmapFromMimeSource - diff --git a/tests/auto/uiloader/baseline/proxy.ui b/tests/auto/uiloader/baseline/proxy.ui deleted file mode 100644 index 62a8be6273..0000000000 --- a/tests/auto/uiloader/baseline/proxy.ui +++ /dev/null @@ -1,104 +0,0 @@ - - ProxyDialog - - - - 0 - 0 - 369 - 144 - - - - Proxy Authentication - - - - - - ICON - - - - - - - Connect to proxy - - - true - - - - - - - Username: - - - - - - - - - - Password: - - - - - - - QLineEdit::Password - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - ProxyDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - ProxyDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/tests/auto/uiloader/baseline/qfiledialog.ui b/tests/auto/uiloader/baseline/qfiledialog.ui deleted file mode 100644 index 85f5991722..0000000000 --- a/tests/auto/uiloader/baseline/qfiledialog.ui +++ /dev/null @@ -1,320 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - QFileDialog - - - - 0 - 0 - 521 - 316 - - - - true - - - - - - Look in: - - - - - - - - - - 1 - 0 - - - - - 50 - 0 - - - - - - - - Back - - - - - - - Forward - - - - - - - Parent Directory - - - - - - - Create New Folder - - - - - - - List View - - - - - - - Detail View - - - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 0 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - - - - - 1 - 0 - - - - - - - - Qt::Vertical - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - - 0 - 0 - - - - Files of type: - - - - - - - - 0 - 0 - - - - - - - - - QFileDialogTreeView - QTreeView -
qfiledialog_p.h
-
- - QFileDialogListView - QListView -
qfiledialog_p.h
-
- - QSidebar - QListWidget -
qsidebar_p.h
-
- - QFileDialogLineEdit - QLineEdit -
qfiledialog_p.h
-
- - QFileDialogComboBox - QComboBox -
qfiledialog_p.h
-
-
- - lookInCombo - backButton - forwardButton - toParentButton - newFolderButton - listModeButton - detailModeButton - sidebar - listView - fileNameEdit - fileTypeCombo - buttonBox - treeView - - - -
diff --git a/tests/auto/uiloader/baseline/qpagesetupwidget.ui b/tests/auto/uiloader/baseline/qpagesetupwidget.ui deleted file mode 100644 index ace2ab8f44..0000000000 --- a/tests/auto/uiloader/baseline/qpagesetupwidget.ui +++ /dev/null @@ -1,353 +0,0 @@ - - QPageSetupWidget - - - - 0 - 0 - 416 - 488 - - - - Form - - - - 0 - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Paper - - - - - - Page size: - - - paperSize - - - - - - - - - - Width: - - - paperWidth - - - - - - - - - 9999.989999999999782 - - - - - - - Height: - - - paperHeight - - - - - - - 9999.989999999999782 - - - - - - - - - Paper source: - - - paperSource - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - Orientation - - - - - - Portrait - - - true - - - - - - - Landscape - - - - - - - Reverse landscape - - - - - - - Reverse portrait - - - - - - - Qt::Vertical - - - - 0 - 0 - - - - - - - - - - - - - - Margins - - - - - - - - top margin - - - top margin - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 999.990000000000009 - - - - - - - - - Qt::Horizontal - - - - 0 - 20 - - - - - - - - left margin - - - left margin - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 999.990000000000009 - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 0 - 0 - - - - - - - - right margin - - - right margin - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 999.990000000000009 - - - - - - - Qt::Horizontal - - - - 0 - 20 - - - - - - - - - - bottom margin - - - bottom margin - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 999.990000000000009 - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 0 - 20 - - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 0 - 20 - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 0 - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/qprintpropertieswidget.ui b/tests/auto/uiloader/baseline/qprintpropertieswidget.ui deleted file mode 100644 index 26fa09599e..0000000000 --- a/tests/auto/uiloader/baseline/qprintpropertieswidget.ui +++ /dev/null @@ -1,70 +0,0 @@ - - QPrintPropertiesWidget - - - - 0 - 0 - 396 - 288 - - - - Form - - - - 0 - - - - - 0 - - - - - 0 - 0 - 392 - 261 - - - - Page - - - - - - - - - - Advanced - - - - - - true - - - - - - - - - - - - QPageSetupWidget - QWidget -
qpagesetupdialog_unix_p.h
- 1 -
-
- - -
diff --git a/tests/auto/uiloader/baseline/qprintsettingsoutput.ui b/tests/auto/uiloader/baseline/qprintsettingsoutput.ui deleted file mode 100644 index de8f4faeeb..0000000000 --- a/tests/auto/uiloader/baseline/qprintsettingsoutput.ui +++ /dev/null @@ -1,371 +0,0 @@ - - QPrintSettingsOutput - - - - 0 - 0 - 416 - 166 - - - - Form - - - - 0 - - - - - 0 - - - - - 0 - 0 - 412 - 139 - - - - Copies - - - - - - - 0 - 0 - - - - Print range - - - - 4 - - - 6 - - - - - Print all - - - true - - - - - - - 6 - - - 0 - - - - - Pages from - - - - - - - false - - - 1 - - - 999 - - - - - - - to - - - - - - - false - - - 1 - - - 999 - - - - - - - Qt::Horizontal - - - - 0 - 20 - - - - - - - - - - Selection - - - - - - - Qt::Vertical - - - - 1 - 1 - - - - - - - - - - - Output Settings - - - - - - Copies: - - - copies - - - - - - - 1 - - - 999 - - - - - - - Qt::Horizontal - - - - 91 - 20 - - - - - - - - Collate - - - - - - - - 0 - 0 - - - - - - - - Reverse - - - - - - - Qt::Vertical - - - - 0 - 1 - - - - - - - - - - - - - 0 - 0 - 412 - 139 - - - - Options - - - - - - Color Mode - - - - - - Qt::Vertical - - - - 1 - 0 - - - - - - - - Color - - - - - - - - - - Grayscale - - - - - - - - - - Duplex Printing - - - - - - None - - - true - - - - - - - Long side - - - - - - - Short side - - - - - - - Qt::Vertical - - - - 1 - 0 - - - - - - - - - - - - - - - - - printRange - toggled(bool) - from - setEnabled(bool) - - - 76 - 59 - - - 122 - 57 - - - - - printRange - toggled(bool) - to - setEnabled(bool) - - - 69 - 67 - - - 215 - 67 - - - - - diff --git a/tests/auto/uiloader/baseline/qprintwidget.ui b/tests/auto/uiloader/baseline/qprintwidget.ui deleted file mode 100644 index 8a4f3bde0a..0000000000 --- a/tests/auto/uiloader/baseline/qprintwidget.ui +++ /dev/null @@ -1,116 +0,0 @@ - - QPrintWidget - - - - 0 - 0 - 443 - 175 - - - - Form - - - - 0 - - - - - Printer - - - - - - &Name: - - - printers - - - - - - - - 3 - 0 - - - - - - - - - 1 - 0 - - - - P&roperties - - - - - - - Location: - - - - - - - - - - Preview - - - - - - - Type: - - - - - - - - - - Output &file: - - - filename - - - - - - - - - - - - ... - - - - - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/qsqlconnectiondialog.ui b/tests/auto/uiloader/baseline/qsqlconnectiondialog.ui deleted file mode 100644 index 91a8700579..0000000000 --- a/tests/auto/uiloader/baseline/qsqlconnectiondialog.ui +++ /dev/null @@ -1,224 +0,0 @@ - - - - - QSqlConnectionDialogUi - - - - 0 - 0 - 315 - 302 - - - - Connect... - - - - 8 - - - 6 - - - - - Connection settings - - - - 8 - - - 6 - - - - - - - - &Username: - - - editUsername - - - - - - - D&river - - - comboDriver - - - - - - - - - - Default - - - 65535 - - - -1 - - - -1 - - - - - - - Database Name: - - - editDatabase - - - - - - - QLineEdit::Password - - - - - - - - - - - - - &Hostname: - - - editHostname - - - - - - - P&ort: - - - portSpinBox - - - - - - - &Password: - - - editPassword - - - - - - - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Us&e predefined in-memory database - - - - - - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - &OK - - - true - - - - - - - &Cancel - - - - - - - - - - comboDriver - editDatabase - editUsername - editPassword - editHostname - portSpinBox - dbCheckBox - okButton - cancelButton - - - - diff --git a/tests/auto/uiloader/baseline/qtgradientdialog.ui b/tests/auto/uiloader/baseline/qtgradientdialog.ui deleted file mode 100644 index 0c5578fd0b..0000000000 --- a/tests/auto/uiloader/baseline/qtgradientdialog.ui +++ /dev/null @@ -1,121 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - QtGradientDialog - - - - 0 - 0 - 178 - 81 - - - - Edit Gradient - - - - - - - 0 - 0 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - - QtGradientEditor - QFrame -
qtgradienteditor.h
- 1 -
-
- - - - buttonBox - accepted() - QtGradientDialog - accept() - - - 72 - 224 - - - 21 - 243 - - - - - buttonBox - rejected() - QtGradientDialog - reject() - - - 168 - 233 - - - 152 - 251 - - - - -
diff --git a/tests/auto/uiloader/baseline/qtgradienteditor.ui b/tests/auto/uiloader/baseline/qtgradienteditor.ui deleted file mode 100644 index 7d7a334413..0000000000 --- a/tests/auto/uiloader/baseline/qtgradienteditor.ui +++ /dev/null @@ -1,1377 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - QtGradientEditor - - - - 0 - 0 - 364 - 518 - - - - Form - - - - - 10 - 69 - 193 - 150 - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Gradient Editor - - - This area shows a preview of the gradient being edited. It also allows you to edit parameters specific to the gradient's type such as start and final point, radius, etc. by drag & drop. - - - - - - - - - 209 - 69 - 64 - 23 - - - - 1 - - - - - - 279 - 69 - 73 - 23 - - - - false - - - 3 - - - 1.000000000000000 - - - 0.010000000000000 - - - - - - 209 - 99 - 64 - 23 - - - - 2 - - - - - - 279 - 99 - 73 - 23 - - - - false - - - 3 - - - 1.000000000000000 - - - 0.010000000000000 - - - - - - 209 - 129 - 64 - 23 - - - - 3 - - - - - - 279 - 129 - 73 - 23 - - - - false - - - 3 - - - 1.000000000000000 - - - 0.010000000000000 - - - - - - 209 - 159 - 64 - 23 - - - - 4 - - - - - - 279 - 159 - 73 - 23 - - - - false - - - 3 - - - 1.000000000000000 - - - 0.010000000000000 - - - - - - 209 - 189 - 64 - 23 - - - - 5 - - - - - - 279 - 189 - 73 - 23 - - - - false - - - 3 - - - 1.000000000000000 - - - 0.010000000000000 - - - - - - 10 - 225 - 193 - 67 - - - - Gradient Stops Editor - - - This area allows you to edit gradient stops. Double click on the existing stop handle to duplicate it. Double click outside of the existing stop handles to create a new stop. Drag & drop the handle to reposition it. Use right mouse button to popup context menu with extra actions. - - - - - - 209 - 231 - 64 - 23 - - - - Zoom - - - - - - 279 - 260 - 72 - 26 - - - - - 0 - 0 - - - - Reset Zoom - - - Reset Zoom - - - - - - 209 - 304 - 64 - 23 - - - - Position - - - - - - 10 - 335 - 32 - 18 - - - - - 0 - 0 - - - - Hue - - - H - - - - - - 48 - 333 - 155 - 23 - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Hue - - - - - - - - - 209 - 335 - 64 - 18 - - - - - 0 - 0 - - - - Hue - - - - - - 10 - 364 - 32 - 18 - - - - - 0 - 0 - - - - Saturation - - - S - - - - - - 48 - 362 - 155 - 23 - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Saturation - - - - - - - - - 209 - 364 - 64 - 18 - - - - - 0 - 0 - - - - Sat - - - - - - 10 - 393 - 32 - 18 - - - - - 0 - 0 - - - - Value - - - V - - - - - - 48 - 391 - 155 - 23 - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Value - - - - - - - - - 209 - 393 - 64 - 18 - - - - - 0 - 0 - - - - Val - - - - - - 10 - 422 - 32 - 18 - - - - - 0 - 0 - - - - Alpha - - - A - - - - - - 48 - 420 - 155 - 23 - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Alpha - - - - - - - - - 209 - 422 - 64 - 18 - - - - - 0 - 0 - - - - Alpha - - - - - - 10 - 40 - 79 - 22 - - - - Type - - - - - - 96 - 40 - 72 - 22 - - - - Spread - - - - - - 10 - 298 - 32 - 29 - - - - - 0 - 0 - - - - Color - - - - - - 48 - 300 - 26 - 25 - - - - Current stop's color - - - - - - - - - 80 - 301 - 49 - 23 - - - - - 0 - 0 - - - - Show HSV specification - - - HSV - - - true - - - - - - 135 - 301 - 49 - 23 - - - - - 0 - 0 - - - - Show RGB specification - - - RGB - - - - - - 279 - 304 - 73 - 23 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Current stop's position - - - false - - - 3 - - - 0.000000000000000 - - - 1.000000000000000 - - - 0.010000000000000 - - - 0.000000000000000 - - - - - - - - - 279 - 333 - 73 - 23 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - false - - - 359 - - - - - - - - - 279 - 362 - 73 - 23 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - false - - - 255 - - - - - - - - - 279 - 391 - 73 - 23 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - false - - - 255 - - - - - - - - - 279 - 420 - 73 - 23 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - false - - - 255 - - - - - - - - - 279 - 231 - 73 - 23 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - false - - - % - - - 100 - - - 10000 - - - 100 - - - 100 - - - - - - - - - 209 - 219 - 143 - 16 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Horizontal - - - - - - - - - 209 - 292 - 143 - 16 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Horizontal - - - - - - - - - 209 - 260 - 64 - 26 - - - - - 0 - 0 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Zoom In - - - - - - - Zoom Out - - - - - - - Qt::Horizontal - - - - 0 - 20 - - - - - - - - - - 176 - 40 - 25 - 22 - - - - - 0 - 0 - - - - Toggle details extension - - - > - - - true - - - true - - - - - - 10 - 10 - 30 - 26 - - - - Linear Type - - - ... - - - true - - - true - - - - - - 40 - 10 - 30 - 26 - - - - Radial Type - - - ... - - - true - - - true - - - - - - 70 - 10 - 30 - 26 - - - - Conical Type - - - ... - - - true - - - true - - - - - - 110 - 10 - 30 - 26 - - - - Pad Spread - - - ... - - - true - - - true - - - - - - 140 - 10 - 30 - 26 - - - - Repeat Spread - - - ... - - - true - - - true - - - - - - 170 - 10 - 30 - 26 - - - - Reflect Spread - - - ... - - - true - - - true - - - - - - QtColorButton - QToolButton -
qtcolorbutton.h
-
- - QtColorLine - QWidget -
qtcolorline.h
- 1 -
- - QtGradientStopsWidget - QWidget -
qtgradientstopswidget.h
- 1 -
- - QtGradientWidget - QWidget -
qtgradientwidget.h
- 1 -
-
- - typeComboBox - spreadComboBox - detailsButton - spinBox1 - spinBox2 - spinBox3 - spinBox4 - spinBox5 - zoomSpinBox - zoomInButton - zoomOutButton - zoomAllButton - colorButton - hsvRadioButton - rgbRadioButton - positionSpinBox - hueSpinBox - saturationSpinBox - valueSpinBox - alphaSpinBox - - - -
diff --git a/tests/auto/uiloader/baseline/qtgradientview.ui b/tests/auto/uiloader/baseline/qtgradientview.ui deleted file mode 100644 index af7267ea2b..0000000000 --- a/tests/auto/uiloader/baseline/qtgradientview.ui +++ /dev/null @@ -1,135 +0,0 @@ - - QtGradientView - - - - 0 - 0 - 484 - 228 - - - - Gradient View - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - 0 - 0 - - - - New... - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - - 0 - 0 - - - - Edit... - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - - 0 - 0 - - - - Rename - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - - 0 - 0 - - - - Remove - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - Qt::Horizontal - - - - 71 - 26 - - - - - - - - - - - - - listWidget - newButton - editButton - renameButton - removeButton - - - - diff --git a/tests/auto/uiloader/baseline/qtgradientviewdialog.ui b/tests/auto/uiloader/baseline/qtgradientviewdialog.ui deleted file mode 100644 index c84907289b..0000000000 --- a/tests/auto/uiloader/baseline/qtgradientviewdialog.ui +++ /dev/null @@ -1,121 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - QtGradientViewDialog - - - - 0 - 0 - 178 - 72 - - - - Select Gradient - - - - - - - 0 - 0 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - QtGradientView - QFrame -
qtgradientview.h
- 1 -
-
- - - - buttonBox - accepted() - QtGradientViewDialog - accept() - - - 72 - 224 - - - 21 - 243 - - - - - buttonBox - rejected() - QtGradientViewDialog - reject() - - - 168 - 233 - - - 152 - 251 - - - - -
diff --git a/tests/auto/uiloader/baseline/qtresourceeditordialog.ui b/tests/auto/uiloader/baseline/qtresourceeditordialog.ui deleted file mode 100644 index 2205da4d50..0000000000 --- a/tests/auto/uiloader/baseline/qtresourceeditordialog.ui +++ /dev/null @@ -1,180 +0,0 @@ - - QtResourceEditorDialog - - - - 0 - 0 - 469 - 317 - - - - Dialog - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - - - - - New File - - - N - - - - - - - Remove File - - - R - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Ignored - - - - 21 - 20 - - - - - - - - I - - - - - - - - - - - - - - New Resource - - - N - - - - - - - A - - - - - - - Remove Resource or File - - - R - - - - - - - horizontalSpacer - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - QtResourceEditorDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - QtResourceEditorDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/tests/auto/uiloader/baseline/qttoolbardialog.ui b/tests/auto/uiloader/baseline/qttoolbardialog.ui deleted file mode 100644 index c4ad934f80..0000000000 --- a/tests/auto/uiloader/baseline/qttoolbardialog.ui +++ /dev/null @@ -1,207 +0,0 @@ - - QtToolBarDialog - - - - 0 - 0 - 583 - 508 - - - - Customize Toolbars - - - - 8 - - - 6 - - - - - - 1 - - - - - - - - Actions - - - - - - - 6 - - - 0 - - - - - Toolbars - - - - - - - Add new toolbar - - - New - - - - - - - Remove selected toolbar - - - Remove - - - - - - - Rename toolbar - - - Rename - - - - - - - - - 6 - - - 0 - - - - - - 0 - 0 - - - - Move action up - - - Up - - - - - - - - 0 - 0 - - - - Remove action from toolbar - - - <- - - - - - - - - 0 - 0 - - - - Add action to toolbar - - - -> - - - - - - - - 0 - 0 - - - - Move action down - - - Down - - - - - - - Qt::Vertical - - - - 29 - 16 - - - - - - - - - - - - - Current Toolbar Actions - - - - - - - - - - QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults - - - - - - - newButton - removeButton - renameButton - toolBarList - upButton - leftButton - rightButton - downButton - currentToolBarList - - - - diff --git a/tests/auto/uiloader/baseline/querywidget.ui b/tests/auto/uiloader/baseline/querywidget.ui deleted file mode 100644 index 53fa62227b..0000000000 --- a/tests/auto/uiloader/baseline/querywidget.ui +++ /dev/null @@ -1,163 +0,0 @@ - - QueryWidget - - - - 0 - 0 - 545 - 531 - - - - Recipes XQuery Example - - - - - 0 - 29 - 545 - 480 - - - - - - - 6 - - - 0 - - - - - - 550 - 120 - - - - Input Document - - - - - - 6 - - - 0 - - - - - - - - - - - - - - 550 - 120 - - - - Select your query: - - - - - - - - - - 400 - 60 - - - - true - - - false - - - - - - - - - - - 550 - 120 - - - - Output Document - - - - - - 6 - - - 0 - - - - - - 500 - 80 - - - - true - - - false - - - - - - - - - - - - - - - - 0 - 0 - 545 - 29 - - - - - - - 0 - 509 - 545 - 22 - - - - - - - diff --git a/tests/auto/uiloader/baseline/remotecontrol.ui b/tests/auto/uiloader/baseline/remotecontrol.ui deleted file mode 100644 index 1cfc7f5400..0000000000 --- a/tests/auto/uiloader/baseline/remotecontrol.ui +++ /dev/null @@ -1,228 +0,0 @@ - - RemoteControlClass - - - - 0 - 0 - 344 - 364 - - - - RemoteControl - - - - - - - Start URL: - - - - - - - - - - Launch Qt HelpViewer - - - - - - - Qt::Horizontal - - - - 101 - 20 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 113 - 16 - - - - - - - - false - - - Actions - - - - - - Search in Index: - - - - - - - 0 - - - - - - - - - - - :/remotecontrol/enter.png - - - - - - - - - Identifier: - - - - - - - 0 - - - - - - - - - - - :/remotecontrol/enter.png - - - - - - - - - Show URL: - - - - - - - 0 - - - - - - - - - - - :/remotecontrol/enter.png - - - - - - - - - Sync Contents - - - - - - - Qt::Horizontal - - - - 81 - 20 - - - - - - - - Show Contents - - - - - - - Show Index - - - - - - - Show Bookmarks - - - - - - - - - - - - 0 - 0 - 344 - 21 - - - - - File - - - - - - - - - Quit - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/saveformastemplate.ui b/tests/auto/uiloader/baseline/saveformastemplate.ui deleted file mode 100644 index 81d55d3b63..0000000000 --- a/tests/auto/uiloader/baseline/saveformastemplate.ui +++ /dev/null @@ -1,166 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - SaveFormAsTemplate - - - Save Form As Template - - - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - &Name: - - - Qt::AutoText - - - templateNameEdit - - - - - - - - 222 - 0 - - - - - - - QLineEdit::Normal - - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - &Category: - - - Qt::AutoText - - - categoryCombo - - - - - - - - - - - - QFrame::HLine - - - QFrame::Sunken - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - SaveFormAsTemplate - accept() - - - 256 - 124 - - - 113 - 143 - - - - - buttonBox - rejected() - SaveFormAsTemplate - reject() - - - 332 - 127 - - - 372 - 147 - - - - - diff --git a/tests/auto/uiloader/baseline/settings.ui b/tests/auto/uiloader/baseline/settings.ui deleted file mode 100644 index fcf698ba85..0000000000 --- a/tests/auto/uiloader/baseline/settings.ui +++ /dev/null @@ -1,262 +0,0 @@ - - Dialog - - - - 0 - 0 - 392 - 176 - - - - Dialog - - - - - - - - - 0 - 0 - - - - - 90 - 0 - - - - Audio device: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - 0 - 0 - - - - - - - - - - - - - 0 - 0 - - - - - 90 - 0 - - - - Audio effect: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - 0 - 0 - - - - - - - - - - - - - 0 - 0 - - - - - 90 - 0 - - - - Cross fade: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - - - 0 - 0 - - - - -20 - - - 20 - - - 1 - - - 2 - - - 0 - - - Qt::Horizontal - - - QSlider::TicksBelow - - - - - - - - - - 9 - - - - -10 Sec - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 9 - - - - 0 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 9 - - - - 10 Sec - - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - Dialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - Dialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/tests/auto/uiloader/baseline/signalslotdialog.ui b/tests/auto/uiloader/baseline/signalslotdialog.ui deleted file mode 100644 index 1a8a8d9219..0000000000 --- a/tests/auto/uiloader/baseline/signalslotdialog.ui +++ /dev/null @@ -1,129 +0,0 @@ - - SignalSlotDialogClass - - - - 0 - 0 - 617 - 535 - - - - Signals and slots - - - - - - Slots - - - - - - - - - - - Add - - - ... - - - - - - - Delete - - - ... - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - Signals - - - - - - - - - - - Add - - - ... - - - - - - - Delete - - - ... - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/sslclient.ui b/tests/auto/uiloader/baseline/sslclient.ui deleted file mode 100644 index 5a24751168..0000000000 --- a/tests/auto/uiloader/baseline/sslclient.ui +++ /dev/null @@ -1,190 +0,0 @@ - - Form - - - - 0 - 0 - 343 - 320 - - - - Secure Socket Client - - - - - - - - Host name: - - - - - - - imap.example.com - - - - - - - Port: - - - - - - - 1 - - - 65535 - - - 993 - - - - - - - - - true - - - Connect to host - - - true - - - - - - - false - - - Active session - - - - - - - - Cryptographic Cipher: - - - - - - - <none> - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - false - - - Qt::NoFocus - - - true - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> - - - - - - - - - Input: - - - - - - - false - - - - - - - false - - - Qt::TabFocus - - - &Send - - - true - - - - - - - - - - - - - - hostNameEdit - returnPressed() - connectButton - animateClick() - - - 126 - 20 - - - 142 - 78 - - - - - sessionInput - returnPressed() - sendButton - animateClick() - - - 142 - 241 - - - 297 - 234 - - - - - diff --git a/tests/auto/uiloader/baseline/sslerrors.ui b/tests/auto/uiloader/baseline/sslerrors.ui deleted file mode 100644 index 4aac18cddb..0000000000 --- a/tests/auto/uiloader/baseline/sslerrors.ui +++ /dev/null @@ -1,110 +0,0 @@ - - SslErrors - - - - 0 - 0 - 371 - 216 - - - - Unable To Validate The Connection - - - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#ff0000;">Warning</span><span style=" color:#ff0000;">:</span><span style=" color:#000000;"> One or more errors with this connection prevent validating the authenticity of the host you are connecting to. Please review the following list of errors, and click </span><span style=" color:#000000;">Ignore</span><span style=" color:#000000;"> to continue, or </span><span style=" color:#000000;">Cancel</span><span style=" color:#000000;"> to abort the connection.</span></p></body></html> - - - true - - - - - - - - - - - - View Certificate Chain - - - false - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Ignore - - - - - - - Cancel - - - - - - - - - - - pushButton - clicked() - SslErrors - accept() - - - 235 - 185 - - - 228 - 287 - - - - - pushButton_2 - clicked() - SslErrors - reject() - - - 325 - 192 - - - 333 - 231 - - - - - diff --git a/tests/auto/uiloader/baseline/statistics.ui b/tests/auto/uiloader/baseline/statistics.ui deleted file mode 100644 index ba752e386a..0000000000 --- a/tests/auto/uiloader/baseline/statistics.ui +++ /dev/null @@ -1,242 +0,0 @@ - - Statistics - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - - - linguist_stats - - - - 0 - 0 - 336 - 164 - - - - Statistics - - - - unnamed - - - - - unnamed - - - - - - 40 - 20 - - - - Expanding - - - Horizontal - - - - - - - closeBtn - - - &Close - - - - - - - - 40 - 20 - - - - Expanding - - - Horizontal - - - - - - - - - frame4 - - - QFrame::StyledPanel - - - QFrame::Raised - - - - unnamed - - - - - textLabel4 - - - Translation - - - - - - - textLabel5 - - - Source - - - - - - - untrWords - - - 0 - - - - - - - trWords - - - 0 - - - - - - - textLabel1 - - - Words: - - - - - - - trChars - - - 0 - - - - - - - untrChars - - - 0 - - - - - - - textLabel3 - - - Characters: - - - - - - - textLabel6 - - - Characters (with spaces): - - - - - - - trCharsSpc - - - 0 - - - - - - - untrCharsSpc - - - 0 - - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/stringlisteditor.ui b/tests/auto/uiloader/baseline/stringlisteditor.ui deleted file mode 100644 index 96fff1c3ea..0000000000 --- a/tests/auto/uiloader/baseline/stringlisteditor.ui +++ /dev/null @@ -1,265 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - qdesigner_internal::Dialog - - - - 0 - 0 - 400 - 300 - - - - Dialog - - - - 9 - - - 6 - - - - - StringList - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - 0 - - - 6 - - - - - New String - - - &New - - - Qt::ToolButtonTextBesideIcon - - - - - - - Delete String - - - &Delete - - - Qt::ToolButtonTextBesideIcon - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - - - 6 - - - - - &Value: - - - valueEdit - - - - - - - - - - - - - - 0 - - - 6 - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Move String Up - - - Up - - - - - - - Move String Down - - - Down - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - qdesigner_internal::Dialog - accept() - - - 258 - 283 - - - 138 - 294 - - - - - buttonBox - rejected() - qdesigner_internal::Dialog - reject() - - - 350 - 284 - - - 369 - 295 - - - - - diff --git a/tests/auto/uiloader/baseline/stylesheeteditor.ui b/tests/auto/uiloader/baseline/stylesheeteditor.ui deleted file mode 100644 index 34cd7f6d04..0000000000 --- a/tests/auto/uiloader/baseline/stylesheeteditor.ui +++ /dev/null @@ -1,171 +0,0 @@ - - StyleSheetEditor - - - - 0 - 0 - 445 - 289 - - - - Style Editor - - - - 9 - - - 6 - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 32 - 20 - - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 32 - 20 - - - - - - - - - Default - - - - - Coffee - - - - - Pagefold - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 10 - 16 - - - - - - - - - 5 - 0 - 0 - 0 - - - - - - - - - 0 - 5 - 0 - 0 - - - - Style: - - - - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - - 321 - 20 - - - - - - - - false - - - &Apply - - - - - - - - - - - - - 0 - 5 - 0 - 0 - - - - Style Sheet: - - - - - - - - diff --git a/tests/auto/uiloader/baseline/tabbedbrowser.ui b/tests/auto/uiloader/baseline/tabbedbrowser.ui deleted file mode 100644 index 6bb608f79f..0000000000 --- a/tests/auto/uiloader/baseline/tabbedbrowser.ui +++ /dev/null @@ -1,233 +0,0 @@ - - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - - TabbedBrowser - - - - 0 - 0 - 710 - 664 - - - - TabbedBrowser - - - - 0 - - - 0 - - - - - - Untitled - - - - 8 - - - 6 - - - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 6 - - - - - - - - :/trolltech/assistant/images/close.png - - - true - - - - - - - - 0 - 0 - 0 - 0 - - - - - 150 - 0 - - - - - - - - Previous - - - :/trolltech/assistant/images/win/previous.png - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - - 0 - 0 - - - - Next - - - :/trolltech/assistant/images/win/next.png - - - Qt::ToolButtonTextBesideIcon - - - true - - - Qt::NoArrow - - - - - - - Case Sensitive - - - - - - - Whole words - - - - - - - - 0 - 20 - - - - - 105 - 20 - - - - <img src=":/trolltech/assistant/images/wrap.png">&nbsp;Search wrapped - - - Qt::RichText - - - true - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - Qt::Horizontal - - - - 81 - 21 - - - - - - - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/tablewidgeteditor.ui b/tests/auto/uiloader/baseline/tablewidgeteditor.ui deleted file mode 100644 index ebd15a2f80..0000000000 --- a/tests/auto/uiloader/baseline/tablewidgeteditor.ui +++ /dev/null @@ -1,403 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - qdesigner_internal::TableWidgetEditor - - - - 0 - 0 - 591 - 455 - - - - Edit Table Widget - - - - - - Table Items - - - - - - Table Items - - - - - - - - - Icon - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - 0 - 0 - - - - - 0 - - - - - Columns - - - - - - - 0 - 0 - - - - Qt::TabFocus - - - Table Columns - - - - - - - - - New Column - - - New - - - - - - - Delete Column - - - Delete - - - - - - - Qt::Horizontal - - - - 0 - 23 - - - - - - - - Move Column Up - - - U - - - - - - - Move Column Down - - - D - - - - - - - - - - - Icon - - - - - - - - - - Qt::Horizontal - - - - 0 - 21 - - - - - - - - - - - - - Rows - - - - - - - 0 - 0 - - - - Qt::TabFocus - - - Table Rows - - - - - - - - - New Row - - - New - - - - - - - Delete Row - - - Delete - - - - - - - Qt::Horizontal - - - - 0 - 23 - - - - - - - - Move Row Up - - - U - - - - - - - Move Row Down - - - D - - - - - - - - - - - Icon - - - - - - - - - - Qt::Horizontal - - - - 0 - 21 - - - - - - - - - - - - - - itemsBox - buttonBox - widget - - - - qdesigner_internal::IconSelector - QWidget -
iconselector_p.h
- 1 -
-
- - tableWidget - columnsListWidget - newColumnButton - deleteColumnButton - moveColumnUpButton - moveColumnDownButton - rowsListWidget - newRowButton - deleteRowButton - moveRowUpButton - moveRowDownButton - - - - - buttonBox - accepted() - qdesigner_internal::TableWidgetEditor - accept() - - - 431 - 351 - - - 373 - 362 - - - - - buttonBox - rejected() - qdesigner_internal::TableWidgetEditor - reject() - - - 547 - 354 - - - 562 - 362 - - - - -
diff --git a/tests/auto/uiloader/baseline/tetrixwindow.ui b/tests/auto/uiloader/baseline/tetrixwindow.ui deleted file mode 100644 index a13f538aa8..0000000000 --- a/tests/auto/uiloader/baseline/tetrixwindow.ui +++ /dev/null @@ -1,164 +0,0 @@ - - TetrixWindow - - - - 0 - 0 - 537 - 475 - - - - Tetrix - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - Qt::NoFocus - - - &Start - - - - - - - QLCDNumber::Filled - - - - - - - LINES REMOVED - - - Qt::AlignBottom|Qt::AlignHCenter - - - - - - - Qt::NoFocus - - - &Pause - - - - - - - QLCDNumber::Filled - - - - - - - Qt::StrongFocus - - - QFrame::Panel - - - QFrame::Sunken - - - - - - - LEVEL - - - Qt::AlignBottom|Qt::AlignHCenter - - - - - - - NEXT - - - Qt::AlignBottom|Qt::AlignHCenter - - - - - - - QLCDNumber::Filled - - - - - - - SCORE - - - Qt::AlignBottom|Qt::AlignHCenter - - - - - - - QFrame::Box - - - QFrame::Raised - - - - - - Qt::AlignCenter - - - - - - - Qt::NoFocus - - - &Quit - - - - - - - - - - TetrixBoard - QFrame -
tetrixboard.h
- 1 -
-
- - -
diff --git a/tests/auto/uiloader/baseline/textfinder.ui b/tests/auto/uiloader/baseline/textfinder.ui deleted file mode 100644 index af05192dbd..0000000000 --- a/tests/auto/uiloader/baseline/textfinder.ui +++ /dev/null @@ -1,89 +0,0 @@ - - Form - - - - 0 - 0 - 378 - 158 - - - - Find Text - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - - - - &Keyword: - - - lineEdit - - - - - - - &Find - - - - - - - - - - - - Qt::Vertical - - - - 20 - 16 - - - - - - - - - - lineEdit - returnPressed() - findButton - animateClick() - - - 261 - 17 - - - 320 - 17 - - - - - diff --git a/tests/auto/uiloader/baseline/topicchooser.ui b/tests/auto/uiloader/baseline/topicchooser.ui deleted file mode 100644 index d4c90bb4b3..0000000000 --- a/tests/auto/uiloader/baseline/topicchooser.ui +++ /dev/null @@ -1,116 +0,0 @@ - - TopicChooser - - - TopicChooser - - - - 0 - 0 - 391 - 223 - - - - Choose Topic - - - true - - - - unnamed - - - 11 - - - 6 - - - - - label - - - &Topics - - - listWidget - - - - - - - listWidget - - - - - - - Layout16 - - - - unnamed - - - 0 - - - 6 - - - - - - 20 - 20 - - - - Expanding - - - Horizontal - - - - - - - buttonDisplay - - - &Display - - - true - - - true - - - - - - - buttonCancel - - - &Close - - - true - - - - - - - - - diff --git a/tests/auto/uiloader/baseline/translatedialog.ui b/tests/auto/uiloader/baseline/translatedialog.ui deleted file mode 100644 index b1cd99cbe7..0000000000 --- a/tests/auto/uiloader/baseline/translatedialog.ui +++ /dev/null @@ -1,301 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - TranslateDialog - - - - 0 - 0 - 407 - 145 - - - - - 0 - 0 - - - - Qt Linguist - - - This window allows you to search for some text in the translation source file. - - - - 6 - - - 9 - - - 9 - - - 9 - - - 9 - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 6 - - - 6 - - - - - Type in the text to search for. - - - - - - - Find &source text: - - - ledFindWhat - - - - - - - &Translate to: - - - ledTranslateTo - - - - - - - Type in the text to search for. - - - - - - - - - Search options - - - - - - Texts such as 'TeX' and 'tex' are considered as different when checked. - - - Match &case - - - - - - - Mark new translation as &finished - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Click here to find the next occurrence of the text you typed in. - - - Find Next - - - true - - - false - - - - - - - Translate - - - - - - - Translate All - - - - - - - Click here to close this window. - - - Cancel - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 51 - - - - - - - - - - - ledFindWhat - ledTranslateTo - findNxt - translate - translateAll - cancel - ckMatchCase - ckMarkFinished - - - - - cancel - clicked() - TranslateDialog - reject() - - - 397 - 157 - - - 373 - 109 - - - - - diff --git a/tests/auto/uiloader/baseline/translationsettings.ui b/tests/auto/uiloader/baseline/translationsettings.ui deleted file mode 100644 index 4bd4be9e09..0000000000 --- a/tests/auto/uiloader/baseline/translationsettings.ui +++ /dev/null @@ -1,107 +0,0 @@ - - TranslationSettings - - - - 0 - 0 - 346 - 125 - - - - Qt Linguist - Translation file settings - - - - 9 - - - 6 - - - - - Target language - - - - 9 - - - 6 - - - - - - - - Language - - - cbLanguageList - - - - - - - - - - Country/Region - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - TranslationSettings - accept() - - - 244 - 224 - - - 157 - 242 - - - - - buttonBox - rejected() - TranslationSettings - reject() - - - 312 - 230 - - - 286 - 242 - - - - - diff --git a/tests/auto/uiloader/baseline/treewidgeteditor.ui b/tests/auto/uiloader/baseline/treewidgeteditor.ui deleted file mode 100644 index 1256a0a2fa..0000000000 --- a/tests/auto/uiloader/baseline/treewidgeteditor.ui +++ /dev/null @@ -1,379 +0,0 @@ - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - qdesigner_internal::TreeWidgetEditor - - - - 0 - 0 - 619 - 321 - - - - Edit Tree Widget - - - - - - Tree Items - - - - - - Qt::TabFocus - - - Tree Items - - - - 1 - - - - - - - - - - New Item - - - &New - - - - - - - New Subitem - - - New &Subitem - - - - - - - Delete Item - - - &Delete - - - - - - - Qt::Horizontal - - - - 28 - 23 - - - - - - - - Move Item Left (before Parent Item) - - - L - - - - - - - Move Item Right (as a First Subitem of the Next Sibling Item) - - - R - - - - - - - Move Item Up - - - U - - - - - - - Move Item Down - - - D - - - - - - - - - - - Icon - - - - - - - - - - Qt::Horizontal - - - - 288 - 21 - - - - - - - - - - - - - - 0 - 0 - - - - Columns - - - - - - - 0 - 0 - - - - Qt::TabFocus - - - Tree Columns - - - - - - - - - New Column - - - New - - - - - - - Delete Column - - - Delete - - - - - - - Qt::Horizontal - - - - 13 - 23 - - - - - - - - Move Column Up - - - U - - - - - - - Move Column Down - - - D - - - - - - - - - - - Icon - - - - - - - - - - Qt::Horizontal - - - - 0 - 10 - - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - qdesigner_internal::IconSelector - QWidget -
iconselector_p.h
- 1 -
-
- - treeWidget - newItemButton - newSubItemButton - deleteItemButton - moveItemLeftButton - moveItemRightButton - moveItemUpButton - moveItemDownButton - listWidget - newColumnButton - deleteColumnButton - moveColumnUpButton - moveColumnDownButton - - - - - buttonBox - accepted() - qdesigner_internal::TreeWidgetEditor - accept() - - - 450 - 259 - - - 292 - 272 - - - - - buttonBox - rejected() - qdesigner_internal::TreeWidgetEditor - reject() - - - 539 - 266 - - - 556 - 275 - - - - -
diff --git a/tests/auto/uiloader/baseline/trpreviewtool.ui b/tests/auto/uiloader/baseline/trpreviewtool.ui deleted file mode 100644 index 03441139ed..0000000000 --- a/tests/auto/uiloader/baseline/trpreviewtool.ui +++ /dev/null @@ -1,189 +0,0 @@ - - - ********************************************************************* -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the autotests of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -********************************************************************* - - TrPreviewToolClass - - - - 0 - 0 - 593 - 466 - - - - Qt Translation Preview Tool - - - - - - 0 - 0 - 593 - 21 - - - - - &View - - - - &Views - - - - - - - &Help - - - - - - - &File - - - - - - - - - - - - - - Qt::Horizontal - - - 4 - - - - - - - - - Forms - - - 1 - - - - - 0 - - - 0 - - - - - QAbstractItemView::NoEditTriggers - - - true - - - true - - - - - - - - - :/images/open_form.png - - - &Open Form... - - - - - :/images/load_translation.png - - - &Load Translation... - - - - - :/images/reload_translations.png - - - &Reload Translations - - - F5 - - - - - &Close - - - - - About - - - - - About Qt - - - - - - - - diff --git a/tests/auto/uiloader/baseline/validators.ui b/tests/auto/uiloader/baseline/validators.ui deleted file mode 100644 index f05b96fbe0..0000000000 --- a/tests/auto/uiloader/baseline/validators.ui +++ /dev/null @@ -1,467 +0,0 @@ - - ValidatorsForm - - - - 0 - 0 - 526 - 668 - - - - Form - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - QIntValidator - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - 0 - - - 6 - - - - - Min: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 1 - 0 - - - - -1000000 - - - 1000000 - - - - - - - Max: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 1 - 0 - - - - -1000000 - - - 1000000 - - - 1000 - - - - - - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - - 9 - - - 6 - - - - - - 0 - 0 - - - - :/ledoff.png - - - Qt::AlignCenter - - - - - - - editingFinished() - - - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - - - - - - - QDoubleValidator - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - 0 - - - 6 - - - - - Min: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 1 - 0 - - - - -100000.000000000000000 - - - 100000.000000000000000 - - - 0.000000000000000 - - - - - - - Format: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - Standard - - - - - Scientific - - - - - - - - Max: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 1 - 0 - - - - -100000.000000000000000 - - - 100000.000000000000000 - - - 1000.000000000000000 - - - - - - - Decimals: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 2 - - - - - - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - - 9 - - - 6 - - - - - - - - :/ledoff.png - - - Qt::AlignCenter - - - - - - - editingFinished() - - - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 111 - - - - - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Quit - - - - - - - - - - LEDWidget - QLabel -
ledwidget.h
-
- - LocaleSelector - QComboBox -
localeselector.h
-
-
- - - - - - pushButton - clicked() - ValidatorsForm - close() - - - 94 - 274 - - - 131 - 260 - - - - -
diff --git a/tests/auto/uiloader/baseline/wateringconfigdialog.ui b/tests/auto/uiloader/baseline/wateringconfigdialog.ui deleted file mode 100644 index a7f5349d78..0000000000 --- a/tests/auto/uiloader/baseline/wateringconfigdialog.ui +++ /dev/null @@ -1,446 +0,0 @@ - - WateringConfigDialog - - - - 0 - 0 - 334 - 550 - - - - Watering Configuration - - - - - - - - Plant: - - - - - - - - 0 - 0 - - - - - Squash - - - - - Bean - - - - - Carrot - - - - - Strawberry - - - - - Raspberry - - - - - Blueberry - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 67 - 16 - - - - - - - - Water when: - - - - - - - Temperature is higher than: - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 16 - 20 - - - - - - - - false - - - - - - C - - - 10 - - - 60 - - - 20 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Rain less than: - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 16 - 20 - - - - - - - - false - - - - - - mm - - - 1 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - Starting Time: - - - - - - - - - - Amount: - - - - - - - l - - - 100 - - - 10000 - - - 100 - - - 1000 - - - - - - - Source: - - - - - - - - Foundain - - - - - River - - - - - Lake - - - - - Public Water System - - - - - - - - Filter: - - - - - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - <a href="test">Show Details</a> - - - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - - HelpBrowser - QTextBrowser -
helpbrowser.h
-
-
- - - - buttonBox - accepted() - WateringConfigDialog - accept() - - - 227 - 372 - - - 157 - 274 - - - - - buttonBox - rejected() - WateringConfigDialog - reject() - - - 286 - 378 - - - 286 - 274 - - - - - temperatureCheckBox - toggled(bool) - temperatureSpinBox - setEnabled(bool) - - - 132 - 101 - - - 132 - 125 - - - - - rainCheckBox - toggled(bool) - rainSpinBox - setEnabled(bool) - - - 110 - 154 - - - 113 - 169 - - - - -
diff --git a/tests/auto/uiloader/desert.ini b/tests/auto/uiloader/desert.ini deleted file mode 100644 index 799b224498..0000000000 --- a/tests/auto/uiloader/desert.ini +++ /dev/null @@ -1,11 +0,0 @@ -[General] -ftpBaseDir=/arthurtest -ftpHost=kramer.troll.no -ftpPass=anonymouspass -ftpUser=anonymous -output=testresults -threshold=20 - -[engines] -1\engine=uic -size=1 diff --git a/tests/auto/uiloader/dole.ini b/tests/auto/uiloader/dole.ini deleted file mode 100644 index 799b224498..0000000000 --- a/tests/auto/uiloader/dole.ini +++ /dev/null @@ -1,11 +0,0 @@ -[General] -ftpBaseDir=/arthurtest -ftpHost=kramer.troll.no -ftpPass=anonymouspass -ftpUser=anonymous -output=testresults -threshold=20 - -[engines] -1\engine=uic -size=1 diff --git a/tests/auto/uiloader/gravlaks.ini b/tests/auto/uiloader/gravlaks.ini deleted file mode 100644 index 3a11cf2a49..0000000000 --- a/tests/auto/uiloader/gravlaks.ini +++ /dev/null @@ -1,11 +0,0 @@ -[General] -ftpBaseDir=/arthurtest -ftpHost=gravlaks.troll.no -ftpPass=anonymouspass -ftpUser=anonymous -output=testresults -threshold=20 - -[engines] -1\engine=uic -size=1 diff --git a/tests/auto/uiloader/jackychan.ini b/tests/auto/uiloader/jackychan.ini deleted file mode 100644 index 799b224498..0000000000 --- a/tests/auto/uiloader/jackychan.ini +++ /dev/null @@ -1,11 +0,0 @@ -[General] -ftpBaseDir=/arthurtest -ftpHost=kramer.troll.no -ftpPass=anonymouspass -ftpUser=anonymous -output=testresults -threshold=20 - -[engines] -1\engine=uic -size=1 diff --git a/tests/auto/uiloader/jeunehomme.ini b/tests/auto/uiloader/jeunehomme.ini deleted file mode 100644 index 799b224498..0000000000 --- a/tests/auto/uiloader/jeunehomme.ini +++ /dev/null @@ -1,11 +0,0 @@ -[General] -ftpBaseDir=/arthurtest -ftpHost=kramer.troll.no -ftpPass=anonymouspass -ftpUser=anonymous -output=testresults -threshold=20 - -[engines] -1\engine=uic -size=1 diff --git a/tests/auto/uiloader/kangaroo.ini b/tests/auto/uiloader/kangaroo.ini deleted file mode 100644 index 799b224498..0000000000 --- a/tests/auto/uiloader/kangaroo.ini +++ /dev/null @@ -1,11 +0,0 @@ -[General] -ftpBaseDir=/arthurtest -ftpHost=kramer.troll.no -ftpPass=anonymouspass -ftpUser=anonymous -output=testresults -threshold=20 - -[engines] -1\engine=uic -size=1 diff --git a/tests/auto/uiloader/kayak.ini b/tests/auto/uiloader/kayak.ini deleted file mode 100644 index 751a3883fd..0000000000 --- a/tests/auto/uiloader/kayak.ini +++ /dev/null @@ -1,11 +0,0 @@ -[General] -ftpBaseDir=/arthurtest -ftpHost=wartburg -ftpPass=anonymouspass -ftpUser=anonymous -output=testresults -threshold=20 - -[engines] -1\engine=uic -size=1 diff --git a/tests/auto/uiloader/scruffy.ini b/tests/auto/uiloader/scruffy.ini deleted file mode 100644 index 799b224498..0000000000 --- a/tests/auto/uiloader/scruffy.ini +++ /dev/null @@ -1,11 +0,0 @@ -[General] -ftpBaseDir=/arthurtest -ftpHost=kramer.troll.no -ftpPass=anonymouspass -ftpUser=anonymous -output=testresults -threshold=20 - -[engines] -1\engine=uic -size=1 diff --git a/tests/auto/uiloader/troll15.ini b/tests/auto/uiloader/troll15.ini deleted file mode 100644 index 57f5cd8265..0000000000 --- a/tests/auto/uiloader/troll15.ini +++ /dev/null @@ -1,11 +0,0 @@ -[General] -ftpBaseDir=/arthurtest -ftpHost=kramer.nokia.troll.no -ftpPass=anonymouspass -ftpUser=anonymous -output=testresults -threshold=20 - -[engines] -1\engine=uic -size=1 diff --git a/tests/auto/uiloader/tst_screenshot/README.TXT b/tests/auto/uiloader/tst_screenshot/README.TXT deleted file mode 100644 index 1c23cff209..0000000000 --- a/tests/auto/uiloader/tst_screenshot/README.TXT +++ /dev/null @@ -1,13 +0,0 @@ -This program is called from ../uiloader. - - -./tst_screenshot - - Syntax: ./tst_screenshot [output directory] - - This programm takes a *.ui file and an output dir as argument in order to - create a screenshot of the widget defined in the ui file. - - The screenshot is saved in the output dir (default current dir), ".png" is - appended to the ui file name. - diff --git a/tests/auto/uiloader/tst_screenshot/main.cpp b/tests/auto/uiloader/tst_screenshot/main.cpp deleted file mode 100644 index 707a540091..0000000000 --- a/tests/auto/uiloader/tst_screenshot/main.cpp +++ /dev/null @@ -1,209 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -/* - * This program takes a *.ui file and an output dir as argument in order to - * create a screenshot of the widget defined in the ui file. - * - * The screenshot is saved in the output dir (default current dir), ".png" is - * appended to the ui file name. - */ - -#include -#include -#include -#include - -#include - -#include - -using namespace std; - - -#ifdef Q_WS_QWS -// we don't compile designer on embedded... - -int main(int argc, char **argv) -{ - return 0; -} - - -#else - -#include - -/* - * Take the path of an ui file and return appropriate QWidget. - */ - -QWidget* getWidgetFromUiFile(const QString& fileNameUiFile) -{ - qDebug() << "\t\t\t...loading ui file" << fileNameUiFile; - - QUiLoader loader; - QFile uiFile(fileNameUiFile); - if (!uiFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - qDebug("\t\tError: QFile.open() failed."); - exit(EXIT_FAILURE); - } - - QFileInfo fileInfo(fileNameUiFile); - QDir::setCurrent(fileInfo.absolutePath()); //for the stylesheet to find their images - - QWidget *ui = loader.load(&uiFile); - if (!ui) { - qDebug("\t\tError: Quilodader.load() returned NULL pointer."); - exit(EXIT_FAILURE); - } - uiFile.close(); - - return ui; -} - - - -/* - * Takes the actual screenshot. - * - * Hint: provide filename without extension, ".png" will be added - */ - -void makeScreenshot(QWidget* widget, const QString& fileName, const QString& pathOutputDir) -{ - QFileInfo fileInfo(fileName); - QString realFileName = fileInfo.completeBaseName() + "." + fileInfo.suffix() + ".png"; - QString realPath = pathOutputDir + "/" + realFileName; - - - //QString realFileName = fileName + ".png"; - qDebug() << "\t\t\t...Taking screenshot" << fileInfo.absoluteFilePath(); - - //widget->show(); - qApp->processEvents(); - QImage originalPixmap(widget->size(),QImage::Format_ARGB32); - widget->render(&originalPixmap); - if ( originalPixmap.isNull() ) { - qDebug("\t\tError: QPixmap::grabWidget() returned a NULL QPixmap."); - exit(EXIT_FAILURE); - } - //QString fileName = QDir::currentPath() + "/secondwidget." + format; - if ( !originalPixmap.save(realPath, "PNG") ) { - qDebug("\t\tError: QPixmap.save() failed."); - exit(EXIT_FAILURE); - } - qDebug() << "\t\t\t...Screenshot saved in" << realPath; - - widget->close(); -} - - - -/* - * Call this if you just want to pass the ui file name and the output dir. - */ - -void createScreenshotFromUiFile(const QString& fileNameUiFile, const QString pathOutputDir) -{ - qDebug() << "\t\tCreating screenshot from widget defined in" << fileNameUiFile; - - QWidget* w = getWidgetFromUiFile(fileNameUiFile); - makeScreenshot(w, fileNameUiFile, pathOutputDir); -} - - - -/* - * Start here. - */ - -int main(int argc, char **argv) -{ - QApplication app(argc, argv); - - // check for necessary arguments - if (argc == 1) { - cout << "Syntax: " << argv[0] << " [output directory]" << endl; - cout << "" << endl; - cout << "Takes a *.ui file and an output dir as argument in order to" << endl; - cout << "create a screenshot of the widget defined in the ui file." << endl; - cout << "" << endl; - cout << "The screenshot is saved in the output dir (default current dir)," << endl; - cout << "'.png' is appended to the ui file name." << endl; - exit(EXIT_FAILURE); - } - - - // check for *.ui - QString fileName = app.arguments().value(1); - if ( !fileName.endsWith(".ui") ) { - qDebug() << fileName + " is not a *.ui file."; - exit(EXIT_FAILURE); - } - - // does the file exist? - QFile uiFile(fileName); - if ( !uiFile.exists() ) { - qDebug() << fileName + " does not exist."; - exit(EXIT_FAILURE); - } - - // check output directory - QString pathOutputDir = QDir::currentPath(); - - if (argc >= 3 ) { - QDir outputDir = app.arguments().value(2); - if ( outputDir.exists() ) { - pathOutputDir = outputDir.absolutePath(); - } else { - qDebug() << outputDir.absolutePath() + " does not exist or is not a directory."; - exit(EXIT_FAILURE); - } - } - - // take the screenshot - createScreenshotFromUiFile(fileName, pathOutputDir); - - app.quit(); - return 0; -} - -#endif diff --git a/tests/auto/uiloader/tst_screenshot/tst_screenshot.pro b/tests/auto/uiloader/tst_screenshot/tst_screenshot.pro deleted file mode 100644 index 43b1f1f48e..0000000000 --- a/tests/auto/uiloader/tst_screenshot/tst_screenshot.pro +++ /dev/null @@ -1,8 +0,0 @@ -TEMPLATE = app - -DESTDIR = ./ -INCLUDEPATH += . -!embedded:CONFIG += uitools -TARGET = tst_screenshot - -SOURCES += main.cpp diff --git a/tests/auto/uiloader/tundra.ini b/tests/auto/uiloader/tundra.ini deleted file mode 100644 index 799b224498..0000000000 --- a/tests/auto/uiloader/tundra.ini +++ /dev/null @@ -1,11 +0,0 @@ -[General] -ftpBaseDir=/arthurtest -ftpHost=kramer.troll.no -ftpPass=anonymouspass -ftpUser=anonymous -output=testresults -threshold=20 - -[engines] -1\engine=uic -size=1 diff --git a/tests/auto/uiloader/uiloader.pro b/tests/auto/uiloader/uiloader.pro deleted file mode 100644 index 30ecb2fa10..0000000000 --- a/tests/auto/uiloader/uiloader.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS += tst_screenshot \ - uiloader diff --git a/tests/auto/uiloader/uiloader/tst_uiloader.cpp b/tests/auto/uiloader/uiloader/tst_uiloader.cpp deleted file mode 100644 index 30b0c3c9db..0000000000 --- a/tests/auto/uiloader/uiloader/tst_uiloader.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -#include "uiloader.h" - -#include -#include -#include - -#ifdef Q_OS_SYMBIAN -#define SRCDIR "" -#endif - -class uiLoaderAutotest: public QObject -{ - -Q_OBJECT - -public slots: - void init(); - -private slots: - void imageDiffTest(); - -private: - QString currentDir; - -}; - - - -void uiLoaderAutotest::init() -{ - currentDir = QDir::currentPath(); -#ifndef Q_OS_IRIX - QDir::setCurrent(QString(SRCDIR) + QString("/..")); -#endif -} - -void uiLoaderAutotest::imageDiffTest() -{ - //QApplication app(argc, argv); - - QString pathToProgram = currentDir + "/tst_screenshot/tst_screenshot"; - -#ifdef Q_WS_MAC - pathToProgram += ".app/Contents/MacOS/tst_screenshot"; -#endif - -#ifdef Q_WS_WIN - pathToProgram += ".exe"; -#endif - uiLoader wrapper(pathToProgram); - QString errorMessage; - switch(wrapper.runAutoTests(&errorMessage)) { - case uiLoader::TestRunDone: - break; - case uiLoader::TestConfigError: - QVERIFY2(false, qPrintable(errorMessage)); - break; - case uiLoader::TestNoConfig: - QSKIP(qPrintable(errorMessage), SkipAll); - break; - } -} - -QTEST_MAIN(uiLoaderAutotest) -#include "tst_uiloader.moc" diff --git a/tests/auto/uiloader/uiloader/uiloader.cpp b/tests/auto/uiloader/uiloader/uiloader.cpp deleted file mode 100644 index 9246c30d80..0000000000 --- a/tests/auto/uiloader/uiloader/uiloader.cpp +++ /dev/null @@ -1,814 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -#include "uiloader.h" - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - - -/* - * Our own QVERIFY since the one from QTest can't be used in non-void functions. - * Just pass the desired return value as third argument. - */ - -#define QVERIFY3(statement, description, returnValue) \ -do {\ - if (statement) {\ - if (!QTest::qVerify(true, #statement, (description), __FILE__, __LINE__))\ - return returnValue;\ - } else {\ - if (!QTest::qVerify(false, #statement, (description), __FILE__, __LINE__))\ - return returnValue;\ - }\ -} while (0) - - - -uiLoader::uiLoader(const QString &_pathToProgram) - : pathToProgram(_pathToProgram) -{ - // initTests(); -} - - - - -/* - * Load the configuration file for your machine. - * Return true if everything was loaded, else false. - * - * If the hostname is 'kayak', the config file should be 'kayak.ini': - * - * [General] - * ftpBaseDir=/arthurtest - * ftpHost=wartburg - * ftpPass=anonymouspass - * ftpUser=anonymous - * output=testresults - * - * [engines] - * 1\engine=uic - * size=1 - */ - -bool uiLoader::loadConfig(const QString &filePath, QString *errorMessage) -{ - qDebug() << " ========== Loading config file " << filePath; - configPath = filePath; - - // If there is no config file, dont proceed; - QSettings settings( filePath, QSettings::IniFormat, this ); - - // all keys available? - QStringList keyList; - keyList << QLatin1String("output") << QLatin1String("ftpUser") << QLatin1String("ftpPass") << QLatin1String("ftpHost") << QLatin1String("ftpBaseDir"); - for (int i = 0; i < keyList.size(); ++i) { - const QString currentKey = keyList.at(i); - if (!settings.contains(currentKey)) { - *errorMessage = QString::fromLatin1("Config file '%1' does not contain the required key '%2'.").arg(filePath, currentKey); - return false; - } - - qDebug() << "\t\t(I)" << currentKey << "\t" << settings.value(currentKey).toString(); - } - - const int size = settings.beginReadArray(QLatin1String("engines")); - if (!size) { - *errorMessage = QString::fromLatin1("Config file '%1' does not contain the necessary section engines.").arg(filePath); - return false; - } - - // get the values - for ( int i = 0; i < size; ++i ) { - settings.setArrayIndex(i); - qDebug() << "\t\t(I)" << "engine" << "\t" << settings.value( "engine" ).toString(); - enginesToTest.insert(settings.value(QLatin1String("engine")).toString(), QLatin1String("Info here please :p")); - } - settings.endArray(); - - output = settings.value(QLatin1String("output")).toString(); - output += QDir::separator() + QLibraryInfo::buildKey() + QDir::separator() + QString( qVersion() ); - ftpUser = settings.value( QLatin1String("ftpUser") ).toString(); - ftpPass = settings.value( QLatin1String("ftpPass") ).toString(); - ftpHost = settings.value( QLatin1String("ftpHost") ).toString(); - ftpBaseDir = settings.value( QLatin1String("ftpBaseDir") ).toString() + QDir::separator() + QHostInfo::localHostName().split( QLatin1Char('.')).first(); - threshold = settings.value( QLatin1String("threshold") ).toString(); - - qDebug() << "\t(I) Values adapted:"; - qDebug() << "\t\t(I)" << "ftpBaseDir" << "\t" << ftpBaseDir; - qDebug() << "\t\t(I)" << "output" << "\t" << output; - - return true; -} - -/* - * Upload testresults to the server in order to create the new baseline. - */ - -void uiLoader::createBaseline() -{ - // can't use ftpUploadFile() here - qDebug() << " ========== Uploading baseline of only the latest test values "; - - QFtp ftp; - ftp.connectToHost( ftpHost ); - ftp.login( ftpUser, ftpPass ); - ftp.cd( ftpBaseDir ); - - QDir dir( output ); - - // Upload all the latest test results to the FTP server's baseline directory. - QHashIterator i(enginesToTest); - while ( i.hasNext() ) { - i.next(); - - dir.cd( i.key() ); - ftp.cd( i.key() + ".baseline" ); - - dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks); - dir.setNameFilters( QStringList() << "*.png" ); - QFileInfoList list = dir.entryInfoList(); - - dir.cd( ".." ); - - for (int n = 0; n < list.size(); n++) { - QFileInfo fileInfo = list.at( n ); - QFile file( QString( output ) + "/" + i.key() + "/" + fileInfo.fileName() ); - - errorMsg = "could not open file " + fileInfo.fileName(); - QVERIFY2( file.open(QIODevice::ReadOnly), qPrintable(errorMsg)); - - QByteArray fileData = file.readAll(); - file.close(); - - ftp.put( fileData, fileInfo.fileName(), QFtp::Binary ); - qDebug() << "\t(I) Uploading:" << fileInfo.fileName() << "with file size" << fileData.size(); - } - - ftp.cd( ".." ); - } - - ftp.close(); - - while ( ftp.hasPendingCommands() ) - QCoreApplication::instance()->processEvents(); -} - - - -/* - * Download baseline from server in order to compare results. - */ - -void uiLoader::downloadBaseline() -{ - qDebug() << " ========== Downloading baseline..."; - - QHashIterator i(enginesToTest); - while ( i.hasNext() ) { - i.next(); - QString engineName = i.key(); - - QString dirWithFiles = ftpBaseDir + '/' + engineName + ".baseline"; - QString ftpDir = ftpBaseDir + '/' + engineName + ".baseline"; - QString saveToDir = QDir::currentPath() + '/' + output + '/' + engineName + ".baseline"; - - ftpList(dirWithFiles); - - QList filesToDownload(lsDirList); - ftpGetFiles(filesToDownload, ftpDir, saveToDir); - } -} - - - -/* - * Enter the dir pathDir local and remove all files (not recursive!) - */ - -void uiLoader::clearDirectory(const QString& pathDir) -{ - qDebug() << "\t(I) Clearing directory local: " << pathDir; - - QDir dir(pathDir); - dir.setFilter(QDir::Files); - QStringList list = dir.entryList(); - - for (int n = 0; n < list.size(); n++) { - QString filePath = pathDir + "/" + list.at(n); - QFile file(filePath); - - errorMsg = "could not remove file " + filePath; - QVERIFY2( file.remove(), qPrintable(errorMsg)); - } - -} - - - -/* - * Setup the local environment. - */ - -void uiLoader::setupLocal() -{ - qDebug( " ========== Setting up local environment" ); - - QDir dir; - - errorMsg = "could not create path " + output; - QVERIFY2( dir.mkpath(output), qPrintable(errorMsg) ); - - QHashIterator j(enginesToTest); - while ( j.hasNext() ) { - j.next(); - - QString engineName = j.key(); - QString engineDir = output + '/' + engineName; - - // create or clean it - QString tmpPath = output + '/' + engineName; - if ( dir.exists(tmpPath) ) { - clearDirectory(tmpPath); - } else { - dir.mkdir(tmpPath); - } - - // create *.baseline or clean it - tmpPath = output + '/' + engineName + ".baseline"; - if ( dir.exists(tmpPath) ) { - clearDirectory(tmpPath); - } else { - dir.mkdir(tmpPath); - } - - // create *.diff or clean it - tmpPath = output + '/' + engineName + ".diff"; - if ( dir.exists(tmpPath) ) { - clearDirectory(tmpPath); - } else { - dir.mkdir(tmpPath); - } - - // create *.failed or clean it - tmpPath = output + '/' + engineName + ".failed"; - if ( dir.exists(tmpPath) ) { - clearDirectory(tmpPath); - } else { - dir.mkdir(tmpPath); - } - } - - qDebug() << "\t(I) Created on local machine:" << output; -} - - - -/* - * Setup the remote environment. - */ - -void uiLoader::setupFTP() -{ - qDebug( " ========== Setting up FTP environment" ); - - // create dirs on ftp server - ftpMkDir( ftpBaseDir ); - ftpBaseDir += "/" + QLibraryInfo::buildKey(); - ftpMkDir( ftpBaseDir ); - ftpBaseDir += "/" + QString( qVersion() ); - ftpMkDir( ftpBaseDir ); - - QString dir = ""; - ftpList(ftpBaseDir + '/' + dir); - QList dirListing(lsDirList); - - // create *.failed, *.diff if necessary, else remove the files in it - // if *.baseline does not exist, memorize it - QHashIterator j(enginesToTest); - while ( j.hasNext() ) { - j.next(); - - QString curDir = QString( j.key() ) + ".failed"; - if ( dirListing.contains( curDir ) ) { - ftpClearDirectory(ftpBaseDir + "/" + curDir + "/"); - } else { - ftpMkDir(ftpBaseDir + "/" + curDir + "/"); - } - - curDir = QString( j.key() ) + ".diff"; - if ( dirListing.contains( curDir ) ) { - ftpClearDirectory(ftpBaseDir + "/" + curDir + "/"); - } else { - ftpMkDir(ftpBaseDir + "/" + curDir + "/"); - } - - curDir = QString( j.key() ) + ".baseline"; - lsNeedBaseline.clear(); - if ( !dirListing.contains( curDir ) ) { - ftpMkDir(ftpBaseDir + "/" + curDir + "/"); - lsNeedBaseline << j.key(); - } else { - qDebug() << "\t(I)" << curDir << "exists on server."; - } - } -} - - - -/* - * Download files listed in fileLisiting from dir pathRemoteDir on sever and save - * them in pathSaveDir. - */ - -void uiLoader::ftpGetFiles(QList& fileListing, const QString& pathRemoteDir, const QString& pathSaveDir) -{ - QFtp ftp; - ftp.connectToHost( ftpHost ); - ftp.login( ftpUser, ftpPass ); - - if ( !fileListing.empty() ) { - for ( int i = 0; i < fileListing.size(); ++i ) { - QFile file( pathSaveDir + "/" + fileListing.at(i) ); - - errorMsg = "could not open file for writing: " + file.fileName(); - QVERIFY2( file.open(QIODevice::WriteOnly), qPrintable(errorMsg) ); - - QString ftpFileName = pathRemoteDir + '/' + fileListing.at(i); - ftp.get( ftpFileName, &file ); - //qDebug() << "\t(I) Got" << file.fileName(); - ftp.list(); //Only there to fill up a slot in the pendingCommands queue. - - while ( ftp.hasPendingCommands() ) - QCoreApplication::instance()->processEvents(); - - file.close(); - } - } - - ftp.close(); - - while ( ftp.hasPendingCommands() ) - QCoreApplication::instance()->processEvents(); - - fileListing.clear(); -} - - - -/* - * Upload the file filePath to the server and save it there at filePathRemote. - * - * HINT: It seems you can't use this function in a loop, to many connections - * are established?! - */ - -bool uiLoader::ftpUploadFile(const QString& filePathRemote, const QString& filePath) -{ - QFile file(filePath); - - errorMsg = "could not open file: " + filePath; - QVERIFY3( file.open(QIODevice::ReadOnly), qPrintable(errorMsg), false ); - - QByteArray contents = file.readAll(); - file.close(); - - qDebug() << "\t(I) Uploading file to" << filePathRemote; - - QFtp ftp; - ftp.connectToHost( ftpHost ); - ftp.login( ftpUser, ftpPass ); - - ftp.put( contents, filePathRemote, QFtp::Binary ); - - ftp.close(); - - while ( ftp.hasPendingCommands() ) - QCoreApplication::instance()->processEvents(); - - return true; -} - - - -/* - * Enter the dir dir on the server and remove all files (not recursive!) - */ - -void uiLoader::ftpClearDirectory(const QString& pathDir) -{ - qDebug() << "\t(I) Clearing directory remote: " << pathDir; - - ftpList(pathDir); - QList dirListing(lsDirList); - - QFtp ftp; - ftp.connectToHost( ftpHost ); - ftp.login( ftpUser, ftpPass ); - - for (int i = 0; i < dirListing.size(); ++i) { - QString file = dirListing.at(i); - qDebug() << "\t(I) Removing" << pathDir + file; - ftp.remove(pathDir + file); - } - - ftp.close(); - - while ( ftp.hasPendingCommands() ) - QCoreApplication::instance()->processEvents(); -} - - - -/* - * Get a directory listing from the server in the dir dir. - * You can access it via lsDirList. - */ - -void uiLoader::ftpList(const QString & dir) { - qDebug() << "\t(I) Getting list of files in dir" << dir; - - lsDirList.clear(); - - QFtp ftp; - QObject::connect( &ftp, SIGNAL( listInfo( const QUrlInfo & ) ), this, SLOT( ftpAddLsEntry(const QUrlInfo & ) ) ); - //QObject::connect( &ftp, SIGNAL( done( bool ) ), this, SLOT( ftpAddLsDone( bool ) ) ); - - ftp.connectToHost( ftpHost ); - ftp.login( ftpUser, ftpPass ); - - ftp.list( dir ); - ftp.close(); - - while ( ftp.hasPendingCommands() ) - QCoreApplication::instance()->processEvents(); -} - - - -/* - * Creates a dir on the ftp server. - * - * Hint: If the ftp.mkdir() fails we just assume the dir already exist. - */ - -void uiLoader::ftpMkDir( QString pathDir ) -{ - QFtp ftp; - - QSignalSpy commandSpy(&ftp, SIGNAL(commandFinished(int, bool))); - - ftp.connectToHost( ftpHost ); - ftp.login( ftpUser, ftpPass ); - const int command = ftp.mkdir( pathDir ); - ftp.close(); - - while ( ftp.hasPendingCommands() ) - QCoreApplication::instance()->processEvents(); - - // check wheter there was an error or not - for (int i = 0; i < commandSpy.count(); ++i) { - if (commandSpy.at(i).at(0) == command) { - if ( !commandSpy.at(i).at(1).toBool() ) { - qDebug() << "\t(I) Created at remote machine:" << pathDir; - } else { - qDebug() << "\t(I) Could not create on remote machine - probably the dir exists"; - } - } - } -} - - - -/* - * Just a slot, needed for ftpList(). - */ - -void uiLoader::ftpAddLsEntry( const QUrlInfo &urlInfo ) -{ - //Just adding the file to the list - lsDirList << urlInfo.name(); -} - -/* - * Return a list of the test case ui files - */ - -QStringList uiLoader::uiFiles() const -{ - QString baselinePath = QDir::currentPath(); - baselinePath += QLatin1String("/baseline"); - QDir dir(baselinePath); - dir.setFilter(QDir::Files); - dir.setNameFilters(QStringList(QLatin1String("*.ui"))); - const QFileInfoList list = dir.entryInfoList(); - QStringList rc; - const QChar slash = QLatin1Char('/'); - foreach (const QFileInfo &fi, list) { - QString fileAbsolutePath = baselinePath; - fileAbsolutePath += slash; - fileAbsolutePath += fi.fileName(); - rc.push_back(fileAbsolutePath); - } - return rc; -} -/* - * The actual method for generating local files that will be compared - * to the baseline. - * - * The external program uiscreenshot/uiscreenshot is called to generate - * *.png files of *.ui files. - */ - -void uiLoader::executeTests() -{ - qDebug(" ========== Executing the tests...[generating pngs from uis]"); - - qDebug() << "Current Dir" << QDir::currentPath(); - - qDebug() << "\t(I) Using" << pathToProgram; - - QProcess myProcess; - foreach(const QString &fileAbsolutePath, uiFiles()) { - qDebug() << "\t(I) Current file:" << fileAbsolutePath; - - QHashIterator j(enginesToTest); - while ( j.hasNext() ) { - j.next(); - - QString outputDirectory = output + '/' + j.key(); - - QStringList arguments; - arguments << fileAbsolutePath; - arguments << outputDirectory; - - myProcess.start(pathToProgram, arguments); - - // took too long? - errorMsg = "process does not exited normally (QProcess timeout) - " + pathToProgram; - QVERIFY2( myProcess.waitForFinished(), qPrintable(errorMsg) ); - - qDebug() << "\n" << myProcess.readAllStandardError(); - - // check exit code/status - errorMsg = "process does not exited normally - " + pathToProgram; - QVERIFY2( myProcess.exitStatus() == QProcess::NormalExit, qPrintable(errorMsg) ); - QVERIFY2( myProcess.exitCode() == EXIT_SUCCESS, qPrintable(errorMsg) ); - } - } -} - -/* - * Comparing generated files to the baseline. - */ - -bool uiLoader::compare() -{ - qDebug( " ========== Now comparing the results to the baseline" ); - - QDir dir(output); - - QHashIterator i(enginesToTest); - while ( i.hasNext() ) { - i.next(); - - QString engineName = i.key(); - - // Perform comparisons between the two directories. - dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks); - dir.setNameFilters( QStringList() << "*.png" ); - dir.cd( engineName + ".baseline" ); - - QFileInfoList list = dir.entryInfoList(); - - for (int i = 0; i < list.size(); ++i) { - QFileInfo fileInfo = list.at(i); - diff(output, engineName, fileInfo.fileName()); - } - } - - return true; -} - - - - -void uiLoader::diff(const QString& basedir, const QString& engine, const QString& fileName) -{ - QString filePathBaseline = basedir + "/" + engine + ".baseline/" + fileName; - QString filePathGenerated = basedir + "/" + engine + '/' + fileName; - - qDebug() << "\t(I) Comparing" << filePathBaseline; - qDebug() << "\t(I) Comparing" << filePathGenerated; - - QString filePathDiffImage = basedir + "/" + engine + ".diff/" + fileName; - - if ( QFile::exists(filePathGenerated) ) { - QString filePathDiffImage = basedir + "/" + engine + ".diff/" + fileName; - int pixelDiff = imgDiff(filePathBaseline, filePathGenerated, filePathDiffImage); - - if ( pixelDiff <= threshold.toInt() ) { - qDebug() << "\t(I) TEST OK"; - QVERIFY(true); - } else { - qDebug() << "\t(I) TEST FAILED"; - qDebug() << "\t(I)\t...saving baseline in *.failed"; - - // local: save in *.failed - QString filePathFailed = basedir + "/" + engine + ".failed/" + fileName; - errorMsg = "Could not save " + filePathGenerated + " to " + filePathFailed; - QVERIFY2( QFile::copy(filePathGenerated, filePathFailed), qPrintable(errorMsg) ); - - // remote: save in *.failed - QString filePathFailedRemote = ftpBaseDir + "/" + engine + ".failed" + "/" + fileName; - ftpUploadFile(filePathFailedRemote, filePathGenerated); - - errorMsg = "Something broke in the image comparison with " + filePathDiffImage; - QVERIFY2( (pixelDiff != -1), qPrintable(errorMsg) ); - - // remote: save in *.diff - QString filePathDiffRemote = ftpBaseDir + "/" + engine + ".diff" + "/" + fileName; - ftpUploadFile(filePathDiffRemote, filePathDiffImage); - QFAIL(qPrintable(fileName)); - } - - } else { - qWarning() << "\t(W) Expected generated file" << filePathGenerated << "does not exist."; - qWarning() << "\t(W) ...saving baseline in *.failed"; - - // save local - QString filePathMissing = basedir + '/' + engine + ".failed/" + fileName + "_missing"; - errorMsg = "Could not save " + filePathMissing; - QVERIFY2( QFile::copy(filePathBaseline, filePathMissing), qPrintable(errorMsg) ); - - // save remote - QString filePathDiffRemote = ftpBaseDir + "/" + engine + ".diff" + "/" + fileName; - ftpUploadFile(filePathDiffRemote, filePathBaseline); - - errorMsg = filePathGenerated + " was not generated, but baseline for this file exists"; - QVERIFY2(false, qPrintable(errorMsg)); - } - -} - -/* - * Execution starts here. - */ - -uiLoader::TestResult uiLoader::runAutoTests(QString *errorMessage) -{ - // SVG needs this widget... - QWidget dummy; - - qDebug() << "Running test on buildkey:" << QLibraryInfo::buildKey() << " qt version:" << qVersion(); - qDebug() << "Initializing tests..."; - - // load config - const QString configFileName = QHostInfo::localHostName().split(QLatin1Char('.')).first() + QLatin1String(".ini"); - const QFileInfo fi(configFileName); - if (!fi.isFile() || !fi.isReadable()) { - *errorMessage = QString::fromLatin1("Config file '%1' does not exist or is not readable.").arg(configFileName); - return TestNoConfig; - } - - if (!loadConfig(configFileName, errorMessage)) - return TestConfigError; - - // reset the local environment where the results are stored - setupLocal(); - - // reset the FTP environment where the results are stored - setupFTP(); - - // retrieve the latest test result baseline from the FTP server. - downloadBaseline(); - - // execute tests - executeTests(); - - // upload testresults as new baseline or compare results - if ( lsNeedBaseline.size() ) - createBaseline(); - else - compare(); - - return TestRunDone; -} - -int uiLoader::imgDiff(const QString fileA, const QString fileB, const QString output) -{ -// qDebug() << "Comparing " << fileA << " and " << fileB << " outputting to " << output; - QImage imageA(fileA); - QImage imageB(fileB); - - // Invalid images - if (imageA.isNull() || imageB.isNull()) - { - qDebug() << "Fatal error: unable to open one or more input images."; - return false; - } - - //Choose the largest image size, so that the output can capture the entire diff. - QSize largestSize = imageA.size(); - QSize otherSize = imageB.size(); - - if (largestSize.width() < otherSize.width()) - largestSize.setWidth(otherSize.width()); - - if (largestSize.height() < otherSize.height()) - largestSize.setHeight(otherSize.height()); - - QImage imageDiff(largestSize, QImage::Format_ARGB32); - - imageA = imageA.convertToFormat(QImage::Format_ARGB32); - imageB = imageB.convertToFormat(QImage::Format_ARGB32); - - int pixelDiff = 0; - - for (int y = 0; y < imageDiff.height(); ++y) - { - for (int x = 0; x < imageDiff.width(); ++x) - { - //Are the pixels within range? Else, draw a black pixel in diff. - if (imageA.valid(x,y) && imageB.valid(x,y)) - { - //Both images have a pixel at x,y - are they the same? If not, black pixel in diff. - if (imageA.pixel(x,y) != imageB.pixel(x,y)) - { - imageDiff.setPixel(x,y,0xff000000); - pixelDiff++; - } - else - imageDiff.setPixel(x,y,0xffffffff); - } - else - { - imageDiff.setPixel(x,y,0xff000000); - pixelDiff++; - } - } - } - - imageDiff.setText("comment", QString::number(pixelDiff)); - - if (!imageDiff.save(output, "PNG")) - pixelDiff = -1; - - return pixelDiff; -} diff --git a/tests/auto/uiloader/uiloader/uiloader.h b/tests/auto/uiloader/uiloader/uiloader.h deleted file mode 100644 index b7ee45fd57..0000000000 --- a/tests/auto/uiloader/uiloader/uiloader.h +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef ATWRAPPER_H -#define ATWRAPPER_H - -#include -#include -#include -#include -#include - -class uiLoader : public QObject -{ - Q_OBJECT - - public: - uiLoader(const QString &pathToProgram); - - enum TestResult { TestRunDone, TestConfigError, TestNoConfig }; - TestResult runAutoTests(QString *errorMessage); - - private: - bool loadConfig(const QString &, QString *errorMessage); - void initTests(); - - void setupFTP(); - void setupLocal(); - void clearDirectory(const QString&); - - void ftpMkDir( QString ); - void ftpGetFiles(QList&, const QString&, const QString&); - void ftpList(const QString&); - void ftpClearDirectory(const QString&); - bool ftpUploadFile(const QString&, const QString&); - void executeTests(); - - void createBaseline(); - void downloadBaseline(); - - bool compare(); - - void diff(const QString&, const QString&, const QString&); - int imgDiff(const QString fileA, const QString fileB, const QString output); - QStringList uiFiles() const; - - QHash enginesToTest; - - QString framework; - QString suite; - QString output; - QString ftpUser; - QString ftpPass; - QString ftpHost; - QString ftpBaseDir; - QString threshold; - - QString errorMsg; - - QList lsDirList; - QList lsNeedBaseline; - - QString configPath; - - QString pathToProgram; - - private slots: - //void ftpAddLsDone( bool ); - void ftpAddLsEntry( const QUrlInfo &urlInfo ); -}; - -#endif diff --git a/tests/auto/uiloader/uiloader/uiloader.pro b/tests/auto/uiloader/uiloader/uiloader.pro deleted file mode 100644 index 12624703ff..0000000000 --- a/tests/auto/uiloader/uiloader/uiloader.pro +++ /dev/null @@ -1,30 +0,0 @@ -load(qttest_p4) - -TEMPLATE = app -!embedded:CONFIG += uitools -TARGET = ../tst_uiloader -!symbian:DEFINES += SRCDIR=\\\"$$PWD\\\" - -win32 { - CONFIG(debug, debug|release) { - TARGET = ../../debug/tst_uiloader -} else { - TARGET = ../../release/tst_uiloader - } -} - -QT += widgets network - -wince*|symbian: { - configuration.files = ../*.ini - configuration.path = . - - screenapp.files = ../tst_screenshot/tst_screenshot.exe - screenapp.path = tst_screenshot - - DEPLOYMENT += configuration screenapp -} - -# Input -HEADERS += uiloader.h -SOURCES += tst_uiloader.cpp uiloader.cpp diff --git a/tests/auto/uiloader/wartburg.ini b/tests/auto/uiloader/wartburg.ini deleted file mode 100644 index 751a3883fd..0000000000 --- a/tests/auto/uiloader/wartburg.ini +++ /dev/null @@ -1,11 +0,0 @@ -[General] -ftpBaseDir=/arthurtest -ftpHost=wartburg -ftpPass=anonymouspass -ftpUser=anonymous -output=testresults -threshold=20 - -[engines] -1\engine=uic -size=1 diff --git a/tools/uilib/abstractformbuilder.cpp b/tools/uilib/abstractformbuilder.cpp deleted file mode 100644 index da64a5ee27..0000000000 --- a/tools/uilib/abstractformbuilder.cpp +++ /dev/null @@ -1,3154 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -**sw -****************************************************************************/ - -#include "abstractformbuilder.h" -#include "formbuilderextra_p.h" -#include "resourcebuilder_p.h" -#include "textbuilder_p.h" -#include "ui4_p.h" -#include "properties_p.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#ifndef QFORMINTERNAL_NAMESPACE -# include // Compiling within Designer -#endif - -#include - -#include - -#include - -Q_DECLARE_METATYPE(QWidgetList) - -static const char *buttonGroupPropertyC = "buttonGroup"; - -QT_BEGIN_NAMESPACE - -#ifdef QFORMINTERNAL_NAMESPACE -using namespace QFormInternal; -#endif - -class QFriendlyLayout: public QLayout -{ -public: - inline QFriendlyLayout() { Q_ASSERT(0); } - -#ifdef QFORMINTERNAL_NAMESPACE - friend class QFormInternal::QAbstractFormBuilder; -#else - friend class QAbstractFormBuilder; -#endif -}; - -/*! - \class QAbstractFormBuilder - - \brief The QAbstractFormBuilder class provides a default - implementation for classes that create user interfaces at - run-time. - - \inmodule QtDesigner - - QAbstractFormBuilder provides a standard interface and a default - implementation for constructing forms from user interface - files. It is not intended to be instantiated directly. Use the - QFormBuilder class to create user interfaces from UI files at - run-time. For example: - - \snippet doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp 0 - - To override certain aspects of the form builder's behavior, - subclass QAbstractFormBuilder and reimplement the relevant virtual - functions: - - \list - \o load() handles reading of UI format files from arbitrary - QIODevices, and construction of widgets from the XML data - that they contain. - \o save() handles saving of widget details in UI format to - arbitrary QIODevices. - \o workingDirectory() and setWorkingDirectory() control the - directory in which forms are held. The form builder looks for - other resources on paths relative to this directory. - \endlist - - The QFormBuilder class is typically used by custom components and - applications that embed \QD. Standalone applications that need to - dynamically generate user interfaces at run-time use the - QUiLoader, found in the QtUiTools module. - - \sa {QtUiTools Module} -*/ - -/*! - Constructs a new form builder.*/ -QAbstractFormBuilder::QAbstractFormBuilder() : d(new QFormBuilderExtra) -{ - setResourceBuilder(new QResourceBuilder()); - setTextBuilder(new QTextBuilder()); -} - -/*! - Destroys the form builder.*/ -QAbstractFormBuilder::~QAbstractFormBuilder() -{ -} - -// Return UI file version from attribute 'version="4.0"' -static QPair uiVersion(const QString &attr) -{ - const QStringList versions = attr.split(QLatin1Char('.'), QString::SkipEmptyParts); - if (versions.size() >= 2) { - bool okMajor, okMinor; - const int majorVersion = versions.at(0).toInt(&okMajor); - const int minorVersion = versions.at(1).toInt(&okMinor); - if (okMajor && okMinor) - return QPair(majorVersion, minorVersion); - } - return QPair(-1, -1); -} - -static inline QString msgXmlError(const QXmlStreamReader &reader) -{ - return QCoreApplication::translate("QAbstractFormBuilder", "An error has occurred while reading the UI file at line %1, column %2: %3") - .arg(reader.lineNumber()).arg(reader.columnNumber()).arg(reader.errorString()); -} - -// Read and check the version and the (optional) language attribute -// of an element and leave reader positioned at . -static bool inline readUiAttributes(QXmlStreamReader &reader, const QString &language, QString *errorMessage) -{ - const QString uiElement = QLatin1String("ui"); - // Read up to first element - while (!reader.atEnd()) { - switch (reader.readNext()) { - case QXmlStreamReader::Invalid: - *errorMessage = msgXmlError(reader); - return false; - case QXmlStreamReader::StartElement: - if (reader.name().compare(uiElement, Qt::CaseInsensitive) == 0) { - const QString versionAttribute = QLatin1String("version"); - const QString languageAttribute = QLatin1String("language"); - const QXmlStreamAttributes attributes = reader.attributes(); - if (attributes.hasAttribute(versionAttribute)) { - const QString versionString = attributes.value(versionAttribute).toString(); - if (uiVersion(versionString).first < 4) { - *errorMessage = QCoreApplication::translate("QAbstractFormBuilder", "This file was created using Designer from Qt-%1 and cannot be read.") - .arg(versionString); - return false; - } // version error - } // has version - if (attributes.hasAttribute(languageAttribute)) { - // Check on optional language (Jambi) - const QString formLanguage = attributes.value(languageAttribute).toString(); - if (!formLanguage.isEmpty() && formLanguage.compare(language, Qt::CaseInsensitive)) { - *errorMessage = QCoreApplication::translate("QAbstractFormBuilder", "This file cannot be read because it was created using %1.").arg(formLanguage); - return false; - } // language error - } // has language - return true; - } // matched - break; - default: - break; - } - } - // No found. - *errorMessage = QCoreApplication::translate("QAbstractFormBuilder", "Invalid UI file: The root element is missing."); - return false; -} - -/*! - \fn QWidget *QAbstractFormBuilder::load(QIODevice *device, QWidget *parent) - - Loads an XML representation of a widget from the given \a device, - and constructs a new widget with the specified \a parent. - - \sa save(), errorString() -*/ -QWidget *QAbstractFormBuilder::load(QIODevice *dev, QWidget *parentWidget) -{ - QXmlStreamReader reader(dev); - d->m_errorString.clear(); - if (!readUiAttributes(reader, d->m_language, &d->m_errorString)) { - uiLibWarning(d->m_errorString); - return false; - } - DomUI ui; - ui.read(reader); - if (reader.hasError()) { - d->m_errorString = msgXmlError(reader); - uiLibWarning(d->m_errorString); - return 0; - } - - QWidget *widget = create(&ui, parentWidget); - if (!widget && d->m_errorString.isEmpty()) - d->m_errorString = QCoreApplication::translate("QAbstractFormBuilder", "Invalid UI file"); - return widget; -} - -/*! - \internal -*/ -QWidget *QAbstractFormBuilder::create(DomUI *ui, QWidget *parentWidget) -{ - typedef QFormBuilderExtra::ButtonGroupHash ButtonGroupHash; - - d->clear(); - if (const DomLayoutDefault *def = ui->elementLayoutDefault()) { - d->m_defaultMargin = def->hasAttributeMargin() ? def->attributeMargin() : INT_MIN; - d->m_defaultSpacing = def->hasAttributeSpacing() ? def->attributeSpacing() : INT_MIN; - } - - DomWidget *ui_widget = ui->elementWidget(); - if (!ui_widget) - return 0; - - initialize(ui); - - if (const DomButtonGroups *domButtonGroups = ui->elementButtonGroups()) - d->registerButtonGroups(domButtonGroups); - - if (QWidget *widget = create(ui_widget, parentWidget)) { - // Reparent button groups that were actually created to main container for them to be found in the signal/slot part - const ButtonGroupHash &buttonGroups = d->buttonGroups(); - if (!buttonGroups.empty()) { - const ButtonGroupHash::const_iterator cend = buttonGroups.constEnd(); - for (ButtonGroupHash::const_iterator it = buttonGroups.constBegin(); it != cend; ++it) - if (it.value().second) - it.value().second->setParent(widget); - } - createConnections(ui->elementConnections(), widget); - createResources(ui->elementResources()); // maybe this should go first, before create()... - applyTabStops(widget, ui->elementTabStops()); - d->applyInternalProperties(); - reset(); - d->clear(); - return widget; - } - d->clear(); - return 0; -} - -/*! - \internal - Retrieve relevant information from the custom widgets section. - Called by create(DomUI *, QWidget *); call manually if you - just use create(DomWidget *, QWidget *) on some child widget of DomUI. - */ - -void QAbstractFormBuilder::initialize(const DomUI *ui) -{ - typedef QList DomCustomWidgetList; - - DomCustomWidgets *domCustomWidgets = ui->elementCustomWidgets(); - createCustomWidgets(domCustomWidgets); - - if (domCustomWidgets) { - const DomCustomWidgetList customWidgets = domCustomWidgets->elementCustomWidget(); - if (!customWidgets.empty()) { - const DomCustomWidgetList::const_iterator cend = customWidgets.constEnd(); - for (DomCustomWidgetList::const_iterator it = customWidgets.constBegin(); it != cend; ++it) - d->storeCustomWidgetData((*it)->elementClass(), *it); - } - } -} - -/*! - \internal -*/ -QWidget *QAbstractFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidget) -{ - QWidget *w = createWidget(ui_widget->attributeClass(), parentWidget, ui_widget->attributeName()); - if (!w) - return 0; - - applyProperties(w, ui_widget->elementProperty()); - - foreach (DomAction *ui_action, ui_widget->elementAction()) { - QAction *child_action = create(ui_action, w); - Q_UNUSED( child_action ); - } - - foreach (DomActionGroup *ui_action_group, ui_widget->elementActionGroup()) { - QActionGroup *child_action_group = create(ui_action_group, w); - Q_UNUSED( child_action_group ); - } - - QWidgetList children; - foreach (DomWidget *ui_child, ui_widget->elementWidget()) { - if (QWidget *child = create(ui_child, w)) { - children += child; - } else { - const QString className = ui_child->elementClass().empty() ? QString() : ui_child->elementClass().front(); - uiLibWarning(QCoreApplication::translate("QAbstractFormBuilder", "The creation of a widget of the class '%1' failed.").arg(className)); - } - } - - foreach (DomLayout *ui_lay, ui_widget->elementLayout()) { - QLayout *child_lay = create(ui_lay, 0, w); - Q_UNUSED( child_lay ); - } - - const QList addActions = ui_widget->elementAddAction(); - if (!addActions.empty()) { - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - foreach (DomActionRef *ui_action_ref, addActions) { - const QString name = ui_action_ref->attributeName(); - if (name == strings.separator) { - QAction *sep = new QAction(w); - sep->setSeparator(true); - w->addAction(sep); - addMenuAction(sep); - } else if (QAction *a = d->m_actions.value(name)) { - w->addAction(a); - } else if (QActionGroup *g = d->m_actionGroups.value(name)) { - w->addActions(g->actions()); - } else if (QMenu *menu = w->findChild(name)) { - w->addAction(menu->menuAction()); - addMenuAction(menu->menuAction()); - } - } - } - - loadExtraInfo(ui_widget, w, parentWidget); -#ifndef QT_FORMBUILDER_NO_SCRIPT - QString scriptErrorMessage; - d->formScriptRunner().run(ui_widget, - d->customWidgetScript(ui_widget->attributeClass()), - w, children, &scriptErrorMessage); -#endif - addItem(ui_widget, w, parentWidget); - - if (qobject_cast(w) && parentWidget) - w->setAttribute(Qt::WA_Moved, false); // So that QDialog::setVisible(true) will center it - - const QStringList zOrderNames = ui_widget->elementZOrder(); - if (!zOrderNames.isEmpty()) { - QList zOrder = qvariant_cast(w->property("_q_zOrder")); - foreach (const QString &widgetName, zOrderNames) { - if (QWidget *child = w->findChild(widgetName)) { - if (child->parentWidget() == w) { - zOrder.removeAll(child); - zOrder.append(child); - child->raise(); - } - } - } - w->setProperty("_q_zOrder", QVariant::fromValue(zOrder)); - } - - return w; -} - -/*! - \internal -*/ -QAction *QAbstractFormBuilder::create(DomAction *ui_action, QObject *parent) -{ - QAction *a = createAction(parent, ui_action->attributeName()); - if (!a) - return 0; - - d->m_actions.insert(ui_action->attributeName(), a); - applyProperties(a, ui_action->elementProperty()); - return a; -} - -/*! - \internal -*/ -QActionGroup *QAbstractFormBuilder::create(DomActionGroup *ui_action_group, QObject *parent) -{ - QActionGroup *a = createActionGroup(parent, ui_action_group->attributeName()); - if (!a) - return 0; - d->m_actionGroups.insert(ui_action_group->attributeName(), a); - applyProperties(a, ui_action_group->elementProperty()); - - foreach (DomAction *ui_action, ui_action_group->elementAction()) { - QAction *child_action = create(ui_action, a); - Q_UNUSED( child_action ); - } - - foreach (DomActionGroup *g, ui_action_group->elementActionGroup()) { - QActionGroup *child_action_group = create(g, parent); - Q_UNUSED( child_action_group ); - } - - return a; -} - -// figure out the toolbar area of a DOM attrib list. -// By legacy, it is stored as an integer. As of 4.3.0, it is the enumeration value. -Qt::ToolBarArea QAbstractFormBuilder::toolbarAreaFromDOMAttributes(const DomPropertyHash &attributes) { - const DomProperty *attr = attributes.value(QFormBuilderStrings::instance().toolBarAreaAttribute); - if (!attr) - return Qt::TopToolBarArea; - switch(attr->kind()) { - case DomProperty::Number: - return static_cast(attr->elementNumber()); - case DomProperty::Enum: - return enumKeyOfObjectToValue("toolBarArea", attr->elementEnum().toLatin1()); - default: - break; - } - return Qt::TopToolBarArea; -} - -/*! - \internal -*/ -bool QAbstractFormBuilder::addItem(DomWidget *ui_widget, QWidget *widget, QWidget *parentWidget) -{ - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - const DomPropertyHash attributes = propertyMap(ui_widget->elementAttribute()); - - if (parentWidget == 0) - return true; - // Check special cases. First: Custom container - const QString className = QLatin1String(parentWidget->metaObject()->className()); - const QString addPageMethod = d->customWidgetAddPageMethod(className); - if (!addPageMethod.isEmpty()) { - // If this fails ( non-existent or non-slot), use ContainerExtension in Designer, else it can't be helped - return QMetaObject::invokeMethod(parentWidget, addPageMethod.toUtf8().constData(), Qt::DirectConnection, Q_ARG(QWidget*, widget)); - } - - if (QMainWindow *mw = qobject_cast(parentWidget)) { - -#ifndef QT_NO_MENUBAR - // the menubar - if (QMenuBar *menuBar = qobject_cast(widget)) { - mw->setMenuBar(menuBar); - return true; - } -#endif - -#ifndef QT_NO_TOOLBAR - // apply the toolbar's attributes - else if (QToolBar *toolBar = qobject_cast(widget)) { - mw->addToolBar(toolbarAreaFromDOMAttributes(attributes), toolBar); - // check break - if (const DomProperty *attr = attributes.value(strings.toolBarBreakAttribute)) - if (attr->elementBool() == strings.trueValue) - mw->insertToolBarBreak (toolBar); - - return true; - } -#endif - -#ifndef QT_NO_STATUSBAR - // statusBar - else if (QStatusBar *statusBar = qobject_cast(widget)) { - mw->setStatusBar(statusBar); - return true; - } -#endif - -#ifndef QT_NO_DOCKWIDGET - // apply the dockwidget's attributes - else if (QDockWidget *dockWidget = qobject_cast(widget)) { - if (const DomProperty *attr = attributes.value(strings.dockWidgetAreaAttribute)) { - Qt::DockWidgetArea area = static_cast(attr->elementNumber()); - if (!dockWidget->isAreaAllowed(area)) { - if (dockWidget->isAreaAllowed(Qt::LeftDockWidgetArea)) - area = Qt::LeftDockWidgetArea; - else if (dockWidget->isAreaAllowed(Qt::RightDockWidgetArea)) - area = Qt::RightDockWidgetArea; - else if (dockWidget->isAreaAllowed(Qt::TopDockWidgetArea)) - area = Qt::TopDockWidgetArea; - else if (dockWidget->isAreaAllowed(Qt::BottomDockWidgetArea)) - area = Qt::BottomDockWidgetArea; - } - mw->addDockWidget(area, dockWidget); - } else { - mw->addDockWidget(Qt::LeftDockWidgetArea, dockWidget); - } - return true; - } -#endif - - else if (! mw->centralWidget()) { - mw->setCentralWidget(widget); - return true; - } - } - -#ifndef QT_NO_TABWIDGET - else if (QTabWidget *tabWidget = qobject_cast(parentWidget)) { - widget->setParent(0); - - const int tabIndex = tabWidget->count(); - if (const DomProperty *titleP = attributes.value(strings.titleAttribute, 0)) - tabWidget->addTab(widget, toString(titleP->elementString())); - else - tabWidget->addTab(widget, strings.defaultTitle); - - if (DomProperty *picon = attributes.value(strings.iconAttribute)) { - QVariant v = resourceBuilder()->loadResource(workingDirectory(), picon); - QVariant nativeValue = resourceBuilder()->toNativeValue(v); - tabWidget->setTabIcon(tabIndex, qvariant_cast(nativeValue)); - } - -#ifndef QT_NO_TOOLTIP - if (const DomProperty *ptoolTip = attributes.value(strings.toolTipAttribute)) { - tabWidget->setTabToolTip(tabIndex, toString(ptoolTip->elementString())); - } -#endif - -#ifndef QT_NO_WHATSTHIS - if (const DomProperty *pwhatsThis = attributes.value(strings.whatsThisAttribute)) { - tabWidget->setTabWhatsThis(tabIndex, toString(pwhatsThis->elementString())); - } -#endif - - return true; - } -#endif - -#ifndef QT_NO_TOOLBOX - else if (QToolBox *toolBox = qobject_cast(parentWidget)) { - const int tabIndex = toolBox->count(); - if (const DomProperty *labelP = attributes.value(strings.labelAttribute, 0)) - toolBox->addItem(widget, toString(labelP->elementString())); - else - toolBox->addItem(widget, strings.defaultTitle); - - if (DomProperty *picon = attributes.value(strings.iconAttribute)) { - QVariant v = resourceBuilder()->loadResource(workingDirectory(), picon); - QVariant nativeValue = resourceBuilder()->toNativeValue(v); - toolBox->setItemIcon(tabIndex, qvariant_cast(nativeValue)); - } - -#ifndef QT_NO_TOOLTIP - if (const DomProperty *ptoolTip = attributes.value(strings.toolTipAttribute)) { - toolBox->setItemToolTip(tabIndex, toString(ptoolTip->elementString())); - } -#endif - - return true; - } -#endif - -#ifndef QT_NO_STACKEDWIDGET - else if (QStackedWidget *stackedWidget = qobject_cast(parentWidget)) { - stackedWidget->addWidget(widget); - return true; - } -#endif - -#ifndef QT_NO_SPLITTER - else if (QSplitter *splitter = qobject_cast(parentWidget)) { - splitter->addWidget(widget); - return true; - } -#endif - -#ifndef QT_NO_MDIAREA - else if (QMdiArea *mdiArea = qobject_cast(parentWidget)) { - mdiArea->addSubWindow(widget); - return true; - } -#endif - -#ifndef QT_NO_WORKSPACE - else if (QWorkspace *ws = qobject_cast(parentWidget)) { - ws->addWindow(widget); - return true; - } -#endif - -#ifndef QT_NO_DOCKWIDGET - else if (QDockWidget *dockWidget = qobject_cast(parentWidget)) { - dockWidget->setWidget(widget); - return true; - } -#endif - -#ifndef QT_NO_SCROLLAREA - else if (QScrollArea *scrollArea = qobject_cast(parentWidget)) { - scrollArea->setWidget(widget); - return true; - } -#endif - -#ifndef QT_NO_WIZARD - else if (QWizard *wizard = qobject_cast(parentWidget)) { - QWizardPage *page = qobject_cast(widget); - if (!page) { - uiLibWarning(QCoreApplication::translate("QAbstractFormBuilder", "Attempt to add child that is not of class QWizardPage to QWizard.")); - return false; - } - wizard->addPage(page); - return true; - } -#endif - return false; -} - -/*! - \internal -*/ -void QAbstractFormBuilder::layoutInfo(DomLayout *ui_layout, QObject *parent, int *margin, int *spacing) -{ - Q_UNUSED(parent) - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - const DomPropertyHash properties = propertyMap(ui_layout->elementProperty()); - - int mar = INT_MIN; - int spac = INT_MIN; - if (const DomProperty *p = properties.value(strings.marginProperty, 0)) - mar = p->elementNumber(); - - if (const DomProperty *p = properties.value(strings.spacingProperty, 0)) - spac = p->elementNumber(); - -#ifdef Q_OS_MAC - // here we recognize UI file < 4.3 (no we don't store margin property) - if (mar != INT_MIN) { - const int defaultMargin = parent->inherits("QLayoutWidget") ? 0 : 9; - if (mar == defaultMargin) - mar = INT_MIN; - if (spac == 6) - spac = INT_MIN; - - if (mar == INT_MIN || spac == INT_MIN) { - QList properties = ui_layout->elementProperty(); - QMutableListIterator it(properties); - while (it.hasNext()) { - DomProperty *prop = it.next(); - if ((mar == INT_MIN && prop->attributeName() == strings.marginProperty) || - (spac == INT_MIN && prop->attributeName() == strings.spacingProperty)) { - it.remove(); - delete prop; - } - } - ui_layout->setElementProperty(properties); - } - } -#endif - if (margin) - *margin = mar; - if (spacing) - *spacing = spac; -} - -/*! - \internal -*/ -QLayout *QAbstractFormBuilder::create(DomLayout *ui_layout, QLayout *parentLayout, QWidget *parentWidget) -{ - QObject *p = parentLayout; - - if (p == 0) - p = parentWidget; - - Q_ASSERT(p != 0); - - bool tracking = false; - - if (p == parentWidget && parentWidget->layout()) { - tracking = true; - p = parentWidget->layout(); - } - - QLayout *layout = createLayout(ui_layout->attributeClass(), p, ui_layout->hasAttributeName() ? ui_layout->attributeName() : QString()); - - if (layout == 0) - return 0; - - if (tracking && layout->parent() == 0) { - QBoxLayout *box = qobject_cast(parentWidget->layout()); - if (!box) { // only QBoxLayout is supported - const QString widgetClass = QString::fromUtf8(parentWidget->metaObject()->className()); - const QString layoutClass = QString::fromUtf8(parentWidget->layout()->metaObject()->className()); - const QString msg = QCoreApplication::translate("QAbstractFormBuilder", "Attempt to add a layout to a widget '%1' (%2) which already has a layout of non-box type %3.\n" - "This indicates an inconsistency in the ui-file."). - arg(parentWidget->objectName(), widgetClass, layoutClass); - uiLibWarning(msg); - return 0; - } - box->addLayout(layout); - } - - int margin = INT_MIN, spacing = INT_MIN; - layoutInfo(ui_layout, p, &margin, &spacing); - - if (margin != INT_MIN) { - layout->setMargin(margin); - } else { - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - int left, top, right, bottom; - left = top = right = bottom = -1; - layout->getContentsMargins(&left, &top, &right, &bottom); - - const DomPropertyHash properties = propertyMap(ui_layout->elementProperty()); - - if (const DomProperty *p = properties.value(strings.leftMarginProperty, 0)) - left = p->elementNumber(); - - if (const DomProperty *p = properties.value(strings.topMarginProperty, 0)) - top = p->elementNumber(); - - if (const DomProperty *p = properties.value(strings.rightMarginProperty, 0)) - right = p->elementNumber(); - - if (const DomProperty *p = properties.value(strings.bottomMarginProperty, 0)) - bottom = p->elementNumber(); - - layout->setContentsMargins(left, top, right, bottom); - } - - if (spacing != INT_MIN) { - layout->setSpacing(spacing); - } else { - QGridLayout *grid = qobject_cast(layout); - if (grid) { - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - const DomPropertyHash properties = propertyMap(ui_layout->elementProperty()); - - if (const DomProperty *p = properties.value(strings.horizontalSpacingProperty, 0)) - grid->setHorizontalSpacing(p->elementNumber()); - if (const DomProperty *p = properties.value(strings.verticalSpacingProperty, 0)) - grid->setVerticalSpacing(p->elementNumber()); - } - } - - applyProperties(layout, ui_layout->elementProperty()); - - foreach (DomLayoutItem *ui_item, ui_layout->elementItem()) { - if (QLayoutItem *item = create(ui_item, layout, parentWidget)) { - addItem(ui_item, item, layout); - } - } - // Check the box stretch attributes - if (QBoxLayout *box = qobject_cast(layout)) { - const QString boxStretch = ui_layout->attributeStretch(); - if (!boxStretch.isEmpty()) - QFormBuilderExtra::setBoxLayoutStretch(boxStretch, box); - } - // Check the grid stretch/minimum size attributes - if (QGridLayout *grid = qobject_cast(layout)) { - // Stretch - const QString gridRowStretch = ui_layout->attributeRowStretch(); - if (!gridRowStretch.isEmpty()) - QFormBuilderExtra::setGridLayoutRowStretch(gridRowStretch, grid); - const QString gridColumnStretch = ui_layout->attributeColumnStretch(); - if (!gridColumnStretch.isEmpty()) - QFormBuilderExtra::setGridLayoutColumnStretch(gridColumnStretch, grid); - // Minimum size - const QString gridColumnMinimumWidth = ui_layout->attributeColumnMinimumWidth(); - if (!gridColumnMinimumWidth.isEmpty()) - QFormBuilderExtra::setGridLayoutColumnMinimumWidth(gridColumnMinimumWidth, grid); - const QString gridRowMinimumHeight = ui_layout->attributeRowMinimumHeight(); - if (!gridRowMinimumHeight.isEmpty()) - QFormBuilderExtra::setGridLayoutRowMinimumHeight(gridRowMinimumHeight, grid); - } - return layout; -} - -#ifndef QT_NO_FORMLAYOUT -static inline QFormLayout::ItemRole formLayoutRole(int column, int colspan) -{ - if (colspan > 1) - return QFormLayout::SpanningRole; - return column == 0 ? QFormLayout::LabelRole : QFormLayout::FieldRole; -} -#endif - -static inline QString alignmentValue(Qt::Alignment a) -{ - QString h,v; - switch (a & Qt::AlignHorizontal_Mask) { - case Qt::AlignLeft: - h = QLatin1String("Qt::AlignLeft"); - break; - case Qt::AlignRight: - h = QLatin1String("Qt::AlignRight"); - break; - case Qt::AlignHCenter: - h = QLatin1String("Qt::AlignHCenter"); - break; - case Qt::AlignJustify: - h = QLatin1String("Qt::AlignJustify"); - break; - } - switch (a & Qt::AlignVertical_Mask) { - case Qt::AlignTop: - v = QLatin1String("Qt::AlignTop"); - break; - case Qt::AlignBottom: - v = QLatin1String("Qt::AlignBottom"); - break; - case Qt::AlignVCenter: - v = QLatin1String("Qt::AlignVCenter"); - break; - } - if (h.isEmpty() && v.isEmpty()) - return QString(); - if (!v.isEmpty()) { - if (!h.isEmpty()) - h += QLatin1Char('|'); - h += v; - } - return h; -} - -static inline Qt::Alignment alignmentFromDom(const QString &in) -{ - Qt::Alignment rc = 0; - if (!in.isEmpty()) { - foreach (const QString &f, in.split(QLatin1Char('|'))) { - if (f == QLatin1String("Qt::AlignLeft")) { - rc |= Qt::AlignLeft; - } else if (f == QLatin1String("Qt::AlignRight")) { - rc |= Qt::AlignRight; - } else if (f == QLatin1String("Qt::AlignHCenter")) { - rc |= Qt::AlignHCenter; - } else if (f == QLatin1String("Qt::AlignJustify")) { - rc |= Qt::AlignJustify; - } else if (f == QLatin1String("Qt::AlignTop")) { - rc |= Qt::AlignTop; - } else if (f == QLatin1String("Qt::AlignBottom")) { - rc |= Qt::AlignBottom; - } else if (f == QLatin1String("Qt::AlignVCenter")) { - rc |= Qt::AlignVCenter; - } - } - } - return rc; -} - -/*! - \internal -*/ -bool QAbstractFormBuilder::addItem(DomLayoutItem *ui_item, QLayoutItem *item, QLayout *layout) -{ - // Calling addChildWidget(), etc. is required to maintain consistency of the layouts, - // see documentation of addItem(), which should ideally not be used. - if (item->widget()) { - static_cast(layout)->addChildWidget(item->widget()); - } else if (item->layout()) { - static_cast(layout)->addChildLayout(item->layout()); - } else if (item->spacerItem()) { - // nothing to do - } else { - return false; - } - - if (QGridLayout *grid = qobject_cast(layout)) { - const int rowSpan = ui_item->hasAttributeRowSpan() ? ui_item->attributeRowSpan() : 1; - const int colSpan = ui_item->hasAttributeColSpan() ? ui_item->attributeColSpan() : 1; - grid->addItem(item, ui_item->attributeRow(), ui_item->attributeColumn(), - rowSpan, colSpan, item->alignment()); - return true; - } -#ifndef QT_NO_FORMLAYOUT - if (QFormLayout *form = qobject_cast(layout)) { - const int row = ui_item->attributeRow(); - const int colSpan = ui_item->hasAttributeColSpan() ? ui_item->attributeColSpan() : 1; - form->setItem(row, formLayoutRole(ui_item->attributeColumn(), colSpan), item); - return true; - } - -#endif - layout->addItem(item); - return true; -} - -/*! - \internal -*/ -QLayoutItem *QAbstractFormBuilder::create(DomLayoutItem *ui_layoutItem, QLayout *layout, QWidget *parentWidget) -{ - switch (ui_layoutItem->kind()) { - case DomLayoutItem::Widget: { - if (QWidget *w = create(ui_layoutItem->elementWidget(), parentWidget)) { -#ifdef QFORMINTERNAL_NAMESPACE // uilib - QWidgetItem *item = new QWidgetItemV2(w); -#else // Within Designer: Use factory method that returns special items that refuse to shrink to 0,0 - QWidgetItem *item = QLayoutPrivate::createWidgetItem(layout, w); -#endif - item->setAlignment(alignmentFromDom(ui_layoutItem->attributeAlignment())); - return item; - } - qWarning() << QCoreApplication::translate("QAbstractFormBuilder", "Empty widget item in %1 '%2'.").arg(QString::fromUtf8(layout->metaObject()->className()), layout->objectName()); - return 0; - } - case DomLayoutItem::Spacer: { - QSize size(0, 0); - QSizePolicy::Policy sizeType = QSizePolicy::Expanding; - bool isVspacer = false; - - const DomSpacer *ui_spacer = ui_layoutItem->elementSpacer(); - - const QMetaEnum sizePolicy_enum = metaEnum("sizeType"); - const QMetaEnum orientation_enum = metaEnum("orientation"); - - const QList spacerProperties = ui_spacer->elementProperty(); - if (!spacerProperties.empty()) { - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - foreach (DomProperty *p, spacerProperties) { - const QVariant v = toVariant(&QAbstractFormBuilderGadget::staticMetaObject, p); // ### remove me - if (v.isNull()) - continue; - if (p->attributeName() == strings.sizeHintProperty && p->kind() == DomProperty::Size) { - size = v.toSize(); // ### remove me - } else if (p->attributeName() == strings.sizeTypeProperty && p->kind() == DomProperty::Enum) { - sizeType = static_cast(v.toInt()); - } else if (p->attributeName() == strings.orientationProperty && p->kind() == DomProperty::Enum) { - const Qt::Orientation o = static_cast(v.toInt()); - isVspacer = (o == Qt::Vertical); - } - } - } - - QSpacerItem *spacer = 0; - if (isVspacer) - spacer = new QSpacerItem(size.width(), size.height(), QSizePolicy::Minimum, sizeType); - else - spacer = new QSpacerItem(size.width(), size.height(), sizeType, QSizePolicy::Minimum); - return spacer; } - - case DomLayoutItem::Layout: - return create(ui_layoutItem->elementLayout(), layout, parentWidget); - - default: - break; - } - - return 0; -} - -/*! - \internal -*/ -void QAbstractFormBuilder::applyProperties(QObject *o, const QList &properties) -{ - typedef QList DomPropertyList; - - if (properties.empty()) - return; - - const DomPropertyList::const_iterator cend = properties.constEnd(); - for (DomPropertyList::const_iterator it = properties.constBegin(); it != cend; ++it) { - const QVariant v = toVariant(o->metaObject(), *it); - if (!v.isNull()) { - const QString attributeName = (*it)->attributeName(); - if (!d->applyPropertyInternally(o, attributeName, v)) - o->setProperty(attributeName.toUtf8(), v); - } - } -} - - -/*! - \internal - Check whether a property is applied internally by QAbstractFormBuilder. Call this - from overwritten applyProperties(). -*/ - -bool QAbstractFormBuilder::applyPropertyInternally(QObject *o, const QString &propertyName, const QVariant &value) -{ - return d->applyPropertyInternally(o,propertyName, value); -} - -/*! - \internal -*/ - -QVariant QAbstractFormBuilder::toVariant(const QMetaObject *meta, DomProperty *p) -{ - return domPropertyToVariant(this, meta, p); -} - -/*! - \internal -*/ -void QAbstractFormBuilder::setupColorGroup(QPalette &palette, QPalette::ColorGroup colorGroup, - DomColorGroup *group) -{ - // old format - const QList colors = group->elementColor(); - for (int role = 0; role < colors.size(); ++role) { - const DomColor *color = colors.at(role); - const QColor c(color->elementRed(), color->elementGreen(), color->elementBlue()); - palette.setColor(colorGroup, QPalette::ColorRole(role), c); - } - - // new format - const QMetaEnum colorRole_enum = metaEnum("colorRole"); - - const QList colorRoles = group->elementColorRole(); - for (int role = 0; role < colorRoles.size(); ++role) { - const DomColorRole *colorRole = colorRoles.at(role); - - if (colorRole->hasAttributeRole()) { - const int r = colorRole_enum.keyToValue(colorRole->attributeRole().toLatin1()); - if (r != -1) { - const QBrush br = setupBrush(colorRole->elementBrush()); - palette.setBrush(colorGroup, static_cast(r), br); - } - } - } -} - -/*! - \internal -*/ -DomColorGroup *QAbstractFormBuilder::saveColorGroup(const QPalette &palette) -{ - - const QMetaEnum colorRole_enum = metaEnum("colorRole"); - - DomColorGroup *group = new DomColorGroup(); - QList colorRoles; - - const uint mask = palette.resolve(); - for (int role = QPalette::WindowText; role < QPalette::NColorRoles; ++role) { - if (mask & (1 << role)) { - QBrush br = palette.brush(QPalette::ColorRole(role)); - - DomColorRole *colorRole = new DomColorRole(); - colorRole->setElementBrush(saveBrush(br)); - colorRole->setAttributeRole(QLatin1String(colorRole_enum.valueToKey(role))); - colorRoles.append(colorRole); - } - } - - group->setElementColorRole(colorRoles); - return group; -} - -/*! - \internal -*/ -QBrush QAbstractFormBuilder::setupBrush(DomBrush *brush) -{ - QBrush br; - if (!brush->hasAttributeBrushStyle()) - return br; - - const Qt::BrushStyle style = enumKeyOfObjectToValue("brushStyle", brush->attributeBrushStyle().toLatin1()); - - if (style == Qt::LinearGradientPattern || - style == Qt::RadialGradientPattern || - style == Qt::ConicalGradientPattern) { - const QMetaEnum gradientType_enum = metaEnum("gradientType"); - const QMetaEnum gradientSpread_enum = metaEnum("gradientSpread"); - const QMetaEnum gradientCoordinate_enum = metaEnum("gradientCoordinate"); - - const DomGradient *gradient = brush->elementGradient(); - const QGradient::Type type = enumKeyToValue(gradientType_enum, gradient->attributeType().toLatin1()); - - - QGradient *gr = 0; - - if (type == QGradient::LinearGradient) { - gr = new QLinearGradient(QPointF(gradient->attributeStartX(), gradient->attributeStartY()), - QPointF(gradient->attributeEndX(), gradient->attributeEndY())); - } else if (type == QGradient::RadialGradient) { - gr = new QRadialGradient(QPointF(gradient->attributeCentralX(), gradient->attributeCentralY()), - gradient->attributeRadius(), - QPointF(gradient->attributeFocalX(), gradient->attributeFocalY())); - } else if (type == QGradient::ConicalGradient) { - gr = new QConicalGradient(QPointF(gradient->attributeCentralX(), gradient->attributeCentralY()), - gradient->attributeAngle()); - } - if (!gr) - return br; - - const QGradient::Spread spread = enumKeyToValue(gradientSpread_enum, gradient->attributeSpread().toLatin1()); - gr->setSpread(spread); - - const QGradient::CoordinateMode coord = enumKeyToValue(gradientCoordinate_enum, gradient->attributeCoordinateMode().toLatin1()); - gr->setCoordinateMode(coord); - - const QList stops = gradient->elementGradientStop(); - QListIterator it(stops); - while (it.hasNext()) { - const DomGradientStop *stop = it.next(); - const DomColor *color = stop->elementColor(); - gr->setColorAt(stop->attributePosition(), QColor::fromRgb(color->elementRed(), - color->elementGreen(), color->elementBlue(), color->attributeAlpha())); - } - br = QBrush(*gr); - delete gr; - } else if (style == Qt::TexturePattern) { - const DomProperty *texture = brush->elementTexture(); - if (texture && texture->kind() == DomProperty::Pixmap) { - br.setTexture(domPropertyToPixmap(texture)); - } - } else { - const DomColor *color = brush->elementColor(); - br.setColor(QColor::fromRgb(color->elementRed(), - color->elementGreen(), color->elementBlue(), color->attributeAlpha())); - br.setStyle((Qt::BrushStyle)style); - } - return br; -} - -/*! - \internal -*/ -DomBrush *QAbstractFormBuilder::saveBrush(const QBrush &br) -{ - const QMetaEnum brushStyle_enum = metaEnum("brushStyle"); - - DomBrush *brush = new DomBrush(); - const Qt::BrushStyle style = br.style(); - brush->setAttributeBrushStyle(QLatin1String(brushStyle_enum.valueToKey(style))); - if (style == Qt::LinearGradientPattern || - style == Qt::RadialGradientPattern || - style == Qt::ConicalGradientPattern) { - const QMetaEnum gradientType_enum = metaEnum("gradientType"); - const QMetaEnum gradientSpread_enum = metaEnum("gradientSpread"); - const QMetaEnum gradientCoordinate_enum = metaEnum("gradientCoordinate"); - - DomGradient *gradient = new DomGradient(); - const QGradient *gr = br.gradient(); - const QGradient::Type type = gr->type(); - gradient->setAttributeType(QLatin1String(gradientType_enum.valueToKey(type))); - gradient->setAttributeSpread(QLatin1String(gradientSpread_enum.valueToKey(gr->spread()))); - gradient->setAttributeCoordinateMode(QLatin1String(gradientCoordinate_enum.valueToKey(gr->coordinateMode()))); - QList stops; - QGradientStops st = gr->stops(); - QVectorIterator > it(st); - while (it.hasNext()) { - const QPair pair = it.next(); - DomGradientStop *stop = new DomGradientStop(); - stop->setAttributePosition(pair.first); - DomColor *color = new DomColor(); - color->setElementRed(pair.second.red()); - color->setElementGreen(pair.second.green()); - color->setElementBlue(pair.second.blue()); - color->setAttributeAlpha(pair.second.alpha()); - stop->setElementColor(color); - stops.append(stop); - } - gradient->setElementGradientStop(stops); - if (type == QGradient::LinearGradient) { - QLinearGradient *lgr = (QLinearGradient *)(gr); - gradient->setAttributeStartX(lgr->start().x()); - gradient->setAttributeStartY(lgr->start().y()); - gradient->setAttributeEndX(lgr->finalStop().x()); - gradient->setAttributeEndY(lgr->finalStop().y()); - } else if (type == QGradient::RadialGradient) { - QRadialGradient *rgr = (QRadialGradient *)(gr); - gradient->setAttributeCentralX(rgr->center().x()); - gradient->setAttributeCentralY(rgr->center().y()); - gradient->setAttributeFocalX(rgr->focalPoint().x()); - gradient->setAttributeFocalY(rgr->focalPoint().y()); - gradient->setAttributeRadius(rgr->radius()); - } else if (type == QGradient::ConicalGradient) { - QConicalGradient *cgr = (QConicalGradient *)(gr); - gradient->setAttributeCentralX(cgr->center().x()); - gradient->setAttributeCentralY(cgr->center().y()); - gradient->setAttributeAngle(cgr->angle()); - } - - brush->setElementGradient(gradient); - } else if (style == Qt::TexturePattern) { - const QPixmap pixmap = br.texture(); - if (!pixmap.isNull()) { - DomProperty *p = new DomProperty; - setPixmapProperty(*p, pixmapPaths(pixmap)); - brush->setElementTexture(p); - } - } else { - QColor c = br.color(); - DomColor *color = new DomColor(); - color->setElementRed(c.red()); - color->setElementGreen(c.green()); - color->setElementBlue(c.blue()); - color->setAttributeAlpha(c.alpha()); - brush->setElementColor(color); - } - return brush; -} - -/*! - \internal -*/ -QWidget *QAbstractFormBuilder::createWidget(const QString &widgetName, QWidget *parentWidget, const QString &name) -{ - Q_UNUSED(widgetName); - Q_UNUSED(parentWidget); - Q_UNUSED(name); - return 0; -} - -/*! - \internal -*/ -QLayout *QAbstractFormBuilder::createLayout(const QString &layoutName, QObject *parent, const QString &name) -{ - Q_UNUSED(layoutName); - Q_UNUSED(parent); - Q_UNUSED(name); - return 0; -} - -/*! - \internal -*/ -QAction *QAbstractFormBuilder::createAction(QObject *parent, const QString &name) -{ - QAction *action = new QAction(parent); - action->setObjectName(name); - return action; -} - -/*! - \internal -*/ -QActionGroup *QAbstractFormBuilder::createActionGroup(QObject *parent, const QString &name) -{ - QActionGroup *g = new QActionGroup(parent); - g->setObjectName(name); - return g; -} - -/*! - \fn void QAbstractFormBuilder::save(QIODevice *device, QWidget *widget) - - Saves an XML representation of the given \a widget to the - specified \a device in the standard UI file format. - - \sa load()*/ -void QAbstractFormBuilder::save(QIODevice *dev, QWidget *widget) -{ - DomWidget *ui_widget = createDom(widget, 0); - Q_ASSERT( ui_widget != 0 ); - - DomUI *ui = new DomUI(); - ui->setAttributeVersion(QLatin1String("4.0")); - ui->setElementWidget(ui_widget); - - saveDom(ui, widget); - - QXmlStreamWriter writer(dev); - writer.setAutoFormatting(true); - writer.setAutoFormattingIndent(1); - writer.writeStartDocument(); - ui->write(writer); - writer.writeEndDocument(); - - d->m_laidout.clear(); - - delete ui; -} - -/*! - \internal -*/ -void QAbstractFormBuilder::saveDom(DomUI *ui, QWidget *widget) -{ - ui->setElementClass(widget->objectName()); - - if (DomConnections *ui_connections = saveConnections()) { - ui->setElementConnections(ui_connections); - } - - if (DomCustomWidgets *ui_customWidgets = saveCustomWidgets()) { - ui->setElementCustomWidgets(ui_customWidgets); - } - - if (DomTabStops *ui_tabStops = saveTabStops()) { - ui->setElementTabStops(ui_tabStops); - } - - if (DomResources *ui_resources = saveResources()) { - ui->setElementResources(ui_resources); - } - if (DomButtonGroups *ui_buttonGroups = saveButtonGroups(widget)) - ui->setElementButtonGroups(ui_buttonGroups); -} - -/*! - \internal -*/ -DomConnections *QAbstractFormBuilder::saveConnections() -{ - return new DomConnections; -} - -/*! - \internal -*/ - -DomWidget *QAbstractFormBuilder::createDom(QWidget *widget, DomWidget *ui_parentWidget, bool recursive) -{ - DomWidget *ui_widget = new DomWidget(); - ui_widget->setAttributeClass(QLatin1String(widget->metaObject()->className())); - ui_widget->setElementProperty(computeProperties(widget)); - - if (recursive) { - if (QLayout *layout = widget->layout()) { - if (DomLayout *ui_layout = createDom(layout, 0, ui_parentWidget)) { - QList ui_layouts; - ui_layouts.append(ui_layout); - - ui_widget->setElementLayout(ui_layouts); - } - } - } - - // widgets, actions and action groups - QList ui_widgets; - QList ui_actions; - QList ui_action_groups; - - QList children; - - // splitters need to store their children in the order specified by child indexes, - // not the order of the child list. -#ifndef QT_NO_SPLITTER - if (const QSplitter *splitter = qobject_cast(widget)) { - const int count = splitter->count(); - for (int i = 0; i < count; ++i) - children.append(splitter->widget(i)); - } else -#endif - { - QList childObjects = widget->children(); - - const QList list = qvariant_cast(widget->property("_q_widgetOrder")); - foreach (QWidget *w, list) { - if (childObjects.contains(w)) { - children.append(w); - childObjects.removeAll(w); - } - } - children += childObjects; - - const QList zOrder = qvariant_cast(widget->property("_q_zOrder")); - if (list != zOrder) { - QStringList zOrderList; - QListIterator itZOrder(zOrder); - while (itZOrder.hasNext()) - zOrderList.append(itZOrder.next()->objectName()); - ui_widget->setElementZOrder(zOrderList); - } - } - - foreach (QObject *obj, children) { - if (QWidget *childWidget = qobject_cast(obj)) { - if (d->m_laidout.contains(childWidget) || recursive == false) - continue; - - if (QMenu *menu = qobject_cast(childWidget)) { - QList actions = menu->parentWidget()->actions(); - QListIterator it(actions); - bool found = false; - while (it.hasNext()) { - if (it.next()->menu() == menu) - found = true; - } - if (!found) - continue; - } - - if (DomWidget *ui_child = createDom(childWidget, ui_widget)) { - ui_widgets.append(ui_child); - } - } else if (QAction *childAction = qobject_cast(obj)) { - if (childAction->actionGroup() != 0) { - // it will be added later. - continue; - } - - if (DomAction *ui_action = createDom(childAction)) { - ui_actions.append(ui_action); - } - } else if (QActionGroup *childActionGroup = qobject_cast(obj)) { - if (DomActionGroup *ui_action_group = createDom(childActionGroup)) { - ui_action_groups.append(ui_action_group); - } - } - } - - // add-action - QList ui_action_refs; - foreach (QAction *action, widget->actions()) { - if (DomActionRef *ui_action_ref = createActionRefDom(action)) { - ui_action_refs.append(ui_action_ref); - } - } - - if (recursive) - ui_widget->setElementWidget(ui_widgets); - - ui_widget->setElementAction(ui_actions); - ui_widget->setElementActionGroup(ui_action_groups); - ui_widget->setElementAddAction(ui_action_refs); - - saveExtraInfo(widget, ui_widget, ui_parentWidget); - - return ui_widget; -} - -/*! - \internal -*/ -DomActionRef *QAbstractFormBuilder::createActionRefDom(QAction *action) -{ - QString name = action->objectName(); - - if (action->menu() != 0) - name = action->menu()->objectName(); - - DomActionRef *ui_action_ref = new DomActionRef(); - if (action->isSeparator()) - ui_action_ref->setAttributeName(QFormBuilderStrings::instance().separator); - else - ui_action_ref->setAttributeName(name); - - return ui_action_ref; -} - -// Struct to store layout item parameters for saving layout items -struct FormBuilderSaveLayoutEntry { - explicit FormBuilderSaveLayoutEntry(QLayoutItem *li = 0) : - item(li), row(-1), column(-1), rowSpan(0), columnSpan(0), alignment(0) {} - - QLayoutItem *item; - int row; - int column; - int rowSpan; - int columnSpan; - Qt::Alignment alignment; -}; - -// Create list from standard box layout -static QList saveLayoutEntries(const QLayout *layout) -{ - QList rc; - if (const int count = layout->count()) { - rc.reserve(count); - for (int idx = 0; idx < count; ++idx) { - QLayoutItem *item = layout->itemAt(idx); - FormBuilderSaveLayoutEntry entry(item); - entry.alignment = item->alignment(); - rc.append(entry); - } - } - return rc; -} - -// Create list from grid layout -static QList saveGridLayoutEntries(QGridLayout *gridLayout) -{ - QList rc; - if (const int count = gridLayout->count()) { - rc.reserve(count); - for (int idx = 0; idx < count; ++idx) { - QLayoutItem *item = gridLayout->itemAt(idx); - FormBuilderSaveLayoutEntry entry(item); - gridLayout->getItemPosition(idx, &entry.row, &entry.column, &entry.rowSpan,&entry.columnSpan); - entry.alignment = item->alignment(); - rc.append(entry); - } - } - return rc; -} - -#ifndef QT_NO_FORMLAYOUT -// Create list from form layout -static QList saveFormLayoutEntries(const QFormLayout *formLayout) -{ - QList rc; - if (const int count = formLayout->count()) { - rc.reserve(count); - for (int idx = 0; idx < count; ++idx) { - QLayoutItem *item = formLayout->itemAt(idx); - QFormLayout::ItemRole role = QFormLayout::LabelRole; - FormBuilderSaveLayoutEntry entry(item); - formLayout->getItemPosition(idx, &entry.row, &role); - switch (role ) { - case QFormLayout::LabelRole: - entry.column = 0; - break; - case QFormLayout::FieldRole: - entry.column = 1; - break; - case QFormLayout::SpanningRole: - entry.column = 0; - entry.columnSpan = 2; - break; - } - rc.push_back(entry); - } - } - return rc; -} -#endif - -/*! - \internal -*/ - -DomLayout *QAbstractFormBuilder::createDom(QLayout *layout, DomLayout *ui_layout, DomWidget *ui_parentWidget) -{ - Q_UNUSED(ui_layout) - DomLayout *lay = new DomLayout(); - lay->setAttributeClass(QLatin1String(layout->metaObject()->className())); - const QString objectName = layout->objectName(); - if (!objectName.isEmpty()) - lay->setAttributeName(objectName); - lay->setElementProperty(computeProperties(layout)); - - QList newList; - if (QGridLayout *gridLayout = qobject_cast(layout)) { - newList = saveGridLayoutEntries(gridLayout); -#ifndef QT_NO_FORMLAYOUT - } else if (const QFormLayout *formLayout = qobject_cast(layout)) { - newList = saveFormLayoutEntries(formLayout); -#endif - } else { - newList = saveLayoutEntries(layout); - } - - QList ui_items; - foreach (const FormBuilderSaveLayoutEntry &item, newList) { - if (DomLayoutItem *ui_item = createDom(item.item, lay, ui_parentWidget)) { - if (item.row >= 0) - ui_item->setAttributeRow(item.row); - if (item.column >= 0) - ui_item->setAttributeColumn(item.column); - if (item.rowSpan > 1) - ui_item->setAttributeRowSpan(item.rowSpan); - if (item.columnSpan > 1) - ui_item->setAttributeColSpan(item.columnSpan); - if (item.alignment) - ui_item->setAttributeAlignment(alignmentValue(item.alignment)); - ui_items.append(ui_item); - } - } - - lay->setElementItem(ui_items); - - return lay; -} - -/*! - \internal -*/ -DomLayoutItem *QAbstractFormBuilder::createDom(QLayoutItem *item, DomLayout *ui_layout, DomWidget *ui_parentWidget) -{ - DomLayoutItem *ui_item = new DomLayoutItem(); - - if (item->widget()) { - ui_item->setElementWidget(createDom(item->widget(), ui_parentWidget)); - d->m_laidout.insert(item->widget(), true); - } else if (item->layout()) { - ui_item->setElementLayout(createDom(item->layout(), ui_layout, ui_parentWidget)); - } else if (item->spacerItem()) { - ui_item->setElementSpacer(createDom(item->spacerItem(), ui_layout, ui_parentWidget)); - } - - return ui_item; -} - -/*! - \internal -*/ -DomSpacer *QAbstractFormBuilder::createDom(QSpacerItem *spacer, DomLayout *ui_layout, DomWidget *ui_parentWidget) -{ - Q_UNUSED(ui_layout); - Q_UNUSED(ui_parentWidget); - - DomSpacer *ui_spacer = new DomSpacer(); - QList properties; - - DomProperty *prop = 0; - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - // sizeHint property - prop = new DomProperty(); - prop->setAttributeName(strings.sizeHintProperty); - prop->setElementSize(new DomSize()); - prop->elementSize()->setElementWidth(spacer->sizeHint().width()); - prop->elementSize()->setElementHeight(spacer->sizeHint().height()); - properties.append(prop); - - // orientation property - prop = new DomProperty(); // ### we don't implemented the case where expandingDirections() is both Vertical and Horizontal - prop->setAttributeName(strings.orientationProperty); - prop->setElementEnum((spacer->expandingDirections() & Qt::Horizontal) ? strings.qtHorizontal : strings.qtVertical); - properties.append(prop); - - ui_spacer->setElementProperty(properties); - return ui_spacer; -} - -/*! - \internal -*/ -DomProperty *QAbstractFormBuilder::createProperty(QObject *obj, const QString &pname, const QVariant &v) -{ - if (!checkProperty(obj, pname)) { - return 0; - } - return variantToDomProperty(this, obj->metaObject(), pname, v); -} - -/*! - \internal -*/ -QList QAbstractFormBuilder::computeProperties(QObject *obj) -{ - QList lst; - - const QMetaObject *meta = obj->metaObject(); - - QHash properties; - const int propertyCount = meta->propertyCount(); - for(int i=0; i < propertyCount; ++i) - properties.insert(meta->property(i).name(), true); - - const QList propertyNames = properties.keys(); - - const int propertyNamesCount = propertyNames.size(); - for(int i=0; iproperty(meta->indexOfProperty(pname.toUtf8())); - - if (!prop.isWritable() || !checkProperty(obj, QLatin1String(prop.name()))) - continue; - - const QVariant v = prop.read(obj); - - DomProperty *dom_prop = 0; - if (v.type() == QVariant::Int) { - dom_prop = new DomProperty(); - - if (prop.isFlagType()) - uiLibWarning(QCoreApplication::translate("QAbstractFormBuilder", "Flags property are not supported yet.")); - - if (prop.isEnumType()) { - QString scope = QString::fromUtf8(prop.enumerator().scope()); - if (scope.size()) - scope += QString::fromUtf8("::"); - const QString e = QString::fromUtf8(prop.enumerator().valueToKey(v.toInt())); - if (e.size()) - dom_prop->setElementEnum(scope + e); - } else - dom_prop->setElementNumber(v.toInt()); - dom_prop->setAttributeName(pname); - } else { - dom_prop = createProperty(obj, pname, v); - } - - if (!dom_prop || dom_prop->kind() == DomProperty::Unknown) - delete dom_prop; - else - lst.append(dom_prop); - } - - return lst; -} - - -/*! - \internal - \typedef QAbstractFormBuilder::DomPropertyHash - \typedef QAbstractFormBuilder::IconPaths -*/ - - -/*! - \internal -*/ -QAbstractFormBuilder::DomPropertyHash QAbstractFormBuilder::propertyMap(const QList &properties) -{ - DomPropertyHash map; - - foreach (DomProperty *p, properties) - map.insert(p->attributeName(), p); - - return map; -} - -/*! - \internal -*/ -bool QAbstractFormBuilder::checkProperty(QObject *obj, const QString &prop) const -{ - Q_UNUSED(obj); - Q_UNUSED(prop); - - return true; -} - -/*! - \internal -*/ -QString QAbstractFormBuilder::toString(const DomString *str) -{ - return str ? str->text() : QString(); -} - -/*! - \internal -*/ -void QAbstractFormBuilder::applyTabStops(QWidget *widget, DomTabStops *tabStops) -{ - if (!tabStops) - return; - - QWidget *lastWidget = 0; - - const QStringList l = tabStops->elementTabStop(); - for (int i=0; ifindChild(name); - if (!child) { - uiLibWarning(QCoreApplication::translate("QAbstractFormBuilder", "While applying tab stops: The widget '%1' could not be found.").arg(name)); - continue; - } - - if (i == 0) { - lastWidget = widget->findChild(name); - continue; - } else if (!child || !lastWidget) { - continue; - } - - QWidget::setTabOrder(lastWidget, child); - - lastWidget = widget->findChild(name); - } -} - -/*! - \internal -*/ -DomCustomWidgets *QAbstractFormBuilder::saveCustomWidgets() -{ - return 0; -} - -/*! - \internal -*/ -DomTabStops *QAbstractFormBuilder::saveTabStops() -{ - return 0; -} - -/*! - \internal -*/ -DomResources *QAbstractFormBuilder::saveResources() -{ - return 0; -} - -/*! - \internal - \since 4.5 -*/ - -DomButtonGroups *QAbstractFormBuilder::saveButtonGroups(const QWidget *mainContainer) -{ - // Save fst order buttongroup children of maincontainer - typedef QList ButtonGroupList; - const QObjectList mchildren = mainContainer->children(); - if (mchildren.empty()) - return 0; - QList domGroups; - const QObjectList::const_iterator cend = mchildren.constEnd(); - for (QObjectList::const_iterator it = mchildren.constBegin(); it != cend; ++it) - if (QButtonGroup *bg = qobject_cast(*it)) - if (DomButtonGroup* dg = createDom(bg)) - domGroups.push_back(dg); - - if (domGroups.empty()) - return 0; - DomButtonGroups *rc = new DomButtonGroups; - rc->setElementButtonGroup(domGroups); - return rc; -} - -// VC6 would not find templated members, so we use statics and this utter hack. -class FriendlyFB : public QAbstractFormBuilder { -public: - using QAbstractFormBuilder::saveResource; - using QAbstractFormBuilder::saveText; - using QAbstractFormBuilder::resourceBuilder; - using QAbstractFormBuilder::textBuilder; - using QAbstractFormBuilder::toVariant; -}; - -template -static void storeItemFlags(const T *item, QList *properties) -{ - static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - static const Qt::ItemFlags defaultFlags = T().flags(); - static const QMetaEnum itemFlags_enum = metaEnum("itemFlags"); - - if (item->flags() != defaultFlags) { - DomProperty *p = new DomProperty; - p->setAttributeName(strings.flagsAttribute); - p->setElementSet(QString::fromAscii(itemFlags_enum.valueToKeys(item->flags()))); - properties->append(p); - } -} - -#ifndef Q_CC_RVCT -// RVCT does not accept static inline functions if one argument is templated type -// For this reason all necessary function variants are explicityly written for it. -template -static void storeItemProps(QAbstractFormBuilder *abstractFormBuilder, const T *item, - QList *properties) -{ - static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - FriendlyFB * const formBuilder = static_cast(abstractFormBuilder); - - DomProperty *p; - QVariant v; - - foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles) - if ((p = formBuilder->saveText(it.second, item->data(it.first.second)))) - properties->append(p); - - foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles) - if ((v = item->data(it.first)).isValid() && - (p = variantToDomProperty(abstractFormBuilder, - static_cast(&QAbstractFormBuilderGadget::staticMetaObject), - it.second, v))) - properties->append(p); - - if ((p = formBuilder->saveResource(item->data(Qt::DecorationPropertyRole)))) - properties->append(p); -} - -template -static void storeItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, const T *item, - QList *properties) -{ - storeItemProps(abstractFormBuilder, item, properties); - storeItemFlags(item, properties); -} - -template -static void loadItemProps(QAbstractFormBuilder *abstractFormBuilder, T *item, - const QHash &properties) -{ - static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - FriendlyFB * const formBuilder = static_cast(abstractFormBuilder); - - DomProperty *p; - QVariant v; - - foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles) - if ((p = properties.value(it.second))) { - v = formBuilder->textBuilder()->loadText(p); - QVariant nativeValue = formBuilder->textBuilder()->toNativeValue(v); - item->setData(it.first.first, qvariant_cast(nativeValue)); - item->setData(it.first.second, v); - } - - foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles) - if ((p = properties.value(it.second)) && - (v = formBuilder->toVariant(&QAbstractFormBuilderGadget::staticMetaObject, p)).isValid()) - item->setData(it.first, v); - - if ((p = properties.value(strings.iconAttribute))) { - v = formBuilder->resourceBuilder()->loadResource(formBuilder->workingDirectory(), p); - QVariant nativeValue = formBuilder->resourceBuilder()->toNativeValue(v); - item->setIcon(qvariant_cast(nativeValue)); - item->setData(Qt::DecorationPropertyRole, v); - } -} - -template -static void loadItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, T *item, - const QHash &properties) -{ - static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - static const QMetaEnum itemFlags_enum = metaEnum("itemFlags"); - - loadItemProps(abstractFormBuilder, item, properties); - - DomProperty *p; - if ((p = properties.value(strings.flagsAttribute)) && p->kind() == DomProperty::Set) - item->setFlags(enumKeysToValue(itemFlags_enum, p->elementSet().toAscii())); -} - -#else - -static void storeItemProps(QAbstractFormBuilder *abstractFormBuilder, const QTableWidgetItem *item, - QList *properties) -{ - static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - FriendlyFB * const formBuilder = static_cast(abstractFormBuilder); - - DomProperty *p; - QVariant v; - - foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles) - if ((p = formBuilder->saveText(it.second, item->data(it.first.second)))) - properties->append(p); - - foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles) - if ((v = item->data(it.first)).isValid() && - (p = variantToDomProperty(abstractFormBuilder, - static_cast(&QAbstractFormBuilderGadget::staticMetaObject), - it.second, v))) - properties->append(p); - - if ((p = formBuilder->saveResource(item->data(Qt::DecorationPropertyRole)))) - properties->append(p); -} - -static void storeItemProps(QAbstractFormBuilder *abstractFormBuilder, const QListWidgetItem *item, - QList *properties) -{ - static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - FriendlyFB * const formBuilder = static_cast(abstractFormBuilder); - - DomProperty *p; - QVariant v; - - foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles) - if ((p = formBuilder->saveText(it.second, item->data(it.first.second)))) - properties->append(p); - - foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles) - if ((v = item->data(it.first)).isValid() && - (p = variantToDomProperty(abstractFormBuilder, - static_cast(&QAbstractFormBuilderGadget::staticMetaObject), - it.second, v))) - properties->append(p); - - if ((p = formBuilder->saveResource(item->data(Qt::DecorationPropertyRole)))) - properties->append(p); -} - -static void storeItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, const QTableWidgetItem *item, - QList *properties) -{ - storeItemProps(abstractFormBuilder, item, properties); - storeItemFlags(item, properties); -} - -static void storeItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, const QListWidgetItem *item, - QList *properties) -{ - storeItemProps(abstractFormBuilder, item, properties); - storeItemFlags(item, properties); -} - -static void loadItemProps(QAbstractFormBuilder *abstractFormBuilder, QTableWidgetItem *item, - const QHash &properties) -{ - static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - FriendlyFB * const formBuilder = static_cast(abstractFormBuilder); - - DomProperty *p; - QVariant v; - - foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles) - if ((p = properties.value(it.second))) { - v = formBuilder->textBuilder()->loadText(p); - QVariant nativeValue = formBuilder->textBuilder()->toNativeValue(v); - item->setData(it.first.first, qvariant_cast(nativeValue)); - item->setData(it.first.second, v); - } - - foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles) - if ((p = properties.value(it.second)) && - (v = formBuilder->toVariant(&QAbstractFormBuilderGadget::staticMetaObject, p)).isValid()) - item->setData(it.first, v); - - if ((p = properties.value(strings.iconAttribute))) { - v = formBuilder->resourceBuilder()->loadResource(formBuilder->workingDirectory(), p); - QVariant nativeValue = formBuilder->resourceBuilder()->toNativeValue(v); - item->setIcon(qvariant_cast(nativeValue)); - item->setData(Qt::DecorationPropertyRole, v); - } -} - -static void loadItemProps(QAbstractFormBuilder *abstractFormBuilder, QListWidgetItem *item, - const QHash &properties) -{ - static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - FriendlyFB * const formBuilder = static_cast(abstractFormBuilder); - - DomProperty *p; - QVariant v; - - foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles) - if ((p = properties.value(it.second))) { - v = formBuilder->textBuilder()->loadText(p); - QVariant nativeValue = formBuilder->textBuilder()->toNativeValue(v); - item->setData(it.first.first, qvariant_cast(nativeValue)); - item->setData(it.first.second, v); - } - - foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles) - if ((p = properties.value(it.second)) && - (v = formBuilder->toVariant(&QAbstractFormBuilderGadget::staticMetaObject, p)).isValid()) - item->setData(it.first, v); - - if ((p = properties.value(strings.iconAttribute))) { - v = formBuilder->resourceBuilder()->loadResource(formBuilder->workingDirectory(), p); - QVariant nativeValue = formBuilder->resourceBuilder()->toNativeValue(v); - item->setIcon(qvariant_cast(nativeValue)); - item->setData(Qt::DecorationPropertyRole, v); - } -} - -static void loadItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, QTableWidgetItem *item, - const QHash &properties) -{ - static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - static const QMetaEnum itemFlags_enum = metaEnum("itemFlags"); - - loadItemProps(abstractFormBuilder, item, properties); - - DomProperty *p; - if ((p = properties.value(strings.flagsAttribute)) && p->kind() == DomProperty::Set) - item->setFlags(enumKeysToValue(itemFlags_enum, p->elementSet().toAscii())); -} - -static void loadItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, QListWidgetItem *item, - const QHash &properties) -{ - static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - static const QMetaEnum itemFlags_enum = metaEnum("itemFlags"); - - loadItemProps(abstractFormBuilder, item, properties); - - DomProperty *p; - if ((p = properties.value(strings.flagsAttribute)) && p->kind() == DomProperty::Set) - item->setFlags(enumKeysToValue(itemFlags_enum, p->elementSet().toAscii())); -} - -#endif - -/*! - \internal -*/ -void QAbstractFormBuilder::saveTreeWidgetExtraInfo(QTreeWidget *treeWidget, DomWidget *ui_widget, DomWidget *ui_parentWidget) -{ - Q_UNUSED(ui_parentWidget); - - QList columns; - DomProperty *p; - QVariant v; - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - // save the header - for (int c = 0; ccolumnCount(); ++c) { - DomColumn *column = new DomColumn; - - QList properties; - - foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles) { - p = saveText(it.second, treeWidget->headerItem()->data(c, it.first.second)); - // Prevent uic 4.4.X from crashing if it cannot find a column text - if (!p && it.first.first == Qt::EditRole && it.second == QLatin1String("text")) { - DomString *defaultHeader = new DomString; - defaultHeader->setText(QString::number(c + 1)); - defaultHeader->setAttributeNotr(QLatin1String("true")); - p = new DomProperty; - p->setAttributeName(it.second); - p->setElementString(defaultHeader); - } - if (p) - properties.append(p); - } - - foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles) - if ((v = treeWidget->headerItem()->data(c, it.first)).isValid() && - (p = variantToDomProperty(this, &QAbstractFormBuilderGadget::staticMetaObject, it.second, v))) - properties.append(p); - - if ((p = saveResource(treeWidget->headerItem()->data(c, Qt::DecorationPropertyRole)))) - properties.append(p); - - column->setElementProperty(properties); - columns.append(column); - } - - ui_widget->setElementColumn(columns); - - QList items = ui_widget->elementItem(); - - QQueue > pendingQueue; - for (int i = 0; i < treeWidget->topLevelItemCount(); i++) - pendingQueue.enqueue(qMakePair(treeWidget->topLevelItem(i), (DomItem *)0)); - - while (!pendingQueue.isEmpty()) { - const QPair pair = pendingQueue.dequeue(); - QTreeWidgetItem *item = pair.first; - DomItem *parentDomItem = pair.second; - - DomItem *currentDomItem = new DomItem; - - QList properties; - for (int c = 0; c < treeWidget->columnCount(); c++) { - foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles) - if ((p = saveText(it.second, item->data(c, it.first.second)))) - properties.append(p); - - foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles) - if ((v = item->data(c, it.first)).isValid() && - (p = variantToDomProperty(this, &QAbstractFormBuilderGadget::staticMetaObject, it.second, v))) - properties.append(p); - - if ((p = saveResource(item->data(c, Qt::DecorationPropertyRole)))) - properties.append(p); - } - storeItemFlags(item, &properties); - currentDomItem->setElementProperty(properties); - - if (parentDomItem) { - QList childrenItems = parentDomItem->elementItem(); - childrenItems.append(currentDomItem); - parentDomItem->setElementItem(childrenItems); - } else - items.append(currentDomItem); - - for (int i = 0; i < item->childCount(); i++) - pendingQueue.enqueue(qMakePair(item->child(i), currentDomItem)); - } - - ui_widget->setElementItem(items); -} - -/*! - \internal -*/ -void QAbstractFormBuilder::saveTableWidgetExtraInfo(QTableWidget *tableWidget, DomWidget *ui_widget, DomWidget *ui_parentWidget) -{ - Q_UNUSED(ui_parentWidget); - - // save the horizontal header - QList columns; - for (int c = 0; c < tableWidget->columnCount(); c++) { - QList properties; - QTableWidgetItem *item = tableWidget->horizontalHeaderItem(c); - if (item) - storeItemProps(this, item, &properties); - - DomColumn *column = new DomColumn; - column->setElementProperty(properties); - columns.append(column); - } - ui_widget->setElementColumn(columns); - - // save the vertical header - QList rows; - for (int r = 0; r < tableWidget->rowCount(); r++) { - QList properties; - QTableWidgetItem *item = tableWidget->verticalHeaderItem(r); - if (item) - storeItemProps(this, item, &properties); - - DomRow *row = new DomRow; - row->setElementProperty(properties); - rows.append(row); - } - ui_widget->setElementRow(rows); - - QList items = ui_widget->elementItem(); - for (int r = 0; r < tableWidget->rowCount(); r++) - for (int c = 0; c < tableWidget->columnCount(); c++) { - QTableWidgetItem *item = tableWidget->item(r, c); - if (item) { - QList properties; - storeItemPropsNFlags(this, item, &properties); - - DomItem *domItem = new DomItem; - domItem->setAttributeRow(r); - domItem->setAttributeColumn(c); - domItem->setElementProperty(properties); - items.append(domItem); - } - } - - ui_widget->setElementItem(items); -} - -/*! - \internal -*/ -void QAbstractFormBuilder::saveListWidgetExtraInfo(QListWidget *listWidget, DomWidget *ui_widget, DomWidget *ui_parentWidget) -{ - Q_UNUSED(ui_parentWidget); - - QList ui_items = ui_widget->elementItem(); - for (int i=0; icount(); ++i) { - QList properties; - storeItemPropsNFlags(this, listWidget->item(i), &properties); - - DomItem *ui_item = new DomItem(); - ui_item->setElementProperty(properties); - ui_items.append(ui_item); - } - - ui_widget->setElementItem(ui_items); -} - -/*! - \internal -*/ -void QAbstractFormBuilder::saveComboBoxExtraInfo(QComboBox *comboBox, DomWidget *ui_widget, DomWidget *ui_parentWidget) -{ - Q_UNUSED(ui_parentWidget); - QList ui_items = ui_widget->elementItem(); - - const int count = comboBox->count(); - for (int i=0; i < count; ++i) { - // We might encounter items for which both builders return 0 in Designer - // (indicating a custom combo adding items in the constructor). Ignore those. - DomProperty *textProperty = saveText(QFormBuilderStrings::instance().textAttribute, - comboBox->itemData(i, Qt::DisplayPropertyRole)); - DomProperty *iconProperty = saveResource(comboBox->itemData(i, Qt::DecorationPropertyRole)); - if (textProperty || iconProperty) { - QList properties; - if (textProperty) - properties.push_back(textProperty); - if (iconProperty) - properties.push_back(iconProperty); - - DomItem *ui_item = new DomItem(); - ui_item->setElementProperty(properties); - ui_items.push_back(ui_item); - } - } - - ui_widget->setElementItem(ui_items); -} - -/*! - \internal - \since 4.5 -*/ - -void QAbstractFormBuilder::saveButtonExtraInfo(const QAbstractButton *widget, DomWidget *ui_widget, DomWidget *) -{ - typedef QList DomPropertyList; - if (const QButtonGroup *buttonGroup = widget->group()) { - DomPropertyList attributes = ui_widget->elementAttribute(); - DomString *domString = new DomString(); - domString->setText(buttonGroup->objectName()); - domString->setAttributeNotr(QLatin1String("true")); - DomProperty *domProperty = new DomProperty(); - domProperty->setAttributeName(QLatin1String(buttonGroupPropertyC)); - domProperty->setElementString(domString); - attributes += domProperty; - ui_widget->setElementAttribute(attributes); - } -} - -/*! - \internal - \since 4.5 -*/ -void QAbstractFormBuilder::saveItemViewExtraInfo(const QAbstractItemView *itemView, - DomWidget *ui_widget, DomWidget *) -{ - // - // Special handling for qtableview/qtreeview fake header attributes - // - static QStringList realPropertyNames = - (QStringList() << QLatin1String("visible") - << QLatin1String("cascadingSectionResizes") - << QLatin1String("defaultSectionSize") - << QLatin1String("highlightSections") - << QLatin1String("minimumSectionSize") - << QLatin1String("showSortIndicator") - << QLatin1String("stretchLastSection")); - - if (const QTreeView *treeView = qobject_cast(itemView)) { - QList viewProperties = ui_widget->elementAttribute(); - QList headerProperties = computeProperties(treeView->header()); - foreach (const QString &realPropertyName, realPropertyNames) { - const QString upperPropertyName = realPropertyName.at(0).toUpper() - + realPropertyName.mid(1); - const QString fakePropertyName = QLatin1String("header") + upperPropertyName; - foreach (DomProperty *property, headerProperties) { - if (property->attributeName() == realPropertyName) { - property->setAttributeName(fakePropertyName); - viewProperties << property; - } - } - } - ui_widget->setElementAttribute(viewProperties); - } else if (const QTableView *tableView = qobject_cast(itemView)) { - static QStringList headerPrefixes = - (QStringList() << QLatin1String("horizontalHeader") - << QLatin1String("verticalHeader")); - - QList viewProperties = ui_widget->elementAttribute(); - foreach (const QString &headerPrefix, headerPrefixes) { - QList headerProperties; - if (headerPrefix == QLatin1String("horizontalHeader")) - headerProperties = computeProperties(tableView->horizontalHeader()); - else - headerProperties = computeProperties(tableView->verticalHeader()); - foreach (const QString &realPropertyName, realPropertyNames) { - const QString upperPropertyName = realPropertyName.at(0).toUpper() - + realPropertyName.mid(1); - const QString fakePropertyName = headerPrefix + upperPropertyName; - foreach (DomProperty *property, headerProperties) { - if (property->attributeName() == realPropertyName) { - property->setAttributeName(fakePropertyName); - viewProperties << property; - } - } - } - } - ui_widget->setElementAttribute(viewProperties); - } -} - -/*! - \internal - \since 4.4 -*/ - -void QAbstractFormBuilder::setResourceBuilder(QResourceBuilder *builder) -{ - d->setResourceBuilder(builder); -} - -/*! - \internal - \since 4.4 -*/ - -QResourceBuilder *QAbstractFormBuilder::resourceBuilder() const -{ - return d->resourceBuilder(); -} - -/*! - \internal - \since 4.5 -*/ - -void QAbstractFormBuilder::setTextBuilder(QTextBuilder *builder) -{ - d->setTextBuilder(builder); -} - -/*! - \internal - \since 4.5 -*/ - -QTextBuilder *QAbstractFormBuilder::textBuilder() const -{ - return d->textBuilder(); -} - -/*! - \internal -*/ -void QAbstractFormBuilder::saveExtraInfo(QWidget *widget, DomWidget *ui_widget, - DomWidget *ui_parentWidget) -{ - if (QListWidget *listWidget = qobject_cast(widget)) { - saveListWidgetExtraInfo(listWidget, ui_widget, ui_parentWidget); - } else if (QTreeWidget *treeWidget = qobject_cast(widget)) { - saveTreeWidgetExtraInfo(treeWidget, ui_widget, ui_parentWidget); - } else if (QTableWidget *tableWidget = qobject_cast(widget)) { - saveTableWidgetExtraInfo(tableWidget, ui_widget, ui_parentWidget); - } else if (QComboBox *comboBox = qobject_cast(widget)) { - if (!qobject_cast(widget)) - saveComboBoxExtraInfo(comboBox, ui_widget, ui_parentWidget); - } else if(QAbstractButton *ab = qobject_cast(widget)) { - saveButtonExtraInfo(ab, ui_widget, ui_parentWidget); - } - if (QAbstractItemView *itemView = qobject_cast(widget)) { - saveItemViewExtraInfo(itemView, ui_widget, ui_parentWidget); - } -} - -/*! - \internal -*/ -void QAbstractFormBuilder::loadListWidgetExtraInfo(DomWidget *ui_widget, QListWidget *listWidget, QWidget *parentWidget) -{ - Q_UNUSED(parentWidget); - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - const QMetaEnum itemFlags_enum = metaEnum("itemFlags"); - - foreach (DomItem *ui_item, ui_widget->elementItem()) { - const DomPropertyHash properties = propertyMap(ui_item->elementProperty()); - QListWidgetItem *item = new QListWidgetItem(listWidget); -#ifndef Q_CC_RVCT - loadItemPropsNFlags(this, item, properties); -#else - loadItemPropsNFlags(this, item, properties); -#endif - } - - DomProperty *currentRow = propertyMap(ui_widget->elementProperty()).value(strings.currentRowProperty); - if (currentRow) - listWidget->setCurrentRow(currentRow->elementNumber()); -} - -/*! - \internal -*/ -void QAbstractFormBuilder::loadTreeWidgetExtraInfo(DomWidget *ui_widget, QTreeWidget *treeWidget, QWidget *parentWidget) -{ - Q_UNUSED(parentWidget); - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - const QMetaEnum itemFlags_enum = metaEnum("itemFlags"); - const QList columns = ui_widget->elementColumn(); - if (columns.count() > 0) - treeWidget->setColumnCount(columns.count()); - - for (int i = 0; ielementProperty()); - - DomProperty *p; - QVariant v; - - foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles) - if ((p = properties.value(it.second)) && - (v = toVariant(&QAbstractFormBuilderGadget::staticMetaObject, p)).isValid()) - treeWidget->headerItem()->setData(i, it.first, v); - - foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles) - if ((p = properties.value(it.second))) { - v = textBuilder()->loadText(p); - QVariant nativeValue = textBuilder()->toNativeValue(v); - treeWidget->headerItem()->setData(i, it.first.first, qvariant_cast(nativeValue)); - treeWidget->headerItem()->setData(i, it.first.second, v); - } - - if ((p = properties.value(strings.iconAttribute))) { - v = resourceBuilder()->loadResource(workingDirectory(), p); - QVariant nativeValue = resourceBuilder()->toNativeValue(v); - treeWidget->headerItem()->setIcon(i, qvariant_cast(nativeValue)); - treeWidget->headerItem()->setData(i, Qt::DecorationPropertyRole, v); - } - } - - QQueue > pendingQueue; - foreach (DomItem *ui_item, ui_widget->elementItem()) - pendingQueue.enqueue(qMakePair(ui_item, (QTreeWidgetItem *)0)); - - while (!pendingQueue.isEmpty()) { - const QPair pair = pendingQueue.dequeue(); - const DomItem *domItem = pair.first; - QTreeWidgetItem *parentItem = pair.second; - - QTreeWidgetItem *currentItem = 0; - - if (parentItem) - currentItem = new QTreeWidgetItem(parentItem); - else - currentItem = new QTreeWidgetItem(treeWidget); - - const QList properties = domItem->elementProperty(); - int col = -1; - foreach (DomProperty *property, properties) { - if (property->attributeName() == strings.flagsAttribute && !property->elementSet().isEmpty()) { - currentItem->setFlags(enumKeysToValue(itemFlags_enum, property->elementSet().toAscii())); - } else if (property->attributeName() == strings.textAttribute && property->elementString()) { - col++; - QVariant textV = textBuilder()->loadText(property); - QVariant nativeValue = textBuilder()->toNativeValue(textV); - currentItem->setText(col, qvariant_cast(nativeValue)); - currentItem->setData(col, Qt::DisplayPropertyRole, textV); - } else if (col >= 0) { - if (property->attributeName() == strings.iconAttribute) { - QVariant v = resourceBuilder()->loadResource(workingDirectory(), property); - if (v.isValid()) { - QVariant nativeValue = resourceBuilder()->toNativeValue(v); - currentItem->setIcon(col, qvariant_cast(nativeValue)); - currentItem->setData(col, Qt::DecorationPropertyRole, v); - } - } else { - QVariant v; - int role = strings.treeItemRoleHash.value(property->attributeName(), (Qt::ItemDataRole)-1); - if (role >= 0) { - if ((v = toVariant(&QAbstractFormBuilderGadget::staticMetaObject, property)).isValid()) - currentItem->setData(col, role, v); - } else { - QPair rolePair = - strings.treeItemTextRoleHash.value(property->attributeName(), - qMakePair((Qt::ItemDataRole)-1, (Qt::ItemDataRole)-1)); - if (rolePair.first >= 0) { - QVariant textV = textBuilder()->loadText(property); - QVariant nativeValue = textBuilder()->toNativeValue(textV); - currentItem->setData(col, rolePair.first, qvariant_cast(nativeValue)); - currentItem->setData(col, rolePair.second, textV); - } - } - } - } - } - - foreach (DomItem *childItem, domItem->elementItem()) - pendingQueue.enqueue(qMakePair(childItem, currentItem)); - - } -} - -/*! - \internal -*/ -void QAbstractFormBuilder::loadTableWidgetExtraInfo(DomWidget *ui_widget, QTableWidget *tableWidget, QWidget *parentWidget) -{ - Q_UNUSED(parentWidget); - - const QList columns = ui_widget->elementColumn(); - if (columns.count() > 0) - tableWidget->setColumnCount(columns.count()); - for (int i = 0; i< columns.count(); i++) { - DomColumn *c = columns.at(i); - const DomPropertyHash properties = propertyMap(c->elementProperty()); - - if (!properties.isEmpty()) { - QTableWidgetItem *item = new QTableWidgetItem; - loadItemProps(this, item, properties); - tableWidget->setHorizontalHeaderItem(i, item); - } - } - - const QList rows = ui_widget->elementRow(); - if (rows.count() > 0) - tableWidget->setRowCount(rows.count()); - for (int i = 0; i< rows.count(); i++) { - const DomRow *r = rows.at(i); - const DomPropertyHash properties = propertyMap(r->elementProperty()); - - if (!properties.isEmpty()) { - QTableWidgetItem *item = new QTableWidgetItem; - loadItemProps(this, item, properties); - tableWidget->setVerticalHeaderItem(i, item); - } - } - - foreach (DomItem *ui_item, ui_widget->elementItem()) { - if (ui_item->hasAttributeRow() && ui_item->hasAttributeColumn()) { - const DomPropertyHash properties = propertyMap(ui_item->elementProperty()); - QTableWidgetItem *item = new QTableWidgetItem; - loadItemPropsNFlags(this, item, properties); - tableWidget->setItem(ui_item->attributeRow(), ui_item->attributeColumn(), item); - } - } -} - -/*! - \internal -*/ -void QAbstractFormBuilder::loadComboBoxExtraInfo(DomWidget *ui_widget, QComboBox *comboBox, QWidget *parentWidget) -{ - Q_UNUSED(parentWidget); - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - foreach (DomItem *ui_item, ui_widget->elementItem()) { - const DomPropertyHash properties = propertyMap(ui_item->elementProperty()); - QString text; - QIcon icon; - QVariant textData; - QVariant iconData; - - DomProperty *p = 0; - - p = properties.value(strings.textAttribute); - if (p && p->elementString()) { - textData = textBuilder()->loadText(p); - text = qvariant_cast(textBuilder()->toNativeValue(textData)); - } - - p = properties.value(strings.iconAttribute); - if (p) { - iconData = resourceBuilder()->loadResource(workingDirectory(), p); - icon = qvariant_cast(resourceBuilder()->toNativeValue(iconData)); - } - - comboBox->addItem(icon, text); - comboBox->setItemData((comboBox->count()-1), iconData, Qt::DecorationPropertyRole); - comboBox->setItemData((comboBox->count()-1), textData, Qt::DisplayPropertyRole); - } - - DomProperty *currentIndex = propertyMap(ui_widget->elementProperty()).value(strings.currentIndexProperty); - if (currentIndex) - comboBox->setCurrentIndex(currentIndex->elementNumber()); -} - -// Get the button group name out of a widget's attribute list -static QString buttonGroupName(const DomWidget *ui_widget) -{ - typedef QList DomPropertyList; - const DomPropertyList attributes = ui_widget->elementAttribute(); - if (attributes.empty()) - return QString(); - const QString buttonGroupProperty = QLatin1String(buttonGroupPropertyC); - const DomPropertyList::const_iterator cend = attributes.constEnd(); - for (DomPropertyList::const_iterator it = attributes.constBegin(); it != cend; ++it) - if ( (*it)->attributeName() == buttonGroupProperty) - return (*it)->elementString()->text(); - return QString(); -} - -/*! - \internal - \since 4.5 -*/ - -void QAbstractFormBuilder::loadButtonExtraInfo(const DomWidget *ui_widget, QAbstractButton *button, QWidget *) -{ - typedef QFormBuilderExtra::ButtonGroupEntry ButtonGroupEntry; - typedef QFormBuilderExtra::ButtonGroupHash ButtonGroupHash; - - const QString groupName = buttonGroupName(ui_widget); - if (groupName.isEmpty()) - return; - // Find entry - ButtonGroupHash &buttonGroups = d->buttonGroups(); - ButtonGroupHash::iterator it = buttonGroups.find(groupName); - if (it == buttonGroups.end()) { -#ifdef QFORMINTERNAL_NAMESPACE // Suppress the warning when copying in Designer - uiLibWarning(QCoreApplication::translate("QAbstractFormBuilder", "Invalid QButtonGroup reference '%1' referenced by '%2'.").arg(groupName, button->objectName())); -#endif - return; - } - // Create button group on demand? - QButtonGroup *&group = it.value().second; - if (group == 0) { - group = new QButtonGroup; - group->setObjectName(groupName); - applyProperties(group, it.value().first->elementProperty()); - } - group->addButton(button); -} - -/*! - \internal - \since 4.5 -*/ -void QAbstractFormBuilder::loadItemViewExtraInfo(DomWidget *ui_widget, QAbstractItemView *itemView, - QWidget *) -{ - // - // Special handling for qtableview/qtreeview fake header attributes - // - static QStringList realPropertyNames = - (QStringList() << QLatin1String("visible") - << QLatin1String("cascadingSectionResizes") - << QLatin1String("defaultSectionSize") - << QLatin1String("highlightSections") - << QLatin1String("minimumSectionSize") - << QLatin1String("showSortIndicator") - << QLatin1String("stretchLastSection")); - - if (QTreeView *treeView = qobject_cast(itemView)) { - QList allAttributes = ui_widget->elementAttribute(); - QList headerProperties; - foreach (const QString &realPropertyName, realPropertyNames) { - const QString upperPropertyName = realPropertyName.at(0).toUpper() - + realPropertyName.mid(1); - const QString fakePropertyName = QLatin1String("header") + upperPropertyName; - foreach (DomProperty *attr, allAttributes) { - if (attr->attributeName() == fakePropertyName) { - attr->setAttributeName(realPropertyName); - headerProperties << attr; - } - } - } - applyProperties(treeView->header(), headerProperties); - } else if (QTableView *tableView = qobject_cast(itemView)) { - static QStringList headerPrefixes = - (QStringList() << QLatin1String("horizontalHeader") - << QLatin1String("verticalHeader")); - - QList allAttributes = ui_widget->elementAttribute(); - foreach (const QString &headerPrefix, headerPrefixes) { - QList headerProperties; - foreach (const QString &realPropertyName, realPropertyNames) { - const QString upperPropertyName = realPropertyName.at(0).toUpper() - + realPropertyName.mid(1); - const QString fakePropertyName = headerPrefix + upperPropertyName; - foreach (DomProperty *attr, allAttributes) { - if (attr->attributeName() == fakePropertyName) { - attr->setAttributeName(realPropertyName); - headerProperties << attr; - } - } - } - if (headerPrefix == QLatin1String("horizontalHeader")) - applyProperties(tableView->horizontalHeader(), headerProperties); - else - applyProperties(tableView->verticalHeader(), headerProperties); - } - } -} - -/*! - \internal -*/ -void QAbstractFormBuilder::loadExtraInfo(DomWidget *ui_widget, QWidget *widget, QWidget *parentWidget) -{ - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - if (0) { -#ifndef QT_NO_LISTWIDGET - } else if (QListWidget *listWidget = qobject_cast(widget)) { - loadListWidgetExtraInfo(ui_widget, listWidget, parentWidget); -#endif -#ifndef QT_NO_TREEWIDGET - } else if (QTreeWidget *treeWidget = qobject_cast(widget)) { - loadTreeWidgetExtraInfo(ui_widget, treeWidget, parentWidget); -#endif -#ifndef QT_NO_TABLEWIDGET - } else if (QTableWidget *tableWidget = qobject_cast(widget)) { - loadTableWidgetExtraInfo(ui_widget, tableWidget, parentWidget); -#endif -#ifndef QT_NO_COMBOBOX - } else if (QComboBox *comboBox = qobject_cast(widget)) { - if (!qobject_cast(widget)) - loadComboBoxExtraInfo(ui_widget, comboBox, parentWidget); -#endif -#ifndef QT_NO_TABWIDGET - } else if (QTabWidget *tabWidget = qobject_cast(widget)) { - const DomProperty *currentIndex = propertyMap(ui_widget->elementProperty()).value(strings.currentIndexProperty); - if (currentIndex) - tabWidget->setCurrentIndex(currentIndex->elementNumber()); -#endif -#ifndef QT_NO_STACKEDWIDGET - } else if (QStackedWidget *stackedWidget = qobject_cast(widget)) { - const DomProperty *currentIndex = propertyMap(ui_widget->elementProperty()).value(strings.currentIndexProperty); - if (currentIndex) - stackedWidget->setCurrentIndex(currentIndex->elementNumber()); -#endif -#ifndef QT_NO_TOOLBOX - } else if (QToolBox *toolBox = qobject_cast(widget)) { - const DomProperty *currentIndex = propertyMap(ui_widget->elementProperty()).value(strings.currentIndexProperty); - if (currentIndex) - toolBox->setCurrentIndex(currentIndex->elementNumber()); - const DomProperty *tabSpacing = propertyMap(ui_widget->elementProperty()).value(strings.tabSpacingProperty); - if (tabSpacing) - toolBox->layout()->setSpacing(tabSpacing->elementNumber()); -#endif - } else if (QAbstractButton *ab = qobject_cast(widget)) { - loadButtonExtraInfo(ui_widget, ab, parentWidget); - } - if (QAbstractItemView *itemView = qobject_cast(widget)) { - loadItemViewExtraInfo(ui_widget, itemView, parentWidget); - } -} - -/*! - Returns the current working directory of the form builder. - - \sa setWorkingDirectory() */ -QDir QAbstractFormBuilder::workingDirectory() const -{ - return d->m_workingDirectory; -} - -/*! - Sets the current working directory of the form builder to the - specified \a directory. - - \sa workingDirectory()*/ -void QAbstractFormBuilder::setWorkingDirectory(const QDir &directory) -{ - d->m_workingDirectory = directory; -} - -/*! - \internal -*/ -DomAction *QAbstractFormBuilder::createDom(QAction *action) -{ - if (action->parentWidget() == action->menu() || action->isSeparator()) - return 0; - - DomAction *ui_action = new DomAction; - ui_action->setAttributeName(action->objectName()); - - const QList properties = computeProperties(action); - ui_action->setElementProperty(properties); - - return ui_action; -} - -/*! - \internal - \since 4.5 -*/ - -DomButtonGroup *QAbstractFormBuilder::createDom(QButtonGroup *buttonGroup) -{ - if (buttonGroup->buttons().count() == 0) // Empty group left over on form? - return 0; - DomButtonGroup *domButtonGroup = new DomButtonGroup; - domButtonGroup->setAttributeName(buttonGroup->objectName()); - - QList properties = computeProperties(buttonGroup); - domButtonGroup->setElementProperty(properties); - return domButtonGroup; -} - -/*! - \internal -*/ -DomActionGroup *QAbstractFormBuilder::createDom(QActionGroup *actionGroup) -{ - DomActionGroup *ui_action_group = new DomActionGroup; - ui_action_group->setAttributeName(actionGroup->objectName()); - - QList properties = computeProperties(actionGroup); - ui_action_group->setElementProperty(properties); - - QList ui_actions; - - foreach (QAction *action, actionGroup->actions()) { - if (DomAction *ui_action = createDom(action)) { - ui_actions.append(ui_action); - } - } - - ui_action_group->setElementAction(ui_actions); - - return ui_action_group; -} - -/*! - \internal -*/ -void QAbstractFormBuilder::addMenuAction(QAction *action) -{ - Q_UNUSED(action); -} - -/*! - \internal -*/ -void QAbstractFormBuilder::reset() -{ - d->m_laidout.clear(); - d->m_actions.clear(); - d->m_actionGroups.clear(); - d->m_defaultMargin = INT_MIN; - d->m_defaultSpacing = INT_MIN; -} - -/*! - \internal - Access meta enumeration for Qt::ToolBarArea -*/ - -QMetaEnum QAbstractFormBuilder::toolBarAreaMetaEnum() -{ - return metaEnum("toolBarArea"); -} - -/*! - \internal - Return paths of an icon. -*/ - -QAbstractFormBuilder::IconPaths QAbstractFormBuilder::iconPaths(const QIcon &icon) const -{ - Q_UNUSED(icon); - qWarning() << "QAbstractFormBuilder::iconPaths() is obsoleted"; - return IconPaths(); -} - -/*! - \internal - Return paths of a pixmap. -*/ - -QAbstractFormBuilder::IconPaths QAbstractFormBuilder::pixmapPaths(const QPixmap &pixmap) const -{ - Q_UNUSED(pixmap); - qWarning() << "QAbstractFormBuilder::pixmapPaths() is obsoleted"; - return IconPaths(); -} - -/*! - \internal - Set up a DOM property with icon. -*/ - -void QAbstractFormBuilder::setIconProperty(DomProperty &p, const IconPaths &ip) const -{ - DomResourceIcon *dpi = new DomResourceIcon; - - /* TODO - if (!ip.second.isEmpty()) - pix->setAttributeResource(ip.second); -*/ - dpi->setText(ip.first); - - p.setAttributeName(QFormBuilderStrings::instance().iconAttribute); - p.setElementIconSet(dpi); -} - -/*! - \internal - Set up a DOM property with pixmap. -*/ - -void QAbstractFormBuilder::setPixmapProperty(DomProperty &p, const IconPaths &ip) const -{ - DomResourcePixmap *pix = new DomResourcePixmap; - if (!ip.second.isEmpty()) - pix->setAttributeResource(ip.second); - - pix->setText(ip.first); - - p.setAttributeName(QFormBuilderStrings::instance().pixmapAttribute); - p.setElementPixmap(pix); -} - -/*! - \internal - Convenience. Return DOM property for icon; 0 if icon.isNull(). -*/ - -DomProperty* QAbstractFormBuilder::iconToDomProperty(const QIcon &icon) const -{ - Q_UNUSED(icon); - qWarning() << "QAbstractFormBuilder::iconToDomProperty() is obsoleted"; - return 0; -} - -/*! - \internal - \since 4.4 -*/ - -DomProperty *QAbstractFormBuilder::saveResource(const QVariant &v) const -{ - if (v.isNull()) - return 0; - - DomProperty *p = resourceBuilder()->saveResource(workingDirectory(), v); - if (p) - p->setAttributeName(QFormBuilderStrings::instance().iconAttribute); - return p; -} - -/*! - \internal - \since 4.5 -*/ - -DomProperty *QAbstractFormBuilder::saveText(const QString &attributeName, const QVariant &v) const -{ - if (v.isNull()) - return 0; - - DomProperty *p = textBuilder()->saveText(v); - if (p) - p->setAttributeName(attributeName); - return p; -} - -/*! - \internal - Return the appropriate DOM pixmap for an image dom property. - From 4.4 - unused -*/ - -const DomResourcePixmap *QAbstractFormBuilder::domPixmap(const DomProperty* p) { - switch (p->kind()) { - case DomProperty::IconSet: - qDebug() << "** WARNING QAbstractFormBuilder::domPixmap() called for icon set!"; - break; - case DomProperty::Pixmap: - return p->elementPixmap(); - default: - break; - } - return 0; -} - -/*! - \internal - Create icon from DOM. - From 4.4 - unused -*/ - -QIcon QAbstractFormBuilder::domPropertyToIcon(const DomResourcePixmap *icon) -{ - Q_UNUSED(icon); - qWarning() << "QAbstractFormBuilder::domPropertyToIcon() is obsoleted"; - return QIcon(); -} - -/*! - \internal - Create icon from DOM. Assert if !domPixmap - From 4.4 - unused -*/ - -QIcon QAbstractFormBuilder::domPropertyToIcon(const DomProperty* p) -{ - Q_UNUSED(p); - qWarning() << "QAbstractFormBuilder::domPropertyToIcon() is obsoleted"; - return QIcon(); -} - - -/*! - \internal - Create pixmap from DOM. - From 4.4 - unused -*/ - -QPixmap QAbstractFormBuilder::domPropertyToPixmap(const DomResourcePixmap* pixmap) -{ - Q_UNUSED(pixmap); - qWarning() << "QAbstractFormBuilder::domPropertyToPixmap() is obsoleted"; - return QPixmap(); -} - - -/*! - \internal - Create pixmap from DOM. Assert if !domPixmap - From 4.4 - unused -*/ - -QPixmap QAbstractFormBuilder::domPropertyToPixmap(const DomProperty* p) -{ - Q_UNUSED(p); - qWarning() << "QAbstractFormBuilder::domPropertyToPixmap() is obsoleted"; - return QPixmap(); -} - -/*! - \fn void QAbstractFormBuilder::createConnections ( DomConnections *, QWidget * ) - \internal -*/ - -/*! - \fn void QAbstractFormBuilder::createCustomWidgets ( DomCustomWidgets * ) - \internal -*/ - -/*! - \fn void QAbstractFormBuilder::createResources ( DomResources * ) - \internal -*/ - -/*! - \fn QFormScriptRunner *QAbstractFormBuilder::formScriptRunner() const - \internal - \since 4.3 -*/ -#ifndef QT_FORMBUILDER_NO_SCRIPT -QFormScriptRunner *QAbstractFormBuilder::formScriptRunner() const -{ - return &(d->formScriptRunner()); -} -#endif - -/*! - Sets whether the execution of scripts is enabled to \a enabled. - \since 4.3 - \internal -*/ - -void QAbstractFormBuilder::setScriptingEnabled(bool enabled) -{ -#ifdef QT_FORMBUILDER_NO_SCRIPT - if (enabled) - uiLibWarning(QCoreApplication::translate("QAbstractFormBuilder", "This version of the uitools library is linked without script support.")); -#else - QFormScriptRunner::Options options = formScriptRunner()->options(); - if (enabled) - options &= ~QFormScriptRunner::DisableScripts; - else - options |= QFormScriptRunner::DisableScripts; - formScriptRunner()->setOptions(options); -#endif -} - -/*! - Returns whether the execution of scripts is enabled. - \sa setScriptingEnabled() - \since 4.3 - \internal -*/ - -bool QAbstractFormBuilder::isScriptingEnabled() const -{ -#ifdef QT_FORMBUILDER_NO_SCRIPT - return false; -#else - return !(formScriptRunner()->options() & QFormScriptRunner::DisableScripts); -#endif -} - -/*! - Returns a human-readable description of the last error occurred in load(). - - \since 5.0 - \sa load() -*/ - -QString QAbstractFormBuilder::errorString() const -{ - return d->m_errorString; -} - -QT_END_NAMESPACE diff --git a/tools/uilib/abstractformbuilder.h b/tools/uilib/abstractformbuilder.h deleted file mode 100644 index d0882500be..0000000000 --- a/tools/uilib/abstractformbuilder.h +++ /dev/null @@ -1,283 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef ABSTRACTFORMBUILDER_H -#define ABSTRACTFORMBUILDER_H - -#include "uilib_global.h" - -#include -#include -#include -#include - -#include -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE -#if 0 -// pragma for syncqt, don't remove. - -#pragma qt_class(QAbstractFormBuilder) -#endif - -class QAction; -class QButtonGroup; -class QActionGroup; -class QComboBox; -class QIODevice; -class QIcon; -class QLayout; -class QLayoutItem; -class QListWidget; -class QObject; -class QSpacerItem; -class QTreeWidget; -class QTableWidget; -class QVariant; -class QWidget; -class QAbstractButton; -class QAbstractItemView; - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal -{ -#endif - -class DomAction; -class DomActionGroup; -class DomButtonGroup; -class DomButtonGroups; -class DomActionRef; -class DomBrush; -class DomColorGroup; -class DomConnections; -class DomCustomWidgets; -class DomLayout; -class DomLayoutItem; -class DomProperty; -class DomResources; -class DomSpacer; -class DomString; -class DomTabStops; -class DomUI; -class DomWidget; -class DomResourcePixmap; - -class QResourceBuilder; -class QTextBuilder; -class QFormBuilderExtra; - -#ifndef QT_FORMBUILDER_NO_SCRIPT -class QFormScriptRunner; -#endif - -class QDESIGNER_UILIB_EXPORT QAbstractFormBuilder -{ -public: - QAbstractFormBuilder(); - virtual ~QAbstractFormBuilder(); - - QDir workingDirectory() const; - void setWorkingDirectory(const QDir &directory); - - virtual QWidget *load(QIODevice *dev, QWidget *parentWidget=0); - virtual void save(QIODevice *dev, QWidget *widget); - - void setScriptingEnabled(bool enabled); - bool isScriptingEnabled() const; - - QString errorString() const; - -protected: -// -// load -// - virtual void loadExtraInfo(DomWidget *ui_widget, QWidget *widget, QWidget *parentWidget); - - virtual QWidget *create(DomUI *ui, QWidget *parentWidget); - virtual QWidget *create(DomWidget *ui_widget, QWidget *parentWidget); - virtual QLayout *create(DomLayout *ui_layout, QLayout *layout, QWidget *parentWidget); - virtual QLayoutItem *create(DomLayoutItem *ui_layoutItem, QLayout *layout, QWidget *parentWidget); - - virtual QAction *create(DomAction *ui_action, QObject *parent); - virtual QActionGroup *create(DomActionGroup *ui_action_group, QObject *parent); - virtual void addMenuAction(QAction *action); - - virtual void applyProperties(QObject *o, const QList &properties); - bool applyPropertyInternally(QObject *o, const QString &propertyName, const QVariant &value); - - virtual void applyTabStops(QWidget *widget, DomTabStops *tabStops); - - virtual QWidget *createWidget(const QString &widgetName, QWidget *parentWidget, const QString &name); - virtual QLayout *createLayout(const QString &layoutName, QObject *parent, const QString &name); - virtual QAction *createAction(QObject *parent, const QString &name); - virtual QActionGroup *createActionGroup(QObject *parent, const QString &name); - - virtual void createCustomWidgets(DomCustomWidgets *) {} - virtual void createConnections(DomConnections *, QWidget *) {} - virtual void createResources(DomResources*) {} - - virtual bool addItem(DomLayoutItem *ui_item, QLayoutItem *item, QLayout *layout); - virtual bool addItem(DomWidget *ui_widget, QWidget *widget, QWidget *parentWidget); - -// -// save -// - virtual void saveExtraInfo(QWidget *widget, DomWidget *ui_widget, DomWidget *ui_parentWidget); - - virtual void saveDom(DomUI *ui, QWidget *widget); - - virtual DomActionRef *createActionRefDom(QAction *action); - - virtual DomWidget *createDom(QWidget *widget, DomWidget *ui_parentWidget, bool recursive = true); - virtual DomLayout *createDom(QLayout *layout, DomLayout *ui_layout, DomWidget *ui_parentWidget); - virtual DomLayoutItem *createDom(QLayoutItem *item, DomLayout *ui_parentLayout, DomWidget *ui_parentWidget); - virtual DomSpacer *createDom(QSpacerItem *spacer, DomLayout *ui_parentLayout, DomWidget *ui_parentWidget); - - virtual DomAction *createDom(QAction *action); - virtual DomActionGroup *createDom(QActionGroup *actionGroup); - DomButtonGroup *createDom(QButtonGroup *buttonGroup); - - virtual DomConnections *saveConnections(); - virtual DomCustomWidgets *saveCustomWidgets(); - virtual DomTabStops *saveTabStops(); - virtual DomResources *saveResources(); - DomButtonGroups *saveButtonGroups(const QWidget *mainContainer); - virtual QList computeProperties(QObject *obj); - virtual bool checkProperty(QObject *obj, const QString &prop) const; - virtual DomProperty *createProperty(QObject *object, const QString &propertyName, const QVariant &value); - - virtual void layoutInfo(DomLayout *layout, QObject *parent, int *margin, int *spacing); - - void loadListWidgetExtraInfo(DomWidget *ui_widget, QListWidget *listWidget, QWidget *parentWidget); - void loadTreeWidgetExtraInfo(DomWidget *ui_widget, QTreeWidget *treeWidget, QWidget *parentWidget); - void loadTableWidgetExtraInfo(DomWidget *ui_widget, QTableWidget *tableWidget, QWidget *parentWidget); - void loadComboBoxExtraInfo(DomWidget *ui_widget, QComboBox *comboBox, QWidget *parentWidget); - void loadButtonExtraInfo(const DomWidget *ui_widget, QAbstractButton *button, QWidget *parentWidget); - void loadItemViewExtraInfo(DomWidget *ui_widget, QAbstractItemView *itemView, QWidget *parentWidget); - - void saveListWidgetExtraInfo(QListWidget *widget, DomWidget *ui_widget, DomWidget *ui_parentWidget); - void saveTreeWidgetExtraInfo(QTreeWidget *treeWidget, DomWidget *ui_widget, DomWidget *ui_parentWidget); - void saveTableWidgetExtraInfo(QTableWidget *tablWidget, DomWidget *ui_widget, DomWidget *ui_parentWidget); - void saveComboBoxExtraInfo(QComboBox *widget, DomWidget *ui_widget, DomWidget *ui_parentWidget); - void saveButtonExtraInfo(const QAbstractButton *widget, DomWidget *ui_widget, DomWidget *ui_parentWidget); - void saveItemViewExtraInfo(const QAbstractItemView *itemView, DomWidget *ui_widget, DomWidget *ui_parentWidget); - - void setResourceBuilder(QResourceBuilder *builder); - QResourceBuilder *resourceBuilder() const; - DomProperty *saveResource(const QVariant &v) const; - - void setTextBuilder(QTextBuilder *builder); - QTextBuilder *textBuilder() const; - DomProperty *saveText(const QString &attributeName, const QVariant &v) const; -// -// utils -// - - QVariant toVariant(const QMetaObject *meta, DomProperty *property); - static QString toString(const DomString *str); - - typedef QHash DomPropertyHash; - static DomPropertyHash propertyMap(const QList &properties); - - void setupColorGroup(QPalette &palette, QPalette::ColorGroup colorGroup, DomColorGroup *group); - DomColorGroup *saveColorGroup(const QPalette &palette); - QBrush setupBrush(DomBrush *brush); - DomBrush *saveBrush(const QBrush &brush); - - void reset(); - void initialize(const DomUI *ui); - -#ifndef QT_FORMBUILDER_NO_SCRIPT - QFormScriptRunner *formScriptRunner() const; -#endif -// -// utils -// - - static QMetaEnum toolBarAreaMetaEnum(); - -// -// Icon/pixmap stuff -// - // A Pair of icon path/qrc path. - typedef QPair IconPaths; - - IconPaths iconPaths(const QIcon &) const; - IconPaths pixmapPaths(const QPixmap &) const; - void setIconProperty(DomProperty &, const IconPaths &) const; - void setPixmapProperty(DomProperty &, const IconPaths &) const; - DomProperty* iconToDomProperty(const QIcon &) const; - - static const DomResourcePixmap *domPixmap(const DomProperty* p); - QIcon domPropertyToIcon(const DomResourcePixmap *); - QIcon domPropertyToIcon(const DomProperty* p); - QPixmap domPropertyToPixmap(const DomResourcePixmap* p); - QPixmap domPropertyToPixmap(const DomProperty* p); - -private: -// -// utils -// - static Qt::ToolBarArea toolbarAreaFromDOMAttributes(const DomPropertyHash &attributeMap); - - QAbstractFormBuilder(const QAbstractFormBuilder &other); - void operator = (const QAbstractFormBuilder &other); - - friend QDESIGNER_UILIB_EXPORT DomProperty *variantToDomProperty(QAbstractFormBuilder *abstractFormBuilder, const QMetaObject *meta, const QString &propertyName, const QVariant &value); - friend QDESIGNER_UILIB_EXPORT QVariant domPropertyToVariant(QAbstractFormBuilder *abstractFormBuilder,const QMetaObject *meta, const DomProperty *property); - -protected: - QScopedPointer d; -}; - -#ifdef QFORMINTERNAL_NAMESPACE -} -#endif - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // ABSTRACTFORMBUILDER_H diff --git a/tools/uilib/container.h b/tools/uilib/container.h deleted file mode 100644 index cf670edafb..0000000000 --- a/tools/uilib/container.h +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef CONTAINER_H -#define CONTAINER_H - -#include -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class QWidget; - -class QDesignerContainerExtension -{ -public: - virtual ~QDesignerContainerExtension() {} - - virtual int count() const = 0; - virtual QWidget *widget(int index) const = 0; - - virtual int currentIndex() const = 0; - virtual void setCurrentIndex(int index) = 0; - - virtual void addWidget(QWidget *widget) = 0; - virtual void insertWidget(int index, QWidget *widget) = 0; - virtual void remove(int index) = 0; - - virtual bool canAddWidget() const - // ### Qt6 remove body, provided in Qt5 for source compatibility to Qt4. - { return true; } - virtual bool canRemove(int index) const - // ### Qt6 remove body, provided in Qt5 for source compatibility to Qt4. - { Q_UNUSED(index); return true; } -}; -Q_DECLARE_EXTENSION_INTERFACE(QDesignerContainerExtension, "com.trolltech.Qt.Designer.Container") - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // CONTAINER_H diff --git a/tools/uilib/container.qdoc b/tools/uilib/container.qdoc deleted file mode 100644 index 8f7a07d30c..0000000000 --- a/tools/uilib/container.qdoc +++ /dev/null @@ -1,199 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** GNU Free Documentation License -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms -** and conditions contained in a signed written agreement between you -** and Nokia. -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \class QDesignerContainerExtension - \brief The QDesignerContainerExtension class allows you to add pages to - a custom multi-page container in Qt Designer's workspace. - \inmodule QtDesigner - - QDesignerContainerExtension provide an interface for creating - custom container extensions. A container extension consists of a - collection of functions that \QD needs to manage a multi-page - container plugin, and a list of the container's pages. - - \image containerextension-example.png - - \warning This is \e not an extension for container plugins in - general, only custom \e multi-page containers. - - To create a container extension, your extension class must inherit - from both QObject and QDesignerContainerExtension. For example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 6 - - Since we are implementing an interface, we must ensure that it's - made known to the meta object system using the Q_INTERFACES() - macro. This enables \QD to use the qobject_cast() function to - query for supported interfaces using nothing but a QObject - pointer. - - You must reimplement several functions to enable \QD to manage a - custom multi-page container widget: \QD uses count() to keep track - of the number pages in your container, widget() to return the page - at a given index in the list of the container's pages, and - currentIndex() to return the list index of the selected page. \QD - uses the addWidget() function to add a given page to the - container, expecting it to be appended to the list of pages, while - it expects the insertWidget() function to add a given page to the - container by inserting it at a given index. - - In \QD the extensions are not created until they are - required. For that reason you must also create a - QExtensionFactory, i.e a class that is able to make an instance of - your extension, and register it using \QD's \l - {QExtensionManager}{extension manager}. - - When a container extension is required, \QD's \l - {QExtensionManager}{extension manager} will run through all its - registered factories calling QExtensionFactory::createExtension() - for each until the first one that is able to create a container - extension, is found. This factory will then create the extension - for the plugin. - - There are four available types of extensions in \QD: - QDesignerContainerExtension , QDesignerMemberSheetExtension, - QDesignerPropertySheetExtension and QDesignerTaskMenuExtension. - \QD's behavior is the same whether the requested extension is - associated with a multi page container, a member sheet, a property - sheet or a task menu. - - The QExtensionFactory class provides a standard extension factory, - and can also be used as an interface for custom extension - factories. You can either create a new QExtensionFactory and - reimplement the QExtensionFactory::createExtension() function. For - example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 7 - - Or you can use an existing factory, expanding the - QExtensionFactory::createExtension() function to make the factory - able to create a container extension as well. For example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 8 - - For a complete example using the QDesignerContainerExtension - class, see the \l {designer/containerextension}{Container - Extension example}. The example shows how to create a custom - multi-page plugin for \QD. - - \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget - Extensions} -*/ - -/*! - \fn QDesignerContainerExtension::~QDesignerContainerExtension() - - Destroys the extension. -*/ - -/*! - \fn int QDesignerContainerExtension::count() const - - Returns the number of pages in the container. -*/ - -/*! - \fn QWidget *QDesignerContainerExtension::widget(int index) const - - Returns the page at the given \a index in the extension's list of - pages. - - \sa addWidget(), insertWidget() -*/ - -/*! - \fn int QDesignerContainerExtension::currentIndex() const - - Returns the index of the currently selected page in the - container. - - \sa setCurrentIndex() -*/ - -/*! - \fn void QDesignerContainerExtension::setCurrentIndex(int index) - - Sets the currently selected page in the container to be the - page at the given \a index in the extension's list of pages. - - \sa currentIndex() -*/ - -/*! - \fn void QDesignerContainerExtension::addWidget(QWidget *page) - - Adds the given \a page to the container by appending it to the - extension's list of pages. - - \sa insertWidget(), remove(), widget() -*/ - -/*! - \fn void QDesignerContainerExtension::insertWidget(int index, QWidget *page) - - Adds the given \a page to the container by inserting it at the - given \a index in the extension's list of pages. - - \sa addWidget(), remove(), widget() -*/ - -/*! - \fn void QDesignerContainerExtension::remove(int index) - - Removes the page at the given \a index from the extension's list - of pages. - - \sa addWidget(), insertWidget() -*/ - -/*! - \fn bool QDesignerContainerExtension::canAddWidget() const - - Returns whether a widget can be added. This determines whether - the context menu options to add or insert pages are enabled. - - This should return false for containers that have a single, fixed - page, for example QScrollArea or QDockWidget. - - \since 5.0 - \sa addWidget(), canRemove() -*/ - -/*! - \fn bool QDesignerContainerExtension::canRemove(int index) const - - Returns whether the widget at the given \a index can be removed. - This determines whether the context menu option to remove the current - page is enabled. - - This should return false for containers that have a single, fixed - page, for example QScrollArea or QDockWidget. - - \since 5.0 - \sa remove(), canAddWidget() -*/ diff --git a/tools/uilib/customwidget.h b/tools/uilib/customwidget.h deleted file mode 100644 index 43cc055046..0000000000 --- a/tools/uilib/customwidget.h +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef CUSTOMWIDGET_H -#define CUSTOMWIDGET_H - -#include "extension.h" -#include -#include -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class QWidget; -class QDesignerFormEditorInterface; - -class QDesignerCustomWidgetInterface -{ -public: - virtual ~QDesignerCustomWidgetInterface() {} - - virtual QString name() const = 0; - virtual QString group() const = 0; - virtual QString toolTip() const = 0; - virtual QString whatsThis() const = 0; - virtual QString includeFile() const = 0; - virtual QIcon icon() const = 0; - - virtual bool isContainer() const = 0; - - virtual QWidget *createWidget(QWidget *parent) = 0; - - virtual bool isInitialized() const { return false; } - virtual void initialize(QDesignerFormEditorInterface *core) { Q_UNUSED(core); } - - virtual QString domXml() const - { - return QString::fromUtf8("") - .arg(name()).arg(name().toLower()); - } - - virtual QString codeTemplate() const { return QString(); } -}; -Q_DECLARE_INTERFACE(QDesignerCustomWidgetInterface, "com.trolltech.Qt.Designer.CustomWidget") - - -class QDesignerCustomWidgetCollectionInterface -{ -public: - virtual ~QDesignerCustomWidgetCollectionInterface() {} - - virtual QList customWidgets() const = 0; -}; -Q_DECLARE_INTERFACE(QDesignerCustomWidgetCollectionInterface, - "com.trolltech.Qt.Designer.CustomWidgetCollection") - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // CUSTOMWIDGET_H diff --git a/tools/uilib/customwidget.qdoc b/tools/uilib/customwidget.qdoc deleted file mode 100644 index 9c3bfdd9df..0000000000 --- a/tools/uilib/customwidget.qdoc +++ /dev/null @@ -1,295 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** GNU Free Documentation License -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms -** and conditions contained in a signed written agreement between you -** and Nokia. -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \class QDesignerCustomWidgetInterface - - \brief The QDesignerCustomWidgetInterface class enables Qt Designer - to access and construct custom widgets. - - \inmodule QtDesigner - - QDesignerCustomWidgetInterface provides a custom widget with an - interface. The class contains a set of functions that must be subclassed - to return basic information about the widget, such as its class name and - the name of its header file. Other functions must be implemented to - initialize the plugin when it is loaded, and to construct instances of - the custom widget for \QD to use. - - When implementing a custom widget you must subclass - QDesignerCustomWidgetInterface to expose your widget to \QD. For - example, this is the declaration for the plugin used in the - \l{Custom Widget Plugin Example}{Custom Widget Plugin example} that - enables an analog clock custom widget to be used by \QD: - - \snippet examples/designer/customwidgetplugin/customwidgetplugin.h 0 - - Note that the only part of the class definition that is specific - to this particular custom widget is the class name. In addition, - since we are implementing an interface, we must ensure that it's - made known to the meta object system using the Q_INTERFACES() - macro. This enables \QD to use the qobject_cast() function to - query for supported interfaces using nothing but a QObject - pointer. - - After \QD loads a custom widget plugin, it calls the interface's - initialize() function to enable it to set up any resources that it - may need. This function is called with a QDesignerFormEditorInterface - parameter that provides the plugin with a gateway to all of \QD's API. - - \QD constructs instances of the custom widget by calling the plugin's - createWidget() function with a suitable parent widget. Plugins must - construct and return an instance of a custom widget with the specified - parent widget. - - In the implementation of the class you must remember to export - your custom widget plugin to \QD using the Q_EXPORT_PLUGIN2() - macro. For example, if a library called \c libcustomwidgetplugin.so - (on Unix) or \c libcustomwidget.dll (on Windows) contains a widget - class called \c MyCustomWidget, we can export it by adding the - following line to the file containing the plugin implementation: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 14 - - This macro ensures that \QD can access and construct the custom widget. - Without this macro, there is no way for \QD to use it. - - When implementing a custom widget plugin, you build it as a - separate library. If you want to include several custom widget - plugins in the same library, you must in addition subclass - QDesignerCustomWidgetCollectionInterface. - - \warning If your custom widget plugin contains QVariant - properties, be aware that only the following \l - {QVariant::Type}{types} are supported: - - \list - \o QVariant::ByteArray - \o QVariant::Bool - \o QVariant::Color - \o QVariant::Cursor - \o QVariant::Date - \o QVariant::DateTime - \o QVariant::Double - \o QVariant::Int - \o QVariant::Point - \o QVariant::Rect - \o QVariant::Size - \o QVariant::SizePolicy - \o QVariant::String - \o QVariant::Time - \o QVariant::UInt - \endlist - - For a complete example using the QDesignerCustomWidgetInterface - class, see the \l {designer/customwidgetplugin}{Custom Widget - Example}. The example shows how to create a custom widget plugin - for \QD. - - \sa QDesignerCustomWidgetCollectionInterface {Creating Custom - Widgets for Qt Designer} -*/ - -/*! - \fn QDesignerCustomWidgetInterface::~QDesignerCustomWidgetInterface() - - Destroys the custom widget interface. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::name() const - - Returns the class name of the custom widget supplied by the interface. - - The name returned \e must be identical to the class name used for the - custom widget. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::group() const - - Returns the name of the group to which the custom widget belongs. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::toolTip() const - - Returns a short description of the widget that can be used by \QD - in a tool tip. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::whatsThis() const - - Returns a description of the widget that can be used by \QD in - "What's This?" help for the widget. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::includeFile() const - - Returns the path to the include file that \l uic uses when - creating code for the custom widget. -*/ - -/*! - \fn QIcon QDesignerCustomWidgetInterface::icon() const - - Returns the icon used to represent the custom widget in \QD's - widget box. -*/ - -/*! - \fn bool QDesignerCustomWidgetInterface::isContainer() const - - Returns true if the custom widget is intended to be used as a - container; otherwise returns false. - - Most custom widgets are not used to hold other widgets, so their - implementations of this function will return false, but custom - containers will return true to ensure that they behave correctly - in \QD. -*/ - -/*! - \fn QWidget *QDesignerCustomWidgetInterface::createWidget(QWidget *parent) - - Returns a new instance of the custom widget, with the given \a - parent. -*/ - -/*! - \fn bool QDesignerCustomWidgetInterface::isInitialized() const - - Returns true if the widget has been initialized; otherwise returns - false. - - \sa initialize() -*/ - -/*! - \fn void QDesignerCustomWidgetInterface::initialize(QDesignerFormEditorInterface *formEditor) - - Initializes the widget for use with the specified \a formEditor - interface. - - \sa isInitialized() -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::domXml() const - - Returns the XML that is used to describe the custom widget's - properties to \QD. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::codeTemplate() const - - This function is reserved for future use by \QD. - - \omit - Returns the code template that \QD includes in forms that contain - the custom widget when they are saved. - \endomit -*/ - -/*! - \macro QDESIGNER_WIDGET_EXPORT - \relates QDesignerCustomWidgetInterface - \since 4.1 - - This macro is used when defining custom widgets to ensure that they are - correctly exported from plugins for use with \QD. - - On some platforms, the symbols required by \QD to create new widgets - are removed from plugins by the build system, making them unusable. - Using this macro ensures that the symbols are retained on those platforms, - and has no side effects on other platforms. - - For example, the \l{designer/worldtimeclockplugin}{World Time Clock Plugin} - example exports a custom widget class with the following declaration: - - \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 0 - \dots - \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 2 - - \sa {Creating Custom Widgets for Qt Designer} -*/ - - - - - -/*! - \class QDesignerCustomWidgetCollectionInterface - - \brief The QDesignerCustomWidgetCollectionInterface class allows - you to include several custom widgets in one single library. - - \inmodule QtDesigner - - When implementing a custom widget plugin, you build it as a - separate library. If you want to include several custom widget - plugins in the same library, you must in addition subclass - QDesignerCustomWidgetCollectionInterface. - - QDesignerCustomWidgetCollectionInterface contains one single - function returning a list of the collection's - QDesignerCustomWidgetInterface objects. For example, if you have - several custom widgets \c CustomWidgetOne, \c CustomWidgetTwo and - \c CustomWidgetThree, the class definition may look like this: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 12 - - In the class constructor you add the interfaces to your custom - widgets to the list which you return in the customWidgets() - function: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 13 - - Note that instead of exporting each custom widget plugin using the - Q_EXPORT_PLUGIN2() macro, you export the entire collection. The - Q_EXPORT_PLUGIN2() macro ensures that \QD can access and construct - the custom widgets. Without this macro, there is no way for \QD to - use them. - - \sa QDesignerCustomWidgetInterface, {Creating Custom Widgets for - Qt Designer} -*/ - -/*! - \fn QDesignerCustomWidgetCollectionInterface::~QDesignerCustomWidgetCollectionInterface() { - - Destroys the custom widget collection interface. -*/ - -/*! - \fn QList QDesignerCustomWidgetCollectionInterface::customWidgets() const - - Returns a list of interfaces to the collection's custom widgets. -*/ diff --git a/tools/uilib/extension.h b/tools/uilib/extension.h deleted file mode 100644 index 9d6754e9e1..0000000000 --- a/tools/uilib/extension.h +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef EXTENSION_H -#define EXTENSION_H - -#include -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -#define Q_TYPEID(IFace) QLatin1String(IFace##_iid) - -class QAbstractExtensionFactory -{ -public: - virtual ~QAbstractExtensionFactory() {} - - virtual QObject *extension(QObject *object, const QString &iid) const = 0; -}; -Q_DECLARE_INTERFACE(QAbstractExtensionFactory, "com.trolltech.Qt.QAbstractExtensionFactory") - -class QAbstractExtensionManager -{ -public: - virtual ~QAbstractExtensionManager() {} - - virtual void registerExtensions(QAbstractExtensionFactory *factory, const QString &iid) = 0; - virtual void unregisterExtensions(QAbstractExtensionFactory *factory, const QString &iid) = 0; - - virtual QObject *extension(QObject *object, const QString &iid) const = 0; -}; -Q_DECLARE_INTERFACE(QAbstractExtensionManager, "com.trolltech.Qt.QAbstractExtensionManager") - -#if defined(Q_CC_MSVC) && (_MSC_VER < 1300) - -template -inline T qt_extension_helper(QAbstractExtensionManager *, QObject *, T) -{ return 0; } - -template -inline T qt_extension(QAbstractExtensionManager* manager, QObject *object) -{ return qt_extension_helper(manager, object, T(0)); } - -#define Q_DECLARE_EXTENSION_INTERFACE(IFace, IId) \ -const char * const IFace##_iid = IId; \ -Q_DECLARE_INTERFACE(IFace, IId) \ -template <> inline IFace *qt_extension_helper(QAbstractExtensionManager *manager, QObject *object, IFace *) \ -{ QObject *extension = manager->extension(object, Q_TYPEID(IFace)); return (IFace *)(extension ? extension->qt_metacast(IFace##_iid) : 0); } - -#else - -template -inline T qt_extension(QAbstractExtensionManager* manager, QObject *object) -{ return 0; } - -#define Q_DECLARE_EXTENSION_INTERFACE(IFace, IId) \ -const char * const IFace##_iid = IId; \ -Q_DECLARE_INTERFACE(IFace, IId) \ -template <> inline IFace *qt_extension(QAbstractExtensionManager *manager, QObject *object) \ -{ QObject *extension = manager->extension(object, Q_TYPEID(IFace)); return extension ? static_cast(extension->qt_metacast(IFace##_iid)) : static_cast(0); } - -#endif - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // EXTENSION_H diff --git a/tools/uilib/formbuilder.cpp b/tools/uilib/formbuilder.cpp deleted file mode 100644 index 5e22ddb998..0000000000 --- a/tools/uilib/formbuilder.cpp +++ /dev/null @@ -1,550 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "customwidget.h" -#include "formbuilder.h" -#include "formbuilderextra_p.h" -#include "ui4_p.h" - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal { -#endif - -/*! - \class QFormBuilder - - \brief The QFormBuilder class is used to dynamically construct - user interfaces from UI files at run-time. - - \inmodule QtDesigner - - The QFormBuilder class provides a mechanism for dynamically - creating user interfaces at run-time, based on UI files - created with \QD. For example: - - \snippet doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp 0 - - By including the user interface in the example's resources (\c - myForm.qrc), we ensure that it will be present when the example is - run: - - \snippet doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp 1 - - QFormBuilder extends the QAbstractFormBuilder base class with a - number of functions that are used to support custom widget - plugins: - - \list - \o pluginPaths() returns the list of paths that the form builder - searches when loading custom widget plugins. - \o addPluginPath() allows additional paths to be registered with - the form builder. - \o setPluginPath() is used to replace the existing list of paths - with a list obtained from some other source. - \o clearPluginPaths() removes all paths registered with the form - builder. - \o customWidgets() returns a list of interfaces to plugins that - can be used to create new instances of registered custom widgets. - \endlist - - The QFormBuilder class is typically used by custom components and - applications that embed \QD. Standalone applications that need to - dynamically generate user interfaces at run-time use the - QUiLoader class, found in the QtUiTools module. - - \sa QAbstractFormBuilder, {QtUiTools Module} -*/ - -/*! - \fn QFormBuilder::QFormBuilder() - - Constructs a new form builder. -*/ - -QFormBuilder::QFormBuilder() -{ -} - -/*! - Destroys the form builder. -*/ -QFormBuilder::~QFormBuilder() -{ -} - -/*! - \internal -*/ -QWidget *QFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidget) -{ - if (!d->parentWidgetIsSet()) - d->setParentWidget(parentWidget); - // Is this a QLayoutWidget with a margin of 0: Not a known page-based - // container and no method for adding pages registered. - d->setProcessingLayoutWidget(false); - if (ui_widget->attributeClass() == QFormBuilderStrings::instance().qWidgetClass && !ui_widget->hasAttributeNative() - && parentWidget -#ifndef QT_NO_MAINWINDOW - && !qobject_cast(parentWidget) -#endif -#ifndef QT_NO_TOOLBOX - && !qobject_cast(parentWidget) -#endif -#ifndef QT_NO_STACKEDWIDGET - && !qobject_cast(parentWidget) -#endif -#ifndef QT_NO_STACKEDWIDGET - && !qobject_cast(parentWidget) -#endif -#ifndef QT_NO_SCROLLAREA - && !qobject_cast(parentWidget) -#endif -#ifndef QT_NO_MDIAREA - && !qobject_cast(parentWidget) -#endif -#ifndef QT_NO_DOCKWIDGET - && !qobject_cast(parentWidget) -#endif - ) { - const QString parentClassName = QLatin1String(parentWidget->metaObject()->className()); - if (!d->isCustomWidgetContainer(parentClassName)) - d->setProcessingLayoutWidget(true); - } - return QAbstractFormBuilder::create(ui_widget, parentWidget); -} - - -/*! - \internal -*/ -QWidget *QFormBuilder::createWidget(const QString &widgetName, QWidget *parentWidget, const QString &name) -{ - if (widgetName.isEmpty()) { - //: Empty class name passed to widget factory method - qWarning() << QCoreApplication::translate("QFormBuilder", "An empty class name was passed on to %1 (object name: '%2').").arg(QString::fromUtf8(Q_FUNC_INFO), name); - return 0; - } - - QWidget *w = 0; - -#ifndef QT_NO_TABWIDGET - if (qobject_cast(parentWidget)) - parentWidget = 0; -#endif -#ifndef QT_NO_STACKEDWIDGET - if (qobject_cast(parentWidget)) - parentWidget = 0; -#endif -#ifndef QT_NO_TOOLBOX - if (qobject_cast(parentWidget)) - parentWidget = 0; -#endif - - // ### special-casing for Line (QFrame) -- fix for 4.2 - do { - if (widgetName == QFormBuilderStrings::instance().lineClass) { - w = new QFrame(parentWidget); - static_cast(w)->setFrameStyle(QFrame::HLine | QFrame::Sunken); - break; - } - const QByteArray widgetNameBA = widgetName.toUtf8(); - const char *widgetNameC = widgetNameBA.constData(); - if (w) { // symmetry for macro - } - -#define DECLARE_LAYOUT(L, C) -#define DECLARE_COMPAT_WIDGET(W, C) -#define DECLARE_WIDGET(W, C) else if (!qstrcmp(widgetNameC, #W)) { Q_ASSERT(w == 0); w = new W(parentWidget); } -#define DECLARE_WIDGET_1(W, C) else if (!qstrcmp(widgetNameC, #W)) { Q_ASSERT(w == 0); w = new W(0, parentWidget); } - -#include "widgets.table" - -#undef DECLARE_COMPAT_WIDGET -#undef DECLARE_LAYOUT -#undef DECLARE_WIDGET -#undef DECLARE_WIDGET_1 - - if (w) - break; - - // try with a registered custom widget - QDesignerCustomWidgetInterface *factory = d->m_customWidgets.value(widgetName); - if (factory != 0) - w = factory->createWidget(parentWidget); - } while(false); - - if (w == 0) { // Attempt to instantiate base class of promoted/custom widgets - const QString baseClassName = d->customWidgetBaseClass(widgetName); - if (!baseClassName.isEmpty()) { - qWarning() << QCoreApplication::translate("QFormBuilder", "QFormBuilder was unable to create a custom widget of the class '%1'; defaulting to base class '%2'.").arg(widgetName, baseClassName); - return createWidget(baseClassName, parentWidget, name); - } - } - - if (w == 0) { // nothing to do - qWarning() << QCoreApplication::translate("QFormBuilder", "QFormBuilder was unable to create a widget of the class '%1'.").arg(widgetName); - return 0; - } - - w->setObjectName(name); - - if (qobject_cast(w)) - w->setParent(parentWidget); - - return w; -} - -/*! - \internal -*/ -QLayout *QFormBuilder::createLayout(const QString &layoutName, QObject *parent, const QString &name) -{ - QLayout *l = 0; - - QWidget *parentWidget = qobject_cast(parent); - QLayout *parentLayout = qobject_cast(parent); - - Q_ASSERT(parentWidget || parentLayout); - -#define DECLARE_WIDGET(W, C) -#define DECLARE_COMPAT_WIDGET(W, C) - -#define DECLARE_LAYOUT(L, C) \ - if (layoutName == QLatin1String(#L)) { \ - Q_ASSERT(l == 0); \ - l = parentLayout \ - ? new L() \ - : new L(parentWidget); \ - } - -#include "widgets.table" - -#undef DECLARE_LAYOUT -#undef DECLARE_COMPAT_WIDGET -#undef DECLARE_WIDGET - - if (l) { - l->setObjectName(name); - } else { - qWarning() << QCoreApplication::translate("QFormBuilder", "The layout type `%1' is not supported.").arg(layoutName); - } - - return l; -} - -/*! - \internal -*/ -bool QFormBuilder::addItem(DomLayoutItem *ui_item, QLayoutItem *item, QLayout *layout) -{ - return QAbstractFormBuilder::addItem(ui_item, item, layout); -} - -/*! - \internal -*/ -bool QFormBuilder::addItem(DomWidget *ui_widget, QWidget *widget, QWidget *parentWidget) -{ - return QAbstractFormBuilder::addItem(ui_widget, widget, parentWidget); -} - -/*! - \internal -*/ -QWidget *QFormBuilder::widgetByName(QWidget *topLevel, const QString &name) -{ - Q_ASSERT(topLevel); - if (topLevel->objectName() == name) - return topLevel; - - return topLevel->findChild(name); -} - -static QObject *objectByName(QWidget *topLevel, const QString &name) -{ - Q_ASSERT(topLevel); - if (topLevel->objectName() == name) - return topLevel; - - return topLevel->findChild(name); -} - -/*! - \internal -*/ -void QFormBuilder::createConnections(DomConnections *ui_connections, QWidget *widget) -{ - typedef QList DomConnectionList; - Q_ASSERT(widget != 0); - - if (ui_connections == 0) - return; - - const DomConnectionList connections = ui_connections->elementConnection(); - if (!connections.empty()) { - const DomConnectionList::const_iterator cend = connections.constEnd(); - for (DomConnectionList::const_iterator it = connections.constBegin(); it != cend; ++it) { - - QObject *sender = objectByName(widget, (*it)->elementSender()); - QObject *receiver = objectByName(widget, (*it)->elementReceiver()); - if (!sender || !receiver) - continue; - - QByteArray sig = (*it)->elementSignal().toUtf8(); - sig.prepend("2"); - QByteArray sl = (*it)->elementSlot().toUtf8(); - sl.prepend("1"); - QObject::connect(sender, sig, receiver, sl); - } - } -} - -/*! - \internal -*/ -QWidget *QFormBuilder::create(DomUI *ui, QWidget *parentWidget) -{ - return QAbstractFormBuilder::create(ui, parentWidget); -} - -/*! - \internal -*/ -QLayout *QFormBuilder::create(DomLayout *ui_layout, QLayout *layout, QWidget *parentWidget) -{ - // Is this a temporary layout widget used to represent QLayout hierarchies in Designer? - // Set its margins to 0. - bool layoutWidget = d->processingLayoutWidget(); - QLayout *l = QAbstractFormBuilder::create(ui_layout, layout, parentWidget); - if (layoutWidget) { - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - int left, top, right, bottom; - left = top = right = bottom = 0; - const DomPropertyHash properties = propertyMap(ui_layout->elementProperty()); - - if (DomProperty *prop = properties.value(strings.leftMarginProperty)) - left = prop->elementNumber(); - - if (DomProperty *prop = properties.value(strings.topMarginProperty)) - top = prop->elementNumber(); - - if (DomProperty *prop = properties.value(strings.rightMarginProperty)) - right = prop->elementNumber(); - - if (DomProperty *prop = properties.value(strings.bottomMarginProperty)) - bottom = prop->elementNumber(); - - l->setContentsMargins(left, top, right, bottom); - d->setProcessingLayoutWidget(false); - } - return l; -} - -/*! - \internal -*/ -QLayoutItem *QFormBuilder::create(DomLayoutItem *ui_layoutItem, QLayout *layout, QWidget *parentWidget) -{ - return QAbstractFormBuilder::create(ui_layoutItem, layout, parentWidget); -} - -/*! - \internal -*/ -QAction *QFormBuilder::create(DomAction *ui_action, QObject *parent) -{ - return QAbstractFormBuilder::create(ui_action, parent); -} - -/*! - \internal -*/ -QActionGroup *QFormBuilder::create(DomActionGroup *ui_action_group, QObject *parent) -{ - return QAbstractFormBuilder::create(ui_action_group, parent); -} - -/*! - Returns the list of paths the form builder searches for plugins. - - \sa addPluginPath() -*/ -QStringList QFormBuilder::pluginPaths() const -{ - return d->m_pluginPaths; -} - -/*! - Clears the list of paths that the form builder uses to search for - custom widget plugins. - - \sa pluginPaths() -*/ -void QFormBuilder::clearPluginPaths() -{ - d->m_pluginPaths.clear(); - updateCustomWidgets(); -} - -/*! - Adds a new plugin path specified by \a pluginPath to the list of - paths that will be searched by the form builder when loading a - custom widget plugin. - - \sa setPluginPath(), clearPluginPaths() -*/ -void QFormBuilder::addPluginPath(const QString &pluginPath) -{ - d->m_pluginPaths.append(pluginPath); - updateCustomWidgets(); -} - -/*! - Sets the list of plugin paths to the list specified by \a pluginPaths. - - \sa addPluginPath() -*/ -void QFormBuilder::setPluginPath(const QStringList &pluginPaths) -{ - d->m_pluginPaths = pluginPaths; - updateCustomWidgets(); -} - -static void insertPlugins(QObject *o, QMap *customWidgets) -{ - // step 1) try with a normal plugin - if (QDesignerCustomWidgetInterface *iface = qobject_cast(o)) { - customWidgets->insert(iface->name(), iface); - return; - } - // step 2) try with a collection of plugins - if (QDesignerCustomWidgetCollectionInterface *c = qobject_cast(o)) { - foreach (QDesignerCustomWidgetInterface *iface, c->customWidgets()) - customWidgets->insert(iface->name(), iface); - } -} - -/*! - \internal -*/ -void QFormBuilder::updateCustomWidgets() -{ - d->m_customWidgets.clear(); - - foreach (const QString &path, d->m_pluginPaths) { - const QDir dir(path); - const QStringList candidates = dir.entryList(QDir::Files); - - foreach (const QString &plugin, candidates) { - if (!QLibrary::isLibrary(plugin)) - continue; - - QString loaderPath = path; - loaderPath += QLatin1Char('/'); - loaderPath += plugin; - - QPluginLoader loader(loaderPath); - if (loader.load()) - insertPlugins(loader.instance(), &d->m_customWidgets); - } - } - // Check statically linked plugins - const QObjectList staticPlugins = QPluginLoader::staticInstances(); - if (!staticPlugins.empty()) - foreach (QObject *o, staticPlugins) - insertPlugins(o, &d->m_customWidgets); -} - -/*! - \fn QList QFormBuilder::customWidgets() const - - Returns a list of the available plugins. -*/ -QList QFormBuilder::customWidgets() const -{ - return d->m_customWidgets.values(); -} - -/*! - \internal -*/ - -void QFormBuilder::applyProperties(QObject *o, const QList &properties) -{ - typedef QList DomPropertyList; - - if (properties.empty()) - return; - - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - - const DomPropertyList::const_iterator cend = properties.constEnd(); - for (DomPropertyList::const_iterator it = properties.constBegin(); it != cend; ++it) { - const QVariant v = toVariant(o->metaObject(), *it); - if (v.isNull()) - continue; - - const QString attributeName = (*it)->attributeName(); - const bool isWidget = o->isWidgetType(); - if (isWidget && o->parent() == d->parentWidget() && attributeName == strings.geometryProperty) { - // apply only the size part of a geometry for the root widget - static_cast(o)->resize(qvariant_cast(v).size()); - } else if (d->applyPropertyInternally(o, attributeName, v)) { - } else if (isWidget && !qstrcmp("QFrame", o->metaObject()->className ()) && attributeName == strings.orientationProperty) { - // ### special-casing for Line (QFrame) -- try to fix me - o->setProperty("frameShape", v); // v is of QFrame::Shape enum - } else { - o->setProperty(attributeName.toUtf8(), v); - } - } -} - -#ifdef QFORMINTERNAL_NAMESPACE -} // namespace QFormInternal -#endif - -QT_END_NAMESPACE diff --git a/tools/uilib/formbuilder.h b/tools/uilib/formbuilder.h deleted file mode 100644 index b94db06ebd..0000000000 --- a/tools/uilib/formbuilder.h +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef FORMBUILDER_H -#define FORMBUILDER_H - -#include "uilib_global.h" -#include "abstractformbuilder.h" - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE -#if 0 -// pragma for syncqt, don't remove. - -#pragma qt_class(QFormBuilder) -#endif - -class QDesignerCustomWidgetInterface; - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal -{ -#endif - -class QDESIGNER_UILIB_EXPORT QFormBuilder: public QAbstractFormBuilder -{ -public: - QFormBuilder(); - virtual ~QFormBuilder(); - - QStringList pluginPaths() const; - - void clearPluginPaths(); - void addPluginPath(const QString &pluginPath); - void setPluginPath(const QStringList &pluginPaths); - - QList customWidgets() const; - -protected: - virtual QWidget *create(DomUI *ui, QWidget *parentWidget); - virtual QWidget *create(DomWidget *ui_widget, QWidget *parentWidget); - virtual QLayout *create(DomLayout *ui_layout, QLayout *layout, QWidget *parentWidget); - virtual QLayoutItem *create(DomLayoutItem *ui_layoutItem, QLayout *layout, QWidget *parentWidget); - virtual QAction *create(DomAction *ui_action, QObject *parent); - virtual QActionGroup *create(DomActionGroup *ui_action_group, QObject *parent); - - virtual QWidget *createWidget(const QString &widgetName, QWidget *parentWidget, const QString &name); - virtual QLayout *createLayout(const QString &layoutName, QObject *parent, const QString &name); - - virtual void createConnections(DomConnections *connections, QWidget *widget); - - virtual bool addItem(DomLayoutItem *ui_item, QLayoutItem *item, QLayout *layout); - virtual bool addItem(DomWidget *ui_widget, QWidget *widget, QWidget *parentWidget); - - virtual void updateCustomWidgets(); - virtual void applyProperties(QObject *o, const QList &properties); - - static QWidget *widgetByName(QWidget *topLevel, const QString &name); - -private: -}; - -#ifdef QFORMINTERNAL_NAMESPACE -} -#endif - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // FORMBUILDER_H diff --git a/tools/uilib/formbuilderextra.cpp b/tools/uilib/formbuilderextra.cpp deleted file mode 100644 index 3d34a20bff..0000000000 --- a/tools/uilib/formbuilderextra.cpp +++ /dev/null @@ -1,533 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "formbuilderextra_p.h" -#include "abstractformbuilder.h" -#include "resourcebuilder_p.h" -#include "textbuilder_p.h" -#include "ui4_p.h" - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -QT_BEGIN_NAMESPACE - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal { -#endif - -void uiLibWarning(const QString &message) { - qWarning("Designer: %s", qPrintable(message)); -} - - -QFormBuilderExtra::CustomWidgetData::CustomWidgetData() : - isContainer(false) -{ -} - -QFormBuilderExtra::CustomWidgetData::CustomWidgetData(const DomCustomWidget *dcw) : - addPageMethod(dcw->elementAddPageMethod()), - baseClass(dcw->elementExtends()), - isContainer(dcw->hasElementContainer() && dcw->elementContainer() != 0) -{ -#ifndef QT_FORMBUILDER_NO_SCRIPT - if (const DomScript *domScript = dcw->elementScript()) - script = domScript->text(); -#endif -} - -QFormBuilderExtra::QFormBuilderExtra() : - m_defaultMargin(INT_MIN), - m_defaultSpacing(INT_MIN), - m_language(QLatin1String("c++")), - m_layoutWidget(false), - m_resourceBuilder(0), - m_textBuilder(0) -{ -} - -QFormBuilderExtra::~QFormBuilderExtra() -{ - clearResourceBuilder(); - clearTextBuilder(); -} - -void QFormBuilderExtra::clear() -{ - m_buddies.clear(); - m_parentWidget = 0; - m_parentWidgetIsSet = false; -#ifndef QT_FORMBUILDER_NO_SCRIPT - m_FormScriptRunner.clearErrors(); -#endif - m_customWidgetDataHash.clear(); - m_buttonGroups.clear(); -} - - -bool QFormBuilderExtra::applyPropertyInternally(QObject *o, const QString &propertyName, const QVariant &value) -{ - // Store buddies and apply them later on as the widgets might not exist yet. - QLabel *label = qobject_cast(o); - if (!label || propertyName != QFormBuilderStrings::instance().buddyProperty) - return false; - - m_buddies.insert(label, value.toString()); - return true; -} - -void QFormBuilderExtra::applyInternalProperties() const -{ - if (m_buddies.empty()) - return; - - const BuddyHash::const_iterator cend = m_buddies.constEnd(); - for (BuddyHash::const_iterator it = m_buddies.constBegin(); it != cend; ++it ) - applyBuddy(it.value(), BuddyApplyAll, it.key()); -} - -bool QFormBuilderExtra::applyBuddy(const QString &buddyName, BuddyMode applyMode, QLabel *label) -{ - if (buddyName.isEmpty()) { - label->setBuddy(0); - return false; - } - - const QWidgetList widgets = label->topLevelWidget()->findChildren(buddyName); - if (widgets.empty()) { - label->setBuddy(0); - return false; - } - - const QWidgetList::const_iterator cend = widgets.constEnd(); - for ( QWidgetList::const_iterator it = widgets.constBegin(); it != cend; ++it) { - if (applyMode == BuddyApplyAll || !(*it)->isHidden()) { - label->setBuddy(*it); - return true; - } - } - - label->setBuddy(0); - return false; -} - -const QPointer &QFormBuilderExtra::parentWidget() const -{ - return m_parentWidget; -} - -bool QFormBuilderExtra::parentWidgetIsSet() const -{ - return m_parentWidgetIsSet; -} - -void QFormBuilderExtra::setParentWidget(const QPointer &w) -{ - // Parent widget requires special handling of the geometry property. - m_parentWidget = w; - m_parentWidgetIsSet = true; -} - -#ifndef QT_FORMBUILDER_NO_SCRIPT -QFormScriptRunner &QFormBuilderExtra::formScriptRunner() -{ - return m_FormScriptRunner; -} - -QString QFormBuilderExtra::customWidgetScript(const QString &className) const -{ - const QHash::const_iterator it = m_customWidgetDataHash.constFind(className); - if (it != m_customWidgetDataHash.constEnd()) - return it.value().script; - return QString(); -} - -#endif - -void QFormBuilderExtra::storeCustomWidgetData(const QString &className, const DomCustomWidget *d) -{ - if (d) - m_customWidgetDataHash.insert(className, CustomWidgetData(d)); -} - -QString QFormBuilderExtra::customWidgetBaseClass(const QString &className) const -{ - const QHash::const_iterator it = m_customWidgetDataHash.constFind(className); - if (it != m_customWidgetDataHash.constEnd()) - return it.value().baseClass; - return QString(); -} - -QString QFormBuilderExtra::customWidgetAddPageMethod(const QString &className) const -{ - const QHash::const_iterator it = m_customWidgetDataHash.constFind(className); - if (it != m_customWidgetDataHash.constEnd()) - return it.value().addPageMethod; - return QString(); -} - -bool QFormBuilderExtra::isCustomWidgetContainer(const QString &className) const -{ - const QHash::const_iterator it = m_customWidgetDataHash.constFind(className); - if (it != m_customWidgetDataHash.constEnd()) - return it.value().isContainer; - return false; -} - -void QFormBuilderExtra::setProcessingLayoutWidget(bool processing) -{ - m_layoutWidget = processing; -} - - bool QFormBuilderExtra::processingLayoutWidget() const -{ - return m_layoutWidget; -} -void QFormBuilderExtra::setResourceBuilder(QResourceBuilder *builder) -{ - if (m_resourceBuilder == builder) - return; - clearResourceBuilder(); - m_resourceBuilder = builder; -} - -QResourceBuilder *QFormBuilderExtra::resourceBuilder() const -{ - return m_resourceBuilder; -} - -void QFormBuilderExtra::clearResourceBuilder() -{ - if (m_resourceBuilder) { - delete m_resourceBuilder; - m_resourceBuilder = 0; - } -} - -void QFormBuilderExtra::setTextBuilder(QTextBuilder *builder) -{ - if (m_textBuilder == builder) - return; - clearTextBuilder(); - m_textBuilder = builder; -} - -QTextBuilder *QFormBuilderExtra::textBuilder() const -{ - return m_textBuilder; -} - -void QFormBuilderExtra::clearTextBuilder() -{ - if (m_textBuilder) { - delete m_textBuilder; - m_textBuilder = 0; - } -} - -void QFormBuilderExtra::registerButtonGroups(const DomButtonGroups *domGroups) -{ - typedef QList DomButtonGroupList; - const DomButtonGroupList domGroupList = domGroups->elementButtonGroup(); - const DomButtonGroupList::const_iterator cend = domGroupList.constEnd(); - for (DomButtonGroupList::const_iterator it = domGroupList.constBegin(); it != cend; ++it) { - DomButtonGroup *domGroup = *it; - m_buttonGroups.insert(domGroup->attributeName(), ButtonGroupEntry(domGroup, 0)); - } -} - -// Utilities for parsing per-cell integer properties that have setters and -// getters of the form 'setX(int idx, int value)' and 'x(int index)' -// (converting them to comma-separated string lists and back). -// Used for layout stretch and grid per-row/column properties. - -// Format a list of cell-properties of one dimension as a ','-separated list -template -inline QString perCellPropertyToString(const Layout *l, int count, int (Layout::*getter)(int) const) -{ - if (count == 0) - return QString(); - QString rc; - { - QTextStream str(&rc); - for (int i = 0; i < count; i++) { - if (i) - str << QLatin1Char(','); - str << (l->*getter)(i); - } - } - return rc; -} - -// Clear the property, set all cells to 0 - -template -inline void clearPerCellValue(Layout *l, int count, void (Layout::*setter)(int,int), int value = 0) -{ - for (int i = 0; i < count; i++) - (l->*setter)(i, value); -} - -// Parse and set the property from a comma-separated list - -template -inline bool parsePerCellProperty(Layout *l, int count, void (Layout::*setter)(int,int), const QString &s, int defaultValue = 0) -{ - if (s.isEmpty()) { - clearPerCellValue(l, count, setter, defaultValue); - return true; - } - const QStringList list = s.split(QLatin1Char(',')); - if (list.empty()) { - clearPerCellValue(l, count, setter, defaultValue); - return true; - } - // Apply all values contained in list - const int ac = qMin(count, list.size()); - bool ok; - int i = 0; - for ( ; i < ac; i++) { - const int value = list.at(i).toInt(&ok); - if (!ok || value < 0) - return false; - (l->*setter)(i, value); - } - // Clear rest - for ( ; i < count; i++) - (l->*setter)(i, defaultValue); - return true; -} - -// Read and write stretch -static QString msgInvalidStretch(const QString &objectName, const QString &stretch) -{ - //: Parsing layout stretch values - return QCoreApplication::translate("FormBuilder", "Invalid stretch value for '%1': '%2'").arg(objectName, stretch); -} - -QString QFormBuilderExtra::boxLayoutStretch(const QBoxLayout *box) -{ - return perCellPropertyToString(box, box->count(), &QBoxLayout::stretch); -} - -bool QFormBuilderExtra::setBoxLayoutStretch(const QString &s, QBoxLayout *box) -{ - const bool rc = parsePerCellProperty(box, box->count(), &QBoxLayout::setStretch, s); - if (!rc) - uiLibWarning(msgInvalidStretch(box->objectName(), s)); - return rc; -} - -void QFormBuilderExtra::clearBoxLayoutStretch(QBoxLayout *box) -{ - clearPerCellValue(box, box->count(), &QBoxLayout::setStretch); -} - -QString QFormBuilderExtra::gridLayoutRowStretch(const QGridLayout *grid) -{ - return perCellPropertyToString(grid, grid->rowCount(), &QGridLayout::rowStretch); -} - -bool QFormBuilderExtra::setGridLayoutRowStretch(const QString &s, QGridLayout *grid) -{ - const bool rc = parsePerCellProperty(grid, grid->rowCount(), &QGridLayout::setRowStretch, s); - if (!rc) - uiLibWarning(msgInvalidStretch(grid->objectName(), s)); - return rc; -} - -void QFormBuilderExtra::clearGridLayoutRowStretch(QGridLayout *grid) -{ - clearPerCellValue(grid, grid->rowCount(), &QGridLayout::setRowStretch); -} - -QString QFormBuilderExtra::gridLayoutColumnStretch(const QGridLayout *grid) -{ - return perCellPropertyToString(grid, grid->columnCount(), &QGridLayout::columnStretch); -} - -bool QFormBuilderExtra::setGridLayoutColumnStretch(const QString &s, QGridLayout *grid) -{ - const bool rc = parsePerCellProperty(grid, grid->columnCount(), &QGridLayout::setColumnStretch, s); - if (!rc) - uiLibWarning(msgInvalidStretch(grid->objectName(), s)); - return rc; -} - -void QFormBuilderExtra::clearGridLayoutColumnStretch(QGridLayout *grid) -{ - clearPerCellValue(grid, grid->columnCount(), &QGridLayout::setColumnStretch); -} - -// Read and write grid layout row/column size limits - -static QString msgInvalidMinimumSize(const QString &objectName, const QString &ms) -{ - //: Parsing grid layout minimum size values - return QCoreApplication::translate("FormBuilder", "Invalid minimum size for '%1': '%2'").arg(objectName, ms); -} - -QString QFormBuilderExtra::gridLayoutRowMinimumHeight(const QGridLayout *grid) -{ - return perCellPropertyToString(grid, grid->rowCount(), &QGridLayout::rowMinimumHeight); -} - -bool QFormBuilderExtra::setGridLayoutRowMinimumHeight(const QString &s, QGridLayout *grid) -{ - const bool rc = parsePerCellProperty(grid, grid->rowCount(), &QGridLayout::setRowMinimumHeight, s); - if (!rc) - uiLibWarning(msgInvalidMinimumSize(grid->objectName(), s)); - return rc; -} - -void QFormBuilderExtra::clearGridLayoutRowMinimumHeight(QGridLayout *grid) -{ - clearPerCellValue(grid, grid->rowCount(), &QGridLayout::setRowMinimumHeight); -} - -QString QFormBuilderExtra::gridLayoutColumnMinimumWidth(const QGridLayout *grid) -{ - return perCellPropertyToString(grid, grid->columnCount(), &QGridLayout::columnMinimumWidth); -} - -bool QFormBuilderExtra::setGridLayoutColumnMinimumWidth(const QString &s, QGridLayout *grid) -{ - const bool rc = parsePerCellProperty(grid, grid->columnCount(), &QGridLayout::setColumnMinimumWidth, s); - if (!rc) - uiLibWarning(msgInvalidMinimumSize(grid->objectName(), s)); - return rc; -} - -void QFormBuilderExtra::clearGridLayoutColumnMinimumWidth(QGridLayout *grid) -{ - clearPerCellValue(grid, grid->columnCount(), &QGridLayout::setColumnMinimumWidth); -} - -// ------------ QFormBuilderStrings - -QFormBuilderStrings::QFormBuilderStrings() : - buddyProperty(QLatin1String("buddy")), - cursorProperty(QLatin1String("cursor")), - objectNameProperty(QLatin1String("objectName")), - trueValue(QLatin1String("true")), - falseValue(QLatin1String("false")), - horizontalPostFix(QLatin1String("Horizontal")), - separator(QLatin1String("separator")), - defaultTitle(QLatin1String("Page")), - titleAttribute(QLatin1String("title")), - labelAttribute(QLatin1String("label")), - toolTipAttribute(QLatin1String("toolTip")), - whatsThisAttribute(QLatin1String("whatsThis")), - flagsAttribute(QLatin1String("flags")), - iconAttribute(QLatin1String("icon")), - pixmapAttribute(QLatin1String("pixmap")), - textAttribute(QLatin1String("text")), - currentIndexProperty(QLatin1String("currentIndex")), - toolBarAreaAttribute(QLatin1String("toolBarArea")), - toolBarBreakAttribute(QLatin1String("toolBarBreak")), - dockWidgetAreaAttribute(QLatin1String("dockWidgetArea")), - marginProperty(QLatin1String("margin")), - spacingProperty(QLatin1String("spacing")), - leftMarginProperty(QLatin1String("leftMargin")), - topMarginProperty(QLatin1String("topMargin")), - rightMarginProperty(QLatin1String("rightMargin")), - bottomMarginProperty(QLatin1String("bottomMargin")), - horizontalSpacingProperty(QLatin1String("horizontalSpacing")), - verticalSpacingProperty(QLatin1String("verticalSpacing")), - sizeHintProperty(QLatin1String("sizeHint")), - sizeTypeProperty(QLatin1String("sizeType")), - orientationProperty(QLatin1String("orientation")), - styleSheetProperty(QLatin1String("styleSheet")), - qtHorizontal(QLatin1String("Qt::Horizontal")), - qtVertical(QLatin1String("Qt::Vertical")), - currentRowProperty(QLatin1String("currentRow")), - tabSpacingProperty(QLatin1String("tabSpacing")), - qWidgetClass(QLatin1String("QWidget")), - lineClass(QLatin1String("Line")), - geometryProperty(QLatin1String("geometry")), - scriptWidgetVariable(QLatin1String("widget")), - scriptChildWidgetsVariable(QLatin1String("childWidgets")) -{ - itemRoles.append(qMakePair(Qt::FontRole, QString::fromLatin1("font"))); - itemRoles.append(qMakePair(Qt::TextAlignmentRole, QString::fromLatin1("textAlignment"))); - itemRoles.append(qMakePair(Qt::BackgroundRole, QString::fromLatin1("background"))); - itemRoles.append(qMakePair(Qt::ForegroundRole, QString::fromLatin1("foreground"))); - itemRoles.append(qMakePair(Qt::CheckStateRole, QString::fromLatin1("checkState"))); - - foreach (const RoleNName &it, itemRoles) - treeItemRoleHash.insert(it.second, it.first); - - itemTextRoles.append(qMakePair(qMakePair(Qt::EditRole, Qt::DisplayPropertyRole), - textAttribute)); // This must be first for the loop below - itemTextRoles.append(qMakePair(qMakePair(Qt::ToolTipRole, Qt::ToolTipPropertyRole), - toolTipAttribute)); - itemTextRoles.append(qMakePair(qMakePair(Qt::StatusTipRole, Qt::StatusTipPropertyRole), - QString::fromLatin1("statusTip"))); - itemTextRoles.append(qMakePair(qMakePair(Qt::WhatsThisRole, Qt::WhatsThisPropertyRole), - whatsThisAttribute)); - - // Note: this skips the first item! - QList::const_iterator it = itemTextRoles.constBegin(), end = itemTextRoles.constEnd(); - while (++it != end) - treeItemTextRoleHash.insert(it->second, it->first); -} - -const QFormBuilderStrings &QFormBuilderStrings::instance() -{ - static const QFormBuilderStrings rc; - return rc; -} - -#ifdef QFORMINTERNAL_NAMESPACE -} // namespace QFormInternal -#endif - -QT_END_NAMESPACE diff --git a/tools/uilib/formbuilderextra_p.h b/tools/uilib/formbuilderextra_p.h deleted file mode 100644 index 20516a5489..0000000000 --- a/tools/uilib/formbuilderextra_p.h +++ /dev/null @@ -1,276 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef ABSTRACTFORMBUILDERPRIVATE_H -#define ABSTRACTFORMBUILDERPRIVATE_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "uilib_global.h" - -#ifndef QT_FORMBUILDER_NO_SCRIPT -# include "formscriptrunner_p.h" -#endif - -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QDesignerCustomWidgetInterface; -class QObject; -class QVariant; -class QWidget; -class QObject; -class QLabel; -class QButtonGroup; -class QBoxLayout; -class QGridLayout; -class QAction; -class QActionGroup; - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal -{ -#endif - -class DomButtonGroups; -class DomButtonGroup; -class DomCustomWidget; - -class QAbstractFormBuilder; -class QResourceBuilder; -class QTextBuilder; - -class QDESIGNER_UILIB_EXPORT QFormBuilderExtra -{ -public: - QFormBuilderExtra(); - ~QFormBuilderExtra(); - - struct CustomWidgetData { - CustomWidgetData(); - explicit CustomWidgetData(const DomCustomWidget *dc); - - QString addPageMethod; - QString script; - QString baseClass; - bool isContainer; - }; - - void clear(); - - bool applyPropertyInternally(QObject *o, const QString &propertyName, const QVariant &value); - - enum BuddyMode { BuddyApplyAll, BuddyApplyVisibleOnly }; - - void applyInternalProperties() const; - static bool applyBuddy(const QString &buddyName, BuddyMode applyMode, QLabel *label); - - const QPointer &parentWidget() const; - bool parentWidgetIsSet() const; - void setParentWidget(const QPointer &w); - -#ifndef QT_FORMBUILDER_NO_SCRIPT - QFormScriptRunner &formScriptRunner(); - QString customWidgetScript(const QString &className) const; -#endif - - void setProcessingLayoutWidget(bool processing); - bool processingLayoutWidget() const; - - void setResourceBuilder(QResourceBuilder *builder); - QResourceBuilder *resourceBuilder() const; - - void setTextBuilder(QTextBuilder *builder); - QTextBuilder *textBuilder() const; - - void storeCustomWidgetData(const QString &className, const DomCustomWidget *d); - QString customWidgetAddPageMethod(const QString &className) const; - QString customWidgetBaseClass(const QString &className) const; - bool isCustomWidgetContainer(const QString &className) const; - - // --- Hash used in creating button groups on demand. Store a map of name and pair of dom group and real group - void registerButtonGroups(const DomButtonGroups *groups); - - typedef QPair ButtonGroupEntry; - typedef QHash ButtonGroupHash; - const ButtonGroupHash &buttonGroups() const { return m_buttonGroups; } - ButtonGroupHash &buttonGroups() { return m_buttonGroups; } - - // return stretch as a comma-separated list - static QString boxLayoutStretch(const QBoxLayout*); - // apply stretch - static bool setBoxLayoutStretch(const QString &, QBoxLayout*); - static void clearBoxLayoutStretch(QBoxLayout*); - - static QString gridLayoutRowStretch(const QGridLayout *); - static bool setGridLayoutRowStretch(const QString &, QGridLayout *); - static void clearGridLayoutRowStretch(QGridLayout *); - - static QString gridLayoutColumnStretch(const QGridLayout *); - static bool setGridLayoutColumnStretch(const QString &, QGridLayout *); - static void clearGridLayoutColumnStretch(QGridLayout *); - - // return the row/column sizes as comma-separated lists - static QString gridLayoutRowMinimumHeight(const QGridLayout *); - static bool setGridLayoutRowMinimumHeight(const QString &, QGridLayout *); - static void clearGridLayoutRowMinimumHeight(QGridLayout *); - - static QString gridLayoutColumnMinimumWidth(const QGridLayout *); - static bool setGridLayoutColumnMinimumWidth(const QString &, QGridLayout *); - static void clearGridLayoutColumnMinimumWidth(QGridLayout *); - - QStringList m_pluginPaths; - QMap m_customWidgets; - - QHash m_laidout; - QHash m_actions; - QHash m_actionGroups; - int m_defaultMargin; - int m_defaultSpacing; - QDir m_workingDirectory; - QString m_errorString; - QString m_language; - -private: - void clearResourceBuilder(); - void clearTextBuilder(); - - typedef QHash BuddyHash; - BuddyHash m_buddies; - -#ifndef QT_FORMBUILDER_NO_SCRIPT - QFormScriptRunner m_FormScriptRunner; -#endif - - QHash m_customWidgetDataHash; - - ButtonGroupHash m_buttonGroups; - - bool m_layoutWidget; - QResourceBuilder *m_resourceBuilder; - QTextBuilder *m_textBuilder; - - QPointer m_parentWidget; - bool m_parentWidgetIsSet; -}; - -void uiLibWarning(const QString &message); - -// Struct with static accessor that provides most strings used in the form builder. -struct QDESIGNER_UILIB_EXPORT QFormBuilderStrings { - QFormBuilderStrings(); - - static const QFormBuilderStrings &instance(); - - const QString buddyProperty; - const QString cursorProperty; - const QString objectNameProperty; - const QString trueValue; - const QString falseValue; - const QString horizontalPostFix; - const QString separator; - const QString defaultTitle; - const QString titleAttribute; - const QString labelAttribute; - const QString toolTipAttribute; - const QString whatsThisAttribute; - const QString flagsAttribute; - const QString iconAttribute; - const QString pixmapAttribute; - const QString textAttribute; - const QString currentIndexProperty; - const QString toolBarAreaAttribute; - const QString toolBarBreakAttribute; - const QString dockWidgetAreaAttribute; - const QString marginProperty; - const QString spacingProperty; - const QString leftMarginProperty; - const QString topMarginProperty; - const QString rightMarginProperty; - const QString bottomMarginProperty; - const QString horizontalSpacingProperty; - const QString verticalSpacingProperty; - const QString sizeHintProperty; - const QString sizeTypeProperty; - const QString orientationProperty; - const QString styleSheetProperty; - const QString qtHorizontal; - const QString qtVertical; - const QString currentRowProperty; - const QString tabSpacingProperty; - const QString qWidgetClass; - const QString lineClass; - const QString geometryProperty; - const QString scriptWidgetVariable; - const QString scriptChildWidgetsVariable; - - typedef QPair RoleNName; - QList itemRoles; - QHash treeItemRoleHash; - - // first.first is primary role, first.second is shadow role. - // Shadow is used for either the translation source or the designer - // representation of the string value. - typedef QPair, QString> TextRoleNName; - QList itemTextRoles; - QHash > treeItemTextRoleHash; -}; -#ifdef QFORMINTERNAL_NAMESPACE -} -#endif - -QT_END_NAMESPACE - -#endif // ABSTRACTFORMBUILDERPRIVATE_H diff --git a/tools/uilib/formscriptrunner.cpp b/tools/uilib/formscriptrunner.cpp deleted file mode 100644 index 8efb12f9e3..0000000000 --- a/tools/uilib/formscriptrunner.cpp +++ /dev/null @@ -1,208 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "formscriptrunner_p.h" -#include "formbuilderextra_p.h" -#include "ui4_p.h" - -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -namespace { - enum { debugFormScriptRunner = 0 }; -} - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal { -#endif - -class QFormScriptRunner::QFormScriptRunnerPrivate { -public: - QFormScriptRunnerPrivate() : m_options(DisableScripts) {} - void clearErrors() { m_errors.clear(); } - - bool run(const QString &script, QWidget *widget, const WidgetList &children, QString *errorMessage); - - static void initializeEngine(QWidget *w, const WidgetList &children, QScriptEngine &scriptEngine); - static QString engineError(QScriptEngine &scriptEngine); - - Options options() const { return m_options; } - void setOptions(Options options) { m_options = options; } - - Errors errors() const { return m_errors; } -private: - QScriptEngine m_scriptEngine; - Options m_options; - Errors m_errors; -}; - -bool QFormScriptRunner::QFormScriptRunnerPrivate::run(const QString &script, QWidget *widget, const WidgetList &children, QString *errorMessage) { - bool rc = false; - initializeEngine(widget, children, m_scriptEngine); - - do { - m_scriptEngine.evaluate(script); - if (m_scriptEngine.hasUncaughtException ()) { - *errorMessage = QCoreApplication::tr("Exception at line %1: %2").arg(m_scriptEngine.uncaughtExceptionLineNumber()).arg(engineError(m_scriptEngine)); - break; - } - rc = true; - } while (false); - m_scriptEngine.popContext(); - - if (!rc) { - Error error; - error.objectName = widget->objectName(); - error.script = script; - error.errorMessage = *errorMessage; - m_errors.push_back(error); - } - return rc; -} - -void QFormScriptRunner::QFormScriptRunnerPrivate::initializeEngine(QWidget *w, const WidgetList &children, QScriptEngine &scriptEngine) { - // Populate the script variables. This pushes a context which must be popped. - QScriptContext *ctx = scriptEngine.pushContext(); - QScriptValue widgetObject = scriptEngine.newQObject(w); - QScriptValue childrenArray = scriptEngine.newArray (children.size()); - - for(int i = 0; i < children.size(); i++) { - childrenArray.setProperty(i, scriptEngine.newQObject(children[i])); - } - - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - ctx ->activationObject().setProperty(strings.scriptWidgetVariable, widgetObject); - ctx ->activationObject().setProperty(strings.scriptChildWidgetsVariable, childrenArray); -} - -QString QFormScriptRunner::QFormScriptRunnerPrivate::engineError(QScriptEngine &scriptEngine) { - QScriptValue error = scriptEngine.evaluate(QLatin1String("Error")); - if (error.isValid()) - return error.toString(); - return QCoreApplication::tr("Unknown error"); -} -// -- QFormScriptRunner - -QFormScriptRunner::QFormScriptRunner() : m_impl(new QFormScriptRunnerPrivate) -{ -} - -QFormScriptRunner::~QFormScriptRunner() -{ - delete m_impl; -} - -bool QFormScriptRunner::run(const DomWidget *domWidget, - const QString &customWidgetScript, - QWidget *widget, const WidgetList &children, - QString *errorMessage) -{ - typedef QList DomScripts; - - const Options scriptOptions = m_impl->options(); - if (scriptOptions & DisableScripts) - return true; - // get list - const DomScripts domScripts = domWidget->elementScript(); - // Concatenate snippets, starting with custom widget script - QString script = customWidgetScript; - if (script.isEmpty() && domScripts.empty()) - return true; - - foreach (const DomScript *scriptSnippet, domScripts) { - // Ensure new line - if (!script.isEmpty() && !script.endsWith(QLatin1Char('\n'))) - script += QLatin1Char('\n'); - script += scriptSnippet->text(); - } - - if (script.isEmpty()) - return true; - - const bool rc = m_impl->run(script, widget, children, errorMessage); - - if (debugFormScriptRunner) { - qDebug() << "For " << widget << " with " << children.size() << " children, ran: " << script; - if (!rc) - qDebug() << *errorMessage; - } - - if (!rc) { - if (!(scriptOptions & DisableWarnings)) { - const QString message = QCoreApplication::tr("An error occurred while running the script for %1: %2\nScript: %3"). - arg(widget->objectName()).arg(*errorMessage).arg(script); - qWarning() << message; - } - } - return rc; -} - -QFormScriptRunner::Options QFormScriptRunner::options() const -{ - return m_impl->options(); -} - -void QFormScriptRunner::setOptions(Options options) -{ - m_impl->setOptions(options); -} - - -QFormScriptRunner::Errors QFormScriptRunner::errors() const -{ - return m_impl->errors(); -} - -void QFormScriptRunner::clearErrors() -{ - m_impl->clearErrors(); -} - - -#ifdef QFORMINTERNAL_NAMESPACE -} // namespace QFormInternal -#endif - -QT_END_NAMESPACE diff --git a/tools/uilib/formscriptrunner_p.h b/tools/uilib/formscriptrunner_p.h deleted file mode 100644 index f0a6a368c7..0000000000 --- a/tools/uilib/formscriptrunner_p.h +++ /dev/null @@ -1,120 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef FORMSCRIPTRUNNER_H -#define FORMSCRIPTRUNNER_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "uilib_global.h" -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QWidget; - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal -{ -#endif - -class DomWidget; - -class QDESIGNER_UILIB_EXPORT QFormScriptRunner -{ -public: - QFormScriptRunner(); - ~QFormScriptRunner(); - - typedef QList WidgetList; - - bool run(const DomWidget *domWidget, - const QString &customWidgetScript, - QWidget *widget, const WidgetList &children, - QString *errorMessage); - - struct Error { - QString objectName; - QString script; - QString errorMessage; - }; - typedef QList Errors; - Errors errors() const; - void clearErrors(); - - enum Option { - NoOptions = 0x0, - DisableWarnings = 0x1, - DisableScripts = 02 - }; - Q_DECLARE_FLAGS(Options, Option) - - Options options() const; - void setOptions(Options options); - -private: - class QFormScriptRunnerPrivate; - QFormScriptRunnerPrivate *m_impl; - - QFormScriptRunner(const QFormScriptRunner &); - void operator = (const QFormScriptRunner &); -}; - -Q_DECLARE_OPERATORS_FOR_FLAGS(QFormScriptRunner::Options) - -#ifdef QFORMINTERNAL_NAMESPACE -} -#endif - -QT_END_NAMESPACE - -#endif // FORMSCRIPTRUNNER_H diff --git a/tools/uilib/properties.cpp b/tools/uilib/properties.cpp deleted file mode 100644 index 88cd455d65..0000000000 --- a/tools/uilib/properties.cpp +++ /dev/null @@ -1,681 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "properties_p.h" -#include "ui4_p.h" -#include "abstractformbuilder.h" -#include "formbuilderextra_p.h" -#include "resourcebuilder_p.h" - -#include -#include -#include - -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal -{ -#endif - -static inline void fixEnum(QString &s) -{ - int qualifierIndex = s.lastIndexOf(QLatin1Char(':')); - if (qualifierIndex == -1) - qualifierIndex = s.lastIndexOf(QLatin1Char('.')); - if (qualifierIndex != -1) - s.remove(0, qualifierIndex + 1); -} -// Convert complex DOM types with the help of QAbstractFormBuilder -QVariant domPropertyToVariant(QAbstractFormBuilder *afb,const QMetaObject *meta,const DomProperty *p) -{ - // Complex types that need functions from QAbstractFormBuilder - switch(p->kind()) { - case DomProperty::String: { - const int index = meta->indexOfProperty(p->attributeName().toUtf8()); - if (index != -1 && meta->property(index).type() == QVariant::KeySequence) - return QVariant::fromValue(QKeySequence(p->elementString()->text())); - } - break; - - case DomProperty::Palette: { - const DomPalette *dom = p->elementPalette(); - QPalette palette; - - if (dom->elementActive()) - afb->setupColorGroup(palette, QPalette::Active, dom->elementActive()); - - if (dom->elementInactive()) - afb->setupColorGroup(palette, QPalette::Inactive, dom->elementInactive()); - - if (dom->elementDisabled()) - afb->setupColorGroup(palette, QPalette::Disabled, dom->elementDisabled()); - - palette.setCurrentColorGroup(QPalette::Active); - return QVariant::fromValue(palette); - } - - case DomProperty::Set: { - const QByteArray pname = p->attributeName().toUtf8(); - const int index = meta->indexOfProperty(pname); - if (index == -1) { - uiLibWarning(QCoreApplication::translate("QFormBuilder", "The set-type property %1 could not be read.").arg(p->attributeName())); - return QVariant(); - } - - const QMetaEnum e = meta->property(index).enumerator(); - Q_ASSERT(e.isFlag() == true); - return QVariant(e.keysToValue(p->elementSet().toUtf8())); - } - - case DomProperty::Enum: { - const QByteArray pname = p->attributeName().toUtf8(); - const int index = meta->indexOfProperty(pname); - QString enumValue = p->elementEnum(); - // Triggers in case of objects in Designer like Spacer/Line for which properties - // are serialized using language introspection. On preview, however, these objects are - // emulated by hacks in the formbuilder (size policy/orientation) - fixEnum(enumValue); - if (index == -1) { - // ### special-casing for Line (QFrame) -- fix for 4.2. Jambi hack for enumerations - if (!qstrcmp(meta->className(), "QFrame") - && (pname == QByteArray("orientation"))) { - return QVariant(enumValue == QFormBuilderStrings::instance().horizontalPostFix ? QFrame::HLine : QFrame::VLine); - } else { - uiLibWarning(QCoreApplication::translate("QFormBuilder", "The enumeration-type property %1 could not be read.").arg(p->attributeName())); - return QVariant(); - } - } - - const QMetaEnum e = meta->property(index).enumerator(); - return QVariant(e.keyToValue(enumValue.toUtf8())); - } - case DomProperty::Brush: - return QVariant::fromValue(afb->setupBrush(p->elementBrush())); - default: - if (afb->resourceBuilder()->isResourceProperty(p)) { - return afb->resourceBuilder()->loadResource(afb->workingDirectory(), p); - } - - break; - } - - // simple type - return domPropertyToVariant(p); -} - -// Convert simple DOM types -QVariant domPropertyToVariant(const DomProperty *p) -{ - // requires non-const virtual nameToIcon, etc. - switch(p->kind()) { - case DomProperty::Bool: - return QVariant(p->elementBool() == QFormBuilderStrings::instance().trueValue); - - case DomProperty::Cstring: - return QVariant(p->elementCstring().toUtf8()); - - case DomProperty::Point: { - const DomPoint *point = p->elementPoint(); - return QVariant(QPoint(point->elementX(), point->elementY())); - } - - case DomProperty::PointF: { - const DomPointF *pointf = p->elementPointF(); - return QVariant(QPointF(pointf->elementX(), pointf->elementY())); - } - - case DomProperty::Size: { - const DomSize *size = p->elementSize(); - return QVariant(QSize(size->elementWidth(), size->elementHeight())); - } - - case DomProperty::SizeF: { - const DomSizeF *sizef = p->elementSizeF(); - return QVariant(QSizeF(sizef->elementWidth(), sizef->elementHeight())); - } - - case DomProperty::Rect: { - const DomRect *rc = p->elementRect(); - const QRect g(rc->elementX(), rc->elementY(), rc->elementWidth(), rc->elementHeight()); - return QVariant(g); - } - - case DomProperty::RectF: { - const DomRectF *rcf = p->elementRectF(); - const QRectF g(rcf->elementX(), rcf->elementY(), rcf->elementWidth(), rcf->elementHeight()); - return QVariant(g); - } - - case DomProperty::String: - return QVariant(p->elementString()->text()); - - case DomProperty::Number: - return QVariant(p->elementNumber()); - - case DomProperty::UInt: - return QVariant(p->elementUInt()); - - case DomProperty::LongLong: - return QVariant(p->elementLongLong()); - - case DomProperty::ULongLong: - return QVariant(p->elementULongLong()); - - case DomProperty::Double: - return QVariant(p->elementDouble()); - - case DomProperty::Char: { - const DomChar *character = p->elementChar(); - const QChar c(character->elementUnicode()); - return QVariant::fromValue(c); - } - - case DomProperty::Color: { - const DomColor *color = p->elementColor(); - QColor c(color->elementRed(), color->elementGreen(), color->elementBlue()); - if (color->hasAttributeAlpha()) - c.setAlpha(color->attributeAlpha()); - return QVariant::fromValue(c); - } - - case DomProperty::Font: { - const DomFont *font = p->elementFont(); - - QFont f; - if (font->hasElementFamily() && !font->elementFamily().isEmpty()) - f.setFamily(font->elementFamily()); - if (font->hasElementPointSize() && font->elementPointSize() > 0) - f.setPointSize(font->elementPointSize()); - if (font->hasElementWeight() && font->elementWeight() > 0) - f.setWeight(font->elementWeight()); - if (font->hasElementItalic()) - f.setItalic(font->elementItalic()); - if (font->hasElementBold()) - f.setBold(font->elementBold()); - if (font->hasElementUnderline()) - f.setUnderline(font->elementUnderline()); - if (font->hasElementStrikeOut()) - f.setStrikeOut(font->elementStrikeOut()); - if (font->hasElementKerning()) - f.setKerning(font->elementKerning()); - if (font->hasElementAntialiasing()) - f.setStyleStrategy(font->elementAntialiasing() ? QFont::PreferDefault : QFont::NoAntialias); - if (font->hasElementStyleStrategy()) { - f.setStyleStrategy(enumKeyOfObjectToValue("styleStrategy", font->elementStyleStrategy().toLatin1())); - } - return QVariant::fromValue(f); - } - - case DomProperty::Date: { - const DomDate *date = p->elementDate(); - return QVariant(QDate(date->elementYear(), date->elementMonth(), date->elementDay())); - } - - case DomProperty::Time: { - const DomTime *t = p->elementTime(); - return QVariant(QTime(t->elementHour(), t->elementMinute(), t->elementSecond())); - } - - case DomProperty::DateTime: { - const DomDateTime *dateTime = p->elementDateTime(); - const QDate d(dateTime->elementYear(), dateTime->elementMonth(), dateTime->elementDay()); - const QTime tm(dateTime->elementHour(), dateTime->elementMinute(), dateTime->elementSecond()); - return QVariant(QDateTime(d, tm)); - } - - case DomProperty::Url: { - const DomUrl *url = p->elementUrl(); - return QVariant(QUrl(url->elementString()->text())); - } - -#ifndef QT_NO_CURSOR - case DomProperty::Cursor: - return QVariant::fromValue(QCursor(static_cast(p->elementCursor()))); - - case DomProperty::CursorShape: - return QVariant::fromValue(QCursor(enumKeyOfObjectToValue("cursorShape", p->elementCursorShape().toLatin1()))); -#endif - - case DomProperty::Locale: { - const DomLocale *locale = p->elementLocale(); - return QVariant::fromValue(QLocale(enumKeyOfObjectToValue("language", locale->attributeLanguage().toLatin1()), - enumKeyOfObjectToValue("country", locale->attributeCountry().toLatin1()))); - } - case DomProperty::SizePolicy: { - const DomSizePolicy *sizep = p->elementSizePolicy(); - - QSizePolicy sizePolicy; - sizePolicy.setHorizontalStretch(sizep->elementHorStretch()); - sizePolicy.setVerticalStretch(sizep->elementVerStretch()); - - const QMetaEnum sizeType_enum = metaEnum("sizeType"); - - if (sizep->hasElementHSizeType()) { - sizePolicy.setHorizontalPolicy((QSizePolicy::Policy) sizep->elementHSizeType()); - } else if (sizep->hasAttributeHSizeType()) { - const QSizePolicy::Policy sp = enumKeyToValue(sizeType_enum, sizep->attributeHSizeType().toLatin1()); - sizePolicy.setHorizontalPolicy(sp); - } - - if (sizep->hasElementVSizeType()) { - sizePolicy.setVerticalPolicy((QSizePolicy::Policy) sizep->elementVSizeType()); - } else if (sizep->hasAttributeVSizeType()) { - const QSizePolicy::Policy sp = enumKeyToValue(sizeType_enum, sizep->attributeVSizeType().toLatin1()); - sizePolicy.setVerticalPolicy(sp); - } - - return QVariant::fromValue(sizePolicy); - } - - case DomProperty::StringList: - return QVariant(p->elementStringList()->elementString()); - - default: - uiLibWarning(QCoreApplication::translate("QFormBuilder", "Reading properties of the type %1 is not supported yet.").arg(p->kind())); - break; - } - - return QVariant(); -} - -// Apply a simple variant type to a DOM property -static bool applySimpleProperty(const QVariant &v, bool translateString, DomProperty *dom_prop) -{ - switch (v.type()) { - case QVariant::String: { - DomString *str = new DomString(); - str->setText(v.toString()); - if (!translateString) - str->setAttributeNotr(QLatin1String("true")); - dom_prop->setElementString(str); - } - return true; - - case QVariant::ByteArray: - dom_prop->setElementCstring(QString::fromUtf8(v.toByteArray())); - return true; - - case QVariant::Int: - dom_prop->setElementNumber(v.toInt()); - return true; - - case QVariant::UInt: - dom_prop->setElementUInt(v.toUInt()); - return true; - - case QVariant::LongLong: - dom_prop->setElementLongLong(v.toLongLong()); - return true; - - case QVariant::ULongLong: - dom_prop->setElementULongLong(v.toULongLong()); - return true; - - case QVariant::Double: - dom_prop->setElementDouble(v.toDouble()); - return true; - - case QVariant::Bool: - dom_prop->setElementBool(v.toBool() ? QFormBuilderStrings::instance().trueValue : QFormBuilderStrings::instance().falseValue); - return true; - - case QVariant::Char: { - DomChar *ch = new DomChar(); - const QChar character = v.toChar(); - ch->setElementUnicode(character.unicode()); - dom_prop->setElementChar(ch); - } - return true; - - case QVariant::Point: { - DomPoint *pt = new DomPoint(); - const QPoint point = v.toPoint(); - pt->setElementX(point.x()); - pt->setElementY(point.y()); - dom_prop->setElementPoint(pt); - } - return true; - - case QVariant::PointF: { - DomPointF *ptf = new DomPointF(); - const QPointF pointf = v.toPointF(); - ptf->setElementX(pointf.x()); - ptf->setElementY(pointf.y()); - dom_prop->setElementPointF(ptf); - } - return true; - - case QVariant::Color: { - DomColor *clr = new DomColor(); - const QColor color = qvariant_cast(v); - clr->setElementRed(color.red()); - clr->setElementGreen(color.green()); - clr->setElementBlue(color.blue()); - const int alphaChannel = color.alpha(); - if (alphaChannel != 255) - clr->setAttributeAlpha(alphaChannel); - dom_prop->setElementColor(clr); - } - return true; - - case QVariant::Size: { - DomSize *sz = new DomSize(); - const QSize size = v.toSize(); - sz->setElementWidth(size.width()); - sz->setElementHeight(size.height()); - dom_prop->setElementSize(sz); - } - return true; - - case QVariant::SizeF: { - DomSizeF *szf = new DomSizeF(); - const QSizeF sizef = v.toSizeF(); - szf->setElementWidth(sizef.width()); - szf->setElementHeight(sizef.height()); - dom_prop->setElementSizeF(szf); - } - return true; - - case QVariant::Rect: { - DomRect *rc = new DomRect(); - const QRect rect = v.toRect(); - rc->setElementX(rect.x()); - rc->setElementY(rect.y()); - rc->setElementWidth(rect.width()); - rc->setElementHeight(rect.height()); - dom_prop->setElementRect(rc); - } - return true; - - case QVariant::RectF: { - DomRectF *rcf = new DomRectF(); - const QRectF rectf = v.toRectF(); - rcf->setElementX(rectf.x()); - rcf->setElementY(rectf.y()); - rcf->setElementWidth(rectf.width()); - rcf->setElementHeight(rectf.height()); - dom_prop->setElementRectF(rcf); - } - return true; - - case QVariant::Font: { - DomFont *fnt = new DomFont(); - const QFont font = qvariant_cast(v); - const uint mask = font.resolve(); - if (mask & QFont::WeightResolved) { - fnt->setElementBold(font.bold()); - fnt->setElementWeight(font.weight()); - } - if (mask & QFont::FamilyResolved) - fnt->setElementFamily(font.family()); - if (mask & QFont::StyleResolved) - fnt->setElementItalic(font.italic()); - if (mask & QFont::SizeResolved) - fnt->setElementPointSize(font.pointSize()); - if (mask & QFont::StrikeOutResolved) - fnt->setElementStrikeOut(font.strikeOut()); - if (mask & QFont::UnderlineResolved) - fnt->setElementUnderline(font.underline()); - if (mask & QFont::KerningResolved) - fnt->setElementKerning(font.kerning()); - if (mask & QFont::StyleStrategyResolved) { - const QMetaEnum styleStrategy_enum = metaEnum("styleStrategy"); - fnt->setElementStyleStrategy(QLatin1String(styleStrategy_enum.valueToKey(font.styleStrategy()))); - } - dom_prop->setElementFont(fnt); - } - return true; - -#ifndef QT_NO_CURSOR - case QVariant::Cursor: { - const QMetaEnum cursorShape_enum = metaEnum("cursorShape"); - dom_prop->setElementCursorShape(QLatin1String(cursorShape_enum.valueToKey(qvariant_cast(v).shape()))); - } - return true; -#endif - - case QVariant::KeySequence: { - DomString *s = new DomString(); - s->setText(qvariant_cast(v).toString(QKeySequence::PortableText)); - dom_prop->setElementString(s); - } - return true; - - case QVariant::Locale: { - DomLocale *dom = new DomLocale(); - const QLocale locale = qvariant_cast(v); - - const QMetaEnum language_enum = metaEnum("language"); - const QMetaEnum country_enum = metaEnum("country"); - - dom->setAttributeLanguage(QLatin1String(language_enum.valueToKey(locale.language()))); - dom->setAttributeCountry(QLatin1String(country_enum.valueToKey(locale.country()))); - - dom_prop->setElementLocale(dom); - } - return true; - - case QVariant::SizePolicy: { - DomSizePolicy *dom = new DomSizePolicy(); - const QSizePolicy sizePolicy = qvariant_cast(v); - - dom->setElementHorStretch(sizePolicy.horizontalStretch()); - dom->setElementVerStretch(sizePolicy.verticalStretch()); - - const QMetaEnum sizeType_enum = metaEnum("sizeType"); - - dom->setAttributeHSizeType(QLatin1String(sizeType_enum.valueToKey(sizePolicy.horizontalPolicy()))); - dom->setAttributeVSizeType(QLatin1String(sizeType_enum.valueToKey(sizePolicy.verticalPolicy()))); - - dom_prop->setElementSizePolicy(dom); - } - return true; - - case QVariant::Date: { - DomDate *dom = new DomDate(); - const QDate date = qvariant_cast(v); - - dom->setElementYear(date.year()); - dom->setElementMonth(date.month()); - dom->setElementDay(date.day()); - - dom_prop->setElementDate(dom); - } - return true; - - case QVariant::Time: { - DomTime *dom = new DomTime(); - const QTime time = qvariant_cast(v); - - dom->setElementHour(time.hour()); - dom->setElementMinute(time.minute()); - dom->setElementSecond(time.second()); - - dom_prop->setElementTime(dom); - } - return true; - - case QVariant::DateTime: { - DomDateTime *dom = new DomDateTime(); - const QDateTime dateTime = qvariant_cast(v); - - dom->setElementHour(dateTime.time().hour()); - dom->setElementMinute(dateTime.time().minute()); - dom->setElementSecond(dateTime.time().second()); - dom->setElementYear(dateTime.date().year()); - dom->setElementMonth(dateTime.date().month()); - dom->setElementDay(dateTime.date().day()); - - dom_prop->setElementDateTime(dom); - } - return true; - - case QVariant::Url: { - DomUrl *dom = new DomUrl(); - const QUrl url = v.toUrl(); - - DomString *str = new DomString(); - str->setText(url.toString()); - dom->setElementString(str); - - dom_prop->setElementUrl(dom); - } - return true; - - case QVariant::StringList: { - DomStringList *sl = new DomStringList; - sl->setElementString(qvariant_cast(v)); - dom_prop->setElementStringList(sl); - } - return true; - - default: - break; - } - - return false; -} -static QString msgCannotWriteProperty(const QString &pname, const QVariant &v) -{ - return QCoreApplication::translate("QFormBuilder", "The property %1 could not be written. The type %2 is not supported yet."). - arg(pname).arg(QLatin1String(v.typeName())); - -} - -static bool isOfType(const QMetaObject *what, const QMetaObject *type) -{ - do { - if (what == type) - return true; - } while ((what = what->superClass())); - return false; -} - -static bool isTranslatable(const QString &pname, const QVariant &v, const QMetaObject *meta) -{ - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - if (pname == strings.objectNameProperty) - return false; - if (pname == strings.styleSheetProperty && v.type() == QVariant::String && isOfType(meta, &QWidget::staticMetaObject)) - return false; - return true; -} - -// Convert complex variant types to DOM properties with the help of QAbstractFormBuilder -// Does not perform a check using QAbstractFormBuilder::checkProperty(). -DomProperty *variantToDomProperty(QAbstractFormBuilder *afb, const QMetaObject *meta, - const QString &pname, const QVariant &v) -{ - const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - - DomProperty *dom_prop = new DomProperty(); - dom_prop->setAttributeName(pname); - - const int pindex = meta->indexOfProperty(pname.toLatin1()); - if (pindex != -1) { - QMetaProperty meta_property = meta->property(pindex); - if ((v.type() == QVariant::Int || v.type() == QVariant::UInt) && meta_property.isEnumType()) { - const QMetaEnum e = meta_property.enumerator(); - if (e.isFlag()) - dom_prop->setElementSet(QString::fromAscii(e.valueToKeys(v.toInt()))); - else - dom_prop->setElementEnum(QString::fromAscii(e.valueToKey(v.toInt()))); - return dom_prop; - } - if (!meta_property.hasStdCppSet() || (isOfType(meta, &QAbstractScrollArea::staticMetaObject) && pname == strings.cursorProperty)) - dom_prop->setAttributeStdset(0); - } - - // Try simple properties - if (applySimpleProperty(v, isTranslatable(pname, v, meta), dom_prop)) - return dom_prop; - - // Complex properties - switch (v.type()) { - case QVariant::Palette: { - DomPalette *dom = new DomPalette(); - QPalette palette = qvariant_cast(v); - - palette.setCurrentColorGroup(QPalette::Active); - dom->setElementActive(afb->saveColorGroup(palette)); - - palette.setCurrentColorGroup(QPalette::Inactive); - dom->setElementInactive(afb->saveColorGroup(palette)); - - palette.setCurrentColorGroup(QPalette::Disabled); - dom->setElementDisabled(afb->saveColorGroup(palette)); - - dom_prop->setElementPalette(dom); - } break; - case QVariant::Brush: - dom_prop->setElementBrush(afb->saveBrush(qvariant_cast(v))); - break; - default: { - const bool hadAttributeStdset = dom_prop->hasAttributeStdset(); - const bool attributeStdset = dom_prop->attributeStdset(); - delete dom_prop; - if (afb->resourceBuilder()->isResourceType(v)) { - dom_prop = afb->resourceBuilder()->saveResource(afb->workingDirectory(), v); - if (dom_prop) { - dom_prop->setAttributeName(pname); - if (hadAttributeStdset) - dom_prop->setAttributeStdset(attributeStdset); - } - break; - } - uiLibWarning(msgCannotWriteProperty(pname, v)); - } return 0; - } - return dom_prop; -} - -#ifdef QFORMINTERNAL_NAMESPACE -} -#endif - -QT_END_NAMESPACE diff --git a/tools/uilib/properties_p.h b/tools/uilib/properties_p.h deleted file mode 100644 index 98b84fce9f..0000000000 --- a/tools/uilib/properties_p.h +++ /dev/null @@ -1,176 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef UILIBPROPERTIES_H -#define UILIBPROPERTIES_H - -#include "uilib_global.h" - -#include -#include -#include -#include - -#include - -#include "formbuilderextra_p.h" - -QT_BEGIN_NAMESPACE - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal -{ -#endif - -class QAbstractFormBuilder; -class DomProperty; - -QDESIGNER_UILIB_EXPORT DomProperty *variantToDomProperty(QAbstractFormBuilder *abstractFormBuilder, const QMetaObject *meta, const QString &propertyName, const QVariant &value); - - -QDESIGNER_UILIB_EXPORT QVariant domPropertyToVariant(const DomProperty *property); -QDESIGNER_UILIB_EXPORT QVariant domPropertyToVariant(QAbstractFormBuilder *abstractFormBuilder, const QMetaObject *meta, const DomProperty *property); - -// This class exists to provide meta information -// for enumerations only. -class QAbstractFormBuilderGadget: public QWidget -{ - Q_OBJECT - Q_PROPERTY(Qt::ItemFlags itemFlags READ fakeItemFlags) - Q_PROPERTY(Qt::CheckState checkState READ fakeCheckState) - Q_PROPERTY(Qt::Alignment textAlignment READ fakeAlignment) - Q_PROPERTY(Qt::Orientation orientation READ fakeOrientation) - Q_PROPERTY(QSizePolicy::Policy sizeType READ fakeSizeType) - Q_PROPERTY(QPalette::ColorRole colorRole READ fakeColorRole) - Q_PROPERTY(QPalette::ColorGroup colorGroup READ fakeColorGroup) - Q_PROPERTY(QFont::StyleStrategy styleStrategy READ fakeStyleStrategy) - Q_PROPERTY(Qt::CursorShape cursorShape READ fakeCursorShape) - Q_PROPERTY(Qt::BrushStyle brushStyle READ fakeBrushStyle) - Q_PROPERTY(Qt::ToolBarArea toolBarArea READ fakeToolBarArea) - Q_PROPERTY(QGradient::Type gradientType READ fakeGradientType) - Q_PROPERTY(QGradient::Spread gradientSpread READ fakeGradientSpread) - Q_PROPERTY(QGradient::CoordinateMode gradientCoordinate READ fakeGradientCoordinate) - Q_PROPERTY(QLocale::Language language READ fakeLanguage) - Q_PROPERTY(QLocale::Country country READ fakeCountry) -public: - QAbstractFormBuilderGadget() { Q_ASSERT(0); } - - Qt::Orientation fakeOrientation() const { Q_ASSERT(0); return Qt::Horizontal; } - QSizePolicy::Policy fakeSizeType() const { Q_ASSERT(0); return QSizePolicy::Expanding; } - QPalette::ColorGroup fakeColorGroup() const { Q_ASSERT(0); return static_cast(0); } - QPalette::ColorRole fakeColorRole() const { Q_ASSERT(0); return static_cast(0); } - QFont::StyleStrategy fakeStyleStrategy() const { Q_ASSERT(0); return QFont::PreferDefault; } - Qt::CursorShape fakeCursorShape() const { Q_ASSERT(0); return Qt::ArrowCursor; } - Qt::BrushStyle fakeBrushStyle() const { Q_ASSERT(0); return Qt::NoBrush; } - Qt::ToolBarArea fakeToolBarArea() const { Q_ASSERT(0); return Qt::NoToolBarArea; } - QGradient::Type fakeGradientType() const { Q_ASSERT(0); return QGradient::NoGradient; } - QGradient::Spread fakeGradientSpread() const { Q_ASSERT(0); return QGradient::PadSpread; } - QGradient::CoordinateMode fakeGradientCoordinate() const { Q_ASSERT(0); return QGradient::LogicalMode; } - QLocale::Language fakeLanguage() const { Q_ASSERT(0); return QLocale::C; } - QLocale::Country fakeCountry() const { Q_ASSERT(0); return QLocale::AnyCountry; } - Qt::ItemFlags fakeItemFlags() const { Q_ASSERT(0); return Qt::NoItemFlags; } - Qt::CheckState fakeCheckState() const { Q_ASSERT(0); return Qt::Unchecked; } - Qt::Alignment fakeAlignment() const { Q_ASSERT(0); return Qt::AlignLeft; } -}; - -// Convert key to value for a given QMetaEnum -template -inline EnumType enumKeyToValue(const QMetaEnum &metaEnum,const char *key, const EnumType* = 0) -{ - int val = metaEnum.keyToValue(key); - if (val == -1) { - - uiLibWarning(QCoreApplication::translate("QFormBuilder", "The enumeration-value '%1' is invalid. The default value '%2' will be used instead.") - .arg(QString::fromUtf8(key)).arg(QString::fromUtf8(metaEnum.key(0)))); - val = metaEnum.value(0); - } - return static_cast(val); -} - -// Convert keys to value for a given QMetaEnum -template -inline EnumType enumKeysToValue(const QMetaEnum &metaEnum,const char *keys, const EnumType* = 0) -{ - int val = metaEnum.keysToValue(keys); - if (val == -1) { - - uiLibWarning(QCoreApplication::translate("QFormBuilder", "The flag-value '%1' is invalid. Zero will be used instead.") - .arg(QString::fromUtf8(keys))); - val = 0; - } - return static_cast(QFlag(val)); -} - -// Access meta enumeration object of a qobject -template -inline QMetaEnum metaEnum(const char *name, const QObjectType* = 0) -{ - const int e_index = QObjectType::staticMetaObject.indexOfProperty(name); - Q_ASSERT(e_index != -1); - return QObjectType::staticMetaObject.property(e_index).enumerator(); -} - -// Convert key to value for enumeration by name -template -inline EnumType enumKeyOfObjectToValue(const char *enumName, const char *key, const QObjectType* = 0, const EnumType* = 0) -{ - const QMetaEnum me = metaEnum(enumName); - return enumKeyToValue(me, key); -} - -#ifdef QFORMINTERNAL_NAMESPACE -} -#endif - -QT_END_NAMESPACE - -#endif // UILIBPROPERTIES_H diff --git a/tools/uilib/qdesignerexportwidget.h b/tools/uilib/qdesignerexportwidget.h deleted file mode 100644 index 54053ff274..0000000000 --- a/tools/uilib/qdesignerexportwidget.h +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDESIGNEREXPORTWIDGET_H -#define QDESIGNEREXPORTWIDGET_H - -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -#if 0 -// pragma for syncqt, don't remove. -#pragma qt_class(QDesignerExportWidget) -#endif - -#if defined(QDESIGNER_EXPORT_WIDGETS) -# define QDESIGNER_WIDGET_EXPORT Q_DECL_EXPORT -#else -# define QDESIGNER_WIDGET_EXPORT Q_DECL_IMPORT -#endif - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif //QDESIGNEREXPORTWIDGET_H diff --git a/tools/uilib/resourcebuilder.cpp b/tools/uilib/resourcebuilder.cpp deleted file mode 100644 index 72921c636b..0000000000 --- a/tools/uilib/resourcebuilder.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "resourcebuilder_p.h" -#include "ui4_p.h" -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal { -#endif - -enum { themeDebug = 0 }; - -QResourceBuilder::QResourceBuilder() -{ - -} - -QResourceBuilder::~QResourceBuilder() -{ - -} - -int QResourceBuilder::iconStateFlags(const DomResourceIcon *dpi) -{ - int rc = 0; - if (dpi->hasElementNormalOff()) - rc |= NormalOff; - if (dpi->hasElementNormalOn()) - rc |= NormalOn; - if (dpi->hasElementDisabledOff()) - rc |= DisabledOff; - if (dpi->hasElementDisabledOn()) - rc |= DisabledOn; - if (dpi->hasElementActiveOff()) - rc |= ActiveOff; - if (dpi->hasElementActiveOn()) - rc |= ActiveOn; - if (dpi->hasElementSelectedOff()) - rc |= SelectedOff; - if (dpi->hasElementSelectedOn()) - rc |= SelectedOn; - return rc; -} - -QVariant QResourceBuilder::loadResource(const QDir &workingDirectory, const DomProperty *property) const -{ - switch (property->kind()) { - case DomProperty::Pixmap: { - const DomResourcePixmap *dpx = property->elementPixmap(); - QPixmap pixmap(QFileInfo(workingDirectory, dpx->text()).absoluteFilePath()); - return QVariant::fromValue(pixmap); - } - case DomProperty::IconSet: { - const DomResourceIcon *dpi = property->elementIconSet(); - if (!dpi->attributeTheme().isEmpty()) { - const QString theme = dpi->attributeTheme(); - const bool known = QIcon::hasThemeIcon(theme); - if (themeDebug) - qDebug("Theme %s known %d", qPrintable(theme), known); - if (known) - return qVariantFromValue(QIcon::fromTheme(dpi->attributeTheme())); - } // non-empty theme - if (const int flags = iconStateFlags(dpi)) { // new, post 4.4 format - QIcon icon; - if (flags & NormalOff) - icon.addFile(QFileInfo(workingDirectory, dpi->elementNormalOff()->text()).absoluteFilePath(), QSize(), QIcon::Normal, QIcon::Off); - if (flags & NormalOn) - icon.addFile(QFileInfo(workingDirectory, dpi->elementNormalOn()->text()).absoluteFilePath(), QSize(), QIcon::Normal, QIcon::On); - if (flags & DisabledOff) - icon.addFile(QFileInfo(workingDirectory, dpi->elementDisabledOff()->text()).absoluteFilePath(), QSize(), QIcon::Disabled, QIcon::Off); - if (flags & DisabledOn) - icon.addFile(QFileInfo(workingDirectory, dpi->elementDisabledOn()->text()).absoluteFilePath(), QSize(), QIcon::Disabled, QIcon::On); - if (flags & ActiveOff) - icon.addFile(QFileInfo(workingDirectory, dpi->elementActiveOff()->text()).absoluteFilePath(), QSize(), QIcon::Active, QIcon::Off); - if (flags & ActiveOn) - icon.addFile(QFileInfo(workingDirectory, dpi->elementActiveOn()->text()).absoluteFilePath(), QSize(), QIcon::Active, QIcon::On); - if (flags & SelectedOff) - icon.addFile(QFileInfo(workingDirectory, dpi->elementSelectedOff()->text()).absoluteFilePath(), QSize(), QIcon::Selected, QIcon::Off); - if (flags & SelectedOn) - icon.addFile(QFileInfo(workingDirectory, dpi->elementSelectedOn()->text()).absoluteFilePath(), QSize(), QIcon::Selected, QIcon::On); - return QVariant::fromValue(icon); - } else { // 4.3 legacy - const QIcon icon(QFileInfo(workingDirectory, dpi->text()).absoluteFilePath()); - return QVariant::fromValue(icon); - } - } - break; - default: - break; - } - return QVariant(); -} - -QVariant QResourceBuilder::toNativeValue(const QVariant &value) const -{ - return value; -} - -DomProperty *QResourceBuilder::saveResource(const QDir &workingDirectory, const QVariant &value) const -{ - Q_UNUSED(workingDirectory) - Q_UNUSED(value) - return 0; -} - -bool QResourceBuilder::isResourceProperty(const DomProperty *p) const -{ - switch (p->kind()) { - case DomProperty::Pixmap: - case DomProperty::IconSet: - return true; - default: - break; - } - return false; -} - -bool QResourceBuilder::isResourceType(const QVariant &value) const -{ - switch (value.type()) { - case QVariant::Pixmap: - case QVariant::Icon: - return true; - default: - break; - } - return false; -} - -#ifdef QFORMINTERNAL_NAMESPACE -} // namespace QFormInternal -#endif - -QT_END_NAMESPACE diff --git a/tools/uilib/resourcebuilder_p.h b/tools/uilib/resourcebuilder_p.h deleted file mode 100644 index ca699a05fa..0000000000 --- a/tools/uilib/resourcebuilder_p.h +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef RESOURCEBUILDER_H -#define RESOURCEBUILDER_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "uilib_global.h" -#include -#include - -QT_BEGIN_NAMESPACE - -class QDir; -class QVariant; - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal -{ -#endif - -class DomProperty; -class DomResourceIcon; - -class QDESIGNER_UILIB_EXPORT QResourceBuilder -{ -public: - enum IconStateFlags { - NormalOff = 0x1, NormalOn = 0x2, DisabledOff = 0x4, DisabledOn = 0x8, - ActiveOff = 0x10, ActiveOn = 0x20, SelectedOff = 0x40, SelectedOn = 0x80 - }; - - QResourceBuilder(); - virtual ~QResourceBuilder(); - - virtual QVariant loadResource(const QDir &workingDirectory, const DomProperty *property) const; - - virtual QVariant toNativeValue(const QVariant &value) const; - - virtual DomProperty *saveResource(const QDir &workingDirectory, const QVariant &value) const; - - virtual bool isResourceProperty(const DomProperty *p) const; - - virtual bool isResourceType(const QVariant &value) const; - - static int iconStateFlags(const DomResourceIcon *resIcon); -}; - - -#ifdef QFORMINTERNAL_NAMESPACE -} -#endif - -QT_END_NAMESPACE - -#endif // RESOURCEBUILDER_H diff --git a/tools/uilib/textbuilder.cpp b/tools/uilib/textbuilder.cpp deleted file mode 100644 index d9d2ac3b1a..0000000000 --- a/tools/uilib/textbuilder.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "textbuilder_p.h" -#include "ui4_p.h" -#include - -QT_BEGIN_NAMESPACE - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal { -#endif - -QTextBuilder::QTextBuilder() -{ - -} - -QTextBuilder::~QTextBuilder() -{ - -} - -QVariant QTextBuilder::loadText(const DomProperty *property) const -{ - if (property->kind() == DomProperty::String) - return property->elementString()->text(); - return QVariant(); -} - -QVariant QTextBuilder::toNativeValue(const QVariant &value) const -{ - return value; -} - -DomProperty *QTextBuilder::saveText(const QVariant &value) const -{ - Q_UNUSED(value) - return 0; -} - -#ifdef QFORMINTERNAL_NAMESPACE -} // namespace QFormInternal -#endif - -QT_END_NAMESPACE diff --git a/tools/uilib/textbuilder_p.h b/tools/uilib/textbuilder_p.h deleted file mode 100644 index bef4a64f0f..0000000000 --- a/tools/uilib/textbuilder_p.h +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef TEXTBUILDER_H -#define TEXTBUILDER_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "uilib_global.h" -#include -#include - -QT_BEGIN_NAMESPACE - -class QDir; -class QVariant; - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal -{ -#endif - -class DomProperty; -class DomString; - -class QDESIGNER_UILIB_EXPORT QTextBuilder -{ -public: - QTextBuilder(); - virtual ~QTextBuilder(); - - virtual QVariant loadText(const DomProperty *property) const; - - virtual QVariant toNativeValue(const QVariant &value) const; - - virtual DomProperty *saveText(const QVariant &value) const; -}; - - -#ifdef QFORMINTERNAL_NAMESPACE -} -#endif - -QT_END_NAMESPACE - -#endif // TEXTBUILDER_H diff --git a/tools/uilib/ui4.cpp b/tools/uilib/ui4.cpp deleted file mode 100644 index 5c232c862c..0000000000 --- a/tools/uilib/ui4.cpp +++ /dev/null @@ -1,8907 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include "ui4_p.h" - - -QT_BEGIN_NAMESPACE -#ifdef QFORMINTERNAL_NAMESPACE -using namespace QFormInternal; -#endif - -/******************************************************************************* -** Implementations -*/ - -void DomUI::clear(bool clear_all) -{ - delete m_widget; - delete m_layoutDefault; - delete m_layoutFunction; - delete m_customWidgets; - delete m_tabStops; - delete m_images; - delete m_includes; - delete m_resources; - delete m_connections; - delete m_designerdata; - delete m_slots; - delete m_buttonGroups; - - if (clear_all) { - m_text.clear(); - m_has_attr_version = false; - m_has_attr_language = false; - m_has_attr_displayname = false; - m_has_attr_stdsetdef = false; - m_attr_stdsetdef = 0; - m_has_attr_stdSetDef = false; - m_attr_stdSetDef = 0; - } - - m_children = 0; - m_widget = 0; - m_layoutDefault = 0; - m_layoutFunction = 0; - m_customWidgets = 0; - m_tabStops = 0; - m_images = 0; - m_includes = 0; - m_resources = 0; - m_connections = 0; - m_designerdata = 0; - m_slots = 0; - m_buttonGroups = 0; -} - -DomUI::DomUI() -{ - m_children = 0; - m_has_attr_version = false; - m_has_attr_language = false; - m_has_attr_displayname = false; - m_has_attr_stdsetdef = false; - m_attr_stdsetdef = 0; - m_has_attr_stdSetDef = false; - m_attr_stdSetDef = 0; - m_widget = 0; - m_layoutDefault = 0; - m_layoutFunction = 0; - m_customWidgets = 0; - m_tabStops = 0; - m_images = 0; - m_includes = 0; - m_resources = 0; - m_connections = 0; - m_designerdata = 0; - m_slots = 0; - m_buttonGroups = 0; -} - -DomUI::~DomUI() -{ - delete m_widget; - delete m_layoutDefault; - delete m_layoutFunction; - delete m_customWidgets; - delete m_tabStops; - delete m_images; - delete m_includes; - delete m_resources; - delete m_connections; - delete m_designerdata; - delete m_slots; - delete m_buttonGroups; -} - -void DomUI::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("version")) { - setAttributeVersion(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("language")) { - setAttributeLanguage(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("displayname")) { - setAttributeDisplayname(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("stdsetdef")) { - setAttributeStdsetdef(attribute.value().toString().toInt()); - continue; - } - if (name == QStringLiteral("stdSetDef")) { - setAttributeStdSetDef(attribute.value().toString().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("author")) { - setElementAuthor(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("comment")) { - setElementComment(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("exportmacro")) { - setElementExportMacro(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("class")) { - setElementClass(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("widget")) { - DomWidget *v = new DomWidget(); - v->read(reader); - setElementWidget(v); - continue; - } - if (tag == QStringLiteral("layoutdefault")) { - DomLayoutDefault *v = new DomLayoutDefault(); - v->read(reader); - setElementLayoutDefault(v); - continue; - } - if (tag == QStringLiteral("layoutfunction")) { - DomLayoutFunction *v = new DomLayoutFunction(); - v->read(reader); - setElementLayoutFunction(v); - continue; - } - if (tag == QStringLiteral("pixmapfunction")) { - setElementPixmapFunction(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("customwidgets")) { - DomCustomWidgets *v = new DomCustomWidgets(); - v->read(reader); - setElementCustomWidgets(v); - continue; - } - if (tag == QStringLiteral("tabstops")) { - DomTabStops *v = new DomTabStops(); - v->read(reader); - setElementTabStops(v); - continue; - } - if (tag == QStringLiteral("images")) { - DomImages *v = new DomImages(); - v->read(reader); - setElementImages(v); - continue; - } - if (tag == QStringLiteral("includes")) { - DomIncludes *v = new DomIncludes(); - v->read(reader); - setElementIncludes(v); - continue; - } - if (tag == QStringLiteral("resources")) { - DomResources *v = new DomResources(); - v->read(reader); - setElementResources(v); - continue; - } - if (tag == QStringLiteral("connections")) { - DomConnections *v = new DomConnections(); - v->read(reader); - setElementConnections(v); - continue; - } - if (tag == QStringLiteral("designerdata")) { - DomDesignerData *v = new DomDesignerData(); - v->read(reader); - setElementDesignerdata(v); - continue; - } - if (tag == QStringLiteral("slots")) { - DomSlots *v = new DomSlots(); - v->read(reader); - setElementSlots(v); - continue; - } - if (tag == QStringLiteral("buttongroups")) { - DomButtonGroups *v = new DomButtonGroups(); - v->read(reader); - setElementButtonGroups(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomUI::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("ui") : tagName.toLower()); - - if (hasAttributeVersion()) - writer.writeAttribute(QStringLiteral("version"), attributeVersion()); - - if (hasAttributeLanguage()) - writer.writeAttribute(QStringLiteral("language"), attributeLanguage()); - - if (hasAttributeDisplayname()) - writer.writeAttribute(QStringLiteral("displayname"), attributeDisplayname()); - - if (hasAttributeStdsetdef()) - writer.writeAttribute(QStringLiteral("stdsetdef"), QString::number(attributeStdsetdef())); - - if (hasAttributeStdSetDef()) - writer.writeAttribute(QStringLiteral("stdsetdef"), QString::number(attributeStdSetDef())); - - if (m_children & Author) { - writer.writeTextElement(QStringLiteral("author"), m_author); - } - - if (m_children & Comment) { - writer.writeTextElement(QStringLiteral("comment"), m_comment); - } - - if (m_children & ExportMacro) { - writer.writeTextElement(QStringLiteral("exportmacro"), m_exportMacro); - } - - if (m_children & Class) { - writer.writeTextElement(QStringLiteral("class"), m_class); - } - - if (m_children & Widget) { - m_widget->write(writer, QStringLiteral("widget")); - } - - if (m_children & LayoutDefault) { - m_layoutDefault->write(writer, QStringLiteral("layoutdefault")); - } - - if (m_children & LayoutFunction) { - m_layoutFunction->write(writer, QStringLiteral("layoutfunction")); - } - - if (m_children & PixmapFunction) { - writer.writeTextElement(QStringLiteral("pixmapfunction"), m_pixmapFunction); - } - - if (m_children & CustomWidgets) { - m_customWidgets->write(writer, QStringLiteral("customwidgets")); - } - - if (m_children & TabStops) { - m_tabStops->write(writer, QStringLiteral("tabstops")); - } - - if (m_children & Images) { - m_images->write(writer, QStringLiteral("images")); - } - - if (m_children & Includes) { - m_includes->write(writer, QStringLiteral("includes")); - } - - if (m_children & Resources) { - m_resources->write(writer, QStringLiteral("resources")); - } - - if (m_children & Connections) { - m_connections->write(writer, QStringLiteral("connections")); - } - - if (m_children & Designerdata) { - m_designerdata->write(writer, QStringLiteral("designerdata")); - } - - if (m_children & Slots) { - m_slots->write(writer, QStringLiteral("slots")); - } - - if (m_children & ButtonGroups) { - m_buttonGroups->write(writer, QStringLiteral("buttongroups")); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomUI::setElementAuthor(const QString& a) -{ - m_children |= Author; - m_author = a; -} - -void DomUI::setElementComment(const QString& a) -{ - m_children |= Comment; - m_comment = a; -} - -void DomUI::setElementExportMacro(const QString& a) -{ - m_children |= ExportMacro; - m_exportMacro = a; -} - -void DomUI::setElementClass(const QString& a) -{ - m_children |= Class; - m_class = a; -} - -DomWidget* DomUI::takeElementWidget() -{ - DomWidget* a = m_widget; - m_widget = 0; - m_children ^= Widget; - return a; -} - -void DomUI::setElementWidget(DomWidget* a) -{ - delete m_widget; - m_children |= Widget; - m_widget = a; -} - -DomLayoutDefault* DomUI::takeElementLayoutDefault() -{ - DomLayoutDefault* a = m_layoutDefault; - m_layoutDefault = 0; - m_children ^= LayoutDefault; - return a; -} - -void DomUI::setElementLayoutDefault(DomLayoutDefault* a) -{ - delete m_layoutDefault; - m_children |= LayoutDefault; - m_layoutDefault = a; -} - -DomLayoutFunction* DomUI::takeElementLayoutFunction() -{ - DomLayoutFunction* a = m_layoutFunction; - m_layoutFunction = 0; - m_children ^= LayoutFunction; - return a; -} - -void DomUI::setElementLayoutFunction(DomLayoutFunction* a) -{ - delete m_layoutFunction; - m_children |= LayoutFunction; - m_layoutFunction = a; -} - -void DomUI::setElementPixmapFunction(const QString& a) -{ - m_children |= PixmapFunction; - m_pixmapFunction = a; -} - -DomCustomWidgets* DomUI::takeElementCustomWidgets() -{ - DomCustomWidgets* a = m_customWidgets; - m_customWidgets = 0; - m_children ^= CustomWidgets; - return a; -} - -void DomUI::setElementCustomWidgets(DomCustomWidgets* a) -{ - delete m_customWidgets; - m_children |= CustomWidgets; - m_customWidgets = a; -} - -DomTabStops* DomUI::takeElementTabStops() -{ - DomTabStops* a = m_tabStops; - m_tabStops = 0; - m_children ^= TabStops; - return a; -} - -void DomUI::setElementTabStops(DomTabStops* a) -{ - delete m_tabStops; - m_children |= TabStops; - m_tabStops = a; -} - -DomImages* DomUI::takeElementImages() -{ - DomImages* a = m_images; - m_images = 0; - m_children ^= Images; - return a; -} - -void DomUI::setElementImages(DomImages* a) -{ - delete m_images; - m_children |= Images; - m_images = a; -} - -DomIncludes* DomUI::takeElementIncludes() -{ - DomIncludes* a = m_includes; - m_includes = 0; - m_children ^= Includes; - return a; -} - -void DomUI::setElementIncludes(DomIncludes* a) -{ - delete m_includes; - m_children |= Includes; - m_includes = a; -} - -DomResources* DomUI::takeElementResources() -{ - DomResources* a = m_resources; - m_resources = 0; - m_children ^= Resources; - return a; -} - -void DomUI::setElementResources(DomResources* a) -{ - delete m_resources; - m_children |= Resources; - m_resources = a; -} - -DomConnections* DomUI::takeElementConnections() -{ - DomConnections* a = m_connections; - m_connections = 0; - m_children ^= Connections; - return a; -} - -void DomUI::setElementConnections(DomConnections* a) -{ - delete m_connections; - m_children |= Connections; - m_connections = a; -} - -DomDesignerData* DomUI::takeElementDesignerdata() -{ - DomDesignerData* a = m_designerdata; - m_designerdata = 0; - m_children ^= Designerdata; - return a; -} - -void DomUI::setElementDesignerdata(DomDesignerData* a) -{ - delete m_designerdata; - m_children |= Designerdata; - m_designerdata = a; -} - -DomSlots* DomUI::takeElementSlots() -{ - DomSlots* a = m_slots; - m_slots = 0; - m_children ^= Slots; - return a; -} - -void DomUI::setElementSlots(DomSlots* a) -{ - delete m_slots; - m_children |= Slots; - m_slots = a; -} - -DomButtonGroups* DomUI::takeElementButtonGroups() -{ - DomButtonGroups* a = m_buttonGroups; - m_buttonGroups = 0; - m_children ^= ButtonGroups; - return a; -} - -void DomUI::setElementButtonGroups(DomButtonGroups* a) -{ - delete m_buttonGroups; - m_children |= ButtonGroups; - m_buttonGroups = a; -} - -void DomUI::clearElementAuthor() -{ - m_children &= ~Author; -} - -void DomUI::clearElementComment() -{ - m_children &= ~Comment; -} - -void DomUI::clearElementExportMacro() -{ - m_children &= ~ExportMacro; -} - -void DomUI::clearElementClass() -{ - m_children &= ~Class; -} - -void DomUI::clearElementWidget() -{ - delete m_widget; - m_widget = 0; - m_children &= ~Widget; -} - -void DomUI::clearElementLayoutDefault() -{ - delete m_layoutDefault; - m_layoutDefault = 0; - m_children &= ~LayoutDefault; -} - -void DomUI::clearElementLayoutFunction() -{ - delete m_layoutFunction; - m_layoutFunction = 0; - m_children &= ~LayoutFunction; -} - -void DomUI::clearElementPixmapFunction() -{ - m_children &= ~PixmapFunction; -} - -void DomUI::clearElementCustomWidgets() -{ - delete m_customWidgets; - m_customWidgets = 0; - m_children &= ~CustomWidgets; -} - -void DomUI::clearElementTabStops() -{ - delete m_tabStops; - m_tabStops = 0; - m_children &= ~TabStops; -} - -void DomUI::clearElementImages() -{ - delete m_images; - m_images = 0; - m_children &= ~Images; -} - -void DomUI::clearElementIncludes() -{ - delete m_includes; - m_includes = 0; - m_children &= ~Includes; -} - -void DomUI::clearElementResources() -{ - delete m_resources; - m_resources = 0; - m_children &= ~Resources; -} - -void DomUI::clearElementConnections() -{ - delete m_connections; - m_connections = 0; - m_children &= ~Connections; -} - -void DomUI::clearElementDesignerdata() -{ - delete m_designerdata; - m_designerdata = 0; - m_children &= ~Designerdata; -} - -void DomUI::clearElementSlots() -{ - delete m_slots; - m_slots = 0; - m_children &= ~Slots; -} - -void DomUI::clearElementButtonGroups() -{ - delete m_buttonGroups; - m_buttonGroups = 0; - m_children &= ~ButtonGroups; -} - -void DomIncludes::clear(bool clear_all) -{ - qDeleteAll(m_include); - m_include.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomIncludes::DomIncludes() -{ - m_children = 0; -} - -DomIncludes::~DomIncludes() -{ - qDeleteAll(m_include); - m_include.clear(); -} - -void DomIncludes::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("include")) { - DomInclude *v = new DomInclude(); - v->read(reader); - m_include.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomIncludes::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("includes") : tagName.toLower()); - - for (int i = 0; i < m_include.size(); ++i) { - DomInclude* v = m_include[i]; - v->write(writer, QStringLiteral("include")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomIncludes::setElementInclude(const QList& a) -{ - m_children |= Include; - m_include = a; -} - -void DomInclude::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_location = false; - m_has_attr_impldecl = false; - } - - m_children = 0; -} - -DomInclude::DomInclude() -{ - m_children = 0; - m_has_attr_location = false; - m_has_attr_impldecl = false; - m_text.clear(); -} - -DomInclude::~DomInclude() -{ -} - -void DomInclude::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("location")) { - setAttributeLocation(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("impldecl")) { - setAttributeImpldecl(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomInclude::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("include") : tagName.toLower()); - - if (hasAttributeLocation()) - writer.writeAttribute(QStringLiteral("location"), attributeLocation()); - - if (hasAttributeImpldecl()) - writer.writeAttribute(QStringLiteral("impldecl"), attributeImpldecl()); - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomResources::clear(bool clear_all) -{ - qDeleteAll(m_include); - m_include.clear(); - - if (clear_all) { - m_text.clear(); - m_has_attr_name = false; - } - - m_children = 0; -} - -DomResources::DomResources() -{ - m_children = 0; - m_has_attr_name = false; -} - -DomResources::~DomResources() -{ - qDeleteAll(m_include); - m_include.clear(); -} - -void DomResources::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("name")) { - setAttributeName(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("include")) { - DomResource *v = new DomResource(); - v->read(reader); - m_include.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomResources::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("resources") : tagName.toLower()); - - if (hasAttributeName()) - writer.writeAttribute(QStringLiteral("name"), attributeName()); - - for (int i = 0; i < m_include.size(); ++i) { - DomResource* v = m_include[i]; - v->write(writer, QStringLiteral("include")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomResources::setElementInclude(const QList& a) -{ - m_children |= Include; - m_include = a; -} - -void DomResource::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_location = false; - } - - m_children = 0; -} - -DomResource::DomResource() -{ - m_children = 0; - m_has_attr_location = false; -} - -DomResource::~DomResource() -{ -} - -void DomResource::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("location")) { - setAttributeLocation(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomResource::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("resource") : tagName.toLower()); - - if (hasAttributeLocation()) - writer.writeAttribute(QStringLiteral("location"), attributeLocation()); - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomActionGroup::clear(bool clear_all) -{ - qDeleteAll(m_action); - m_action.clear(); - qDeleteAll(m_actionGroup); - m_actionGroup.clear(); - qDeleteAll(m_property); - m_property.clear(); - qDeleteAll(m_attribute); - m_attribute.clear(); - - if (clear_all) { - m_text.clear(); - m_has_attr_name = false; - } - - m_children = 0; -} - -DomActionGroup::DomActionGroup() -{ - m_children = 0; - m_has_attr_name = false; -} - -DomActionGroup::~DomActionGroup() -{ - qDeleteAll(m_action); - m_action.clear(); - qDeleteAll(m_actionGroup); - m_actionGroup.clear(); - qDeleteAll(m_property); - m_property.clear(); - qDeleteAll(m_attribute); - m_attribute.clear(); -} - -void DomActionGroup::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("name")) { - setAttributeName(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("action")) { - DomAction *v = new DomAction(); - v->read(reader); - m_action.append(v); - continue; - } - if (tag == QStringLiteral("actiongroup")) { - DomActionGroup *v = new DomActionGroup(); - v->read(reader); - m_actionGroup.append(v); - continue; - } - if (tag == QStringLiteral("property")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_property.append(v); - continue; - } - if (tag == QStringLiteral("attribute")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_attribute.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomActionGroup::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("actiongroup") : tagName.toLower()); - - if (hasAttributeName()) - writer.writeAttribute(QStringLiteral("name"), attributeName()); - - for (int i = 0; i < m_action.size(); ++i) { - DomAction* v = m_action[i]; - v->write(writer, QStringLiteral("action")); - } - for (int i = 0; i < m_actionGroup.size(); ++i) { - DomActionGroup* v = m_actionGroup[i]; - v->write(writer, QStringLiteral("actiongroup")); - } - for (int i = 0; i < m_property.size(); ++i) { - DomProperty* v = m_property[i]; - v->write(writer, QStringLiteral("property")); - } - for (int i = 0; i < m_attribute.size(); ++i) { - DomProperty* v = m_attribute[i]; - v->write(writer, QStringLiteral("attribute")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomActionGroup::setElementAction(const QList& a) -{ - m_children |= Action; - m_action = a; -} - -void DomActionGroup::setElementActionGroup(const QList& a) -{ - m_children |= ActionGroup; - m_actionGroup = a; -} - -void DomActionGroup::setElementProperty(const QList& a) -{ - m_children |= Property; - m_property = a; -} - -void DomActionGroup::setElementAttribute(const QList& a) -{ - m_children |= Attribute; - m_attribute = a; -} - -void DomAction::clear(bool clear_all) -{ - qDeleteAll(m_property); - m_property.clear(); - qDeleteAll(m_attribute); - m_attribute.clear(); - - if (clear_all) { - m_text.clear(); - m_has_attr_name = false; - m_has_attr_menu = false; - } - - m_children = 0; -} - -DomAction::DomAction() -{ - m_children = 0; - m_has_attr_name = false; - m_has_attr_menu = false; -} - -DomAction::~DomAction() -{ - qDeleteAll(m_property); - m_property.clear(); - qDeleteAll(m_attribute); - m_attribute.clear(); -} - -void DomAction::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("name")) { - setAttributeName(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("menu")) { - setAttributeMenu(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("property")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_property.append(v); - continue; - } - if (tag == QStringLiteral("attribute")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_attribute.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomAction::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("action") : tagName.toLower()); - - if (hasAttributeName()) - writer.writeAttribute(QStringLiteral("name"), attributeName()); - - if (hasAttributeMenu()) - writer.writeAttribute(QStringLiteral("menu"), attributeMenu()); - - for (int i = 0; i < m_property.size(); ++i) { - DomProperty* v = m_property[i]; - v->write(writer, QStringLiteral("property")); - } - for (int i = 0; i < m_attribute.size(); ++i) { - DomProperty* v = m_attribute[i]; - v->write(writer, QStringLiteral("attribute")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomAction::setElementProperty(const QList& a) -{ - m_children |= Property; - m_property = a; -} - -void DomAction::setElementAttribute(const QList& a) -{ - m_children |= Attribute; - m_attribute = a; -} - -void DomActionRef::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_name = false; - } - - m_children = 0; -} - -DomActionRef::DomActionRef() -{ - m_children = 0; - m_has_attr_name = false; -} - -DomActionRef::~DomActionRef() -{ -} - -void DomActionRef::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("name")) { - setAttributeName(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomActionRef::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("actionref") : tagName.toLower()); - - if (hasAttributeName()) - writer.writeAttribute(QStringLiteral("name"), attributeName()); - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomButtonGroup::clear(bool clear_all) -{ - qDeleteAll(m_property); - m_property.clear(); - qDeleteAll(m_attribute); - m_attribute.clear(); - - if (clear_all) { - m_text.clear(); - m_has_attr_name = false; - } - - m_children = 0; -} - -DomButtonGroup::DomButtonGroup() -{ - m_children = 0; - m_has_attr_name = false; -} - -DomButtonGroup::~DomButtonGroup() -{ - qDeleteAll(m_property); - m_property.clear(); - qDeleteAll(m_attribute); - m_attribute.clear(); -} - -void DomButtonGroup::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("name")) { - setAttributeName(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("property")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_property.append(v); - continue; - } - if (tag == QStringLiteral("attribute")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_attribute.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomButtonGroup::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("buttongroup") : tagName.toLower()); - - if (hasAttributeName()) - writer.writeAttribute(QStringLiteral("name"), attributeName()); - - for (int i = 0; i < m_property.size(); ++i) { - DomProperty* v = m_property[i]; - v->write(writer, QStringLiteral("property")); - } - for (int i = 0; i < m_attribute.size(); ++i) { - DomProperty* v = m_attribute[i]; - v->write(writer, QStringLiteral("attribute")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomButtonGroup::setElementProperty(const QList& a) -{ - m_children |= Property; - m_property = a; -} - -void DomButtonGroup::setElementAttribute(const QList& a) -{ - m_children |= Attribute; - m_attribute = a; -} - -void DomButtonGroups::clear(bool clear_all) -{ - qDeleteAll(m_buttonGroup); - m_buttonGroup.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomButtonGroups::DomButtonGroups() -{ - m_children = 0; -} - -DomButtonGroups::~DomButtonGroups() -{ - qDeleteAll(m_buttonGroup); - m_buttonGroup.clear(); -} - -void DomButtonGroups::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("buttongroup")) { - DomButtonGroup *v = new DomButtonGroup(); - v->read(reader); - m_buttonGroup.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomButtonGroups::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("buttongroups") : tagName.toLower()); - - for (int i = 0; i < m_buttonGroup.size(); ++i) { - DomButtonGroup* v = m_buttonGroup[i]; - v->write(writer, QStringLiteral("buttongroup")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomButtonGroups::setElementButtonGroup(const QList& a) -{ - m_children |= ButtonGroup; - m_buttonGroup = a; -} - -void DomImages::clear(bool clear_all) -{ - qDeleteAll(m_image); - m_image.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomImages::DomImages() -{ - m_children = 0; -} - -DomImages::~DomImages() -{ - qDeleteAll(m_image); - m_image.clear(); -} - -void DomImages::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("image")) { - DomImage *v = new DomImage(); - v->read(reader); - m_image.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomImages::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("images") : tagName.toLower()); - - for (int i = 0; i < m_image.size(); ++i) { - DomImage* v = m_image[i]; - v->write(writer, QStringLiteral("image")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomImages::setElementImage(const QList& a) -{ - m_children |= Image; - m_image = a; -} - -void DomImage::clear(bool clear_all) -{ - delete m_data; - - if (clear_all) { - m_text.clear(); - m_has_attr_name = false; - } - - m_children = 0; - m_data = 0; -} - -DomImage::DomImage() -{ - m_children = 0; - m_has_attr_name = false; - m_data = 0; -} - -DomImage::~DomImage() -{ - delete m_data; -} - -void DomImage::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("name")) { - setAttributeName(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("data")) { - DomImageData *v = new DomImageData(); - v->read(reader); - setElementData(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomImage::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("image") : tagName.toLower()); - - if (hasAttributeName()) - writer.writeAttribute(QStringLiteral("name"), attributeName()); - - if (m_children & Data) { - m_data->write(writer, QStringLiteral("data")); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -DomImageData* DomImage::takeElementData() -{ - DomImageData* a = m_data; - m_data = 0; - m_children ^= Data; - return a; -} - -void DomImage::setElementData(DomImageData* a) -{ - delete m_data; - m_children |= Data; - m_data = a; -} - -void DomImage::clearElementData() -{ - delete m_data; - m_data = 0; - m_children &= ~Data; -} - -void DomImageData::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_format = false; - m_has_attr_length = false; - m_attr_length = 0; - } - - m_children = 0; -} - -DomImageData::DomImageData() -{ - m_children = 0; - m_has_attr_format = false; - m_has_attr_length = false; - m_attr_length = 0; - m_text.clear(); -} - -DomImageData::~DomImageData() -{ -} - -void DomImageData::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("format")) { - setAttributeFormat(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("length")) { - setAttributeLength(attribute.value().toString().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomImageData::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("imagedata") : tagName.toLower()); - - if (hasAttributeFormat()) - writer.writeAttribute(QStringLiteral("format"), attributeFormat()); - - if (hasAttributeLength()) - writer.writeAttribute(QStringLiteral("length"), QString::number(attributeLength())); - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomCustomWidgets::clear(bool clear_all) -{ - qDeleteAll(m_customWidget); - m_customWidget.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomCustomWidgets::DomCustomWidgets() -{ - m_children = 0; -} - -DomCustomWidgets::~DomCustomWidgets() -{ - qDeleteAll(m_customWidget); - m_customWidget.clear(); -} - -void DomCustomWidgets::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("customwidget")) { - DomCustomWidget *v = new DomCustomWidget(); - v->read(reader); - m_customWidget.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomCustomWidgets::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("customwidgets") : tagName.toLower()); - - for (int i = 0; i < m_customWidget.size(); ++i) { - DomCustomWidget* v = m_customWidget[i]; - v->write(writer, QStringLiteral("customwidget")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomCustomWidgets::setElementCustomWidget(const QList& a) -{ - m_children |= CustomWidget; - m_customWidget = a; -} - -void DomHeader::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_location = false; - } - - m_children = 0; -} - -DomHeader::DomHeader() -{ - m_children = 0; - m_has_attr_location = false; - m_text.clear(); -} - -DomHeader::~DomHeader() -{ -} - -void DomHeader::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("location")) { - setAttributeLocation(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomHeader::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("header") : tagName.toLower()); - - if (hasAttributeLocation()) - writer.writeAttribute(QStringLiteral("location"), attributeLocation()); - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomCustomWidget::clear(bool clear_all) -{ - delete m_header; - delete m_sizeHint; - delete m_sizePolicy; - delete m_script; - delete m_properties; - delete m_slots; - delete m_propertyspecifications; - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_header = 0; - m_sizeHint = 0; - m_container = 0; - m_sizePolicy = 0; - m_script = 0; - m_properties = 0; - m_slots = 0; - m_propertyspecifications = 0; -} - -DomCustomWidget::DomCustomWidget() -{ - m_children = 0; - m_header = 0; - m_sizeHint = 0; - m_container = 0; - m_sizePolicy = 0; - m_script = 0; - m_properties = 0; - m_slots = 0; - m_propertyspecifications = 0; -} - -DomCustomWidget::~DomCustomWidget() -{ - delete m_header; - delete m_sizeHint; - delete m_sizePolicy; - delete m_script; - delete m_properties; - delete m_slots; - delete m_propertyspecifications; -} - -void DomCustomWidget::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("class")) { - setElementClass(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("extends")) { - setElementExtends(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("header")) { - DomHeader *v = new DomHeader(); - v->read(reader); - setElementHeader(v); - continue; - } - if (tag == QStringLiteral("sizehint")) { - DomSize *v = new DomSize(); - v->read(reader); - setElementSizeHint(v); - continue; - } - if (tag == QStringLiteral("addpagemethod")) { - setElementAddPageMethod(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("container")) { - setElementContainer(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("sizepolicy")) { - DomSizePolicyData *v = new DomSizePolicyData(); - v->read(reader); - setElementSizePolicy(v); - continue; - } - if (tag == QStringLiteral("pixmap")) { - setElementPixmap(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("script")) { - DomScript *v = new DomScript(); - v->read(reader); - setElementScript(v); - continue; - } - if (tag == QStringLiteral("properties")) { - DomProperties *v = new DomProperties(); - v->read(reader); - setElementProperties(v); - continue; - } - if (tag == QStringLiteral("slots")) { - DomSlots *v = new DomSlots(); - v->read(reader); - setElementSlots(v); - continue; - } - if (tag == QStringLiteral("propertyspecifications")) { - DomPropertySpecifications *v = new DomPropertySpecifications(); - v->read(reader); - setElementPropertyspecifications(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomCustomWidget::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("customwidget") : tagName.toLower()); - - if (m_children & Class) { - writer.writeTextElement(QStringLiteral("class"), m_class); - } - - if (m_children & Extends) { - writer.writeTextElement(QStringLiteral("extends"), m_extends); - } - - if (m_children & Header) { - m_header->write(writer, QStringLiteral("header")); - } - - if (m_children & SizeHint) { - m_sizeHint->write(writer, QStringLiteral("sizehint")); - } - - if (m_children & AddPageMethod) { - writer.writeTextElement(QStringLiteral("addpagemethod"), m_addPageMethod); - } - - if (m_children & Container) { - writer.writeTextElement(QStringLiteral("container"), QString::number(m_container)); - } - - if (m_children & SizePolicy) { - m_sizePolicy->write(writer, QStringLiteral("sizepolicy")); - } - - if (m_children & Pixmap) { - writer.writeTextElement(QStringLiteral("pixmap"), m_pixmap); - } - - if (m_children & Script) { - m_script->write(writer, QStringLiteral("script")); - } - - if (m_children & Properties) { - m_properties->write(writer, QStringLiteral("properties")); - } - - if (m_children & Slots) { - m_slots->write(writer, QStringLiteral("slots")); - } - - if (m_children & Propertyspecifications) { - m_propertyspecifications->write(writer, QStringLiteral("propertyspecifications")); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomCustomWidget::setElementClass(const QString& a) -{ - m_children |= Class; - m_class = a; -} - -void DomCustomWidget::setElementExtends(const QString& a) -{ - m_children |= Extends; - m_extends = a; -} - -DomHeader* DomCustomWidget::takeElementHeader() -{ - DomHeader* a = m_header; - m_header = 0; - m_children ^= Header; - return a; -} - -void DomCustomWidget::setElementHeader(DomHeader* a) -{ - delete m_header; - m_children |= Header; - m_header = a; -} - -DomSize* DomCustomWidget::takeElementSizeHint() -{ - DomSize* a = m_sizeHint; - m_sizeHint = 0; - m_children ^= SizeHint; - return a; -} - -void DomCustomWidget::setElementSizeHint(DomSize* a) -{ - delete m_sizeHint; - m_children |= SizeHint; - m_sizeHint = a; -} - -void DomCustomWidget::setElementAddPageMethod(const QString& a) -{ - m_children |= AddPageMethod; - m_addPageMethod = a; -} - -void DomCustomWidget::setElementContainer(int a) -{ - m_children |= Container; - m_container = a; -} - -DomSizePolicyData* DomCustomWidget::takeElementSizePolicy() -{ - DomSizePolicyData* a = m_sizePolicy; - m_sizePolicy = 0; - m_children ^= SizePolicy; - return a; -} - -void DomCustomWidget::setElementSizePolicy(DomSizePolicyData* a) -{ - delete m_sizePolicy; - m_children |= SizePolicy; - m_sizePolicy = a; -} - -void DomCustomWidget::setElementPixmap(const QString& a) -{ - m_children |= Pixmap; - m_pixmap = a; -} - -DomScript* DomCustomWidget::takeElementScript() -{ - DomScript* a = m_script; - m_script = 0; - m_children ^= Script; - return a; -} - -void DomCustomWidget::setElementScript(DomScript* a) -{ - delete m_script; - m_children |= Script; - m_script = a; -} - -DomProperties* DomCustomWidget::takeElementProperties() -{ - DomProperties* a = m_properties; - m_properties = 0; - m_children ^= Properties; - return a; -} - -void DomCustomWidget::setElementProperties(DomProperties* a) -{ - delete m_properties; - m_children |= Properties; - m_properties = a; -} - -DomSlots* DomCustomWidget::takeElementSlots() -{ - DomSlots* a = m_slots; - m_slots = 0; - m_children ^= Slots; - return a; -} - -void DomCustomWidget::setElementSlots(DomSlots* a) -{ - delete m_slots; - m_children |= Slots; - m_slots = a; -} - -DomPropertySpecifications* DomCustomWidget::takeElementPropertyspecifications() -{ - DomPropertySpecifications* a = m_propertyspecifications; - m_propertyspecifications = 0; - m_children ^= Propertyspecifications; - return a; -} - -void DomCustomWidget::setElementPropertyspecifications(DomPropertySpecifications* a) -{ - delete m_propertyspecifications; - m_children |= Propertyspecifications; - m_propertyspecifications = a; -} - -void DomCustomWidget::clearElementClass() -{ - m_children &= ~Class; -} - -void DomCustomWidget::clearElementExtends() -{ - m_children &= ~Extends; -} - -void DomCustomWidget::clearElementHeader() -{ - delete m_header; - m_header = 0; - m_children &= ~Header; -} - -void DomCustomWidget::clearElementSizeHint() -{ - delete m_sizeHint; - m_sizeHint = 0; - m_children &= ~SizeHint; -} - -void DomCustomWidget::clearElementAddPageMethod() -{ - m_children &= ~AddPageMethod; -} - -void DomCustomWidget::clearElementContainer() -{ - m_children &= ~Container; -} - -void DomCustomWidget::clearElementSizePolicy() -{ - delete m_sizePolicy; - m_sizePolicy = 0; - m_children &= ~SizePolicy; -} - -void DomCustomWidget::clearElementPixmap() -{ - m_children &= ~Pixmap; -} - -void DomCustomWidget::clearElementScript() -{ - delete m_script; - m_script = 0; - m_children &= ~Script; -} - -void DomCustomWidget::clearElementProperties() -{ - delete m_properties; - m_properties = 0; - m_children &= ~Properties; -} - -void DomCustomWidget::clearElementSlots() -{ - delete m_slots; - m_slots = 0; - m_children &= ~Slots; -} - -void DomCustomWidget::clearElementPropertyspecifications() -{ - delete m_propertyspecifications; - m_propertyspecifications = 0; - m_children &= ~Propertyspecifications; -} - -void DomProperties::clear(bool clear_all) -{ - qDeleteAll(m_property); - m_property.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomProperties::DomProperties() -{ - m_children = 0; -} - -DomProperties::~DomProperties() -{ - qDeleteAll(m_property); - m_property.clear(); -} - -void DomProperties::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("property")) { - DomPropertyData *v = new DomPropertyData(); - v->read(reader); - m_property.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomProperties::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("properties") : tagName.toLower()); - - for (int i = 0; i < m_property.size(); ++i) { - DomPropertyData* v = m_property[i]; - v->write(writer, QStringLiteral("property")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomProperties::setElementProperty(const QList& a) -{ - m_children |= Property; - m_property = a; -} - -void DomPropertyData::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_type = false; - } - - m_children = 0; -} - -DomPropertyData::DomPropertyData() -{ - m_children = 0; - m_has_attr_type = false; -} - -DomPropertyData::~DomPropertyData() -{ -} - -void DomPropertyData::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("type")) { - setAttributeType(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomPropertyData::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("propertydata") : tagName.toLower()); - - if (hasAttributeType()) - writer.writeAttribute(QStringLiteral("type"), attributeType()); - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomSizePolicyData::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_horData = 0; - m_verData = 0; -} - -DomSizePolicyData::DomSizePolicyData() -{ - m_children = 0; - m_horData = 0; - m_verData = 0; -} - -DomSizePolicyData::~DomSizePolicyData() -{ -} - -void DomSizePolicyData::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("hordata")) { - setElementHorData(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("verdata")) { - setElementVerData(reader.readElementText().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomSizePolicyData::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("sizepolicydata") : tagName.toLower()); - - if (m_children & HorData) { - writer.writeTextElement(QStringLiteral("hordata"), QString::number(m_horData)); - } - - if (m_children & VerData) { - writer.writeTextElement(QStringLiteral("verdata"), QString::number(m_verData)); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomSizePolicyData::setElementHorData(int a) -{ - m_children |= HorData; - m_horData = a; -} - -void DomSizePolicyData::setElementVerData(int a) -{ - m_children |= VerData; - m_verData = a; -} - -void DomSizePolicyData::clearElementHorData() -{ - m_children &= ~HorData; -} - -void DomSizePolicyData::clearElementVerData() -{ - m_children &= ~VerData; -} - -void DomLayoutDefault::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_spacing = false; - m_attr_spacing = 0; - m_has_attr_margin = false; - m_attr_margin = 0; - } - - m_children = 0; -} - -DomLayoutDefault::DomLayoutDefault() -{ - m_children = 0; - m_has_attr_spacing = false; - m_attr_spacing = 0; - m_has_attr_margin = false; - m_attr_margin = 0; -} - -DomLayoutDefault::~DomLayoutDefault() -{ -} - -void DomLayoutDefault::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("spacing")) { - setAttributeSpacing(attribute.value().toString().toInt()); - continue; - } - if (name == QStringLiteral("margin")) { - setAttributeMargin(attribute.value().toString().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomLayoutDefault::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("layoutdefault") : tagName.toLower()); - - if (hasAttributeSpacing()) - writer.writeAttribute(QStringLiteral("spacing"), QString::number(attributeSpacing())); - - if (hasAttributeMargin()) - writer.writeAttribute(QStringLiteral("margin"), QString::number(attributeMargin())); - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomLayoutFunction::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_spacing = false; - m_has_attr_margin = false; - } - - m_children = 0; -} - -DomLayoutFunction::DomLayoutFunction() -{ - m_children = 0; - m_has_attr_spacing = false; - m_has_attr_margin = false; -} - -DomLayoutFunction::~DomLayoutFunction() -{ -} - -void DomLayoutFunction::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("spacing")) { - setAttributeSpacing(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("margin")) { - setAttributeMargin(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomLayoutFunction::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("layoutfunction") : tagName.toLower()); - - if (hasAttributeSpacing()) - writer.writeAttribute(QStringLiteral("spacing"), attributeSpacing()); - - if (hasAttributeMargin()) - writer.writeAttribute(QStringLiteral("margin"), attributeMargin()); - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomTabStops::clear(bool clear_all) -{ - m_tabStop.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomTabStops::DomTabStops() -{ - m_children = 0; -} - -DomTabStops::~DomTabStops() -{ - m_tabStop.clear(); -} - -void DomTabStops::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("tabstop")) { - m_tabStop.append(reader.readElementText()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomTabStops::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("tabstops") : tagName.toLower()); - - for (int i = 0; i < m_tabStop.size(); ++i) { - QString v = m_tabStop[i]; - writer.writeTextElement(QStringLiteral("tabstop"), v); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomTabStops::setElementTabStop(const QStringList& a) -{ - m_children |= TabStop; - m_tabStop = a; -} - -void DomLayout::clear(bool clear_all) -{ - qDeleteAll(m_property); - m_property.clear(); - qDeleteAll(m_attribute); - m_attribute.clear(); - qDeleteAll(m_item); - m_item.clear(); - - if (clear_all) { - m_text.clear(); - m_has_attr_class = false; - m_has_attr_name = false; - m_has_attr_stretch = false; - m_has_attr_rowStretch = false; - m_has_attr_columnStretch = false; - m_has_attr_rowMinimumHeight = false; - m_has_attr_columnMinimumWidth = false; - } - - m_children = 0; -} - -DomLayout::DomLayout() -{ - m_children = 0; - m_has_attr_class = false; - m_has_attr_name = false; - m_has_attr_stretch = false; - m_has_attr_rowStretch = false; - m_has_attr_columnStretch = false; - m_has_attr_rowMinimumHeight = false; - m_has_attr_columnMinimumWidth = false; -} - -DomLayout::~DomLayout() -{ - qDeleteAll(m_property); - m_property.clear(); - qDeleteAll(m_attribute); - m_attribute.clear(); - qDeleteAll(m_item); - m_item.clear(); -} - -void DomLayout::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("class")) { - setAttributeClass(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("name")) { - setAttributeName(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("stretch")) { - setAttributeStretch(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("rowstretch")) { - setAttributeRowStretch(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("columnstretch")) { - setAttributeColumnStretch(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("rowminimumheight")) { - setAttributeRowMinimumHeight(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("columnminimumwidth")) { - setAttributeColumnMinimumWidth(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("property")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_property.append(v); - continue; - } - if (tag == QStringLiteral("attribute")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_attribute.append(v); - continue; - } - if (tag == QStringLiteral("item")) { - DomLayoutItem *v = new DomLayoutItem(); - v->read(reader); - m_item.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomLayout::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("layout") : tagName.toLower()); - - if (hasAttributeClass()) - writer.writeAttribute(QStringLiteral("class"), attributeClass()); - - if (hasAttributeName()) - writer.writeAttribute(QStringLiteral("name"), attributeName()); - - if (hasAttributeStretch()) - writer.writeAttribute(QStringLiteral("stretch"), attributeStretch()); - - if (hasAttributeRowStretch()) - writer.writeAttribute(QStringLiteral("rowstretch"), attributeRowStretch()); - - if (hasAttributeColumnStretch()) - writer.writeAttribute(QStringLiteral("columnstretch"), attributeColumnStretch()); - - if (hasAttributeRowMinimumHeight()) - writer.writeAttribute(QStringLiteral("rowminimumheight"), attributeRowMinimumHeight()); - - if (hasAttributeColumnMinimumWidth()) - writer.writeAttribute(QStringLiteral("columnminimumwidth"), attributeColumnMinimumWidth()); - - for (int i = 0; i < m_property.size(); ++i) { - DomProperty* v = m_property[i]; - v->write(writer, QStringLiteral("property")); - } - for (int i = 0; i < m_attribute.size(); ++i) { - DomProperty* v = m_attribute[i]; - v->write(writer, QStringLiteral("attribute")); - } - for (int i = 0; i < m_item.size(); ++i) { - DomLayoutItem* v = m_item[i]; - v->write(writer, QStringLiteral("item")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomLayout::setElementProperty(const QList& a) -{ - m_children |= Property; - m_property = a; -} - -void DomLayout::setElementAttribute(const QList& a) -{ - m_children |= Attribute; - m_attribute = a; -} - -void DomLayout::setElementItem(const QList& a) -{ - m_children |= Item; - m_item = a; -} - -void DomLayoutItem::clear(bool clear_all) -{ - delete m_widget; - delete m_layout; - delete m_spacer; - - if (clear_all) { - m_text.clear(); - m_has_attr_row = false; - m_attr_row = 0; - m_has_attr_column = false; - m_attr_column = 0; - m_has_attr_rowSpan = false; - m_attr_rowSpan = 0; - m_has_attr_colSpan = false; - m_attr_colSpan = 0; - m_has_attr_alignment = false; - } - - m_kind = Unknown; - - m_widget = 0; - m_layout = 0; - m_spacer = 0; -} - -DomLayoutItem::DomLayoutItem() -{ - m_kind = Unknown; - - m_has_attr_row = false; - m_attr_row = 0; - m_has_attr_column = false; - m_attr_column = 0; - m_has_attr_rowSpan = false; - m_attr_rowSpan = 0; - m_has_attr_colSpan = false; - m_attr_colSpan = 0; - m_has_attr_alignment = false; - m_widget = 0; - m_layout = 0; - m_spacer = 0; -} - -DomLayoutItem::~DomLayoutItem() -{ - delete m_widget; - delete m_layout; - delete m_spacer; -} - -void DomLayoutItem::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("row")) { - setAttributeRow(attribute.value().toString().toInt()); - continue; - } - if (name == QStringLiteral("column")) { - setAttributeColumn(attribute.value().toString().toInt()); - continue; - } - if (name == QStringLiteral("rowspan")) { - setAttributeRowSpan(attribute.value().toString().toInt()); - continue; - } - if (name == QStringLiteral("colspan")) { - setAttributeColSpan(attribute.value().toString().toInt()); - continue; - } - if (name == QStringLiteral("alignment")) { - setAttributeAlignment(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("widget")) { - DomWidget *v = new DomWidget(); - v->read(reader); - setElementWidget(v); - continue; - } - if (tag == QStringLiteral("layout")) { - DomLayout *v = new DomLayout(); - v->read(reader); - setElementLayout(v); - continue; - } - if (tag == QStringLiteral("spacer")) { - DomSpacer *v = new DomSpacer(); - v->read(reader); - setElementSpacer(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomLayoutItem::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("layoutitem") : tagName.toLower()); - - if (hasAttributeRow()) - writer.writeAttribute(QStringLiteral("row"), QString::number(attributeRow())); - - if (hasAttributeColumn()) - writer.writeAttribute(QStringLiteral("column"), QString::number(attributeColumn())); - - if (hasAttributeRowSpan()) - writer.writeAttribute(QStringLiteral("rowspan"), QString::number(attributeRowSpan())); - - if (hasAttributeColSpan()) - writer.writeAttribute(QStringLiteral("colspan"), QString::number(attributeColSpan())); - - if (hasAttributeAlignment()) - writer.writeAttribute(QStringLiteral("alignment"), attributeAlignment()); - - switch (kind()) { - case Widget: { - DomWidget* v = elementWidget(); - if (v != 0) { - v->write(writer, QStringLiteral("widget")); - } - break; - } - case Layout: { - DomLayout* v = elementLayout(); - if (v != 0) { - v->write(writer, QStringLiteral("layout")); - } - break; - } - case Spacer: { - DomSpacer* v = elementSpacer(); - if (v != 0) { - v->write(writer, QStringLiteral("spacer")); - } - break; - } - default: - break; - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -DomWidget* DomLayoutItem::takeElementWidget() -{ - DomWidget* a = m_widget; - m_widget = 0; - return a; -} - -void DomLayoutItem::setElementWidget(DomWidget* a) -{ - clear(false); - m_kind = Widget; - m_widget = a; -} - -DomLayout* DomLayoutItem::takeElementLayout() -{ - DomLayout* a = m_layout; - m_layout = 0; - return a; -} - -void DomLayoutItem::setElementLayout(DomLayout* a) -{ - clear(false); - m_kind = Layout; - m_layout = a; -} - -DomSpacer* DomLayoutItem::takeElementSpacer() -{ - DomSpacer* a = m_spacer; - m_spacer = 0; - return a; -} - -void DomLayoutItem::setElementSpacer(DomSpacer* a) -{ - clear(false); - m_kind = Spacer; - m_spacer = a; -} - -void DomRow::clear(bool clear_all) -{ - qDeleteAll(m_property); - m_property.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomRow::DomRow() -{ - m_children = 0; -} - -DomRow::~DomRow() -{ - qDeleteAll(m_property); - m_property.clear(); -} - -void DomRow::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("property")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_property.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomRow::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("row") : tagName.toLower()); - - for (int i = 0; i < m_property.size(); ++i) { - DomProperty* v = m_property[i]; - v->write(writer, QStringLiteral("property")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomRow::setElementProperty(const QList& a) -{ - m_children |= Property; - m_property = a; -} - -void DomColumn::clear(bool clear_all) -{ - qDeleteAll(m_property); - m_property.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomColumn::DomColumn() -{ - m_children = 0; -} - -DomColumn::~DomColumn() -{ - qDeleteAll(m_property); - m_property.clear(); -} - -void DomColumn::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("property")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_property.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomColumn::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("column") : tagName.toLower()); - - for (int i = 0; i < m_property.size(); ++i) { - DomProperty* v = m_property[i]; - v->write(writer, QStringLiteral("property")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomColumn::setElementProperty(const QList& a) -{ - m_children |= Property; - m_property = a; -} - -void DomItem::clear(bool clear_all) -{ - qDeleteAll(m_property); - m_property.clear(); - qDeleteAll(m_item); - m_item.clear(); - - if (clear_all) { - m_text.clear(); - m_has_attr_row = false; - m_attr_row = 0; - m_has_attr_column = false; - m_attr_column = 0; - } - - m_children = 0; -} - -DomItem::DomItem() -{ - m_children = 0; - m_has_attr_row = false; - m_attr_row = 0; - m_has_attr_column = false; - m_attr_column = 0; -} - -DomItem::~DomItem() -{ - qDeleteAll(m_property); - m_property.clear(); - qDeleteAll(m_item); - m_item.clear(); -} - -void DomItem::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("row")) { - setAttributeRow(attribute.value().toString().toInt()); - continue; - } - if (name == QStringLiteral("column")) { - setAttributeColumn(attribute.value().toString().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("property")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_property.append(v); - continue; - } - if (tag == QStringLiteral("item")) { - DomItem *v = new DomItem(); - v->read(reader); - m_item.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomItem::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("item") : tagName.toLower()); - - if (hasAttributeRow()) - writer.writeAttribute(QStringLiteral("row"), QString::number(attributeRow())); - - if (hasAttributeColumn()) - writer.writeAttribute(QStringLiteral("column"), QString::number(attributeColumn())); - - for (int i = 0; i < m_property.size(); ++i) { - DomProperty* v = m_property[i]; - v->write(writer, QStringLiteral("property")); - } - for (int i = 0; i < m_item.size(); ++i) { - DomItem* v = m_item[i]; - v->write(writer, QStringLiteral("item")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomItem::setElementProperty(const QList& a) -{ - m_children |= Property; - m_property = a; -} - -void DomItem::setElementItem(const QList& a) -{ - m_children |= Item; - m_item = a; -} - -void DomWidget::clear(bool clear_all) -{ - m_class.clear(); - qDeleteAll(m_property); - m_property.clear(); - qDeleteAll(m_script); - m_script.clear(); - qDeleteAll(m_widgetData); - m_widgetData.clear(); - qDeleteAll(m_attribute); - m_attribute.clear(); - qDeleteAll(m_row); - m_row.clear(); - qDeleteAll(m_column); - m_column.clear(); - qDeleteAll(m_item); - m_item.clear(); - qDeleteAll(m_layout); - m_layout.clear(); - qDeleteAll(m_widget); - m_widget.clear(); - qDeleteAll(m_action); - m_action.clear(); - qDeleteAll(m_actionGroup); - m_actionGroup.clear(); - qDeleteAll(m_addAction); - m_addAction.clear(); - m_zOrder.clear(); - - if (clear_all) { - m_text.clear(); - m_has_attr_class = false; - m_has_attr_name = false; - m_has_attr_native = false; - m_attr_native = false; - } - - m_children = 0; -} - -DomWidget::DomWidget() -{ - m_children = 0; - m_has_attr_class = false; - m_has_attr_name = false; - m_has_attr_native = false; - m_attr_native = false; -} - -DomWidget::~DomWidget() -{ - m_class.clear(); - qDeleteAll(m_property); - m_property.clear(); - qDeleteAll(m_script); - m_script.clear(); - qDeleteAll(m_widgetData); - m_widgetData.clear(); - qDeleteAll(m_attribute); - m_attribute.clear(); - qDeleteAll(m_row); - m_row.clear(); - qDeleteAll(m_column); - m_column.clear(); - qDeleteAll(m_item); - m_item.clear(); - qDeleteAll(m_layout); - m_layout.clear(); - qDeleteAll(m_widget); - m_widget.clear(); - qDeleteAll(m_action); - m_action.clear(); - qDeleteAll(m_actionGroup); - m_actionGroup.clear(); - qDeleteAll(m_addAction); - m_addAction.clear(); - m_zOrder.clear(); -} - -void DomWidget::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("class")) { - setAttributeClass(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("name")) { - setAttributeName(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("native")) { - setAttributeNative((attribute.value().toString() == QLatin1String("true") ? true : false)); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("class")) { - m_class.append(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("property")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_property.append(v); - continue; - } - if (tag == QStringLiteral("script")) { - DomScript *v = new DomScript(); - v->read(reader); - m_script.append(v); - continue; - } - if (tag == QStringLiteral("widgetdata")) { - DomWidgetData *v = new DomWidgetData(); - v->read(reader); - m_widgetData.append(v); - continue; - } - if (tag == QStringLiteral("attribute")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_attribute.append(v); - continue; - } - if (tag == QStringLiteral("row")) { - DomRow *v = new DomRow(); - v->read(reader); - m_row.append(v); - continue; - } - if (tag == QStringLiteral("column")) { - DomColumn *v = new DomColumn(); - v->read(reader); - m_column.append(v); - continue; - } - if (tag == QStringLiteral("item")) { - DomItem *v = new DomItem(); - v->read(reader); - m_item.append(v); - continue; - } - if (tag == QStringLiteral("layout")) { - DomLayout *v = new DomLayout(); - v->read(reader); - m_layout.append(v); - continue; - } - if (tag == QStringLiteral("widget")) { - DomWidget *v = new DomWidget(); - v->read(reader); - m_widget.append(v); - continue; - } - if (tag == QStringLiteral("action")) { - DomAction *v = new DomAction(); - v->read(reader); - m_action.append(v); - continue; - } - if (tag == QStringLiteral("actiongroup")) { - DomActionGroup *v = new DomActionGroup(); - v->read(reader); - m_actionGroup.append(v); - continue; - } - if (tag == QStringLiteral("addaction")) { - DomActionRef *v = new DomActionRef(); - v->read(reader); - m_addAction.append(v); - continue; - } - if (tag == QStringLiteral("zorder")) { - m_zOrder.append(reader.readElementText()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomWidget::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("widget") : tagName.toLower()); - - if (hasAttributeClass()) - writer.writeAttribute(QStringLiteral("class"), attributeClass()); - - if (hasAttributeName()) - writer.writeAttribute(QStringLiteral("name"), attributeName()); - - if (hasAttributeNative()) - writer.writeAttribute(QStringLiteral("native"), (attributeNative() ? QLatin1String("true") : QLatin1String("false"))); - - for (int i = 0; i < m_class.size(); ++i) { - QString v = m_class[i]; - writer.writeTextElement(QStringLiteral("class"), v); - } - for (int i = 0; i < m_property.size(); ++i) { - DomProperty* v = m_property[i]; - v->write(writer, QStringLiteral("property")); - } - for (int i = 0; i < m_script.size(); ++i) { - DomScript* v = m_script[i]; - v->write(writer, QStringLiteral("script")); - } - for (int i = 0; i < m_widgetData.size(); ++i) { - DomWidgetData* v = m_widgetData[i]; - v->write(writer, QStringLiteral("widgetdata")); - } - for (int i = 0; i < m_attribute.size(); ++i) { - DomProperty* v = m_attribute[i]; - v->write(writer, QStringLiteral("attribute")); - } - for (int i = 0; i < m_row.size(); ++i) { - DomRow* v = m_row[i]; - v->write(writer, QStringLiteral("row")); - } - for (int i = 0; i < m_column.size(); ++i) { - DomColumn* v = m_column[i]; - v->write(writer, QStringLiteral("column")); - } - for (int i = 0; i < m_item.size(); ++i) { - DomItem* v = m_item[i]; - v->write(writer, QStringLiteral("item")); - } - for (int i = 0; i < m_layout.size(); ++i) { - DomLayout* v = m_layout[i]; - v->write(writer, QStringLiteral("layout")); - } - for (int i = 0; i < m_widget.size(); ++i) { - DomWidget* v = m_widget[i]; - v->write(writer, QStringLiteral("widget")); - } - for (int i = 0; i < m_action.size(); ++i) { - DomAction* v = m_action[i]; - v->write(writer, QStringLiteral("action")); - } - for (int i = 0; i < m_actionGroup.size(); ++i) { - DomActionGroup* v = m_actionGroup[i]; - v->write(writer, QStringLiteral("actiongroup")); - } - for (int i = 0; i < m_addAction.size(); ++i) { - DomActionRef* v = m_addAction[i]; - v->write(writer, QStringLiteral("addaction")); - } - for (int i = 0; i < m_zOrder.size(); ++i) { - QString v = m_zOrder[i]; - writer.writeTextElement(QStringLiteral("zorder"), v); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomWidget::setElementClass(const QStringList& a) -{ - m_children |= Class; - m_class = a; -} - -void DomWidget::setElementProperty(const QList& a) -{ - m_children |= Property; - m_property = a; -} - -void DomWidget::setElementScript(const QList& a) -{ - m_children |= Script; - m_script = a; -} - -void DomWidget::setElementWidgetData(const QList& a) -{ - m_children |= WidgetData; - m_widgetData = a; -} - -void DomWidget::setElementAttribute(const QList& a) -{ - m_children |= Attribute; - m_attribute = a; -} - -void DomWidget::setElementRow(const QList& a) -{ - m_children |= Row; - m_row = a; -} - -void DomWidget::setElementColumn(const QList& a) -{ - m_children |= Column; - m_column = a; -} - -void DomWidget::setElementItem(const QList& a) -{ - m_children |= Item; - m_item = a; -} - -void DomWidget::setElementLayout(const QList& a) -{ - m_children |= Layout; - m_layout = a; -} - -void DomWidget::setElementWidget(const QList& a) -{ - m_children |= Widget; - m_widget = a; -} - -void DomWidget::setElementAction(const QList& a) -{ - m_children |= Action; - m_action = a; -} - -void DomWidget::setElementActionGroup(const QList& a) -{ - m_children |= ActionGroup; - m_actionGroup = a; -} - -void DomWidget::setElementAddAction(const QList& a) -{ - m_children |= AddAction; - m_addAction = a; -} - -void DomWidget::setElementZOrder(const QStringList& a) -{ - m_children |= ZOrder; - m_zOrder = a; -} - -void DomSpacer::clear(bool clear_all) -{ - qDeleteAll(m_property); - m_property.clear(); - - if (clear_all) { - m_text.clear(); - m_has_attr_name = false; - } - - m_children = 0; -} - -DomSpacer::DomSpacer() -{ - m_children = 0; - m_has_attr_name = false; -} - -DomSpacer::~DomSpacer() -{ - qDeleteAll(m_property); - m_property.clear(); -} - -void DomSpacer::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("name")) { - setAttributeName(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("property")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_property.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomSpacer::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("spacer") : tagName.toLower()); - - if (hasAttributeName()) - writer.writeAttribute(QStringLiteral("name"), attributeName()); - - for (int i = 0; i < m_property.size(); ++i) { - DomProperty* v = m_property[i]; - v->write(writer, QStringLiteral("property")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomSpacer::setElementProperty(const QList& a) -{ - m_children |= Property; - m_property = a; -} - -void DomColor::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_alpha = false; - m_attr_alpha = 0; - } - - m_children = 0; - m_red = 0; - m_green = 0; - m_blue = 0; -} - -DomColor::DomColor() -{ - m_children = 0; - m_has_attr_alpha = false; - m_attr_alpha = 0; - m_red = 0; - m_green = 0; - m_blue = 0; -} - -DomColor::~DomColor() -{ -} - -void DomColor::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("alpha")) { - setAttributeAlpha(attribute.value().toString().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("red")) { - setElementRed(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("green")) { - setElementGreen(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("blue")) { - setElementBlue(reader.readElementText().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomColor::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("color") : tagName.toLower()); - - if (hasAttributeAlpha()) - writer.writeAttribute(QStringLiteral("alpha"), QString::number(attributeAlpha())); - - if (m_children & Red) { - writer.writeTextElement(QStringLiteral("red"), QString::number(m_red)); - } - - if (m_children & Green) { - writer.writeTextElement(QStringLiteral("green"), QString::number(m_green)); - } - - if (m_children & Blue) { - writer.writeTextElement(QStringLiteral("blue"), QString::number(m_blue)); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomColor::setElementRed(int a) -{ - m_children |= Red; - m_red = a; -} - -void DomColor::setElementGreen(int a) -{ - m_children |= Green; - m_green = a; -} - -void DomColor::setElementBlue(int a) -{ - m_children |= Blue; - m_blue = a; -} - -void DomColor::clearElementRed() -{ - m_children &= ~Red; -} - -void DomColor::clearElementGreen() -{ - m_children &= ~Green; -} - -void DomColor::clearElementBlue() -{ - m_children &= ~Blue; -} - -void DomGradientStop::clear(bool clear_all) -{ - delete m_color; - - if (clear_all) { - m_text.clear(); - m_has_attr_position = false; - m_attr_position = 0.0; - } - - m_children = 0; - m_color = 0; -} - -DomGradientStop::DomGradientStop() -{ - m_children = 0; - m_has_attr_position = false; - m_attr_position = 0.0; - m_color = 0; -} - -DomGradientStop::~DomGradientStop() -{ - delete m_color; -} - -void DomGradientStop::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("position")) { - setAttributePosition(attribute.value().toString().toDouble()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("color")) { - DomColor *v = new DomColor(); - v->read(reader); - setElementColor(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomGradientStop::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("gradientstop") : tagName.toLower()); - - if (hasAttributePosition()) - writer.writeAttribute(QStringLiteral("position"), QString::number(attributePosition(), 'f', 15)); - - if (m_children & Color) { - m_color->write(writer, QStringLiteral("color")); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -DomColor* DomGradientStop::takeElementColor() -{ - DomColor* a = m_color; - m_color = 0; - m_children ^= Color; - return a; -} - -void DomGradientStop::setElementColor(DomColor* a) -{ - delete m_color; - m_children |= Color; - m_color = a; -} - -void DomGradientStop::clearElementColor() -{ - delete m_color; - m_color = 0; - m_children &= ~Color; -} - -void DomGradient::clear(bool clear_all) -{ - qDeleteAll(m_gradientStop); - m_gradientStop.clear(); - - if (clear_all) { - m_text.clear(); - m_has_attr_startX = false; - m_attr_startX = 0.0; - m_has_attr_startY = false; - m_attr_startY = 0.0; - m_has_attr_endX = false; - m_attr_endX = 0.0; - m_has_attr_endY = false; - m_attr_endY = 0.0; - m_has_attr_centralX = false; - m_attr_centralX = 0.0; - m_has_attr_centralY = false; - m_attr_centralY = 0.0; - m_has_attr_focalX = false; - m_attr_focalX = 0.0; - m_has_attr_focalY = false; - m_attr_focalY = 0.0; - m_has_attr_radius = false; - m_attr_radius = 0.0; - m_has_attr_angle = false; - m_attr_angle = 0.0; - m_has_attr_type = false; - m_has_attr_spread = false; - m_has_attr_coordinateMode = false; - } - - m_children = 0; -} - -DomGradient::DomGradient() -{ - m_children = 0; - m_has_attr_startX = false; - m_attr_startX = 0.0; - m_has_attr_startY = false; - m_attr_startY = 0.0; - m_has_attr_endX = false; - m_attr_endX = 0.0; - m_has_attr_endY = false; - m_attr_endY = 0.0; - m_has_attr_centralX = false; - m_attr_centralX = 0.0; - m_has_attr_centralY = false; - m_attr_centralY = 0.0; - m_has_attr_focalX = false; - m_attr_focalX = 0.0; - m_has_attr_focalY = false; - m_attr_focalY = 0.0; - m_has_attr_radius = false; - m_attr_radius = 0.0; - m_has_attr_angle = false; - m_attr_angle = 0.0; - m_has_attr_type = false; - m_has_attr_spread = false; - m_has_attr_coordinateMode = false; -} - -DomGradient::~DomGradient() -{ - qDeleteAll(m_gradientStop); - m_gradientStop.clear(); -} - -void DomGradient::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("startx")) { - setAttributeStartX(attribute.value().toString().toDouble()); - continue; - } - if (name == QStringLiteral("starty")) { - setAttributeStartY(attribute.value().toString().toDouble()); - continue; - } - if (name == QStringLiteral("endx")) { - setAttributeEndX(attribute.value().toString().toDouble()); - continue; - } - if (name == QStringLiteral("endy")) { - setAttributeEndY(attribute.value().toString().toDouble()); - continue; - } - if (name == QStringLiteral("centralx")) { - setAttributeCentralX(attribute.value().toString().toDouble()); - continue; - } - if (name == QStringLiteral("centraly")) { - setAttributeCentralY(attribute.value().toString().toDouble()); - continue; - } - if (name == QStringLiteral("focalx")) { - setAttributeFocalX(attribute.value().toString().toDouble()); - continue; - } - if (name == QStringLiteral("focaly")) { - setAttributeFocalY(attribute.value().toString().toDouble()); - continue; - } - if (name == QStringLiteral("radius")) { - setAttributeRadius(attribute.value().toString().toDouble()); - continue; - } - if (name == QStringLiteral("angle")) { - setAttributeAngle(attribute.value().toString().toDouble()); - continue; - } - if (name == QStringLiteral("type")) { - setAttributeType(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("spread")) { - setAttributeSpread(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("coordinatemode")) { - setAttributeCoordinateMode(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("gradientstop")) { - DomGradientStop *v = new DomGradientStop(); - v->read(reader); - m_gradientStop.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomGradient::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("gradient") : tagName.toLower()); - - if (hasAttributeStartX()) - writer.writeAttribute(QStringLiteral("startx"), QString::number(attributeStartX(), 'f', 15)); - - if (hasAttributeStartY()) - writer.writeAttribute(QStringLiteral("starty"), QString::number(attributeStartY(), 'f', 15)); - - if (hasAttributeEndX()) - writer.writeAttribute(QStringLiteral("endx"), QString::number(attributeEndX(), 'f', 15)); - - if (hasAttributeEndY()) - writer.writeAttribute(QStringLiteral("endy"), QString::number(attributeEndY(), 'f', 15)); - - if (hasAttributeCentralX()) - writer.writeAttribute(QStringLiteral("centralx"), QString::number(attributeCentralX(), 'f', 15)); - - if (hasAttributeCentralY()) - writer.writeAttribute(QStringLiteral("centraly"), QString::number(attributeCentralY(), 'f', 15)); - - if (hasAttributeFocalX()) - writer.writeAttribute(QStringLiteral("focalx"), QString::number(attributeFocalX(), 'f', 15)); - - if (hasAttributeFocalY()) - writer.writeAttribute(QStringLiteral("focaly"), QString::number(attributeFocalY(), 'f', 15)); - - if (hasAttributeRadius()) - writer.writeAttribute(QStringLiteral("radius"), QString::number(attributeRadius(), 'f', 15)); - - if (hasAttributeAngle()) - writer.writeAttribute(QStringLiteral("angle"), QString::number(attributeAngle(), 'f', 15)); - - if (hasAttributeType()) - writer.writeAttribute(QStringLiteral("type"), attributeType()); - - if (hasAttributeSpread()) - writer.writeAttribute(QStringLiteral("spread"), attributeSpread()); - - if (hasAttributeCoordinateMode()) - writer.writeAttribute(QStringLiteral("coordinatemode"), attributeCoordinateMode()); - - for (int i = 0; i < m_gradientStop.size(); ++i) { - DomGradientStop* v = m_gradientStop[i]; - v->write(writer, QStringLiteral("gradientstop")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomGradient::setElementGradientStop(const QList& a) -{ - m_children |= GradientStop; - m_gradientStop = a; -} - -void DomBrush::clear(bool clear_all) -{ - delete m_color; - delete m_texture; - delete m_gradient; - - if (clear_all) { - m_text.clear(); - m_has_attr_brushStyle = false; - } - - m_kind = Unknown; - - m_color = 0; - m_texture = 0; - m_gradient = 0; -} - -DomBrush::DomBrush() -{ - m_kind = Unknown; - - m_has_attr_brushStyle = false; - m_color = 0; - m_texture = 0; - m_gradient = 0; -} - -DomBrush::~DomBrush() -{ - delete m_color; - delete m_texture; - delete m_gradient; -} - -void DomBrush::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("brushstyle")) { - setAttributeBrushStyle(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("color")) { - DomColor *v = new DomColor(); - v->read(reader); - setElementColor(v); - continue; - } - if (tag == QStringLiteral("texture")) { - DomProperty *v = new DomProperty(); - v->read(reader); - setElementTexture(v); - continue; - } - if (tag == QStringLiteral("gradient")) { - DomGradient *v = new DomGradient(); - v->read(reader); - setElementGradient(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomBrush::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("brush") : tagName.toLower()); - - if (hasAttributeBrushStyle()) - writer.writeAttribute(QStringLiteral("brushstyle"), attributeBrushStyle()); - - switch (kind()) { - case Color: { - DomColor* v = elementColor(); - if (v != 0) { - v->write(writer, QStringLiteral("color")); - } - break; - } - case Texture: { - DomProperty* v = elementTexture(); - if (v != 0) { - v->write(writer, QStringLiteral("texture")); - } - break; - } - case Gradient: { - DomGradient* v = elementGradient(); - if (v != 0) { - v->write(writer, QStringLiteral("gradient")); - } - break; - } - default: - break; - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -DomColor* DomBrush::takeElementColor() -{ - DomColor* a = m_color; - m_color = 0; - return a; -} - -void DomBrush::setElementColor(DomColor* a) -{ - clear(false); - m_kind = Color; - m_color = a; -} - -DomProperty* DomBrush::takeElementTexture() -{ - DomProperty* a = m_texture; - m_texture = 0; - return a; -} - -void DomBrush::setElementTexture(DomProperty* a) -{ - clear(false); - m_kind = Texture; - m_texture = a; -} - -DomGradient* DomBrush::takeElementGradient() -{ - DomGradient* a = m_gradient; - m_gradient = 0; - return a; -} - -void DomBrush::setElementGradient(DomGradient* a) -{ - clear(false); - m_kind = Gradient; - m_gradient = a; -} - -void DomColorRole::clear(bool clear_all) -{ - delete m_brush; - - if (clear_all) { - m_text.clear(); - m_has_attr_role = false; - } - - m_children = 0; - m_brush = 0; -} - -DomColorRole::DomColorRole() -{ - m_children = 0; - m_has_attr_role = false; - m_brush = 0; -} - -DomColorRole::~DomColorRole() -{ - delete m_brush; -} - -void DomColorRole::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("role")) { - setAttributeRole(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("brush")) { - DomBrush *v = new DomBrush(); - v->read(reader); - setElementBrush(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomColorRole::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("colorrole") : tagName.toLower()); - - if (hasAttributeRole()) - writer.writeAttribute(QStringLiteral("role"), attributeRole()); - - if (m_children & Brush) { - m_brush->write(writer, QStringLiteral("brush")); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -DomBrush* DomColorRole::takeElementBrush() -{ - DomBrush* a = m_brush; - m_brush = 0; - m_children ^= Brush; - return a; -} - -void DomColorRole::setElementBrush(DomBrush* a) -{ - delete m_brush; - m_children |= Brush; - m_brush = a; -} - -void DomColorRole::clearElementBrush() -{ - delete m_brush; - m_brush = 0; - m_children &= ~Brush; -} - -void DomColorGroup::clear(bool clear_all) -{ - qDeleteAll(m_colorRole); - m_colorRole.clear(); - qDeleteAll(m_color); - m_color.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomColorGroup::DomColorGroup() -{ - m_children = 0; -} - -DomColorGroup::~DomColorGroup() -{ - qDeleteAll(m_colorRole); - m_colorRole.clear(); - qDeleteAll(m_color); - m_color.clear(); -} - -void DomColorGroup::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("colorrole")) { - DomColorRole *v = new DomColorRole(); - v->read(reader); - m_colorRole.append(v); - continue; - } - if (tag == QStringLiteral("color")) { - DomColor *v = new DomColor(); - v->read(reader); - m_color.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomColorGroup::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("colorgroup") : tagName.toLower()); - - for (int i = 0; i < m_colorRole.size(); ++i) { - DomColorRole* v = m_colorRole[i]; - v->write(writer, QStringLiteral("colorrole")); - } - for (int i = 0; i < m_color.size(); ++i) { - DomColor* v = m_color[i]; - v->write(writer, QStringLiteral("color")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomColorGroup::setElementColorRole(const QList& a) -{ - m_children |= ColorRole; - m_colorRole = a; -} - -void DomColorGroup::setElementColor(const QList& a) -{ - m_children |= Color; - m_color = a; -} - -void DomPalette::clear(bool clear_all) -{ - delete m_active; - delete m_inactive; - delete m_disabled; - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_active = 0; - m_inactive = 0; - m_disabled = 0; -} - -DomPalette::DomPalette() -{ - m_children = 0; - m_active = 0; - m_inactive = 0; - m_disabled = 0; -} - -DomPalette::~DomPalette() -{ - delete m_active; - delete m_inactive; - delete m_disabled; -} - -void DomPalette::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("active")) { - DomColorGroup *v = new DomColorGroup(); - v->read(reader); - setElementActive(v); - continue; - } - if (tag == QStringLiteral("inactive")) { - DomColorGroup *v = new DomColorGroup(); - v->read(reader); - setElementInactive(v); - continue; - } - if (tag == QStringLiteral("disabled")) { - DomColorGroup *v = new DomColorGroup(); - v->read(reader); - setElementDisabled(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomPalette::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("palette") : tagName.toLower()); - - if (m_children & Active) { - m_active->write(writer, QStringLiteral("active")); - } - - if (m_children & Inactive) { - m_inactive->write(writer, QStringLiteral("inactive")); - } - - if (m_children & Disabled) { - m_disabled->write(writer, QStringLiteral("disabled")); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -DomColorGroup* DomPalette::takeElementActive() -{ - DomColorGroup* a = m_active; - m_active = 0; - m_children ^= Active; - return a; -} - -void DomPalette::setElementActive(DomColorGroup* a) -{ - delete m_active; - m_children |= Active; - m_active = a; -} - -DomColorGroup* DomPalette::takeElementInactive() -{ - DomColorGroup* a = m_inactive; - m_inactive = 0; - m_children ^= Inactive; - return a; -} - -void DomPalette::setElementInactive(DomColorGroup* a) -{ - delete m_inactive; - m_children |= Inactive; - m_inactive = a; -} - -DomColorGroup* DomPalette::takeElementDisabled() -{ - DomColorGroup* a = m_disabled; - m_disabled = 0; - m_children ^= Disabled; - return a; -} - -void DomPalette::setElementDisabled(DomColorGroup* a) -{ - delete m_disabled; - m_children |= Disabled; - m_disabled = a; -} - -void DomPalette::clearElementActive() -{ - delete m_active; - m_active = 0; - m_children &= ~Active; -} - -void DomPalette::clearElementInactive() -{ - delete m_inactive; - m_inactive = 0; - m_children &= ~Inactive; -} - -void DomPalette::clearElementDisabled() -{ - delete m_disabled; - m_disabled = 0; - m_children &= ~Disabled; -} - -void DomFont::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_pointSize = 0; - m_weight = 0; - m_italic = false; - m_bold = false; - m_underline = false; - m_strikeOut = false; - m_antialiasing = false; - m_kerning = false; -} - -DomFont::DomFont() -{ - m_children = 0; - m_pointSize = 0; - m_weight = 0; - m_italic = false; - m_bold = false; - m_underline = false; - m_strikeOut = false; - m_antialiasing = false; - m_kerning = false; -} - -DomFont::~DomFont() -{ -} - -void DomFont::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("family")) { - setElementFamily(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("pointsize")) { - setElementPointSize(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("weight")) { - setElementWeight(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("italic")) { - setElementItalic((reader.readElementText() == QLatin1String("true") ? true : false)); - continue; - } - if (tag == QStringLiteral("bold")) { - setElementBold((reader.readElementText() == QLatin1String("true") ? true : false)); - continue; - } - if (tag == QStringLiteral("underline")) { - setElementUnderline((reader.readElementText() == QLatin1String("true") ? true : false)); - continue; - } - if (tag == QStringLiteral("strikeout")) { - setElementStrikeOut((reader.readElementText() == QLatin1String("true") ? true : false)); - continue; - } - if (tag == QStringLiteral("antialiasing")) { - setElementAntialiasing((reader.readElementText() == QLatin1String("true") ? true : false)); - continue; - } - if (tag == QStringLiteral("stylestrategy")) { - setElementStyleStrategy(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("kerning")) { - setElementKerning((reader.readElementText() == QLatin1String("true") ? true : false)); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomFont::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("font") : tagName.toLower()); - - if (m_children & Family) { - writer.writeTextElement(QStringLiteral("family"), m_family); - } - - if (m_children & PointSize) { - writer.writeTextElement(QStringLiteral("pointsize"), QString::number(m_pointSize)); - } - - if (m_children & Weight) { - writer.writeTextElement(QStringLiteral("weight"), QString::number(m_weight)); - } - - if (m_children & Italic) { - writer.writeTextElement(QStringLiteral("italic"), (m_italic ? QLatin1String("true") : QLatin1String("false"))); - } - - if (m_children & Bold) { - writer.writeTextElement(QStringLiteral("bold"), (m_bold ? QLatin1String("true") : QLatin1String("false"))); - } - - if (m_children & Underline) { - writer.writeTextElement(QStringLiteral("underline"), (m_underline ? QLatin1String("true") : QLatin1String("false"))); - } - - if (m_children & StrikeOut) { - writer.writeTextElement(QStringLiteral("strikeout"), (m_strikeOut ? QLatin1String("true") : QLatin1String("false"))); - } - - if (m_children & Antialiasing) { - writer.writeTextElement(QStringLiteral("antialiasing"), (m_antialiasing ? QLatin1String("true") : QLatin1String("false"))); - } - - if (m_children & StyleStrategy) { - writer.writeTextElement(QStringLiteral("stylestrategy"), m_styleStrategy); - } - - if (m_children & Kerning) { - writer.writeTextElement(QStringLiteral("kerning"), (m_kerning ? QLatin1String("true") : QLatin1String("false"))); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomFont::setElementFamily(const QString& a) -{ - m_children |= Family; - m_family = a; -} - -void DomFont::setElementPointSize(int a) -{ - m_children |= PointSize; - m_pointSize = a; -} - -void DomFont::setElementWeight(int a) -{ - m_children |= Weight; - m_weight = a; -} - -void DomFont::setElementItalic(bool a) -{ - m_children |= Italic; - m_italic = a; -} - -void DomFont::setElementBold(bool a) -{ - m_children |= Bold; - m_bold = a; -} - -void DomFont::setElementUnderline(bool a) -{ - m_children |= Underline; - m_underline = a; -} - -void DomFont::setElementStrikeOut(bool a) -{ - m_children |= StrikeOut; - m_strikeOut = a; -} - -void DomFont::setElementAntialiasing(bool a) -{ - m_children |= Antialiasing; - m_antialiasing = a; -} - -void DomFont::setElementStyleStrategy(const QString& a) -{ - m_children |= StyleStrategy; - m_styleStrategy = a; -} - -void DomFont::setElementKerning(bool a) -{ - m_children |= Kerning; - m_kerning = a; -} - -void DomFont::clearElementFamily() -{ - m_children &= ~Family; -} - -void DomFont::clearElementPointSize() -{ - m_children &= ~PointSize; -} - -void DomFont::clearElementWeight() -{ - m_children &= ~Weight; -} - -void DomFont::clearElementItalic() -{ - m_children &= ~Italic; -} - -void DomFont::clearElementBold() -{ - m_children &= ~Bold; -} - -void DomFont::clearElementUnderline() -{ - m_children &= ~Underline; -} - -void DomFont::clearElementStrikeOut() -{ - m_children &= ~StrikeOut; -} - -void DomFont::clearElementAntialiasing() -{ - m_children &= ~Antialiasing; -} - -void DomFont::clearElementStyleStrategy() -{ - m_children &= ~StyleStrategy; -} - -void DomFont::clearElementKerning() -{ - m_children &= ~Kerning; -} - -void DomPoint::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_x = 0; - m_y = 0; -} - -DomPoint::DomPoint() -{ - m_children = 0; - m_x = 0; - m_y = 0; -} - -DomPoint::~DomPoint() -{ -} - -void DomPoint::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QString(QLatin1Char('x'))) { - setElementX(reader.readElementText().toInt()); - continue; - } - if (tag == QString(QLatin1Char('y'))) { - setElementY(reader.readElementText().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomPoint::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("point") : tagName.toLower()); - - if (m_children & X) { - writer.writeTextElement(QString(QLatin1Char('x')), QString::number(m_x)); - } - - if (m_children & Y) { - writer.writeTextElement(QString(QLatin1Char('y')), QString::number(m_y)); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomPoint::setElementX(int a) -{ - m_children |= X; - m_x = a; -} - -void DomPoint::setElementY(int a) -{ - m_children |= Y; - m_y = a; -} - -void DomPoint::clearElementX() -{ - m_children &= ~X; -} - -void DomPoint::clearElementY() -{ - m_children &= ~Y; -} - -void DomRect::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_x = 0; - m_y = 0; - m_width = 0; - m_height = 0; -} - -DomRect::DomRect() -{ - m_children = 0; - m_x = 0; - m_y = 0; - m_width = 0; - m_height = 0; -} - -DomRect::~DomRect() -{ -} - -void DomRect::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QString(QLatin1Char('x'))) { - setElementX(reader.readElementText().toInt()); - continue; - } - if (tag == QString(QLatin1Char('y'))) { - setElementY(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("width")) { - setElementWidth(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("height")) { - setElementHeight(reader.readElementText().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomRect::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("rect") : tagName.toLower()); - - if (m_children & X) { - writer.writeTextElement(QString(QLatin1Char('x')), QString::number(m_x)); - } - - if (m_children & Y) { - writer.writeTextElement(QString(QLatin1Char('y')), QString::number(m_y)); - } - - if (m_children & Width) { - writer.writeTextElement(QStringLiteral("width"), QString::number(m_width)); - } - - if (m_children & Height) { - writer.writeTextElement(QStringLiteral("height"), QString::number(m_height)); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomRect::setElementX(int a) -{ - m_children |= X; - m_x = a; -} - -void DomRect::setElementY(int a) -{ - m_children |= Y; - m_y = a; -} - -void DomRect::setElementWidth(int a) -{ - m_children |= Width; - m_width = a; -} - -void DomRect::setElementHeight(int a) -{ - m_children |= Height; - m_height = a; -} - -void DomRect::clearElementX() -{ - m_children &= ~X; -} - -void DomRect::clearElementY() -{ - m_children &= ~Y; -} - -void DomRect::clearElementWidth() -{ - m_children &= ~Width; -} - -void DomRect::clearElementHeight() -{ - m_children &= ~Height; -} - -void DomLocale::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_language = false; - m_has_attr_country = false; - } - - m_children = 0; -} - -DomLocale::DomLocale() -{ - m_children = 0; - m_has_attr_language = false; - m_has_attr_country = false; -} - -DomLocale::~DomLocale() -{ -} - -void DomLocale::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("language")) { - setAttributeLanguage(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("country")) { - setAttributeCountry(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomLocale::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("locale") : tagName.toLower()); - - if (hasAttributeLanguage()) - writer.writeAttribute(QStringLiteral("language"), attributeLanguage()); - - if (hasAttributeCountry()) - writer.writeAttribute(QStringLiteral("country"), attributeCountry()); - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomSizePolicy::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_hSizeType = false; - m_has_attr_vSizeType = false; - } - - m_children = 0; - m_hSizeType = 0; - m_vSizeType = 0; - m_horStretch = 0; - m_verStretch = 0; -} - -DomSizePolicy::DomSizePolicy() -{ - m_children = 0; - m_has_attr_hSizeType = false; - m_has_attr_vSizeType = false; - m_hSizeType = 0; - m_vSizeType = 0; - m_horStretch = 0; - m_verStretch = 0; -} - -DomSizePolicy::~DomSizePolicy() -{ -} - -void DomSizePolicy::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("hsizetype")) { - setAttributeHSizeType(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("vsizetype")) { - setAttributeVSizeType(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("hsizetype")) { - setElementHSizeType(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("vsizetype")) { - setElementVSizeType(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("horstretch")) { - setElementHorStretch(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("verstretch")) { - setElementVerStretch(reader.readElementText().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomSizePolicy::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("sizepolicy") : tagName.toLower()); - - if (hasAttributeHSizeType()) - writer.writeAttribute(QStringLiteral("hsizetype"), attributeHSizeType()); - - if (hasAttributeVSizeType()) - writer.writeAttribute(QStringLiteral("vsizetype"), attributeVSizeType()); - - if (m_children & HSizeType) { - writer.writeTextElement(QStringLiteral("hsizetype"), QString::number(m_hSizeType)); - } - - if (m_children & VSizeType) { - writer.writeTextElement(QStringLiteral("vsizetype"), QString::number(m_vSizeType)); - } - - if (m_children & HorStretch) { - writer.writeTextElement(QStringLiteral("horstretch"), QString::number(m_horStretch)); - } - - if (m_children & VerStretch) { - writer.writeTextElement(QStringLiteral("verstretch"), QString::number(m_verStretch)); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomSizePolicy::setElementHSizeType(int a) -{ - m_children |= HSizeType; - m_hSizeType = a; -} - -void DomSizePolicy::setElementVSizeType(int a) -{ - m_children |= VSizeType; - m_vSizeType = a; -} - -void DomSizePolicy::setElementHorStretch(int a) -{ - m_children |= HorStretch; - m_horStretch = a; -} - -void DomSizePolicy::setElementVerStretch(int a) -{ - m_children |= VerStretch; - m_verStretch = a; -} - -void DomSizePolicy::clearElementHSizeType() -{ - m_children &= ~HSizeType; -} - -void DomSizePolicy::clearElementVSizeType() -{ - m_children &= ~VSizeType; -} - -void DomSizePolicy::clearElementHorStretch() -{ - m_children &= ~HorStretch; -} - -void DomSizePolicy::clearElementVerStretch() -{ - m_children &= ~VerStretch; -} - -void DomSize::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_width = 0; - m_height = 0; -} - -DomSize::DomSize() -{ - m_children = 0; - m_width = 0; - m_height = 0; -} - -DomSize::~DomSize() -{ -} - -void DomSize::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("width")) { - setElementWidth(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("height")) { - setElementHeight(reader.readElementText().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomSize::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("size") : tagName.toLower()); - - if (m_children & Width) { - writer.writeTextElement(QStringLiteral("width"), QString::number(m_width)); - } - - if (m_children & Height) { - writer.writeTextElement(QStringLiteral("height"), QString::number(m_height)); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomSize::setElementWidth(int a) -{ - m_children |= Width; - m_width = a; -} - -void DomSize::setElementHeight(int a) -{ - m_children |= Height; - m_height = a; -} - -void DomSize::clearElementWidth() -{ - m_children &= ~Width; -} - -void DomSize::clearElementHeight() -{ - m_children &= ~Height; -} - -void DomDate::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_year = 0; - m_month = 0; - m_day = 0; -} - -DomDate::DomDate() -{ - m_children = 0; - m_year = 0; - m_month = 0; - m_day = 0; -} - -DomDate::~DomDate() -{ -} - -void DomDate::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("year")) { - setElementYear(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("month")) { - setElementMonth(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("day")) { - setElementDay(reader.readElementText().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomDate::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("date") : tagName.toLower()); - - if (m_children & Year) { - writer.writeTextElement(QStringLiteral("year"), QString::number(m_year)); - } - - if (m_children & Month) { - writer.writeTextElement(QStringLiteral("month"), QString::number(m_month)); - } - - if (m_children & Day) { - writer.writeTextElement(QStringLiteral("day"), QString::number(m_day)); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomDate::setElementYear(int a) -{ - m_children |= Year; - m_year = a; -} - -void DomDate::setElementMonth(int a) -{ - m_children |= Month; - m_month = a; -} - -void DomDate::setElementDay(int a) -{ - m_children |= Day; - m_day = a; -} - -void DomDate::clearElementYear() -{ - m_children &= ~Year; -} - -void DomDate::clearElementMonth() -{ - m_children &= ~Month; -} - -void DomDate::clearElementDay() -{ - m_children &= ~Day; -} - -void DomTime::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_hour = 0; - m_minute = 0; - m_second = 0; -} - -DomTime::DomTime() -{ - m_children = 0; - m_hour = 0; - m_minute = 0; - m_second = 0; -} - -DomTime::~DomTime() -{ -} - -void DomTime::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("hour")) { - setElementHour(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("minute")) { - setElementMinute(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("second")) { - setElementSecond(reader.readElementText().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomTime::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("time") : tagName.toLower()); - - if (m_children & Hour) { - writer.writeTextElement(QStringLiteral("hour"), QString::number(m_hour)); - } - - if (m_children & Minute) { - writer.writeTextElement(QStringLiteral("minute"), QString::number(m_minute)); - } - - if (m_children & Second) { - writer.writeTextElement(QStringLiteral("second"), QString::number(m_second)); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomTime::setElementHour(int a) -{ - m_children |= Hour; - m_hour = a; -} - -void DomTime::setElementMinute(int a) -{ - m_children |= Minute; - m_minute = a; -} - -void DomTime::setElementSecond(int a) -{ - m_children |= Second; - m_second = a; -} - -void DomTime::clearElementHour() -{ - m_children &= ~Hour; -} - -void DomTime::clearElementMinute() -{ - m_children &= ~Minute; -} - -void DomTime::clearElementSecond() -{ - m_children &= ~Second; -} - -void DomDateTime::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_hour = 0; - m_minute = 0; - m_second = 0; - m_year = 0; - m_month = 0; - m_day = 0; -} - -DomDateTime::DomDateTime() -{ - m_children = 0; - m_hour = 0; - m_minute = 0; - m_second = 0; - m_year = 0; - m_month = 0; - m_day = 0; -} - -DomDateTime::~DomDateTime() -{ -} - -void DomDateTime::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("hour")) { - setElementHour(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("minute")) { - setElementMinute(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("second")) { - setElementSecond(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("year")) { - setElementYear(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("month")) { - setElementMonth(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("day")) { - setElementDay(reader.readElementText().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomDateTime::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("datetime") : tagName.toLower()); - - if (m_children & Hour) { - writer.writeTextElement(QStringLiteral("hour"), QString::number(m_hour)); - } - - if (m_children & Minute) { - writer.writeTextElement(QStringLiteral("minute"), QString::number(m_minute)); - } - - if (m_children & Second) { - writer.writeTextElement(QStringLiteral("second"), QString::number(m_second)); - } - - if (m_children & Year) { - writer.writeTextElement(QStringLiteral("year"), QString::number(m_year)); - } - - if (m_children & Month) { - writer.writeTextElement(QStringLiteral("month"), QString::number(m_month)); - } - - if (m_children & Day) { - writer.writeTextElement(QStringLiteral("day"), QString::number(m_day)); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomDateTime::setElementHour(int a) -{ - m_children |= Hour; - m_hour = a; -} - -void DomDateTime::setElementMinute(int a) -{ - m_children |= Minute; - m_minute = a; -} - -void DomDateTime::setElementSecond(int a) -{ - m_children |= Second; - m_second = a; -} - -void DomDateTime::setElementYear(int a) -{ - m_children |= Year; - m_year = a; -} - -void DomDateTime::setElementMonth(int a) -{ - m_children |= Month; - m_month = a; -} - -void DomDateTime::setElementDay(int a) -{ - m_children |= Day; - m_day = a; -} - -void DomDateTime::clearElementHour() -{ - m_children &= ~Hour; -} - -void DomDateTime::clearElementMinute() -{ - m_children &= ~Minute; -} - -void DomDateTime::clearElementSecond() -{ - m_children &= ~Second; -} - -void DomDateTime::clearElementYear() -{ - m_children &= ~Year; -} - -void DomDateTime::clearElementMonth() -{ - m_children &= ~Month; -} - -void DomDateTime::clearElementDay() -{ - m_children &= ~Day; -} - -void DomStringList::clear(bool clear_all) -{ - m_string.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomStringList::DomStringList() -{ - m_children = 0; -} - -DomStringList::~DomStringList() -{ - m_string.clear(); -} - -void DomStringList::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("string")) { - m_string.append(reader.readElementText()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomStringList::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("stringlist") : tagName.toLower()); - - for (int i = 0; i < m_string.size(); ++i) { - QString v = m_string[i]; - writer.writeTextElement(QStringLiteral("string"), v); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomStringList::setElementString(const QStringList& a) -{ - m_children |= String; - m_string = a; -} - -void DomResourcePixmap::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_resource = false; - m_has_attr_alias = false; - } - - m_children = 0; -} - -DomResourcePixmap::DomResourcePixmap() -{ - m_children = 0; - m_has_attr_resource = false; - m_has_attr_alias = false; - m_text.clear(); -} - -DomResourcePixmap::~DomResourcePixmap() -{ -} - -void DomResourcePixmap::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("resource")) { - setAttributeResource(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("alias")) { - setAttributeAlias(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomResourcePixmap::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("resourcepixmap") : tagName.toLower()); - - if (hasAttributeResource()) - writer.writeAttribute(QStringLiteral("resource"), attributeResource()); - - if (hasAttributeAlias()) - writer.writeAttribute(QStringLiteral("alias"), attributeAlias()); - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomResourceIcon::clear(bool clear_all) -{ - delete m_normalOff; - delete m_normalOn; - delete m_disabledOff; - delete m_disabledOn; - delete m_activeOff; - delete m_activeOn; - delete m_selectedOff; - delete m_selectedOn; - - if (clear_all) { - m_text.clear(); - m_has_attr_theme = false; - m_has_attr_resource = false; - } - - m_children = 0; - m_normalOff = 0; - m_normalOn = 0; - m_disabledOff = 0; - m_disabledOn = 0; - m_activeOff = 0; - m_activeOn = 0; - m_selectedOff = 0; - m_selectedOn = 0; -} - -DomResourceIcon::DomResourceIcon() -{ - m_children = 0; - m_has_attr_theme = false; - m_has_attr_resource = false; - m_text.clear(); - m_normalOff = 0; - m_normalOn = 0; - m_disabledOff = 0; - m_disabledOn = 0; - m_activeOff = 0; - m_activeOn = 0; - m_selectedOff = 0; - m_selectedOn = 0; -} - -DomResourceIcon::~DomResourceIcon() -{ - delete m_normalOff; - delete m_normalOn; - delete m_disabledOff; - delete m_disabledOn; - delete m_activeOff; - delete m_activeOn; - delete m_selectedOff; - delete m_selectedOn; -} - -void DomResourceIcon::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("theme")) { - setAttributeTheme(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("resource")) { - setAttributeResource(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("normaloff")) { - DomResourcePixmap *v = new DomResourcePixmap(); - v->read(reader); - setElementNormalOff(v); - continue; - } - if (tag == QStringLiteral("normalon")) { - DomResourcePixmap *v = new DomResourcePixmap(); - v->read(reader); - setElementNormalOn(v); - continue; - } - if (tag == QStringLiteral("disabledoff")) { - DomResourcePixmap *v = new DomResourcePixmap(); - v->read(reader); - setElementDisabledOff(v); - continue; - } - if (tag == QStringLiteral("disabledon")) { - DomResourcePixmap *v = new DomResourcePixmap(); - v->read(reader); - setElementDisabledOn(v); - continue; - } - if (tag == QStringLiteral("activeoff")) { - DomResourcePixmap *v = new DomResourcePixmap(); - v->read(reader); - setElementActiveOff(v); - continue; - } - if (tag == QStringLiteral("activeon")) { - DomResourcePixmap *v = new DomResourcePixmap(); - v->read(reader); - setElementActiveOn(v); - continue; - } - if (tag == QStringLiteral("selectedoff")) { - DomResourcePixmap *v = new DomResourcePixmap(); - v->read(reader); - setElementSelectedOff(v); - continue; - } - if (tag == QStringLiteral("selectedon")) { - DomResourcePixmap *v = new DomResourcePixmap(); - v->read(reader); - setElementSelectedOn(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomResourceIcon::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("resourceicon") : tagName.toLower()); - - if (hasAttributeTheme()) - writer.writeAttribute(QStringLiteral("theme"), attributeTheme()); - - if (hasAttributeResource()) - writer.writeAttribute(QStringLiteral("resource"), attributeResource()); - - if (m_children & NormalOff) { - m_normalOff->write(writer, QStringLiteral("normaloff")); - } - - if (m_children & NormalOn) { - m_normalOn->write(writer, QStringLiteral("normalon")); - } - - if (m_children & DisabledOff) { - m_disabledOff->write(writer, QStringLiteral("disabledoff")); - } - - if (m_children & DisabledOn) { - m_disabledOn->write(writer, QStringLiteral("disabledon")); - } - - if (m_children & ActiveOff) { - m_activeOff->write(writer, QStringLiteral("activeoff")); - } - - if (m_children & ActiveOn) { - m_activeOn->write(writer, QStringLiteral("activeon")); - } - - if (m_children & SelectedOff) { - m_selectedOff->write(writer, QStringLiteral("selectedoff")); - } - - if (m_children & SelectedOn) { - m_selectedOn->write(writer, QStringLiteral("selectedon")); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -DomResourcePixmap* DomResourceIcon::takeElementNormalOff() -{ - DomResourcePixmap* a = m_normalOff; - m_normalOff = 0; - m_children ^= NormalOff; - return a; -} - -void DomResourceIcon::setElementNormalOff(DomResourcePixmap* a) -{ - delete m_normalOff; - m_children |= NormalOff; - m_normalOff = a; -} - -DomResourcePixmap* DomResourceIcon::takeElementNormalOn() -{ - DomResourcePixmap* a = m_normalOn; - m_normalOn = 0; - m_children ^= NormalOn; - return a; -} - -void DomResourceIcon::setElementNormalOn(DomResourcePixmap* a) -{ - delete m_normalOn; - m_children |= NormalOn; - m_normalOn = a; -} - -DomResourcePixmap* DomResourceIcon::takeElementDisabledOff() -{ - DomResourcePixmap* a = m_disabledOff; - m_disabledOff = 0; - m_children ^= DisabledOff; - return a; -} - -void DomResourceIcon::setElementDisabledOff(DomResourcePixmap* a) -{ - delete m_disabledOff; - m_children |= DisabledOff; - m_disabledOff = a; -} - -DomResourcePixmap* DomResourceIcon::takeElementDisabledOn() -{ - DomResourcePixmap* a = m_disabledOn; - m_disabledOn = 0; - m_children ^= DisabledOn; - return a; -} - -void DomResourceIcon::setElementDisabledOn(DomResourcePixmap* a) -{ - delete m_disabledOn; - m_children |= DisabledOn; - m_disabledOn = a; -} - -DomResourcePixmap* DomResourceIcon::takeElementActiveOff() -{ - DomResourcePixmap* a = m_activeOff; - m_activeOff = 0; - m_children ^= ActiveOff; - return a; -} - -void DomResourceIcon::setElementActiveOff(DomResourcePixmap* a) -{ - delete m_activeOff; - m_children |= ActiveOff; - m_activeOff = a; -} - -DomResourcePixmap* DomResourceIcon::takeElementActiveOn() -{ - DomResourcePixmap* a = m_activeOn; - m_activeOn = 0; - m_children ^= ActiveOn; - return a; -} - -void DomResourceIcon::setElementActiveOn(DomResourcePixmap* a) -{ - delete m_activeOn; - m_children |= ActiveOn; - m_activeOn = a; -} - -DomResourcePixmap* DomResourceIcon::takeElementSelectedOff() -{ - DomResourcePixmap* a = m_selectedOff; - m_selectedOff = 0; - m_children ^= SelectedOff; - return a; -} - -void DomResourceIcon::setElementSelectedOff(DomResourcePixmap* a) -{ - delete m_selectedOff; - m_children |= SelectedOff; - m_selectedOff = a; -} - -DomResourcePixmap* DomResourceIcon::takeElementSelectedOn() -{ - DomResourcePixmap* a = m_selectedOn; - m_selectedOn = 0; - m_children ^= SelectedOn; - return a; -} - -void DomResourceIcon::setElementSelectedOn(DomResourcePixmap* a) -{ - delete m_selectedOn; - m_children |= SelectedOn; - m_selectedOn = a; -} - -void DomResourceIcon::clearElementNormalOff() -{ - delete m_normalOff; - m_normalOff = 0; - m_children &= ~NormalOff; -} - -void DomResourceIcon::clearElementNormalOn() -{ - delete m_normalOn; - m_normalOn = 0; - m_children &= ~NormalOn; -} - -void DomResourceIcon::clearElementDisabledOff() -{ - delete m_disabledOff; - m_disabledOff = 0; - m_children &= ~DisabledOff; -} - -void DomResourceIcon::clearElementDisabledOn() -{ - delete m_disabledOn; - m_disabledOn = 0; - m_children &= ~DisabledOn; -} - -void DomResourceIcon::clearElementActiveOff() -{ - delete m_activeOff; - m_activeOff = 0; - m_children &= ~ActiveOff; -} - -void DomResourceIcon::clearElementActiveOn() -{ - delete m_activeOn; - m_activeOn = 0; - m_children &= ~ActiveOn; -} - -void DomResourceIcon::clearElementSelectedOff() -{ - delete m_selectedOff; - m_selectedOff = 0; - m_children &= ~SelectedOff; -} - -void DomResourceIcon::clearElementSelectedOn() -{ - delete m_selectedOn; - m_selectedOn = 0; - m_children &= ~SelectedOn; -} - -void DomString::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_notr = false; - m_has_attr_comment = false; - m_has_attr_extraComment = false; - } - - m_children = 0; -} - -DomString::DomString() -{ - m_children = 0; - m_has_attr_notr = false; - m_has_attr_comment = false; - m_has_attr_extraComment = false; - m_text.clear(); -} - -DomString::~DomString() -{ -} - -void DomString::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("notr")) { - setAttributeNotr(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("comment")) { - setAttributeComment(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("extracomment")) { - setAttributeExtraComment(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomString::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("string") : tagName.toLower()); - - if (hasAttributeNotr()) - writer.writeAttribute(QStringLiteral("notr"), attributeNotr()); - - if (hasAttributeComment()) - writer.writeAttribute(QStringLiteral("comment"), attributeComment()); - - if (hasAttributeExtraComment()) - writer.writeAttribute(QStringLiteral("extracomment"), attributeExtraComment()); - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomPointF::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_x = 0; - m_y = 0; -} - -DomPointF::DomPointF() -{ - m_children = 0; - m_x = 0; - m_y = 0; -} - -DomPointF::~DomPointF() -{ -} - -void DomPointF::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QString(QLatin1Char('x'))) { - setElementX(reader.readElementText().toDouble()); - continue; - } - if (tag == QString(QLatin1Char('y'))) { - setElementY(reader.readElementText().toDouble()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomPointF::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("pointf") : tagName.toLower()); - - if (m_children & X) { - writer.writeTextElement(QString(QLatin1Char('x')), QString::number(m_x, 'f', 15)); - } - - if (m_children & Y) { - writer.writeTextElement(QString(QLatin1Char('y')), QString::number(m_y, 'f', 15)); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomPointF::setElementX(double a) -{ - m_children |= X; - m_x = a; -} - -void DomPointF::setElementY(double a) -{ - m_children |= Y; - m_y = a; -} - -void DomPointF::clearElementX() -{ - m_children &= ~X; -} - -void DomPointF::clearElementY() -{ - m_children &= ~Y; -} - -void DomRectF::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_x = 0; - m_y = 0; - m_width = 0; - m_height = 0; -} - -DomRectF::DomRectF() -{ - m_children = 0; - m_x = 0; - m_y = 0; - m_width = 0; - m_height = 0; -} - -DomRectF::~DomRectF() -{ -} - -void DomRectF::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QString(QLatin1Char('x'))) { - setElementX(reader.readElementText().toDouble()); - continue; - } - if (tag == QString(QLatin1Char('y'))) { - setElementY(reader.readElementText().toDouble()); - continue; - } - if (tag == QStringLiteral("width")) { - setElementWidth(reader.readElementText().toDouble()); - continue; - } - if (tag == QStringLiteral("height")) { - setElementHeight(reader.readElementText().toDouble()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomRectF::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("rectf") : tagName.toLower()); - - if (m_children & X) { - writer.writeTextElement(QString(QLatin1Char('x')), QString::number(m_x, 'f', 15)); - } - - if (m_children & Y) { - writer.writeTextElement(QString(QLatin1Char('y')), QString::number(m_y, 'f', 15)); - } - - if (m_children & Width) { - writer.writeTextElement(QStringLiteral("width"), QString::number(m_width, 'f', 15)); - } - - if (m_children & Height) { - writer.writeTextElement(QStringLiteral("height"), QString::number(m_height, 'f', 15)); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomRectF::setElementX(double a) -{ - m_children |= X; - m_x = a; -} - -void DomRectF::setElementY(double a) -{ - m_children |= Y; - m_y = a; -} - -void DomRectF::setElementWidth(double a) -{ - m_children |= Width; - m_width = a; -} - -void DomRectF::setElementHeight(double a) -{ - m_children |= Height; - m_height = a; -} - -void DomRectF::clearElementX() -{ - m_children &= ~X; -} - -void DomRectF::clearElementY() -{ - m_children &= ~Y; -} - -void DomRectF::clearElementWidth() -{ - m_children &= ~Width; -} - -void DomRectF::clearElementHeight() -{ - m_children &= ~Height; -} - -void DomSizeF::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_width = 0; - m_height = 0; -} - -DomSizeF::DomSizeF() -{ - m_children = 0; - m_width = 0; - m_height = 0; -} - -DomSizeF::~DomSizeF() -{ -} - -void DomSizeF::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("width")) { - setElementWidth(reader.readElementText().toDouble()); - continue; - } - if (tag == QStringLiteral("height")) { - setElementHeight(reader.readElementText().toDouble()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomSizeF::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("sizef") : tagName.toLower()); - - if (m_children & Width) { - writer.writeTextElement(QStringLiteral("width"), QString::number(m_width, 'f', 15)); - } - - if (m_children & Height) { - writer.writeTextElement(QStringLiteral("height"), QString::number(m_height, 'f', 15)); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomSizeF::setElementWidth(double a) -{ - m_children |= Width; - m_width = a; -} - -void DomSizeF::setElementHeight(double a) -{ - m_children |= Height; - m_height = a; -} - -void DomSizeF::clearElementWidth() -{ - m_children &= ~Width; -} - -void DomSizeF::clearElementHeight() -{ - m_children &= ~Height; -} - -void DomChar::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_unicode = 0; -} - -DomChar::DomChar() -{ - m_children = 0; - m_unicode = 0; -} - -DomChar::~DomChar() -{ -} - -void DomChar::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("unicode")) { - setElementUnicode(reader.readElementText().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomChar::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("char") : tagName.toLower()); - - if (m_children & Unicode) { - writer.writeTextElement(QStringLiteral("unicode"), QString::number(m_unicode)); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomChar::setElementUnicode(int a) -{ - m_children |= Unicode; - m_unicode = a; -} - -void DomChar::clearElementUnicode() -{ - m_children &= ~Unicode; -} - -void DomUrl::clear(bool clear_all) -{ - delete m_string; - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_string = 0; -} - -DomUrl::DomUrl() -{ - m_children = 0; - m_string = 0; -} - -DomUrl::~DomUrl() -{ - delete m_string; -} - -void DomUrl::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("string")) { - DomString *v = new DomString(); - v->read(reader); - setElementString(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomUrl::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("url") : tagName.toLower()); - - if (m_children & String) { - m_string->write(writer, QStringLiteral("string")); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -DomString* DomUrl::takeElementString() -{ - DomString* a = m_string; - m_string = 0; - m_children ^= String; - return a; -} - -void DomUrl::setElementString(DomString* a) -{ - delete m_string; - m_children |= String; - m_string = a; -} - -void DomUrl::clearElementString() -{ - delete m_string; - m_string = 0; - m_children &= ~String; -} - -void DomProperty::clear(bool clear_all) -{ - delete m_color; - delete m_font; - delete m_iconSet; - delete m_pixmap; - delete m_palette; - delete m_point; - delete m_rect; - delete m_locale; - delete m_sizePolicy; - delete m_size; - delete m_string; - delete m_stringList; - delete m_date; - delete m_time; - delete m_dateTime; - delete m_pointF; - delete m_rectF; - delete m_sizeF; - delete m_char; - delete m_url; - delete m_brush; - - if (clear_all) { - m_text.clear(); - m_has_attr_name = false; - m_has_attr_stdset = false; - m_attr_stdset = 0; - } - - m_kind = Unknown; - - m_color = 0; - m_cursor = 0; - m_font = 0; - m_iconSet = 0; - m_pixmap = 0; - m_palette = 0; - m_point = 0; - m_rect = 0; - m_locale = 0; - m_sizePolicy = 0; - m_size = 0; - m_string = 0; - m_stringList = 0; - m_number = 0; - m_float = 0.0; - m_double = 0; - m_date = 0; - m_time = 0; - m_dateTime = 0; - m_pointF = 0; - m_rectF = 0; - m_sizeF = 0; - m_longLong = 0; - m_char = 0; - m_url = 0; - m_UInt = 0; - m_uLongLong = 0; - m_brush = 0; -} - -DomProperty::DomProperty() -{ - m_kind = Unknown; - - m_has_attr_name = false; - m_has_attr_stdset = false; - m_attr_stdset = 0; - m_color = 0; - m_cursor = 0; - m_font = 0; - m_iconSet = 0; - m_pixmap = 0; - m_palette = 0; - m_point = 0; - m_rect = 0; - m_locale = 0; - m_sizePolicy = 0; - m_size = 0; - m_string = 0; - m_stringList = 0; - m_number = 0; - m_float = 0.0; - m_double = 0; - m_date = 0; - m_time = 0; - m_dateTime = 0; - m_pointF = 0; - m_rectF = 0; - m_sizeF = 0; - m_longLong = 0; - m_char = 0; - m_url = 0; - m_UInt = 0; - m_uLongLong = 0; - m_brush = 0; -} - -DomProperty::~DomProperty() -{ - delete m_color; - delete m_font; - delete m_iconSet; - delete m_pixmap; - delete m_palette; - delete m_point; - delete m_rect; - delete m_locale; - delete m_sizePolicy; - delete m_size; - delete m_string; - delete m_stringList; - delete m_date; - delete m_time; - delete m_dateTime; - delete m_pointF; - delete m_rectF; - delete m_sizeF; - delete m_char; - delete m_url; - delete m_brush; -} - -void DomProperty::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("name")) { - setAttributeName(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("stdset")) { - setAttributeStdset(attribute.value().toString().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("bool")) { - setElementBool(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("color")) { - DomColor *v = new DomColor(); - v->read(reader); - setElementColor(v); - continue; - } - if (tag == QStringLiteral("cstring")) { - setElementCstring(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("cursor")) { - setElementCursor(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("cursorshape")) { - setElementCursorShape(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("enum")) { - setElementEnum(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("font")) { - DomFont *v = new DomFont(); - v->read(reader); - setElementFont(v); - continue; - } - if (tag == QStringLiteral("iconset")) { - DomResourceIcon *v = new DomResourceIcon(); - v->read(reader); - setElementIconSet(v); - continue; - } - if (tag == QStringLiteral("pixmap")) { - DomResourcePixmap *v = new DomResourcePixmap(); - v->read(reader); - setElementPixmap(v); - continue; - } - if (tag == QStringLiteral("palette")) { - DomPalette *v = new DomPalette(); - v->read(reader); - setElementPalette(v); - continue; - } - if (tag == QStringLiteral("point")) { - DomPoint *v = new DomPoint(); - v->read(reader); - setElementPoint(v); - continue; - } - if (tag == QStringLiteral("rect")) { - DomRect *v = new DomRect(); - v->read(reader); - setElementRect(v); - continue; - } - if (tag == QStringLiteral("set")) { - setElementSet(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("locale")) { - DomLocale *v = new DomLocale(); - v->read(reader); - setElementLocale(v); - continue; - } - if (tag == QStringLiteral("sizepolicy")) { - DomSizePolicy *v = new DomSizePolicy(); - v->read(reader); - setElementSizePolicy(v); - continue; - } - if (tag == QStringLiteral("size")) { - DomSize *v = new DomSize(); - v->read(reader); - setElementSize(v); - continue; - } - if (tag == QStringLiteral("string")) { - DomString *v = new DomString(); - v->read(reader); - setElementString(v); - continue; - } - if (tag == QStringLiteral("stringlist")) { - DomStringList *v = new DomStringList(); - v->read(reader); - setElementStringList(v); - continue; - } - if (tag == QStringLiteral("number")) { - setElementNumber(reader.readElementText().toInt()); - continue; - } - if (tag == QStringLiteral("float")) { - setElementFloat(reader.readElementText().toFloat()); - continue; - } - if (tag == QStringLiteral("double")) { - setElementDouble(reader.readElementText().toDouble()); - continue; - } - if (tag == QStringLiteral("date")) { - DomDate *v = new DomDate(); - v->read(reader); - setElementDate(v); - continue; - } - if (tag == QStringLiteral("time")) { - DomTime *v = new DomTime(); - v->read(reader); - setElementTime(v); - continue; - } - if (tag == QStringLiteral("datetime")) { - DomDateTime *v = new DomDateTime(); - v->read(reader); - setElementDateTime(v); - continue; - } - if (tag == QStringLiteral("pointf")) { - DomPointF *v = new DomPointF(); - v->read(reader); - setElementPointF(v); - continue; - } - if (tag == QStringLiteral("rectf")) { - DomRectF *v = new DomRectF(); - v->read(reader); - setElementRectF(v); - continue; - } - if (tag == QStringLiteral("sizef")) { - DomSizeF *v = new DomSizeF(); - v->read(reader); - setElementSizeF(v); - continue; - } - if (tag == QStringLiteral("longlong")) { - setElementLongLong(reader.readElementText().toLongLong()); - continue; - } - if (tag == QStringLiteral("char")) { - DomChar *v = new DomChar(); - v->read(reader); - setElementChar(v); - continue; - } - if (tag == QStringLiteral("url")) { - DomUrl *v = new DomUrl(); - v->read(reader); - setElementUrl(v); - continue; - } - if (tag == QStringLiteral("uint")) { - setElementUInt(reader.readElementText().toUInt()); - continue; - } - if (tag == QStringLiteral("ulonglong")) { - setElementULongLong(reader.readElementText().toULongLong()); - continue; - } - if (tag == QStringLiteral("brush")) { - DomBrush *v = new DomBrush(); - v->read(reader); - setElementBrush(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomProperty::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("property") : tagName.toLower()); - - if (hasAttributeName()) - writer.writeAttribute(QStringLiteral("name"), attributeName()); - - if (hasAttributeStdset()) - writer.writeAttribute(QStringLiteral("stdset"), QString::number(attributeStdset())); - - switch (kind()) { - case Bool: { - writer.writeTextElement(QStringLiteral("bool"), elementBool()); - break; - } - case Color: { - DomColor* v = elementColor(); - if (v != 0) { - v->write(writer, QStringLiteral("color")); - } - break; - } - case Cstring: { - writer.writeTextElement(QStringLiteral("cstring"), elementCstring()); - break; - } - case Cursor: { - writer.writeTextElement(QStringLiteral("cursor"), QString::number(elementCursor())); - break; - } - case CursorShape: { - writer.writeTextElement(QStringLiteral("cursorShape"), elementCursorShape()); - break; - } - case Enum: { - writer.writeTextElement(QStringLiteral("enum"), elementEnum()); - break; - } - case Font: { - DomFont* v = elementFont(); - if (v != 0) { - v->write(writer, QStringLiteral("font")); - } - break; - } - case IconSet: { - DomResourceIcon* v = elementIconSet(); - if (v != 0) { - v->write(writer, QStringLiteral("iconset")); - } - break; - } - case Pixmap: { - DomResourcePixmap* v = elementPixmap(); - if (v != 0) { - v->write(writer, QStringLiteral("pixmap")); - } - break; - } - case Palette: { - DomPalette* v = elementPalette(); - if (v != 0) { - v->write(writer, QStringLiteral("palette")); - } - break; - } - case Point: { - DomPoint* v = elementPoint(); - if (v != 0) { - v->write(writer, QStringLiteral("point")); - } - break; - } - case Rect: { - DomRect* v = elementRect(); - if (v != 0) { - v->write(writer, QStringLiteral("rect")); - } - break; - } - case Set: { - writer.writeTextElement(QStringLiteral("set"), elementSet()); - break; - } - case Locale: { - DomLocale* v = elementLocale(); - if (v != 0) { - v->write(writer, QStringLiteral("locale")); - } - break; - } - case SizePolicy: { - DomSizePolicy* v = elementSizePolicy(); - if (v != 0) { - v->write(writer, QStringLiteral("sizepolicy")); - } - break; - } - case Size: { - DomSize* v = elementSize(); - if (v != 0) { - v->write(writer, QStringLiteral("size")); - } - break; - } - case String: { - DomString* v = elementString(); - if (v != 0) { - v->write(writer, QStringLiteral("string")); - } - break; - } - case StringList: { - DomStringList* v = elementStringList(); - if (v != 0) { - v->write(writer, QStringLiteral("stringlist")); - } - break; - } - case Number: { - writer.writeTextElement(QStringLiteral("number"), QString::number(elementNumber())); - break; - } - case Float: { - writer.writeTextElement(QStringLiteral("float"), QString::number(elementFloat(), 'f', 8)); - break; - } - case Double: { - writer.writeTextElement(QStringLiteral("double"), QString::number(elementDouble(), 'f', 15)); - break; - } - case Date: { - DomDate* v = elementDate(); - if (v != 0) { - v->write(writer, QStringLiteral("date")); - } - break; - } - case Time: { - DomTime* v = elementTime(); - if (v != 0) { - v->write(writer, QStringLiteral("time")); - } - break; - } - case DateTime: { - DomDateTime* v = elementDateTime(); - if (v != 0) { - v->write(writer, QStringLiteral("datetime")); - } - break; - } - case PointF: { - DomPointF* v = elementPointF(); - if (v != 0) { - v->write(writer, QStringLiteral("pointf")); - } - break; - } - case RectF: { - DomRectF* v = elementRectF(); - if (v != 0) { - v->write(writer, QStringLiteral("rectf")); - } - break; - } - case SizeF: { - DomSizeF* v = elementSizeF(); - if (v != 0) { - v->write(writer, QStringLiteral("sizef")); - } - break; - } - case LongLong: { - writer.writeTextElement(QStringLiteral("longLong"), QString::number(elementLongLong())); - break; - } - case Char: { - DomChar* v = elementChar(); - if (v != 0) { - v->write(writer, QStringLiteral("char")); - } - break; - } - case Url: { - DomUrl* v = elementUrl(); - if (v != 0) { - v->write(writer, QStringLiteral("url")); - } - break; - } - case UInt: { - writer.writeTextElement(QStringLiteral("UInt"), QString::number(elementUInt())); - break; - } - case ULongLong: { - writer.writeTextElement(QStringLiteral("uLongLong"), QString::number(elementULongLong())); - break; - } - case Brush: { - DomBrush* v = elementBrush(); - if (v != 0) { - v->write(writer, QStringLiteral("brush")); - } - break; - } - default: - break; - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomProperty::setElementBool(const QString& a) -{ - clear(false); - m_kind = Bool; - m_bool = a; -} - -DomColor* DomProperty::takeElementColor() -{ - DomColor* a = m_color; - m_color = 0; - return a; -} - -void DomProperty::setElementColor(DomColor* a) -{ - clear(false); - m_kind = Color; - m_color = a; -} - -void DomProperty::setElementCstring(const QString& a) -{ - clear(false); - m_kind = Cstring; - m_cstring = a; -} - -void DomProperty::setElementCursor(int a) -{ - clear(false); - m_kind = Cursor; - m_cursor = a; -} - -void DomProperty::setElementCursorShape(const QString& a) -{ - clear(false); - m_kind = CursorShape; - m_cursorShape = a; -} - -void DomProperty::setElementEnum(const QString& a) -{ - clear(false); - m_kind = Enum; - m_enum = a; -} - -DomFont* DomProperty::takeElementFont() -{ - DomFont* a = m_font; - m_font = 0; - return a; -} - -void DomProperty::setElementFont(DomFont* a) -{ - clear(false); - m_kind = Font; - m_font = a; -} - -DomResourceIcon* DomProperty::takeElementIconSet() -{ - DomResourceIcon* a = m_iconSet; - m_iconSet = 0; - return a; -} - -void DomProperty::setElementIconSet(DomResourceIcon* a) -{ - clear(false); - m_kind = IconSet; - m_iconSet = a; -} - -DomResourcePixmap* DomProperty::takeElementPixmap() -{ - DomResourcePixmap* a = m_pixmap; - m_pixmap = 0; - return a; -} - -void DomProperty::setElementPixmap(DomResourcePixmap* a) -{ - clear(false); - m_kind = Pixmap; - m_pixmap = a; -} - -DomPalette* DomProperty::takeElementPalette() -{ - DomPalette* a = m_palette; - m_palette = 0; - return a; -} - -void DomProperty::setElementPalette(DomPalette* a) -{ - clear(false); - m_kind = Palette; - m_palette = a; -} - -DomPoint* DomProperty::takeElementPoint() -{ - DomPoint* a = m_point; - m_point = 0; - return a; -} - -void DomProperty::setElementPoint(DomPoint* a) -{ - clear(false); - m_kind = Point; - m_point = a; -} - -DomRect* DomProperty::takeElementRect() -{ - DomRect* a = m_rect; - m_rect = 0; - return a; -} - -void DomProperty::setElementRect(DomRect* a) -{ - clear(false); - m_kind = Rect; - m_rect = a; -} - -void DomProperty::setElementSet(const QString& a) -{ - clear(false); - m_kind = Set; - m_set = a; -} - -DomLocale* DomProperty::takeElementLocale() -{ - DomLocale* a = m_locale; - m_locale = 0; - return a; -} - -void DomProperty::setElementLocale(DomLocale* a) -{ - clear(false); - m_kind = Locale; - m_locale = a; -} - -DomSizePolicy* DomProperty::takeElementSizePolicy() -{ - DomSizePolicy* a = m_sizePolicy; - m_sizePolicy = 0; - return a; -} - -void DomProperty::setElementSizePolicy(DomSizePolicy* a) -{ - clear(false); - m_kind = SizePolicy; - m_sizePolicy = a; -} - -DomSize* DomProperty::takeElementSize() -{ - DomSize* a = m_size; - m_size = 0; - return a; -} - -void DomProperty::setElementSize(DomSize* a) -{ - clear(false); - m_kind = Size; - m_size = a; -} - -DomString* DomProperty::takeElementString() -{ - DomString* a = m_string; - m_string = 0; - return a; -} - -void DomProperty::setElementString(DomString* a) -{ - clear(false); - m_kind = String; - m_string = a; -} - -DomStringList* DomProperty::takeElementStringList() -{ - DomStringList* a = m_stringList; - m_stringList = 0; - return a; -} - -void DomProperty::setElementStringList(DomStringList* a) -{ - clear(false); - m_kind = StringList; - m_stringList = a; -} - -void DomProperty::setElementNumber(int a) -{ - clear(false); - m_kind = Number; - m_number = a; -} - -void DomProperty::setElementFloat(float a) -{ - clear(false); - m_kind = Float; - m_float = a; -} - -void DomProperty::setElementDouble(double a) -{ - clear(false); - m_kind = Double; - m_double = a; -} - -DomDate* DomProperty::takeElementDate() -{ - DomDate* a = m_date; - m_date = 0; - return a; -} - -void DomProperty::setElementDate(DomDate* a) -{ - clear(false); - m_kind = Date; - m_date = a; -} - -DomTime* DomProperty::takeElementTime() -{ - DomTime* a = m_time; - m_time = 0; - return a; -} - -void DomProperty::setElementTime(DomTime* a) -{ - clear(false); - m_kind = Time; - m_time = a; -} - -DomDateTime* DomProperty::takeElementDateTime() -{ - DomDateTime* a = m_dateTime; - m_dateTime = 0; - return a; -} - -void DomProperty::setElementDateTime(DomDateTime* a) -{ - clear(false); - m_kind = DateTime; - m_dateTime = a; -} - -DomPointF* DomProperty::takeElementPointF() -{ - DomPointF* a = m_pointF; - m_pointF = 0; - return a; -} - -void DomProperty::setElementPointF(DomPointF* a) -{ - clear(false); - m_kind = PointF; - m_pointF = a; -} - -DomRectF* DomProperty::takeElementRectF() -{ - DomRectF* a = m_rectF; - m_rectF = 0; - return a; -} - -void DomProperty::setElementRectF(DomRectF* a) -{ - clear(false); - m_kind = RectF; - m_rectF = a; -} - -DomSizeF* DomProperty::takeElementSizeF() -{ - DomSizeF* a = m_sizeF; - m_sizeF = 0; - return a; -} - -void DomProperty::setElementSizeF(DomSizeF* a) -{ - clear(false); - m_kind = SizeF; - m_sizeF = a; -} - -void DomProperty::setElementLongLong(qlonglong a) -{ - clear(false); - m_kind = LongLong; - m_longLong = a; -} - -DomChar* DomProperty::takeElementChar() -{ - DomChar* a = m_char; - m_char = 0; - return a; -} - -void DomProperty::setElementChar(DomChar* a) -{ - clear(false); - m_kind = Char; - m_char = a; -} - -DomUrl* DomProperty::takeElementUrl() -{ - DomUrl* a = m_url; - m_url = 0; - return a; -} - -void DomProperty::setElementUrl(DomUrl* a) -{ - clear(false); - m_kind = Url; - m_url = a; -} - -void DomProperty::setElementUInt(uint a) -{ - clear(false); - m_kind = UInt; - m_UInt = a; -} - -void DomProperty::setElementULongLong(qulonglong a) -{ - clear(false); - m_kind = ULongLong; - m_uLongLong = a; -} - -DomBrush* DomProperty::takeElementBrush() -{ - DomBrush* a = m_brush; - m_brush = 0; - return a; -} - -void DomProperty::setElementBrush(DomBrush* a) -{ - clear(false); - m_kind = Brush; - m_brush = a; -} - -void DomConnections::clear(bool clear_all) -{ - qDeleteAll(m_connection); - m_connection.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomConnections::DomConnections() -{ - m_children = 0; -} - -DomConnections::~DomConnections() -{ - qDeleteAll(m_connection); - m_connection.clear(); -} - -void DomConnections::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("connection")) { - DomConnection *v = new DomConnection(); - v->read(reader); - m_connection.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomConnections::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("connections") : tagName.toLower()); - - for (int i = 0; i < m_connection.size(); ++i) { - DomConnection* v = m_connection[i]; - v->write(writer, QStringLiteral("connection")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomConnections::setElementConnection(const QList& a) -{ - m_children |= Connection; - m_connection = a; -} - -void DomConnection::clear(bool clear_all) -{ - delete m_hints; - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; - m_hints = 0; -} - -DomConnection::DomConnection() -{ - m_children = 0; - m_hints = 0; -} - -DomConnection::~DomConnection() -{ - delete m_hints; -} - -void DomConnection::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("sender")) { - setElementSender(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("signal")) { - setElementSignal(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("receiver")) { - setElementReceiver(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("slot")) { - setElementSlot(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("hints")) { - DomConnectionHints *v = new DomConnectionHints(); - v->read(reader); - setElementHints(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomConnection::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("connection") : tagName.toLower()); - - if (m_children & Sender) { - writer.writeTextElement(QStringLiteral("sender"), m_sender); - } - - if (m_children & Signal) { - writer.writeTextElement(QStringLiteral("signal"), m_signal); - } - - if (m_children & Receiver) { - writer.writeTextElement(QStringLiteral("receiver"), m_receiver); - } - - if (m_children & Slot) { - writer.writeTextElement(QStringLiteral("slot"), m_slot); - } - - if (m_children & Hints) { - m_hints->write(writer, QStringLiteral("hints")); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomConnection::setElementSender(const QString& a) -{ - m_children |= Sender; - m_sender = a; -} - -void DomConnection::setElementSignal(const QString& a) -{ - m_children |= Signal; - m_signal = a; -} - -void DomConnection::setElementReceiver(const QString& a) -{ - m_children |= Receiver; - m_receiver = a; -} - -void DomConnection::setElementSlot(const QString& a) -{ - m_children |= Slot; - m_slot = a; -} - -DomConnectionHints* DomConnection::takeElementHints() -{ - DomConnectionHints* a = m_hints; - m_hints = 0; - m_children ^= Hints; - return a; -} - -void DomConnection::setElementHints(DomConnectionHints* a) -{ - delete m_hints; - m_children |= Hints; - m_hints = a; -} - -void DomConnection::clearElementSender() -{ - m_children &= ~Sender; -} - -void DomConnection::clearElementSignal() -{ - m_children &= ~Signal; -} - -void DomConnection::clearElementReceiver() -{ - m_children &= ~Receiver; -} - -void DomConnection::clearElementSlot() -{ - m_children &= ~Slot; -} - -void DomConnection::clearElementHints() -{ - delete m_hints; - m_hints = 0; - m_children &= ~Hints; -} - -void DomConnectionHints::clear(bool clear_all) -{ - qDeleteAll(m_hint); - m_hint.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomConnectionHints::DomConnectionHints() -{ - m_children = 0; -} - -DomConnectionHints::~DomConnectionHints() -{ - qDeleteAll(m_hint); - m_hint.clear(); -} - -void DomConnectionHints::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("hint")) { - DomConnectionHint *v = new DomConnectionHint(); - v->read(reader); - m_hint.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomConnectionHints::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("connectionhints") : tagName.toLower()); - - for (int i = 0; i < m_hint.size(); ++i) { - DomConnectionHint* v = m_hint[i]; - v->write(writer, QStringLiteral("hint")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomConnectionHints::setElementHint(const QList& a) -{ - m_children |= Hint; - m_hint = a; -} - -void DomConnectionHint::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_type = false; - } - - m_children = 0; - m_x = 0; - m_y = 0; -} - -DomConnectionHint::DomConnectionHint() -{ - m_children = 0; - m_has_attr_type = false; - m_x = 0; - m_y = 0; -} - -DomConnectionHint::~DomConnectionHint() -{ -} - -void DomConnectionHint::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("type")) { - setAttributeType(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QString(QLatin1Char('x'))) { - setElementX(reader.readElementText().toInt()); - continue; - } - if (tag == QString(QLatin1Char('y'))) { - setElementY(reader.readElementText().toInt()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomConnectionHint::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("connectionhint") : tagName.toLower()); - - if (hasAttributeType()) - writer.writeAttribute(QStringLiteral("type"), attributeType()); - - if (m_children & X) { - writer.writeTextElement(QString(QLatin1Char('x')), QString::number(m_x)); - } - - if (m_children & Y) { - writer.writeTextElement(QString(QLatin1Char('y')), QString::number(m_y)); - } - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomConnectionHint::setElementX(int a) -{ - m_children |= X; - m_x = a; -} - -void DomConnectionHint::setElementY(int a) -{ - m_children |= Y; - m_y = a; -} - -void DomConnectionHint::clearElementX() -{ - m_children &= ~X; -} - -void DomConnectionHint::clearElementY() -{ - m_children &= ~Y; -} - -void DomScript::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_source = false; - m_has_attr_language = false; - } - - m_children = 0; -} - -DomScript::DomScript() -{ - m_children = 0; - m_has_attr_source = false; - m_has_attr_language = false; -} - -DomScript::~DomScript() -{ -} - -void DomScript::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("source")) { - setAttributeSource(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("language")) { - setAttributeLanguage(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomScript::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("script") : tagName.toLower()); - - if (hasAttributeSource()) - writer.writeAttribute(QStringLiteral("source"), attributeSource()); - - if (hasAttributeLanguage()) - writer.writeAttribute(QStringLiteral("language"), attributeLanguage()); - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomWidgetData::clear(bool clear_all) -{ - qDeleteAll(m_property); - m_property.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomWidgetData::DomWidgetData() -{ - m_children = 0; -} - -DomWidgetData::~DomWidgetData() -{ - qDeleteAll(m_property); - m_property.clear(); -} - -void DomWidgetData::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("property")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_property.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomWidgetData::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("widgetdata") : tagName.toLower()); - - for (int i = 0; i < m_property.size(); ++i) { - DomProperty* v = m_property[i]; - v->write(writer, QStringLiteral("property")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomWidgetData::setElementProperty(const QList& a) -{ - m_children |= Property; - m_property = a; -} - -void DomDesignerData::clear(bool clear_all) -{ - qDeleteAll(m_property); - m_property.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomDesignerData::DomDesignerData() -{ - m_children = 0; -} - -DomDesignerData::~DomDesignerData() -{ - qDeleteAll(m_property); - m_property.clear(); -} - -void DomDesignerData::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("property")) { - DomProperty *v = new DomProperty(); - v->read(reader); - m_property.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomDesignerData::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("designerdata") : tagName.toLower()); - - for (int i = 0; i < m_property.size(); ++i) { - DomProperty* v = m_property[i]; - v->write(writer, QStringLiteral("property")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomDesignerData::setElementProperty(const QList& a) -{ - m_children |= Property; - m_property = a; -} - -void DomSlots::clear(bool clear_all) -{ - m_signal.clear(); - m_slot.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomSlots::DomSlots() -{ - m_children = 0; -} - -DomSlots::~DomSlots() -{ - m_signal.clear(); - m_slot.clear(); -} - -void DomSlots::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("signal")) { - m_signal.append(reader.readElementText()); - continue; - } - if (tag == QStringLiteral("slot")) { - m_slot.append(reader.readElementText()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomSlots::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("slots") : tagName.toLower()); - - for (int i = 0; i < m_signal.size(); ++i) { - QString v = m_signal[i]; - writer.writeTextElement(QStringLiteral("signal"), v); - } - for (int i = 0; i < m_slot.size(); ++i) { - QString v = m_slot[i]; - writer.writeTextElement(QStringLiteral("slot"), v); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomSlots::setElementSignal(const QStringList& a) -{ - m_children |= Signal; - m_signal = a; -} - -void DomSlots::setElementSlot(const QStringList& a) -{ - m_children |= Slot; - m_slot = a; -} - -void DomPropertySpecifications::clear(bool clear_all) -{ - qDeleteAll(m_stringpropertyspecification); - m_stringpropertyspecification.clear(); - - if (clear_all) { - m_text.clear(); - } - - m_children = 0; -} - -DomPropertySpecifications::DomPropertySpecifications() -{ - m_children = 0; -} - -DomPropertySpecifications::~DomPropertySpecifications() -{ - qDeleteAll(m_stringpropertyspecification); - m_stringpropertyspecification.clear(); -} - -void DomPropertySpecifications::read(QXmlStreamReader &reader) -{ - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - if (tag == QStringLiteral("stringpropertyspecification")) { - DomStringPropertySpecification *v = new DomStringPropertySpecification(); - v->read(reader); - m_stringpropertyspecification.append(v); - continue; - } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomPropertySpecifications::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("propertyspecifications") : tagName.toLower()); - - for (int i = 0; i < m_stringpropertyspecification.size(); ++i) { - DomStringPropertySpecification* v = m_stringpropertyspecification[i]; - v->write(writer, QStringLiteral("stringpropertyspecification")); - } - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -void DomPropertySpecifications::setElementStringpropertyspecification(const QList& a) -{ - m_children |= Stringpropertyspecification; - m_stringpropertyspecification = a; -} - -void DomStringPropertySpecification::clear(bool clear_all) -{ - - if (clear_all) { - m_text.clear(); - m_has_attr_name = false; - m_has_attr_type = false; - m_has_attr_notr = false; - } - - m_children = 0; -} - -DomStringPropertySpecification::DomStringPropertySpecification() -{ - m_children = 0; - m_has_attr_name = false; - m_has_attr_type = false; - m_has_attr_notr = false; -} - -DomStringPropertySpecification::~DomStringPropertySpecification() -{ -} - -void DomStringPropertySpecification::read(QXmlStreamReader &reader) -{ - - foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { - QStringRef name = attribute.name(); - if (name == QStringLiteral("name")) { - setAttributeName(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("type")) { - setAttributeType(attribute.value().toString()); - continue; - } - if (name == QStringLiteral("notr")) { - setAttributeNotr(attribute.value().toString()); - continue; - } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); - } - - for (bool finished = false; !finished && !reader.hasError();) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement : { - const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); - } - break; - case QXmlStreamReader::EndElement : - finished = true; - break; - case QXmlStreamReader::Characters : - if (!reader.isWhitespace()) - m_text.append(reader.text().toString()); - break; - default : - break; - } - } -} - -void DomStringPropertySpecification::write(QXmlStreamWriter &writer, const QString &tagName) const -{ - writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("stringpropertyspecification") : tagName.toLower()); - - if (hasAttributeName()) - writer.writeAttribute(QStringLiteral("name"), attributeName()); - - if (hasAttributeType()) - writer.writeAttribute(QStringLiteral("type"), attributeType()); - - if (hasAttributeNotr()) - writer.writeAttribute(QStringLiteral("notr"), attributeNotr()); - - if (!m_text.isEmpty()) - writer.writeCharacters(m_text); - - writer.writeEndElement(); -} - -QT_END_NAMESPACE - diff --git a/tools/uilib/ui4_p.h b/tools/uilib/ui4_p.h deleted file mode 100644 index 6a56c9eadc..0000000000 --- a/tools/uilib/ui4_p.h +++ /dev/null @@ -1,3603 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -// THIS FILE IS AUTOMATICALLY GENERATED - -#ifndef UI4_H -#define UI4_H - -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -#define QDESIGNER_UILIB_EXTERN Q_DECL_EXPORT -#define QDESIGNER_UILIB_IMPORT Q_DECL_IMPORT - -#if defined(QT_DESIGNER_STATIC) || defined(QT_UIC) || defined(QT_UIC3) -# define QDESIGNER_UILIB_EXPORT -#elif defined(QDESIGNER_UILIB_LIBRARY) -# define QDESIGNER_UILIB_EXPORT QDESIGNER_UILIB_EXTERN -#else -# define QDESIGNER_UILIB_EXPORT QDESIGNER_UILIB_IMPORT -#endif - -#ifndef QDESIGNER_UILIB_EXPORT -# define QDESIGNER_UILIB_EXPORT -#endif - -#ifdef QFORMINTERNAL_NAMESPACE -namespace QFormInternal -{ -#endif - - -/******************************************************************************* -** Forward declarations -*/ - -class DomUI; -class DomIncludes; -class DomInclude; -class DomResources; -class DomResource; -class DomActionGroup; -class DomAction; -class DomActionRef; -class DomButtonGroup; -class DomButtonGroups; -class DomImages; -class DomImage; -class DomImageData; -class DomCustomWidgets; -class DomHeader; -class DomCustomWidget; -class DomProperties; -class DomPropertyData; -class DomSizePolicyData; -class DomLayoutDefault; -class DomLayoutFunction; -class DomTabStops; -class DomLayout; -class DomLayoutItem; -class DomRow; -class DomColumn; -class DomItem; -class DomWidget; -class DomSpacer; -class DomColor; -class DomGradientStop; -class DomGradient; -class DomBrush; -class DomColorRole; -class DomColorGroup; -class DomPalette; -class DomFont; -class DomPoint; -class DomRect; -class DomLocale; -class DomSizePolicy; -class DomSize; -class DomDate; -class DomTime; -class DomDateTime; -class DomStringList; -class DomResourcePixmap; -class DomResourceIcon; -class DomString; -class DomPointF; -class DomRectF; -class DomSizeF; -class DomChar; -class DomUrl; -class DomProperty; -class DomConnections; -class DomConnection; -class DomConnectionHints; -class DomConnectionHint; -class DomScript; -class DomWidgetData; -class DomDesignerData; -class DomSlots; -class DomPropertySpecifications; -class DomStringPropertySpecification; - -/******************************************************************************* -** Declarations -*/ - -class QDESIGNER_UILIB_EXPORT DomUI { -public: - DomUI(); - ~DomUI(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeVersion() const { return m_has_attr_version; } - inline QString attributeVersion() const { return m_attr_version; } - inline void setAttributeVersion(const QString& a) { m_attr_version = a; m_has_attr_version = true; } - inline void clearAttributeVersion() { m_has_attr_version = false; } - - inline bool hasAttributeLanguage() const { return m_has_attr_language; } - inline QString attributeLanguage() const { return m_attr_language; } - inline void setAttributeLanguage(const QString& a) { m_attr_language = a; m_has_attr_language = true; } - inline void clearAttributeLanguage() { m_has_attr_language = false; } - - inline bool hasAttributeDisplayname() const { return m_has_attr_displayname; } - inline QString attributeDisplayname() const { return m_attr_displayname; } - inline void setAttributeDisplayname(const QString& a) { m_attr_displayname = a; m_has_attr_displayname = true; } - inline void clearAttributeDisplayname() { m_has_attr_displayname = false; } - - inline bool hasAttributeStdsetdef() const { return m_has_attr_stdsetdef; } - inline int attributeStdsetdef() const { return m_attr_stdsetdef; } - inline void setAttributeStdsetdef(int a) { m_attr_stdsetdef = a; m_has_attr_stdsetdef = true; } - inline void clearAttributeStdsetdef() { m_has_attr_stdsetdef = false; } - - inline bool hasAttributeStdSetDef() const { return m_has_attr_stdSetDef; } - inline int attributeStdSetDef() const { return m_attr_stdSetDef; } - inline void setAttributeStdSetDef(int a) { m_attr_stdSetDef = a; m_has_attr_stdSetDef = true; } - inline void clearAttributeStdSetDef() { m_has_attr_stdSetDef = false; } - - // child element accessors - inline QString elementAuthor() const { return m_author; } - void setElementAuthor(const QString& a); - inline bool hasElementAuthor() const { return m_children & Author; } - void clearElementAuthor(); - - inline QString elementComment() const { return m_comment; } - void setElementComment(const QString& a); - inline bool hasElementComment() const { return m_children & Comment; } - void clearElementComment(); - - inline QString elementExportMacro() const { return m_exportMacro; } - void setElementExportMacro(const QString& a); - inline bool hasElementExportMacro() const { return m_children & ExportMacro; } - void clearElementExportMacro(); - - inline QString elementClass() const { return m_class; } - void setElementClass(const QString& a); - inline bool hasElementClass() const { return m_children & Class; } - void clearElementClass(); - - inline DomWidget* elementWidget() const { return m_widget; } - DomWidget* takeElementWidget(); - void setElementWidget(DomWidget* a); - inline bool hasElementWidget() const { return m_children & Widget; } - void clearElementWidget(); - - inline DomLayoutDefault* elementLayoutDefault() const { return m_layoutDefault; } - DomLayoutDefault* takeElementLayoutDefault(); - void setElementLayoutDefault(DomLayoutDefault* a); - inline bool hasElementLayoutDefault() const { return m_children & LayoutDefault; } - void clearElementLayoutDefault(); - - inline DomLayoutFunction* elementLayoutFunction() const { return m_layoutFunction; } - DomLayoutFunction* takeElementLayoutFunction(); - void setElementLayoutFunction(DomLayoutFunction* a); - inline bool hasElementLayoutFunction() const { return m_children & LayoutFunction; } - void clearElementLayoutFunction(); - - inline QString elementPixmapFunction() const { return m_pixmapFunction; } - void setElementPixmapFunction(const QString& a); - inline bool hasElementPixmapFunction() const { return m_children & PixmapFunction; } - void clearElementPixmapFunction(); - - inline DomCustomWidgets* elementCustomWidgets() const { return m_customWidgets; } - DomCustomWidgets* takeElementCustomWidgets(); - void setElementCustomWidgets(DomCustomWidgets* a); - inline bool hasElementCustomWidgets() const { return m_children & CustomWidgets; } - void clearElementCustomWidgets(); - - inline DomTabStops* elementTabStops() const { return m_tabStops; } - DomTabStops* takeElementTabStops(); - void setElementTabStops(DomTabStops* a); - inline bool hasElementTabStops() const { return m_children & TabStops; } - void clearElementTabStops(); - - inline DomImages* elementImages() const { return m_images; } - DomImages* takeElementImages(); - void setElementImages(DomImages* a); - inline bool hasElementImages() const { return m_children & Images; } - void clearElementImages(); - - inline DomIncludes* elementIncludes() const { return m_includes; } - DomIncludes* takeElementIncludes(); - void setElementIncludes(DomIncludes* a); - inline bool hasElementIncludes() const { return m_children & Includes; } - void clearElementIncludes(); - - inline DomResources* elementResources() const { return m_resources; } - DomResources* takeElementResources(); - void setElementResources(DomResources* a); - inline bool hasElementResources() const { return m_children & Resources; } - void clearElementResources(); - - inline DomConnections* elementConnections() const { return m_connections; } - DomConnections* takeElementConnections(); - void setElementConnections(DomConnections* a); - inline bool hasElementConnections() const { return m_children & Connections; } - void clearElementConnections(); - - inline DomDesignerData* elementDesignerdata() const { return m_designerdata; } - DomDesignerData* takeElementDesignerdata(); - void setElementDesignerdata(DomDesignerData* a); - inline bool hasElementDesignerdata() const { return m_children & Designerdata; } - void clearElementDesignerdata(); - - inline DomSlots* elementSlots() const { return m_slots; } - DomSlots* takeElementSlots(); - void setElementSlots(DomSlots* a); - inline bool hasElementSlots() const { return m_children & Slots; } - void clearElementSlots(); - - inline DomButtonGroups* elementButtonGroups() const { return m_buttonGroups; } - DomButtonGroups* takeElementButtonGroups(); - void setElementButtonGroups(DomButtonGroups* a); - inline bool hasElementButtonGroups() const { return m_children & ButtonGroups; } - void clearElementButtonGroups(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_version; - bool m_has_attr_version; - - QString m_attr_language; - bool m_has_attr_language; - - QString m_attr_displayname; - bool m_has_attr_displayname; - - int m_attr_stdsetdef; - bool m_has_attr_stdsetdef; - - int m_attr_stdSetDef; - bool m_has_attr_stdSetDef; - - // child element data - uint m_children; - QString m_author; - QString m_comment; - QString m_exportMacro; - QString m_class; - DomWidget* m_widget; - DomLayoutDefault* m_layoutDefault; - DomLayoutFunction* m_layoutFunction; - QString m_pixmapFunction; - DomCustomWidgets* m_customWidgets; - DomTabStops* m_tabStops; - DomImages* m_images; - DomIncludes* m_includes; - DomResources* m_resources; - DomConnections* m_connections; - DomDesignerData* m_designerdata; - DomSlots* m_slots; - DomButtonGroups* m_buttonGroups; - enum Child { - Author = 1, - Comment = 2, - ExportMacro = 4, - Class = 8, - Widget = 16, - LayoutDefault = 32, - LayoutFunction = 64, - PixmapFunction = 128, - CustomWidgets = 256, - TabStops = 512, - Images = 1024, - Includes = 2048, - Resources = 4096, - Connections = 8192, - Designerdata = 16384, - Slots = 32768, - ButtonGroups = 65536 - }; - - DomUI(const DomUI &other); - void operator = (const DomUI&other); -}; - -class QDESIGNER_UILIB_EXPORT DomIncludes { -public: - DomIncludes(); - ~DomIncludes(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList elementInclude() const { return m_include; } - void setElementInclude(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList m_include; - enum Child { - Include = 1 - }; - - DomIncludes(const DomIncludes &other); - void operator = (const DomIncludes&other); -}; - -class QDESIGNER_UILIB_EXPORT DomInclude { -public: - DomInclude(); - ~DomInclude(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeLocation() const { return m_has_attr_location; } - inline QString attributeLocation() const { return m_attr_location; } - inline void setAttributeLocation(const QString& a) { m_attr_location = a; m_has_attr_location = true; } - inline void clearAttributeLocation() { m_has_attr_location = false; } - - inline bool hasAttributeImpldecl() const { return m_has_attr_impldecl; } - inline QString attributeImpldecl() const { return m_attr_impldecl; } - inline void setAttributeImpldecl(const QString& a) { m_attr_impldecl = a; m_has_attr_impldecl = true; } - inline void clearAttributeImpldecl() { m_has_attr_impldecl = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_location; - bool m_has_attr_location; - - QString m_attr_impldecl; - bool m_has_attr_impldecl; - - // child element data - uint m_children; - - DomInclude(const DomInclude &other); - void operator = (const DomInclude&other); -}; - -class QDESIGNER_UILIB_EXPORT DomResources { -public: - DomResources(); - ~DomResources(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeName() const { return m_has_attr_name; } - inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } - inline void clearAttributeName() { m_has_attr_name = false; } - - // child element accessors - inline QList elementInclude() const { return m_include; } - void setElementInclude(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_name; - bool m_has_attr_name; - - // child element data - uint m_children; - QList m_include; - enum Child { - Include = 1 - }; - - DomResources(const DomResources &other); - void operator = (const DomResources&other); -}; - -class QDESIGNER_UILIB_EXPORT DomResource { -public: - DomResource(); - ~DomResource(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeLocation() const { return m_has_attr_location; } - inline QString attributeLocation() const { return m_attr_location; } - inline void setAttributeLocation(const QString& a) { m_attr_location = a; m_has_attr_location = true; } - inline void clearAttributeLocation() { m_has_attr_location = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_location; - bool m_has_attr_location; - - // child element data - uint m_children; - - DomResource(const DomResource &other); - void operator = (const DomResource&other); -}; - -class QDESIGNER_UILIB_EXPORT DomActionGroup { -public: - DomActionGroup(); - ~DomActionGroup(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeName() const { return m_has_attr_name; } - inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } - inline void clearAttributeName() { m_has_attr_name = false; } - - // child element accessors - inline QList elementAction() const { return m_action; } - void setElementAction(const QList& a); - - inline QList elementActionGroup() const { return m_actionGroup; } - void setElementActionGroup(const QList& a); - - inline QList elementProperty() const { return m_property; } - void setElementProperty(const QList& a); - - inline QList elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_name; - bool m_has_attr_name; - - // child element data - uint m_children; - QList m_action; - QList m_actionGroup; - QList m_property; - QList m_attribute; - enum Child { - Action = 1, - ActionGroup = 2, - Property = 4, - Attribute = 8 - }; - - DomActionGroup(const DomActionGroup &other); - void operator = (const DomActionGroup&other); -}; - -class QDESIGNER_UILIB_EXPORT DomAction { -public: - DomAction(); - ~DomAction(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeName() const { return m_has_attr_name; } - inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } - inline void clearAttributeName() { m_has_attr_name = false; } - - inline bool hasAttributeMenu() const { return m_has_attr_menu; } - inline QString attributeMenu() const { return m_attr_menu; } - inline void setAttributeMenu(const QString& a) { m_attr_menu = a; m_has_attr_menu = true; } - inline void clearAttributeMenu() { m_has_attr_menu = false; } - - // child element accessors - inline QList elementProperty() const { return m_property; } - void setElementProperty(const QList& a); - - inline QList elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_name; - bool m_has_attr_name; - - QString m_attr_menu; - bool m_has_attr_menu; - - // child element data - uint m_children; - QList m_property; - QList m_attribute; - enum Child { - Property = 1, - Attribute = 2 - }; - - DomAction(const DomAction &other); - void operator = (const DomAction&other); -}; - -class QDESIGNER_UILIB_EXPORT DomActionRef { -public: - DomActionRef(); - ~DomActionRef(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeName() const { return m_has_attr_name; } - inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } - inline void clearAttributeName() { m_has_attr_name = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_name; - bool m_has_attr_name; - - // child element data - uint m_children; - - DomActionRef(const DomActionRef &other); - void operator = (const DomActionRef&other); -}; - -class QDESIGNER_UILIB_EXPORT DomButtonGroup { -public: - DomButtonGroup(); - ~DomButtonGroup(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeName() const { return m_has_attr_name; } - inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } - inline void clearAttributeName() { m_has_attr_name = false; } - - // child element accessors - inline QList elementProperty() const { return m_property; } - void setElementProperty(const QList& a); - - inline QList elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_name; - bool m_has_attr_name; - - // child element data - uint m_children; - QList m_property; - QList m_attribute; - enum Child { - Property = 1, - Attribute = 2 - }; - - DomButtonGroup(const DomButtonGroup &other); - void operator = (const DomButtonGroup&other); -}; - -class QDESIGNER_UILIB_EXPORT DomButtonGroups { -public: - DomButtonGroups(); - ~DomButtonGroups(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList elementButtonGroup() const { return m_buttonGroup; } - void setElementButtonGroup(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList m_buttonGroup; - enum Child { - ButtonGroup = 1 - }; - - DomButtonGroups(const DomButtonGroups &other); - void operator = (const DomButtonGroups&other); -}; - -class QDESIGNER_UILIB_EXPORT DomImages { -public: - DomImages(); - ~DomImages(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList elementImage() const { return m_image; } - void setElementImage(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList m_image; - enum Child { - Image = 1 - }; - - DomImages(const DomImages &other); - void operator = (const DomImages&other); -}; - -class QDESIGNER_UILIB_EXPORT DomImage { -public: - DomImage(); - ~DomImage(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeName() const { return m_has_attr_name; } - inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } - inline void clearAttributeName() { m_has_attr_name = false; } - - // child element accessors - inline DomImageData* elementData() const { return m_data; } - DomImageData* takeElementData(); - void setElementData(DomImageData* a); - inline bool hasElementData() const { return m_children & Data; } - void clearElementData(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_name; - bool m_has_attr_name; - - // child element data - uint m_children; - DomImageData* m_data; - enum Child { - Data = 1 - }; - - DomImage(const DomImage &other); - void operator = (const DomImage&other); -}; - -class QDESIGNER_UILIB_EXPORT DomImageData { -public: - DomImageData(); - ~DomImageData(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeFormat() const { return m_has_attr_format; } - inline QString attributeFormat() const { return m_attr_format; } - inline void setAttributeFormat(const QString& a) { m_attr_format = a; m_has_attr_format = true; } - inline void clearAttributeFormat() { m_has_attr_format = false; } - - inline bool hasAttributeLength() const { return m_has_attr_length; } - inline int attributeLength() const { return m_attr_length; } - inline void setAttributeLength(int a) { m_attr_length = a; m_has_attr_length = true; } - inline void clearAttributeLength() { m_has_attr_length = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_format; - bool m_has_attr_format; - - int m_attr_length; - bool m_has_attr_length; - - // child element data - uint m_children; - - DomImageData(const DomImageData &other); - void operator = (const DomImageData&other); -}; - -class QDESIGNER_UILIB_EXPORT DomCustomWidgets { -public: - DomCustomWidgets(); - ~DomCustomWidgets(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList elementCustomWidget() const { return m_customWidget; } - void setElementCustomWidget(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList m_customWidget; - enum Child { - CustomWidget = 1 - }; - - DomCustomWidgets(const DomCustomWidgets &other); - void operator = (const DomCustomWidgets&other); -}; - -class QDESIGNER_UILIB_EXPORT DomHeader { -public: - DomHeader(); - ~DomHeader(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeLocation() const { return m_has_attr_location; } - inline QString attributeLocation() const { return m_attr_location; } - inline void setAttributeLocation(const QString& a) { m_attr_location = a; m_has_attr_location = true; } - inline void clearAttributeLocation() { m_has_attr_location = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_location; - bool m_has_attr_location; - - // child element data - uint m_children; - - DomHeader(const DomHeader &other); - void operator = (const DomHeader&other); -}; - -class QDESIGNER_UILIB_EXPORT DomCustomWidget { -public: - DomCustomWidget(); - ~DomCustomWidget(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QString elementClass() const { return m_class; } - void setElementClass(const QString& a); - inline bool hasElementClass() const { return m_children & Class; } - void clearElementClass(); - - inline QString elementExtends() const { return m_extends; } - void setElementExtends(const QString& a); - inline bool hasElementExtends() const { return m_children & Extends; } - void clearElementExtends(); - - inline DomHeader* elementHeader() const { return m_header; } - DomHeader* takeElementHeader(); - void setElementHeader(DomHeader* a); - inline bool hasElementHeader() const { return m_children & Header; } - void clearElementHeader(); - - inline DomSize* elementSizeHint() const { return m_sizeHint; } - DomSize* takeElementSizeHint(); - void setElementSizeHint(DomSize* a); - inline bool hasElementSizeHint() const { return m_children & SizeHint; } - void clearElementSizeHint(); - - inline QString elementAddPageMethod() const { return m_addPageMethod; } - void setElementAddPageMethod(const QString& a); - inline bool hasElementAddPageMethod() const { return m_children & AddPageMethod; } - void clearElementAddPageMethod(); - - inline int elementContainer() const { return m_container; } - void setElementContainer(int a); - inline bool hasElementContainer() const { return m_children & Container; } - void clearElementContainer(); - - inline DomSizePolicyData* elementSizePolicy() const { return m_sizePolicy; } - DomSizePolicyData* takeElementSizePolicy(); - void setElementSizePolicy(DomSizePolicyData* a); - inline bool hasElementSizePolicy() const { return m_children & SizePolicy; } - void clearElementSizePolicy(); - - inline QString elementPixmap() const { return m_pixmap; } - void setElementPixmap(const QString& a); - inline bool hasElementPixmap() const { return m_children & Pixmap; } - void clearElementPixmap(); - - inline DomScript* elementScript() const { return m_script; } - DomScript* takeElementScript(); - void setElementScript(DomScript* a); - inline bool hasElementScript() const { return m_children & Script; } - void clearElementScript(); - - inline DomProperties* elementProperties() const { return m_properties; } - DomProperties* takeElementProperties(); - void setElementProperties(DomProperties* a); - inline bool hasElementProperties() const { return m_children & Properties; } - void clearElementProperties(); - - inline DomSlots* elementSlots() const { return m_slots; } - DomSlots* takeElementSlots(); - void setElementSlots(DomSlots* a); - inline bool hasElementSlots() const { return m_children & Slots; } - void clearElementSlots(); - - inline DomPropertySpecifications* elementPropertyspecifications() const { return m_propertyspecifications; } - DomPropertySpecifications* takeElementPropertyspecifications(); - void setElementPropertyspecifications(DomPropertySpecifications* a); - inline bool hasElementPropertyspecifications() const { return m_children & Propertyspecifications; } - void clearElementPropertyspecifications(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QString m_class; - QString m_extends; - DomHeader* m_header; - DomSize* m_sizeHint; - QString m_addPageMethod; - int m_container; - DomSizePolicyData* m_sizePolicy; - QString m_pixmap; - DomScript* m_script; - DomProperties* m_properties; - DomSlots* m_slots; - DomPropertySpecifications* m_propertyspecifications; - enum Child { - Class = 1, - Extends = 2, - Header = 4, - SizeHint = 8, - AddPageMethod = 16, - Container = 32, - SizePolicy = 64, - Pixmap = 128, - Script = 256, - Properties = 512, - Slots = 1024, - Propertyspecifications = 2048 - }; - - DomCustomWidget(const DomCustomWidget &other); - void operator = (const DomCustomWidget&other); -}; - -class QDESIGNER_UILIB_EXPORT DomProperties { -public: - DomProperties(); - ~DomProperties(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList elementProperty() const { return m_property; } - void setElementProperty(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList m_property; - enum Child { - Property = 1 - }; - - DomProperties(const DomProperties &other); - void operator = (const DomProperties&other); -}; - -class QDESIGNER_UILIB_EXPORT DomPropertyData { -public: - DomPropertyData(); - ~DomPropertyData(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeType() const { return m_has_attr_type; } - inline QString attributeType() const { return m_attr_type; } - inline void setAttributeType(const QString& a) { m_attr_type = a; m_has_attr_type = true; } - inline void clearAttributeType() { m_has_attr_type = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_type; - bool m_has_attr_type; - - // child element data - uint m_children; - - DomPropertyData(const DomPropertyData &other); - void operator = (const DomPropertyData&other); -}; - -class QDESIGNER_UILIB_EXPORT DomSizePolicyData { -public: - DomSizePolicyData(); - ~DomSizePolicyData(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline int elementHorData() const { return m_horData; } - void setElementHorData(int a); - inline bool hasElementHorData() const { return m_children & HorData; } - void clearElementHorData(); - - inline int elementVerData() const { return m_verData; } - void setElementVerData(int a); - inline bool hasElementVerData() const { return m_children & VerData; } - void clearElementVerData(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - int m_horData; - int m_verData; - enum Child { - HorData = 1, - VerData = 2 - }; - - DomSizePolicyData(const DomSizePolicyData &other); - void operator = (const DomSizePolicyData&other); -}; - -class QDESIGNER_UILIB_EXPORT DomLayoutDefault { -public: - DomLayoutDefault(); - ~DomLayoutDefault(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeSpacing() const { return m_has_attr_spacing; } - inline int attributeSpacing() const { return m_attr_spacing; } - inline void setAttributeSpacing(int a) { m_attr_spacing = a; m_has_attr_spacing = true; } - inline void clearAttributeSpacing() { m_has_attr_spacing = false; } - - inline bool hasAttributeMargin() const { return m_has_attr_margin; } - inline int attributeMargin() const { return m_attr_margin; } - inline void setAttributeMargin(int a) { m_attr_margin = a; m_has_attr_margin = true; } - inline void clearAttributeMargin() { m_has_attr_margin = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - int m_attr_spacing; - bool m_has_attr_spacing; - - int m_attr_margin; - bool m_has_attr_margin; - - // child element data - uint m_children; - - DomLayoutDefault(const DomLayoutDefault &other); - void operator = (const DomLayoutDefault&other); -}; - -class QDESIGNER_UILIB_EXPORT DomLayoutFunction { -public: - DomLayoutFunction(); - ~DomLayoutFunction(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeSpacing() const { return m_has_attr_spacing; } - inline QString attributeSpacing() const { return m_attr_spacing; } - inline void setAttributeSpacing(const QString& a) { m_attr_spacing = a; m_has_attr_spacing = true; } - inline void clearAttributeSpacing() { m_has_attr_spacing = false; } - - inline bool hasAttributeMargin() const { return m_has_attr_margin; } - inline QString attributeMargin() const { return m_attr_margin; } - inline void setAttributeMargin(const QString& a) { m_attr_margin = a; m_has_attr_margin = true; } - inline void clearAttributeMargin() { m_has_attr_margin = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_spacing; - bool m_has_attr_spacing; - - QString m_attr_margin; - bool m_has_attr_margin; - - // child element data - uint m_children; - - DomLayoutFunction(const DomLayoutFunction &other); - void operator = (const DomLayoutFunction&other); -}; - -class QDESIGNER_UILIB_EXPORT DomTabStops { -public: - DomTabStops(); - ~DomTabStops(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QStringList elementTabStop() const { return m_tabStop; } - void setElementTabStop(const QStringList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QStringList m_tabStop; - enum Child { - TabStop = 1 - }; - - DomTabStops(const DomTabStops &other); - void operator = (const DomTabStops&other); -}; - -class QDESIGNER_UILIB_EXPORT DomLayout { -public: - DomLayout(); - ~DomLayout(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeClass() const { return m_has_attr_class; } - inline QString attributeClass() const { return m_attr_class; } - inline void setAttributeClass(const QString& a) { m_attr_class = a; m_has_attr_class = true; } - inline void clearAttributeClass() { m_has_attr_class = false; } - - inline bool hasAttributeName() const { return m_has_attr_name; } - inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } - inline void clearAttributeName() { m_has_attr_name = false; } - - inline bool hasAttributeStretch() const { return m_has_attr_stretch; } - inline QString attributeStretch() const { return m_attr_stretch; } - inline void setAttributeStretch(const QString& a) { m_attr_stretch = a; m_has_attr_stretch = true; } - inline void clearAttributeStretch() { m_has_attr_stretch = false; } - - inline bool hasAttributeRowStretch() const { return m_has_attr_rowStretch; } - inline QString attributeRowStretch() const { return m_attr_rowStretch; } - inline void setAttributeRowStretch(const QString& a) { m_attr_rowStretch = a; m_has_attr_rowStretch = true; } - inline void clearAttributeRowStretch() { m_has_attr_rowStretch = false; } - - inline bool hasAttributeColumnStretch() const { return m_has_attr_columnStretch; } - inline QString attributeColumnStretch() const { return m_attr_columnStretch; } - inline void setAttributeColumnStretch(const QString& a) { m_attr_columnStretch = a; m_has_attr_columnStretch = true; } - inline void clearAttributeColumnStretch() { m_has_attr_columnStretch = false; } - - inline bool hasAttributeRowMinimumHeight() const { return m_has_attr_rowMinimumHeight; } - inline QString attributeRowMinimumHeight() const { return m_attr_rowMinimumHeight; } - inline void setAttributeRowMinimumHeight(const QString& a) { m_attr_rowMinimumHeight = a; m_has_attr_rowMinimumHeight = true; } - inline void clearAttributeRowMinimumHeight() { m_has_attr_rowMinimumHeight = false; } - - inline bool hasAttributeColumnMinimumWidth() const { return m_has_attr_columnMinimumWidth; } - inline QString attributeColumnMinimumWidth() const { return m_attr_columnMinimumWidth; } - inline void setAttributeColumnMinimumWidth(const QString& a) { m_attr_columnMinimumWidth = a; m_has_attr_columnMinimumWidth = true; } - inline void clearAttributeColumnMinimumWidth() { m_has_attr_columnMinimumWidth = false; } - - // child element accessors - inline QList elementProperty() const { return m_property; } - void setElementProperty(const QList& a); - - inline QList elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList& a); - - inline QList elementItem() const { return m_item; } - void setElementItem(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_class; - bool m_has_attr_class; - - QString m_attr_name; - bool m_has_attr_name; - - QString m_attr_stretch; - bool m_has_attr_stretch; - - QString m_attr_rowStretch; - bool m_has_attr_rowStretch; - - QString m_attr_columnStretch; - bool m_has_attr_columnStretch; - - QString m_attr_rowMinimumHeight; - bool m_has_attr_rowMinimumHeight; - - QString m_attr_columnMinimumWidth; - bool m_has_attr_columnMinimumWidth; - - // child element data - uint m_children; - QList m_property; - QList m_attribute; - QList m_item; - enum Child { - Property = 1, - Attribute = 2, - Item = 4 - }; - - DomLayout(const DomLayout &other); - void operator = (const DomLayout&other); -}; - -class QDESIGNER_UILIB_EXPORT DomLayoutItem { -public: - DomLayoutItem(); - ~DomLayoutItem(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeRow() const { return m_has_attr_row; } - inline int attributeRow() const { return m_attr_row; } - inline void setAttributeRow(int a) { m_attr_row = a; m_has_attr_row = true; } - inline void clearAttributeRow() { m_has_attr_row = false; } - - inline bool hasAttributeColumn() const { return m_has_attr_column; } - inline int attributeColumn() const { return m_attr_column; } - inline void setAttributeColumn(int a) { m_attr_column = a; m_has_attr_column = true; } - inline void clearAttributeColumn() { m_has_attr_column = false; } - - inline bool hasAttributeRowSpan() const { return m_has_attr_rowSpan; } - inline int attributeRowSpan() const { return m_attr_rowSpan; } - inline void setAttributeRowSpan(int a) { m_attr_rowSpan = a; m_has_attr_rowSpan = true; } - inline void clearAttributeRowSpan() { m_has_attr_rowSpan = false; } - - inline bool hasAttributeColSpan() const { return m_has_attr_colSpan; } - inline int attributeColSpan() const { return m_attr_colSpan; } - inline void setAttributeColSpan(int a) { m_attr_colSpan = a; m_has_attr_colSpan = true; } - inline void clearAttributeColSpan() { m_has_attr_colSpan = false; } - - inline bool hasAttributeAlignment() const { return m_has_attr_alignment; } - inline QString attributeAlignment() const { return m_attr_alignment; } - inline void setAttributeAlignment(const QString& a) { m_attr_alignment = a; m_has_attr_alignment = true; } - inline void clearAttributeAlignment() { m_has_attr_alignment = false; } - - // child element accessors - enum Kind { Unknown = 0, Widget, Layout, Spacer }; - inline Kind kind() const { return m_kind; } - - inline DomWidget* elementWidget() const { return m_widget; } - DomWidget* takeElementWidget(); - void setElementWidget(DomWidget* a); - - inline DomLayout* elementLayout() const { return m_layout; } - DomLayout* takeElementLayout(); - void setElementLayout(DomLayout* a); - - inline DomSpacer* elementSpacer() const { return m_spacer; } - DomSpacer* takeElementSpacer(); - void setElementSpacer(DomSpacer* a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - int m_attr_row; - bool m_has_attr_row; - - int m_attr_column; - bool m_has_attr_column; - - int m_attr_rowSpan; - bool m_has_attr_rowSpan; - - int m_attr_colSpan; - bool m_has_attr_colSpan; - - QString m_attr_alignment; - bool m_has_attr_alignment; - - // child element data - Kind m_kind; - DomWidget* m_widget; - DomLayout* m_layout; - DomSpacer* m_spacer; - - DomLayoutItem(const DomLayoutItem &other); - void operator = (const DomLayoutItem&other); -}; - -class QDESIGNER_UILIB_EXPORT DomRow { -public: - DomRow(); - ~DomRow(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList elementProperty() const { return m_property; } - void setElementProperty(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList m_property; - enum Child { - Property = 1 - }; - - DomRow(const DomRow &other); - void operator = (const DomRow&other); -}; - -class QDESIGNER_UILIB_EXPORT DomColumn { -public: - DomColumn(); - ~DomColumn(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList elementProperty() const { return m_property; } - void setElementProperty(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList m_property; - enum Child { - Property = 1 - }; - - DomColumn(const DomColumn &other); - void operator = (const DomColumn&other); -}; - -class QDESIGNER_UILIB_EXPORT DomItem { -public: - DomItem(); - ~DomItem(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeRow() const { return m_has_attr_row; } - inline int attributeRow() const { return m_attr_row; } - inline void setAttributeRow(int a) { m_attr_row = a; m_has_attr_row = true; } - inline void clearAttributeRow() { m_has_attr_row = false; } - - inline bool hasAttributeColumn() const { return m_has_attr_column; } - inline int attributeColumn() const { return m_attr_column; } - inline void setAttributeColumn(int a) { m_attr_column = a; m_has_attr_column = true; } - inline void clearAttributeColumn() { m_has_attr_column = false; } - - // child element accessors - inline QList elementProperty() const { return m_property; } - void setElementProperty(const QList& a); - - inline QList elementItem() const { return m_item; } - void setElementItem(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - int m_attr_row; - bool m_has_attr_row; - - int m_attr_column; - bool m_has_attr_column; - - // child element data - uint m_children; - QList m_property; - QList m_item; - enum Child { - Property = 1, - Item = 2 - }; - - DomItem(const DomItem &other); - void operator = (const DomItem&other); -}; - -class QDESIGNER_UILIB_EXPORT DomWidget { -public: - DomWidget(); - ~DomWidget(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeClass() const { return m_has_attr_class; } - inline QString attributeClass() const { return m_attr_class; } - inline void setAttributeClass(const QString& a) { m_attr_class = a; m_has_attr_class = true; } - inline void clearAttributeClass() { m_has_attr_class = false; } - - inline bool hasAttributeName() const { return m_has_attr_name; } - inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } - inline void clearAttributeName() { m_has_attr_name = false; } - - inline bool hasAttributeNative() const { return m_has_attr_native; } - inline bool attributeNative() const { return m_attr_native; } - inline void setAttributeNative(bool a) { m_attr_native = a; m_has_attr_native = true; } - inline void clearAttributeNative() { m_has_attr_native = false; } - - // child element accessors - inline QStringList elementClass() const { return m_class; } - void setElementClass(const QStringList& a); - - inline QList elementProperty() const { return m_property; } - void setElementProperty(const QList& a); - - inline QList elementScript() const { return m_script; } - void setElementScript(const QList& a); - - inline QList elementWidgetData() const { return m_widgetData; } - void setElementWidgetData(const QList& a); - - inline QList elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList& a); - - inline QList elementRow() const { return m_row; } - void setElementRow(const QList& a); - - inline QList elementColumn() const { return m_column; } - void setElementColumn(const QList& a); - - inline QList elementItem() const { return m_item; } - void setElementItem(const QList& a); - - inline QList elementLayout() const { return m_layout; } - void setElementLayout(const QList& a); - - inline QList elementWidget() const { return m_widget; } - void setElementWidget(const QList& a); - - inline QList elementAction() const { return m_action; } - void setElementAction(const QList& a); - - inline QList elementActionGroup() const { return m_actionGroup; } - void setElementActionGroup(const QList& a); - - inline QList elementAddAction() const { return m_addAction; } - void setElementAddAction(const QList& a); - - inline QStringList elementZOrder() const { return m_zOrder; } - void setElementZOrder(const QStringList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_class; - bool m_has_attr_class; - - QString m_attr_name; - bool m_has_attr_name; - - bool m_attr_native; - bool m_has_attr_native; - - // child element data - uint m_children; - QStringList m_class; - QList m_property; - QList m_script; - QList m_widgetData; - QList m_attribute; - QList m_row; - QList m_column; - QList m_item; - QList m_layout; - QList m_widget; - QList m_action; - QList m_actionGroup; - QList m_addAction; - QStringList m_zOrder; - enum Child { - Class = 1, - Property = 2, - Script = 4, - WidgetData = 8, - Attribute = 16, - Row = 32, - Column = 64, - Item = 128, - Layout = 256, - Widget = 512, - Action = 1024, - ActionGroup = 2048, - AddAction = 4096, - ZOrder = 8192 - }; - - DomWidget(const DomWidget &other); - void operator = (const DomWidget&other); -}; - -class QDESIGNER_UILIB_EXPORT DomSpacer { -public: - DomSpacer(); - ~DomSpacer(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeName() const { return m_has_attr_name; } - inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } - inline void clearAttributeName() { m_has_attr_name = false; } - - // child element accessors - inline QList elementProperty() const { return m_property; } - void setElementProperty(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_name; - bool m_has_attr_name; - - // child element data - uint m_children; - QList m_property; - enum Child { - Property = 1 - }; - - DomSpacer(const DomSpacer &other); - void operator = (const DomSpacer&other); -}; - -class QDESIGNER_UILIB_EXPORT DomColor { -public: - DomColor(); - ~DomColor(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeAlpha() const { return m_has_attr_alpha; } - inline int attributeAlpha() const { return m_attr_alpha; } - inline void setAttributeAlpha(int a) { m_attr_alpha = a; m_has_attr_alpha = true; } - inline void clearAttributeAlpha() { m_has_attr_alpha = false; } - - // child element accessors - inline int elementRed() const { return m_red; } - void setElementRed(int a); - inline bool hasElementRed() const { return m_children & Red; } - void clearElementRed(); - - inline int elementGreen() const { return m_green; } - void setElementGreen(int a); - inline bool hasElementGreen() const { return m_children & Green; } - void clearElementGreen(); - - inline int elementBlue() const { return m_blue; } - void setElementBlue(int a); - inline bool hasElementBlue() const { return m_children & Blue; } - void clearElementBlue(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - int m_attr_alpha; - bool m_has_attr_alpha; - - // child element data - uint m_children; - int m_red; - int m_green; - int m_blue; - enum Child { - Red = 1, - Green = 2, - Blue = 4 - }; - - DomColor(const DomColor &other); - void operator = (const DomColor&other); -}; - -class QDESIGNER_UILIB_EXPORT DomGradientStop { -public: - DomGradientStop(); - ~DomGradientStop(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributePosition() const { return m_has_attr_position; } - inline double attributePosition() const { return m_attr_position; } - inline void setAttributePosition(double a) { m_attr_position = a; m_has_attr_position = true; } - inline void clearAttributePosition() { m_has_attr_position = false; } - - // child element accessors - inline DomColor* elementColor() const { return m_color; } - DomColor* takeElementColor(); - void setElementColor(DomColor* a); - inline bool hasElementColor() const { return m_children & Color; } - void clearElementColor(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - double m_attr_position; - bool m_has_attr_position; - - // child element data - uint m_children; - DomColor* m_color; - enum Child { - Color = 1 - }; - - DomGradientStop(const DomGradientStop &other); - void operator = (const DomGradientStop&other); -}; - -class QDESIGNER_UILIB_EXPORT DomGradient { -public: - DomGradient(); - ~DomGradient(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeStartX() const { return m_has_attr_startX; } - inline double attributeStartX() const { return m_attr_startX; } - inline void setAttributeStartX(double a) { m_attr_startX = a; m_has_attr_startX = true; } - inline void clearAttributeStartX() { m_has_attr_startX = false; } - - inline bool hasAttributeStartY() const { return m_has_attr_startY; } - inline double attributeStartY() const { return m_attr_startY; } - inline void setAttributeStartY(double a) { m_attr_startY = a; m_has_attr_startY = true; } - inline void clearAttributeStartY() { m_has_attr_startY = false; } - - inline bool hasAttributeEndX() const { return m_has_attr_endX; } - inline double attributeEndX() const { return m_attr_endX; } - inline void setAttributeEndX(double a) { m_attr_endX = a; m_has_attr_endX = true; } - inline void clearAttributeEndX() { m_has_attr_endX = false; } - - inline bool hasAttributeEndY() const { return m_has_attr_endY; } - inline double attributeEndY() const { return m_attr_endY; } - inline void setAttributeEndY(double a) { m_attr_endY = a; m_has_attr_endY = true; } - inline void clearAttributeEndY() { m_has_attr_endY = false; } - - inline bool hasAttributeCentralX() const { return m_has_attr_centralX; } - inline double attributeCentralX() const { return m_attr_centralX; } - inline void setAttributeCentralX(double a) { m_attr_centralX = a; m_has_attr_centralX = true; } - inline void clearAttributeCentralX() { m_has_attr_centralX = false; } - - inline bool hasAttributeCentralY() const { return m_has_attr_centralY; } - inline double attributeCentralY() const { return m_attr_centralY; } - inline void setAttributeCentralY(double a) { m_attr_centralY = a; m_has_attr_centralY = true; } - inline void clearAttributeCentralY() { m_has_attr_centralY = false; } - - inline bool hasAttributeFocalX() const { return m_has_attr_focalX; } - inline double attributeFocalX() const { return m_attr_focalX; } - inline void setAttributeFocalX(double a) { m_attr_focalX = a; m_has_attr_focalX = true; } - inline void clearAttributeFocalX() { m_has_attr_focalX = false; } - - inline bool hasAttributeFocalY() const { return m_has_attr_focalY; } - inline double attributeFocalY() const { return m_attr_focalY; } - inline void setAttributeFocalY(double a) { m_attr_focalY = a; m_has_attr_focalY = true; } - inline void clearAttributeFocalY() { m_has_attr_focalY = false; } - - inline bool hasAttributeRadius() const { return m_has_attr_radius; } - inline double attributeRadius() const { return m_attr_radius; } - inline void setAttributeRadius(double a) { m_attr_radius = a; m_has_attr_radius = true; } - inline void clearAttributeRadius() { m_has_attr_radius = false; } - - inline bool hasAttributeAngle() const { return m_has_attr_angle; } - inline double attributeAngle() const { return m_attr_angle; } - inline void setAttributeAngle(double a) { m_attr_angle = a; m_has_attr_angle = true; } - inline void clearAttributeAngle() { m_has_attr_angle = false; } - - inline bool hasAttributeType() const { return m_has_attr_type; } - inline QString attributeType() const { return m_attr_type; } - inline void setAttributeType(const QString& a) { m_attr_type = a; m_has_attr_type = true; } - inline void clearAttributeType() { m_has_attr_type = false; } - - inline bool hasAttributeSpread() const { return m_has_attr_spread; } - inline QString attributeSpread() const { return m_attr_spread; } - inline void setAttributeSpread(const QString& a) { m_attr_spread = a; m_has_attr_spread = true; } - inline void clearAttributeSpread() { m_has_attr_spread = false; } - - inline bool hasAttributeCoordinateMode() const { return m_has_attr_coordinateMode; } - inline QString attributeCoordinateMode() const { return m_attr_coordinateMode; } - inline void setAttributeCoordinateMode(const QString& a) { m_attr_coordinateMode = a; m_has_attr_coordinateMode = true; } - inline void clearAttributeCoordinateMode() { m_has_attr_coordinateMode = false; } - - // child element accessors - inline QList elementGradientStop() const { return m_gradientStop; } - void setElementGradientStop(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - double m_attr_startX; - bool m_has_attr_startX; - - double m_attr_startY; - bool m_has_attr_startY; - - double m_attr_endX; - bool m_has_attr_endX; - - double m_attr_endY; - bool m_has_attr_endY; - - double m_attr_centralX; - bool m_has_attr_centralX; - - double m_attr_centralY; - bool m_has_attr_centralY; - - double m_attr_focalX; - bool m_has_attr_focalX; - - double m_attr_focalY; - bool m_has_attr_focalY; - - double m_attr_radius; - bool m_has_attr_radius; - - double m_attr_angle; - bool m_has_attr_angle; - - QString m_attr_type; - bool m_has_attr_type; - - QString m_attr_spread; - bool m_has_attr_spread; - - QString m_attr_coordinateMode; - bool m_has_attr_coordinateMode; - - // child element data - uint m_children; - QList m_gradientStop; - enum Child { - GradientStop = 1 - }; - - DomGradient(const DomGradient &other); - void operator = (const DomGradient&other); -}; - -class QDESIGNER_UILIB_EXPORT DomBrush { -public: - DomBrush(); - ~DomBrush(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeBrushStyle() const { return m_has_attr_brushStyle; } - inline QString attributeBrushStyle() const { return m_attr_brushStyle; } - inline void setAttributeBrushStyle(const QString& a) { m_attr_brushStyle = a; m_has_attr_brushStyle = true; } - inline void clearAttributeBrushStyle() { m_has_attr_brushStyle = false; } - - // child element accessors - enum Kind { Unknown = 0, Color, Texture, Gradient }; - inline Kind kind() const { return m_kind; } - - inline DomColor* elementColor() const { return m_color; } - DomColor* takeElementColor(); - void setElementColor(DomColor* a); - - inline DomProperty* elementTexture() const { return m_texture; } - DomProperty* takeElementTexture(); - void setElementTexture(DomProperty* a); - - inline DomGradient* elementGradient() const { return m_gradient; } - DomGradient* takeElementGradient(); - void setElementGradient(DomGradient* a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_brushStyle; - bool m_has_attr_brushStyle; - - // child element data - Kind m_kind; - DomColor* m_color; - DomProperty* m_texture; - DomGradient* m_gradient; - - DomBrush(const DomBrush &other); - void operator = (const DomBrush&other); -}; - -class QDESIGNER_UILIB_EXPORT DomColorRole { -public: - DomColorRole(); - ~DomColorRole(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeRole() const { return m_has_attr_role; } - inline QString attributeRole() const { return m_attr_role; } - inline void setAttributeRole(const QString& a) { m_attr_role = a; m_has_attr_role = true; } - inline void clearAttributeRole() { m_has_attr_role = false; } - - // child element accessors - inline DomBrush* elementBrush() const { return m_brush; } - DomBrush* takeElementBrush(); - void setElementBrush(DomBrush* a); - inline bool hasElementBrush() const { return m_children & Brush; } - void clearElementBrush(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_role; - bool m_has_attr_role; - - // child element data - uint m_children; - DomBrush* m_brush; - enum Child { - Brush = 1 - }; - - DomColorRole(const DomColorRole &other); - void operator = (const DomColorRole&other); -}; - -class QDESIGNER_UILIB_EXPORT DomColorGroup { -public: - DomColorGroup(); - ~DomColorGroup(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList elementColorRole() const { return m_colorRole; } - void setElementColorRole(const QList& a); - - inline QList elementColor() const { return m_color; } - void setElementColor(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList m_colorRole; - QList m_color; - enum Child { - ColorRole = 1, - Color = 2 - }; - - DomColorGroup(const DomColorGroup &other); - void operator = (const DomColorGroup&other); -}; - -class QDESIGNER_UILIB_EXPORT DomPalette { -public: - DomPalette(); - ~DomPalette(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline DomColorGroup* elementActive() const { return m_active; } - DomColorGroup* takeElementActive(); - void setElementActive(DomColorGroup* a); - inline bool hasElementActive() const { return m_children & Active; } - void clearElementActive(); - - inline DomColorGroup* elementInactive() const { return m_inactive; } - DomColorGroup* takeElementInactive(); - void setElementInactive(DomColorGroup* a); - inline bool hasElementInactive() const { return m_children & Inactive; } - void clearElementInactive(); - - inline DomColorGroup* elementDisabled() const { return m_disabled; } - DomColorGroup* takeElementDisabled(); - void setElementDisabled(DomColorGroup* a); - inline bool hasElementDisabled() const { return m_children & Disabled; } - void clearElementDisabled(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - DomColorGroup* m_active; - DomColorGroup* m_inactive; - DomColorGroup* m_disabled; - enum Child { - Active = 1, - Inactive = 2, - Disabled = 4 - }; - - DomPalette(const DomPalette &other); - void operator = (const DomPalette&other); -}; - -class QDESIGNER_UILIB_EXPORT DomFont { -public: - DomFont(); - ~DomFont(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QString elementFamily() const { return m_family; } - void setElementFamily(const QString& a); - inline bool hasElementFamily() const { return m_children & Family; } - void clearElementFamily(); - - inline int elementPointSize() const { return m_pointSize; } - void setElementPointSize(int a); - inline bool hasElementPointSize() const { return m_children & PointSize; } - void clearElementPointSize(); - - inline int elementWeight() const { return m_weight; } - void setElementWeight(int a); - inline bool hasElementWeight() const { return m_children & Weight; } - void clearElementWeight(); - - inline bool elementItalic() const { return m_italic; } - void setElementItalic(bool a); - inline bool hasElementItalic() const { return m_children & Italic; } - void clearElementItalic(); - - inline bool elementBold() const { return m_bold; } - void setElementBold(bool a); - inline bool hasElementBold() const { return m_children & Bold; } - void clearElementBold(); - - inline bool elementUnderline() const { return m_underline; } - void setElementUnderline(bool a); - inline bool hasElementUnderline() const { return m_children & Underline; } - void clearElementUnderline(); - - inline bool elementStrikeOut() const { return m_strikeOut; } - void setElementStrikeOut(bool a); - inline bool hasElementStrikeOut() const { return m_children & StrikeOut; } - void clearElementStrikeOut(); - - inline bool elementAntialiasing() const { return m_antialiasing; } - void setElementAntialiasing(bool a); - inline bool hasElementAntialiasing() const { return m_children & Antialiasing; } - void clearElementAntialiasing(); - - inline QString elementStyleStrategy() const { return m_styleStrategy; } - void setElementStyleStrategy(const QString& a); - inline bool hasElementStyleStrategy() const { return m_children & StyleStrategy; } - void clearElementStyleStrategy(); - - inline bool elementKerning() const { return m_kerning; } - void setElementKerning(bool a); - inline bool hasElementKerning() const { return m_children & Kerning; } - void clearElementKerning(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QString m_family; - int m_pointSize; - int m_weight; - bool m_italic; - bool m_bold; - bool m_underline; - bool m_strikeOut; - bool m_antialiasing; - QString m_styleStrategy; - bool m_kerning; - enum Child { - Family = 1, - PointSize = 2, - Weight = 4, - Italic = 8, - Bold = 16, - Underline = 32, - StrikeOut = 64, - Antialiasing = 128, - StyleStrategy = 256, - Kerning = 512 - }; - - DomFont(const DomFont &other); - void operator = (const DomFont&other); -}; - -class QDESIGNER_UILIB_EXPORT DomPoint { -public: - DomPoint(); - ~DomPoint(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline int elementX() const { return m_x; } - void setElementX(int a); - inline bool hasElementX() const { return m_children & X; } - void clearElementX(); - - inline int elementY() const { return m_y; } - void setElementY(int a); - inline bool hasElementY() const { return m_children & Y; } - void clearElementY(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - int m_x; - int m_y; - enum Child { - X = 1, - Y = 2 - }; - - DomPoint(const DomPoint &other); - void operator = (const DomPoint&other); -}; - -class QDESIGNER_UILIB_EXPORT DomRect { -public: - DomRect(); - ~DomRect(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline int elementX() const { return m_x; } - void setElementX(int a); - inline bool hasElementX() const { return m_children & X; } - void clearElementX(); - - inline int elementY() const { return m_y; } - void setElementY(int a); - inline bool hasElementY() const { return m_children & Y; } - void clearElementY(); - - inline int elementWidth() const { return m_width; } - void setElementWidth(int a); - inline bool hasElementWidth() const { return m_children & Width; } - void clearElementWidth(); - - inline int elementHeight() const { return m_height; } - void setElementHeight(int a); - inline bool hasElementHeight() const { return m_children & Height; } - void clearElementHeight(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - int m_x; - int m_y; - int m_width; - int m_height; - enum Child { - X = 1, - Y = 2, - Width = 4, - Height = 8 - }; - - DomRect(const DomRect &other); - void operator = (const DomRect&other); -}; - -class QDESIGNER_UILIB_EXPORT DomLocale { -public: - DomLocale(); - ~DomLocale(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeLanguage() const { return m_has_attr_language; } - inline QString attributeLanguage() const { return m_attr_language; } - inline void setAttributeLanguage(const QString& a) { m_attr_language = a; m_has_attr_language = true; } - inline void clearAttributeLanguage() { m_has_attr_language = false; } - - inline bool hasAttributeCountry() const { return m_has_attr_country; } - inline QString attributeCountry() const { return m_attr_country; } - inline void setAttributeCountry(const QString& a) { m_attr_country = a; m_has_attr_country = true; } - inline void clearAttributeCountry() { m_has_attr_country = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_language; - bool m_has_attr_language; - - QString m_attr_country; - bool m_has_attr_country; - - // child element data - uint m_children; - - DomLocale(const DomLocale &other); - void operator = (const DomLocale&other); -}; - -class QDESIGNER_UILIB_EXPORT DomSizePolicy { -public: - DomSizePolicy(); - ~DomSizePolicy(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeHSizeType() const { return m_has_attr_hSizeType; } - inline QString attributeHSizeType() const { return m_attr_hSizeType; } - inline void setAttributeHSizeType(const QString& a) { m_attr_hSizeType = a; m_has_attr_hSizeType = true; } - inline void clearAttributeHSizeType() { m_has_attr_hSizeType = false; } - - inline bool hasAttributeVSizeType() const { return m_has_attr_vSizeType; } - inline QString attributeVSizeType() const { return m_attr_vSizeType; } - inline void setAttributeVSizeType(const QString& a) { m_attr_vSizeType = a; m_has_attr_vSizeType = true; } - inline void clearAttributeVSizeType() { m_has_attr_vSizeType = false; } - - // child element accessors - inline int elementHSizeType() const { return m_hSizeType; } - void setElementHSizeType(int a); - inline bool hasElementHSizeType() const { return m_children & HSizeType; } - void clearElementHSizeType(); - - inline int elementVSizeType() const { return m_vSizeType; } - void setElementVSizeType(int a); - inline bool hasElementVSizeType() const { return m_children & VSizeType; } - void clearElementVSizeType(); - - inline int elementHorStretch() const { return m_horStretch; } - void setElementHorStretch(int a); - inline bool hasElementHorStretch() const { return m_children & HorStretch; } - void clearElementHorStretch(); - - inline int elementVerStretch() const { return m_verStretch; } - void setElementVerStretch(int a); - inline bool hasElementVerStretch() const { return m_children & VerStretch; } - void clearElementVerStretch(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_hSizeType; - bool m_has_attr_hSizeType; - - QString m_attr_vSizeType; - bool m_has_attr_vSizeType; - - // child element data - uint m_children; - int m_hSizeType; - int m_vSizeType; - int m_horStretch; - int m_verStretch; - enum Child { - HSizeType = 1, - VSizeType = 2, - HorStretch = 4, - VerStretch = 8 - }; - - DomSizePolicy(const DomSizePolicy &other); - void operator = (const DomSizePolicy&other); -}; - -class QDESIGNER_UILIB_EXPORT DomSize { -public: - DomSize(); - ~DomSize(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline int elementWidth() const { return m_width; } - void setElementWidth(int a); - inline bool hasElementWidth() const { return m_children & Width; } - void clearElementWidth(); - - inline int elementHeight() const { return m_height; } - void setElementHeight(int a); - inline bool hasElementHeight() const { return m_children & Height; } - void clearElementHeight(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - int m_width; - int m_height; - enum Child { - Width = 1, - Height = 2 - }; - - DomSize(const DomSize &other); - void operator = (const DomSize&other); -}; - -class QDESIGNER_UILIB_EXPORT DomDate { -public: - DomDate(); - ~DomDate(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline int elementYear() const { return m_year; } - void setElementYear(int a); - inline bool hasElementYear() const { return m_children & Year; } - void clearElementYear(); - - inline int elementMonth() const { return m_month; } - void setElementMonth(int a); - inline bool hasElementMonth() const { return m_children & Month; } - void clearElementMonth(); - - inline int elementDay() const { return m_day; } - void setElementDay(int a); - inline bool hasElementDay() const { return m_children & Day; } - void clearElementDay(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - int m_year; - int m_month; - int m_day; - enum Child { - Year = 1, - Month = 2, - Day = 4 - }; - - DomDate(const DomDate &other); - void operator = (const DomDate&other); -}; - -class QDESIGNER_UILIB_EXPORT DomTime { -public: - DomTime(); - ~DomTime(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline int elementHour() const { return m_hour; } - void setElementHour(int a); - inline bool hasElementHour() const { return m_children & Hour; } - void clearElementHour(); - - inline int elementMinute() const { return m_minute; } - void setElementMinute(int a); - inline bool hasElementMinute() const { return m_children & Minute; } - void clearElementMinute(); - - inline int elementSecond() const { return m_second; } - void setElementSecond(int a); - inline bool hasElementSecond() const { return m_children & Second; } - void clearElementSecond(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - int m_hour; - int m_minute; - int m_second; - enum Child { - Hour = 1, - Minute = 2, - Second = 4 - }; - - DomTime(const DomTime &other); - void operator = (const DomTime&other); -}; - -class QDESIGNER_UILIB_EXPORT DomDateTime { -public: - DomDateTime(); - ~DomDateTime(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline int elementHour() const { return m_hour; } - void setElementHour(int a); - inline bool hasElementHour() const { return m_children & Hour; } - void clearElementHour(); - - inline int elementMinute() const { return m_minute; } - void setElementMinute(int a); - inline bool hasElementMinute() const { return m_children & Minute; } - void clearElementMinute(); - - inline int elementSecond() const { return m_second; } - void setElementSecond(int a); - inline bool hasElementSecond() const { return m_children & Second; } - void clearElementSecond(); - - inline int elementYear() const { return m_year; } - void setElementYear(int a); - inline bool hasElementYear() const { return m_children & Year; } - void clearElementYear(); - - inline int elementMonth() const { return m_month; } - void setElementMonth(int a); - inline bool hasElementMonth() const { return m_children & Month; } - void clearElementMonth(); - - inline int elementDay() const { return m_day; } - void setElementDay(int a); - inline bool hasElementDay() const { return m_children & Day; } - void clearElementDay(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - int m_hour; - int m_minute; - int m_second; - int m_year; - int m_month; - int m_day; - enum Child { - Hour = 1, - Minute = 2, - Second = 4, - Year = 8, - Month = 16, - Day = 32 - }; - - DomDateTime(const DomDateTime &other); - void operator = (const DomDateTime&other); -}; - -class QDESIGNER_UILIB_EXPORT DomStringList { -public: - DomStringList(); - ~DomStringList(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QStringList elementString() const { return m_string; } - void setElementString(const QStringList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QStringList m_string; - enum Child { - String = 1 - }; - - DomStringList(const DomStringList &other); - void operator = (const DomStringList&other); -}; - -class QDESIGNER_UILIB_EXPORT DomResourcePixmap { -public: - DomResourcePixmap(); - ~DomResourcePixmap(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeResource() const { return m_has_attr_resource; } - inline QString attributeResource() const { return m_attr_resource; } - inline void setAttributeResource(const QString& a) { m_attr_resource = a; m_has_attr_resource = true; } - inline void clearAttributeResource() { m_has_attr_resource = false; } - - inline bool hasAttributeAlias() const { return m_has_attr_alias; } - inline QString attributeAlias() const { return m_attr_alias; } - inline void setAttributeAlias(const QString& a) { m_attr_alias = a; m_has_attr_alias = true; } - inline void clearAttributeAlias() { m_has_attr_alias = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_resource; - bool m_has_attr_resource; - - QString m_attr_alias; - bool m_has_attr_alias; - - // child element data - uint m_children; - - DomResourcePixmap(const DomResourcePixmap &other); - void operator = (const DomResourcePixmap&other); -}; - -class QDESIGNER_UILIB_EXPORT DomResourceIcon { -public: - DomResourceIcon(); - ~DomResourceIcon(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeTheme() const { return m_has_attr_theme; } - inline QString attributeTheme() const { return m_attr_theme; } - inline void setAttributeTheme(const QString& a) { m_attr_theme = a; m_has_attr_theme = true; } - inline void clearAttributeTheme() { m_has_attr_theme = false; } - - inline bool hasAttributeResource() const { return m_has_attr_resource; } - inline QString attributeResource() const { return m_attr_resource; } - inline void setAttributeResource(const QString& a) { m_attr_resource = a; m_has_attr_resource = true; } - inline void clearAttributeResource() { m_has_attr_resource = false; } - - // child element accessors - inline DomResourcePixmap* elementNormalOff() const { return m_normalOff; } - DomResourcePixmap* takeElementNormalOff(); - void setElementNormalOff(DomResourcePixmap* a); - inline bool hasElementNormalOff() const { return m_children & NormalOff; } - void clearElementNormalOff(); - - inline DomResourcePixmap* elementNormalOn() const { return m_normalOn; } - DomResourcePixmap* takeElementNormalOn(); - void setElementNormalOn(DomResourcePixmap* a); - inline bool hasElementNormalOn() const { return m_children & NormalOn; } - void clearElementNormalOn(); - - inline DomResourcePixmap* elementDisabledOff() const { return m_disabledOff; } - DomResourcePixmap* takeElementDisabledOff(); - void setElementDisabledOff(DomResourcePixmap* a); - inline bool hasElementDisabledOff() const { return m_children & DisabledOff; } - void clearElementDisabledOff(); - - inline DomResourcePixmap* elementDisabledOn() const { return m_disabledOn; } - DomResourcePixmap* takeElementDisabledOn(); - void setElementDisabledOn(DomResourcePixmap* a); - inline bool hasElementDisabledOn() const { return m_children & DisabledOn; } - void clearElementDisabledOn(); - - inline DomResourcePixmap* elementActiveOff() const { return m_activeOff; } - DomResourcePixmap* takeElementActiveOff(); - void setElementActiveOff(DomResourcePixmap* a); - inline bool hasElementActiveOff() const { return m_children & ActiveOff; } - void clearElementActiveOff(); - - inline DomResourcePixmap* elementActiveOn() const { return m_activeOn; } - DomResourcePixmap* takeElementActiveOn(); - void setElementActiveOn(DomResourcePixmap* a); - inline bool hasElementActiveOn() const { return m_children & ActiveOn; } - void clearElementActiveOn(); - - inline DomResourcePixmap* elementSelectedOff() const { return m_selectedOff; } - DomResourcePixmap* takeElementSelectedOff(); - void setElementSelectedOff(DomResourcePixmap* a); - inline bool hasElementSelectedOff() const { return m_children & SelectedOff; } - void clearElementSelectedOff(); - - inline DomResourcePixmap* elementSelectedOn() const { return m_selectedOn; } - DomResourcePixmap* takeElementSelectedOn(); - void setElementSelectedOn(DomResourcePixmap* a); - inline bool hasElementSelectedOn() const { return m_children & SelectedOn; } - void clearElementSelectedOn(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_theme; - bool m_has_attr_theme; - - QString m_attr_resource; - bool m_has_attr_resource; - - // child element data - uint m_children; - DomResourcePixmap* m_normalOff; - DomResourcePixmap* m_normalOn; - DomResourcePixmap* m_disabledOff; - DomResourcePixmap* m_disabledOn; - DomResourcePixmap* m_activeOff; - DomResourcePixmap* m_activeOn; - DomResourcePixmap* m_selectedOff; - DomResourcePixmap* m_selectedOn; - enum Child { - NormalOff = 1, - NormalOn = 2, - DisabledOff = 4, - DisabledOn = 8, - ActiveOff = 16, - ActiveOn = 32, - SelectedOff = 64, - SelectedOn = 128 - }; - - DomResourceIcon(const DomResourceIcon &other); - void operator = (const DomResourceIcon&other); -}; - -class QDESIGNER_UILIB_EXPORT DomString { -public: - DomString(); - ~DomString(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeNotr() const { return m_has_attr_notr; } - inline QString attributeNotr() const { return m_attr_notr; } - inline void setAttributeNotr(const QString& a) { m_attr_notr = a; m_has_attr_notr = true; } - inline void clearAttributeNotr() { m_has_attr_notr = false; } - - inline bool hasAttributeComment() const { return m_has_attr_comment; } - inline QString attributeComment() const { return m_attr_comment; } - inline void setAttributeComment(const QString& a) { m_attr_comment = a; m_has_attr_comment = true; } - inline void clearAttributeComment() { m_has_attr_comment = false; } - - inline bool hasAttributeExtraComment() const { return m_has_attr_extraComment; } - inline QString attributeExtraComment() const { return m_attr_extraComment; } - inline void setAttributeExtraComment(const QString& a) { m_attr_extraComment = a; m_has_attr_extraComment = true; } - inline void clearAttributeExtraComment() { m_has_attr_extraComment = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_notr; - bool m_has_attr_notr; - - QString m_attr_comment; - bool m_has_attr_comment; - - QString m_attr_extraComment; - bool m_has_attr_extraComment; - - // child element data - uint m_children; - - DomString(const DomString &other); - void operator = (const DomString&other); -}; - -class QDESIGNER_UILIB_EXPORT DomPointF { -public: - DomPointF(); - ~DomPointF(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline double elementX() const { return m_x; } - void setElementX(double a); - inline bool hasElementX() const { return m_children & X; } - void clearElementX(); - - inline double elementY() const { return m_y; } - void setElementY(double a); - inline bool hasElementY() const { return m_children & Y; } - void clearElementY(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - double m_x; - double m_y; - enum Child { - X = 1, - Y = 2 - }; - - DomPointF(const DomPointF &other); - void operator = (const DomPointF&other); -}; - -class QDESIGNER_UILIB_EXPORT DomRectF { -public: - DomRectF(); - ~DomRectF(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline double elementX() const { return m_x; } - void setElementX(double a); - inline bool hasElementX() const { return m_children & X; } - void clearElementX(); - - inline double elementY() const { return m_y; } - void setElementY(double a); - inline bool hasElementY() const { return m_children & Y; } - void clearElementY(); - - inline double elementWidth() const { return m_width; } - void setElementWidth(double a); - inline bool hasElementWidth() const { return m_children & Width; } - void clearElementWidth(); - - inline double elementHeight() const { return m_height; } - void setElementHeight(double a); - inline bool hasElementHeight() const { return m_children & Height; } - void clearElementHeight(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - double m_x; - double m_y; - double m_width; - double m_height; - enum Child { - X = 1, - Y = 2, - Width = 4, - Height = 8 - }; - - DomRectF(const DomRectF &other); - void operator = (const DomRectF&other); -}; - -class QDESIGNER_UILIB_EXPORT DomSizeF { -public: - DomSizeF(); - ~DomSizeF(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline double elementWidth() const { return m_width; } - void setElementWidth(double a); - inline bool hasElementWidth() const { return m_children & Width; } - void clearElementWidth(); - - inline double elementHeight() const { return m_height; } - void setElementHeight(double a); - inline bool hasElementHeight() const { return m_children & Height; } - void clearElementHeight(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - double m_width; - double m_height; - enum Child { - Width = 1, - Height = 2 - }; - - DomSizeF(const DomSizeF &other); - void operator = (const DomSizeF&other); -}; - -class QDESIGNER_UILIB_EXPORT DomChar { -public: - DomChar(); - ~DomChar(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline int elementUnicode() const { return m_unicode; } - void setElementUnicode(int a); - inline bool hasElementUnicode() const { return m_children & Unicode; } - void clearElementUnicode(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - int m_unicode; - enum Child { - Unicode = 1 - }; - - DomChar(const DomChar &other); - void operator = (const DomChar&other); -}; - -class QDESIGNER_UILIB_EXPORT DomUrl { -public: - DomUrl(); - ~DomUrl(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline DomString* elementString() const { return m_string; } - DomString* takeElementString(); - void setElementString(DomString* a); - inline bool hasElementString() const { return m_children & String; } - void clearElementString(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - DomString* m_string; - enum Child { - String = 1 - }; - - DomUrl(const DomUrl &other); - void operator = (const DomUrl&other); -}; - -class QDESIGNER_UILIB_EXPORT DomProperty { -public: - DomProperty(); - ~DomProperty(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeName() const { return m_has_attr_name; } - inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } - inline void clearAttributeName() { m_has_attr_name = false; } - - inline bool hasAttributeStdset() const { return m_has_attr_stdset; } - inline int attributeStdset() const { return m_attr_stdset; } - inline void setAttributeStdset(int a) { m_attr_stdset = a; m_has_attr_stdset = true; } - inline void clearAttributeStdset() { m_has_attr_stdset = false; } - - // child element accessors - enum Kind { Unknown = 0, Bool, Color, Cstring, Cursor, CursorShape, Enum, Font, IconSet, Pixmap, Palette, Point, Rect, Set, Locale, SizePolicy, Size, String, StringList, Number, Float, Double, Date, Time, DateTime, PointF, RectF, SizeF, LongLong, Char, Url, UInt, ULongLong, Brush }; - inline Kind kind() const { return m_kind; } - - inline QString elementBool() const { return m_bool; } - void setElementBool(const QString& a); - - inline DomColor* elementColor() const { return m_color; } - DomColor* takeElementColor(); - void setElementColor(DomColor* a); - - inline QString elementCstring() const { return m_cstring; } - void setElementCstring(const QString& a); - - inline int elementCursor() const { return m_cursor; } - void setElementCursor(int a); - - inline QString elementCursorShape() const { return m_cursorShape; } - void setElementCursorShape(const QString& a); - - inline QString elementEnum() const { return m_enum; } - void setElementEnum(const QString& a); - - inline DomFont* elementFont() const { return m_font; } - DomFont* takeElementFont(); - void setElementFont(DomFont* a); - - inline DomResourceIcon* elementIconSet() const { return m_iconSet; } - DomResourceIcon* takeElementIconSet(); - void setElementIconSet(DomResourceIcon* a); - - inline DomResourcePixmap* elementPixmap() const { return m_pixmap; } - DomResourcePixmap* takeElementPixmap(); - void setElementPixmap(DomResourcePixmap* a); - - inline DomPalette* elementPalette() const { return m_palette; } - DomPalette* takeElementPalette(); - void setElementPalette(DomPalette* a); - - inline DomPoint* elementPoint() const { return m_point; } - DomPoint* takeElementPoint(); - void setElementPoint(DomPoint* a); - - inline DomRect* elementRect() const { return m_rect; } - DomRect* takeElementRect(); - void setElementRect(DomRect* a); - - inline QString elementSet() const { return m_set; } - void setElementSet(const QString& a); - - inline DomLocale* elementLocale() const { return m_locale; } - DomLocale* takeElementLocale(); - void setElementLocale(DomLocale* a); - - inline DomSizePolicy* elementSizePolicy() const { return m_sizePolicy; } - DomSizePolicy* takeElementSizePolicy(); - void setElementSizePolicy(DomSizePolicy* a); - - inline DomSize* elementSize() const { return m_size; } - DomSize* takeElementSize(); - void setElementSize(DomSize* a); - - inline DomString* elementString() const { return m_string; } - DomString* takeElementString(); - void setElementString(DomString* a); - - inline DomStringList* elementStringList() const { return m_stringList; } - DomStringList* takeElementStringList(); - void setElementStringList(DomStringList* a); - - inline int elementNumber() const { return m_number; } - void setElementNumber(int a); - - inline float elementFloat() const { return m_float; } - void setElementFloat(float a); - - inline double elementDouble() const { return m_double; } - void setElementDouble(double a); - - inline DomDate* elementDate() const { return m_date; } - DomDate* takeElementDate(); - void setElementDate(DomDate* a); - - inline DomTime* elementTime() const { return m_time; } - DomTime* takeElementTime(); - void setElementTime(DomTime* a); - - inline DomDateTime* elementDateTime() const { return m_dateTime; } - DomDateTime* takeElementDateTime(); - void setElementDateTime(DomDateTime* a); - - inline DomPointF* elementPointF() const { return m_pointF; } - DomPointF* takeElementPointF(); - void setElementPointF(DomPointF* a); - - inline DomRectF* elementRectF() const { return m_rectF; } - DomRectF* takeElementRectF(); - void setElementRectF(DomRectF* a); - - inline DomSizeF* elementSizeF() const { return m_sizeF; } - DomSizeF* takeElementSizeF(); - void setElementSizeF(DomSizeF* a); - - inline qlonglong elementLongLong() const { return m_longLong; } - void setElementLongLong(qlonglong a); - - inline DomChar* elementChar() const { return m_char; } - DomChar* takeElementChar(); - void setElementChar(DomChar* a); - - inline DomUrl* elementUrl() const { return m_url; } - DomUrl* takeElementUrl(); - void setElementUrl(DomUrl* a); - - inline uint elementUInt() const { return m_UInt; } - void setElementUInt(uint a); - - inline qulonglong elementULongLong() const { return m_uLongLong; } - void setElementULongLong(qulonglong a); - - inline DomBrush* elementBrush() const { return m_brush; } - DomBrush* takeElementBrush(); - void setElementBrush(DomBrush* a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_name; - bool m_has_attr_name; - - int m_attr_stdset; - bool m_has_attr_stdset; - - // child element data - Kind m_kind; - QString m_bool; - DomColor* m_color; - QString m_cstring; - int m_cursor; - QString m_cursorShape; - QString m_enum; - DomFont* m_font; - DomResourceIcon* m_iconSet; - DomResourcePixmap* m_pixmap; - DomPalette* m_palette; - DomPoint* m_point; - DomRect* m_rect; - QString m_set; - DomLocale* m_locale; - DomSizePolicy* m_sizePolicy; - DomSize* m_size; - DomString* m_string; - DomStringList* m_stringList; - int m_number; - float m_float; - double m_double; - DomDate* m_date; - DomTime* m_time; - DomDateTime* m_dateTime; - DomPointF* m_pointF; - DomRectF* m_rectF; - DomSizeF* m_sizeF; - qlonglong m_longLong; - DomChar* m_char; - DomUrl* m_url; - uint m_UInt; - qulonglong m_uLongLong; - DomBrush* m_brush; - - DomProperty(const DomProperty &other); - void operator = (const DomProperty&other); -}; - -class QDESIGNER_UILIB_EXPORT DomConnections { -public: - DomConnections(); - ~DomConnections(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList elementConnection() const { return m_connection; } - void setElementConnection(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList m_connection; - enum Child { - Connection = 1 - }; - - DomConnections(const DomConnections &other); - void operator = (const DomConnections&other); -}; - -class QDESIGNER_UILIB_EXPORT DomConnection { -public: - DomConnection(); - ~DomConnection(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QString elementSender() const { return m_sender; } - void setElementSender(const QString& a); - inline bool hasElementSender() const { return m_children & Sender; } - void clearElementSender(); - - inline QString elementSignal() const { return m_signal; } - void setElementSignal(const QString& a); - inline bool hasElementSignal() const { return m_children & Signal; } - void clearElementSignal(); - - inline QString elementReceiver() const { return m_receiver; } - void setElementReceiver(const QString& a); - inline bool hasElementReceiver() const { return m_children & Receiver; } - void clearElementReceiver(); - - inline QString elementSlot() const { return m_slot; } - void setElementSlot(const QString& a); - inline bool hasElementSlot() const { return m_children & Slot; } - void clearElementSlot(); - - inline DomConnectionHints* elementHints() const { return m_hints; } - DomConnectionHints* takeElementHints(); - void setElementHints(DomConnectionHints* a); - inline bool hasElementHints() const { return m_children & Hints; } - void clearElementHints(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QString m_sender; - QString m_signal; - QString m_receiver; - QString m_slot; - DomConnectionHints* m_hints; - enum Child { - Sender = 1, - Signal = 2, - Receiver = 4, - Slot = 8, - Hints = 16 - }; - - DomConnection(const DomConnection &other); - void operator = (const DomConnection&other); -}; - -class QDESIGNER_UILIB_EXPORT DomConnectionHints { -public: - DomConnectionHints(); - ~DomConnectionHints(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList elementHint() const { return m_hint; } - void setElementHint(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList m_hint; - enum Child { - Hint = 1 - }; - - DomConnectionHints(const DomConnectionHints &other); - void operator = (const DomConnectionHints&other); -}; - -class QDESIGNER_UILIB_EXPORT DomConnectionHint { -public: - DomConnectionHint(); - ~DomConnectionHint(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeType() const { return m_has_attr_type; } - inline QString attributeType() const { return m_attr_type; } - inline void setAttributeType(const QString& a) { m_attr_type = a; m_has_attr_type = true; } - inline void clearAttributeType() { m_has_attr_type = false; } - - // child element accessors - inline int elementX() const { return m_x; } - void setElementX(int a); - inline bool hasElementX() const { return m_children & X; } - void clearElementX(); - - inline int elementY() const { return m_y; } - void setElementY(int a); - inline bool hasElementY() const { return m_children & Y; } - void clearElementY(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_type; - bool m_has_attr_type; - - // child element data - uint m_children; - int m_x; - int m_y; - enum Child { - X = 1, - Y = 2 - }; - - DomConnectionHint(const DomConnectionHint &other); - void operator = (const DomConnectionHint&other); -}; - -class QDESIGNER_UILIB_EXPORT DomScript { -public: - DomScript(); - ~DomScript(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeSource() const { return m_has_attr_source; } - inline QString attributeSource() const { return m_attr_source; } - inline void setAttributeSource(const QString& a) { m_attr_source = a; m_has_attr_source = true; } - inline void clearAttributeSource() { m_has_attr_source = false; } - - inline bool hasAttributeLanguage() const { return m_has_attr_language; } - inline QString attributeLanguage() const { return m_attr_language; } - inline void setAttributeLanguage(const QString& a) { m_attr_language = a; m_has_attr_language = true; } - inline void clearAttributeLanguage() { m_has_attr_language = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_source; - bool m_has_attr_source; - - QString m_attr_language; - bool m_has_attr_language; - - // child element data - uint m_children; - - DomScript(const DomScript &other); - void operator = (const DomScript&other); -}; - -class QDESIGNER_UILIB_EXPORT DomWidgetData { -public: - DomWidgetData(); - ~DomWidgetData(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList elementProperty() const { return m_property; } - void setElementProperty(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList m_property; - enum Child { - Property = 1 - }; - - DomWidgetData(const DomWidgetData &other); - void operator = (const DomWidgetData&other); -}; - -class QDESIGNER_UILIB_EXPORT DomDesignerData { -public: - DomDesignerData(); - ~DomDesignerData(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList elementProperty() const { return m_property; } - void setElementProperty(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList m_property; - enum Child { - Property = 1 - }; - - DomDesignerData(const DomDesignerData &other); - void operator = (const DomDesignerData&other); -}; - -class QDESIGNER_UILIB_EXPORT DomSlots { -public: - DomSlots(); - ~DomSlots(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QStringList elementSignal() const { return m_signal; } - void setElementSignal(const QStringList& a); - - inline QStringList elementSlot() const { return m_slot; } - void setElementSlot(const QStringList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QStringList m_signal; - QStringList m_slot; - enum Child { - Signal = 1, - Slot = 2 - }; - - DomSlots(const DomSlots &other); - void operator = (const DomSlots&other); -}; - -class QDESIGNER_UILIB_EXPORT DomPropertySpecifications { -public: - DomPropertySpecifications(); - ~DomPropertySpecifications(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList elementStringpropertyspecification() const { return m_stringpropertyspecification; } - void setElementStringpropertyspecification(const QList& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList m_stringpropertyspecification; - enum Child { - Stringpropertyspecification = 1 - }; - - DomPropertySpecifications(const DomPropertySpecifications &other); - void operator = (const DomPropertySpecifications&other); -}; - -class QDESIGNER_UILIB_EXPORT DomStringPropertySpecification { -public: - DomStringPropertySpecification(); - ~DomStringPropertySpecification(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeName() const { return m_has_attr_name; } - inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } - inline void clearAttributeName() { m_has_attr_name = false; } - - inline bool hasAttributeType() const { return m_has_attr_type; } - inline QString attributeType() const { return m_attr_type; } - inline void setAttributeType(const QString& a) { m_attr_type = a; m_has_attr_type = true; } - inline void clearAttributeType() { m_has_attr_type = false; } - - inline bool hasAttributeNotr() const { return m_has_attr_notr; } - inline QString attributeNotr() const { return m_attr_notr; } - inline void setAttributeNotr(const QString& a) { m_attr_notr = a; m_has_attr_notr = true; } - inline void clearAttributeNotr() { m_has_attr_notr = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_name; - bool m_has_attr_name; - - QString m_attr_type; - bool m_has_attr_type; - - QString m_attr_notr; - bool m_has_attr_notr; - - // child element data - uint m_children; - - DomStringPropertySpecification(const DomStringPropertySpecification &other); - void operator = (const DomStringPropertySpecification&other); -}; - - -#ifdef QFORMINTERNAL_NAMESPACE -} -#endif - -QT_END_NAMESPACE - -#endif // UI4_H diff --git a/tools/uilib/uilib.pri b/tools/uilib/uilib.pri deleted file mode 100644 index 75904c2f66..0000000000 --- a/tools/uilib/uilib.pri +++ /dev/null @@ -1,34 +0,0 @@ - -INCLUDEPATH += $$PWD - -DEFINES += QT_DESIGNER -!contains(QT_CONFIG, script): DEFINES += QT_FORMBUILDER_NO_SCRIPT - -QT += gui widgets - -# Input -HEADERS += \ - $$PWD/ui4_p.h \ - $$PWD/abstractformbuilder.h \ - $$PWD/formbuilder.h \ - $$PWD/container.h \ - $$PWD/customwidget.h \ - $$PWD/properties_p.h \ - $$PWD/formbuilderextra_p.h \ - $$PWD/resourcebuilder_p.h \ - $$PWD/textbuilder_p.h - -SOURCES += \ - $$PWD/abstractformbuilder.cpp \ - $$PWD/formbuilder.cpp \ - $$PWD/ui4.cpp \ - $$PWD/properties.cpp \ - $$PWD/formbuilderextra.cpp \ - $$PWD/resourcebuilder.cpp \ - $$PWD/textbuilder.cpp - -!contains(DEFINES, QT_FORMBUILDER_NO_SCRIPT) { - QT += script - HEADERS += $$PWD/formscriptrunner_p.h - SOURCES += $$PWD/formscriptrunner.cpp -} diff --git a/tools/uilib/uilib_global.h b/tools/uilib/uilib_global.h deleted file mode 100644 index b27a9bd3f6..0000000000 --- a/tools/uilib/uilib_global.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef UILIB_GLOBAL_H -#define UILIB_GLOBAL_H - -#include - -QT_BEGIN_HEADER -QT_BEGIN_NAMESPACE - -#define QDESIGNER_UILIB_EXTERN Q_DECL_EXPORT -#define QDESIGNER_UILIB_IMPORT Q_DECL_IMPORT - -#ifdef QT_DESIGNER_STATIC -# define QDESIGNER_UILIB_EXPORT -#elif defined(QDESIGNER_UILIB_LIBRARY) -# define QDESIGNER_UILIB_EXPORT QDESIGNER_UILIB_EXTERN -#else -# define QDESIGNER_UILIB_EXPORT QDESIGNER_UILIB_IMPORT -#endif - -QT_END_NAMESPACE -QT_END_HEADER - -#endif // UILIB_GLOBAL_H diff --git a/tools/uilib/widgets.table b/tools/uilib/widgets.table deleted file mode 100644 index 9b8727849b..0000000000 --- a/tools/uilib/widgets.table +++ /dev/null @@ -1,148 +0,0 @@ - -#ifndef DECLARE_WIDGET_1 -# define DECLARE_WIDGET_1(a,b) DECLARE_WIDGET(a,b) -#endif - -// widgets -#ifndef QT_NO_CHECKBOX -DECLARE_WIDGET(QCheckBox, "text") -#endif -#ifndef QT_NO_COMBOBOX -DECLARE_WIDGET(QComboBox, "") -#endif -#ifndef QT_NO_DATETIMEEDIT -DECLARE_WIDGET(QDateTimeEdit, "") -#endif -#ifndef QT_NO_DATEEDIT -DECLARE_WIDGET(QDateEdit, "") -#endif -#ifndef QT_NO_TIMEEDIT -DECLARE_WIDGET(QTimeEdit, "") -#endif -#ifndef QT_NO_DIAL -DECLARE_WIDGET(QDial, "") -#endif -DECLARE_WIDGET(QDialog, "") -#ifndef QT_NO_DOCKWIDGET -DECLARE_WIDGET(QDockWidget, "") -#endif -DECLARE_WIDGET(QFrame, "") -#ifndef QT_NO_GROUPBOX -DECLARE_WIDGET(QGroupBox, "") -#endif -#ifndef QT_NO_SCROLLAREA -DECLARE_WIDGET(QScrollArea, "") -#endif -#ifndef QT_NO_LCDNUMBER -DECLARE_WIDGET(QLCDNumber, "") -#endif -DECLARE_WIDGET(QLabel, "") -#ifndef QT_NO_LINEEDIT -DECLARE_WIDGET(QLineEdit, "") -#endif -#ifndef QT_NO_LISTVIEW -DECLARE_WIDGET(QListView, "") -#endif -#ifndef QT_NO_LISTWIDGET -DECLARE_WIDGET(QListWidget, "") -#endif -#ifndef QT_NO_MAINWINDOW -DECLARE_WIDGET(QMainWindow, "") -#endif -#ifndef QT_NO_MDIAREA -DECLARE_WIDGET(QMdiArea, "") -#endif -#ifndef QT_NO_MENU -DECLARE_WIDGET(QMenu, "") -#endif -#ifndef QT_NO_MENUBAR -DECLARE_WIDGET(QMenuBar, "") -#endif -#ifndef QT_NO_PROGRESSBAR -DECLARE_WIDGET(QProgressBar, "") -#endif -DECLARE_WIDGET(QPushButton, "text") -DECLARE_WIDGET(QRadioButton, "text") -DECLARE_WIDGET(QCommandLinkButton, "text") -#ifndef QT_NO_SCROLLBAR -DECLARE_WIDGET(QScrollBar, "") -#endif -#ifndef QT_NO_SLIDER -DECLARE_WIDGET(QSlider, "") -#endif -#ifndef QT_NO_SPINBOX -DECLARE_WIDGET(QSpinBox, "") -DECLARE_WIDGET(QDoubleSpinBox, "") -#endif -#ifndef QT_NO_TABWIDGET -DECLARE_WIDGET(QTabWidget, "") -#endif -#ifndef QT_NO_TABLEVIEW -DECLARE_WIDGET(QTableView, "") -#endif -#ifndef QT_NO_TABLEWIDGET -DECLARE_WIDGET(QTableWidget, "") -#endif -#ifndef QT_NO_TEXTBROWSER -DECLARE_WIDGET(QTextBrowser, "") -#endif -#ifndef QT_NO_TEXTEDIT -DECLARE_WIDGET(QTextEdit, "") -DECLARE_WIDGET(QPlainTextEdit, "") -#endif -#ifndef QT_NO_TOOLBAR -DECLARE_WIDGET(QToolBar, "") -#endif -#ifndef QT_NO_TOOLBOX -DECLARE_WIDGET(QToolBox, "") -#endif -#ifndef QT_NO_TOOLBUTTON -DECLARE_WIDGET(QToolButton, "text") -#endif -#ifndef QT_NO_TREEVIEW -DECLARE_WIDGET(QTreeView, "") -#endif -#ifndef QT_NO_TREEWIDGET -DECLARE_WIDGET(QTreeWidget, "") -#endif -DECLARE_WIDGET(QWidget, "") -#ifndef QT_NO_WORKSPACE -DECLARE_WIDGET(QWorkspace, "") -#endif -#ifndef QT_NO_SPLITTER -DECLARE_WIDGET(QSplitter, "") -#endif -#ifndef QT_NO_STACKEDWIDGET -DECLARE_WIDGET(QStackedWidget, "") -#endif -#ifndef QT_NO_STATUSBAR -DECLARE_WIDGET(QStatusBar, "") -#endif -DECLARE_WIDGET(QDialogButtonBox, "") -#ifndef QT_NO_FONTCOMBOBOX -DECLARE_WIDGET(QFontComboBox, "") -#endif -#ifndef QT_NO_CALENDARWIDGET -DECLARE_WIDGET(QCalendarWidget, "") -#endif -#ifndef QT_NO_COLUMNVIEW -DECLARE_WIDGET(QColumnView, "") -#endif - -#ifndef QT_NO_WIZARD -DECLARE_WIDGET(QWizard, "") -DECLARE_WIDGET(QWizardPage, "") -#endif - -#if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW -DECLARE_WIDGET_1(QGraphicsView, "") -#endif - -// layouts -DECLARE_LAYOUT(QGridLayout, "") -DECLARE_LAYOUT(QHBoxLayout, "") -DECLARE_LAYOUT(QStackedLayout, "") -DECLARE_LAYOUT(QVBoxLayout, "") -#ifndef QT_NO_FORMLAYOUT -DECLARE_LAYOUT(QFormLayout, "") -#endif -- cgit v1.2.3