Version: 1.2.0_devel (using KDE 3.4.0, compiled sources) Compiler: gcc version 3.4.3 OS: SunOS (sun4u) release 5.8 There currently is a list of scalars, which can be used pretty much anywhere to build labels or equations. Non-numerical values are hence not supported. It would be nice to add support for plain strings (not usable in equations, but in labels). I believe this is a prerequisite to be able to use metadata provided by datasources.
It would be nice to ba able to edit a list of custom strings from the settings dialog, to set e.g. company name, user name, department, e-mail, phone number, copyright notice, etc... so that they can be used easily.
Any chance that this request can be moved up the priority list ?
If I were to add a couple of QString metadata to a datasource, is there a way I could reference them in a label ? For example, if I make the required changes for an ASCII datasource to return the skipped header lines in one or more string variables like file1.dat-header1, file1.dat-header2, etc... can I then use them in labels with the[file1.dat-header1] syntax or can they only be displayed in the dialog George added some time ago (bug #120773) ? In other words, do we have string variables yet ?
Yes it should work just as you describe already.
So, all that is lacking is some goodwill to update datasources so that they provide some metadata, and maybe a UI to set strings manually ? Interesting, I will try to see what I can do to CDF (export global attributes) and ASCII (one string for each header line) for a start...
I have just tried initial metadata passing from an internal "test" datasource (where I can play without fearing to break things!) and it works partly: I get the metadata passed on to kst, I can see it in the metadata dialog called from the RMB menu on a vector in the data manager, but when I use a label like [Title], even though the "Title" metadata exists in the metadata dialog and has the right contents, the label remains empty. It looks like there is still something lacking somewhere... Besides, I have been thinking about this a bit more and I believe we need a mechanism to auto-sequence strings like vectors, curves and other objects so that we don't get name collisions when many datasources provide the same keys. But then, that means kst has to maintain a mapping like: [kstName] <-> datasource/key I am not sure that's all in place yet ? If it isn't too big a change, I'd really like to see that added for 1.3.0 because it is a very usual complaint here that there is no good way to have reliable (aka as automatically updated :-)) context information added to kst plots. Once the infrastructure is in place, adding metadata for ASCII, CDF (global attributes are just that) and possibly netCDF should be very quick.
This functionality is now implemented.
Sorry, but I'm going to reopen this one for the following reasons: I have just tried to create a custom string (from the create label dialog), and there are problems: 1) the first time I create the string "test" with contents "foo" it seems to work, but then the label shows no contents 2) when I subsequently try to edit the contents of that string from the label dialog (edit string contents) it opens a diloag whith empty contents (which is consistent with what the label showed !) and when I enter something it says "Error saving your new string" 3) it seems that not all characters are allowed within strings as I get the same error message as soon as there are spaces for instance. I'd say spaces sound right for string contents and should be allowed :-) Maybe not in the name but at least in the contents ! I don't think it's wise to ship 1.4 in that state, so as almost everything is there to provide that feature, let's just make it work 100% :-)
I agree. This should be fixed....
Ok. We should be good to go now. Fixed in rev. 640094.
Seems to work great :-) And you can even have blanks, not only in string contents but even in string names (hopefully this won't break further down the line) !