From 3c7b870f367df150ea60eb9d6bb2fd41646545d7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 3 Feb 2010 01:26:04 +0000 Subject: Added abandoned Filelight application git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/filelight@1084392 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/part/radialMap/labels.cpp | 327 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 327 insertions(+) create mode 100644 src/part/radialMap/labels.cpp (limited to 'src/part/radialMap/labels.cpp') diff --git a/src/part/radialMap/labels.cpp b/src/part/radialMap/labels.cpp new file mode 100644 index 0000000..73a7ba8 --- /dev/null +++ b/src/part/radialMap/labels.cpp @@ -0,0 +1,327 @@ +//Author: Max Howell , (C) 2003-4 +//Copyright: See COPYING file that comes with this distribution + +#include +#include +#include +#include +#include + +#include "Config.h" +#include "fileTree.h" +#include "radialMap.h" +#include "sincos.h" +#include "widget.h" + + + +namespace RadialMap +{ + struct Label + { + Label( const RadialMap::Segment *s, int l ) : segment( s ), lvl( l ), a( segment->start() + (segment->length() / 2) ) { } + + bool tooClose( const int &aa ) const { return ( a > aa - LABEL_ANGLE_MARGIN && a < aa + LABEL_ANGLE_MARGIN ); } + + const RadialMap::Segment *segment; + const unsigned int lvl; + const int a; + + int x1, y1, x2, y2, x3; + int tx, ty; + + QString qs; + }; + + class LabelList : public QPtrList