46                                               QString defaultPointId,
 
   50                                               bool subpixelRegisterMeasures) : 
QDialog(parent) {
 
   52    m_controlNet = controlNet;
 
   53    m_serialNumberList = serialNumberList;
 
   57    m_subpixelRegisterButton = NULL;
 
   62    m_ptIdLabel = 
new QLabel(
"Point ID:");
 
   63    m_ptIdEdit = 
new QLineEdit;
 
   64    m_ptIdLabel->setBuddy(m_ptIdEdit);
 
   65    m_ptIdEdit->setText(defaultPointId);
 
   66    m_ptIdEdit->selectAll();
 
   67    connect(m_ptIdEdit, SIGNAL(textChanged(
const QString &)),
 
   70    QHBoxLayout *pointTypeLayout = 
new QHBoxLayout();
 
   73      for (
int i=0; i<ControlPoint::PointTypeCount; i++) {
 
   77      m_pointTypeCombo->setCurrentText(
"Free");
 
   78      QLabel *pointTypeLabel = 
new QLabel(
"Point Type:");
 
   79      pointTypeLayout->addWidget(pointTypeLabel);
 
   80      pointTypeLayout->addWidget(m_pointTypeCombo);
 
   81      connect(m_pointTypeCombo, SIGNAL(currentIndexChanged(QString)),
 
   82              this, SLOT(pointTypeChanged(QString)));
 
   85    QHBoxLayout *groundSourceLayout = NULL;
 
   86    QHBoxLayout *radiusSourceLayout = NULL;
 
   88      groundSourceLayout = 
new QHBoxLayout();
 
   90      QLabel *groundSourceLabel = 
new QLabel(
"Ground Source:");
 
   91      groundSourceLayout->addWidget(groundSourceLabel);
 
   92      groundSourceLayout->addWidget(m_groundSourceCombo);
 
   93      m_groundSourceCombo->setVisible(
false);
 
   95      radiusSourceLayout = 
new QHBoxLayout();
 
   97      QLabel *radiusSourceLabel = 
new QLabel(
"Radius Source:");
 
   98      radiusSourceLayout->addWidget(radiusSourceLabel);
 
   99      radiusSourceLayout->addWidget(m_radiusSourceCombo);
 
  100      m_radiusSourceCombo->setVisible(
false);
 
  103    if (subpixelRegisterMeasures) {
 
  104      m_subpixelRegisterButton = 
new QRadioButton(
"Subpixel Register Measures");
 
  105      m_subpixelRegisterButton->setChecked(
true);
 
  106      m_subpixelRegisterButton->setToolTip(
"Each measure will be subpixel registered to the reference" 
  107                                           " as it is created.");
 
  110    QLabel *listLabel = 
new QLabel(
"Select Files:");
 
  112    m_fileList = 
new QListWidget;
 
  113    m_fileList->setSelectionMode(QAbstractItemView::ExtendedSelection);
 
  116    m_okButton = 
new QPushButton(
"OK");
 
  122    QPushButton *cancelButton = 
new QPushButton(
"Cancel");
 
  123    QHBoxLayout *buttonLayout = 
new QHBoxLayout;
 
  124    buttonLayout->addWidget(m_okButton);
 
  125    buttonLayout->addWidget(cancelButton);
 
  127    connect(m_okButton, SIGNAL(clicked()), 
this, SLOT(accept()));
 
  128    connect(cancelButton, SIGNAL(clicked()), 
this, SLOT(reject()));
 
  130    QHBoxLayout *ptIdLayout = 
new QHBoxLayout;
 
  131    ptIdLayout->addWidget(m_ptIdLabel);
 
  132    ptIdLayout->addWidget(m_ptIdEdit);
 
  134    QVBoxLayout *vLayout = 
new QVBoxLayout;
 
  136    vLayout->addLayout(ptIdLayout);
 
  139      vLayout->addLayout(pointTypeLayout);
 
  143      vLayout->addLayout(groundSourceLayout);
 
  144      vLayout->addLayout(radiusSourceLayout);
 
  147    if (subpixelRegisterMeasures) {
 
  148      vLayout->addWidget(m_subpixelRegisterButton);
 
  151    vLayout->addWidget(listLabel);
 
  152    vLayout->addWidget(m_fileList);
 
  153    vLayout->addLayout(buttonLayout);
 
  156    setWindowTitle(
"Create New ControlPoint");
 
 
NewControlPointDialog(ControlNet *controlNet, SerialNumberList *serialNumberList, QString defaultPointId, QWidget *parent=0, bool pointType=false, bool groundSource=false, bool subpixelRegisterMeasures=false)
@description Create dialog for creating a new Control Point