##// END OF EJS Templates
Fix value axis documentation...
Fix value axis documentation QML documentation does not show obsolete properties correctly. Removed the obsolete key and added a deprecated comment. Related typos fixed. Change-Id: I86c862e4f587541df0a08363834ad13efc14e1b4 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>

File last commit:

r2574:599370d0561c
r2636:25b732239a6d
Show More
scroller_p.h
109 lines | 2.5 KiB | text/x-c | CLexer
Michal Klocek
Refactor qledgend handling...
r855 /****************************************************************************
**
Miikka Heikkinen
Fixed the copyright year 2012 -> 2013
r2432 ** Copyright (C) 2013 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
#include "qchartglobal.h"
#include <QBasicTimer>
#include <QTime>
#include <QPointF>
class QGraphicsSceneMouseEvent;
QTCOMMERCIALCHART_BEGIN_NAMESPACE
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 };
QTCOMMERCIALCHART_END_NAMESPACE
Jani Honkonen
Fix Krazy issues
r1935 #endif /* SCROLLER_P_H */