Archive for October, 2009

Continued

Finance| No Comments »

Had to take time off to deal with some more immediate financial issues….

If I recall, I was starting to define how the data flow was going to behave w.r.t. the ScalarArray datatype. The whole setDirtyBit/cook order. I’m using the imgNode system as an example.

  • The source node has to be able to define its ScalarArrayBounds with a minimum of cooking.
  • This is passed down through the operators to the Buffer node, where it keeps a master list of the entire ScalarArray for display.
  • Any time a node has a parameter change, it calls Node::setDirty(), which triggers updates to all its output nodes downstream by calling setDirty() on them.
  • ImgNode::getBBox() is used to get the image bounds. FinNode::getBounds() is the equivalent.
  • ImgNode::fillTile() is used to calculate a piece of the image. FinNode::calcData() is the equivalent.

Got the Buffer class, and all the execution methods filled in.

Start on the Fin Viewer! Need to be able to see these samples. I know I shouldn’t go too crazy in implementing this. Just need the basics to be able to see these samples, scan across them, etc. I keep looking for examples of other financial software online…. Just tick marks I guess….

At the very least, I would need a way to make tickmarks. The values can be done with niceNum() (Graphics Gems I), but for time, I would need a niceNum() for financial time. Something that will handle years/months/days/hours/minutes/seconds.

Got the file to read in the data. Working on the display next.

There are 3 instances of a 2D gl view, one for the channel editor, one for the image viewer, and now a 3rd one for the fin viewer. I REALLY should create a GL 2D palette class. This would take/save views from a BBox, then subclass this for the the image viewer, and the fin viewer. I guess I have the time. I really don’t feel like re-writing all the get/save 2D view stuff….

Ok, maybe I don’t have to change the other two existing widgets. That would take a while. But for the FinView, I’ll start with the 2D canvas widget first, then have the FinView subclass off of that. I can look into using it for the other classes later. And I’ll have it available for future classes.


FinViewer

Finance| No Comments »

Got the basic display mechanism working. Its very similar to the image processing model. The data is read in pieces, collected into a master buffer and displayed. I can properly display one array, and I’m trying to get the FinViewer to display multiple stacked arrays, each with their own view. That might be the most compact/accurate way to display multiple data sets since they have such varying ranges. I thought I could display them in one view, but that doesn’t work at all.

So the task is to detect for a condition, and flag it. Thinking about how I’m going to represent these ‘events’. Maybe just going to call it an ‘event’, and the data streams pass arrays of samples and events for display.

I’m happy that I’m going to get the shading language involved to make this happen.

Enough with the display. I can display multiple traces, display their values, edit their individual views, etc. I still can’t think of a solution for doing the tick marks in time. I need to find a ‘niceNum’ that works for years/months/days/hours/mins/secs.

Starting on the expression flag node.

Fin Expr Node

Finance| No Comments »

Very psyched about this. This is a great example for the expression language to make a profound impact. To make it work, need to implement some missing pieces:

  • Need a multi-line string input to define the expression. Actually, all I need is an array of strings, then have a new active gui widget to handle it.
  • Need some variables defined. All these variables have relative addressing
    • delta[int] - 1st order difference between current sample and last sample
    • sample[int] - tick data. This should be readable and writeable
    • time[int] - timestamp. This should be readable and writeable.
  • The timestamps are writeable, but shouldn’t be allowed to change the tick ordering. But how can you enforce that? Maybe provide a sorting operator or something? Still, no sense in constraining it, or detecting it.
  • Allow for any local variable to be automatically binded as non-varying inputs.
  • Have to improve the temp variable dialogue. Need to be able to define vector, vector, string, toggle (int), and menu (int).

If I can get this working, this will bullet-proof the shading language.

I forgot all the stuff involved with introducing a new Qt widget through the system. The multi-line edit is QTextEdit, have to subclass in guq first to bridge the signal-slot bullshit. Already got a text instanced. Since we’ll be coding, I have to allow for ‘return’ key to be pressed and keep the focus. ‘Shift-Return’ will remove the keyboard focus.

Got the QTextEdit working with the guq library. Next is making it an active parameter widget with the guqLink library.

Wow, got the widget instanced as a parameter. Have to work on getting it to play well with the application. Its not catching the up/down arrow events. Also, the Shift-Return is actually inserting a ‘return’. Then I have to get it to update the Array properly. But a lot of the hard part is done.

Ok, now I need a strategy for saving the multi line widget contents to an array of strings.

  • Once the user is done editing a line (Qt calls it a paragraph), we write the line to the string array
  • Ways to detect when a user is done editing a line are:
    • Hitting ‘return’. Return also inserts a new line, potentially splitting an existing line.
    • using up/down/left/right arrow to go to another line.
  • So optimally, we need a callback signal to tell when the user has finished editing a line. If the guq::TextEdit could handle this functionality, then that’s less work for a client to figure out.

Got this all working… Next up… more types of tmp variables. Should start with something minimal for the moment. But eventually, we should be allowed to specify any type of tmp variable type, and any type of gui to control it….. For now, just arrays of floats, ints, and strings will be enough.


Copyright © 2010 Luna-Canis | Created by miloIIIIVII
Top | Sidebar | Sitemap | Disclaimer | Network