##// END OF EJS Templates
minor. small optimatization in addDomain
minor. small optimatization in addDomain

File last commit:

r203:7350e0387b3f
r266:1c19149e75d7
Show More
customslice.cpp
20 lines | 496 B | text/x-c | CppLexer
#include "customslice.h"
CustomSlice::CustomSlice(qreal value, QObject* parent)
:QPieSlice(parent)
{
setValue(value);
connect(this, SIGNAL(changed()), this, SLOT(updateLabel()));
connect(this, SIGNAL(hoverEnter()), this, SLOT(toggleExploded()));
connect(this, SIGNAL(hoverLeave()), this, SLOT(toggleExploded()));
}
void CustomSlice::updateLabel()
{
setLabel(QString::number(this->percentage()));
}
void CustomSlice::toggleExploded()
{
setExploded(!isExploded());
}