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
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
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
AbstractProjectItemView is a base class for views of a ProjectItemModel in Qt's model-view framework.
Definition AbstractProjectItemView.h:79
A single control point.
Definition ControlPoint.h:356
View that displays cubes in a QView-like way.
Definition CubeDnView.h:97
bool viewportContainsShape(MdiCubeViewport *viewport)
Definition CubeDnView.cpp:365
void load(XmlStackedHandlerReader *xmlReader, Project *project)
Definition CubeDnView.cpp:533
void controlPointAdded(QString newPointId)
void createControlPoint(double latitude, double longitude, Cube *cube, bool isGroundSource=false)
void save(QXmlStreamWriter &stream, Project *project, FileName newProjectRoot) const
Definition CubeDnView.cpp:538
void deleteControlPoint(ControlPoint *controlPoint)
void addItem(ProjectItem *item)
Adds an item to the view.
Definition CubeDnView.cpp:356
CubeDnView(Directory *directory, QWidget *parent=0)
Constructs the view, initializing the tools.
Definition CubeDnView.cpp:81
void modifyControlPoint(ControlPoint *controlPoint, QString serialNumber)
~CubeDnView()
Destructor.
Definition CubeDnView.cpp:332
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
IO Handler for Isis Cubes.
Definition Cube.h:168
Definition Directory.h:271
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.
Definition MdiCubeViewport.h:39
The main project for ipce.
Definition Project.h:289
Represents an item of a ProjectItemModel in Qt's model-view framework.
Definition ProjectItem.h:134
QMenu subclass that overrides the closeEvent.
Definition ProjectItemViewMenu.h:26
Definition ToolPad.h:14
Definition Workspace.h:78
XML Handler that parses XMLs in a stack-oriented way.
Definition XmlStackedHandler.h:118
Manage a stack of content handlers for reading XML files.
Definition XmlStackedHandlerReader.h:30
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16