Description Usage Arguments Details Value Author(s) Examples
These functions construct some simple Qt helper objects. They offer convenience beyond that of the native constructor, largely because they might coerce from an R equivalent to a Qt object. Also, unlike C++, argument skipping is supported.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | qrect(x0, y0, x1, y1)
qpoint(x, y)
qsize(width, height)
qpolygon(x = NULL, y = NULL)
qfont(family = baseFont$family(), pointsize =
baseFont$pointSize(), weight = baseFont$weight(),
italic = baseFont$style() == Qt$QFont$StyleItalic,
baseFont = Qt$QApplication$font())
qpen(brush = qbrush(), width = 0L, style = Qt$Qt$SolidLine,
cap = Qt$Qt$SquareCap, join = Qt$Qt$BevelJoin)
qbrush(color = qcolor(), style = Qt$Qt$SolidPattern)
qcolor(red = 0, green = 0, blue = 0, alpha = 255)
qtransform(m11 = 1.0, m12 = 0.0, m13 = 0.0, m21 = 0.0, m22 = 1.0,
m23 = 0.0, m31 = 0.0, m32 = 0.0, m33 = 1.0)
|
x0 |
Top-left X coordinate. If a vector of length two, taken as
|
y0 |
Top-left Y coordinate. If a vector of length two, taken as
|
x1 |
Bottom-right X coordinate. |
y1 |
Bottom-right Y coordinate. |
x |
X coordinate. If a vector of length two, taken as |
y |
Y coordinate. For |
width |
Width for the size. If a vector of length two, taken
as |
height |
Height for the size. |
family |
Font family name. |
pointsize |
Font point size. |
weight |
Font weight (bold). |
italic |
Whether font is italicized. |
baseFont |
The base font to use for the defaults. By default, this is the global application font. |
brush |
Something coercible to a |
style |
Line dashing for |
cap |
Line cap style. |
join |
Line join style. |
color |
Something coercible to a |
red |
Red component, 0-255. If a string, taken as color name and
converted. If a matrix, taken as output of |
green |
Green component, 0-255. |
blue |
Blue component, 0-255. |
alpha |
Alpha component, 0-255. |
m11 |
Horizontal scaling factor |
m12 |
Vertical shearing factor |
m13 |
Horizontal projection factor |
m21 |
Horizontal shearing factor |
m22 |
Vertical scaling factor |
m23 |
Vertical projection factor |
m31 |
Horizontal translation factor |
m32 |
Vertical translation factor |
m33 |
Division factor |
For structures with a F
variant, like QSizeF
, the
variant is chosen based on the type of the input. If the values are
double, a QSizeF
instance is returned, otherwise an instance of
QSize
.
An instance, RQtObject
Michael Lawrence, Deepayan Sarkar
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## notice the coercion chaining:
redColor <- qcolor("red")
redBrush <- qbrush("red")
redPen <- qpen("red")
blackPen <- qpen()
## Qt's constructor uses width/height, not x1/y1
rect <- qrect(as.matrix(Qt$QRectF(1, 1, 5, 5)))
as.matrix(rect)
## Creates 'QRect' not 'QRectF'; integer input
qrect(range(1:10), range(2:5))
qsize(as.vector(qpoint(5, 5)))
mono_it <- qfont("monospace", italic = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.