Isis 3.0 Programmer Reference
Back | Home
CnetEditorViewWorkOrder.cpp
Go to the documentation of this file.
1 
24 
25 #include <QtDebug>
26 
27 #include <QFileDialog>
28 #include <QInputDialog>
29 #include <QMessageBox>
30 
31 #include "CnetEditorWidget.h"
32 #include "Control.h"
33 #include "ControlList.h"
35 #include "Directory.h"
36 #include "MosaicSceneItem.h"
37 #include "MosaicSceneWidget.h"
38 #include "Project.h"
39 
40 namespace Isis {
41 
42  CnetEditorViewWorkOrder::CnetEditorViewWorkOrder(Project *project) :
43  WorkOrder(project) {
44  QAction::setText(tr("View &Network..."));
45  }
46 
47 
48  CnetEditorViewWorkOrder::CnetEditorViewWorkOrder(const CnetEditorViewWorkOrder &other) :
49  WorkOrder(other) {
50  }
51 
52 
53  CnetEditorViewWorkOrder::~CnetEditorViewWorkOrder() {
54  }
55 
56 
57  CnetEditorViewWorkOrder *CnetEditorViewWorkOrder::clone() const {
58  return new CnetEditorViewWorkOrder(*this);
59  }
60 
61 
63 
64  if (controls->count() >= 1)
65  return true;
66  else
67  return false;
68  }
69 
70 
72  bool success = WorkOrder::execute();
73 
74  if (success) {
75  QUndoCommand::setText(tr("View control network [%1] in new cnet editor view")
76  .arg(controlList()->first()->displayProperties()->displayName()));
77  }
78 
79  return success;
80  }
81 
82 
84  // depend on types of ourselves.
85  return dynamic_cast<CnetEditorViewWorkOrder *>(other);
86  }
87 
88 
90  for (int i = 0; i < controlList()->size(); i++) {
91  //project()->directory()->addCnetEditorView(controlList().first());
93  }
94  }
95 
97  delete project()->directory()->cnetEditorViews().last();
98  }
99 }
100 
virtual bool isExecutable(ControlList *controls)
Re-implement this method if your work order utilizes a control for data in order to operate...
Maintains a list of Controls so that control nets can easily be copied from one Project to another...
Definition: ControlList.h:34
CnetEditorWidget * addCnetEditorView(Control *network)
Add the widget for the cnet editor view to the window.
Definition: Directory.cpp:469
Project * project() const
Returns the Project this WorkOrder is attached to.
Definition: WorkOrder.cpp:1116
bool dependsOn(WorkOrder *other) const
This is a virtual function whose role in child classes is to determine if this WorkOrder deppends on ...
bool execute()
The (child) implementation of this method should prompt the user/gather state by any means necessary...
void syncRedo()
This method is designed to be implemented by children work orders.
Parent class for anything that performs an action in Project.
Definition: WorkOrder.h:104
void syncUndo()
This method is designed to be implemented by children work orders.
Directory * directory() const
Returns the directory associated with this Project.
Definition: Project.cpp:824
This work order allows the user to open a cnet editor (table) view of a single control network...
virtual bool execute()
The (child) implementation of this method should prompt the user/gather state by any means necessary...
Definition: WorkOrder.cpp:1078
QPointer< ControlList > controlList()
Returns the Control List for this WorkOrder (a list of control networks).
Definition: WorkOrder.cpp:637
QList< CnetEditorWidget * > cnetEditorViews()
Returns a list of all the control network views for this directory.
Definition: Directory.cpp:932

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 ISIS Support Center
File Modified: 07/12/2023 23:16:02