##// END OF EJS Templates
signals and slots for bars and sets
signals and slots for bars and sets

File last commit:

r239:b700ad3a5165
r239:b700ad3a5165
Show More
qbarset.cpp
69 lines | 958 B | text/x-c | CppLexer
#include "qbarset.h"
#include <QDebug>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
QBarSet::QBarSet()
{
}
void QBarSet::setName(QString name)
{
mName = name;
}
QString QBarSet::name()
{
return mName;
}
QBarSet& QBarSet::operator << (const qreal &value)
{
mValues.append(value);
return *this;
}
int QBarSet::count()
{
return mValues.count();
}
qreal QBarSet::valueAt(int index)
{
return mValues.at(index);
}
void QBarSet::setValue(int index, qreal value)
{
mValues.replace(index,value);
}
void QBarSet::setPen(const QPen& pen)
{
mPen = pen;
}
const QPen& QBarSet::pen() const
{
return mPen;
}
void QBarSet::setBrush(const QBrush& brush)
{
mBrush = brush;
}
const QBrush& QBarSet::brush() const
{
return mBrush;
}
void QBarSet::barClicked()
{
// Some bar of this set has been clicked
// TODO: What happens then?
qDebug() << "bar Clicked";
}
#include "moc_qbarset.cpp"
QTCOMMERCIALCHART_END_NAMESPACE