Isis 3 Programmer Reference
MosaicControlNetTool.h
1 #ifndef MosaicControlNetTool_h
2 #define MosaicControlNetTool_h
3 
4 #include "MosaicTool.h"
5 
6 class QDialog;
7 class QLabel;
8 class QPushButton;
9 
10 namespace Isis {
11  class ControlNet;
12  class ControlNetGraphicsItem;
13  class ControlPoint;
14 // class ControlPointEdit;
15  class Image;
16  class ImageList;
17 
75  Q_OBJECT
76 
77  public:
95  };
97  static const int NUM_MOVEMENT_COLOR_SOURCE_VALUES = 4;
98 
101 
102  void addToMenu(QMenu *menu);
103 
104  PvlObject toPvl() const;
105  void fromPvl(const PvlObject &obj);
106  QString projectPvlObjectName() const;
107 
110 
111  int maxMovementColorMeasureCount() const;
112  double maxMovementColorResidualMagnitude() const;
113 
114  static QString toString(MovementColorSource);
116 
117  signals:
118  void modifyControlPoint(ControlPoint *controlPoint);
119  void deleteControlPoint(ControlPoint *controlPoint);
120  void createControlPoint(double latitude, double longitude);
121 
122  void controlPointSelected(ControlPoint *);
123  void deleteControlPoint(QString controlPointId);
124 
125  public slots:
126  void loadNetwork();
127  void rebuildPointGraphics();
128  void displayNewControlPoint(QString pointId);
129  void displayChangedControlPoint(QString pointId);
130  void displayUponControlPointDeletion();
131 
132  protected:
135  void mouseButtonRelease(QPointF, Qt::MouseButton s);
136 
137  private slots:
138  void configMovement();
139  void updateTool();
140  void openControlNet();
141  void displayControlNet();
142  void displayConnectivity();
143  void closeNetwork();
144  void randomizeColors();
145 
146  void objectDestroyed(QObject *);
147 
148  private:
149  void createDialog();
150 
151  Image *takeImage(QString sn, ImageList &images);
152 
153  QPushButton *m_loadControlNetButton;
154  QPushButton *m_displayControlNetButton;
155  QPushButton *m_displayConnectivity;
156  QPushButton *m_configMovement;
157  QPushButton *m_closeNetwork;
158  QPushButton *m_randomizeColors;
159  QAction *m_connectivity;
160  ControlNet *m_controlNet;
161  ControlNetGraphicsItem *m_controlNetGraphics;
162  QLabel *m_controlNetFileLabel;
163  QString m_controlNetFile;
164 // ControlPointEdit *m_pointEditor;
165 
172  };
173 };
174 
175 #endif
void closeNetwork()
Close the open network, if one is open.
//TODO: Remove debug printout & comment // 2016-08-25 Tracie Sucharski - Checking Directory pointer f...
void loadNetwork()
Load m_controlNetFile into memory - this will re-load the network if it's already open...
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:55
void updateTool()
This slot opens and reopens this tool properly.
MovementColorSource movementArrowColorSource() const
Get the current setting for the movement arrows.
This widget encompasses the entire mosaic scene.
double maxMovementColorResidualMagnitude() const
Get the current max.
void objectDestroyed(QObject *)
An object was destroyed, NULL it out.
Show movement arrows colored by measure count.
QAction * getPrimaryAction()
Adds the action to the toolpad.
Base class for the MosaicTools.
Definition: MosaicTool.h:37
double m_residualMagnitude
This is the residual magnitude at which we coloring the movement arrows.
MovementColorSource m_movementArrowColorSource
This defines the drawing mode of the apriori to adjusted arrows.
void rebuildPointGraphics()
Slot used to re-create the graphics items that depict the control points.
a control network
Definition: ControlNet.h:271
int maxMovementColorMeasureCount() const
Get the current measure count to become fully colored.
Show movement arrows colored by residual magnitude.
static QString toString(MovementColorSource)
Convert a MovementColorSource to a string for serialization purposes.
Control Network Display on Mosaic Scene.
A single control point.
Definition: ControlPoint.h:369
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
MosaicControlNetTool(MosaicSceneWidget *)
MosaicControlNetTool constructor.
static const int NUM_MOVEMENT_COLOR_SOURCE_VALUES
This is the count of possible values of MovementColorSource (useful for loops).
int m_measureCount
This is the measure count at which we start coloring the movement arrows.
void setMovementArrowColorSource(MovementColorSource, int, double)
Define how the movement arrows should be drawn.
void displayControlNet()
The user toggled the cnet visibility - re-sync the graphics item visibility with the action...
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Show black movement arrows.
void displayConnectivity()
Displays the connectivity of Control Points.
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
MovementColorSource
This enum defines how to draw the movement arrows (arrows from CP A Priori location to adjusted locat...
void configMovement()
Bring up a movement arrow configuration dialog.
QWidget * getToolBarWidget()
This method returns a widget that will be put in a tool bar when the tool is activated.
void openControlNet()
Loads a control net from a file.
static MovementColorSource fromMovementColorSourceString(QString)
Convert a string back to a MovementColorSource (for serialization purposes).