Logo Search packages:      
Sourcecode: kdeaddons version File versions

TreeMapItem Class Reference

#include <treemap.h>

Inheritance diagram for TreeMapItem:

DrawParams Inode

List of all members.

Detailed Description

Base class of items in TreeMap.

This class supports an arbitrary number of text() strings positioned counterclock-wise starting at TopLeft. Each item has its own static value(), sum() and sorting(). The splitMode() and borderWidth() is taken from a TreeMapWidget.

If you want more flexibility, reimplement TreeMapItem and override the corresponding methods. For dynamic creation of child items on demand, reimplement children().

Definition at line 220 of file treemap.h.

Public Types

enum  Position {
  TopLeft, TopCenter, TopRight, BottomLeft,
  BottomCenter, BottomRight, Default, Unknown
enum  SplitMode {
  Bisection, Columns, Rows, AlwaysBest,
  Best, HAlternate, VAlternate, Horizontal,

Public Member Functions

void addFreeRect (const QRect &r)
void addItem (TreeMapItem *)
QColor backColor () const
virtual int borderWidth () const
virtual TreeMapItemList * children ()
void clear ()
void clearFreeRects ()
void clearItemRect ()
TreeMapItemcommonParent (TreeMapItem *item)
bool current () const
int depth () const
int fieldCount () const
virtual const QFont & font () const
QPtrList< QRect > * freeRects () const
int height () const
int index () const
bool initialized ()
bool isChildOf (TreeMapItem *)
virtual bool isMarked (int) const
const QRect & itemRect () const
int maxLines (int) const
TreeMapItemparent () const
QStringList path (int) const
QPixmap pixmap (int) const
virtual Position position (int) const
void redraw ()
void refresh ()
void resort (bool recursive=true)
bool rotated () const
virtual int rtti () const
bool selected () const
void setBackColor (QColor c)
void setCurrent (bool b)
void setField (int f, QString t, QPixmap pm=QPixmap(), Position p=Default, int maxLines=0)
void setIndex (int i)
void setItemRect (const QRect &r)
void setMaxLines (int f, int)
void setParent (TreeMapItem *p)
void setPixmap (int f, QPixmap)
void setPosition (int f, Position)
void setRotated (bool b)
void setSelected (bool b)
void setShaded (bool b)
void setSorting (int textNo, bool ascending=true)
void setSum (double s)
void setText (int f, QString)
void setValue (double s)
void setWidget (TreeMapWidget *w)
bool shaded () const
virtual int sorting (bool *ascending) const
virtual SplitMode splitMode () const
virtual double sum () const
QString text (int) const
 TreeMapItem (TreeMapItem *parent, double value, QString text1, QString text2=QString::null, QString text3=QString::null, QString text4=QString::null)
 TreeMapItem (TreeMapItem *parent=0, double value=1.0)
virtual double value () const
TreeMapWidgetwidget () const
int width () const

Protected Attributes

QColor _backColor
TreeMapItemList * _children
bool _current
bool _rotated
bool _selected
bool _shaded
double _sum
double _value

Private Attributes

int _depth
QPtrList< QRect > * _freeRects
int _index
QRect _rect
bool _sortAscending
int _sortTextNo
double _unused_self

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index