def __init__(self, iter=('w', 0, 1, 101), tini=0, func=identity, preF=None, postF=None, tipoAnim=AnimeType.unavez, parent=None): QtGui.QWidget.__init__(self, parent) uic.loadUi(filePath("Gui", "paramTemplate.ui"), self) self.name = iter[0] self.motor = Timer(iter[1:], self.updateFromMotor, tipo='n', preF=preF, postF=postF, tipoAnim=tipoAnim, parent=parent) ## ============================ ## copiamos algunas variables de Timer (PyQt4 no soporta herencia multiple de bases de Qt4) self.intervalo = self.motor.intervalo self.start = self.motor.start self.stop = self.motor.stop ## ============================ self.direccion = 1 self.tipoAnim = tipoAnim self.func = func self.intervalo.reset(t=tini) self.setupUi()
def addLights(self): basedir = '.' if getattr(sys, 'frozen', None): basedir = sys._MEIPASS #else: # basedir = os.path.dirname(__file__) self.colorLights = readFile(filePath("viewer", basedir+"/lights.iv")).getChild(0) self.insertLight(self.colorLights) self.colorLights.whichChild = coin.SO_SWITCH_ALL
def __init__(self, rangep=('w', 0, 1, 0, 10), func=identity, duration=1000, parent=None): # TODO: cambiar el orden: func, rangep... ## rangep = (name, vmin, vmax, vini, npoints) QtGui.QWidget.__init__(self) uic.loadUi(filePath("Gui","paramTemplate2.ui"), self) self.timeline = QtCore.QTimeLine(duration) self.name = rangep[0] self.npoints = rangep[-1] self.func = func ## ============================ self.updateRange(rangep[1:-1]) self.setupUi() if parent: parent.addWidget(self)
def __init__(self, iter=('w', 0, 1, 101), tini=0, func=identity, preF = None, postF = None, tipoAnim = AnimeType.unavez, parent=None): QtGui.QWidget.__init__(self, parent) uic.loadUi(filePath("Gui","paramTemplate.ui"), self) self.name = iter[0] self.motor = Timer( iter[1:], self.updateFromMotor, tipo = 'n', preF=preF, postF=postF, tipoAnim=tipoAnim, parent=parent) ## ============================ ## copiamos algunas variables de Timer (PyQt4 no soporta herencia multiple de bases de Qt4) self.intervalo = self.motor.intervalo self.start = self.motor.start self.stop = self.motor.stop ## ============================ self.direccion = 1 self.tipoAnim = tipoAnim self.func = func self.intervalo.reset(t=tini) self.setupUi()
def addLights(self): self.colorLights = readFile(filePath("viewer", "lights.iv")).getChild(0) self.insertLight(self.colorLights) self.colorLights.whichChild = coin.SO_SWITCH_ALL
import logging from PyQt4 import QtGui, uic, QtCore from pivy.coin import SoSeparator, SoSwitch from page import Page from superficie.util import nodeDict, connect, filePath changePage_fclass, base_class = uic.loadUiType(filePath("viewer", "change-page.ui")) logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) logging.basicConfig() class ChangePageUI(base_class, changePage_fclass): def __init__(self, *args): # noinspection PyCallByClass QtGui.QWidget.__init__(self, *args) self.setupUi(self) class Chapter(QtCore.QObject): """A Chapter""" pageChanged = QtCore.pyqtSignal(Page, int) def __init__(self, name=""): super(Chapter, self).__init__() self.name = name self.book = None self.root = SoSeparator() self.root.setName("Chapter:root")
import logging from PyQt4 import QtGui, uic, QtCore from pivy.coin import SoSeparator, SoSwitch from page import Page from superficie.util import nodeDict, connect, filePath changePage_fclass, base_class = uic.loadUiType( filePath("viewer", "change-page.ui")) logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) logging.basicConfig() class ChangePageUI(base_class, changePage_fclass): def __init__(self, *args): # noinspection PyCallByClass QtGui.QWidget.__init__(self, *args) self.setupUi(self) class Chapter(QtCore.QObject): """A Chapter""" pageChanged = QtCore.pyqtSignal(Page, int) def __init__(self, name=""): super(Chapter, self).__init__() self.name = name self.book = None self.root = SoSeparator()