def __init__(self, modules_path): QDeclarativeView.__init__(self) self.module = Module(modules_path) context = self.rootContext() print self.module.modules context.setContextProperty('plugins', self.module.toDict()) self.setSource(QUrl('ui/qml/ScriptChooser.qml')) self.rootObject().scriptSelected.connect(self.onScriptSelected) self.__lock = Lock()
def __init__(self, *args, **kwargs): QDeclarativeView.__init__(self, *args, **kwargs) context = self.rootContext() context.setContextProperty('menu', self) map_file = settings.value('map') if not map_file: map_file = glob('maps/*json')[0] self.selected_map = map_file self.setSource('menu.qml') self.setResizeMode(QDeclarativeView.SizeRootObjectToView) self.rootObject().initial_map(Map.read_spec(map_file)['title'])
def __init__(self, *args, **kwargs): QDeclarativeView.__init__(self, *args, **kwargs) context = self.rootContext() context.setContextProperty('menu', self) map_file = settings.value('map') if not map_file: map_file = glob('maps/*json')[0] self.selected_map = map_file self.setSource('menu.qml') self.setResizeMode(QDeclarativeView.SizeRootObjectToView) self.rootObject().initial_map(Map.read_spec(map_file)['title'])
def __init__(self, menu, settings, *args, **kwargs): QDeclarativeView.__init__(self, *args, **kwargs) self.exception = None self.sound = Sounder() self.menu = menu self.settings = settings self.rt_pool = []#fix fault self.setWindowTitle('findZbomb!') self.setSource('interface.qml') self.set_map(None) self.redraw() context = self.rootContext() context.setContextProperty('obj', self) self.mega_start.connect(self._mega_start) self.setResizeMode(QDeclarativeView.SizeRootObjectToView) code = self.settings.value('code') if code: self.rootObject().set_code(code)
def __init__(self, menu, settings, *args, **kwargs): QDeclarativeView.__init__(self, *args, **kwargs) self.exception = None self.sound = Sounder() self.menu = menu self.settings = settings self.rt_pool = [] #fix fault self.setWindowTitle('findZbomb!') self.setSource('interface.qml') self.set_map(None) self.redraw() context = self.rootContext() context.setContextProperty('obj', self) self.mega_start.connect(self._mega_start) self.setResizeMode(QDeclarativeView.SizeRootObjectToView) code = self.settings.value('code') if code: self.rootObject().set_code(code)
def __init__(self): QDeclarativeView.__init__(self) self.setAttribute(Qt.WA_OpaquePaintEvent) self.setAttribute(Qt.WA_NoSystemBackground) self.viewport().setAttribute(Qt.WA_OpaquePaintEvent) self.viewport().setAttribute(Qt.WA_NoSystemBackground)
def __init__(self): QDeclarativeView.__init__(self) self.setAttribute(Qt.WA_OpaquePaintEvent) self.setAttribute(Qt.WA_NoSystemBackground) self.viewport().setAttribute(Qt.WA_OpaquePaintEvent) self.viewport().setAttribute(Qt.WA_NoSystemBackground)
def __init__(self): QDeclarativeView.__init__(self) self.setSource(QUrl.fromLocalFile(adjust_filename('bug_847.qml', __file__))) self.rootObject().setProperty('pythonObject', self)
def __init__(self): QDeclarativeView.__init__(self) self.setSource( QUrl.fromLocalFile(adjust_filename('bug_847.qml', __file__))) self.rootObject().setProperty('pythonObject', self)
def __init__(self): QDeclarativeView.__init__(self)