Loading isis/src/control/objs/ControlMeasure/ControlMeasure.cpp +34 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include <QList> #include <QStringList> #include <QPoint> #include "Application.h" #include "Camera.h" Loading Loading @@ -148,6 +149,9 @@ namespace Isis { if (IsEditLocked()) return MeasureLocked; MeasureModified(); if (parentPoint) { parentPoint->emitMeasureModified(this, ControlMeasure::AprioriLineModified, p_aprioriLine, aprioriLine); } p_aprioriLine = aprioriLine; return Success; } Loading @@ -158,6 +162,9 @@ namespace Isis { if (IsEditLocked()) return MeasureLocked; MeasureModified(); if (parentPoint) { parentPoint->emitMeasureModified(this, ControlMeasure::AprioriSampleModified, p_aprioriSample, aprioriSample); } p_aprioriSample = aprioriSample; return Success; } Loading Loading @@ -245,8 +252,15 @@ namespace Isis { if (IsEditLocked()) return MeasureLocked; MeasureModified(); QPoint old(p_sample, p_line); QPoint newer(sample, line); if (parentPoint) { parentPoint->emitMeasureModified(this, ControlMeasure::CoordinatesModified, old, newer); } p_sample = sample; p_line = line; SetType(type); return Success; } Loading Loading @@ -288,6 +302,9 @@ namespace Isis { ControlMeasure::Status ControlMeasure::SetEditLock(bool editLock) { if (parentPoint) { parentPoint->emitMeasureModified(this, ControlMeasure::EditLockModified, p_editLock, editLock); } p_editLock = editLock; return Success; } Loading Loading @@ -360,6 +377,10 @@ namespace Isis { if (IsEditLocked()) return MeasureLocked; if (parentPoint) { parentPoint->emitMeasureModified(this, ControlMeasure::IgnoredModified, p_ignore, newIgnoreStatus); } bool oldStatus = p_ignore; p_ignore = newIgnoreStatus; Loading Loading @@ -403,6 +424,14 @@ namespace Isis { double lineResidual) { MeasureModified(); QPoint old(p_sampleResidual, p_lineResidual); QPoint newer(sampResidual, lineResidual); if (parentPoint) { parentPoint->emitMeasureModified(this, ControlMeasure::ResidualModified, old, newer); } p_sampleResidual = sampResidual; p_lineResidual = lineResidual; return Success; Loading @@ -423,6 +452,10 @@ namespace Isis { if (IsEditLocked()) return MeasureLocked; MeasureModified(); if (parentPoint) { parentPoint->emitMeasureModified(this, ControlMeasure::TypeModified, p_measureType, type); } p_measureType = type; return Success; } Loading isis/src/control/objs/ControlMeasure/ControlMeasure.h +11 −1 Original line number Diff line number Diff line Loading @@ -226,6 +226,16 @@ namespace Isis { MeasureLocked }; enum ModType { AprioriLineModified, AprioriSampleModified, CoordinatesModified, EditLockModified, IgnoredModified, ResidualModified, TypeModified }; enum DataField { AprioriLine = 1, AprioriSample = 2, Loading isis/src/control/objs/ControlNet/ControlNet.cpp +70 −46 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ #include <QScopedPointer> #include <QSet> #include <QTime> #include <QVariant> #include <QVector> #include <boost/numeric/ublas/symmetric.hpp> Loading Loading @@ -126,6 +127,23 @@ namespace Isis { nullify(); } void ControlNet::emitMeasureModified(ControlMeasure *measure, int type, QVariant oldValue, QVariant newValue) { std::cout << "Measure modified" << std::endl; std::cout << "Old value: " << oldValue.toString() << std::endl; std::cout << "New value: " << newValue.toString() << std::endl; emit measureModified(measure, type, oldValue, newValue); } void ControlNet::emitPointModified(ControlPoint *point, int type, QVariant oldValue, QVariant newValue) { std::cout << "Point modified" << std::endl; std::cout << point << std::endl; std::cout << "Old value: " << oldValue.toString() << std::endl; std::cout << "New value: " << newValue.toString() << std::endl; emit pointModified(point, type, oldValue, newValue); } /** * @brief Clear the contents of this object Loading Loading @@ -337,6 +355,7 @@ namespace Isis { pointAdded(point); emit networkStructureModified(); emit networkModified(ControlNet::PointAdded, 0, point->GetId()); } Loading Loading @@ -750,6 +769,8 @@ namespace Isis { if (!wasIgnored) emit networkStructureModified(); emit networkModified(ControlNet::PointDeleted, pointId, 0); return ControlPoint::Success; } Loading Loading @@ -1654,6 +1675,9 @@ namespace Isis { while (i2.hasNext()) { i2.next().value()->parentNetwork = &other; } emit networkModified(ControlNet::Swapped, other.GetNetworkId(), this->GetNetworkId()); } Loading isis/src/control/objs/ControlNet/ControlNet.h +21 −4 Original line number Diff line number Diff line Loading @@ -29,7 +29,10 @@ #include <QSharedPointer> #include <QString> #include <QMap> #include <QVariant> #include <QVector> #include <QVariant> // Boost includes #include <boost/graph/graph_traits.hpp> Loading Loading @@ -237,6 +240,14 @@ namespace Isis { friend class ControlMeasure; friend class ControlPoint; enum ModType { Cleared, PointAdded, PointDeleted, PointModified, Swapped }; public: QList< ControlCubeGraphNode * > GetCubeGraphNodes() { Loading Loading @@ -306,6 +317,7 @@ namespace Isis { QList< QString > GetPointIds() const; std::vector<Distance> GetTargetRadii(); void SetCreatedDate(const QString &date); void SetDescription(const QString &newDescription); void SetImages(const QString &imageListFile); Loading @@ -332,6 +344,9 @@ namespace Isis { signals: void networkStructureModified(); void pointModified(ControlPoint *point, int type, QVariant oldValue, QVariant newValue); void measureModified(ControlMeasure *measure, int type, QVariant oldValue, QVariant newValue); void networkModified(int type, QVariant oldValue, QVariant newValue); private: void nullify(); Loading @@ -343,6 +358,8 @@ namespace Isis { void measureUnIgnored(ControlMeasure *measure); void UpdatePointReference(ControlPoint *point, QString oldId); void emitNetworkStructureModified(); void emitMeasureModified(ControlMeasure *measure, int type, QVariant oldValue, QVariant newValue); void emitPointModified(ControlPoint *point, int type, QVariant oldValue, QVariant newValue); private: // graphing functions Loading isis/src/control/objs/ControlNetVitals/ControlNetVitals.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,11 @@ namespace Isis { ControlNetVitals::ControlNetVitals(ControlNet *cnet) { m_controlNet = cnet; connect(cnet, SIGNAL(networkStructureModified()), connect(cnet, SIGNAL(networkModified(int, QVariant, QVariant)), this, SLOT(validate())); connect(cnet, SIGNAL(pointModified(ControlPoint *, int, QVariant, QVariant)), this, SLOT(validate())); connect(cnet, SIGNAL(measureModified(ControlMeasure *, int, QVariant, QVariant)), this, SLOT(validate())); validate(); } Loading Loading @@ -221,6 +225,7 @@ namespace Isis { // } void ControlNetVitals::validate() { std::cout << "Vital update was called" << std::endl; QString status = ""; QString details = ""; if (hasIslands()) { Loading Loading @@ -255,6 +260,7 @@ namespace Isis { void ControlNetVitals::updateStatus(QString status, QString details) { m_status = status; m_statusDetails = details; std::cout << "Emitting a change" << std::endl; emit networkChanged(); } Loading Loading
isis/src/control/objs/ControlMeasure/ControlMeasure.cpp +34 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include <QList> #include <QStringList> #include <QPoint> #include "Application.h" #include "Camera.h" Loading Loading @@ -148,6 +149,9 @@ namespace Isis { if (IsEditLocked()) return MeasureLocked; MeasureModified(); if (parentPoint) { parentPoint->emitMeasureModified(this, ControlMeasure::AprioriLineModified, p_aprioriLine, aprioriLine); } p_aprioriLine = aprioriLine; return Success; } Loading @@ -158,6 +162,9 @@ namespace Isis { if (IsEditLocked()) return MeasureLocked; MeasureModified(); if (parentPoint) { parentPoint->emitMeasureModified(this, ControlMeasure::AprioriSampleModified, p_aprioriSample, aprioriSample); } p_aprioriSample = aprioriSample; return Success; } Loading Loading @@ -245,8 +252,15 @@ namespace Isis { if (IsEditLocked()) return MeasureLocked; MeasureModified(); QPoint old(p_sample, p_line); QPoint newer(sample, line); if (parentPoint) { parentPoint->emitMeasureModified(this, ControlMeasure::CoordinatesModified, old, newer); } p_sample = sample; p_line = line; SetType(type); return Success; } Loading Loading @@ -288,6 +302,9 @@ namespace Isis { ControlMeasure::Status ControlMeasure::SetEditLock(bool editLock) { if (parentPoint) { parentPoint->emitMeasureModified(this, ControlMeasure::EditLockModified, p_editLock, editLock); } p_editLock = editLock; return Success; } Loading Loading @@ -360,6 +377,10 @@ namespace Isis { if (IsEditLocked()) return MeasureLocked; if (parentPoint) { parentPoint->emitMeasureModified(this, ControlMeasure::IgnoredModified, p_ignore, newIgnoreStatus); } bool oldStatus = p_ignore; p_ignore = newIgnoreStatus; Loading Loading @@ -403,6 +424,14 @@ namespace Isis { double lineResidual) { MeasureModified(); QPoint old(p_sampleResidual, p_lineResidual); QPoint newer(sampResidual, lineResidual); if (parentPoint) { parentPoint->emitMeasureModified(this, ControlMeasure::ResidualModified, old, newer); } p_sampleResidual = sampResidual; p_lineResidual = lineResidual; return Success; Loading @@ -423,6 +452,10 @@ namespace Isis { if (IsEditLocked()) return MeasureLocked; MeasureModified(); if (parentPoint) { parentPoint->emitMeasureModified(this, ControlMeasure::TypeModified, p_measureType, type); } p_measureType = type; return Success; } Loading
isis/src/control/objs/ControlMeasure/ControlMeasure.h +11 −1 Original line number Diff line number Diff line Loading @@ -226,6 +226,16 @@ namespace Isis { MeasureLocked }; enum ModType { AprioriLineModified, AprioriSampleModified, CoordinatesModified, EditLockModified, IgnoredModified, ResidualModified, TypeModified }; enum DataField { AprioriLine = 1, AprioriSample = 2, Loading
isis/src/control/objs/ControlNet/ControlNet.cpp +70 −46 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ #include <QScopedPointer> #include <QSet> #include <QTime> #include <QVariant> #include <QVector> #include <boost/numeric/ublas/symmetric.hpp> Loading Loading @@ -126,6 +127,23 @@ namespace Isis { nullify(); } void ControlNet::emitMeasureModified(ControlMeasure *measure, int type, QVariant oldValue, QVariant newValue) { std::cout << "Measure modified" << std::endl; std::cout << "Old value: " << oldValue.toString() << std::endl; std::cout << "New value: " << newValue.toString() << std::endl; emit measureModified(measure, type, oldValue, newValue); } void ControlNet::emitPointModified(ControlPoint *point, int type, QVariant oldValue, QVariant newValue) { std::cout << "Point modified" << std::endl; std::cout << point << std::endl; std::cout << "Old value: " << oldValue.toString() << std::endl; std::cout << "New value: " << newValue.toString() << std::endl; emit pointModified(point, type, oldValue, newValue); } /** * @brief Clear the contents of this object Loading Loading @@ -337,6 +355,7 @@ namespace Isis { pointAdded(point); emit networkStructureModified(); emit networkModified(ControlNet::PointAdded, 0, point->GetId()); } Loading Loading @@ -750,6 +769,8 @@ namespace Isis { if (!wasIgnored) emit networkStructureModified(); emit networkModified(ControlNet::PointDeleted, pointId, 0); return ControlPoint::Success; } Loading Loading @@ -1654,6 +1675,9 @@ namespace Isis { while (i2.hasNext()) { i2.next().value()->parentNetwork = &other; } emit networkModified(ControlNet::Swapped, other.GetNetworkId(), this->GetNetworkId()); } Loading
isis/src/control/objs/ControlNet/ControlNet.h +21 −4 Original line number Diff line number Diff line Loading @@ -29,7 +29,10 @@ #include <QSharedPointer> #include <QString> #include <QMap> #include <QVariant> #include <QVector> #include <QVariant> // Boost includes #include <boost/graph/graph_traits.hpp> Loading Loading @@ -237,6 +240,14 @@ namespace Isis { friend class ControlMeasure; friend class ControlPoint; enum ModType { Cleared, PointAdded, PointDeleted, PointModified, Swapped }; public: QList< ControlCubeGraphNode * > GetCubeGraphNodes() { Loading Loading @@ -306,6 +317,7 @@ namespace Isis { QList< QString > GetPointIds() const; std::vector<Distance> GetTargetRadii(); void SetCreatedDate(const QString &date); void SetDescription(const QString &newDescription); void SetImages(const QString &imageListFile); Loading @@ -332,6 +344,9 @@ namespace Isis { signals: void networkStructureModified(); void pointModified(ControlPoint *point, int type, QVariant oldValue, QVariant newValue); void measureModified(ControlMeasure *measure, int type, QVariant oldValue, QVariant newValue); void networkModified(int type, QVariant oldValue, QVariant newValue); private: void nullify(); Loading @@ -343,6 +358,8 @@ namespace Isis { void measureUnIgnored(ControlMeasure *measure); void UpdatePointReference(ControlPoint *point, QString oldId); void emitNetworkStructureModified(); void emitMeasureModified(ControlMeasure *measure, int type, QVariant oldValue, QVariant newValue); void emitPointModified(ControlPoint *point, int type, QVariant oldValue, QVariant newValue); private: // graphing functions Loading
isis/src/control/objs/ControlNetVitals/ControlNetVitals.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,11 @@ namespace Isis { ControlNetVitals::ControlNetVitals(ControlNet *cnet) { m_controlNet = cnet; connect(cnet, SIGNAL(networkStructureModified()), connect(cnet, SIGNAL(networkModified(int, QVariant, QVariant)), this, SLOT(validate())); connect(cnet, SIGNAL(pointModified(ControlPoint *, int, QVariant, QVariant)), this, SLOT(validate())); connect(cnet, SIGNAL(measureModified(ControlMeasure *, int, QVariant, QVariant)), this, SLOT(validate())); validate(); } Loading Loading @@ -221,6 +225,7 @@ namespace Isis { // } void ControlNetVitals::validate() { std::cout << "Vital update was called" << std::endl; QString status = ""; QString details = ""; if (hasIslands()) { Loading Loading @@ -255,6 +260,7 @@ namespace Isis { void ControlNetVitals::updateStatus(QString status, QString details) { m_status = status; m_statusDetails = details; std::cout << "Emitting a change" << std::endl; emit networkChanged(); } Loading