Package qubx_about_plug :: Module qubx_about_testing
[hide private]
[frames] | no frames]

Source Code for Module qubx_about_plug.qubx_about_testing

 1  import cairo 
 2  import gc 
 3  import gobject 
 4  import gtk 
 5  from gtk import gdk 
 6  import numpy 
 7  import time 
 8  import traceback 
 9  import qubx.accept 
10  import qubx.faces 
11  import qubx.GTK 
12  import qubx.toolspace 
13  from qubx.fast.fast_utils import * 
14  from qubx.util_types import WeakEvent, Reffer 
15  from math import * 
16  from numpy import random 
17  from . import qubx_plugin 
18   
19   
20  NUM_ASPECT_TILES = 11 
21   
22   
23 -class TestingFace(qubx_plugin.AboutPlugin):
24 __explore_featured = ['grid'] # these names are visible in the Explore dialog (Admin:Scripts)
25 - def __init__(self, name='Testing'):
26 super(TestingFace, self).__init__(name) 27 self.__ref = Reffer() 28 29 self.grid = qubx.GTK.AspectGrid() 30 self.grid.show() 31 self.pack_start(self.grid, True, True) 32 33 for i in xrange(NUM_ASPECT_TILES): 34 tile = qubx.toolspace.ToolSpace() 35 #tile.ref_draw_handler = draw_fit_icon # self.make_draw(pi, 9*pi/20, 0.35, 2.4) 36 #tile.OnDraw += tile.ref_draw_handler 37 tile.show() 38 self.grid.pack_aspect(tile) 39 layer = qubx.toolspace.Layer(x=0, y=0, w=-.01, h=-.01) 40 tile.add_layer(layer) 41 sub = qubx.toolspace.SubLayer_Label('%i'%(i+1), 0, 1, x=0, y=0, w=-.01, h=-.01) 42 layer.add_sublayer(sub)
43