From 2932f37127178496c91f6cf0fc94e9cb04740b12 2012-11-28 12:40:05 From: Tero Ahola Date: 2012-11-28 12:40:05 Subject: [PATCH] Fixed QML oscilloscope layout --- diff --git a/demos/qmloscilloscope/datasource.cpp b/demos/qmloscilloscope/datasource.cpp index dfbc0d4..f09c51c 100644 --- a/demos/qmloscilloscope/datasource.cpp +++ b/demos/qmloscilloscope/datasource.cpp @@ -53,8 +53,6 @@ void DataSource::update(QAbstractSeries *series) void DataSource::generateData(int type, int rowCount, int colCount) { - qDebug() << "DataSource::generateData:" << type << rowCount << colCount; - // Remove previous data foreach (QList row, m_data) row.clear(); diff --git a/demos/qmloscilloscope/qml/qmloscilloscope/ControlPanel.qml b/demos/qmloscilloscope/qml/qmloscilloscope/ControlPanel.qml index f94d46b..f5c536e 100644 --- a/demos/qmloscilloscope/qml/qmloscilloscope/ControlPanel.qml +++ b/demos/qmloscilloscope/qml/qmloscilloscope/ControlPanel.qml @@ -21,7 +21,7 @@ import QtQuick 1.0 Column { - spacing: 5 + spacing: 8 signal animationsEnabled(bool enabled) signal seriesTypeChanged(string type) signal refreshRateChanged(variant rate); @@ -29,8 +29,9 @@ Column { signal antialiasingEnabled(bool enabled) Text { - text: "Oscilloscope" + text: "Scope-PAS2" font.pointSize: 18 + color: "white" } MultiButton { diff --git a/demos/qmloscilloscope/qml/qmloscilloscope/MultiButton.qml b/demos/qmloscilloscope/qml/qmloscilloscope/MultiButton.qml index 9509e84..95d804c 100644 --- a/demos/qmloscilloscope/qml/qmloscilloscope/MultiButton.qml +++ b/demos/qmloscilloscope/qml/qmloscilloscope/MultiButton.qml @@ -22,9 +22,14 @@ import QtQuick 1.0 Rectangle { id: button - width: 120 - height: 30 - border.color: "gray" + width: 115 + height: 31 + gradient: Gradient { + GradientStop { position: mouseArea.pressed ? 1.0 : 0.0; color: "#A09090" } + GradientStop { position: mouseArea.pressed ? 0.0 : 1.0; color: "#505050" } + } + smooth: true + radius: 7 property string text: "Option: " property variant items: ["first"] @@ -34,10 +39,12 @@ Rectangle { Text { id: buttonText anchors.centerIn: parent + color: "#FFFFFF" text: button.text + button.items[currentSelection] } MouseArea { + id: mouseArea anchors.fill: parent onClicked: { currentSelection = (currentSelection + 1) % items.length; diff --git a/demos/qmloscilloscope/qml/qmloscilloscope/ScopeView.qml b/demos/qmloscilloscope/qml/qmloscilloscope/ScopeView.qml index 1a7b2b0..97c9403 100644 --- a/demos/qmloscilloscope/qml/qmloscilloscope/ScopeView.qml +++ b/demos/qmloscilloscope/qml/qmloscilloscope/ScopeView.qml @@ -19,7 +19,7 @@ ****************************************************************************/ import QtQuick 1.0 -import QtCommercial.Chart 1.1 +import QtCommercial.Chart 1.2 //![1] ChartView { @@ -55,7 +55,7 @@ ChartView { id: lineSeries2 name: "signal 2" axisX: axisX - axisY: axisY2 + axisYRight: axisY2 } // ... //![1] diff --git a/demos/qmloscilloscope/qml/qmloscilloscope/main.qml b/demos/qmloscilloscope/qml/qmloscilloscope/main.qml index 8794a62..daac400 100644 --- a/demos/qmloscilloscope/qml/qmloscilloscope/main.qml +++ b/demos/qmloscilloscope/qml/qmloscilloscope/main.qml @@ -25,6 +25,7 @@ Rectangle { id: main width: 400 height: 300 + color: "#404040" ControlPanel { id: controlPanel