Isis 3 Programmer Reference
ProfileDialog.cpp
1 #include "ProfileDialog.h"
2 
3 #include <QComboBox>
4 #include <QMenu>
5 #include <QMenuBar>
6 #include <QMessageBox>
7 #include <QStackedWidget>
8 
9 
10 ProfileDialog::ProfileDialog(QWidget *parent) : QDialog(parent) {
11 
12  setupUi(this);
13 
14  m_startCreated = false;
15  m_endCreated = false;
16 
17  connect(createStartButton, SIGNAL(clicked()),
18  this, SLOT(createStartSelected()));
19  connect(createEndButton, SIGNAL(clicked()),
20  this, SLOT(createEndSelected()));
21  connect(helpButton, SIGNAL(clicked()), this, SLOT(help()));
22 
23 }
24 
25 
26 
27 void ProfileDialog::createStartSelected() {
28  createStartButton->setEnabled(false);
29  m_startCreated = true;
30  if (m_startCreated && m_endCreated) {
31  profileButton->setEnabled(true);
32  }
33  emit createStart();
34 
35 }
36 
37 
38 
39 void ProfileDialog::createEndSelected() {
40  createEndButton->setEnabled(false);
41  m_endCreated = true;
42  if (m_startCreated && m_endCreated) {
43  profileButton->setEnabled(true);
44  }
45  emit createEnd();
46 
47 }
48 
49 
50 
51 void ProfileDialog::help() {
52  QString message = "You must create and refine the end points of the profile "
53  "line before the elevation profile can be calculated.\n\n A line is "
54  "computed between the end points on both the left and right cubes, then "
55  "sub-pixel registration is computed along these two lines to find the "
56  "same pixel on both cubes. The instument pointing at these pixels is then "
57  "used to compute the elevation.";
58  QMessageBox::information(this, "Elevation Profile", message);
59 
60 }
61