File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
CnetEditorViewWorkOrder.cpp
1 
7 /* SPDX-License-Identifier: CC0-1.0 */
8 
9 #include "CnetEditorViewWorkOrder.h"
10 
11 #include <QtDebug>
12 
13 #include <QAction>
14 #include <QUndoCommand>
15 
16 #include "CnetEditorView.h"
17 #include "Control.h"
18 #include "ControlList.h"
19 #include "Directory.h"
20 #include "Project.h"
21 
22 namespace Isis {
23 
24  CnetEditorViewWorkOrder::CnetEditorViewWorkOrder(Project *project) :
25  WorkOrder(project) {
26  QAction::setText(tr("View &Network..."));
27  m_isSavedToHistory = false;
28  m_isUndoable = false;
29  }
30 
31 
32  CnetEditorViewWorkOrder::CnetEditorViewWorkOrder(const CnetEditorViewWorkOrder &other) :
33  WorkOrder(other) {
34  }
35 
36 
37  CnetEditorViewWorkOrder::~CnetEditorViewWorkOrder() {
38  }
39 
40 
41  CnetEditorViewWorkOrder *CnetEditorViewWorkOrder::clone() const {
42  return new CnetEditorViewWorkOrder(*this);
43  }
44 
45 
47 
48 
49  if (controls) {
50  return (controls->count() >= 1);
51  }
52  return false;
53  }
54 
55 
57  bool success = WorkOrder::setupExecution();
58 
59  if (success) {
60  QUndoCommand::setText(tr("View control network [%1] in new cnet editor view")
61  .arg(controlList()->first()->displayProperties()->displayName()));
62  }
63 
64  return success;
65  }
66 
67 
69  // depend on types of ourselves.
70  return dynamic_cast<CnetEditorViewWorkOrder *>(other);
71  }
72 
73 
75 
76  for (int i = 0; i < controlList()->size(); i++) {
78  }
79  project()->setClean(false);
80  }
81 
83  delete project()->directory()->cnetEditorViews().last();
84  }
85 }
Isis::WorkOrder::setupExecution
virtual bool setupExecution()
This sets up the state for the work order.
Definition: WorkOrder.cpp:1261
Isis::CnetEditorViewWorkOrder::execute
void execute()
Execute the workorder.
Definition: CnetEditorViewWorkOrder.cpp:74
Isis::WorkOrder
Provide Undo/redo abilities, serialization, and history for an operation.
Definition: WorkOrder.h:311
Project.h
Isis::CnetEditorViewWorkOrder::dependsOn
bool dependsOn(WorkOrder *other) const
Indicate workorder dependency This is a virtual function whose role in child classes is to determine ...
Definition: CnetEditorViewWorkOrder.cpp:68
Isis::WorkOrder::controlList
QPointer< ControlList > controlList()
Returns the Control List for this WorkOrder (a list of control networks).
Definition: WorkOrder.cpp:706
Isis::Directory::addCnetEditorView
CnetEditorView * addCnetEditorView(Control *control, QString objectName="")
Add the widget for the cnet editor view to the window.
Definition: Directory.cpp:656
Isis::WorkOrder::m_isSavedToHistory
bool m_isSavedToHistory
Set the work order to be shown in the HistoryTreeWidget.
Definition: WorkOrder.h:537
Isis::ControlList
Maintains a list of Controls so that control nets can easily be copied from one Project to another,...
Definition: ControlList.h:44
Isis::CnetEditorViewWorkOrder
This work order allows the user to open a cnet editor (table) view of a single control network.
Definition: CnetEditorViewWorkOrder.h:38
Isis::Project::directory
Directory * directory() const
Returns the directory associated with this Project.
Definition: Project.cpp:1229
Isis::CnetEditorViewWorkOrder::setupExecution
bool setupExecution()
This sets up the state for the work order.
Definition: CnetEditorViewWorkOrder.cpp:56
Isis::WorkOrder::m_isUndoable
bool m_isUndoable
Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to...
Definition: WorkOrder.h:523
Isis::CnetEditorViewWorkOrder::undoExecution
void undoExecution()
Execute the steps necessary to undo this workorder.
Definition: CnetEditorViewWorkOrder.cpp:82
Isis::WorkOrder::project
Project * project() const
Returns the Project this WorkOrder is attached to.
Definition: WorkOrder.cpp:1300
Isis::Directory::cnetEditorViews
QList< CnetEditorView * > cnetEditorViews()
Returns a list of all the control network views for this directory.
Definition: Directory.cpp:1320
Isis::Project::setClean
void setClean(bool value)
Function to change the clean state of the project.
Definition: Project.cpp:1595
Isis::CnetEditorViewWorkOrder::isExecutable
virtual bool isExecutable(ControlList *controls)
Re-implement this method if your work order utilizes a control for data in order to operate.
Definition: CnetEditorViewWorkOrder.cpp:46
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:16:16