right...<div><br></div><div><meta name="qrichtext" content="1"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">[...]Model<span style=" color:#000000;">::</span>addDataSourceFileItem(...)</pre><div><br></div>(which I recently moved from primitiveModel into stringmodel and scalarmodel) adds strings to the view primitive dialog rather than to the store. After a recent change, it is no longer called if the datasource has no output strings/scalars.</div>
<div><br></div><div>I think that addDataSourceFileItem should just be deleted and the scalars be added to datasource.cpp.</div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Do you agree?</div>
</div><div><br></div><div>Also, vectors with no output scalars still appear in the the view scalars list, and I think they shouldn't.</div><div><br></div><div>I will let you work on both.</div><div><br></div><div> <meta name="qrichtext" content="1"><style type="text/css">
p, li { white-space: pre-wrap; }
</style><div class="gmail_quote">On Wed, Feb 2, 2011 at 6:35 AM, Peter Kümmel <span dir="ltr"><<a href="mailto:syntheticpp@gmx.net">syntheticpp@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
SVN commit 1218459 by kuemmel:<br>
<br>
add scalars and strings to objectstore to make them usable by other dialogs<br>
<br>
M +29 -0 datasourcepluginmanager.cpp<br>
<br>
<br>
--- branches/work/kst/portto4/kst/src/libkst/datasourcepluginmanager.cpp #1218458:1218459<br>
@@ -266,6 +266,35 @@<br>
for (QList<PluginSortContainer>::Iterator i = bestPlugins.begin(); i != bestPlugins.end(); ++i) {<br>
DataSourcePtr plugin = (*i).plugin->create(store, &settingsObject, filename, QString(), e);<br>
if (plugin) {<br>
+<br>
+ // add strings<br>
+ const QStringList strings = plugin->string().list();<br>
+ if (!strings.isEmpty()) {<br>
+ foreach(const QString& key, strings) {<br>
+ QString value;<br>
+ DataString::ReadInfo readInfo(&value);<br>
+ plugin->string().read(key, readInfo);<br>
+ StringPtr s = store->createObject<String>();<br>
+ s->setProvider(plugin);<br>
+ s->setSlaveName(key);<br>
+ s->setValue(value);<br>
+ }<br>
+ }<br>
+<br>
+ // add scalars<br>
+ const QStringList scalars = plugin->scalar().list();<br>
+ if (!scalars.isEmpty()) {<br>
+ foreach(const QString& key, scalars) {<br>
+ double value;<br>
+ DataScalar::ReadInfo readInfo(&value);<br>
+ plugin->scalar().read(key, readInfo);<br>
+ ScalarPtr s = store->createObject<Scalar>();<br>
+ s->setProvider(plugin);<br>
+ s->setSlaveName(key);<br>
+ s->setValue(value);<br>
+ }<br>
+ }<br>
+<br>
return plugin;<br>
}<br>
}<br>
_______________________________________________<br>
Kst mailing list<br>
<a href="mailto:Kst@kde.org">Kst@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kst" target="_blank">https://mail.kde.org/mailman/listinfo/kst</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse;color:rgb(136, 136, 136)">C. Barth Netterfield<br>University of Toronto<br>416-845-0946</span><div>
<span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse;color:rgb(136, 136, 136)"><br></span></div><br>
</div>