Exemplo n.º 1
0
class WeeklyDialog(QtWidgets.QDialog):
    def __init__(self, parent=None):
        super(WeeklyDialog, self).__init__(parent)
        self.ui = WeeklyForm()
        self.ui.setupUi(self)
        # use new style signals
        self.ui.buttonBox.accepted.connect(self.accept)
        self.ui.buttonBox.rejected.connect(self.reject)

    def accept(self):
        dated = self.ui.calendarWidget.selectedDate()
        dated2 = self.ui.calendarWidget_2.selectedDate()

        os.system("python3 ../ReportGenerator/reportgen.py --weekly " + dated.toPyDate().strftime("%Y-%m-%d") + " " + dated2.toPyDate().strftime("%Y-%m-%d"))
        super(WeeklyDialog, self).accept()  
Exemplo n.º 2
0
 def __init__(self, parent=None):
     super(WeeklyDialog, self).__init__(parent)
     self.ui = WeeklyForm()
     self.ui.setupUi(self)
     # use new style signals
     self.ui.buttonBox.accepted.connect(self.accept)
     self.ui.buttonBox.rejected.connect(self.reject)