Removed textoutput, Edit, and renamed Tools to Algorithms

This commit is contained in:
Andreas Fabri 2008-11-09 15:56:06 +00:00
parent 19dfb6d743
commit 40e63c3bde
2 changed files with 2 additions and 49 deletions

View File

@ -162,46 +162,13 @@ MainWindow::processInput(CGAL::Object o)
std::list<Point_2> points;
if(CGAL::assign(points, o)){
if((points.size() == 1)&& poly.size()>0){
Point_2 p = points.front();
// make the inside test
CGAL::Bounded_side bside = poly.bounded_side(p);
switch (bside) {
case CGAL::ON_BOUNDED_SIDE:
textEdit->append(" The point is inside the polygon"); break;
case CGAL::ON_BOUNDARY:
textEdit->append(" The point is on the boundary of the polygon"); break;
case CGAL::ON_UNBOUNDED_SIDE:
textEdit->append(" The point is outside the polygon"); break;
}
} else {
poly.clear();
if(points.front() == points.back()){
points.pop_back();
}
poly.insert(poly.vertices_begin(), points.begin(), points.end());
textEdit->clear();
if(poly.is_empty()){
textEdit->append("P is empty!");
} else {
if(poly.is_simple()){
textEdit->append("P is simple");
CGAL::Orientation o = poly.orientation();
switch (o) {
case CGAL::CLOCKWISE:
textEdit->append("P.orientation() == CLOCKWISE");
break;
case CGAL::COUNTERCLOCKWISE:
textEdit->append("P.orientation() == COUNTERCLOCKWISE");
break;
case CGAL::COLLINEAR:
textEdit->append("P.orientation() == COLLINEAR");
break;
}
textEdit->append(QString("The area of P is %1").arg(poly.area()));
} else {
textEdit->append("P is not simple");
}
}
}
emit(changed());
}

View File

@ -44,14 +44,6 @@
<enum>QGraphicsView::NoAnchor</enum>
</property>
</widget>
<widget class="QTextEdit" name="textEdit" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</widget>
</item>
</layout>
@ -103,14 +95,9 @@
<addaction name="separator" />
<addaction name="actionQuit" />
</widget>
<widget class="QMenu" name="menuEdit" >
<property name="title" >
<string>&amp;Edit</string>
</property>
</widget>
<widget class="QMenu" name="menuTools" >
<property name="title" >
<string>&amp;Tools</string>
<string>&amp;Algorithms</string>
</property>
<addaction name="separator" />
<addaction name="actionRecenter" />
@ -123,7 +110,6 @@
<addaction name="actionLinearLeastSquaresFittingOfSegments" />
</widget>
<addaction name="menuFile" />
<addaction name="menuEdit" />
<addaction name="menuTools" />
</widget>
<action name="actionAbout" >