Changeset 8127 in ntrip for trunk/BNC/qwt/qwt_plot_canvas.h


Ignore:
Timestamp:
May 10, 2017, 3:20:54 PM (7 years ago)
Author:
stoecker
Message:

update qwt and qwtpolar, many QT5 fixes (unfinished)

File:
1 edited

Legend:

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

    r4271 r8127  
    1313#include "qwt_global.h"
    1414#include <qframe.h>
    15 #include <qpen.h>
    1615#include <qpainterpath.h>
    17 #include <qbitmap.h>
    1816
    1917class QwtPlot;
     
    2220/*!
    2321  \brief Canvas of a QwtPlot.
    24   \sa QwtPlot
     22 
     23   Canvas is the widget where all plot items are displayed
     24
     25  \sa QwtPlot::setCanvas(), QwtPlotGLCanvas
    2526*/
    2627class QWT_EXPORT QwtPlotCanvas : public QFrame
    2728{
    2829    Q_OBJECT
     30
     31    Q_PROPERTY( double borderRadius READ borderRadius WRITE setBorderRadius )
    2932
    3033public:
     
    4447
    4548          Using a backing store might improve the performance
    46           significantly, when workin with widget overlays ( like rubberbands ).
     49          significantly, when working with widget overlays ( like rubber bands ).
    4750          Disabling the cache might improve the performance for
    4851          incremental paints (using QwtPlotDirectPainter ).
     
    7881
    7982          When HackStyledBackground is enabled the plot canvas tries
    80           to seperate the background from the background border
    81           by reverse engeneering to paint the background before and
     83          to separate the background from the background border
     84          by reverse engineering to paint the background before and
    8285          the border after the plot items. In this order the border
    83           gets prefectly antialiased and you can avoid some pixel
     86          gets perfectly antialiased and you can avoid some pixel
    8487          artifacts in the corners.
    8588         */
     
    100103    /*!
    101104      \brief Focus indicator
    102 
    103       - NoFocusIndicator\n
    104         Don't paint a focus indicator
    105 
    106       - CanvasFocusIndicator\n
    107         The focus is related to the complete canvas.
    108         Paint the focus indicator using paintFocus()
    109 
    110       - ItemFocusIndicator\n
    111         The focus is related to an item (curve, point, ...) on
    112         the canvas. It is up to the application to display a
    113         focus indication using f.e. highlighting.
    114 
    115       \sa setFocusIndicator(), focusIndicator(), paintFocus()
     105      The default setting is NoFocusIndicator
     106      \sa setFocusIndicator(), focusIndicator(), drawFocusIndicator()
    116107    */
    117108
    118109    enum FocusIndicator
    119110    {
     111        //! Don't paint a focus indicator
    120112        NoFocusIndicator,
     113
     114        /*!
     115          The focus is related to the complete canvas.
     116          Paint the focus indicator using drawFocusIndicator()
     117         */
    121118        CanvasFocusIndicator,
     119
     120        /*!
     121          The focus is related to an item (curve, point, ...) on
     122          the canvas. It is up to the application to display a
     123          focus indication using f.e. highlighting.
     124         */
    122125        ItemFocusIndicator
    123126    };
    124127
    125     explicit QwtPlotCanvas( QwtPlot * );
     128    explicit QwtPlotCanvas( QwtPlot * = NULL );
    126129    virtual ~QwtPlotCanvas();
    127130
     
    135138    double borderRadius() const;
    136139
    137     QPainterPath borderPath( const QRect &rect ) const;
    138     QBitmap borderMask( const QSize & ) const;
    139 
    140140    void setPaintAttribute( PaintAttribute, bool on = true );
    141141    bool testPaintAttribute( PaintAttribute ) const;
     
    144144    void invalidateBackingStore();
    145145
     146    virtual bool event( QEvent * );
     147
     148    Q_INVOKABLE QPainterPath borderPath( const QRect & ) const;
     149
     150public Q_SLOTS:
    146151    void replot();
    147 
    148     virtual bool event( QEvent * );
    149152
    150153protected:
Note: See TracChangeset for help on using the changeset viewer.