Isis 3 Programmer Reference
EditTool.h
Go to the documentation of this file.
1 #ifndef EditTool_h
2 #define EditTool_h
3 
26 #include "Tool.h"
27 
28 
29 #include <QMap>
30 #include <QStack>
31 
32 
33 class QToolButton;
34 class QLine;
35 class QLineEdit;
36 class QComboBox;
37 
38 namespace Isis {
39  class Brick;
40  class Cube;
41  class MdiCubeViewport;
42 
84  class EditTool : public Tool {
85  Q_OBJECT
86 
87  public:
91  enum EditShape {
97  };
98 
99 
110  };
111 
112  EditTool(QWidget *parent);
113 
114  void addTo(Workspace *);
115 
116  signals:
117  void cubeChanged(bool);
118  void save();
119  void saveAs();
120 
121  protected:
123  QWidget *createToolBarWidget(QStackedWidget *active);
124  void updateTool();
125 
126  protected slots:
127  void mouseButtonRelease(QPoint p, Qt::MouseButton m);
128  virtual void enableRubberBandTool();
129  void rubberBandComplete();
130 
131  private slots:
132  void listenToViewport(MdiCubeViewport *);
133  void selectValType(int index);
134  void changeDn();
135  void undoEdit();
136  void undoAll(CubeViewport *vp);
137  void redoEdit();
138  void save(CubeViewport *vp);
139  void removeViewport(QObject *vp);
140 
141  private:
142  QList<QPoint *> *LineToPoints(const QLine &line);
143  void writeToCube(int iesamp, int issamp, int ieline, int isline, QList<QPoint *> *linePts);
146  QLineEdit *p_dnLineEdit;
147  QToolButton *p_undoButton;
148  QToolButton *p_redoButton;
149  QToolButton *p_saveButton;
150  QToolButton *p_saveAsButton;
151 QWidget *m_container;
152  double p_dn;
153 
157  };
158 };
159 
160 #endif
QMap< CubeViewport *, int > p_saveMarker
Marker for last save.
Definition: EditTool.h:156
Cube display widget for certain Isis MDI applications.
void updateTool()
This is a virtual function belonging to the Tool class which is called when the user selects a differ...
Definition: EditTool.cpp:243
QToolButton * p_undoButton
Undo button.
Definition: EditTool.h:147
QComboBox * p_shapeComboBox
Shape combobox.
Definition: EditTool.h:144
horizontal line
Definition: EditTool.h:93
QWidget * createToolBarWidget(QStackedWidget *active)
Creates the toolbar containing the edit tool widgets.
Definition: EditTool.cpp:98
void redoEdit()
This method is called to redo any edit operations that have been undone.
Definition: EditTool.cpp:717
QMap< CubeViewport *, QStack< Brick * > * > p_undoEdit
Viewport to brick map for undo.
Definition: EditTool.h:154
High representation saturation DN value.
Definition: EditTool.h:106
void undoAll(CubeViewport *vp)
This method is used to discard any changes made to this viewport.
Definition: EditTool.cpp:658
QToolButton * p_redoButton
Redo button.
Definition: EditTool.h:148
User Selected DN value.
Definition: EditTool.h:104
void addTo(Workspace *)
Adds the given workspace to the cubeviewport list.
Definition: EditTool.cpp:59
QComboBox * p_valTypeComboBox
Value type combobox.
Definition: EditTool.h:145
Low representation saturation DN value.
Definition: EditTool.h:107
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:132
Low instrument satruation DN value.
Definition: EditTool.h:109
void selectValType(int index)
This is a private slot which is called when the user selects a new dn type.
Definition: EditTool.cpp:211
QToolButton * p_saveButton
Save button.
Definition: EditTool.h:149
EditShape
Enum for possible shapes.
Definition: EditTool.h:91
QList< QPoint * > * LineToPoints(const QLine &line)
Convert rubber band line to points.
Definition: EditTool.cpp:856
Interactive image edit tool.
Definition: EditTool.h:84
double p_dn
DN value.
Definition: EditTool.h:152
High instrument saturation DN value.
Definition: EditTool.h:108
void rubberBandComplete()
This method is called any time the RubberBandTool is complete.
Definition: EditTool.cpp:277
void undoEdit()
This is a private slot called when the user selects the undo button.
Definition: EditTool.cpp:582
QToolButton * p_saveAsButton
Save as button.
Definition: EditTool.h:150
EditTool(QWidget *parent)
Constructs and EditTool object.
Definition: EditTool.cpp:55
QLineEdit * p_dnLineEdit
DN edit line.
Definition: EditTool.h:146
void writeToCube(int iesamp, int issamp, int ieline, int isline, QList< QPoint *> *linePts)
Definition: EditTool.cpp:499
void removeViewport(QObject *vp)
This is a private slot called to clean up when a viewport is destroyed.
Definition: EditTool.cpp:820
QMap< CubeViewport *, QStack< Brick * > * > p_redoEdit
Viewport to brick map for redo.
Definition: EditTool.h:155
vertical line
Definition: EditTool.h:94
QAction * toolPadAction(ToolPad *pad)
Adds the EditTool to the tool pad.
Definition: EditTool.cpp:73
void cubeChanged(bool)
Emitted when cube changed.
ReplacementValue
Enum for DN values.
Definition: EditTool.h:103
void changeDn()
This is a private slot called when the user hits the enter key after typing a value in the dnLineEdit...
Definition: EditTool.cpp:231
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Base class for the Qisis tools.
Definition: Tool.h:81
void save()
Emitted when cube should be saved.
void saveAs()
Emitted when cube should be saved as another file.
virtual void enableRubberBandTool()
This method sets up the RubberBandTool depending on which mode is enabled.
Definition: EditTool.cpp:940
void mouseButtonRelease(QPoint p, Qt::MouseButton m)
This is a slot called when any mouse button is released inside of a viewport.
Definition: EditTool.cpp:411