def main(): app = QtGui.QApplication(sys.argv) # Create new QT4 app global beraterdata beraterdata = settings.beraterData() # load settings and personal information # window = beraterApp(berater) # create MainMenu window = editmonth.monthWindow(beraterdata) if (not beraterdata.saved): QtGui.QMessageBox.critical(window,'Bitte Beraterdaten Eingeben','Konnte Beraterdaten nicht laden.\nBitte geben Sie die Beraterdaten ein.') sys.exit(app.exec_())
def __init__(self,table,window,printer): self.printer = printer self.table = table self.data = window.month.data self.window = window self.beraterData = settings.beraterData() # load beraterdata # dialog.exec_() # handle the Printing self.printer.setPageMargins(20,20,20,20,0) self.pagewidth = self.printer.pageRect().width() self.pagewidthMM = self.printer.pageRect(0).width() self.pageheight = self.printer.pageRect().height() self.pageheightMM = self.printer.pageRect(0).height() ### Define Fonts self.smallFont = QtGui.QFont('Arial',8) self.tableFont = QtGui.QFont('Arial',10) # Normal font self.tableHeadFont = QtGui.QFont('Arial',10,75) # Bold font self.headingFont = QtGui.QFont('Arial',20,75) # Big Heading self.heading2Font = QtGui.QFont('Arial',15,50) # Paper Description Font ### Define Table Columns in mm self.tableCols = [0,10,25,55,85,105,125,145,160]