Isis 3.0 Programmer Reference
Back | Home
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 
80  class EditTool : public Tool {
81  Q_OBJECT
82 
83  public:
87  enum EditShape {
93  };
94 
95 
106  };
107 
108  EditTool(QWidget *parent);
109 
110  void addTo(Workspace *);
111 
112  signals:
113  void cubeChanged(bool);
114  void save();
115  void saveAs();
116 
117  protected:
119  QWidget *createToolBarWidget(QStackedWidget *active);
120  void updateTool();
121 
122  protected slots:
123  void mouseButtonRelease(QPoint p, Qt::MouseButton m);
124  virtual void enableRubberBandTool();
125  void rubberBandComplete();
126 
127  private slots:
128  void listenToViewport(MdiCubeViewport *);
129  void selectValType(int index);
130  void changeDn();
131  void undoEdit();
132  void undoAll(CubeViewport *vp);
133  void redoEdit();
134  void save(CubeViewport *vp);
135  void removeViewport(QObject *vp);
136 
137  private:
138  QList<QPoint *> *LineToPoints(const QLine &line);
139  void writeToCube(int iesamp, int issamp, int ieline, int isline, QList<QPoint *> *linePts);
142  QLineEdit *p_dnLineEdit;
143  QToolButton *p_undoButton;
144  QToolButton *p_redoButton;
145  QToolButton *p_saveButton;
146  QToolButton *p_saveAsButton;
147 QWidget *m_container;
148  double p_dn;
149 
153  };
154 };
155 
156 #endif
QMap< CubeViewport *, int > p_saveMarker
Marker for last save.
Definition: EditTool.h:152
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:143
QComboBox * p_shapeComboBox
Shape combobox.
Definition: EditTool.h:140
horizontal line
Definition: EditTool.h:89
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:705
void writeToCube(int iesamp, int issamp, int ieline, int isline, QList< QPoint * > *linePts)
Definition: EditTool.cpp:487
QMap< CubeViewport *, QStack< Brick * > * > p_undoEdit
Viewport to brick map for undo.
Definition: EditTool.h:150
High representation saturation DN value.
Definition: EditTool.h:102
void undoAll(CubeViewport *vp)
This method is used to discard any changes made to this viewport.
Definition: EditTool.cpp:646
QToolButton * p_redoButton
Redo button.
Definition: EditTool.h:144
User Selected DN value.
Definition: EditTool.h:100
void addTo(Workspace *)
Adds the given workspace to the cubeviewport list.
Definition: EditTool.cpp:59
QComboBox * p_valTypeComboBox
Value type combobox.
Definition: EditTool.h:141
Low representation saturation DN value.
Definition: EditTool.h:103
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:121
Low instrument satruation DN value.
Definition: EditTool.h:105
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:145
EditShape
Enum for possible shapes.
Definition: EditTool.h:87
QList< QPoint * > * LineToPoints(const QLine &line)
Convert rubber band line to points.
Definition: EditTool.cpp:844
Interactive image edit tool.
Definition: EditTool.h:80
double p_dn
DN value.
Definition: EditTool.h:148
High instrument saturation DN value.
Definition: EditTool.h:104
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:570
QToolButton * p_saveAsButton
Save as button.
Definition: EditTool.h:146
EditTool(QWidget *parent)
Constructs and EditTool object.
Definition: EditTool.cpp:55
QLineEdit * p_dnLineEdit
DN edit line.
Definition: EditTool.h:142
void removeViewport(QObject *vp)
This is a private slot called to clean up when a viewport is destroyed.
Definition: EditTool.cpp:808
QMap< CubeViewport *, QStack< Brick * > * > p_redoEdit
Viewport to brick map for redo.
Definition: EditTool.h:151
vertical line
Definition: EditTool.h:90
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:99
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
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:928
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:404

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 ISIS Support Center
File Modified: 07/12/2023 23:17:42