tirilane
/
egon
Archived
1
0
Fork 0
This repository has been archived on 2024-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
egon/assignment.py

51 lines
1.7 KiB
Python

#!/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