OlvisExecGuiPlugin::OlvisExecGuiPlugin() { mInterface = 0; mHilec = 0; connect(this, SIGNAL(pluginsWriteConfigReq(QXmlStreamWriter&)), SLOT(writeXmlConfig(QXmlStreamWriter&)), Qt::DirectConnection); connect(this, SIGNAL(pluginsReadConfigReq(QString)), SLOT(readXmlConfig(QString)), Qt::DirectConnection); mTimer.setInterval(5000); connect(&mTimer, SIGNAL(timeout()), SLOT(autoSave())); }
void OlvisGuiPlugin::setGuiInterface(const QString &name, QObject * guiPlugin) { if(name == "OlvisExecGuiInterface") { connect(guiPlugin, SIGNAL(pluginsWriteConfigReq(QXmlStreamWriter&)), SLOT(writeXmlConfig(QXmlStreamWriter&)), Qt::DirectConnection); connect(guiPlugin, SIGNAL(pluginsReadConfigReq(QString)), SLOT(readXmlConfig(QString)), Qt::DirectConnection); connect(this, SIGNAL(saveGraphString(QString&)), guiPlugin, SLOT(saveGraphString(QString&)), Qt::DirectConnection); connect(this, SIGNAL(loadGraphString(QString)), guiPlugin, SLOT(loadGraphString(QString)), Qt::DirectConnection); }
void OlvisExecGuiPlugin::loadGraphString(const QString& data) { mInterface->clear(); mInterface->loadFromData(data); emit pluginsReadConfigReq(data); }