27 #include <QFileDialog>
28 #include <QInputDialog>
29 #include <QMessageBox>
31 #include "CnetEditorWidget.h"
33 #include "ControlList.h"
36 #include "MosaicSceneItem.h"
37 #include "MosaicSceneWidget.h"
42 CnetEditorViewWorkOrder::CnetEditorViewWorkOrder(Project *project) :
44 QAction::setText(tr(
"View &Network..."));
48 CnetEditorViewWorkOrder::CnetEditorViewWorkOrder(
const CnetEditorViewWorkOrder &other) :
53 CnetEditorViewWorkOrder::~CnetEditorViewWorkOrder() {
57 CnetEditorViewWorkOrder *CnetEditorViewWorkOrder::clone()
const {
58 return new CnetEditorViewWorkOrder(*
this);
64 if (controls->count() >= 1)
75 QUndoCommand::setText(tr(
"View control network [%1] in new cnet editor view")
76 .arg(
controlList()->first()->displayProperties()->displayName()));
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...
CnetEditorWidget * addCnetEditorView(Control *network)
Add the widget for the cnet editor view to the window.
Project * project() const
Returns the Project this WorkOrder is attached to.
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.
void syncUndo()
This method is designed to be implemented by children work orders.
Directory * directory() const
Returns the directory associated with this Project.
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...
QPointer< ControlList > controlList()
Returns the Control List for this WorkOrder (a list of control networks).
QList< CnetEditorWidget * > cnetEditorViews()
Returns a list of all the control network views for this directory.