Beispiel #1
0
def test_all_interfaces():
    # Fill al
    for iname in interface_names():
        print iname
        for i, editor in enumerate(qt_control.qt_widget_plugins(iname)):
            print '  -', editor.name
            name = editor.name.replace('Plugin', 'P.').replace('Widget', 'W.')
            name = '%s_%s' % (iname, name)
            c = new_control(name, iname)
    'ISequence': dict(value=['Item %02d' % i for i in range(15)]),
    'IStr': dict(value=u'Bonjour = Καλημέρα'),
    'ITextStr': dict(value=u"""Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Nunc turpis orci, porta at facilisis sed, dignissim sed magna. 
Aenean rutrum mi vitae nibh fermentum, ut tempus justo pulvinar. 
Donec ac nunc molestie, interdum lectus vel, malesuada metus. 
Ut rhoncus lectus ut risus hendrerit porttitor non id enim. 
Vivamus id mauris vitae metus porta accumsan. Proin ut mi nibh. 
Curabitur condimentum faucibus tortor, vel tincidunt mauris maximus quis. 
Phasellus eleifend feugiat nisl et dapibus. Pellentesque tempus nunc leo, ac bibendum nunc ullamcorper vitae. 
Sed hendrerit nisi mauris, id mattis ligula lacinia vel. Nullam at ultrices justo. 
Aenean eget risus vitae arcu convallis egestas.""")
}


for iname in interface_names():
    for plugin in qt_widget_plugins(iname):
        if 'responsive' in plugin.edit_shape:
            shapes = ['vline', 'hline', 'large']
        else:
            shapes = plugin.edit_shape
        for shape, size in [
                ('small', (50, 50)),
                ('hline', (200, 30)),
                ('vline', (30, 200)),
                ('large', None),
        ]:
            if shape not in shapes:
                continue

            if iname in SAMPLE_VALUES: