Isis 3 Programmer Reference
GuiCamera.cpp
1#include "GuiCamera.h"
2
3#include <QDataStream>
4#include <QDebug>
5#include <QList>
6#include <QUuid>
7#include <QXmlStreamWriter>
8
9#include "Camera.h"
11#include "IString.h"
12#include "Project.h"
13#include "PvlKeyword.h"
14#include "PvlObject.h"
15
16namespace Isis {
17
18
24 GuiCamera::GuiCamera(Camera *camera, QObject *parent) : QObject(parent) {
25 m_id = NULL;
26
27// m_camera = camera;
28
29 // TODO - initialize GuiCamera members from target
30// *m_bodyCode = target->naifBodyCode();
31// m_radii[0] = target->radii().at(0);
32// m_radii[1] = target->radii().at(1);
33// m_radii[2] = target->radii().at(2);
34
35 m_instrumentId = camera->instrumentId();
36
41
42 QString displayStr = m_spacecraftNameShort + "/" + m_instrumentNameShort;
43
44 m_displayProperties = new GuiCameraDisplayProperties(displayStr, this);
45
46 m_id = new QUuid(QUuid::createUuid());
47 }
48
49
50
51// GuiCamera::GuiCamera(const GuiCamera &src)
52// : m_id(new QUuid(src.m_id->toString())) {
53//
54// m_bodyCode = new SpiceInt(*src.m_bodyCode);
55//
56// m_radii.resize(3, Distance());
57// m_sigmaRadii.resize(3, Distance(3.0, Distance::Kilometers));
58// TODO - radii sigma fudged for now
59//
60// for (int i = 0; i < 3; i++) {
61// m_radii[i] = src.m_radii[i];
62// m_sigmaRadii[i] = src.m_sigmaRadii[i];
63// }
64//
65// m_displayProperties
66// = new GuiCameraDisplayProperties(*src.m_displayProperties);
67//
68// int fred=1;
69// m_bodyCode = src.m_bodyCode;
70// }
71
72
73
79 delete m_id;
80 m_id = NULL;
81 }
82
83
84// GuiCamera &GuiCamera::operator=(const GuiCamera &src) {
85// if (&src != this) {
86// delete m_id;
87// m_id = NULL;
88// m_id = new QUuid(src.m_id->toString());
89// }
90// return *this;
91// }
92// Camera *GuiCamera::camera() {
93// return m_camera;
94// }
95
96
102 bool GuiCamera::operator== (const GuiCamera &srcGuiCamera) const {
103
104 if (m_displayProperties->displayName() != srcGuiCamera.displayProperties()->displayName())
105 return false;
106
107 return true;
108 }
109
110
111
112 /*
113 GuiCameraDisplayProperties *GuiCamera::displayProperties() {
114 return m_displayProperties;
115 }
116 */
117
125
126
131 QString GuiCamera::id() const {
132 return m_id->toString().remove(QRegExp("[{}]"));
133 }
134
135
141 return m_instrumentId;
142 }
143
144
152
153
161
162
170
171
179
180
181
182}
QString spacecraftNameLong() const
This method returns the full spacecraft name.
Definition Camera.cpp:2936
QString instrumentNameLong() const
This method returns the full instrument name.
Definition Camera.cpp:2916
QString instrumentNameShort() const
This method returns the shortened instrument name.
Definition Camera.cpp:2926
QString instrumentId()
This method returns the InstrumentId as it appears in the cube.
Definition Camera.cpp:2906
QString spacecraftNameShort() const
This method returns the shortened spacecraft name.
Definition Camera.cpp:2946
QString displayName() const
Returns the display name.
The GUI communication mechanism for target body objects.
Container class for GuiCamera.
Definition GuiCamera.h:70
QString instrumentNameLong()
Retrieves a long version for the name of the instrument.
QString spacecraftNameLong()
Retrieves the full name of the spacecraft.
QString m_instrumentNameShort
The abbreviated instrument name.
Definition GuiCamera.h:144
GuiCameraDisplayProperties * m_displayProperties
Camera.
Definition GuiCamera.h:136
QString spacecraftNameShort()
Retrieves an abbbreviated name for the spacecraft.
QString m_instrumentNameLong
The full instrument name.
Definition GuiCamera.h:146
QString m_spacecraftNameLong
The full spacecraft name.
Definition GuiCamera.h:142
~GuiCamera()
The Destructor.
Definition GuiCamera.cpp:78
QUuid * m_id
A unique ID for this GuiCamera object (useful for others to reference this object when saving to disk...
Definition GuiCamera.h:121
QString id() const
Retrieves a unique, identifying string associated with this GuiCamera object.
GuiCamera(Camera *camera, QObject *parent=0)
The constructor for this class.
Definition GuiCamera.cpp:24
bool operator==(const GuiCamera &srcGuiCamera) const
Compares two Target Body objects to see if they are equal.
const GuiCameraDisplayProperties * displayProperties() const
Retrieves the display properties of the camera.
QString m_instrumentId
The InstrumentId as it appears on the cube.
Definition GuiCamera.h:138
QString m_spacecraftNameShort
An abbreviated name for the spacecraft.
Definition GuiCamera.h:140
QString instrumentNameShort()
Retrieves an abbreviated version for the name of the instrument.
QString instrumentId()
Retrieve the InstrumentId as appears in the original cube label.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16