void TutorialStateIntroduction::begin ()
{
  LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateIntroduction::begin ()";

  m_title = createTitle (tr ("Introduction"));
  m_background = createPixmapItem (":/engauge/img/SpreadsheetsForDoc.png",
                                   QPoint (0, 0));
  m_text0 = createTextItem (tr ("Engauge Digitizer starts with\n"
                                "images of graphs and maps."),
                            QPoint (200, 40));
  m_text1 = createTextItem (tr ("You create (or digitize) points along\n"
                                "the graph and map curves."),
                            QPoint (240, 180));
  m_text2 = createTextItem (tr ("The digitized curve points can be\n"
                                "exported, as numbers, to other software tools."),
                            QPoint (210, 330));

  QSize backgroundSize = context().tutorialDlg().backgroundSize();

  m_next = new TutorialButton (tr ("Next"),
                               context().tutorialDlg().scene());
  m_next->setGeometry (QPoint (backgroundSize.width () - buttonMargin () - m_next->size ().width (),
                               backgroundSize.height () - buttonMargin () - m_next->size ().height ()));
  connect (m_next, SIGNAL (signalTriggered ()), this, SLOT (slotNext ()));
}
void TutorialStateChecklistWizardAbstract::begin ()
{
  LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateChecklistWizardAbstract::begin ()";

  m_title = createTitle ("Checklist Wizard and Checklist Guide");
  m_background = createPixmapItem (":/engauge/img/panel_checklist.png",
                                   QPoint (0, 30));
  m_text0 = createTextItem ("For new Engauge users, a Checklist Wizard\n"
                            "is available when importing an image file.\n"
                            "This wizard produces a helpful checklist of\n"
                            "steps to follow to digitize the image file.",
                            QPoint (260, 30));
  m_text1 = createTextItem ("Step 1 - Enable the menu option Help /\n"
                            "Checklist Guide Wizard.",
                            QPoint (285, 125));
  m_text2 = createTextItem ("Step 2 - Import the file using File /\n"
                            "Import. The Checklist Wizard will appear\n"
                            "and ask some simple questions to\n"
                            "determine how the image can be\n"
                            "digitized.",
                            QPoint (285, 175));
  m_text3 = createTextItem ("Additional options are available in\n"
                            "the various Settings menus.\n\n"
                            "This ends the tutorial. Good luck!",
                            QPoint (285, 270));

  QSize backgroundSize = context().tutorialDlg().backgroundSize();

  m_previous = new TutorialButton ("Previous",
                                   context().tutorialDlg().scene());
  m_previous->setGeometry (QPoint (buttonMargin (),
                                   backgroundSize.height () - buttonMargin() - m_previous->size().height()));
}
void TutorialStateCurveSelection::begin ()
{
  LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateCurveSelection::begin ()";

  m_title = createTitle ("Curve Selection");
  m_background = createPixmapItem (":/engauge/img/panel_curve_selection.png",
                                   QPoint (0, 30));
  m_text0 = createTextItem ("After the axis points have been created, a\n"
                            "curve is selected to receive curve points.\n"
                            "Step 1 - click on Curve, Point Match, Color\n"
                            "Picker or Segment Fill buttons.",
                            QPoint (250, 40));
  m_text1 = createTextItem ("Step 2 - Select the desired curve name. If\n"
                            "that curve name has not been created yet,\n"
                            "use the menu option Settings / Curve Names\n"
                            "to create it.",
                            QPoint (250, 120));
  m_text2 = createTextItem ("Step 3 - Change the background from the\n"
                            "original image to the filtered image\n"
                            "produced for the current curve, using the\n"
                            "menu option View / Background / Filtered\n"
                            "Image. This filtering enables the powerful\n"
                            "automated algorithms discussed later in\n"
                            "the tutorial.",
                            QPoint (250, 200));
  m_text3 = createTextItem ("If the current curve is no longer visible\n"
                            "in the filtered image, then change the\n"
                            "current Color Filter settings. In the figure,\n"
                            "the orange points have disappeared.",
                            QPoint (250, 330));

  QSize backgroundSize = context().tutorialDlg().backgroundSize();

  m_previous = new TutorialButton ("Previous",
                                   context().tutorialDlg().scene());
  m_previous->setGeometry (QPoint (buttonMargin (),
                                   backgroundSize.height() - buttonMargin() - m_previous->size().height()));
  connect (m_previous, SIGNAL (signalTriggered ()), this, SLOT (slotPrevious ()));

  m_colorFilter = new TutorialButton ("Color Filter Settings",
                                      context().tutorialDlg().scene());
  m_colorFilter->setGeometry (QPoint (backgroundSize.width () / 2.0 - m_colorFilter->size ().width () / 2,
                                      backgroundSize.height () - buttonMargin () - m_colorFilter->size ().height ()));
  connect (m_colorFilter, SIGNAL (signalTriggered ()), this, SLOT (slotColorFilter ()));

  m_next = new TutorialButton ("Next",
                               context().tutorialDlg().scene());
  m_next->setGeometry (QPoint (backgroundSize.width () - buttonMargin () - m_next->size ().width (),
                               backgroundSize.height () - buttonMargin () - m_next->size ().height ()));
  connect (m_next, SIGNAL (signalTriggered ()), this, SLOT (slotNext ()));
}
void TutorialStateAxisPoints::begin ()
{
  LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateAxisPoints::begin ()";

  m_title = createTitle (tr ("Axis Points"));
  m_background = createPixmapItem (":/engauge/img/panel_axis_points.png",
                                   QPoint (0, 30));
  m_text0 = createTextItem (tr ("Axis points are first defined to\n"
                                "define the coordinates. Step 1 -\n"
                                "Click on the Axis Points button"),
                            QPoint (320, 60));
  m_text1 = createTextItem (tr ("Step 2 - Click on an axis or grid\n"
                                "line with known coordinates. An axis\n"
                                "point appears, with a dialog window\n"
                                "for entering the axis point's\n"
                                "coordinates"),
                            QPoint (300, 210));
  m_text2 = createTextItem (tr ("Step 3 - Enter the two coordinates\n"
                                "of the axis point and then click Ok.\n"
                                "Repeat steps 2 and 3 twice more\n"
                                "until three axis points are created"),
                            QPoint (280, 320));

  QSize backgroundSize = context().tutorialDlg().backgroundSize();

  m_previous = new TutorialButton (tr ("Previous"),
                                   context().tutorialDlg().scene());
  m_previous->setGeometry (QPoint (buttonMargin (),
                                   backgroundSize.height() - buttonMargin() - m_previous->size().height()));
  connect (m_previous, SIGNAL (signalTriggered ()), this, SLOT (slotPrevious ()));

  m_next = new TutorialButton (tr ("Next"),
                               context().tutorialDlg().scene());
  m_next->setGeometry (QPoint (backgroundSize.width () - buttonMargin () - m_next->size ().width (),
                               backgroundSize.height () - buttonMargin () - m_next->size ().height ()));
  connect (m_next, SIGNAL (signalTriggered ()), this, SLOT (slotNext ()));
}
void TutorialStateColorFilter::begin ()
{
  LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateColorFilter::begin ()";

  m_title = createTitle (tr ("Color Filter"));
  m_background = createPixmapItem (":/engauge/img/panel_color_filter.png",
                                   QPoint (0, 30));
  m_text0 = createTextItem (tr ("Each curve has Color Filter settings that\n"
                                "are applied in Segment Fill mode. For\n"
                                "black lines the defaults work well, but for\n"
                                "colored lines the settings can be improved."),
                            QPoint (260, 30));
  m_text1 = createTextItem (tr ("Step 1 - Select the Settings / Color\n"
                                "Filter menu option."),
                            QPoint (285, 115));
  m_text2 = createTextItem (tr ("Step 2 - Select the curve that will\n"
                                "be given the new settings."),
                            QPoint (285, 165));
  m_text3 = createTextItem (tr ("Step 3 - Select the mode. Intensity is\n"
                                "suggested for uncolored lines, and Hue\n"
                                "is suggested for colored lines."),
                            QPoint (285, 210));
  m_text4 = createTextItem (tr ("Step 4 - Adjust the included range by\n"
                                "dragging the green handles, until the\n"
                                "curve is clear in the preview window\n"
                                "below. The graph shows a histogram\n"
                                "distribution of the values underneath.\n"
                                "Click Ok when finished."),
                            QPoint (285, 280));

  QSize backgroundSize = context().tutorialDlg().backgroundSize();

  m_back = new TutorialButton (tr ("Back"),
                               context().tutorialDlg().scene());
  m_back->setGeometry (QPoint (backgroundSize.width () / 2 - m_back->size().width () / 2,
                               backgroundSize.height() - buttonMargin() - m_back->size().height()));
  connect (m_back, SIGNAL (signalTriggered ()), this, SLOT (slotBack ()));
}