当前位置: 首页>>代码示例>>Python>>正文


Python QGroupBox.window方法代码示例

本文整理汇总了Python中PyQt4.QtGui.QGroupBox.window方法的典型用法代码示例。如果您正苦于以下问题:Python QGroupBox.window方法的具体用法?Python QGroupBox.window怎么用?Python QGroupBox.window使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt4.QtGui.QGroupBox的用法示例。


在下文中一共展示了QGroupBox.window方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Score

# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import window [as 别名]
class Score(_base.Group, scoreproperties.ScoreProperties):
    @staticmethod
    def title(_=_base.translate):
        return _("Score")

    def createWidgets(self, layout):
        self.pieceLabel = QLabel()
        self.piece = QLineEdit()
        self.pieceLabel.setBuddy(self.piece)
        self.opusLabel = QLabel()
        self.opus = QLineEdit()
        self.opusLabel.setBuddy(self.opus)
        self.scoreProps = QGroupBox(checkable=True, checked=False)
        scoreproperties.ScoreProperties.createWidgets(self)
        
        grid = QGridLayout()
        grid.addWidget(self.pieceLabel, 0 ,0)
        grid.addWidget(self.piece, 0, 1)
        grid.addWidget(self.opusLabel, 1, 0)
        grid.addWidget(self.opus, 1, 1)
        layout.addLayout(grid)
        layout.addWidget(self.scoreProps)
        layout = QVBoxLayout()
        self.scoreProps.setLayout(layout)
        scoreproperties.ScoreProperties.layoutWidgets(self, layout)
        
        scorewiz = self.scoreProps.window()
        self.setPitchLanguage(scorewiz.pitchLanguage())
        scorewiz.pitchLanguageChanged.connect(self.setPitchLanguage)
        
    def translateWidgets(self):
        self.pieceLabel.setText(_("Piece:"))
        self.opusLabel.setText(_("Opus:"))
        self.scoreProps.setTitle(_("Properties"))
        scoreproperties.ScoreProperties.translateWidgets(self)
        
    def accepts(self):
        return (StaffGroup, _base.Part)

    def makeNode(self, node):
        score = ly.dom.Score(node)
        h = ly.dom.Header()
        piece = self.piece.text().strip()
        opus = self.opus.text().strip()
        if piece:
            h['piece'] = ly.dom.QuotedString(piece)
        if opus:
            h['opus'] = ly.dom.QuotedString(opus)
        if len(h):
            score.append(h)
        return score
    
    def globalSection(self, builder):
        if self.scoreProps.isChecked():
            return scoreproperties.ScoreProperties.globalSection(self, builder)
开发者ID:EdwardBetts,项目名称:frescobaldi,代码行数:57,代码来源:containers.py


注:本文中的PyQt4.QtGui.QGroupBox.window方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。