Compare commits
No commits in common. "cc8e97458931381e2609e89167294a1ecb9b2d50" and "1116da8251f7d9537f47cdd813e2cfb0d11a73ac" have entirely different histories.
cc8e974589
...
1116da8251
@ -40,8 +40,7 @@ def _compute_net_income(df: pd.DataFrame) -> pd.DataFrame:
|
|||||||
|
|
||||||
|
|
||||||
def _compute_category_overview(df: pd.DataFrame) -> pd.DataFrame:
|
def _compute_category_overview(df: pd.DataFrame) -> pd.DataFrame:
|
||||||
categories = ["Social life", "Other", "Food", "Hobbies",
|
categories = ["A", "B", "C", "D", "E", "F", "G"]
|
||||||
"Rent \\& Utilities", "Education", "Transportation"]
|
|
||||||
values = np.array([10, 12, 53, 12, 90, 23, 32])
|
values = np.array([10, 12, 53, 12, 90, 23, 32])
|
||||||
values = values / values.sum() * 100
|
values = values / values.sum() * 100
|
||||||
values = np.round(values, decimals=1)
|
values = np.round(values, decimals=1)
|
||||||
|
|||||||
@ -1,41 +0,0 @@
|
|||||||
import sys
|
|
||||||
|
|
||||||
from PyQt5.QtWidgets import QMainWindow, QApplication, QPushButton, QListView, \
|
|
||||||
QTableView
|
|
||||||
from PyQt5 import uic
|
|
||||||
|
|
||||||
|
|
||||||
class MainWindow(QMainWindow):
|
|
||||||
def __init__(self, ui_file):
|
|
||||||
super(MainWindow, self).__init__()
|
|
||||||
uic.loadUi(ui_file, self)
|
|
||||||
|
|
||||||
self.createCategoryButton \
|
|
||||||
= self.findChild(QPushButton, "createCategoryButton")
|
|
||||||
self.deleteCategoryButton \
|
|
||||||
= self.findChild(QPushButton, "deleteCategoryButton")
|
|
||||||
self.applyCategoryButton \
|
|
||||||
= self.findChild(QPushButton, "applyCategoryButton")
|
|
||||||
|
|
||||||
self.categoryListView = self.findChild(QListView, "categoryListView")
|
|
||||||
self.statementTableView = self.findChild(QTableView,
|
|
||||||
"statementTableView")
|
|
||||||
|
|
||||||
self.cancelButton = self.findChild(QPushButton, "cancelButton")
|
|
||||||
self.doneButton = self.findChild(QPushButton, "doneButton")
|
|
||||||
|
|
||||||
self._define_event_handlers()
|
|
||||||
|
|
||||||
def _define_event_handlers(self):
|
|
||||||
self.cancelButton.clicked.connect(self.close)
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
app = QApplication(sys.argv)
|
|
||||||
window = MainWindow("../res/main_window.ui")
|
|
||||||
window.show()
|
|
||||||
app.exec()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
||||||
@ -1,138 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>MainWindow</class>
|
|
||||||
<widget class="QMainWindow" name="MainWindow">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>800</width>
|
|
||||||
<height>600</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>MainWindow</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="centralwidget">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QSplitter" name="splitter">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<widget class="QGroupBox" name="groupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Categories</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="createCategoryButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Create</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="deleteCategoryButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Delete</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QListView" name="categoryListView"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="applyCategoryButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Apply</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QTableView" name="statementTableView"/>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="cancelButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Cancel</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="doneButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Done</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QMenuBar" name="menubar">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>800</width>
|
|
||||||
<height>23</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QStatusBar" name="statusbar"/>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
Loading…
Reference in New Issue
Block a user