Isis Developer Reference
CubeDnView.h
Go to the documentation of this file.
1 #ifndef CubeDnView_h
2 #define CubeDnView_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include <QList>
13 #include <QMap>
14 #include <QWidgetAction>
15 
17 #include "FileName.h"
18 #include "XmlStackedHandler.h"
19 
20 class QAction;
21 class QMenu;
22 class QModelIndex;
23 class QToolBar;
24 class QXmlStreamWriter;
25 class QWidget;
26 
27 namespace Isis {
28 
29  class ControlPoint;
30  class Cube;
31  class Directory;
32  class Image;
33  class ImageList;
34  class MdiCubeViewport;
35  class Project;
36  class ToolPad;
37  class Workspace;
38  class XmlStackedHandlerReader;
39  class ProjectItemViewMenu;
40 
98 
99  Q_OBJECT
100 
101  public:
102  CubeDnView(Directory *directory, QWidget *parent=0);
103  ~CubeDnView();
104 
105  bool viewportContainsShape(MdiCubeViewport *viewport);
106 
107  void load(XmlStackedHandlerReader *xmlReader, Project *project);
108  void save(QXmlStreamWriter &stream, Project *project, FileName newProjectRoot) const;
109 
110  signals:
111  void modifyControlPoint(ControlPoint *controlPoint, QString serialNumber);
112  void deleteControlPoint(ControlPoint *controlPoint);
113  void createControlPoint(double latitude, double longitude, Cube *cube,
114  bool isGroundSource = false);
115 
116  void controlPointAdded(QString newPointId);
118 
119  public slots:
120  void addItem(ProjectItem *item);
121  void enableControlNetTool(bool value);
122 
123  private slots:
124  void createActions(Directory *directory);
125 
126  void onCurrentChanged(const QModelIndex &current);
127  void onCubeViewportActivated(MdiCubeViewport *);
128  void onItemAdded(ProjectItem *item);
129  void onCubeViewportAdded(MdiCubeViewport *viewport);
130  void onCubeViewportDeleted(QObject *obj);
131  void disableActions();
132 
133  private:
134  Cube *workspaceActiveCube();
135  void setWorkspaceActiveCube(Image *image);
136  void leaveEvent(QEvent *event);
137  void enableActions();
138 
139  private:
146  class XmlHandler : public XmlStackedHandler {
147  public:
148  XmlHandler(CubeDnView *cubeDnView, Project *project);
149  ~XmlHandler();
150 
151  virtual bool startElement(const QString &namespaceURI, const QString &localName,
152  const QString &qName, const QXmlAttributes &atts);
153  virtual bool endElement(const QString &namespaceURI, const QString &localName,
154  const QString &qName);
155 
156  private:
157  Q_DISABLE_COPY(XmlHandler);
158 
159  Project *m_project;
160  CubeDnView *m_cubeDnView;
161  };
162 
163  private:
164  QMap<Cube *, ProjectItem *> m_cubeItemMap;
165  Workspace *m_workspace;
166  Directory *m_directory;
167 
168  ProjectItemViewMenu *m_viewMenu;
169  ProjectItemViewMenu *m_optionsMenu;
170  ProjectItemViewMenu *m_windowMenu;
171 
172  QAction *m_separatorAction;
173 
174  QToolBar *m_permToolBar;
175  QToolBar *m_activeToolBar;
176  ToolPad *m_toolPad;
177  QList<QWidget *> m_childWidgets;
178  };
179 }
180 
181 #endif
Isis::ProjectItemModel
Provides access to data stored in a Project through Qt's model-view framework.
Definition: ProjectItemModel.h:132
Isis::SunShadowTool
Tool for measuring shadow heights.
Definition: SunShadowTool.h:39
AbstractProjectItemView.h
Isis::CubeDnView::redrawMeasures
void redrawMeasures()
ProjectItem.h
FileName.h
Isis::CubeDnView::deleteControlPoint
void deleteControlPoint(ControlPoint *controlPoint)
Isis::MdiCubeViewport
Cube display widget for certain Isis MDI applications.
Definition: MdiCubeViewport.h:39
QWidget
Cube.h
Isis::ToolList
Allows tools to share data between each other.
Definition: ToolList.h:32
MdiCubeViewport.h
Isis::CubeDnView
View that displays cubes in a QView-like way.
Definition: CubeDnView.h:97
Isis::Directory
Definition: Directory.h:271
HistogramTool.h
Isis::CubeDnView::load
void load(XmlStackedHandlerReader *xmlReader, Project *project)
Definition: CubeDnView.cpp:533
Isis::AbstractProjectItemView
AbstractProjectItemView is a base class for views of a ProjectItemModel in Qt's model-view framework.
Definition: AbstractProjectItemView.h:79
Isis::BandTool
Definition: BandTool.h:46
QList< QWidget * >
Isis::Tool::menuName
virtual QString menuName() const
Anytime a tool is created, you must give it a name for the menu.
Definition: Tool.h:83
Project.h
Isis::ProjectItem::image
Image * image() const
Returns the Image stored in the data of the item.
Definition: ProjectItem.cpp:476
Isis::MeasureTool
Tool for measuring distances.
Definition: MeasureTool.h:58
Isis::Tool
Base class for the Qisis tools.
Definition: Tool.h:67
Isis::CubeDnView::viewportContainsShape
bool viewportContainsShape(MdiCubeViewport *viewport)
Definition: CubeDnView.cpp:365
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::ToolList::append
void append(Tool *tool)
Definition: ToolList.cpp:21
Isis::CubeDnView::controlPointAdded
void controlPointAdded(QString newPointId)
Isis::XmlStackedHandlerReader::pushContentHandler
virtual void pushContentHandler(XmlStackedHandler *newHandler)
Push a contentHandler and maybe continue parsing...
Definition: XmlStackedHandlerReader.cpp:55
QMenu
Directory.h
Isis::ProjectItemProxyModel
Allows access to items in a ProjectItemModel through a proxy model.
Definition: ProjectItemProxyModel.h:70
Isis::ProjectItem::shape
Shape * shape() const
Returns the Shape stored in the data of the item.
Definition: ProjectItem.cpp:496
Isis::ProjectItemProxyModel::sourceModel
ProjectItemModel * sourceModel()
Returns the source model.
Definition: ProjectItemProxyModel.cpp:266
Isis::CubeDnView::CubeDnView
CubeDnView(Directory *directory, QWidget *parent=0)
Constructs the view, initializing the tools.
Definition: CubeDnView.cpp:81
FileTool.h
Isis::WindowTool
Definition: WindowTool.h:25
FindTool.h
Isis::ProjectItemModel::selectionModel
QItemSelectionModel * selectionModel()
Returns the internal selection model.
Definition: ProjectItemModel.cpp:93
Isis::Workspace::addCubeViewport
void addCubeViewport(QString cubename)
Method adds the name of a cube into Workspace as a CubeViewport.
Definition: Workspace.cpp:339
ScatterPlotTool.h
Isis::CubeDnView::save
void save(QXmlStreamWriter &stream, Project *project, FileName newProjectRoot) const
Definition: CubeDnView.cpp:538
Isis::XmlStackedHandler::startElement
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
Definition: XmlStackedHandler.cpp:44
Isis::Project::activeControl
Control * activeControl()
Return the Active Control (control network)
Definition: Project.cpp:1903
Isis::Tool::addToPermanent
virtual void addToPermanent(QToolBar *toolbar)
Definition: Tool.h:97
Isis::ControlNetTool::setControlNet
void setControlNet(ControlNet *controlNet)
Set the active control net to be used for editing.
Definition: ControlNetTool.cpp:113
Isis::StatisticsTool
Definition: StatisticsTool.h:121
Isis::Directory::project
Project * project() const
Gets the Project for this directory.
Definition: Directory.cpp:1311
Image.h
ToolPad.h
Isis::Shape::cube
Cube * cube()
Get the Cube * associated with this display property.
Definition: Shape.cpp:324
EditTool.h
Isis::ProjectItemModel::itemFromIndex
ProjectItem * itemFromIndex(const QModelIndex &index)
Returns the ProjectItem corresponding to a given QModelIndex.
Definition: ProjectItemModel.cpp:401
Isis::ProjectItem::isShape
bool isShape() const
Returns true if an Shape is stored in the data of the item.
Definition: ProjectItem.cpp:668
QToolBar
Isis::XmlStackedHandlerReader
Manage a stack of content handlers for reading XML files.
Definition: XmlStackedHandlerReader.h:30
Isis::Workspace::cubeToMdiWidget
QWidget * cubeToMdiWidget(Cube *cube)
Converts a cube to an MdiWidget.
Definition: Workspace.cpp:280
IString.h
Shape.h
Isis::AbstractProjectItemView::addItem
virtual void addItem(ProjectItem *item)
Adds an item to the view.
Definition: AbstractProjectItemView.cpp:250
WindowTool.h
Isis::Project
The main project for ipce.
Definition: Project.h:289
ViewportMdiSubWindow.h
BandTool.h
ProjectItemProxyModel.h
Isis::ProjectItem::isImageList
bool isImageList() const
Returns true if an ImageList is stored in the data of the item.
Definition: ProjectItem.cpp:657
Isis::ControlPoint
A single control point.
Definition: ControlPoint.h:354
Isis::Shape::id
QString id() const
Get a unique, identifying string associated with this shape.
Definition: Shape.cpp:459
Isis::PanTool
Definition: PanTool.h:18
Isis::Control::controlNet
ControlNet * controlNet()
Open and return a pointer to the ControlNet for this Control.
Definition: Control.cpp:150
Isis::Workspace::mdiArea
QMdiArea * mdiArea()
This method returns the QMdiArea.
Definition: Workspace.cpp:295
Isis::ProjectItem::isShapeList
bool isShapeList() const
Returns true if an ShapeList is stored in the data of the item.
Definition: ProjectItem.cpp:679
AdvancedTrackTool.h
Isis::ProjectItem::isImage
bool isImage() const
Returns true if an Image is stored in the data of the item.
Definition: ProjectItem.cpp:646
Isis::SpatialPlotTool
Spatial Plots.
Definition: SpatialPlotTool.h:62
MeasureTool.h
CubeDnView.h
Isis::AbstractProjectItemView::internalModel
virtual ProjectItemModel * internalModel()
Returns the internal model of the view.
Definition: AbstractProjectItemView.cpp:108
Isis::SpectralPlotTool
Plot cube DN statistics against the cube band numbers.
Definition: SpectralPlotTool.h:57
Isis::ControlNetTool::loadNetwork
void loadNetwork()
Definition: ControlNetTool.cpp:123
FeatureNomenclatureTool.h
Isis::ViewportMdiSubWindow
This is an actual viewport window in qview/qnet/etc.
Definition: ViewportMdiSubWindow.h:25
Isis::Image::cube
Cube * cube()
Get the Cube pointer associated with this display property.
Definition: Image.cpp:287
Isis::FeatureNomenclatureTool
Display nomenclature on MDI Cube Viewports.
Definition: FeatureNomenclatureTool.h:56
Isis::Tool::addTo
void addTo(ViewportMainWindow *mw)
Adds the tool to the application.
Definition: Tool.cpp:78
Isis::Shape
This represents a shape in a project-based GUI interface.
Definition: Shape.h:68
Workspace.h
Isis::CubeDnView::createControlPoint
void createControlPoint(double latitude, double longitude, Cube *cube, bool isGroundSource=false)
StatisticsTool.h
Isis::ToolList::count
int count() const
Definition: ToolList.cpp:36
ProjectItemModel.h
ImageList.h
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::XmlStackedHandler::endElement
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
Definition: XmlStackedHandler.cpp:55
Isis::Image
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
Isis::ProjectItemModel::findItemData
ProjectItem * findItemData(const QVariant &data, int role=Qt::UserRole+1)
Returns the first item found that contains the given data in the given role or a null pointer if no i...
Definition: ProjectItemModel.cpp:290
Isis::ZoomTool
Handles zoom operations for Isis qt apps.
Definition: ZoomTool.h:56
Isis::ControlNetTool
ControlNetTool Handles mouse events on CubeDnViews for control point editing for the ipce app.
Definition: ControlNetTool.h:72
Isis::EditTool
Interactive image edit tool.
Definition: EditTool.h:70
Isis::FindTool
Tool to locate a point on a cube that is projected and/or has a camera model.
Definition: FindTool.h:115
Isis::ToolPad
Definition: ToolPad.h:14
Isis::SpecialPixelTool
Sets the colors for the special pixel values.
Definition: SpecialPixelTool.h:35
Isis::ViewportMdiSubWindow::viewport
MdiCubeViewport * viewport()
Grabs the viewport.
Definition: ViewportMdiSubWindow.cpp:45
MatchTool.h
Isis::ProjectItemProxyModel::addItem
ProjectItem * addItem(ProjectItem *sourceItem)
Adds an item and its children to the proxy model.
Definition: ProjectItemProxyModel.cpp:167
Isis::ProjectItemViewMenu
QMenu subclass that overrides the closeEvent.
Definition: ProjectItemViewMenu.h:26
Isis::Tool::activate
void activate(bool)
Activates the tool.
Definition: Tool.cpp:131
Isis::RubberBandTool
Rubber banding tool.
Definition: RubberBandTool.h:50
Isis::StretchTool
Stretch image edit tool.
Definition: StretchTool.h:85
Isis::Image::id
QString id() const
Get a unique, identifying string associated with this image.
Definition: Image.cpp:445
Isis::ScatterPlotTool
Scatter Plot Tool.
Definition: ScatterPlotTool.h:27
Isis::XmlStackedHandler
XML Handler that parses XMLs in a stack-oriented way.
Definition: XmlStackedHandler.h:118
Isis::Workspace::cubeViewportList
QVector< MdiCubeViewport * > * cubeViewportList()
This method returns a Vector of MdiCubeViewports.
Definition: Workspace.cpp:238
RubberBandTool.h
Isis::HistogramTool
Tool for histograms.
Definition: HistogramTool.h:40
QMap
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:22
Isis::CubeDnView::modifyControlPoint
void modifyControlPoint(ControlPoint *controlPoint, QString serialNumber)
Isis::Tool::addToActive
void addToActive(QToolBar *toolbar)
Definition: Tool.cpp:112
SpecialPixelTool.h
StretchTool.h
Isis::CubeDnView::enableControlNetTool
void enableControlNetTool(bool value)
A slot function that is called when directory emits a signal that an active control network is set.
Definition: CubeDnView.cpp:317
Isis::AdvancedTrackTool
Tool to display info for a point on a cube.
Definition: AdvancedTrackTool.h:91
Isis::Workspace
Definition: Workspace.h:78
QMdiSubWindow
SpectralPlotTool.h
QObject
PanTool.h
ControlNetTool.h
SpatialPlotTool.h
QAction
TrackTool.h
Isis::CubeViewport::cube
Cube * cube() const
Definition: CubeViewport.h:338
XmlStackedHandlerReader.h
Isis::StereoTool
Tool for computing parallax.
Definition: StereoTool.h:59
XmlStackedHandler.h
Isis::CubeDnView::~CubeDnView
~CubeDnView()
Destructor.
Definition: CubeDnView.cpp:332
Isis::TrackTool
This tool is part of the Qisis namespace and displays the statusbar of the window.
Definition: TrackTool.h:42
ZoomTool.h
CubeAttribute.h
SunShadowTool.h
StereoTool.h
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
ToolList.h
ProjectItemViewMenu.h
Isis::ProjectItem
Represents an item of a ProjectItemModel in Qt's model-view framework.
Definition: ProjectItem.h:134
Isis::CubeDnView::addItem
void addItem(ProjectItem *item)
Adds an item to the view.
Definition: CubeDnView.cpp:356