1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- import Qt 4.7
- Rectangle {
- id: container
- smooth: true
- radius: 8
- color: "khaki"
- border.color: "black"
- border.width: 2
- property int selected: -1
- signal bubblesSelected
- width: dialogText.width
- height: dialogText.height + op1.height + op2.height + op3.height + 10 + 3*5
- opacity: 0
- function show(text) {
- container.opacity = 1;
- }
- function hide() {
- container.opacity = 0;
- }
- MouseArea {
- anchors.fill: parent
- onClicked: hide();
- }
- Column {
- id: optionsColumn1
- spacing: 10
- Text {
- id: dialogText
- font.pointSize: 12
- text: " How many bubbles? "
- }
- Column {
- id: optionsColumn
- anchors.horizontalCenter: parent.horizontalCenter
- spacing: 5
- Button {
- id: op1
- text: "Deserted"
- textPointSize: 10
- width: dialogText.width - 10
- radius: 3
- onClicked: {
- selected = 0;
- bubblesSelected();
- }
- }
- Button {
- id: op2
- text: "Many"
- textPointSize: 10
- width: dialogText.width - 10
- radius: 3
- onClicked: {
- selected = 1;
- bubblesSelected();
- }
- }
- Button {
- id: op3
- text: "Crowded"
- textPointSize: 10
- width: dialogText.width - 10
- radius: 3
- onClicked: {
- selected = 2;
- bubblesSelected();
- }
- }
- }
- }
- }
|