Open files whose names/paths are given on the command line.

(Maybe that should go to CGAL::Qt::DemosMainWindow.)
This commit is contained in:
Laurent Rineau 2010-11-09 08:46:31 +00:00
parent fae67cfa7f
commit 11b8bf1ce9
3 changed files with 22 additions and 3 deletions

View File

@ -212,10 +212,8 @@ private:
emit(changed());
}
protected slots:
void open(QString);
public slots:
void open(QString);
void processInput(CGAL::Object o);
@ -704,5 +702,12 @@ int main(int argc, char **argv)
MainWindow mainWindow;
mainWindow.show();
QStringList args = app.arguments();
args.removeAt(0);
Q_FOREACH(QString filename, args) {
mainWindow.open(filename);
}
return app.exec();
}

View File

@ -388,5 +388,12 @@ int main(int argc, char **argv)
MainWindow mainWindow;
mainWindow.show();
QStringList args = app.arguments();
args.removeAt(0);
Q_FOREACH(QString filename, args) {
mainWindow.open(filename);
}
return app.exec();
}

View File

@ -303,5 +303,12 @@ int main(int argc, char **argv)
MainWindow mainWindow;
mainWindow.show();
QStringList args = app.arguments();
args.removeAt(0);
Q_FOREACH(QString filename, args) {
mainWindow.open(filename);
}
return app.exec();
}