Skip to content
Snippets Groups Projects
Commit bdbbf781 authored by Jan Hausberg's avatar Jan Hausberg
Browse files

Implement HandUnitConfigDialog supporting both hands

parent 140874a4
No related branches found
No related tags found
1 merge request!253Resolve "Extend HandUnitGUI for different joints"
...@@ -35,9 +35,13 @@ armarx::HandUnitConfigDialog::HandUnitConfigDialog(QWidget* parent) : ...@@ -35,9 +35,13 @@ armarx::HandUnitConfigDialog::HandUnitConfigDialog(QWidget* parent) :
setName(getDefaultName()); // @@@ This is necessary for more than 1 widget or even reopening the widget. setName(getDefaultName()); // @@@ This is necessary for more than 1 widget or even reopening the widget.
proxyFinder = new IceProxyFinder<HandUnitInterfacePrx>(this); proxyFinderLeftHand = new IceProxyFinder<HandUnitInterfacePrx>(this);
proxyFinder->setSearchMask("*Unit"); proxyFinderLeftHand->setSearchMask("*Unit");
ui->proxyFinderContainer->addWidget(proxyFinder, 0, 0, 1, 1); ui->proxyFinderContainerLeftHand->addWidget(proxyFinderLeftHand, 0, 0, 1, 1);
proxyFinderRightHand = new IceProxyFinder<HandUnitInterfacePrx>(this);
proxyFinderRightHand->setSearchMask("*Unit");
ui->proxyFinderContainerRightHand->addWidget(proxyFinderRightHand, 0, 0, 1, 1);
} }
armarx::HandUnitConfigDialog::~HandUnitConfigDialog() armarx::HandUnitConfigDialog::~HandUnitConfigDialog()
...@@ -49,7 +53,8 @@ armarx::HandUnitConfigDialog::~HandUnitConfigDialog() ...@@ -49,7 +53,8 @@ armarx::HandUnitConfigDialog::~HandUnitConfigDialog()
void armarx::HandUnitConfigDialog::onInitComponent() void armarx::HandUnitConfigDialog::onInitComponent()
{ {
proxyFinder->setIceManager(getIceManager()); proxyFinderLeftHand->setIceManager(getIceManager());
proxyFinderRightHand->setIceManager(getIceManager());
} }
void armarx::HandUnitConfigDialog::onConnectComponent() void armarx::HandUnitConfigDialog::onConnectComponent()
......
...@@ -58,7 +58,8 @@ namespace armarx ...@@ -58,7 +58,8 @@ namespace armarx
private: private:
Ui::HandUnitConfigDialog* ui; Ui::HandUnitConfigDialog* ui;
IceProxyFinderBase* proxyFinder; IceProxyFinderBase* proxyFinderLeftHand;
IceProxyFinderBase* proxyFinderRightHand;
std::string uuid; std::string uuid;
friend class HandUnitWidget; friend class HandUnitWidget;
......
...@@ -7,48 +7,116 @@ ...@@ -7,48 +7,116 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>527</width> <width>527</width>
<height>113</height> <height>179</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string>Dialog</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <widget class="QDialogButtonBox" name="buttonBox">
<item row="3" column="0"> <property name="geometry">
<widget class="QDialogButtonBox" name="buttonBox"> <rect>
<property name="orientation"> <x>350</x>
<enum>Qt::Horizontal</enum> <y>150</y>
</property> <width>166</width>
<property name="standardButtons"> <height>25</height>
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> </rect>
</property> </property>
</widget> <property name="orientation">
</item> <enum>Qt::Horizontal</enum>
<item row="0" column="0"> </property>
<layout class="QGridLayout" name="gridLayout"> <property name="standardButtons">
<item row="1" column="1"> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
<widget class="QLineEdit" name="editHandName"> </property>
<property name="readOnly"> </widget>
<bool>true</bool> <widget class="QLabel" name="labelLeftHandName">
</property> <property name="geometry">
<property name="placeholderText"> <rect>
<string>will be retrieved from HandUnit</string> <x>20</x>
</property> <y>50</y>
</widget> <width>111</width>
</item> <height>25</height>
<item row="1" column="0"> </rect>
<widget class="QLabel" name="labelHandName"> </property>
<property name="text"> <property name="text">
<string>Hand Name</string> <string>Left Hand Name</string>
</property> </property>
</widget> </widget>
</item> <widget class="QLineEdit" name="editLeftHandName">
<item row="0" column="0" colspan="2"> <property name="geometry">
<layout class="QGridLayout" name="proxyFinderContainer"/> <rect>
</item> <x>166</x>
</layout> <y>50</y>
</item> <width>351</width>
</layout> <height>25</height>
</rect>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="placeholderText">
<string>will be retrieved from HandUnit</string>
</property>
</widget>
<widget class="QLineEdit" name="editRightHandName">
<property name="geometry">
<rect>
<x>166</x>
<y>120</y>
<width>351</width>
<height>25</height>
</rect>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="placeholderText">
<string>will be retrieved from HandUnit</string>
</property>
</widget>
<widget class="QLabel" name="labelRightHandName">
<property name="geometry">
<rect>
<x>20</x>
<y>120</y>
<width>121</width>
<height>25</height>
</rect>
</property>
<property name="text">
<string>Right Hand Name</string>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>80</y>
<width>511</width>
<height>35</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayoutRightHand">
<item row="0" column="0">
<layout class="QGridLayout" name="proxyFinderContainerRightHand"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>9</x>
<y>9</y>
<width>511</width>
<height>35</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayoutLeftHand">
<item row="0" column="0" colspan="2">
<layout class="QGridLayout" name="proxyFinderContainerLeftHand"/>
</item>
</layout>
</widget>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>buttonBox</tabstop> <tabstop>buttonBox</tabstop>
......
...@@ -157,8 +157,8 @@ namespace armarx ...@@ -157,8 +157,8 @@ namespace armarx
void HandUnitWidget::configured() void HandUnitWidget::configured()
{ {
leftHandUnitProxyName = dialog->proxyFinder->getSelectedProxyName().toStdString(); leftHandUnitProxyName = dialog->proxyFinderLeftHand->getSelectedProxyName().toStdString();
rightHandUnitProxyName = dialog->proxyFinder->getSelectedProxyName().toStdString(); rightHandUnitProxyName = dialog->proxyFinderRightHand->getSelectedProxyName().toStdString();
} }
void HandUnitWidget::preshapeLeftHand() void HandUnitWidget::preshapeLeftHand()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment