• Antelope Release 5.9 Mac OS X 10.13.2 2019-05-01

 

NAME

BQMapevents - BRTT Qt graphics extension for drawing seismic events on a map

SYNOPSIS


$(QTNATIVELIBS) -lbqplot_native -lbanner -lbrttutil -lbumapdata $(DBLIBS) $(TRLIBS)

#include "BQ.h"

DESCRIPTION

BQMapevents objects are used to display seismic events on geographic base maps. This class makes use of BQMap(3) classes to make the base maps, as well as BQGlyphs(3) and BQGlyphsGraphicsContext(3) objects for displaying the seismic events, arrivals and detections, BQPloyline(3) objects for displaying great circle paths and error ellipses, and BQTextPopup(3) objects for showing event, arrival and detection information.

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

BQMapevents(BQViewport *events_vp, BQViewport *origin_vp, BQViewport *origins_vp,
            int make_navigator, int make_grids);

There are three main display windows that are created by a single BQMapevents object; a window showing all events on a map, called the "events" window, a window showing a single origin with all of the arrivals and detections for that origin on a map, called the "origin" window, and a window showing all of the origins for a single event along with their error ellipses on a map, called the "origins" window. Each of the windows are contained within normal BQViewport(3) viewport items. The viewports are then managed independently by the application program. In the constructor events_vp is the viewport that contains the "events" window, origin_vp is the viewport that contains the "origin" window and origins_vp is the viewport that contains the "origins" window. The three display windows are automatically synchronized within a single BQMapevents object. Because of this automatic synchronization, it is important that all three windows be assigned to different and non-NULL viewports even if some of the windows will not be shown in the final application, which should be accomplished by hiding the viewports that are not to be shown, or by giving the viewports 0 size. In this way the internal synchronization will still work properly. The make_navigator flag controls whether or not a navigator object is automatically created for only the "events" window underlying BQMap(3) object. The make_grids flag controls whether or not latitude and longitude grids are shown in the displays.

METHODS INHERITED FROM BQConfigure

METHODS INHERITED FROM BQViewportItem

BQMapevents METHODS

OBJECT CONFIGURATION PARAMETERS

EXAMPLE

Following is a simple example program that uses
BPQMapEvents.

#include "BQ.h"

int
main (int argc, char **argv)

{
    int ret;

    QApplication app (argc, argv);

    if (argc != 2) {
        fprintf (stderr, "usage: %s dbname\n", argv[0]);
        exit (1);
    }

    BUEventView *ev = new BUEventView();
    if (ev->configure ( "dbname", argv[1], NULL ) < 0) {
        die (0, (char *) "Cannot open database." );
    }

    QFrame *frame = new QFrame();

    BQMapevents *mapevents = new BQMapevents(frame);
    mapevents->setDefaults();
    mapevents->getMap()->configure (
        "latr", "40",
        "lonr", "-100",
        "range", "90",
        NULL );
    mapevents->setEventView(ev);

    double t0 = now();
    frame->setGeometry (0, 0, 1500, 1000);
    frame->show();

    frame->setWindowTitle ("bqplot_test_mapevents");

    printf ("view setup %f\n", now()-t0);

    ret = app.exec();

    return ret;
}


SEE ALSO

bqplot(3), BQViewport(3), BQLayer(3), BQConfigure(3), BQMapLayer(3), BQNavigator(3), BQTaskbar(3)

AUTHOR

Danny Harvey, BRTT