Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_layout.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_plot_layout.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_plot_layout.h
r9383 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 13 13 #include "qwt_global.h" 14 14 #include "qwt_plot.h" 15 #include "qwt_axis_id.h" 15 16 16 17 /*! 17 \brief Layout engine for QwtPlot. 18 \brief Layout engine for QwtPlot. 18 19 19 It is used by the QwtPlot widget to organize its internal widgets 20 or by QwtPlot::print() to render its content to a QPaintDevice like 21 a QPrinter, QPixmap/QImage or QSvgRenderer. 20 It is used by the QwtPlot widget to organize its internal widgets 21 or by QwtPlot::print() to render its content to a QPaintDevice like 22 a QPrinter, QPixmap/QImage or QSvgRenderer. 22 23 23 \sa QwtPlot::setPlotLayout() 24 */ 24 \sa QwtPlot::setPlotLayout() 25 */ 25 26 26 27 class QWT_EXPORT QwtPlotLayout 27 28 { 28 public: 29 public: 29 30 /*! 30 Options to configure the plot layout engine 31 \sa activate(), QwtPlotRenderer 31 Options to configure the plot layout engine 32 \sa activate(), QwtPlotRenderer 32 33 */ 33 34 enum Option … … 37 38 38 39 /*! 39 Ignore the dimension of the scrollbars. There are no 40 scrollbars, when the plot is not rendered to widgets. 40 Ignore the dimension of the scrollbars. There are no 41 scrollbars, when the plot is not rendered to widgets. 41 42 */ 42 43 IgnoreScrollbars = 0x02, … … 55 56 }; 56 57 57 //! Layout options 58 typedef QFlags<Option> Options; 58 Q_DECLARE_FLAGS( Options, Option ) 59 59 60 60 explicit QwtPlotLayout(); … … 79 79 double legendRatio() const; 80 80 81 virtual QSize minimumSizeHint( const QwtPlot * ) const;81 virtual QSize minimumSizeHint( const QwtPlot* ) const; 82 82 83 virtual void activate( const QwtPlot *,84 const QRectF &plotRect, Options options = Options() );83 virtual void activate( const QwtPlot*, 84 const QRectF& plotRect, Options options = Options() ); 85 85 86 86 virtual void invalidate(); … … 89 89 QRectF footerRect() const; 90 90 QRectF legendRect() const; 91 QRectF scaleRect( int axis) const;91 QRectF scaleRect( QwtAxisId ) const; 92 92 QRectF canvasRect() const; 93 93 94 class LayoutData;94 protected: 95 95 96 protected: 96 void setTitleRect( const QRectF& ); 97 void setFooterRect( const QRectF& ); 98 void setLegendRect( const QRectF& ); 99 void setScaleRect( QwtAxisId, const QRectF& ); 100 void setCanvasRect( const QRectF& ); 97 101 98 void setTitleRect( const QRectF & ); 99 void setFooterRect( const QRectF & ); 100 void setLegendRect( const QRectF & ); 101 void setScaleRect( int axis, const QRectF & ); 102 void setCanvasRect( const QRectF & ); 102 private: 103 Q_DISABLE_COPY(QwtPlotLayout) 103 104 104 QRectF layoutLegend( Options options, const QRectF & ) const;105 QRectF alignLegend( const QRectF &canvasRect,106 const QRectF &legendRect ) const;107 108 void expandLineBreaks( Options options, const QRectF &rect,109 int &dimTitle, int &dimFooter, int dimAxes[QwtPlot::axisCnt] ) const;110 111 void alignScales( Options options, QRectF &canvasRect,112 QRectF scaleRect[QwtPlot::axisCnt] ) const;113 114 private:115 105 class PrivateData; 116 117 PrivateData *d_data; 106 PrivateData* m_data; 118 107 }; 119 108
Note:
See TracChangeset
for help on using the changeset viewer.
