| Class | FutureLine |
| In: |
futureref.rb
|
| Parent: | Object |
FutureLine attribute object In a InfoFace(Cube) any line could be replaced with a curved one. The FutureLine only stores information on how the line is going to created. Maybe introduce a ref list for the write2table function so it can be moved elsewhere.
| changed | [RW] | interaction attributes |
| defaultprefix | [RW] | for the write2table method |
| info | [RW] | ref attributes |
| parent | [RW] | ref attributes |
| radius | [RW] | attribute attributes, often from dialog |
| refattr | [RW] | ref attributes |
| refcol | [RW] | table attributes |
| reflist | [RW] | for the write2table method |
| row | [RW] | table attributes |
| selected | [RW] | interaction attributes |
| xaxis | [RW] | attribute attributes, often from dialog |
| yaxis | [RW] | attribute attributes, often from dialog |
| zaxis | [RW] | attribute attributes, often from dialog |
# File futureref.rb, line 209 def initialize(*args) @parent = self @radius = 0.0 @row = nil @refs = nil @refcol = nil #@info = [self,self,"fl"] if args.length == 7 puts "6 arg" @radius = args[0] @xaxis = args[1] @yaxis = args[2] @zaxis = args[3] @refattr = args[4] @parent = args[5] @info=[self,@parent,"fl#{@@count}"] @@count += 1 else puts "unsuccessful initialization of FutureLine object" end end
write futureref to table.
# File futureref.rb, line 243 def write2table(table,row1) attr_index = 1 @row = row1 table.setItemText(row1 ,0,self.info[2]) # this method looks awkward, maybe it could be done in another way def writer(table, row1, defaults, attr, defaultname, name, attr_index ) if attr != defaults[defaultname] && attr != nil table.setItemText(row1 ,attr_index,name) attr_index += 1 table.setItemText(row1 ,attr_index,attr.to_s) attr_index += 1 end return attr_index, row1 end if @radius != 0.0 attr_index, row1 = writer(table, row1, $defaults, @radius, 'lineradius', "radius", attr_index) end attr_index, row1 = writer(table, row1, $defaults, @xaxis, 'linexaxis', "xaxis", attr_index) attr_index, row1 = writer(table, row1, $defaults, @yaxis, 'lineyaxis', "yaxis", attr_index) attr_index, row1 = writer(table, row1, $defaults, @zaxis, 'linezaxis', "zaxis", attr_index) attr_index, row1 = writer(table, row1, $defaults, @refattr, 'linerefattr', "refattr", attr_index) end
this method looks awkward, maybe it could be done in another way
# File futureref.rb, line 248 def writer(table, row1, defaults, attr, defaultname, name, attr_index ) if attr != defaults[defaultname] && attr != nil table.setItemText(row1 ,attr_index,name) attr_index += 1 table.setItemText(row1 ,attr_index,attr.to_s) attr_index += 1 end return attr_index, row1 end