9#include "CnetEditorViewWorkOrder.h" 
   14#include <QUndoCommand> 
   16#include "CnetEditorView.h" 
   18#include "ControlList.h" 
   24  CnetEditorViewWorkOrder::CnetEditorViewWorkOrder(Project *project) :
 
   26    QAction::setText(tr(
"View &Network..."));
 
   27    m_isSavedToHistory = 
false;
 
   32  CnetEditorViewWorkOrder::CnetEditorViewWorkOrder(
const CnetEditorViewWorkOrder &other) :
 
   37  CnetEditorViewWorkOrder::~CnetEditorViewWorkOrder() {
 
   41  CnetEditorViewWorkOrder *CnetEditorViewWorkOrder::clone()
 const {
 
   42    return new CnetEditorViewWorkOrder(*
this);
 
   46  bool CnetEditorViewWorkOrder::isExecutable(
ControlList * controls) {
 
   50      return (controls->count() >= 1);
 
 
   56  bool CnetEditorViewWorkOrder::setupExecution() {
 
   57    bool success = WorkOrder::setupExecution();
 
   60      QUndoCommand::setText(tr(
"View control network [%1] in new cnet editor view")
 
   61          .arg(controlList()->first()->displayProperties()->displayName()));
 
 
   68  bool CnetEditorViewWorkOrder::dependsOn(
WorkOrder *other)
 const {
 
 
   74  void CnetEditorViewWorkOrder::execute() {
 
   76    for (
int i = 0; i < controlList()->size(); i++) {
 
   79    project()->setClean(
false);
 
 
   82  void CnetEditorViewWorkOrder::undoExecution() {
 
   83    delete project()->directory()->cnetEditorViews().last();
 
 
This work order allows the user to open a cnet editor (table) view of a single control network.
 
Maintains a list of Controls so that control nets can easily be copied from one Project to another,...
 
CnetEditorView * addCnetEditorView(Control *control, QString objectName="")
Add the widget for the cnet editor view to the window.
 
Provide Undo/redo abilities, serialization, and history for an operation.
 
Directory * directory() const
return the workorder project directory Returns the Directory object of the Project this WorkOrder is ...
 
This is free and unencumbered software released into the public domain.