Isis 3 Programmer 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);
142  void onItemAdded(ProjectItem *item);
143  void onCubeViewportAdded(MdiCubeViewport *viewport);
144  void onCubeViewportDeleted(QObject *obj);
145  void disableActions();
146 
147  private:
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 
175  };
176 
177  private:
181 
185 
187 
192  };
193 }
194 
195 #endif
Cube display widget for certain Isis MDI applications.
void setWorkspaceActiveCube(Image *image)
Raises the subwindow corresponding with an image to the top.
Definition: CubeDnView.cpp:523
CubeDnView * m_cubeDnView
The view we are working with.
Definition: CubeDnView.h:174
void onItemAdded(ProjectItem *item)
Slot to connect to the itemAdded signal from a ProjectItemModel.
Definition: CubeDnView.cpp:480
The main project for ipce.
Definition: Project.h:289
Workspace * m_workspace
The workspace.
Definition: CubeDnView.h:179
ProjectItemViewMenu * m_viewMenu
View menu for storing actions.
Definition: CubeDnView.h:182
File name manipulation and expansion.
Definition: FileName.h:116
void onCubeViewportActivated(MdiCubeViewport *)
Slot to connect to the cubeViewportActivated signal from the Workspace.
Definition: CubeDnView.cpp:420
QToolBar * m_activeToolBar
A tool bar for storing actions.
Definition: CubeDnView.h:189
void onCubeViewportDeleted(QObject *obj)
Slot to connect to the destroyed signal from a viewport.
Definition: CubeDnView.cpp:459
QAction * m_separatorAction
A separator action that is reused.
Definition: CubeDnView.h:186
QMenu subclass that overrides the closeEvent.
QMap< Cube *, ProjectItem * > m_cubeItemMap
Maps cubes to their items.
Definition: CubeDnView.h:178
QList< QWidget * > m_childWidgets
Child widgets of the active toolbar.
Definition: CubeDnView.h:191
ProjectItemViewMenu * m_optionsMenu
Options menu for storing actions.
Definition: CubeDnView.h:183
void disableActions()
Disables toolbars and toolpad actions/widgets.
Definition: CubeDnView.cpp:297
Directory * m_directory
The directory.
Definition: CubeDnView.h:180
Cube * workspaceActiveCube()
Returns the cube of the active viewport in the Workspace, or a null pointer if no viewports are activ...
Definition: CubeDnView.cpp:509
AbstractProjectItemView is a base class for views of a ProjectItemModel in Qt&#39;s model-view framework...
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
Project * m_project
The current project.
Definition: CubeDnView.h:173
XML Handler that parses XMLs in a stack-oriented way.
A single control point.
Definition: ControlPoint.h:369
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
ToolPad * m_toolPad
A tool bar for storing actions.
Definition: CubeDnView.h:190
void onCubeViewportAdded(MdiCubeViewport *viewport)
Slot to connect to the viewportAdded signal from a Workspace.
Definition: CubeDnView.cpp:447
~CubeDnView()
Destructor.
Definition: CubeDnView.cpp:346
void addItem(ProjectItem *item)
Adds an item to the view.
Definition: CubeDnView.cpp:370
void leaveEvent(QEvent *event)
Disables actions when the cursor leaves the view.
Definition: CubeDnView.cpp:280
View that displays cubes in a QView-like way.
Definition: CubeDnView.h:111
QToolBar * m_permToolBar
A tool bar for storing actions.
Definition: CubeDnView.h:188
Represents an item of a ProjectItemModel in Qt&#39;s model-view framework.
Definition: ProjectItem.h:146
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
void onCurrentChanged(const QModelIndex &current)
Slot to connect to the currentChanged() signal from a selection model.
Definition: CubeDnView.cpp:397
void enableActions()
Enables toolbars and toolpad actions/widgets.
Definition: CubeDnView.cpp:311
$Date$ $Revision$
Manage a stack of content handlers for reading XML files.
ProjectItemViewMenu * m_windowMenu
Window menu for storing actions.
Definition: CubeDnView.h:184
IO Handler for Isis Cubes.
Definition: Cube.h:170