Skip to content

Commit 564cb1c

Browse files
committed
pre-commit run -a
1 parent ac2ee55 commit 564cb1c

File tree

3 files changed

+71
-71
lines changed

3 files changed

+71
-71
lines changed

plugins/hppcorbaserverplugin/hppserverprocess.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace hpp {
1212
namespace gui {
13-
HppServerProcess::HppServerProcess(hpp::corbaServer::Server *server)
13+
HppServerProcess::HppServerProcess(hpp::corbaServer::Server* server)
1414
: server_(server) {}
1515

1616
HppServerProcess::~HppServerProcess() { delete server_; }

plugins/hppmanipulationwidgetsplugin/linkwidget.cc

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,29 @@
1212

1313
namespace hpp {
1414
namespace gui {
15-
LinkWidget::LinkWidget(QListWidget *grippersList, QListWidget *handlesList,
16-
QWidget *parent)
15+
LinkWidget::LinkWidget(QListWidget* grippersList, QListWidget* handlesList,
16+
QWidget* parent)
1717
: QWidget(parent), ui_(new Ui::LinkWidget) {
1818
ui_->setupUi(this);
1919
grippers_ = grippersList;
2020
handles_ = handlesList;
2121

2222
connect(ui_->createButton, SIGNAL(clicked()), SLOT(createRule()));
2323

24-
QShortcut *shortcut =
24+
QShortcut* shortcut =
2525
new QShortcut(QKeySequence(Qt::Key_Delete), ui_->rulesList);
2626
connect(shortcut, SIGNAL(activated()), this, SLOT(deleteSelectedRules()));
2727

2828
ui_->rulesList->setSelectionMode(QAbstractItemView::ExtendedSelection);
2929

3030
connect(
3131
grippersList->selectionModel(),
32-
SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
33-
SLOT(gripperChanged(const QItemSelection &, const QItemSelection &)));
32+
SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
33+
SLOT(gripperChanged(const QItemSelection&, const QItemSelection&)));
3434
connect(
3535
handlesList->selectionModel(),
36-
SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
37-
SLOT(handleChanged(const QItemSelection &, const QItemSelection &)));
36+
SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
37+
SLOT(handleChanged(const QItemSelection&, const QItemSelection&)));
3838

3939
ui_->handlesList->addItem(".*");
4040
ui_->handlesList->addItem("");
@@ -47,7 +47,7 @@ Rules_var LinkWidget::getRules() {
4747
rules->length(rules_.size());
4848

4949
int i = 0;
50-
foreach (const RuleProxy &rule, rules_) {
50+
foreach (const RuleProxy& rule, rules_) {
5151
rules[i].grippers.length(rule.grippers.size());
5252
rules[i].handles.length(rule.handles.size());
5353
for (int j = 0; j < rule.grippers.size(); ++j) {
@@ -66,38 +66,38 @@ Rules_var LinkWidget::getRules() {
6666
return rules;
6767
}
6868

69-
void LinkWidget::gripperChanged(const QItemSelection &selected,
70-
const QItemSelection &deselected) {
69+
void LinkWidget::gripperChanged(const QItemSelection& selected,
70+
const QItemSelection& deselected) {
7171
foreach (QModelIndex idx, selected.indexes()) {
7272
ui_->grippersList->addItem(grippers_->item(idx.row())->text());
7373
}
7474
foreach (QModelIndex idx, deselected.indexes()) {
75-
QList<QListWidgetItem *> list = ui_->grippersList->findItems(
75+
QList<QListWidgetItem*> list = ui_->grippersList->findItems(
7676
grippers_->item(idx.row())->text(), Qt::MatchExactly);
7777
delete ui_->grippersList->takeItem(ui_->grippersList->row(list.front()));
7878
}
7979
}
8080

81-
void LinkWidget::handleChanged(const QItemSelection &selected,
82-
const QItemSelection &deselected) {
81+
void LinkWidget::handleChanged(const QItemSelection& selected,
82+
const QItemSelection& deselected) {
8383
foreach (QModelIndex idx, selected.indexes()) {
8484
ui_->handlesList->addItem(handles_->item(idx.row())->text());
8585
}
8686
foreach (QModelIndex idx, deselected.indexes()) {
87-
QList<QListWidgetItem *> list = ui_->handlesList->findItems(
87+
QList<QListWidgetItem*> list = ui_->handlesList->findItems(
8888
handles_->item(idx.row())->text(), Qt::MatchExactly);
8989
delete ui_->handlesList->takeItem(ui_->handlesList->row(list.front()));
9090
}
9191
}
9292

9393
void LinkWidget::createRule() {
94-
QList<QListWidgetItem *> grippers = ui_->grippersList->selectedItems();
95-
QList<QListWidgetItem *> handles = ui_->handlesList->selectedItems();
94+
QList<QListWidgetItem*> grippers = ui_->grippersList->selectedItems();
95+
QList<QListWidgetItem*> handles = ui_->handlesList->selectedItems();
9696

97-
foreach (QListWidgetItem *gripper, grippers) {
98-
foreach (QListWidgetItem *handle, handles) {
97+
foreach (QListWidgetItem* gripper, grippers) {
98+
foreach (QListWidgetItem* handle, handles) {
9999
rules_.push_back(RuleProxy());
100-
RuleProxy &rule = rules_.back();
100+
RuleProxy& rule = rules_.back();
101101

102102
QString gripperName = gripper->text();
103103
QString handleName = handle->text();
@@ -115,7 +115,7 @@ void LinkWidget::createRule() {
115115
}
116116

117117
void LinkWidget::deleteSelectedRules() {
118-
foreach (QListWidgetItem *item, ui_->rulesList->selectedItems()) {
118+
foreach (QListWidgetItem* item, ui_->rulesList->selectedItems()) {
119119
for (int row = 0; row < ui_->rulesList->count(); ++row)
120120
if (item == ui_->rulesList->item(row)) {
121121
rules_.remove(row);

plugins/hppwidgetsplugin/joint-tree-item.cc

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ const int JointTreeItem::LowerBoundRole = Qt::UserRole + 2;
3030
const int JointTreeItem::UpperBoundRole = Qt::UserRole + 3;
3131
const int JointTreeItem::TypeRole = Qt::UserRole + 10;
3232

33-
JointTreeItem::JointTreeItem(const char *name, const ULong &idxQ,
34-
const ULong &idxV, const hpp::floatSeq &q,
35-
const hpp::floatSeq &b, const ULong &nbDof,
36-
const NodesPtr_t &nodes)
33+
JointTreeItem::JointTreeItem(const char* name, const ULong& idxQ,
34+
const ULong& idxV, const hpp::floatSeq& q,
35+
const hpp::floatSeq& b, const ULong& nbDof,
36+
const NodesPtr_t& nodes)
3737
: QStandardItem(QString(name)),
3838
name_(name),
3939
idxQ_(idxQ),
@@ -45,11 +45,11 @@ JointTreeItem::JointTreeItem(const char *name, const ULong &idxQ,
4545
setData((int)-1, IndexRole);
4646
setData(SkipType, TypeRole);
4747
for (size_t i = 0; i < nq_; ++i) {
48-
QStandardItem *joint = new QStandardItem;
49-
QStandardItem *upper = new QStandardItem;
50-
QStandardItem *lower = new QStandardItem;
48+
QStandardItem* joint = new QStandardItem;
49+
QStandardItem* upper = new QStandardItem;
50+
QStandardItem* lower = new QStandardItem;
5151
joint->setData(static_cast<int>(i), IndexRole);
52-
QList<QStandardItem *> row;
52+
QList<QStandardItem*> row;
5353
row << joint << lower << upper;
5454
value_.append(row);
5555
appendRow(row);
@@ -60,7 +60,7 @@ JointTreeItem::JointTreeItem(const char *name, const ULong &idxQ,
6060

6161
JointTreeItem::~JointTreeItem() { qDeleteAll(actions_); }
6262

63-
QStandardItem *JointTreeItem::clone() const {
63+
QStandardItem* JointTreeItem::clone() const {
6464
hpp::floatSeq q = hpp::floatSeq();
6565
q.length(value_.size());
6666
hpp::floatSeq b = hpp::floatSeq();
@@ -91,23 +91,23 @@ hpp::floatSeq JointTreeItem::bounds() const {
9191
return b;
9292
}
9393

94-
void JointTreeItem::updateConfig(const hpp::floatSeq &c) {
94+
void JointTreeItem::updateConfig(const hpp::floatSeq& c) {
9595
assert((int)c.length() == value_.size());
9696
for (int i = 0; i < value_.size(); ++i)
9797
value_[i][0]->setData(c[i], Qt::EditRole);
9898
}
9999

100-
void JointTreeItem::updateFromRobotConfig(const hpp::floatSeq &rc) {
100+
void JointTreeItem::updateFromRobotConfig(const hpp::floatSeq& rc) {
101101
assert(idxQ_ + value_.size() <= rc.length());
102102
for (int i = 0; i < value_.size(); ++i)
103103
value_[i][0]->setData(rc[(int)idxQ_ + i], Qt::EditRole);
104104
}
105105

106-
void JointTreeItem::updateBounds(const hpp::floatSeq &b) {
106+
void JointTreeItem::updateBounds(const hpp::floatSeq& b) {
107107
assert((int)b.length() == 2 * value_.size());
108108
for (int i = 0; i < value_.size(); ++i) {
109-
QStandardItem *lower = value_[i][1];
110-
QStandardItem *upper = value_[i][2];
109+
QStandardItem* lower = value_[i][1];
110+
QStandardItem* upper = value_[i][2];
111111
lower->setData(BoundType, TypeRole);
112112
upper->setData(BoundType, TypeRole);
113113
lower->setData(b[2 * i], Qt::EditRole);
@@ -139,8 +139,8 @@ void JointTreeItem::updateTypeRole() {
139139
}
140140
}
141141

142-
void JointTreeItem::setupActions(HppWidgetsPlugin *plugin) {
143-
JointAction *a;
142+
void JointTreeItem::setupActions(HppWidgetsPlugin* plugin) {
143+
JointAction* a;
144144

145145
a = new JointAction(QObject::tr("Move &joint..."), name_, 0);
146146
plugin->jointTreeWidget()->connect(a, SIGNAL(triggered(std::string)),
@@ -174,33 +174,33 @@ void JointTreeItem::setupActions(HppWidgetsPlugin *plugin) {
174174
actions_.append(a);
175175
}
176176

177-
const QList<QAction *> &JointTreeItem::actions() const { return actions_; }
177+
const QList<QAction*>& JointTreeItem::actions() const { return actions_; }
178178

179-
JointItemDelegate::JointItemDelegate(QPushButton *forceVelocity,
180-
HppWidgetsPlugin *plugin,
181-
gepetto::gui::MainWindow *parent)
179+
JointItemDelegate::JointItemDelegate(QPushButton* forceVelocity,
180+
HppWidgetsPlugin* plugin,
181+
gepetto::gui::MainWindow* parent)
182182
: QItemDelegate(parent),
183183
main_(parent),
184184
plugin_(plugin),
185185
forceIntegrator_(forceVelocity) {}
186186

187-
void JointItemDelegate::updateTypeRole(JointTreeItem::ItemType &type) const {
187+
void JointItemDelegate::updateTypeRole(JointTreeItem::ItemType& type) const {
188188
if (forceIntegrator_ && forceIntegrator_->isChecked() &&
189189
(type == JointTreeItem::UnboundedValueType ||
190190
type == JointTreeItem::BoundedValueType))
191191
type = JointTreeItem::IntegratorType;
192192
}
193193

194-
QWidget *JointItemDelegate::createEditor(
195-
QWidget *parent, const QStyleOptionViewItem & /*option*/,
196-
const QModelIndex &index) const {
194+
QWidget* JointItemDelegate::createEditor(QWidget* parent,
195+
const QStyleOptionViewItem& /*option*/,
196+
const QModelIndex& index) const {
197197
JointTreeItem::ItemType type =
198198
(JointTreeItem::ItemType)index.data(JointTreeItem::TypeRole).toInt();
199199
updateTypeRole(type);
200-
const QStandardItemModel *m =
201-
static_cast<const QStandardItemModel *>(index.model());
202-
const JointTreeItem *ji =
203-
dynamic_cast<const JointTreeItem *>(m->itemFromIndex(index)->parent());
200+
const QStandardItemModel* m =
201+
static_cast<const QStandardItemModel*>(index.model());
202+
const JointTreeItem* ji =
203+
dynamic_cast<const JointTreeItem*>(m->itemFromIndex(index)->parent());
204204
switch (type) {
205205
case JointTreeItem::SkipType:
206206
return 0;
@@ -217,7 +217,7 @@ QWidget *JointItemDelegate::createEditor(
217217
index.data(JointTreeItem::IndexRole).toInt());
218218
case JointTreeItem::UnboundedValueType:
219219
case JointTreeItem::BoundType: {
220-
QDoubleSpinBox *spinbox = new QDoubleSpinBox(parent);
220+
QDoubleSpinBox* spinbox = new QDoubleSpinBox(parent);
221221
spinbox->setMinimum(-DBL_MAX);
222222
spinbox->setMaximum(DBL_MAX);
223223
spinbox->setSingleStep(0.01);
@@ -229,8 +229,8 @@ QWidget *JointItemDelegate::createEditor(
229229
}
230230
}
231231

232-
void JointItemDelegate::setEditorData(QWidget *editor,
233-
const QModelIndex &index) const {
232+
void JointItemDelegate::setEditorData(QWidget* editor,
233+
const QModelIndex& index) const {
234234
JointTreeItem::ItemType type =
235235
(JointTreeItem::ItemType)index.data(JointTreeItem::TypeRole).toInt();
236236
updateTypeRole(type);
@@ -244,7 +244,7 @@ void JointItemDelegate::setEditorData(QWidget *editor,
244244
return;
245245
case JointTreeItem::UnboundedValueType:
246246
case JointTreeItem::BoundType: {
247-
QDoubleSpinBox *spinbox = static_cast<QDoubleSpinBox *>(editor);
247+
QDoubleSpinBox* spinbox = static_cast<QDoubleSpinBox*>(editor);
248248
spinbox->setValue(q);
249249
break;
250250
}
@@ -253,28 +253,28 @@ void JointItemDelegate::setEditorData(QWidget *editor,
253253
}
254254
}
255255

256-
void JointItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
257-
const QModelIndex &index) const {
256+
void JointItemDelegate::setModelData(QWidget* editor, QAbstractItemModel* model,
257+
const QModelIndex& index) const {
258258
JointTreeItem::ItemType type =
259259
(JointTreeItem::ItemType)index.data(JointTreeItem::TypeRole).toInt();
260260
updateTypeRole(type);
261-
QStandardItemModel *m = static_cast<QStandardItemModel *>(model);
262-
JointTreeItem *ji =
263-
dynamic_cast<JointTreeItem *>(m->itemFromIndex(index)->parent());
261+
QStandardItemModel* m = static_cast<QStandardItemModel*>(model);
262+
JointTreeItem* ji =
263+
dynamic_cast<JointTreeItem*>(m->itemFromIndex(index)->parent());
264264
double q;
265265
switch (type) {
266266
case JointTreeItem::SkipType:
267267
return;
268268
case JointTreeItem::IntegratorType:
269269
return;
270270
case JointTreeItem::BoundedValueType: {
271-
SliderBoundedJoint *slider = static_cast<SliderBoundedJoint *>(editor);
271+
SliderBoundedJoint* slider = static_cast<SliderBoundedJoint*>(editor);
272272
q = slider->getValue();
273273
break;
274274
}
275275
case JointTreeItem::UnboundedValueType:
276276
case JointTreeItem::BoundType: {
277-
QDoubleSpinBox *spinbox = static_cast<QDoubleSpinBox *>(editor);
277+
QDoubleSpinBox* spinbox = static_cast<QDoubleSpinBox*>(editor);
278278
q = spinbox->value();
279279
break;
280280
}
@@ -302,15 +302,15 @@ void JointItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
302302
}
303303

304304
void JointItemDelegate::updateEditorGeometry(
305-
QWidget *editor, const QStyleOptionViewItem &option,
306-
const QModelIndex & /*index*/) const {
305+
QWidget* editor, const QStyleOptionViewItem& option,
306+
const QModelIndex& /*index*/) const {
307307
editor->setGeometry(option.rect);
308308
}
309309

310-
IntegratorWheel::IntegratorWheel(Qt::Orientation o, HppWidgetsPlugin *plugin,
311-
QWidget *parent,
312-
gepetto::gui::MainWindow *main,
313-
JointTreeItem const *item, int index)
310+
IntegratorWheel::IntegratorWheel(Qt::Orientation o, HppWidgetsPlugin* plugin,
311+
QWidget* parent,
312+
gepetto::gui::MainWindow* main,
313+
JointTreeItem const* item, int index)
314314
: QSlider(o, parent),
315315
rate_(100),
316316
main_(main),
@@ -332,7 +332,7 @@ IntegratorWheel::IntegratorWheel(Qt::Orientation o, HppWidgetsPlugin *plugin,
332332
timerId_ = startTimer(rate_);
333333
}
334334

335-
void IntegratorWheel::timerEvent(QTimerEvent *) {
335+
void IntegratorWheel::timerEvent(QTimerEvent*) {
336336
killTimer(timerId_);
337337
if (dq_[index_] != 0) {
338338
hpp::floatSeq_var q = plugin_->client()->robot()->jointIntegrate(
@@ -355,10 +355,10 @@ void IntegratorWheel::updateIntegrator(int value) {
355355
}
356356

357357
SliderBoundedJoint::SliderBoundedJoint(Qt::Orientation orientation,
358-
HppWidgetsPlugin *plugin,
359-
QWidget *parent,
360-
gepetto::gui::MainWindow *main,
361-
JointTreeItem const *item, int index)
358+
HppWidgetsPlugin* plugin,
359+
QWidget* parent,
360+
gepetto::gui::MainWindow* main,
361+
JointTreeItem const* item, int index)
362362
: QSlider(orientation, parent),
363363
main_(main),
364364
plugin_(plugin),

0 commit comments

Comments
 (0)