mirror of https://github.com/CGAL/cgal
display skeleton widget only once
This commit is contained in:
parent
3113b619a7
commit
e36ae9666b
|
|
@ -123,6 +123,36 @@ public:
|
||||||
actionConvert_to_medial_skeleton->setObjectName("actionConvert_to_medial_skeleton");
|
actionConvert_to_medial_skeleton->setObjectName("actionConvert_to_medial_skeleton");
|
||||||
|
|
||||||
Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
|
Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface);
|
||||||
|
|
||||||
|
dockWidget = new QDockWidget(mw);
|
||||||
|
dockWidget->setVisible(false);
|
||||||
|
ui = new Ui::Mean_curvature_flow_skeleton_plugin();
|
||||||
|
ui->setupUi(dockWidget);
|
||||||
|
dockWidget->setFeatures(QDockWidget::DockWidgetMovable
|
||||||
|
| QDockWidget::DockWidgetFloatable
|
||||||
|
| QDockWidget::DockWidgetClosable);
|
||||||
|
dockWidget->setWindowTitle("Mean Curvature Flow Skeleton");
|
||||||
|
add_dock_widget(dockWidget);
|
||||||
|
|
||||||
|
connect(ui->pushButton_contract, SIGNAL(clicked()),
|
||||||
|
this, SLOT(on_actionContract()));
|
||||||
|
connect(ui->pushButton_collapse, SIGNAL(clicked()),
|
||||||
|
this, SLOT(on_actionCollapse()));
|
||||||
|
connect(ui->pushButton_split, SIGNAL(clicked()),
|
||||||
|
this, SLOT(on_actionSplit()));
|
||||||
|
connect(ui->pushButton_degeneracy, SIGNAL(clicked()),
|
||||||
|
this, SLOT(on_actionDegeneracy()));
|
||||||
|
connect(ui->pushButton_run, SIGNAL(clicked()),
|
||||||
|
this, SLOT(on_actionRun()));
|
||||||
|
connect(ui->pushButton_skeletonize, SIGNAL(clicked()),
|
||||||
|
this, SLOT(on_actionSkeletonize()));
|
||||||
|
connect(ui->pushButton_converge, SIGNAL(clicked()),
|
||||||
|
this, SLOT(on_actionConverge()));
|
||||||
|
connect(dynamic_cast<Scene*>(scene), SIGNAL(updated_bbox()),
|
||||||
|
this, SLOT(on_actionUpdateBBox()));
|
||||||
|
connect(ui->pushButton_segment, SIGNAL(clicked()),
|
||||||
|
this, SLOT(on_actionSegment()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QAction*> actions() const {
|
QList<QAction*> actions() const {
|
||||||
|
|
@ -347,6 +377,9 @@ private:
|
||||||
|
|
||||||
void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionMCFSkeleton_triggered()
|
void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionMCFSkeleton_triggered()
|
||||||
{
|
{
|
||||||
|
dockWidget->show();
|
||||||
|
dockWidget->raise();
|
||||||
|
|
||||||
const Scene_interface::Item_id index = scene->mainSelectionIndex();
|
const Scene_interface::Item_id index = scene->mainSelectionIndex();
|
||||||
|
|
||||||
Scene_polyhedron_item* item =
|
Scene_polyhedron_item* item =
|
||||||
|
|
@ -358,36 +391,6 @@ void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionMCFSkeleton_t
|
||||||
|
|
||||||
if(!pMesh) return;
|
if(!pMesh) return;
|
||||||
|
|
||||||
dockWidget = new QDockWidget(mw);
|
|
||||||
ui = new Ui::Mean_curvature_flow_skeleton_plugin();
|
|
||||||
ui->setupUi(dockWidget);
|
|
||||||
dockWidget->setFeatures(QDockWidget::DockWidgetMovable
|
|
||||||
| QDockWidget::DockWidgetFloatable
|
|
||||||
| QDockWidget::DockWidgetClosable);
|
|
||||||
dockWidget->setWindowTitle("Mean Curvature Flow Skeleton");
|
|
||||||
mw->addDockWidget(Qt::LeftDockWidgetArea, dockWidget);
|
|
||||||
dockWidget->show();
|
|
||||||
dockWidget->raise();
|
|
||||||
|
|
||||||
connect(ui->pushButton_contract, SIGNAL(clicked()),
|
|
||||||
this, SLOT(on_actionContract()));
|
|
||||||
connect(ui->pushButton_collapse, SIGNAL(clicked()),
|
|
||||||
this, SLOT(on_actionCollapse()));
|
|
||||||
connect(ui->pushButton_split, SIGNAL(clicked()),
|
|
||||||
this, SLOT(on_actionSplit()));
|
|
||||||
connect(ui->pushButton_degeneracy, SIGNAL(clicked()),
|
|
||||||
this, SLOT(on_actionDegeneracy()));
|
|
||||||
connect(ui->pushButton_run, SIGNAL(clicked()),
|
|
||||||
this, SLOT(on_actionRun()));
|
|
||||||
connect(ui->pushButton_skeletonize, SIGNAL(clicked()),
|
|
||||||
this, SLOT(on_actionSkeletonize()));
|
|
||||||
connect(ui->pushButton_converge, SIGNAL(clicked()),
|
|
||||||
this, SLOT(on_actionConverge()));
|
|
||||||
connect(dynamic_cast<Scene*>(scene), SIGNAL(updated_bbox()),
|
|
||||||
this, SLOT(on_actionUpdateBBox()));
|
|
||||||
connect(ui->pushButton_segment, SIGNAL(clicked()),
|
|
||||||
this, SLOT(on_actionSegment()));
|
|
||||||
|
|
||||||
double diag = scene->len_diagonal();
|
double diag = scene->len_diagonal();
|
||||||
init_ui(diag);
|
init_ui(diag);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue