25 #include <QFileDialog>
26 #include <QInputDialog>
33 #include "TargetInfoWidget.h"
43 QAction::setText(tr(
"Get Info...") );
84 for (
int i = 0; i < existingViews.size(); i++) {
85 if (existingViews.at(i)->objectName() == targetBody->displayProperties()->displayName() )
101 QString targetDisplayName =
targetBody()->displayProperties()->displayName();
102 QUndoCommand::setText(tr(
"Get %1 target info").arg(targetDisplayName));
105 internalData.append(targetDisplayName);
132 if (!targetInfoWidget) {
133 QString msg =
"error displaying target info";
void syncRedo()
Redisplays the Target info.
TargetGetInfoWorkOrder(Project *project)
Creates a WorkOrder that will retrieve Target info.
The main project for cnetsuite.
bool dependsOn(WorkOrder *other) const
Determines whether another WorkOrder depends upon TargetGetInfoWorkOrder.
bool execute()
Attempt to retrieve the Target info and view it.
TargetInfoWidget * addTargetInfoView(TargetBodyQsp target)
Add target body data view widget to the window.
Project * project() const
Returns the Project this WorkOrder is attached to.
This is a child of class WorkOrder which is used for anything that performs an action in a Project...
virtual bool isExecutable(TargetBodyQsp targetBody)
Determines if we already have a view for the target.
QStringList internalData() const
Gets the internal data for this WorkOrder.
This error is for when a programmer made an API call that was illegal.
QList< TargetInfoWidget * > targetInfoViews()
Accessor for the list of TargetInfoWidgets currently available.
TargetBodyQsp targetBody()
WorkOrder::targetBody.
Parent class for anything that performs an action in Project.
QSharedPointer< TargetBody > TargetBodyQsp
Defines A smart pointer to a TargetBody obj.
#define _FILEINFO_
Macro for the filename and line number.
void syncUndo()
Deletes the last view.
Directory * directory() const
Returns the directory associated with this Project.
virtual TargetGetInfoWorkOrder * clone() const
Returns a copy of this TargetGetInfoWorkOrder instance.
~TargetGetInfoWorkOrder()
The Destructor.
virtual bool execute()
The (child) implementation of this method should prompt the user/gather state by any means necessary...
void setInternalData(QStringList data)
Sets the internal data for this WorkOrder.