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
20class QAction;
21class QMenu;
22class QModelIndex;
23class QToolBar;
24class QXmlStreamWriter;
25class QWidget;
26
27namespace 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);
131 void disableActions();
132
133 private:
135 void setWorkspaceActiveCube(Image *image);
136 void leaveEvent(QEvent *event);
137 void enableActions();
138
139 private:
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:
164 QMap<Cube *, ProjectItem *> m_cubeItemMap;
167
171
173
177 QList<QWidget *> m_childWidgets;
178 };
179}
180
181#endif
AbstractProjectItemView is a base class for views of a ProjectItemModel in Qt's model-view framework.
A single control point.
CubeDnView * m_cubeDnView
The view we are working with.
Definition CubeDnView.h:160
Project * m_project
The current project.
Definition CubeDnView.h:159
View that displays cubes in a QView-like way.
Definition CubeDnView.h:97
void onCubeViewportActivated(MdiCubeViewport *)
Slot to connect to the cubeViewportActivated signal from the Workspace.
void disableActions()
Disables toolbars and toolpad actions/widgets.
ProjectItemViewMenu * m_windowMenu
Window menu for storing actions.
Definition CubeDnView.h:170
ProjectItemViewMenu * m_viewMenu
View menu for storing actions.
Definition CubeDnView.h:168
void leaveEvent(QEvent *event)
Disables actions when the cursor leaves the view.
QMap< Cube *, ProjectItem * > m_cubeItemMap
Maps cubes to their items.
Definition CubeDnView.h:164
void onCurrentChanged(const QModelIndex &current)
Slot to connect to the currentChanged() signal from a selection model.
QToolBar * m_permToolBar
A tool bar for storing actions.
Definition CubeDnView.h:174
ProjectItemViewMenu * m_optionsMenu
Options menu for storing actions.
Definition CubeDnView.h:169
void addItem(ProjectItem *item)
Adds an item to the view.
Directory * m_directory
The directory.
Definition CubeDnView.h:166
Cube * workspaceActiveCube()
Returns the cube of the active viewport in the Workspace, or a null pointer if no viewports are activ...
ToolPad * m_toolPad
A tool bar for storing actions.
Definition CubeDnView.h:176
void enableActions()
Enables toolbars and toolpad actions/widgets.
void onItemAdded(ProjectItem *item)
Slot to connect to the itemAdded signal from a ProjectItemModel.
Workspace * m_workspace
The workspace.
Definition CubeDnView.h:165
QList< QWidget * > m_childWidgets
Child widgets of the active toolbar.
Definition CubeDnView.h:177
CubeDnView(Directory *directory, QWidget *parent=0)
Constructs the view, initializing the tools.
~CubeDnView()
Destructor.
QToolBar * m_activeToolBar
A tool bar for storing actions.
Definition CubeDnView.h:175
void onCubeViewportDeleted(QObject *obj)
Slot to connect to the destroyed signal from a viewport.
void onCubeViewportAdded(MdiCubeViewport *viewport)
Slot to connect to the viewportAdded signal from a Workspace.
void setWorkspaceActiveCube(Image *image)
Raises the subwindow corresponding with an image to the top.
QAction * m_separatorAction
A separator action that is reused.
Definition CubeDnView.h:172
void enableControlNetTool(bool value)
A slot function that is called when directory emits a signal that an active control network is set.
IO Handler for Isis Cubes.
Definition Cube.h:168
File name manipulation and expansion.
Definition FileName.h:100
This represents a cube in a project-based GUI interface.
Definition Image.h:107
Cube display widget for certain Isis MDI applications.
The main project for ipce.
Definition Project.h:289
Represents an item of a ProjectItemModel in Qt's model-view framework.
QMenu subclass that overrides the closeEvent.
XML Handler that parses XMLs in a stack-oriented way.
Manage a stack of content handlers for reading XML files.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16