summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@nokia.com>2011-02-21 10:51:24 +0100
committerJens Bache-Wiig <jens.bache-wiig@nokia.com>2011-02-21 10:51:24 +0100
commit9917d1d23cced9f3f91ec8a0504c2942e72adfc7 (patch)
tree797638ab1c865a49cc250fb5470f38788d62b4ab
parentdf83464e7a1eb903f3e9dbb5124c4bd7894cfa1f (diff)
downloadqtquickcontrols-9917d1d23cced9f3f91ec8a0504c2942e72adfc7.tar.gz
Cleaned up the desktop branch
-rw-r--r--components/ButtonGroup.js127
-rw-r--r--components/components.pro49
-rw-r--r--components/qmldir17
-rw-r--r--desktop.pro (renamed from custom-style.pro)0
-rw-r--r--examples/Browser.qml (renamed from examples/desktop/browser.qml)0
-rw-r--r--examples/Gallery.qml517
-rw-r--r--examples/customtheme/customtheme.qml29
-rw-r--r--examples/customtheme/exampletheme/Button.qml18
-rw-r--r--examples/customtheme/exampletheme/CheckBox.qml18
-rw-r--r--examples/customtheme/exampletheme/LineEdit.qml18
-rw-r--r--examples/customtheme/exampletheme/RadioButton.qml15
-rw-r--r--examples/customtheme/exampletheme/Slider.qml47
-rw-r--r--examples/customtheme/exampletheme/images/button_normal.pngbin469 -> 0 bytes
-rw-r--r--examples/customtheme/exampletheme/images/button_pressed.pngbin312 -> 0 bytes
-rw-r--r--examples/customtheme/exampletheme/images/checkbox_check.pngbin278 -> 0 bytes
-rw-r--r--examples/customtheme/exampletheme/images/edit_normal.pngbin446 -> 0 bytes
-rw-r--r--examples/customtheme/exampletheme/images/label.pngbin765 -> 0 bytes
-rw-r--r--examples/customtheme/exampletheme/images/radiobutton_check.pngbin1017 -> 0 bytes
-rw-r--r--examples/customtheme/exampletheme/images/radiobutton_normal.pngbin1250 -> 0 bytes
-rw-r--r--examples/desktop/Tab/Tab.qml6
-rw-r--r--examples/desktop/Tab/Tab.qmlproject18
-rw-r--r--examples/desktop/desktop.pro2
-rw-r--r--examples/desktop/gallery.qml173
-rw-r--r--examples/desktop/images/folder_new.pngbin1199 -> 0 bytes
-rw-r--r--examples/desktop/plugin/qmldir1
-rw-r--r--examples/desktop/src/src.pro38
-rw-r--r--examples/desktop/tabbar.qml27
-rw-r--r--examples/desktop/widgets/Button.qml27
-rw-r--r--examples/desktop/widgets/ButtonRow.qml5
-rw-r--r--examples/desktop/widgets/CheckBox.qml26
-rw-r--r--examples/desktop/widgets/ChoiceList.qml52
-rw-r--r--examples/desktop/widgets/GroupBox.qml27
-rw-r--r--examples/desktop/widgets/ProgressBar.qml31
-rw-r--r--examples/desktop/widgets/RadioButton.qml26
-rw-r--r--examples/desktop/widgets/ScrollArea.qml103
-rw-r--r--examples/desktop/widgets/ScrollBar.qml109
-rw-r--r--examples/desktop/widgets/Slider.qml31
-rw-r--r--examples/desktop/widgets/SpinBox.qml91
-rw-r--r--examples/desktop/widgets/Switch.qml22
-rw-r--r--examples/desktop/widgets/Tab.qml7
-rw-r--r--examples/desktop/widgets/TabBar.qml90
-rw-r--r--examples/desktop/widgets/TabFrame.qml72
-rw-r--r--examples/desktop/widgets/TextArea.qml44
-rw-r--r--examples/desktop/widgets/TextField.qml52
-rw-r--r--examples/desktop/widgets/TextScrollArea.qml31
-rw-r--r--examples/desktop/widgets/ToolBar.qml12
-rw-r--r--examples/desktop/widgets/ToolButton.qml18
-rw-r--r--examples/meego/images/folder_new.pngbin1199 -> 0 bytes
-rw-r--r--examples/meego/meegogallery.qml94
-rw-r--r--examples/meego/meegotheme/BusyIndicator.qml46
-rw-r--r--examples/meego/meegotheme/Button.qml81
-rw-r--r--examples/meego/meegotheme/ButtonBlock.qml85
-rw-r--r--examples/meego/meegotheme/CheckBox.qml19
-rw-r--r--examples/meego/meegotheme/Label.qml57
-rw-r--r--examples/meego/meegotheme/ProgressBar.qml57
-rw-r--r--examples/meego/meegotheme/Slider.qml155
-rw-r--r--examples/meego/meegotheme/TextArea.qml38
-rw-r--r--examples/meego/meegotheme/TextField.qml38
-rw-r--r--src/components/BasicButton.qml (renamed from components/BasicButton.qml)0
-rw-r--r--src/components/BusyIndicator.qml (renamed from components/BusyIndicator.qml)0
-rw-r--r--src/components/Button.qml (renamed from components/Button.qml)0
-rw-r--r--src/components/ButtonBlock.qml (renamed from components/ButtonBlock.qml)0
-rw-r--r--src/components/ButtonColumn.qml (renamed from components/ButtonColumn.qml)0
-rw-r--r--src/components/ButtonRow.qml (renamed from components/ButtonRow.qml)0
-rw-r--r--src/components/CheckBox.qml (renamed from components/CheckBox.qml)0
-rw-r--r--src/components/ChoiceList.qml (renamed from components/ChoiceList.qml)0
-rw-r--r--src/components/ProgressBar.qml (renamed from components/ProgressBar.qml)0
-rw-r--r--src/components/RadioButton.qml (renamed from components/RadioButton.qml)0
-rw-r--r--src/components/ScrollDecorator.qml (renamed from components/ScrollDecorator.qml)0
-rw-r--r--src/components/ScrollIndicator.qml (renamed from components/ScrollIndicator.qml)0
-rw-r--r--src/components/Slider.qml (renamed from components/Slider.qml)0
-rw-r--r--src/components/SpinBox.qml (renamed from components/SpinBox.qml)0
-rw-r--r--src/components/Switch.qml (renamed from components/Switch.qml)0
-rw-r--r--src/components/TextArea.qml (renamed from components/TextArea.qml)0
-rw-r--r--src/components/TextField.qml (renamed from components/TextField.qml)0
-rw-r--r--src/components/behaviors/ButtonBehavior.qml (renamed from components/behaviors/ButtonBehavior.qml)0
-rw-r--r--src/components/behaviors/ModalPopupBehavior.qml (renamed from components/behaviors/ModalPopupBehavior.qml)0
-rw-r--r--src/components/behaviors/TextEditMouseBehavior.qml (renamed from components/behaviors/TextEditMouseBehavior.qml)0
-rw-r--r--src/components/private/ChoiceListPopup.qml (renamed from components/private/ChoiceListPopup.qml)0
-rw-r--r--src/components/styles/default/BasicButtonStyle.qml (renamed from components/styles/default/BasicButtonStyle.qml)0
-rw-r--r--src/components/styles/default/BusyIndicatorStyle.qml (renamed from components/styles/default/BusyIndicatorStyle.qml)0
-rw-r--r--src/components/styles/default/ButtonBlockStyle.qml (renamed from components/styles/default/ButtonBlockStyle.qml)0
-rw-r--r--src/components/styles/default/ButtonStyle.qml (renamed from components/styles/default/ButtonStyle.qml)0
-rw-r--r--src/components/styles/default/CheckBoxStyle.qml (renamed from components/styles/default/CheckBoxStyle.qml)0
-rw-r--r--src/components/styles/default/ChoiceListStyle.qml (renamed from components/styles/default/ChoiceListStyle.qml)0
-rw-r--r--src/components/styles/default/ProgressBarStyle.qml (renamed from components/styles/default/ProgressBarStyle.qml)0
-rw-r--r--src/components/styles/default/RadioButtonStyle.qml (renamed from components/styles/default/RadioButtonStyle.qml)0
-rw-r--r--src/components/styles/default/ScrollIndicatorStyle.qml (renamed from components/styles/default/ScrollIndicatorStyle.qml)0
-rw-r--r--src/components/styles/default/SliderStyle.qml (renamed from components/styles/default/SliderStyle.qml)0
-rw-r--r--src/components/styles/default/SpinBoxStyle.qml (renamed from components/styles/default/SpinBoxStyle.qml)0
-rw-r--r--src/components/styles/default/SwitchStyle.qml (renamed from components/styles/default/SwitchStyle.qml)0
-rw-r--r--src/components/styles/default/TextFieldStyle.qml (renamed from components/styles/default/TextFieldStyle.qml)0
-rw-r--r--src/components/styles/default/images/button_normal.png (renamed from components/styles/default/images/button_normal.png)bin877 -> 877 bytes
-rw-r--r--src/components/styles/default/images/button_pressed.png (renamed from components/styles/default/images/button_pressed.png)bin803 -> 803 bytes
-rw-r--r--src/components/styles/default/images/buttongroup_h_normal.png (renamed from components/styles/default/images/buttongroup_h_normal.png)bin482 -> 482 bytes
-rw-r--r--src/components/styles/default/images/buttongroup_h_pressed.png (renamed from components/styles/default/images/buttongroup_h_pressed.png)bin386 -> 386 bytes
-rw-r--r--src/components/styles/default/images/checkbox_check.png (renamed from components/styles/default/images/checkbox_check.png)bin557 -> 557 bytes
-rw-r--r--src/components/styles/default/images/handle.png (renamed from components/styles/default/images/handle.png)bin1529 -> 1529 bytes
-rw-r--r--src/components/styles/default/images/lineedit_normal.png (renamed from components/styles/default/images/lineedit_normal.png)bin794 -> 794 bytes
-rw-r--r--src/components/styles/default/images/progress-bar-background.png (renamed from components/styles/default/images/progress-bar-background.png)bin484 -> 484 bytes
-rw-r--r--src/components/styles/default/images/progress-bar-bar.png (renamed from components/styles/default/images/progress-bar-bar.png)bin548 -> 548 bytes
-rw-r--r--src/components/styles/default/images/progressbar_fill.png (renamed from components/styles/default/images/progressbar_fill.png)bin992 -> 992 bytes
-rw-r--r--src/components/styles/default/images/progressbar_groove.png (renamed from components/styles/default/images/progressbar_groove.png)bin492 -> 492 bytes
-rw-r--r--src/components/styles/default/images/progressbar_indeterminate.png (renamed from components/styles/default/images/progressbar_indeterminate.png)bin1152 -> 1152 bytes
-rw-r--r--src/components/styles/default/images/progressbar_overlay.png (renamed from components/styles/default/images/progressbar_overlay.png)bin284 -> 284 bytes
-rw-r--r--src/components/styles/default/images/qt-logo.png (renamed from components/styles/default/images/qt-logo.png)bin954 -> 954 bytes
-rw-r--r--src/components/styles/default/images/radiobutton_check.png (renamed from components/styles/default/images/radiobutton_check.png)bin1331 -> 1331 bytes
-rw-r--r--src/components/styles/default/images/radiobutton_check_white.png (renamed from components/styles/default/images/radiobutton_check_white.png)bin1310 -> 1310 bytes
-rw-r--r--src/components/styles/default/images/radiobutton_normal.png (renamed from components/styles/default/images/radiobutton_normal.png)bin1752 -> 1752 bytes
-rw-r--r--src/components/styles/default/images/slider-background.png (renamed from components/styles/default/images/slider-background.png)bin293 -> 293 bytes
-rw-r--r--src/components/styles/default/images/slider-handle-active.png (renamed from components/styles/default/images/slider-handle-active.png)bin506 -> 506 bytes
-rw-r--r--src/components/styles/default/images/slider-handle.png (renamed from components/styles/default/images/slider-handle.png)bin516 -> 516 bytes
-rw-r--r--src/components/styles/default/images/slider.png (renamed from components/styles/default/images/slider.png)bin617 -> 617 bytes
-rw-r--r--src/components/styles/default/images/spinbox_down.png (renamed from components/styles/default/images/spinbox_down.png)bin347 -> 347 bytes
-rw-r--r--src/components/styles/default/images/spinbox_up.png (renamed from components/styles/default/images/spinbox_up.png)bin341 -> 341 bytes
-rw-r--r--src/components/styles/default/images/spinner.png (renamed from components/styles/default/images/spinner.png)bin2629 -> 2629 bytes
-rw-r--r--src/components/styles/default/images/switch_normal.png (renamed from components/styles/default/images/switch_normal.png)bin834 -> 834 bytes
-rw-r--r--src/components/styles/default/images/switch_pressed.png (renamed from components/styles/default/images/switch_pressed.png)bin709 -> 709 bytes
-rw-r--r--src/components/styles/default/tools/ColorConverter.qml (renamed from components/styles/default/tools/ColorConverter.qml)0
-rw-r--r--src/components/visuals/AdjoiningCorner.qml (renamed from components/visuals/AdjoiningCorner.qml)0
-rw-r--r--src/components/visuals/AdjoiningVisual.qml (renamed from components/visuals/AdjoiningVisual.qml)0
-rw-r--r--src/desktop.pro2
-rw-r--r--src/styleitem/qstyleitem.cpp (renamed from examples/desktop/src/qstyleitem.cpp)0
-rw-r--r--src/styleitem/qstyleitem.h (renamed from examples/desktop/src/qstyleitem.h)0
-rw-r--r--src/styleitem/qstyleplugin.cpp (renamed from examples/desktop/src/qstyleplugin.cpp)0
-rw-r--r--src/styleitem/qstyleplugin.h (renamed from examples/desktop/src/qstyleplugin.h)0
-rw-r--r--tests/auto/ComponentTestCase.js70
-rw-r--r--tests/auto/ComponentTestCase.qml75
-rw-r--r--tests/auto/README13
-rw-r--r--tests/auto/SpecBusyIndicator.qml58
-rw-r--r--tests/auto/SpecButton.qml75
-rw-r--r--tests/auto/SpecButtonColumn.qml60
-rw-r--r--tests/auto/SpecButtonRow.qml60
-rw-r--r--tests/auto/SpecCheckBox.qml62
-rw-r--r--tests/auto/SpecProgressBar.qml64
-rw-r--r--tests/auto/SpecRadioButton.qml62
-rw-r--r--tests/auto/SpecScrollDecorator.qml69
-rw-r--r--tests/auto/SpecSlider.qml69
-rw-r--r--tests/auto/SpecTextArea.qml81
-rw-r--r--tests/auto/SpecTextField.qml85
-rw-r--r--tests/auto/auto.pro6
-rw-r--r--tests/auto/data/nokia_logo.pngbin1979 -> 0 bytes
-rw-r--r--tests/auto/data/qt_logo.pngbin14796 -> 0 bytes
-rw-r--r--tests/auto/test_runner.cpp29
-rw-r--r--tests/auto/tst_BusyIndicator.qml36
-rw-r--r--tests/auto/tst_Button.qml107
-rw-r--r--tests/auto/tst_ButtonColumn.qml89
-rw-r--r--tests/auto/tst_ButtonRow.qml89
-rw-r--r--tests/auto/tst_CheckBox.qml70
-rw-r--r--tests/auto/tst_ProgressBar.qml36
-rw-r--r--tests/auto/tst_RadioButton.qml70
-rw-r--r--tests/auto/tst_ScrollDecorator.qml36
-rw-r--r--tests/auto/tst_Slider.qml36
-rw-r--r--tests/auto/tst_TextArea.qml284
-rw-r--r--tests/auto/tst_TextField.qml332
-rw-r--r--tests/benchmarks/BasicButtonBenchmark.qml9
-rw-r--r--tests/benchmarks/BenchmarkResults.txt20
-rw-r--r--tests/benchmarks/BusyIndicatorBenchmark.qml9
-rw-r--r--tests/benchmarks/ButtonBenchmark.qml9
-rw-r--r--tests/benchmarks/ButtonBlockBenchmark.qml15
-rw-r--r--tests/benchmarks/ButtonColumnBenchmark.qml13
-rw-r--r--tests/benchmarks/ButtonRowBenchmark.qml13
-rw-r--r--tests/benchmarks/CheckBoxBenchmark.qml9
-rw-r--r--tests/benchmarks/ChoiceListBenchmark.qml23
-rw-r--r--tests/benchmarks/ProgressBarBenchmark.qml9
-rw-r--r--tests/benchmarks/RadioButtonBenchmark.qml9
-rw-r--r--tests/benchmarks/ScrollDecoratorBenchmark.qml11
-rw-r--r--tests/benchmarks/ScrollIndicatorBenchmark.qml12
-rw-r--r--tests/benchmarks/SliderBenchmark.qml9
-rw-r--r--tests/benchmarks/SpinBoxBenchmark.qml9
-rw-r--r--tests/benchmarks/SwitchBenchmark.qml9
-rw-r--r--tests/benchmarks/TextAreaBenchmark.qml9
-rw-r--r--tests/benchmarks/TextFieldBenchmark.qml9
-rw-r--r--tools/StretchBench.qml531
-rw-r--r--tools/stretchbench/StretchBenchBoolOption.qml21
-rw-r--r--tools/stretchbench/images/checkered.pngbin258 -> 0 bytes
-rw-r--r--tools/stretchbench/images/testIcon.pngbin3826 -> 0 bytes
177 files changed, 145 insertions, 5404 deletions
diff --git a/components/ButtonGroup.js b/components/ButtonGroup.js
deleted file mode 100644
index f2d00002..00000000
--- a/components/ButtonGroup.js
+++ /dev/null
@@ -1,127 +0,0 @@
-var self;
-var clickHandlers = [];
-var visibleButtons = [];
-var nonVisibleButtons = [];
-var direction;
-var exclusive;
-
-function create(that, options) {
- self = that;
- direction = options.direction || Qt.Horizontal;
- exclusive = self.exclusive|| options.exclusive;
- self.childrenChanged.connect(rebuild);
-// self.widthChanged.connect(resizeChildren);
- build();
-}
-
-function isButton(item) {
- if (item && item["__position"] !== undefined)
- return true;
- return false;
-}
-
-function hasChecked(item) {
- if (item && item["checked"] !== undefined)
- return true;
- return false;
-}
-
-function destroy() {
- self.childrenChanged.disconnect(rebuild);
-// self.widthChanged.disconnect(resizeChildren);
- cleanup();
-}
-
-function build() {
- visibleButtons = [];
- nonVisibleButtons = [];
-
- for (var i = 0, item; (item = self.children[i]); i++) {
- if (!hasChecked(item))
- continue;
-
- item.visibleChanged.connect(rebuild); // Not optimal, but hardly a bottleneck in your app
- if (!item.visible) {
- nonVisibleButtons.push(item);
- continue;
- }
- visibleButtons.push(item);
-
- if (exclusive && hasChecked(item)) {
- if (item["checkable"]!==undefined) {
- item.checkable = true;
- }
- clickHandlers[i] = checkExclusive(item);
- item.clicked.connect(clickHandlers[i]);
- }
- }
-
- if (self.checkedButton && !self.checkedButton.visible)
- self.checkedButton = undefined;
-
- var nrButtons = visibleButtons.length;
- if (nrButtons == 0)
- return;
-
- if (nrButtons == 1) {
- finishButton(visibleButtons[0], "only");
- } else {
- finishButton(visibleButtons[0], direction == Qt.Horizontal ? "leftmost" : "top");
- for (var i = 1; i < nrButtons - 1; i++)
- finishButton(visibleButtons[i], direction == Qt.Horizontal ? "h_middle": "v_middle");
- finishButton(visibleButtons[nrButtons - 1], direction == Qt.Horizontal ? "rightmost" : "bottom");
- }
-}
-
-function finishButton(button, position) {
- if (isButton(button)) {
- button.__position = position;
- if (direction == Qt.Vertical) {
- button.anchors.left = self.left
- button.anchors.right = self.right
- }
- }
-}
-
-function cleanup() {
- visibleButtons.forEach(function(item, i) {
- if (clickHandlers[i])
- item.clicked.disconnect(clickHandlers[i]);
- item.visibleChanged.disconnect(rebuild);
- });
- clickHandlers = [];
-
- nonVisibleButtons.forEach(function(item, i) {
- item.visibleChanged.disconnect(rebuild);
- });
-}
-
-function rebuild() {
- cleanup();
- build();
-}
-
-function resizeChildren() {
- if (direction != Qt.Horizontal)
- return;
-
- var extraPixels = self.width % visibleButtons;
- var buttonSize = (self.width - extraPixels) / visibleButtons;
- visibleButtons.forEach(function(item, i) {
- if (!item || !item.visible)
- return;
- item.width = buttonSize + (extraPixels > 0 ? 1 : 0);
- if (extraPixels > 0)
- extraPixels--;
- });
-}
-
-function checkExclusive(item) {
- var button = item;
- return function() {
- for (var i = 0, ref; (ref = visibleButtons[i]); i++) {
- ref.checked = button === ref;
- }
- self.checkedButton = button;
- }
-}
diff --git a/components/components.pro b/components/components.pro
deleted file mode 100644
index be0663d7..00000000
--- a/components/components.pro
+++ /dev/null
@@ -1,49 +0,0 @@
-TEMPLATE = subdirs # XXX: Avoid call the linker
-TARGETPATH = Qt/labs/components/custom
-
-symbian {
- INSTALL_IMPORTS = /resource/qt/imports
-} else {
- INSTALL_IMPORTS = $$[QT_INSTALL_IMPORTS]
-}
-
-QML_FILES = \
- qmldir \
- BasicButton.qml \
- BusyIndicator.qml \
- ButtonBlock.qml \
- ButtonColumn.qml \
- ButtonRow.qml \
- ButtonGroup.js \
- Button.qml \
- CheckBox.qml \
- ChoiceList.qml \
- ProgressBar.qml \
- RadioButton.qml \
- ScrollDecorator.qml \
- ScrollIndicator.qml \
- Slider.qml \
- SpinBox.qml \
- Switch.qml \
- TextArea.qml \
- TextField.qml
-
-QML_DIRS = \
- behaviors \
- private \
- styles \
- visuals
-
-qmlfiles.files = $$QML_FILES
-qmlfiles.sources = $$QML_FILES
-qmlfiles.path = $$INSTALL_IMPORTS/$$TARGETPATH
-
-qmldirs.files = $$QML_DIRS
-qmldirs.sources = $$QML_DIRS
-qmldirs.path = $$INSTALL_IMPORTS/$$TARGETPATH
-
-INSTALLS += qmlfiles qmldirs
-
-symbian {
- DEPLOYMENT += qmlfiles qmldirs
-}
diff --git a/components/qmldir b/components/qmldir
deleted file mode 100644
index 6e256a81..00000000
--- a/components/qmldir
+++ /dev/null
@@ -1,17 +0,0 @@
-BasicButton 1.0 BasicButton.qml
-BusyIndicator 1.0 BusyIndicator.qml
-ButtonBlock 1.0 ButtonBlock.qml
-Button 1.0 Button.qml
-ButtonColumn 1.0 ButtonColumn.qml
-ButtonRow 1.0 ButtonRow.qml
-CheckBox 1.0 CheckBox.qml
-ChoiceList 1.0 ChoiceList.qml
-ProgressBar 1.0 ProgressBar.qml
-RadioButton 1.0 RadioButton.qml
-ScrollDecorator 1.0 ScrollDecorator.qml
-ScrollIndicator 1.0 ScrollIndicator.qml
-Slider 1.0 Slider.qml
-SpinBox 1.0 SpinBox.qml
-Switch 1.0 Switch.qml
-TextArea 1.0 TextArea.qml
-TextField 1.0 TextField.qml
diff --git a/custom-style.pro b/desktop.pro
index e4fc550a..e4fc550a 100644
--- a/custom-style.pro
+++ b/desktop.pro
diff --git a/examples/desktop/browser.qml b/examples/Browser.qml
index c0ab7bbb..c0ab7bbb 100644
--- a/examples/desktop/browser.qml
+++ b/examples/Browser.qml
diff --git a/examples/Gallery.qml b/examples/Gallery.qml
index b63f73e6..3f4e39e5 100644
--- a/examples/Gallery.qml
+++ b/examples/Gallery.qml
@@ -1,404 +1,173 @@
import QtQuick 1.0
-import "../components"
+import "widgets"
Rectangle {
+ width: 540
+ height: 340
+
+ ToolBar{
+ id:toolbar
+ width:parent.width
+ height:40
+ Row {
+ spacing:2
+
+ ToolButton{iconSource: "images/folder_new.png"}
+ ToolButton{iconSource: "images/folder_new.png"}
+ ToolButton{iconSource: "images/folder_new.png"}
+ CheckBox{
+ id:enabledCheck
+ text:"Enabled"
+ checked:true
+ anchors.verticalCenter:parent.verticalCenter
+ }
+ CheckBox{
+ id:animateCheck
+ text:"Animated"
+ checked:false
+ anchors.verticalCenter:parent.verticalCenter
+ }
+ CheckBox{
+ text:"South Tab"
+ id:toolBarPosition
+ checked:false
+ anchors.verticalCenter:parent.verticalCenter
+ }
+ }
+ }
+
SystemPalette{id:syspal}
- width: 4*256
- height: 620
- property string position // jbw: hack for shinybuttonstyle
- property int rowspacing: 24
- property int columnspacing: 14
+ color:syspal.window
- gradient: Gradient{ GradientStop{ position:1 ; color:syspal.window}
- GradientStop{ position:0 ; color:Qt.darker(syspal.window, 1.2)}
+ gradient: Gradient{
+ GradientStop{ position:0 ; color:syspal.window}
+ GradientStop{ position:0.6 ; color:syspal.window}
+ GradientStop{ position:1 ; color:Qt.darker(syspal.window, 1.1)}
}
- Flickable {
- id: flickable
- anchors.fill: parent
- contentHeight: parent.height*2
- Item {
- anchors.top:parent.top
- anchors.left:parent.left
- anchors.leftMargin:20
- anchors.rightMargin:20
+ ListModel {
+ id: choices
+ ListElement { text: "Banana" }
+ ListElement { text: "Orange" }
+ ListElement { text: "Apple" }
+ ListElement { text: "Coconut" }
+ }
- ListModel {
- id: choices
- ListElement { text: "Banana" }
- ListElement { text: "Orange" }
- ListElement { text: "Apple" }
- ListElement { text: "Coconut" }
- }
- Row {
- anchors.fill: parent
- Item {
- width:column1.width+2*rowspacing
- height:column1.height+2*rowspacing
- Column {
- x:rowspacing
- id:column1
- spacing: columnspacing
- anchors.top:parent.top
- anchors.topMargin:6
+ property string loremIpsum:
+ "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor "+
+ "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor "+
+ "incididunt ut labore et dolore magna aliqua.\n Ut enim ad minim veniam, quis nostrud "+
+ "exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. ";
- Text{ font.bold:true; text:"Default:" ; styleColor: "white" ; color:"#333" ; style:"Raised"}
- Button { text:"Push me" }
- ButtonRow {
- Button{ text: "A" }
- Button{ text: "B" }
- }
- TextField { }
- TextArea { placeholderText:"This is a\n multiline control."}
- SpinBox{ }
- Slider { value: 50 }
- Row{
- spacing:rowspacing
- anchors.horizontalCenter:parent.horizontalCenter
- Switch { }
- Switch { checked: true }
- }
- Row{
- CheckBox { } CheckBox { checked:true}
- RadioButton{ } RadioButton { checked:true}
- spacing: rowspacing
- }
- ChoiceList{ model: choices}
- ProgressBar {
- Timer {
- running: true
- repeat: true
- interval: 25
- onTriggered: {
- var next = parent.value + 0.01;
- parent.value = (next > parent.maximumValue) ? parent.minimumValue : next;
- }
- }
- }
- ProgressBar { indeterminate:true }
- Row{
- spacing:rowspacing
- anchors.horizontalCenter:parent.horizontalCenter
- BusyIndicator{}
- BusyIndicator{running:false}
- }
- }
- }
- Item {
- width:column2.width+2*rowspacing
- height:column2.height+2*rowspacing
+ TabFrame {
+ id:frame
+ position: toolBarPosition.checked ? "South" : "North"
+ tabbar: TabBar{parent:frame}
+ anchors.top:toolbar.bottom
+ anchors.bottom:parent.bottom
+ anchors.right:parent.right
+ anchors.left:parent.left
+ Tab {
+ title:"Widgets"
+ ScrollArea{
+ id:flickable
+ clip:true
+ anchors.fill:parent
+ frame:false
+ enabled:enabledCheck.checked
+ Row {
+ anchors.margins: 8
+ anchors.fill: parent
+ id:contentRow
Column {
- x:rowspacing
- id:column2
- spacing: columnspacing
- anchors.top:parent.top
- anchors.topMargin:6
-
- Column {
- enabled:false
- spacing: columnspacing
- anchors.topMargin:6
- Text{ font.bold:true; text:"Disabled:" ; styleColor: "white" ; color:"#333" ; style:"Raised"}
- Button { text:"Push me"}
- ButtonRow {
- Button{ text: "A" }
- Button{ text: "B" }
- }
- TextField { }
- TextArea { placeholderText:"This is a\n multiline control."}
- SpinBox{ }
- Slider { value: 50 }
- Row{
- spacing:rowspacing
- anchors.horizontalCenter:parent.horizontalCenter
- Switch { }
- Switch { checked: true }
- }
- Row{
- CheckBox { } CheckBox { checked:true}
- RadioButton{ } RadioButton { checked:true}
- spacing:rowspacing
- }
- ChoiceList{ model: choices}
- ProgressBar {
- Timer {
- running: true
- repeat: true
- interval: 25
- onTriggered: {
- var next = parent.value + 0.01;
- parent.value = (next > parent.maximumValue) ? parent.minimumValue : next;
- }
- }
- }
- ProgressBar { indeterminate:true }
- Row{
- spacing:rowspacing
- anchors.horizontalCenter:parent.horizontalCenter
- BusyIndicator{}
- BusyIndicator{running:false}
- }
+ spacing:6
+ SequentialAnimation on x {
+ running: animateCheck.checked
+ NumberAnimation { from:0 ; to: -flickable.width; easing.type:Easing.OutCubic; duration:600}
+ PauseAnimation { duration: 2000 }
+ NumberAnimation { from:-flickable.width; to:0; easing.type:Easing.OutCubic; duration:600}
+ alwaysRunToEnd: true
+ loops: Animation.Infinite
}
- }
- }
- Rectangle{
- width:column3.width+2*rowspacing
- height:column3.height+2*rowspacing
- color:"#666"
- border.color:"#444"
- Column {
- x:rowspacing
- id:column3
- spacing: columnspacing
- anchors.top:parent.top
- anchors.topMargin:6
- property color bg: "#444"
- property color fg: "#eee"
- property color pg: "#f70"
- Text{ font.bold:true; text:"Colored:" ; styleColor: "#333" ; color:"white" ; style:"Raised"}
- Button { text:"Push me" ; backgroundColor: column3.bg; textColor: column3.fg}
- ButtonRow {
- Button{ text: "A" ; backgroundColor: column3.bg}
- Button{ text: "B" ; backgroundColor: column3.bg}
- }
- TextField { backgroundColor: column3.bg; textColor: column3.fg}
- TextArea { placeholderText:"This is a\n multiline control."; backgroundColor: column3.bg; textColor: column3.fg}
- SpinBox{ backgroundColor: column3.bg; textColor: column3.fg}
- Slider { value: 50; backgroundColor: column3.bg; progressColor: column3.pg;}
- Row{
- spacing:rowspacing
- anchors.horizontalCenter:parent.horizontalCenter
- Switch { switchColor: column3.bg; backgroundColor: column3.bg; positiveHighlightColor:column3.pg}
- Switch { switchColor: column3.bg; backgroundColor: column3.bg; positiveHighlightColor:column3.pg; checked: true }
- }
- Row{
- CheckBox { backgroundColor: checked ? column3.pg : column3.bg; ColorAnimation on backgroundColor {} }
- CheckBox { checked:true; backgroundColor: checked ? column3.pg : column3.bg; ColorAnimation on backgroundColor {}}
- RadioButton{ backgroundColor: checked ? column3.pg : column3.bg ; ColorAnimation on backgroundColor {}}
- RadioButton { checked:true; backgroundColor: checked ? column3.pg : column3.bg; ColorAnimation on backgroundColor {} }
- spacing:rowspacing
- }
- ChoiceList{ model: choices; backgroundColor: column3.bg; textColor: column3.fg}
- ProgressBar {
- backgroundColor: column3.bg;
- progressColor: column3.pg
- Timer {
- running: true
- repeat: true
- interval: 25
- onTriggered: {
- var next = parent.value + 0.01;
- parent.value = (next > parent.maximumValue) ? parent.minimumValue : next;
+ Row {
+ spacing:4
+ Repeater {
+ model: ["Button 1", "Button 2"]
+ Button { text:modelData
+ rotation: 0
+ smooth:true
+ width:98
}
}
}
- ProgressBar{ indeterminate:true; backgroundColor: column3.bg; progressColor: column3.pg}
- Row{
- spacing:rowspacing
- anchors.horizontalCenter:parent.horizontalCenter
- BusyIndicator{}
- BusyIndicator{running:false}
+ ChoiceList{model:choices}
+ SpinBox{}
+ TextField{text:"TextField"}
+ TextArea{text:"TextArea\n"}
+ ProgressBar {
+ // normalize value [0.0 .. 1.0]
+ value: (slider.value - slider.minimumValue) / (slider.maximumValue - slider.minimumValue)
}
+ Slider {id:slider; value:50}
+ smooth:true
}
}
- Rectangle{
- width:column3.width+2*rowspacing
- height:column3.height+2*rowspacing
- color:"#ccc"
- border.color:"#444"
- Column {
- x:rowspacing
- id:column4
- spacing: columnspacing
- anchors.top:parent.top
- anchors.topMargin:6
-
- Text{ font.bold:true; text:"Custom:" ; styleColor: "white" ; color:"#333" ; style:"Raised"}
- Button { text:"Push me" ; background: shinyButton;}
- ButtonRow {
- Button { text: "A" ; background:shinyButton}
- Button{ text: "B" ; background:shinyButton}
- }
- TextField { background: shinyEdit}
- TextArea { placeholderText:"This is a\n multiline control."; background: shinyEdit}
- SpinBox{
- background: shinyEdit
- leftMargin: 40
- rightMargin: 40
- up: BorderImage {
- width:height;
- source:pressed ?
- "customtheme/exampletheme/images/button_pressed.png" :
- "customtheme/exampletheme/images/button_normal.png"
- anchors.left:parent.left
- anchors.top:parent.top
- anchors.bottom:parent.bottom
- border.left:6; border.right:6; border.top:6; border.bottom:6
- Text{ text:"+" ; anchors.centerIn:parent}
- }
- down: BorderImage{
- width:height;
- source:pressed ?
- "customtheme/exampletheme/images/button_pressed.png" :
- "customtheme/exampletheme/images/button_normal.png"
- anchors.right:parent.right
- anchors.top:parent.top
- anchors.bottom:parent.bottom
- border.left:6; border.right:6; border.top:6; border.bottom:6
- Text{ text:"-" ; anchors.centerIn:parent}
- }
- }
- Slider {
- value: 50
- height: 20
- leftMargin:10
- rightMargin:10
- handle: BorderImage{source:"customtheme/exampletheme/images/button_normal.png";
- width:20; height:20
- border.left:7; border.right: 7; border.top:7; border.bottom:7
- }
- groove: Item {
- anchors.fill:parent
- BorderImage {
- source: "customtheme/exampletheme/images/edit_normal.png"
- width: parent.width;
- height:20; smooth:true
- border.left: 4; border.right: 4
- border.top:4; border.bottom:4
- }
- }
- }
- Row{
- spacing:rowspacing
- Switch {
- id:aa
- groove: shinyEdit;
- handle: handle
- }
- Switch {
- id:bb
- groove: shinyEdit;
- handle: handle
- checked: true
- }
- Component {
- id:handle
- BorderImage {
- width:bb.height
- height:bb.height
- source: parent.pressed ? "customtheme/exampletheme/images/button_pressed.png":"customtheme/exampletheme/images/button_normal.png"
- border.left: 6; border.top: 6
- border.right: 6; border.bottom: 6
- }
- }
- }
+ Column {
+ id:rightcol
+ x:220; y:8
+ spacing: 12
+ GroupBox{
+ id:group1
+ text:"CheckBox"
Row {
- CheckBox { background: shinyCheckBackground; checkmark: shinyCheckMark }
- CheckBox { background: shinyCheckBackground; checkmark: shinyCheckMark; checked: true}
- RadioButton { background: shinyCheckBackground; checkmark: shinyCheckMark }
- RadioButton { background: shinyCheckBackground; checkmark: shinyCheckMark; checked: true}
- spacing: rowspacing
- }
-
- ChoiceList{ model: choices; background: shinyButton; popupFrame: shinyButton}
-
- ProgressBar {
- Timer {
- running: true
- repeat: true
- interval: 25
- onTriggered: {
- var next = parent.value + 0.01;
- parent.value = (next > parent.maximumValue) ? parent.minimumValue : next;
- }
- }
-
- progress: shinyBar
- background: shinyEdit
- indeterminateProgress: shinyBar
+ spacing: 8
+ anchors.fill:parent
+ CheckBox{text:"Check 1"}
+ CheckBox{text:"Check 2";checked:true}
+ }
+ RotationAnimation on rotation {
+ from:0; to:360;
+ easing.type:Easing.OutCubic; duration:1000;
+ running: animateCheck.checked
+ alwaysRunToEnd: true
+ loops: Animation.Infinite
}
-
- ProgressBar {
- indeterminate:true
- progress: shinyBar
- indeterminateProgress: shinyBar
+ }
+ GroupBox{
+ id:group2
+ text:"Radio Buttons"
+ ButtonRow {
+ RadioButton{id:radio1; text:"Radio 1"}
+ RadioButton{id:radio2; text:"Radio 2"}
}
- Row{
- spacing:rowspacing
- anchors.horizontalCenter:parent.horizontalCenter
- BusyIndicator{background:shinySpinner}
- BusyIndicator{background:shinySpinner; running:false}
+ RotationAnimation on rotation {
+ from:0; to:360;
+ easing.type: Easing.OutCubic
+ duration: 1000
+ running: animateCheck.checked
+ alwaysRunToEnd: true
+ loops: Animation.Infinite
}
}
- }
- }
- Component{
- id:shinySpinner
- BorderImage {
- width:30; height:30
- source: "customtheme/exampletheme/images/button_normal.png"
- border.top:4 ; border.left:4 ; border.bottom:4 ; border.right:4
- Timer { running: true; repeat: true; interval: 25; onTriggered: opacity}
- PropertyAnimation on opacity {
- running: parent.running;
- easing.type:Easing.OutSine
- loops:Animation.Infinite;
- from:1; to:0; duration:500}
- }
- }
- Component{
- id:shinyBar
- BorderImage {
- source: "customtheme/exampletheme/images/button_normal.png"
- visible: styledItem.value > 0
- border.top:4 ; border.left:4 ; border.bottom:4 ; border.right:4
- }
- }
- Component {
- id: shinyCheckBackground
- BorderImage {
- width: styledItem.implicitWidth; height: styledItem.implicitHeight
- source: "customtheme/exampletheme/images/edit_normal.png"
- border.left: 6; border.top: 6
- border.right: 6; border.bottom: 6
- }
- }
- Component{
- id: shinyCheckMark
- Image {
- visible: styledItem.checked || styledItem.pressed ? 1 : 0
- opacity: !enabled || styledItem.pressed ? 0.7 : 1
- source: "customtheme/exampletheme/images/checkbox_check.png"
- }
- }
- Component{
- id:shinyButton
- Item {
- clip:true
- BorderImage {
- x:position == "rightmost" ? -2 : 0
- width:parent.width + (position == "leftmost" ? 5 : 0)
- height:parent.height
- source: styledItem.pressed ? "customtheme/exampletheme/images/button_pressed.png":
- "customtheme/exampletheme/images/button_normal.png"
- border.left: 6; border.top: 6
- border.right: 6; border.bottom: 6
+ TextScrollArea {
+ id:area
+ text: loremIpsum + loremIpsum
}
}
}
- Component {
- id: shinyEdit
- BorderImage {
- source: "customtheme/exampletheme/images/edit_normal.png"
- border.left: 6; border.top: 6
- border.right: 6; border.bottom: 6
- }
+ }
+ Tab {
+ title:"More"
+ Rectangle {
+ anchors.fill:parent
+ }
+ }
+ Tab {
+ title:"Stuff"
+ Rectangle {
+ anchors.fill:parent
}
}
- }
-
- ScrollDecorator {
- flickableItem: flickable
}
}
diff --git a/examples/customtheme/customtheme.qml b/examples/customtheme/customtheme.qml
deleted file mode 100644
index b512408d..00000000
--- a/examples/customtheme/customtheme.qml
+++ /dev/null
@@ -1,29 +0,0 @@
-import QtQuick 1.0
-import "exampletheme"
-
-Rectangle {
- width: 4*240
- height: 440
-
- Item {
- anchors.margins:8
- anchors.fill:parent
- Column {
- spacing:6
- Row {
- spacing:6
- Repeater {
- model: ["Button 1", "Button 2", "Button 3" ]
- Button { text:modelData }
- }
- }
- TextField { text:modelData }
- Slider { value:50 }
- Row {
- spacing:4
- CheckBox { }
- RadioButton { }
- }
- }
- }
-}
diff --git a/examples/customtheme/exampletheme/Button.qml b/examples/customtheme/exampletheme/Button.qml
deleted file mode 100644
index 73510a09..00000000
--- a/examples/customtheme/exampletheme/Button.qml
+++ /dev/null
@@ -1,18 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-
-Components.Button {
- leftMargin:12
- rightMargin:1
- minimumWidth:100
-
- background: BorderImage {
- source: pressed ? "images/button_pressed.png" :
- "images/button_normal.png"
- border.top:8
- border.bottom:8
- border.left:8
- border.right:8
- }
-}
-
diff --git a/examples/customtheme/exampletheme/CheckBox.qml b/examples/customtheme/exampletheme/CheckBox.qml
deleted file mode 100644
index a6694bea..00000000
--- a/examples/customtheme/exampletheme/CheckBox.qml
+++ /dev/null
@@ -1,18 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-
-Components.CheckBox{
- background: BorderImage {
- source: "images/edit_normal.png"
- border.top:6
- border.bottom:6
- border.left:6
- border.right:8
- }
- checkmark:Image{
- anchors.centerIn:parent
- source: "images/checkbox_check.png"
- Behavior on opacity { NumberAnimation{easing.type:Easing.OutCubic}}
- }
-}
-
diff --git a/examples/customtheme/exampletheme/LineEdit.qml b/examples/customtheme/exampletheme/LineEdit.qml
deleted file mode 100644
index 4030528f..00000000
--- a/examples/customtheme/exampletheme/LineEdit.qml
+++ /dev/null
@@ -1,18 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-
-Components.TextField {
- leftMargin:12
- rightMargin:12
- minimumWidth:200
-
- background: BorderImage {
- height:30
- width:parent.width
- source: "images/edit_normal.png"
- border.top:6
- border.bottom:6
- border.left:6
- border.right:8
- }
-}
diff --git a/examples/customtheme/exampletheme/RadioButton.qml b/examples/customtheme/exampletheme/RadioButton.qml
deleted file mode 100644
index a59f674f..00000000
--- a/examples/customtheme/exampletheme/RadioButton.qml
+++ /dev/null
@@ -1,15 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-
-Components.RadioButton{
- background: Image{
- source: "images/radiobutton_normal.png"
- }
-
- checkmark:Image{
- anchors.centerIn:parent
- source: "images/radiobutton_check.png"
- Behavior on opacity { NumberAnimation{easing.type:Easing.OutCubic}}
- }
-}
-
diff --git a/examples/customtheme/exampletheme/Slider.qml b/examples/customtheme/exampletheme/Slider.qml
deleted file mode 100644
index 78cbf760..00000000
--- a/examples/customtheme/exampletheme/Slider.qml
+++ /dev/null
@@ -1,47 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-
-Components.Slider{
-
- minimumWidth:160
- minimumHeight:32
-
- handle: BorderImage {
- width:20
- source: pressed ? "images/button_pressed.png" :
- "images/button_normal.png"
- border.top:6 ; border.bottom:6
- border.left:6 ; border.right:6
-
- BorderImage {
- id: name
- source: "images/label.png"
- border.top:12
- border.bottom:12
- anchors.bottom:parent.top
- height: 30
- Text{
- anchors.centerIn:parent
- anchors.verticalCenterOffset:-4
- id:label
- text:value
- color:"white"
- }
- opacity: pressed
- Behavior on opacity { NumberAnimation{easing.type:Easing.OutCubic } }
- }
- }
-
- groove: Item {
- BorderImage {
- height:12
- width:parent.width
- anchors.verticalCenter:parent.verticalCenter
- source: "images/edit_normal.png"
- border.top:4
- border.bottom:4
- border.left:4
- border.right:4
- }
- }
-}
diff --git a/examples/customtheme/exampletheme/images/button_normal.png b/examples/customtheme/exampletheme/images/button_normal.png
deleted file mode 100644
index 14b352e0..00000000
--- a/examples/customtheme/exampletheme/images/button_normal.png
+++ /dev/null
Binary files differ
diff --git a/examples/customtheme/exampletheme/images/button_pressed.png b/examples/customtheme/exampletheme/images/button_pressed.png
deleted file mode 100644
index 415dad54..00000000
--- a/examples/customtheme/exampletheme/images/button_pressed.png
+++ /dev/null
Binary files differ
diff --git a/examples/customtheme/exampletheme/images/checkbox_check.png b/examples/customtheme/exampletheme/images/checkbox_check.png
deleted file mode 100644
index c69b5bce..00000000
--- a/examples/customtheme/exampletheme/images/checkbox_check.png
+++ /dev/null
Binary files differ
diff --git a/examples/customtheme/exampletheme/images/edit_normal.png b/examples/customtheme/exampletheme/images/edit_normal.png
deleted file mode 100644
index b846ecca..00000000
--- a/examples/customtheme/exampletheme/images/edit_normal.png
+++ /dev/null
Binary files differ
diff --git a/examples/customtheme/exampletheme/images/label.png b/examples/customtheme/exampletheme/images/label.png
deleted file mode 100644
index 69491591..00000000
--- a/examples/customtheme/exampletheme/images/label.png
+++ /dev/null
Binary files differ
diff --git a/examples/customtheme/exampletheme/images/radiobutton_check.png b/examples/customtheme/exampletheme/images/radiobutton_check.png
deleted file mode 100644
index dc51ce85..00000000
--- a/examples/customtheme/exampletheme/images/radiobutton_check.png
+++ /dev/null
Binary files differ
diff --git a/examples/customtheme/exampletheme/images/radiobutton_normal.png b/examples/customtheme/exampletheme/images/radiobutton_normal.png
deleted file mode 100644
index 2a5760f3..00000000
--- a/examples/customtheme/exampletheme/images/radiobutton_normal.png
+++ /dev/null
Binary files differ
diff --git a/examples/desktop/Tab/Tab.qml b/examples/desktop/Tab/Tab.qml
deleted file mode 100644
index a43b8f58..00000000
--- a/examples/desktop/Tab/Tab.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-import Qt 4.7
-
-QtObject {
- property string title
- default property Item content
-}
diff --git a/examples/desktop/Tab/Tab.qmlproject b/examples/desktop/Tab/Tab.qmlproject
deleted file mode 100644
index 53f5ecb8..00000000
--- a/examples/desktop/Tab/Tab.qmlproject
+++ /dev/null
@@ -1,18 +0,0 @@
-/* File generated by QtCreator */
-
-import QmlProject 1.0
-
-Project {
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
- /* List of plugin directories passed to QML runtime */
- // importPaths: [ "../exampleplugin" ]
-}
diff --git a/examples/desktop/desktop.pro b/examples/desktop/desktop.pro
deleted file mode 100644
index 65d92622..00000000
--- a/examples/desktop/desktop.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = src
diff --git a/examples/desktop/gallery.qml b/examples/desktop/gallery.qml
deleted file mode 100644
index 3f4e39e5..00000000
--- a/examples/desktop/gallery.qml
+++ /dev/null
@@ -1,173 +0,0 @@
-import QtQuick 1.0
-import "widgets"
-
-Rectangle {
- width: 540
- height: 340
-
- ToolBar{
- id:toolbar
- width:parent.width
- height:40
- Row {
- spacing:2
-
- ToolButton{iconSource: "images/folder_new.png"}
- ToolButton{iconSource: "images/folder_new.png"}
- ToolButton{iconSource: "images/folder_new.png"}
- CheckBox{
- id:enabledCheck
- text:"Enabled"
- checked:true
- anchors.verticalCenter:parent.verticalCenter
- }
- CheckBox{
- id:animateCheck
- text:"Animated"
- checked:false
- anchors.verticalCenter:parent.verticalCenter
- }
- CheckBox{
- text:"South Tab"
- id:toolBarPosition
- checked:false
- anchors.verticalCenter:parent.verticalCenter
- }
- }
- }
-
- SystemPalette{id:syspal}
- color:syspal.window
-
- gradient: Gradient{
- GradientStop{ position:0 ; color:syspal.window}
- GradientStop{ position:0.6 ; color:syspal.window}
- GradientStop{ position:1 ; color:Qt.darker(syspal.window, 1.1)}
- }
-
- ListModel {
- id: choices
- ListElement { text: "Banana" }
- ListElement { text: "Orange" }
- ListElement { text: "Apple" }
- ListElement { text: "Coconut" }
- }
-
- property string loremIpsum:
- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor "+
- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor "+
- "incididunt ut labore et dolore magna aliqua.\n Ut enim ad minim veniam, quis nostrud "+
- "exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. ";
-
- TabFrame {
- id:frame
- position: toolBarPosition.checked ? "South" : "North"
- tabbar: TabBar{parent:frame}
- anchors.top:toolbar.bottom
- anchors.bottom:parent.bottom
- anchors.right:parent.right
- anchors.left:parent.left
- Tab {
- title:"Widgets"
- ScrollArea{
- id:flickable
- clip:true
- anchors.fill:parent
- frame:false
- enabled:enabledCheck.checked
- Row {
- anchors.margins: 8
- anchors.fill: parent
- id:contentRow
- Column {
- spacing:6
- SequentialAnimation on x {
- running: animateCheck.checked
- NumberAnimation { from:0 ; to: -flickable.width; easing.type:Easing.OutCubic; duration:600}
- PauseAnimation { duration: 2000 }
- NumberAnimation { from:-flickable.width; to:0; easing.type:Easing.OutCubic; duration:600}
- alwaysRunToEnd: true
- loops: Animation.Infinite
- }
-
- Row {
- spacing:4
- Repeater {
- model: ["Button 1", "Button 2"]
- Button { text:modelData
- rotation: 0
- smooth:true
- width:98
- }
- }
- }
- ChoiceList{model:choices}
- SpinBox{}
- TextField{text:"TextField"}
- TextArea{text:"TextArea\n"}
- ProgressBar {
- // normalize value [0.0 .. 1.0]
- value: (slider.value - slider.minimumValue) / (slider.maximumValue - slider.minimumValue)
- }
- Slider {id:slider; value:50}
- smooth:true
- }
- }
- Column {
- id:rightcol
- x:220; y:8
- spacing: 12
- GroupBox{
- id:group1
- text:"CheckBox"
- Row {
- spacing: 8
- anchors.fill:parent
- CheckBox{text:"Check 1"}
- CheckBox{text:"Check 2";checked:true}
- }
- RotationAnimation on rotation {
- from:0; to:360;
- easing.type:Easing.OutCubic; duration:1000;
- running: animateCheck.checked
- alwaysRunToEnd: true
- loops: Animation.Infinite
- }
- }
- GroupBox{
- id:group2
- text:"Radio Buttons"
- ButtonRow {
- RadioButton{id:radio1; text:"Radio 1"}
- RadioButton{id:radio2; text:"Radio 2"}
- }
- RotationAnimation on rotation {
- from:0; to:360;
- easing.type: Easing.OutCubic
- duration: 1000
- running: animateCheck.checked
- alwaysRunToEnd: true
- loops: Animation.Infinite
- }
- }
- TextScrollArea {
- id:area
- text: loremIpsum + loremIpsum
- }
- }
- }
- }
- Tab {
- title:"More"
- Rectangle {
- anchors.fill:parent
- }
- }
- Tab {
- title:"Stuff"
- Rectangle {
- anchors.fill:parent
- }
- }
- }
-}
diff --git a/examples/desktop/images/folder_new.png b/examples/desktop/images/folder_new.png
deleted file mode 100644
index 8d8bb9bd..00000000
--- a/examples/desktop/images/folder_new.png
+++ /dev/null
Binary files differ
diff --git a/examples/desktop/plugin/qmldir b/examples/desktop/plugin/qmldir
deleted file mode 100644
index e8452efd..00000000
--- a/examples/desktop/plugin/qmldir
+++ /dev/null
@@ -1 +0,0 @@
-plugin styleplugin
diff --git a/examples/desktop/src/src.pro b/examples/desktop/src/src.pro
deleted file mode 100644
index b254cd1e..00000000
--- a/examples/desktop/src/src.pro
+++ /dev/null
@@ -1,38 +0,0 @@
-TEMPLATE = lib
-CONFIG += qt plugin
-QT += declarative
-QT += script
-
-TARGET = styleplugin
-
-DESTDIR = ..\\plugin
-OBJECTS_DIR = tmp
-MOC_DIR = tmp
-
-HEADERS += qstyleplugin.h \
- qstyleitem.h
-
-SOURCES += qstyleplugin.cpp \
- qstyleitem.cpp
-
-
-OTHER_FILES += \
- ../widgets/Button.qml \
- ../widgets/CheckBox.qml \
- ../widgets/ChoiceList.qml \
- ../widgets/GroupBox.qml \
- ../widgets/ProgressBar.qml \
- ../widgets/RadioButton.qml \
- ../widgets/ScrollArea.qml \
- ../widgets/ScrollBar.qml \
- ../widgets/Slider.qml \
- ../widgets/SpinBox.qml \
- ../widgets/Switch.qml \
- ../widgets/TextArea.qml \
- ../widgets/TextField.qml \
- ../widgets/ToolBar.qml \
- ../widgets/ToolButton.qml \
- ../gallery.qml \
- ../widgets/Tab.qml \
- ../widgets/TabBar.qml \
- ../widgets/TabFrame.qml
diff --git a/examples/desktop/tabbar.qml b/examples/desktop/tabbar.qml
deleted file mode 100644
index acd13cc9..00000000
--- a/examples/desktop/tabbar.qml
+++ /dev/null
@@ -1,27 +0,0 @@
-import Qt 4.7
-import "widgets"
-
-TabFrame {
- width: 640
- height: 480
-
- Tab{
- title:"First"
- Rectangle{
- color:"red"
- }
- }
- Tab {
- title: "Second"
- Rectangle{
- color:"blue"
- }
- }
- Tab {
- title: "Third"
- Rectangle{
- property string title:"faen 3"
- color:"green"
- }
- }
-}
diff --git a/examples/desktop/widgets/Button.qml b/examples/desktop/widgets/Button.qml
deleted file mode 100644
index 496d37df..00000000
--- a/examples/desktop/widgets/Button.qml
+++ /dev/null
@@ -1,27 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-Components.Button {
- id:button
-
- property int buttonHeight: Math.max(22, styleitem.sizeFromContents(100, 6).height)
- height: buttonHeight
-
- QStyleItem {
- id:styleitem
- elementType:"button"
- sunken: pressed
- raised: !pressed
- hover: containsMouse
- enabled:button.enabled
- text:button.text
- }
-
- background:
- QStyleBackground {
- style:styleitem
- anchors.fill:parent
- }
-}
-
diff --git a/examples/desktop/widgets/ButtonRow.qml b/examples/desktop/widgets/ButtonRow.qml
deleted file mode 100644
index 623c5f44..00000000
--- a/examples/desktop/widgets/ButtonRow.qml
+++ /dev/null
@@ -1,5 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-
-Components.ButtonRow {
-}
diff --git a/examples/desktop/widgets/CheckBox.qml b/examples/desktop/widgets/CheckBox.qml
deleted file mode 100644
index 632dce2d..00000000
--- a/examples/desktop/widgets/CheckBox.qml
+++ /dev/null
@@ -1,26 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-// jb : Size should not depend on background, we should make it consistent
-
-Components.CheckBox{
- id:checkbox
- property variant text
- width:100
- height:18
-
- background: QStyleBackground {
- id:styleitem
- style:QStyleItem {
- elementType:"checkbox"
- sunken:pressed
- on:checked || pressed
- hover:containsMouse
- text:checkbox.text
- enabled:checkbox.enabled
- }
- }
- checkmark: null
-}
-
diff --git a/examples/desktop/widgets/ChoiceList.qml b/examples/desktop/widgets/ChoiceList.qml
deleted file mode 100644
index 5015fbef..00000000
--- a/examples/desktop/widgets/ChoiceList.qml
+++ /dev/null
@@ -1,52 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-Components.ChoiceList {
- id:choicelist
-
- property int buttonHeight: buttonitem.sizeFromContents(100, 18).height
- QStyleItem { id:buttonitem; elementType:"combobox" }
- height: buttonHeight
- topMargin:4
- bottomMargin:4
-
- QStyleItem {
- id:styleitem
- elementType: "combobox"
- sunken: pressed
- raised: !pressed
- hover: containsMouse
- enabled:choicelist.enabled
- }
-
- background: QStyleBackground {
- anchors.fill:parent
- style: styleitem
- }
-
- listItem: Item {
- id:item
-
- height:22
- anchors.left:parent.left
- width:choicelist.width
- QStyleBackground {
- anchors.fill:parent
- style: QStyleItem {
- elementType: "menuitem"
- text: choicelist.model.get(index).text
- selected: highlighted
- }
- }
- }
-
- popupFrame: QStyleBackground {
- property int fw: styleitem.pixelMetric("menupanelwidth");
- anchors.leftMargin: styleitem.pixelMetric("menuhmargin") + fw
- anchors.rightMargin: styleitem.pixelMetric("menuhmargin") + fw
- anchors.topMargin: styleitem.pixelMetric("menuvmargin") + fw
- anchors.bottomMargin: styleitem.pixelMetric("menuvmargin") + fw
- style:QStyleItem{elementType:"menu"}
- }
-}
diff --git a/examples/desktop/widgets/GroupBox.qml b/examples/desktop/widgets/GroupBox.qml
deleted file mode 100644
index 0d45810d..00000000
--- a/examples/desktop/widgets/GroupBox.qml
+++ /dev/null
@@ -1,27 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-Item {
- width:200
- height:46
-
- property alias text: styleitem.text
- default property alias children: content.children
- property bool checkable: false
-
- QStyleBackground {
- anchors.fill:parent
- style: QStyleItem{
- id:styleitem
- elementType:"groupbox"
- }
-
- Item {
- id:content
- anchors.topMargin:22
- anchors.leftMargin:6
- anchors.fill:parent
- }
- }
-}
diff --git a/examples/desktop/widgets/ProgressBar.qml b/examples/desktop/widgets/ProgressBar.qml
deleted file mode 100644
index bf29bcac..00000000
--- a/examples/desktop/widgets/ProgressBar.qml
+++ /dev/null
@@ -1,31 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-Components.ProgressBar {
- id:progressbar
-
- // Align with button
- property int buttonHeight: buttonitem.sizeFromContents(100, 15).height
- QStyleItem { id:buttonitem; elementType:"button" }
- height: buttonHeight
-
- background: QStyleBackground{
- anchors.fill:parent
- style: QStyleItem {
- elementType:"progressbar"
-
- // XXX: since desktop uses int instead of real, the progressbar
- // range [0..1] must be stretched to a good precision
- property int factor : 1000000
-
- value: progressbar.value * factor
- minimum: indeterminate ? 0 : progressbar.minimumValue * factor
- maximum: indeterminate ? 0 : progressbar.maximumValue * factor
- enabled: progressbar.enabled
- }
- }
- indeterminateProgress:null
- progress: null
-}
-
diff --git a/examples/desktop/widgets/RadioButton.qml b/examples/desktop/widgets/RadioButton.qml
deleted file mode 100644
index 3c2c3e54..00000000
--- a/examples/desktop/widgets/RadioButton.qml
+++ /dev/null
@@ -1,26 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-// jb : Size should not depend on background, we should make it consistent
-
-Components.RadioButton{
- id:radiobutton
- property variant text
- width:110
- height:18
-
- background: QStyleBackground {
-
- style: QStyleItem{
- elementType:"radiobutton"
- sunken:pressed
- on:checked || pressed
- hover:containsMouse
- text:radiobutton.text
- enabled:radiobutton.enabled
- }
- }
- checkmark: null
-}
-
diff --git a/examples/desktop/widgets/ScrollArea.qml b/examples/desktop/widgets/ScrollArea.qml
deleted file mode 100644
index 3a904dde..00000000
--- a/examples/desktop/widgets/ScrollArea.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-FocusScope {
- id:scrollarea
- width: 100
- height: 100
-
- property int contentMargin: 1
- property int __scrollbarExtent : styleitem.pixelMetric("scrollbarExtent");
- property int frameWidth: styleitem.pixelMetric("defaultframewidth");
- property int contentHeight : content.childrenRect.height
- property int contentWidth: content.childrenRect.width
- property alias color: flickable.color
- property bool frame: true
- property bool highlightOnFocus: false
-
- default property alias children: content.children
-
- property int contentY
- property int contentX
-
- property bool frameAroundContents: styleitem.styleHint("framearoundcontents")
-
- onContentYChanged: {
- vscrollbar.value = contentY
- }
-
- onContentXChanged: {
- hscrollbar.value = contentX
- }
-
- QStyleBackground {
- style: QStyleItem{
- id:styleitem
- elementType: frame ? "frame" : ""
- sunken: true
- }
- anchors.fill: parent
- anchors.rightMargin: (frameAroundContents && vscrollbar.visible) ? vscrollbar.width + 4 : -frameWidth
- anchors.bottomMargin: (frameAroundContents && hscrollbar.visible) ? hscrollbar.height + 4 : -frameWidth
- anchors.topMargin: (frameAroundContents && hscrollbar.visible) ? hscrollbar.height + 4 : -frameWidth
-
- Rectangle {
- id:flickable
- color: "transparent"
- anchors.fill: parent
- anchors.margins: frame ? 2 : 0
- clip: true
-
- Item {
- id: docmargins
- anchors.fill:parent
- anchors.margins:contentMargin
- Item {
- id: content
- x: -scrollarea.contentX
- y: -scrollarea.contentY
- }
- }
- }
- }
-
- ScrollBar {
- id: hscrollbar
- orientation: Qt.Horizontal
- visible: contentWidth > flickable.width
- maximumValue: contentWidth > flickable.width ? scrollarea.contentWidth - flickable.width : 0
- minimumValue: 0
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.rightMargin: { return (frame ? 1 : 0) + ( vscrollbar.visible ? __scrollbarExtent : 0) }
- onValueChanged: contentX = value
- }
-
- ScrollBar {
- id: vscrollbar
- orientation: Qt.Vertical
- visible: contentHeight > flickable.height
- maximumValue: contentHeight > flickable.height ? scrollarea.contentHeight - flickable.height : 0
- minimumValue: 0
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.bottomMargin: { return (frame ? 1 : 0) + (hscrollbar.visible ? __scrollbarExtent : 0) }
- onValueChanged: contentY = value
- }
-
- QStyleBackground {
- z:2
- anchors.fill:parent
- anchors.margins:-2
- anchors.rightMargin:-4
- anchors.bottomMargin:-4
- visible: highlightOnFocus && parent.activeFocus && styleitem.styleHint("focuswidget")
- style: QStyleItem {
- id:framestyle
- elementType:"focusframe"
- }
- }
-}
diff --git a/examples/desktop/widgets/ScrollBar.qml b/examples/desktop/widgets/ScrollBar.qml
deleted file mode 100644
index ea822b62..00000000
--- a/examples/desktop/widgets/ScrollBar.qml
+++ /dev/null
@@ -1,109 +0,0 @@
-import QtQuick 1.1
-import "../../../components" as Components
-import "../plugin"
-
-MouseArea {
- id:scrollbar
- property int __scrollbarExtent : styleitem.pixelMetric("scrollbarExtent");
- implicitWidth:orientation == Qt.Horizontal ? 200 : __scrollbarExtent;
- implicitHeight:orientation == Qt.Horizontal ? __scrollbarExtent : 200
-
- property int orientation : Qt.Horizontal
- property alias minimumValue: slider.minimumValue
- property alias maximumValue: slider.maximumValue
- property alias value: slider.value
-
- property bool upPressed;
- property bool downPressed;
- property bool __autoincrement: false
-
- // Update hover item
- onEntered: styleitem.activeControl = bgitem.hitTest(mouseX, mouseY)
- onExited: styleitem.activeControl = "none"
- onMouseXChanged: styleitem.activeControl = bgitem.hitTest(mouseX, mouseY)
- hoverEnabled:true
-
- Timer { running: upPressed || downPressed; interval: 350 ; onTriggered: __autoincrement = true }
- Timer { running: __autoincrement; interval: 60 ; repeat: true ;
- onTriggered: upPressed ? decrement() : increment() }
-
- onPressed: {
- var control = bgitem.hitTest(mouseX,mouseY)
- if (control == "up") {
- upPressed = true
- } else if (control == "down") {
- downPressed = true
- }
- }
-
- onReleased: {
- __autoincrement = false;
- if (upPressed) {
- upPressed = false;
- decrement()
- } else if (downPressed) {
- increment()
- downPressed = false;
- }
- }
-
- function increment() {
- value += 30
- if (value > maximumValue)
- value = maximumValue
- }
-
- function decrement() {
- value -= 30
- if (value < minimumValue)
- value = minimumValue
- }
-
- QStyleBackground {
- id:bgitem
- anchors.fill:parent
- style: QStyleItem {
- id:styleitem
- elementType: "scrollbar"
- hover: activeControl != "none"
- activeControl: "none"
- sunken: upPressed | downPressed
- minimum: slider.minimumValue
- maximum: slider.maximumValue
- value: slider.value
- horizontal: orientation == Qt.Horizontal
- enabled: parent.enabled
- }
- }
-
- property variant handleRect
- function updateHandle() {
- handleRect = bgitem.subControlRect("handle")
- var grooveRect = bgitem.subControlRect("groove");
- var extra = 0
- if (orientation == Qt.Vertical) {
- slider.anchors.topMargin = grooveRect.y + extra
- slider.anchors.bottomMargin = height - grooveRect.y - grooveRect.height + extra
- } else {
- slider.anchors.leftMargin = grooveRect.x + extra
- slider.anchors.rightMargin = width - grooveRect.x - grooveRect.width + extra
- }
- }
-
- onValueChanged: updateHandle()
- onMaximumValueChanged: updateHandle()
- onMinimumValueChanged: updateHandle()
- Component.onCompleted: updateHandle()
- Components.Slider {
- id:slider
- anchors.fill:parent
- orientation:scrollbar.orientation
- leftMargin: (orientation === Qt.Horizontal) ? handleRect.width/2 : handleRect.height/2
- rightMargin:leftMargin
- handle: Item { width:orientation == Qt.Vertical ? handleRect.height : handleRect.width;
- height:orientation == Qt.Vertical ? handleRect.width : handleRect.height}
- groove:null
- valueIndicator:null
- inverted:orientation != Qt.Horizontal
- }
-}
diff --git a/examples/desktop/widgets/Slider.qml b/examples/desktop/widgets/Slider.qml
deleted file mode 100644
index c6b9c915..00000000
--- a/examples/desktop/widgets/Slider.qml
+++ /dev/null
@@ -1,31 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-// jens: ContainsMouse breaks drag functionality
-
-Components.Slider{
- id:slider
- minimumWidth:200
-
- // Align with button
- property int buttonHeight: buttonitem.sizeFromContents(100, 15).height
- QStyleItem { id:buttonitem; elementType:"button" }
- height: buttonHeight
-
- groove: QStyleBackground {
- anchors.fill:parent
- style: QStyleItem{
- elementType:"slider"
- sunken: pressed
- maximum:slider.maximumValue
- minimum:slider.minimumValue
- value:slider.value
- horizontal:slider.orientation == Qt.Horizontal
- enabled:slider.enabled
- }
- }
-
- handle: null
- valueIndicator: null
-}
diff --git a/examples/desktop/widgets/SpinBox.qml b/examples/desktop/widgets/SpinBox.qml
deleted file mode 100644
index 2db428ce..00000000
--- a/examples/desktop/widgets/SpinBox.qml
+++ /dev/null
@@ -1,91 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-Components.SpinBox {
- id:spinbox
-
- property variant __upRect;
- property variant __downRect;
- property int __margin: (height -16)/2
-
- // Align height with button
- topMargin:__margin
- bottomMargin:__margin
-
- property int buttonHeight: edititem.sizeFromContents(100, 20).height
- QStyleItem { id:edititem; elementType:"edit" }
- height: buttonHeight
- clip:false
-
- background:
- Item {
- anchors.fill: parent
- property variant __editRect
-
- Rectangle {
- id:editBackground
- x: __editRect.x - 1
- y: __editRect.y
- width: __editRect.width
- height: __editRect.height
- }
-
- Item {
- id:focusFrame
- anchors.fill: editBackground
- visible:framestyle.styleHint("focuswidget")
- QStyleBackground{
- anchors.margins: -6
- anchors.leftMargin: -5
- anchors.fill: parent
- visible:spinbox.activeFocus
- style: QStyleItem {
- id:framestyle
- elementType:"focusframe"
- }
- }
- }
-
- function updateRect() {
- __upRect = spinboxbg.subControlRect("up");
- __downRect = spinboxbg.subControlRect("down");
- __editRect = spinboxbg.subControlRect("edit");
- }
-
- Component.onCompleted:updateRect()
- onWidthChanged:updateRect()
- onHeightChanged:updateRect()
-
- QStyleBackground {
- id:spinboxbg
- anchors.fill:parent
- style: QStyleItem {
- id: styleitem
- elementType: "spinbox"
- sunken: downPressed | upPressed
- hover: containsMouse
- focus: spinbox.activeFocus
- enabled: spinbox.enabled
- value: (upPressed? 1 : 0) |
- (downPressed== 1 ? 1<<1 : 0) |
- (upEnabled? (1<<2) : 0) |
- (downEnabled == 1 ? (1<<3) : 0)
- }
- }
- }
-
- up: Item {
- x: __upRect.x
- y: __upRect.y
- width: __upRect.width
- height: __upRect.height
- }
-
- down: Item {
- x: __downRect.x
- y: __downRect.y
- width: __downRect.width
- height: __downRect.height
- }
-}
diff --git a/examples/desktop/widgets/Switch.qml b/examples/desktop/widgets/Switch.qml
deleted file mode 100644
index b82817c9..00000000
--- a/examples/desktop/widgets/Switch.qml
+++ /dev/null
@@ -1,22 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-Components.Switch {
- id:widget
- minimumWidth:100
- minimumHeight:30
-
- groove:QStyleItem {
- elementType:"edit"
- sunken: true
- }
-
- handle: QStyleItem {
- elementType:"button"
- width:widget.width/2
- height:widget.height-4
- hover:containsMouse
- }
-}
-
diff --git a/examples/desktop/widgets/Tab.qml b/examples/desktop/widgets/Tab.qml
deleted file mode 100644
index e258185b..00000000
--- a/examples/desktop/widgets/Tab.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-import Qt 4.7
-
-Item {
- id:tab
- anchors.fill:parent
- property string title
-}
diff --git a/examples/desktop/widgets/TabBar.qml b/examples/desktop/widgets/TabBar.qml
deleted file mode 100644
index 2d891256..00000000
--- a/examples/desktop/widgets/TabBar.qml
+++ /dev/null
@@ -1,90 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-
-Item {
- id: tabbar
- property int tabHeight: styleitem.sizeFromContents(100, 24).height
- height: tabHeight
-
- property Item tabFrame
- onTabFrameChanged:parent = tabFrame
- visible: tabFrame ? tabFrame.tabsVisible : true
- property int __overlap : styleitem.pixelMetric("tabvshift");
- property string position: tabFrame ? tabFrame.position : "North"
- property string tabBarAlignment: styleitem.styleHint("tabbaralignment");
- property int tabOverlap: styleitem.pixelMetric("taboverlap");
-
- function tab(index) {
- for (var i = 0; i < tabrow.children.length; ++i) {
- if (tabrow.children[i].tabindex == index) {
- return tabrow.children[i]
- }
- }
- return null;
- }
-
- QStyleItem {
- id:styleitem
- elementType: "tab"
- text: "generic"
- }
-
- Row {
- id:tabrow
- states:
- State {
- when: tabBarAlignment == "center"
- name: "centered"
- AnchorChanges {
- target:tabrow
- anchors.horizontalCenter: tabbar.horizontalCenter
- }
- }
- Repeater {
- id:repeater
- model: tabFrame ? tabFrame.tabs.length : null
- delegate: Item {
- id:tab
- property int tabindex: index
- property bool selected : tabFrame.current == index
- width: textitem.width + 42
- height: tabHeight
- z: selected ? 1 : -1
-
- QStyleBackground {
- style: QStyleItem {
- id:style
- elementType: "tab"
- selected: tab.selected
- text: tabbar.position
-
- activeControl: tabFrame.count == 1 ?
- "only" :
- index == 0 ? "beginning" :
- index == tabFrame.count-1 ? "end" : "middle"
- }
- anchors.leftMargin: -tabOverlap + (style.text == "North" && (style.activeControl == "middle" || style.activeControl == "end")
- && tab.selected ? -__overlap : 0)
-
- anchors.rightMargin: -tabOverlap + (style.text == "North" && (style.activeControl == "middle" || style.activeControl == "beginning")
- && tab.selected ? -__overlap : 0)
- anchors.fill:parent
- }
-
- Text {
- id:textitem
- anchors.centerIn:parent
- text: tabFrame.tabs[index].title
- elide: Text.ElideRight
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: tabFrame.current = index
- }
- }
- }
- }
-}
diff --git a/examples/desktop/widgets/TabFrame.qml b/examples/desktop/widgets/TabFrame.qml
deleted file mode 100644
index 01896e75..00000000
--- a/examples/desktop/widgets/TabFrame.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-Item{
- id: tabWidget
- width:100
- height:100
- property TabBar tabbar
- property int current: 0
- property int count: stack.children.length
- property bool frame:true
- property bool tabsVisible: true
- property string position: "North"
- default property alias tabs : stack.children
-
- onCurrentChanged: __setOpacities()
- Component.onCompleted: __setOpacities()
- onTabbarChanged: {
- tabbar.tabFrame = tabWidget
- tabbar.anchors.top = tabWidget.top
- tabbar.anchors.left = tabWidget.left
- tabbar.anchors.right = tabWidget.right
- }
-
- property int __baseOverlap : style.pixelMetric("tabbaseoverlap");
- function __setOpacities() {
- for (var i = 0; i < stack.children.length; ++i) {
- stack.children[i].opacity = (i == current ? 1 : 0)
- }
- }
-
- QStyleBackground {
- id: frame
- z:-1
- style: QStyleItem {
- id:style
- elementType: "tabframe"
- text: position
- value: tabbar && tabsVisible && tabbar.tab(current) ? tabbar.tab(current).x : 0
- minimum: tabbar && tabsVisible && tabbar.tab(current) ? tabbar.tab(current).width : 0
- }
- anchors.fill:parent
- Item {
- id:stack
- anchors.fill:parent
- anchors.margins: frame ? 2 : 0
- }
- anchors.topMargin: tabbar && tabsVisible && position == "North" ? tabbar.height - __baseOverlap : 0
-
- states: [
- State {
- name: "South"
- when: position == "South" && tabbar!= undefined
- PropertyChanges {
- target: frame
- anchors.topMargin: 0
- anchors.bottomMargin: tabbar ? tabbar.height - __baseOverlap: 0
- }
- PropertyChanges {
- target: tabbar
- anchors.topMargin: -__baseOverlap
- }
- AnchorChanges {
- target: tabbar
- anchors.top: frame.bottom
- anchors.bottom: undefined
- }
- }
- ]
- }
-}
diff --git a/examples/desktop/widgets/TextArea.qml b/examples/desktop/widgets/TextArea.qml
deleted file mode 100644
index 93ad8f3d..00000000
--- a/examples/desktop/widgets/TextArea.qml
+++ /dev/null
@@ -1,44 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-Components.TextArea {
- id:textarea
- leftMargin:12
- rightMargin:12
- minimumWidth:200
- desktopBehavior:true
- placeholderText:""
- clip:false
- // Align with button
- property int buttonHeight: buttonitem.sizeFromContents(100, 14).height
- QStyleItem { id:buttonitem; elementType:"button" }
- minimumHeight: buttonHeight
-
- background: QStyleBackground {
- anchors.fill:parent
- style: QStyleItem{
- elementType:"edit"
- sunken:true
- focus:textarea.activeFocus
- }
- }
-
- Item{
- id:focusFrame
- anchors.fill: textarea
- parent:textarea.parent
- visible:framestyle.styleHint("focuswidget")
- QStyleBackground{
- anchors.margins: -2
- anchors.rightMargin:-4
- anchors.bottomMargin:-4
- anchors.fill: parent
- visible:textarea.activeFocus
- style: QStyleItem {
- id:framestyle
- elementType:"focusframe"
- }
- }
- }
-}
diff --git a/examples/desktop/widgets/TextField.qml b/examples/desktop/widgets/TextField.qml
deleted file mode 100644
index 260584e9..00000000
--- a/examples/desktop/widgets/TextField.qml
+++ /dev/null
@@ -1,52 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-Components.TextField {
- id:textfield
- minimumWidth:200
- desktopBehavior:true
- placeholderText:""
- topMargin:2
- bottomMargin:2
- leftMargin:6
- rightMargin:6
- width:200
- height: editItem.sizeFromContents(100, 20).height
- clip:false
-
- QStyleItem {
- id:editItem
- elementType:"edit"
- sunken:true
- focus:textfield.activeFocus
- hover:containsMouse
- }
-
- background: QStyleBackground {
- anchors.fill:parent
- style: QStyleItem{
- elementType:"edit"
- sunken:true
- focus:textfield.activeFocus
- }
- }
-
- Item{
- id:focusFrame
- anchors.fill: textfield
- parent:textfield
- visible:framestyle.styleHint("focuswidget")
- QStyleBackground{
- anchors.margins: -2
- anchors.rightMargin:-4
- anchors.bottomMargin:-4
- anchors.fill: parent
- visible:textfield.activeFocus
- style: QStyleItem {
- id:framestyle
- elementType:"focusframe"
- }
- }
- }
-}
diff --git a/examples/desktop/widgets/TextScrollArea.qml b/examples/desktop/widgets/TextScrollArea.qml
deleted file mode 100644
index 2a7deab6..00000000
--- a/examples/desktop/widgets/TextScrollArea.qml
+++ /dev/null
@@ -1,31 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-ScrollArea {
- id:area
- color: "white"
- width: 280
- height: 120
- contentWidth: 200
-
- property alias text: edit.text
- property alias wrapMode: edit.wrapMode
- highlightOnFocus: true
-
- TextEdit {
- id: edit
- text: loremIpsum + loremIpsum;
- wrapMode: TextEdit.WordWrap;
- width: area.contentWidth
- selectByMouse:true
-
- // keep textcursor within scrollarea
- onCursorRectangleChanged:
- if (cursorRectangle.y >= area.contentY + area.height - 1.5*cursorRectangle.height)
- area.contentY = cursorRectangle.y - area.height + 1.5*cursorRectangle.height
- else if (cursorRectangle.y < area.contentY)
- area.contentY = cursorRectangle.y
-
- }
-}
diff --git a/examples/desktop/widgets/ToolBar.qml b/examples/desktop/widgets/ToolBar.qml
deleted file mode 100644
index ce61382e..00000000
--- a/examples/desktop/widgets/ToolBar.qml
+++ /dev/null
@@ -1,12 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-QStyleBackground {
- id:styleitem
- width:200
- height:60
-
- style: QStyleItem{elementType:"toolbar"}
-}
-
diff --git a/examples/desktop/widgets/ToolButton.qml b/examples/desktop/widgets/ToolButton.qml
deleted file mode 100644
index 98b2dfeb..00000000
--- a/examples/desktop/widgets/ToolButton.qml
+++ /dev/null
@@ -1,18 +0,0 @@
-import QtQuick 1.0
-import "../../../components" as Components
-import "../plugin"
-
-Components.Button {
- id:button
- minimumWidth:30
- background: QStyleBackground {
- anchors.fill:parent
- style: QStyleItem {
- elementType: "toolbutton"
- on: pressed | checked
- sunken: pressed
- raised: containsMouse
- hover: containsMouse
- }
- }
-}
diff --git a/examples/meego/images/folder_new.png b/examples/meego/images/folder_new.png
deleted file mode 100644
index 8d8bb9bd..00000000
--- a/examples/meego/images/folder_new.png
+++ /dev/null
Binary files differ
diff --git a/examples/meego/meegogallery.qml b/examples/meego/meegogallery.qml
deleted file mode 100644
index 0d47f650..00000000
--- a/examples/meego/meegogallery.qml
+++ /dev/null
@@ -1,94 +0,0 @@
-import Qt 4.7
-import com.meego 1.0 as Meego
-import "meegotheme"
-
-Rectangle {
- width: 4*240
- height: 600
-
- Item {
- anchors.margins:8
- anchors.fill:parent
- Row {
- spacing:20
- Column {
- spacing:20
- Text{ text: "Based on Custom"}
- Row {
- spacing: 6
- Button{ text: "Text" }
- Button{ iconSource:"images/folder_new.png" }
- Button{ text:"Text"; iconSource:"images/folder_new.png" }
- CheckBox {}
- }
- ProgressBar {
- width:400
- Timer {
- running: true
- repeat: true
- interval: 25
- onTriggered: {
- var next = parent.value + 0.01;
- parent.value = (next > parent.maximumValue) ? parent.minimumValue : next;
- }
- }
- }
- ProgressBar {
- width:400
- indeterminate: true
- }
- Row {
- spacing:6
- TextField{}
- TextArea{}
- }
- Slider{}
- ButtonBlock{
- model: ListModel{
- ListElement{text:"one" ; iconSource:"images/folder_new.png"}
- ListElement{text:"two" }
- ListElement{text:"three"}
- }
- }
- }
- Column{
- spacing:20
- Text{ text: "Based on mainline" }
- Row {
- spacing:6
- Meego.Button{text:"Text"}
- Meego.Button{text:""; iconSource:"images/folder_new.png"}
- Meego.Button{text:"Text"; iconSource:"images/folder_new.png"}
- Meego.CheckBox{}
- }
- Meego.ProgressBar {
- width:400
- Timer {
- running: true
- repeat: true
- interval: 25
- onTriggered: {
- var next = parent.value + 0.01;
- parent.value = (next > parent.maximumValue) ? parent.minimumValue : next;
- }
- }
- }
- Meego.ProgressBar {
- width:400
- indeterminate: true
- }
- Row {
- spacing:6
- Meego.TextField{width:200}
- Meego.TextArea{width:200}
- }
- Meego.Slider{}
- Meego.ButtonRow{
- Meego.Button{text:"one" ; iconSource: "images/folder_new.png"}
- Meego.Button{text:"two"}
- Meego.Button{text:"three"}
- }
- }
- }
- }
-}
diff --git a/examples/meego/meegotheme/BusyIndicator.qml b/examples/meego/meegotheme/BusyIndicator.qml
deleted file mode 100644
index c443ca33..00000000
--- a/examples/meego/meegotheme/BusyIndicator.qml
+++ /dev/null
@@ -1,46 +0,0 @@
-import Qt 4.7
-import "../../../components" as Components
-
-import com.meego.themebridge 1.0
-
-Components.BusyIndicator {
-/*
- property bool running: false
- property alias __styleParentClass: meegostyle.styleParentClass
-
- width: meegostyle.preferredWidth
- height: meegostyle.preferredHeight
-
- Style {
- id: meegostyle
- styleClass: "MSpinnerStyle"
- }
-
- Pixmap {
- anchors.fill: parent
- style: meegostyle
- imageProperty: "bgPixmap"
- }
-
- PiePixmap {
- id: pie
- anchors.fill: parent
- style: meegostyle
- imageProperty: "progressPixmap"
-
- NumberAnimation {
- id: unknownAnimation
- running: root.running
- target: pie
- property: "startAngle"
- duration: meegostyle.current.get("period")
- // PiePixmap follows QPainter::drawPie() API, 0 is at 3 o'clock
- // and grows counter-clockwise. So we shift to start at 9 o'clock
- // and go clockwise.
- from: 540
- to: 180
- loops: Animation.Infinite
- }
- }*/
-}
-
diff --git a/examples/meego/meegotheme/Button.qml b/examples/meego/meegotheme/Button.qml
deleted file mode 100644
index 93e8040a..00000000
--- a/examples/meego/meegotheme/Button.qml
+++ /dev/null
@@ -1,81 +0,0 @@
-import QtQuick 1.1
-import "../../../components" as Components // Button
-import com.meego.themebridge 1.0 // Style
-
-Components.Button {
-
- // implementation
-
- minimumWidth: 55
- minimumHeight: 50 // meegostyle.preferredHeight
- //mm meegostyle.preferredHeight doesn't seem to return the right value
-
- leftMargin: 16
- rightMargin: 16
- topMargin: 10
- bottomMargin: 10
-
- textColor: meegostyle.current.get("textColor")
- //font: meegostyle.current.get("font")
-
- Style {
- id: meegostyle
- styleClass: "MButtonStyle"
- mode: {
- if (styledItem.pressed)
- return "pressed";
- else if (styledItem.checked)
- return "selected";
- else
- return "default";
- }
- }
-
- background: Component {
- BorderImage {
- source: {
- var bkgImage = "image://theme/meegotouch-button-background"
- if(!styledItem.enabled)
- bkgImage += "-disabled";
- else if(styledItem.pressed)
- bkgImage += "-pressed";
- else if(styledItem.checked)
- bkgImage += "-selected";
-
- return bkgImage;
- }
-
- border.top: 8
- border.bottom: 8
- border.left: 22
- border.right: 22
- }
- }
-
- label: Component {
- Item {
- implicitWidth: row.implicitWidth
- implicitHeight: row.implicitHeight
- Row {
- id: row
- anchors.centerIn: parent
- spacing: 6
- Image {
- anchors.verticalCenter: parent.verticalCenter
- sourceSize.width: meegostyle.current.get("iconSize").width
- sourceSize.height: meegostyle.current.get("iconSize").height
- source: styledItem.iconSource
- }
-
- Label {
- anchors.verticalCenter: parent.verticalCenter
- elide: Text.ElideRight
- font: meegostyle.current.get("font")
- color: meegostyle.current.get("textColor")
- text: styledItem.text
- }
- }
- }
- }
-}
-
diff --git a/examples/meego/meegotheme/ButtonBlock.qml b/examples/meego/meegotheme/ButtonBlock.qml
deleted file mode 100644
index ff706e6c..00000000
--- a/examples/meego/meegotheme/ButtonBlock.qml
+++ /dev/null
@@ -1,85 +0,0 @@
-import Qt 4.7
-import "../../../components" as Components
-
-// ### import QtComponents to load meego imageprovider
-import com.meego.themebridge 1.0
-
-Components.ButtonBlock {
- id:button
-
- // Icon properties. Precedence is the following:
- // Source has precedence over Id
- // When checked, try to use checked Source or Id, if empty, fallback to default Source or Id
- property string iconId
- property bool iconVisible: true
- property bool textVisible: true
-
- textColor: meegostyle.current.get("textColor")
- //font: meegostyle.current.get("font")
-
- buttonBackground:
- BorderImage {
- function mapToState() {
- var string = "image://theme/meegotouch-button-background";
-
- if (styledItem.pressed)
- string += "-pressed"
-
- if (adjoining&Qt.Horizontal)
- string += "-horizontal-center"
- else if (adjoining&Qt.Vertical)
- string += "-vertical-center"
- return string;
- }
-
- source: mapToState()
- border.top: 8
- border.bottom: 8
- border.left: 22
- border.right: 22
- }
-
- Style {
- id: meegostyle
- styleClass: "MButtonStyle"
- mode: {
- if (button.pressed)
- return "pressed"
- else if (button.checked)
- return "selected"
- else
- return "default"
- }
- }
-
- buttonLabel : Component {
- Item {
- height: 30
- width:(iconFromSource.width ? iconFromSource.width + 6 : 0) + label.width + 4
- Row {
- anchors.centerIn:parent
- spacing: 6
- Image {
- id: iconFromSource
- source:styledItem.iconSource
- sourceSize.width: meegostyle.current.get("iconSize").width
- sourceSize.height: meegostyle.current.get("iconSize").height
- }
- Label {
- id: label
- x:(iconFromSource.width ? iconFromSource.width + 8 : 0)
- elide: Text.ElideRight
- anchors.verticalCenter:parent.verticalCenter
-
- // XXX This does not make sense yet, since the label width is not being set
- // horizontalAlignment: Text.AlignHCenter
- verticalAlignment: meegostyle.current.get("verticalTextAlign")
- font: meegostyle.current.get("font")
- color: meegostyle.current.get("textColor")
- text: styledItem.text
- }
- }
- }
- }
-}
-
diff --git a/examples/meego/meegotheme/CheckBox.qml b/examples/meego/meegotheme/CheckBox.qml
deleted file mode 100644
index aab4aaf7..00000000
--- a/examples/meego/meegotheme/CheckBox.qml
+++ /dev/null
@@ -1,19 +0,0 @@
-import Qt 4.7
-import "../../../components" as Components
-
-Components.CheckBox{
- // Should size depend on contents, or should contents depend on size?
-
- background: BorderImage {
- source: pressed ? "image://theme/meegotouch-button-checkbox-background-pressed":
- checked ? "image://theme/meegotouch-button-checkbox-background-selected":
- "image://theme/meegotouch-button-checkbox-background"
- border.top: 12
- border.bottom: 12
- border.left: 12
- border.right: 12
- }
-
- checkmark: Item{} // Drawn as part of the background
-}
-
diff --git a/examples/meego/meegotheme/Label.qml b/examples/meego/meegotheme/Label.qml
deleted file mode 100644
index 10537dc4..00000000
--- a/examples/meego/meegotheme/Label.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components project on Qt Labs.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import Qt 4.7
-import com.meego.themebridge 1.0
-
-Text {
- id: root
- property alias styleObjectName: meegostyle.styleObjectName
-
- // XXX This is a temporary solution to avoid creating an extra
- // wrapper around Text to implement the margins
- anchors.leftMargin: meegostyle.current.get("marginLeft")
- anchors.rightMargin: meegostyle.current.get("marginRight")
- anchors.topMargin: meegostyle.current.get("marginTop")
- anchors.bottomMargin: meegostyle.current.get("marginBottom")
-
- font.bold: meegostyle.font.bold
- font.capitalization: meegostyle.font.capitalization
- font.family: meegostyle.font.family
- font.italic: meegostyle.font.italic
- font.letterSpacing: meegostyle.font.letterSpacing
- font.pixelSize: meegostyle.font.pixelSize
- font.weight: meegostyle.font.weight
- font.wordSpacing: meegostyle.font.wordSpacing
-
- color: meegostyle.current.get("color")
-
- Style {
- id: meegostyle
- styleClass: "MLabelStyle"
- property variant font: meegostyle.current.get("font")
- }
-}
diff --git a/examples/meego/meegotheme/ProgressBar.qml b/examples/meego/meegotheme/ProgressBar.qml
deleted file mode 100644
index bcd4126d..00000000
--- a/examples/meego/meegotheme/ProgressBar.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-import Qt 4.7
-import "../../../components" as Components
-
-// ### import QtComponents to load meego imageprovider
-import com.meego.themebridge 1.0
-
-Components.ProgressBar{
- id:button
-
- minimumHeight: meegostyle.preferredHeight
- minimumWidth: meegostyle.preferredWidth
-
- Style {
- id: meegostyle
- styleClass: "MProgressIndicatorStyle"
- styleType: "bar"
- }
-
- background: BorderImage {
- z:-5
- source: "image://theme/meegotouch-progressindicator-bar-background"
- border.top: 4
- border.bottom: 4
- border.left: 4
- border.right: 4
- }
-
-
- progress:
- MaskedImage {
- id: bar
- style: meegostyle
- maskProperty: "progressBarMask"
- imageProperty: "knownBarTexture"
- fullWidth: __fullWidth
- }
-
- indeterminateProgress:
- MaskedImage {
- // We use a second image for the wrapping animation when not full width.
- id: wrappingBar
- style: meegostyle
- imageProperty: "unknownBarTexture"
- maskProperty: "progressBarMask"
- tiled: meegostyle.current.get("unknownBarTextureTiled")
- imageXOffset: 0
- width: 0
- fullWidth: false
- NumberAnimation on imageXOffset {
- loops:Animation.Infinite;
- from:0;
- to:8;
- duration:200
- }
- }
-}
-
diff --git a/examples/meego/meegotheme/Slider.qml b/examples/meego/meegotheme/Slider.qml
deleted file mode 100644
index 11bce264..00000000
--- a/examples/meego/meegotheme/Slider.qml
+++ /dev/null
@@ -1,155 +0,0 @@
-import Qt 4.7
-import "../../../components" as Components
-
-// ### import QtComponents to load meego imageprovider
-import com.meego.themebridge 1.0
-
-Components.Slider{
- id:slider
-
- minimumWidth: 400;
- minimumHeight: 40;
- leftMargin: 30
- rightMargin: 30
-
-
- Style {
- id: sliderStyle
- styleClass: "MSliderStyle"
- }
-
- handle: Image {
- source: slider.pressed ?
- "image://theme/meegotouch-slider-handle-background-pressed-horizontal" :
- "image://theme/meegotouch-slider-handle-background-horizontal"
- }
-
- onPressedChanged: {
- if (pressed) {
- sliderStyle.feedback("pressFeedback");
- } else {
- sliderStyle.feedback("releaseFeedback");
- }
- }
-
-
- groove: Item {
-
- BorderImage {
- source: "image://theme/meegotouch-slider-background-horizontal"
- border { left: 4; top: 4; right: 4; bottom: 4 }
- height: 12
-
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.right: parent.right
-
- anchors.leftMargin:20
- anchors.rightMargin: 20
- BorderImage {
- source: "image://theme/meegotouch-slider-elapsed-background-horizontal"
- border { left: 4; top: 4; right: 4; bottom: 4 }
- height: 12
-
- anchors.verticalCenter: parent.verticalCenter
- x: positionForValue(0)
- width: handlePosition - x
- }
- }
- }
-
- valueIndicator: BorderImage {
- id: indicatorBackground
- source: "image://theme/meegotouch-slider-handle-value-background"
- border { left: 12; top: 12; right: 12; bottom: 12 }
-
- width: label.width + 50
- height: 80
-
- Image {
- id: arrow
- }
-
- state: slider.valueIndicatorPosition
- states: [
- State {
- name: "Top"
- PropertyChanges {
- target: arrow
- source: "image://theme/meegotouch-slider-handle-label-arrow-down"
- }
- AnchorChanges {
- target: arrow
- anchors.top: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- }
- },
- State {
- name: "Bottom"
- PropertyChanges {
- target: arrow
- source: "image://theme/meegotouch-slider-handle-label-arrow-up"
- }
- AnchorChanges {
- target: arrow
- anchors.bottom: parent.top
- anchors.horizontalCenter: parent.horizontalCenter
- }
- },
- State {
- name: "Left"
- PropertyChanges {
- target: arrow
- source: "image://theme/meegotouch-slider-handle-label-arrow-right"
- }
- AnchorChanges {
- target: arrow
- anchors.left: parent.right
- anchors.verticalCenter: parent.verticalCenter
- }
- },
- State {
- name: "Right"
- PropertyChanges {
- target: arrow
- source: "image://theme/meegotouch-slider-handle-label-arrow-right"
- }
- AnchorChanges {
- target: arrow
- anchors.right: parent.left
- anchors.verticalCenter: parent.verticalCenter
- }
- }
- ]
-
- Label {
- id: label
- anchors.centerIn: parent
- styleObjectName: "MSliderHandleLabel"
- text: slider.value
- color:"white"
- }
-
- // Native libmeegotouch slider value indicator pops up 100ms after pressing
- // the handle... but hiding happens without delay.
- visible: slider.valueIndicatorVisible && slider.pressed
- Behavior on visible {
- enabled: !indicatorBackground.visible
- PropertyAnimation {
- duration: 100
- }
- }
- }
-
-
-
- /* handle: BorderImage {
- source: pressed ? "image://theme/meegotouch-button-background-pressed" :
- "image://theme/meegotouch-button-background"
- border.top: 8
- border.bottom: 8
- border.left: 22
- border.right: 22
- }*/
-}
-
diff --git a/examples/meego/meegotheme/TextArea.qml b/examples/meego/meegotheme/TextArea.qml
deleted file mode 100644
index 0b20cb37..00000000
--- a/examples/meego/meegotheme/TextArea.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-import Qt 4.7
-import "../../../components" as Components
-
-// ### import QtComponents to load meego imageprovider
-import com.meego.themebridge 1.0
-
-Components.TextArea {
- id:textField
-
- leftMargin:meegostyle.current.get("paddingLeft")
- rightMargin:meegostyle.current.get("paddingRight")
- topMargin: meegostyle.current.get("paddingTop")
- bottomMargin: meegostyle.current.get("paddingBottom")
- minimumHeight: meegostyle.preferredHeight
-
- placeholderText: ""
-
- Style {
- id: meegostyle
- styleClass: "MTextEditStyle"
- mode: textField.activeFocus ? "selected" : "default"
- }
-
- font: meegostyle.current.get("font")
- textColor: meegostyle.current.get("textColor")
-
- background: BorderImage {
- source: textField.activeFocus ?
- "image://theme/meegotouch-textedit-background-selected" :
- "image://theme/meegotouch-textedit-background"
- border.left: textField.leftMargin
- border.right: textField.rightMargin
- // Note: top and bottom margins are too small
- border.top: textField.leftMargin
- border.bottom: textField.rightMargin
- }
-}
-
diff --git a/examples/meego/meegotheme/TextField.qml b/examples/meego/meegotheme/TextField.qml
deleted file mode 100644
index e60f07b6..00000000
--- a/examples/meego/meegotheme/TextField.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-import Qt 4.7
-import "../../../components" as Components
-
-// ### import QtComponents to load meego imageprovider
-import com.meego.themebridge 1.0
-
-Components.TextField {
- id:textField
-
- leftMargin:meegostyle.current.get("paddingLeft")
- rightMargin:meegostyle.current.get("paddingRight")
- topMargin: meegostyle.current.get("paddingTop")
- bottomMargin: meegostyle.current.get("paddingBottom")
- minimumHeight: meegostyle.preferredHeight
-
- placeholderText: ""
-
- Style {
- id: meegostyle
- styleClass: "MTextEditStyle"
- mode: textField.activeFocus ? "selected" : "default"
- }
-
- font: meegostyle.current.get("font")
- textColor: meegostyle.current.get("textColor")
-
- background: BorderImage {
- source: textField.activeFocus ?
- "image://theme/meegotouch-textedit-background-selected" :
- "image://theme/meegotouch-textedit-background"
- border.left: textField.leftMargin
- border.right: textField.rightMargin
- // Note: top and bottom margins are too small
- border.top: textField.leftMargin
- border.bottom: textField.rightMargin
- }
-}
-
diff --git a/components/BasicButton.qml b/src/components/BasicButton.qml
index 1116f0b0..1116f0b0 100644
--- a/components/BasicButton.qml
+++ b/src/components/BasicButton.qml
diff --git a/components/BusyIndicator.qml b/src/components/BusyIndicator.qml
index 00b12ed3..00b12ed3 100644
--- a/components/BusyIndicator.qml
+++ b/src/components/BusyIndicator.qml
diff --git a/components/Button.qml b/src/components/Button.qml
index 1bcd8335..1bcd8335 100644
--- a/components/Button.qml
+++ b/src/components/Button.qml
diff --git a/components/ButtonBlock.qml b/src/components/ButtonBlock.qml
index 999d3dd0..999d3dd0 100644
--- a/components/ButtonBlock.qml
+++ b/src/components/ButtonBlock.qml
diff --git a/components/ButtonColumn.qml b/src/components/ButtonColumn.qml
index 8d63a855..8d63a855 100644
--- a/components/ButtonColumn.qml
+++ b/src/components/ButtonColumn.qml
diff --git a/components/ButtonRow.qml b/src/components/ButtonRow.qml
index 7c2d3ea7..7c2d3ea7 100644
--- a/components/ButtonRow.qml
+++ b/src/components/ButtonRow.qml
diff --git a/components/CheckBox.qml b/src/components/CheckBox.qml
index e8b86556..e8b86556 100644
--- a/components/CheckBox.qml
+++ b/src/components/CheckBox.qml
diff --git a/components/ChoiceList.qml b/src/components/ChoiceList.qml
index 8c5ca81b..8c5ca81b 100644
--- a/components/ChoiceList.qml
+++ b/src/components/ChoiceList.qml
diff --git a/components/ProgressBar.qml b/src/components/ProgressBar.qml
index fadbbc5e..fadbbc5e 100644
--- a/components/ProgressBar.qml
+++ b/src/components/ProgressBar.qml
diff --git a/components/RadioButton.qml b/src/components/RadioButton.qml
index f89f2773..f89f2773 100644
--- a/components/RadioButton.qml
+++ b/src/components/RadioButton.qml
diff --git a/components/ScrollDecorator.qml b/src/components/ScrollDecorator.qml
index e61a16d2..e61a16d2 100644
--- a/components/ScrollDecorator.qml
+++ b/src/components/ScrollDecorator.qml
diff --git a/components/ScrollIndicator.qml b/src/components/ScrollIndicator.qml
index cba1dba8..cba1dba8 100644
--- a/components/ScrollIndicator.qml
+++ b/src/components/ScrollIndicator.qml
diff --git a/components/Slider.qml b/src/components/Slider.qml
index 789167c6..789167c6 100644
--- a/components/Slider.qml
+++ b/src/components/Slider.qml
diff --git a/components/SpinBox.qml b/src/components/SpinBox.qml
index 1566a8e7..1566a8e7 100644
--- a/components/SpinBox.qml
+++ b/src/components/SpinBox.qml
diff --git a/components/Switch.qml b/src/components/Switch.qml
index 8bf18cfe..8bf18cfe 100644
--- a/components/Switch.qml
+++ b/src/components/Switch.qml
diff --git a/components/TextArea.qml b/src/components/TextArea.qml
index 92263fe6..92263fe6 100644
--- a/components/TextArea.qml
+++ b/src/components/TextArea.qml
diff --git a/components/TextField.qml b/src/components/TextField.qml
index 2af29427..2af29427 100644
--- a/components/TextField.qml
+++ b/src/components/TextField.qml
diff --git a/components/behaviors/ButtonBehavior.qml b/src/components/behaviors/ButtonBehavior.qml
index 391c870a..391c870a 100644
--- a/components/behaviors/ButtonBehavior.qml
+++ b/src/components/behaviors/ButtonBehavior.qml
diff --git a/components/behaviors/ModalPopupBehavior.qml b/src/components/behaviors/ModalPopupBehavior.qml
index 108bf02a..108bf02a 100644
--- a/components/behaviors/ModalPopupBehavior.qml
+++ b/src/components/behaviors/ModalPopupBehavior.qml
diff --git a/components/behaviors/TextEditMouseBehavior.qml b/src/components/behaviors/TextEditMouseBehavior.qml
index 02175d5b..02175d5b 100644
--- a/components/behaviors/TextEditMouseBehavior.qml
+++ b/src/components/behaviors/TextEditMouseBehavior.qml
diff --git a/components/private/ChoiceListPopup.qml b/src/components/private/ChoiceListPopup.qml
index 61a0d222..61a0d222 100644
--- a/components/private/ChoiceListPopup.qml
+++ b/src/components/private/ChoiceListPopup.qml
diff --git a/components/styles/default/BasicButtonStyle.qml b/src/components/styles/default/BasicButtonStyle.qml
index 08b18040..08b18040 100644
--- a/components/styles/default/BasicButtonStyle.qml
+++ b/src/components/styles/default/BasicButtonStyle.qml
diff --git a/components/styles/default/BusyIndicatorStyle.qml b/src/components/styles/default/BusyIndicatorStyle.qml
index 83ef46fd..83ef46fd 100644
--- a/components/styles/default/BusyIndicatorStyle.qml
+++ b/src/components/styles/default/BusyIndicatorStyle.qml
diff --git a/components/styles/default/ButtonBlockStyle.qml b/src/components/styles/default/ButtonBlockStyle.qml
index f0bed865..f0bed865 100644
--- a/components/styles/default/ButtonBlockStyle.qml
+++ b/src/components/styles/default/ButtonBlockStyle.qml
diff --git a/components/styles/default/ButtonStyle.qml b/src/components/styles/default/ButtonStyle.qml
index a0e5f330..a0e5f330 100644
--- a/components/styles/default/ButtonStyle.qml
+++ b/src/components/styles/default/ButtonStyle.qml
diff --git a/components/styles/default/CheckBoxStyle.qml b/src/components/styles/default/CheckBoxStyle.qml
index f5e5fdde..f5e5fdde 100644
--- a/components/styles/default/CheckBoxStyle.qml
+++ b/src/components/styles/default/CheckBoxStyle.qml
diff --git a/components/styles/default/ChoiceListStyle.qml b/src/components/styles/default/ChoiceListStyle.qml
index 12b10ffd..12b10ffd 100644
--- a/components/styles/default/ChoiceListStyle.qml
+++ b/src/components/styles/default/ChoiceListStyle.qml
diff --git a/components/styles/default/ProgressBarStyle.qml b/src/components/styles/default/ProgressBarStyle.qml
index 7cb9795c..7cb9795c 100644
--- a/components/styles/default/ProgressBarStyle.qml
+++ b/src/components/styles/default/ProgressBarStyle.qml
diff --git a/components/styles/default/RadioButtonStyle.qml b/src/components/styles/default/RadioButtonStyle.qml
index 0381993e..0381993e 100644
--- a/components/styles/default/RadioButtonStyle.qml
+++ b/src/components/styles/default/RadioButtonStyle.qml
diff --git a/components/styles/default/ScrollIndicatorStyle.qml b/src/components/styles/default/ScrollIndicatorStyle.qml
index 8e8826cd..8e8826cd 100644
--- a/components/styles/default/ScrollIndicatorStyle.qml
+++ b/src/components/styles/default/ScrollIndicatorStyle.qml
diff --git a/components/styles/default/SliderStyle.qml b/src/components/styles/default/SliderStyle.qml
index d32f13eb..d32f13eb 100644
--- a/components/styles/default/SliderStyle.qml
+++ b/src/components/styles/default/SliderStyle.qml
diff --git a/components/styles/default/SpinBoxStyle.qml b/src/components/styles/default/SpinBoxStyle.qml
index d42267d8..d42267d8 100644
--- a/components/styles/default/SpinBoxStyle.qml
+++ b/src/components/styles/default/SpinBoxStyle.qml
diff --git a/components/styles/default/SwitchStyle.qml b/src/components/styles/default/SwitchStyle.qml
index 35e6f235..35e6f235 100644
--- a/components/styles/default/SwitchStyle.qml
+++ b/src/components/styles/default/SwitchStyle.qml
diff --git a/components/styles/default/TextFieldStyle.qml b/src/components/styles/default/TextFieldStyle.qml
index 38da6b0d..38da6b0d 100644
--- a/components/styles/default/TextFieldStyle.qml
+++ b/src/components/styles/default/TextFieldStyle.qml
diff --git a/components/styles/default/images/button_normal.png b/src/components/styles/default/images/button_normal.png
index e54f1acb..e54f1acb 100644
--- a/components/styles/default/images/button_normal.png
+++ b/src/components/styles/default/images/button_normal.png
Binary files differ
diff --git a/components/styles/default/images/button_pressed.png b/src/components/styles/default/images/button_pressed.png
index b7a63f1a..b7a63f1a 100644
--- a/components/styles/default/images/button_pressed.png
+++ b/src/components/styles/default/images/button_pressed.png
Binary files differ
diff --git a/components/styles/default/images/buttongroup_h_normal.png b/src/components/styles/default/images/buttongroup_h_normal.png
index bae59381..bae59381 100644
--- a/components/styles/default/images/buttongroup_h_normal.png
+++ b/src/components/styles/default/images/buttongroup_h_normal.png
Binary files differ
diff --git a/components/styles/default/images/buttongroup_h_pressed.png b/src/components/styles/default/images/buttongroup_h_pressed.png
index e0c97fd5..e0c97fd5 100644
--- a/components/styles/default/images/buttongroup_h_pressed.png
+++ b/src/components/styles/default/images/buttongroup_h_pressed.png
Binary files differ
diff --git a/components/styles/default/images/checkbox_check.png b/src/components/styles/default/images/checkbox_check.png
index a2f1f02d..a2f1f02d 100644
--- a/components/styles/default/images/checkbox_check.png
+++ b/src/components/styles/default/images/checkbox_check.png
Binary files differ
diff --git a/components/styles/default/images/handle.png b/src/components/styles/default/images/handle.png
index bd8fbddf..bd8fbddf 100644
--- a/components/styles/default/images/handle.png
+++ b/src/components/styles/default/images/handle.png
Binary files differ
diff --git a/components/styles/default/images/lineedit_normal.png b/src/components/styles/default/images/lineedit_normal.png
index 2253d33f..2253d33f 100644
--- a/components/styles/default/images/lineedit_normal.png
+++ b/src/components/styles/default/images/lineedit_normal.png
Binary files differ
diff --git a/components/styles/default/images/progress-bar-background.png b/src/components/styles/default/images/progress-bar-background.png
index 4f30927e..4f30927e 100644
--- a/components/styles/default/images/progress-bar-background.png
+++ b/src/components/styles/default/images/progress-bar-background.png
Binary files differ
diff --git a/components/styles/default/images/progress-bar-bar.png b/src/components/styles/default/images/progress-bar-bar.png
index 446c13f2..446c13f2 100644
--- a/components/styles/default/images/progress-bar-bar.png
+++ b/src/components/styles/default/images/progress-bar-bar.png
Binary files differ
diff --git a/components/styles/default/images/progressbar_fill.png b/src/components/styles/default/images/progressbar_fill.png
index 0f877896..0f877896 100644
--- a/components/styles/default/images/progressbar_fill.png
+++ b/src/components/styles/default/images/progressbar_fill.png
Binary files differ
diff --git a/components/styles/default/images/progressbar_groove.png b/src/components/styles/default/images/progressbar_groove.png
index 263ced8b..263ced8b 100644
--- a/components/styles/default/images/progressbar_groove.png
+++ b/src/components/styles/default/images/progressbar_groove.png
Binary files differ
diff --git a/components/styles/default/images/progressbar_indeterminate.png b/src/components/styles/default/images/progressbar_indeterminate.png
index 7ea46460..7ea46460 100644
--- a/components/styles/default/images/progressbar_indeterminate.png
+++ b/src/components/styles/default/images/progressbar_indeterminate.png
Binary files differ
diff --git a/components/styles/default/images/progressbar_overlay.png b/src/components/styles/default/images/progressbar_overlay.png
index 8e351f96..8e351f96 100644
--- a/components/styles/default/images/progressbar_overlay.png
+++ b/src/components/styles/default/images/progressbar_overlay.png
Binary files differ
diff --git a/components/styles/default/images/qt-logo.png b/src/components/styles/default/images/qt-logo.png
index 005ee5ca..005ee5ca 100644
--- a/components/styles/default/images/qt-logo.png
+++ b/src/components/styles/default/images/qt-logo.png
Binary files differ
diff --git a/components/styles/default/images/radiobutton_check.png b/src/components/styles/default/images/radiobutton_check.png
index 3d433860..3d433860 100644
--- a/components/styles/default/images/radiobutton_check.png
+++ b/src/components/styles/default/images/radiobutton_check.png
Binary files differ
diff --git a/components/styles/default/images/radiobutton_check_white.png b/src/components/styles/default/images/radiobutton_check_white.png
index b68e7a69..b68e7a69 100644
--- a/components/styles/default/images/radiobutton_check_white.png
+++ b/src/components/styles/default/images/radiobutton_check_white.png
Binary files differ
diff --git a/components/styles/default/images/radiobutton_normal.png b/src/components/styles/default/images/radiobutton_normal.png
index 6ceab7ee..6ceab7ee 100644
--- a/components/styles/default/images/radiobutton_normal.png
+++ b/src/components/styles/default/images/radiobutton_normal.png
Binary files differ
diff --git a/components/styles/default/images/slider-background.png b/src/components/styles/default/images/slider-background.png
index 3ba9c473..3ba9c473 100644
--- a/components/styles/default/images/slider-background.png
+++ b/src/components/styles/default/images/slider-background.png
Binary files differ
diff --git a/components/styles/default/images/slider-handle-active.png b/src/components/styles/default/images/slider-handle-active.png
index 83cec3f4..83cec3f4 100644
--- a/components/styles/default/images/slider-handle-active.png
+++ b/src/components/styles/default/images/slider-handle-active.png
Binary files differ
diff --git a/components/styles/default/images/slider-handle.png b/src/components/styles/default/images/slider-handle.png
index 765e610a..765e610a 100644
--- a/components/styles/default/images/slider-handle.png
+++ b/src/components/styles/default/images/slider-handle.png
Binary files differ
diff --git a/components/styles/default/images/slider.png b/src/components/styles/default/images/slider.png
index 3f310e37..3f310e37 100644
--- a/components/styles/default/images/slider.png
+++ b/src/components/styles/default/images/slider.png
Binary files differ
diff --git a/components/styles/default/images/spinbox_down.png b/src/components/styles/default/images/spinbox_down.png
index a6f3f79e..a6f3f79e 100644
--- a/components/styles/default/images/spinbox_down.png
+++ b/src/components/styles/default/images/spinbox_down.png
Binary files differ
diff --git a/components/styles/default/images/spinbox_up.png b/src/components/styles/default/images/spinbox_up.png
index a4841941..a4841941 100644
--- a/components/styles/default/images/spinbox_up.png
+++ b/src/components/styles/default/images/spinbox_up.png
Binary files differ
diff --git a/components/styles/default/images/spinner.png b/src/components/styles/default/images/spinner.png
index 664c2b14..664c2b14 100644
--- a/components/styles/default/images/spinner.png
+++ b/src/components/styles/default/images/spinner.png
Binary files differ
diff --git a/components/styles/default/images/switch_normal.png b/src/components/styles/default/images/switch_normal.png
index ac46b211..ac46b211 100644
--- a/components/styles/default/images/switch_normal.png
+++ b/src/components/styles/default/images/switch_normal.png
Binary files differ
diff --git a/components/styles/default/images/switch_pressed.png b/src/components/styles/default/images/switch_pressed.png
index a04a3f4b..a04a3f4b 100644
--- a/components/styles/default/images/switch_pressed.png
+++ b/src/components/styles/default/images/switch_pressed.png
Binary files differ
diff --git a/components/styles/default/tools/ColorConverter.qml b/src/components/styles/default/tools/ColorConverter.qml
index 5070ff1e..5070ff1e 100644
--- a/components/styles/default/tools/ColorConverter.qml
+++ b/src/components/styles/default/tools/ColorConverter.qml
diff --git a/components/visuals/AdjoiningCorner.qml b/src/components/visuals/AdjoiningCorner.qml
index 92027cef..92027cef 100644
--- a/components/visuals/AdjoiningCorner.qml
+++ b/src/components/visuals/AdjoiningCorner.qml
diff --git a/components/visuals/AdjoiningVisual.qml b/src/components/visuals/AdjoiningVisual.qml
index 09bc34cc..09bc34cc 100644
--- a/components/visuals/AdjoiningVisual.qml
+++ b/src/components/visuals/AdjoiningVisual.qml
diff --git a/src/desktop.pro b/src/desktop.pro
new file mode 100644
index 00000000..83e0a3d4
--- /dev/null
+++ b/src/desktop.pro
@@ -0,0 +1,2 @@
+TEMPLATE = subdirs
+SUBDIRS = styleitem
diff --git a/examples/desktop/src/qstyleitem.cpp b/src/styleitem/qstyleitem.cpp
index 90fa5a36..90fa5a36 100644
--- a/examples/desktop/src/qstyleitem.cpp
+++ b/src/styleitem/qstyleitem.cpp
diff --git a/examples/desktop/src/qstyleitem.h b/src/styleitem/qstyleitem.h
index 5d195252..5d195252 100644
--- a/examples/desktop/src/qstyleitem.h
+++ b/src/styleitem/qstyleitem.h
diff --git a/examples/desktop/src/qstyleplugin.cpp b/src/styleitem/qstyleplugin.cpp
index 05cb45c5..05cb45c5 100644
--- a/examples/desktop/src/qstyleplugin.cpp
+++ b/src/styleitem/qstyleplugin.cpp
diff --git a/examples/desktop/src/qstyleplugin.h b/src/styleitem/qstyleplugin.h
index 45aff70f..45aff70f 100644
--- a/examples/desktop/src/qstyleplugin.h
+++ b/src/styleitem/qstyleplugin.h
diff --git a/tests/auto/ComponentTestCase.js b/tests/auto/ComponentTestCase.js
deleted file mode 100644
index acbe08af..00000000
--- a/tests/auto/ComponentTestCase.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-function check_api(testSubject)
-{
- var apiSkeleton = testSubject.api.createObject(null);
- var rawObject = testSubject.raw.createObject(null);
-
- for (var prop in apiSkeleton) {
- if (prop.match(".+Changed$"))
- continue;
-
- var message = "Missing " + (typeof apiSkeleton[prop] == "function"
- ? "function" : "property") + ": " + prop;
- compare(rawObject.hasOwnProperty(prop), true, message);
-
- message = "Type not matching for: " + prop;
- compare(typeof rawObject[prop], typeof apiSkeleton[prop], message);
-
- if (typeof apiSkeleton[prop] == "function") {
- message = "Function parameters count differs for: " + prop;
- compare(rawObject[prop].length, apiSkeleton[prop].length, message);
- }
- }
-
- apiSkeleton.destroy();
- rawObject.destroy();
-}
-
-function check_defaults(testSubject)
-{
- var defaultsObject = testSubject.defaults.createObject(null);
- var rawObject = testSubject.raw.createObject(null);
-
- for (var prop in defaultsObject) {
- var propType = typeof defaultsObject[prop];
-
- if (propType == "object" || propType == "function")
- continue;
-
- var message = "Default value differs for: " + prop;
- compare(rawObject[prop], defaultsObject[prop], message);
- }
-
- defaultsObject.destroy();
- rawObject.destroy();
-}
diff --git a/tests/auto/ComponentTestCase.qml b/tests/auto/ComponentTestCase.qml
deleted file mode 100644
index aad28bea..00000000
--- a/tests/auto/ComponentTestCase.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-import "ComponentTestCase.js" as Util
-
-TestCase {
- property Item obj
-
- visible: true
- when: windowShown
-
- function init() {
- obj = testSubject.basic.createObject(this);
- }
-
- function cleanup() {
- obj.destroy();
- }
-
- function test_check_for_missing()
- {
- var apiSkeleton = testSubject.api.createObject(null);
-
- for (var prop in apiSkeleton) {
- if (prop.match(".+Changed$") || prop == "objectName")
- continue;
-
- if (typeof this["test_" + prop] != "function") {
- var type = (typeof apiSkeleton[prop] == "function" ? "function" : "property");
- warn("No functional test for " + type + ": " + prop);
- }
- }
-
- apiSkeleton.destroy();
- }
-
- function benchmark_create_destroy() {
- var bechmarkObj = testSubject.basic.createObject(null);
- bechmarkObj.destroy();
- }
-
- function test_api_sanity() {
- Util.check_api(testSubject);
- }
-
- function test_defaults_sanity() {
- Util.check_defaults(testSubject);
- }
-}
diff --git a/tests/auto/README b/tests/auto/README
deleted file mode 100644
index 464e1681..00000000
--- a/tests/auto/README
+++ /dev/null
@@ -1,13 +0,0 @@
-You need QtQuickTest installed to run these tests,
-which is available at:
-
-http://qt.gitorious.org/qt-labs/qtest-qml/
-
-You can run all tests by compiling the runner:
-
- $ qmake
- $ make check
-
-Or run a single test using qmlviewer:
-
- $ qmlviewer tst_Button.qml
diff --git a/tests/auto/SpecBusyIndicator.qml b/tests/auto/SpecBusyIndicator.qml
deleted file mode 100644
index 17d81d13..00000000
--- a/tests/auto/SpecBusyIndicator.qml
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- BusyIndicator {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property bool running
- }
- }
-
- property Component defaults:
- Component {
- BusyIndicator {
- running: false
- }
- }
-
- property Component basic:
- Component {
- BusyIndicator {
- width: 200
- height: 200
- }
- }
-}
diff --git a/tests/auto/SpecButton.qml b/tests/auto/SpecButton.qml
deleted file mode 100644
index b57409ef..00000000
--- a/tests/auto/SpecButton.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- Button {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property bool checked
- property bool checkable
- property bool pressed
-
- signal clicked
-
- property string text
-
- property url iconSource
- }
- }
-
- property Component defaults:
- Component {
- Button {
- checked: false
- checkable: false
-
- text: ""
-
- iconSource: ""
- }
- }
-
- property Component basic:
- Component {
- Button {
- width: 200
- height: 200
-
- text: "Test Button"
-
- iconSource: "data/qt_logo.png"
- }
- }
-}
diff --git a/tests/auto/SpecButtonColumn.qml b/tests/auto/SpecButtonColumn.qml
deleted file mode 100644
index 15bc8e2a..00000000
--- a/tests/auto/SpecButtonColumn.qml
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- ButtonColumn {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property bool exclusive
- property Item checkedButton
- }
- }
-
- property Component defaults:
- Component {
- ButtonColumn {
- exclusive: true
- }
- }
-
- property Component basic:
- Component {
- ButtonColumn {
- Button { text: "A" }
- Button { text: "B" }
- Button { text: "C" }
- }
- }
-}
diff --git a/tests/auto/SpecButtonRow.qml b/tests/auto/SpecButtonRow.qml
deleted file mode 100644
index 4a409f72..00000000
--- a/tests/auto/SpecButtonRow.qml
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- ButtonRow {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property bool exclusive
- property Item checkedButton
- }
- }
-
- property Component defaults:
- Component {
- ButtonRow {
- exclusive: true
- }
- }
-
- property Component basic:
- Component {
- ButtonRow {
- Button { text: "A" }
- Button { text: "B" }
- Button { text: "C" }
- }
- }
-}
diff --git a/tests/auto/SpecCheckBox.qml b/tests/auto/SpecCheckBox.qml
deleted file mode 100644
index bf1acd50..00000000
--- a/tests/auto/SpecCheckBox.qml
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- CheckBox {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property bool checked
- property bool pressed
-
- signal clicked
- }
- }
-
- property Component defaults:
- Component {
- CheckBox {
- checked: false
- pressed: false
- }
- }
-
- property Component basic:
- Component {
- CheckBox {
- width: 200
- height: 200
- }
- }
-}
diff --git a/tests/auto/SpecProgressBar.qml b/tests/auto/SpecProgressBar.qml
deleted file mode 100644
index f77be1ed..00000000
--- a/tests/auto/SpecProgressBar.qml
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- ProgressBar {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property real minimumValue
- property real maximumValue
- property real value
- property bool indeterminate
- }
- }
-
- property Component defaults:
- Component {
- ProgressBar {
- minimumValue: 0.0
- maximumValue: 1.0
- value: 0.0
- indeterminate: false
- }
- }
-
- property Component basic:
- Component {
- ProgressBar {
- width: 200
- height: 200
- }
- }
-}
diff --git a/tests/auto/SpecRadioButton.qml b/tests/auto/SpecRadioButton.qml
deleted file mode 100644
index ee813478..00000000
--- a/tests/auto/SpecRadioButton.qml
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- RadioButton {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property bool checked
- property bool pressed
-
- signal clicked
- }
- }
-
- property Component defaults:
- Component {
- RadioButton {
- checked: false
- pressed: false
- }
- }
-
- property Component basic:
- Component {
- RadioButton {
- width: 200
- height: 200
- }
- }
-}
diff --git a/tests/auto/SpecScrollDecorator.qml b/tests/auto/SpecScrollDecorator.qml
deleted file mode 100644
index b9cab2c9..00000000
--- a/tests/auto/SpecScrollDecorator.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- // ScrollDecorator is a special kind of component that needs
- // an flickable item set when creating an item, otherwise we
- // will get tons of warnings.
- property Item listView: ListView {}
-
- property Component raw:
- Component {
- ScrollDecorator {
- flickableItem: listView
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property Flickable flickableItem
- }
- }
-
- property Component defaults:
- Component {
- ScrollDecorator {
- flickableItem: listView
- }
- }
-
- property Component basic:
- Component {
- Item {
- ScrollDecorator {
- flickableItem: listViewBasic
- }
-
- ListView {
- id: listViewBasic
- }
- }
- }
-}
diff --git a/tests/auto/SpecSlider.qml b/tests/auto/SpecSlider.qml
deleted file mode 100644
index a4908fee..00000000
--- a/tests/auto/SpecSlider.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- Slider {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property real stepSize
- property real minimumValue
- property real maximumValue
- property real value
- property int orientation
- property bool pressed
- property bool updateValueWhileDragging
- }
- }
-
- property Component defaults:
- Component {
- Slider {
- stepSize: 0.0
- minimumValue: 0.0
- maximumValue: 1.0
- value: 0.0
- updateValueWhileDragging: true
- orientation: Qt.Horizontal
- }
- }
-
- property Component basic:
- Component {
- Slider {
- width: 200
- height: 200
- }
- }
-}
diff --git a/tests/auto/SpecTextArea.qml b/tests/auto/SpecTextArea.qml
deleted file mode 100644
index 4e218b2f..00000000
--- a/tests/auto/SpecTextArea.qml
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- TextArea {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property QtObject font
- property int cursorPosition
- property int horizontalAlignment
- property int verticalAlignment
- property bool readOnly
- property string selectedText
- property int selectionEnd
- property int selectionStart
- property string text
- property int textFormat
- property int wrapMode
-
- function copy() {}
- function paste() {}
- function cut() {}
- function select(start, end) {}
- function selectAll() {}
- function selectWord() {}
- function positionAt(x, y) {}
- function positionToRectangle(pos) {}
- }
- }
-
- property Component defaults:
- Component {
- TextArea {
- readOnly: false
- text: ""
- cursorPosition: 0
- wrapMode: TextEdit.Wrap
- }
- }
-
- property Component basic:
- Component {
- TextArea {
- width: 200
- height: 200
- text: "Test TextArea"
- }
- }
-}
diff --git a/tests/auto/SpecTextField.qml b/tests/auto/SpecTextField.qml
deleted file mode 100644
index 14da3d7c..00000000
--- a/tests/auto/SpecTextField.qml
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- TextField {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property string placeholderText
- property int inputMethodHints
- property QtObject font
- property int cursorPosition
- property bool readOnly
- property int echoMode
- property bool acceptableInput
- property string inputMask
- property QtObject validator
- property string selectedText
- property int selectionEnd
- property int selectionStart
- property string text
-
- function copy() {}
- function paste() {}
- function cut() {}
- function select(start, end) {}
- function selectAll() {}
- function selectWord() {}
- function positionAt(x) {}
- function positionToRectangle(pos) {}
- }
- }
-
- property Component defaults:
- Component {
- TextField {
- readOnly: false
- echoMode: TextInput.Normal
- cursorPosition: 0
- inputMask: ""
- text: ""
- placeholderText: ""
- }
- }
-
- property Component basic:
- Component {
- TextField {
- width: 200
- height: 200
- text: "Test TextField"
- }
- }
-}
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
deleted file mode 100644
index 7151fa13..00000000
--- a/tests/auto/auto.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-TEMPLATE = app
-QT += declarative
-CONFIG += qmltestcase
-TARGET = test_runner
-
-SOURCES += test_runner.cpp
diff --git a/tests/auto/data/nokia_logo.png b/tests/auto/data/nokia_logo.png
deleted file mode 100644
index 6655691b..00000000
--- a/tests/auto/data/nokia_logo.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/data/qt_logo.png b/tests/auto/data/qt_logo.png
deleted file mode 100644
index fcfb37bf..00000000
--- a/tests/auto/data/qt_logo.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/test_runner.cpp b/tests/auto/test_runner.cpp
deleted file mode 100644
index a32a467a..00000000
--- a/tests/auto/test_runner.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-#include <QtQuickTest/quicktest.h>
-
-QUICK_TEST_MAIN(runner)
diff --git a/tests/auto/tst_BusyIndicator.qml b/tests/auto/tst_BusyIndicator.qml
deleted file mode 100644
index 94de6d11..00000000
--- a/tests/auto/tst_BusyIndicator.qml
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "BusyIndicator"
-
- SpecBusyIndicator {
- id: testSubject
- }
-}
diff --git a/tests/auto/tst_Button.qml b/tests/auto/tst_Button.qml
deleted file mode 100644
index 71719cc4..00000000
--- a/tests/auto/tst_Button.qml
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "Button"
-
- SpecButton {
- id: testSubject
- }
-
- SignalSpy {
- id: spy
- signalName: "clicked"
- }
-
- function test_clicked() {
- spy.target = obj;
- spy.clear();
-
- var message =
- "Clicking on the Button must emit the signal clicked().";
- mouseClick(obj, obj.width / 2, obj.height / 2);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(spy.count, 3, message);
- }
-
- function test_checkable() {}
- function test_checked() {
- spy.target = obj;
- spy.clear();
-
- var message =
- "Clicking on a non-checkable button should not change checked property.";
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(obj.checked, false, message);
-
- var message =
- "Clicking on a checkable button should change checked property.";
- obj.checkable = true
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(obj.checked, true, message);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(obj.checked, false, message);
-
- var message =
- "Clicking on a checkable button should also emit clicked signal.";
- compare(spy.count, 3, message);
- }
-
- function test_pressed() {
- var message =
- "Pressing and releasing the mouse must change pressed property.";
- mousePress(obj, obj.width / 2, obj.height / 2);
- compare(obj.pressed, true, message);
- mouseRelease(obj, obj.width / 2, obj.height / 2);
- compare(obj.pressed, false, message);
- }
-
- function test_iconSource() {
- var message =
- "Testing if iconSource property can be set and verified.";
- obj.iconSource = "data/nokia_logo.png";
- compare(obj.iconSource, "data/nokia_logo.png", message);
- obj.iconSource = "data/qt_logo.png";
- compare(obj.iconSource, "data/qt_logo.png", message);
- obj.iconSource = "";
- compare(obj.iconSource, "", message);
- }
-
- function test_text() {
- var message =
- "Testing if text property can be set and verified.";
- obj.text = "ABC";
- compare(obj.text, "ABC", message);
- obj.text = "123";
- compare(obj.text, "123", message);
- obj.text = "";
- compare(obj.text, "", message);
- }
-}
diff --git a/tests/auto/tst_ButtonColumn.qml b/tests/auto/tst_ButtonColumn.qml
deleted file mode 100644
index 2e5c04ae..00000000
--- a/tests/auto/tst_ButtonColumn.qml
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "ButtonColumn"
-
- SpecButtonColumn {
- id: testSubject
- }
-
- function test_checkedButton() {}
- function test_exclusive() {
- var message =
- "The first button is checked by default when the object is created.";
- compare(obj.checkedButton, obj.children[0], message);
-
- var message =
- "Only the checkdButton should be checked when exclusive is true.";
- compare(obj.children[0].checked, true, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, false, message);
-
- var message =
- "Checking other button should unset the current checked button and " +
- "update checkedButton property.";
- obj.children[2].checked = true;
- compare(obj.checkedButton, obj.children[2], message);
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, true, message);
-
- var message =
- "Checking exclusive to false should allow multiple selections.";
- obj.exclusive = false;
- obj.children[1].checked = true;
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, true, message);
- compare(obj.children[2].checked, true, message);
-
- var message =
- "Changing back exclusive to true, the last checked item should remain checked."
- obj.exclusive = true;
- compare(obj.checkedButton, obj.children[1], message);
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, true, message);
- compare(obj.children[2].checked, false, message);
-
- var message =
- "Changing exclusive from false to true when no item is selected, should" +
- "select the first item.";
- obj.exclusive = false;
- obj.children[1].checked = false;
- compare(obj.checkedButton, undefined, message);
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, false, message);
- obj.exclusive = true;
- compare(obj.checkedButton, obj.children[0], message);
- compare(obj.children[0].checked, true, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, false, message);
- }
-}
diff --git a/tests/auto/tst_ButtonRow.qml b/tests/auto/tst_ButtonRow.qml
deleted file mode 100644
index 2b9ec839..00000000
--- a/tests/auto/tst_ButtonRow.qml
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "ButtonRow"
-
- SpecButtonRow {
- id: testSubject
- }
-
- function test_checkedButton() {}
- function test_exclusive() {
- var message =
- "The first button is checked by default when the object is created.";
- compare(obj.checkedButton, obj.children[0], message);
-
- var message =
- "Only the checkdButton should be checked when exclusive is true.";
- compare(obj.children[0].checked, true, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, false, message);
-
- var message =
- "Checking other button should unset the current checked button and " +
- "update checkedButton property.";
- obj.children[2].checked = true;
- compare(obj.checkedButton, obj.children[2], message);
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, true, message);
-
- var message =
- "Checking exclusive to false should allow multiple selections.";
- obj.exclusive = false;
- obj.children[1].checked = true;
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, true, message);
- compare(obj.children[2].checked, true, message);
-
- var message =
- "Changing back exclusive to true, the last checked item should remain checked."
- obj.exclusive = true;
- compare(obj.checkedButton, obj.children[1], message);
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, true, message);
- compare(obj.children[2].checked, false, message);
-
- var message =
- "Changing exclusive from false to true when no item is selected, should" +
- "select the first item.";
- obj.exclusive = false;
- obj.children[1].checked = false;
- compare(obj.checkedButton, undefined, message);
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, false, message);
- obj.exclusive = true;
- compare(obj.checkedButton, obj.children[0], message);
- compare(obj.children[0].checked, true, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, false, message);
- }
-}
diff --git a/tests/auto/tst_CheckBox.qml b/tests/auto/tst_CheckBox.qml
deleted file mode 100644
index 626e26b2..00000000
--- a/tests/auto/tst_CheckBox.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "CheckBox"
-
- SpecCheckBox {
- id: testSubject
- }
-
- SignalSpy {
- id: spy
- signalName: "clicked"
- }
-
- function test_clicked() {
- spy.target = obj;
-
- var message =
- "Clicking on the Checkbox must emit the signal clicked().";
- mouseClick(obj, obj.width / 2, obj.height / 2);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(spy.count, 3, message);
- }
-
- function test_checked() {
- var message =
- "Clicking on the Checkbox should change the checked value.";
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(obj.checked, true, message);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(obj.checked, false, message);
- }
-
- function test_pressed() {
- var message =
- "Pressing and releasing the mouse must change pressed property.";
- mousePress(obj, obj.width / 2, obj.height / 2);
- compare(obj.pressed, true, message);
- mouseRelease(obj, obj.width / 2, obj.height / 2);
- compare(obj.pressed, false, message);
- }
-}
diff --git a/tests/auto/tst_ProgressBar.qml b/tests/auto/tst_ProgressBar.qml
deleted file mode 100644
index 4808c011..00000000
--- a/tests/auto/tst_ProgressBar.qml
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "ProgressBar"
-
- SpecProgressBar {
- id: testSubject
- }
-}
diff --git a/tests/auto/tst_RadioButton.qml b/tests/auto/tst_RadioButton.qml
deleted file mode 100644
index d53ae7a1..00000000
--- a/tests/auto/tst_RadioButton.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "RadioButton"
-
- SpecRadioButton {
- id: testSubject
- }
-
- SignalSpy {
- id: spy
- signalName: "clicked"
- }
-
- function test_clicked() {
- spy.target = obj;
-
- var message =
- "Clicking on the RadioButton must emit the signal clicked().";
- mouseClick(obj, obj.width / 2, obj.height / 2);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(spy.count, 3, message);
- }
-
- function test_checked() {
- var message =
- "Clicking on the RadioButton should change the checked value.";
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(obj.checked, true, message);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(obj.checked, false, message);
- }
-
- function test_pressed() {
- var message =
- "Pressing and releasing the mouse must change pressed property.";
- mousePress(obj, obj.width / 2, obj.height / 2);
- compare(obj.pressed, true, message);
- mouseRelease(obj, obj.width / 2, obj.height / 2);
- compare(obj.pressed, false, message);
- }
-}
diff --git a/tests/auto/tst_ScrollDecorator.qml b/tests/auto/tst_ScrollDecorator.qml
deleted file mode 100644
index 65e7a317..00000000
--- a/tests/auto/tst_ScrollDecorator.qml
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "ScrollDecorator"
-
- SpecScrollDecorator {
- id: testSubject
- }
-}
diff --git a/tests/auto/tst_Slider.qml b/tests/auto/tst_Slider.qml
deleted file mode 100644
index 19384550..00000000
--- a/tests/auto/tst_Slider.qml
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "Slider"
-
- SpecSlider {
- id: testSubject
- }
-}
diff --git a/tests/auto/tst_TextArea.qml b/tests/auto/tst_TextArea.qml
deleted file mode 100644
index 700214e0..00000000
--- a/tests/auto/tst_TextArea.qml
+++ /dev/null
@@ -1,284 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "TextArea"
-
- SpecTextArea {
- id: testSubject
- }
-
- function test_font() {
- var message =
- "When defining the font, TextArea should pick a system font of the same family.";
- obj.font = "Helvetica";
- verify(obj.font.family.match("^Helvetica"), message);
- }
-
- function test_cursorPosition() {
- var message =
- "When setting some text, the cursor should be positioned at the end of this text.";
- obj.text = "Test123";
- compare(obj.cursorPosition, 7, message);
-
- message =
- "Defining the cursor position to a number smaller than the text size should " +
- "always be considered valid.";
- obj.cursorPosition = 5;
- compare(obj.cursorPosition, 5, message);
-
- message =
- "If the the cursor position is set to a value longer then the current text size, " +
- "the cursorPosition should keep the current value.";
- obj.cursorPosition = 20;
- compare(obj.cursorPosition, 5, message);
-
- var message =
- "Cursor position should be added by one after each character input.";
- obj.forceActiveFocus();
- var pos = obj.cursorPosition;
- keyClick(Qt.Key_T);
- keyClick(Qt.Key_E);
- keyClick(Qt.Key_S);
- keyClick(Qt.Key_T);
- compare(obj.cursorPosition, pos + 4, message);
- }
-
- function test_horizontalAlignment() {
- var message =
- "Checking whenever it's possible to set the horizontal aligment property.";
- obj.horizontalAlignment = TextEdit.AlignHCenter;
- compare(obj.horizontalAlignment, TextEdit.AlignHCenter, message);
- }
-
- function test_verticalAlignment() {
- var message =
- "Checking whenever it's possible to set the vertical aligment property.";
- obj.verticalAlignment = TextEdit.AlignVCenter;
- compare(obj.verticalAlignment, TextEdit.AlignVCenter, message);
- }
-
- function test_readOnly() {
- var message =
- "Setting readOnly to true should prevent any modification in the text property.";
- obj.text = "Test123";
- obj.readOnly = true;
- obj.text = "123Test";
- expectFail("", message); // XXX: See QTBUG-15257
- compare(obj.text, "Test123", message);
- obj.text = "";
- compare(obj.text, "Test123", message);
-
- message =
- "Setting readOnly to false should allow modifications in the text property.";
- obj.readOnly = false;
- obj.text = "123Test";
- compare(obj.text, "123Test", message);
- }
-
- function test_select() {}
- function test_selectWord() {}
- function test_selectAll() {}
- function test_selectionStart() {}
- function test_selectionEnd() {}
- function test_selectedText() {
- var message =
- "Calling select() method using a valid text range should set selectedText to the " +
- "text within this range. selectionStart and selectionEnd should also be " +
- "updated properly.";
- obj.text = "Test 1234";
- obj.select(0, 4);
- compare(obj.selectedText, "Test", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 4, message);
- obj.select(5, 9);
- compare(obj.selectedText, "1234", message);
- compare(obj.selectionStart, 5, message);
- compare(obj.selectionEnd, 9, message);
- obj.select(0, 9);
- compare(obj.selectedText, "Test 1234", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 9, message);
- obj.select(5, 5);
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 5, message);
- compare(obj.selectionEnd, 5, message);
- obj.select(0, 0);
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 0, message);
-
- message =
- "Using select() with an invalid range (i.e beyond the text size) should keep " +
- "the previous valid selectedText and range. In other words, should do nothing.";
- obj.text = "Test 1234";
- obj.select(0, 20);
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 0, message);
- obj.select(0, 4);
- obj.select(0, 50);
- compare(obj.selectedText, "Test", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 4, message);
-
- message =
- "Using selectAll() should select the entiry text, ranging from zero to length.";
- obj.text = "Test 1234";
- obj.selectAll();
- compare(obj.selectedText, "Test 1234", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, obj.text.length, message);
-
- message =
- "selectWord() will select the first word nearest to the cursor position. If " +
- "a word is partially selected, it should select this word. If more than one word are " +
- "selected, it should select the last word (because in this situation, the cursor is " +
- "positioned in the end of the selection).";
- obj.text = "Test 1234 ABC";
- obj.cursorPosition = 0;
- obj.selectWord();
- compare(obj.selectedText, "Test", message);
- obj.select(5, 7);
- obj.selectWord();
- compare(obj.selectedText, "1234", message);
- obj.selectAll();
- obj.selectWord();
- compare(obj.selectedText, "ABC", message);
-
- message =
- "If text property is changed when some text is selected, selection should reset " +
- "to nothing.";
- obj.text = "Test 123";
- obj.selectAll();
- obj.text = "ABC";
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 0, message);
-
- message =
- "Moving the cursor by pressing arrow keys should remove text selection.";
- obj.forceActiveFocus();
- obj.text = "Test 123";
- obj.selectAll();
- keyClick(Qt.Key_Left);
- compare(obj.selectedText, "", message);
- }
-
- function test_wrapMode() {
- var message =
- "This property should support all possible wrap modes types as in TextEdit.";
- obj.wrapMode = TextEdit.NoWrap;
- compare(obj.wrapMode, TextEdit.NoWrap, message);
- obj.wrapMode = TextEdit.WordWrap;
- compare(obj.wrapMode, TextEdit.WordWrap, message);
- obj.wrapMode = TextEdit.WrapAnywhere;
- compare(obj.wrapMode, TextEdit.WrapAnywhere, message);
- obj.wrapMode = TextEdit.Wrap;
- compare(obj.wrapMode, TextEdit.Wrap, message);
- }
-
- function test_textFormat() {
- var message =
- "This property should support all possible text formats defined in TextEdit.";
- obj.textFormat = TextEdit.AutoText;
- compare(obj.textFormat, TextEdit.AutoText, message);
- obj.textFormat = TextEdit.PlainText;
- compare(obj.textFormat, TextEdit.PlainText, message);
- obj.textFormat = TextEdit.RichText;
- compare(obj.textFormat, TextEdit.RichText, message);
- }
-
- function test_text() {
- var message =
- "Focused TextEdit should handle key input and change the contents of text " +
- "property accordingly. This test is closely related with focus and might fail " +
- "if forceActiveFocus() is not working properly.";
- obj.forceActiveFocus();
- obj.text = "";
- keyClick(Qt.Key_T);
- keyClick(Qt.Key_E);
- keyClick(Qt.Key_S);
- keyClick(Qt.Key_T);
- compare(obj.text, "test", message);
- keyClick(Qt.Key_Backspace);
- compare(obj.text, "tes", message);
- obj.text = "";
- compare(obj.text, "", message);
- }
-
- function test_copy() {}
- function test_cut() {}
- function test_paste() {
- var message =
- "Cutting a selected text should remove the text from TextEdit and store " +
- "the clipboard.";
- obj.text = "Test 123";
- obj.selectAll();
- obj.cut();
- compare(obj.text, "", message);
-
- var message =
- "This test verifies the if pasting the clipboard content on an empty " +
- "TextEdit works.";
- obj.paste();
- compare(obj.text, "Test 123", message);
-
- var message =
- "Copy should copy the selected area to clipboard without removing from " +
- "TextEdit. By pasting when some text is selected, should overwrite it's " +
- "contents.";
- obj.select(0, 4);
- obj.copy();
- obj.select(4, 8);
- obj.paste();
- compare(obj.text, "TestTest", message);
-
- var message =
- "Pasting the clipboard contents when the cursor is positionated on the end " +
- "of the TextEdit should append to the current content. It assumes that the " +
- "previous tests sets the position of the cursor to the end of the line.";
- obj.paste();
- compare(obj.text, "TestTestTest", message);
- }
-
- function test_positionAt() {}
- function test_positionToRectangle() {
- var message =
- "Testing if positionToRectangle() and positionAt() are coherent, since this " +
- "functional test will not rely on position coordinates and font metrics.";
- obj.text = "Test 123";
- var rect = obj.positionToRectangle(0);
- compare(obj.positionAt(rect.x, rect.y), 0, message);
- var rect = obj.positionToRectangle(5);
- compare(obj.positionAt(rect.x, rect.y), 5, message);
- var rect = obj.positionToRectangle(8);
- compare(obj.positionAt(rect.x, rect.y), 8, message);
- }
-}
diff --git a/tests/auto/tst_TextField.qml b/tests/auto/tst_TextField.qml
deleted file mode 100644
index cf72344b..00000000
--- a/tests/auto/tst_TextField.qml
+++ /dev/null
@@ -1,332 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** 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 have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "TextField"
-
- SpecTextField {
- id: testSubject
- }
-
- function test_font() {
- var message =
- "When defining the font, TextField should pick a system font of the same family.";
- obj.font = "Helvetica";
- verify(obj.font.family.match("^Helvetica"), message);
- }
-
- function test_cursorPosition() {
- var message =
- "When setting some text, the cursor should be positioned at the end of this text.";
- obj.text = "Test123";
- compare(obj.cursorPosition, 7, message);
-
- message =
- "Defining the cursor position to a number smaller than the text size should " +
- "always be considered valid.";
- obj.cursorPosition = 5;
- compare(obj.cursorPosition, 5, message);
-
- message =
- "If the the cursor position is set to a value longer then the current text size, " +
- "the cursorPosition should keep the current value.";
- obj.cursorPosition = 20;
- compare(obj.cursorPosition, 5, message);
-
- var message =
- "Cursor position should be added by one after each character input.";
- obj.forceActiveFocus();
- var pos = obj.cursorPosition;
- keyClick(Qt.Key_T);
- keyClick(Qt.Key_E);
- keyClick(Qt.Key_S);
- keyClick(Qt.Key_T);
- compare(obj.cursorPosition, pos + 4, message);
- }
-
- function test_readOnly() {
- var message =
- "Setting readOnly to true should prevent any modification in the text property.";
- obj.text = "Test123";
- obj.readOnly = true;
- obj.text = "123Test";
- expectFail("", message); // XXX: See QTBUG-15257
- compare(obj.text, "Test123", message);
- obj.text = "";
- compare(obj.text, "Test123", message);
-
- message =
- "Setting readOnly to false should allow modifications in the text property.";
- obj.readOnly = false;
- obj.text = "123Test";
- compare(obj.text, "123Test", message);
- }
-
- function test_select() {}
- function test_selectWord() {}
- function test_selectAll() {}
- function test_selectionStart() {}
- function test_selectionEnd() {}
- function test_selectedText() {
- var message =
- "Calling select() method using a valid text range should set selectedText to the " +
- "text within this range. selectionStart and selectionEnd should also be " +
- "updated properly.";
- obj.text = "Test 1234";
- obj.select(0, 4);
- compare(obj.selectedText, "Test", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 4, message);
- obj.select(5, 9);
- compare(obj.selectedText, "1234", message);
- compare(obj.selectionStart, 5, message);
- compare(obj.selectionEnd, 9, message);
- obj.select(0, 9);
- compare(obj.selectedText, "Test 1234", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 9, message);
- obj.select(5, 5);
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 5, message);
- compare(obj.selectionEnd, 5, message);
- obj.select(0, 0);
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 0, message);
-
- message =
- "Using select() with an invalid range (i.e beyond the text size) should keep " +
- "the previous valid selectedText and range. In other words, should do nothing.";
- obj.text = "Test 1234";
- obj.select(0, 20);
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 0, message);
- obj.select(0, 4);
- obj.select(0, 50);
- compare(obj.selectedText, "Test", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 4, message);
-
- message =
- "Using selectAll() should select the entiry text, ranging from zero to length.";
- obj.text = "Test 1234";
- obj.selectAll();
- compare(obj.selectedText, "Test 1234", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, obj.text.length, message);
-
- message =
- "selectWord() will select the first word nearest to the cursor position. If " +
- "a word is partially selected, it should select this word. If more than one word are " +
- "selected, it should select the last word (because in this situation, the cursor is " +
- "positioned in the end of the selection).";
- obj.text = "Test 1234 ABC";
- obj.cursorPosition = 0;
- obj.selectWord();
- compare(obj.selectedText, "Test", message);
- obj.select(5, 7);
- obj.selectWord();
- compare(obj.selectedText, "1234", message);
- obj.selectAll();
- obj.selectWord();
- compare(obj.selectedText, "ABC", message);
-
- message =
- "If text property is changed when some text is selected, selection should reset " +
- "to nothing.";
- obj.text = "Test 123";
- obj.selectAll();
- obj.text = "ABC";
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 0, message);
-
- message =
- "Moving the cursor by pressing arrow keys should remove text selection.";
- obj.forceActiveFocus();
- obj.text = "Test 123";
- obj.selectAll();
- keyClick(Qt.Key_Left);
- compare(obj.selectedText, "", message);
- }
-
- function test_text() {
- var message =
- "Focused TextInput should handle key input and change the contents of text " +
- "property accordingly. This test is closely related with focus and might fail " +
- "if forceActiveFocus() is not working properly.";
- obj.forceActiveFocus();
- obj.text = "";
- keyClick(Qt.Key_T);
- keyClick(Qt.Key_E);
- keyClick(Qt.Key_S);
- keyClick(Qt.Key_T);
- compare(obj.text, "test", message);
- keyClick(Qt.Key_Backspace);
- compare(obj.text, "tes", message);
- obj.text = "";
- compare(obj.text, "", message);
- }
-
- function test_copy() {}
- function test_cut() {}
- function test_paste() {
- var message =
- "Cutting a selected text should remove the text from TextInput and store " +
- "the clipboard.";
- obj.text = "Test 123";
- obj.selectAll();
- obj.cut();
- compare(obj.text, "", message);
-
- var message =
- "This test verifies the if pasting the clipboard content on an empty " +
- "TextInput works.";
- obj.paste();
- compare(obj.text, "Test 123", message);
-
- var message =
- "Copy should copy the selected area to clipboard without removing from " +
- "TextInput. By pasting when some text is selected, should overwrite it's " +
- "contents.";
- obj.select(0, 4);
- obj.copy();
- obj.select(4, 8);
- obj.paste();
- compare(obj.text, "TestTest", message);
-
- var message =
- "Pasting the clipboard contents when the cursor is positionated on the end " +
- "of the TextInput should append to the current content. It assumes that the " +
- "previous tests sets the position of the cursor to the end of the line.";
- obj.paste();
- compare(obj.text, "TestTestTest", message);
- }
-
- function test_positionAt() {}
- function test_positionToRectangle() {
- var message =
- "Testing if positionToRectangle() and positionAt() are coherent, since this " +
- "functional test will not rely on position coordinates and font metrics.";
- obj.text = "Test 123";
- var rect = obj.positionToRectangle(0);
- compare(obj.positionAt(rect.x, rect.y), 0, message);
- var rect = obj.positionToRectangle(5);
- compare(obj.positionAt(rect.x, rect.y), 5, message);
- var rect = obj.positionToRectangle(8);
- compare(obj.positionAt(rect.x, rect.y), 8, message);
- }
-
- function test_echoMode() {
- var message =
- "Since we can't really verify if by setting an echoMode something is being " +
- "reflected on the UI, this test verifies if all echoMode's are supported.";
- obj.echoMode = TextInput.Password;
- compare(obj.echoMode, TextInput.Password, message);
- obj.echoMode = TextInput.NoEcho;
- compare(obj.echoMode, TextInput.NoEcho, message);
- obj.echoMode = TextInput.PasswordEchoOnEdit;
- compare(obj.echoMode, TextInput.PasswordEchoOnEdit, message);
- obj.echoMode = TextInput.Normal;
- compare(obj.echoMode, TextInput.Normal, message);
- }
-
- function test_placeholderText() {
- var message =
- "Since we can't really verify if by setting an echoMode something is being " +
- "reflected on the UI, this test verifies if all echoMode's are supported.";
- obj.echoMode = TextInput.Password;
- compare(obj.echoMode, TextInput.Password, message);
- obj.echoMode = TextInput.NoEcho;
- compare(obj.echoMode, TextInput.NoEcho, message);
- obj.echoMode = TextInput.PasswordEchoOnEdit;
- compare(obj.echoMode, TextInput.PasswordEchoOnEdit, message);
- obj.echoMode = TextInput.Normal;
- compare(obj.echoMode, TextInput.Normal, message);
- }
-
- IntValidator {
- id: validator
-
- bottom: 0
- top: 400
- }
-
- function test_acceptableInput() {}
- function test_validator() {
- var message =
- "Setting a validator should immediately validate the current text.";
- compare(obj.acceptableInput, true, message);
- obj.validator = validator;
-
- var message =
- "All changes on text property or the validator parameters should " +
- "reflect on acceptableInput.";
- compare(obj.acceptableInput, false, message);
- obj.text = "test123";
- compare(obj.acceptableInput, false, message);
- obj.text = "123";
- compare(obj.acceptableInput, true, message);
- validator.top = 100;
- compare(obj.acceptableInput, false, message);
-
- var message =
- "Removing the validator should set the acceptableInput to true.";
- obj.validator = null;
- compare(obj.acceptableInput, true, message);
- }
-
- function test_inputMask() {
- var message =
- "Setting a input mask with some existing text should validated the text.";
- obj.text = "Test123";
- obj.inputMask = "aaaaaaa";
- compare(obj.text, "Test", message);
- obj.inputMask = "aaaaaaa";
- compare(obj.text, "Test", message);
- obj.inputMask = "0000000";
- compare(obj.text, "", message);
-
- var message =
- "Text input should respect the existing mask.";
- obj.text = "";
- obj.inputMask = "AAAA";
- obj.forceActiveFocus();
- keyClick(Qt.Key_T);
- keyClick(Qt.Key_1);
- keyClick(Qt.Key_E);
- keyClick(Qt.Key_2);
- keyClick(Qt.Key_S);
- keyClick(Qt.Key_3);
- keyClick(Qt.Key_T);
- keyClick(Qt.Key_4);
- compare(obj.text, "test", message);
- }
-}
diff --git a/tests/benchmarks/BasicButtonBenchmark.qml b/tests/benchmarks/BasicButtonBenchmark.qml
deleted file mode 100644
index 95caac2b..00000000
--- a/tests/benchmarks/BasicButtonBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.BasicButton { }
- }
-}
diff --git a/tests/benchmarks/BenchmarkResults.txt b/tests/benchmarks/BenchmarkResults.txt
deleted file mode 100644
index 62f7d56f..00000000
--- a/tests/benchmarks/BenchmarkResults.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-Each of these tests should be run with qmltime, available from
-$QTDIR/tests/benchmarks/declarative/qmltime/
-
-Run (ms): (1)
-
-Button 7.5-8.4
-ButtonBlock 32.9-35.8
-BusyIndicator 0.56
-CheckBox 1.9-2.0
-ChoiceList 7.4-7.8
-MultiLineEdit 6.6-6.7
-ProgressBar 1.4-1.5
-RadioButton 2.0
-Slider 4.3-4.5
-SpinBox 4.8
-Switch 3.7
-
-
-Runs:
-(1) 30 Nov 2010 on Mathias Malmqvist's laptop, at SHA 272fb975124d57e4561d7a714d123339559fad2b
diff --git a/tests/benchmarks/BusyIndicatorBenchmark.qml b/tests/benchmarks/BusyIndicatorBenchmark.qml
deleted file mode 100644
index 182ba37d..00000000
--- a/tests/benchmarks/BusyIndicatorBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.BusyIndicator { }
- }
-}
diff --git a/tests/benchmarks/ButtonBenchmark.qml b/tests/benchmarks/ButtonBenchmark.qml
deleted file mode 100644
index 1b68e097..00000000
--- a/tests/benchmarks/ButtonBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.Button { text: "Button" }
- }
-}
diff --git a/tests/benchmarks/ButtonBlockBenchmark.qml b/tests/benchmarks/ButtonBlockBenchmark.qml
deleted file mode 100644
index eafe2f0f..00000000
--- a/tests/benchmarks/ButtonBlockBenchmark.qml
+++ /dev/null
@@ -1,15 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.ButtonBlock {
- model: ListModel {
- ListElement { text: "Button A" }
- ListElement { text: "Button B" }
- ListElement { text: "Button C" }
- }
- }
- }
-}
diff --git a/tests/benchmarks/ButtonColumnBenchmark.qml b/tests/benchmarks/ButtonColumnBenchmark.qml
deleted file mode 100644
index e03e7ad1..00000000
--- a/tests/benchmarks/ButtonColumnBenchmark.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.ButtonColumn {
- QtComponents.Button { text: "Button A" }
- QtComponents.Button { text: "Buttom B" }
- QtComponents.Button { text: "Bottom C" }
- }
- }
-}
diff --git a/tests/benchmarks/ButtonRowBenchmark.qml b/tests/benchmarks/ButtonRowBenchmark.qml
deleted file mode 100644
index ebe88494..00000000
--- a/tests/benchmarks/ButtonRowBenchmark.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.ButtonRow {
- QtComponents.Button { text: "Button A" }
- QtComponents.Button { text: "Buttom B" }
- QtComponents.Button { text: "Bottom C" }
- }
- }
-}
diff --git a/tests/benchmarks/CheckBoxBenchmark.qml b/tests/benchmarks/CheckBoxBenchmark.qml
deleted file mode 100644
index 7d7a3ae7..00000000
--- a/tests/benchmarks/CheckBoxBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.CheckBox { }
- }
-}
diff --git a/tests/benchmarks/ChoiceListBenchmark.qml b/tests/benchmarks/ChoiceListBenchmark.qml
deleted file mode 100644
index 6176004c..00000000
--- a/tests/benchmarks/ChoiceListBenchmark.qml
+++ /dev/null
@@ -1,23 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- property variant choiceListModel: ListModel {
- ListElement { content: "Choice One" }
- ListElement { content: "Choice Two" }
- ListElement { content: "Choice Three" }
- ListElement { content: "Choice Four" }
- ListElement { content: "Choice Five" }
- ListElement { content: "Choice Six" }
- ListElement { content: "Choice Seven" }
- ListElement { content: "Choice Eight" }
- }
-
- QmlTime.Timer {
- component: QtComponents.ChoiceList {
- model: choiceListModel
-// delegate:
- }
- }
-}
diff --git a/tests/benchmarks/ProgressBarBenchmark.qml b/tests/benchmarks/ProgressBarBenchmark.qml
deleted file mode 100644
index 80fc9504..00000000
--- a/tests/benchmarks/ProgressBarBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.ProgressBar { }
- }
-}
diff --git a/tests/benchmarks/RadioButtonBenchmark.qml b/tests/benchmarks/RadioButtonBenchmark.qml
deleted file mode 100644
index af33ee07..00000000
--- a/tests/benchmarks/RadioButtonBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.RadioButton { }
- }
-}
diff --git a/tests/benchmarks/ScrollDecoratorBenchmark.qml b/tests/benchmarks/ScrollDecoratorBenchmark.qml
deleted file mode 100644
index ce8a272f..00000000
--- a/tests/benchmarks/ScrollDecoratorBenchmark.qml
+++ /dev/null
@@ -1,11 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- GridView { id: gridView }
-
- QmlTime.Timer {
- component: QtComponents.ScrollDecorator { flickableItem: gridView }
- }
-}
diff --git a/tests/benchmarks/ScrollIndicatorBenchmark.qml b/tests/benchmarks/ScrollIndicatorBenchmark.qml
deleted file mode 100644
index 76ea5479..00000000
--- a/tests/benchmarks/ScrollIndicatorBenchmark.qml
+++ /dev/null
@@ -1,12 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- GridView { id: gridView }
-
- QmlTime.Timer {
- component: Item { QtComponents.ScrollIndicator { scrollItem: gridView }
- }
- }
-}
diff --git a/tests/benchmarks/SliderBenchmark.qml b/tests/benchmarks/SliderBenchmark.qml
deleted file mode 100644
index fc8b935a..00000000
--- a/tests/benchmarks/SliderBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.Slider { }
- }
-}
diff --git a/tests/benchmarks/SpinBoxBenchmark.qml b/tests/benchmarks/SpinBoxBenchmark.qml
deleted file mode 100644
index 9802793a..00000000
--- a/tests/benchmarks/SpinBoxBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.SpinBox { }
- }
-}
diff --git a/tests/benchmarks/SwitchBenchmark.qml b/tests/benchmarks/SwitchBenchmark.qml
deleted file mode 100644
index 70394836..00000000
--- a/tests/benchmarks/SwitchBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.Switch { }
- }
-}
diff --git a/tests/benchmarks/TextAreaBenchmark.qml b/tests/benchmarks/TextAreaBenchmark.qml
deleted file mode 100644
index a7ddf0c1..00000000
--- a/tests/benchmarks/TextAreaBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.TextArea { text: "This is the text being edited" }
- }
-}
diff --git a/tests/benchmarks/TextFieldBenchmark.qml b/tests/benchmarks/TextFieldBenchmark.qml
deleted file mode 100644
index 38309ad2..00000000
--- a/tests/benchmarks/TextFieldBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.TextField { text: "This is the text being edited" }
- }
-}
diff --git a/tools/StretchBench.qml b/tools/StretchBench.qml
deleted file mode 100644
index fbb7108b..00000000
--- a/tools/StretchBench.qml
+++ /dev/null
@@ -1,531 +0,0 @@
-import QtQuick 1.1
-import "../components"
-import "stretchbench"
-
-Item {
- width: 950
- height: 500
-
- property string currentComponentName: componentsList.model.get(componentsList.currentIndex).component
-
- SystemPalette { id: syspal }
- Rectangle {
- id: listPanel
- color: "lightgray";
- width: 200
- anchors.top: parent.top
- anchors.bottom: parent.bottom
-
- ListView {
- id: componentsList
- anchors.fill: parent
-
- model: ListModel {
- ListElement { component: "ChoiceList" }
- ListElement { component: "ButtonBlock" }
- ListElement { component: "ButtonRow" }
- ListElement { component: "ButtonColumn" }
- ListElement { component: "Switch" }
- ListElement { component: "Button" }
- ListElement { component: "CheckBox" }
- ListElement { component: "RadioButton" }
- ListElement { component: "Slider" }
- ListElement { component: "ProgressBar" }
- ListElement { component: "BusyIndicator" }
- ListElement { component: "TextField" }
- ListElement { component: "TextArea" }
- ListElement { component: "SpinBox" }
- }
-
- highlight: Rectangle { color: "blue" }
- delegate: Item {
- width: componentsList.width
- height: item.height
- Item { id: item
- width: itemText.width+20; height: itemText.height+6
- Text {
- id: itemText; text: component; font.pixelSize: 20; anchors.centerIn: parent
- color: index == ListView.view.currentIndex ? "white" : "black"
- }
- }
- MouseArea { anchors.fill: parent; onPressed: componentsList.currentIndex = index }
- }
- }
- }
-
- Rectangle {
- anchors.fill: testBenchRect
- color: "lightblue"
- }
-
- Flickable {
- id: testBenchRect
- anchors.left: listPanel.right; anchors.right: testConfigPanel.left
- anchors.top: parent.top; anchors.bottom: parent.bottom
- contentWidth: width+1 // Add a little to make it flickable
- contentHeight: height+1
- clip: true
-
- Image {
- anchors.fill: parent
- anchors.margins: -1000
- source: "stretchbench/images/checkered.png"
- fillMode: Image.Tile
- opacity: testBenchRect.moving || topLeftHandle.pressed || bottomRightHandle.pressed ? 0.12 : 0
- Behavior on opacity { NumberAnimation { duration: 100 } }
- }
-
- // Upper-left resizing handle
-
- MouseArea {
- id: topLeftHandle
- width: 30
- height: 30
-
- drag.target: topLeftHandle
- drag.minimumX: 0; drag.minimumY: 0
- drag.maximumX: bottomRightHandle.x - width
- drag.maximumY: bottomRightHandle.y - height
-
- Rectangle {
- anchors.fill: parent
- color: "blue"
- }
- }
-
- // Container for the tested Component (red when resized)
-
- Rectangle {
- id: container
-
- property bool pressed: topLeftHandle.pressed || bottomRightHandle.pressed
-
- color: "transparent"
- border.color: pressed ? "red" : "transparent"
-
- function resetSize() {
- // Position the blue drag handles so that the component tested gets its desired size
- topLeftHandle.x = (testBenchRect.width - loader.item.implicitWidth) / 2 - topLeftHandle.width;
- topLeftHandle.y = (testBenchRect.height - loader.item.implicitHeight) / 2 - topLeftHandle.height;
- bottomRightHandle.x = (testBenchRect.width - loader.item.implicitWidth) / 2 + loader.item.implicitWidth;
- bottomRightHandle.y = (testBenchRect.height - loader.item.implicitHeight) / 2 + loader.item.implicitHeight;
- }
-
- // Use this instead of anchors (see QTBUG-15622);
- // Floor ensures that images are on integer coordinates so they stay crisp
- y: Math.floor(topLeftHandle.y + topLeftHandle.height)
- x: Math.floor(topLeftHandle.x + topLeftHandle.width)
- width: Math.floor(bottomRightHandle.x - topLeftHandle.x - topLeftHandle.width)
- height: Math.floor(bottomRightHandle.y - topLeftHandle.y - topLeftHandle.height)
-
- Loader {
- id: loader
- focus: true
- sourceComponent: sourceComponentFromIndex()
- anchors.fill: parent
-
- onStatusChanged: {
- if (status == Loader.Ready) {
- container.resetSize();
-
- // on any future implicit size changes, reset the size
- item.implicitWidthChanged.connect(container.resetSize);
- item.implicitHeightChanged.connect(container.resetSize);
- }
- }
-
- function sourceComponentFromIndex() {
- var name = componentsList.model.get(componentsList.currentIndex).component;
- switch (name) {
- case "Button": return buttonComponent;
- case "ButtonBlock": return buttonBlockComponent;
- case "ButtonRow": return buttonRowComponent;
- case "ButtonColumn": return buttonColumnComponent;
- case "CheckBox": return checkBoxComponent;
- case "RadioButton": return radioButtonComponent;
- case "Switch": return switchComponent;
- case "Slider": return sliderComponent;
- case "ProgressBar": return progressBarComponent;
- case "BusyIndicator": return busyIndicatorComponent;
- case "ChoiceList": return choiceListComponent;
- case "TextField": return lineEditComponent;
- case "TextArea": return textAreaComponent;
- case "SpinBox": return spinBoxComponent;
- }
- return null;
- }
-
- Rectangle {
- color: "transparent"
- opacity: container.pressed && loader.item.topMargin != undefined ? 1 : 0
- border.color: "yellow"
-
- anchors.fill: parent
- anchors.leftMargin: Math.max(loader.item.leftMargin, 0)
- anchors.rightMargin: Math.max(loader.item.rightMargin, 0)
- anchors.topMargin: Math.max(loader.item.topMargin, 0)
- anchors.bottomMargin: Math.max(loader.item.bottomMargin, 0)
-
- z: 2
- }
- }
- }
-
- // Lower-right resizing handle
-
- MouseArea {
- id: bottomRightHandle
- width: 30
- height: 30
-
- drag.target: bottomRightHandle
- drag.minimumX: topLeftHandle.x + width
- drag.minimumY: topLeftHandle.y + height
- drag.maximumX: testBenchRect.width - width;
- drag.maximumY: testBenchRect.height - height
-
- Rectangle {
- anchors.fill: parent
- color: "blue"
- }
- }
- }
-
- //
- // Right-hand side Component configuration panel
- //
-
- Rectangle {
- id: testConfigPanel
- color: "lightgray";
- width: 250
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.right: parent.right
-
- Column {
- anchors.fill: parent; anchors.margins: 10; spacing: 5
- opacity: currentComponentName == "Button" ? 1 : 0
- StretchBenchBoolOption { text: "Dimmed:"; id: buttonOptionDimmed }
- StretchBenchBoolOption { text: "Latching:"; id: buttonOptionLatching }
- StretchBenchBoolOption { text: "Has icon:"; id: buttonOptionHasIcon }
- StretchBenchBoolOption { text: "Two-line text:"; id: buttonOptionTwoLineText }
- StretchBenchBoolOption { text: "Green background:"; id: buttonOptionGreenBackground }
- StretchBenchBoolOption { text: "White text:"; id: buttonOptionWhiteText }
- }
-
- Column {
- anchors.fill: parent; anchors.margins: 10; spacing: 5
- opacity: currentComponentName == "ButtonBlock" ? 1 : 0
- StretchBenchBoolOption { text: "Dimmed:"; id: buttonBlockOptionDimmed }
- StretchBenchBoolOption { text: "Vertical layout"; id: buttonBlockOptionVerticalLayout }
- StretchBenchBoolOption { text: "Hide last button"; id: buttonBlockHideLastButton }
- }
-
- Column {
- anchors.fill: parent; anchors.margins: 10; spacing: 5
- opacity: currentComponentName == "ButtonRow" ? 1 : 0
- StretchBenchBoolOption { text: "Dimmed:"; id: buttonRowOptionDimmed }
- StretchBenchBoolOption { text: "Hide last button"; id: buttonRowHideLastButton }
- }
-
- Column {
- anchors.fill: parent; anchors.margins: 10; spacing: 5
- opacity: currentComponentName == "ButtonColumn" ? 1 : 0
- StretchBenchBoolOption { text: "Dimmed:"; id: buttonColumnOptionDimmed }
- StretchBenchBoolOption { text: "Hide last button"; id: buttonColumnHideLastButton }
- }
-
- Column {
- anchors.fill: parent; anchors.margins: 10; spacing: 5
- opacity: currentComponentName == "ChoiceList" ? 1 : 0
- StretchBenchBoolOption { text: "Dimmed:"; id: choiceListOptionDimmed }
- StretchBenchBoolOption { text: "Has model:"; id: choiceListOptionHasModel }
- }
-
- Column {
- anchors.fill: parent; anchors.margins: 10; spacing: 5
- opacity: currentComponentName == "CheckBox" ? 1 : 0
- StretchBenchBoolOption { text: "Dimmed:"; id: checkBoxOptionDimmed }
- StretchBenchBoolOption { text: "Green background:"; id: checkBoxOptionGreenBackground }
- }
-
- Column {
- anchors.fill: parent; anchors.margins: 10; spacing: 5
- opacity: currentComponentName == "RadioButton" ? 1 : 0
- StretchBenchBoolOption { text: "Dimmed:"; id: radioButtonOptionDimmed }
- StretchBenchBoolOption { text: "Green background:"; id: radioButtonOptionGreenBackground }
- }
-
- Column {
- anchors.fill: parent; anchors.margins: 10; spacing: 5
- opacity: currentComponentName == "Switch" ? 1 : 0
- StretchBenchBoolOption { text: "Dimmed:"; id: switchOptionDimmed }
- StretchBenchBoolOption { text: "Green positive highlight:"; id: switchOptionGreenPositiveHighlight }
- StretchBenchBoolOption { text: "Red negative highlight:"; id: switchOptionRedNegativeHighlight }
- StretchBenchBoolOption { text: "Blue switch color:"; id: switchOptionBlueSwitchColor}
- }
-
- Column {
- anchors.fill: parent; anchors.margins: 10; spacing: 5
- opacity: currentComponentName == "TextArea" ? 1 : 0
- StretchBenchBoolOption { text: "Dimmed:"; id: textAreaOptionDimmed }
- }
-
- Column {
- anchors.fill: parent; anchors.margins: 10; spacing: 5
- opacity: currentComponentName == "Slider" ? 1 : 0
- StretchBenchBoolOption { text: "Dimmed:"; id: sliderOptionDimmed }
- StretchBenchBoolOption { text: "Vertical"; id: sliderOptionVertical }
- StretchBenchBoolOption { text: "Inverted"; id: sliderOptionInverted }
- StretchBenchBoolOption { text: "Steps"; id: sliderOptionSteps; checked: true }
- StretchBenchBoolOption { text: "Value at 30:"; id: sliderOptionValueAt30 }
- StretchBenchBoolOption { text: "Zero in middle:"; id: sliderOptionZeroInMiddle }
- StretchBenchBoolOption { text: "Time formatted:"; id: sliderOptionTimeFormatted }
- }
-
- Column {
- anchors.fill: parent; anchors.margins: 10; spacing: 5
- opacity: currentComponentName == "BusyIndicator" ? 1 : 0
- StretchBenchBoolOption { text: "Dimmed:"; id: busyIndicatorOptionDimmed }
- StretchBenchBoolOption { text: "Paused (i.e. !running):"; id: busyIndicatorOptionPaused }
- }
-
- Column {
- anchors.fill: parent; anchors.margins: 10; spacing: 5
- opacity: currentComponentName == "SpinBox" ? 1 : 0
- StretchBenchBoolOption { text: "Dimmed:"; id: spinBoxOptionDimmed }
- }
-
- Column {
- anchors.fill: parent; anchors.margins: 10; spacing: 5
- opacity: currentComponentName == "TextField" ? 1 : 0
- StretchBenchBoolOption { text: "Dimmed:"; id: lineEditOptionDimmed }
- StretchBenchBoolOption { text: "Red text color:"; id: lineEditOptionRedText; }
- StretchBenchBoolOption { text: "Italic font:"; id: lineEditOptionItalicText; }
- StretchBenchBoolOption { text: "Password mode:"; id: lineEditOptionPasswordMode; }
- StretchBenchBoolOption { text: "Focused:"; id: lineEditOptionFocused;
- onCheckedChanged: if(checked) loader.item.forceActiveFocus(); else secondTextField.focus = true; }
-
- TextField { id: secondTextField; placeholderText: "Click to verify focus handling"; width: 230}
- TextField { }
- TextField { }
-
- //mm doesn't quite seem to work
-// StretchBenchBoolOption { text: "Focused:"; checked: lineEdit.activeFocus;
-// onCheckedChanged: { if(checked) lineEdit.focus = false; else lineEdit.forceActiveFocus(); }
-// }
-// TextField { id: lineEdit }
- }
-
- Column {
- anchors.fill: parent; anchors.margins: 10; spacing: 5
- opacity: currentComponentName == "ProgressBar" ? 1 : 0
- StretchBenchBoolOption { text: "Dimmed:"; id: progressBarOptionDimmed }
- StretchBenchBoolOption { text: "Indeterminate:"; id: progressBarOptionIndeterminate }
- }
- }
-
- //
- // The components that we use in the stretch bench
- //
-
- Component {
- id: buttonComponent
- Button {
- enabled: !buttonOptionDimmed.checked
- checkable: buttonOptionLatching.checked
- text: buttonOptionTwoLineText.checked ? "Button\nwith two lines" : "Button"
- iconSource: buttonOptionHasIcon.checked ? "stretchbench/images/testIcon.png" : ""
- backgroundColor: buttonOptionGreenBackground.checked ? "green" : "#fff"
- textColor: buttonOptionWhiteText.checked ? "white" : "black"
- }
- }
-
- Component {
- id: buttonBlockComponent
- ButtonBlock {
- //orientation: Qt.Vertical
- model: ListModel {
- ListElement { text: "Button A"; opacity: 1 }
- ListElement { text: "Button B1"; opacity: 1 }
- ListElement { text: "Button C12"; opacity: 1 }
- ListElement { text: "Button D123"; opacity: 1 }
- }
- onClicked: model.setProperty(1, "text", "Foo")
- enabled: !buttonBlockOptionDimmed.checked
- orientation: buttonBlockOptionVerticalLayout.checked ? Qt.Vertical : Qt.Horizontal
- Connections { target: buttonBlockHideLastButton; onCheckedChanged: handleHideLastButtonChanged() }
- function handleHideLastButtonChanged() {
- model.setProperty(3, "opacity", buttonBlockHideLastButton.checked ? 0 : 1);
- }
- }
- }
- Component {
- id: buttonRowComponent
- ButtonRow {
- Button { text: "Button A" }
- Button { text: "Button B1" }
- Button { text: "Button C12" } //;iconSource: "images/testIcon.png" }
- Button { text: "Button D123"; visible: !buttonRowHideLastButton.checked }
- enabled: !buttonRowOptionDimmed.checked
- }
- }
- Component {
- id: buttonColumnComponent
- ButtonColumn {
- Button { text: "Button A" }
- Button { text: "Button B1" }
- Button { text: "Button C12" }
- Button { text: "Button D123"; visible: !buttonColumnHideLastButton.checked }
- enabled: !buttonColumnOptionDimmed.checked
- }
- }
-
- Component {
- id: checkBoxComponent
- CheckBox {
- enabled: !checkBoxOptionDimmed.checked
- backgroundColor: checkBoxOptionGreenBackground.checked ? "green" : "#fff"
- }
- }
-
- Component {
- id: radioButtonComponent
- RadioButton {
- enabled: !radioButtonOptionDimmed.checked
- backgroundColor: radioButtonOptionGreenBackground.checked ? "green" : "#fff"
- }
- }
-
- Component {
- id: sliderComponent
- Slider {
- enabled: !sliderOptionDimmed.checked
- value: sliderOptionValueAt30.checked ? 30 : 0
- minimumValue: sliderOptionZeroInMiddle.checked ? -50 : 0
- maximumValue: sliderOptionZeroInMiddle.checked ? 50 : 100
-
- orientation: sliderOptionVertical.checked ? Qt.Vertical : Qt.Horizontal
- stepSize: sliderOptionSteps.checked ? 1.0 : 0.0
- inverted: sliderOptionInverted.checked
-
- function formatValue(v) {
- v = Math.round(v);
- if (sliderOptionTimeFormatted.checked) {
- var seconds = Math.floor(v % 60);
- var minutes = Math.floor(v / 60);
-
- // :-P
- if (seconds < 10)
- seconds = "0" + seconds;
- return minutes + ":" + seconds
- }
- return v;
- }
- }
- }
-
- Component {
- id: progressBarComponent
- ProgressBar {
- enabled: !progressBarOptionDimmed.checked
- indeterminate: progressBarOptionIndeterminate.checked
- Timer {
- id: timer
- running: true
- repeat: true
- interval: 25
- onTriggered: {
- var next = parent.value + 0.01;
- parent.value = (next > parent.maximumValue) ? parent.minimumValue : next;
- }
- }
- }
- }
-
- Component {
- id: busyIndicatorComponent
- BusyIndicator {
- enabled: !busyIndicatorOptionDimmed.checked
- running: !busyIndicatorOptionPaused.checked
- }
- }
-
- Component {
- id: lineEditComponent
- TextField {
- enabled: !lineEditOptionDimmed.checked
- textColor: lineEditOptionRedText.checked ? "red" : "black"
- font.italic: lineEditOptionItalicText.checked
- passwordMode: lineEditOptionPasswordMode.checked
- focus: lineEditOptionFocused.checked
- }
- }
-
- Component {
- id: textAreaComponent
- TextArea {
- enabled: !textAreaOptionDimmed.checked
- }
- }
-
- Component {
- id: switchComponent
- Switch {
- enabled: !switchOptionDimmed.checked
- positiveHighlightColor: switchOptionGreenPositiveHighlight.checked ? "green" : syspal.highlight
- negativeHighlightColor: switchOptionRedNegativeHighlight.checked ? "red" : "transparent"
- switchColor: switchOptionBlueSwitchColor.checked ? "blue" : syspal.button
- }
- }
-
- Component {
- id: choiceListComponent
- ChoiceList {
- enabled: !choiceListOptionDimmed.checked
- model: choiceListOptionHasModel.checked ? testDataModel : null
-
- ListModel {
- id: testDataModel
- ListElement { text: "1) Apple" }
- ListElement { text: "2) Banana" }
- ListElement { text: "3) Coconut" }
- ListElement { text: "4) Orange" }
- ListElement { text: "5) Kiwi" }
- ListElement { text: "6) Apple" }
- ListElement { text: "7) Banana" }
- ListElement { text: "8) Coconut" }
- ListElement { text: "9) Orange" }
- ListElement { text: "10) Kiwi" }
- ListElement { text: "11) Apple" }
- ListElement { text: "12) Banana" }
- ListElement { text: "13) Coconut" }
- ListElement { text: "14) Orange" }
- ListElement { text: "15) Kiwi" }
- ListElement { text: "16) Apple" }
- ListElement { text: "17) Banana" }
- ListElement { text: "18) Coconut" }
- ListElement { text: "19) Orange" }
- ListElement { text: "20) Kiwi" }
- ListElement { text: "21) Apple" }
- ListElement { text: "22) Banana" }
- ListElement { text: "23) Coconut" }
- ListElement { text: "24) Orange" }
- ListElement { text: "25) Kiwi" }
- ListElement { text: "26) Apple" }
- ListElement { text: "27) Banana" }
- ListElement { text: "28) Coconut" }
- ListElement { text: "29) Orange" }
- ListElement { text: "30) Kiwi" }
- }
- }
- }
-
- Component {
- id: spinBoxComponent
- SpinBox {
- enabled: !spinBoxOptionDimmed.checked
- }
- }
-}
diff --git a/tools/stretchbench/StretchBenchBoolOption.qml b/tools/stretchbench/StretchBenchBoolOption.qml
deleted file mode 100644
index ceceec17..00000000
--- a/tools/stretchbench/StretchBenchBoolOption.qml
+++ /dev/null
@@ -1,21 +0,0 @@
-import QtQuick 1.0
-import "../../components"
-
-Item {
- id: name
-
- property alias text: optionText.text
- property alias checked: optionCheckBox.checked
-
- anchors.left: parent.left
- anchors.right: parent.right
- height: row.height
-
- Item { id: row
- clip: true
- width: parent.width
- height: Math.max(optionText.height, optionCheckBox.height)
- Text { id: optionText; font.pixelSize: 16; anchors.verticalCenter: parent.verticalCenter }
- CheckBox { id: optionCheckBox; anchors.right: parent.right }
- }
-}
diff --git a/tools/stretchbench/images/checkered.png b/tools/stretchbench/images/checkered.png
deleted file mode 100644
index 12c8b54b..00000000
--- a/tools/stretchbench/images/checkered.png
+++ /dev/null
Binary files differ
diff --git a/tools/stretchbench/images/testIcon.png b/tools/stretchbench/images/testIcon.png
deleted file mode 100644
index 7ac5f840..00000000
--- a/tools/stretchbench/images/testIcon.png
+++ /dev/null
Binary files differ