Isis 3 Programmer Reference
NewGroundSourceLocationDialog.cpp
1 
7 /* SPDX-License-Identifier: CC0-1.0 */
8 
9 #include "NewGroundSourceLocationDialog.h"
10 
11 #include <iostream>
12 
13 #include <QButtonGroup>
14 #include <QLayout>
15 #include <QPushButton>
16 
17 using namespace std;
18 
19 namespace Isis {
20 
29  NewGroundSourceLocationDialog::NewGroundSourceLocationDialog(QString title, QString &directory,
30  QWidget *parent) :
31  QFileDialog(parent, title, directory) {
32 
33  setFileMode(QFileDialog::Directory);
34 // setOptions(QFileDialog::ShowDirsOnly);
35 // // This returns a list of all the buttons in QFileDialog
36 // QList<QPushButton *> allButtons = this->findChildren<QPushButton *>();
37 // // Edit the first (Open) button title.
38 // allButtons[0]->setText("&Save");
39 //
40 // /// Edit the second (Cancel) button title.
41 // allButtons[1]->setText("Cancel");
42 
43  QVBoxLayout *vertBoxLayout = new QVBoxLayout;
44 // hBoxLayout->setAlignment(Qt::AlignLeft);
45 // hBoxLayout->setSpacing(25);
46 // hBoxLayout->setContentsMargins (25, 11, 25, 11 );
47 
48  // Button Group
49 // QButtonGroup *optionsButtonGroup = new QButtonGroup();
50 
51  m_changeAllGround = new QCheckBox("Change location of all subsequent ground points loaded",
52  this);
53 // m_changeAllGround->setWhatsThis("Save the Image As Viewed with Full Resoultion");
54 
55  m_changeControlNet = new QCheckBox("Change location of ground source in control net."
56  " Note: If above box is checked, all locations will"
57  " be changed.", this);
58 
59 // optionsButtonGroup->addButton(m_changeAllGround);
60 // optionsButtonGroup->addButton(m_changeControlNet);
61 
62  vertBoxLayout->addWidget(m_changeAllGround);
63  vertBoxLayout->addWidget(m_changeControlNet);
64 
65  // Get parent's layout (FileDialog), then add new buttons
66  QLayout *dialogLayout = layout();
67  dialogLayout->addItem(vertBoxLayout);
68 // setLayout(dialogLayout);
69  }
70 
71 
77 
78  return m_changeAllGround->isChecked();
79  }
80 
81 
87 
88  return m_changeControlNet->isChecked();
89  }
90 }
QWidget
QFileDialog
Isis::NewGroundSourceLocationDialog::m_changeControlNet
QPointer< QCheckBox > m_changeControlNet
Change location of ground source in the control network.
Definition: NewGroundSourceLocationDialog.h:45
Isis::NewGroundSourceLocationDialog::m_changeAllGround
QPointer< QCheckBox > m_changeAllGround
Change location of all subsequent ground control points.
Definition: NewGroundSourceLocationDialog.h:44
Isis::NewGroundSourceLocationDialog::changeControlNet
bool changeControlNet()
Indicates whether the control network should be changed to reflect new ground source location.
Definition: NewGroundSourceLocationDialog.cpp:86
std
Namespace for the standard library.
Isis::NewGroundSourceLocationDialog::changeAllGroundSourceLocation
bool changeAllGroundSourceLocation()
Indicates whether all subsequent ground source files should be found in new source directory.
Definition: NewGroundSourceLocationDialog.cpp:76
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16