Project Format (1)
Project Format (1)
BHOPAL
SESSION - 2024-25
CLASS XII
PROJECT FILE
ON
Tourist Spot Explorer Using Python and MySQL
SUBMITTED TO SUBMITTED BY
Ms. Faraz Rasheed Name: Vishesh Gurung
Class: XII - Science
Board Roll No.:
CERTIFICATE
2) Processor-Pentium
3) RAM-2GB
5) MYSQL
Packages used in this Project
1) Pandas
2) NumPy
3) Matplotlib
Python Code
form.show()
sys.exit(app.exec_
())
class WidgetGallery(QDialog):
def init (self, parent=None):
self.originalPalette =
QApplication.palette()
self.setWindowTitle('Home')
styleComboBox = QComboBox()
styleComboBox.addItems(QStyleFactory.keys())
styleLabel = QLabel("&Style:")
styleLabel.setBuddy(styleComboBox)
self.createTopLeftGroupBox()
self.createTopRightGroupBox()
styleComboBox.activated[str].connect(self.changeStyle)
self.useStylePaletteCheckBox.toggled.connect(self.changeP
alette)
disableWidgetsCheckBox.toggled.connect(self.topLeftGrou
pBox.set
Disabled)
disableWidgetsCheckBox.toggled.connect(self.topRightGroupBox.
s etDisabled)
topLayout = QHBoxLayout()
topLayout.addWidget(styleLabel)
topLayout.addWidget(styleComboBox)
topLayout.addStretch(1)
topLayout.addWidget(self.useStylePaletteCheckBox)
topLayout.addWidget(disableWidgetsCheckBox)
mainLayout = QGridLayout()
mainLayout.addLayout(topLayout, 0,
0, 1, 2)
mainLayout.addWidget(self.topLeftGroupBox, 1, 0)
mainLayout.addWidget(self.topRightGroupBox, 1, 1)
mainLayout.setColumnStretch(0, 1)
mainLayout.setColumnStretch(
1, 2)
self.setLayout(mainLayout)
self.setWindowTitle("Styles")
self.changeStyle('Fusion')
def createTopLeftGroupBox(self):
radioButton1 =
QRadioButton("Male")
radioButton1.setChecked(True)
radioButton2 = QRadioButton("Female")
defaultPushButton =
QPushButton("Submit")
defaultPushButton.setDefault(True)
sutdentName =
QLabel("Name") lineEdit =
QLineEdit()
sutdentRoll = QLabel("Roll
Number") lineEditRoll =
QLineEdit()
sutdentClass =
QLabel("Class")
lineEditClass = QLineEdit()
dateTimeEdit = QDateTimeEdit(self.topLeftGroupBox)
dateTimeEdit.setDateTime(QDateTime.currentDateTime())
studentDOB = QLabel("Date and Time of
Birth") StudentGender =
QLabel("Gender") blankSpace = QLabel("
")
layout.addWidget(blankSpace)
layout.addWidget(sutdentRoll)
layout.addWidget(lineEditRoll)
layout.addWidget(blankSpace)
layout.addWidget(StudentGender)
layout.addWidget(radioButton1)
layout.addWidget(radioButton2)
layout.addWidget(blankSpace)
layout.addWidget(studentDOB)
layout.addWidget(dateTimeEdit)
layout.addWidget(blankSpace)
layout.addWidget(checkBox)
layout.addWidget(defaultPushButton)
layout.addWidget(blankSpace)
layout.addWidget(GoToTable)
layout.addWidget(GoToEditor)
layout.setRowStretch(8, 1)
# layout.addStretch(1)
self.topLeftGroupBox.setLayout(layout)
textEdit = QTextEdit()
student_data =
open("data.csv", 'rt')
student_data_rt =
student_data.read()
textEdit.setPlainText(student_dat
a_rt)
tab1hbox = QHBoxLayout()
tab1hbox.setContentsMargins(5, 5,
5, 5) tab1hbox.addWidget(textEdit)
tab1.setLayout(tab1hbox)
tab2 = QWidget()
textEdit =
QTextEdit()
textEdit.setPlainText("SMS - Student Management
System \n") tab2hbox = QHBoxLayout()
tab2hbox.setContentsMargins(5, 5, 5, 5)
tab2hbox.addWidget(textEdit)
tab2.setLayout(tab2hbox)
self.topRightGroupBox.addTab(tab1, "&RAW
CSV") self.topRightGroupBox.addTab(tab2,
"&Comments")
QtWidgets class
MyWindow(QtWidgets.QWidget):
def init (self, fileName, parent=None):
super(MyWindow, self). init
(parent)
self.fileName = fileName
self.setWindowTitle('Editing Mode')
self.model =
QtGui.QStandardItemModel(self)
self.tableView = QtWidgets.QTableView(self)
self.tableView.setModel(self.model)
self.tableView.horizontalHeader().setStretchLastSection(True)
self.pushButtonLoad = QtWidgets.QPushButton(self)
self.pushButtonLoad.setText("Load File")
self.pushButtonLoad.clicked.connect(self.on_pushButtonLoad_
ed) click
ked)
self.pushButto ushButton(self) self.pushButtonWrite.setText("Save File")
nWrite = self.pushButtonWrite.clicked.connect(self.on_pushButtonWrite
QtWidgets.QP _clic
self.layoutVertical =
QtWidgets.QVBoxLayout(self)
self.layoutVertical.addWidget(self.tableView)
self.layoutVertical.addWidget(self.pushButto
nLoad)
self.layoutVertical.addWidget(self.pushButtonWrite)
@QtCore.pyqtSlot()
def
on_pushButtonLoad_clicked(se
lf): self.loadCsv(self.fileName)
LOGIN Page
Main Form
Record Editor
Student Database
BIBLIOGRAPHY
1. BOOKS :
Informatics Practices
Author-Sumita Arora
Publisher-Dhanpat Rai &Co.
2. WEBSITES :
https://www.python.org/
https://www.w3schools.com/
https://www.pandas.org/
https://www.pyplot.org/
https://www.numpy.com/
https://www.DataVisualisation.com/
https://www.mysqltutorial.org/