[-]
[+]
|
Changed |
_service:tar_git:valuelogger.spec
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,6 +2,6 @@
<service name="tar_git">
<param name="url">https://github.com/monich/valuelogger.git</param>
<param name="branch">master</param>
- <param name="revision">022bd48</param>
+ <param name="revision">3f62046</param>
</service>
</services>
\ No newline at end of file
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-valuelogger2-1.0.16.tar.bz2/qml/components/LinePlot.qml
^
|
@@ -25,6 +25,7 @@
*/
import QtQuick 2.0
+import QtGraphicalEffects 1.0
import Sailfish.Silica 1.0
import harbour.valuelogger 1.0
@@ -34,6 +35,7 @@
property var parInfoModel
property bool dragging
+ readonly property bool darkOnLight: 'colorScheme' in Theme && Theme.colorScheme === Theme.DarkOnLight
readonly property int thinLine: Math.max(2, Math.floor(Theme.paddingSmall/3))
readonly property int fontSize: Theme.fontSizeTiny
readonly property bool fontBold: true
@@ -247,6 +249,7 @@
id: legend
active: parInfoModel.length > 1
+ z: 11
anchors {
left: grid.left
leftMargin: Math.round(grid.width/grid.horizontalCount/2)
@@ -254,18 +257,24 @@
rightMargin: Theme.horizontalPageMargin
top: grid.top
topMargin: Theme.paddingLarge
+ bottom: grid.bottom
+ bottomMargin: Theme.paddingLarge
}
sourceComponent: Component {
ListView {
id: legendList
- z: 11
- height: itemHeight * count
+ width: legend.width
+ height: legend.height
model: parInfoModel
visible: opacity > 0
+ interactive: false
+ clip: true
- readonly property real itemHeight: Math.round(fontSize * 3 / 2)
+ readonly property int itemHeight: Math.round(fontSize * 3 / 2)
+ readonly property int shadowOffset: Math.ceil(Theme.paddingSmall/4)
+ readonly property color shadowColor: darkOnLight ? "#80ffffff" : "#80000000"
delegate: Item {
height: legendList.itemHeight
@@ -273,13 +282,38 @@
Rectangle {
id: legendColor
+
width: Theme.paddingLarge
height: Theme.paddingSmall/2
color: modelData.plotcolor
anchors.verticalCenter: parent.verticalCenter
+ layer.enabled: true
+ layer.effect: DropShadow {
+ color: legendList.shadowColor
+ horizontalOffset: legendList.shadowOffset
+ verticalOffset: legendList.shadowOffset
+ transparentBorder: true
+ }
+ }
+
+ // DropShadow doesn't seem to work with Label :(
+ Label {
+ x: legendLabel.x + legendList.shadowOffset
+ y: legendLabel.y + legendList.shadowOffset
+ width: legendLabel.width - legendList.shadowOffset
+ height: height.width
+ font {
+ pixelSize: fontSize
+ bold: fontBold
+ }
+ text: modelData.name
+ truncationMode: TruncationMode.Fade
+ color: legendList.shadowColor
}
Label {
+ id: legendLabel
+
anchors {
verticalCenter: parent.verticalCenter
left: legendColor.right
@@ -310,10 +344,11 @@
interval: 2000
running: true
- onTriggered: legendList.opacity = 0.0
+ onTriggered: parent.opacity = 0.0
}
function show() {
+ Debug.log("Showing legend")
opacity = 1.0
legendVisibility.restart()
}
@@ -343,7 +378,6 @@
readonly property real leftMargin: valueMax.width
readonly property real opacityRamp: Theme.paddingLarge
Repeater {
- //model: Settings.topGridLabels ? timeGridModel : 0
model: timeGridModel
delegate: Text {
x: model.coordinate - width/2
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-valuelogger2-1.0.16.tar.bz2/qml/cover/CoverPage.qml
^
|
@@ -1,4 +1,5 @@
import QtQuick 2.0
+import QtGraphicalEffects 1.0
import Sailfish.Silica 1.0
import harbour.valuelogger 1.0
@@ -77,6 +78,27 @@
onModelReset: graph.update()
}
+ Rectangle {
+ id: background
+
+ x: thickLine
+ y: thickLine
+ width: parent.width - 2 * x
+ height: parent.height - 2 * y
+ color: darkOnLight ? "white" : "black"
+ radius: Theme.paddingSmall - thickLine
+ opacity: 0.2
+ }
+
+ Rectangle {
+ id: mask
+
+ anchors.fill: background
+ color: background.color
+ radius: background.radius
+ visible: false
+ }
+
Graph {
id: graph
@@ -93,37 +115,55 @@
lineWidth: thickLine
nodeMarks: false
color: Logger.defaultParameterColor
+ visible: false
}
- Repeater {
- id: verticalGrid
-
- readonly property int gridCount: 5
- model: gridCount - 1
- delegate: VDashLine {
- x: graph.x + Math.round((index + 1) * graph.width / verticalGrid.gridCount - width / 2)
- y: graph.y
- width: thinLine
- height: graph.height
- dashSize: 2 * width
- color: Theme.primaryColor
- opacity: 0.4
- }
+ OpacityMask {
+ anchors.fill: graph
+ source: graph
+ maskSource: mask
}
- Repeater {
- id: horizontalGrid
+ ShaderEffectSource {
+ id: grid
- readonly property int gridCount: 5
- model: gridCount - 1
- delegate: HDashLine {
- x: graph.x
- y: graph.x + Math.round((index + 1) * graph.height / horizontalGrid.gridCount - height / 2)
- width: graph.width
- height: thinLine
- dashSize: 2 * height
- color: Theme.primaryColor
- opacity: 0.4
+ readonly property color color: Theme.primaryColor
+
+ anchors.fill: parent
+ opacity: 0.4
+ sourceItem: Item {
+ width: grid.width
+ height: grid.height
+
+ Repeater {
+ id: verticalGrid
+
+ readonly property int gridCount: 5
+ model: gridCount - 1
+ delegate: VDashLine {
+ x: graph.x + Math.round((index + 1) * graph.width / verticalGrid.gridCount - width / 2)
+ y: graph.y
+ width: thinLine
+ height: graph.height
+ dashSize: 2 * width
+ color: grid.color
+ }
+ }
+
+ Repeater {
+ id: horizontalGrid
+
+ readonly property int gridCount: 5
+ model: gridCount - 1
+ delegate: HDashLine {
+ x: graph.x
+ y: graph.x + Math.round((index + 1) * graph.height / horizontalGrid.gridCount - height / 2)
+ width: graph.width
+ height: thinLine
+ dashSize: 2 * height
+ color: grid.color
+ }
+ }
}
}
@@ -133,6 +173,7 @@
anchors.fill: parent
opacity: 0.6
color: "transparent"
+ radius: Theme.paddingSmall
border {
width: thickLine
color: Theme.primaryColor
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-valuelogger2-1.0.16.tar.bz2/src/dashline.cpp
^
|
@@ -61,8 +61,8 @@
QSGGeometryNode* node = (QSGGeometryNode*)nodes[i];
QSGFlatColorMaterial* m = (QSGFlatColorMaterial*)node->material();
m->setColor(color);
- node->markDirty(QSGNode::DirtyMaterial);
}
+ update();
emit colorChanged();
}
}
@@ -100,7 +100,7 @@
void DashLine::updateRectNode(QSGGeometryNode* node, float x, float y, float w, float h)
{
updateRectGeometry(node->geometry()->vertexDataAsPoint2D(), x, y, w, h);
- node->markDirty(QSGNode::DirtyGeometry);
+ node->markDirty(QSGNode::DirtyGeometry | QSGNode::DirtyMaterial);
}
QSGGeometryNode* DashLine::newNode(QSGGeometry* g)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-valuelogger2-1.0.16.tar.bz2/src/datamodel.cpp
^
|
@@ -107,6 +107,7 @@
#define FIRST_TIME 0x01
#define FIRST_VALUE 0x02
+ m_data.reserve(n);
int first = (FIRST_TIME | FIRST_VALUE);
for (int i = 0; i < n; i++) {
Data* data = new Data(rawData.at(i).toMap());
@@ -194,6 +195,7 @@
data->annotation = annotation;
roles.append(AnnotationRole);
}
+
const QString currentTimestamp(Database::toString(data->timestamp));
if (currentTimestamp != timestamp) {
DBG(TIMESTAMP << "=" << timestamp);
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-valuelogger2-1.0.16.tar.bz2/src/logger.cpp
^
|
@@ -51,6 +51,8 @@
};
namespace {
+ const QString VERSION(APPVERSION);
+
const QString PARAMETER(PARAMETER_COL);
const QString NAME(NAME_ROLE);
const QString DESCRIPTION(DESCRIPTION_ROLE);
@@ -88,6 +90,12 @@
{
}
+QString Logger::getVersion()
+{
+ DBG(VERSION);
+ return VERSION;
+}
+
void Logger::queueSignal(uint signal)
{
queuedSignals |= 1u << signal;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-valuelogger2-1.0.16.tar.bz2/src/logger.h
^
|
@@ -53,8 +53,8 @@
~Logger();
static int dataTableRole();
+ static QString getVersion();
- static QString getVersion() { return APPVERSION; }
int getVisualizeCount() const { return m_visualizeCount; }
int getDefaultParameterIndex() const { return m_defaultParameterIndex; }
QString getDefaultParameterName() const { return m_defaultParameterName; }
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-valuelogger2-1.0.16.tar.bz2/valuelogger.pro
^
|
@@ -11,7 +11,7 @@
QMAKE_CXXFLAGS += -Wno-unused-parameter -Wno-psabi
isEmpty(SPECVERSION) {
- SPECVERSION=1.0.15
+ SPECVERSION=1.0.16
}
DEFINES += "APPVERSION=\\\"$${SPECVERSION}\\\""
|