Isis 3 Developer Reference
CubeDnView.h
Go to the documentation of this file.
1 #ifndef CubeDnView_h
2 #define CubeDnView_h
3 
26 #include <QList>
27 #include <QMap>
28 #include <QWidgetAction>
29 
31 #include "FileName.h"
32 #include "XmlStackedHandler.h"
33 
34 class QAction;
35 class QMenu;
36 class QModelIndex;
37 class QToolBar;
38 class QXmlStreamWriter;
39 class QWidget;
40 
41 namespace Isis {
42 
43  class ControlPoint;
44  class Cube;
45  class Directory;
46  class Image;
47  class ImageList;
48  class MdiCubeViewport;
49  class Project;
50  class ToolPad;
51  class Workspace;
52  class XmlStackedHandlerReader;
53  class ProjectItemViewMenu;
54 
112 
113  Q_OBJECT
114 
115  public:
116  CubeDnView(Directory *directory, QWidget *parent=0);
117  ~CubeDnView();
118 
119  bool viewportContainsShape(MdiCubeViewport *viewport);
120 
121  void load(XmlStackedHandlerReader *xmlReader, Project *project);
122  void save(QXmlStreamWriter &stream, Project *project, FileName newProjectRoot) const;
123 
124  signals:
125  void modifyControlPoint(ControlPoint *controlPoint, QString serialNumber);
126  void deleteControlPoint(ControlPoint *controlPoint);
127  void createControlPoint(double latitude, double longitude, Cube *cube,
128  bool isGroundSource = false);
129 
130  void controlPointAdded(QString newPointId);
131  void redrawMeasures();
132 
133  public slots:
134  void addItem(ProjectItem *item);
135  void enableControlNetTool(bool value);
136 
137  private slots:
138  void createActions(Directory *directory);
139 
140  void onCurrentChanged(const QModelIndex &current);
141  void onCubeViewportActivated(MdiCubeViewport *);
142  void onItemAdded(ProjectItem *item);
143  void onCubeViewportAdded(MdiCubeViewport *viewport);
144  void onCubeViewportDeleted(QObject *obj);
145  void disableActions();
146 
147  private:
148  Cube *workspaceActiveCube();
149  void setWorkspaceActiveCube(Image *image);
150  void leaveEvent(QEvent *event);
151  void enableActions();
152 
153  private:
160  class XmlHandler : public XmlStackedHandler {
161  public:
162  XmlHandler(CubeDnView *cubeDnView, Project *project);
163  ~XmlHandler();
164 
165  virtual bool startElement(const QString &namespaceURI, const QString &localName,
166  const QString &qName, const QXmlAttributes &atts);
167  virtual bool endElement(const QString &namespaceURI, const QString &localName,
168  const QString &qName);
169 
170  private:
171  Q_DISABLE_COPY(XmlHandler);
172 
173  Project *m_project;
174  CubeDnView *m_cubeDnView;
175  };
176 
177  private:
178  QMap<Cube *, ProjectItem *> m_cubeItemMap;
179  Workspace *m_workspace;
180  Directory *m_directory;
181 
182  ProjectItemViewMenu *m_viewMenu;
183  ProjectItemViewMenu *m_optionsMenu;
184  ProjectItemViewMenu *m_windowMenu;
185 
186  QAction *m_separatorAction;
187 
188  QToolBar *m_permToolBar;
189  QToolBar *m_activeToolBar;
190  ToolPad *m_toolPad;
191  QList<QWidget *> m_childWidgets;
192  };
193 }
194 
195 #endif
Cube display widget for certain Isis MDI applications.
Definition: MdiCubeViewport.h:53
The main project for ipce.
Definition: Project.h:289
void modifyControlPoint(ControlPoint *controlPoint, QString serialNumber)
File name manipulation and expansion.
Definition: FileName.h:116
QMenu subclass that overrides the closeEvent.
Definition: ProjectItemViewMenu.h:40
AbstractProjectItemView is a base class for views of a ProjectItemModel in Qt&#39;s model-view framework...
Definition: AbstractProjectItemView.h:93
void load(XmlStackedHandlerReader *xmlReader, Project *project)
Definition: CubeDnView.cpp:547
CubeDnView(Directory *directory, QWidget *parent=0)
Constructs the view, initializing the tools.
Definition: CubeDnView.cpp:95
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:331
void save(QXmlStreamWriter &stream, Project *project, FileName newProjectRoot) const
Definition: CubeDnView.cpp:552
void controlPointAdded(QString newPointId)
XML Handler that parses XMLs in a stack-oriented way.
Definition: XmlStackedHandler.h:112
A single control point.
Definition: ControlPoint.h:369
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
~CubeDnView()
Destructor.
Definition: CubeDnView.cpp:346
void addItem(ProjectItem *item)
Adds an item to the view.
Definition: CubeDnView.cpp:370
Definition: Workspace.h:90
View that displays cubes in a QView-like way.
Definition: CubeDnView.h:111
void deleteControlPoint(ControlPoint *controlPoint)
Represents an item of a ProjectItemModel in Qt&#39;s model-view framework.
Definition: ProjectItem.h:146
Definition: BoxcarCachingAlgorithm.h:29
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
bool viewportContainsShape(MdiCubeViewport *viewport)
Definition: CubeDnView.cpp:379
void createControlPoint(double latitude, double longitude, Cube *cube, bool isGroundSource=false)
$Date$ $Revision$
Definition: Directory.h:285
Manage a stack of content handlers for reading XML files.
Definition: XmlStackedHandlerReader.h:25
Definition: CubeIoHandler.h:38
Definition: ToolPad.h:14
IO Handler for Isis Cubes.
Definition: Cube.h:170