Isis Developer Reference
EditTool.h
Go to the documentation of this file.
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
19class QToolButton;
20class QLine;
21class QLineEdit;
22class QComboBox;
23
24namespace Isis {
25 class Brick;
26 class Cube;
27 class MdiCubeViewport;
28
70 class EditTool : public Tool {
71 Q_OBJECT
72
73 public:
84
85
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);
130 QComboBox *p_shapeComboBox;
131 QComboBox *p_valTypeComboBox;
132 QLineEdit *p_dnLineEdit;
133 QToolButton *p_undoButton;
134 QToolButton *p_redoButton;
135 QToolButton *p_saveButton;
136 QToolButton *p_saveAsButton;
137QWidget *m_container;
138 double p_dn;
139
140 QMap <CubeViewport *, QStack <Brick *> *> p_undoEdit;
141 QMap <CubeViewport *, QStack <Brick *> *> p_redoEdit;
142 QMap <CubeViewport *, int> p_saveMarker;
143 };
144};
145
146#endif
Widget to display Isis cubes for qt apps.
Definition CubeViewport.h:122
Interactive image edit tool.
Definition EditTool.h:70
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
EditTool(QWidget *parent)
Constructs and EditTool object.
Definition EditTool.cpp:41
EditShape
Enum for possible shapes.
Definition EditTool.h:77
@ StartEndLine
start-end line
Definition EditTool.h:81
@ HorizLine
horizontal line
Definition EditTool.h:79
@ Rectangle
rectangle
Definition EditTool.h:82
@ VertLine
vertical line
Definition EditTool.h:80
@ Point
point
Definition EditTool.h:78
void save()
Emitted when cube should be saved.
ReplacementValue
Enum for DN values.
Definition EditTool.h:89
@ HrsComboValue
High representation saturation DN value.
Definition EditTool.h:92
@ UserDnComboValue
User Selected DN value.
Definition EditTool.h:90
@ HisComboValue
High instrument saturation DN value.
Definition EditTool.h:94
@ NullComboValue
Null DN value.
Definition EditTool.h:91
@ LrsComboValue
Low representation saturation DN value.
Definition EditTool.h:93
@ LisComboValue
Low instrument satruation DN value.
Definition EditTool.h:95
void rubberBandComplete()
This method is called any time the RubberBandTool is complete.
Definition EditTool.cpp:263
void cubeChanged(bool)
Emitted when cube changed.
QWidget * createToolBarWidget(QStackedWidget *active)
Creates the toolbar containing the edit tool widgets.
Definition EditTool.cpp:84
virtual void enableRubberBandTool()
This method sets up the RubberBandTool depending on which mode is enabled.
Definition EditTool.cpp:926
void addTo(Workspace *)
Adds the given workspace to the cubeviewport list.
Definition EditTool.cpp:45
QAction * toolPadAction(ToolPad *pad)
Adds the EditTool to the tool pad.
Definition EditTool.cpp:59
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
void saveAs()
Emitted when cube should be saved as another file.
Cube display widget for certain Isis MDI applications.
Definition MdiCubeViewport.h:39
Base class for the Qisis tools.
Definition Tool.h:67
Definition ToolPad.h:14
Definition Workspace.h:78
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16