28 #ifndef MOTORAXISCONTROLLER_H 29 #define MOTORAXISCONTROLLER_H 32 #include "commonWidgets.h" 37 #include <qstringlist.h> 38 #include "common/retVal.h" 39 #include "common/interval.h" 53 #if QT_VERSION < 0x050500 60 Q_PROPERTY(QPointer<ito::AddInActuator> actuator READ actuator WRITE setActuator)
61 Q_PROPERTY(
int numAxis READ numAxis WRITE setNumAxis)
62 Q_PROPERTY(AxisUnit defaultAxisUnit READ defaultAxisUnit WRITE setDefaultAxisUnit)
63 Q_PROPERTY(AxisType defaultAxisType READ defaultAxisType WRITE setDefaultAxisType)
64 Q_PROPERTY(
bool refreshAvailable READ refreshAvailable WRITE setRefreshAvailable)
65 Q_PROPERTY(
bool cancelAvailable READ cancelAvailable WRITE setCancelAvailable)
66 Q_PROPERTY(
bool startAllAvailable READ startAllAvailable WRITE setStartAllAvailable)
67 Q_PROPERTY(
double defaultRelativeStepSize READ defaultRelativeStepSize WRITE setDefaultRelativeStepSize)
68 Q_PROPERTY(QStringList axisNames READ axisNames WRITE setAxisNames)
69 Q_PROPERTY(
int defaultDecimals READ defaultDecimals WRITE setDefaultDecimals)
70 Q_PROPERTY(MovementType movementType READ movementType WRITE setMovementType)
71 Q_PROPERTY(
bool movementTypeVisible READ movementTypeVisible WRITE setMovementTypeVisible)
72 Q_PROPERTY(QString arbitraryUnit READ arbitraryUnit WRITE setArbitraryUnit)
74 Q_CLASSINFO(
"prop://actuator",
"Actuator instance that is monitored and controlled by this widget (or None in order to remove a previous actuator).")
75 Q_CLASSINFO(
"prop://numAxis",
"Number of axes that are monitored.")
76 Q_CLASSINFO(
"prop://defaultAxisUnit",
"Default unit for all axes. A different unit can be set for distinct axes using the slot 'setAxisUnit'.")
77 Q_CLASSINFO(
"prop://defaultAxisType",
"Default type for all axes. A different type can be set for any axis using the slot 'setAxisType'.")
78 Q_CLASSINFO(
"prop://refreshAvailable",
"Hide or show a button to manually refresh the positions of all covered axes.")
79 Q_CLASSINFO(
"prop://cancelAvailable",
"Hide or show a button to cancel a running movement of any axis (should only be used, if the specific actuator is able to handle interrupts).")
80 Q_CLASSINFO(
"prop://startAllAvailable",
"Hide or show a button to start a simultaneous movement of all covered axes to their current target positions.")
81 Q_CLASSINFO(
"prop://defaultRelativeStepSize",
"Default relative step size for all axes (in mm or degree, depending on their types).")
82 Q_CLASSINFO(
"prop://axisNames",
"Names of all axes as string list.")
83 Q_CLASSINFO(
"prop://defaultDecimals",
"Default number of decimals of all axes. The number of decimals can also be set individually for each axis using the slot 'setAxisDecimals'.")
84 Q_CLASSINFO(
"prop://movementType",
"Style of the widget depending if it should be optimized for an absolute movement, relative movement, both or no movement.")
85 Q_CLASSINFO(
"prop://movementTypeVisible",
"Hide or show a combobox above the axes values that can be used to select an appropriate movement type.")
86 Q_CLASSINFO(
"prop://arbitraryUnit",
"Unit name that is used for axes, whose unit is set to UnitAU (Arbitrary unit).")
105 MovementAbsolute = 0,
106 MovementRelative = 1,
111 #if QT_VERSION >= 0x050500 116 Q_ENUM(MovementType);
122 void setActuator(
const QPointer<ito::AddInActuator> &actuator);
123 QPointer<ito::AddInActuator> actuator()
const;
126 AxisUnit axisUnit(
int axisIndex)
const;
127 AxisUnit defaultAxisUnit()
const;
128 AxisType axisType(
int axisIndex)
const;
129 AxisType defaultAxisType()
const;
130 bool refreshAvailable()
const;
131 bool cancelAvailable()
const;
132 bool startAllAvailable()
const;
133 double defaultRelativeStepSize()
const;
134 QStringList axisNames()
const;
135 QString axisName(
int axisIndex)
const;
136 int defaultDecimals()
const;
137 int axisDecimals(
int axisIndex)
const;
138 MovementType movementType()
const;
139 bool movementTypeVisible()
const;
140 bool axisEnabled(
int axisIndex)
const;
141 QString arbitraryUnit()
const;
144 void retValToMessageBox(
const ito::RetVal &retval,
const QString &methodName)
const;
145 QString suffixFromAxisUnit(
const AxisUnit &unit)
const;
146 double baseUnitToUnit(
const double &value,
const AxisUnit &unit)
const;
147 double unitToBaseUnit(
const double &value,
const AxisUnit &unit)
const;
149 void moveRelOrAbs(
int axis,
double value,
bool relNotAbs);
154 virtual void actuatorStatusChanged(QVector<int> status, QVector<double> actPosition);
155 virtual void targetChanged(QVector<double> targetPositions);
157 ito::RetVal setAxisUnit(
int axisIndex, AxisUnit unit);
158 ito::RetVal setAxisEnabled(
int axisIndex,
bool enabled);
159 ito::RetVal setAxisDecimals(
int axisIndex,
int decimals);
160 ito::RetVal setAxisType(
int axisIndex, AxisType type);
161 ito::RetVal setAxisName(
int axisIndex,
const QString &name);
163 void setDefaultAxisUnit(AxisUnit unit);
164 void setMovementTypeVisible(
bool visible);
165 void setMovementType(MovementType type);
166 void setDefaultDecimals(
int decimals);
167 void setAxisNames(
const QStringList &names);
168 void setDefaultRelativeStepSize(
double defaultRelativeStepSize);
169 void setCancelAvailable(
bool available);
170 void setStartAllAvailable(
bool available);
171 void setRefreshAvailable(
bool available);
172 void setDefaultAxisType(AxisType type);
173 void setNumAxis(
int numAxis);
174 void setArbitraryUnit(
const QString &unit);
184 void on_btnCancel_clicked();
185 void on_btnStart_clicked();
186 void on_btnRefresh_clicked();
187 void on_comboType_currentIndexChanged(
int index);
188 void stepUpClicked(
int index);
189 void stepDownClicked(
int index);
190 void runSingleClicked(
int index);
191 void customContextMenuRequested(
const QPoint &pos);
Class for managing status values (like errors or warning)
Definition: retVal.h:54
Definition: apiFunctionsGraph.cpp:39
Definition: motorAxisController.h:49
semaphore which can be used for asychronous thread communication. By using this class it is possible ...
Definition: sharedStructuresQt.h:57
class for a interval type containing a min-max-range and an auto-flag.
Definition: interval.h:49
Definition: motorAxisController.cpp:47