#include <MetricsKiviat.h>
Inheritance diagram for MetricsKiviat:

Public Types | |
| typedef QVector< SgNode * >::iterator | nodes_iterator |
Public Slots | |
| void | updateView (SgNode *astNode) |
| void | updateView (int id) |
| void | addNode (SgNode *astNode) |
| void | delNode (SgNode *astNode) |
| void | delNode (int nodeId) |
| void | configureMetrics (bool dialog=true) |
| void | setNode (SgNode *astNode) |
| void | gotoNode (SgNode *astNode) |
| void | setMarkerCount (int newMarkerCount) |
| void | setInactiveAlpha (int newVal) |
| void | setActiveAlpha (int newVal) |
| void | setCornerPointRadius (int newVal) |
| void | setAngleOffset (int newVal) |
| void | setDataColor (int dataHandle, const QColor &color) |
| void | setAxisLabel (int axisNr, const QString &name) |
| Change/Set the Label of given axis. | |
| void | setActiveItem (int dataHandle) |
| Sets the Item which is displayed in the foreground (i.e. the "selected"). | |
| void | setGradientBackground (bool on=true) |
| void | clear () |
| void | setAxisCount (int newAxisCount) |
| Set axis count. | |
| void | removeAxis (int axisID) |
Signals | |
| void | nodeActivated (SgNode *astNode) |
| void | nodeActivatedAlt (SgNode *astNode) |
| void | clickedOnData (int dataId) |
| void | cleared () |
Public Member Functions | |
| MetricsKiviat (QWidget *parent=NULL) | |
| virtual | ~MetricsKiviat () |
| nodes_iterator | nodesBegin () |
| nodes_iterator | nodesEnd () |
| int | getNodeId (SgNode *node) |
| SgNode * | getNodeFromId (int id) |
| void | init (SgNode *root) |
| int | addData (const QVector< float > &data, QColor color=Qt::blue) |
| int | addData (const QVector< int > &data, int valueToNormalize, QColor color=Qt::blue) |
| void | removeData (int dataHandle) |
| void | setDataPoint (int dataHandle, int axisNr, float newValue) |
| float | getDataPoint (int dataHandle, int axisNr) |
| QColor | getDataColor (int dataHandle) |
| const QVector< float > & | getData (int dataHandle) |
| int | getAxisCount () const |
| Returns the axis count. | |
| int | getDataCount () const |
| void | setToolTip (int dataHandle, int axisNr, const QString &string) |
| int | cornerPointRadius () const |
| int | markerCount () const |
| int | inactiveAlpha () const |
| int | activeAlpha () const |
| int | angleOffset () const |
| bool | hasGradientBackground () const |
Protected Member Functions | |
| virtual void | mousePressEvent (QMouseEvent *ev) |
| virtual void | resizeEvent (QResizeEvent *ev) |
| Overwritten Resize Event, used for scaling of scene. | |
| virtual void | contextMenuEvent (QContextMenuEvent *ev) |
| virtual void | dropEvent (QDropEvent *ev) |
| virtual void | dragMoveEvent (QDragMoveEvent *ev) |
| virtual void | dragEnterEvent (QDragEnterEvent *ev) |
| void | redrawAll () |
| void | redrawData () |
| void | setupAxesCaptions () |
| QGraphicsPolygonItem * | addMarker (float position) |
| QPointF | calcPosition (int axisNr, float normedDistance) const |
Protected Attributes | |
| int | curDataItem |
| Index of active data-item, or -1 if none is active. | |
| int | axisCount |
| Number of Axis. | |
| int | prop_markerCount |
| int | prop_activeAlpha |
| int | prop_inactiveAlpha |
| int | prop_cornerPointRadius |
| Radius of the cornerPoints (dots on intersection of axis and polygon. | |
| int | prop_angleOffset |
| Angle Offset (rotates the diagram) (set between 0 and 360). | |
| QFont | labelFont |
| QVector< KiviatData * > | dataset |
| KiviatData manages the storing and drawing of the data. | |
| QGraphicsScene | scene |
| QVector< QGraphicsTextItem * > | axisLabels |
| QVector< QGraphicsLineItem * > | axes |
| QVector< QGraphicsPolygonItem * > | markers |
Static Protected Attributes | |
| static const int | AXIS_LENGTH = 300 |
| Axis Length in pixel. | |
Properties | |
| int | AxisCount [] |
| int | MarkerCount [] |
| int | ActiveAlpha [] |
| int | InactiveAlpha [] |
| int | CornerPointRadius [] |
| int | AngleOffset [] |
| bool | GradientBackground [] |
Private Slots | |
| void | configChanged () |
Private Member Functions | |
| void | drawData (SgNode *astNode) |
Private Attributes | |
| MetricsConfig | metricsConfig |
| SgNode * | currentNode |
| QVector< SgNode * > | nodes |
| QGraphicsRectItem * | legend |
| QList< QGraphicsTextItem * > | legendText |
| QList< QGraphicsRectItem * > | legendColor |
Friends | |
| class | KiviatInfo |
| class | KiviatData |
Definition at line 26 of file MetricsKiviat.h.
| typedef QVector<SgNode *>::iterator MetricsKiviat::nodes_iterator |
Definition at line 35 of file MetricsKiviat.h.
| MetricsKiviat::MetricsKiviat | ( | QWidget * | parent = NULL |
) |
| MetricsKiviat::~MetricsKiviat | ( | ) | [virtual] |
Definition at line 40 of file MetricsKiviat.cpp.
| int KiviatView::activeAlpha | ( | ) | const [inline, inherited] |
Definition at line 93 of file KiviatView.h.
Referenced by KiviatView::KiviatData::setActive().
Here is the caller graph for this function:

| int KiviatView::addData | ( | const QVector< int > & | data, | |
| int | valueToNormalize, | |||
| QColor | color = Qt::blue | |||
| ) | [inherited] |
Adds Data from an integer-vector,
| data | Float Data (between 0 and 1), size of vector has to be axisCount std::vectors can be converted with QVector::fromStdVector() | |
| valueToNormalize | the value which represents 100% data is calulated as data[i]/valueToNormalize | |
| color | color for displaying this dataset (to distinguish datasets, if more than one are displayed in one single kiviat) |
Definition at line 408 of file KiviatView.cpp.
Here is the call graph for this function:

| int KiviatView::addData | ( | const QVector< float > & | data, | |
| QColor | color = Qt::blue | |||
| ) | [inherited] |
Adds a dataset to the diagram
| data | Float Data (between 0 and 1), size of vector has to be axisCount std::vectors can be converted with QVector::fromStdVector() | |
| color | color for displaying this dataset (to distinguish datasets, if more than one are displayed in one single kiviat) |
Definition at line 395 of file KiviatView.cpp.
Referenced by KiviatView::addData(), addNode(), and init().
Here is the caller graph for this function:

| QGraphicsPolygonItem * KiviatView::addMarker | ( | float | position | ) | [protected, inherited] |
Adds Marking ( lines with equal -values)
| position | Value between 0 and 1 (where to draw the marking) |
Definition at line 255 of file KiviatView.cpp.
Referenced by KiviatView::setMarkerCount().
Here is the call graph for this function:

| void MetricsKiviat::addNode | ( | SgNode * | astNode | ) | [slot] |
| int KiviatView::angleOffset | ( | ) | const [inline, inherited] |
Definition at line 94 of file KiviatView.h.
| QPointF KiviatView::calcPosition | ( | int | axisNr, | |
| float | normedDistance | |||
| ) | const [protected, inherited] |
Calculates the Cartesian coordinates, of a point on axis with given nr
| axisNr | ||
| normedDistance | 0 means center of diagram, 1 end of the axis line |
Definition at line 449 of file KiviatView.cpp.
Referenced by KiviatView::addMarker(), KiviatView::KiviatData::changeDataPoint(), KiviatView::KiviatData::redraw(), KiviatView::redrawAll(), and KiviatView::setAxisLabel().
Here is the caller graph for this function:

| void KiviatView::clear | ( | ) | [slot, inherited] |
Definition at line 354 of file KiviatView.cpp.
| void KiviatView::cleared | ( | ) | [signal, inherited] |
Referenced by KiviatView::clear().
| void KiviatView::clickedOnData | ( | int | dataId | ) | [signal, inherited] |
Referenced by MetricsKiviat(), and KiviatView::mousePressEvent().
| void MetricsKiviat::configChanged | ( | ) | [inline, private, slot] |
| void MetricsKiviat::configureMetrics | ( | bool | dialog = true |
) | [slot] |
Definition at line 131 of file MetricsKiviat.cpp.
Referenced by KiviatInfo::changeColor(), configChanged(), contextMenuEvent(), and init().
| void MetricsKiviat::contextMenuEvent | ( | QContextMenuEvent * | ev | ) | [protected, virtual] |
Definition at line 338 of file MetricsKiviat.cpp.
| int KiviatView::cornerPointRadius | ( | ) | const [inline, inherited] |
Definition at line 90 of file KiviatView.h.
Referenced by KiviatView::KiviatData::changeDataPoint(), and KiviatView::KiviatData::redraw().
Here is the caller graph for this function:

| void MetricsKiviat::delNode | ( | int | nodeId | ) | [slot] |
Definition at line 123 of file MetricsKiviat.cpp.
| void MetricsKiviat::delNode | ( | SgNode * | astNode | ) | [slot] |
| void MetricsKiviat::dragEnterEvent | ( | QDragEnterEvent * | ev | ) | [protected, virtual] |
Definition at line 371 of file MetricsKiviat.cpp.
| void MetricsKiviat::dragMoveEvent | ( | QDragMoveEvent * | ev | ) | [protected, virtual] |
Definition at line 382 of file MetricsKiviat.cpp.
| void MetricsKiviat::drawData | ( | SgNode * | astNode | ) | [private] |
Definition at line 181 of file MetricsKiviat.cpp.
Referenced by addNode(), configureMetrics(), delNode(), mousePressEvent(), and updateView().
Here is the call graph for this function:

Here is the caller graph for this function:

| void MetricsKiviat::dropEvent | ( | QDropEvent * | ev | ) | [protected, virtual] |
| int KiviatView::getAxisCount | ( | ) | const [inline, inherited] |
Returns the axis count.
Definition at line 81 of file KiviatView.h.
Referenced by KiviatView::KiviatData::redraw().
Here is the caller graph for this function:

| const QVector< float > & KiviatView::getData | ( | int | dataHandle | ) | [inherited] |
| QColor KiviatView::getDataColor | ( | int | dataHandle | ) | [inherited] |
Definition at line 427 of file KiviatView.cpp.
Referenced by KiviatInfo::changeColor(), and drawData().
Here is the caller graph for this function:

| int KiviatView::getDataCount | ( | ) | const [inline, inherited] |
Returns number of dataSETS, whereas each dataSet contains axisCount entries
Definition at line 84 of file KiviatView.h.
| float KiviatView::getDataPoint | ( | int | dataHandle, | |
| int | axisNr | |||
| ) | [inline, inherited] |
Definition at line 74 of file KiviatView.h.
| SgNode* MetricsKiviat::getNodeFromId | ( | int | id | ) | [inline] |
| int MetricsKiviat::getNodeId | ( | SgNode * | node | ) | [inline] |
| void MetricsKiviat::gotoNode | ( | SgNode * | astNode | ) | [inline, slot] |
Definition at line 74 of file MetricsKiviat.h.
| bool KiviatView::hasGradientBackground | ( | ) | const [inline, inherited] |
Definition at line 95 of file KiviatView.h.
| int KiviatView::inactiveAlpha | ( | ) | const [inline, inherited] |
Definition at line 92 of file KiviatView.h.
Referenced by KiviatView::KiviatData::setActive().
Here is the caller graph for this function:

| void MetricsKiviat::init | ( | SgNode * | root | ) |
Definition at line 47 of file MetricsKiviat.cpp.
Referenced by MetricsKiviat().
Here is the call graph for this function:

Here is the caller graph for this function:

| int KiviatView::markerCount | ( | ) | const [inline, inherited] |
Definition at line 91 of file KiviatView.h.
| void MetricsKiviat::mousePressEvent | ( | QMouseEvent * | ev | ) | [protected, virtual] |
Used for selecting active dataset, and generating signal clicked_onData
Reimplemented from KiviatView.
Definition at line 157 of file MetricsKiviat.cpp.
Here is the call graph for this function:

| void MetricsKiviat::nodeActivated | ( | SgNode * | astNode | ) | [signal] |
Referenced by drawData().
| void MetricsKiviat::nodeActivatedAlt | ( | SgNode * | astNode | ) | [signal] |
Referenced by addNode().
| nodes_iterator MetricsKiviat::nodesBegin | ( | ) | [inline] |
Definition at line 37 of file MetricsKiviat.h.
Referenced by KiviatInfo::setKiviat().
Here is the caller graph for this function:

| nodes_iterator MetricsKiviat::nodesEnd | ( | ) | [inline] |
Definition at line 41 of file MetricsKiviat.h.
Referenced by KiviatInfo::setKiviat().
Here is the caller graph for this function:

| void KiviatView::redrawAll | ( | ) | [protected, inherited] |
Definition at line 287 of file KiviatView.cpp.
Referenced by KiviatView::KiviatView(), KiviatView::removeAxis(), and KiviatView::setAxisCount().
Here is the call graph for this function:

Here is the caller graph for this function:

| void KiviatView::redrawData | ( | ) | [protected, inherited] |
Definition at line 210 of file KiviatView.cpp.
Referenced by KiviatView::redrawAll(), and KiviatView::setDataColor().
Here is the caller graph for this function:

| void KiviatView::removeAxis | ( | int | axisID | ) | [slot, inherited] |
Definition at line 338 of file KiviatView.cpp.
| void KiviatView::removeData | ( | int | dataHandle | ) | [inherited] |
Removes dataset with given handle
Definition at line 219 of file KiviatView.cpp.
Referenced by delNode().
| void MetricsKiviat::resizeEvent | ( | QResizeEvent * | ev | ) | [protected, virtual] |
Overwritten Resize Event, used for scaling of scene.
Reimplemented from KiviatView.
Definition at line 152 of file MetricsKiviat.cpp.
Referenced by configureMetrics(), and drawData().
Here is the call graph for this function:

Here is the caller graph for this function:

| void KiviatView::setActiveAlpha | ( | int | newVal | ) | [inline, slot, inherited] |
Definition at line 102 of file KiviatView.h.
| void KiviatView::setActiveItem | ( | int | dataHandle | ) | [slot, inherited] |
Sets the Item which is displayed in the foreground (i.e. the "selected").
Definition at line 494 of file KiviatView.cpp.
Referenced by KiviatView::addData(), drawData(), and MetricsKiviat().
| void KiviatView::setAngleOffset | ( | int | newVal | ) | [inline, slot, inherited] |
Definition at line 104 of file KiviatView.h.
| void KiviatView::setAxisCount | ( | int | newAxisCount | ) | [slot, inherited] |
Set axis count.
Definition at line 323 of file KiviatView.cpp.
Referenced by configureMetrics(), and init().
| void KiviatView::setAxisLabel | ( | int | axisNr, | |
| const QString & | name | |||
| ) | [slot, inherited] |
Change/Set the Label of given axis.
Definition at line 432 of file KiviatView.cpp.
Referenced by configureMetrics().
| void KiviatView::setCornerPointRadius | ( | int | newVal | ) | [inline, slot, inherited] |
Definition at line 103 of file KiviatView.h.
| void KiviatView::setDataColor | ( | int | dataHandle, | |
| const QColor & | color | |||
| ) | [slot, inherited] |
Definition at line 419 of file KiviatView.cpp.
Referenced by addNode(), KiviatInfo::changeColor(), and drawData().
| void KiviatView::setDataPoint | ( | int | dataHandle, | |
| int | axisNr, | |||
| float | newValue | |||
| ) | [inherited] |
Modifies a single entry in already existing data
Definition at line 231 of file KiviatView.cpp.
Referenced by drawData().
Here is the caller graph for this function:

| void KiviatView::setGradientBackground | ( | bool | on = true |
) | [slot, inherited] |
Turns the gradient background on and off color gradient from green (center) over yellow to red (on outside)
Definition at line 462 of file KiviatView.cpp.
| void KiviatView::setInactiveAlpha | ( | int | newVal | ) | [inline, slot, inherited] |
Definition at line 101 of file KiviatView.h.
| void KiviatView::setMarkerCount | ( | int | newMarkerCount | ) | [slot, inherited] |
| void MetricsKiviat::setNode | ( | SgNode * | astNode | ) | [inline, slot] |
Definition at line 72 of file MetricsKiviat.h.
| void KiviatView::setToolTip | ( | int | dataHandle, | |
| int | axisNr, | |||
| const QString & | string | |||
| ) | [inherited] |
Definition at line 511 of file KiviatView.cpp.
Referenced by drawData().
Here is the caller graph for this function:

| void KiviatView::setupAxesCaptions | ( | ) | [protected, inherited] |
Definition at line 268 of file KiviatView.cpp.
Referenced by KiviatView::redrawAll().
Here is the caller graph for this function:

| void MetricsKiviat::updateView | ( | int | id | ) | [slot] |
Definition at line 79 of file MetricsKiviat.cpp.
| void MetricsKiviat::updateView | ( | SgNode * | astNode | ) | [slot] |
Definition at line 85 of file MetricsKiviat.cpp.
Referenced by gotoNode(), MetricsKiviat(), and updateView().
friend class KiviatData [friend, inherited] |
friend class KiviatInfo [friend] |
Definition at line 101 of file MetricsKiviat.h.
QVector<QGraphicsLineItem*> KiviatView::axes [protected, inherited] |
const int KiviatView::AXIS_LENGTH = 300 [static, protected, inherited] |
Axis Length in pixel.
Definition at line 178 of file KiviatView.h.
Referenced by KiviatView::calcPosition(), drawData(), and KiviatView::setGradientBackground().
int KiviatView::axisCount [protected, inherited] |
Number of Axis.
Definition at line 157 of file KiviatView.h.
Referenced by KiviatView::addData(), KiviatView::addMarker(), addNode(), KiviatView::calcPosition(), init(), KiviatView::redrawAll(), KiviatView::removeAxis(), KiviatView::setAxisCount(), KiviatView::setAxisLabel(), and KiviatView::setupAxesCaptions().
QVector<QGraphicsTextItem*> KiviatView::axisLabels [protected, inherited] |
Definition at line 184 of file KiviatView.h.
Referenced by KiviatView::redrawAll(), KiviatView::setAxisLabel(), and KiviatView::setupAxesCaptions().
int KiviatView::curDataItem [protected, inherited] |
Index of active data-item, or -1 if none is active.
Definition at line 154 of file KiviatView.h.
Referenced by KiviatView::clear(), KiviatView::KiviatView(), KiviatView::redrawData(), KiviatView::removeData(), and KiviatView::setActiveItem().
SgNode* MetricsKiviat::currentNode [private] |
Definition at line 94 of file MetricsKiviat.h.
Referenced by addNode(), configureMetrics(), delNode(), init(), mousePressEvent(), and updateView().
QVector<KiviatData*> KiviatView::dataset [protected, inherited] |
KiviatData manages the storing and drawing of the data.
Definition at line 181 of file KiviatView.h.
Referenced by KiviatView::addData(), KiviatView::clear(), KiviatView::getData(), KiviatView::getDataColor(), KiviatView::mousePressEvent(), KiviatView::redrawData(), KiviatView::removeAxis(), KiviatView::removeData(), KiviatView::setActiveItem(), KiviatView::setAxisCount(), KiviatView::setDataColor(), KiviatView::setDataPoint(), and KiviatView::setToolTip().
QFont KiviatView::labelFont [protected, inherited] |
Definition at line 175 of file KiviatView.h.
Referenced by drawData(), KiviatView::KiviatView(), and KiviatView::setupAxesCaptions().
QGraphicsRectItem* MetricsKiviat::legend [private] |
Definition at line 97 of file MetricsKiviat.h.
Referenced by drawData(), MetricsKiviat(), and ~MetricsKiviat().
QList<QGraphicsRectItem *> MetricsKiviat::legendColor [private] |
QList<QGraphicsTextItem *> MetricsKiviat::legendText [private] |
QVector<QGraphicsPolygonItem*> KiviatView::markers [protected, inherited] |
Definition at line 186 of file KiviatView.h.
Referenced by KiviatView::redrawAll(), and KiviatView::setMarkerCount().
MetricsConfig MetricsKiviat::metricsConfig [private] |
Definition at line 92 of file MetricsKiviat.h.
Referenced by configureMetrics(), drawData(), init(), and MetricsKiviat().
QVector<SgNode *> MetricsKiviat::nodes [private] |
Definition at line 95 of file MetricsKiviat.h.
Referenced by addNode(), delNode(), drawData(), getNodeFromId(), getNodeId(), mousePressEvent(), nodesBegin(), nodesEnd(), and updateView().
int KiviatView::prop_activeAlpha [protected, inherited] |
Transparency value of active and inactive dataset (between 0 and 255, where 0 is fully transparent)
Definition at line 165 of file KiviatView.h.
Referenced by KiviatView::KiviatView().
int KiviatView::prop_angleOffset [protected, inherited] |
Angle Offset (rotates the diagram) (set between 0 and 360).
Definition at line 172 of file KiviatView.h.
Referenced by KiviatView::calcPosition(), and KiviatView::KiviatView().
int KiviatView::prop_cornerPointRadius [protected, inherited] |
Radius of the cornerPoints (dots on intersection of axis and polygon.
Definition at line 169 of file KiviatView.h.
Referenced by KiviatView::KiviatView().
int KiviatView::prop_inactiveAlpha [protected, inherited] |
int KiviatView::prop_markerCount [protected, inherited] |
Markers are the lines which connect the points of equal value Number of markers i.e. 5 would be: draw 20%, 40%... line
Definition at line 161 of file KiviatView.h.
Referenced by KiviatView::KiviatView(), KiviatView::redrawAll(), and KiviatView::setMarkerCount().
QGraphicsScene KiviatView::scene [protected, inherited] |
Definition at line 183 of file KiviatView.h.
Referenced by KiviatView::addData(), KiviatView::addMarker(), drawData(), KiviatView::KiviatView(), MetricsKiviat(), KiviatView::redrawAll(), KiviatView::resizeEvent(), and KiviatView::setupAxesCaptions().
int KiviatView::ActiveAlpha [read, write, inherited] |
Definition at line 28 of file KiviatView.h.
int KiviatView::AngleOffset [read, write, inherited] |
Definition at line 31 of file KiviatView.h.
int KiviatView::AxisCount [read, write, inherited] |
Definition at line 26 of file KiviatView.h.
int KiviatView::CornerPointRadius [read, write, inherited] |
Definition at line 30 of file KiviatView.h.
bool KiviatView::GradientBackground [read, write, inherited] |
Definition at line 32 of file KiviatView.h.
int KiviatView::InactiveAlpha [read, write, inherited] |
Definition at line 29 of file KiviatView.h.
int KiviatView::MarkerCount [read, write, inherited] |
Definition at line 27 of file KiviatView.h.
1.4.7