Single constructor.
32 :
33 QGraphicsView (scene)
34{
37 connect (
this, SIGNAL (
signalDraggedDigFile (QString)), &mainWindow, SLOT (slotFileOpenDraggedDigFile (QString)));
38 connect (
this, SIGNAL (
signalDraggedImage (QImage)), &mainWindow, SLOT (slotFileImportDraggedImage (QImage)));
39 connect (
this, SIGNAL (
signalDraggedImageUrl (QUrl)), &mainWindow, SLOT (slotFileImportDraggedImageUrl (QUrl)));
40 connect (
this, SIGNAL (
signalKeyPress (Qt::Key,
bool)), &mainWindow, SLOT (slotKeyPress (Qt::Key,
bool)));
41 connect (
this, SIGNAL (
signalMouseMove(QPointF)), &mainWindow, SLOT (slotMouseMove (QPointF)));
42 connect (
this, SIGNAL (
signalMousePress (QPointF)), &mainWindow, SLOT (slotMousePress (QPointF)));
43 connect (
this, SIGNAL (
signalMouseRelease (QPointF)), &mainWindow, SLOT (slotMouseRelease (QPointF)));
44 connect (
this, SIGNAL (
signalViewZoomIn ()), &mainWindow, SLOT (slotViewZoomInFromWheelEvent ()));
45 connect (
this, SIGNAL (
signalViewZoomOut ()), &mainWindow, SLOT (slotViewZoomOutFromWheelEvent ()));
46
47 setMouseTracking (true);
48 setAcceptDrops (true);
49 setEnabled (true);
50 setRenderHints(QPainter::Antialiasing);
51 setBackgroundBrush (QBrush (QColor (Qt::gray)));
52 verticalScrollBar()->setCursor (QCursor (Qt::ArrowCursor));
53 horizontalScrollBar()->setCursor (QCursor (Qt::ArrowCursor));
54
55
56 setWhatsThis (tr ("Main Window\n\n"
57 "After an image file is imported, or an Engauge Document opened, an image appears in this area. "
58 "Points are added to the image.\n\n"
59 "If the image is a graph with two axes and one or more curves, then three axis points must be "
60 "created along those axes. Just put two axis points on one axis and a third axis point on the other "
61 "axis, as far apart as possible for higher accuracy. Then curve points can be added along the curves.\n\n"
62 "If the image is a map with a scale to define length, then two axis points must be "
63 "created at either end of the scale. Then curve points can be added.\n\n"
64 "Zooming the image in or out is performed using any of several methods:\n"
65 "1) rotating the mouse wheel when the cursor is outside of the image\n"
66 "2) pressing the minus or plus keys\n"
67 "3) selecting a new zoom setting from the View/Zoom menu"));
68}
void signalDraggedImage(QImage)
Send dragged image to MainWindow for import. This typically comes from dragging a file.
void signalKeyPress(Qt::Key, bool atLeastOneSelectedItem)
Send keypress to MainWindow for eventual processing by DigitizeStateAbstractBase subclasses.
void signalMouseRelease(QPointF)
Send mouse release to MainWindow for moving Points.
void signalViewZoomOut()
Send wheel event to MainWindow for zooming out.
void signalDraggedDigFile(QString)
Send dragged dig file to MainWindow for import. This comes from dragging an engauge dig file.
void signalContextMenuEventAxis(QString pointIdentifier)
Send right click on axis point to MainWindow for editing.
void signalViewZoomIn()
Send wheel event to MainWindow for zooming in.
void signalMousePress(QPointF)
Send mouse press to MainWindow for creating one or more Points.
void signalDraggedImageUrl(QUrl)
Send dragged url to MainWindow for import. This typically comes from dragging an image from a browser...
void signalContextMenuEventGraph(QStringList pointIdentifiers)
Send right click on graph point(s) to MainWindow for editing.
void signalMouseMove(QPointF)
Send mouse move to MainWindow for eventual display of cursor coordinates in StatusBar.