30 ARMARX_INFO <<
"RobotTrajectoryDesigner: TCPInformationController on init";
36 ARMARX_INFO <<
"RobotTrajectoryDesigner: TCPInformationController on connect";
41 ARMARX_INFO <<
"RobotTrajectoryDesigner: TCPInformationController on disconnect";
46 ARMARX_INFO <<
"RobotTrajectoryDesigner: TCPInformationController on exit";
50 guiTCPInformation(guiTCPInformation)
58 return this->guiTCPInformation;
63 if (guiTCPInformation != NULL)
65 this->guiTCPInformation = guiTCPInformation;
72 setLineEditText(guiTCPInformation->getTCPInformationTab()->currentPoseLayout,
78 setLineEditText(guiTCPInformation->getTCPInformationTab()->desiredPoseLayout,
85 std::string reachableString =
"";
88 reachableString =
"Pose reachable!";
92 reachableString =
"Pose NOT reachable!";
94 guiTCPInformation->getTCPInformationTab()->reachableLabel->setText(QString::fromStdString(reachableString));
100 setLineEditText(guiTCPInformation->getTCPInformationTab()->currentPoseLayout,
102 setLineEditText(guiTCPInformation->getTCPInformationTab()->desiredPoseLayout,
108 throw (
"not yet implemented");
111 void TCPInformationController::setLineEditText(QGridLayout* gridLayout,
Eigen::Matrix4f pose)
113 int columns = gridLayout->columnCount();
114 int rows = gridLayout->rowCount();
120 for (
int i = 0; i < columns; i++)
122 for (
int j = 0; j < rows; j++)
125 QLayoutItem* item = gridLayout->itemAtPosition(j, i);
129 QWidget* widget = item->widget();
130 QLabel* lineEdit =
dynamic_cast<QLabel*
>(widget);
135 std::stringstream stream;
136 stream << std::fixed << std::setprecision(2) << pose(j, i);
137 std::string
s = stream.str();
138 lineEdit->setText(QString::fromStdString(
s));