# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'F:\py1.0\main.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!

from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import time
t = time.localtime()
dome = 4 +(2019 - t[0])
if t[1] >= 8 :
    School_Term = 1
else:
    School_Term = 0
class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(800, 600)
        Dialog.setSizeGripEnabled(True)
        self.frame = QtWidgets.QFrame(Dialog)
        self.frame.setGeometry(QtCore.QRect(0, 0, 191, 601))
        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.verticalLayoutWidget = QtWidgets.QWidget(self.frame)
        self.verticalLayoutWidget.setGeometry(QtCore.QRect(30, 0, 131, 601))
        self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.pushButton = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.pushButton.setObjectName("pushButton")
        self.verticalLayout.addWidget(self.pushButton)
        self.pushButton_2 = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.pushButton_2.setObjectName("pushButton_2")
        self.verticalLayout.addWidget(self.pushButton_2)
        self.pushButton_3 = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.pushButton_3.setObjectName("pushButton_3")
        self.verticalLayout.addWidget(self.pushButton_3)
        self.pushButton_4 = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.pushButton_4.setObjectName("pushButton_4")
        self.verticalLayout.addWidget(self.pushButton_4)
        self.pushButton_5 = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.pushButton_5.setObjectName("pushButton_5")
        self.verticalLayout.addWidget(self.pushButton_5)
        self.frame_2 = QtWidgets.QFrame(Dialog)
        self.frame_2.setGeometry(QtCore.QRect(190, 0, 611, 101))
        self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_2.setObjectName("frame_2")
        self.label = QtWidgets.QLabel(self.frame_2)
        self.label.setGeometry(QtCore.QRect(0, 1, 611, 101))
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName("label")
        self.widget = QtWidgets.QWidget(Dialog)
        self.widget.setGeometry(QtCore.QRect(190, 100, 611, 501))
        self.widget.setObjectName("widget")
        self.label_2 = QtWidgets.QLabel(self.widget)
        self.label_2.setGeometry(QtCore.QRect(0, 0, 611, 61))
        self.label_2.setAlignment(QtCore.Qt.AlignCenter)
        self.label_2.setObjectName("label_2")
        self.label_3 = QtWidgets.QLabel(self.widget)
        self.label_3.setGeometry(QtCore.QRect(0, 61, 611, 71))
        self.label_3.setAlignment(QtCore.Qt.AlignCenter)
        self.label_3.setObjectName("label_3")
        self.label_3.hide()
        self.label_4 = QtWidgets.QLabel(self.widget)
        self.label_4.setGeometry(QtCore.QRect(0, 150, 611, 71))
        self.label_4.setAlignment(QtCore.Qt.AlignCenter)
        self.label_4.setObjectName("label_4")
        self.label_4.hide()
        self.pushButton_6 = QtWidgets.QPushButton(self.widget)
        self.pushButton_6.setGeometry(QtCore.QRect(260, 280, 75, 23))
        self.pushButton_6.setObjectName("pushButton_6")
        self.widget_2 = QtWidgets.QWidget(Dialog)
        self.widget_2.setGeometry(QtCore.QRect(190, 100, 611, 501))
        self.widget_2.setObjectName("widget_2")
        self.widget_2.hide()
        self.label_5 = QtWidgets.QLabel(self.widget_2)
        self.label_5.setGeometry(QtCore.QRect(0, 0, 611, 61))
        self.label_5.setAlignment(QtCore.Qt.AlignCenter)
        self.label_5.setObjectName("label_5")
        self.horizontalLayoutWidget = QtWidgets.QWidget(self.widget_2)
        self.horizontalLayoutWidget.setGeometry(QtCore.QRect(0, 80, 611, 80))
        self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.label_6 = QtWidgets.QLabel(self.horizontalLayoutWidget)
        self.label_6.setObjectName("label_6")
        self.horizontalLayout.addWidget(self.label_6)
        self.comboBox = QtWidgets.QComboBox(self.horizontalLayoutWidget)
        self.comboBox.setObjectName("comboBox")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.setCurrentIndex(dome)
        self.horizontalLayout.addWidget(self.comboBox)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
        self.label_7 = QtWidgets.QLabel(self.horizontalLayoutWidget)
        self.label_7.setObjectName("label_7")
        self.horizontalLayout.addWidget(self.label_7)
        self.comboBox_2 = QtWidgets.QComboBox(self.horizontalLayoutWidget)
        self.comboBox_2.setObjectName("comboBox_2")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.setCurrentIndex(School_Term )
        self.horizontalLayout.addWidget(self.comboBox_2)
        spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem2)
        self.pushButton_7 = QtWidgets.QPushButton(self.horizontalLayoutWidget)
        self.pushButton_7.setObjectName("pushButton_7")
        self.horizontalLayout.addWidget(self.pushButton_7)
        spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem3)
        self.tableWidget = QtWidgets.QTableWidget(self.widget_2)
        self.tableWidget.setGeometry(QtCore.QRect(-5, 161, 621, 341))
        self.tableWidget.setObjectName("tableWidget")
        self.tableWidget.hide()
        self.tableWidget.setColumnCount(8)
        self.tableWidget.setRowCount(2)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setVerticalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setVerticalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(2, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(3, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(4, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(5, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(6, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(7, item)
        self.widget_3 = QtWidgets.QWidget(Dialog)
        self.widget_3.setGeometry(QtCore.QRect(190, 100, 611, 501))
        self.widget_3.setObjectName("widget_3")
        self.widget_3.hide()
        self.label_8 = QtWidgets.QLabel(self.widget_3)
        self.label_8.setGeometry(QtCore.QRect(0, 0, 611, 61))
        self.label_8.setAlignment(QtCore.Qt.AlignCenter)
        self.label_8.setObjectName("label_8")
        self.verticalLayoutWidget_2 = QtWidgets.QWidget(self.widget_3)
        self.verticalLayoutWidget_2.setGeometry(QtCore.QRect(230, 70, 160, 431))
        self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_2)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.pushButton_8 = QtWidgets.QPushButton(self.verticalLayoutWidget_2)
        self.pushButton_8.setObjectName("pushButton_8")
        self.verticalLayout_2.addWidget(self.pushButton_8)
        self.pushButton_9 = QtWidgets.QPushButton(self.verticalLayoutWidget_2)
        self.pushButton_9.setObjectName("pushButton_9")
        self.verticalLayout_2.addWidget(self.pushButton_9)
        self.pushButton_10 = QtWidgets.QPushButton(self.verticalLayoutWidget_2)
        self.pushButton_10.setObjectName("pushButton_10")
        self.verticalLayout_2.addWidget(self.pushButton_10)
        self.pushButton_13 = QtWidgets.QPushButton(self.frame_2)
        self.pushButton_13.setGeometry(QtCore.QRect(580, 10, 21, 21))
        self.pushButton_13.setStyleSheet("border-image: url(:/frist/image/ext.png);")
        self.pushButton_13.setText("")
        self.pushButton_13.setObjectName("pushButton_13")
        self.pushButton_14 = QtWidgets.QPushButton(self.frame_2)
        self.pushButton_14.setGeometry(QtCore.QRect(540, 6, 31, 31))
        self.pushButton_14.setStyleSheet("border-image: url(:/frist/image/min.png);")
        self.pushButton_14.setText("")
        self.pushButton_14.setObjectName("pushButton_14")

        self.retranslateUi(Dialog)
        self.pushButton.clicked.connect(self.widget.show)
        self.pushButton_2.clicked.connect(self.widget.hide)
        self.pushButton_3.clicked.connect(self.widget.hide)
        self.pushButton_6.clicked.connect(self.label_3.show)
        self.pushButton_7.clicked.connect(self.tableWidget.show)
        self.pushButton.clicked.connect(self.widget_2.hide)
        self.pushButton_2.clicked.connect(self.widget_2.show)
        self.pushButton_3.clicked.connect(self.widget_2.hide)
        self.pushButton.clicked.connect(self.widget_3.hide)
        self.pushButton_2.clicked.connect(self.widget_3.hide)
        self.pushButton_3.clicked.connect(self.widget_3.show)
        self.pushButton_13.clicked.connect(Dialog.close)
        self.pushButton_14.clicked.connect(Dialog.showMinimized)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        _translate = QtCore.QCoreApplication.translate
        Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
        self.pushButton.setText(_translate("Dialog", "自动评教"))
        self.pushButton_2.setText(_translate("Dialog", "成绩查询"))
        self.pushButton_3.setText(_translate("Dialog", "自助选课系统"))
        self.pushButton_4.setText(_translate("Dialog", "关于"))
        self.pushButton_5.setText(_translate("Dialog", "退出"))
        self.label.setText(_translate("Dialog", "教务助手欢迎您"))
        self.label_2.setText(_translate("Dialog", "自动评教系统"))
        self.label_3.setText(_translate("Dialog", "正在评教中...请稍后..."))
        self.label_4.setText(_translate("Dialog", "已经成功评教门！"))
        self.pushButton_6.setText(_translate("Dialog", "一键评教"))
        self.label_5.setText(_translate("Dialog", "成绩查询系统"))
        self.label_6.setText(_translate("Dialog", "学年："))
        self.comboBox.setItemText(0, _translate("Dialog", "2015"))
        self.comboBox.setItemText(1, _translate("Dialog", "2016"))
        self.comboBox.setItemText(2, _translate("Dialog", "2017"))
        self.comboBox.setItemText(3, _translate("Dialog", "2018"))
        self.comboBox.setItemText(4, _translate("Dialog", "2019"))
        self.comboBox.setItemText(5, _translate("Dialog", "2020"))
        self.comboBox.setItemText(6, _translate("Dialog", "2021"))
        self.comboBox.setItemText(7, _translate("Dialog", "2022"))
        self.comboBox.setItemText(8, _translate("Dialog", "2023"))
        self.comboBox.setItemText(9, _translate("Dialog", "2024"))
        self.comboBox.setItemText(10, _translate("Dialog", "2025"))
        self.label_7.setText(_translate("Dialog", "学期："))
        self.comboBox_2.setItemText(0, _translate("Dialog", "春季学期"))
        self.comboBox_2.setItemText(1, _translate("Dialog", "秋季学期"))
        self.pushButton_7.setText(_translate("Dialog", "查询"))
        item = self.tableWidget.verticalHeaderItem(0)
        item.setText(_translate("Dialog", "0"))
        item = self.tableWidget.verticalHeaderItem(1)
        item.setText(_translate("Dialog", "1"))
        item = self.tableWidget.horizontalHeaderItem(0)
        item.setText(_translate("Dialog", "学年"))
        item = self.tableWidget.horizontalHeaderItem(1)
        item.setText(_translate("Dialog", "学期"))
        item = self.tableWidget.horizontalHeaderItem(2)
        item.setText(_translate("Dialog", "课程名称"))
        item = self.tableWidget.horizontalHeaderItem(3)
        item.setText(_translate("Dialog", "课程学分"))
        item = self.tableWidget.horizontalHeaderItem(4)
        item.setText(_translate("Dialog", "考试类型"))
        item = self.tableWidget.horizontalHeaderItem(5)
        item.setText(_translate("Dialog", "考试成绩"))
        item = self.tableWidget.horizontalHeaderItem(6)
        item.setText(_translate("Dialog", "所获学分"))
        item = self.tableWidget.horizontalHeaderItem(7)
        item.setText(_translate("Dialog", "课程代码"))
        self.label_8.setText(_translate("Dialog", "自助选课系统"))
        self.pushButton_8.setText(_translate("Dialog", "设置预选课表"))
        self.pushButton_9.setText(_translate("Dialog", "查看预选课表"))
        self.pushButton_10.setText(_translate("Dialog", "开始自助选课"))

        self.setWindowFlag(QtCore.Qt.FramelessWindowHint)
    def mousePressEvent(self, event):
        if event.button() == Qt.LeftButton:
            self.m_flag = True
            self.m_Position = event.globalPos() - self.pos()  # 获取鼠标相对窗口的位置
            event.accept()
            self.setCursor(QCursor(Qt.OpenHandCursor))  # 更改鼠标图标

    def mouseMoveEvent(self, QMouseEvent):
        if Qt.LeftButton and self.m_flag:
            self.move(QMouseEvent.globalPos() - self.m_Position)  # 更改窗口位置
            QMouseEvent.accept()

    def mouseReleaseEvent(self, QMouseEvent):
        self.m_flag = False
        self.setCursor(QCursor(Qt.ArrowCursor))
import login01_rc
if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    Dialog = QtWidgets.QDialog()
    ui = Ui_Dialog()
    ui.setupUi(Dialog)
    Dialog.show()
    sys.exit(app.exec_())

