Isis 3 Programmer Reference
EditTool.h
1 #ifndef EditTool_h
2 #define EditTool_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include "Tool.h"
13 
14 
15 #include <QMap>
16 #include <QStack>
17 
18 
19 class QToolButton;
20 class QLine;
21 class QLineEdit;
22 class QComboBox;
23 
24 namespace Isis {
25  class Brick;
26  class Cube;
27  class MdiCubeViewport;
28 
70  class EditTool : public Tool {
71  Q_OBJECT
72 
73  public:
77  enum EditShape {
82  Rectangle
83  };
84 
85 
96  };
97 
98  EditTool(QWidget *parent);
99 
100  void addTo(Workspace *);
101 
102  signals:
103  void cubeChanged(bool);
104  void save();
105  void saveAs();
106 
107  protected:
109  QWidget *createToolBarWidget(QStackedWidget *active);
110  void updateTool();
111 
112  protected slots:
113  void mouseButtonRelease(QPoint p, Qt::MouseButton m);
114  virtual void enableRubberBandTool();
115  void rubberBandComplete();
116 
117  private slots:
118  void listenToViewport(MdiCubeViewport *);
119  void selectValType(int index);
120  void changeDn();
121  void undoEdit();
122  void undoAll(CubeViewport *vp);
123  void redoEdit();
124  void save(CubeViewport *vp);
125  void removeViewport(QObject *vp);
126 
127  private:
128  QList<QPoint *> *LineToPoints(const QLine &line);
129  void writeToCube(int iesamp, int issamp, int ieline, int isline, QList<QPoint *> *linePts);
132  QLineEdit *p_dnLineEdit;
133  QToolButton *p_undoButton;
134  QToolButton *p_redoButton;
135  QToolButton *p_saveButton;
136  QToolButton *p_saveAsButton;
137 QWidget *m_container;
138  double p_dn;
139 
143  };
144 };
145 
146 #endif
Isis::EditTool::p_redoButton
QToolButton * p_redoButton
Redo button.
Definition: EditTool.h:134
Isis::EditTool::EditTool
EditTool(QWidget *parent)
Constructs and EditTool object.
Definition: EditTool.cpp:41
Isis::MdiCubeViewport
Cube display widget for certain Isis MDI applications.
Definition: MdiCubeViewport.h:39
QWidget
Isis::EditTool::NullComboValue
@ NullComboValue
Null DN value.
Definition: EditTool.h:91
Isis::EditTool::LineToPoints
QList< QPoint * > * LineToPoints(const QLine &line)
Convert rubber band line to points.
Definition: EditTool.cpp:842
Isis::EditTool::updateTool
void updateTool()
This is a virtual function belonging to the Tool class which is called when the user selects a differ...
Definition: EditTool.cpp:229
Isis::EditTool::removeViewport
void removeViewport(QObject *vp)
This is a private slot called to clean up when a viewport is destroyed.
Definition: EditTool.cpp:806
Isis::EditTool::undoAll
void undoAll(CubeViewport *vp)
This method is used to discard any changes made to this viewport.
Definition: EditTool.cpp:644
Isis::EditTool::p_shapeComboBox
QComboBox * p_shapeComboBox
Shape combobox.
Definition: EditTool.h:130
Isis::EditTool::EditShape
EditShape
Enum for possible shapes.
Definition: EditTool.h:77
Isis::EditTool::HrsComboValue
@ HrsComboValue
High representation saturation DN value.
Definition: EditTool.h:92
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::EditTool::UserDnComboValue
@ UserDnComboValue
User Selected DN value.
Definition: EditTool.h:90
Isis::Tool
Base class for the Qisis tools.
Definition: Tool.h:67
Isis::EditTool::ReplacementValue
ReplacementValue
Enum for DN values.
Definition: EditTool.h:89
Isis::EditTool::p_dn
double p_dn
DN value.
Definition: EditTool.h:138
Isis::EditTool::selectValType
void selectValType(int index)
This is a private slot which is called when the user selects a new dn type.
Definition: EditTool.cpp:197
Isis::EditTool::p_saveAsButton
QToolButton * p_saveAsButton
Save as button.
Definition: EditTool.h:136
Isis::EditTool::p_saveButton
QToolButton * p_saveButton
Save button.
Definition: EditTool.h:135
Isis::EditTool::LrsComboValue
@ LrsComboValue
Low representation saturation DN value.
Definition: EditTool.h:93
Isis::EditTool::HorizLine
@ HorizLine
horizontal line
Definition: EditTool.h:79
Isis::EditTool::rubberBandComplete
void rubberBandComplete()
This method is called any time the RubberBandTool is complete.
Definition: EditTool.cpp:263
Isis::EditTool::saveAs
void saveAs()
Emitted when cube should be saved as another file.
Isis::EditTool::enableRubberBandTool
virtual void enableRubberBandTool()
This method sets up the RubberBandTool depending on which mode is enabled.
Definition: EditTool.cpp:926
Isis::EditTool::undoEdit
void undoEdit()
This is a private slot called when the user selects the undo button.
Definition: EditTool.cpp:568
QComboBox
Isis::EditTool::LisComboValue
@ LisComboValue
Low instrument satruation DN value.
Definition: EditTool.h:95
Isis::EditTool::addTo
void addTo(Workspace *)
Adds the given workspace to the cubeviewport list.
Definition: EditTool.cpp:45
Isis::EditTool::createToolBarWidget
QWidget * createToolBarWidget(QStackedWidget *active)
Creates the toolbar containing the edit tool widgets.
Definition: EditTool.cpp:84
Isis::EditTool::Point
@ Point
point
Definition: EditTool.h:78
Isis::EditTool::p_redoEdit
QMap< CubeViewport *, QStack< Brick * > * > p_redoEdit
Viewport to brick map for redo.
Definition: EditTool.h:141
Isis::EditTool::HisComboValue
@ HisComboValue
High instrument saturation DN value.
Definition: EditTool.h:94
Isis::EditTool::p_valTypeComboBox
QComboBox * p_valTypeComboBox
Value type combobox.
Definition: EditTool.h:131
Isis::EditTool::VertLine
@ VertLine
vertical line
Definition: EditTool.h:80
Isis::EditTool::p_saveMarker
QMap< CubeViewport *, int > p_saveMarker
Marker for last save.
Definition: EditTool.h:142
Isis::EditTool::mouseButtonRelease
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:397
Isis::EditTool::Rectangle
@ Rectangle
rectangle
Definition: EditTool.h:82
Isis::CubeViewport
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:122
Isis::EditTool::save
void save()
Emitted when cube should be saved.
Isis::EditTool
Interactive image edit tool.
Definition: EditTool.h:70
Isis::EditTool::redoEdit
void redoEdit()
This method is called to redo any edit operations that have been undone.
Definition: EditTool.cpp:703
Isis::ToolPad
Definition: ToolPad.h:14
Isis::EditTool::changeDn
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:217
Isis::EditTool::p_undoEdit
QMap< CubeViewport *, QStack< Brick * > * > p_undoEdit
Viewport to brick map for undo.
Definition: EditTool.h:140
Isis::EditTool::toolPadAction
QAction * toolPadAction(ToolPad *pad)
Adds the EditTool to the tool pad.
Definition: EditTool.cpp:59
Isis::EditTool::p_dnLineEdit
QLineEdit * p_dnLineEdit
DN edit line.
Definition: EditTool.h:132
QMap
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:22
Isis::EditTool::p_undoButton
QToolButton * p_undoButton
Undo button.
Definition: EditTool.h:133
Isis::Workspace
Definition: Workspace.h:78
QObject
Isis::EditTool::StartEndLine
@ StartEndLine
start-end line
Definition: EditTool.h:81
QAction
Isis::EditTool::writeToCube
void writeToCube(int iesamp, int issamp, int ieline, int isline, QList< QPoint * > *linePts)
Definition: EditTool.cpp:485
Isis::EditTool::cubeChanged
void cubeChanged(bool)
Emitted when cube changed.
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16