##// END OF EJS Templates
Merge remote-tracking branch 'origin/5.7' into dev...
Merge remote-tracking branch 'origin/5.7' into dev Change-Id: I3f2ec8fb552bbed786cb0f7f5a0433d2d15f1931

File last commit:

r2854:46147b040d06
r2879:d27b6b26880d merge
Show More
areachartitem_p.h
144 lines | 4.4 KiB | text/x-c | CLexer
Miikka Heikkinen
Updated license...
r2854 /****************************************************************************
Jani Honkonen
Add license headers
r794 **
Miikka Heikkinen
Updated license...
r2854 ** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
Jani Honkonen
Add license headers
r794 **
Miikka Heikkinen
Updated license...
r2854 ** This file is part of the Qt Charts module of the Qt Toolkit.
Jani Honkonen
Add license headers
r794 **
Miikka Heikkinen
Updated license...
r2854 ** $QT_BEGIN_LICENSE:GPL$
Titta Heikkala
Updated license headers...
r2845 ** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
Miikka Heikkinen
Updated license...
r2854 ** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
Jani Honkonen
Add license headers
r794 **
Titta Heikkala
Updated license headers...
r2845 ** $QT_END_LICENSE$
**
Miikka Heikkinen
Updated license...
r2854 ****************************************************************************/
Jani Honkonen
Add license headers
r794
unknown
Added missing warning about private implementation
r1366 // W A R N I N G
// -------------
//
Titta Heikkala
Updated private header warning...
r2807 // This file is not part of the Qt Chart API. It exists purely as an
unknown
Added missing warning about private implementation
r1366 // implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
Michal Klocek
Adds area chart...
r421 #ifndef AREACHARTITEM_H
#define AREACHARTITEM_H
Titta Heikkala
Fix include syntax...
r2714 #include <QtCharts/QChartGlobal>
#include <private/linechartitem_p.h>
#include <QtCharts/QAreaSeries>
#include <QtGui/QPen>
Michal Klocek
Adds area chart...
r421
Titta Heikkala
Qt Charts project file structure change...
r2712 QT_CHARTS_BEGIN_NAMESPACE
Michal Klocek
Adds area chart...
r421
class AreaChartItem;
Michal Klocek
Release compilation fixes
r689 class AreaChartItem : public ChartItem
Michal Klocek
Adds area chart...
r421 {
Q_OBJECT
public:
Michal Klocek
Refactors internals...
r2273 AreaChartItem(QAreaSeries *areaSeries, QGraphicsItem* item = 0);
Tero Ahola
Internal review: fixed minor issues in Area and XySeries
r761 ~AreaChartItem();
Michal Klocek
Adds area chart...
r421
//from QGraphicsItem
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
QPainterPath shape() const;
Jani Honkonen
more coding style fixes for src-folder...
r2104 LineChartItem *upperLineItem() const { return m_upper; }
LineChartItem *lowerLineItem() const { return m_lower; }
Michal Klocek
Adds area chart animations...
r560
Michal Klocek
Adds area chart...
r421 void updatePath();
Michal Klocek
Refactors click signal to line,area,spline,scatter charts
r571
Michal Klocek
Refactors internals...
r2273 void setPresenter(ChartPresenter *presenter);
Miikka Heikkinen
Add Polar chart support...
r2483 QAreaSeries *series() const { return m_series; }
Michal Klocek
Refactors click signal to line,area,spline,scatter charts
r571 protected:
sauimone
minor code review issues. indent, spaces, brackets etc.
r743 void mousePressEvent(QGraphicsSceneMouseEvent *event);
Marek Rosa
Added hovered support to areachart. Might need to be re-thought
r2264 void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
Titta Heikkala
Add pressed, released and doubleClicked signals...
r2739 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
Michal Klocek
Refactors click signal to line,area,spline,scatter charts
r571
sauimone
Q_SIGNALS and Q_SLOTS
r775 Q_SIGNALS:
Titta Heikkala
Qt Charts project file structure change...
r2712 void clicked(const QPointF &point);
Marek Rosa
Added hovered support to areachart. Might need to be re-thought
r2264 void hovered(const QPointF &point, bool state);
Titta Heikkala
Add pressed, released and doubleClicked signals...
r2739 void pressed(const QPointF &point);
void released(const QPointF &point);
void doubleClicked(const QPointF &point);
Michal Klocek
Refactors click signal to line,area,spline,scatter charts
r571
sauimone
Q_SIGNALS and Q_SLOTS
r775 public Q_SLOTS:
Michal Klocek
Adds area chart...
r421 void handleUpdated();
Michal Klocek
Refactors Domain and Axis...
r1698 void handleDomainUpdated();
Michal Klocek
Adds area chart...
r421
private:
Jani Honkonen
more coding style fixes for src-folder...
r2104 QAreaSeries *m_series;
LineChartItem *m_upper;
LineChartItem *m_lower;
Michal Klocek
Refactor domain model...
r439 QPainterPath m_path;
Michal Klocek
Adds area chart...
r421 QRectF m_rect;
Michal Klocek
Adds visiblePoints handling to area chart
r563 QPen m_linePen;
QPen m_pointPen;
Michal Klocek
Adds area chart...
r421 QBrush m_brush;
Michal Klocek
Adds visiblePoints handling to area chart
r563 bool m_pointsVisible;
Titta Heikkala
Added possibility to show series value...
r2689 bool m_pointLabelsVisible;
QString m_pointLabelsFormat;
QFont m_pointLabelsFont;
QColor m_pointLabelsColor;
Titta Heikkala
Added option to set labels clipping...
r2815 bool m_pointLabelsClipping;
Titta Heikkala
Added possibility to show series value...
r2689
Titta Heikkala
Add pressed, released and doubleClicked signals...
r2739 QPointF m_lastMousePos;
bool m_mousePressed;
Michal Klocek
Adds area chart...
r421 };
class AreaBoundItem : public LineChartItem
{
public:
Michal Klocek
Refactors internals...
r2273 AreaBoundItem(AreaChartItem *area, QLineSeries *lineSeries,QGraphicsItem* item = 0)
: LineChartItem(lineSeries, item), m_item(area)
Jani Honkonen
astyle and manual coding style fixes for src-folder
r2097 {
Miikka Heikkinen
Add Polar chart support...
r2483 // We do not actually want to draw anything from LineChartItem.
// Drawing is done in AreaChartItem only.
setVisible(false);
Michal Klocek
Refactors axis animation, line animations
r1241 }
Tero Ahola
Internal review: fixed minor issues in Area and XySeries
r761 ~AreaBoundItem() {}
Michal Klocek
Adds area chart...
r421
Michal Klocek
Refactors internals...
r2273 void updateGeometry()
Jani Honkonen
more coding style fixes for src-folder...
r2104 {
Miikka Heikkinen
Check that areaseries is actually in chart before trying to update....
r2800 // Make sure the series is in a chart before trying to update
if (m_item->series()->chart()) {
// Turn off points drawing from component line chart item, as that
// messes up the fill for area series.
suppressPoints();
// Component lineseries are not necessarily themselves on the chart,
// so get the chart type for them from area chart.
forceChartType(m_item->series()->chart()->chartType());
LineChartItem::updateGeometry();
m_item->updatePath();
}
Michal Klocek
Adds area chart...
r421 }
private:
Jani Honkonen
more coding style fixes for src-folder...
r2104 AreaChartItem *m_item;
Michal Klocek
Adds area chart...
r421 };
Titta Heikkala
Qt Charts project file structure change...
r2712 QT_CHARTS_END_NAMESPACE
Michal Klocek
Adds area chart...
r421
#endif