예제 #1
0
 def openSearchWindow(
         self
 ):  # Might have to carry other parameters, such as input of search
     from SearchPage import Ui_SearchPage
     self.window = QtWidgets.QMainWindow()
     self.ui = Ui_SearchPage()
     self.ui.setupUi(self.window)
     self.window.show()
예제 #2
0
    def logout(self):
        from HomePage import Ui_HomePage
        df = pd.read_csv('UserData.csv')
        for index, row in df.iterrows():
            if row['CurrentUser'] == 1:
                row_num = df[df['CurrentUser'] == row['CurrentUser']].index[0]
                df.loc[row_num, 'CurrentUser'] = 0
                df.to_csv('UserData.csv', index=False)

        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_HomePage()
        self.ui.setupUi(self.window)
        self.window.show()
예제 #3
0
class Ui_HomePage2(object):
    def logout(self):
        from HomePage import Ui_HomePage
        df = pd.read_csv('UserData.csv')
        for index, row in df.iterrows():
            if row['CurrentUser'] == 1:
                row_num = df[df['CurrentUser'] == row['CurrentUser']].index[0]
                df.loc[row_num, 'CurrentUser'] = 0
                df.to_csv('UserData.csv', index=False)

        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_HomePage()
        self.ui.setupUi(self.window)
        self.window.show()

    def openProfileWindow(self):
        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_profilePage()
        self.ui.setupUi(self.window)
        self.window.show()

    def openInboxPage(self):
        from InboxPage import Ui_InboxPage
        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_InboxPage()
        self.ui.setupUi(self.window)
        self.window.show()

    def openUsersGroupsPage(self):
        from UsersGroups import Ui_UsersGroupsPage
        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_UsersGroupsPage()
        self.ui.setupUi(self.window)
        self.window.show()

    def setupUi(self, HomePage2):
        HomePage2.setObjectName("HomePage2")
        HomePage2.resize(980, 710)
        self.centralwidget = QtWidgets.QWidget(HomePage2)
        self.centralwidget.setObjectName("centralwidget")
        self.pushButton_Logout = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_Logout.setGeometry(QtCore.QRect(880, 20, 81, 31))
        font = QtGui.QFont()
        font.setFamily("Arial")
        self.pushButton_Logout.setFont(font)
        self.pushButton_Logout.setObjectName("pushButton_Logout")

        self.pushButton_Logout.clicked.connect(self.logout)  # log out user
        self.pushButton_Logout.clicked.connect(HomePage2.close)

        self.pushButton_Groups = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_Groups.setGeometry(QtCore.QRect(790, 20, 81, 31))
        font = QtGui.QFont()
        font.setFamily("Arial")
        self.pushButton_Groups.setFont(font)
        self.pushButton_Groups.setObjectName("pushButton_Groups")

        self.pushButton_Groups.clicked.connect(self.openUsersGroupsPage)
        self.pushButton_Groups.clicked.connect(HomePage2.close)

        self.pushButton_Inbox = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_Inbox.setGeometry(QtCore.QRect(700, 20, 81, 31))
        font = QtGui.QFont()
        font.setFamily("Arial")
        self.pushButton_Inbox.setFont(font)
        self.pushButton_Inbox.setObjectName("pushButton_Inbox")

        self.pushButton_Inbox.clicked.connect(self.openInboxPage)
        self.pushButton_Inbox.clicked.connect(HomePage2.close)

        self.pushButton_Profile = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_Profile.setGeometry(QtCore.QRect(610, 20, 81, 31))

        self.pushButton_Profile.clicked.connect(self.openProfileWindow)

        font = QtGui.QFont()
        font.setFamily("Arial")
        self.pushButton_Profile.setFont(font)
        self.pushButton_Profile.setObjectName("pushButton_Profile")
        self.label_AppName = QtWidgets.QLabel(self.centralwidget)
        self.label_AppName.setGeometry(QtCore.QRect(410, 20, 101, 31))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(20)
        self.label_AppName.setFont(font)
        self.label_AppName.setObjectName("label_AppName")
        self.pushButton_Search = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_Search.setGeometry(QtCore.QRect(200, 20, 51, 31))
        font = QtGui.QFont()
        font.setFamily("Arial")
        self.pushButton_Search.setFont(font)
        self.pushButton_Search.setObjectName("pushButton_Search")

        self.textEdit_Search = QtWidgets.QTextEdit(self.centralwidget)
        self.textEdit_Search.setGeometry(QtCore.QRect(10, 20, 181, 31))
        self.textEdit_Search.setObjectName("textEdit_Search")
        self.line = QtWidgets.QFrame(self.centralwidget)
        self.line.setGeometry(QtCore.QRect(0, 60, 981, 16))
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.label_3 = QtWidgets.QLabel(self.centralwidget)
        self.label_3.setGeometry(QtCore.QRect(490, 440, 54, 12))
        self.label_3.setText("")
        self.label_3.setObjectName("label_3")
        self.label_User3ProjectDescription = QtWidgets.QLabel(
            self.centralwidget)
        self.label_User3ProjectDescription.setGeometry(
            QtCore.QRect(670, 490, 311, 91))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_User3ProjectDescription.setFont(font)
        self.label_User3ProjectDescription.setObjectName(
            "label_User3ProjectDescription")
        self.label_User1Stat = QtWidgets.QLabel(self.centralwidget)
        self.label_User1Stat.setGeometry(QtCore.QRect(20, 570, 241, 31))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_User1Stat.setFont(font)
        self.label_User1Stat.setObjectName("label_User1Stat")
        self.label_User2ID = QtWidgets.QLabel(self.centralwidget)
        self.label_User2ID.setGeometry(QtCore.QRect(350, 450, 141, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_User2ID.setFont(font)
        self.label_User2ID.setObjectName("label_User2ID")
        self.label_TopUsers = QtWidgets.QLabel(self.centralwidget)
        self.label_TopUsers.setGeometry(QtCore.QRect(20, 400, 81, 21))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(12)
        self.label_TopUsers.setFont(font)
        self.label_TopUsers.setObjectName("label_TopUsers")
        self.label_TopProjects = QtWidgets.QLabel(self.centralwidget)
        self.label_TopProjects.setGeometry(QtCore.QRect(20, 80, 91, 21))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(12)
        self.label_TopProjects.setFont(font)
        self.label_TopProjects.setObjectName("label_TopProjects")
        self.label_User1Name = QtWidgets.QLabel(self.centralwidget)
        self.label_User1Name.setGeometry(QtCore.QRect(20, 480, 241, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_User1Name.setFont(font)
        self.label_User1Name.setObjectName("label_User1Name")
        self.label_Project2Descrip = QtWidgets.QLabel(self.centralwidget)
        self.label_Project2Descrip.setGeometry(QtCore.QRect(
            350, 170, 291, 101))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_Project2Descrip.setFont(font)
        self.label_Project2Descrip.setObjectName("label_Project2Descrip")
        self.label_User1ID = QtWidgets.QLabel(self.centralwidget)
        self.label_User1ID.setGeometry(QtCore.QRect(20, 450, 141, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_User1ID.setFont(font)
        self.label_User1ID.setObjectName("label_User1ID")
        self.label_Project2Member = QtWidgets.QLabel(self.centralwidget)
        self.label_Project2Member.setGeometry(QtCore.QRect(350, 250, 241, 101))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_Project2Member.setFont(font)
        self.label_Project2Member.setObjectName("label_Project2Member")
        self.label_Project1Title = QtWidgets.QLabel(self.centralwidget)
        self.label_Project1Title.setGeometry(QtCore.QRect(30, 160, 241, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_Project1Title.setFont(font)
        self.label_Project1Title.setObjectName("label_Project1Title")
        self.label_User3Score = QtWidgets.QLabel(self.centralwidget)
        self.label_User3Score.setGeometry(QtCore.QRect(670, 610, 191, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_User3Score.setFont(font)
        self.label_User3Score.setObjectName("label_User3Score")
        self.label_5 = QtWidgets.QLabel(self.centralwidget)
        self.label_5.setGeometry(QtCore.QRect(810, 440, 54, 12))
        self.label_5.setText("")
        self.label_5.setObjectName("label_5")
        self.label_User2Stat = QtWidgets.QLabel(self.centralwidget)
        self.label_User2Stat.setGeometry(QtCore.QRect(350, 570, 241, 31))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_User2Stat.setFont(font)
        self.label_User2Stat.setObjectName("label_User2Stat")
        self.label_User3ID = QtWidgets.QLabel(self.centralwidget)
        self.label_User3ID.setGeometry(QtCore.QRect(670, 450, 141, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_User3ID.setFont(font)
        self.label_User3ID.setObjectName("label_User3ID")
        self.label_User2ProjectDescription = QtWidgets.QLabel(
            self.centralwidget)
        self.label_User2ProjectDescription.setGeometry(
            QtCore.QRect(350, 490, 311, 101))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_User2ProjectDescription.setFont(font)
        self.label_User2ProjectDescription.setObjectName(
            "label_User2ProjectDescription")
        self.label_user1Score = QtWidgets.QLabel(self.centralwidget)
        self.label_user1Score.setGeometry(QtCore.QRect(20, 610, 191, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_user1Score.setFont(font)
        self.label_user1Score.setObjectName("label_user1Score")
        self.label_Project2Title = QtWidgets.QLabel(self.centralwidget)
        self.label_Project2Title.setGeometry(QtCore.QRect(350, 160, 241, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_Project2Title.setFont(font)
        self.label_Project2Title.setObjectName("label_Project2Title")
        self.label_User3Stat = QtWidgets.QLabel(self.centralwidget)
        self.label_User3Stat.setGeometry(QtCore.QRect(670, 570, 241, 31))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_User3Stat.setFont(font)
        self.label_User3Stat.setObjectName("label_User3Stat")
        self.label_User2Name = QtWidgets.QLabel(self.centralwidget)
        self.label_User2Name.setGeometry(QtCore.QRect(350, 480, 241, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_User2Name.setFont(font)
        self.label_User2Name.setObjectName("label_User2Name")
        self.label_Project1Member = QtWidgets.QLabel(self.centralwidget)
        self.label_Project1Member.setGeometry(QtCore.QRect(30, 250, 241, 101))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_Project1Member.setFont(font)
        self.label_Project1Member.setObjectName("label_Project1Member")
        self.label_Project3Member = QtWidgets.QLabel(self.centralwidget)
        self.label_Project3Member.setGeometry(QtCore.QRect(660, 250, 241, 101))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_Project3Member.setFont(font)
        self.label_Project3Member.setObjectName("label_Project3Member")
        self.label_Project3Descrip = QtWidgets.QLabel(self.centralwidget)
        self.label_Project3Descrip.setGeometry(QtCore.QRect(
            660, 170, 311, 101))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_Project3Descrip.setFont(font)
        self.label_Project3Descrip.setObjectName("label_Project3Descrip")
        self.label_Project3ID = QtWidgets.QLabel(self.centralwidget)
        self.label_Project3ID.setGeometry(QtCore.QRect(660, 130, 141, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_Project3ID.setFont(font)
        self.label_Project3ID.setObjectName("label_Project3ID")
        self.label_User2Score = QtWidgets.QLabel(self.centralwidget)
        self.label_User2Score.setGeometry(QtCore.QRect(350, 610, 191, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_User2Score.setFont(font)
        self.label_User2Score.setObjectName("label_User2Score")
        self.label_Project1ID = QtWidgets.QLabel(self.centralwidget)
        self.label_Project1ID.setGeometry(QtCore.QRect(30, 130, 141, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_Project1ID.setFont(font)
        self.label_Project1ID.setObjectName("label_Project1ID")
        self.label_Project3Title = QtWidgets.QLabel(self.centralwidget)
        self.label_Project3Title.setGeometry(QtCore.QRect(660, 160, 241, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_Project3Title.setFont(font)
        self.label_Project3Title.setObjectName("label_Project3Title")
        self.label_User1ProjectDescription = QtWidgets.QLabel(
            self.centralwidget)
        self.label_User1ProjectDescription.setGeometry(
            QtCore.QRect(20, 490, 311, 101))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_User1ProjectDescription.setFont(font)
        self.label_User1ProjectDescription.setObjectName(
            "label_User1ProjectDescription")
        self.label_Project1Descrip = QtWidgets.QLabel(self.centralwidget)
        self.label_Project1Descrip.setGeometry(QtCore.QRect(30, 170, 311, 101))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_Project1Descrip.setFont(font)
        self.label_Project1Descrip.setObjectName("label_Project1Descrip")
        self.label_User3Name = QtWidgets.QLabel(self.centralwidget)
        self.label_User3Name.setGeometry(QtCore.QRect(670, 480, 241, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_User3Name.setFont(font)
        self.label_User3Name.setObjectName("label_User3Name")
        self.label_Project2ID = QtWidgets.QLabel(self.centralwidget)
        self.label_Project2ID.setGeometry(QtCore.QRect(350, 130, 141, 16))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(11)
        self.label_Project2ID.setFont(font)
        self.label_Project2ID.setObjectName("label_Project2ID")
        HomePage2.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(HomePage2)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 980, 21))
        self.menubar.setObjectName("menubar")
        HomePage2.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(HomePage2)
        self.statusbar.setObjectName("statusbar")
        HomePage2.setStatusBar(self.statusbar)
        self.actionProfile = QtWidgets.QAction(HomePage2)
        self.actionProfile.setObjectName("actionProfile")
        self.actionInbox = QtWidgets.QAction(HomePage2)
        self.actionInbox.setObjectName("actionInbox")
        self.actionGroups = QtWidgets.QAction(HomePage2)
        self.actionGroups.setObjectName("actionGroups")

        self.retranslateUi(HomePage2)
        QtCore.QMetaObject.connectSlotsByName(HomePage2)

    def retranslateUi(self, HomePage2):
        _translate = QtCore.QCoreApplication.translate
        HomePage2.setWindowTitle(_translate("HomePage2", "MainWindow"))
        self.pushButton_Logout.setText(_translate("HomePage2", "Logout"))
        self.pushButton_Groups.setText(_translate("HomePage2", "Groups"))
        self.pushButton_Inbox.setText(_translate("HomePage2", "Inbox"))
        self.pushButton_Profile.setText(_translate("HomePage2", "Profile"))
        self.label_AppName.setText(_translate("HomePage2", "TeamUp"))
        self.pushButton_Search.setText(_translate("HomePage2", "Search"))
        self.label_User3ProjectDescription.setText(
            _translate(
                "HomePage2", "Project Description: After school tutoring \n"
                "                                 Outdoor cleanup project\n"
                "       "))
        self.label_User1Stat.setText(_translate("HomePage2",
                                                "User Status: SU"))
        self.label_User2ID.setText(_translate("HomePage2", "User ID: U016"))
        self.label_TopUsers.setText(_translate("HomePage2", "Top Users:"))
        self.label_TopProjects.setText(_translate("HomePage2",
                                                  "Top Projects:"))
        self.label_User1Name.setText(
            _translate("HomePage2", "Name: Wilma Mckenzie"))
        self.label_Project2Descrip.setText(
            _translate(
                "HomePage2", "Project Description: Cleaning parks and \n"
                "                                nature reserves in the\n"
                "                                  neighborhood.  \n"
                " "))
        self.label_User1ID.setText(_translate("HomePage2", "User ID: U005"))
        self.label_Project2Member.setText(
            _translate(
                "HomePage2", "Team Members: Stan Crossley, \n"
                "                            Mercedes Cortes,\n"
                "                           Wilma Mckenzie, \n"
                "                           Nyah Villanueva  \n"
                ""))
        self.label_Project1Title.setText(
            _translate("HomePage2", "Project Title: Pop up library"))
        self.label_User3Score.setText(
            _translate("HomePage2", "Reputation Score: 16"))
        self.label_User2Stat.setText(
            _translate("HomePage2", "User Status: VIP"))
        self.label_User3ID.setText(_translate("HomePage2", "User ID: U067"))
        self.label_User2ProjectDescription.setText(
            _translate(
                "HomePage2", "Project Description: Book and toy drive \n"
                "                                 Outdoor cleanup project\n"
                "                                 Document life stories  \n"
                " "))
        self.label_user1Score.setText(
            _translate("HomePage2", "Reputation Score: 49"))
        self.label_Project2Title.setText(
            _translate("HomePage2", "Project Title: Outdoor cleanup project"))
        self.label_User3Stat.setText(_translate("HomePage2",
                                                "User Status: OU"))
        self.label_User2Name.setText(
            _translate("HomePage2", "Name: Nyah Villanueva"))
        self.label_Project1Member.setText(
            _translate(
                "HomePage2", "Team Members: Rhyley Gamble, \n"
                "                           Wilma Mckenzie,\n"
                "                           Rabia Rossi, \n"
                "                           Olive Sanderson  \n"
                ""))
        self.label_Project3Member.setText(
            _translate(
                "HomePage2", "Team Members: Waqas Stuart, \n"
                "                           Tiya Adams,\n"
                "                           Rabia Rossi, \n"
                "                           Nyag Villanueva  \n"
                ""))
        self.label_Project3Descrip.setText(
            _translate(
                "HomePage2", "Project Description: Collect donations for \n"
                "                                local schools and\n"
                "                                  community centers.  \n"
                " "))
        self.label_Project3ID.setText(
            _translate("HomePage2", "Project ID: P007"))
        self.label_User2Score.setText(
            _translate("HomePage2", "Reputation Score: 31"))
        self.label_Project1ID.setText(_translate("HomePage2", "Project ID: 1"))
        self.label_Project3Title.setText(
            _translate("HomePage2", "Project Title: Book and toy drive"))
        self.label_User1ProjectDescription.setText(
            _translate(
                "HomePage2", "Project Description: Pop-up library \n"
                "                                 Outdoor cleanup project\n"
                "                                 Document life stories  \n"
                " "))
        self.label_Project1Descrip.setText(
            _translate(
                "HomePage2", "Project Description: Build a pop-up library \n"
                "                                and invite the community\n"
                "                                  to donate and take books.  \n"
                " "))
        self.label_User3Name.setText(
            _translate("HomePage2", "Name: Stan Crossley"))
        self.label_Project2ID.setText(
            _translate("HomePage2", "Project ID: P004"))
        self.actionProfile.setText(_translate("HomePage2", "Profile"))
        self.actionInbox.setText(_translate("HomePage2", "Inbox"))
        self.actionGroups.setText(_translate("HomePage2", "Groups"))
예제 #4
0
 def openUsersGroupsPage(self):
     from UsersGroups import Ui_UsersGroupsPage
     self.window = QtWidgets.QMainWindow()
     self.ui = Ui_UsersGroupsPage()
     self.ui.setupUi(self.window)
     self.window.show()
예제 #5
0
 def openInboxPage(self):
     from InboxPage import Ui_InboxPage
     self.window = QtWidgets.QMainWindow()
     self.ui = Ui_InboxPage()
     self.ui.setupUi(self.window)
     self.window.show()
예제 #6
0
 def openProfileWindow(self):
     self.window = QtWidgets.QMainWindow()
     self.ui = Ui_profilePage()
     self.ui.setupUi(self.window)
     self.window.show()
예제 #7
0
        self.groupBox_2.setTitle(_translate("UsersGroups", "Search"))
        self.textEdit.setHtml(
            _translate(
                "UsersGroups",
                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                "p, li { white-space: pre-wrap; }\n"
                "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:7.8pt; font-weight:400; font-style:normal;\">\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\';\">Search</span></p></body></html>"
            ))
        self.HomeButton_2.setText(_translate("UsersGroups", "Search"))
        self.CreateGroupButton.setText(_translate("UsersGroups", "New Group"))
        self.NavigationSideBar.setTitle(_translate("UsersGroups",
                                                   "Navigation"))
        self.HomeButton.setText(_translate("UsersGroups", "Home"))
        self.ProfileButton.setText(_translate("UsersGroups", "Profile"))
        self.LogOUt.setText(_translate("UsersGroups", "LogOut"))
        self.InboxButton.setText(_translate("UsersGroups", "Inbox"))


if __name__ == "__main__":
    import sys

    app = QtWidgets.QApplication(sys.argv)
    UsersGroups = QtWidgets.QMainWindow()
    ui = Ui_UsersGroupsPage()
    ui.setupUi(UsersGroups)
    UsersGroups.show()
    sys.exit(app.exec_())
예제 #8
0
class Ui_SearchPage(object):
    def openInboxPage(self):  # USERID PARAMETERS
        from InboxPage import Ui_InboxPage
        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_InboxPage()
        self.ui.setupUi(self.window)
        self.window.show()

    def openProfilePage(self):  # USERID PARAMETERS
        from ProfilePage import Ui_profilePage
        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_profilePage()
        self.ui.setupUi(self.window)
        self.window.show()

    def openGroupsPage(self):  # USER ID PARAMETERS
        from UsersGroups import Ui_UsersGroupsPage
        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_UsersGroupsPage()
        self.ui.setupUi(self.window)
        self.window.show()

    def openHomePage(self):
        from HomePage2 import Ui_HomePage2
        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_HomePage2()
        self.ui.setupUi(self.window)
        self.window.show()

    def setupUi(self, SearchPage):
        SearchPage.setObjectName("SearchPage")
        SearchPage.resize(1056, 776)
        self.centralwidget = QtWidgets.QWidget(SearchPage)
        self.centralwidget.setObjectName("centralwidget")
        self.groupBox_2 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_2.setGeometry(QtCore.QRect(10, 0, 211, 61))
        self.groupBox_2.setObjectName("groupBox_2")
        self.textEdit = QtWidgets.QTextEdit(self.groupBox_2)
        self.textEdit.setGeometry(QtCore.QRect(10, 20, 121, 31))
        self.textEdit.setObjectName("textEdit")

        self.HomeButton_2 = QtWidgets.QPushButton(self.groupBox_2)  # LINKED
        self.HomeButton_2.setGeometrfy(QtCore.QRect(140, 20, 61, 31))
        self.HomeButton_2.setObjectName("HomeButton_2")
        self.HomeButton_2.clicked.connect(self.openHomePage)
        self.HomeButton_2.clicked.connect(SearchPage.close)

        self.NavigationSideBar = QtWidgets.QGroupBox(self.centralwidget)
        self.NavigationSideBar.setGeometry(QtCore.QRect(600, 0, 451, 61))
        self.NavigationSideBar.setObjectName("NavigationSideBar")

        self.InboxButton = QtWidgets.QPushButton(self.NavigationSideBar)
        self.InboxButton.setGeometry(QtCore.QRect(120, 20, 101, 28))
        self.InboxButton.setObjectName("InboxButton")
        self.InboxButton.clicked.connect(self.openInboxPage)  # LINKED
        self.InboxButton.clicked.connect(SearchPage.close)

        self.ProfileButton = QtWidgets.QPushButton(
            self.NavigationSideBar)  # LINKED
        self.ProfileButton.setGeometry(QtCore.QRect(10, 20, 101, 28))
        self.ProfileButton.setObjectName("ProfileButton")
        self.ProfileButton.clicked.connect(self.openProfilePage)

        self.LogOUt = QtWidgets.QPushButton(self.NavigationSideBar)  # LINKED
        self.LogOUt.setGeometry(QtCore.QRect(340, 20, 101, 28))
        self.LogOUt.setObjectName("LogOUt")
        self.LogOUt.clicked.connect(SearchPage.close)

        self.GroupsButton = QtWidgets.QPushButton(
            self.NavigationSideBar)  # LINKED
        self.GroupsButton.setGeometry(QtCore.QRect(230, 20, 101, 28))
        self.GroupsButton.setObjectName("GroupsButton")
        self.GroupsButton.clicked.connect(self.openGroupsPage)

        self.Matches = QtWidgets.QGroupBox(self.centralwidget)
        self.Matches.setGeometry(QtCore.QRect(200, 70, 601, 471))
        self.Matches.setObjectName("Matches")
        self.Match1 = QtWidgets.QWidget(self.Matches)
        self.Match1.setGeometry(QtCore.QRect(10, 20, 581, 121))
        self.Match1.setObjectName("Match1")
        self.textBrowser = QtWidgets.QTextBrowser(self.Match1)
        self.textBrowser.setGeometry(QtCore.QRect(10, 10, 561, 61))
        self.textBrowser.setObjectName("textBrowser")
        self.pushButton = QtWidgets.QPushButton(self.Match1)
        self.pushButton.setGeometry(QtCore.QRect(370, 80, 201, 28))
        self.pushButton.setObjectName("pushButton")
        self.Match2 = QtWidgets.QWidget(self.Matches)
        self.Match2.setGeometry(QtCore.QRect(10, 150, 581, 121))
        self.Match2.setObjectName("Match2")
        self.textBrowser_2 = QtWidgets.QTextBrowser(self.Match2)
        self.textBrowser_2.setGeometry(QtCore.QRect(10, 10, 561, 61))
        self.textBrowser_2.setObjectName("textBrowser_2")
        self.pushButton_2 = QtWidgets.QPushButton(self.Match2)
        self.pushButton_2.setGeometry(QtCore.QRect(370, 80, 201, 28))
        self.pushButton_2.setObjectName("pushButton_2")
        self.Match3 = QtWidgets.QWidget(self.Matches)
        self.Match3.setGeometry(QtCore.QRect(10, 280, 581, 121))
        self.Match3.setObjectName("Match3")
        self.textBrowser_3 = QtWidgets.QTextBrowser(self.Match3)
        self.textBrowser_3.setGeometry(QtCore.QRect(10, 10, 561, 61))
        self.textBrowser_3.setObjectName("textBrowser_3")
        self.pushButton_3 = QtWidgets.QPushButton(self.Match3)
        self.pushButton_3.setGeometry(QtCore.QRect(370, 80, 201, 28))
        self.pushButton_3.setObjectName("pushButton_3")
        self.SearchMessage = QtWidgets.QTextBrowser(self.Matches)
        self.SearchMessage.setGeometry(QtCore.QRect(10, 410, 581, 51))
        self.SearchMessage.setObjectName("SearchMessage")
        SearchPage.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(SearchPage)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1056, 26))
        self.menubar.setObjectName("menubar")
        SearchPage.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(SearchPage)
        self.statusbar.setObjectName("statusbar")
        SearchPage.setStatusBar(self.statusbar)

        self.retranslateUi(SearchPage)
        QtCore.QMetaObject.connectSlotsByName(SearchPage)

    def retranslateUi(self, SearchPage):
        _translate = QtCore.QCoreApplication.translate
        SearchPage.setWindowTitle(_translate("SearchPage", "SearchPage"))
        self.groupBox_2.setTitle(_translate("SearchPage", "Search"))
        self.textEdit.setHtml(
            _translate(
                "SearchPage",
                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                "p, li { white-space: pre-wrap; }\n"
                "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:7.8pt; font-weight:400; font-style:normal;\">\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\';\">Garden</span></p></body></html>"
            ))
        self.HomeButton_2.setText(_translate("SearchPage", "Search"))
        self.NavigationSideBar.setTitle(_translate("SearchPage", "Navigation"))
        self.InboxButton.setText(_translate("SearchPage", "Inbox"))
        self.ProfileButton.setText(_translate("SearchPage", "Profile"))
        self.LogOUt.setText(_translate("SearchPage", "LogOut"))
        self.GroupsButton.setText(_translate("SearchPage", "Groups"))
        self.Matches.setTitle(_translate("SearchPage", "Top Three Matches"))
        self.textBrowser.setHtml(
            _translate(
                "SearchPage",
                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                "p, li { white-space: pre-wrap; }\n"
                "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:7.8pt; font-weight:400; font-style:normal;\">\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\';\">Community Garden</span></p>\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\';\">Description</span></p></body></html>"
            ))
        self.pushButton.setText(
            _translate("SearchPage", "View Group Page [Non-Members]"))
        self.textBrowser_2.setHtml(
            _translate(
                "SearchPage",
                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                "p, li { white-space: pre-wrap; }\n"
                "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:7.8pt; font-weight:400; font-style:normal;\">\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\';\">Michelle Garden</span></p>\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\';\">Interests and Skills</span></p></body></html>"
            ))
        self.pushButton_2.setText(_translate("SearchPage", "View Profile"))
        self.textBrowser_3.setHtml(
            _translate(
                "SearchPage",
                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                "p, li { white-space: pre-wrap; }\n"
                "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:7.8pt; font-weight:400; font-style:normal;\">\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\';\">Park Garden</span></p>\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\';\">Description</span></p></body></html>"
            ))
        self.pushButton_3.setText(
            _translate("SearchPage", "View Group Page [Non-Members]"))
        self.SearchMessage.setHtml(
            _translate(
                "SearchPage",
                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                "p, li { white-space: pre-wrap; }\n"
                "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:7.8pt; font-weight:400; font-style:normal;\">\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\';\">Did Not Find What You\'re Looking For? Try Another Search.</span></p></body></html>"
            ))
예제 #9
0
 def openGroupsPage(self):  # USER ID PARAMETERS
     from UsersGroups import Ui_UsersGroupsPage
     self.window = QtWidgets.QMainWindow()
     self.ui = Ui_UsersGroupsPage()
     self.ui.setupUi(self.window)
     self.window.show()
예제 #10
0
 def openProfilePage(self):  # USERID PARAMETERS
     from ProfilePage import Ui_profilePage
     self.window = QtWidgets.QMainWindow()
     self.ui = Ui_profilePage()
     self.ui.setupUi(self.window)
     self.window.show()
예제 #11
0
 def joinGroup(self):
     from joinGroup import Ui_joinGroup
     self.window = QtWidgets.QMainWindow()
     self.ui = Ui_joinGroup()
     self.ui.setupUi(self.window)
     self.window.show()
예제 #12
0
class Ui_InboxPage(object):
    def joinGroup(self):
        from joinGroup import Ui_joinGroup
        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_joinGroup()
        self.ui.setupUi(self.window)
        self.window.show()

    def openGroupsPage(self):
        from UsersGroups import Ui_UsersGroupsPage
        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_UsersGroupsPage()
        self.ui.setupUi(self.window)
        self.window.show()

    def openProfilePage(self):
        from ProfilePage import Ui_profilePage
        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_profilePage()
        self.ui.setupUi(self.window)
        self.window.show()

    def openSearchWindow(
            self
    ):  # Might have to carry other parameters, such as input of search
        from SearchPage import Ui_SearchPage
        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_SearchPage()
        self.ui.setupUi(self.window)
        self.window.show()

    def openUsersGroups(self):  # USER ID PARAMETERS
        from UsersGroups import Ui_UsersGroupsPage
        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_UsersGroupsPage()
        self.ui.setupUi(self.window)
        self.window.show()

    def openHomePage(self):
        from HomePage2 import Ui_HomePage2
        self.window = QtWidgets.QMainWindow()
        self.ui = Ui_HomePage2()
        self.ui.setupUi(self.window)
        self.window.show()

    def setupUi(self, InboxPage):
        InboxPage.setObjectName("InboxPage")
        InboxPage.resize(1052, 846)
        self.InboxDashboard = QtWidgets.QWidget(InboxPage)
        self.InboxDashboard.setObjectName("InboxDashboard")
        self.NavigationSideBar = QtWidgets.QGroupBox(self.InboxDashboard)
        self.NavigationSideBar.setGeometry(QtCore.QRect(590, 0, 451, 61))
        self.NavigationSideBar.setObjectName("NavigationSideBar")

        self.HomeButton = QtWidgets.QPushButton(
            self.NavigationSideBar)  # LINKED
        self.HomeButton.setGeometry(QtCore.QRect(120, 20, 101, 28))
        self.HomeButton.setObjectName("HomeButton")
        self.HomeButton.clicked.connect(self.openHomePage)
        self.HomeButton.clicked.connect(InboxPage.close)

        self.ProfileButton = QtWidgets.QPushButton(
            self.NavigationSideBar)  # LINKED
        self.ProfileButton.setGeometry(QtCore.QRect(10, 20, 101, 28))
        self.ProfileButton.setObjectName("ProfileButton")
        self.ProfileButton.setObjectName("ProfileButton")
        self.ProfileButton.clicked.connect(self.openProfilePage)

        self.LogOUt = QtWidgets.QPushButton(self.NavigationSideBar)  # LINKED
        self.LogOUt.setGeometry(QtCore.QRect(340, 20, 101, 28))
        self.LogOUt.setObjectName("LogOUt")
        self.LogOUt.setObjectName("LogOUt")
        self.LogOUt.clicked.connect(InboxPage.close)

        self.GroupsButton = QtWidgets.QPushButton(
            self.NavigationSideBar)  #LINKED
        self.GroupsButton.setGeometry(QtCore.QRect(230, 20, 101, 28))
        self.GroupsButton.setObjectName("GroupsButton")
        self.GroupsButton.clicked.connect(self.openGroupsPage)

        # FILLING INBOX INFO

        inboxContents = [" ", " ", " ", " ", " "]

        InboxType = ["", "", "", "", ""]

        df = pd.read_csv('InboxMessages.csv')
        #MessageID, UserID, Type, TypeID, GroupID, SubjectUserID
        dfgroup = pd.read_csv('GroupData.csv')
        dfcheck = pd.read_csv('UserData.csv')
        currentUserRow = dfcheck[dfcheck['CurrentUser'] == 1]
        currentUserID = currentUserRow['UserID'].iloc[0]
        count = 0
        print(currentUserID)
        for index, row in df.iterrows():
            if row['UserID'] == currentUserID:
                inboxContents[count] = row['GroupName']
                InboxType[count] = row['Type']
                print(InboxType[count])
                count = count + 1

        # CLEAR EMPTY BOXES
        # MOVE TO BOTTOM
        checkempty = [0, 0, 0, 0, 0]
        if inboxContents[0] == " ":
            checkempty[0] = 1
        if inboxContents[1] == " ":
            checkempty[1] = 1
        if inboxContents[2] == " ":
            checkempty[2] = 1
        if inboxContents[3] == " ":
            checkempty[3] = 1
        if inboxContents[4] == " ":
            checkempty[4] = 1

        # MESSAGE BOXES

        self.groupBox_2 = QtWidgets.QGroupBox(self.InboxDashboard)
        self.groupBox_2.setGeometry(QtCore.QRect(10, 0, 211, 61))
        self.groupBox_2.setObjectName("groupBox_2")
        self.textEdit = QtWidgets.QTextEdit(self.groupBox_2)
        self.textEdit.setGeometry(QtCore.QRect(10, 20, 121, 31))
        self.textEdit.setObjectName("textEdit")
        self.HomeButton_2 = QtWidgets.QPushButton(self.groupBox_2)
        self.HomeButton_2.setGeometry(QtCore.QRect(140, 20, 61, 31))
        self.HomeButton_2.setObjectName("HomeButton_2")

        self.listWidget = QtWidgets.QListWidget(self.InboxDashboard)
        self.listWidget.setGeometry(QtCore.QRect(10, 70, 1031, 711))
        self.listWidget.setObjectName("listWidget")

        if checkempty[0] == 0:
            self.InvitationMessage = QtWidgets.QWidget(self.InboxDashboard)
            self.InvitationMessage.setGeometry(QtCore.QRect(20, 80, 1011, 101))
            self.InvitationMessage.setObjectName("InvitationMessage")
            self.textBrowser = QtWidgets.QTextBrowser(self.InvitationMessage)
            self.textBrowser.setGeometry(QtCore.QRect(10, 10, 991, 51))
            self.textBrowser.setObjectName("textBrowser")
            if InboxType[0] == "Invitation":
                self.pushButton = QtWidgets.QPushButton(self.InvitationMessage)
                self.pushButton.setGeometry(QtCore.QRect(10, 70, 93, 28))
                self.pushButton.setObjectName("pushButton")
                self.pushButton.clicked.connect(self.joinGroup)
                # ADD MEMBER TO GROUPID

                self.Decline2 = QtWidgets.QPushButton(self.InvitationMessage)
                self.Decline2.setGeometry(QtCore.QRect(110, 70, 93, 28))
                self.Decline2.setObjectName("Decline2")

        if checkempty[1] == 0:
            self.InvitationMessage_2 = QtWidgets.QWidget(self.InboxDashboard)
            self.InvitationMessage_2.setGeometry(
                QtCore.QRect(20, 190, 1011, 101))
            self.InvitationMessage_2.setObjectName("InvitationMessage_2")
            self.textBrowser_2 = QtWidgets.QTextBrowser(
                self.InvitationMessage_2)
            self.textBrowser_2.setGeometry(QtCore.QRect(10, 10, 991, 51))
            self.textBrowser_2.setObjectName("textBrowser_2")
            if InboxType[1] == "Invitation":
                self.Accept3 = QtWidgets.QPushButton(self.InvitationMessage_2)
                self.Accept3.setGeometry(QtCore.QRect(10, 70, 93, 28))
                self.Accept3.setObjectName("Accept3")
                self.Accept3.clicked.connect(self.joinGroup)

                # ADD MEMBER TO GROUP ID , DELETE ROW FROM INBOXMESSAGES

                self.Decline3 = QtWidgets.QPushButton(self.InvitationMessage_2)
                self.Decline3.setGeometry(QtCore.QRect(110, 70, 93, 28))
                self.Decline3.setObjectName("Decline3")

        if checkempty[2] == 0:
            self.InvitationMessage3 = QtWidgets.QWidget(self.InboxDashboard)
            self.InvitationMessage3.setGeometry(
                QtCore.QRect(20, 300, 1011, 101))
            self.InvitationMessage3.setObjectName("InvitationMessage3")
            self.textBrowser3 = QtWidgets.QTextBrowser(self.InvitationMessage3)
            self.textBrowser3.setGeometry(QtCore.QRect(10, 10, 991, 51))
            self.textBrowser3.setObjectName("textBrowser3")
            if InboxType[2] == "Invitation":
                self.pushButton43 = QtWidgets.QPushButton(
                    self.InvitationMessage3)
                self.pushButton43.setGeometry(QtCore.QRect(10, 70, 93, 28))
                self.pushButton43.setObjectName("pushButton43")
                self.pushButton43.clicked.connect(self.joinGroup)
                # ADD ROW TO GROUP ID
                # REMOVE FROM INBOX MESSAGES
                self.Decline43 = QtWidgets.QPushButton(self.InvitationMessage3)
                self.Decline43.setGeometry(QtCore.QRect(110, 70, 93, 28))
                self.Decline43.setObjectName("Decline43")

        if checkempty[3] == 0:
            self.InvitationMessage4 = QtWidgets.QWidget(self.InboxDashboard)
            self.InvitationMessage4.setGeometry(
                QtCore.QRect(20, 410, 1011, 101))
            self.InvitationMessage4.setObjectName("InvitationMessage4")
            self.textBrowser4 = QtWidgets.QTextBrowser(self.InvitationMessage4)
            self.textBrowser4.setGeometry(QtCore.QRect(10, 10, 991, 51))
            self.textBrowser4.setObjectName("textBrowser4")
            if InboxType[3] == "Invitation":
                self.pushButton4 = QtWidgets.QPushButton(
                    self.InvitationMessage4)
                self.pushButton4.setGeometry(QtCore.QRect(10, 70, 93, 28))
                self.pushButton4.setObjectName("pushButton4")
                self.pushButton4.clicked.connect(self.joinGroup)

                self.Decline4 = QtWidgets.QPushButton(self.InvitationMessage4)
                self.Decline4.setGeometry(QtCore.QRect(110, 70, 93, 28))
                self.Decline4.setObjectName("Decline4")

        if checkempty[4] == 0:
            self.InvitationMessage5 = QtWidgets.QWidget(self.InboxDashboard)
            self.InvitationMessage5.setGeometry(
                QtCore.QRect(20, 520, 1011, 101))
            self.InvitationMessage5.setObjectName("InvitationMessage5")
            self.textBrowser5 = QtWidgets.QTextBrowser(self.InvitationMessage5)
            self.textBrowser5.setGeometry(QtCore.QRect(10, 10, 991, 51))
            self.textBrowser5.setObjectName("textBrowser5")
            if InboxType[4] == "Invitation":
                self.pushButton5 = QtWidgets.QPushButton(
                    self.InvitationMessage5)
                self.pushButton5.setGeometry(QtCore.QRect(10, 70, 93, 28))
                self.pushButton5.setObjectName("pushButton5")
                self.pushButton5.clicked.connect(self.joinGroup)

                self.Decline5 = QtWidgets.QPushButton(self.InvitationMessage5)
                self.Decline5.setGeometry(QtCore.QRect(110, 70, 93, 28))
                self.Decline5.setObjectName("Decline5")

        self.AcceptALL = QtWidgets.QPushButton(self.InboxDashboard)
        self.AcceptALL.setGeometry(QtCore.QRect(740, 740, 141, 28))
        self.AcceptALL.setObjectName("AcceptALL")

        self.DeclineALL = QtWidgets.QPushButton(self.InboxDashboard)
        self.DeclineALL.setGeometry(QtCore.QRect(890, 740, 141, 28))
        self.DeclineALL.setObjectName("DeclineALL")
        InboxPage.setCentralWidget(self.InboxDashboard)
        self.menubar = QtWidgets.QMenuBar(InboxPage)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1052, 26))
        self.menubar.setObjectName("menubar")
        InboxPage.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(InboxPage)
        self.statusbar.setObjectName("statusbar")
        InboxPage.setStatusBar(self.statusbar)

        self.retranslateUi(InboxPage)
        QtCore.QMetaObject.connectSlotsByName(InboxPage)

    def retranslateUi(self, InboxPage):
        _translate = QtCore.QCoreApplication.translate
        InboxPage.setWindowTitle(_translate("InboxPage", "InboxPage"))
        self.NavigationSideBar.setTitle(_translate("InboxPage", "Navigation"))
        self.HomeButton.setText(_translate("InboxPage", "Home"))
        self.ProfileButton.setText(_translate("InboxPage", "Profile"))
        self.LogOUt.setText(_translate("InboxPage", "LogOut"))
        self.GroupsButton.setText(_translate("InboxPage", "Groups"))
        self.groupBox_2.setTitle(_translate("InboxPage", "Search"))
        self.HomeButton_2.setText(_translate("InboxPage", "Search"))

        # FILLING INBOX INFO

        inboxContents = [" ", " ", " ", " ", " "]

        InboxType = ["", "", "", "", ""]

        df = pd.read_csv('InboxMessages.csv')
        #MessageID, UserID, Type, TypeID, GroupID, SubjectUserID
        dfcheck = pd.read_csv('UserData.csv')
        currentUserRow = dfcheck[dfcheck['CurrentUser'] == 1]
        currentUserID = currentUserRow['UserID'].iloc[0]
        count = 0
        for index, row in df.iterrows():
            if row['UserID'] == currentUserID:
                inboxContents[count] = row['GroupName']
                InboxType[count] = row['Type']
                count = count + 1

        # CLEAR EMPTY BOXES
        # MOVE TO BOTTOM
        checkempty = [0, 0, 0, 0, 0]
        if inboxContents[0] == " ":
            checkempty[0] = 1
        if inboxContents[1] == " ":
            checkempty[1] = 1
        if inboxContents[2] == " ":
            checkempty[2] = 1
        if inboxContents[3] == " ":
            checkempty[3] = 1
        if inboxContents[4] == " ":
            checkempty[4] = 1

        MessagePrefix = ["", "", "", "", ""]
        print(InboxType[0])
        for i in range(len(InboxType)):
            if InboxType[i] == "Invitation":
                MessagePrefix[i] = "You have an Invitation to Join "
            if InboxType[i] == "Warning":
                MessagePrefix[i] = "You've received a Warning from "
            if InboxType[i] == "Compliment":
                MessagePrefix[i] = "You've received a Compliment from "

        if checkempty[0] == 0:
            self.textBrowser.setHtml(
                _translate(
                    "InboxPage",
                    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                    "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                    "p, li { white-space: pre-wrap; }\n"
                    "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:7.8pt; font-weight:400; font-style:normal;\">\n"
                    "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\';\">"
                    + MessagePrefix[0] + " " + inboxContents[0] +
                    " </span></p>\n"
                    "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\';\"><br /></p></body></html>"
                ))
            if InboxType[0] == "Invitation":
                self.pushButton.setText(_translate("InboxPage", "Accept"))
                self.Decline2.setText(_translate("InboxPage", "Decline"))

        if checkempty[1] == 0:
            self.textBrowser_2.setHtml(
                _translate(
                    "InboxPage",
                    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                    "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                    "p, li { white-space: pre-wrap; }\n"
                    "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:7.8pt; font-weight:400; font-style:normal;\">\n"
                    "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\';\">"
                    + MessagePrefix[1] + " " + inboxContents[1] +
                    "</span></p></body></html>"))
            if InboxType[1] == "Invitation":
                self.Accept3.setText(_translate("InboxPage", "Accept"))
                self.Decline3.setText(_translate("InboxPage", "Decline"))

        if checkempty[2] == 0:
            self.textBrowser3.setHtml(
                _translate(
                    "InboxPage",
                    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                    "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                    "p, li { white-space: pre-wrap; }\n"
                    "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:7.8pt; font-weight:400; font-style:normal;\">\n"
                    "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\';\"> "
                    + MessagePrefix[2] + " " + inboxContents[2] +
                    "</span></p></body></html>"))
            if InboxType[2] == "Invitation":
                self.pushButton43.setText(_translate("InboxPage", "Accept"))
                self.Decline43.setText(_translate("InboxPage", "Decline"))

        if checkempty[3] == 0:
            self.textBrowser4.setHtml(
                _translate(
                    "InboxPage",
                    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                    "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                    "p, li { white-space: pre-wrap; }\n"
                    "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:7.8pt; font-weight:400; font-style:normal;\">\n"
                    "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\';\">"
                    + MessagePrefix[3] + " " + inboxContents[3] +
                    "</span></p></body></html>"))
            if InboxType[3] == "Invitation":
                self.pushButton4.setText(_translate("InboxPage", "Accept"))
                self.Decline4.setText(_translate("InboxPage", "Decline"))

        if checkempty[4] == 0:
            self.textBrowser5.setHtml(
                _translate(
                    "InboxPage",
                    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                    "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                    "p, li { white-space: pre-wrap; }\n"
                    "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:7.8pt; font-weight:400; font-style:normal;\">\n"
                    "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\';\">"
                    + MessagePrefix[4] + " " + inboxContents[4] +
                    "</span></p></body></html>"))
            if InboxType[4] == "Invitation":
                self.pushButton5.setText(_translate("InboxPage", "Accept"))
                self.Decline5.setText(_translate("InboxPage", "Decline"))

        self.AcceptALL.setText(
            _translate("InboxPage", "Accept All Invitations"))
        self.DeclineALL.setText(
            _translate("InboxPage", "Decline All Invitations"))