예제 #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)
        QObject.connect(self.ui.comboBox, SIGNAL("currentIndexChanged(int)"),
                        self.checkChoices)

    def shown(self):
        self.checkChoices(self.ui.comboBox.currentIndex())
        pass

    def execute(self):
        if self.ui.comboBox.currentIndex() == 1:
            self.shared['type'] = 'bug'
        else:
            self.shared['type'] = 'feature'
        return True

    def checkChoices(self, value):
        if int(value) != 0:
            self.mainwindow.enableNext()
        else:
            self.mainwindow.disableNext()

    @property
    def mainwindow(self):
        return self.parentWidget().parentWidget().parentWidget()

    @property
    def shared(self):
        return self.parent().parent().parent().shared_data
예제 #2
0
 def __init__(self, *args):
     QtGui.QWidget.__init__(self,None)
     self.ui = Ui_bugWidget()
     self.ui.setupUi(self)
     QObject.connect(self.ui.comboBox,
                            SIGNAL("currentIndexChanged(int)"),
                            self.checkChoices)
예제 #3
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)
        QObject.connect(self.ui.comboBox,
                               SIGNAL("currentIndexChanged(int)"),
                               self.checkChoices)

    def shown(self):
        self.checkChoices(self.ui.comboBox.currentIndex())
        pass

    def execute(self):
        if self.ui.comboBox.currentIndex() == 1:
            self.shared['type'] = 'bug'
        else:
            self.shared['type'] = 'feature'
        return True

    def checkChoices(self, value):
        if int(value) != 0:
            self.mainwindow.enableNext()
        else:
            self.mainwindow.disableNext()

    @property
    def mainwindow(self):
        return self.parentWidget().parentWidget().parentWidget()

    @property
    def shared(self):
        return self.parent().parent().parent().shared_data
예제 #4
0
 def __init__(self, *args):
     QtGui.QWidget.__init__(self, None)
     self.ui = Ui_bugWidget()
     self.ui.setupUi(self)
     QObject.connect(self.ui.comboBox, SIGNAL("currentIndexChanged(int)"),
                     self.checkChoices)