• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeutils API Reference
  • KDE Home
  • Contact Us
 

filelight

  • sources
  • kde-4.12
  • kdeutils
  • filelight
  • src
  • part
  • radialMap
radialMap.h
Go to the documentation of this file.
1 /***********************************************************************
2 * Copyright 2003-2004 Max Howell <max.howell@methylblue.com>
3 * Copyright 2008-2009 Martin Sandsmark <martin.sandsmark@kde.org>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License or (at your option) version 3 or any later version
9 * accepted by the membership of KDE e.V. (or its successor approved
10 * by the membership of KDE e.V.), which shall act as a proxy
11 * defined in Section 14 of version 3 of the license.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ***********************************************************************/
21 
22 #ifndef RADIALMAP_H
23 #define RADIALMAP_H
24 
25 #include <QColor>
26 
27 class File;
28 
29 namespace RadialMap
30 {
31 class Segment //all angles are in 16ths of degrees
32 {
33 public:
34  Segment(const File *f, uint s, uint l, bool isFake = false)
35  : m_angleStart(s)
36  , m_angleSegment(l)
37  , m_file(f)
38  , m_hasHiddenChildren(false)
39  , m_fake(isFake) {}
40  ~Segment();
41 
42  uint start() const {
43  return m_angleStart;
44  }
45  uint length() const {
46  return m_angleSegment;
47  }
48  uint end() const {
49  return m_angleStart + m_angleSegment;
50  }
51  const File *file() const {
52  return m_file;
53  }
54  const QColor& pen() const {
55  return m_pen;
56  }
57  const QColor& brush() const {
58  return m_brush;
59  }
60 
61  bool isFake() const {
62  return m_fake;
63  }
64  bool hasHiddenChildren() const {
65  return m_hasHiddenChildren;
66  }
67 
68  bool intersects(uint a) const {
69  return ((a >= start()) && (a < end()));
70  }
71 
72  friend class Map;
73  friend class Builder;
74 
75 private:
76  void setPalette(const QColor &p, const QColor &b) {
77  m_pen = p;
78  m_brush = b;
79  }
80 
81  const uint m_angleStart, m_angleSegment;
82  const File* const m_file;
83  QColor m_pen, m_brush;
84  bool m_hasHiddenChildren;
85  const bool m_fake;
86 };
87 }
88 
89 
90 #ifndef PI
91 #define PI 3.141592653589793
92 #endif
93 #ifndef M_PI
94 #define M_PI 3.14159265358979323846264338327
95 #endif
96 
97 #define MIN_RING_BREADTH 20
98 #define MAX_RING_BREADTH 60
99 #define DEFAULT_RING_DEPTH 4 //first level = 0
100 #define MIN_RING_DEPTH 0
101 
102 #define LABEL_MAP_SPACER 7
103 #define LABEL_HMARGIN 10
104 #define LABEL_TEXT_HMARGIN 5
105 #define LABEL_TEXT_VMARGIN 0
106 #define LABEL_ANGLE_MARGIN 32
107 #define LABEL_MIN_ANGLE_FACTOR 0.05
108 #define LABEL_MAX_CHARS 30
109 
110 #endif
RadialMap::Segment::hasHiddenChildren
bool hasHiddenChildren() const
Definition: radialMap.h:64
RadialMap::Segment::end
uint end() const
Definition: radialMap.h:48
RadialMap::Segment::pen
const QColor & pen() const
Definition: radialMap.h:54
RadialMap::Segment::length
uint length() const
Definition: radialMap.h:45
RadialMap::Builder
Definition: builder.h:37
RadialMap::Segment::brush
const QColor & brush() const
Definition: radialMap.h:57
RadialMap::Map
Definition: map.h:36
RadialMap::Segment::Segment
Segment(const File *f, uint s, uint l, bool isFake=false)
Definition: radialMap.h:34
RadialMap::Segment::file
const File * file() const
Definition: radialMap.h:51
RadialMap::Segment::intersects
bool intersects(uint a) const
Definition: radialMap.h:68
RadialMap::Segment::start
uint start() const
Definition: radialMap.h:42
RadialMap::Segment::~Segment
~Segment()
Definition: widget.cpp:210
RadialMap::Segment
Definition: radialMap.h:31
File
Definition: fileTree.h:225
RadialMap::Segment::isFake
bool isFake() const
Definition: radialMap.h:61
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:08:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

filelight

Skip menu "filelight"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • kremotecontrol
  • ktimer
  • kwallet
  • superkaramba
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal