Isis 3 Programmer Reference
ControlPointEditView.cpp
1 
7 /* SPDX-License-Identifier: CC0-1.0 */
8 
9 #include "IsisDebug.h"
10 
11 #include "ControlPointEditView.h"
12 
13 #include <QAction>
14 #include <QList>
15 #include <QSize>
16 #include <QSizePolicy>
17 #include <QToolBar>
18 #include <QWidgetAction>
19 
20 #include "ControlNet.h"
21 #include "ControlPoint.h"
22 #include "ControlPointEditWidget.h"
23 #include "Directory.h"
24 #include "ToolPad.h"
25 
26 
27 namespace Isis {
32  AbstractProjectItemView(parent) {
33 
34  m_controlPointEditWidget = new ControlPointEditWidget(directory, parent);
35 
36  // TODO How are control nets and serial number lists going to be handled? I assume there can
37  // be several active control nets depending on the view, ie. jigsaw might operate on one
38  // net, while the editors might be using a different net. Will Directory keep track?
39  //
40 
41  setCentralWidget(m_controlPointEditWidget);
42 
43  // Store the buttons (actions) for easy enable/disable.
44  m_buttons = m_controlPointEditWidget->findChildren<QPushButton *>();
45 
46  // On default, actions are disabled until the cursor enters the view.
48  }
49 
50 
55  delete m_controlPointEditWidget;
56  }
57 
58 
66  return m_controlPointEditWidget;
67  }
68 
69 
74  foreach (QPushButton *button, m_buttons) {
75  button->setDisabled(true);
76  }
77  }
78 
79 
84  foreach (QPushButton *button, m_buttons) {
85  button->setEnabled(true);
86  }
87  }
88 }
QWidget
Isis::Directory
Definition: Directory.h:271
Isis::AbstractProjectItemView
AbstractProjectItemView is a base class for views of a ProjectItemModel in Qt's model-view framework.
Definition: AbstractProjectItemView.h:79
Isis::ControlPointEditView::ControlPointEditView
ControlPointEditView(Directory *directory, QWidget *parent=0)
Constructor.
Definition: ControlPointEditView.cpp:31
Isis::ControlPointEditView::controlPointEditWidget
ControlPointEditWidget * controlPointEditWidget()
Returns the ControlPointEditWidget.
Definition: ControlPointEditView.cpp:65
Isis::ControlPointEditView::enableActions
void enableActions()
Enables buttons/actions.
Definition: ControlPointEditView.cpp:83
Isis::ControlPointEditView::disableActions
void disableActions()
Disables buttons/actions.
Definition: ControlPointEditView.cpp:73
Isis::ControlPointEditView::~ControlPointEditView
~ControlPointEditView()
Destructor.
Definition: ControlPointEditView.cpp:54
Isis::ControlPointEditWidget
Gui for editing ControlPoints in ipce application.
Definition: ControlPointEditWidget.h:121
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16