summaryrefslogtreecommitdiff
path: root/dev-libs/kdiagram
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/kdiagram')
-rw-r--r--dev-libs/kdiagram/Manifest2
-rw-r--r--dev-libs/kdiagram/files/kdiagram-2.6.1-fix-horizontal-bars.patch75
-rw-r--r--dev-libs/kdiagram/kdiagram-2.6.1-r1.ebuild34
3 files changed, 111 insertions, 0 deletions
diff --git a/dev-libs/kdiagram/Manifest b/dev-libs/kdiagram/Manifest
index 9824b870fde4..5d9fb5bdb90f 100644
--- a/dev-libs/kdiagram/Manifest
+++ b/dev-libs/kdiagram/Manifest
@@ -1,3 +1,5 @@
+AUX kdiagram-2.6.1-fix-horizontal-bars.patch 4650 BLAKE2B 4063f8dbd92621f7d05d9b771650e9094eb3caa175a601b3ba51066853e4b222ceeeb6ac006c78a6ae12e70e5b0b4f192a004bb07437c296b5d4c9907f21c681 SHA512 8e0a94c65249f7a8b52e0c6261e251a7bcc07103e5f2bf21c1fc06b171d60a8d726f4c475c91a9114a1b129443208a95340b1aad07f2d31b2be0988f7f1611c4
DIST kdiagram-2.6.1.tar.xz 674016 BLAKE2B 323fcc1101f4bba527426923652ee53a1986edff1c7a0d17a478585019c97f731675fa30477064f1e5375ef0a3da27ba1918ee21cf6758ac445ea0d7f1b7611c SHA512 caa1f6f8bffb4b311224edfed115f189fa9c88e4b9d8bc9d4b7bc963c6b8c896813b438ad89fa9e91e4cde2f55ae822cfc7ba559bbdad517c60a037591dc5128
+EBUILD kdiagram-2.6.1-r1.ebuild 782 BLAKE2B 25cb3f928da97936bfe38caa7b8a68b9e8081092141ae9443ca4c49109070d005c233323e4e8c8a68da2b2e9cffe051735adb6fbcaae1b0b648d7a175e660c3a SHA512 8c7db0341f06fddf09951d3c487b31f7220a9aa3f0797d80a8b2a4a7fcdb32ac94a33b1c2a475628c54c44d4ca58fd070e2e3ff06c206916e18a1a767b66e3ae
EBUILD kdiagram-2.6.1.ebuild 654 BLAKE2B 107e745348aa6492db244419f2ab596e9d4f95970ea2c7bbb798c53347bffec9b993c61976a489da293abfd2f46e7fd606c6a3d228da22a01cb5eb8d387d186a SHA512 9b035287ab682100ec8d1dc5616439c3ca695a7c45a35bbd3593fdd12563babfa5b06dff799bece565bf75091a82c3d84345631b6304f3b2beefc0feedb7adcc
MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3
diff --git a/dev-libs/kdiagram/files/kdiagram-2.6.1-fix-horizontal-bars.patch b/dev-libs/kdiagram/files/kdiagram-2.6.1-fix-horizontal-bars.patch
new file mode 100644
index 000000000000..fae29982773e
--- /dev/null
+++ b/dev-libs/kdiagram/files/kdiagram-2.6.1-fix-horizontal-bars.patch
@@ -0,0 +1,75 @@
+From d3783f643367b264800e853c7c55c515f17c2a3d Mon Sep 17 00:00:00 2001
+From: Dag Andersen <danders@get2net.dk>
+Date: Thu, 23 Aug 2018 10:47:05 +0200
+Subject: Fix painting bar diagrams with horizontal bars
+
+---
+ .../Cartesian/DiagramFlavors/KChartNormalLyingBarDiagram_p.cpp | 5 +++--
+ .../Cartesian/DiagramFlavors/KChartPercentLyingBarDiagram_p.cpp | 4 ++--
+ .../Cartesian/DiagramFlavors/KChartStackedLyingBarDiagram_p.cpp | 4 ++--
+ 3 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/src/KChart/Cartesian/DiagramFlavors/KChartNormalLyingBarDiagram_p.cpp b/src/KChart/Cartesian/DiagramFlavors/KChartNormalLyingBarDiagram_p.cpp
+index 0a262ee..d2343ee 100644
+--- a/src/KChart/Cartesian/DiagramFlavors/KChartNormalLyingBarDiagram_p.cpp
++++ b/src/KChart/Cartesian/DiagramFlavors/KChartNormalLyingBarDiagram_p.cpp
+@@ -158,13 +158,13 @@ void NormalLyingBarDiagram::paint( PaintContext* ctx )
+ }
+ }
+
+- for ( int column = 0; column < colCount; column++ ) {
++ for ( int column = colCount-1; column >= 0; --column ) {
+ // paint one group
+ const CartesianDiagramDataCompressor::CachePosition position( row, column );
+ const CartesianDiagramDataCompressor::DataPoint point = compressor().data( position );
+ const QModelIndex sourceIndex = attributesModel()->mapToSource( point.index );
+
+- QPointF dataPoint( 0, rowCount - ( point.key + 0.5 ) );
++ QPointF dataPoint( 0, ( point.key + 0.5 ) );
+ const QPointF topLeft = ctx->coordinatePlane()->translate( dataPoint );
+ dataPoint.rx() += point.value;
+ const QPointF bottomRight = ctx->coordinatePlane()->translate( dataPoint ) +
+@@ -173,6 +173,7 @@ void NormalLyingBarDiagram::paint( PaintContext* ctx )
+ const QRectF rect = QRectF( topLeft, bottomRight ).translated( 1.0, offset );
+ m_private->addLabel( &lpc, sourceIndex, 0, PositionPoints( rect ), Position::North,
+ Position::South, point.value );
++
+ paintBars( ctx, sourceIndex, rect, maxDepth );
+
+ offset += barWidth + spaceBetweenBars;
+diff --git a/src/KChart/Cartesian/DiagramFlavors/KChartPercentLyingBarDiagram_p.cpp b/src/KChart/Cartesian/DiagramFlavors/KChartPercentLyingBarDiagram_p.cpp
+index fee53d3..10dca65 100644
+--- a/src/KChart/Cartesian/DiagramFlavors/KChartPercentLyingBarDiagram_p.cpp
++++ b/src/KChart/Cartesian/DiagramFlavors/KChartPercentLyingBarDiagram_p.cpp
+@@ -192,11 +192,11 @@ void PercentLyingBarDiagram::paint( PaintContext* ctx )
+
+ QPointF point, previousPoint;
+ if ( sumValuesVector.at( curRow ) != 0 && value > 0 ) {
+- QPointF dataPoint( ( stackedValues / sumValuesVector.at( curRow ) * maxValue ), rowCount - key );
++ QPointF dataPoint( ( stackedValues / sumValuesVector.at( curRow ) * maxValue ), key + 1 );
+ point = ctx->coordinatePlane()->translate( dataPoint );
+ point.ry() += offset / 2 + threeDOffset;
+
+- previousPoint = ctx->coordinatePlane()->translate( QPointF( ( ( stackedValues - value) / sumValuesVector.at( curRow ) * maxValue ), rowCount - key ) );
++ previousPoint = ctx->coordinatePlane()->translate( QPointF( ( ( stackedValues - value) / sumValuesVector.at( curRow ) * maxValue ), key + 1 ) );
+ }
+
+ const qreal barHeight = point.x() - previousPoint.x();
+diff --git a/src/KChart/Cartesian/DiagramFlavors/KChartStackedLyingBarDiagram_p.cpp b/src/KChart/Cartesian/DiagramFlavors/KChartStackedLyingBarDiagram_p.cpp
+index 70cbba0..1a5b003 100644
+--- a/src/KChart/Cartesian/DiagramFlavors/KChartStackedLyingBarDiagram_p.cpp
++++ b/src/KChart/Cartesian/DiagramFlavors/KChartStackedLyingBarDiagram_p.cpp
+@@ -184,9 +184,9 @@ void StackedLyingBarDiagram::paint( PaintContext* ctx )
+ stackedValues += point.value;
+ key = point.key;
+ }
+- QPointF point = ctx->coordinatePlane()->translate( QPointF( stackedValues, rowCount - key ) );
++ QPointF point = ctx->coordinatePlane()->translate( QPointF( stackedValues, key + 1 ) );
+ point.ry() += offset / 2 + threeDOffset;
+- const QPointF previousPoint = ctx->coordinatePlane()->translate( QPointF( stackedValues - value, rowCount - key ) );
++ const QPointF previousPoint = ctx->coordinatePlane()->translate( QPointF( stackedValues - value, key + 1 ) );
+ const qreal barHeight = point.x() - previousPoint.x();
+ point.rx() -= barHeight;
+
+--
+cgit v1.1
diff --git a/dev-libs/kdiagram/kdiagram-2.6.1-r1.ebuild b/dev-libs/kdiagram/kdiagram-2.6.1-r1.ebuild
new file mode 100644
index 000000000000..6e88b0a90514
--- /dev/null
+++ b/dev-libs/kdiagram/kdiagram-2.6.1-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+KDE_EXAMPLES="true"
+KDE_QTHELP="true"
+KDE_TEST="true"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+if [[ ${KDE_BUILD_TYPE} = release ]]; then
+ KEYWORDS="~amd64 ~arm64 ~x86"
+ SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz"
+fi
+
+DESCRIPTION="Powerful libraries (KChart, KGantt) for creating business diagrams"
+HOMEPAGE="https://kde.org/ https://www.kdab.com/development-resources/qt-tools/kd-chart/"
+IUSE=""
+
+REQUIRED_USE="test? ( examples )"
+
+BDEPEND="
+ $(add_qt_dep linguist-tools)
+"
+DEPEND="
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtprintsupport)
+ $(add_qt_dep qtsvg)
+ $(add_qt_dep qtwidgets)
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-fix-horizontal-bars.patch" )