#include <mlabGraphicsFrame.h>
Inherits QGraphicsWidget.
Frame graphics view item draws a background frame around/below a given child item.
◆ setBorderPen [1/2]
void MLABGraphicsFrame::setBorderPen |
( |
const QColor & | color, |
|
|
float | width ) |
|
slot |
set the pen to use for drawing the border of the frame
◆ setBorderPen [2/2]
void MLABGraphicsFrame::setBorderPen |
( |
const QPen & | pen | ) |
|
|
slot |
set the pen to use for drawing the border of the frame
◆ setContentsMargins
void MLABGraphicsFrame::setContentsMargins |
( |
qreal | left, |
|
|
qreal | top, |
|
|
qreal | right, |
|
|
qreal | bottom ) |
|
slot |
sets the margins for the content widget, the default is 11 pixels in all directions.
◆ setFillColor
void MLABGraphicsFrame::setFillColor |
( |
const QColor & | color | ) |
|
|
slot |
◆ setFillGradient
void MLABGraphicsFrame::setFillGradient |
( |
const QGradient & | gradient | ) |
|
|
slot |
sets the frame fill gradient that should be drawn
Example for creating a linear vertical gradient using PythonQt:
gradient = QtGui.QLinearGradient(0,0,0,1)
gradient.setCoordinateMode(gradient.ObjectBoundingMode)
gradient.setColorAt(0, QtGui.QColor(128,0,0,128))
gradient.setColorAt(1, QtGui.QColor(255,128,128,128))
item.setFillGradient(gradient)
◆ setFillHorizontalLinearGradient
void MLABGraphicsFrame::setFillHorizontalLinearGradient |
( |
const QColor & | startColor, |
|
|
const QColor & | endColor ) |
|
slot |
sets the frame fill gradient as a horizontal linear gradient with start and end color
◆ setFillVerticalLinearGradient
void MLABGraphicsFrame::setFillVerticalLinearGradient |
( |
const QColor & | startColor, |
|
|
const QColor & | endColor ) |
|
slot |
sets the frame fill gradient as a vertical linear gradient with start and end color
◆ setFramePixmap
void MLABGraphicsFrame::setFramePixmap |
( |
const QPixmap & | pixmap, |
|
|
const QMargins & | margins ) |
|
slot |
draws the given pixmap as streched frame, using qDrawBorderPixmap with 9 segments defined by given margins
◆ setRoundedBorder
void MLABGraphicsFrame::setRoundedBorder |
( |
qreal | xRadius, |
|
|
qreal | yRadius ) |
|
slot |
sets to draw a rounded border (using absolute pixel radii), default is to not draw rounded corners