Python_Report-1
Python_Report-1
EXPENSE TRACKER
EXPENSE TRACKER
Group Members:
DIVYA SINGH - 58
PRARTHAM MATKAR - 66
SUFIYAN SAYYED - 65
1. PROBLEM STATEMENT:
First Problem: Enhancing Financial Control
Many individuals face challenges in managing their personal
finances effectively, leading to overspending, financial stress,
and difficulty in achieving financial goals. One significant issue
is the lack of awareness regarding spending habits, which
hampers financial control and stability. Without insightful
analysis, it's challenging to mitigate financial instability
effectively.
Feedback Mechanisms:
Integrate feedback mechanisms to gather user input and
iteratively improve the system. This could involve user
surveys, analytics tracking, or direct communication
channels to understand user needs and preferences.
class Widget(QWidget):
def __init__(self):
QWidget.__init__(self)
self.items = 0
#Dummy Data
self._data = {"Water": 240, "Rent": 10000, "Coffee":
230,"Grocery": 3500, "Phone": 405, "Internet": 750}
# Left Widget
self.table = QTableWidget()
self.table.setColumnCount(2)
self.table.setHorizontalHeaderLabels(["Description",
"Price"])
self.table.horizontalHeader().setSectionResizeMode(Q
HeaderView.Stretch)
# Chart
self.chart_view = QChartView()
self.chart_view.setRenderHint(QPainter.Antialiasing)
# Right Widget
self.description = QLineEdit()
self.price = QLineEdit()
self.add = QPushButton("Add")
self.clear = QPushButton("Clear")
self.quit = QPushButton("Quit")
self.plot = QPushButton("Plot")
self.right = QVBoxLayout()
self.right.addWidget(QLabel("Description"))
self.right.addWidget(self.description)
self.right.addWidget(QLabel("Price"))
self.right.addWidget(self.price)
self.right.addWidget(self.add)
self.right.addWidget(self.plot)
self.right.addWidget(self.chart_view)
self.right.addWidget(self.clear)
self.right.addWidget(self.quit)
# QWidget Layout
self.layout = QHBoxLayout()
#self.table_view.setSizePolicy(size)
self.layout.addWidget(self.table)
self.layout.addLayout(self.right)
@Slot()
def add_element(self):
des = self.description.text()
price = self.price.text()
try:
price_item = QTableWidgetItem(f"{float(price):.2f}")
price_item.setTextAlignment(Qt.AlignRight)
self.table.insertRow(self.items)
description_item = QTableWidgetItem(des)
self.table.setItem(self.items, 0, description_item)
self.table.setItem(self.items, 1, price_item)
self.description.setText("")
self.price.setText("")
self.items += 1
except ValueError:
print("That is not an invalid input:", price, "Make
sure to enter a price!")
@Slot()
def check_disable(self, x):
if not self.description.text() or not self.price.text():
self.add.setEnabled(False)
else:
self.add.setEnabled(True)
@Slot()
def plot_data(self):
# Get table information
series = QPieSeries()
for i in range(self.table.rowCount()):
text = self.table.item(i, 0).text()
number = float(self.table.item(i, 1).text())
series.append(text, number)
chart = QChart()
chart.addSeries(series)
chart.legend().setAlignment(Qt.AlignLeft)
self.chart_view.setChart(chart)
@Slot()
def quit_application(self):
QApplication.quit()
@Slot()
def clear_table(self):
self.table.setRowCount(0)
self.items = 0
class MainWindow(QMainWindow):
def __init__(self, widget):
QMainWindow.__init__(self)
self.setWindowTitle("Tutorial")
# Menu
self.menu = self.menuBar()
self.file_menu = self.menu.addMenu("File")
# Exit QAction
exit_action = QAction("Exit", self)
exit_action.setShortcut("Ctrl+W")
exit_action.triggered.connect(self.exit_app)
self.file_menu.addAction(exit_action)
self.setCentralWidget(widget)
@Slot()
def exit_app(self, checked):
QApplication.quit()
if __name__ == "__main__":
# Qt Application
app = QApplication(sys.argv)
# QWidget
widget = Widget()
# QMainWindow using QWidget as central widget
window = MainWindow(widget)
window.resize(800, 600)
window.show()
# Execute application
sys.exit(app.exec())
4. Project Output:
5. Future Scope and Updates:
As technology continues to evolve, the future of the Expense
Tracker System holds exciting possibilities for enhancing
financial management and user experience. This section
outlines the future scope of the project, along with two major
updates aimed at integrating advanced features to provide
users with comprehensive financial insights and services.
6. Conclusion:
In conclusion, the Expense Tracker System offers a
streamlined solution to the challenges of personal finance
management, providing users with the means to track
expenses, set budgets, and gain insights into their financial
habits. Through its user-friendly interface and intuitive
features, the system equips individuals with the tools they
need to make informed decisions and achieve their financial
goals effectively. Looking ahead, the planned integration of
advanced AI for predictive analysis and investment tracking
features promises to further enhance the system's
capabilities, ensuring that it remains a valuable asset in
helping users navigate their financial journey with confidence
and success.
As users continue to rely on the Expense Tracker System to
manage their finances, they can expect ongoing updates and
improvements aimed at delivering even greater value and
convenience. With a commitment to innovation and user
satisfaction, the system is dedicated to empowering
individuals to take control of their financial future and pursue
their aspirations with clarity and confidence.