##// END OF EJS Templates
Refactoring declarative xy series
Refactoring declarative xy series

File last commit:

r791:0a28782b4a44
r793:dbc1daf2590a
Show More
legendscrollbutton.cpp
28 lines | 577 B | text/x-c | CppLexer
/ src / legendscrollbutton.cpp
sauimone
Scrolling logic to legend
r716 #include "legendscrollbutton_p.h"
Michal Klocek
Fix attempt to wrong graphics items hadnling
r790 #include "qlegend.h"
sauimone
Scrolling logic to legend
r716 #include <QGraphicsSceneEvent>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Michal Klocek
Fix attempt to wrong graphics items hadnling
r790 LegendScrollButton::LegendScrollButton(ScrollButtonId id, QLegend *legend)
: QGraphicsPolygonItem(legend),
m_id(id),
m_ledgend(legend)
sauimone
Scrolling logic to legend
r716 {
setAcceptedMouseButtons(Qt::LeftButton);
}
LegendScrollButton::ScrollButtonId LegendScrollButton::id()
{
sauimone
legend marker pointer fix
r778 return m_id;
sauimone
Scrolling logic to legend
r716 }
void LegendScrollButton::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Michal Klocek
Fix attempt to wrong graphics items hadnling
r790 Q_UNUSED(event);
m_ledgend->scrollButtonClicked(this);
sauimone
Scrolling logic to legend
r716 }
QTCOMMERCIALCHART_END_NAMESPACE