Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-gui
Commits
48202836
Commit
48202836
authored
Sep 15, 2018
by
Joseph Mirabel
Browse files
Merge remote-tracking branch 'redmine/devel' into devel
Conflicts: plugins/hppwidgetsplugin/listjointconstraint.cc
parents
75b600e1
1f011f74
Changes
24
Hide whitespace changes
Inline
Side-by-side
plugins/CMakeLists.txt
View file @
48202836
...
...
@@ -31,7 +31,6 @@ SET(BUILD_HPP_WIDGETS_PLUGIN ${HPP_CORBASERVER_FOUND}
SET
(
BUILD_HPP_MANIPULATION_WIDGETS_PLUGIN
${
HPP_MANIPULATION_CORBA_FOUND
}
CACHE BOOL
"Build hppmanipulationwidgetsplugin"
)
#ADD_SUBDIRECTORY(plugintest)
IF
(
HPP_CORBASERVER_FOUND
)
IF
(
REMOTEIMU_FOUND AND BUILD_REMOTEIMU_PLUGIN
)
ADD_SUBDIRECTORY
(
remoteimuplugin
)
...
...
plugins/hppmanipulationwidgetsplugin/CMakeLists.txt
View file @
48202836
...
...
@@ -33,7 +33,6 @@ GEPETTO_GUI_PLUGIN(hppmanipulationwidgetsplugin
linkwidget.hh
manipulationconstraintwidget.hh
manipulationncpicker.hh
manipulationlockedjoint.hh
HEADERS_NO_MOC
roadmap.hh
...
...
@@ -47,7 +46,6 @@ GEPETTO_GUI_PLUGIN(hppmanipulationwidgetsplugin
linkwidget.cc
manipulationconstraintwidget.cc
manipulationncpicker.cc
manipulationlockedjoint.cc
LINK_DEPENDENCIES
hppwidgetsplugin
...
...
plugins/hppmanipulationwidgetsplugin/hppmanipulationwidgetsplugin.cc
View file @
48202836
...
...
@@ -21,7 +21,7 @@
#include
"hppmanipulationwidgetsplugin/linkwidget.hh"
#include
"hppmanipulationwidgetsplugin/manipulationconstraintwidget.hh"
#include
"hppwidgetsplugin/twojointsconstraint.hh"
#include
"hpp
manipulation
widgetsplugin/
manipulationlockedjo
int.hh"
#include
"hppwidgetsplugin/
listjointconstra
int.hh"
using
CORBA
::
ULong
;
...
...
@@ -125,8 +125,9 @@ namespace hpp {
{
HppWidgetsPlugin
::
openConnection
();
hpp_
=
new
HppManipClient
(
0
,
0
);
QByteArray
iiop
=
getHppIIOPurl
().
toLatin1
();
hpp_
->
connect
(
iiop
.
constData
());
QByteArray
iiop
=
getHppIIOPurl
().
toLatin1
();
QByteArray
context
=
getHppContext
().
toLatin1
();
hpp_
->
connect
(
iiop
.
constData
(),
context
.
constData
());
}
void
HppManipulationWidgetsPlugin
::
closeConnection
()
...
...
@@ -522,7 +523,7 @@ namespace hpp {
constraintWidget_
->
addConstraint
(
new
PositionConstraint
(
this
));
constraintWidget_
->
addConstraint
(
new
OrientationConstraint
(
this
));
constraintWidget_
->
addConstraint
(
new
TransformConstraint
(
this
));
constraintWidget_
->
addConstraint
(
new
ManipulationLockedJo
int
(
this
));
constraintWidget_
->
addConstraint
(
new
LockedJointConstra
int
(
this
));
}
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
...
...
plugins/hppmanipulationwidgetsplugin/manipulationconstraintwidget.cc
View file @
48202836
...
...
@@ -52,13 +52,7 @@ namespace hpp {
void
ManipulationConstraintWidget
::
confirmNumerical
()
{
HppManipulationWidgetsPlugin
*
plugin
=
dynamic_cast
<
HppManipulationWidgetsPlugin
*>
(
plugin_
);
QStringList
l
;
for
(
int
i
=
0
;
i
<
ui
->
nameList
->
count
();
i
++
)
{
QListWidgetItem
*
item
=
ui
->
nameList
->
item
(
i
);
l
<<
item
->
text
();
}
ManipulationNCPicker
*
ncp
=
new
ManipulationNCPicker
(
l
,
plugin
);
ManipulationNCPicker
*
ncp
=
new
ManipulationNCPicker
(
plugin
);
ncp
->
show
();
}
...
...
plugins/hppmanipulationwidgetsplugin/manipulationlockedjoint.cc
deleted
100644 → 0
View file @
75b600e1
//
// Copyright (c) CNRS
// Authors: Joseph Mirabel and Heidy Dallard
//
#include
"hppmanipulationwidgetsplugin.hh"
#include
"manipulationlockedjoint.hh"
#include
<QListWidgetItem>
namespace
hpp
{
namespace
gui
{
ManipulationLockedJoint
::
ManipulationLockedJoint
(
HppManipulationWidgetsPlugin
*
plugin
)
:
ListJointConstraint
(
plugin
)
{
}
ManipulationLockedJoint
::~
ManipulationLockedJoint
()
{
}
QString
ManipulationLockedJoint
::
getName
()
const
{
return
"Locked Joint"
;
}
void
ManipulationLockedJoint
::
operator
()(
QString
const
&
/*name*/
)
{
QList
<
QListWidgetItem
*>
selected
=
jointList_
->
selectedItems
();
HppManipulationWidgetsPlugin
*
plugin
=
dynamic_cast
<
HppManipulationWidgetsPlugin
*>
(
plugin_
);
foreach
(
QListWidgetItem
*
item
,
selected
)
{
std
::
string
jointName
=
item
->
text
().
toStdString
().
c_str
();
hpp
::
floatSeq_var
config
=
plugin
->
client
()
->
robot
()
->
getJointConfig
(
jointName
.
c_str
());
plugin
->
client
()
->
problem
()
->
createLockedJoint
(
std
::
string
(
"lock_"
+
jointName
).
c_str
(),
jointName
.
c_str
(),
config
.
in
());
emit
constraintCreated
(
std
::
string
(
"lock_"
+
jointName
).
c_str
());
}
}
}
}
plugins/hppmanipulationwidgetsplugin/manipulationlockedjoint.hh
deleted
100644 → 0
View file @
75b600e1
//
// Copyright (c) CNRS
// Authors: Joseph Mirabel and Heidy Dallard
//
#ifndef HPP_GUI_MANIPULATIONLOCKEDJOINT_HH
#define HPP_GUI_MANIPULATIONLOCKEDJOINT_HH
#include
"hppwidgetsplugin/listjointconstraint.hh"
namespace
hpp
{
namespace
gui
{
class
HppManipulationWidgetsPlugin
;
class
ManipulationLockedJoint
:
public
ListJointConstraint
{
Q_OBJECT
public:
ManipulationLockedJoint
(
HppManipulationWidgetsPlugin
*
plugin
);
virtual
~
ManipulationLockedJoint
();
virtual
QString
getName
()
const
;
virtual
void
operator
()(
QString
const
&
name
);
};
}
}
#endif // HPP_GUI_MANIPULATIONLOCKEDJOINT_HH
plugins/hppmanipulationwidgetsplugin/manipulationncpicker.cc
View file @
48202836
...
...
@@ -9,10 +9,9 @@
namespace
hpp
{
namespace
gui
{
ManipulationNCPicker
::
ManipulationNCPicker
(
QStringList
const
&
names
,
HppManipulationWidgetsPlugin
*
plugin
,
ManipulationNCPicker
::
ManipulationNCPicker
(
HppManipulationWidgetsPlugin
*
plugin
,
QWidget
*
parent
)
:
NumericalConstraintPicker
(
names
,
plugin
,
parent
)
:
NumericalConstraintPicker
(
plugin
,
parent
)
{
listComp_
=
new
QListWidget
(
this
);
hpp
::
GraphComp_var
graphComp
;
...
...
@@ -47,27 +46,27 @@ namespace hpp {
void
ManipulationNCPicker
::
onConfirmClicked
()
{
QList
<
QListWidgetItem
*>
selectedConst
=
ui
->
constraintList
->
selectedItems
();
QList
<
QListWidgetItem
*>
lj
=
ui
->
lockedJointList
->
selectedItems
();
QList
<
QListWidgetItem
*>
nc
=
ui
->
numericalList
->
selectedItems
();
hpp
::
Names_t_var
constraints
=
new
hpp
::
Names_t
;
hpp
::
Names_t_var
locked
=
new
hpp
::
Names_t
;
hpp
::
Names_t_var
dofs
=
new
hpp
::
Names_t
;
QList
<
QListWidgetItem
*>
selectedComp
=
listComp_
->
selectedItems
();
HppManipulationWidgetsPlugin
*
plugin
=
dynamic_cast
<
HppManipulationWidgetsPlugin
*>
(
plugin_
);
constraints
->
length
(
selectedConst
.
count
());
locked
->
length
(
selectedConst
.
count
());
int
iC
=
-
1
;
int
iL
=
-
1
;
foreach
(
QListWidgetItem
*
item
,
selectedConst
)
{
if
(
!
item
->
text
().
startsWith
(
"lock_"
))
{
constraints
[
++
iC
]
=
item
->
text
().
toStdString
().
c_str
();
}
else
{
locked
[
++
iL
]
=
item
->
text
().
toStdString
().
c_str
();
}
constraints
->
length
(
nc
.
count
());
locked
->
length
(
lj
.
count
());
int
i
=
0
;
foreach
(
QListWidgetItem
*
item
,
lj
)
{
locked
[
i
]
=
item
->
text
().
toStdString
().
c_str
();
++
i
;
}
locked
->
length
(
iL
+
1
);
constraints
->
length
(
iC
+
1
);
i
=
0
;
foreach
(
QListWidgetItem
*
item
,
nc
)
{
constraints
[
i
]
=
item
->
text
().
toStdString
().
c_str
();
++
i
;
}
foreach
(
QListWidgetItem
*
item
,
selectedComp
)
{
if
(
constraints
->
length
())
plugin
->
manipClient
()
->
graph
()
->
setNumericalConstraints
(
components_
[
item
->
text
().
toStdString
()].
id
,
...
...
plugins/hppmanipulationwidgetsplugin/manipulationncpicker.hh
View file @
48202836
...
...
@@ -21,7 +21,7 @@ namespace hpp {
virtual
void
onConfirmClicked
();
public:
ManipulationNCPicker
(
QStringList
const
&
names
,
HppManipulationWidgetsPlugin
*
plugin
,
ManipulationNCPicker
(
HppManipulationWidgetsPlugin
*
plugin
,
QWidget
*
parent
=
0
);
virtual
~
ManipulationNCPicker
();
...
...
plugins/hppwidgetsplugin/constraintwidget.cc
View file @
48202836
...
...
@@ -77,12 +77,7 @@ namespace hpp {
void
ConstraintWidget
::
confirmNumerical
()
{
QStringList
l
;
for
(
int
i
=
0
;
i
<
ui
->
nameList
->
count
();
i
++
)
{
QListWidgetItem
*
item
=
ui
->
nameList
->
item
(
i
);
l
<<
item
->
text
();
}
NumericalConstraintPicker
*
ncp
=
new
NumericalConstraintPicker
(
l
,
plugin_
);
NumericalConstraintPicker
*
ncp
=
new
NumericalConstraintPicker
(
plugin_
);
ncp
->
show
();
}
...
...
plugins/hppwidgetsplugin/hppwidgetsplugin.cc
View file @
48202836
...
...
@@ -150,6 +150,7 @@ namespace hpp {
main
->
registerSlot
(
"lengthBetweenRefresh"
,
pathPlayer_
);
main
->
registerSlot
(
"getCurrentPath"
,
pathPlayer_
);
main
->
registerSlot
(
"getHppIIOPurl"
,
this
);
main
->
registerSlot
(
"getHppContext"
,
this
);
main
->
registerSlot
(
"getSelectedJoint"
,
jointTreeWidget_
);
main
->
registerSignal
(
SIGNAL
(
appliedConfigAtParam
(
int
,
double
)),
pathPlayer_
);
...
...
@@ -226,12 +227,20 @@ namespace hpp {
return
gepetto
::
gui
::
omniOrb
::
IIOPurl
(
host
,
port
);
}
QString
HppWidgetsPlugin
::
getHppContext
()
const
{
QString
context
=
gepetto
::
gui
::
MainWindow
::
instance
()
->
settings_
->
getSetting
(
"hpp/context"
,
QString
()).
toString
();
return
context
;
}
void
HppWidgetsPlugin
::
openConnection
()
{
closeConnection
();
hpp_
=
new
hpp
::
corbaServer
::
Client
(
0
,
0
);
QByteArray
iiop
=
getHppIIOPurl
().
toLatin1
();
hpp_
->
connect
(
iiop
.
constData
());
QByteArray
iiop
=
getHppIIOPurl
().
toLatin1
();
QByteArray
context
=
getHppContext
().
toLatin1
();
hpp_
->
connect
(
iiop
.
constData
(),
context
.
constData
());
}
void
HppWidgetsPlugin
::
closeConnection
()
...
...
plugins/hppwidgetsplugin/hppwidgetsplugin.hh
View file @
48202836
...
...
@@ -123,6 +123,8 @@ signals:
QString
getHppIIOPurl
()
const
;
QString
getHppContext
()
const
;
public:
/// Get the corbaserver client.
HppClient
*
client
()
const
;
...
...
plugins/hppwidgetsplugin/jointtreewidget.cc
View file @
48202836
...
...
@@ -11,6 +11,7 @@
#include
"hppwidgetsplugin/ui_jointtreewidget.h"
#include
<gepetto/gui/mainwindow.hh>
#include
<gepetto/gui/bodytreewidget.hh>
#include
<gepetto/gui/windows-manager.hh>
#include
<gepetto/gui/action-search-bar.hh>
#if GEPETTO_GUI_HAS_PYTHONQT
...
...
@@ -49,6 +50,8 @@ namespace hpp {
SLOT
(
customContextMenu
(
QPoint
)));
connect
(
ui_
->
jointTree
,
SIGNAL
(
expanded
(
QModelIndex
)),
SLOT
(
resize
(
QModelIndex
)));
connect
(
ui_
->
jointTree
->
selectionModel
(),
SIGNAL
(
currentChanged
(
QModelIndex
,
QModelIndex
)),
SLOT
(
currentJointChanged
(
QModelIndex
,
QModelIndex
)));
}
JointTreeWidget
::~
JointTreeWidget
()
...
...
@@ -257,5 +260,26 @@ namespace hpp {
Q_UNUSED
(
index
);
ui_
->
jointTree
->
resizeColumnToContents
(
0
);
}
void
JointTreeWidget
::
currentJointChanged
(
const
QModelIndex
&
current
,
const
QModelIndex
&
previous
)
{
Q_UNUSED
(
previous
);
if
(
current
.
isValid
())
{
JointTreeItem
*
item
=
dynamic_cast
<
JointTreeItem
*>
(
model_
->
itemFromIndex
(
current
));
if
(
item
==
NULL
)
return
;
HppWidgetsPlugin
::
JointMap
::
const_iterator
itj
=
plugin_
->
jointMap
().
find
(
item
->
name
());
if
(
itj
==
plugin_
->
jointMap
().
constEnd
())
return
;
const
HppWidgetsPlugin
::
JointElement
&
je
=
itj
.
value
();
MainWindow
*
main
=
MainWindow
::
instance
();
for
(
std
::
size_t
i
=
0
;
i
<
je
.
bodyNames
.
size
();
++
i
)
{
main
->
bodyTree
()
->
selectBodyByName
(
je
.
bodyNames
[
i
]);
}
}
}
}
// namespace gui
}
// namespace hpp
plugins/hppwidgetsplugin/jointtreewidget.hh
View file @
48202836
...
...
@@ -65,6 +65,10 @@ signals:
private
slots
:
void
resize
(
const
QModelIndex
index
);
/// Connected to signal "currentChanged" of the selection model of the
/// joint tree view.
void
currentJointChanged
(
const
QModelIndex
&
current
,
const
QModelIndex
&
previous
);
private:
void
initSearchActions
();
...
...
plugins/hppwidgetsplugin/listjointconstraint.cc
View file @
48202836
...
...
@@ -61,25 +61,15 @@ namespace hpp {
void
LockedJointConstraint
::
operator
()(
QString
const
&
)
{
QList
<
QListWidgetItem
*>
selected
=
jointList_
->
selectedItems
();
std
::
size_t
len
(
0
);
std
::
vector
<
std
::
string
>
lockedJointName
;
foreach
(
QListWidgetItem
*
item
,
selected
)
{
std
::
string
jointName
=
item
->
text
().
toStdString
();
lockedJointName
.
push_back
(
std
::
string
(
"lock
ed
_"
)
+
jointName
)
;
hpp
::
floatSeq_var
config
=
plugin_
->
client
()
->
rob
ot
()
->
getJointConfig
(
joint
Name
.
c_str
()
);
plugin_
->
client
()
->
problem
()
->
createLockedJoint
(
lockedJointName
.
back
().
c_str
(),
jointName
.
c_str
(),
config
.
in
());
++
len
;
std
::
string
jointName
=
item
->
text
().
toStdString
();
std
::
string
lockName
=
"lock_"
+
jointName
;
hpp
::
floatSeq_var
config
=
plugin_
->
client
()
->
robot
()
->
getJointConfig
(
jointName
.
c_str
());
plugin_
->
client
()
->
p
rob
lem
()
->
createLockedJoint
(
lock
Name
.
c_str
()
,
jointName
.
c_str
(),
config
.
in
());
emit
constraintCreated
(
lockName
.
c_str
())
;
}
char
**
nameList
=
hpp
::
Names_t
::
allocbuf
((
CORBA
::
ULong
)
len
);
Names_t
names
((
CORBA
::
ULong
)
len
,
(
CORBA
::
ULong
)
len
,
nameList
);
for
(
std
::
size_t
i
=
0
;
i
<
len
;
++
i
)
{
nameList
[
i
]
=
const_cast
<
char
*>
(
lockedJointName
[
i
].
c_str
());
}
plugin_
->
client
()
->
problem
()
->
setLockedJointConstraints
(
"config-projector"
,
names
);
delete
nameList
;
}
}
}
plugins/hppwidgetsplugin/numericalconstraintpicker.cc
View file @
48202836
...
...
@@ -13,17 +13,25 @@
namespace
hpp
{
namespace
gui
{
NumericalConstraintPicker
::
NumericalConstraintPicker
(
QStringList
const
&
names
,
HppWidgetsPlugin
*
plugin
,
NumericalConstraintPicker
::
NumericalConstraintPicker
(
HppWidgetsPlugin
*
plugin
,
QWidget
*
parent
)
:
QWidget
(
parent
),
ui
(
new
Ui
::
NumericalConstraintPicker
)
{
ui
->
setupUi
(
this
);
ui
->
constraintList
->
setSelectionMode
(
QAbstractItemView
::
ExtendedSelection
);
foreach
(
QString
name
,
names
)
{
ui
->
constraintList
->
addItem
(
name
);
hpp
::
Names_t_var
names
=
plugin
->
client
()
->
problem
()
->
getAvailable
(
"lockedjoint"
);
ui
->
lockedJointList
->
setSelectionMode
(
QAbstractItemView
::
ExtendedSelection
);
for
(
unsigned
i
=
0
;
i
<
names
->
length
();
++
i
)
{
ui
->
lockedJointList
->
addItem
(
QString
(
names
[
i
]));
}
names
=
plugin
->
client
()
->
problem
()
->
getAvailable
(
"numericalconstraint"
);
ui
->
numericalList
->
setSelectionMode
(
QAbstractItemView
::
ExtendedSelection
);
for
(
unsigned
i
=
0
;
i
<
names
->
length
();
++
i
)
{
ui
->
numericalList
->
addItem
(
QString
(
names
[
i
]));
}
connect
(
ui
->
cancelButton
,
SIGNAL
(
clicked
()),
SLOT
(
onCancelClicked
()));
connect
(
ui
->
confirmButton
,
SIGNAL
(
clicked
()),
SLOT
(
onConfirmClicked
()));
plugin_
=
plugin
;
...
...
@@ -48,20 +56,31 @@ namespace hpp {
void
NumericalConstraintPicker
::
onConfirmClicked
()
{
QList
<
QListWidgetItem
*>
list
=
ui
->
constraintList
->
selectedItems
();
QList
<
QListWidgetItem
*>
lj
=
ui
->
lockedJointList
->
selectedItems
();
QList
<
QListWidgetItem
*>
nc
=
ui
->
numericalList
->
selectedItems
();
hpp
::
Names_t_var
names
=
new
hpp
::
Names_t
;
hpp
::
intSeq_var
priorities
=
new
hpp
::
intSeq
;
names
->
length
(
list
.
count
());
priorities
->
length
(
list
.
count
());
names
->
length
(
nc
.
count
());
priorities
->
length
(
nc
.
count
());
int
i
=
0
;
foreach
(
QListWidgetItem
*
item
,
list
)
{
foreach
(
QListWidgetItem
*
item
,
nc
)
{
names
[
i
]
=
gepetto
::
gui
::
Traits
<
QString
>::
to_corba
(
item
->
text
());
priorities
[
i
]
=
0
;
i
++
;
}
plugin_
->
client
()
->
problem
()
->
set
NumericalConstraints
(
gepetto
::
gui
::
Traits
<
QString
>::
to_corba
(
ui
->
numerical
Name
->
text
()),
plugin_
->
client
()
->
problem
()
->
add
NumericalConstraints
(
gepetto
::
gui
::
Traits
<
QString
>::
to_corba
(
ui
->
constraint
Name
->
text
()),
names
.
in
(),
priorities
.
in
());
names
->
length
(
lj
.
count
());
i
=
0
;
foreach
(
QListWidgetItem
*
item
,
lj
)
{
names
[
i
]
=
gepetto
::
gui
::
Traits
<
QString
>::
to_corba
(
item
->
text
());
i
++
;
}
plugin_
->
client
()
->
problem
()
->
addLockedJointConstraints
(
gepetto
::
gui
::
Traits
<
QString
>::
to_corba
(
ui
->
constraintName
->
text
()),
names
.
in
());
onCancelClicked
();
}
}
...
...
plugins/hppwidgetsplugin/numericalconstraintpicker.hh
View file @
48202836
...
...
@@ -32,7 +32,7 @@ namespace hpp {
void
closeEvent
(
QCloseEvent
*
event
);
public:
explicit
NumericalConstraintPicker
(
QStringList
const
&
names
,
HppWidgetsPlugin
*
plugin
,
explicit
NumericalConstraintPicker
(
HppWidgetsPlugin
*
plugin
,
QWidget
*
parent
=
0
);
virtual
~
NumericalConstraintPicker
();
...
...
plugins/hppwidgetsplugin/numericalconstraintpicker.ui
View file @
48202836
...
...
@@ -17,26 +17,40 @@
<item>
<layout
class=
"QFormLayout"
name=
"formLayout"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"
l
abel
_2
"
>
<widget
class=
"QLabel"
name=
"
constraintL
abel"
>
<property
name=
"text"
>
<string>
Name
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"numericalName"
/>
<widget
class=
"QLineEdit"
name=
"constraintName"
>
<property
name=
"text"
>
<string>
constraint
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<widget
class=
"QLabel"
name=
"lockedJointLabel"
>
<property
name=
"text"
>
<string>
Select the locked joint constraints:
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QListWidget"
name=
"lockedJointList"
/>
</item>
<item>
<widget
class=
"QLabel"
name=
"numericalLabel"
>
<property
name=
"text"
>
<string>
Select the
constraint you want to add
</string>
<string>
Select the
numerical constraints:
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QListWidget"
name=
"
constraint
List"
/>
<widget
class=
"QListWidget"
name=
"
numerical
List"
/>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
...
...
plugins/plugintest/CMakeLists.txt
deleted
100644 → 0
View file @
75b600e1
#
# Copyright (c) 2015 CNRS
# Authors: Joseph Mirabel
#
#
# This file is part of hpp-gui
# hpp-gui is free software: you can redistribute it
# and/or modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, either version
# 3 of the License, or (at your option) any later version.
#
# hpp-gui is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# hpp-gui If not, see
# <http://www.gnu.org/licenses/>.
SET
(
PLUGIN_NAME plugintest
)
SET
(
${
PLUGIN_NAME
}
_HEADERS_NO_MOC
../../include/hpp/gui/plugin-interface.hh
)
SET
(
${
PLUGIN_NAME
}
_HEADERS
test.hh
)
SET
(
${
PLUGIN_NAME
}
_FORMS
)
SET
(
${
PLUGIN_NAME
}
_RESOURCES
)
QT4_WRAP_CPP
(
${
PLUGIN_NAME
}
_HEADERS_MOC
${${
PLUGIN_NAME
}
_HEADERS
}
OPTIONS -I
${
GEPETTO_VIEWER_CORBA_INCLUDEDIR
}
)
QT4_WRAP_UI
(
${
PLUGIN_NAME
}
_FORMS_HEADERS
${${
PLUGIN_NAME
}
_FORMS
}
)
QT4_ADD_RESOURCES
(
${
PLUGIN_NAME
}
_RESOURCES_RCC
${${
PLUGIN_NAME
}
_RESOURCES
}
)
INCLUDE_DIRECTORIES
(
${
CMAKE_CURRENT_SOURCE_DIR
}
)
INCLUDE
(
${
QT_USE_FILE
}
)
ADD_DEFINITIONS
(
${
QT_DEFINITIONS
}
)
ADD_DEFINITIONS
(
-DQT_PLUGIN
)
ADD_DEFINITIONS
(
-DQT_NO_DEBUG
)
ADD_DEFINITIONS
(
-DQT_SHARED
)
SET
(
${
PLUGIN_NAME
}
_SOURCES
test.cc
)
ADD_LIBRARY
(
${
PLUGIN_NAME
}
SHARED
${${
PLUGIN_NAME
}
_SOURCES
}
${${
PLUGIN_NAME
}
_HEADERS_NO_MOC
}
${${
PLUGIN_NAME
}
_HEADERS_MOC
}
${${
PLUGIN_NAME
}
_FORMS_HEADERS
}
${${
PLUGIN_NAME
}
_RESOURCES_RCC
}
)
TARGET_LINK_LIBRARIES
(
${
PLUGIN_NAME
}
${
QT_LIBRARIES
}
)
# Uncomment to install
#INSTALL(TARGETS ${PLUGIN_NAME} DESTINATION lib)
plugins/plugintest/test.cc
deleted
100644 → 0
View file @
75b600e1
//
// Copyright (c) CNRS
// Authors: Joseph Mirabel
//
#include
<test.hh>
#include
<QtPlugin>
namespace
hpp
{
namespace
gui
{
void
TestPlugin
::
init
()
{
qDebug
()
<<
"test"
;
std
::
cout
<<
"test"
<<
std
::
endl
;
}
Q_EXPORT_PLUGIN2
(
testplugin
,
TestPlugin
)
}
// namespace gui
}
// namespace hpp
plugins/plugintest/test.hh
deleted
100644 → 0
View file @
75b600e1
//
// Copyright (c) CNRS
// Author: Joseph Mirabel
//
#include
<QObject>
#include
<QWidget>
#include
<iostream>
#include
<gepetto/gui/plugin-interface.hh>
namespace
hpp
{
namespace
gui
{
class
TestPlugin
:
public
QObject
,
public
PluginInterface
{
Q_OBJECT
Q_INTERFACES
(
PluginInterface
)
public:
void
init
();
};
}
// namespace gui
}
// namespace hpp
Prev
1
2
Next
Write
Preview