summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libs/libs.pro2
-rw-r--r--src/libs/qmleditorwidgets/colorbox.cpp240
-rw-r--r--src/libs/qmleditorwidgets/colorbox.h98
-rw-r--r--src/libs/qmleditorwidgets/colorbutton.cpp152
-rw-r--r--src/libs/qmleditorwidgets/colorbutton.h74
-rw-r--r--src/libs/qmleditorwidgets/colorwidget.cpp47
-rw-r--r--src/libs/qmleditorwidgets/colorwidget.h58
-rw-r--r--src/libs/qmleditorwidgets/contextpanetext.ui (renamed from src/plugins/qmldesigner/components/propertyeditor/contextpanetext.ui)12
-rw-r--r--src/libs/qmleditorwidgets/contextpanetextwidget.cpp (renamed from src/plugins/qmldesigner/components/propertyeditor/contextpanetextwidget.cpp)32
-rw-r--r--src/libs/qmleditorwidgets/contextpanetextwidget.h (renamed from src/plugins/qmldesigner/components/propertyeditor/contextpanetextwidget.h)36
-rw-r--r--src/libs/qmleditorwidgets/contextpanewidget.cpp (renamed from src/plugins/qmldesigner/components/propertyeditor/contextpanewidget.cpp)73
-rw-r--r--src/libs/qmleditorwidgets/contextpanewidget.h (renamed from src/plugins/qmldesigner/components/propertyeditor/contextpanewidget.h)49
-rw-r--r--src/libs/qmleditorwidgets/contextpanewidgetborderimage.ui (renamed from src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetborderimage.ui)4
-rw-r--r--src/libs/qmleditorwidgets/contextpanewidgetimage.cpp (renamed from src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetimage.cpp)31
-rw-r--r--src/libs/qmleditorwidgets/contextpanewidgetimage.h (renamed from src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetimage.h)37
-rw-r--r--src/libs/qmleditorwidgets/contextpanewidgetimage.ui (renamed from src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetimage.ui)4
-rw-r--r--src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp (renamed from src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetrectangle.cpp)32
-rw-r--r--src/libs/qmleditorwidgets/contextpanewidgetrectangle.h (renamed from src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetrectangle.h)34
-rw-r--r--src/libs/qmleditorwidgets/contextpanewidgetrectangle.ui (renamed from src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetrectangle.ui)14
-rw-r--r--src/libs/qmleditorwidgets/customcolordialog.cpp180
-rw-r--r--src/libs/qmleditorwidgets/customcolordialog.h110
-rw-r--r--src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp (renamed from src/plugins/qmldesigner/components/easingpane/easingcontextpane.cpp)45
-rw-r--r--src/libs/qmleditorwidgets/easingpane/easingcontextpane.h (renamed from src/plugins/qmldesigner/components/easingpane/easingcontextpane.h)31
-rw-r--r--src/libs/qmleditorwidgets/easingpane/easingcontextpane.ui (renamed from src/plugins/qmldesigner/components/easingpane/easingcontextpane.ui)0
-rw-r--r--src/libs/qmleditorwidgets/easingpane/easinggraph.cpp (renamed from src/plugins/qmldesigner/components/easingpane/easinggraph.cpp)29
-rw-r--r--src/libs/qmleditorwidgets/easingpane/easinggraph.h (renamed from src/plugins/qmldesigner/components/easingpane/easinggraph.h)29
-rw-r--r--src/libs/qmleditorwidgets/easingpane/easingpane.pri11
-rw-r--r--src/libs/qmleditorwidgets/easingpane/easingpane.qrc (renamed from src/plugins/qmldesigner/components/easingpane/easingpane.qrc)0
-rw-r--r--src/libs/qmleditorwidgets/easingpane/playicon.png (renamed from src/plugins/qmldesigner/components/easingpane/playicon.png)bin230 -> 230 bytes
-rw-r--r--src/libs/qmleditorwidgets/easingpane/qt_logo.png (renamed from src/plugins/qmldesigner/components/easingpane/qt_logo.png)bin2662 -> 2662 bytes
-rw-r--r--src/libs/qmleditorwidgets/easingpane/stopicon.png (renamed from src/plugins/qmldesigner/components/easingpane/stopicon.png)bin194 -> 194 bytes
-rw-r--r--src/libs/qmleditorwidgets/filewidget.cpp142
-rw-r--r--src/libs/qmleditorwidgets/filewidget.h123
-rw-r--r--src/libs/qmleditorwidgets/fontsizespinbox.cpp (renamed from src/plugins/qmldesigner/components/propertyeditor/fontsizespinbox.cpp)31
-rw-r--r--src/libs/qmleditorwidgets/fontsizespinbox.h (renamed from src/plugins/qmldesigner/components/propertyeditor/fontsizespinbox.h)34
-rw-r--r--src/libs/qmleditorwidgets/gradientline.cpp354
-rw-r--r--src/libs/qmleditorwidgets/gradientline.h101
-rw-r--r--src/libs/qmleditorwidgets/huecontrol.cpp127
-rw-r--r--src/libs/qmleditorwidgets/huecontrol.h75
-rw-r--r--src/libs/qmleditorwidgets/images/alignmentbottom-h-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/alignmentbottom-h-icon.png)bin198 -> 198 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/alignmentbottom-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/alignmentbottom-icon.png)bin207 -> 207 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/alignmentcenterh-h-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/alignmentcenterh-h-icon.png)bin294 -> 294 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/alignmentcenterh-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/alignmentcenterh-icon.png)bin295 -> 295 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/alignmentleft-h-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/alignmentleft-h-icon.png)bin211 -> 211 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/alignmentleft-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/alignmentleft-icon.png)bin216 -> 216 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/alignmentmiddle-h-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/alignmentmiddle-h-icon.png)bin198 -> 198 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/alignmentmiddle-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/alignmentmiddle-icon.png)bin207 -> 207 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/alignmentright-h-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/alignmentright-h-icon.png)bin312 -> 312 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/alignmentright-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/alignmentright-icon.png)bin313 -> 313 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/alignmenttop-h-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/alignmenttop-h-icon.png)bin220 -> 220 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/alignmenttop-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/alignmenttop-icon.png)bin221 -> 221 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-bottom-normal.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-bottom-normal.png)bin385 -> 385 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-bottom-pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-bottom-pressed.png)bin333 -> 333 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-fill-normal.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-fill-normal.png)bin445 -> 445 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-fill-pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-fill-pressed.png)bin389 -> 389 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-horizontal-normal.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-horizontal-normal.png)bin533 -> 533 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-horizontal-pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-horizontal-pressed.png)bin480 -> 480 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-left-normal.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-left-normal.png)bin403 -> 403 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-left-pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-left-pressed.png)bin347 -> 347 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-right-normal.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-right-normal.png)bin393 -> 393 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-right-pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-right-pressed.png)bin343 -> 343 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-spacer.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-spacer.png)bin226 -> 226 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-top-normal.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-top-normal.png)bin540 -> 540 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-top-pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-top-pressed.png)bin447 -> 447 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-vertical-normal.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-vertical-normal.png)bin420 -> 420 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/anchor-vertical-pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/anchor-vertical-pressed.png)bin353 -> 353 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/apply.png (renamed from src/plugins/qmldesigner/components/resources/images/apply.png)bin615 -> 615 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/applybright.png (renamed from src/plugins/qmldesigner/components/resources/images/applybright.png)bin633 -> 633 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/aspect-crop-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/aspect-crop-icon.png)bin247 -> 247 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/aspect-fit-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/aspect-fit-icon.png)bin236 -> 236 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/aspectlockoff.png (renamed from src/plugins/qmldesigner/components/resources/images/aspectlockoff.png)bin504 -> 504 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/aspectlockset.png (renamed from src/plugins/qmldesigner/components/resources/images/aspectlockset.png)bin893 -> 893 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/bold-h-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/bold-h-icon.png)bin367 -> 367 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button-normal-left.png (renamed from src/plugins/qmldesigner/components/resources/images/button-normal-left.png)bin403 -> 403 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button-normal-middle.png (renamed from src/plugins/qmldesigner/components/resources/images/button-normal-middle.png)bin218 -> 218 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button-normal-right.png (renamed from src/plugins/qmldesigner/components/resources/images/button-normal-right.png)bin325 -> 325 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button-pressed-left.png (renamed from src/plugins/qmldesigner/components/resources/images/button-pressed-left.png)bin357 -> 357 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button-pressed-middle.png (renamed from src/plugins/qmldesigner/components/resources/images/button-pressed-middle.png)bin217 -> 217 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button-pressed-right.png (renamed from src/plugins/qmldesigner/components/resources/images/button-pressed-right.png)bin283 -> 283 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_alignment_bottom_normal.png (renamed from src/plugins/qmldesigner/components/resources/images/button_alignment_bottom_normal.png)bin647 -> 647 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_alignment_bottom_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/button_alignment_bottom_pressed.png)bin700 -> 700 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_alignment_centerh_normal.png (renamed from src/plugins/qmldesigner/components/resources/images/button_alignment_centerh_normal.png)bin655 -> 655 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_alignment_centerh_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/button_alignment_centerh_pressed.png)bin776 -> 776 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_alignment_centerv_normal.png (renamed from src/plugins/qmldesigner/components/resources/images/button_alignment_centerv_normal.png)bin571 -> 571 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_alignment_centerv_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/button_alignment_centerv_pressed.png)bin574 -> 574 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_alignment_left_normal.png (renamed from src/plugins/qmldesigner/components/resources/images/button_alignment_left_normal.png)bin791 -> 791 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_alignment_left_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/button_alignment_left_pressed.png)bin730 -> 730 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_alignment_right_normal.png (renamed from src/plugins/qmldesigner/components/resources/images/button_alignment_right_normal.png)bin808 -> 808 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_alignment_right_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/button_alignment_right_pressed.png)bin790 -> 790 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_alignment_top_normal.png (renamed from src/plugins/qmldesigner/components/resources/images/button_alignment_top_normal.png)bin709 -> 709 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_alignment_top_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/button_alignment_top_pressed.png)bin622 -> 622 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_color_gradient_normal.png (renamed from src/plugins/qmldesigner/components/resources/images/button_color_gradient_normal.png)bin932 -> 932 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_color_gradient_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/button_color_gradient_pressed.png)bin970 -> 970 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_color_none_normal.png (renamed from src/plugins/qmldesigner/components/resources/images/button_color_none_normal.png)bin1176 -> 1176 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_color_none_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/button_color_none_pressed.png)bin1057 -> 1057 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_color_solid_normal.png (renamed from src/plugins/qmldesigner/components/resources/images/button_color_solid_normal.png)bin731 -> 731 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/button_color_solid_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/button_color_solid_pressed.png)bin737 -> 737 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/cancel.png (renamed from src/plugins/qmldesigner/components/resources/images/cancel.png)bin731 -> 731 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/cancelbright.png (renamed from src/plugins/qmldesigner/components/resources/images/cancelbright.png)bin717 -> 717 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/checkbox_checked.png (renamed from src/plugins/qmldesigner/components/resources/images/checkbox_checked.png)bin410 -> 410 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/checkbox_checked_hover.png (renamed from src/plugins/qmldesigner/components/resources/images/checkbox_checked_hover.png)bin410 -> 410 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/checkbox_checked_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/checkbox_checked_pressed.png)bin393 -> 393 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/checkbox_unchecked.png (renamed from src/plugins/qmldesigner/components/resources/images/checkbox_unchecked.png)bin186 -> 186 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/checkbox_unchecked_hover.png (renamed from src/plugins/qmldesigner/components/resources/images/checkbox_unchecked_hover.png)bin186 -> 186 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/checkbox_unchecked_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/checkbox_unchecked_pressed.png)bin161 -> 161 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/collapse-button-hover-mirrored.png (renamed from src/plugins/qmldesigner/components/resources/images/collapse-button-hover-mirrored.png)bin1321 -> 1321 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/collapse-button-hover.png (renamed from src/plugins/qmldesigner/components/resources/images/collapse-button-hover.png)bin1309 -> 1309 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/collapse-button-normal-mirrored.png (renamed from src/plugins/qmldesigner/components/resources/images/collapse-button-normal-mirrored.png)bin1304 -> 1304 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/collapse-button-normal.png (renamed from src/plugins/qmldesigner/components/resources/images/collapse-button-normal.png)bin1300 -> 1300 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/combobox-normal.png (renamed from src/plugins/qmldesigner/components/resources/images/combobox-normal.png)bin416 -> 416 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/combobox-pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/combobox-pressed.png)bin436 -> 436 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/down_arrow.png (renamed from src/plugins/qmldesigner/components/resources/images/down_arrow.png)bin175 -> 175 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/down_arrow_disabled.png (renamed from src/plugins/qmldesigner/components/resources/images/down_arrow_disabled.png)bin258 -> 258 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/eye_crossed.png (renamed from src/plugins/qmldesigner/components/resources/images/eye_crossed.png)bin731 -> 731 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/eye_open.png (renamed from src/plugins/qmldesigner/components/resources/images/eye_open.png)bin593 -> 593 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/frame.png (renamed from src/plugins/qmldesigner/components/resources/images/frame.png)bin544 -> 544 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/hole.png (renamed from src/plugins/qmldesigner/components/resources/images/hole.png)bin288 -> 288 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/horizontal-scale-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/horizontal-scale-icon.png)bin439 -> 439 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/icon-bottom.png (renamed from src/plugins/qmldesigner/components/resources/images/icon-bottom.png)bin194 -> 194 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/icon-horizontal.png (renamed from src/plugins/qmldesigner/components/resources/images/icon-horizontal.png)bin229 -> 229 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/icon-left.png (renamed from src/plugins/qmldesigner/components/resources/images/icon-left.png)bin199 -> 199 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/icon-right.png (renamed from src/plugins/qmldesigner/components/resources/images/icon-right.png)bin189 -> 189 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/icon-top.png (renamed from src/plugins/qmldesigner/components/resources/images/icon-top.png)bin212 -> 212 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/icon-vertical.png (renamed from src/plugins/qmldesigner/components/resources/images/icon-vertical.png)bin242 -> 242 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/icon_color_gradient.png (renamed from src/plugins/qmldesigner/components/resources/images/icon_color_gradient.png)bin157 -> 157 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/icon_color_none.png (renamed from src/plugins/qmldesigner/components/resources/images/icon_color_none.png)bin310 -> 310 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/icon_color_solid.png (renamed from src/plugins/qmldesigner/components/resources/images/icon_color_solid.png)bin135 -> 135 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/italic-h-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/italic-h-icon.png)bin340 -> 340 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/lock.png (renamed from src/plugins/qmldesigner/components/resources/images/lock.png)bin525 -> 525 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/placeholder.png (renamed from src/plugins/qmldesigner/components/resources/images/placeholder.png)bin290 -> 290 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/pushbutton.png (renamed from src/plugins/qmldesigner/components/resources/images/pushbutton.png)bin508 -> 508 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/pushbutton_hover.png (renamed from src/plugins/qmldesigner/components/resources/images/pushbutton_hover.png)bin503 -> 503 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/pushbutton_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/pushbutton_pressed.png)bin485 -> 485 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/radiobutton_checked.png (renamed from src/plugins/qmldesigner/components/resources/images/radiobutton_checked.png)bin355 -> 355 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/radiobutton_checked_hover.png (renamed from src/plugins/qmldesigner/components/resources/images/radiobutton_checked_hover.png)bin532 -> 532 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/radiobutton_checked_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/radiobutton_checked_pressed.png)bin599 -> 599 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/radiobutton_unchecked.png (renamed from src/plugins/qmldesigner/components/resources/images/radiobutton_unchecked.png)bin240 -> 240 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/radiobutton_unchecked_hover.png (renamed from src/plugins/qmldesigner/components/resources/images/radiobutton_unchecked_hover.png)bin492 -> 492 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/radiobutton_unchecked_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/radiobutton_unchecked_pressed.png)bin556 -> 556 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/scale-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/scale-icon.png)bin513 -> 513 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/scrollbar-borderimage-horizontal.png (renamed from src/plugins/qmldesigner/components/resources/images/scrollbar-borderimage-horizontal.png)bin247 -> 247 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/scrollbar-borderimage-vertical.png (renamed from src/plugins/qmldesigner/components/resources/images/scrollbar-borderimage-vertical.png)bin233 -> 233 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/sizegrip.png (renamed from src/plugins/qmldesigner/components/resources/images/sizegrip.png)bin129 -> 129 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/slider_indikator.png (renamed from src/plugins/qmldesigner/components/resources/images/slider_indikator.png)bin308 -> 308 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/slider_line.png (renamed from src/plugins/qmldesigner/components/resources/images/slider_line.png)bin144 -> 144 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/spindown.png (renamed from src/plugins/qmldesigner/components/resources/images/spindown.png)bin227 -> 227 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/spindown_hover.png (renamed from src/plugins/qmldesigner/components/resources/images/spindown_hover.png)bin227 -> 227 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/spindown_off.png (renamed from src/plugins/qmldesigner/components/resources/images/spindown_off.png)bin249 -> 249 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/spindown_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/spindown_pressed.png)bin222 -> 222 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/spinup.png (renamed from src/plugins/qmldesigner/components/resources/images/spinup.png)bin236 -> 236 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/spinup_hover.png (renamed from src/plugins/qmldesigner/components/resources/images/spinup_hover.png)bin236 -> 236 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/spinup_off.png (renamed from src/plugins/qmldesigner/components/resources/images/spinup_off.png)bin274 -> 274 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/spinup_pressed.png (renamed from src/plugins/qmldesigner/components/resources/images/spinup_pressed.png)bin232 -> 232 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/strikeout-h-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/strikeout-h-icon.png)bin427 -> 427 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/tile-icon-hor - scale.png (renamed from src/plugins/qmldesigner/components/resources/images/tile-icon-hor - scale.png)bin474 -> 474 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/tile-icon-hor-crop.png (renamed from src/plugins/qmldesigner/components/resources/images/tile-icon-hor-crop.png)bin455 -> 455 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/tile-icon-vert-crop.png (renamed from src/plugins/qmldesigner/components/resources/images/tile-icon-vert-crop.png)bin521 -> 521 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/tile-icon-vert-scale.png (renamed from src/plugins/qmldesigner/components/resources/images/tile-icon-vert-scale.png)bin482 -> 482 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/tile-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/tile-icon.png)bin396 -> 396 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/triangle_horz.png (renamed from src/plugins/qmldesigner/components/resources/images/triangle_horz.png)bin226 -> 226 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/triangle_vert.png (renamed from src/plugins/qmldesigner/components/resources/images/triangle_vert.png)bin216 -> 216 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/underline-h-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/underline-h-icon.png)bin328 -> 328 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/up_arrow.png (renamed from src/plugins/qmldesigner/components/resources/images/up_arrow.png)bin177 -> 177 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/up_arrow_disabled.png (renamed from src/plugins/qmldesigner/components/resources/images/up_arrow_disabled.png)bin266 -> 266 bytes
-rw-r--r--src/libs/qmleditorwidgets/images/vertical-scale-icon.png (renamed from src/plugins/qmldesigner/components/resources/images/vertical-scale-icon.png)bin457 -> 457 bytes
-rw-r--r--src/libs/qmleditorwidgets/qmleditorwidgets-lib.pri53
-rw-r--r--src/libs/qmleditorwidgets/qmleditorwidgets.pri7
-rw-r--r--src/libs/qmleditorwidgets/qmleditorwidgets.pro12
-rw-r--r--src/libs/qmleditorwidgets/qmleditorwidgets_global.h43
-rw-r--r--src/libs/qmleditorwidgets/resources.qrc130
-rw-r--r--src/plugins/qmldesigner/components/easingpane/easingpane.pri12
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditor.pri15
-rw-r--r--src/plugins/qmldesigner/components/resources/resources.qrc130
173 files changed, 2627 insertions, 226 deletions
diff --git a/src/libs/libs.pro b/src/libs/libs.pro
index 9b2c75bd05..4c5a46fa50 100644
--- a/src/libs/libs.pro
+++ b/src/libs/libs.pro
@@ -10,5 +10,7 @@ SUBDIRS = \
utils/process_stub.pro \
cplusplus \
qmljs \
+ qmljsdebugger \
+ qmleditorwidgets \
symbianutils \
3rdparty
diff --git a/src/libs/qmleditorwidgets/colorbox.cpp b/src/libs/qmleditorwidgets/colorbox.cpp
new file mode 100644
index 0000000000..e09cc03340
--- /dev/null
+++ b/src/libs/qmleditorwidgets/colorbox.cpp
@@ -0,0 +1,240 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#include "colorbox.h"
+#include <QPainter>
+#include <QMouseEvent>
+
+static inline QString properName(const QColor &color)
+{
+ QString s;
+ if (color.alpha() == 255)
+ s.sprintf("#%02x%02x%02x", color.red(), color.green(), color.blue());
+ else
+ s.sprintf("#%02x%02x%02x%02x", color.alpha(), color.red(), color.green(), color.blue());
+ return s;
+}
+
+static inline QColor properColor(const QString &str)
+{
+ if (str.isEmpty())
+ return QColor();
+ int lalpha = 255;
+ QString lcolorStr = str;
+ if (lcolorStr.at(0) == '#' && lcolorStr.length() == 9) {
+ QString alphaStr = lcolorStr;
+ alphaStr.truncate(3);
+ lcolorStr.remove(0, 3);
+ lcolorStr = "#" + lcolorStr;
+ alphaStr.remove(0,1);
+ bool v;
+ lalpha = alphaStr.toInt(&v, 16);
+ if (!v)
+ lalpha = 255;
+ }
+ QColor lcolor(lcolorStr);
+ if (lcolorStr.contains('#'))
+ lcolor.setAlpha(lalpha);
+ return lcolor;
+}
+
+static inline int clamp(int x, int lower, int upper)
+{
+ if (x < lower)
+ x = lower;
+ if (x > upper)
+ x = upper;
+ return x;
+}
+
+namespace QmlEditorWidgets {
+
+void ColorBox::setHue(int newHue)
+{
+ if (m_color.hsvHue() == newHue)
+ return;
+
+ int oldAlpha = m_color.alpha();
+ m_color.setHsv(newHue,m_color.hsvSaturation(),m_color.value());
+ m_color.setAlpha(oldAlpha);
+ update();
+ emit hueChanged();
+ emit colorChanged();
+}
+
+int ColorBox::hue() const
+{
+ int retval = m_color.hsvHue();
+ if (retval<0) retval=0;
+ if (retval>359) retval=359;
+ return retval;
+}
+
+void ColorBox::setAlpha(int newAlpha)
+{
+ if (m_color.alpha() == newAlpha)
+ return;
+
+ m_color.setAlpha(newAlpha);
+ update();
+ emit alphaChanged();
+ emit colorChanged();
+}
+
+QString ColorBox::strColor() const
+{
+ return properName(m_color);
+}
+
+void ColorBox::setStrColor(const QString &colorStr)
+{
+ if (properName(m_color) == colorStr)
+ return;
+
+ setColor(properColor(colorStr));
+}
+
+void ColorBox::setColor(const QColor &color)
+{
+ if (m_color == color)
+ return;
+
+ int oldsaturation = m_color.hsvSaturation();
+ int oldvalue = m_color.value();
+ int oldhue = m_color.hsvHue();
+ int oldAlpha = m_color.alpha();
+ m_color=color;
+ update();
+ if (oldhue != m_color.hsvHue()) emit hueChanged();
+ if (oldsaturation != saturation()) emit saturationChanged();
+ if (oldvalue != value()) emit valueChanged();
+ if (oldAlpha != alpha()) emit alphaChanged();
+}
+
+void ColorBox::setSaturation(int newsaturation)
+{
+ if (m_color.hsvSaturation()==newsaturation) return;
+ int oldAlpha = m_color.alpha();
+ m_color.setHsv(m_color.hsvHue(),newsaturation,m_color.value());
+ m_color.setAlpha(oldAlpha);
+ update();
+ emit saturationChanged();
+ emit colorChanged();
+}
+
+void ColorBox::setCurrent(int x, int y)
+{
+ QColor newColor;
+ x = clamp(x, 0, 120);
+ y = clamp(y, 0, 120);
+ int oldAlpha = m_color.alpha();
+ newColor.setHsv(hue(), (x*255) / 120, 255 - (y*255) / 120);
+ newColor.setAlpha(oldAlpha);
+ setColor(newColor);
+}
+
+void ColorBox::setValue(int newvalue)
+{
+ if (m_color.value()==newvalue) return;
+ int oldAlpha = m_color.alpha();
+ m_color.setHsv(m_color.hsvHue(),m_color.hsvSaturation(),newvalue);
+ m_color.setAlpha(oldAlpha);
+ update();
+ emit valueChanged();
+ emit colorChanged();
+}
+
+void ColorBox::paintEvent(QPaintEvent *event)
+{
+ QWidget::paintEvent(event);
+
+ QPainter p(this);
+
+ if ((m_color.saturation()>1) && (m_color.value()>1))
+ m_saturatedColor.setHsv(m_color.hsvHue(),255,255);
+
+ if ((hue() != m_lastHue) || (m_cache.isNull())) {
+ m_lastHue = hue();
+
+ int fixedHue = clamp(m_lastHue, 0, 359);
+
+ m_cache = QPixmap(120, 120);
+
+ int height = 120;
+ int width = 120;
+
+ QPainter chacheP(&m_cache);
+
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ {
+ QColor c;
+ c.setHsv(fixedHue, (x*255) / width, 255 - (y*255) / height);
+ chacheP.setPen(c);
+ chacheP.drawPoint(x ,y);
+ }
+ }
+ p.drawPixmap(5, 5, m_cache);
+
+ int x = clamp(m_color.hsvSaturationF() * 120, 0, 119) + 5;
+ int y = clamp(120 - m_color.valueF() * 120, 0, 119) + 5;
+
+ p.setPen(QColor(255, 255, 255, 50));
+ p.drawLine(5, y, x-1, y);
+ p.drawLine(x+1, y, width()-7, y);
+ p.drawLine(x, 5, x, y-1);
+ p.drawLine(x, y+1, x, height()-7);
+
+}
+
+void ColorBox::mousePressEvent(QMouseEvent *e)
+{
+ // The current cell marker is set to the cell the mouse is pressed in
+ QPoint pos = e->pos();
+ m_mousePressed = true;
+ setCurrent(pos.x() - 5, pos.y() - 5);
+}
+
+void ColorBox::mouseReleaseEvent(QMouseEvent * /* event */)
+{
+ if (m_mousePressed)
+ emit colorChanged();
+ m_mousePressed = false;
+}
+
+void ColorBox::mouseMoveEvent(QMouseEvent *e)
+{
+ if (!m_mousePressed)
+ return;
+ QPoint pos = e->pos();
+ setCurrent(pos.x() - 5, pos.y() - 5);
+}
+
+
+} //QmlEditorWidgets
diff --git a/src/libs/qmleditorwidgets/colorbox.h b/src/libs/qmleditorwidgets/colorbox.h
new file mode 100644
index 0000000000..d129ae4629
--- /dev/null
+++ b/src/libs/qmleditorwidgets/colorbox.h
@@ -0,0 +1,98 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#ifndef COLORBOX_H
+#define COLORBOX_H
+
+#include <qmleditorwidgets_global.h>
+#include <QtGui/QWidget>
+#include <QToolButton>
+#include <qdeclarative.h>
+
+namespace QmlEditorWidgets {
+
+class QMLEDITORWIDGETS_EXPORT ColorBox : public QWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString strColor READ strColor WRITE setStrColor NOTIFY colorChanged)
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
+ Q_PROPERTY(int hue READ hue WRITE setHue NOTIFY hueChanged)
+ Q_PROPERTY(int saturation READ saturation WRITE setSaturation NOTIFY saturationChanged)
+ Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged)
+ Q_PROPERTY(int alpha READ alpha WRITE setAlpha NOTIFY alphaChanged)
+
+public:
+ ColorBox(QWidget *parent = 0) : QWidget(parent), m_color(Qt::white), m_saturatedColor(Qt::white), m_lastHue(0)
+ {
+ setFixedWidth(130);
+ setFixedHeight(130);
+ }
+
+ void setHue(int newHue);
+ int hue() const;
+ void setAlpha(int newAlpha);
+ int alpha() const { return m_color.alpha(); }
+ void setStrColor(const QString &colorStr);
+ void setColor(const QColor &color);
+ QString strColor() const;
+ QColor color() const { return m_color; }
+ int saturation() const { return m_color.hsvSaturation(); }
+ void setSaturation(int newsaturation);
+ int value() const { return m_color.value(); }
+ void setValue(int newvalue);
+
+signals:
+ void colorChanged();
+ void hueChanged();
+ void saturationChanged();
+ void valueChanged();
+ void alphaChanged();
+
+protected:
+ void paintEvent(QPaintEvent *event);
+
+ void mousePressEvent(QMouseEvent *);
+ void mouseReleaseEvent(QMouseEvent *);
+ void mouseMoveEvent(QMouseEvent *);
+ void setCurrent(int x, int y);
+
+private:
+ QColor m_color;
+ QColor m_saturatedColor;
+ bool m_mousePressed;
+ int m_lastHue;
+ QPixmap m_cache;
+};
+
+} //QmlEditorWidgets
+
+QML_DECLARE_TYPE(QmlEditorWidgets::ColorBox);
+
+#endif //COLORBOX_H
diff --git a/src/libs/qmleditorwidgets/colorbutton.cpp b/src/libs/qmleditorwidgets/colorbutton.cpp
new file mode 100644
index 0000000000..645f380e7f
--- /dev/null
+++ b/src/libs/qmleditorwidgets/colorbutton.cpp
@@ -0,0 +1,152 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#include "colorbutton.h"
+#include <QPainter>
+
+static inline QPixmap tilePixMap(int size)
+{
+ const int checkerbordSize= size;
+ QPixmap tilePixmap(checkerbordSize * 2, checkerbordSize * 2);
+ tilePixmap.fill(Qt::white);
+ QPainter tilePainter(&tilePixmap);
+ QColor color(220, 220, 220);
+ tilePainter.fillRect(0, 0, checkerbordSize, checkerbordSize, color);
+ tilePainter.fillRect(checkerbordSize, checkerbordSize, checkerbordSize, checkerbordSize, color);
+ return tilePixmap;
+}
+
+static inline bool isColorString(const QString &colorString)
+{
+ bool ok = true;
+ if (colorString.size() == 9 && colorString.at(0) == QLatin1Char('#')) {
+ // #rgba
+ for (int i = 1; i < 9; ++i) {
+ const QChar c = colorString.at(i);
+ if ((c >= QLatin1Char('0') && c <= QLatin1Char('9'))
+ || (c >= QLatin1Char('a') && c <= QLatin1Char('f'))
+ || (c >= QLatin1Char('A') && c <= QLatin1Char('F')))
+ continue;
+ ok = false;
+ break;
+ }
+ } else {
+ ok = QColor::isValidColor(colorString);
+ }
+
+ return ok;
+}
+
+static inline QColor properColor(const QString &str)
+{
+ if (str.isEmpty())
+ return QColor();
+ int lalpha = 255;
+ QString lcolorStr = str;
+ if (lcolorStr.at(0) == '#' && lcolorStr.length() == 9) {
+ QString alphaStr = lcolorStr;
+ alphaStr.truncate(3);
+ lcolorStr.remove(0, 3);
+ lcolorStr = "#" + lcolorStr;
+ alphaStr.remove(0,1);
+ bool v;
+ lalpha = alphaStr.toInt(&v, 16);
+ if (!v)
+ lalpha = 255;
+ }
+ QColor lcolor(lcolorStr);
+ if (lcolorStr.contains('#'))
+ lcolor.setAlpha(lalpha);
+ return lcolor;
+}
+
+namespace QmlEditorWidgets {
+
+void ColorButton::setColor(const QString &colorStr)
+{
+ if (m_colorString == colorStr)
+ return;
+
+
+ setEnabled(isColorString(colorStr));
+
+ m_colorString = colorStr;
+ update();
+ emit colorChanged();
+}
+
+QColor ColorButton::convertedColor() const
+{
+ return properColor(m_colorString);
+}
+
+void ColorButton::paintEvent(QPaintEvent *event)
+{
+ QToolButton::paintEvent(event);
+ if (!isEnabled())
+ return;
+
+ QColor color = properColor(m_colorString);
+
+ QPainter p(this);
+
+
+ QRect r(0, 0, width() - 2, height() - 2);
+ p.drawTiledPixmap(r.adjusted(1, 1, -1, -1), tilePixMap(9));
+ if (isEnabled())
+ p.setBrush(color);
+ else
+ p.setBrush(Qt::transparent);
+
+ if (color.value() > 80)
+ p.setPen(QColor(0x444444));
+ else
+ p.setPen(QColor(0x9e9e9e));
+ p.drawRect(r.translated(1, 1));
+
+ if (m_showArrow) {
+ p.setRenderHint(QPainter::Antialiasing, true);
+ QVector<QPointF> points;
+ if (isChecked()) {
+ points.append(QPointF(2, 3));
+ points.append(QPointF(8, 3));
+ points.append(QPointF(5, 9));
+ } else {
+ points.append(QPointF(8, 6));
+ points.append(QPointF(2, 9));
+ points.append(QPointF(2, 3));
+ }
+ p.translate(0.5, 0.5);
+ p.setBrush(QColor(0xaaaaaa));
+ p.setPen(QColor(0x444444));
+ p.drawPolygon(points);
+ }
+}
+
+} //QmlEditorWidgets
diff --git a/src/libs/qmleditorwidgets/colorbutton.h b/src/libs/qmleditorwidgets/colorbutton.h
new file mode 100644
index 0000000000..4637e7e126
--- /dev/null
+++ b/src/libs/qmleditorwidgets/colorbutton.h
@@ -0,0 +1,74 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#ifndef COLORBUTTON_H
+#define COLORBUTTON_H
+
+#include <qmleditorwidgets_global.h>
+#include <QtGui/QWidget>
+#include <QToolButton>
+#include <qdeclarative.h>
+
+namespace QmlEditorWidgets {
+
+class QMLEDITORWIDGETS_EXPORT ColorButton : public QToolButton {
+
+Q_OBJECT
+
+Q_PROPERTY(QString color READ color WRITE setColor NOTIFY colorChanged)
+Q_PROPERTY(bool noColor READ noColor WRITE setNoColor)
+Q_PROPERTY(bool showArrow READ showArrow WRITE setShowArrow)
+
+public:
+ ColorButton(QWidget *parent = 0) : QToolButton (parent), m_colorString("#ffffff"), m_noColor(false), m_showArrow(true) {}
+
+ void setColor(const QString &colorStr);
+ QString color() const { return m_colorString; }
+ QColor convertedColor() const;
+ bool noColor() const { return m_noColor; }
+ void setNoColor(bool f) { m_noColor = f; update(); }
+ bool showArrow() const { return m_showArrow; }
+ void setShowArrow(bool b) { m_showArrow = b; }
+
+signals:
+ void colorChanged();
+
+protected:
+ void paintEvent(QPaintEvent *event);
+private:
+ QString m_colorString;
+ bool m_noColor;
+ bool m_showArrow;
+};
+
+} //QmlEditorWidgets
+
+QML_DECLARE_TYPE(QmlEditorWidgets::ColorButton);
+
+#endif //COLORBUTTON_H
diff --git a/src/libs/qmleditorwidgets/colorwidget.cpp b/src/libs/qmleditorwidgets/colorwidget.cpp
new file mode 100644
index 0000000000..5a9f67d381
--- /dev/null
+++ b/src/libs/qmleditorwidgets/colorwidget.cpp
@@ -0,0 +1,47 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#include "colorwidget.h"
+#include <qdeclarative.h>
+
+#include "colorbox.h"
+#include "colorbutton.h"
+#include "huecontrol.h"
+#include "gradientline.h"
+
+namespace QmlEditorWidgets {
+
+void ColorWidget::registerDeclarativeTypes() {
+ qmlRegisterType<QmlEditorWidgets::ColorButton>("Bauhaus",1,0,"ColorButton");
+ qmlRegisterType<QmlEditorWidgets::HueControl>("Bauhaus",1,0,"HueControl");
+ qmlRegisterType<QmlEditorWidgets::ColorBox>("Bauhaus",1,0,"ColorBox");
+ qmlRegisterType<QmlEditorWidgets::GradientLine>("Bauhaus",1,0,"GradientLine");
+}
+
+}
diff --git a/src/libs/qmleditorwidgets/colorwidget.h b/src/libs/qmleditorwidgets/colorwidget.h
new file mode 100644
index 0000000000..a79b21a67d
--- /dev/null
+++ b/src/libs/qmleditorwidgets/colorwidget.h
@@ -0,0 +1,58 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#ifndef COLORWIDGET_H
+#define COLORWIDGET_H
+
+#include <qmleditorwidgets_global.h>
+#include <QWeakPointer>
+#include <QtGui/QWidget>
+#include <QLabel>
+#include <QToolButton>
+#include <QMouseEvent>
+
+
+QT_BEGIN_NAMESPACE
+class QToolButton;
+QT_END_NAMESPACE
+
+namespace QmlEditorWidgets {
+
+class ColorWidget {
+
+public:
+ static void registerDeclarativeTypes();
+
+
+};
+
+
+} //QmlDesigner
+
+#endif //COLORWIDGET_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanetext.ui b/src/libs/qmleditorwidgets/contextpanetext.ui
index b89aa10c98..7c2d227ddc 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/contextpanetext.ui
+++ b/src/libs/qmleditorwidgets/contextpanetext.ui
@@ -297,7 +297,7 @@
</widget>
</item>
<item row="0" column="6">
- <widget class="QmlDesigner::FontSizeSpinBox" name="fontSizeSpinBox">
+ <widget class="QmlEditorWidgets::FontSizeSpinBox" name="fontSizeSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -337,7 +337,7 @@
</widget>
</item>
<item row="2" column="2">
- <widget class="QmlDesigner::ColorButton" name="textColorButton">
+ <widget class="QmlEditorWidgets::ColorButton" name="textColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>22</horstretch>
@@ -381,7 +381,7 @@
</spacer>
</item>
<item row="0" column="4">
- <widget class="QmlDesigner::ColorButton" name="colorButton">
+ <widget class="QmlEditorWidgets::ColorButton" name="colorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>22</horstretch>
@@ -412,12 +412,12 @@
</widget>
<customwidgets>
<customwidget>
- <class>QmlDesigner::ColorButton</class>
+ <class>QmlEditorWidgets::ColorButton</class>
<extends>QToolButton</extends>
- <header location="global">colorwidget.h</header>
+ <header location="global">colorbutton.h</header>
</customwidget>
<customwidget>
- <class>QmlDesigner::FontSizeSpinBox</class>
+ <class>QmlEditorWidgets::FontSizeSpinBox</class>
<extends>QSpinBox</extends>
<header location="global">fontsizespinbox.h</header>
</customwidget>
diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanetextwidget.cpp b/src/libs/qmleditorwidgets/contextpanetextwidget.cpp
index 0d13372b02..883a4ac23a 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/contextpanetextwidget.cpp
+++ b/src/libs/qmleditorwidgets/contextpanetextwidget.cpp
@@ -1,10 +1,40 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
#include "contextpanetextwidget.h"
#include "contextpanewidget.h"
+#include "customcolordialog.h"
#include "ui_contextpanetext.h"
#include <qmljs/qmljspropertyreader.h>
#include <QTimerEvent>
-namespace QmlDesigner {
+namespace QmlEditorWidgets {
ContextPaneTextWidget::ContextPaneTextWidget(QWidget *parent) :
QWidget(parent),
diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanetextwidget.h b/src/libs/qmleditorwidgets/contextpanetextwidget.h
index 701f994540..19f8684fa3 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/contextpanetextwidget.h
+++ b/src/libs/qmleditorwidgets/contextpanetextwidget.h
@@ -1,6 +1,36 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
#ifndef CONTEXTPANETEXTWIDGET_H
#define CONTEXTPANETEXTWIDGET_H
+#include <qmleditorwidgets_global.h>
#include <QWidget>
#include <QVariant>
@@ -14,11 +44,11 @@ namespace QmlJS {
class PropertyReader;
}
-namespace QmlDesigner {
+namespace QmlEditorWidgets {
-class BauhausColorDialog;
+class CustomColorDialog;
-class ContextPaneTextWidget : public QWidget
+class QMLEDITORWIDGETS_EXPORT ContextPaneTextWidget : public QWidget
{
Q_OBJECT
diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidget.cpp b/src/libs/qmleditorwidgets/contextpanewidget.cpp
index f42a97be84..60e434f466 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidget.cpp
+++ b/src/libs/qmleditorwidgets/contextpanewidget.cpp
@@ -1,5 +1,33 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
#include "contextpanewidget.h"
-#include <coreplugin/icore.h>
#include <QFontComboBox>
#include <QComboBox>
#include <QSpinBox>
@@ -11,14 +39,15 @@
#include <QGridLayout>
#include <QToolButton>
#include <QAction>
-#include <qmldesignerplugin.h>
#include "colorwidget.h"
#include "contextpanetextwidget.h"
#include "easingcontextpane.h"
#include "contextpanewidgetimage.h"
#include "contextpanewidgetrectangle.h"
+#include "customcolordialog.h"
+#include "colorbutton.h"
-namespace QmlDesigner {
+namespace QmlEditorWidgets {
/* XPM */
static const char * const line_xpm[] = {
@@ -137,11 +166,6 @@ ContextPaneWidget::ContextPaneWidget(QWidget *parent) : DragWidget(parent), m_cu
m_toolButton->setToolButtonStyle(Qt::ToolButtonIconOnly);
m_toolButton->setFixedSize(16, 16);
- if (Internal::BauhausPlugin::pluginInstance()->settings().pinContextPane)
- setPinButton();
- else
- setLineButton();
-
m_toolButton->setToolTip(tr("Hides this toolbar. This toolbar can be permantly disabled in the options or in the context menu."));
connect(m_toolButton, SIGNAL(clicked()), this, SLOT(onTogglePane()));
layout->addWidget(m_toolButton, 0, 0, 1, 1);
@@ -182,7 +206,7 @@ ContextPaneWidget::~ContextPaneWidget()
m_bauhausColorDialog.clear();
}
-void ContextPaneWidget::activate(const QPoint &pos, const QPoint &alternative, const QPoint &alternative2)
+void ContextPaneWidget::activate(const QPoint &pos, const QPoint &alternative, const QPoint &alternative2, bool pinned)
{
//uncheck all color buttons
foreach (ColorButton *colorButton, findChildren<ColorButton*>()) {
@@ -192,13 +216,11 @@ void ContextPaneWidget::activate(const QPoint &pos, const QPoint &alternative, c
update();
resize(sizeHint());
show();
- rePosition(pos, alternative, alternative2);
+ rePosition(pos, alternative, alternative2, pinned);
raise();
- m_resetAction->setChecked(Internal::BauhausPlugin::pluginInstance()->settings().pinContextPane);
- m_disableAction->setChecked(Internal::BauhausPlugin::pluginInstance()->settings().enableContextPane);
}
-void ContextPaneWidget::rePosition(const QPoint &position, const QPoint &alternative, const QPoint &alternative2)
+void ContextPaneWidget::rePosition(const QPoint &position, const QPoint &alternative, const QPoint &alternative2, bool pinned)
{
if ((position.x() + width()) < parentWidget()->width())
move(position);
@@ -212,7 +234,7 @@ void ContextPaneWidget::rePosition(const QPoint &position, const QPoint &alterna
m_originalPos = pos();
- if (m_pos.x() > 0 && (Internal::BauhausPlugin::pluginInstance()->settings().pinContextPane)) {
+ if (m_pos.x() > 0 && pinned) {
move(m_pos);
show();
setPinButton();
@@ -228,10 +250,17 @@ void ContextPaneWidget::deactivate()
m_bauhausColorDialog->hide();
}
-BauhausColorDialog *ContextPaneWidget::colorDialog()
+void ContextPaneWidget::setOptions(bool enabled, bool pinned)
+{
+
+ m_disableAction->setChecked(enabled);
+ m_resetAction->setChecked(pinned);
+}
+
+CustomColorDialog *ContextPaneWidget::colorDialog()
{
if (m_bauhausColorDialog.isNull()) {
- m_bauhausColorDialog = new BauhausColorDialog(parentWidget());
+ m_bauhausColorDialog = new CustomColorDialog(parentWidget());
m_bauhausColorDialog->hide();
setSecondaryTarget(m_bauhausColorDialog.data());
}
@@ -351,9 +380,7 @@ void ContextPaneWidget::onShowColorDialog(bool checked, const QPoint &p)
void ContextPaneWidget::onDisable(bool b)
{
- DesignerSettings designerSettings = Internal::BauhausPlugin::pluginInstance()->settings();
- designerSettings.enableContextPane = b;
- Internal::BauhausPlugin::pluginInstance()->setSettings(designerSettings);
+ enabledChanged(b);
if (!b) {
hide();
colorDialog()->hide();
@@ -438,9 +465,7 @@ void ContextPaneWidget::setPinButton()
m_toolButton->setFixedSize(20, 20);
m_toolButton->setToolTip(tr("Unpins the toolbar. The toolbar will be moved to its default position."));
- DesignerSettings designerSettings = Internal::BauhausPlugin::pluginInstance()->settings();
- designerSettings.pinContextPane = true;
- Internal::BauhausPlugin::pluginInstance()->setSettings(designerSettings);
+ pinnedChanged(true);
if (m_resetAction) {
m_resetAction->blockSignals(true);
m_resetAction->setChecked(true);
@@ -457,9 +482,7 @@ void ContextPaneWidget::setLineButton()
m_toolButton->setFixedSize(20, 20);
m_toolButton->setToolTip(tr("Hides this toolbar. This toolbar can be permantly disabled in the options or in the context menu."));
- DesignerSettings designerSettings = Internal::BauhausPlugin::pluginInstance()->settings();
- designerSettings.pinContextPane = false;
- Internal::BauhausPlugin::pluginInstance()->setSettings(designerSettings);
+ pinnedChanged(false);
if (m_resetAction) {
m_resetAction->blockSignals(true);
m_resetAction->setChecked(false);
diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidget.h b/src/libs/qmleditorwidgets/contextpanewidget.h
index 833bd9d929..14a040f28e 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidget.h
+++ b/src/libs/qmleditorwidgets/contextpanewidget.h
@@ -1,6 +1,36 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
#ifndef CONTEXTPANEWIDGET_H
#define CONTEXTPANEWIDGET_H
+#include <qmleditorwidgets_global.h>
#include <QFrame>
#include <QVariant>
#include <QGraphicsEffect>
@@ -11,15 +41,15 @@ namespace QmlJS {
class PropertyReader;
}
-namespace QmlDesigner {
+namespace QmlEditorWidgets {
-class BauhausColorDialog;
+class CustomColorDialog;
class ContextPaneTextWidget;
class EasingContextPane;
class ContextPaneWidgetRectangle;
class ContextPaneWidgetImage;
-class DragWidget : public QFrame
+class QMLEDITORWIDGETS_EXPORT DragWidget : public QFrame
{
Q_OBJECT
@@ -42,17 +72,18 @@ private:
QWeakPointer<QWidget> m_secondaryTarget;
};
-class ContextPaneWidget : public DragWidget
+class QMLEDITORWIDGETS_EXPORT ContextPaneWidget : public DragWidget
{
Q_OBJECT
public:
explicit ContextPaneWidget(QWidget *parent = 0);
~ContextPaneWidget();
- void activate(const QPoint &pos, const QPoint &alternative, const QPoint &alternative2);
- void rePosition(const QPoint &pos, const QPoint &alternative , const QPoint &alternative3);
+ void activate(const QPoint &pos, const QPoint &alternative, const QPoint &alternative2, bool pinned);
+ void rePosition(const QPoint &pos, const QPoint &alternative , const QPoint &alternative3, bool pinned);
void deactivate();
- BauhausColorDialog *colorDialog();
+ void setOptions(bool enabled, bool pinned);
+ CustomColorDialog *colorDialog();
void setProperties(QmlJS::PropertyReader *propertyReader);
void setPath(const QString &path);
bool setType(const QStringList &types);
@@ -67,6 +98,8 @@ signals:
void propertyChanged(const QString &, const QVariant &);
void removeProperty(const QString &);
void removeAndChangeProperty(const QString &, const QString &, const QVariant &, bool);
+ void pinnedChanged(bool);
+ void enabledChanged(bool);
private slots:
void onDisable(bool);
@@ -93,7 +126,7 @@ private:
ContextPaneWidgetImage *m_imageWidget;
ContextPaneWidgetImage *m_borderImageWidget;
ContextPaneWidgetRectangle *m_rectangleWidget;
- QWeakPointer<BauhausColorDialog> m_bauhausColorDialog;
+ QWeakPointer<CustomColorDialog> m_bauhausColorDialog;
QWeakPointer<QAction> m_resetAction;
QWeakPointer<QAction> m_disableAction;
QString m_colorName;
diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetborderimage.ui b/src/libs/qmleditorwidgets/contextpanewidgetborderimage.ui
index 756a3dcc2e..801e1143f7 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetborderimage.ui
+++ b/src/libs/qmleditorwidgets/contextpanewidgetborderimage.ui
@@ -113,7 +113,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="FileWidget" name="fileWidget">
+ <widget class="QmlEditorWidgets::FileWidget" name="fileWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -298,7 +298,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>FileWidget</class>
+ <class>QmlEditorWidgets::FileWidget</class>
<extends>QComboBox</extends>
<header location="global">filewidget.h</header>
</customwidget>
diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetimage.cpp b/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp
index 8cb795e0fb..d5469a8b31 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetimage.cpp
+++ b/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
#include "contextpanewidgetimage.h"
#include "ui_contextpanewidgetimage.h"
#include "ui_contextpanewidgetborderimage.h"
@@ -11,7 +40,7 @@
#include <QSlider>
#include <QDebug>
-namespace QmlDesigner {
+namespace QmlEditorWidgets {
bool LabelFilter::eventFilter(QObject *obj, QEvent *event)
{
diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetimage.h b/src/libs/qmleditorwidgets/contextpanewidgetimage.h
index 90767ffae8..13783ac933 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetimage.h
+++ b/src/libs/qmleditorwidgets/contextpanewidgetimage.h
@@ -1,6 +1,36 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
#ifndef CONTEXTPANEWIDGETIMAGE_H
#define CONTEXTPANEWIDGETIMAGE_H
+#include <qmleditorwidgets_global.h>
#include <QWidget>
#include <QFrame>
#include <QLabel>
@@ -14,14 +44,15 @@ namespace Ui {
}
class QLabel;
class QSlider;
-class FileWidget;
QT_END_NAMESPACE
namespace QmlJS {
class PropertyReader;
}
-namespace QmlDesigner {
+namespace QmlEditorWidgets {
+
+class FileWidget;
class PreviewLabel : public QLabel
{
@@ -90,7 +121,7 @@ private:
bool m_borderImage;
};
-class ContextPaneWidgetImage : public QWidget
+class QMLEDITORWIDGETS_EXPORT ContextPaneWidgetImage : public QWidget
{
Q_OBJECT
diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetimage.ui b/src/libs/qmleditorwidgets/contextpanewidgetimage.ui
index 9df6ad5c55..d58780d80a 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetimage.ui
+++ b/src/libs/qmleditorwidgets/contextpanewidgetimage.ui
@@ -33,7 +33,7 @@
<number>0</number>
</property>
<item row="0" column="1" colspan="3">
- <widget class="FileWidget" name="fileWidget">
+ <widget class="QmlEditorWidgets::FileWidget" name="fileWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -283,7 +283,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>FileWidget</class>
+ <class>QmlEditorWidgets::FileWidget</class>
<extends>QComboBox</extends>
<header location="global">filewidget.h</header>
</customwidget>
diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetrectangle.cpp b/src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp
index 6bf6d8a013..193d86903d 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetrectangle.cpp
+++ b/src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp
@@ -1,10 +1,40 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
#include "contextpanewidgetrectangle.h"
#include "ui_contextpanewidgetrectangle.h"
#include "contextpanewidget.h"
#include <qmljs/qmljspropertyreader.h>
+#include <customcolordialog.h>
#include <QDebug>
-namespace QmlDesigner {
+namespace QmlEditorWidgets {
ContextPaneWidgetRectangle::ContextPaneWidgetRectangle(QWidget *parent) :
QWidget(parent),
diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetrectangle.h b/src/libs/qmleditorwidgets/contextpanewidgetrectangle.h
index c61de00570..372ff7a07c 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetrectangle.h
+++ b/src/libs/qmleditorwidgets/contextpanewidgetrectangle.h
@@ -1,6 +1,36 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
#ifndef CONTEXTPANEWIDGETRECTANGLE_H
#define CONTEXTPANEWIDGETRECTANGLE_H
+#include <qmleditorwidgets_global.h>
#include <QWidget>
QT_BEGIN_NAMESPACE
@@ -13,9 +43,9 @@ namespace QmlJS {
class PropertyReader;
}
-namespace QmlDesigner {
+namespace QmlEditorWidgets {
-class ContextPaneWidgetRectangle : public QWidget
+class QMLEDITORWIDGETS_EXPORT ContextPaneWidgetRectangle : public QWidget
{
Q_OBJECT
diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetrectangle.ui b/src/libs/qmleditorwidgets/contextpanewidgetrectangle.ui
index 882a4ddc6b..2b32e1588d 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetrectangle.ui
+++ b/src/libs/qmleditorwidgets/contextpanewidgetrectangle.ui
@@ -49,7 +49,7 @@
</widget>
</item>
<item row="0" column="1" colspan="5">
- <widget class="QmlDesigner::GradientLine" name="gradientLine" native="true">
+ <widget class="QmlEditorWidgets::GradientLine" name="gradientLine" native="true">
<property name="minimumSize">
<size>
<width>160</width>
@@ -81,7 +81,7 @@
</widget>
</item>
<item row="1" column="2">
- <widget class="QmlDesigner::ColorButton" name="colorColorButton">
+ <widget class="QmlEditorWidgets::ColorButton" name="colorColorButton">
<property name="minimumSize">
<size>
<width>22</width>
@@ -213,7 +213,7 @@
</widget>
</item>
<item row="2" column="2">
- <widget class="QmlDesigner::ColorButton" name="borderColorButton">
+ <widget class="QmlEditorWidgets::ColorButton" name="borderColorButton">
<property name="minimumSize">
<size>
<width>22</width>
@@ -296,14 +296,14 @@
</widget>
<customwidgets>
<customwidget>
- <class>QmlDesigner::ColorButton</class>
+ <class>QmlEditorWidgets::ColorButton</class>
<extends>QToolButton</extends>
- <header location="global">colorwidget.h</header>
+ <header location="global">colorbutton.h</header>
</customwidget>
<customwidget>
- <class>QmlDesigner::GradientLine</class>
+ <class>QmlEditorWidgets::GradientLine</class>
<extends>QWidget</extends>
- <header location="global">colorwidget.h</header>
+ <header location="global">gradientline.h</header>
<container>1</container>
</customwidget>
</customwidgets>
diff --git a/src/libs/qmleditorwidgets/customcolordialog.cpp b/src/libs/qmleditorwidgets/customcolordialog.cpp
new file mode 100644
index 0000000000..a698f540ef
--- /dev/null
+++ b/src/libs/qmleditorwidgets/customcolordialog.cpp
@@ -0,0 +1,180 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#include "customcolordialog.h"
+
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QPainter>
+#include <QDoubleSpinBox>
+#include <QGridLayout>
+#include <QPushButton>
+#include <QDialogButtonBox>
+#include <QGraphicsEffect>
+#include "huecontrol.h"
+#include "colorbox.h"
+
+namespace QmlEditorWidgets {
+
+CustomColorDialog::CustomColorDialog(QWidget *parent) : QFrame(parent )
+{
+
+ setFrameStyle(QFrame::NoFrame);
+ setFrameShape(QFrame::StyledPanel);
+ setFrameShadow(QFrame::Sunken);
+
+ QGraphicsDropShadowEffect *dropShadowEffect = new QGraphicsDropShadowEffect;
+ dropShadowEffect->setBlurRadius(6);
+ dropShadowEffect->setOffset(2, 2);
+ setGraphicsEffect(dropShadowEffect);
+ setAutoFillBackground(true);
+
+ m_hueControl = new HueControl(this);
+ m_colorBox = new ColorBox(this);
+
+ QWidget *colorFrameWidget = new QWidget(this);
+ QVBoxLayout* vBox = new QVBoxLayout(colorFrameWidget);
+ colorFrameWidget->setLayout(vBox);
+ vBox->setSpacing(0);
+ vBox->setMargin(0);
+ vBox->setContentsMargins(0,5,0,28);
+
+ m_beforeColorWidget = new QFrame(colorFrameWidget);
+ m_beforeColorWidget->setFixedSize(30, 18);
+ m_beforeColorWidget->setAutoFillBackground(true);
+
+ m_currentColorWidget = new QFrame(colorFrameWidget);
+ m_currentColorWidget->setFixedSize(30, 18);
+ m_currentColorWidget->setAutoFillBackground(true);
+
+ vBox->addWidget(m_beforeColorWidget);
+ vBox->addWidget(m_currentColorWidget);
+
+
+ m_rSpinBox = new QDoubleSpinBox(this);
+ m_gSpinBox = new QDoubleSpinBox(this);
+ m_bSpinBox = new QDoubleSpinBox(this);
+ m_alphaSpinBox = new QDoubleSpinBox(this);
+
+ QGridLayout *gridLayout = new QGridLayout(this);
+ gridLayout->setSpacing(4);
+ gridLayout->setVerticalSpacing(4);
+ gridLayout->setMargin(4);
+ setLayout(gridLayout);
+
+ gridLayout->addWidget(m_colorBox, 0, 0, 4, 1);
+ gridLayout->addWidget(m_hueControl, 0, 1, 4, 1);
+
+ gridLayout->addWidget(colorFrameWidget, 0, 2, 2, 1);
+
+ gridLayout->addWidget(new QLabel("R", this), 0, 3, 1, 1);
+ gridLayout->addWidget(new QLabel("G", this), 1, 3, 1, 1);
+ gridLayout->addWidget(new QLabel("B", this), 2, 3, 1, 1);
+ gridLayout->addWidget(new QLabel("A", this), 3, 3, 1, 1);
+
+ gridLayout->addWidget(m_rSpinBox, 0, 4, 1, 1);
+ gridLayout->addWidget(m_gSpinBox, 1, 4, 1, 1);
+ gridLayout->addWidget(m_bSpinBox, 2, 4, 1, 1);
+ gridLayout->addWidget(m_alphaSpinBox, 3, 4, 1, 1);
+
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(this);
+
+ QPushButton *cancelButton = buttonBox->addButton(QDialogButtonBox::Cancel);
+ QPushButton *applyButton = buttonBox->addButton(QDialogButtonBox::Apply);
+
+ gridLayout->addWidget(buttonBox, 4, 0, 1, 2);
+
+ resize(sizeHint());
+
+ connect(m_colorBox, SIGNAL(colorChanged()), this, SLOT(onColorBoxChanged()));
+ connect(m_alphaSpinBox, SIGNAL(valueChanged(double)), this, SLOT(spinBoxChanged()));
+ connect(m_rSpinBox, SIGNAL(valueChanged(double)), this, SLOT(spinBoxChanged()));
+ connect(m_gSpinBox, SIGNAL(valueChanged(double)), this, SLOT(spinBoxChanged()));
+ connect(m_bSpinBox, SIGNAL(valueChanged(double)), this, SLOT(spinBoxChanged()));
+ connect(m_hueControl, SIGNAL(hueChanged(int)), this, SLOT(onHueChanged(int)));
+
+ connect(applyButton, SIGNAL(pressed()), this, SLOT(onAccept()));
+ connect(cancelButton, SIGNAL(pressed()), this, SIGNAL(rejected()));
+
+ m_alphaSpinBox->setMaximum(1);
+ m_rSpinBox->setMaximum(1);
+ m_gSpinBox->setMaximum(1);
+ m_bSpinBox->setMaximum(1);
+ m_alphaSpinBox->setSingleStep(0.1);
+ m_rSpinBox->setSingleStep(0.1);
+ m_gSpinBox->setSingleStep(0.1);
+ m_bSpinBox->setSingleStep(0.1);
+
+ m_blockUpdate = false;
+}
+
+void CustomColorDialog::setupColor(const QColor &color)
+{
+ QPalette pal = m_beforeColorWidget->palette();
+ pal.setColor(QPalette::Background, color);
+ m_beforeColorWidget->setPalette(pal);
+ setColor(color);
+}
+
+void CustomColorDialog::spinBoxChanged()
+{
+ if (m_blockUpdate)
+ return;
+ QColor newColor;
+ newColor.setAlphaF(m_alphaSpinBox->value());
+ newColor.setRedF(m_rSpinBox->value());
+ newColor.setGreenF(m_gSpinBox->value());
+ newColor.setBlueF(m_bSpinBox->value());
+ setColor(newColor);
+}
+
+void CustomColorDialog::onColorBoxChanged()
+{
+ if (m_blockUpdate)
+ return;
+
+ setColor(m_colorBox->color());
+}
+
+void CustomColorDialog::setupWidgets()
+{
+ m_blockUpdate = true;
+ m_hueControl->setHue(m_color.hsvHue());
+ m_alphaSpinBox->setValue(m_color.alphaF());
+ m_rSpinBox->setValue(m_color.redF());
+ m_gSpinBox->setValue(m_color.greenF());
+ m_bSpinBox->setValue(m_color.blueF());
+ m_colorBox->setColor(m_color);
+ QPalette pal = m_currentColorWidget->palette();
+ pal.setColor(QPalette::Background, m_color);
+ m_currentColorWidget->setPalette(pal);
+ m_blockUpdate = false;
+}
+
+} //QmlEditorWidgets
diff --git a/src/libs/qmleditorwidgets/customcolordialog.h b/src/libs/qmleditorwidgets/customcolordialog.h
new file mode 100644
index 0000000000..a017280d8d
--- /dev/null
+++ b/src/libs/qmleditorwidgets/customcolordialog.h
@@ -0,0 +1,110 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#ifndef CUSTOMCOLORDIALOG_H
+#define CUSTOMCOLORDIALOG_H
+
+#include <qmleditorwidgets_global.h>
+#include <QFrame>
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QDoubleSpinBox;
+QT_END_NAMESPACE
+
+namespace QmlEditorWidgets {
+
+class ColorBox;
+class HueControl;
+
+class QMLEDITORWIDGETS_EXPORT CustomColorDialog : public QFrame {
+
+ Q_OBJECT
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
+
+public:
+ CustomColorDialog(QWidget *parent = 0);
+ QColor color() const { return m_color; }
+ void setupColor(const QColor &color);
+ void setColor(const QColor &color)
+ {
+ if (color == m_color)
+ return;
+
+ m_color = color;
+ setupWidgets();
+ emit colorChanged();
+ }
+
+public slots:
+ void changeColor(const QColor &color) { setColor(color); }
+ void spinBoxChanged();
+ void onColorBoxChanged();
+ void onHueChanged(int newHue)
+ {
+ if (m_blockUpdate)
+ return;
+
+ if (m_color.hsvHue() == newHue)
+ return;
+ m_color.setHsv(newHue, m_color.hsvSaturation(), m_color.value());
+ setupWidgets();
+ emit colorChanged();
+ }
+ void onAccept()
+ {
+ emit accepted(m_color);
+ }
+
+signals:
+ void colorChanged();
+ void accepted(const QColor &color);
+ void rejected();
+
+protected:
+ void setupWidgets();
+
+private:
+ QFrame *m_beforeColorWidget;
+ QFrame *m_currentColorWidget;
+ ColorBox *m_colorBox;
+ HueControl *m_hueControl;
+
+ QDoubleSpinBox *m_rSpinBox;
+ QDoubleSpinBox *m_gSpinBox;
+ QDoubleSpinBox *m_bSpinBox;
+ QDoubleSpinBox *m_alphaSpinBox;
+
+ QColor m_color;
+ bool m_blockUpdate;
+};
+
+} //QmlEditorWidgets
+
+#endif //CUSTOMCOLORDIALOG_H
diff --git a/src/plugins/qmldesigner/components/easingpane/easingcontextpane.cpp b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp
index 0971f49985..982c7c34f7 100644
--- a/src/plugins/qmldesigner/components/easingpane/easingcontextpane.cpp
+++ b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
#include "easingcontextpane.h"
#include "ui_easingcontextpane.h"
#include <qmljs/qmljspropertyreader.h>
@@ -7,7 +36,7 @@
#include <QPropertyAnimation>
#include <QSequentialAnimationGroup>
-namespace QmlDesigner {
+namespace QmlEditorWidgets {
class PixmapItem : public QObject, public QGraphicsPixmapItem
{
@@ -269,13 +298,13 @@ void EasingContextPane::setBounce()
} //QmlDesigner
-void QmlDesigner::EasingContextPane::on_durationSpinBox_valueChanged(int newValue)
+void QmlEditorWidgets::EasingContextPane::on_durationSpinBox_valueChanged(int newValue)
{
m_simulation->updateCurve(m_easingGraph->easingCurve(),ui->durationSpinBox->value());
emit propertyChanged(QLatin1String("duration"), newValue);
}
-void QmlDesigner::EasingContextPane::on_easingShapeComboBox_currentIndexChanged(QString newShape)
+void QmlEditorWidgets::EasingContextPane::on_easingShapeComboBox_currentIndexChanged(QString newShape)
{
if (newShape=="Linear")
setLinear();
@@ -299,7 +328,7 @@ void QmlDesigner::EasingContextPane::on_easingShapeComboBox_currentIndexChanged(
}
}
-void QmlDesigner::EasingContextPane::on_easingExtremesComboBox_currentIndexChanged(QString newExtremes)
+void QmlEditorWidgets::EasingContextPane::on_easingExtremesComboBox_currentIndexChanged(QString newExtremes)
{
if (m_easingGraph->easingExtremes() != newExtremes) {
m_easingGraph->setEasingExtremes(newExtremes);
@@ -311,7 +340,7 @@ void QmlDesigner::EasingContextPane::on_easingExtremesComboBox_currentIndexChang
}
}
-void QmlDesigner::EasingContextPane::on_amplitudeSpinBox_valueChanged(double newAmplitude)
+void QmlEditorWidgets::EasingContextPane::on_amplitudeSpinBox_valueChanged(double newAmplitude)
{
if ((newAmplitude != m_easingGraph->amplitude()) &&
(m_easingGraph->easingShape()=="Bounce" || m_easingGraph->easingShape()=="Elastic")) {
@@ -321,7 +350,7 @@ void QmlDesigner::EasingContextPane::on_amplitudeSpinBox_valueChanged(double new
}
}
-void QmlDesigner::EasingContextPane::on_periodSpinBox_valueChanged(double newPeriod)
+void QmlEditorWidgets::EasingContextPane::on_periodSpinBox_valueChanged(double newPeriod)
{
if ((newPeriod != m_easingGraph->period()) && (m_easingGraph->easingShape()=="Elastic")) {
m_easingGraph->setPeriod(newPeriod);
@@ -331,7 +360,7 @@ void QmlDesigner::EasingContextPane::on_periodSpinBox_valueChanged(double newPer
}
-void QmlDesigner::EasingContextPane::on_overshootSpinBox_valueChanged(double newOvershoot)
+void QmlEditorWidgets::EasingContextPane::on_overshootSpinBox_valueChanged(double newOvershoot)
{
if ((newOvershoot != m_easingGraph->overshoot()) && (m_easingGraph->easingShape()=="Back")) {
m_easingGraph->setOvershoot(newOvershoot);
@@ -340,7 +369,7 @@ void QmlDesigner::EasingContextPane::on_overshootSpinBox_valueChanged(double new
}
}
-void QmlDesigner::EasingContextPane::on_playButton_clicked()
+void QmlEditorWidgets::EasingContextPane::on_playButton_clicked()
{
setGraphDisplayMode(SimulationMode);
startAnimation();
diff --git a/src/plugins/qmldesigner/components/easingpane/easingcontextpane.h b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.h
index f0a1743947..e17b0fdf2b 100644
--- a/src/plugins/qmldesigner/components/easingpane/easingcontextpane.h
+++ b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.h
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
#ifndef EASINGCONTEXTPANE_H
#define EASINGCONTEXTPANE_H
@@ -17,7 +46,7 @@ namespace QmlJS {
class PropertyReader;
}
-namespace QmlDesigner {
+namespace QmlEditorWidgets {
class EasingSimulation;
class EasingContextPane : public QWidget
diff --git a/src/plugins/qmldesigner/components/easingpane/easingcontextpane.ui b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.ui
index 96e3668cb4..96e3668cb4 100644
--- a/src/plugins/qmldesigner/components/easingpane/easingcontextpane.ui
+++ b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.ui
diff --git a/src/plugins/qmldesigner/components/easingpane/easinggraph.cpp b/src/libs/qmleditorwidgets/easingpane/easinggraph.cpp
index 25f5399953..e47c40050b 100644
--- a/src/plugins/qmldesigner/components/easingpane/easinggraph.cpp
+++ b/src/libs/qmleditorwidgets/easingpane/easinggraph.cpp
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
#include "easinggraph.h"
#include <QPainter>
diff --git a/src/plugins/qmldesigner/components/easingpane/easinggraph.h b/src/libs/qmleditorwidgets/easingpane/easinggraph.h
index 22387ffb63..036e0ac451 100644
--- a/src/plugins/qmldesigner/components/easingpane/easinggraph.h
+++ b/src/libs/qmleditorwidgets/easingpane/easinggraph.h
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
#ifndef EASINGGRAPH_H
#define EASINGGRAPH_H
diff --git a/src/libs/qmleditorwidgets/easingpane/easingpane.pri b/src/libs/qmleditorwidgets/easingpane/easingpane.pri
new file mode 100644
index 0000000000..22dfd0f76d
--- /dev/null
+++ b/src/libs/qmleditorwidgets/easingpane/easingpane.pri
@@ -0,0 +1,11 @@
+VPATH += $$PWD
+INCLUDEPATH += $$PWD
+SOURCES += $$PWD/easinggraph.cpp \
+ $$PWD/easingcontextpane.cpp
+
+HEADERS += $$PWD/easinggraph.h \
+ $$PWD/easingcontextpane.h
+
+QT += declarative
+RESOURCES += $$PWD/easingpane.qrc
+FORMS += $$PWD/easingcontextpane.ui
diff --git a/src/plugins/qmldesigner/components/easingpane/easingpane.qrc b/src/libs/qmleditorwidgets/easingpane/easingpane.qrc
index f6e6953680..f6e6953680 100644
--- a/src/plugins/qmldesigner/components/easingpane/easingpane.qrc
+++ b/src/libs/qmleditorwidgets/easingpane/easingpane.qrc
diff --git a/src/plugins/qmldesigner/components/easingpane/playicon.png b/src/libs/qmleditorwidgets/easingpane/playicon.png
index 27fe823961..27fe823961 100644
--- a/src/plugins/qmldesigner/components/easingpane/playicon.png
+++ b/src/libs/qmleditorwidgets/easingpane/playicon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/easingpane/qt_logo.png b/src/libs/qmleditorwidgets/easingpane/qt_logo.png
index 3cbfca726b..3cbfca726b 100644
--- a/src/plugins/qmldesigner/components/easingpane/qt_logo.png
+++ b/src/libs/qmleditorwidgets/easingpane/qt_logo.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/easingpane/stopicon.png b/src/libs/qmleditorwidgets/easingpane/stopicon.png
index 6e5e6eead9..6e5e6eead9 100644
--- a/src/plugins/qmldesigner/components/easingpane/stopicon.png
+++ b/src/libs/qmleditorwidgets/easingpane/stopicon.png
Binary files differ
diff --git a/src/libs/qmleditorwidgets/filewidget.cpp b/src/libs/qmleditorwidgets/filewidget.cpp
new file mode 100644
index 0000000000..47a0020a87
--- /dev/null
+++ b/src/libs/qmleditorwidgets/filewidget.cpp
@@ -0,0 +1,142 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#include "filewidget.h"
+#include <QHBoxLayout>
+#include <QFont>
+#include <QFileDialog>
+#include <QDirIterator>
+#include <QDebug>
+
+
+namespace QmlEditorWidgets {
+
+FileWidget::FileWidget(QWidget *parent) : QWidget(parent), m_filter("(*.*)"), m_showComboBox(false), m_lock(false)
+{
+ m_pushButton = new QToolButton(this);
+ m_pushButton->setFixedWidth(32);
+ m_lineEdit = new QLineEdit(this);
+ m_comboBox = new QComboBox(this);
+ m_comboBox->hide();
+ QHBoxLayout *layout = new QHBoxLayout(this);
+ setLayout(layout);
+ layout->setContentsMargins(0, 0, 0, 0);
+ layout->addWidget(m_lineEdit);
+ layout->addWidget(m_comboBox);
+ m_comboBox->setEditable(true);
+ layout->addWidget(m_pushButton);
+ m_pushButton->setText("...");
+ connect(m_lineEdit, SIGNAL(editingFinished()), this, SLOT(lineEditChanged()));
+ connect(m_pushButton, SIGNAL(pressed()), this, SLOT(buttonPressed()));
+ connect(m_comboBox, SIGNAL(editTextChanged(const QString &)), this, SLOT(comboBoxChanged()));
+ m_currentPath = QDir::currentPath();
+}
+
+FileWidget::~FileWidget()
+{
+}
+
+void FileWidget::setShowComboBox(bool show)
+{
+ m_showComboBox = show;
+ m_comboBox->setVisible(show);
+ m_lineEdit->setVisible(!show);
+}
+
+void FileWidget::lineEditChanged()
+{
+ if (m_lock)
+ return;
+ setFileNameStr(m_lineEdit->text());
+}
+
+void FileWidget::comboBoxChanged()
+{
+ if (m_lock)
+ return;
+ setFileNameStr(m_comboBox->currentText());
+}
+
+void FileWidget::buttonPressed()
+{
+ QString path = m_currentPath;
+ QString newFile = QFileDialog::getOpenFileName(0, tr("Open File"), path, m_filter);
+ if (!newFile.isEmpty())
+ setFileNameStr(newFile);
+
+ m_currentPath = QFileInfo(newFile).absolutePath();
+}
+
+void FileWidget::setFileNameStr(const QString &fileName)
+{
+ setFileName(QUrl(fileName));
+}
+void FileWidget::setFileName(const QUrl &fileName)
+{
+ if (fileName == m_fileName)
+ return;
+
+ m_fileName = fileName;
+ if (m_lineEdit->text() != fileName.toString()) {
+ m_lineEdit->setText(fileName.toString());
+ m_lineEdit->setToolTip(m_fileName.toString());
+ }
+ if (m_comboBox->currentText() != fileName.toString()) {
+ m_comboBox->setEditText(m_fileName.toString());
+ m_comboBox->setToolTip(m_fileName.toString());
+ }
+ emit fileNameChanged(fileName);
+}
+
+void FileWidget::setupComboBox()
+{
+ m_lock = true;
+ m_comboBox->clear();
+
+ QDir dir;
+
+
+ if (m_path.isValid())
+ dir = QDir(m_path.toLocalFile());
+
+ QStringList filterList = m_filter.split(' ');
+
+ QDirIterator it(dir.absolutePath(), filterList, QDir::Files, QDirIterator::Subdirectories);
+ while (it.hasNext()) {
+ QString absolutePath = it.next();
+ m_comboBox->addItem(dir.relativeFilePath(absolutePath));
+ }
+ m_comboBox->setEditText(m_fileName.toString());
+
+ m_lock = false;
+}
+
+} //QmlEditorWidgets
+
+
diff --git a/src/libs/qmleditorwidgets/filewidget.h b/src/libs/qmleditorwidgets/filewidget.h
new file mode 100644
index 0000000000..a1c1e37bec
--- /dev/null
+++ b/src/libs/qmleditorwidgets/filewidget.h
@@ -0,0 +1,123 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+
+#ifndef FILEWIDGET_H
+#define FILEWIDGET_H
+
+#include <qmleditorwidgets_global.h>
+#include <QtGui/QWidget>
+#include <QLabel>
+#include <QToolButton>
+#include <QLineEdit>
+#include <QComboBox>
+#include <QUrl>
+
+namespace QmlEditorWidgets {
+
+class QMLEDITORWIDGETS_EXPORT FileWidget : public QWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString text READ text WRITE setText)
+ Q_PROPERTY(QString fileName READ fileName WRITE setFileNameStr NOTIFY fileNameChanged)
+ Q_PROPERTY(QString filter READ filter WRITE setFilter)
+ Q_PROPERTY(bool showComboBox READ showComboBox WRITE setShowComboBox)
+ Q_PROPERTY(QUrl path READ path WRITE setPath)
+
+public:
+
+ FileWidget(QWidget *parent = 0);
+ ~FileWidget();
+
+ QString fileName() const
+ { return m_fileName.toString(); }
+
+ void setText(const QString &/*text*/)
+ {
+
+ }
+
+ void setPath(const QUrl &url) { m_path = url; setupComboBox(); }
+
+ QUrl path() const { return m_path; }
+
+ QString text() const
+ {
+ return QString();
+ }
+
+ void setFilter(const QString &filter)
+ {
+ m_filter = filter;
+ }
+
+ QString filter() const
+ {
+ return m_filter;
+ }
+
+ void setShowComboBox(bool show);
+
+ bool showComboBox() const
+ { return m_showComboBox; }
+
+public slots:
+ void setFileName(const QUrl &fileName);
+ void setFileNameStr(const QString &fileName);
+ void buttonPressed();
+ void lineEditChanged();
+ void comboBoxChanged();
+
+signals:
+ void fileNameChanged(const QUrl &fileName);
+ void itemNodeChanged();
+
+protected:
+
+private:
+
+ void setupComboBox();
+
+ QToolButton *m_pushButton;
+ QLineEdit *m_lineEdit;
+ QComboBox *m_comboBox;
+ QUrl m_fileName;
+ QUrl m_path;
+ QString m_filter;
+ bool m_showComboBox;
+ bool m_lock;
+ QString m_currentPath;
+
+};
+
+} //QmlEditorWidgets
+
+#endif
+
diff --git a/src/plugins/qmldesigner/components/propertyeditor/fontsizespinbox.cpp b/src/libs/qmleditorwidgets/fontsizespinbox.cpp
index 2116062ce2..1136b418d9 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/fontsizespinbox.cpp
+++ b/src/libs/qmleditorwidgets/fontsizespinbox.cpp
@@ -1,9 +1,38 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
#include "fontsizespinbox.h"
#include <QLineEdit>
#include <QRegExpValidator>
-namespace QmlDesigner {
+namespace QmlEditorWidgets {
FontSizeSpinBox::FontSizeSpinBox(QWidget *parent) :
QAbstractSpinBox(parent), m_isPointSize(true), m_value(0)
diff --git a/src/plugins/qmldesigner/components/propertyeditor/fontsizespinbox.h b/src/libs/qmleditorwidgets/fontsizespinbox.h
index 38003e53d5..fb7da9223e 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/fontsizespinbox.h
+++ b/src/libs/qmleditorwidgets/fontsizespinbox.h
@@ -1,11 +1,41 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
#ifndef FONTSIZESPINBOX_H
#define FONTSIZESPINBOX_H
+#include <qmleditorwidgets_global.h>
#include <QAbstractSpinBox>
-namespace QmlDesigner {
+namespace QmlEditorWidgets {
-class FontSizeSpinBox : public QAbstractSpinBox
+class QMLEDITORWIDGETS_EXPORT FontSizeSpinBox : public QAbstractSpinBox
{
Q_OBJECT
diff --git a/src/libs/qmleditorwidgets/gradientline.cpp b/src/libs/qmleditorwidgets/gradientline.cpp
new file mode 100644
index 0000000000..3ea370d466
--- /dev/null
+++ b/src/libs/qmleditorwidgets/gradientline.cpp
@@ -0,0 +1,354 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#include "gradientline.h"
+#include <QPainter>
+#include <QMouseEvent>
+
+static inline QPixmap tilePixMap(int size)
+{
+ const int checkerbordSize= size;
+ QPixmap tilePixmap(checkerbordSize * 2, checkerbordSize * 2);
+ tilePixmap.fill(Qt::white);
+ QPainter tilePainter(&tilePixmap);
+ QColor color(220, 220, 220);
+ tilePainter.fillRect(0, 0, checkerbordSize, checkerbordSize, color);
+ tilePainter.fillRect(checkerbordSize, checkerbordSize, checkerbordSize, checkerbordSize, color);
+ return tilePixmap;
+}
+
+namespace QmlEditorWidgets {
+
+void GradientLine::setGradient(const QLinearGradient &gradient)
+{
+ m_gradient = gradient;
+ m_useGradient = true;
+ setupGradient();
+ emit gradientChanged();
+
+}
+
+static inline QColor invertColor(const QColor color)
+{
+ QColor c = color.toHsv();
+ c.setHsv(c.hue(), c.saturation(), 255 - c.value());
+ return c;
+}
+
+GradientLine::GradientLine(QWidget *parent) :
+ QWidget(parent),
+ m_activeColor(Qt::black),
+ m_gradientName("gradient"),
+ m_colorIndex(0),
+ m_dragActive(false),
+ m_yOffset(0),
+ m_create(false),
+ m_active(false),
+ m_dragOff(false),
+ m_useGradient(true)
+{
+ setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
+ setFocusPolicy(Qt::StrongFocus);
+ setFixedHeight(50);
+ setMinimumWidth(160);
+ resize(160, 50);
+ m_colorList << m_activeColor << QColor(Qt::white);
+ m_stops << 0 << 1;
+ updateGradient();
+ setCurrentIndex(0);
+}
+
+void GradientLine::setGradientName(const QString &newName)
+{
+ if (newName == m_gradientName)
+ return;
+ m_gradientName = newName;
+ setup();
+ emit gradientNameChanged();
+}
+
+void GradientLine::setActiveColor(const QColor &newColor)
+{
+ if (newColor.name() == m_activeColor.name() && newColor.alpha() == m_activeColor.alpha())
+ return;
+
+ m_activeColor = newColor;
+ m_colorList.removeAt(currentColorIndex());
+ m_colorList.insert(currentColorIndex(), m_activeColor);
+ updateGradient();
+ update();
+}
+
+void GradientLine::setupGradient()
+{
+ if (m_useGradient) {
+ m_colorList.clear();
+ m_stops.clear();
+ foreach (const QGradientStop &stop, m_gradient.stops()) {
+ m_stops << stop.first;
+ m_colorList << stop.second;
+ }
+ }
+ updateGradient();
+}
+
+bool GradientLine::event(QEvent *event)
+{
+ if (event->type() == QEvent::ShortcutOverride)
+ if (static_cast<QKeyEvent*>(event)->matches(QKeySequence::Delete)) {
+ event->accept();
+ return true;
+ }
+
+ return QWidget::event(event);
+}
+
+void GradientLine::keyPressEvent(QKeyEvent * event)
+{
+ if (event->matches(QKeySequence::Delete)) {
+ if ((currentColorIndex()) != 0 && (currentColorIndex() < m_stops.size() - 1)) {
+ m_dragActive = false;
+ m_stops.removeAt(currentColorIndex());
+ m_colorList.removeAt(currentColorIndex());
+ updateGradient();
+ setCurrentIndex(0);
+ //delete item
+ }
+ } else {
+ QWidget::keyPressEvent(event);
+ }
+}
+
+void GradientLine::paintEvent(QPaintEvent *event)
+{
+ QWidget::paintEvent(event);
+
+ QPainter p(this);
+
+ if (!isEnabled()) {
+ p.setBrush(Qt::NoBrush);
+ p.setPen(QColor(0x444444));
+ p.drawRect(9, 31, width() - 14, height() - 32);
+
+ p.drawTiledPixmap(10, 32, width() - 16, height() - 34, tilePixMap(8));
+ } else {
+
+ QLinearGradient linearGradient(QPointF(0, 0), QPointF(width(), 0));
+
+ for (int i =0; i < m_stops.size(); i++)
+ linearGradient.setColorAt(m_stops.at(i), m_colorList.at(i));
+
+ p.setBrush(Qt::NoBrush);
+ p.setPen(QColor(0x444444));
+ p.drawRect(9, 31, width() - 14, height() - 32);
+
+
+ p.drawTiledPixmap(9, 31, width() - 16, height() - 34, tilePixMap(8));
+
+ p.setBrush(linearGradient);
+ p.setPen(QColor(0x222222));
+ p.drawRect(8, 30, width() - 14, height() - 32);
+ p.setPen(QColor(255, 255, 255, 40));
+ p.drawRect(9, 31, width() - 16, height() - 34);
+
+ p.setPen(Qt::black);
+
+ for (int i =0; i < m_colorList.size(); i++) {
+ int localYOffset = 0;
+ QColor arrowColor(Qt::black);
+ if (i == currentColorIndex()) {
+ localYOffset = m_yOffset;
+ arrowColor = QColor(0x909090);
+ }
+ p.setPen(arrowColor);
+ if (i == 0 || i == (m_colorList.size() - 1))
+ localYOffset = 0;
+
+ int pos = qreal((width() - 16)) * m_stops.at(i) + 9;
+ p.setBrush(arrowColor);
+ QVector<QPointF> points;
+ points.append(QPointF(pos + 0.5, 28.5 + localYOffset)); //triangle
+ points.append(QPointF(pos - 3.5, 22.5 + localYOffset));
+ points.append(QPointF(pos + 4.5, 22.5 + localYOffset));
+ p.setRenderHint(QPainter::Antialiasing, true);
+ p.drawPolygon(points);
+ p.setRenderHint(QPainter::Antialiasing, false);
+ p.setBrush(Qt::NoBrush);
+ p.setPen(QColor(0x424242));
+ p.drawRect(pos - 4, 9 + localYOffset, 10, 11);
+
+ p.drawTiledPixmap(pos - 4, 9 + localYOffset, 9, 10, tilePixMap(5));
+ p.setPen(QColor(0x424242));
+ p.setBrush(m_colorList.at(i));
+ p.drawRect(pos - 5, 8 + localYOffset, 10, 11);
+ p.setBrush(Qt::NoBrush);
+ p.setPen(QColor(255, 255, 255, 30));
+ p.drawRect(pos - 4, 9 + localYOffset, 8, 9);
+ }
+ }
+}
+
+void GradientLine::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton) {
+ event->accept();
+ int xPos = event->pos().x();
+ int yPos = event->pos().y();
+
+ int draggedIndex = -1;
+ m_create = false;
+ m_dragActive = false;
+ if ((yPos > 10) && (yPos < 30))
+ for (int i =0; i < m_stops.size(); i++) {
+ int pos = qreal((width() - 16)) * m_stops.at(i) + 9;
+ if (((xPos + 5) > pos) && ((xPos - 5) < pos)) {
+ draggedIndex = i;
+ m_dragActive = true;
+ m_dragStart = event->pos();
+ setCurrentIndex(draggedIndex);
+ update();
+ }
+ }
+ if (draggedIndex == -1)
+ m_create = true;
+ }
+ setFocus(Qt::MouseFocusReason);
+}
+
+void GradientLine::mouseDoubleClickEvent(QMouseEvent *event)
+{
+ event->accept();
+ m_dragActive = false;
+ m_create = false;
+ emit openColorDialog(event->pos());
+}
+
+void GradientLine::mouseReleaseEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton) {
+ event->accept();
+ if (m_dragActive == false && m_create) {
+ qreal stopPos = qreal(event->pos().x() - 9) / qreal((width() - 15));
+ int index = -1;
+ for (int i =0; i < m_stops.size() - 1; i++) {
+ if ((stopPos > m_stops.at(i)) && (index == -1))
+ index = i +1;
+ }
+ if (index != -1 && (m_useGradient)) { //creating of items only in base state
+ m_stops.insert(index, stopPos);
+ m_colorList.insert(index, QColor(Qt::white));
+ setCurrentIndex(index);
+ }
+ }
+ }
+ m_dragActive = false;
+ m_yOffset = 0;
+ updateGradient();
+ update();
+ setFocus(Qt::MouseFocusReason);
+}
+
+void GradientLine::mouseMoveEvent(QMouseEvent *event)
+{
+ if (m_dragActive) {
+ event->accept();
+ int xPos = event->pos().x();
+ int pos = qreal((width() - 20)) * m_stops.at(currentColorIndex()) + 8;
+ int offset = m_dragOff ? 2 : 20;
+ if (xPos < pos + offset && xPos > pos - offset) {
+ m_dragOff = false;
+ int xDistance = event->pos().x() - m_dragStart.x();
+ qreal distance = qreal(xDistance) / qreal((width() - 20));
+ qreal newStop = m_stops.at(currentColorIndex()) + distance;
+ if ((newStop >=0) && (newStop <= 1))
+ m_stops[currentColorIndex()] = newStop;
+ m_yOffset += event->pos().y() - m_dragStart.y();
+ if (m_yOffset > 0 || m_useGradient) { //deleting only in base state
+ m_yOffset = 0;
+ } else if ((m_yOffset < - 12) && (currentColorIndex()) != 0 && (currentColorIndex() < m_stops.size() - 1)) {
+ m_yOffset = 0;
+ m_dragActive = false;
+ m_stops.removeAt(currentColorIndex());
+ m_colorList.removeAt(currentColorIndex());
+ updateGradient();
+ setCurrentIndex(0);
+ //delete item
+ }
+ } else {
+ m_dragOff = true;
+ }
+ m_dragStart = event->pos();
+ update();
+ }
+}
+
+void GradientLine::setup()
+{
+
+}
+
+static inline QColor normalizeColor(const QColor &color)
+{
+ QColor newColor = QColor(color.name());
+ newColor.setAlpha(color.alpha());
+ return newColor;
+}
+
+static inline qreal roundReal(qreal real)
+{
+ int i = real * 100;
+ return qreal(i) / 100;
+}
+
+void GradientLine::updateGradient()
+{
+ if (m_useGradient) {
+ QGradientStops stops;
+ for (int i = 0;i < m_stops.size(); i++) {
+ stops.append(QPair<qreal, QColor>(m_stops.at(i), m_colorList.at(i)));
+ }
+ m_gradient.setStops(stops);
+ emit gradientChanged();
+ } else {
+ if (!active())
+ return;
+ }
+}
+
+void GradientLine::setCurrentIndex(int i)
+{
+ if (i == m_colorIndex)
+ return;
+ m_colorIndex = i;
+ m_activeColor = m_colorList.at(i);
+ emit activeColorChanged();
+ update();
+}
+
+} //QmlEditorWidgets
diff --git a/src/libs/qmleditorwidgets/gradientline.h b/src/libs/qmleditorwidgets/gradientline.h
new file mode 100644
index 0000000000..c082509653
--- /dev/null
+++ b/src/libs/qmleditorwidgets/gradientline.h
@@ -0,0 +1,101 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#ifndef GRADIENTLINE_H
+#define GRADIENTLINE_H
+
+#include <qmleditorwidgets_global.h>
+#include <QtGui/QWidget>
+#include <QToolButton>
+#include <QLinearGradient>
+
+namespace QmlEditorWidgets {
+
+class QMLEDITORWIDGETS_EXPORT GradientLine : public QWidget {
+ Q_OBJECT
+ Q_PROPERTY(QColor activeColor READ activeColor WRITE setActiveColor NOTIFY activeColorChanged)
+ Q_PROPERTY(QString gradientName READ gradientName WRITE setGradientName NOTIFY gradientNameChanged)
+ Q_PROPERTY(bool active READ active WRITE setActive)
+ Q_PROPERTY(QLinearGradient gradient READ gradient WRITE setGradient NOTIFY gradientChanged)
+
+public:
+ GradientLine(QWidget *parent = 0);
+
+ QString gradientName() const { return m_gradientName; }
+ void setGradientName(const QString &newName);
+ QColor activeColor() const { return m_activeColor; }
+ void setActiveColor(const QColor &newColor);
+ bool active() const { return m_active; }
+ void setActive(bool a) { m_active = a; }
+ QLinearGradient gradient() const { return m_gradient; }
+ void setGradient(const QLinearGradient &);
+
+public slots:
+ void setupGradient();
+
+signals:
+ void activeColorChanged();
+ void itemNodeChanged();
+ void gradientNameChanged();
+ void gradientChanged();
+ void openColorDialog(const QPoint &pos);
+protected:
+ bool event(QEvent *event);
+ void keyPressEvent(QKeyEvent * event);
+ void paintEvent(QPaintEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseDoubleClickEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *);
+ void mouseMoveEvent(QMouseEvent *);
+
+private:
+ void setup();
+ void updateGradient();
+ int currentColorIndex() const { return m_colorIndex; }
+ void setCurrentIndex(int i);
+
+ QColor m_activeColor;
+ QString m_gradientName;
+ QList<QColor> m_colorList;
+ QList<qreal> m_stops;
+ int m_colorIndex;
+ bool m_dragActive;
+ QPoint m_dragStart;
+ QLinearGradient m_gradient;
+ int m_yOffset;
+ bool m_create;
+ bool m_active;
+ bool m_dragOff;
+ bool m_useGradient;
+
+};
+
+} //QmlEditorWidgets
+
+#endif //GRADIENTLINE_H
diff --git a/src/libs/qmleditorwidgets/huecontrol.cpp b/src/libs/qmleditorwidgets/huecontrol.cpp
new file mode 100644
index 0000000000..ea38c6cc01
--- /dev/null
+++ b/src/libs/qmleditorwidgets/huecontrol.cpp
@@ -0,0 +1,127 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#include "huecontrol.h"
+#include <QPainter>
+#include <QMouseEvent>
+
+static inline int clamp(int x, int lower, int upper)
+{
+ if (x < lower)
+ x = lower;
+ if (x > upper)
+ x = upper;
+ return x;
+}
+
+namespace QmlEditorWidgets {
+
+void HueControl::setCurrent(int y)
+{
+ y = clamp(y, 0, 120);
+ int oldAlpha = m_color.alpha();
+ m_color.setHsv((y * 359)/120, m_color.hsvSaturation(), m_color.value());
+ m_color.setAlpha(oldAlpha);
+ update(); // redraw pointer
+ emit hueChanged(m_color.hsvHue());
+}
+
+void HueControl::setHue(int newHue)
+{
+ if (m_color.hsvHue() == newHue)
+ return;
+ m_color.setHsv(newHue, m_color.hsvSaturation(), m_color.value());
+ update();
+ emit hueChanged(m_color.hsvHue());
+}
+
+void HueControl::paintEvent(QPaintEvent *event)
+{
+ QWidget::paintEvent(event);
+
+ QPainter p(this);
+
+ int localHeight = 120;
+
+ if (m_cache.isNull()) {
+ m_cache = QPixmap(10, localHeight);
+
+ QPainter cacheP(&m_cache);
+
+ for (int i = 0; i < localHeight; i++)
+ {
+ QColor c;
+ c.setHsv( (i*359) / 120.0, 255,255);
+ cacheP.fillRect(0, i, 10, i + 1, c);
+ }
+ }
+
+ p.drawPixmap(0, 5, m_cache);
+
+ QVector<QPointF> points;
+
+ int y = m_color.hueF() * 120 + 5;
+
+ points.append(QPointF(5, y));
+ points.append(QPointF(15, y + 5));
+ points.append(QPointF(15, y - 5));
+
+
+ p.setRenderHint(QPainter::Antialiasing, true);
+ p.translate(0.5, 1.5);
+ p.setPen(QColor(0, 0, 0, 120));
+ p.drawPolygon(points);
+ p.translate(0, -1);
+ p.setPen(0x222222);
+ p.setBrush(QColor(0x707070));
+ p.drawPolygon(points);
+}
+
+void HueControl::mousePressEvent(QMouseEvent *e)
+{
+ // The current cell marker is set to the cell the mouse is pressed in
+ QPoint pos = e->pos();
+ m_mousePressed = true;
+ setCurrent(pos.y() - 5);
+}
+
+void HueControl::mouseReleaseEvent(QMouseEvent * /* event */)
+{
+ m_mousePressed = false;
+}
+
+void HueControl::mouseMoveEvent(QMouseEvent *e)
+{
+ if (!m_mousePressed)
+ return;
+ QPoint pos = e->pos();
+ setCurrent(pos.y() - 5);
+}
+
+} //QmlEditorWidgets
diff --git a/src/libs/qmleditorwidgets/huecontrol.h b/src/libs/qmleditorwidgets/huecontrol.h
new file mode 100644
index 0000000000..49af3d88f4
--- /dev/null
+++ b/src/libs/qmleditorwidgets/huecontrol.h
@@ -0,0 +1,75 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#ifndef HUECONTROL_H
+#define HUECONTROL_H
+
+#include <qmleditorwidgets_global.h>
+#include <QtGui/QWidget>
+#include <QToolButton>
+#include <qdeclarative.h>
+
+namespace QmlEditorWidgets {
+
+class QMLEDITORWIDGETS_EXPORT HueControl : public QWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(qreal hue READ hue WRITE setHue NOTIFY hueChanged)
+
+public:
+ HueControl(QWidget *parent = 0) : QWidget(parent), m_color(Qt::white), m_mousePressed(false)
+ {
+ setFixedWidth(28);
+ setFixedHeight(130);
+ }
+
+ void setHue(int newHue);
+ int hue() const { return m_color.hsvHue(); }
+
+signals:
+ void hueChanged(int hue);
+
+protected:
+ void paintEvent(QPaintEvent *);
+ void mousePressEvent(QMouseEvent *);
+ void mouseReleaseEvent(QMouseEvent *);
+ void mouseMoveEvent(QMouseEvent *);
+ void setCurrent(int y);
+
+private:
+ QColor m_color;
+ bool m_mousePressed;
+ QPixmap m_cache;
+};
+
+} //QmlEditorWidgets
+
+QML_DECLARE_TYPE(QmlEditorWidgets::HueControl);
+
+#endif //HUECONTROL_H
diff --git a/src/plugins/qmldesigner/components/resources/images/alignmentbottom-h-icon.png b/src/libs/qmleditorwidgets/images/alignmentbottom-h-icon.png
index f2b1ce3b3e..f2b1ce3b3e 100644
--- a/src/plugins/qmldesigner/components/resources/images/alignmentbottom-h-icon.png
+++ b/src/libs/qmleditorwidgets/images/alignmentbottom-h-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/alignmentbottom-icon.png b/src/libs/qmleditorwidgets/images/alignmentbottom-icon.png
index d4319c39a8..d4319c39a8 100644
--- a/src/plugins/qmldesigner/components/resources/images/alignmentbottom-icon.png
+++ b/src/libs/qmleditorwidgets/images/alignmentbottom-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/alignmentcenterh-h-icon.png b/src/libs/qmleditorwidgets/images/alignmentcenterh-h-icon.png
index 595e828748..595e828748 100644
--- a/src/plugins/qmldesigner/components/resources/images/alignmentcenterh-h-icon.png
+++ b/src/libs/qmleditorwidgets/images/alignmentcenterh-h-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/alignmentcenterh-icon.png b/src/libs/qmleditorwidgets/images/alignmentcenterh-icon.png
index fa80a4f8e3..fa80a4f8e3 100644
--- a/src/plugins/qmldesigner/components/resources/images/alignmentcenterh-icon.png
+++ b/src/libs/qmleditorwidgets/images/alignmentcenterh-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/alignmentleft-h-icon.png b/src/libs/qmleditorwidgets/images/alignmentleft-h-icon.png
index 48c05d2168..48c05d2168 100644
--- a/src/plugins/qmldesigner/components/resources/images/alignmentleft-h-icon.png
+++ b/src/libs/qmleditorwidgets/images/alignmentleft-h-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/alignmentleft-icon.png b/src/libs/qmleditorwidgets/images/alignmentleft-icon.png
index af91e4173e..af91e4173e 100644
--- a/src/plugins/qmldesigner/components/resources/images/alignmentleft-icon.png
+++ b/src/libs/qmleditorwidgets/images/alignmentleft-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/alignmentmiddle-h-icon.png b/src/libs/qmleditorwidgets/images/alignmentmiddle-h-icon.png
index 8c2356b123..8c2356b123 100644
--- a/src/plugins/qmldesigner/components/resources/images/alignmentmiddle-h-icon.png
+++ b/src/libs/qmleditorwidgets/images/alignmentmiddle-h-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/alignmentmiddle-icon.png b/src/libs/qmleditorwidgets/images/alignmentmiddle-icon.png
index c620e95bb2..c620e95bb2 100644
--- a/src/plugins/qmldesigner/components/resources/images/alignmentmiddle-icon.png
+++ b/src/libs/qmleditorwidgets/images/alignmentmiddle-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/alignmentright-h-icon.png b/src/libs/qmleditorwidgets/images/alignmentright-h-icon.png
index 80fd439128..80fd439128 100644
--- a/src/plugins/qmldesigner/components/resources/images/alignmentright-h-icon.png
+++ b/src/libs/qmleditorwidgets/images/alignmentright-h-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/alignmentright-icon.png b/src/libs/qmleditorwidgets/images/alignmentright-icon.png
index 068ab27fcf..068ab27fcf 100644
--- a/src/plugins/qmldesigner/components/resources/images/alignmentright-icon.png
+++ b/src/libs/qmleditorwidgets/images/alignmentright-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/alignmenttop-h-icon.png b/src/libs/qmleditorwidgets/images/alignmenttop-h-icon.png
index b600ff350d..b600ff350d 100644
--- a/src/plugins/qmldesigner/components/resources/images/alignmenttop-h-icon.png
+++ b/src/libs/qmleditorwidgets/images/alignmenttop-h-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/alignmenttop-icon.png b/src/libs/qmleditorwidgets/images/alignmenttop-icon.png
index d6a6865a7d..d6a6865a7d 100644
--- a/src/plugins/qmldesigner/components/resources/images/alignmenttop-icon.png
+++ b/src/libs/qmleditorwidgets/images/alignmenttop-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-bottom-normal.png b/src/libs/qmleditorwidgets/images/anchor-bottom-normal.png
index 4564f8027b..4564f8027b 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-bottom-normal.png
+++ b/src/libs/qmleditorwidgets/images/anchor-bottom-normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-bottom-pressed.png b/src/libs/qmleditorwidgets/images/anchor-bottom-pressed.png
index 93e72ac728..93e72ac728 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-bottom-pressed.png
+++ b/src/libs/qmleditorwidgets/images/anchor-bottom-pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-fill-normal.png b/src/libs/qmleditorwidgets/images/anchor-fill-normal.png
index 677fe77db7..677fe77db7 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-fill-normal.png
+++ b/src/libs/qmleditorwidgets/images/anchor-fill-normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-fill-pressed.png b/src/libs/qmleditorwidgets/images/anchor-fill-pressed.png
index 7fe7aedd2e..7fe7aedd2e 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-fill-pressed.png
+++ b/src/libs/qmleditorwidgets/images/anchor-fill-pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-horizontal-normal.png b/src/libs/qmleditorwidgets/images/anchor-horizontal-normal.png
index f5af7a2378..f5af7a2378 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-horizontal-normal.png
+++ b/src/libs/qmleditorwidgets/images/anchor-horizontal-normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-horizontal-pressed.png b/src/libs/qmleditorwidgets/images/anchor-horizontal-pressed.png
index 7ea90d8bb4..7ea90d8bb4 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-horizontal-pressed.png
+++ b/src/libs/qmleditorwidgets/images/anchor-horizontal-pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-left-normal.png b/src/libs/qmleditorwidgets/images/anchor-left-normal.png
index 9fbb7647cf..9fbb7647cf 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-left-normal.png
+++ b/src/libs/qmleditorwidgets/images/anchor-left-normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-left-pressed.png b/src/libs/qmleditorwidgets/images/anchor-left-pressed.png
index aaf79f3c39..aaf79f3c39 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-left-pressed.png
+++ b/src/libs/qmleditorwidgets/images/anchor-left-pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-right-normal.png b/src/libs/qmleditorwidgets/images/anchor-right-normal.png
index f65bbc4bc1..f65bbc4bc1 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-right-normal.png
+++ b/src/libs/qmleditorwidgets/images/anchor-right-normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-right-pressed.png b/src/libs/qmleditorwidgets/images/anchor-right-pressed.png
index 8ffd30c939..8ffd30c939 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-right-pressed.png
+++ b/src/libs/qmleditorwidgets/images/anchor-right-pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-spacer.png b/src/libs/qmleditorwidgets/images/anchor-spacer.png
index 3d4ac0e185..3d4ac0e185 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-spacer.png
+++ b/src/libs/qmleditorwidgets/images/anchor-spacer.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-top-normal.png b/src/libs/qmleditorwidgets/images/anchor-top-normal.png
index 0c10b784d0..0c10b784d0 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-top-normal.png
+++ b/src/libs/qmleditorwidgets/images/anchor-top-normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-top-pressed.png b/src/libs/qmleditorwidgets/images/anchor-top-pressed.png
index b90b6d8287..b90b6d8287 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-top-pressed.png
+++ b/src/libs/qmleditorwidgets/images/anchor-top-pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-vertical-normal.png b/src/libs/qmleditorwidgets/images/anchor-vertical-normal.png
index b36fd7d0d3..b36fd7d0d3 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-vertical-normal.png
+++ b/src/libs/qmleditorwidgets/images/anchor-vertical-normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/anchor-vertical-pressed.png b/src/libs/qmleditorwidgets/images/anchor-vertical-pressed.png
index d824ab1d88..d824ab1d88 100644
--- a/src/plugins/qmldesigner/components/resources/images/anchor-vertical-pressed.png
+++ b/src/libs/qmleditorwidgets/images/anchor-vertical-pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/apply.png b/src/libs/qmleditorwidgets/images/apply.png
index 0b3fe7b97a..0b3fe7b97a 100644
--- a/src/plugins/qmldesigner/components/resources/images/apply.png
+++ b/src/libs/qmleditorwidgets/images/apply.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/applybright.png b/src/libs/qmleditorwidgets/images/applybright.png
index d233cd2492..d233cd2492 100644
--- a/src/plugins/qmldesigner/components/resources/images/applybright.png
+++ b/src/libs/qmleditorwidgets/images/applybright.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/aspect-crop-icon.png b/src/libs/qmleditorwidgets/images/aspect-crop-icon.png
index d16e0d4758..d16e0d4758 100644
--- a/src/plugins/qmldesigner/components/resources/images/aspect-crop-icon.png
+++ b/src/libs/qmleditorwidgets/images/aspect-crop-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/aspect-fit-icon.png b/src/libs/qmleditorwidgets/images/aspect-fit-icon.png
index b1828a4d68..b1828a4d68 100644
--- a/src/plugins/qmldesigner/components/resources/images/aspect-fit-icon.png
+++ b/src/libs/qmleditorwidgets/images/aspect-fit-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/aspectlockoff.png b/src/libs/qmleditorwidgets/images/aspectlockoff.png
index 9c83ceb98b..9c83ceb98b 100644
--- a/src/plugins/qmldesigner/components/resources/images/aspectlockoff.png
+++ b/src/libs/qmleditorwidgets/images/aspectlockoff.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/aspectlockset.png b/src/libs/qmleditorwidgets/images/aspectlockset.png
index 7646a5e436..7646a5e436 100644
--- a/src/plugins/qmldesigner/components/resources/images/aspectlockset.png
+++ b/src/libs/qmleditorwidgets/images/aspectlockset.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/bold-h-icon.png b/src/libs/qmleditorwidgets/images/bold-h-icon.png
index c8d5bbe7db..c8d5bbe7db 100644
--- a/src/plugins/qmldesigner/components/resources/images/bold-h-icon.png
+++ b/src/libs/qmleditorwidgets/images/bold-h-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button-normal-left.png b/src/libs/qmleditorwidgets/images/button-normal-left.png
index d922cde0f2..d922cde0f2 100644
--- a/src/plugins/qmldesigner/components/resources/images/button-normal-left.png
+++ b/src/libs/qmleditorwidgets/images/button-normal-left.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button-normal-middle.png b/src/libs/qmleditorwidgets/images/button-normal-middle.png
index 7d5d374d53..7d5d374d53 100644
--- a/src/plugins/qmldesigner/components/resources/images/button-normal-middle.png
+++ b/src/libs/qmleditorwidgets/images/button-normal-middle.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button-normal-right.png b/src/libs/qmleditorwidgets/images/button-normal-right.png
index 47fb427b12..47fb427b12 100644
--- a/src/plugins/qmldesigner/components/resources/images/button-normal-right.png
+++ b/src/libs/qmleditorwidgets/images/button-normal-right.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button-pressed-left.png b/src/libs/qmleditorwidgets/images/button-pressed-left.png
index a25d655d94..a25d655d94 100644
--- a/src/plugins/qmldesigner/components/resources/images/button-pressed-left.png
+++ b/src/libs/qmleditorwidgets/images/button-pressed-left.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button-pressed-middle.png b/src/libs/qmleditorwidgets/images/button-pressed-middle.png
index f4b5344c40..f4b5344c40 100644
--- a/src/plugins/qmldesigner/components/resources/images/button-pressed-middle.png
+++ b/src/libs/qmleditorwidgets/images/button-pressed-middle.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button-pressed-right.png b/src/libs/qmleditorwidgets/images/button-pressed-right.png
index b9c1e4e0f8..b9c1e4e0f8 100644
--- a/src/plugins/qmldesigner/components/resources/images/button-pressed-right.png
+++ b/src/libs/qmleditorwidgets/images/button-pressed-right.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_alignment_bottom_normal.png b/src/libs/qmleditorwidgets/images/button_alignment_bottom_normal.png
index 36794546aa..36794546aa 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_alignment_bottom_normal.png
+++ b/src/libs/qmleditorwidgets/images/button_alignment_bottom_normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_alignment_bottom_pressed.png b/src/libs/qmleditorwidgets/images/button_alignment_bottom_pressed.png
index b2281d1032..b2281d1032 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_alignment_bottom_pressed.png
+++ b/src/libs/qmleditorwidgets/images/button_alignment_bottom_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_alignment_centerh_normal.png b/src/libs/qmleditorwidgets/images/button_alignment_centerh_normal.png
index b2198ba859..b2198ba859 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_alignment_centerh_normal.png
+++ b/src/libs/qmleditorwidgets/images/button_alignment_centerh_normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_alignment_centerh_pressed.png b/src/libs/qmleditorwidgets/images/button_alignment_centerh_pressed.png
index 38ca891c95..38ca891c95 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_alignment_centerh_pressed.png
+++ b/src/libs/qmleditorwidgets/images/button_alignment_centerh_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_alignment_centerv_normal.png b/src/libs/qmleditorwidgets/images/button_alignment_centerv_normal.png
index ee3e6f72ca..ee3e6f72ca 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_alignment_centerv_normal.png
+++ b/src/libs/qmleditorwidgets/images/button_alignment_centerv_normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_alignment_centerv_pressed.png b/src/libs/qmleditorwidgets/images/button_alignment_centerv_pressed.png
index e5c7d26a67..e5c7d26a67 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_alignment_centerv_pressed.png
+++ b/src/libs/qmleditorwidgets/images/button_alignment_centerv_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_alignment_left_normal.png b/src/libs/qmleditorwidgets/images/button_alignment_left_normal.png
index a0edb16d17..a0edb16d17 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_alignment_left_normal.png
+++ b/src/libs/qmleditorwidgets/images/button_alignment_left_normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_alignment_left_pressed.png b/src/libs/qmleditorwidgets/images/button_alignment_left_pressed.png
index 3b50d5df1c..3b50d5df1c 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_alignment_left_pressed.png
+++ b/src/libs/qmleditorwidgets/images/button_alignment_left_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_alignment_right_normal.png b/src/libs/qmleditorwidgets/images/button_alignment_right_normal.png
index c442c3f437..c442c3f437 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_alignment_right_normal.png
+++ b/src/libs/qmleditorwidgets/images/button_alignment_right_normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_alignment_right_pressed.png b/src/libs/qmleditorwidgets/images/button_alignment_right_pressed.png
index fc6fe7cfef..fc6fe7cfef 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_alignment_right_pressed.png
+++ b/src/libs/qmleditorwidgets/images/button_alignment_right_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_alignment_top_normal.png b/src/libs/qmleditorwidgets/images/button_alignment_top_normal.png
index 187072671b..187072671b 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_alignment_top_normal.png
+++ b/src/libs/qmleditorwidgets/images/button_alignment_top_normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_alignment_top_pressed.png b/src/libs/qmleditorwidgets/images/button_alignment_top_pressed.png
index b784999f37..b784999f37 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_alignment_top_pressed.png
+++ b/src/libs/qmleditorwidgets/images/button_alignment_top_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_color_gradient_normal.png b/src/libs/qmleditorwidgets/images/button_color_gradient_normal.png
index 62336ec7ef..62336ec7ef 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_color_gradient_normal.png
+++ b/src/libs/qmleditorwidgets/images/button_color_gradient_normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_color_gradient_pressed.png b/src/libs/qmleditorwidgets/images/button_color_gradient_pressed.png
index a4b7bc93bd..a4b7bc93bd 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_color_gradient_pressed.png
+++ b/src/libs/qmleditorwidgets/images/button_color_gradient_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_color_none_normal.png b/src/libs/qmleditorwidgets/images/button_color_none_normal.png
index a0068553f8..a0068553f8 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_color_none_normal.png
+++ b/src/libs/qmleditorwidgets/images/button_color_none_normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_color_none_pressed.png b/src/libs/qmleditorwidgets/images/button_color_none_pressed.png
index faabe44f20..faabe44f20 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_color_none_pressed.png
+++ b/src/libs/qmleditorwidgets/images/button_color_none_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_color_solid_normal.png b/src/libs/qmleditorwidgets/images/button_color_solid_normal.png
index 369bb9f9b3..369bb9f9b3 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_color_solid_normal.png
+++ b/src/libs/qmleditorwidgets/images/button_color_solid_normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/button_color_solid_pressed.png b/src/libs/qmleditorwidgets/images/button_color_solid_pressed.png
index 2ea59da3cc..2ea59da3cc 100644
--- a/src/plugins/qmldesigner/components/resources/images/button_color_solid_pressed.png
+++ b/src/libs/qmleditorwidgets/images/button_color_solid_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/cancel.png b/src/libs/qmleditorwidgets/images/cancel.png
index 614f86c7b4..614f86c7b4 100644
--- a/src/plugins/qmldesigner/components/resources/images/cancel.png
+++ b/src/libs/qmleditorwidgets/images/cancel.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/cancelbright.png b/src/libs/qmleditorwidgets/images/cancelbright.png
index 0d20e7950b..0d20e7950b 100644
--- a/src/plugins/qmldesigner/components/resources/images/cancelbright.png
+++ b/src/libs/qmleditorwidgets/images/cancelbright.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/checkbox_checked.png b/src/libs/qmleditorwidgets/images/checkbox_checked.png
index 91d7cd07de..91d7cd07de 100644
--- a/src/plugins/qmldesigner/components/resources/images/checkbox_checked.png
+++ b/src/libs/qmleditorwidgets/images/checkbox_checked.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/checkbox_checked_hover.png b/src/libs/qmleditorwidgets/images/checkbox_checked_hover.png
index 91d7cd07de..91d7cd07de 100644
--- a/src/plugins/qmldesigner/components/resources/images/checkbox_checked_hover.png
+++ b/src/libs/qmleditorwidgets/images/checkbox_checked_hover.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/checkbox_checked_pressed.png b/src/libs/qmleditorwidgets/images/checkbox_checked_pressed.png
index 183f80bbc1..183f80bbc1 100644
--- a/src/plugins/qmldesigner/components/resources/images/checkbox_checked_pressed.png
+++ b/src/libs/qmleditorwidgets/images/checkbox_checked_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/checkbox_unchecked.png b/src/libs/qmleditorwidgets/images/checkbox_unchecked.png
index c9b6bcbe35..c9b6bcbe35 100644
--- a/src/plugins/qmldesigner/components/resources/images/checkbox_unchecked.png
+++ b/src/libs/qmleditorwidgets/images/checkbox_unchecked.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/checkbox_unchecked_hover.png b/src/libs/qmleditorwidgets/images/checkbox_unchecked_hover.png
index c9b6bcbe35..c9b6bcbe35 100644
--- a/src/plugins/qmldesigner/components/resources/images/checkbox_unchecked_hover.png
+++ b/src/libs/qmleditorwidgets/images/checkbox_unchecked_hover.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/checkbox_unchecked_pressed.png b/src/libs/qmleditorwidgets/images/checkbox_unchecked_pressed.png
index a65132bb16..a65132bb16 100644
--- a/src/plugins/qmldesigner/components/resources/images/checkbox_unchecked_pressed.png
+++ b/src/libs/qmleditorwidgets/images/checkbox_unchecked_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/collapse-button-hover-mirrored.png b/src/libs/qmleditorwidgets/images/collapse-button-hover-mirrored.png
index 1e719aa246..1e719aa246 100644
--- a/src/plugins/qmldesigner/components/resources/images/collapse-button-hover-mirrored.png
+++ b/src/libs/qmleditorwidgets/images/collapse-button-hover-mirrored.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/collapse-button-hover.png b/src/libs/qmleditorwidgets/images/collapse-button-hover.png
index 5930e6de42..5930e6de42 100644
--- a/src/plugins/qmldesigner/components/resources/images/collapse-button-hover.png
+++ b/src/libs/qmleditorwidgets/images/collapse-button-hover.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/collapse-button-normal-mirrored.png b/src/libs/qmleditorwidgets/images/collapse-button-normal-mirrored.png
index c89dd955b3..c89dd955b3 100644
--- a/src/plugins/qmldesigner/components/resources/images/collapse-button-normal-mirrored.png
+++ b/src/libs/qmleditorwidgets/images/collapse-button-normal-mirrored.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/collapse-button-normal.png b/src/libs/qmleditorwidgets/images/collapse-button-normal.png
index 9f20f37ebd..9f20f37ebd 100644
--- a/src/plugins/qmldesigner/components/resources/images/collapse-button-normal.png
+++ b/src/libs/qmleditorwidgets/images/collapse-button-normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/combobox-normal.png b/src/libs/qmleditorwidgets/images/combobox-normal.png
index 232f131f7f..232f131f7f 100644
--- a/src/plugins/qmldesigner/components/resources/images/combobox-normal.png
+++ b/src/libs/qmleditorwidgets/images/combobox-normal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/combobox-pressed.png b/src/libs/qmleditorwidgets/images/combobox-pressed.png
index 3098889bf7..3098889bf7 100644
--- a/src/plugins/qmldesigner/components/resources/images/combobox-pressed.png
+++ b/src/libs/qmleditorwidgets/images/combobox-pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/down_arrow.png b/src/libs/qmleditorwidgets/images/down_arrow.png
index cc832f3261..cc832f3261 100644
--- a/src/plugins/qmldesigner/components/resources/images/down_arrow.png
+++ b/src/libs/qmleditorwidgets/images/down_arrow.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/down_arrow_disabled.png b/src/libs/qmleditorwidgets/images/down_arrow_disabled.png
index d5b3655e49..d5b3655e49 100644
--- a/src/plugins/qmldesigner/components/resources/images/down_arrow_disabled.png
+++ b/src/libs/qmleditorwidgets/images/down_arrow_disabled.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/eye_crossed.png b/src/libs/qmleditorwidgets/images/eye_crossed.png
index 8c7ede732b..8c7ede732b 100644
--- a/src/plugins/qmldesigner/components/resources/images/eye_crossed.png
+++ b/src/libs/qmleditorwidgets/images/eye_crossed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/eye_open.png b/src/libs/qmleditorwidgets/images/eye_open.png
index 133378a8e7..133378a8e7 100644
--- a/src/plugins/qmldesigner/components/resources/images/eye_open.png
+++ b/src/libs/qmleditorwidgets/images/eye_open.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/frame.png b/src/libs/qmleditorwidgets/images/frame.png
index 302dae3962..302dae3962 100644
--- a/src/plugins/qmldesigner/components/resources/images/frame.png
+++ b/src/libs/qmleditorwidgets/images/frame.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/hole.png b/src/libs/qmleditorwidgets/images/hole.png
index 0f27668201..0f27668201 100644
--- a/src/plugins/qmldesigner/components/resources/images/hole.png
+++ b/src/libs/qmleditorwidgets/images/hole.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/horizontal-scale-icon.png b/src/libs/qmleditorwidgets/images/horizontal-scale-icon.png
index 64e8565f01..64e8565f01 100644
--- a/src/plugins/qmldesigner/components/resources/images/horizontal-scale-icon.png
+++ b/src/libs/qmleditorwidgets/images/horizontal-scale-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/icon-bottom.png b/src/libs/qmleditorwidgets/images/icon-bottom.png
index 51955a197f..51955a197f 100644
--- a/src/plugins/qmldesigner/components/resources/images/icon-bottom.png
+++ b/src/libs/qmleditorwidgets/images/icon-bottom.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/icon-horizontal.png b/src/libs/qmleditorwidgets/images/icon-horizontal.png
index f1225ebee4..f1225ebee4 100644
--- a/src/plugins/qmldesigner/components/resources/images/icon-horizontal.png
+++ b/src/libs/qmleditorwidgets/images/icon-horizontal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/icon-left.png b/src/libs/qmleditorwidgets/images/icon-left.png
index 3c18792f7d..3c18792f7d 100644
--- a/src/plugins/qmldesigner/components/resources/images/icon-left.png
+++ b/src/libs/qmleditorwidgets/images/icon-left.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/icon-right.png b/src/libs/qmleditorwidgets/images/icon-right.png
index 37cc31910c..37cc31910c 100644
--- a/src/plugins/qmldesigner/components/resources/images/icon-right.png
+++ b/src/libs/qmleditorwidgets/images/icon-right.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/icon-top.png b/src/libs/qmleditorwidgets/images/icon-top.png
index 68421538ee..68421538ee 100644
--- a/src/plugins/qmldesigner/components/resources/images/icon-top.png
+++ b/src/libs/qmleditorwidgets/images/icon-top.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/icon-vertical.png b/src/libs/qmleditorwidgets/images/icon-vertical.png
index f705e15ea7..f705e15ea7 100644
--- a/src/plugins/qmldesigner/components/resources/images/icon-vertical.png
+++ b/src/libs/qmleditorwidgets/images/icon-vertical.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/icon_color_gradient.png b/src/libs/qmleditorwidgets/images/icon_color_gradient.png
index 4360c84965..4360c84965 100644
--- a/src/plugins/qmldesigner/components/resources/images/icon_color_gradient.png
+++ b/src/libs/qmleditorwidgets/images/icon_color_gradient.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/icon_color_none.png b/src/libs/qmleditorwidgets/images/icon_color_none.png
index 8fa7a86dc8..8fa7a86dc8 100644
--- a/src/plugins/qmldesigner/components/resources/images/icon_color_none.png
+++ b/src/libs/qmleditorwidgets/images/icon_color_none.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/icon_color_solid.png b/src/libs/qmleditorwidgets/images/icon_color_solid.png
index 0cf124e72e..0cf124e72e 100644
--- a/src/plugins/qmldesigner/components/resources/images/icon_color_solid.png
+++ b/src/libs/qmleditorwidgets/images/icon_color_solid.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/italic-h-icon.png b/src/libs/qmleditorwidgets/images/italic-h-icon.png
index 8c6eab87bf..8c6eab87bf 100644
--- a/src/plugins/qmldesigner/components/resources/images/italic-h-icon.png
+++ b/src/libs/qmleditorwidgets/images/italic-h-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/lock.png b/src/libs/qmleditorwidgets/images/lock.png
index 8f1b546c8d..8f1b546c8d 100644
--- a/src/plugins/qmldesigner/components/resources/images/lock.png
+++ b/src/libs/qmleditorwidgets/images/lock.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/placeholder.png b/src/libs/qmleditorwidgets/images/placeholder.png
index 836f253f3c..836f253f3c 100644
--- a/src/plugins/qmldesigner/components/resources/images/placeholder.png
+++ b/src/libs/qmleditorwidgets/images/placeholder.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/pushbutton.png b/src/libs/qmleditorwidgets/images/pushbutton.png
index be3d533622..be3d533622 100644
--- a/src/plugins/qmldesigner/components/resources/images/pushbutton.png
+++ b/src/libs/qmleditorwidgets/images/pushbutton.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/pushbutton_hover.png b/src/libs/qmleditorwidgets/images/pushbutton_hover.png
index bba1b6d97c..bba1b6d97c 100644
--- a/src/plugins/qmldesigner/components/resources/images/pushbutton_hover.png
+++ b/src/libs/qmleditorwidgets/images/pushbutton_hover.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/pushbutton_pressed.png b/src/libs/qmleditorwidgets/images/pushbutton_pressed.png
index 0644f6890d..0644f6890d 100644
--- a/src/plugins/qmldesigner/components/resources/images/pushbutton_pressed.png
+++ b/src/libs/qmleditorwidgets/images/pushbutton_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/radiobutton_checked.png b/src/libs/qmleditorwidgets/images/radiobutton_checked.png
index 8ab9157578..8ab9157578 100644
--- a/src/plugins/qmldesigner/components/resources/images/radiobutton_checked.png
+++ b/src/libs/qmleditorwidgets/images/radiobutton_checked.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/radiobutton_checked_hover.png b/src/libs/qmleditorwidgets/images/radiobutton_checked_hover.png
index d68cb009a7..d68cb009a7 100644
--- a/src/plugins/qmldesigner/components/resources/images/radiobutton_checked_hover.png
+++ b/src/libs/qmleditorwidgets/images/radiobutton_checked_hover.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/radiobutton_checked_pressed.png b/src/libs/qmleditorwidgets/images/radiobutton_checked_pressed.png
index e3cd5a59e4..e3cd5a59e4 100644
--- a/src/plugins/qmldesigner/components/resources/images/radiobutton_checked_pressed.png
+++ b/src/libs/qmleditorwidgets/images/radiobutton_checked_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/radiobutton_unchecked.png b/src/libs/qmleditorwidgets/images/radiobutton_unchecked.png
index 321a9a1558..321a9a1558 100644
--- a/src/plugins/qmldesigner/components/resources/images/radiobutton_unchecked.png
+++ b/src/libs/qmleditorwidgets/images/radiobutton_unchecked.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/radiobutton_unchecked_hover.png b/src/libs/qmleditorwidgets/images/radiobutton_unchecked_hover.png
index 666a3b0bdd..666a3b0bdd 100644
--- a/src/plugins/qmldesigner/components/resources/images/radiobutton_unchecked_hover.png
+++ b/src/libs/qmleditorwidgets/images/radiobutton_unchecked_hover.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/radiobutton_unchecked_pressed.png b/src/libs/qmleditorwidgets/images/radiobutton_unchecked_pressed.png
index c4b0567aa9..c4b0567aa9 100644
--- a/src/plugins/qmldesigner/components/resources/images/radiobutton_unchecked_pressed.png
+++ b/src/libs/qmleditorwidgets/images/radiobutton_unchecked_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/scale-icon.png b/src/libs/qmleditorwidgets/images/scale-icon.png
index aa9cf46812..aa9cf46812 100644
--- a/src/plugins/qmldesigner/components/resources/images/scale-icon.png
+++ b/src/libs/qmleditorwidgets/images/scale-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/scrollbar-borderimage-horizontal.png b/src/libs/qmleditorwidgets/images/scrollbar-borderimage-horizontal.png
index b349715e59..b349715e59 100644
--- a/src/plugins/qmldesigner/components/resources/images/scrollbar-borderimage-horizontal.png
+++ b/src/libs/qmleditorwidgets/images/scrollbar-borderimage-horizontal.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/scrollbar-borderimage-vertical.png b/src/libs/qmleditorwidgets/images/scrollbar-borderimage-vertical.png
index eb2f53e65f..eb2f53e65f 100644
--- a/src/plugins/qmldesigner/components/resources/images/scrollbar-borderimage-vertical.png
+++ b/src/libs/qmleditorwidgets/images/scrollbar-borderimage-vertical.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/sizegrip.png b/src/libs/qmleditorwidgets/images/sizegrip.png
index 350583aaac..350583aaac 100644
--- a/src/plugins/qmldesigner/components/resources/images/sizegrip.png
+++ b/src/libs/qmleditorwidgets/images/sizegrip.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/slider_indikator.png b/src/libs/qmleditorwidgets/images/slider_indikator.png
index 343ec38d59..343ec38d59 100644
--- a/src/plugins/qmldesigner/components/resources/images/slider_indikator.png
+++ b/src/libs/qmleditorwidgets/images/slider_indikator.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/slider_line.png b/src/libs/qmleditorwidgets/images/slider_line.png
index f7c0cb1246..f7c0cb1246 100644
--- a/src/plugins/qmldesigner/components/resources/images/slider_line.png
+++ b/src/libs/qmleditorwidgets/images/slider_line.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/spindown.png b/src/libs/qmleditorwidgets/images/spindown.png
index 9283d40d6c..9283d40d6c 100644
--- a/src/plugins/qmldesigner/components/resources/images/spindown.png
+++ b/src/libs/qmleditorwidgets/images/spindown.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/spindown_hover.png b/src/libs/qmleditorwidgets/images/spindown_hover.png
index 851d0af2b1..851d0af2b1 100644
--- a/src/plugins/qmldesigner/components/resources/images/spindown_hover.png
+++ b/src/libs/qmleditorwidgets/images/spindown_hover.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/spindown_off.png b/src/libs/qmleditorwidgets/images/spindown_off.png
index a90ab3f038..a90ab3f038 100644
--- a/src/plugins/qmldesigner/components/resources/images/spindown_off.png
+++ b/src/libs/qmleditorwidgets/images/spindown_off.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/spindown_pressed.png b/src/libs/qmleditorwidgets/images/spindown_pressed.png
index cab3eae28f..cab3eae28f 100644
--- a/src/plugins/qmldesigner/components/resources/images/spindown_pressed.png
+++ b/src/libs/qmleditorwidgets/images/spindown_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/spinup.png b/src/libs/qmleditorwidgets/images/spinup.png
index 9250c0c3b8..9250c0c3b8 100644
--- a/src/plugins/qmldesigner/components/resources/images/spinup.png
+++ b/src/libs/qmleditorwidgets/images/spinup.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/spinup_hover.png b/src/libs/qmleditorwidgets/images/spinup_hover.png
index 8793a9890e..8793a9890e 100644
--- a/src/plugins/qmldesigner/components/resources/images/spinup_hover.png
+++ b/src/libs/qmleditorwidgets/images/spinup_hover.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/spinup_off.png b/src/libs/qmleditorwidgets/images/spinup_off.png
index 02dad1fb29..02dad1fb29 100644
--- a/src/plugins/qmldesigner/components/resources/images/spinup_off.png
+++ b/src/libs/qmleditorwidgets/images/spinup_off.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/spinup_pressed.png b/src/libs/qmleditorwidgets/images/spinup_pressed.png
index 8acb9c176e..8acb9c176e 100644
--- a/src/plugins/qmldesigner/components/resources/images/spinup_pressed.png
+++ b/src/libs/qmleditorwidgets/images/spinup_pressed.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/strikeout-h-icon.png b/src/libs/qmleditorwidgets/images/strikeout-h-icon.png
index 9bcb34c7d9..9bcb34c7d9 100644
--- a/src/plugins/qmldesigner/components/resources/images/strikeout-h-icon.png
+++ b/src/libs/qmleditorwidgets/images/strikeout-h-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/tile-icon-hor - scale.png b/src/libs/qmleditorwidgets/images/tile-icon-hor - scale.png
index dfa50f7d05..dfa50f7d05 100644
--- a/src/plugins/qmldesigner/components/resources/images/tile-icon-hor - scale.png
+++ b/src/libs/qmleditorwidgets/images/tile-icon-hor - scale.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/tile-icon-hor-crop.png b/src/libs/qmleditorwidgets/images/tile-icon-hor-crop.png
index d60ac0fbe6..d60ac0fbe6 100644
--- a/src/plugins/qmldesigner/components/resources/images/tile-icon-hor-crop.png
+++ b/src/libs/qmleditorwidgets/images/tile-icon-hor-crop.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/tile-icon-vert-crop.png b/src/libs/qmleditorwidgets/images/tile-icon-vert-crop.png
index a38b4b0c68..a38b4b0c68 100644
--- a/src/plugins/qmldesigner/components/resources/images/tile-icon-vert-crop.png
+++ b/src/libs/qmleditorwidgets/images/tile-icon-vert-crop.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/tile-icon-vert-scale.png b/src/libs/qmleditorwidgets/images/tile-icon-vert-scale.png
index 1f84bb2f10..1f84bb2f10 100644
--- a/src/plugins/qmldesigner/components/resources/images/tile-icon-vert-scale.png
+++ b/src/libs/qmleditorwidgets/images/tile-icon-vert-scale.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/tile-icon.png b/src/libs/qmleditorwidgets/images/tile-icon.png
index ba2079080d..ba2079080d 100644
--- a/src/plugins/qmldesigner/components/resources/images/tile-icon.png
+++ b/src/libs/qmleditorwidgets/images/tile-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/triangle_horz.png b/src/libs/qmleditorwidgets/images/triangle_horz.png
index 90650a50b9..90650a50b9 100644
--- a/src/plugins/qmldesigner/components/resources/images/triangle_horz.png
+++ b/src/libs/qmleditorwidgets/images/triangle_horz.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/triangle_vert.png b/src/libs/qmleditorwidgets/images/triangle_vert.png
index 50b14458a4..50b14458a4 100644
--- a/src/plugins/qmldesigner/components/resources/images/triangle_vert.png
+++ b/src/libs/qmleditorwidgets/images/triangle_vert.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/underline-h-icon.png b/src/libs/qmleditorwidgets/images/underline-h-icon.png
index b9600100ff..b9600100ff 100644
--- a/src/plugins/qmldesigner/components/resources/images/underline-h-icon.png
+++ b/src/libs/qmleditorwidgets/images/underline-h-icon.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/up_arrow.png b/src/libs/qmleditorwidgets/images/up_arrow.png
index 94161f3ce4..94161f3ce4 100644
--- a/src/plugins/qmldesigner/components/resources/images/up_arrow.png
+++ b/src/libs/qmleditorwidgets/images/up_arrow.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/up_arrow_disabled.png b/src/libs/qmleditorwidgets/images/up_arrow_disabled.png
index 5fe22ba043..5fe22ba043 100644
--- a/src/plugins/qmldesigner/components/resources/images/up_arrow_disabled.png
+++ b/src/libs/qmleditorwidgets/images/up_arrow_disabled.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/resources/images/vertical-scale-icon.png b/src/libs/qmleditorwidgets/images/vertical-scale-icon.png
index c98e7c1a95..c98e7c1a95 100644
--- a/src/plugins/qmldesigner/components/resources/images/vertical-scale-icon.png
+++ b/src/libs/qmleditorwidgets/images/vertical-scale-icon.png
Binary files differ
diff --git a/src/libs/qmleditorwidgets/qmleditorwidgets-lib.pri b/src/libs/qmleditorwidgets/qmleditorwidgets-lib.pri
new file mode 100644
index 0000000000..c27e792971
--- /dev/null
+++ b/src/libs/qmleditorwidgets/qmleditorwidgets-lib.pri
@@ -0,0 +1,53 @@
+QT += declarative script
+INCLUDEPATH += $$PWD
+DEPENDPATH += $$PWD
+
+contains(CONFIG, dll) {
+ DEFINES += BUILD_QMLEDITORWIDGETS_LIB
+} else {
+ DEFINES += BUILD_QMLEDITORWIDGETS_STATIC_LIB
+}
+
+## Input
+RESOURCES += \
+ resources.qrc
+
+HEADERS += \
+ fontsizespinbox.h \
+ filewidget.h \
+ contextpanewidgetrectangle.h \
+ contextpanewidgetimage.h \
+ contextpanewidget.h \
+ contextpanetextwidget.h \
+ colorwidget.h \
+ colorbutton.h \
+ colorbox.h \
+ customcolordialog.h \
+ gradientline.h \
+ huecontrol.h \
+ qmleditorwidgets_global.h
+
+SOURCES += \
+ fontsizespinbox.cpp \
+ filewidget.cpp \
+ contextpanewidgetrectangle.cpp \
+ contextpanewidgetimage.cpp \
+ contextpanewidget.cpp \
+ contextpanetextwidget.cpp \
+ colorwidget.cpp \
+ colorbox.cpp \
+ customcolordialog.cpp \
+ huecontrol.cpp \
+ gradientline.cpp \
+ colorbutton.cpp
+
+FORMS += \
+ contextpanewidgetrectangle.ui \
+ contextpanewidgetimage.ui \
+ contextpanewidgetborderimage.ui \
+ contextpanetext.ui
+
+include(easingpane/easingpane.pri)
+
+
+OTHER_FILES += qmleditorwidgets.pri
diff --git a/src/libs/qmleditorwidgets/qmleditorwidgets.pri b/src/libs/qmleditorwidgets/qmleditorwidgets.pri
new file mode 100644
index 0000000000..72520ed980
--- /dev/null
+++ b/src/libs/qmleditorwidgets/qmleditorwidgets.pri
@@ -0,0 +1,7 @@
+INCLUDEPATH += $$PWD $$PWD/easingpane
+DEPENDPATH += $$PWD $$PWD/easingpane
+QT += declarative
+
+LIBS *= -l$$qtLibraryName(QmlEditorWidgets)
+
+include(../qmljs/qmljs.pri)
diff --git a/src/libs/qmleditorwidgets/qmleditorwidgets.pro b/src/libs/qmleditorwidgets/qmleditorwidgets.pro
new file mode 100644
index 0000000000..ad9e1dfa21
--- /dev/null
+++ b/src/libs/qmleditorwidgets/qmleditorwidgets.pro
@@ -0,0 +1,12 @@
+TEMPLATE = lib
+CONFIG+=dll
+TARGET = QmlEditorWidgets
+
+DEFINES += QWEAKPOINTER_ENABLE_ARROW
+
+unix:QMAKE_CXXFLAGS_DEBUG += -O3
+
+include(../../qtcreatorlibrary.pri)
+include(../qmljs/qmljs.pri)
+include(qmleditorwidgets-lib.pri)
+
diff --git a/src/libs/qmleditorwidgets/qmleditorwidgets_global.h b/src/libs/qmleditorwidgets/qmleditorwidgets_global.h
new file mode 100644
index 0000000000..c9589983da
--- /dev/null
+++ b/src/libs/qmleditorwidgets/qmleditorwidgets_global.h
@@ -0,0 +1,43 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#ifndef QMLEDITORWIDGETS_GLOBAL_H
+#define QMLEDITORWIDGETS_GLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+# if defined(BUILD_QMLEDITORWIDGETS_LIB)
+# define QMLEDITORWIDGETS_EXPORT Q_DECL_EXPORT
+# elif defined(BUILD_QMLJSDEBUGGER_STATIC_LIB)
+# define QMLEDITORWIDGETS_EXPORT
+# else
+# define QMLEDITORWIDGETS_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // QMLEDITORWIDGETS_GLOBAL_H
diff --git a/src/libs/qmleditorwidgets/resources.qrc b/src/libs/qmleditorwidgets/resources.qrc
new file mode 100644
index 0000000000..ee4949f2dc
--- /dev/null
+++ b/src/libs/qmleditorwidgets/resources.qrc
@@ -0,0 +1,130 @@
+<RCC>
+ <qresource prefix="/qmldesigner">
+ <file>images/checkbox_checked.png</file>
+ <file>images/checkbox_checked_hover.png</file>
+ <file>images/checkbox_checked_pressed.png</file>
+ <file>images/checkbox_unchecked.png</file>
+ <file>images/checkbox_unchecked_hover.png</file>
+ <file>images/checkbox_unchecked_pressed.png</file>
+ <file>images/eye_open.png</file>
+ <file>images/eye_crossed.png</file>
+ <file>images/lock.png</file>
+ <file>images/hole.png</file>
+ <file>images/down_arrow.png</file>
+ <file>images/down_arrow_disabled.png</file>
+ <file>images/frame.png</file>
+ <file>images/pushbutton.png</file>
+ <file>images/pushbutton_hover.png</file>
+ <file>images/pushbutton_pressed.png</file>
+ <file>images/radiobutton_checked.png</file>
+ <file>images/radiobutton_checked_hover.png</file>
+ <file>images/radiobutton_checked_pressed.png</file>
+ <file>images/radiobutton_unchecked.png</file>
+ <file>images/radiobutton_unchecked_hover.png</file>
+ <file>images/radiobutton_unchecked_pressed.png</file>
+ <file>images/sizegrip.png</file>
+ <file>images/spindown.png</file>
+ <file>images/spindown_hover.png</file>
+ <file>images/spindown_off.png</file>
+ <file>images/spindown_pressed.png</file>
+ <file>images/spinup.png</file>
+ <file>images/spinup_hover.png</file>
+ <file>images/spinup_off.png</file>
+ <file>images/spinup_pressed.png</file>
+ <file>images/up_arrow.png</file>
+ <file>images/up_arrow_disabled.png</file>
+ <file>images/apply.png</file>
+ <file>images/cancel.png</file>
+ <file>images/applybright.png</file>
+ <file>images/cancelbright.png</file>
+ <file>images/placeholder.png</file>
+ <file>images/triangle_horz.png</file>
+ <file>images/triangle_vert.png</file>
+ <file>images/button_color_gradient_pressed.png</file>
+ <file>images/button_color_gradient_normal.png</file>
+ <file>images/button_color_none_pressed.png</file>
+ <file>images/button_color_none_normal.png</file>
+ <file>images/button_color_solid_normal.png</file>
+ <file>images/button_color_solid_pressed.png</file>
+ <file>images/anchor-bottom-normal.png</file>
+ <file>images/anchor-bottom-pressed.png</file>
+ <file>images/anchor-top-normal.png</file>
+ <file>images/anchor-top-pressed.png</file>
+ <file>images/anchor-left-pressed.png</file>
+ <file>images/anchor-left-normal.png</file>
+ <file>images/anchor-right-normal.png</file>
+ <file>images/anchor-right-pressed.png</file>
+ <file>images/anchor-fill-pressed.png</file>
+ <file>images/anchor-fill-normal.png</file>
+ <file>images/anchor-vertical-pressed.png</file>
+ <file>images/anchor-vertical-normal.png</file>
+ <file>images/anchor-horizontal-pressed.png</file>
+ <file>images/anchor-horizontal-normal.png</file>
+ <file>images/anchor-spacer.png</file>
+ <file>images/icon-left.png</file>
+ <file>images/icon-right.png</file>
+ <file>images/icon-top.png</file>
+ <file>images/icon-bottom.png</file>
+ <file>images/icon-vertical.png</file>
+ <file>images/icon-horizontal.png</file>
+ <file>images/button_alignment_right_pressed.png</file>
+ <file>images/button_alignment_right_normal.png</file>
+ <file>images/button_alignment_left_pressed.png</file>
+ <file>images/button_alignment_left_normal.png</file>
+ <file>images/button_alignment_top_pressed.png</file>
+ <file>images/button_alignment_top_normal.png</file>
+ <file>images/button_alignment_bottom_pressed.png</file>
+ <file>images/button_alignment_bottom_normal.png</file>
+ <file>images/button_alignment_centerh_pressed.png</file>
+ <file>images/button_alignment_centerh_normal.png</file>
+ <file>images/button_alignment_centerv_pressed.png</file>
+ <file>images/button_alignment_centerv_normal.png</file>
+ <file>images/collapse-button-hover.png</file>
+ <file>images/collapse-button-normal.png</file>
+ <file>images/collapse-button-hover-mirrored.png</file>
+ <file>images/collapse-button-normal-mirrored.png</file>
+ <file>images/combobox-normal.png</file>
+ <file>images/combobox-pressed.png</file>
+ <file>images/slider_indikator.png</file>
+ <file>images/slider_line.png</file>
+ <file>images/scrollbar-borderimage-horizontal.png</file>
+ <file>images/scrollbar-borderimage-vertical.png</file>
+ <file>images/aspectlockset.png</file>
+ <file>images/aspectlockoff.png</file>
+ <file>images/button-pressed-left.png</file>
+ <file>images/button-pressed-middle.png</file>
+ <file>images/button-pressed-right.png</file>
+ <file>images/button-normal-left.png</file>
+ <file>images/button-normal-middle.png</file>
+ <file>images/button-normal-right.png</file>
+ <file>images/alignmentbottom-h-icon.png</file>
+ <file>images/alignmentbottom-icon.png</file>
+ <file>images/alignmentcenterh-h-icon.png</file>
+ <file>images/alignmentcenterh-icon.png</file>
+ <file>images/alignmentleft-h-icon.png</file>
+ <file>images/alignmentleft-icon.png</file>
+ <file>images/alignmentmiddle-h-icon.png</file>
+ <file>images/alignmentmiddle-icon.png</file>
+ <file>images/alignmentright-h-icon.png</file>
+ <file>images/alignmentright-icon.png</file>
+ <file>images/alignmenttop-h-icon.png</file>
+ <file>images/alignmenttop-icon.png</file>
+ <file>images/underline-h-icon.png</file>
+ <file>images/strikeout-h-icon.png</file>
+ <file>images/italic-h-icon.png</file>
+ <file>images/bold-h-icon.png</file>
+ <file>images/icon_color_none.png</file>
+ <file>images/icon_color_solid.png</file>
+ <file>images/icon_color_gradient.png</file>
+ <file>images/scale-icon.png</file>
+ <file>images/horizontal-scale-icon.png</file>
+ <file>images/vertical-scale-icon.png</file>
+ <file>images/tile-icon.png</file>
+ <file>images/aspect-fit-icon.png</file>
+ <file>images/aspect-crop-icon.png</file>
+ <file>images/tile-icon-vert-crop.png</file>
+ <file>images/tile-icon-hor-crop.png</file>
+ <file>images/tile-icon-hor - scale.png</file>
+ <file>images/tile-icon-vert-scale.png</file>
+ </qresource>
+</RCC>
diff --git a/src/plugins/qmldesigner/components/easingpane/easingpane.pri b/src/plugins/qmldesigner/components/easingpane/easingpane.pri
deleted file mode 100644
index 31e8b07f23..0000000000
--- a/src/plugins/qmldesigner/components/easingpane/easingpane.pri
+++ /dev/null
@@ -1,12 +0,0 @@
-VPATH += $$PWD
-INCLUDEPATH += $$PWD
-#include($$PWD/qtgradienteditor/qtgradienteditor.pri)
-SOURCES += easinggraph.cpp \
- easingcontextpane.cpp
-
-HEADERS += easinggraph.h \
- easingcontextpane.h
-
-QT += declarative
-RESOURCES += easingpane.qrc
-FORMS += components/easingpane/easingcontextpane.ui
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.pri b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.pri
index 47f3257347..af7187bbca 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.pri
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.pri
@@ -19,12 +19,7 @@ SOURCES += propertyeditor.cpp \
siblingcombobox.cpp \
propertyeditortransaction.cpp \
propertyeditorcontextobject.cpp \
- declarativewidgetview.cpp \
- contextpanewidget.cpp \
- contextpanetextwidget.cpp \
- fontsizespinbox.cpp \
- contextpanewidgetrectangle.cpp \
- contextpanewidgetimage.cpp
+ declarativewidgetview.cpp
HEADERS += propertyeditor.h \
qmlanchorbindingproxy.h \
@@ -45,12 +40,8 @@ HEADERS += propertyeditor.h \
propertyeditortransaction.h \
designerpropertymap.h \
propertyeditorcontextobject.h \
- declarativewidgetview.h \
- contextpanewidget.h \
- contextpanetextwidget.h \
- fontsizespinbox.h \
- contextpanewidgetrectangle.h \
- contextpanewidgetimage.h
+ declarativewidgetview.h
+
QT += declarative
RESOURCES += propertyeditor.qrc
FORMS += behaviordialog.ui \
diff --git a/src/plugins/qmldesigner/components/resources/resources.qrc b/src/plugins/qmldesigner/components/resources/resources.qrc
index 235ae39be3..505a3b1adc 100644
--- a/src/plugins/qmldesigner/components/resources/resources.qrc
+++ b/src/plugins/qmldesigner/components/resources/resources.qrc
@@ -3,134 +3,6 @@
<file>templates/Standard/Form.xml</file>
<file>stylesheet.css</file>
<file>toolbutton.css</file>
- <file>scrollbar.css</file>
- <file>images/checkbox_checked.png</file>
- <file>images/checkbox_checked_hover.png</file>
- <file>images/checkbox_checked_pressed.png</file>
- <file>images/checkbox_unchecked.png</file>
- <file>images/checkbox_unchecked_hover.png</file>
- <file>images/checkbox_unchecked_pressed.png</file>
- <file>images/eye_open.png</file>
- <file>images/eye_crossed.png</file>
- <file>images/lock.png</file>
- <file>images/hole.png</file>
- <file>images/down_arrow.png</file>
- <file>images/down_arrow_disabled.png</file>
- <file>images/frame.png</file>
- <file>images/pushbutton.png</file>
- <file>images/pushbutton_hover.png</file>
- <file>images/pushbutton_pressed.png</file>
- <file>images/radiobutton_checked.png</file>
- <file>images/radiobutton_checked_hover.png</file>
- <file>images/radiobutton_checked_pressed.png</file>
- <file>images/radiobutton_unchecked.png</file>
- <file>images/radiobutton_unchecked_hover.png</file>
- <file>images/radiobutton_unchecked_pressed.png</file>
- <file>images/sizegrip.png</file>
- <file>images/spindown.png</file>
- <file>images/spindown_hover.png</file>
- <file>images/spindown_off.png</file>
- <file>images/spindown_pressed.png</file>
- <file>images/spinup.png</file>
- <file>images/spinup_hover.png</file>
- <file>images/spinup_off.png</file>
- <file>images/spinup_pressed.png</file>
- <file>images/up_arrow.png</file>
- <file>images/up_arrow_disabled.png</file>
- <file>images/apply.png</file>
- <file>images/cancel.png</file>
- <file>images/applybright.png</file>
- <file>images/cancelbright.png</file>
- <file>images/placeholder.png</file>
- <file>images/triangle_horz.png</file>
- <file>images/triangle_vert.png</file>
- <file>images/button_color_gradient_pressed.png</file>
- <file>images/button_color_gradient_normal.png</file>
- <file>images/button_color_none_pressed.png</file>
- <file>images/button_color_none_normal.png</file>
- <file>images/button_color_solid_normal.png</file>
- <file>images/button_color_solid_pressed.png</file>
- <file>images/anchor-bottom-normal.png</file>
- <file>images/anchor-bottom-pressed.png</file>
- <file>images/anchor-top-normal.png</file>
- <file>images/anchor-top-pressed.png</file>
- <file>images/anchor-left-pressed.png</file>
- <file>images/anchor-left-normal.png</file>
- <file>images/anchor-right-normal.png</file>
- <file>images/anchor-right-pressed.png</file>
- <file>images/anchor-fill-pressed.png</file>
- <file>images/anchor-fill-normal.png</file>
- <file>images/anchor-vertical-pressed.png</file>
- <file>images/anchor-vertical-normal.png</file>
- <file>images/anchor-horizontal-pressed.png</file>
- <file>images/anchor-horizontal-normal.png</file>
- <file>images/anchor-spacer.png</file>
- <file>images/icon-left.png</file>
- <file>images/icon-right.png</file>
- <file>images/icon-top.png</file>
- <file>images/icon-bottom.png</file>
- <file>images/icon-vertical.png</file>
- <file>images/icon-horizontal.png</file>
- <file>images/button_alignment_right_pressed.png</file>
- <file>images/button_alignment_right_normal.png</file>
- <file>images/button_alignment_left_pressed.png</file>
- <file>images/button_alignment_left_normal.png</file>
- <file>images/button_alignment_top_pressed.png</file>
- <file>images/button_alignment_top_normal.png</file>
- <file>images/button_alignment_bottom_pressed.png</file>
- <file>images/button_alignment_bottom_normal.png</file>
- <file>images/button_alignment_centerh_pressed.png</file>
- <file>images/button_alignment_centerh_normal.png</file>
- <file>images/button_alignment_centerv_pressed.png</file>
- <file>images/button_alignment_centerv_normal.png</file>
- <file>images/collapse-button-hover.png</file>
- <file>images/collapse-button-normal.png</file>
- <file>images/collapse-button-hover-mirrored.png</file>
- <file>images/collapse-button-normal-mirrored.png</file>
- <file>images/combobox-normal.png</file>
- <file>images/combobox-pressed.png</file>
- <file>images/slider_indikator.png</file>
- <file>images/slider_line.png</file>
- <file>formeditorstylesheet.css</file>
- <file>images/scrollbar-borderimage-horizontal.png</file>
- <file>images/scrollbar-borderimage-vertical.png</file>
- <file>images/aspectlockset.png</file>
- <file>images/aspectlockoff.png</file>
- <file>images/button-pressed-left.png</file>
- <file>outputpane-style.css</file>
- <file>images/button-pressed-middle.png</file>
- <file>images/button-pressed-right.png</file>
- <file>images/button-normal-left.png</file>
- <file>images/button-normal-middle.png</file>
- <file>images/button-normal-right.png</file>
- <file>images/alignmentbottom-h-icon.png</file>
- <file>images/alignmentbottom-icon.png</file>
- <file>images/alignmentcenterh-h-icon.png</file>
- <file>images/alignmentcenterh-icon.png</file>
- <file>images/alignmentleft-h-icon.png</file>
- <file>images/alignmentleft-icon.png</file>
- <file>images/alignmentmiddle-h-icon.png</file>
- <file>images/alignmentmiddle-icon.png</file>
- <file>images/alignmentright-h-icon.png</file>
- <file>images/alignmentright-icon.png</file>
- <file>images/alignmenttop-h-icon.png</file>
- <file>images/alignmenttop-icon.png</file>
- <file>images/underline-h-icon.png</file>
- <file>images/strikeout-h-icon.png</file>
- <file>images/italic-h-icon.png</file>
- <file>images/bold-h-icon.png</file>
- <file>images/icon_color_none.png</file>
- <file>images/icon_color_solid.png</file>
- <file>images/icon_color_gradient.png</file>
- <file>images/scale-icon.png</file>
- <file>images/horizontal-scale-icon.png</file>
- <file>images/vertical-scale-icon.png</file>
- <file>images/tile-icon.png</file>
- <file>images/aspect-fit-icon.png</file>
- <file>images/aspect-crop-icon.png</file>
- <file>images/tile-icon-vert-crop.png</file>
- <file>images/tile-icon-hor-crop.png</file>
- <file>images/tile-icon-hor - scale.png</file>
- <file>images/tile-icon-vert-scale.png</file>
+ <file>scrollbar.css</file>
</qresource>
</RCC>