Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/h/a/HaeffnerLabLattice-HEAD/old_files/lrexp/lrexp/experimenter/widgets/unit.py   HaeffnerLabLattice(Download)
from PyQt4 import QtCore, QtGui
from ...components import Unit, Action, Scan, Sequence, Repeat
from ...util import loadUnit
from ..menubar import recentFiles
 
class RecentFile( QtGui.QAction ):
    def __init__( self, filename, parent ):
        super( RecentFile, self ).__init__( filename.split( '/' )[-1][:-4], parent )
        self.triggered.connect( lambda: parent.newUnit.emit( loadUnit( filename[:-4] ) ) )
        recentFiles.addAction( RecentFile( filename, recentFiles ) )
        if filename != '':
            unit = loadUnit( filename[:-4] )
            self.newUnit.emit( unit )
        return

src/h/a/HaeffnerLabLattice-HEAD/old_files/lrexp/experimenter/widgets/unit.py   HaeffnerLabLattice(Download)
from PyQt4 import QtCore, QtGui
from ...components import Unit, Action, Scan, Sequence, Repeat
from ...util import loadUnit
 
class UnitButtonRow( QtGui.QWidget ):
    def getUnit( self ):
        root = os.environ['LREXPHOME']
        filename = QtGui.QFileDialog.getOpenFileName( self, 'Load Unit', os.path.join( root, 'experiments' ), 'labRAD experiments (*.lre)' )
        if filename != '':
            unit = loadUnit( filename[:-4] )