Isis 3 Programmer Reference
CubeDnView.h
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 
16 #include "AbstractProjectItemView.h"
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);
117  void redrawMeasures();
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);
128  void onItemAdded(ProjectItem *item);
129  void onCubeViewportAdded(MdiCubeViewport *viewport);
130  void onCubeViewportDeleted(QObject *obj);
131  void disableActions();
132 
133  private:
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 
161  };
162 
163  private:
167 
171 
173 
178  };
179 }
180 
181 #endif
Isis::MdiCubeViewport
Cube display widget for certain Isis MDI applications.
Definition: MdiCubeViewport.h:39
QWidget
Isis::CubeDnView::workspaceActiveCube
Cube * workspaceActiveCube()
Returns the cube of the active viewport in the Workspace, or a null pointer if no viewports are activ...
Definition: CubeDnView.cpp:495
Isis::CubeDnView
View that displays cubes in a QView-like way.
Definition: CubeDnView.h:97
Isis::Directory
Definition: Directory.h:271
Isis::AbstractProjectItemView
AbstractProjectItemView is a base class for views of a ProjectItemModel in Qt's model-view framework.
Definition: AbstractProjectItemView.h:79
QList< QWidget * >
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::CubeDnView::enableActions
void enableActions()
Enables toolbars and toolpad actions/widgets.
Definition: CubeDnView.cpp:297
QMenu
Isis::CubeDnView::onCurrentChanged
void onCurrentChanged(const QModelIndex &current)
Slot to connect to the currentChanged() signal from a selection model.
Definition: CubeDnView.cpp:383
Isis::CubeDnView::CubeDnView
CubeDnView(Directory *directory, QWidget *parent=0)
Constructs the view, initializing the tools.
Definition: CubeDnView.cpp:81
Isis::CubeDnView::m_toolPad
ToolPad * m_toolPad
A tool bar for storing actions.
Definition: CubeDnView.h:176
Isis::CubeDnView::m_windowMenu
ProjectItemViewMenu * m_windowMenu
Window menu for storing actions.
Definition: CubeDnView.h:170
QToolBar
Isis::XmlStackedHandlerReader
Manage a stack of content handlers for reading XML files.
Definition: XmlStackedHandlerReader.h:30
Isis::CubeDnView::onCubeViewportActivated
void onCubeViewportActivated(MdiCubeViewport *)
Slot to connect to the cubeViewportActivated signal from the Workspace.
Definition: CubeDnView.cpp:406
Isis::Project
The main project for ipce.
Definition: Project.h:289
Isis::CubeDnView::onCubeViewportAdded
void onCubeViewportAdded(MdiCubeViewport *viewport)
Slot to connect to the viewportAdded signal from a Workspace.
Definition: CubeDnView.cpp:433
Isis::CubeDnView::m_permToolBar
QToolBar * m_permToolBar
A tool bar for storing actions.
Definition: CubeDnView.h:174
Isis::CubeDnView::onCubeViewportDeleted
void onCubeViewportDeleted(QObject *obj)
Slot to connect to the destroyed signal from a viewport.
Definition: CubeDnView.cpp:445
Isis::CubeDnView::m_separatorAction
QAction * m_separatorAction
A separator action that is reused.
Definition: CubeDnView.h:172
Isis::ControlPoint
A single control point.
Definition: ControlPoint.h:354
Isis::CubeDnView::m_activeToolBar
QToolBar * m_activeToolBar
A tool bar for storing actions.
Definition: CubeDnView.h:175
Isis::CubeDnView::leaveEvent
void leaveEvent(QEvent *event)
Disables actions when the cursor leaves the view.
Definition: CubeDnView.cpp:266
Isis::CubeDnView::m_optionsMenu
ProjectItemViewMenu * m_optionsMenu
Options menu for storing actions.
Definition: CubeDnView.h:169
Isis::CubeDnView::disableActions
void disableActions()
Disables toolbars and toolpad actions/widgets.
Definition: CubeDnView.cpp:283
Isis::CubeDnView::m_directory
Directory * m_directory
The directory.
Definition: CubeDnView.h:166
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::CubeDnView::setWorkspaceActiveCube
void setWorkspaceActiveCube(Image *image)
Raises the subwindow corresponding with an image to the top.
Definition: CubeDnView.cpp:509
Isis::Image
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
Isis::CubeDnView::onItemAdded
void onItemAdded(ProjectItem *item)
Slot to connect to the itemAdded signal from a ProjectItemModel.
Definition: CubeDnView.cpp:466
Isis::ToolPad
Definition: ToolPad.h:14
Isis::CubeDnView::m_viewMenu
ProjectItemViewMenu * m_viewMenu
View menu for storing actions.
Definition: CubeDnView.h:168
Isis::ProjectItemViewMenu
QMenu subclass that overrides the closeEvent.
Definition: ProjectItemViewMenu.h:26
Isis::XmlStackedHandler
XML Handler that parses XMLs in a stack-oriented way.
Definition: XmlStackedHandler.h:118
Isis::CubeDnView::m_workspace
Workspace * m_workspace
The workspace.
Definition: CubeDnView.h:165
QMap
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:22
Isis::CubeDnView::XmlHandler::m_cubeDnView
CubeDnView * m_cubeDnView
The view we are working with.
Definition: CubeDnView.h:160
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::Workspace
Definition: Workspace.h:78
QObject
QAction
Isis::CubeDnView::~CubeDnView
~CubeDnView()
Destructor.
Definition: CubeDnView.cpp:332
Isis::CubeDnView::XmlHandler
Definition: CubeDnView.h:146
Isis::CubeDnView::m_cubeItemMap
QMap< Cube *, ProjectItem * > m_cubeItemMap
Maps cubes to their items.
Definition: CubeDnView.h:164
Isis::CubeDnView::XmlHandler::m_project
Project * m_project
The current project.
Definition: CubeDnView.h:159
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::CubeDnView::m_childWidgets
QList< QWidget * > m_childWidgets
Child widgets of the active toolbar.
Definition: CubeDnView.h:177
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