##// END OF EJS Templates
modeldata example documented with explanations....
modeldata example documented with explanations. Some more fixes to the docs.

File last commit:

r907:e81fc8ea1ebf
r935:f71e86066044
Show More
qlegend.cpp
533 lines | 13.3 KiB | text/x-c | CppLexer
Jani Honkonen
Add license headers
r794 /****************************************************************************
**
** Copyright (C) 2012 Digia Plc
** All rights reserved.
** For any questions to Digia, please use contact form at http://qt.digia.com
**
** This file is part of the Qt Commercial Charts Add-on.
**
** $QT_BEGIN_LICENSE$
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
** contact form at http://qt.digia.com
** $QT_END_LICENSE$
**
****************************************************************************/
sauimone
framework for legend
r524 #include "qlegend.h"
Michal Klocek
Fix attempt to wrong graphics items hadnling
r790 #include "qchart_p.h"
sauimone
framework for legend
r524 #include "qseries.h"
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 #include "legendmarker_p.h"
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565 #include "qxyseries.h"
#include "qlineseries.h"
#include "qareaseries.h"
#include "qscatterseries.h"
#include "qsplineseries.h"
#include "qbarseries.h"
#include "qstackedbarseries.h"
#include "qpercentbarseries.h"
#include "qbarset.h"
#include "qpieseries.h"
#include "qpieslice.h"
sauimone
Adaptive layout to legend. Tries to fit all items inside given maximum size
r626 #include "chartpresenter_p.h"
sauimone
First version of legend. Simple markers and serie names. Using drilldown as example for now.
r529 #include <QPainter>
#include <QPen>
Michal Klocek
Refactor qledgend handling...
r855 #include <QTimer>
sauimone
framework for legend
r524
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 #include <QGraphicsSceneEvent>
sauimone
First version of legend. Simple markers and serie names. Using drilldown as example for now.
r529
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 QTCOMMERCIALCHART_BEGIN_NAMESPACE
sauimone
First version of legend. Simple markers and serie names. Using drilldown as example for now.
r529
sauimone
legend documentation fix. detaching and attaching the legend
r728 /*!
\class QLegend
\brief part of QtCommercial chart API.
QLegend is a graphical object, whics displays legend of the chart. Legend state is updated by QChart, when
series have been changed. By default, legend is drawn by QChart, but user can set a new parent to legend and
handle the drawing manually.
User isn't supposed to create or delete legend objects, but can reference it via QChart class.
\mainclass
\sa QChart, QSeries
*/
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
sauimone
fixed typo in minWidth function name. Updated documentationof legend
r888 \enum QLegend::Alignment
sauimone
layout fix to legend. Documented legend functions.
r724
This enum describes the possible position for legend inside chart.
sauimone
fixed typo in minWidth function name. Updated documentationof legend
r888 \value AlignmentTop
\value AlignmentBottom
\value AlignmentLeft
\value AlignmentRight
sauimone
layout fix to legend. Documented legend functions.
r724 */
/*!
sauimone
fixed typo in minWidth function name. Updated documentationof legend
r888 \fn qreal QLegend::minWidth() const
Returns minimum width of the legend
sauimone
layout fix to legend. Documented legend functions.
r724 */
/*!
sauimone
fixed typo in minWidth function name. Updated documentationof legend
r888 \fn qreal QLegend::minHeight() const
Returns minimum height of the legend
sauimone
layout fix to legend. Documented legend functions.
r724 */
/*!
Constructs the legend object and sets the parent to \a parent
*/
Michal Klocek
Refactor qledgend handling...
r855
Michal Klocek
Fixes previous commit
r791 QLegend::QLegend(QChart *chart):QGraphicsWidget(chart),
sauimone
improved legend layout
r783 m_margin(5),
Michal Klocek
Refactor qledgend handling...
r855 m_offsetX(0),
m_offsetY(0),
sauimone
removed legend background drawing
r785 m_brush(Qt::darkGray), // TODO: default should come from theme
sauimone
solid brush for all legend markers
r800 m_alignment(QLegend::AlignmentTop),
Michal Klocek
Refactor qledgend handling...
r855 m_markers(new QGraphicsItemGroup(this)),
sauimone
legend pos to theme example, legend padding
r803 m_attachedToChart(true),
Michal Klocek
Refactor qledgend handling...
r855 m_chart(chart),
m_minWidth(0),
m_minHeight(0),
m_width(0),
m_height(0),
sauimone
changed legend default visibility
r882 m_backgroundVisible(false)
sauimone
minor code review fixes
r762 {
sauimone
Adaptive layout to legend. Tries to fit all items inside given maximum size
r626 setZValue(ChartPresenter::LegendZValue);
Michal Klocek
Refactor qledgend handling...
r855 setFlags(QGraphicsItem::ItemClipsChildrenToShape);
sauimone
changed legend default visibility
r882 setVisible(false); // By default legend is invisible
sauimone
framework for legend
r524 }
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
Paints the legend to given \a painter. Paremeters \a option and \a widget arent used.
*/
Michal Klocek
Refactor qledgend handling...
r855
sauimone
framework for legend
r524 void QLegend::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
Michal Klocek
Refactor qledgend handling...
r855 Q_UNUSED(option)
Q_UNUSED(widget)
sauimone
changed legend default visibility
r882 if(!m_backgroundVisible) return;
Tero Ahola
Squashed bunch of warnings
r611
sauimone
layout fix to legend. Documented legend functions.
r724 painter->setOpacity(opacity());
Michal Klocek
Adds force option to chartTheme...
r645 painter->setPen(m_pen);
painter->setBrush(m_brush);
Michal Klocek
Refactor qledgend handling...
r855 painter->drawRect(boundingRect());
sauimone
framework for legend
r524 }
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
Bounding rect of legend.
*/
Michal Klocek
Refactor qledgend handling...
r855
sauimone
framework for legend
r524 QRectF QLegend::boundingRect() const
{
Michal Klocek
Refactor qledgend handling...
r855 return m_rect;
sauimone
framework for legend
r524 }
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
Sets the \a brush of legend. Brush affects the background of legend.
*/
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void QLegend::setBrush(const QBrush &brush)
sauimone
background to legend, theme applies
r540 {
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 if (m_brush != brush) {
Michal Klocek
Adds force option to chartTheme...
r645 m_brush = brush;
update();
}
}
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
Returns the brush used by legend.
*/
Michal Klocek
Adds force option to chartTheme...
r645 QBrush QLegend::brush() const
{
return m_brush;
}
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
Sets the \a pen of legend. Pen affects the legend borders.
*/
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void QLegend::setPen(const QPen &pen)
Michal Klocek
Adds force option to chartTheme...
r645 {
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 if (m_pen != pen) {
Michal Klocek
Adds force option to chartTheme...
r645 m_pen = pen;
update();
}
sauimone
background to legend, theme applies
r540 }
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
Returns the pen used by legend
*/
Michal Klocek
Adds force option to chartTheme...
r645 QPen QLegend::pen() const
sauimone
background to legend, theme applies
r540 {
Michal Klocek
Adds force option to chartTheme...
r645 return m_pen;
sauimone
background to legend, theme applies
r540 }
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
sauimone
fixed typo in minWidth function name. Updated documentationof legend
r888 Sets the \a alignment for legend. Legend tries to paint itself on the defined position in chart.
\sa QLegend::Alignment
sauimone
layout fix to legend. Documented legend functions.
r724 */
Jani Honkonen
Spelling fix QLegend::setAlignmnent -> setAlignment
r907 void QLegend::setAlignment(QLegend::Alignments alignment)
sauimone
legend layouting change
r616 {
Michal Klocek
Refactor qledgend handling...
r855 if(m_alignment!=alignment && m_attachedToChart) {
sauimone
legend pos to theme example, legend padding
r803 m_alignment = alignment;
updateLayout();
Michal Klocek
Refactor qledgend handling...
r855 }
sauimone
Scrolling logic to legend
r716 }
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
Returns the preferred layout for legend
*/
sauimone
legend pos to theme example, legend padding
r803 QLegend::Alignments QLegend::alignment() const
sauimone
Scrolling logic to legend
r716 {
sauimone
legend fixes
r766 return m_alignment;
sauimone
legend layouting change
r616 }
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
\internal \a series \a domain Should be called when series is added to chart.
*/
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void QLegend::handleSeriesAdded(QSeries *series, Domain *domain)
sauimone
framework for legend
r524 {
Tero Ahola
Squashed bunch of warnings
r611 Q_UNUSED(domain)
sauimone
legend refactoring.
r792 switch (series->type())
{
case QSeries::SeriesTypeLine: {
QLineSeries *lineSeries = static_cast<QLineSeries *>(series);
appendMarkers(lineSeries);
break;
}
case QSeries::SeriesTypeArea: {
QAreaSeries *areaSeries = static_cast<QAreaSeries *>(series);
appendMarkers(areaSeries);
break;
}
case QSeries::SeriesTypeBar: {
QBarSeries *barSeries = static_cast<QBarSeries *>(series);
appendMarkers(barSeries);
break;
}
case QSeries::SeriesTypeStackedBar: {
QStackedBarSeries *stackedBarSeries = static_cast<QStackedBarSeries *>(series);
appendMarkers(stackedBarSeries);
break;
}
case QSeries::SeriesTypePercentBar: {
QPercentBarSeries *percentBarSeries = static_cast<QPercentBarSeries *>(series);
appendMarkers(percentBarSeries);
break;
}
case QSeries::SeriesTypeScatter: {
QScatterSeries *scatterSeries = static_cast<QScatterSeries *>(series);
appendMarkers(scatterSeries);
break;
}
case QSeries::SeriesTypePie: {
QPieSeries *pieSeries = static_cast<QPieSeries *>(series);
appendMarkers(pieSeries);
connect(pieSeries,SIGNAL(added(QList<QPieSlice*>)),this,SLOT(handleAdded(QList<QPieSlice*>)));
break;
}
case QSeries::SeriesTypeSpline: {
QSplineSeries *splineSeries = static_cast<QSplineSeries *>(series);
appendMarkers(splineSeries);
break;
}
default: {
qWarning()<< "QLegend::handleSeriesAdded" << series->type() << "unknown series type.";
break;
}
}
Michal Klocek
Refactor , move dataset legend presentr connections to one place
r871 updateLayout();
sauimone
handleThemeChanged slot to legend.
r586 }
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
\internal \a series Should be called when series is removed from chart.
*/
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void QLegend::handleSeriesRemoved(QSeries *series)
sauimone
handleThemeChanged slot to legend.
r586 {
sauimone
legend refactoring.
r792 switch (series->type())
{
case QSeries::SeriesTypeArea: {
QAreaSeries *areaSeries = static_cast<QAreaSeries *>(series);
deleteMarkers(areaSeries);
break;
}
case QSeries::SeriesTypePie: {
QPieSeries *pieSeries = static_cast<QPieSeries *>(series);
disconnect(pieSeries, SIGNAL(added(QList<QPieSlice *>)), this, SLOT(handleAdded(QList<QPieSlice *>)));
deleteMarkers(series);
break;
}
default: {
// All other types
sauimone
handleThemeChanged slot to legend.
r586 deleteMarkers(series);
sauimone
legend refactoring.
r792 break;
}
sauimone
handleThemeChanged slot to legend.
r586 }
sauimone
Scrolling logic to legend
r716 updateLayout();
sauimone
handleThemeChanged slot to legend.
r586 }
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
\internal \a slices Should be called when slices are added to pie chart.
*/
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void QLegend::handleAdded(QList<QPieSlice *> slices)
sauimone
Added handling for pieslice add/remove to legend
r637 {
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 QPieSeries* series = static_cast<QPieSeries *> (sender());
Michal Klocek
Refactor qledgend handling...
r855 foreach(QPieSlice* slice, slices) {
PieLegendMarker* marker = new PieLegendMarker(series,slice, this);
m_markers->addToGroup(marker);
sauimone
Added handling for pieslice add/remove to legend
r637 }
sauimone
Scrolling logic to legend
r716 updateLayout();
sauimone
Added handling for pieslice add/remove to legend
r637 }
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
\internal \a slices Should be called when slices are removed from pie chart. Currently unused,
because removed slices are also deleted and we listen destroyed signal
*/
sauimone
fixed bug in legend marker removing
r643 void QLegend::handleRemoved(QList<QPieSlice *> slices)
{
Tero Ahola
Warnings treated as errors; fixed one
r647 Q_UNUSED(slices)
sauimone
fixed bug in legend marker removing
r643 }
sauimone
legend layout with padding
r799 /*!
Detaches the legend from chart. Chart won't change layout of the legend.
*/
void QLegend::detachFromChart()
{
m_attachedToChart = false;
}
/*!
Attaches the legend to chart. Chart may change layout of the legend.
*/
void QLegend::attachToChart()
{
m_attachedToChart = true;
}
/*!
Returns true, if legend is attached to chart.
*/
Michal Klocek
Refactor qledgend handling...
r855 bool QLegend::isAttachedToChart()
sauimone
legend layout with padding
r799 {
return m_attachedToChart;
}
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
sauimone
legend refactoring.
r792 \internal Helper function. Appends markers from \a series to legend.
sauimone
layout fix to legend. Documented legend functions.
r724 */
sauimone
legend refactoring.
r792 void QLegend::appendMarkers(QAreaSeries* series)
sauimone
handleThemeChanged slot to legend.
r586 {
Michal Klocek
Refactor qledgend handling...
r855 AreaLegendMarker* marker = new AreaLegendMarker(series,this);
m_markers->addToGroup(marker);
sauimone
Legend can handle removing of series
r576 }
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
\internal Helper function. Appends markers from \a series to legend.
*/
sauimone
handleThemeChanged slot to legend.
r586 void QLegend::appendMarkers(QXYSeries* series)
sauimone
First version of legend. Simple markers and serie names. Using drilldown as example for now.
r529 {
Michal Klocek
Refactor qledgend handling...
r855 XYLegendMarker* marker = new XYLegendMarker(series,this);
m_markers->addToGroup(marker);
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565 }
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
sauimone
legend refactoring.
r792 \internal Helper function. Appends markers from \a series to legend.
sauimone
layout fix to legend. Documented legend functions.
r724 */
sauimone
handleThemeChanged slot to legend.
r586 void QLegend::appendMarkers(QBarSeries *series)
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565 {
sauimone
updated theme example. minor fix to legend
r786 foreach(QBarSet* set, series->barSets()) {
Michal Klocek
Refactor qledgend handling...
r855 BarLegendMarker* marker = new BarLegendMarker(series,set, this);
m_markers->addToGroup(marker);
sauimone
First version of legend. Simple markers and serie names. Using drilldown as example for now.
r529 }
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565 }
sauimone
First version of legend. Simple markers and serie names. Using drilldown as example for now.
r529
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
sauimone
legend refactoring.
r792 \internal Helper function. Appends markers from \a series to legend.
sauimone
layout fix to legend. Documented legend functions.
r724 */
sauimone
handleThemeChanged slot to legend.
r586 void QLegend::appendMarkers(QPieSeries *series)
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565 {
sauimone
updated theme example. minor fix to legend
r786 foreach(QPieSlice* slice, series->slices()) {
Michal Klocek
Refactor qledgend handling...
r855 PieLegendMarker* marker = new PieLegendMarker(series,slice, this);
m_markers->addToGroup(marker);
sauimone
First version of legend. Simple markers and serie names. Using drilldown as example for now.
r529 }
}
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
\internal Deletes all markers that are created from \a series
*/
sauimone
handleThemeChanged slot to legend.
r586 void QLegend::deleteMarkers(QSeries *series)
{
// Search all markers that belong to given series and delete them.
Michal Klocek
Refactor qledgend handling...
r855
QList<QGraphicsItem *> items = m_markers->childItems();
Michal Klocek
Bugfix for handleMarkerDestroyed(), removing it
r870 foreach (QGraphicsItem *markers, items) {
LegendMarker *marker = static_cast<LegendMarker*>(markers);
Michal Klocek
Refactor qledgend handling...
r855 if (marker->series() == series) {
delete marker;
sauimone
handleThemeChanged slot to legend.
r586 }
}
}
sauimone
layout fix to legend. Documented legend functions.
r724 /*!
\internal Updates layout of legend. Tries to fit as many markers as possible up to the maximum size of legend.
If items don't fit, sets the visibility of scroll buttons accordingly.
Causes legend to be resized.
*/
sauimone
First version of legend. Simple markers and serie names. Using drilldown as example for now.
r529
Michal Klocek
Refactor qledgend handling...
r855 void QLegend::setOffset(const QPointF& point)
{
sauimone
Adaptive layout to legend. Tries to fit all items inside given maximum size
r626
Michal Klocek
Refactor qledgend handling...
r855 switch(m_alignment) {
sauimone
Scrolling logic to legend
r716
Michal Klocek
Refactor qledgend handling...
r855 case AlignmentTop:
case AlignmentBottom: {
if(m_width<=m_rect.width()) return;
sauimone
split legend layout to vertical and horizontal functions
r810
Michal Klocek
Refactor qledgend handling...
r855 if (point.x() != m_offsetX) {
m_offsetX = qBound(0.0, point.x(), m_width - m_rect.width());
m_markers->setPos(-m_offsetX,m_rect.top());
sauimone
Adaptive layout to legend. Tries to fit all items inside given maximum size
r626 }
Michal Klocek
Refactor qledgend handling...
r855 break;
sauimone
legend layouting change
r616 }
Michal Klocek
Refactor qledgend handling...
r855 case AlignmentLeft:
case AlignmentRight: {
sauimone
Scrolling logic to legend
r716
Michal Klocek
Refactor qledgend handling...
r855 if(m_height<=m_rect.height()) return;
sauimone
Scrolling logic to legend
r716
Michal Klocek
Refactor qledgend handling...
r855 if (point.y() != m_offsetY) {
m_offsetY = qBound(0.0, point.y(), m_height - m_rect.height());
m_markers->setPos(m_rect.left(),-m_offsetY);
sauimone
Scrolling logic to legend
r716 }
Michal Klocek
Refactor qledgend handling...
r855 break;
sauimone
Scrolling logic to legend
r716 }
sauimone
split legend layout to vertical and horizontal functions
r810 }
Michal Klocek
Refactor qledgend handling...
r855 }
sauimone
Scrolling logic to legend
r716
Michal Klocek
Refactor qledgend handling...
r855 QPointF QLegend::offset() const
{
return QPointF(m_offsetX,m_offsetY);
sauimone
Scrolling logic to legend
r716 }
Michal Klocek
Refactor qledgend handling...
r855 // this function runs first to set min max values
void QLegend::updateLayout()
sauimone
Scrolling logic to legend
r716 {
Michal Klocek
Refactor qledgend handling...
r855 m_offsetX=0;
QList<QGraphicsItem *> items = m_markers->childItems();
if(items.isEmpty()) return;
m_minWidth=0;
m_minHeight=0;
switch(m_alignment) {
case AlignmentTop:
case AlignmentBottom: {
QPointF point = m_rect.topLeft();
m_width = 0;
foreach (QGraphicsItem *item, items) {
item->setPos(point.x(),m_rect.height()/2 -item->boundingRect().height()/2);
const QRectF& rect = item->boundingRect();
qreal w = rect.width();
m_minWidth=qMax(m_minWidth,w);
m_minHeight=qMax(m_minHeight,rect.height());
m_width+=w;
point.setX(point.x() + w);
}
if(m_width<m_rect.width()){
m_markers->setPos(m_rect.width()/2-m_width/2,m_rect.top());
}else{
m_markers->setPos(m_rect.topLeft());
}
m_height=m_minHeight;
}
break;
case AlignmentLeft:
case AlignmentRight:{
QPointF point = m_rect.topLeft();
m_height = 0;
foreach (QGraphicsItem *item, items) {
item->setPos(point);
const QRectF& rect = item->boundingRect();
qreal h = rect.height();
m_minWidth=qMax(m_minWidth,rect.width());
m_minHeight=qMax(m_minHeight,h);
m_height+=h;
point.setY(point.y() + h);
}
if(m_height<m_rect.height()){
m_markers->setPos(m_rect.left(),m_rect.height()/2-m_height/2);
}else{
m_markers->setPos(m_rect.topLeft());
}
m_width=m_minWidth;
}
break;
}
sauimone
Scrolling logic to legend
r716
Michal Klocek
Refactor qledgend handling...
r855 m_chart->d_ptr->m_presenter->updateLayout(); //TODO fixme;
sauimone
Scrolling logic to legend
r716 }
sauimone
fixed typo in minWidth function name. Updated documentationof legend
r888 /*!
Sets the visibility of legend background to \a visible
*/
Michal Klocek
Refactor qledgend handling...
r855 void QLegend::setBackgroundVisible(bool visible)
{
sauimone
changed legend default visibility
r882 if(m_backgroundVisible!=visible)
Michal Klocek
Refactor qledgend handling...
r855 {
sauimone
changed legend default visibility
r882 m_backgroundVisible=visible;
Michal Klocek
Refactor qledgend handling...
r855 update();
sauimone
Scrolling logic to legend
r716 }
}
sauimone
fixed typo in minWidth function name. Updated documentationof legend
r888 /*!
Returns the visibility of legend background
*/
Michal Klocek
Refactor qledgend handling...
r855 bool QLegend::isBackgroundVisible() const
{
sauimone
changed legend default visibility
r882 return m_backgroundVisible;
Michal Klocek
Refactor qledgend handling...
r855 }
sauimone
Scrolling logic to legend
r716
sauimone
fixed typo in minWidth function name. Updated documentationof legend
r888 /*!
\internal \a event see QGraphicsWidget for details
*/
Michal Klocek
Refactor qledgend handling...
r855 void QLegend::resizeEvent(QGraphicsSceneResizeEvent *event)
{
const QRectF& rect = QRectF(QPoint(0,0),event->newSize());
QGraphicsWidget::resizeEvent(event);
if(m_rect != rect){
m_rect = rect;
updateLayout();
sauimone
Scrolling logic to legend
r716 }
Michal Klocek
Refactor qledgend handling...
r855 }
sauimone
Scrolling logic to legend
r716
sauimone
fixed typo in minWidth function name. Updated documentationof legend
r888 /*!
\internal \a event see QGraphicsWidget for details
*/
Michal Klocek
Refactor qledgend handling...
r855 void QLegend::hideEvent(QHideEvent *event)
{
QGraphicsWidget::hideEvent(event);
setEnabled(false);
updateLayout();
sauimone
Scrolling logic to legend
r716 }
sauimone
fixed typo in minWidth function name. Updated documentationof legend
r888 /*!
\internal \a event see QGraphicsWidget for details
*/
Michal Klocek
Refactor qledgend handling...
r855 void QLegend::showEvent(QShowEvent *event)
sauimone
Scrolling logic to legend
r716 {
Michal Klocek
Refactor qledgend handling...
r855 QGraphicsWidget::showEvent(event);
setEnabled(true);
updateLayout();
}
sauimone
layout fix to legend. Documented legend functions.
r724
sauimone
framework for legend
r524 #include "moc_qlegend.cpp"
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737
sauimone
framework for legend
r524 QTCOMMERCIALCHART_END_NAMESPACE