51 lines
1.6 KiB
Python
51 lines
1.6 KiB
Python
#!/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)
|