git-svn-id: svn://db.shs.com.ru/libs@697 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-12-12 19:21:34 +00:00
parent a4c329a07b
commit 0c378399c4
5 changed files with 16 additions and 13 deletions

View File

@@ -30,6 +30,9 @@ QGLViewWindow::QGLViewWindow(QWidget * parent): QMainWindow(parent), Ui::QGLView
setupUi(this);
session.setFile("session_qglview_test.conf");
session.addEntry(this);
extensions = "All(" + supportedFormats().join(" ") + " *.qgl)";
extensions += ";;QGLEngine(*.qgl)";
//view->view()->camera()->setPos(QVector3D(2, 2, 2));
//view->view()->camera()->setAim(QVector3D());
@@ -148,12 +151,7 @@ void QGLViewWindow::on_actionReset_triggered() {
void QGLViewWindow::on_actionImport_triggered() {
QStringList fl = QFileDialog::getOpenFileNames(this, "Select files", prev_path, "Supported types(*.qgl *.ase *.3ds *.obj *.dae);;"
"QGLView(*.qgl);;"
"Ascii Scene Export(*.ase);;"
"3D Studio(*.3ds);;"
"Wavefront OBJ(*.obj);;"
"Collada(*.dae)");
QStringList fl = QFileDialog::getOpenFileNames(this, "Select files", prev_path, extensions);
if (fl.isEmpty()) return;
prev_path = fl.back();
foreach (QString f, fl)
@@ -188,12 +186,7 @@ void QGLViewWindow::on_actionSaveSelected_triggered() {
void QGLViewWindow::on_actionOpen_triggered() {
QString f = QFileDialog::getOpenFileName(this, "Select file", prev_path, "Supported types(*.qgl *.ase *.3ds *.obj *.dae);;"
"QGLView(*.qgl);;"
"Ascii Scene Export(*.ase);;"
"3D Studio(*.3ds);;"
"Wavefront OBJ(*.obj);;"
"Collada(*.dae)");
QString f = QFileDialog::getOpenFileName(this, "Select file", prev_path, extensions);
if (f.isEmpty()) return;
prev_path = f;
loadFile(f);