Commit 6bd8c5c5 authored by Joseph Mirabel's avatar Joseph Mirabel

Remove manipulation constraint widget.

parent fb49601c
......@@ -31,7 +31,6 @@ GEPETTO_GUI_PLUGIN(hppmanipulationwidgetsplugin
HEADERS
hppmanipulationwidgetsplugin.hh
linkwidget.hh
manipulationconstraintwidget.hh
HEADERS_NO_MOC
roadmap.hh
......@@ -43,7 +42,6 @@ GEPETTO_GUI_PLUGIN(hppmanipulationwidgetsplugin
hppmanipulationwidgetsplugin.cc
roadmap.cc
linkwidget.cc
manipulationconstraintwidget.cc
LINK_DEPENDENCIES
hppwidgetsplugin
......
......@@ -21,9 +21,6 @@
#include "hppwidgetsplugin/conversions.hh"
#include "hppwidgetsplugin/jointtreewidget.hh"
#include "hppmanipulationwidgetsplugin/linkwidget.hh"
#include "hppmanipulationwidgetsplugin/manipulationconstraintwidget.hh"
#include "hppwidgetsplugin/twojointsconstraint.hh"
#include "hppwidgetsplugin/listjointconstraint.hh"
using CORBA::ULong;
......@@ -508,22 +505,6 @@ namespace hpp {
graphBuilder_->show();
}
void HppManipulationWidgetsPlugin::loadConstraintWidget()
{
gepetto::gui::MainWindow* main = gepetto::gui::MainWindow::instance();
QDockWidget* dock = new QDockWidget ("&Constraint creator", main);
dock->setObjectName ("hppmanipulationwidgetsplugin.constraintcreator");
constraintWidget_ = new ManipulationConstraintWidget (this, dock);
dock->setWidget(constraintWidget_);
main->insertDockWidget (dock, Qt::RightDockWidgetArea, Qt::Vertical);
dock->toggleViewAction()->setShortcut(gepetto::gui::DockKeyShortcutBase + Qt::Key_V);
dockWidgets_.append(dock);
constraintWidget_->addConstraint(new PositionConstraint(this));
constraintWidget_->addConstraint(new OrientationConstraint(this));
constraintWidget_->addConstraint(new TransformConstraint(this));
constraintWidget_->addConstraint(new LockedJointConstraint(this));
}
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
Q_EXPORT_PLUGIN2 (hppmanipulationwidgetsplugin, HppManipulationWidgetsPlugin)
#endif
......
......@@ -96,9 +96,6 @@ namespace hpp {
/// Construct all the corba vars and create the graph.
void buildGraph();
protected:
virtual void loadConstraintWidget();
private:
// Type used to make one function to build datas needed for autoBuild
typedef std::pair<hpp::Names_t, hpp::corbaserver::manipulation::Namess_t> NamesPair;
......
//
// Copyright (c) CNRS
// Authors: Joseph Mirabel and Heidy Dallard
//
#include "hppmanipulationwidgetsplugin/hppmanipulationwidgetsplugin.hh"
#include "hppwidgetsplugin/ui_constraintwidget.h"
#include "manipulationconstraintwidget.hh"
namespace hpp {
namespace gui {
ManipulationConstraintWidget::ManipulationConstraintWidget(HppWidgetsPlugin* plugin, QWidget* parent)
: ConstraintWidget(plugin, parent)
{
}
ManipulationConstraintWidget::~ManipulationConstraintWidget()
{
}
void ManipulationConstraintWidget::applyConstraints()
{
}
void ManipulationConstraintWidget::reset()
{
HppManipulationWidgetsPlugin* plugin = dynamic_cast<HppManipulationWidgetsPlugin*>(plugin_);
hpp::GraphComp_var graphComp;
hpp::GraphElements_var graphElems;
plugin->manipClient()->graph()->getGraph(graphComp.out(), graphElems.out());
for (unsigned i = 0; i < graphElems->edges.length(); ++i) {
plugin->manipClient()->graph()->resetConstraints(graphElems->edges[i].id);
}
for (unsigned i = 0; i < graphElems->nodes.length(); ++i) {
plugin->manipClient()->graph()->resetConstraints(graphElems->nodes[i].id);
}
}
}
}
//
// Copyright (c) CNRS
// Authors: Joseph Mirabel and Heidy Dallard
//
#ifndef HPP_GUI_MANIPULATIONCONSTRAINTWIDGET_HH
#define HPP_GUI_MANIPULATIONCONSTRAINTWIDGET_HH
#include "hppwidgetsplugin/constraintwidget.hh"
#include "hppwidgetsplugin/hppwidgetsplugin.hh"
namespace hpp {
namespace gui {
class ManipulationConstraintWidget : public ConstraintWidget
{
Q_OBJECT
public:
ManipulationConstraintWidget(HppWidgetsPlugin* plugin, QWidget* parent = 0);
virtual ~ManipulationConstraintWidget();
private slots:
virtual void applyConstraints();
virtual void reset();
protected:
};
}
}
#endif // HPP_GUI_MANIPULATIONCONSTRAINTWIDGET_HH
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment