From b13cf09c097ff0f00de6e8f40cf57fa2d821f2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Wed, 13 Apr 2016 17:59:49 +0200 Subject: [PATCH] Added read marks to FlowView.qml --- YACReaderLibrary/info_comics_view.cpp | 5 ++++- YACReaderLibrary/qml/FlowView.qml | 11 ++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/YACReaderLibrary/info_comics_view.cpp b/YACReaderLibrary/info_comics_view.cpp index e098a85f..8ca046d3 100644 --- a/YACReaderLibrary/info_comics_view.cpp +++ b/YACReaderLibrary/info_comics_view.cpp @@ -36,6 +36,8 @@ InfoComicsView::InfoComicsView(QWidget *parent) l->setContentsMargins(0,0,0,0); l->setSpacing(0); + setShowMarks(true); + QLOG_TRACE() << "GridComicsView"; } @@ -148,7 +150,8 @@ void InfoComicsView::selectIndex(int index) void InfoComicsView::setShowMarks(bool show) { - int FIXME; + QQmlContext *ctxt = view->rootContext(); + ctxt->setContextProperty("show_marks", show); } void InfoComicsView::selectAll() diff --git a/YACReaderLibrary/qml/FlowView.qml b/YACReaderLibrary/qml/FlowView.qml index 073cf0e8..e10505e2 100644 --- a/YACReaderLibrary/qml/FlowView.qml +++ b/YACReaderLibrary/qml/FlowView.qml @@ -50,7 +50,6 @@ Rectangle { anchors.margins: 0 - MouseArea { anchors.fill : list onWheel: { @@ -137,6 +136,16 @@ Rectangle { cache: false } + //mark + Image { + id: mark + width: 23 + height: 23 + source: read_column&&show_marks?"tick.png":has_been_opened&&show_marks?"reading.png":"" + anchors {right: coverElement.right; top: coverElement.top; topMargin: 9; rightMargin: 9} + asynchronous : true + } + //border Rectangle { width: coverElement.width