-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ayushkumar-25/version1.1
Project Completion Stage 1
- Loading branch information
Showing
8 changed files
with
250 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import sys | ||
from PyQt5 import QtWidgets | ||
from PyQt5.QtWidgets import QDialog, QApplication | ||
from PyQt5.uic import loadUi | ||
import pyrebase | ||
|
||
import requestblood as req | ||
import main as m | ||
|
||
|
||
class Display(QDialog): | ||
def __init__(self): | ||
super(Display, self).__init__() | ||
loadUi(r'..\Resource\display.ui', self) | ||
self.backButton.clicked.connect(self.backtoHome) | ||
|
||
# data = [{'Age': '22', 'Blood Group': 'A+', 'Location': 'Kolkata', 'Name': 'Rahul', | ||
# 'Phone Number': '9708942540'}, | ||
# {'Age': '32', 'Blood Group': 'O+', 'Location': 'Ranchi', 'Name': 'Aman', 'Phone Number': '1234567890'}] | ||
data = req.lis | ||
row = 0 | ||
self.tableWidget.setRowCount(len(data)) | ||
for person in data: | ||
self.tableWidget.setItem(row, 0, QtWidgets.QTableWidgetItem(person['Name'])) | ||
self.tableWidget.setItem(row, 1, QtWidgets.QTableWidgetItem(person['Age'])) | ||
self.tableWidget.setItem(row, 2, QtWidgets.QTableWidgetItem(person['Blood Group'])) | ||
self.tableWidget.setItem(row, 3, QtWidgets.QTableWidgetItem(person['Location'])) | ||
self.tableWidget.setItem(row, 4, QtWidgets.QTableWidgetItem(person['Phone Number'])) | ||
row = row + 1 | ||
|
||
def backtoHome(self): | ||
request = req.RequestBlood() | ||
m.widget.addWidget(request) | ||
m.widget.setCurrentIndex(m.widget.currentIndex() + 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>Form</class> | ||
<widget class="QWidget" name="Form"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>480</width> | ||
<height>620</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<property name="styleSheet"> | ||
<string notr="true">background-color: rgb(54, 54, 54);</string> | ||
</property> | ||
<widget class="QLabel" name="label"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>180</x> | ||
<y>90</y> | ||
<width>171</width> | ||
<height>61</height> | ||
</rect> | ||
</property> | ||
<property name="styleSheet"> | ||
<string notr="true">font-size:34px; | ||
color: rgb(225, 225, 225);</string> | ||
</property> | ||
<property name="text"> | ||
<string>Donors</string> | ||
</property> | ||
</widget> | ||
<widget class="QPushButton" name="backButton"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>30</x> | ||
<y>30</y> | ||
<width>71</width> | ||
<height>41</height> | ||
</rect> | ||
</property> | ||
<property name="styleSheet"> | ||
<string notr="true">background-color: rgb(167, 168, 167); | ||
color: rgb(255, 255, 255); | ||
font-size:18px</string> | ||
</property> | ||
<property name="text"> | ||
<string>Back</string> | ||
</property> | ||
</widget> | ||
<widget class="QFrame" name="frame"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>20</x> | ||
<y>220</y> | ||
<width>451</width> | ||
<height>291</height> | ||
</rect> | ||
</property> | ||
<property name="styleSheet"> | ||
<string notr="true">background-color: rgb(238, 238, 238);</string> | ||
</property> | ||
<property name="frameShape"> | ||
<enum>QFrame::StyledPanel</enum> | ||
</property> | ||
<property name="frameShadow"> | ||
<enum>QFrame::Raised</enum> | ||
</property> | ||
<widget class="QTableWidget" name="tableWidget"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>451</width> | ||
<height>291</height> | ||
</rect> | ||
</property> | ||
<property name="styleSheet"> | ||
<string notr="true"/> | ||
</property> | ||
<column> | ||
<property name="text"> | ||
<string>Name</string> | ||
</property> | ||
</column> | ||
<column> | ||
<property name="text"> | ||
<string>Age</string> | ||
</property> | ||
</column> | ||
<column> | ||
<property name="text"> | ||
<string>Blood Group</string> | ||
</property> | ||
</column> | ||
<column> | ||
<property name="text"> | ||
<string>Location</string> | ||
</property> | ||
</column> | ||
<column> | ||
<property name="text"> | ||
<string>Phone Number</string> | ||
</property> | ||
</column> | ||
</widget> | ||
</widget> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters