##// END OF EJS Templates
Fix vanishing labels for first and last ticks....
Fix vanishing labels for first and last ticks. Extra space must be reserved by layout for the axes that have wide labels for first or last tick. Changed the logic how axis sizeHint is interpreted to make the previously irrelevant height or width (depending on orientation) of the sizeHint to indicate how far the widest label extends past the first/last tick, and adjust the grid size accordingly in layout. Reviewed-by: Mika Salmela

File last commit:

r2432:53927f716a3d
r2443:5b27b7b1d72a RC2_1.2.1
Show More
bar.cpp
68 lines | 1.7 KiB | text/x-c | CppLexer
Jani Honkonen
Add license headers
r794 /****************************************************************************
**
Miikka Heikkinen
Fixed the copyright year 2012 -> 2013
r2432 ** Copyright (C) 2013 Digia Plc
Jani Honkonen
Add license headers
r794 ** 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
renamed bar.h to bar_p.h
r118 #include "bar_p.h"
Michal Klocek
minor.
r59 #include <QPainter>
sauimone
tooltip for barcharts
r283 #include <QGraphicsSceneEvent>
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56
QTCOMMERCIALCHART_BEGIN_NAMESPACE
sauimone
removed categories from barseries. categories are now only on axis
r1321 Bar::Bar(QBarSet *barset, int index, QGraphicsItem *parent) : QGraphicsRectItem(parent),
m_index(index),
sauimone
removed double signal emitting from barseries/set
r1563 m_barset(barset),
m_hovering(false)
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 {
sauimone
removed categories from barseries. categories are now only on axis
r1321 setAcceptedMouseButtons(Qt::LeftButton | Qt::RightButton);
sauimone
barcharts: added legend to model. added signals for hover events (for tooltip). updated examples
r280 setAcceptHoverEvents(true);
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 }
sauimone
removed double signal emitting from barseries/set
r1563 Bar::~Bar()
{
// End hover event, if bar is deleted during it
if (m_hovering) {
emit hovered(false, m_barset);
}
}
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void Bar::mousePressEvent(QGraphicsSceneMouseEvent *event)
sauimone
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash
r256 {
Jani Honkonen
warnings are errors
r1011 Q_UNUSED(event)
sauimone
removed double signal emitting from barseries/set
r1563 emit clicked(m_index, m_barset);
Michal Klocek
Fixes mouse handling in base class of chartseries
r1747 QGraphicsItem::mousePressEvent(event);
sauimone
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash
r256 }
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void Bar::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
sauimone
updated barchart examples. minor fixes
r276 {
Jani Honkonen
warnings are errors
r978 Q_UNUSED(event)
sauimone
removed double signal emitting from barseries/set
r1563 m_hovering = true;
emit hovered(true, m_barset);
Michal Klocek
Fixes mouse handling in base class of chartseries
r1747
sauimone
updated barchart examples. minor fixes
r276 }
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void Bar::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
sauimone
updated barchart examples. minor fixes
r276 {
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 Q_UNUSED(event)
sauimone
removed double signal emitting from barseries/set
r1563 m_hovering = false;
emit hovered(false, m_barset);
sauimone
updated barchart examples. minor fixes
r276 }
sauimone
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash
r256 #include "moc_bar_p.cpp"
sauimone
signals and slots for bars and sets
r239
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 QTCOMMERCIALCHART_END_NAMESPACE