#!/usr/bin/env python #coding: utf-8 import os import platform import sys from PyQt4.QtCore import * from PyQt4.QtGui import * from assignment import * from reading import * from schedule import * from calendar import * from readingDlg import * from actions import * class AssignmentDlg(QDialog): def __init__(self, parent=None): super(AssignmentDlg, self).__init__(parent) dateLabel = QLabel(self.trUtf8("&Date")) courseLabel = QLabel(self.trUtf8("&Course")) descriptionLabel = QLabel(self.trUtf8("De&scription")) availableLabel = QLabel(self.trUtf8("&Available")) begunLabel = QLabel(self.trUtf8("&Begun")) finishedLabel = QLabel(self.trUtf8("&Finished")) deliveredLabel = QLabel(self.trUtf8("De&livered")) dateEdit = QLineEdit() courseEdit = QLineEdit() descriptionEdit = QLineEdit() availableEdit = QCheckBox() begunEdit = QCheckBox() finishedEdit = QCheckBox() deliveredEdit = QCheckBox() dateLabel.setBuddy(dateEdit) courseLabel.setBuddy(courseEdit) descriptionLabel.setBuddy(descriptionEdit) availableLabel.setBuddy(availableEdit) begunLabel.setBuddy(begunEdit) finishedLabel.setBuddy(finishedEdit) deliveredLabel.setBuddy(deliveredEdit) self.layout = QGridLayout() self.layout.addWidget(dateLabel, 0, 0) self.layout.addWidget(courseLabel, 1, 0) self.layout.addWidget(descriptionLabel, 2, 0) self.layout.addWidget(availableLabel, 3, 0) self.layout.addWidget(begunLabel, 4, 0) self.layout.addWidget(finishedLabel, 5, 0) self.layout.addWidget(deliveredLabel, 6, 0) self.layout.addWidget(dateEdit, 0, 1) self.layout.addWidget(courseEdit, 1, 1) self.layout.addWidget(descriptionEdit, 2, 1) self.layout.addWidget(availableEdit, 3, 1) self.layout.addWidget(begunEdit, 4, 1) self.layout.addWidget(finishedEdit, 5, 1) self.layout.addWidget(deliveredEdit, 6, 1) self.setLayout(self.layout)