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);
50 return (controls->count() >= 1);
60 QUndoCommand::setText(tr(
"View control network [%1] in new cnet editor view")
61 .arg(
controlList()->first()->displayProperties()->displayName()));
70 return dynamic_cast<CnetEditorViewWorkOrder *
>(other);
83 delete project()->directory()->cnetEditorViews().last();
virtual bool isExecutable(ControlList *controls)
Re-implement this method if your work order utilizes a control for data in order to operate.
bool dependsOn(WorkOrder *other) const
Indicate workorder dependency This is a virtual function whose role in child classes is to determine ...
void undoExecution()
Execute the steps necessary to undo this workorder.
bool setupExecution()
This sets up the state for the work order.
void execute()
Execute the workorder.
Maintains a list of Controls so that control nets can easily be copied from one Project to another,...
The main project for ipce.
Provide Undo/redo abilities, serialization, and history for an operation.
virtual bool setupExecution()
This sets up the state for the work order.
QPointer< ControlList > controlList()
Returns the Control List for this WorkOrder (a list of control networks).
Project * project() const
Returns the Project this WorkOrder is attached to.
WorkOrder(Project *project)
Create a work order that will work with the given project.
This is free and unencumbered software released into the public domain.