Ejemplo n.º 1
0
CoordSystem::CoordSystem (DocumentAxesPointsRequired documentAxesPointsRequired) :
  m_curveAxes (new Curve (AXIS_CURVE_NAME,
                          ColorFilterSettings::defaultFilter (),
                          CurveStyle (LineStyle::defaultAxesCurve(),
                                      PointStyle::defaultAxesCurve ()))),
  m_documentAxesPointsRequired (documentAxesPointsRequired)
{
  LOG4CPP_INFO_S ((*mainCat)) << "CoordSystem::CoordSystem";

  SettingsForGraph settingsForGraph;
  QString curveName = settingsForGraph.defaultCurveName (1,
                                                         DEFAULT_GRAPH_CURVE_NAME);
  m_curvesGraphs.addGraphCurveAtEnd (Curve (curveName,
                                            ColorFilterSettings::defaultFilter (),
                                            CurveStyle (LineStyle::defaultGraphCurve (m_curvesGraphs.numCurves ()),
                                                        PointStyle::defaultGraphCurve (m_curvesGraphs.numCurves ()))));
}
ChecklistGuidePageCurves::ChecklistGuidePageCurves(const QString &title) :
  ChecklistGuidePage (title)
{
  LOG4CPP_INFO_S ((*mainCat)) << "ChecklistGuidePageCurves::ChecklistGuidePageCurves";

  const QString WHATS_THIS_CURVE (tr ("Curve name. Empty if unused."));
  const QString WHATS_THIS_LINES (tr ("Draw lines between points in each curve."));
  const QString WHATS_THIS_POINTS (tr ("Draw points in each curve, without lines between the points."));

  addHtml (QString ("<p>%1</p>")
           .arg (tr ("What are the names of the curves that are to be digitized? At least one entry is required.")));

  m_edit = new ChecklistLineEdit* [NUM_CURVE_NAMES()];

  for (int i = 0; i < NUM_CURVE_NAMES(); i++) {
    m_edit [i] = new ChecklistLineEdit;
    connect (m_edit [i], SIGNAL (signalKeyRelease()), this, SLOT (slotTableChanged()));
    addLineEdit (m_edit [i],
                 WHATS_THIS_CURVE);
  }

  SettingsForGraph settingsForGraph;
  QString curveName = settingsForGraph.defaultCurveName (1,
                                                         DEFAULT_GRAPH_CURVE_NAME);

  m_edit [0]->setText (curveName);

  addHtml ("<p>&nbsp;</p>");

  addHtml (QString ("<p>%1</p>")
           .arg (tr ("How are those curves drawn?")));

  m_btnLines = addLabelAndRadioButton (tr ("With lines (with or without points)"),
                                       WHATS_THIS_LINES);
  m_btnPoints = addLabelAndRadioButton (tr ("With points only (no lines between points)"),
                                        WHATS_THIS_POINTS);

  m_btnLines->setChecked (true); // Default encourages digitizing using the lines, since that is easier
}