コード例 #1
0
ファイル: registron.py プロジェクト: bl4ckdu5t/registron
class Main(QtGui.QMainWindow):
	"""Main class for registron"""
	def __init__(self):
		QtGui.QMainWindow.__init__(self)
		self.ui = Ui_MainWindow()
		self.ui.setupUi(self)
		self.ui.proceedBtn.clicked.connect(self.checkCampusID)
		self.ui.invalidID.hide()
		self.setGeometry(300, 100, 750, 500)

		#Menu Actions
		self.ui.actionQuit.triggered.connect(self.close)
		self.ui.actionDocumentation.triggered.connect(function.openGitPage)
		self.ui.actionAbout.triggered.connect(about.show)
		self.ui.actionCredits.triggered.connect(credits.show)
		self.ui.actionSignIn.triggered.connect(authentication.show)
		self.ui.actionLicense.triggered.connect(license.show)
	def greetWelcome(self):
		function.talk("Welcome to Registron")
	def checkCampusID(self):
		databag = function.dict_object('data.json')
		campusID = str(self.ui.matricInput.text())
		if campusID != '':
			if databag['students'].has_key(campusID):
				self.ui.invalidID.hide()
				studentName = databag['students'][campusID][0]
				function.talk("Hello %s, let us register your courses" % studentName)
				self.hide()
				manageCourse.grab(campusID)
			else:
				self.ui.invalidID.show()
				function.talk("There is no student with that campus ID in our records")
		else:
			self.ui.invalidID.show()
			function.talk("Your input is empty. Please type your campus ID to log in as a student")
コード例 #2
0
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.proceedBtn.clicked.connect(self.checkCampusID)
        self.ui.invalidID.hide()
        self.setGeometry(300, 100, 750, 500)

        #Menu Actions
        self.ui.actionQuit.triggered.connect(self.close)
        self.ui.actionDocumentation.triggered.connect(function.openGitPage)
        self.ui.actionAbout.triggered.connect(about.show)
        self.ui.actionCredits.triggered.connect(credits.show)
        self.ui.actionSignIn.triggered.connect(authentication.show)
        self.ui.actionLicense.triggered.connect(license.show)
コード例 #3
0
class Main(QtGui.QMainWindow):
    """Main class for registron"""
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.proceedBtn.clicked.connect(self.checkCampusID)
        self.ui.invalidID.hide()
        self.setGeometry(300, 100, 750, 500)

        #Menu Actions
        self.ui.actionQuit.triggered.connect(self.close)
        self.ui.actionDocumentation.triggered.connect(function.openGitPage)
        self.ui.actionAbout.triggered.connect(about.show)
        self.ui.actionCredits.triggered.connect(credits.show)
        self.ui.actionSignIn.triggered.connect(authentication.show)
        self.ui.actionLicense.triggered.connect(license.show)

    def greetWelcome(self):
        function.talk("Welcome to Registron")

    def checkCampusID(self):
        databag = function.dict_object('data.json')
        campusID = str(self.ui.matricInput.text())
        if campusID != '':
            if databag['students'].has_key(campusID):
                self.ui.invalidID.hide()
                studentName = databag['students'][campusID][0]
                function.talk("Hello %s, let us register your courses" %
                              studentName)
                self.hide()
                manageCourse.grab(campusID)
            else:
                self.ui.invalidID.show()
                function.talk(
                    "There is no student with that campus ID in our records")
        else:
            self.ui.invalidID.show()
            function.talk(
                "Your input is empty. Please type your campus ID to log in as a student"
            )
コード例 #4
0
ファイル: registron.py プロジェクト: bl4ckdu5t/registron
	def __init__(self):
		QtGui.QMainWindow.__init__(self)
		self.ui = Ui_MainWindow()
		self.ui.setupUi(self)
		self.ui.proceedBtn.clicked.connect(self.checkCampusID)
		self.ui.invalidID.hide()
		self.setGeometry(300, 100, 750, 500)

		#Menu Actions
		self.ui.actionQuit.triggered.connect(self.close)
		self.ui.actionDocumentation.triggered.connect(function.openGitPage)
		self.ui.actionAbout.triggered.connect(about.show)
		self.ui.actionCredits.triggered.connect(credits.show)
		self.ui.actionSignIn.triggered.connect(authentication.show)
		self.ui.actionLicense.triggered.connect(license.show)