PandaDocument::PandaDocument(gui::BaseGUI& gui) : PandaObject(nullptr) , m_currentIndex(1) , m_animTime(initData(0.0, "time", "Time of the animation")) , m_timestep(initData(0.01, "timestep", "Time step of the animation")) , m_useTimer(initData(1, "use timer", "If true, wait before the next timestep. If false, compute the next one as soon as the previous finished.")) , m_nbThreads(initData(0, "nb threads", "Optimize computation for multiple CPU cores (not using the scheduler if < 0)")) , m_gui(gui) , m_objectsList(std::make_unique<ObjectsList>()) , m_signals(std::make_unique<DocumentSignals>()) , m_undoStack(std::make_unique<UndoStack>()) { addInput(m_timestep); addInput(m_useTimer); addInput(m_nbThreads); m_useTimer.setWidget("checkbox"); // Not connecting to the document, otherwise it would update the layers each time we get the time. m_animTime.setOutput(true); m_animTime.setReadOnly(true); setInternalData("Document", 0); m_undoStack->setUndoLimit(25); setParentDocument(this); }
bool ImportControlNetWorkOrder::execute() { WorkOrder::execute(); QStringList cnetFileNames = QFileDialog::getOpenFileNames( qobject_cast<QWidget *>(parent()), tr("Import Control Networks"), "", tr("Isis control nets (*.net);;All Files (*)")); if (!cnetFileNames.isEmpty()) { QUndoCommand::setText(tr("Import %1 Control Networks").arg(cnetFileNames.count())); } setInternalData(cnetFileNames); return internalData().count() > 0; }
//---------------------------------------------------------------------- void TextureOGL::load_image(GLint internal_format, GLenum format, GLenum data_type, void* data) { static int count; this->data_type = data_type; this->format = format; this->internal_format = internal_format; setInternalData(); bind(); //GE glTexImage2D takes up most of the time //glTexImage2D(target, 0, internal_format, sz, height, glTexImage2D(target, 0, internal_format, sz, height, //GE 0, format, data_type, data); clamp_to_edge(); linear(); //printf("nb calls to load_image= %d\n", count++); printf("tex_ogl: load: glTExImage2D, w,h= %d, %d\n", sz, height); }