本文整理汇总了Python中score.Score.queueMovie方法的典型用法代码示例。如果您正苦于以下问题:Python Score.queueMovie方法的具体用法?Python Score.queueMovie怎么用?Python Score.queueMovie使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类score.Score
的用法示例。
在下文中一共展示了Score.queueMovie方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MenuManager
# 需要导入模块: from score import Score [as 别名]
# 或者: from score.Score import queueMovie [as 别名]
#.........这里部分代码省略.........
self.helpEngine = QtHelp.QHelpEngineCore(cacheDir + helpDataFile)
self.helpEngine.setupData()
qtDocRoot = QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.DocumentationPath) + '/qch'
qtDocRoot = QtCore.QDir(qtDocRoot).absolutePath()
qchFiles = ['/qt.qch', '/designer.qch', '/linguist.qch']
oldDir = self.helpEngine.customValue('docDir', '')
if oldDir != qtDocRoot:
for qchFile in qchFiles:
self.helpEngine.unregisterDocumentation(QtHelp.QHelpEngineCore.namespaceName(qtDocRoot + qchFile))
# If the data that the engine will work on is not yet registered, do it
# now.
for qchFile in qchFiles:
self.helpEngine.registerDocumentation(qtDocRoot + qchFile)
self.helpEngine.setCustomValue('docDir', qtDocRoot)
def itemSelected(self, userCode, menuName):
if userCode == MenuManager.LAUNCH:
self.launchExample(self.currentInfo)
elif userCode == MenuManager.LAUNCH_QML:
self.launchQmlExample(self.currentInfo)
elif userCode == MenuManager.DOCUMENTATION:
self.showDocInAssistant(self.currentInfo)
elif userCode == MenuManager.QUIT:
self.window.quit()
elif userCode == MenuManager.FULLSCREEN:
self.window.toggleFullscreen()
elif userCode == MenuManager.ROOT:
# Out.
self.score.queueMovie(self.currentMenu + ' -out', Score.FROM_START,
Score.LOCK_ITEMS)
self.score.queueMovie(self.currentMenuButtons + ' -out',
Score.FROM_START, Score.LOCK_ITEMS)
self.score.queueMovie(self.currentInfo + ' -out')
self.score.queueMovie(self.currentInfo + ' -buttons -out',
Score.NEW_ANIMATION_ONLY)
self.score.queueMovie('back -out', Score.ONLY_IF_VISIBLE)
if self.qmlRoot is not None:
self.qmlRoot.setProperty('show', False)
# Book-keeping.
self.currentMenuCode = MenuManager.ROOT
self.currentMenu = menuName + ' -menu1'
self.currentMenuButtons = menuName + ' -buttons'
self.currentInfo = menuName + ' -info'
# In.
self.score.queueMovie('upndown -shake')
self.score.queueMovie(self.currentMenu, Score.FROM_START,
Score.UNLOCK_ITEMS)
self.score.queueMovie(self.currentMenuButtons, Score.FROM_START,
Score.UNLOCK_ITEMS)
self.score.queueMovie(self.currentInfo)
if not Colors.noTicker:
self.ticker.doIntroTransitions = True
self.tickerInAnim.startDelay = 2000
self.ticker.useGuideQt()
self.score.queueMovie('ticker', Score.NEW_ANIMATION_ONLY)
elif userCode == MenuManager.MENU1:
# Out.
示例2: MenuManager
# 需要导入模块: from score import Score [as 别名]
# 或者: from score.Score import queueMovie [as 别名]
class MenuManager(QObject):
ROOT, MENU1, MENU2, LAUNCH, DOCUMENTATION, QUIT, FULLSCREEN, UP, DOWN, \
BACK, LAUNCH_QML = range(11)
pInstance = None
def __init__(self):
super(MenuManager, self).__init__()
self.contentsDoc = None
self.assistantProcess = QProcess()
self.helpRootUrl = ''
self.docDir = QDir()
self.imgDir = QDir()
self.info = {}
self.window = None
self.ticker = None
self.tickerInAnim = None
self.upButton = None
self.downButton = None
self.score = Score()
self.currentMenu = "[no menu visible]"
self.currentCategory = "[no category visible]"
self.currentMenuButtons = "[no menu buttons visible]"
self.currentInfo = "[no info visible]"
self.currentMenuCode = -1
self.readXmlDocument()
@classmethod
def instance(cls):
if cls.pInstance is None:
cls.pInstance = cls()
return cls.pInstance
def getResource(self, name):
return QByteArray()
def readXmlDocument(self):
xml_file = QFile(':/xml/examples.xml')
xml_file.open(QFile.ReadOnly | QFile.Text)
contents = xml_file.readAll().data()
xml_file.close()
self.contentsDoc = parseString(contents)
def itemSelected(self, userCode, menuName):
if userCode == MenuManager.LAUNCH:
self.launchExample(self.currentInfo)
elif userCode == MenuManager.LAUNCH_QML:
self.launchQml(self.currentInfo)
elif userCode == MenuManager.DOCUMENTATION:
self.showDocInAssistant(self.currentInfo)
elif userCode == MenuManager.QUIT:
QApplication.quit()
elif userCode == MenuManager.FULLSCREEN:
self.window.toggleFullscreen()
elif userCode == MenuManager.ROOT:
# Out.
self.score.queueMovie(self.currentMenu + ' -out', Score.FROM_START,
Score.LOCK_ITEMS)
self.score.queueMovie(self.currentMenuButtons + ' -out',
Score.FROM_START, Score.LOCK_ITEMS)
self.score.queueMovie(self.currentInfo + ' -out')
self.score.queueMovie(self.currentInfo + ' -buttons -out',
Score.NEW_ANIMATION_ONLY)
self.score.queueMovie('back -out', Score.ONLY_IF_VISIBLE)
# Book-keeping.
self.currentMenuCode = MenuManager.ROOT
self.currentMenu = menuName + ' -menu1'
self.currentMenuButtons = menuName + ' -buttons'
self.currentInfo = menuName + ' -info'
# In.
self.score.queueMovie('upndown -shake')
self.score.queueMovie(self.currentMenu, Score.FROM_START,
Score.UNLOCK_ITEMS)
self.score.queueMovie(self.currentMenuButtons, Score.FROM_START,
Score.UNLOCK_ITEMS)
self.score.queueMovie(self.currentInfo)
if not Colors.noTicker:
self.ticker.doIntroTransitions = True
self.tickerInAnim.setStartDelay(2000)
self.ticker.useGuideQt()
self.score.queueMovie('ticker', Score.NEW_ANIMATION_ONLY)
elif userCode == MenuManager.MENU1:
# Out.
self.score.queueMovie(self.currentMenu + ' -out', Score.FROM_START,
Score.LOCK_ITEMS)
self.score.queueMovie(self.currentMenuButtons + ' -out',
Score.FROM_START, Score.LOCK_ITEMS)
self.score.queueMovie(self.currentInfo + ' -out')
# Book-keeping.
self.currentMenuCode = MenuManager.MENU1
self.currentCategory = menuName
#.........这里部分代码省略.........