##// END OF EJS Templates
Add missing QML types to the documentation...
Add missing QML types to the documentation The QML types documented in chartsqml2 project are added to the documentation. Change-Id: I3780566aad820e73d2ff17be1f9fe7dda9aa3a69 Task-number: QTRD-3228 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>

File last commit:

r2714:929d943d1aab
r2727:d7bc4e870cdd
Show More
scroller_p.h
109 lines | 2.5 KiB | text/x-c | CLexer
Michal Klocek
Refactor qledgend handling...
r855 /****************************************************************************
**
Titta Heikkala
Update copyright year...
r2688 ** Copyright (C) 2014 Digia Plc
Michal Klocek
Refactor qledgend handling...
r855 ** All rights reserved.
** For any questions to Digia, please use contact form at http://qt.digia.com
**
Miikka Heikkinen
Qt Commercial -> Qt Enterprise...
r2574 ** This file is part of the Qt Enterprise Charts Add-on.
Michal Klocek
Refactor qledgend handling...
r855 **
** $QT_BEGIN_LICENSE$
Miikka Heikkinen
Qt Commercial -> Qt Enterprise...
r2574 ** Licensees holding valid Qt Enterprise licenses may use this file in
** accordance with the Qt Enterprise License Agreement provided with the
Michal Klocek
Refactor qledgend handling...
r855 ** 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$
**
****************************************************************************/
// W A R N I N G
// -------------
//
Miikka Heikkinen
Qt Commercial -> Qt Enterprise...
r2574 // This file is not part of the Qt Enterprise Chart API. It exists purely as an
Michal Klocek
Refactor qledgend handling...
r855 // implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
Michal Klocek
Fixes header guard style issues
r969 #ifndef SCROLLER_P_H
#define SCROLLER_P_H
Michal Klocek
Refactor qledgend handling...
r855
Titta Heikkala
Fix include syntax...
r2714 #include <QtCharts/QChartGlobal>
#include <QtCore/QBasicTimer>
#include <QtCore/QTime>
#include <QtCore/QPointF>
Michal Klocek
Refactor qledgend handling...
r855
class QGraphicsSceneMouseEvent;
Titta Heikkala
Qt Charts project file structure change...
r2712 QT_CHARTS_BEGIN_NAMESPACE
Michal Klocek
Refactor qledgend handling...
r855
class Scroller;
class QLegend;
class ScrollTicker : public QObject
{
Michal Klocek
Krazy reported errors...
r974 Q_OBJECT
Michal Klocek
Refactor qledgend handling...
r855 public:
Jani Honkonen
astyle and manual coding style fixes for src-folder
r2097 explicit ScrollTicker(Scroller *scroller, QObject *parent = 0);
Michal Klocek
Refactor qledgend handling...
r855 void start(int interval);
void stop();
protected:
void timerEvent(QTimerEvent *event);
private:
QBasicTimer m_timer;
Scroller *m_scroller;
};
class Scroller
{
public:
enum State {
Idle,
sauimone
moving mouse event handling logic to scroller
r2199 Pressed,
Michal Klocek
Refactor qledgend handling...
r855 Move,
sauimone
Kinetic scrolling is back for legend
r2189 Scroll
Michal Klocek
Refactor qledgend handling...
r855 };
Michal Klocek
Adds ScrolledQLegend...
r859 Scroller();
Michal Klocek
Refactor qledgend handling...
r855 virtual ~Scroller();
Jani Honkonen
more coding style fixes for src-folder...
r2104 virtual void setOffset(const QPointF &point) = 0;
Michal Klocek
Adds ScrolledQLegend...
r859 virtual QPointF offset() const = 0;
Michal Klocek
Refactor qledgend handling...
r855
sauimone
Kinetic scrolling is back for legend
r2189 void move(const QPointF &delta);
sauimone
better implementation of mouse event handling in legend
r2197 void scrollTo(const QPointF &delta);
sauimone
Legend can now handle clicked and do scrolling
r2183
sauimone
moving mouse event handling logic to scroller
r2199 void handleMousePressEvent(QGraphicsSceneMouseEvent *event);
void handleMouseMoveEvent(QGraphicsSceneMouseEvent *event);
void handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event);
Michal Klocek
Refactor qledgend handling...
r855 void scrollTick();
sauimone
Kinetic scrolling is back for legend
r2189 private:
void startTicker(int interval);
void stopTicker();
Michal Klocek
Refactor qledgend handling...
r855 private:
Jani Honkonen
more coding style fixes for src-folder...
r2104 void calculateSpeed(const QPointF &position);
void lowerSpeed(QPointF &speed, qreal maxSpeed = 100);
Michal Klocek
Refactor qledgend handling...
r855
private:
ScrollTicker m_ticker;
QTime m_timeStamp;
QPointF m_speed;
QPointF m_fraction;
sauimone
Kinetic scrolling is back for legend
r2189 int m_timeTresholdMin;
int m_timeTresholdMax;
State m_state;
sauimone
moving mouse event handling logic to scroller
r2199 QPointF m_pressPos;
QPointF m_lastPos;
qreal m_treshold;
Michal Klocek
Refactor qledgend handling...
r855 };
Titta Heikkala
Qt Charts project file structure change...
r2712 QT_CHARTS_END_NAMESPACE
Michal Klocek
Refactor qledgend handling...
r855
Jani Honkonen
Fix Krazy issues
r1935 #endif /* SCROLLER_P_H */