mirror of https://github.com/CGAL/cgal
Open files whose names/paths are given on the command line.
(Maybe that should go to CGAL::Qt::DemosMainWindow.)
This commit is contained in:
parent
fae67cfa7f
commit
11b8bf1ce9
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue