Isis 3 Programmer Reference
CnetEditorView.h
1#ifndef CnetEditorView_h
2#define CnetEditorView_h
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12#include <QList>
13#include <QMap>
14#include <QPointer>
15#include <QSize>
16
17#include "AbstractProjectItemView.h"
18#include "FileName.h"
19#include "XmlStackedHandler.h"
20
21class QAction;
22class QToolBar;
23class QWidgetAction;
24class QXmlStreamWriter;
25
26namespace Isis {
27 class Control;
28 class CnetEditorWidget;
29 class Directory;
30 class FileName;
31 class Project;
32 class ToolPad;
33 class XmlStackedHandlerReader;
34 class ProjectItemViewMenu;
35
66
67 Q_OBJECT
68
69 public:
70 CnetEditorView(Directory *directory, Control *control, FileName configFile,
71 QWidget *parent = 0);
73
76
77 void load(XmlStackedHandlerReader *xmlReader);
78 void save(QXmlStreamWriter &stream, Project *project, FileName newProjectRoot) const;
79
80 private:
81 void createToolBars();
82 void createMenus();
83 void leaveEvent(QEvent *event);
84
85
93 public:
94 XmlHandler(CnetEditorView *cnetEditorView);
96
97 virtual bool startElement(const QString &namespaceURI, const QString &localName,
98 const QString &qName, const QXmlAttributes &atts);
99 virtual bool endElement(const QString &namespaceURI, const QString &localName,
100 const QString &qName);
101
102 private:
103 Q_DISABLE_COPY(XmlHandler);
104
106 };
107
108 private:
109 QPointer<CnetEditorWidget> m_cnetEditorWidget;
110 QPointer<Control> m_control;
111
114
115 };
116}
117
118#endif // CNETEDITORVIEW_H
AbstractProjectItemView is a base class for views of a ProjectItemModel in Qt's model-view framework.
XmlHandler(CnetEditorView *cnetEditorView)
Creates an XmlHandler for cnetEditor.
CnetEditorView * m_cnetEditorView
The view we are working with.
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
Placeholder for later serialization of CnetEditorViews.
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
This method calls XmlStackedHandler's endElement() and dereferences pointers according to the value o...
Ipce view containing the CnetEditorWidget.
CnetEditorWidget * cnetEditorWidget()
Returns the cnetEditorWidget.
ProjectItemViewMenu * m_tablesMenu
View menu for storing actions.
void load(XmlStackedHandlerReader *xmlReader)
This method pushes a new XmlHandler into the parser stack.
CnetEditorView(Directory *directory, Control *control, FileName configFile, QWidget *parent=0)
Constructor.
QToolBar * m_permToolBar
The permanent tool bar.
~CnetEditorView()
Destructor.
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's toolbars Right now,...
void leaveEvent(QEvent *event)
Disables actions when cursor leaves the view.
void save(QXmlStreamWriter &stream, Project *project, FileName newProjectRoot) const
This method saves the Controls object ids to the stream.
Control * control()
@description Returns the Control displayed in the CnetEditorWidget
This widget provides full editing, filtering and viewing capabilities for the raw data in a control n...
This represents an ISIS control net in a project-based GUI interface.
Definition Control.h:66
File name manipulation and expansion.
Definition FileName.h:100
The main project for ipce.
Definition Project.h:289
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