6 #include "ui_extrainputcontrollerform.h"
13 #include <Inventor/nodes/SoSeparator.h>
14 #include <Inventor/nodes/SoPickStyle.h>
15 #include <Inventor/nodes/SoLightModel.h>
16 #include <Inventor/nodes/SoMaterial.h>
17 #include <Inventor/nodes/SoSwitch.h>
19 #include <QFileDialog>
27 SoSeparator *
root =
nullptr;
33 std::map<std::string, SoSeparator *>
fileMap;
34 Ui::ExtraInputControllerForm
ui{};
42 IVP13DSystemSimple(
"ExtraInput",
"Co-display extra input from an external Open Inventor, or VRML, file",
"boudreau@pitt.edu"),
50 m_c->
ui.materialButton=0;
60 QWidget* controller =
new QWidget(0);
61 m_c->
ui.setupUi(controller);
124 QList<QListWidgetItem *> itemList =
ui.fileListWidget->findItems(
fileName,Qt::MatchExactly);
125 if (itemList.isEmpty()) {
132 This->
message(
"Warning: Could not get scenegraph from file "+
fileName);
136 This->
message(
"Warning, file is already in the display list");
142 QString
fileName = QFileDialog::getOpenFileName(NULL, tr(
"Open File"),
m_c->
lastInputDir,tr(
"3D Formats (*.iv *.wrl)"));
148 if (
m_c->
ui.fileListWidget->count()) {
149 int currentRow =
m_c->
ui.fileListWidget->currentRow();
150 QListWidgetItem *
item=
m_c->
ui.fileListWidget->takeItem(currentRow);
165 QStringList fileListEntries;
166 for (
int i=0;
i<
m_c->
ui.fileListWidget->count();++
i)
167 fileListEntries <<
m_c->
ui.fileListWidget->item(
i)->text();
181 if (
state.version()==0) {
182 message(
"Warning: State data in .vp1 file has obsolete format - ignoring!");
185 if (
state.version()!=1) {
186 message(
"Warning: State data in .vp1 file is in wrong format - ignoring!");