Isis 3 Programmer Reference
CnetEditorView.h
Go to the documentation of this file.
1 #ifndef CnetEditorView_h
2 #define CnetEditorView_h
3 
25 #include <QList>
26 #include <QMap>
27 #include <QPointer>
28 #include <QSize>
29 
31 #include "FileName.h"
32 #include "XmlStackedHandler.h"
33 
34 class QAction;
35 class QToolBar;
36 class QWidgetAction;
37 class QXmlStreamWriter;
38 
39 namespace Isis {
40  class Control;
41  class CnetEditorWidget;
42  class Directory;
43  class FileName;
44  class Project;
45  class ToolPad;
46  class XmlStackedHandlerReader;
47  class ProjectItemViewMenu;
48 
79 
80  Q_OBJECT
81 
82  public:
83  CnetEditorView(Directory *directory, Control *control, FileName configFile,
84  QWidget *parent = 0);
86 
88  Control *control();
89 
90  void load(XmlStackedHandlerReader *xmlReader);
91  void save(QXmlStreamWriter &stream, Project *project, FileName newProjectRoot) const;
92 
93  private:
94  void createToolBars();
95  void createMenus();
96  void leaveEvent(QEvent *event);
97 
98 
105  class XmlHandler : public XmlStackedHandler {
106  public:
107  XmlHandler(CnetEditorView *cnetEditorView);
108  ~XmlHandler();
109 
110  virtual bool startElement(const QString &namespaceURI, const QString &localName,
111  const QString &qName, const QXmlAttributes &atts);
112  virtual bool endElement(const QString &namespaceURI, const QString &localName,
113  const QString &qName);
114 
115  private:
116  Q_DISABLE_COPY(XmlHandler);
117 
119  };
120 
121  private:
122  QPointer<CnetEditorWidget> m_cnetEditorWidget;
123  QPointer<Control> m_control;
124 
127 
128  };
129 }
130 
131 #endif // CNETEDITORVIEW_H
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:79
Ipce view containing the CnetEditorWidget.
The main project for ipce.
Definition: Project.h:289
void createMenus()
Uses the actions created by CnetEditorWidget, creates the tables menu, and puts the actions into the ...
void createToolBars()
Uses and adds the actions created by CnetEditorWidget to the view&#39;s toolbars Right now...
File name manipulation and expansion.
Definition: FileName.h:116
QMenu subclass that overrides the closeEvent.
QToolBar * m_permToolBar
The permanent tool bar.
AbstractProjectItemView is a base class for views of a ProjectItemModel in Qt&#39;s model-view framework...
CnetEditorWidget * cnetEditorWidget()
Returns the cnetEditorWidget.
XML Handler that parses XMLs in a stack-oriented way.
void load(XmlStackedHandlerReader *xmlReader)
This method pushes a new XmlHandler into the parser stack.
~CnetEditorView()
Destructor.
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
Placeholder for later serialization of CnetEditorViews.
void leaveEvent(QEvent *event)
Disables actions when cursor leaves the view.
CnetEditorView * m_cnetEditorView
The view we are working with.
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
This method calls XmlStackedHandler&#39;s endElement() and dereferences pointers according to the value o...
ProjectItemViewMenu * m_tablesMenu
View menu for storing actions.
XmlHandler(CnetEditorView *cnetEditorView)
Creates an XmlHandler for cnetEditor.
void save(QXmlStreamWriter &stream, Project *project, FileName newProjectRoot) const
This method saves the Controls object ids to the stream.
Control * control()
Returns the Control displayed in the CnetEditorWidget
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
CnetEditorView(Directory *directory, Control *control, FileName configFile, QWidget *parent=0)
Constructor.
$Date$ $Revision$
Manage a stack of content handlers for reading XML files.
This widget provides full editing, filtering and viewing capabilities for the raw data in a control n...