Add drag and drop

This commit is contained in:
Andreas Fabri 2010-08-13 15:05:34 +00:00
parent 32c2d35f99
commit 4b7f51399f
1 changed files with 4 additions and 2 deletions

View File

@ -97,7 +97,7 @@ public slots:
void clearOffset(); void clearOffset();
void clear(); void clear();
void open(const QString&); virtual void open(QString);
signals: signals:
void changed(); void changed();
}; };
@ -108,6 +108,8 @@ MainWindow::MainWindow()
{ {
setupUi(this); setupUi(this);
this->graphicsView->setAcceptDrops(false);
// Add a GraphicItem for the Polygon_2 // Add a GraphicItem for the Polygon_2
pgi = new CGAL::Qt::PolygonGraphicsItem<Polygon>(&poly); pgi = new CGAL::Qt::PolygonGraphicsItem<Polygon>(&poly);
@ -218,7 +220,7 @@ MainWindow::on_actionLoadPolygon_triggered()
} }
void void
MainWindow::open(const QString& fileName) MainWindow::open(QString fileName)
{ {
this->actionCreateInputPolygon->setChecked(false); this->actionCreateInputPolygon->setChecked(false);
std::ifstream ifs(qPrintable(fileName)); std::ifstream ifs(qPrintable(fileName));