Ejemplo n.º 1
0
class Widget(QtGui.QWidget, ScreenWidget):
    title = ki18n("Bug Reporting Tool")
    desc = ki18n("Welcome to Bug Reporting Tool :)")

    def __init__(self, *args):
        QtGui.QWidget.__init__(self,None)
        self.ui = Ui_bugWidget()
        self.ui.setupUi(self)

    def shown(self):
        pass

    def execute(self):
        return True

    @property
    def choices(self):
        return self.ui.choicesBox

    def add_choice(self, option, is_multiple=False):
        widget = None
        if is_multiple:
            widget = QtGui.QCheckBox(option)
        else:
            widget = QtGui.QRadioButton(option)
        assert widget != None, 'Unexpected None value for widget'
        self.ui.choicesBox.insertWidget(0,widget)

    def get_response(self):
        return [c for c in range(0, self.choices.count()) if \
                self.choices.itemAt(c).widget().isChecked()]
Ejemplo n.º 2
0
class Widget(QtGui.QWidget, ScreenWidget):
    title = ki18n("Bug Reporting Tool")
    desc = ki18n("Welcome to Bug Reporting Tool :)")

    def __init__(self, *args):
        QtGui.QWidget.__init__(self, None)
        self.ui = Ui_bugWidget()
        self.ui.setupUi(self)

    def shown(self):
        pass

    def execute(self):
        return True

    @property
    def choices(self):
        return self.ui.choicesBox

    def add_choice(self, option, is_multiple=False):
        widget = None
        if is_multiple:
            widget = QtGui.QCheckBox(option)
        else:
            widget = QtGui.QRadioButton(option)
        assert widget != None, 'Unexpected None value for widget'
        self.ui.choicesBox.insertWidget(0, widget)

    def get_response(self):
        return [c for c in range(0, self.choices.count()) if \
                self.choices.itemAt(c).widget().isChecked()]
Ejemplo n.º 3
0
 def __init__(self, *args):
     QtGui.QWidget.__init__(self,None)
     self.ui = Ui_bugWidget()
     self.ui.setupUi(self)
Ejemplo n.º 4
0
 def __init__(self, *args):
     QtGui.QWidget.__init__(self, None)
     self.ui = Ui_bugWidget()
     self.ui.setupUi(self)