Ignore:
Timestamp:
Nov 3, 2026, 10:53:35 AM (3 weeks ago)
Author:
stuerze
Message:

deprecated functions exchanged libs updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/qwt/qwt_plot_tradingcurve.h

    r9383 r11158  
    1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
     1/******************************************************************************
    22 * Qwt Widget Library
    33 * Copyright (C) 1997   Josef Wilgen
    … …  
    1313#include "qwt_global.h"
    1414#include "qwt_plot_seriesitem.h"
    15 #include "qwt_series_data.h"
    1615
    1716/*!
    18   \brief QwtPlotTradingCurve illustrates movements in the price of a
     17   \brief QwtPlotTradingCurve illustrates movements in the price of a
    1918         financial instrument over time.
    2019
    21   QwtPlotTradingCurve supports candlestick or bar ( OHLC ) charts
    22   that are used in the domain of technical analysis.
     20   QwtPlotTradingCurve supports candlestick or bar ( OHLC ) charts
     21   that are used in the domain of technical analysis.
    2322
    24   While the length ( height or width depending on orientation() )
    25   of each symbol depends on the corresponding OHLC sample the size
    26   of the other dimension can be controlled using:
     23   While the length ( height or width depending on orientation() )
     24   of each symbol depends on the corresponding OHLC sample the size
     25   of the other dimension can be controlled using:
    2726
    28   - setSymbolExtent()
    29   - setSymbolMinWidth()
    30   - setSymbolMaxWidth()
     27   - setSymbolExtent()
     28   - setSymbolMinWidth()
     29   - setSymbolMaxWidth()
    3130
    32   The extent is a size in scale coordinates, so that the symbol width
    33   is increasing when the plot is zoomed in. Minimum/Maximum width
    34   is in widget coordinates independent from the zoom level.
    35   When setting the minimum and maximum to the same value, the width of
    36   the symbol is fixed.
    37 */
    38 class QWT_EXPORT QwtPlotTradingCurve:
    39     public QwtPlotSeriesItem, public QwtSeriesStore<QwtOHLCSample>
     31   The extent is a size in scale coordinates, so that the symbol width
     32   is increasing when the plot is zoomed in. Minimum/Maximum width
     33   is in widget coordinates independent from the zoom level.
     34   When setting the minimum and maximum to the same value, the width of
     35   the symbol is fixed.
     36 */
     37class QWT_EXPORT QwtPlotTradingCurve
     38    : public QwtPlotSeriesItem
     39    , public QwtSeriesStore< QwtOHLCSample >
    4040{
    41 public:
     41  public:
    4242    /*!
    4343        \brief Symbol styles.
    … …  
    4545        The default setting is QwtPlotSeriesItem::CandleStick.
    4646        \sa setSymbolStyle(), symbolStyle()
    47     */
     47     */
    4848    enum SymbolStyle
    4949    {
    … …  
    5252
    5353        /*!
    54           A line on the chart shows the price range (the highest and lowest
    55           prices) over one unit of time, e.g. one day or one hour.
    56           Tick marks project from each side of the line indicating the
    57           opening and closing price.
     54           A line on the chart shows the price range (the highest and lowest
     55           prices) over one unit of time, e.g. one day or one hour.
     56           Tick marks project from each side of the line indicating the
     57           opening and closing price.
    5858         */
    5959        Bar,
    6060
    6161        /*!
    62           The range between opening/closing price are displayed as
    63           a filled box. The fill brush depends on the direction of the
    64           price movement. The box is connected to the highest/lowest
    65           values by lines.
    66         */
     62           The range between opening/closing price are displayed as
     63           a filled box. The fill brush depends on the direction of the
     64           price movement. The box is connected to the highest/lowest
     65           values by lines.
     66         */
    6767        CandleStick,
    6868
    6969        /*!
    70           SymbolTypes >= UserSymbol are displayed by drawUserSymbol(),
    71           that needs to be overloaded and implemented in derived
    72           curve classes.
     70           SymbolTypes >= UserSymbol are displayed by drawUserSymbol(),
     71           that needs to be overloaded and implemented in derived
     72           curve classes.
    7373
    74           \sa drawUserSymbol()
    75         */
     74           \sa drawUserSymbol()
     75         */
    7676        UserSymbol = 100
    7777    };
    … …  
    9292        Attributes to modify the drawing algorithm.
    9393        \sa setPaintAttribute(), testPaintAttribute()
    94     */
     94     */
    9595    enum PaintAttribute
    9696    {
    … …  
    9999    };
    100100
    101     //! Paint attributes
    102     typedef QFlags<PaintAttribute> PaintAttributes;
     101    Q_DECLARE_FLAGS( PaintAttributes, PaintAttribute )
    103102
    104     explicit QwtPlotTradingCurve( const QString &title = QString() );
    105     explicit QwtPlotTradingCurve( const QwtText &title );
     103    explicit QwtPlotTradingCurve( const QString& title = QString() );
     104    explicit QwtPlotTradingCurve( const QwtText& title );
    106105
    107106    virtual ~QwtPlotTradingCurve();
    108107
    109     virtual int rtti() const;
     108    virtual int rtti() const QWT_OVERRIDE;
    110109
    111110    void setPaintAttribute( PaintAttribute, bool on = true );
    112111    bool testPaintAttribute( PaintAttribute ) const;
    113112
    114     void setSamples( const QVector<QwtOHLCSample> & );
    115     void setSamples( QwtSeriesData<QwtOHLCSample> * );
     113    void setSamples( const QVector< QwtOHLCSample >& );
     114    void setSamples( QwtSeriesData< QwtOHLCSample >* );
    116115
    117116    void setSymbolStyle( SymbolStyle style );
    118117    SymbolStyle symbolStyle() const;
    119118
    120     void setSymbolPen( const QColor &,
     119    void setSymbolPen( const QColor&,
    121120        qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
    122     void setSymbolPen( const QPen & );
     121    void setSymbolPen( const QPen& );
    123122    QPen symbolPen() const;
    124123
    125     void setSymbolBrush( Direction, const QBrush & );
     124    void setSymbolBrush( Direction, const QBrush& );
    126125    QBrush symbolBrush( Direction ) const;
    127126
    … …  
    135134    double maxSymbolWidth() const;
    136135
    137     virtual void drawSeries( QPainter *painter,
    138         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
    139         const QRectF &canvasRect, int from, int to ) const;
     136    virtual void drawSeries( QPainter*,
     137        const QwtScaleMap& xMap, const QwtScaleMap& yMap,
     138        const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE;
    140139
    141     virtual QRectF boundingRect() const;
     140    virtual QRectF boundingRect() const QWT_OVERRIDE;
    142141
    143     virtual QwtGraphic legendIcon( int index, const QSizeF & ) const;
     142    virtual QwtGraphic legendIcon( int index, const QSizeF& ) const QWT_OVERRIDE;
    144143
    145 protected:
     144  protected:
    146145
    147146    void init();
    148147
    149     virtual void drawSymbols( QPainter *,
    150         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
    151         const QRectF &canvasRect, int from, int to ) const;
     148    virtual void drawSymbols( QPainter*,
     149        const QwtScaleMap& xMap, const QwtScaleMap& yMap,
     150        const QRectF& canvasRect, int from, int to ) const;
    152151
    153     virtual void drawUserSymbol( QPainter *,
    154         SymbolStyle, const QwtOHLCSample &,
     152    virtual void drawUserSymbol( QPainter*,
     153        SymbolStyle, const QwtOHLCSample&,
    155154        Qt::Orientation, bool inverted, double symbolWidth ) const;
    156155
    157     void drawBar( QPainter *painter, const QwtOHLCSample &,
     156    void drawBar( QPainter*, const QwtOHLCSample&,
    158157        Qt::Orientation, bool inverted, double width ) const;
    159158
    160     void drawCandleStick( QPainter *, const QwtOHLCSample &,
     159    void drawCandleStick( QPainter*, const QwtOHLCSample&,
    161160        Qt::Orientation, double width ) const;
    162161
    163162    virtual double scaledSymbolWidth(
    164         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
    165         const QRectF &canvasRect ) const;
     163        const QwtScaleMap& xMap, const QwtScaleMap& yMap,
     164        const QRectF& canvasRect ) const;
    166165
    167 private:
     166  private:
    168167    class PrivateData;
    169     PrivateData *d_data;
     168    PrivateData* m_data;
    170169};
    171170
Note: See TracChangeset for help on using the changeset viewer.