improve the ui for the collision list a tad
This commit is contained in:
parent
241f7ff075
commit
29a745a6ec
@ -3,6 +3,8 @@
|
|||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QDoubleSpinBox>
|
#include <QDoubleSpinBox>
|
||||||
#include <QFormLayout>
|
#include <QFormLayout>
|
||||||
|
#include <QGroupBox>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
|
|
||||||
SettingsPane::SettingsPane(QWidget *parent)
|
SettingsPane::SettingsPane(QWidget *parent)
|
||||||
@ -25,14 +27,21 @@ SettingsPane::SettingsPane(QWidget *parent)
|
|||||||
layout->addRow("Taille de la sphère de collision", sphere_radius);
|
layout->addRow("Taille de la sphère de collision", sphere_radius);
|
||||||
layout->addRow("Afficher les trajectoires", show_trajectories);
|
layout->addRow("Afficher les trajectoires", show_trajectories);
|
||||||
layout->addRow("Afficher les lignes de support", show_support_lines);
|
layout->addRow("Afficher les lignes de support", show_support_lines);
|
||||||
layout->addRow(collisions);
|
QGroupBox *box = new QGroupBox();
|
||||||
|
box->setTitle("Collisions");
|
||||||
|
box->setFlat(true);
|
||||||
|
box->setAlignment(Qt::AlignHCenter);
|
||||||
|
QVBoxLayout *box_layout = new QVBoxLayout();
|
||||||
|
box_layout->addWidget(collisions);
|
||||||
|
box->setLayout(box_layout);
|
||||||
|
layout->addRow(box);
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SettingsPane::addCollision(int idA, int idB, int frame) {
|
void SettingsPane::addCollision(int idA, int idB, int frame) {
|
||||||
CollisionItem *item = new CollisionItem(QString::number(frame) + ": "
|
CollisionItem *item = new CollisionItem("Frame " + QString::number(frame) + ": #"
|
||||||
+ QString::number(idA) + " / " + QString::number(idB),
|
+ QString::number(idA) + " et #" + QString::number(idB),
|
||||||
frame);
|
frame);
|
||||||
item->setFlags(Qt::ItemIsEnabled | Qt::ItemNeverHasChildren);
|
item->setFlags(Qt::ItemIsEnabled | Qt::ItemNeverHasChildren);
|
||||||
collisions->addItem(item);
|
collisions->addItem(item);
|
||||||
|
Loading…
Reference in New Issue
Block a user