logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

QwtPlotGLCanvas - An alternative canvas for a QwtPlot derived from QGLWidget.

Author

       Generated automatically by Doxygen for Qwt User's Guide from the source code.

Version 6.1.4                                    Wed Jan 2 2019                               QwtPlotGLCanvas(3)

Constructor & Destructor Documentation

QwtPlotGLCanvas::QwtPlotGLCanvas(QwtPlot*plot=NULL)[explicit]
       Constructor.

       Parameters:plot Parent plot widget

       Seealso:QwtPlot::setCanvas()

Detailed Description

       An alternative canvas for a QwtPlot derived from QGLWidget.

       QwtPlotGLCanvas implements the very basics to act as canvas inside of a QwtPlot widget. It might be
       extended to a full featured alternative to QwtPlotCanvas in a future version of Qwt.

       Even if QwtPlotGLCanvas is not derived from QFrame it imitates its API. When using style sheets it
       supports the box model - beside backgrounds with rounded borders.

       Seealso:QwtPlot::setCanvas(), QwtPlotCanvasNote:
           With Qt4 you might want to use the QPaintEngine::OpenGL paint engine ( see
           QGL::setPreferredPaintEngine() ). On a Linux test system QPaintEngine::OpenGL2 shows very basic
           problems like translated geometries.

Member Enumeration Documentation

enumQwtPlotGLCanvas::Shadow
       Frame shadow. Unfortunately it is not possible to use QFrame::Shadow as a property of a widget that is
       not derived from QFrame. The following enum is made for the designer only. It is safe to use
       QFrame::Shadow instead.

       EnumeratorPlain  QFrame::Plain.

       Raised QFrame::Raised.

       Sunken QFrame::Sunken.

   enumQwtPlotGLCanvas::Shape
       Frame  shape. Unfortunately it is not possible to use QFrame::Shape as a property of a widget that is not
       derived from QFrame. The following enum is made for the designer only. It is safe to  use  QFrame::Shadow
       instead.

       Note:
           QFrame::StyledPanel and QFrame::WinPanel are unsupported and will be displayed as QFrame::Panel.

Member Function Documentation

QPainterPathQwtPlotGLCanvas::borderPath(constQRect&rect)constReturns:
           Empty path

   voidQwtPlotGLCanvas::drawBackground(QPainter*painter)[protected],[virtual]
       Draw the background of the canvas

       Parameters:painter Painter

   voidQwtPlotGLCanvas::drawBorder(QPainter*painter)[protected],[virtual]
       Draw the border of the canvas

       Parameters:painter Painter

   voidQwtPlotGLCanvas::drawItems(QPainter*painter)[protected],[virtual]
       Draw the plot items

       Parameters:painter Painter

       Seealso:QwtPlot::drawCanvas()boolQwtPlotGLCanvas::event(QEvent*event)[virtual]
       Qt event handler for QEvent::PolishRequest and QEvent::StyleChange

       Parameters:event Qt Event

       Returns:
           See QGLWidget::event()

   QRectQwtPlotGLCanvas::frameRect()constReturns:
           The rectangle where the frame is drawn in.

   QwtPlotGLCanvas::ShadowQwtPlotGLCanvas::frameShadow()constReturns:
           Frame shadow

       Seealso:setFrameShadow(), QFrame::setFrameShadow()

   QwtPlotGLCanvas::ShapeQwtPlotGLCanvas::frameShape()constReturns:
           Frame shape

       Seealso:setFrameShape(), QFrame::frameShape()

   intQwtPlotGLCanvas::frameStyle()constReturns:
           The bitwise OR between a frameShape() and a frameShadow()Seealso:setFrameStyle(), QFrame::frameStyle()

   intQwtPlotGLCanvas::frameWidth()constReturns:
           Frame width depending on the style, line width and midline width.

   intQwtPlotGLCanvas::lineWidth()constReturns:
           Line width of the frame

       Seealso:setLineWidth(), midLineWidth()intQwtPlotGLCanvas::midLineWidth()constReturns:
           Midline width of the frame

       Seealso:setMidLineWidth(), lineWidth()voidQwtPlotGLCanvas::paintEvent(QPaintEvent*event)[protected],[virtual]
       Paint event

       Parameters:event Paint event

       Seealso:QwtPlot::drawCanvas()voidQwtPlotGLCanvas::setFrameShadow(Shadowshadow)
       Set the frame shadow

       Parameters:shadow Frame shadow

       Seealso:frameShadow(), setFrameShape(), QFrame::setFrameShadow()

   voidQwtPlotGLCanvas::setFrameShape(Shapeshape)
       Set the frame shape

       Parameters:shape Frame shape

       Seealso:frameShape(), setFrameShadow(), QFrame::frameShape()

   voidQwtPlotGLCanvas::setFrameStyle(intstyle)
       Set the frame style

       Parameters:style The bitwise OR between a shape and a shadow.

       Seealso:frameStyle(), QFrame::setFrameStyle(), setFrameShadow(), setFrameShape()voidQwtPlotGLCanvas::setLineWidth(intwidth)
       Set the frame line width

       The default line width is 2 pixels.

       Parameters:width Line width of the frame

       Seealso:lineWidth(), setMidLineWidth()voidQwtPlotGLCanvas::setMidLineWidth(intwidth)
       Set the frame mid line width

       The default midline width is 0 pixels.

       Parameters:width Midline width of the frame

       Seealso:midLineWidth(), setLineWidth()

Name

       QwtPlotGLCanvas - An alternative canvas for a QwtPlot derived from QGLWidget.

Synopsis

       #include <qwt_plot_glcanvas.h>

       Inherits QGLWidget.

   PublicTypes
       enum Shadow { Plain = QFrame::Plain, Raised = QFrame::Raised, Sunken = QFrame::Sunken }
           Frame shadow.
       enum Shape { NoFrame = QFrame::NoFrame, Box = QFrame::Box, Panel = QFrame::Panel }
           Frame shape.

   PublicSlots
       void replot ()
           Calls repaint()

   PublicMemberFunctionsQwtPlotGLCanvas (QwtPlot *=NULL)
           Constructor.
       virtual ~QwtPlotGLCanvas ()
           Destructor.
       void setFrameStyle (int style)
       int frameStyle () const
       void setFrameShadow (Shadow)
       ShadowframeShadow () const
       void setFrameShape (Shape)
       ShapeframeShape () const
       void setLineWidth (int)
       int lineWidth () const
       void setMidLineWidth (int)
       int midLineWidth () const
       int frameWidth () const
       QRect frameRect () const
       Q_INVOKABLE QPainterPath borderPath (const QRect &) const
       virtual bool event (QEvent *)

   ProtectedMemberFunctions
       virtual void paintEvent (QPaintEvent *)
       virtual void drawBackground (QPainter *)
       virtual void drawBorder (QPainter *)
       virtual void drawItems (QPainter *)

See Also