##// END OF EJS Templates
updated barchart examples. minor fixes
updated barchart examples. minor fixes

File last commit:

r276:d062a7f38647
r276:d062a7f38647
Show More
qbarset.cpp
88 lines | 1.4 KiB | text/x-c | CppLexer
sauimone
proof of concept implementation for barset and barcategory
r169 #include "qbarset.h"
sauimone
signals and slots for bars and sets
r239 #include <QDebug>
sauimone
proof of concept implementation for barset and barcategory
r169
QTCOMMERCIALCHART_BEGIN_NAMESPACE
sauimone
updated barchart examples. minor fixes
r276 QBarSet::QBarSet(QObject *parent)
: QObject(parent)
sauimone
proof of concept implementation for barset and barcategory
r169 {
sauimone
toggling of floating values. still bit buggy
r267 mFloatingValuesVisible = false;
sauimone
proof of concept implementation for barset and barcategory
r169 }
void QBarSet::setName(QString name)
{
mName = name;
}
sauimone
Barset and barcategory implememtation. Updated test application
r171 QString QBarSet::name()
{
return mName;
}
sauimone
proof of concept implementation for barset and barcategory
r169
QBarSet& QBarSet::operator << (const qreal &value)
{
mValues.append(value);
return *this;
}
sauimone
Barset and barcategory implememtation. Updated test application
r171 int QBarSet::count()
{
return mValues.count();
}
qreal QBarSet::valueAt(int index)
{
return mValues.at(index);
}
sauimone
brush support for bargroups
r183 void QBarSet::setValue(int index, qreal value)
{
mValues.replace(index,value);
}
sauimone
Added pen & brush to QBarSet
r214 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;
}
sauimone
toggling of floating values. still bit buggy
r267 bool QBarSet::isFloatingValuesVisible()
{
return mFloatingValuesVisible;
}
sauimone
signals and slots for bars and sets
r239 void QBarSet::barClicked()
{
sauimone
floating values working now. bounding rect bug fixed
r273 qDebug() << "QBarset::barClicked" << this;
sauimone
signals and slots for bars and sets
r239 // Some bar of this set has been clicked
// TODO: What happens then?
sauimone
Floating values to bar charts
r263 emit clicked(); // Notify that set has been clicked
sauimone
signals and slots for bars and sets
r239 }
sauimone
Added pen & brush to QBarSet
r214
sauimone
updated barchart examples. minor fixes
r276 void QBarSet::barHoverEntered()
{
qDebug() << "QBarset::barHoverEntered" << this;
emit hoverEnter();
}
void QBarSet::barHoverLeaved()
{
qDebug() << "QBarset::barHoverLeaved" << this;
emit hoverLeave();
}
sauimone
signals and slots for bars and sets
r239 #include "moc_qbarset.cpp"
sauimone
proof of concept implementation for barset and barcategory
r169 QTCOMMERCIALCHART_END_NAMESPACE