summaryrefslogtreecommitdiffstats
path: root/src/app/DiskUsage/radialMap/radialMap.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-08-28 22:44:34 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-08-31 23:30:34 +0900
commitf9abd9d505434c9244c03eac708e29a0ca042f6b (patch)
tree30a197ab4c413849188bc131ff859212e636c821 /src/app/DiskUsage/radialMap/radialMap.h
parent14d42d284de233f9937becf3fc9ee0dabede3b21 (diff)
downloadkrusader-r14.1.x.tar.gz
krusader-r14.1.x.zip
Restructure source foldersr14.1.x
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 086012dcad8a976a0dabbb7cbc20c9cb612cdfa9)
Diffstat (limited to 'src/app/DiskUsage/radialMap/radialMap.h')
-rw-r--r--src/app/DiskUsage/radialMap/radialMap.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/app/DiskUsage/radialMap/radialMap.h b/src/app/DiskUsage/radialMap/radialMap.h
new file mode 100644
index 0000000..c5edf65
--- /dev/null
+++ b/src/app/DiskUsage/radialMap/radialMap.h
@@ -0,0 +1,71 @@
+//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
+//Copyright: See COPYING file that comes with this distribution
+
+#ifndef RADIALMAP_H
+#define RADIALMAP_H
+
+#include <tqcolor.h>
+
+class File;
+
+
+namespace RadialMap
+{
+ class Segment //all angles are in 16ths of degrees
+ {
+ public:
+ Segment( const File *f, uint s, uint l, bool isFake = false )
+ : m_angleStart( s )
+ , m_angleSegment( l )
+ , m_file( f )
+ , m_hasHiddenChildren( false )
+ , m_fake( isFake ) {}
+ ~Segment();
+
+ uint start() const { return m_angleStart; }
+ uint length() const { return m_angleSegment; }
+ uint end() const { return m_angleStart + m_angleSegment; }
+ const File *file() const { return m_file; }
+ const TQColor& pen() const { return m_pen; }
+ const TQColor& brush() const { return m_brush; }
+
+ bool isFake() const { return m_fake; }
+ bool hasHiddenChildren() const { return m_hasHiddenChildren; }
+
+ bool intersects( uint a ) const { return ( ( a >= start() ) && ( a < end() ) ); }
+
+ friend class Map;
+ friend class Builder;
+
+ private:
+ void setPalette( const TQColor &p, const TQColor &b ) { m_pen = p; m_brush = b; }
+
+ const uint m_angleStart, m_angleSegment;
+ const File* const m_file;
+ TQColor m_pen, m_brush;
+ bool m_hasHiddenChildren;
+ const bool m_fake;
+ };
+}
+
+
+#ifndef PI
+#define PI 3.141592653589793
+#endif
+#ifndef M_PI
+#define M_PI 3.14159265358979323846264338327
+#endif
+
+#define MIN_RING_BREADTH 20
+#define MAX_RING_BREADTH 60
+#define DEFAULT_RING_DEPTH 4 //first level = 0
+#define MIN_RING_DEPTH 0
+
+#define LABEL_MAP_SPACER 7
+#define LABEL_HMARGIN 10
+#define LABEL_TEXT_HMARGIN 5
+#define LABEL_TEXT_VMARGIN 0
+#define LABEL_ANGLE_MARGIN 32
+#define LABEL_MIN_ANGLE_FACTOR 0.05
+
+#endif