summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@nokia.com>2011-10-16 17:04:57 +0200
committerJens Bache-Wiig <jens.bache-wiig@nokia.com>2011-10-16 17:04:57 +0200
commitc6d52bd565f8dbcd7c8e4867b5c2178798ed01c4 (patch)
tree09b7d06275a3060d1d18a57cd434e8b572992bb8 /components
parent01bab53dce4bff000db9feb55c66b49db9edf2cf (diff)
downloadqtquickcontrols-c6d52bd565f8dbcd7c8e4867b5c2178798ed01c4.tar.gz
Remove ChoiceList
It is completely redundant with ComboBox
Diffstat (limited to 'components')
-rw-r--r--components/ChoiceList.qml61
-rw-r--r--components/components.pro1
-rw-r--r--components/custom/ChoiceList.qml49
-rw-r--r--components/custom/components.pro1
-rw-r--r--components/custom/qmldir1
-rw-r--r--components/qmldir1
6 files changed, 0 insertions, 114 deletions
diff --git a/components/ChoiceList.qml b/components/ChoiceList.qml
deleted file mode 100644
index 82e62403..00000000
--- a/components/ChoiceList.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-import QtQuick 1.1
-import "custom" as Components
-
-Components.ChoiceList {
-
- id: choicelist
-
- property int buttonHeight: backgroundItem.sizeFromContents(100, 18).height
- property int buttonWidth: backgroundItem.sizeFromContents(100, 18).width
-
- property string styleHint
-
- implicitWidth: buttonHeight
- implicitHeight: buttonWidth
-
- topMargin: 4
- bottomMargin: 4
-
- background: StyleItem {
- anchors.fill: parent
- elementType: "combobox"
- sunken: pressed
- raised: !pressed
- hover: containsMouse
- enabled: choicelist.enabled
- text: currentItemText
- hasFocus: choicelist.focus
- hint: choicelist.styleHint
- }
-
- listItem: Item {
- id:item
-
- height: 22
- anchors.left: parent.left
- width: choicelist.width
- StyleItem {
- anchors.fill: parent
- elementType: "comboboxitem"
- text: itemText
- selected: highlighted
-
- }
- }
- popupFrame: StyleItem {
- property string popupLocation: backgroundItem.styleHint("comboboxpopup") ? "center" : "below"
- property int fw: backgroundItem.pixelMetric("menupanelwidth");
- anchors.leftMargin: backgroundItem.pixelMetric("menuhmargin") + fw
- anchors.rightMargin: backgroundItem.pixelMetric("menuhmargin") + fw
- anchors.topMargin: backgroundItem.pixelMetric("menuvmargin") + fw
- anchors.bottomMargin: backgroundItem.pixelMetric("menuvmargin") + fw
- elementType: "menu"
-
- effect: DropShadow {
- blurRadius: 18
- color: "#90000000"
- xOffset: 1
- yOffset: 1
- }
- }
-}
diff --git a/components/components.pro b/components/components.pro
index 60f178fc..a761830d 100644
--- a/components/components.pro
+++ b/components/components.pro
@@ -34,7 +34,6 @@ QML_FILES = \
SpinBox.qml \
TabFrame.qml \
TextArea.qml \
- ChoiceList.qml \
ScrollArea.qml \
SplitterRow.qml \
SplitterColumn.qml \
diff --git a/components/custom/ChoiceList.qml b/components/custom/ChoiceList.qml
deleted file mode 100644
index 2f881849..00000000
--- a/components/custom/ChoiceList.qml
+++ /dev/null
@@ -1,49 +0,0 @@
-import QtQuick 1.1
-import "./private" as Private
-
-Item {
- id: choiceList
-
- property alias model: popup.model
- property alias currentIndex: popup.currentIndex
- property alias currentText: popup.currentText
- property alias popupOpen: popup.popupOpen
- property alias containsMouse: popup.containsMouse
- property alias pressed: popup.buttonPressed
-
- property Component background: null
- property Item backgroundItem: backgroundLoader.item
- property Component listItem: null
- property Component popupFrame: null
-
- property int leftMargin: 0
- property int topMargin: 0
- property int rightMargin: 0
- property int bottomMargin: 0
-
- property string popupBehavior
- width: 0
- height: 0
-
- property bool activeFocusOnPress: true
-
- Loader {
- id: backgroundLoader
- property alias styledItem: choiceList
- sourceComponent: background
- anchors.fill: parent
- property string currentItemText: model.get(currentIndex).text
- }
-
- Private.ChoiceListPopup {
- // NB: This ChoiceListPopup is also the mouse area
- // for the component (to enable drag'n'release)
- id: popup
- listItem: choiceList.listItem
- popupFrame: choiceList.popupFrame
- }
-
- Keys.onSpacePressed: { choiceList.popupOpen = !choiceList.popupOpen }
- Keys.onUpPressed: { if (currentIndex < model.count - 1) currentIndex++ }
- Keys.onDownPressed: {if (currentIndex > 0) currentIndex-- }
-}
diff --git a/components/custom/components.pro b/components/custom/components.pro
index 4b4dffd4..e063d91d 100644
--- a/components/custom/components.pro
+++ b/components/custom/components.pro
@@ -17,7 +17,6 @@ QML_FILES = \
ButtonGroup.js \
Button.qml \
CheckBox.qml \
- ChoiceList.qml \
Splitter.qml \
ProgressBar.qml \
RadioButton.qml \
diff --git a/components/custom/qmldir b/components/custom/qmldir
index fb12b4ae..716e44fa 100644
--- a/components/custom/qmldir
+++ b/components/custom/qmldir
@@ -6,7 +6,6 @@ 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
Slider 1.0 Slider.qml
SpinBox 1.0 SpinBox.qml
diff --git a/components/qmldir b/components/qmldir
index 433bfdf9..000c0218 100644
--- a/components/qmldir
+++ b/components/qmldir
@@ -10,7 +10,6 @@ Tab 0.1 Tab.qml
Frame 0.1 Frame.qml
ScrollArea 0.1 ScrollArea.qml
ScrollBar 0.1 ScrollBar.qml
-ChoiceList 0.1 ChoiceList.qml
ComboBox 0.1 ComboBox.qml
ToolButton 0.1 ToolButton.qml
TextArea 0.1 TextArea.qml