37 m_minlat =
new QLineEdit;
38 m_maxlat =
new QLineEdit;
39 m_minlon =
new QLineEdit;
40 m_maxlon =
new QLineEdit;
49 QLabel *minlatLabel =
new QLabel(
"Minimum Latitude");
50 QLabel *maxlatLabel =
new QLabel(
"Maximum Latitude");
51 QLabel *minlonLabel =
new QLabel(
"Minimum Longitude");
52 QLabel *maxlonLabel =
new QLabel(
"Maximum Longitude");
53 QLabel *pad =
new QLabel();
56 QGridLayout *gridLayout =
new QGridLayout();
57 gridLayout->addWidget(minlatLabel, 0, 0, 1, 1);
58 gridLayout->addWidget(m_minlat, 0, 1, 1, 1);
59 gridLayout->addWidget(maxlatLabel, 1, 0, 1, 1);
60 gridLayout->addWidget(m_maxlat, 1, 1, 1, 1);
61 gridLayout->addWidget(minlonLabel, 2, 0, 1, 1);
62 gridLayout->addWidget(m_minlon, 2, 1, 1, 1);
63 gridLayout->addWidget(maxlonLabel, 3, 0, 1, 1);
64 gridLayout->addWidget(m_maxlon, 3, 1, 1, 1);
65 gridLayout->addWidget(pad, 4, 0);
66 gridLayout->setRowStretch(4, 50);
67 this->setLayout(gridLayout);
86 if (controlNet() == NULL) {
87 QMessageBox::information((
QWidget *)parent(),
88 "Error",
"No points to filter");
93 if ((m_minlat->text() ==
"") || (m_maxlat->text() ==
"") ||
94 (m_minlon->text() ==
"") || (m_maxlon->text() ==
"")) {
95 QMessageBox::information((
QWidget *)parent(),
96 "Error",
"All lat/lon range values must be entered");
101 double minlat = m_minlat->text().toDouble();
102 double maxlat = m_maxlat->text().toDouble();
103 double minlon = m_minlon->text().toDouble();
104 double maxlon = m_maxlon->text().toDouble();
107 if (minlat > maxlat) {
108 QString msg =
"The minimum latitude value must be less than the maximum latitude value";
109 QMessageBox::information((
QWidget *)parent(),
"Error", msg);
113 else if (minlon > maxlon) {
114 QString msg =
"The minimum longitude value must be less than the maximum longitude value";
115 QMessageBox::information((
QWidget *)parent(),
"Error", msg);
122 for (
int i = filteredPoints().size() - 1; i >= 0; i--) {
124 ControlPoint &cp = *(*controlNet())[filteredPoints()[i]];
126 Latitude lat = cp.GetBestSurfacePoint().GetLatitude();
127 Longitude lon = cp.GetBestSurfacePoint().GetLongitude();
133 filteredPoints().removeAt(i);
140 emit filteredListModified();