Created
February 3, 2020 18:07
-
-
Save MShirazAhmad/776709ef814181c9ac3d7413a17ede4b to your computer and use it in GitHub Desktop.
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
from PyQt5.QtWidgets import * | |
from matplotlib.backends.backend_qt5agg import FigureCanvas | |
from matplotlib.figure import Figure | |
import numpy as np | |
import random | |
class MplWidget(QWidget): | |
def __init__(self, parent=None): | |
QWidget.__init__(self, parent) | |
self.canvas = FigureCanvas(Figure()) | |
vertical_layout = QVBoxLayout() | |
vertical_layout.addWidget(self.canvas) | |
self.canvas.axes = self.canvas.figure.add_subplot(111) | |
self.setLayout(vertical_layout) | |
self.canvas.axes.pie([100],shadow=True, startangle=90) |
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
from PyQt5.QtWidgets import * | |
from matplotlib.backends.backend_qt5agg import FigureCanvas | |
from matplotlib.figure import Figure | |
import numpy as np | |
import random | |
import datetime | |
import random | |
import matplotlib.pyplot as plt | |
class MplWidget1(QWidget): | |
def __init__(self, parent=None): | |
QWidget.__init__(self, parent) | |
t = np.arange(0.0, 2.0, 0.01) | |
s = 1 + np.sin(2 * np.pi * t) | |
self.canvas = FigureCanvas(Figure()) | |
vertical_layout = QVBoxLayout() | |
vertical_layout.addWidget(self.canvas) | |
self.canvas.axes = self.canvas.figure.add_subplot(111) | |
self.setLayout(vertical_layout) | |
self.canvas.axes.clear() | |
self.canvas.draw() |
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
from PyQt5.QtWidgets import * | |
from matplotlib.backends.backend_qt5agg import FigureCanvas | |
from matplotlib.figure import Figure | |
import numpy as np | |
import random | |
import datetime | |
import random | |
import matplotlib.pyplot as plt | |
class MplWidget2(QWidget): | |
def __init__(self, parent=None): | |
QWidget.__init__(self, parent) | |
t = np.arange(0.0, 2.0, 0.01) | |
s = 1 + np.sin(2 * np.pi * t) | |
self.canvas = FigureCanvas(Figure()) | |
vertical_layout = QVBoxLayout() | |
vertical_layout.addWidget(self.canvas) | |
self.canvas.axes = self.canvas.figure.add_subplot(111) | |
self.setLayout(vertical_layout) | |
self.canvas.axes.clear() | |
self.canvas.draw() |
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
from PyQt5 import QtCore, QtGui, QtWidgets | |
class Ui_MainWindow(object): | |
def setupUi(self, MainWindow): | |
MainWindow.setObjectName("MainWindow") | |
MainWindow.resize(562, 644) | |
self.centralwidget = QtWidgets.QWidget(MainWindow) | |
self.centralwidget.setObjectName("centralwidget") | |
self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget) | |
self.gridLayout_2.setObjectName("gridLayout_2") | |
self.label_profile = QtWidgets.QLabel(self.centralwidget) | |
self.label_profile.setObjectName("label_profile") | |
self.gridLayout_2.addWidget(self.label_profile, 0, 1, 1, 1) | |
self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) | |
self.tabWidget.setFocusPolicy(QtCore.Qt.WheelFocus) | |
self.tabWidget.setObjectName("tabWidget") | |
self.tab_TrackMeal = QtWidgets.QWidget() | |
self.tab_TrackMeal.setObjectName("tab_TrackMeal") | |
self.gridLayout_6 = QtWidgets.QGridLayout(self.tab_TrackMeal) | |
self.gridLayout_6.setObjectName("gridLayout_6") | |
self.groupBox = QtWidgets.QGroupBox(self.tab_TrackMeal) | |
self.groupBox.setMinimumSize(QtCore.QSize(262, 192)) | |
self.groupBox.setObjectName("groupBox") | |
self.gridLayout = QtWidgets.QGridLayout(self.groupBox) | |
self.gridLayout.setObjectName("gridLayout") | |
self.horizontalLayout_5 = QtWidgets.QHBoxLayout() | |
self.horizontalLayout_5.setObjectName("horizontalLayout_5") | |
self.label_12 = QtWidgets.QLabel(self.groupBox) | |
self.label_12.setObjectName("label_12") | |
self.horizontalLayout_5.addWidget(self.label_12) | |
self.lineEdit_Goal_3 = QtWidgets.QLineEdit(self.groupBox) | |
self.lineEdit_Goal_3.setObjectName("lineEdit_Goal_3") | |
self.horizontalLayout_5.addWidget(self.lineEdit_Goal_3) | |
self.gridLayout.addLayout(self.horizontalLayout_5, 0, 0, 1, 2) | |
self.line_2 = QtWidgets.QFrame(self.groupBox) | |
self.line_2.setFrameShape(QtWidgets.QFrame.HLine) | |
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) | |
self.line_2.setObjectName("line_2") | |
self.gridLayout.addWidget(self.line_2, 1, 0, 1, 2) | |
self.horizontalLayout_8 = QtWidgets.QHBoxLayout() | |
self.horizontalLayout_8.setObjectName("horizontalLayout_8") | |
self.verticalLayout_2 = QtWidgets.QVBoxLayout() | |
self.verticalLayout_2.setObjectName("verticalLayout_2") | |
self.horizontalLayout = QtWidgets.QHBoxLayout() | |
self.horizontalLayout.setObjectName("horizontalLayout") | |
self.label_PickFood = QtWidgets.QLabel(self.groupBox) | |
self.label_PickFood.setObjectName("label_PickFood") | |
self.horizontalLayout.addWidget(self.label_PickFood) | |
self.comboBox_pickfood = QtWidgets.QComboBox(self.groupBox) | |
self.comboBox_pickfood.setMinimumSize(QtCore.QSize(79, 0)) | |
self.comboBox_pickfood.setObjectName("comboBox_pickfood") | |
self.horizontalLayout.addWidget(self.comboBox_pickfood) | |
self.verticalLayout_2.addLayout(self.horizontalLayout) | |
self.horizontalLayout_4 = QtWidgets.QHBoxLayout() | |
self.horizontalLayout_4.setObjectName("horizontalLayout_4") | |
self.label = QtWidgets.QLabel(self.groupBox) | |
self.label.setObjectName("label") | |
self.horizontalLayout_4.addWidget(self.label) | |
self.dateEdit = QtWidgets.QDateEdit(self.groupBox) | |
self.dateEdit.setDateTime(QtCore.QDateTime(QtCore.QDate(2020, 1, 1), QtCore.QTime(0, 0, 0))) | |
self.dateEdit.setCalendarPopup(True) | |
self.dateEdit.setObjectName("dateEdit") | |
self.horizontalLayout_4.addWidget(self.dateEdit) | |
self.verticalLayout_2.addLayout(self.horizontalLayout_4) | |
self.horizontalLayout_8.addLayout(self.verticalLayout_2) | |
self.verticalLayout_3 = QtWidgets.QVBoxLayout() | |
self.verticalLayout_3.setObjectName("verticalLayout_3") | |
self.horizontalLayout_3 = QtWidgets.QHBoxLayout() | |
self.horizontalLayout_3.setObjectName("horizontalLayout_3") | |
self.line = QtWidgets.QFrame(self.groupBox) | |
self.line.setFrameShape(QtWidgets.QFrame.VLine) | |
self.line.setFrameShadow(QtWidgets.QFrame.Sunken) | |
self.line.setObjectName("line") | |
self.horizontalLayout_3.addWidget(self.line) | |
self.label_MealCategory = QtWidgets.QLabel(self.groupBox) | |
self.label_MealCategory.setObjectName("label_MealCategory") | |
self.horizontalLayout_3.addWidget(self.label_MealCategory) | |
self.comboBox_meal = QtWidgets.QComboBox(self.groupBox) | |
self.comboBox_meal.setMinimumSize(QtCore.QSize(59, 0)) | |
self.comboBox_meal.setObjectName("comboBox_meal") | |
self.horizontalLayout_3.addWidget(self.comboBox_meal) | |
self.verticalLayout_3.addLayout(self.horizontalLayout_3) | |
self.pushButton_entry_AddNewEntry = QtWidgets.QPushButton(self.groupBox) | |
self.pushButton_entry_AddNewEntry.setObjectName("pushButton_entry_AddNewEntry") | |
self.verticalLayout_3.addWidget(self.pushButton_entry_AddNewEntry) | |
self.horizontalLayout_8.addLayout(self.verticalLayout_3) | |
self.gridLayout.addLayout(self.horizontalLayout_8, 2, 0, 1, 2) | |
self.line_3 = QtWidgets.QFrame(self.groupBox) | |
self.line_3.setFrameShape(QtWidgets.QFrame.HLine) | |
self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken) | |
self.line_3.setObjectName("line_3") | |
self.gridLayout.addWidget(self.line_3, 3, 0, 1, 2) | |
self.verticalLayout_4 = QtWidgets.QVBoxLayout() | |
self.verticalLayout_4.setObjectName("verticalLayout_4") | |
self.horizontalLayout_10 = QtWidgets.QHBoxLayout() | |
self.horizontalLayout_10.setObjectName("horizontalLayout_10") | |
self.label_13 = QtWidgets.QLabel(self.groupBox) | |
self.label_13.setObjectName("label_13") | |
self.horizontalLayout_10.addWidget(self.label_13) | |
self.lineEdit_TotalIntake = QtWidgets.QLineEdit(self.groupBox) | |
self.lineEdit_TotalIntake.setMinimumSize(QtCore.QSize(9, 0)) | |
self.lineEdit_TotalIntake.setInputMethodHints(QtCore.Qt.ImhFormattedNumbersOnly) | |
self.lineEdit_TotalIntake.setReadOnly(True) | |
self.lineEdit_TotalIntake.setObjectName("lineEdit_TotalIntake") | |
self.horizontalLayout_10.addWidget(self.lineEdit_TotalIntake) | |
self.verticalLayout_4.addLayout(self.horizontalLayout_10) | |
self.horizontalLayout_12 = QtWidgets.QHBoxLayout() | |
self.horizontalLayout_12.setObjectName("horizontalLayout_12") | |
self.label_15 = QtWidgets.QLabel(self.groupBox) | |
self.label_15.setObjectName("label_15") | |
self.horizontalLayout_12.addWidget(self.label_15) | |
self.lineEdit_NetCalories = QtWidgets.QLineEdit(self.groupBox) | |
self.lineEdit_NetCalories.setMinimumSize(QtCore.QSize(19, 0)) | |
self.lineEdit_NetCalories.setInputMethodHints(QtCore.Qt.ImhFormattedNumbersOnly) | |
self.lineEdit_NetCalories.setReadOnly(True) | |
self.lineEdit_NetCalories.setObjectName("lineEdit_NetCalories") | |
self.horizontalLayout_12.addWidget(self.lineEdit_NetCalories) | |
self.verticalLayout_4.addLayout(self.horizontalLayout_12) | |
self.gridLayout.addLayout(self.verticalLayout_4, 4, 0, 1, 1) | |
self.verticalLayout_5 = QtWidgets.QVBoxLayout() | |
self.verticalLayout_5.setObjectName("verticalLayout_5") | |
self.horizontalLayout_11 = QtWidgets.QHBoxLayout() | |
self.horizontalLayout_11.setObjectName("horizontalLayout_11") | |
self.label_14 = QtWidgets.QLabel(self.groupBox) | |
self.label_14.setObjectName("label_14") | |
self.horizontalLayout_11.addWidget(self.label_14) | |
self.lineEdit_Exercise = QtWidgets.QLineEdit(self.groupBox) | |
self.lineEdit_Exercise.setInputMethodHints(QtCore.Qt.ImhFormattedNumbersOnly) | |
self.lineEdit_Exercise.setObjectName("lineEdit_Exercise") | |
self.horizontalLayout_11.addWidget(self.lineEdit_Exercise) | |
self.verticalLayout_5.addLayout(self.horizontalLayout_11) | |
self.pushButton_Save = QtWidgets.QPushButton(self.groupBox) | |
self.pushButton_Save.setStyleSheet("background-color: rgb(255, 170, 0);") | |
self.pushButton_Save.setObjectName("pushButton_Save") | |
self.verticalLayout_5.addWidget(self.pushButton_Save) | |
self.gridLayout.addLayout(self.verticalLayout_5, 4, 1, 1, 1) | |
self.gridLayout_6.addWidget(self.groupBox, 0, 0, 1, 1) | |
self.verticalLayout = QtWidgets.QVBoxLayout() | |
self.verticalLayout.setObjectName("verticalLayout") | |
self.MplWidget = MplWidget(self.tab_TrackMeal) | |
self.MplWidget.setMinimumSize(QtCore.QSize(250, 230)) | |
self.MplWidget.setObjectName("MplWidget") | |
self.verticalLayout.addWidget(self.MplWidget) | |
self.horizontalLayout_2 = QtWidgets.QHBoxLayout() | |
self.horizontalLayout_2.setObjectName("horizontalLayout_2") | |
self.radioButton_Breakfast = QtWidgets.QRadioButton(self.tab_TrackMeal) | |
self.radioButton_Breakfast.setMaximumSize(QtCore.QSize(16777215, 17)) | |
self.radioButton_Breakfast.setObjectName("radioButton_Breakfast") | |
self.horizontalLayout_2.addWidget(self.radioButton_Breakfast) | |
self.radioButton_Lunch = QtWidgets.QRadioButton(self.tab_TrackMeal) | |
self.radioButton_Lunch.setObjectName("radioButton_Lunch") | |
self.horizontalLayout_2.addWidget(self.radioButton_Lunch) | |
self.radioButton_Dinner = QtWidgets.QRadioButton(self.tab_TrackMeal) | |
self.radioButton_Dinner.setObjectName("radioButton_Dinner") | |
self.horizontalLayout_2.addWidget(self.radioButton_Dinner) | |
self.radioButton_Snacks = QtWidgets.QRadioButton(self.tab_TrackMeal) | |
self.radioButton_Snacks.setObjectName("radioButton_Snacks") | |
self.horizontalLayout_2.addWidget(self.radioButton_Snacks) | |
self.verticalLayout.addLayout(self.horizontalLayout_2) | |
self.gridLayout_6.addLayout(self.verticalLayout, 0, 1, 2, 1) | |
self.groupBox_3 = QtWidgets.QGroupBox(self.tab_TrackMeal) | |
self.groupBox_3.setMaximumSize(QtCore.QSize(262, 86)) | |
self.groupBox_3.setObjectName("groupBox_3") | |
self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_3) | |
self.gridLayout_5.setObjectName("gridLayout_5") | |
self.horizontalLayout_14 = QtWidgets.QHBoxLayout() | |
self.horizontalLayout_14.setObjectName("horizontalLayout_14") | |
self.horizontalLayout_6 = QtWidgets.QHBoxLayout() | |
self.horizontalLayout_6.setObjectName("horizontalLayout_6") | |
self.label_2 = QtWidgets.QLabel(self.groupBox_3) | |
self.label_2.setObjectName("label_2") | |
self.horizontalLayout_6.addWidget(self.label_2) | |
self.lineEdit_Mass = QtWidgets.QLineEdit(self.groupBox_3) | |
self.lineEdit_Mass.setObjectName("lineEdit_Mass") | |
self.horizontalLayout_6.addWidget(self.lineEdit_Mass) | |
self.horizontalLayout_14.addLayout(self.horizontalLayout_6) | |
self.horizontalLayout_13 = QtWidgets.QHBoxLayout() | |
self.horizontalLayout_13.setObjectName("horizontalLayout_13") | |
self.label_3 = QtWidgets.QLabel(self.groupBox_3) | |
self.label_3.setObjectName("label_3") | |
self.horizontalLayout_13.addWidget(self.label_3) | |
self.dateEdit_Mass = QtWidgets.QDateEdit(self.groupBox_3) | |
self.dateEdit_Mass.setDateTime(QtCore.QDateTime(QtCore.QDate(2020, 1, 1), QtCore.QTime(0, 0, 0))) | |
self.dateEdit_Mass.setCalendarPopup(True) | |
self.dateEdit_Mass.setObjectName("dateEdit_Mass") | |
self.horizontalLayout_13.addWidget(self.dateEdit_Mass) | |
self.horizontalLayout_14.addLayout(self.horizontalLayout_13) | |
self.gridLayout_5.addLayout(self.horizontalLayout_14, 0, 0, 1, 1) | |
self.pushButton_page = QtWidgets.QPushButton(self.groupBox_3) | |
self.pushButton_page.setStyleSheet("background-color: rgb(255, 170, 0);") | |
self.pushButton_page.setObjectName("pushButton_page") | |
self.gridLayout_5.addWidget(self.pushButton_page, 1, 0, 1, 1) | |
self.gridLayout_6.addWidget(self.groupBox_3, 1, 0, 1, 1) | |
self.tableWidget_entry = QtWidgets.QTableWidget(self.tab_TrackMeal) | |
self.tableWidget_entry.setMinimumSize(QtCore.QSize(520, 218)) | |
font = QtGui.QFont() | |
font.setKerning(False) | |
self.tableWidget_entry.setFont(font) | |
self.tableWidget_entry.setRowCount(0) | |
self.tableWidget_entry.setColumnCount(8) | |
self.tableWidget_entry.setObjectName("tableWidget_entry") | |
item = QtWidgets.QTableWidgetItem() | |
font = QtGui.QFont() | |
font.setPointSize(9) | |
item.setFont(font) | |
self.tableWidget_entry.setHorizontalHeaderItem(0, item) | |
item = QtWidgets.QTableWidgetItem() | |
font = QtGui.QFont() | |
font.setPointSize(9) | |
item.setFont(font) | |
self.tableWidget_entry.setHorizontalHeaderItem(1, item) | |
item = QtWidgets.QTableWidgetItem() | |
font = QtGui.QFont() | |
font.setPointSize(9) | |
item.setFont(font) | |
self.tableWidget_entry.setHorizontalHeaderItem(2, item) | |
item = QtWidgets.QTableWidgetItem() | |
font = QtGui.QFont() | |
font.setPointSize(9) | |
item.setFont(font) | |
self.tableWidget_entry.setHorizontalHeaderItem(3, item) | |
item = QtWidgets.QTableWidgetItem() | |
font = QtGui.QFont() | |
font.setPointSize(9) | |
item.setFont(font) | |
self.tableWidget_entry.setHorizontalHeaderItem(4, item) | |
item = QtWidgets.QTableWidgetItem() | |
font = QtGui.QFont() | |
font.setPointSize(9) | |
item.setFont(font) | |
self.tableWidget_entry.setHorizontalHeaderItem(5, item) | |
item = QtWidgets.QTableWidgetItem() | |
self.tableWidget_entry.setHorizontalHeaderItem(6, item) | |
item = QtWidgets.QTableWidgetItem() | |
self.tableWidget_entry.setHorizontalHeaderItem(7, item) | |
self.tableWidget_entry.horizontalHeader().setDefaultSectionSize(60) | |
self.tableWidget_entry.verticalHeader().setDefaultSectionSize(23) | |
self.gridLayout_6.addWidget(self.tableWidget_entry, 2, 0, 1, 2) | |
self.tabWidget.addTab(self.tab_TrackMeal, "") | |
self.tab_Analytics = QtWidgets.QWidget() | |
self.tab_Analytics.setObjectName("tab_Analytics") | |
self.gridLayout_3 = QtWidgets.QGridLayout(self.tab_Analytics) | |
self.gridLayout_3.setObjectName("gridLayout_3") | |
self.MplWidget1 = MplWidget1(self.tab_Analytics) | |
self.MplWidget1.setObjectName("MplWidget1") | |
self.gridLayout_3.addWidget(self.MplWidget1, 0, 0, 1, 1) | |
self.MplWidget2 = MplWidget2(self.tab_Analytics) | |
self.MplWidget2.setObjectName("MplWidget2") | |
self.gridLayout_3.addWidget(self.MplWidget2, 1, 0, 1, 1) | |
self.tabWidget.addTab(self.tab_Analytics, "") | |
self.Database = QtWidgets.QWidget() | |
self.Database.setObjectName("Database") | |
self.gridLayout_4 = QtWidgets.QGridLayout(self.Database) | |
self.gridLayout_4.setObjectName("gridLayout_4") | |
self.label_database = QtWidgets.QLabel(self.Database) | |
self.label_database.setObjectName("label_database") | |
self.gridLayout_4.addWidget(self.label_database, 0, 0, 1, 1) | |
self.tableWidget_database = QtWidgets.QTableWidget(self.Database) | |
self.tableWidget_database.setFocusPolicy(QtCore.Qt.ClickFocus) | |
self.tableWidget_database.setAutoFillBackground(False) | |
self.tableWidget_database.setLineWidth(1) | |
self.tableWidget_database.setAutoScroll(False) | |
self.tableWidget_database.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection) | |
self.tableWidget_database.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows) | |
self.tableWidget_database.setGridStyle(QtCore.Qt.SolidLine) | |
self.tableWidget_database.setRowCount(10) | |
self.tableWidget_database.setColumnCount(6) | |
self.tableWidget_database.setObjectName("tableWidget_database") | |
item = QtWidgets.QTableWidgetItem() | |
font = QtGui.QFont() | |
font.setPointSize(9) | |
item.setFont(font) | |
item.setBackground(QtGui.QColor(255, 255, 255)) | |
self.tableWidget_database.setHorizontalHeaderItem(0, item) | |
item = QtWidgets.QTableWidgetItem() | |
font = QtGui.QFont() | |
font.setPointSize(9) | |
item.setFont(font) | |
self.tableWidget_database.setHorizontalHeaderItem(1, item) | |
item = QtWidgets.QTableWidgetItem() | |
font = QtGui.QFont() | |
font.setPointSize(9) | |
item.setFont(font) | |
self.tableWidget_database.setHorizontalHeaderItem(2, item) | |
item = QtWidgets.QTableWidgetItem() | |
font = QtGui.QFont() | |
font.setPointSize(9) | |
item.setFont(font) | |
self.tableWidget_database.setHorizontalHeaderItem(3, item) | |
item = QtWidgets.QTableWidgetItem() | |
font = QtGui.QFont() | |
font.setPointSize(9) | |
item.setFont(font) | |
self.tableWidget_database.setHorizontalHeaderItem(4, item) | |
item = QtWidgets.QTableWidgetItem() | |
font = QtGui.QFont() | |
font.setPointSize(9) | |
item.setFont(font) | |
self.tableWidget_database.setHorizontalHeaderItem(5, item) | |
self.tableWidget_database.horizontalHeader().setDefaultSectionSize(60) | |
self.tableWidget_database.verticalHeader().setCascadingSectionResizes(False) | |
self.tableWidget_database.verticalHeader().setDefaultSectionSize(23) | |
self.gridLayout_4.addWidget(self.tableWidget_database, 1, 0, 1, 2) | |
self.pushButton_database_AddNewEntry = QtWidgets.QPushButton(self.Database) | |
self.pushButton_database_AddNewEntry.setObjectName("pushButton_database_AddNewEntry") | |
self.gridLayout_4.addWidget(self.pushButton_database_AddNewEntry, 2, 0, 1, 1) | |
self.pushButton_database_Delete = QtWidgets.QPushButton(self.Database) | |
self.pushButton_database_Delete.setObjectName("pushButton_database_Delete") | |
self.gridLayout_4.addWidget(self.pushButton_database_Delete, 2, 1, 1, 1) | |
self.tabWidget.addTab(self.Database, "") | |
self.gridLayout_2.addWidget(self.tabWidget, 1, 1, 1, 1) | |
MainWindow.setCentralWidget(self.centralwidget) | |
self.menubar = QtWidgets.QMenuBar(MainWindow) | |
self.menubar.setGeometry(QtCore.QRect(0, 0, 562, 21)) | |
self.menubar.setObjectName("menubar") | |
self.menuconfiguration = QtWidgets.QMenu(self.menubar) | |
self.menuconfiguration.setObjectName("menuconfiguration") | |
MainWindow.setMenuBar(self.menubar) | |
self.statusbar = QtWidgets.QStatusBar(MainWindow) | |
self.statusbar.setObjectName("statusbar") | |
MainWindow.setStatusBar(self.statusbar) | |
self.menubar.addAction(self.menuconfiguration.menuAction()) | |
self.retranslateUi(MainWindow) | |
self.tabWidget.setCurrentIndex(0) | |
QtCore.QMetaObject.connectSlotsByName(MainWindow) | |
def retranslateUi(self, MainWindow): | |
_translate = QtCore.QCoreApplication.translate | |
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) | |
self.label_profile.setText(_translate("MainWindow", "<html><head/><body><p><br/></p></body></html>")) | |
self.groupBox.setTitle(_translate("MainWindow", "Meal Entry")) | |
self.label_12.setText(_translate("MainWindow", "Goal Calories:")) | |
self.label_PickFood.setText(_translate("MainWindow", "Food")) | |
self.label.setText(_translate("MainWindow", "Date")) | |
self.label_MealCategory.setText(_translate("MainWindow", "Category")) | |
self.pushButton_entry_AddNewEntry.setText(_translate("MainWindow", "Add New Entry")) | |
self.label_13.setText(_translate("MainWindow", "Total Intake:")) | |
self.label_15.setText(_translate("MainWindow", "<html><head/><body><p><span style=\" font-weight:600;\">Net Calories:</span></p></body></html>")) | |
self.label_14.setText(_translate("MainWindow", "Exercise:")) | |
self.lineEdit_Exercise.setText(_translate("MainWindow", "0")) | |
self.pushButton_Save.setText(_translate("MainWindow", "Save")) | |
self.radioButton_Breakfast.setText(_translate("MainWindow", "Breakfast")) | |
self.radioButton_Lunch.setText(_translate("MainWindow", "Lunch")) | |
self.radioButton_Dinner.setText(_translate("MainWindow", "Dinner")) | |
self.radioButton_Snacks.setText(_translate("MainWindow", "Snacks")) | |
self.groupBox_3.setTitle(_translate("MainWindow", "Weekly Mass")) | |
self.label_2.setText(_translate("MainWindow", "Mass:")) | |
self.label_3.setText(_translate("MainWindow", "Date:")) | |
self.pushButton_page.setText(_translate("MainWindow", "Enter")) | |
item = self.tableWidget_entry.horizontalHeaderItem(0) | |
item.setText(_translate("MainWindow", "Food Name")) | |
item = self.tableWidget_entry.horizontalHeaderItem(1) | |
item.setText(_translate("MainWindow", "Calories")) | |
item = self.tableWidget_entry.horizontalHeaderItem(2) | |
item.setText(_translate("MainWindow", "Carbs")) | |
item = self.tableWidget_entry.horizontalHeaderItem(3) | |
item.setText(_translate("MainWindow", "Fat")) | |
item = self.tableWidget_entry.horizontalHeaderItem(4) | |
item.setText(_translate("MainWindow", "Protein")) | |
item = self.tableWidget_entry.horizontalHeaderItem(5) | |
item.setText(_translate("MainWindow", "Fibre")) | |
item = self.tableWidget_entry.horizontalHeaderItem(6) | |
item.setText(_translate("MainWindow", "Category")) | |
item = self.tableWidget_entry.horizontalHeaderItem(7) | |
item.setText(_translate("MainWindow", "Date")) | |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_TrackMeal), _translate("MainWindow", "Track Meal")) | |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_Analytics), _translate("MainWindow", "Analytics")) | |
self.label_database.setText(_translate("MainWindow", "Database (Editable)")) | |
item = self.tableWidget_database.horizontalHeaderItem(0) | |
item.setText(_translate("MainWindow", "Food Name")) | |
item = self.tableWidget_database.horizontalHeaderItem(1) | |
item.setText(_translate("MainWindow", "Calories")) | |
item = self.tableWidget_database.horizontalHeaderItem(2) | |
item.setText(_translate("MainWindow", "Carbs")) | |
item = self.tableWidget_database.horizontalHeaderItem(3) | |
item.setText(_translate("MainWindow", "Fat")) | |
item = self.tableWidget_database.horizontalHeaderItem(4) | |
item.setText(_translate("MainWindow", "Protein")) | |
item = self.tableWidget_database.horizontalHeaderItem(5) | |
item.setText(_translate("MainWindow", "Fibre")) | |
self.pushButton_database_AddNewEntry.setText(_translate("MainWindow", "Add New Entry")) | |
self.pushButton_database_Delete.setText(_translate("MainWindow", "Delete Selected Row")) | |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.Database), _translate("MainWindow", "Database")) | |
self.menuconfiguration.setTitle(_translate("MainWindow", "Configuration")) | |
from MplWidget import MplWidget | |
from mplwidget1 import MplWidget1 | |
from mplwidget2 import MplWidget2 | |
if __name__ == "__main__": | |
import sys | |
app = QtWidgets.QApplication(sys.argv) | |
MainWindow = QtWidgets.QMainWindow() | |
ui = Ui_MainWindow() | |
ui.setupUi(MainWindow) | |
MainWindow.show() | |
sys.exit(app.exec_()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment