##// END OF EJS Templates
Added All modules page to QDoc
Added All modules page to QDoc

File last commit:

r296:8254aab7233d
r304:de5dafe84e04
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
tooltip for barcharts
r283 #include <QToolTip>
sauimone
proof of concept implementation for barset and barcategory
r169
QTCOMMERCIALCHART_BEGIN_NAMESPACE
sauimone
barcharts: added legend to model. added signals for hover events (for tooltip). updated examples
r280 QBarSet::QBarSet(QString name, QObject *parent)
sauimone
updated barchart examples. minor fixes
r276 : QObject(parent)
sauimone
barcharts: added legend to model. added signals for hover events (for tooltip). updated examples
r280 ,mName(name)
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
signals and slots for bars and sets
r239 void QBarSet::barClicked()
{
sauimone
moved tooltip to presenter
r288 // 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
tooltip for barcharts
r283 void QBarSet::barHoverEntered(QPoint pos)
sauimone
updated barchart examples. minor fixes
r276 {
sauimone
enablers for tooltip and floating values, bug fixing, updated examples. tidying up the code
r296 emit showToolTip(pos, mName);
sauimone
moved tooltip to presenter
r288 emit hoverEnter(pos);
sauimone
updated barchart examples. minor fixes
r276 }
void QBarSet::barHoverLeaved()
{
sauimone
moved tooltip to presenter
r288 // qDebug() << "QBarset::barHoverLeaved" << this;
// if (mToolTipEnabled) {
// TODO: do what?
// }
// Emit signal to user of charts
emit hoverLeave();
sauimone
updated barchart examples. minor fixes
r276 }
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