commit 919b7c8b125762e4429e7d0b00f92fdeb10f02a9 Author: tirilane Date: Thu May 29 08:15:21 2008 +0000 Forgot to add trunk. diff --git a/AssignmentTab.pyw b/AssignmentTab.pyw new file mode 100644 index 0000000..0a7224e --- /dev/null +++ b/AssignmentTab.pyw @@ -0,0 +1,33 @@ +#!/usr/bin/env python +#coding: utf-8 + +import os +import platform +import sys +from PyQt4.QtCore import * +from PyQt4.QtGui import * + +class AssignmentTab(QWidget): + + def __init__(self, parent=None): + + super(AssignmentTab, self).__init__(parent) + + assignmentsTable = QTableWidget() + + addAssignmentButton = QPushButton("Add assignment") + editAssignmentButton = QPushButton("Edit assignment") + assignmentDoneButton = QPushButton("Done") + + vlayout = QVBoxLayout() + hlayout = QHBoxLayout() + + hlayout.addWidget(addAssignmentButton) + hlayout.addWidget(editAssignmentButton) + hlayout.addWidget(assignmentDoneButton) + + vlayout.addWidget(assignmentsTable) + vlayout.addLayout(hlayout) + + self.setLayout(vlayout) + diff --git a/CalendarTab.pyw b/CalendarTab.pyw new file mode 100644 index 0000000..dd0771b --- /dev/null +++ b/CalendarTab.pyw @@ -0,0 +1,21 @@ +#!/usr/bin/env python +#coding: utf-8 + +import os +import platform +import sys +from PyQt4.QtCore import * +from PyQt4.QtGui import * + +class CalendarTab(QWidget): + + def __init__(self, parent=None): + + super(CalendarTab, self).__init__(parent) + + calendar = QCalendarWidget() + + layout = QVBoxLayout() + layout.addWidget(calendar) + self.setLayout(layout) + diff --git a/ReadingTab.pyw b/ReadingTab.pyw new file mode 100644 index 0000000..057a309 --- /dev/null +++ b/ReadingTab.pyw @@ -0,0 +1,34 @@ +#!/usr/bin/env python +#coding: utf-8 + +import os +import platform +import sys +from PyQt4.QtCore import * +from PyQt4.QtGui import * + +class ReadingTab(QWidget): + + + def __init__(self, parent=None): + + super(ReadingTab, self).__init__(parent) + + readingTable = QTableWidget() + + addReadingButton = QPushButton("Add pages to read") + editReadingButton = QPushButton("Edit pages") + readingDoneButton = QPushButton("Done") + + vlayout = QVBoxLayout() + hlayout = QHBoxLayout() + + hlayout.addWidget(addReadingButton) + hlayout.addWidget(editReadingButton) + hlayout.addWidget(readingDoneButton) + + vlayout.addWidget(readingTable) + vlayout.addLayout(hlayout) + + self.setLayout(vlayout) + diff --git a/ScheduleTab.pyw b/ScheduleTab.pyw new file mode 100644 index 0000000..d7c3db4 --- /dev/null +++ b/ScheduleTab.pyw @@ -0,0 +1,30 @@ +#!/usr/bin/env python +#coding: utf-8 + +import os +import platform +import sys +from PyQt4.QtCore import * +from PyQt4.QtGui import * + +class ScheduleTab(QWidget): + + def __init__(self, parent=None): + + super(ScheduleTab, self).__init__(parent) + + scheduleTable = QTableWidget() + + addScheduleButton = QPushButton("Add lesson") + editScheduleButton = QPushButton("Edit lesson") + + vlayout = QVBoxLayout() + hlayout = QHBoxLayout() + + hlayout.addWidget(addScheduleButton) + hlayout.addWidget(editScheduleButton) + + vlayout.addWidget(scheduleTable) + vlayout.addLayout(hlayout) + + self.setLayout(vlayout) diff --git a/actions.py b/actions.py new file mode 100644 index 0000000..645f8b1 --- /dev/null +++ b/actions.py @@ -0,0 +1,16 @@ +#!/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 assignmentDlg import * +from readingDlg import * +from scheduleDlg import * + diff --git a/actions.pyc b/actions.pyc new file mode 100644 index 0000000..987a56f Binary files /dev/null and b/actions.pyc differ diff --git a/addAssignmentDlg.py b/addAssignmentDlg.py new file mode 100644 index 0000000..05b3a41 --- /dev/null +++ b/addAssignmentDlg.py @@ -0,0 +1,25 @@ +#!/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 assignmentDlg import * + +class AddAssignmentDlg(AssignmentDlg): + + def __init__(self, parent=None): + super(AddAssignmentDlg, self).__init__(parent) + + buttonBox = QDialogButtonBox(QDialogButtonBox.Ok|QDialogButtonBox.Cancel) + + self.layout.addWidget(buttonBox, 7, 0, 1, 2) + + self.connect(buttonBox, SIGNAL("accepted()"), self, SLOT("accept()")) + self.connect(buttonBox, SIGNAL("rejected()"), self, SLOT("reject()")) + + self.setWindowTitle(self.trUtf8("Add new assignment")) + diff --git a/addAssignmentDlg.pyc b/addAssignmentDlg.pyc new file mode 100644 index 0000000..7d009f2 Binary files /dev/null and b/addAssignmentDlg.pyc differ diff --git a/addBookDlg.py b/addBookDlg.py new file mode 100644 index 0000000..73db51c --- /dev/null +++ b/addBookDlg.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +#coding: utf-8 + +import os +import platform +import sys +from PyQt4.QtCore import * +from PyQt4.QtGui import * +from bookDlg import * + +class AddBookDlg(BookDlg): + + def __init__(self, parent=None): + super(AddBookDlg, self).__init__(parent) + + buttonBox = QDialogButtonBox(QDialogButtonBox.Ok|QDialogButtonBox.Cancel) + + self.layout.addWidget(buttonBox, 5, 0, 1, 2) + + self.connect(buttonBox, SIGNAL("accepted()"), self, SLOT("accept()")) + self.connect(buttonBox, SIGNAL("rejected()"), self, SLOT("reject()")) + + self.setWindowTitle(self.trUtf8("Add new book")) + diff --git a/addBookDlg.pyc b/addBookDlg.pyc new file mode 100644 index 0000000..349be48 Binary files /dev/null and b/addBookDlg.pyc differ diff --git a/addCourseDlg.py b/addCourseDlg.py new file mode 100644 index 0000000..8e2a2ed --- /dev/null +++ b/addCourseDlg.py @@ -0,0 +1,20 @@ +import platform +import sys +from PyQt4.QtCore import * +from PyQt4.QtGui import * +from courseDlg import * + +class AddCourseDlg(CourseDlg): + + def __init__(self, parent=None): + super(AddCourseDlg, self).__init__(parent) + + buttonBox = QDialogButtonBox(QDialogButtonBox.Ok|QDialogButtonBox.Cancel) + + self.layout.addWidget(buttonBox, 3, 0, 1, 2) + + self.connect(buttonBox, SIGNAL("accepted()"), self, SLOT("accept()")) + self.connect(buttonBox, SIGNAL("rejected()"), self, SLOT("reject()")) + + self.setWindowTitle(self.trUtf8("Add new course")) + diff --git a/addCourseDlg.pyc b/addCourseDlg.pyc new file mode 100644 index 0000000..64b16f5 Binary files /dev/null and b/addCourseDlg.pyc differ diff --git a/addReadingDlg.py b/addReadingDlg.py new file mode 100644 index 0000000..c4a6da1 --- /dev/null +++ b/addReadingDlg.py @@ -0,0 +1,27 @@ +#!/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 * + +class AddReadingDlg(ReadingDlg): + + def __init__(self, parent=None): + super(AddReadingDlg, self).__init__(parent) + + buttonBox = QDialogButtonBox(QDialogButtonBox.Ok|QDialogButtonBox.Cancel) + + self.layout.addWidget(buttonBox, 6, 0, 1, 2) + + self.connect(buttonBox, SIGNAL("accepted()"), self, SLOT("accept()")) + self.connect(buttonBox, SIGNAL("rejected()"), self, SLOT("reject()")) + + self.setWindowTitle(self.trUtf8("Add new reading")) diff --git a/addReadingDlg.pyc b/addReadingDlg.pyc new file mode 100644 index 0000000..9bde8f6 Binary files /dev/null and b/addReadingDlg.pyc differ diff --git a/addScheduleDlg.py b/addScheduleDlg.py new file mode 100644 index 0000000..7c91d89 --- /dev/null +++ b/addScheduleDlg.py @@ -0,0 +1,28 @@ +#!/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 scheduleDlg import * + +class AddScheduleDlg(ScheduleDlg): + + def __init__(self, parent=None): + super(AddScheduleDlg, self).__init__(parent) + + buttonBox = QDialogButtonBox(QDialogButtonBox.Ok|QDialogButtonBox.Cancel) + + self.layout.addWidget(buttonBox, 6, 0, 1, 2) + + self.connect(buttonBox, SIGNAL("accepted()"), self, SLOT("accept()")) + self.connect(buttonBox, SIGNAL("rejected()"), self, SLOT("reject()")) + + self.setWindowTitle(self.trUtf8("Add new lesson")) + diff --git a/addScheduleDlg.pyc b/addScheduleDlg.pyc new file mode 100644 index 0000000..789028c Binary files /dev/null and b/addScheduleDlg.pyc differ diff --git a/assignment.py b/assignment.py new file mode 100644 index 0000000..efbfe47 --- /dev/null +++ b/assignment.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +#coding: utf-8 + +import os +import platform +import sys +from PyQt4.QtCore import * +from PyQt4.QtGui import * + +class AssignmentTab(QWidget): + + def __init__(self, parent=None): + super(AssignmentTab, self).__init__(parent) + + self.assignmentsTable = QTableWidget() + + self.addAssignmentButton = QPushButton("Add assignment") + self.editAssignmentButton = QPushButton("Edit assignment") + self.assignmentDoneButton = QPushButton("Done") + + +## self.assignments = assignmentdata.AssignmentContainer() +## self.assignmentTable = QTableWidget() +## self.setCentralWidget(self.assignmentTable) +## + vlayout = QVBoxLayout() + hlayout = QHBoxLayout() + + hlayout.addWidget(self.addAssignmentButton) + hlayout.addWidget(self.editAssignmentButton) + hlayout.addWidget(self.assignmentDoneButton) + + vlayout.addWidget(self.assignmentsTable) + vlayout.addLayout(hlayout) + + self.setLayout(vlayout) + +## def updateTable(self, current=None): +## +## self.assignmentTable.clear() +## self.assignmentTable.setRowCount(len(self.assignments)) +## self.assignmentTable.setColumnCount(7) +## self.assignmentTable.setHorizontalHeaderLabels(["Date", "Course", "Description", "Available" , "Begun", "Finished", "Delivered"]) +## self.assignmentTable.setAlternatingRowColors(True) +## self.assignmentTable.setEditTriggers(QTableWidget.NoEditTriggers) +## self.assignmentTable.setSelectionBehavior(QTableWidget.SelectRows) +## self.assignmentTable.setSelectionMode(QTableWidget.SingleSelection) +## selected = None + + diff --git a/assignment.pyc b/assignment.pyc new file mode 100644 index 0000000..8ac9ad2 Binary files /dev/null and b/assignment.pyc differ diff --git a/assignmentDlg.py b/assignmentDlg.py new file mode 100644 index 0000000..82ecb63 --- /dev/null +++ b/assignmentDlg.py @@ -0,0 +1,61 @@ +#!/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) + diff --git a/assignmentDlg.pyc b/assignmentDlg.pyc new file mode 100644 index 0000000..b2e18f4 Binary files /dev/null and b/assignmentDlg.pyc differ diff --git a/assignmentModel.py b/assignmentModel.py new file mode 100644 index 0000000..60b4c27 --- /dev/null +++ b/assignmentModel.py @@ -0,0 +1,66 @@ +#!/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 scheduleDlg import * + +class AssignmentModel(): + + date = "" + course = "" + description = "" + available = False + begun = False + finished = False + delivered = False + + def setDate(self, date): + self.date = date + + def getDate(self): + return self.date + + def setCourse(self, course): + self.course = course + + def getCourse(self): + return self.course + + def setDescription(self, description): + self.description = description + + def getDescription(self): + return self.description + + def setAvailable(self, available): + self.available = available + + def getAvailable(self): + return self.available + + def setBegun(self, begun): + self.begun = begun + + def getBegun(self): + return self.begun + + def setFinished(self, finished): + self.finished = finished + + def getFinished(self): + return self.finished + + def setDelivered(self, delivered): + self.delivered = delivered + + def getDelivered(self): + return self.delivered + diff --git a/assignmentModel.pyc b/assignmentModel.pyc new file mode 100644 index 0000000..9c5ed33 Binary files /dev/null and b/assignmentModel.pyc differ diff --git a/bookDlg.py b/bookDlg.py new file mode 100644 index 0000000..20619c6 --- /dev/null +++ b/bookDlg.py @@ -0,0 +1,50 @@ +#!/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 db import * + +class BookDlg(QDialog): + + def __init__(self, parent=None): + super(BookDlg, self).__init__(parent) + + titleLabel = QLabel(self.trUtf8("&Title")) + authorLabel = QLabel(self.trUtf8("&Author")) + editionLabel = QLabel(self.trUtf8("&Edition")) + isbnLabel = QLabel(self.trUtf8("&ISBN")) + courseLabel = QLabel(self.trUtf8("&Course")) + + titleEdit = QLineEdit() + authorEdit = QLineEdit() + editionEdit = QSpinBox() + editionEdit.setRange(1, 50) + isbnEdit = QLineEdit() + courseEdit = QComboBox() + + titleLabel.setBuddy(titleEdit) + authorLabel.setBuddy(authorEdit) + editionLabel.setBuddy(editionEdit) + isbnLabel.setBuddy(isbnEdit) + courseLabel.setBuddy(courseEdit) + + self.layout = QGridLayout() + self.layout.addWidget(titleLabel, 0, 0) + self.layout.addWidget(authorLabel, 1, 0) + self.layout.addWidget(editionLabel, 2, 0) + self.layout.addWidget(isbnLabel, 3, 0) + self.layout.addWidget(courseLabel, 4, 0) + self.layout.addWidget(titleEdit, 0, 1) + self.layout.addWidget(authorEdit, 1, 1) + self.layout.addWidget(editionEdit, 2, 1) + self.layout.addWidget(isbnEdit, 3, 1) + self.layout.addWidget(courseEdit, 4, 1) + self.setLayout(self.layout) diff --git a/bookDlg.pyc b/bookDlg.pyc new file mode 100644 index 0000000..e545cf8 Binary files /dev/null and b/bookDlg.pyc differ diff --git a/calendar.py b/calendar.py new file mode 100644 index 0000000..fbf6aef --- /dev/null +++ b/calendar.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python +#coding: utf-8 + +import os +import platform +import sys +from PyQt4.QtCore import * +from PyQt4.QtGui import * + +class CalendarTab(QWidget): + + def __init__(self, parent=None): + super(CalendarTab, self).__init__(parent) + + calendar = QCalendarWidget() + + layout = QVBoxLayout() + layout.addWidget(calendar) + self.setLayout(layout) + diff --git a/calendar.pyc b/calendar.pyc new file mode 100644 index 0000000..35324b3 Binary files /dev/null and b/calendar.pyc differ diff --git a/courseDlg.py b/courseDlg.py new file mode 100644 index 0000000..2f0e47b --- /dev/null +++ b/courseDlg.py @@ -0,0 +1,39 @@ +#!/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 db import * + +class CourseDlg(QDialog): + + def __init__(self, parent=None): + super(CourseDlg, self).__init__(parent) + + codeLabel = QLabel(self.trUtf8("&Code")) + titleLabel = QLabel(self.trUtf8("&Title")) + shortLabel = QLabel(self.trUtf8("&Short form")) + + codeEdit = QLineEdit() + titleEdit = QLineEdit() + shortEdit = QLineEdit() + + codeLabel.setBuddy(codeEdit) + titleLabel.setBuddy(titleEdit) + shortLabel.setBuddy(shortEdit) + + self.layout = QGridLayout() + self.layout.addWidget(codeLabel, 0, 0) + self.layout.addWidget(titleLabel, 1, 0) + self.layout.addWidget(shortLabel, 2, 0) + self.layout.addWidget(codeEdit, 0, 1) + self.layout.addWidget(titleEdit, 1, 1) + self.layout.addWidget(shortEdit, 2, 1) + self.setLayout(self.layout) diff --git a/courseDlg.pyc b/courseDlg.pyc new file mode 100644 index 0000000..90825d7 Binary files /dev/null and b/courseDlg.pyc differ diff --git a/db.py b/db.py new file mode 100644 index 0000000..28f6fd1 --- /dev/null +++ b/db.py @@ -0,0 +1,151 @@ +#!/usr/bin/env python +#coding: utf-8 + +import os +import platform +import sys +from pysqlite2 import dbapi2 as sqlite +from PyQt4.QtCore import * +from PyQt4.QtGui import * +##from PyQt4.QtSql import * +from main import * +from assignment import * +from reading import * +from schedule import * +from calendar import * +from actions import * + +def initDB(self): + conn = sqlite.connect('scheduler.db') + curs = conn.cursor() + return curs, conn + +def initNewDB(self): + cursor, conn = initDB() + initAssignmentDB(cursor) + initReadingDB(cursor) + initScheduleDB(cursor) + initBookDB(cursor) + initCourseDB(cursor) + exitDB(conn) + +def initAssignmentDB(self, cursor): + cursor.execute(''' + CREATE TABLE Assignment ( + aid INTEGER PRIMARY KEY, + date TEXT, + description TEXT, + available BOOLEAN, + begun BOOLEAN, + finished BOOLEAN, + delivered BOOLEAN + ) + ''') + +def initReadingDB(self, cursor): + cursor.execute(''' + CREATE TABLE Reading ( + rid INTEGER PRIMARY KEY, + week TEXT, + chapter TEXT, + pages TEXT + ) + ''') + +def initScheduleDB(self, cursor): + cursor.execute(''' + CREATE TABLE Lesson ( + lid INTEGER PRIMARY KEY, + day TEXT, + fromtime TEXT, + totime TEXT, + type TEXT, + room TEXT + ) + ''') + +def initBookDB(self, cursor): + cursor.execute(''' + CREATE TABLE Book ( + isbn TEXT PRIMARY KEY, + title TEXT, + author TEXT, + edition INTEGER + ) + ''') + +def initCourseDB(self, cursor): + cursor.execute(''' + CREATE TABLE Course ( + code TEXT PRIMARY KEY, + title TEXT, + short TEXT + ) + ''') + +def initAssignmentInCourse(self, cursor): + cursor.execute(''' + CREATE TABLE assignmentInCourse ( + assignment INTEGER, + course INTEGER + ) + ''') + +def initReadingInCourse(self, cursor): + cursor.execute(''' + CREATE TABLE readingInCourse ( + reading INTEGER, + course INTEGER + ) + ''') + +def initLessonInCourse(self, cursor): + cursor.execute(''' + CREATE TABLE lessonInCourse ( + lesson INTEGER, + course INTEGER + ) + ''') + +def initCourseUsesBook(self, cursor): + cursor.execute(''' + CREATE TABLE courseUsesBook ( + course INTEGER, + book TEXT + ) + ''') + +def addNewBook(self, isbn, title, author, edition, course): + cursor, conn = initDB() + + bookQuery = ''' + INSERT INTO Book + VALUES (%s, %s, %s, %i) + ''' % (isbn, title, author, edition) + courseUsesBookQuery = ''' + INSERT INTO courseUsesBook + VALUES (%i, %s) + ''' % (course, isbn) + + cursor.execute(bookQuery) + cursor.execute(courseUsesBookQuery) + + exitDB(conn) + +def addNewCourse(self, code, title, short): + cursor, conn = initDB() + + courseQuery = ''' + INSERT INTO Course + VALUES (%s, %s, %s) + ''' % (code, title, short) + + cursor.execute(courseQuery) + + exitDB(conn) + +def exitDB(self, conn): + conn.commit() + conn.close() + +initNewDB() diff --git a/db.pyc b/db.pyc new file mode 100644 index 0000000..0659eba Binary files /dev/null and b/db.pyc differ diff --git a/editAssignmentDlg.py b/editAssignmentDlg.py new file mode 100644 index 0000000..a444ef3 --- /dev/null +++ b/editAssignmentDlg.py @@ -0,0 +1,28 @@ +#!/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 assignmentDlg import * + +class EditAssignmentDlg(AssignmentDlg): + + def __init__(self, parent=None): + super(EditAssignmentDlg, self).__init__(parent) + self.setAttribute(Qt.WA_DeleteOnClose) + + buttonBox = QDialogButtonBox(QDialogButtonBox.Apply|QDialogButtonBox.Close) + + self.layout.addWidget(buttonBox, 7, 0, 1, 2) + + self.connect(buttonBox.button(QDialogButtonBox.Apply), SIGNAL("clicked()"), self.apply) + self.connect(buttonBox, SIGNAL("rejected()"), self, SLOT("reject()")) + + self.setWindowTitle(self.trUtf8("Edit assignment")) + + def apply(self): + pass diff --git a/editAssignmentDlg.pyc b/editAssignmentDlg.pyc new file mode 100644 index 0000000..6ce81e5 Binary files /dev/null and b/editAssignmentDlg.pyc differ diff --git a/editReadingDlg.py b/editReadingDlg.py new file mode 100644 index 0000000..bc5f302 --- /dev/null +++ b/editReadingDlg.py @@ -0,0 +1,32 @@ +#!/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 * + +class EditReadingDlg(ReadingDlg): + + def __init__(self, parent=None): + super(EditReadingDlg, self).__init__(parent) + self.setAttribute(Qt.WA_DeleteOnClose) + + buttonBox = QDialogButtonBox(QDialogButtonBox.Apply|QDialogButtonBox.Close) + + self.layout.addWidget(buttonBox, 6, 0, 1, 2) + + self.connect(buttonBox.button(QDialogButtonBox.Apply), SIGNAL("clicked()"), self.apply) + self.connect(buttonBox, SIGNAL("rejected()"), self, SLOT("reject()")) + + self.setWindowTitle(self.trUtf8("Edit reading")) + + def apply(self): + pass + diff --git a/editReadingDlg.pyc b/editReadingDlg.pyc new file mode 100644 index 0000000..81f0ac7 Binary files /dev/null and b/editReadingDlg.pyc differ diff --git a/editScheduleDlg.py b/editScheduleDlg.py new file mode 100644 index 0000000..1e4fd31 --- /dev/null +++ b/editScheduleDlg.py @@ -0,0 +1,31 @@ +#!/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 scheduleDlg import * + +class EditScheduleDlg(ScheduleDlg): + + def __init__(self, parent=None): + super(EditScheduleDlg, self).__init__(parent) + + buttonBox = QDialogButtonBox(QDialogButtonBox.Apply|QDialogButtonBox.Close) + + self.layout.addWidget(buttonBox, 6, 0, 1, 2) + + self.connect(buttonBox.button(QDialogButtonBox.Apply), SIGNAL("clicked()"), self.apply) + self.connect(buttonBox, SIGNAL("rejected()"), self, SLOT("reject()")) + + self.setWindowTitle(self.trUtf8("Edit lesson")) + + def apply(self): + pass + diff --git a/editScheduleDlg.pyc b/editScheduleDlg.pyc new file mode 100644 index 0000000..d44e946 Binary files /dev/null and b/editScheduleDlg.pyc differ