File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
SensorGetInfoWorkOrder.cpp
Go to the documentation of this file.
1 
23 #include "SensorGetInfoWorkOrder.h"
24 
25 #include <QtDebug>
26 
27 #include <QFileDialog>
28 #include <QInputDialog>
29 
30 #include "Directory.h"
31 #include "IException.h"
32 #include "Project.h"
33 #include "GuiCamera.h"
34 #include "SensorInfoWidget.h"
35 
36 namespace Isis {
37 
44  WorkOrder(project) {
45  QAction::setText(tr("Get Info...") );
46  // Currently undo is not implemented.
47  m_isUndoable =false;
48  m_isSavedToHistory = false;
49  }
50 
51 
57  WorkOrder(other) {
58  }
59 
60 
65  }
66 
67 
73  return new SensorGetInfoWorkOrder(*this);
74  }
75 
76 
87  if (!guiCamera)
88  return false;
89 
90  // if we already have a view for this camera, don't redisplay
92  for (int i = 0; i < existingViews.size(); i++) {
93  if (existingViews.at(i)->objectName() == guiCamera->displayProperties()->displayName() )
94  return false;
95  }
96 
97  return true;
98  }
99 
100 
107  bool success = WorkOrder::setupExecution();
108 
109  if (success) {
110  QString sensorDisplayName = guiCamera()->displayProperties()->displayName();
111  QUndoCommand::setText(tr("Get %1 sensor info").arg(sensorDisplayName) );
112 
114  internalData.append(sensorDisplayName);
116  }
117 
118  return success;
119  }
120 
121 
128  // depend on types of ourselves.
129  return dynamic_cast<SensorGetInfoWorkOrder *>(other);
130  }
131 
132 
137 
138  SensorInfoWidget *sensorInfoWidget =
140 
141 
142  if (!sensorInfoWidget) {
143  QString msg = "error displaying sensor info";
144  throw IException(IException::Programmer, msg, _FILEINFO_);
145  }
146  }
147 
148 
153  //delete project()->directory()->cnetEditorViews().last();
154  }
155 }
Isis::Directory::addSensorInfoView
SensorInfoWidget * addSensorInfoView(GuiCameraQsp camera)
Add sensor data view widget to the window.
Definition: Directory.cpp:1004
Isis::WorkOrder::setupExecution
virtual bool setupExecution()
This sets up the state for the work order.
Definition: WorkOrder.cpp:1261
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::WorkOrder
Provide Undo/redo abilities, serialization, and history for an operation.
Definition: WorkOrder.h:311
Project.h
Isis::WorkOrder::m_isSavedToHistory
bool m_isSavedToHistory
Set the work order to be shown in the HistoryTreeWidget.
Definition: WorkOrder.h:537
Isis::WorkOrder::setInternalData
void setInternalData(QStringList data)
Sets the internal data for this WorkOrder.
Definition: WorkOrder.cpp:1318
Isis::SensorGetInfoWorkOrder::~SensorGetInfoWorkOrder
~SensorGetInfoWorkOrder()
The Destructor.
Definition: SensorGetInfoWorkOrder.cpp:64
Isis::SensorGetInfoWorkOrder::clone
virtual SensorGetInfoWorkOrder * clone() const
Returns a copy of the current instance of this WorkOrder.
Definition: SensorGetInfoWorkOrder.cpp:72
Isis::SensorGetInfoWorkOrder::undoExecution
void undoExecution()
Deletes the last view.
Definition: SensorGetInfoWorkOrder.cpp:152
QSharedPointer< GuiCamera >
QStringList
Isis::Project
The main project for ipce.
Definition: Project.h:289
Isis::Project::directory
Directory * directory() const
Returns the directory associated with this Project.
Definition: Project.cpp:1229
Isis::WorkOrder::m_isUndoable
bool m_isUndoable
Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to...
Definition: WorkOrder.h:523
SensorGetInfoWorkOrder.h
Isis::SensorGetInfoWorkOrder
This is a child of class WorkOrder which is used for anything that performs an action in a Project.
Definition: SensorGetInfoWorkOrder.h:46
Isis::WorkOrder::project
Project * project() const
Returns the Project this WorkOrder is attached to.
Definition: WorkOrder.cpp:1300
Isis::SensorGetInfoWorkOrder::dependsOn
bool dependsOn(WorkOrder *other) const
Determines whether a WorkOrder depends upon SensorGetInfoWorkerOrder.
Definition: SensorGetInfoWorkOrder.cpp:127
GuiCamera.h
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::SensorGetInfoWorkOrder::setupExecution
bool setupExecution()
Attempts to retrieve target body info from the camera and display it in a view.
Definition: SensorGetInfoWorkOrder.cpp:106
Isis::SensorInfoWidget
Widget for displaying information about a sensor.
Definition: SensorInfoWidget.h:30
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::WorkOrder::guiCamera
GuiCameraQsp guiCamera()
WorkOrder::guiCamera.
Definition: WorkOrder.cpp:756
Isis::Directory::sensorInfoViews
QList< SensorInfoWidget * > sensorInfoViews()
Accessor for the list of SensorInfoWidgets currently available.
Definition: Directory.cpp:1365
Isis::WorkOrder::internalData
QStringList internalData() const
Gets the internal data for this WorkOrder.
Definition: WorkOrder.cpp:1377
Isis::SensorGetInfoWorkOrder::isExecutable
virtual bool isExecutable(GuiCameraQsp camera)
Determine if we already have a view for this camera.
Definition: SensorGetInfoWorkOrder.cpp:86
Isis::SensorGetInfoWorkOrder::execute
void execute()
Redisplays the sensor view.
Definition: SensorGetInfoWorkOrder.cpp:136
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::SensorGetInfoWorkOrder::SensorGetInfoWorkOrder
SensorGetInfoWorkOrder(Project *project)
Creates a WorkOrder that will retrieve target body info.
Definition: SensorGetInfoWorkOrder.cpp:43

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:17:15