NAME
BQPolypoint - BRTT Qt graphics extension for drawing glyph symbols
SYNOPSIS
$(QTNATIVELIBS) -lbqplot_native -lbanner -lbrttutil -lbumapdata $(DBLIBS) $(TRLIBS)
#include "BQ.h"
DESCRIPTION
BQPolypoint objects are used to display general glyph symbols. This class is meant to
provide compatibility with the old
buplot polypoint objects. This class uses
BQGlyphs
object as the underlying implementation and
BQGlyphsGraphicsContext objects for
glyph rendering.
This class inherits the BQConfigure class which is itself a subclass of the BUConfigure class
with extensions to process Qt colors and fonts. The configure methods are implemented
in the BUConfigure parent (see BUConfigure(3)).
INHERITS FROM
BQViewportItem,
BQConfigure
CONSTRUCTOR
BQPolypoint(BQViewport *master);
Where "master" is the BQViewport master for this object.
METHODS INHERITED FROM BQConfigure
-
void configure (Pf *params);
An Antelope parameter file object pointer that contains the BQPolypoint object
parameters. The parameters are described below.
-
void configure (...);
A variable argument list composed entirely of character string key-value pairs with
a single NULL terminating argument. This is an alternate method for specifying
the BQPolypoint object parameters. The parameters are described below.
METHODS INHERITED FROM BQViewportItem
-
void setLayer (QString name);
This will cause the BQPolypoint object to be put into the BQLayer object buffer with name name (see BQLayer(3)).
The BQLayer object will automatically be created if an object with name name does not exist.
-
void showItem();
-
void hideItem();
These will cause the polypoint object to be shown (displayed) or hidden (not displayed).
BQPolypoint METHODS
-
void setLayer (QString layer_name);
This causes the underlying BQGlyphs object to call its setLayer method.
Note that the BQPolypoint object itself is not a viewport item, only its
underlying BQGlyphs object.
-
void setGlyphs ();
Calls setGlyphs method of underlying BQGlyphs object.
-
void setGlyphCallback (std::function<BQ_glyphCallback> glyphCallback, BQ_ClientData client_data);
Calls the setGlyphCallback method of underlying BQGlyphs object.
OBJECT CONFIGURATION PARAMETERS
-
vector vectorHandle[:index]
This specifies the source of the X-Y coordinate data for making the
polypoint symbol plots as coming from a buvector(3)
object. Note that an optional
index value can be specified after the vector handle to specify
the index of the dependent variable in vector objects that have more
than one dependent variable (the index starts at 0).
Note that all data must be in world coordinates. Each of the plot points
defined in the input vector object may be configured so that the plot
label and plot symbol fill color, outline color and size can be different
for each point. This is done by specifying a label field for each of
the vector points (see buvector(3)). The label for each plot
point can be displayed as a text label if the showlabels option is set
to "1". In order to effect changes in symbol attributes, each vector
point label attribute must also contain tokens in the form
{f=symbolfillColor o=symboloutlineColor sz=symbolSize
sy=symbolType}.
These tokens can appear with or without a text label. For instance,
if a vector point text label is set to
"Apt {f=red o=black sz=20 sy=circle}", then that point's plot symbol,
a circle, will
be filled in red, with a line outline in black, sized to 20 pixels and
a text label of "Apt" will also be displayed. Note that the other symbol
attributes will be the same for all points and generally it is safest to use fill
and/or outline on each symbol the same across the plot points (i.e. don't
try to disable filling for certain points and enable it for others). Also,
the various symbol control tokens may be omitted in the point labels which
causes the default colors and size to be used.
Token definitions are as follows.
-
sy
This is the symbol type according to the
symbol symbolType defined below.
Note that when a beachball symbol is to be displayed, the form of the token
must be sy=bb,<mxx>,<myy>,<mzz>,<mxy>,<mxz>,<myz>
where <mxx>, <myy>, ... are the XX, YY, ZZ, XY, XZ, YZ components of the
moment tensor X=positive East, Y=positive North, Z=positive Up.
-
sz
This is the symbol size according to the size symbolSize defined below.
-
f
This is the symbol fill color according to the fill symbolfillColor defined below.
-
o
This is the symbol outline color according to the outline symboloutlineColor defined below.
-
bqxy bqxyList
This specifies the source of the X-Y coordinate data for making the
polypoint plot as coming from a QList<BQ_XY> QList pointer. Note that
for this option the value pointer is not a string pointer but a pointer to
a QList<BQ_XY> object.
Note that all data must be in world coordinates.
The BQ_XY structure is defnied as
typedef struct BQ_XY {
double x, y;
} BQ_XY;
-
bqxyl bqxylList
This specifies the source of the X-Y coordinate data plus the point labels for making the
polypoint plot as coming from a QList<BQ_XYL> QList pointer. Note that
for this option the value pointer is not a string pointer but a pointer to
a QList<BQ_XY> object.
Note that all data must be in world coordinates.
The BQ_XYL structure is defnied as
typedef struct BQ_XYL {
double x, y;
QString label;
} BQ_XYL;
-
symbol symbolType
This specifies a default plot symbol type and must be one of
"point", "cross", "x", "triangle",
"square", "circle", "star", or "diamond".
Note that a beachball cannot be defined as the default plot symbol.
This defaults to "point".
-
size symbolSize
This specifies a default plot symbol size in pixels.
This defaults to "5.0".
-
points_free dummy
This causes the underlying BQGlyphs object to be deleted.
-
color_fill symbolfillColor
Specifies a default color to use for filling the plot symbols.
Can be specified in any of the forms documented in BQ_ParseColor(3).
If this is specified as a NULL string (""), then the plot symbols will
not be filled.
This defaults to "".
-
color_fill_node nodefillColor
Specifies a default color to use for filling the beachball node shapes.
Can be specified in any of the forms documented in BQ_ParseColor(3).
If this is specified as a NULL string (""), then the beachball nodes will
not be filled.
This defaults to "".
-
color_outline symboloutlineColor
Specifies a default color to use for drawing the plot symbol outlines.
Can be specified in any of the forms documented in BQ_ParseColor(3).
If this is specified as a NULL string (""), then there will be no
symbol outlines drawn.
This defaults to "black".
-
linewidth lineWidth
Specifies the default line width for the symbol outlines in pixels.
A value less than one means don't draw the symbol outlines.
This defaults to "1".
-
linewidth_node nodelineWidth
Specifies the default line width for the beachball node outlines in pixels.
A value less than one means don't draw the beachball node outlines.
This defaults to "-1".
-
font textFont
Specifies a default font to use for displaying the label text strings.
Fonts are specified as "<family>[ <size>[ <weight>[ <italic?>]]]",
where <family> is a font family name, <size>size is a font size in integer
points, <weight> is an integer weight or can be one
of Light, Normal, DemiBold, Bold or Black,
and <italic?> is a boolean (yes or no) to indicate if the font
is in italics. System defaults for <size>, <weight> and <italic?> are
used if not specified.
This defaults to "Helvetica 12".
-
color_text textColor
Specifies a color to use for displaying the label text fonts.
Can be specified in any of the forms documented in BQ_ParseColor(3).
This defaults to "black".
-
showlabels {0|1}
Specifies if the polypoint label text strings are visible, "1", or
invisible, "0".
This defaults to "1".
-
opacity opacity
This is a floating opacity factor applied to rendering of the symbols. A value of 1.0
means complete opaque and a value if 0.0 means completely translucent.
This defaults to "1.0".
-
interaction interaction
This defines the mouse interaction with the symbol glyphs and should be one of "none",
for no mouse interaction, "show", for temporarily accentuating the symbol glyphs
as the mouse is moved throught the symbols, as described in BQGyphs(3), or "move",
in which the glyph symbol is moved by a mouse press-drag-release sequence.
SEE ALSO
bqplot(3),
BQViewport(3),
BQLayer(3),
BQConfigure(3),
BQGlyphs(3)
AUTHOR
Danny Harvey, BRTT