NAME
BQTextPopup - BRTT Qt graphics extension for drawing text popup dialogs
SYNOPSIS
$(QTNATIVELIBS) -lbqplot_native -lbanner -lbrttutil -lbumapdata $(DBLIBS) $(TRLIBS)
#include "BQ.h"
DESCRIPTION
BQTextPopup objects are used to display general text popup dialog boxes.
A text popup window will either occupy the lower left hand corner of the
viewport frame, or it will be displayed as a top-level popup window
at a specified position usually close the the mouse cursor. In this way
it can be used as a help balloon dialog utility.
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
BQTextPopup(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 BQTextPopup 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 BQTextPopup object parameters. The parameters are described below.
METHODS INHERITED FROM BQViewportItem
-
void setLayer (QString name);
This will cause the BQTextPopup 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 popup to be shown (displayed) or hidden (not displayed).
BQTextPopup METHODS
-
void setText (QString text);
This will set the text popup text. Newlines in the string will cause
new lines in the popup.
-
void setPosition (QPoint pos);
This will set the position of the upper left hand corner of the text popup
in screen coordinate pixels. If this is set, then the popup will be a top-level window
that will extend outside of the underlying viewport window. If this is not specified,
then the popup will be place so that its lower left hand corner is at the
lower left hand corner of the viewport window.
-
void setTimeout (double timeout);
This will set a timeout value in seconds that will cause the text popup to
automatically be hidden and deleted. If this is not set ot timeout <= 0.0
then the popup will remain displayed indefinitely.
-
void setJustification (QString justification);
This will set a text justification value that is used to anchor the popup. Must be one
of "c", "nw", "n", "ne", "e", "se", "s", "sw",
or "w".
-
void stopTimer ();
This will interrupt the text popup timer when the timeout value is positive.
-
void raiseTextPopup();
This will raise the display order of the text popup to the top of the display list
in its BQViewport parent.
-
void deletePopup ();
This will cause the text popup display to be deleted.
OBJECT CONFIGURATION PARAMETERS
-
color_background backgroundColor
Specifies a color to use for filling the text popup background.
Can be specified in any of the forms documented in BQ_ParseColor(3).
This defaults to "lightyellow".
-
text textString
This allows the text string to be modified and has the same effect as setText.
-
position xPos yPos
This allows the position to be modified and has the same effect as setPosition.
The x and y position should be specified as white space separated fields in a single
value string.
-
timeout timeoutValue
This allows the timeout to be modified and has the same effect as setTimeout.
-
justification justificationValue
This allows the justification to be modified and has the same effect as setJustification.
-
opacity opacity
This is a floating opacity factor applied to rendering of the text popup. A value of 1.0 means complete opaque and a value
of 0.0 means completely translucent.
This defaults to "1.0".
SEE ALSO
bqplot(3),
BQViewport(3),
BQLayer(3),
BQConfigure(3)
AUTHOR
Danny Harvey, BRTT