23 #include "IsisDebug.h" 28 #include <QGridLayout> 31 #include <QMapIterator> 35 #include <QSizePolicy> 43 #include "CnetEditorWidget.h" 47 #include "XmlStackedHandlerReader.h" 62 setCentralWidget(centralWidget);
63 QGridLayout *resultLayout =
new QGridLayout;
64 centralWidget->setLayout(resultLayout);
69 resultLayout->addWidget(m_cnetEditorWidget, 0, 0, 1, 2);
71 QTabWidget *treeViews =
new QTabWidget;
72 treeViews->addTab( m_cnetEditorWidget->pointTreeView(), tr(
"Point View") );
73 treeViews->addTab( m_cnetEditorWidget->serialTreeView(), tr(
"Serial View") );
74 treeViews->addTab( m_cnetEditorWidget->connectionTreeView(), tr(
"Connection View") );
75 resultLayout->addWidget(treeViews, 1, 0, 1, 1);
77 QTabWidget *filterViews =
new QTabWidget;
78 filterViews->addTab( m_cnetEditorWidget->pointFilterWidget(), tr(
"Filter Points and Measures") );
79 filterViews->addTab( m_cnetEditorWidget->serialFilterWidget(), tr(
"Filter Images and Points") );
80 filterViews->addTab( m_cnetEditorWidget->connectionFilterWidget(), tr(
"Filter Connections") );
81 resultLayout->addWidget(filterViews, 1, 1, 1, 1);
99 delete m_cnetEditorWidget;
113 QMapIterator< QAction *, QList< QString > > actionMapIter(actionMap);
119 while ( actionMapIter.hasNext() ) {
120 actionMapIter.next();
121 QAction *actionToAdd = actionMapIter.key();
124 if (actionToAdd->text() ==
"What's This?") {
143 actionMap = m_cnetEditorWidget->toolBarActions();
144 QMapIterator< QString, QList< QAction * > > actionIter(actionMap);
146 while (actionIter.hasNext()) {
148 QString objName = actionIter.key();
150 foreach (
QAction *action, actionList) {
178 return m_cnetEditorWidget;
211 stream.writeStartElement(
"cnetEditorView");
212 stream.writeAttribute(
"objectName", objectName());
213 stream.writeAttribute(
"id", m_control->id());
214 stream.writeEndElement();
232 delete m_cnetEditorView;
233 m_cnetEditorView = NULL;
249 const QString &localName,
const QString &qName,
const QXmlAttributes &atts) {
251 bool result = XmlStackedHandler::startElement(namespaceURI, localName, qName, atts);
267 const QString &localName,
const QString &qName) {
269 bool result = XmlStackedHandler::endElement(namespaceURI, localName, qName);
This represents an ISIS control net in a project-based GUI interface.
Ipce view containing the CnetEditorWidget.
The main project for ipce.
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...
File name manipulation and expansion.
virtual void disableActions()
Disables toolbars and toolpad actions.
QToolBar * m_permToolBar
The permanent tool bar.
AbstractProjectItemView is a base class for views of a ProjectItemModel in Qt's model-view framework...
CnetEditorWidget * cnetEditorWidget()
Returns the cnetEditorWidget.
virtual void pushContentHandler(XmlStackedHandler *newHandler)
Push a contentHandler and maybe continue parsing...
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
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'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.
CnetEditorView(Directory *directory, Control *control, FileName configFile, QWidget *parent=0)
Constructor.
Manage a stack of content handlers for reading XML files.