DlgEditScale::DlgEditScale (MainWindow &mainWindow,
                            const DocumentModelCoords &modelCoords,
                            const DocumentModelGeneral &modelGeneral,
                            const MainWindowModel &modelMainWindow,
                            const double *scaleLength) :
  QDialog (&mainWindow),
  m_modelCoords (modelCoords),
  m_modelGeneral (modelGeneral),
  m_modelMainWindow (modelMainWindow)
{
  LOG4CPP_INFO_S ((*mainCat)) << "DlgEditScale::DlgEditScale";

  QVBoxLayout *layout = new QVBoxLayout;
  setLayout (layout);

  setCursor  (QCursor (Qt::ArrowCursor));
  setModal(true);
  setWindowTitle (tr ("Edit Axis Point"));

  createScaleLength (layout);
  createHint (layout);
  createOkCancel (layout);

  initializeScaleLength (scaleLength);
  
  updateControls ();
}
Example #2
0
DlgEditPointGraph::DlgEditPointGraph (MainWindow &mainWindow,
                                      const DocumentModelCoords &modelCoords,
                                      const DocumentModelGeneral &modelGeneral,
                                      const MainWindowModel &modelMainWindow,
                                      const Transformation &transformation,
                                      const double *xInitialValue,
                                      const double *yInitialValue) :
  QDialog (&mainWindow),
  m_changed (false),
  m_modelCoords (modelCoords),
  m_modelGeneral (modelGeneral),
  m_modelMainWindow (modelMainWindow)
{
  LOG4CPP_INFO_S ((*mainCat)) << "DlgEditPointGraph::DlgEditPointGraph";

  QVBoxLayout *layout = new QVBoxLayout;
  setLayout (layout);

  setCursor  (QCursor (Qt::ArrowCursor));
  setModal(true);
  setWindowTitle (tr ("Edit Curve Point(s)"));

  createCoords (layout);
  createHint (layout);
  createOkCancel (layout);

  initializeGraphCoordinates (xInitialValue,
                              yInitialValue,
                              transformation);

  m_changed = false; // Initialization of coordinate vaues changed this flag so we reset it and update the controls
  updateControls ();
}