mirror of https://github.com/CGAL/cgal
Graphicsview demos
This commit is contained in:
parent
a4d5f768fb
commit
8e393c792c
|
|
@ -56,7 +56,7 @@ private:
|
||||||
public:
|
public:
|
||||||
MainWindow();
|
MainWindow();
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
void processInput(CGAL::Object o);
|
void processInput(CGAL::Object o);
|
||||||
|
|
||||||
|
|
@ -72,7 +72,7 @@ public slots:
|
||||||
|
|
||||||
void open(QString fileName);
|
void open(QString fileName);
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -160,7 +160,7 @@ MainWindow::processInput(CGAL::Object o)
|
||||||
as.make_alpha_shape(points.begin(), points.end());
|
as.make_alpha_shape(points.begin(), points.end());
|
||||||
as.set_alpha(alpha);
|
as.set_alpha(alpha);
|
||||||
}
|
}
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -181,7 +181,7 @@ void MainWindow::alphaChanged(int i)
|
||||||
alpha = 0;
|
alpha = 0;
|
||||||
as.set_alpha(0);
|
as.set_alpha(0);
|
||||||
}
|
}
|
||||||
emit (changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -199,7 +199,7 @@ MainWindow::on_actionClear_triggered()
|
||||||
{
|
{
|
||||||
as.clear();
|
as.clear();
|
||||||
points.clear();
|
points.clear();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -236,7 +236,7 @@ MainWindow::on_actionInsertRandomPoints_triggered()
|
||||||
as.set_alpha(alpha);
|
as.set_alpha(alpha);
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -273,7 +273,7 @@ MainWindow::open(QString fileName)
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
actionRecenter->trigger();
|
actionRecenter->trigger();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ include_directories (BEFORE ./include)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ private:
|
||||||
public:
|
public:
|
||||||
MainWindow();
|
MainWindow();
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
void processInput(CGAL::Object o);
|
void processInput(CGAL::Object o);
|
||||||
|
|
||||||
|
|
@ -74,7 +74,7 @@ public slots:
|
||||||
|
|
||||||
virtual void open(QString fileName);
|
virtual void open(QString fileName);
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -144,7 +144,7 @@ MainWindow::processInput(CGAL::Object o)
|
||||||
std::pair<Point_2, double> center_and_sr;
|
std::pair<Point_2, double> center_and_sr;
|
||||||
if(CGAL::assign(center_and_sr, o)){
|
if(CGAL::assign(center_and_sr, o)){
|
||||||
ag.insert(Apollonius_site_2(center_and_sr.first, sqrt(center_and_sr.second)));
|
ag.insert(Apollonius_site_2(center_and_sr.first, sqrt(center_and_sr.second)));
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -162,7 +162,7 @@ void
|
||||||
MainWindow::on_actionClear_triggered()
|
MainWindow::on_actionClear_triggered()
|
||||||
{
|
{
|
||||||
ag.clear();
|
ag.clear();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -204,7 +204,7 @@ MainWindow::on_actionInsertRandomPoints_triggered()
|
||||||
ag.insert(points.begin(), points.end());
|
ag.insert(points.begin(), points.end());
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -238,7 +238,7 @@ MainWindow::open(QString fileName)
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
actionRecenter->trigger();
|
actionRecenter->trigger();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ include_directories (BEFORE ../../include)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ private:
|
||||||
public:
|
public:
|
||||||
MainWindow();
|
MainWindow();
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
void update();
|
void update();
|
||||||
|
|
||||||
|
|
@ -110,7 +110,7 @@ public slots:
|
||||||
|
|
||||||
virtual void open(QString fileName);
|
virtual void open(QString fileName);
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -344,7 +344,7 @@ MainWindow::processInput(CGAL::Object o)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -370,14 +370,14 @@ void
|
||||||
MainWindow::on_actionShowMinCircle_toggled(bool checked)
|
MainWindow::on_actionShowMinCircle_toggled(bool checked)
|
||||||
{
|
{
|
||||||
cgi->setVisible(checked);
|
cgi->setVisible(checked);
|
||||||
emit (changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MainWindow::on_actionShowMinEllipse_toggled(bool checked)
|
MainWindow::on_actionShowMinEllipse_toggled(bool checked)
|
||||||
{
|
{
|
||||||
egi->setVisible(checked);
|
egi->setVisible(checked);
|
||||||
emit (changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -385,21 +385,21 @@ void
|
||||||
MainWindow::on_actionShowMinRectangle_toggled(bool checked)
|
MainWindow::on_actionShowMinRectangle_toggled(bool checked)
|
||||||
{
|
{
|
||||||
min_rectangle_gi->setVisible(checked);
|
min_rectangle_gi->setVisible(checked);
|
||||||
emit (changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MainWindow::on_actionShowMinParallelogram_toggled(bool checked)
|
MainWindow::on_actionShowMinParallelogram_toggled(bool checked)
|
||||||
{
|
{
|
||||||
min_parallelogram_gi->setVisible(checked);
|
min_parallelogram_gi->setVisible(checked);
|
||||||
emit (changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MainWindow::on_actionShowConvexHull_toggled(bool checked)
|
MainWindow::on_actionShowConvexHull_toggled(bool checked)
|
||||||
{
|
{
|
||||||
convex_hull_gi->setVisible(checked);
|
convex_hull_gi->setVisible(checked);
|
||||||
emit (changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -408,7 +408,7 @@ MainWindow::on_actionShowPCenter_toggled(bool checked)
|
||||||
for(std::size_t i =0; i < P; i++){
|
for(std::size_t i =0; i < P; i++){
|
||||||
p_center[i]->setVisible(checked);
|
p_center[i]->setVisible(checked);
|
||||||
}
|
}
|
||||||
emit (changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -423,7 +423,7 @@ MainWindow::on_actionClear_triggered()
|
||||||
for(std::size_t i=0; i < P;i++){
|
for(std::size_t i=0; i < P;i++){
|
||||||
p_center[i]->hide();
|
p_center[i]->hide();
|
||||||
}
|
}
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -462,7 +462,7 @@ MainWindow::on_actionInsertRandomPoints_triggered()
|
||||||
|
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -497,7 +497,7 @@ MainWindow::open(QString fileName)
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
actionRecenter->trigger();
|
actionRecenter->trigger();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ include_directories (BEFORE ../../../Matrix_search/include)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ find_package(Qt4)
|
||||||
include_directories (BEFORE ../../include)
|
include_directories (BEFORE ../../include)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ private:
|
||||||
public:
|
public:
|
||||||
MainWindow();
|
MainWindow();
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
virtual void open(QString);
|
virtual void open(QString);
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@ public slots:
|
||||||
void on_actionRecenter_triggered();
|
void on_actionRecenter_triggered();
|
||||||
|
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -175,7 +175,7 @@ MainWindow::processInput(CGAL::Object o)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arcs.push_back(o);
|
arcs.push_back(o);
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -202,7 +202,7 @@ MainWindow::on_actionClear_triggered()
|
||||||
{
|
{
|
||||||
arcs.clear();
|
arcs.clear();
|
||||||
intersections.clear();
|
intersections.clear();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -265,7 +265,7 @@ MainWindow::open(QString fileName)
|
||||||
arcs.push_back(make_object(ca));
|
arcs.push_back(make_object(ca));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit (changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ find_package(Qt4)
|
||||||
include_directories (BEFORE ../../include)
|
include_directories (BEFORE ../../include)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
# Demo: Generator_2
|
# Demo: Generator_2
|
||||||
|
|
|
||||||
|
|
@ -89,13 +89,13 @@ private:
|
||||||
}
|
}
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MainWindow();
|
MainWindow();
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
void on_actionClear_triggered();
|
void on_actionClear_triggered();
|
||||||
|
|
||||||
|
|
@ -109,7 +109,7 @@ public slots:
|
||||||
void on_actionGeneratePolytopeInDisc_triggered();
|
void on_actionGeneratePolytopeInDisc_triggered();
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -180,7 +180,7 @@ void
|
||||||
MainWindow::on_actionClear_triggered()
|
MainWindow::on_actionClear_triggered()
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -233,7 +233,7 @@ MainWindow::on_actionGenerateSegments_triggered()
|
||||||
Seg_iterator g( rpos, rpoc);
|
Seg_iterator g( rpos, rpoc);
|
||||||
CGAL::cpp11::copy_n( g, 200, std::back_inserter(segments));
|
CGAL::cpp11::copy_n( g, 200, std::back_inserter(segments));
|
||||||
|
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -263,7 +263,7 @@ MainWindow::on_actionGenerateSegmentFans_triggered()
|
||||||
Count_iterator t2_end(t2, 50);
|
Count_iterator t2_end(t2, 50);
|
||||||
std::copy( t2_begin, t2_end, std::back_inserter(segments));
|
std::copy( t2_begin, t2_end, std::back_inserter(segments));
|
||||||
|
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
MainWindow::on_actionGeneratePolytopeInDisc_triggered()
|
MainWindow::on_actionGeneratePolytopeInDisc_triggered()
|
||||||
|
|
@ -314,7 +314,7 @@ MainWindow::on_actionGeneratePolytopeInDisc_triggered()
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
|
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@ find_package(Qt4)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
|
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ include_directories (BEFORE ./include)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ private:
|
||||||
public:
|
public:
|
||||||
MainWindow();
|
MainWindow();
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
void processInput(CGAL::Object o);
|
void processInput(CGAL::Object o);
|
||||||
|
|
||||||
|
|
@ -114,7 +114,7 @@ public slots:
|
||||||
|
|
||||||
void open(QString fileName);
|
void open(QString fileName);
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -207,7 +207,7 @@ MainWindow::processInput(CGAL::Object o)
|
||||||
m_sites.push_back(p);
|
m_sites.push_back(p);
|
||||||
calculate_envelope();
|
calculate_envelope();
|
||||||
}
|
}
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -233,7 +233,7 @@ MainWindow::on_actionClear_triggered()
|
||||||
{
|
{
|
||||||
m_sites.clear();
|
m_sites.clear();
|
||||||
calculate_envelope();
|
calculate_envelope();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -267,7 +267,7 @@ MainWindow::on_actionInsertRandomPoints_triggered()
|
||||||
calculate_envelope();
|
calculate_envelope();
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -302,7 +302,7 @@ MainWindow::open(QString fileName)
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
actionRecenter->trigger();
|
actionRecenter->trigger();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ template <typename T>
|
||||||
void
|
void
|
||||||
ArrangementPointInput<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent* )
|
ArrangementPointInput<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent* )
|
||||||
{
|
{
|
||||||
emit (generate(CGAL::make_object(m_p)));
|
Q_EMIT (generate(CGAL::make_object(m_p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ include_directories (BEFORE ../../include)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
|
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
# Demo: Largest_empty_rectangle_2
|
# Demo: Largest_empty_rectangle_2
|
||||||
|
|
|
||||||
|
|
@ -86,13 +86,13 @@ private:
|
||||||
|
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MainWindow();
|
MainWindow();
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
void on_actionClear_triggered();
|
void on_actionClear_triggered();
|
||||||
|
|
||||||
|
|
@ -106,7 +106,7 @@ public slots:
|
||||||
|
|
||||||
void update_largest_empty_rectangle();
|
void update_largest_empty_rectangle();
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -203,7 +203,7 @@ MainWindow::processInput(CGAL::Object o)
|
||||||
ler.insert(p);
|
ler.insert(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -220,7 +220,7 @@ void
|
||||||
MainWindow::on_actionClear_triggered()
|
MainWindow::on_actionClear_triggered()
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ include_directories (BEFORE ./include)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ private:
|
||||||
public:
|
public:
|
||||||
MainWindow();
|
MainWindow();
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
void processInput(CGAL::Object o);
|
void processInput(CGAL::Object o);
|
||||||
|
|
||||||
|
|
@ -91,7 +91,7 @@ public slots:
|
||||||
|
|
||||||
virtual void open(QString fileName);
|
virtual void open(QString fileName);
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -207,7 +207,7 @@ MainWindow::processInput(CGAL::Object o)
|
||||||
p.y()- std::floor(p.y()/dy));
|
p.y()- std::floor(p.y()/dy));
|
||||||
triang.insert(p);
|
triang.insert(p);
|
||||||
}
|
}
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
|
|
||||||
if (was_empty)
|
if (was_empty)
|
||||||
on_actionRecenter_triggered();
|
on_actionRecenter_triggered();
|
||||||
|
|
@ -284,7 +284,7 @@ void
|
||||||
MainWindow::on_actionClear_triggered()
|
MainWindow::on_actionClear_triggered()
|
||||||
{
|
{
|
||||||
triang.clear();
|
triang.clear();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -322,7 +322,7 @@ MainWindow::on_actionInsertRandomPoints_triggered()
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
|
|
||||||
on_actionRecenter_triggered();
|
on_actionRecenter_triggered();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -330,7 +330,7 @@ void
|
||||||
MainWindow::on_actionConvertTo9Cover_triggered() {
|
MainWindow::on_actionConvertTo9Cover_triggered() {
|
||||||
if (triang.is_1_cover()) {
|
if (triang.is_1_cover()) {
|
||||||
triang.convert_to_9_sheeted_covering();
|
triang.convert_to_9_sheeted_covering();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -338,7 +338,7 @@ void
|
||||||
MainWindow::on_actionConvertTo1Cover_triggered() {
|
MainWindow::on_actionConvertTo1Cover_triggered() {
|
||||||
if (!triang.is_1_cover()) {
|
if (!triang.is_1_cover()) {
|
||||||
triang.convert_to_1_sheeted_covering();
|
triang.convert_to_1_sheeted_covering();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -373,7 +373,7 @@ MainWindow::open(QString fileName)
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
actionRecenter->trigger();
|
actionRecenter->trigger();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -407,27 +407,27 @@ MainWindow::on_actionRecenter_triggered()
|
||||||
void MainWindow::on_actionNoneSimplicesEmphasized_triggered(bool)
|
void MainWindow::on_actionNoneSimplicesEmphasized_triggered(bool)
|
||||||
{
|
{
|
||||||
pt_gi->setEmphasizedSimplices(PTGI::NONE);
|
pt_gi->setEmphasizedSimplices(PTGI::NONE);
|
||||||
emit changed();
|
Q_EMIT changed();
|
||||||
}
|
}
|
||||||
void MainWindow::on_actionUniqueSimplicesEmphasized_triggered(bool)
|
void MainWindow::on_actionUniqueSimplicesEmphasized_triggered(bool)
|
||||||
{
|
{
|
||||||
pt_gi->setEmphasizedSimplices(PTGI::UNIQUE);
|
pt_gi->setEmphasizedSimplices(PTGI::UNIQUE);
|
||||||
emit changed();
|
Q_EMIT changed();
|
||||||
}
|
}
|
||||||
void MainWindow::on_actionStoredSimplicesEmphasized_triggered(bool)
|
void MainWindow::on_actionStoredSimplicesEmphasized_triggered(bool)
|
||||||
{
|
{
|
||||||
pt_gi->setEmphasizedSimplices(PTGI::STORED);
|
pt_gi->setEmphasizedSimplices(PTGI::STORED);
|
||||||
emit changed();
|
Q_EMIT changed();
|
||||||
}
|
}
|
||||||
void MainWindow::on_actionUniqueCoverDomainSimplicesEmphasized_triggered(bool)
|
void MainWindow::on_actionUniqueCoverDomainSimplicesEmphasized_triggered(bool)
|
||||||
{
|
{
|
||||||
pt_gi->setEmphasizedSimplices(PTGI::UNIQUE_COVER_DOMAIN);
|
pt_gi->setEmphasizedSimplices(PTGI::UNIQUE_COVER_DOMAIN);
|
||||||
emit changed();
|
Q_EMIT changed();
|
||||||
}
|
}
|
||||||
void MainWindow::on_actionStoredCoverDomainSimplicesEmphasized_triggered(bool)
|
void MainWindow::on_actionStoredCoverDomainSimplicesEmphasized_triggered(bool)
|
||||||
{
|
{
|
||||||
pt_gi->setEmphasizedSimplices(PTGI::STORED_COVER_DOMAIN);
|
pt_gi->setEmphasizedSimplices(PTGI::STORED_COVER_DOMAIN);
|
||||||
emit changed();
|
Q_EMIT changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ TriangulationMovingPoint<T>::localize_and_insert_point(QPointF qt_point)
|
||||||
if(lt != T::VERTEX){
|
if(lt != T::VERTEX){
|
||||||
vh = dt->insert(p, lt, fh, li);
|
vh = dt->insert(p, lt, fh, li);
|
||||||
insertedPoint = true;
|
insertedPoint = true;
|
||||||
emit(modelChanged());
|
Q_EMIT( modelChanged());
|
||||||
} else {
|
} else {
|
||||||
vh = fh->vertex(0);
|
vh = fh->vertex(0);
|
||||||
insertedPoint = false;
|
insertedPoint = false;
|
||||||
|
|
@ -113,7 +113,7 @@ TriangulationMovingPoint<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||||
vh = Vertex_handle();
|
vh = Vertex_handle();
|
||||||
}
|
}
|
||||||
|
|
||||||
emit(modelChanged());
|
Q_EMIT( modelChanged());
|
||||||
|
|
||||||
movePointToInsert = false;
|
movePointToInsert = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ TriangulationPointInputAndConflictZone<T>::mouseReleaseEvent(QGraphicsSceneMouse
|
||||||
delete *it;
|
delete *it;
|
||||||
}
|
}
|
||||||
qfaces.clear();
|
qfaces.clear();
|
||||||
emit (generate(CGAL::make_object(p)));
|
Q_EMIT( generate(CGAL::make_object(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ TriangulationRemoveVertex<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||||
typename T::Vertex_handle selected_vertex = dt->nearest_vertex(convert(event->scenePos()));
|
typename T::Vertex_handle selected_vertex = dt->nearest_vertex(convert(event->scenePos()));
|
||||||
dt->remove(selected_vertex);
|
dt->remove(selected_vertex);
|
||||||
}
|
}
|
||||||
emit (modelChanged());
|
Q_EMIT( modelChanged());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ include_directories (BEFORE ../../include)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
|
|
||||||
if( CGAL_Core_FOUND)
|
if( CGAL_Core_FOUND)
|
||||||
add_definitions(-DCGAL_USE_CORE)
|
add_definitions(-DCGAL_USE_CORE)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ private:
|
||||||
public:
|
public:
|
||||||
MainWindow();
|
MainWindow();
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
void processInput(CGAL::Object o);
|
void processInput(CGAL::Object o);
|
||||||
|
|
||||||
|
|
@ -107,7 +107,7 @@ public slots:
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
virtual void open(QString);
|
virtual void open(QString);
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -199,7 +199,7 @@ MainWindow::processInput(CGAL::Object o)
|
||||||
}
|
}
|
||||||
poly.insert(poly.vertices_begin(), points.begin(), points.end());
|
poly.insert(poly.vertices_begin(), points.begin(), points.end());
|
||||||
}
|
}
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -217,7 +217,7 @@ MainWindow::on_actionClear_triggered()
|
||||||
poly.clear();
|
poly.clear();
|
||||||
clear();
|
clear();
|
||||||
this->actionCreateInputPolygon->setChecked(true);
|
this->actionCreateInputPolygon->setChecked(true);
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -243,7 +243,7 @@ MainWindow::open(QString fileName)
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
emit (changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -271,7 +271,7 @@ MainWindow::on_actionCreateInputPolygon_toggled(bool checked)
|
||||||
} else {
|
} else {
|
||||||
scene.removeEventFilter(pi);
|
scene.removeEventFilter(pi);
|
||||||
}
|
}
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ include_directories (BEFORE ./include)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
|
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
|
|
||||||
|
|
@ -77,13 +77,13 @@ private:
|
||||||
std::cout << "duplicate point: " << p << std::endl;
|
std::cout << "duplicate point: " << p << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected slots:
|
protected Q_SLOTS:
|
||||||
virtual void open(QString);
|
virtual void open(QString);
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
void processInput(CGAL::Object o);
|
void processInput(CGAL::Object o);
|
||||||
|
|
||||||
|
|
@ -104,7 +104,7 @@ public slots:
|
||||||
void saveConstraints(QString);
|
void saveConstraints(QString);
|
||||||
|
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -204,7 +204,7 @@ MainWindow::processInput(CGAL::Object o)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -231,7 +231,7 @@ void
|
||||||
MainWindow::on_actionClear_triggered()
|
MainWindow::on_actionClear_triggered()
|
||||||
{
|
{
|
||||||
svd.clear();
|
svd.clear();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -283,7 +283,7 @@ MainWindow::loadPolygonConstraints(QString fileName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
actionRecenter->trigger();
|
actionRecenter->trigger();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -325,7 +325,7 @@ MainWindow::loadEdgConstraints(QString fileName)
|
||||||
statusBar()->showMessage(QString("Insertion took %1 seconds").arg(tim.time()), 2000);
|
statusBar()->showMessage(QString("Insertion took %1 seconds").arg(tim.time()), 2000);
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
actionRecenter->trigger();
|
actionRecenter->trigger();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ include_directories (BEFORE ../../../Snap_rounding_2/include)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
|
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ public:
|
||||||
this->graphicsView->fitInView(0,0, 20, 20, Qt::KeepAspectRatio);
|
this->graphicsView->fitInView(0,0, 20, 20, Qt::KeepAspectRatio);
|
||||||
}
|
}
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
void processInput(CGAL::Object o);
|
void processInput(CGAL::Object o);
|
||||||
|
|
||||||
|
|
@ -86,7 +86,7 @@ public slots:
|
||||||
|
|
||||||
virtual void open(QString fileName);
|
virtual void open(QString fileName);
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -174,7 +174,7 @@ MainWindow::deltaChanged(double d)
|
||||||
output.clear();
|
output.clear();
|
||||||
CGAL::snap_rounding_2<Traits,std::list<Segment_2>::const_iterator,std::list<std::list<Point_2> > >(input.begin(), input.end(), output, delta, true, false);
|
CGAL::snap_rounding_2<Traits,std::list<Segment_2>::const_iterator,std::list<std::list<Point_2> > >(input.begin(), input.end(), output, delta, true, false);
|
||||||
rgi->setDelta(delta, delta);
|
rgi->setDelta(delta, delta);
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -193,7 +193,7 @@ MainWindow::processInput(CGAL::Object o)
|
||||||
std::cerr << points.size() << std::endl;
|
std::cerr << points.size() << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -210,7 +210,7 @@ MainWindow::on_actionClear_triggered()
|
||||||
{
|
{
|
||||||
input.clear();
|
input.clear();
|
||||||
output.clear();
|
output.clear();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -218,14 +218,14 @@ void
|
||||||
MainWindow::on_actionShowGrid_toggled(bool checked)
|
MainWindow::on_actionShowGrid_toggled(bool checked)
|
||||||
{
|
{
|
||||||
rgi->setVisible(checked);
|
rgi->setVisible(checked);
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MainWindow::on_actionShowInput_toggled(bool checked)
|
MainWindow::on_actionShowInput_toggled(bool checked)
|
||||||
{
|
{
|
||||||
isgi->setVisible(checked);
|
isgi->setVisible(checked);
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -234,7 +234,7 @@ void
|
||||||
MainWindow::on_actionShowSnappedSegments_toggled(bool checked)
|
MainWindow::on_actionShowSnappedSegments_toggled(bool checked)
|
||||||
{
|
{
|
||||||
plgi->setVisible(checked);
|
plgi->setVisible(checked);
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -269,7 +269,7 @@ MainWindow::open(QString fileName)
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
on_actionRecenter_triggered();
|
on_actionRecenter_triggered();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ include_directories (BEFORE ../../../Spatial_searching/include)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
|
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
# Demo: Spatial_searching_2
|
# Demo: Spatial_searching_2
|
||||||
|
|
|
||||||
|
|
@ -94,10 +94,10 @@ public:
|
||||||
|
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
virtual void open(QString fileName);
|
virtual void open(QString fileName);
|
||||||
void N_changed(int i);
|
void N_changed(int i);
|
||||||
|
|
@ -110,7 +110,7 @@ public slots:
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -180,7 +180,7 @@ MainWindow::MainWindow()
|
||||||
void MainWindow::N_changed(int i)
|
void MainWindow::N_changed(int i)
|
||||||
{
|
{
|
||||||
nearest_neighbor->setN(i);
|
nearest_neighbor->setN(i);
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -198,7 +198,7 @@ void
|
||||||
MainWindow::on_actionClear_triggered()
|
MainWindow::on_actionClear_triggered()
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -266,7 +266,7 @@ MainWindow::open(QString fileName)
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
actionRecenter->trigger();
|
actionRecenter->trigger();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ include_directories (BEFORE ../../include)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
|
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ private:
|
||||||
public:
|
public:
|
||||||
MainWindow();
|
MainWindow();
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
void on_actionLoadPoints_triggered();
|
void on_actionLoadPoints_triggered();
|
||||||
|
|
||||||
|
|
@ -75,7 +75,7 @@ public slots:
|
||||||
|
|
||||||
virtual void open(QString fileName);
|
virtual void open(QString fileName);
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -132,7 +132,7 @@ MainWindow::MainWindow()
|
||||||
void
|
void
|
||||||
MainWindow::on_actionClear_triggered()
|
MainWindow::on_actionClear_triggered()
|
||||||
{
|
{
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -155,7 +155,7 @@ MainWindow::on_actionGenerate_triggered()
|
||||||
scene.addItem(rgi);
|
scene.addItem(rgi);
|
||||||
|
|
||||||
on_actionRecenter_triggered();
|
on_actionRecenter_triggered();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -201,7 +201,7 @@ MainWindow::open(QString fileName)
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
// actionRecenter->trigger();
|
// actionRecenter->trigger();
|
||||||
on_actionGenerate_triggered();
|
on_actionGenerate_triggered();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ include_directories (BEFORE ../../../Triangulation_2/include)
|
||||||
|
|
||||||
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND )
|
||||||
|
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
|
|
||||||
|
|
@ -210,10 +210,10 @@ private:
|
||||||
std::cout << "duplicate point: " << p << std::endl;
|
std::cout << "duplicate point: " << p << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
void open(QString);
|
void open(QString);
|
||||||
|
|
||||||
void processInput(CGAL::Object o);
|
void processInput(CGAL::Object o);
|
||||||
|
|
@ -254,7 +254,7 @@ public slots:
|
||||||
|
|
||||||
void on_actionInsertRandomPoints_triggered();
|
void on_actionInsertRandomPoints_triggered();
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -360,7 +360,7 @@ MainWindow::processInput(CGAL::Object o)
|
||||||
|
|
||||||
initializeID(cdt);
|
initializeID(cdt);
|
||||||
discoverComponents(cdt);
|
discoverComponents(cdt);
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -420,7 +420,7 @@ void
|
||||||
MainWindow::on_actionClear_triggered()
|
MainWindow::on_actionClear_triggered()
|
||||||
{
|
{
|
||||||
cdt.clear();
|
cdt.clear();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -460,7 +460,7 @@ MainWindow::loadFile(QString fileName)
|
||||||
if(!ifs) abort();
|
if(!ifs) abort();
|
||||||
initializeID(cdt);
|
initializeID(cdt);
|
||||||
discoverComponents(cdt);
|
discoverComponents(cdt);
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
actionRecenter->trigger();
|
actionRecenter->trigger();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -496,7 +496,7 @@ MainWindow::loadPolygonConstraints(QString fileName)
|
||||||
|
|
||||||
initializeID(cdt);
|
initializeID(cdt);
|
||||||
discoverComponents(cdt);
|
discoverComponents(cdt);
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
actionRecenter->trigger();
|
actionRecenter->trigger();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -542,7 +542,7 @@ MainWindow::loadEdgConstraints(QString fileName)
|
||||||
discoverComponents(cdt);
|
discoverComponents(cdt);
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
actionRecenter->trigger();
|
actionRecenter->trigger();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -590,7 +590,7 @@ MainWindow::on_actionMakeGabrielConform_triggered()
|
||||||
statusBar()->showMessage(QString("Added %1 vertices").arg(nv), 2000);
|
statusBar()->showMessage(QString("Added %1 vertices").arg(nv), 2000);
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -607,7 +607,7 @@ MainWindow::on_actionMakeDelaunayConform_triggered()
|
||||||
statusBar()->showMessage(QString("Added %1 vertices").arg(nv), 2000);
|
statusBar()->showMessage(QString("Added %1 vertices").arg(nv), 2000);
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -631,7 +631,7 @@ MainWindow::on_actionMakeDelaunayMesh_triggered()
|
||||||
statusBar()->showMessage(QString("Added %1 vertices in %2 seconds").arg(nv).arg(timer.time()), 2000);
|
statusBar()->showMessage(QString("Added %1 vertices in %2 seconds").arg(nv).arg(timer.time()), 2000);
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -666,7 +666,7 @@ MainWindow::on_actionMakeLipschitzDelaunayMesh_triggered()
|
||||||
statusBar()->showMessage(QString("Added %1 vertices").arg(nv), 2000);
|
statusBar()->showMessage(QString("Added %1 vertices").arg(nv), 2000);
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -703,7 +703,7 @@ MainWindow::on_actionInsertRandomPoints_triggered()
|
||||||
cdt.insert(points.begin(), points.end());
|
cdt.insert(points.begin(), points.end());
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "Constrained_Delaunay_triangulation_2.moc"
|
#include "Constrained_Delaunay_triangulation_2.moc"
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ private:
|
||||||
public:
|
public:
|
||||||
MainWindow();
|
MainWindow();
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
void processInput(CGAL::Object o);
|
void processInput(CGAL::Object o);
|
||||||
|
|
||||||
|
|
@ -84,7 +84,7 @@ public slots:
|
||||||
|
|
||||||
virtual void open(QString fileName);
|
virtual void open(QString fileName);
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -191,7 +191,7 @@ MainWindow::processInput(CGAL::Object o)
|
||||||
if(CGAL::assign(p, o)){
|
if(CGAL::assign(p, o)){
|
||||||
dt.insert(p);
|
dt.insert(p);
|
||||||
}
|
}
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -269,7 +269,7 @@ void
|
||||||
MainWindow::on_actionClear_triggered()
|
MainWindow::on_actionClear_triggered()
|
||||||
{
|
{
|
||||||
dt.clear();
|
dt.clear();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -305,7 +305,7 @@ MainWindow::on_actionInsertRandomPoints_triggered()
|
||||||
dt.insert(points.begin(), points.end());
|
dt.insert(points.begin(), points.end());
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -341,7 +341,7 @@ MainWindow::open(QString fileName)
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
this->addToRecentFiles(fileName);
|
this->addToRecentFiles(fileName);
|
||||||
actionRecenter->trigger();
|
actionRecenter->trigger();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ RegularTriangulationRemoveVertex<T>::mousePressEvent(QGraphicsSceneMouseEvent *e
|
||||||
typename T::Vertex_handle selected_vertex = dt->nearest_power_vertex(convert(event->scenePos()));
|
typename T::Vertex_handle selected_vertex = dt->nearest_power_vertex(convert(event->scenePos()));
|
||||||
dt->remove(selected_vertex);
|
dt->remove(selected_vertex);
|
||||||
}
|
}
|
||||||
emit (modelChanged());
|
Q_EMIT( modelChanged());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ private:
|
||||||
public:
|
public:
|
||||||
MainWindow();
|
MainWindow();
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
|
|
||||||
void processInput(CGAL::Object o);
|
void processInput(CGAL::Object o);
|
||||||
|
|
||||||
|
|
@ -75,7 +75,7 @@ public slots:
|
||||||
void on_actionRecenter_triggered();
|
void on_actionRecenter_triggered();
|
||||||
|
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void changed();
|
void changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -162,7 +162,7 @@ MainWindow::processInput(CGAL::Object o)
|
||||||
dt.insert(wp);
|
dt.insert(wp);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -205,7 +205,7 @@ void
|
||||||
MainWindow::on_actionClear_triggered()
|
MainWindow::on_actionClear_triggered()
|
||||||
{
|
{
|
||||||
dt.clear();
|
dt.clear();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -231,7 +231,7 @@ MainWindow::on_actionInsertRandomPoints_triggered()
|
||||||
dt.insert(points.begin(), points.end());
|
dt.insert(points.begin(), points.end());
|
||||||
// default cursor
|
// default cursor
|
||||||
QApplication::setOverrideCursor(Qt::ArrowCursor);
|
QApplication::setOverrideCursor(Qt::ArrowCursor);
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -252,7 +252,7 @@ MainWindow::on_actionLoadPoints_triggered()
|
||||||
dt.insert(points.begin(), points.end());
|
dt.insert(points.begin(), points.end());
|
||||||
|
|
||||||
actionRecenter->trigger();
|
actionRecenter->trigger();
|
||||||
emit(changed());
|
Q_EMIT( changed());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ TriangulationMovingPoint<T>::localize_and_insert_point(QPointF qt_point)
|
||||||
if(lt != T::VERTEX){
|
if(lt != T::VERTEX){
|
||||||
vh = dt->insert(p, lt, fh, li);
|
vh = dt->insert(p, lt, fh, li);
|
||||||
insertedPoint = true;
|
insertedPoint = true;
|
||||||
emit(modelChanged());
|
Q_EMIT( modelChanged());
|
||||||
} else {
|
} else {
|
||||||
vh = fh->vertex(0);
|
vh = fh->vertex(0);
|
||||||
insertedPoint = false;
|
insertedPoint = false;
|
||||||
|
|
@ -111,7 +111,7 @@ TriangulationMovingPoint<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||||
}
|
}
|
||||||
vh = Vertex_handle();
|
vh = Vertex_handle();
|
||||||
|
|
||||||
emit(modelChanged());
|
Q_EMIT( modelChanged());
|
||||||
|
|
||||||
movePointToInsert = false;
|
movePointToInsert = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ TriangulationPointInputAndConflictZone<T>::mouseReleaseEvent(QGraphicsSceneMouse
|
||||||
delete *it;
|
delete *it;
|
||||||
}
|
}
|
||||||
qfaces.clear();
|
qfaces.clear();
|
||||||
emit (generate(CGAL::make_object(p)));
|
Q_EMIT( generate(CGAL::make_object(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ TriangulationRemoveVertex<T>::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||||
typename T::Vertex_handle selected_vertex = dt->nearest_vertex(convert(event->scenePos()));
|
typename T::Vertex_handle selected_vertex = dt->nearest_vertex(convert(event->scenePos()));
|
||||||
dt->remove(selected_vertex);
|
dt->remove(selected_vertex);
|
||||||
}
|
}
|
||||||
emit (modelChanged());
|
Q_EMIT( modelChanged());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -99,9 +99,9 @@ GraphicsViewCircleInput<K>::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||||
q = convert(qq);
|
q = convert(qq);
|
||||||
if(m_pointsOnCircle == 1){
|
if(m_pointsOnCircle == 1){
|
||||||
typename K::FT sd = squared_distance(p,q);
|
typename K::FT sd = squared_distance(p,q);
|
||||||
emit generate(CGAL::make_object(std::make_pair(p, sd)));
|
Q_EMIT generate(CGAL::make_object(std::make_pair(p, sd)));
|
||||||
} else {
|
} else {
|
||||||
emit generate(CGAL::make_object(std::make_pair(p, q)));
|
Q_EMIT generate(CGAL::make_object(std::make_pair(p, q)));
|
||||||
}
|
}
|
||||||
count = 0;
|
count = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -122,7 +122,7 @@ GraphicsViewCircleInput<K>::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||||
r = convert(qr);
|
r = convert(qr);
|
||||||
typename K::Collinear_2 collinear;
|
typename K::Collinear_2 collinear;
|
||||||
if(! collinear(p,q,r)){
|
if(! collinear(p,q,r)){
|
||||||
emit generate(CGAL::make_object(CGAL::make_array(p,q,r)));
|
Q_EMIT generate(CGAL::make_object(CGAL::make_array(p,q,r)));
|
||||||
count = 0;
|
count = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ GraphicsViewCircularArcInput<K>::mousePressEvent(QGraphicsSceneMouseEvent *event
|
||||||
q = convert(qq);
|
q = convert(qq);
|
||||||
if( (event->button() == ::Qt::RightButton) && (p != q) ){
|
if( (event->button() == ::Qt::RightButton) && (p != q) ){
|
||||||
qline->hide();
|
qline->hide();
|
||||||
emit generate(CGAL::make_object(Line_arc_2(Segment_2(p,q))));
|
Q_EMIT generate(CGAL::make_object(Line_arc_2(Segment_2(p,q))));
|
||||||
count = 0;
|
count = 0;
|
||||||
} else {
|
} else {
|
||||||
count = 2;
|
count = 2;
|
||||||
|
|
@ -126,7 +126,7 @@ GraphicsViewCircularArcInput<K>::mousePressEvent(QGraphicsSceneMouseEvent *event
|
||||||
typename K::Collinear_2 collinear;
|
typename K::Collinear_2 collinear;
|
||||||
if(! collinear(p,q,r)){
|
if(! collinear(p,q,r)){
|
||||||
qcarc->hide();
|
qcarc->hide();
|
||||||
emit generate(make_object(qcarc->arc()));
|
Q_EMIT generate(make_object(qcarc->arc()));
|
||||||
count = 0;
|
count = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ GraphicsViewIsoRectangleInput<K>::mousePressEvent(QGraphicsSceneMouseEvent *even
|
||||||
if(event->button() == ::Qt::LeftButton) {
|
if(event->button() == ::Qt::LeftButton) {
|
||||||
if(rectItem->isVisible()) {
|
if(rectItem->isVisible()) {
|
||||||
// we have clicked twice
|
// we have clicked twice
|
||||||
emit generate(CGAL::make_object(convert(rectItem->rect())));
|
Q_EMIT generate(CGAL::make_object(convert(rectItem->rect())));
|
||||||
rectItem->hide();
|
rectItem->hide();
|
||||||
} else {
|
} else {
|
||||||
// we enter a first point
|
// we enter a first point
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ GraphicsViewLineInput<K>::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||||
sp = convert(qsp);
|
sp = convert(qsp);
|
||||||
tp = convert(qtp);
|
tp = convert(qtp);
|
||||||
scene_->removeItem(&line);
|
scene_->removeItem(&line);
|
||||||
emit generate(CGAL::make_object(typename K::Line_2(sp,tp)));
|
Q_EMIT generate(CGAL::make_object(typename K::Line_2(sp,tp)));
|
||||||
} else {
|
} else {
|
||||||
qsp = event->scenePos();
|
qsp = event->scenePos();
|
||||||
qtp = QPointF(qsp.x()+1, qsp.y());
|
qtp = QPointF(qsp.x()+1, qsp.y());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue