Exemplo n.º 1
0
            def __init__(self, fieldLabel='', aboutText='', parent=None):
                QGroupBox.__init__(self, parent)
                self.setLayout(QHBoxLayout())
                self.setContentsMargins(0, 0, 0, 2)
                self.layout().setContentsMargins(0, 0, 0, 0)

                self.FieldLabel = utls.ShortInfoLabel(fieldLabel)
                self.FieldLabel.setMinimumWidth(115)
                self.FieldLabel.setSizePolicy(
                    QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred))
                self.layout().addWidget(self.FieldLabel)

                self.AboutData = utls.ShortInfoLabel(aboutText)
                self.layout().addWidget(self.AboutData)
Exemplo n.º 2
0
def test_ShortInfoLabel(qtbot):
    labelText = 'Title of my mixtape'
    info1 = utls.ShortInfoLabel(labelText)
    qtbot.addWidget(info1)

    assert info1.text() == labelText
    assert info1.wordWrap() == True
    assert info1.font().bold() == False
Exemplo n.º 3
0
        def __init__(self, readmeText, parent=None):
            QGroupBox.__init__(self, parent)
            self.setLayout(QVBoxLayout())
            self.setContentsMargins(0, 0, 0, 0)

            self.layout().addWidget(utls.OneLineInfoLabel('Contributors:'))

            for c in readmeText.contributors:
                contrib = utls.ShortInfoLabel(c)
                contrib.setContentsMargins(10, 0, 0, 0)
                self.layout().addWidget(contrib)
Exemplo n.º 4
0
    def __init__(self, parent=None):
        QWidget.__init__(self, parent)
        self.setLayout(QVBoxLayout())

        # construct readme data to parse out into fields
        readmeText = self._ReadmeFileData(self.parent().thisPath)

        # construct the header
        categoryLabelText = utls.OneLineInfoLabel('About the SedEdu project:',
                                                  utls.titleFont())

        # construct the summary multiline text
        descLabel = utls.ParagraphInfoLabel(readmeText.summary)

        # construct the contributors box
        contribBox = self._ContributorWidget(readmeText)

        # construct the more information text
        completeInfoLabel = utls.ShortInfoLabel(
            'For complete information visit \
            the [SedEdu project page](https://github.com/amoodie/sededu).',
            utls.titleFont())

        # construct the supported by box
        SupportedBy = self._SupportedByWidget(self.parent().privatePath)

        # add widgets in specific vertical order
        self.layout().addWidget(categoryLabelText)
        self.layout().addWidget(descLabel)
        self.layout().addWidget(utls.ShortInfoLabel(readmeText.license))

        self.layout().addStretch(1)
        self.layout().addWidget(contribBox)

        self.layout().addStretch(2)
        self.layout().addWidget(completeInfoLabel)

        self.layout().addStretch(10)
        self.layout().addWidget(SupportedBy)
Exemplo n.º 5
0
 def makeDesc(self):
     Desc = utls.ShortInfoLabel(
         'a sediment-related educational activity suite',
         utls.titleFont())
     return Desc