mirror of
https://github.com/RolandWH/SIPPCompare.git
synced 2025-04-20 00:11:48 +01:00
Compare commits
No commits in common. "df7baa2df23edd1b94f231ea84627a80d9fd899b" and "32bc3add9bb671c5f6fa1ef067c4389a3da3022b" have entirely different histories.
df7baa2df2
...
32bc3add9b
@ -63,11 +63,6 @@
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
||||
</property>
|
||||
@ -85,7 +80,7 @@
|
||||
<item row="2" column="3">
|
||||
<widget class="QCheckBox" name="fund_deal_fee_check">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
@ -94,11 +89,6 @@
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="FastEditQDoubleSpinBox" name="share_deal_fee_box">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
||||
</property>
|
||||
@ -115,11 +105,6 @@
|
||||
</item>
|
||||
<item row="8" column="0" colspan="2">
|
||||
<widget class="QLabel" name="share_deal_reduce_trades_lab">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Share dealing discount # of trades</string>
|
||||
</property>
|
||||
@ -130,11 +115,6 @@
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QLabel" name="share_plat_max_fee_lab">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Share platform monthly fee cap</string>
|
||||
</property>
|
||||
@ -142,11 +122,6 @@
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="FastEditQDoubleSpinBox" name="fund_deal_fee_box">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
||||
</property>
|
||||
@ -163,11 +138,6 @@
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QLabel" name="share_deal_fee_lab">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Share dealing fee*</string>
|
||||
</property>
|
||||
@ -178,11 +148,6 @@
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
||||
</property>
|
||||
@ -209,11 +174,6 @@
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QLabel" name="fund_deal_fee_lab">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fund dealing fee*</string>
|
||||
</property>
|
||||
@ -223,21 +183,10 @@
|
||||
<widget class="QCheckBox" name="share_plat_max_fee_check"/>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLineEdit" name="plat_name_box">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="plat_name_box"/>
|
||||
</item>
|
||||
<item row="9" column="0" colspan="2">
|
||||
<widget class="QLabel" name="share_deal_reduce_amount_lab">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Share dealing discount amount</string>
|
||||
</property>
|
||||
@ -245,11 +194,6 @@
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QLabel" name="share_plat_fee_lab">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Share platform fee*</string>
|
||||
</property>
|
||||
@ -257,11 +201,6 @@
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="FastEditQDoubleSpinBox" name="share_plat_fee_box">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
||||
</property>
|
||||
@ -278,11 +217,6 @@
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="plat_name_lab">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Platform name</string>
|
||||
</property>
|
||||
@ -293,11 +227,6 @@
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
||||
</property>
|
||||
@ -326,11 +255,6 @@
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
@ -379,11 +303,6 @@
|
||||
</property>
|
||||
<item row="0" column="3">
|
||||
<widget class="FastEditQDoubleSpinBox" name="first_tier_fee_box">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
||||
</property>
|
||||
@ -400,11 +319,6 @@
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="first_tier_lab">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>on the first</string>
|
||||
</property>
|
||||
@ -412,11 +326,6 @@
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="first_tier_fee_lab">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>the fee is</string>
|
||||
</property>
|
||||
@ -424,11 +333,6 @@
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="FastEditQDoubleSpinBox" name="first_tier_box">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
||||
</property>
|
||||
@ -454,11 +358,6 @@
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add row</string>
|
||||
</property>
|
||||
@ -472,11 +371,6 @@
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove row</string>
|
||||
</property>
|
||||
|
@ -66,6 +66,7 @@ class SIPPCompare(QMainWindow):
|
||||
def init_variables(self):
|
||||
self.optional_boxes = self.platform_win.get_optional_boxes()
|
||||
self.fund_plat_fee = self.platform_win.get_fund_plat_fee()
|
||||
self.fund_deal_fee = self.platform_win.get_fund_deal_fee()
|
||||
self.share_plat_fee = self.platform_win.get_share_plat_fee()
|
||||
self.share_deal_fee = self.platform_win.get_share_deal_fee()
|
||||
|
||||
@ -76,21 +77,16 @@ class SIPPCompare(QMainWindow):
|
||||
self.plat_name = None
|
||||
|
||||
if self.optional_boxes[1]:
|
||||
self.fund_deal_fee = self.platform_win.get_fund_deal_fee()
|
||||
else:
|
||||
self.fund_deal_fee = None
|
||||
|
||||
if self.optional_boxes[2]:
|
||||
self.share_plat_max_fee = self.platform_win.get_share_plat_max_fee()
|
||||
else:
|
||||
self.share_plat_max_fee = None
|
||||
|
||||
if self.optional_boxes[3]:
|
||||
if self.optional_boxes[2]:
|
||||
self.share_deal_reduce_trades = self.platform_win.get_share_deal_reduce_trades()
|
||||
else:
|
||||
self.share_deal_reduce_trades = None
|
||||
|
||||
if self.optional_boxes[4]:
|
||||
if self.optional_boxes[3]:
|
||||
self.share_deal_reduce_amount = self.platform_win.get_share_deal_reduce_amount()
|
||||
else:
|
||||
self.share_deal_reduce_amount = None
|
||||
@ -105,8 +101,7 @@ class SIPPCompare(QMainWindow):
|
||||
slider_val: int = self.mix_slider.value()
|
||||
funds_value = (slider_val / 100) * value_num
|
||||
fund_trades_num = int(self.fund_trades_combo.currentText())
|
||||
if self.fund_deal_fee is not None:
|
||||
self.fund_deal_fees = fund_trades_num * self.fund_deal_fee
|
||||
self.fund_deal_fees = fund_trades_num * self.fund_deal_fee
|
||||
|
||||
for i in range(1, len(self.fund_plat_fee[0])):
|
||||
band = self.fund_plat_fee[0][i]
|
||||
@ -125,15 +120,15 @@ class SIPPCompare(QMainWindow):
|
||||
if self.share_plat_max_fee is not None:
|
||||
if (self.share_plat_fee * shares_value / 12) > self.share_plat_max_fee:
|
||||
self.share_plat_fees = self.share_plat_max_fee * 12
|
||||
else:
|
||||
self.share_plat_fees = self.share_plat_fee * shares_value
|
||||
else:
|
||||
self.share_plat_fees = self.share_plat_fee * shares_value
|
||||
|
||||
share_trades_num = int(self.share_trades_combo.currentText())
|
||||
if self.share_deal_reduce_trades is not None:
|
||||
if (share_trades_num / 12) >= self.share_deal_reduce_trades:
|
||||
self.share_deal_fees = self.share_deal_reduce_amount * share_trades_num
|
||||
else:
|
||||
self.share_deal_fees = self.share_deal_fee * share_trades_num
|
||||
else:
|
||||
self.share_deal_fees = self.share_deal_fee * share_trades_num
|
||||
|
||||
self.show_output_win()
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
from PyQt6.QtCore import QRegularExpression
|
||||
from PyQt6.QtGui import QRegularExpressionValidator, QFont
|
||||
from PyQt6.QtGui import QRegularExpressionValidator
|
||||
from PyQt6.QtWidgets import QWidget, QLabel
|
||||
from PyQt6 import uic
|
||||
|
||||
@ -34,13 +34,13 @@ class PlatformEdit(QWidget):
|
||||
self.save_but.setEnabled(True)
|
||||
|
||||
self.required_fields = [
|
||||
self.fund_deal_fee_box,
|
||||
self.share_plat_fee_box,
|
||||
self.share_deal_fee_box
|
||||
]
|
||||
|
||||
self.optional_fields = [
|
||||
self.plat_name_box,
|
||||
self.fund_deal_fee_box,
|
||||
self.share_plat_max_fee_box,
|
||||
self.share_deal_reduce_trades_box,
|
||||
self.share_deal_reduce_amount_box
|
||||
@ -48,14 +48,12 @@ class PlatformEdit(QWidget):
|
||||
|
||||
self.optional_check_boxes = [
|
||||
self.plat_name_check,
|
||||
self.fund_deal_fee_check,
|
||||
self.share_plat_max_fee_check,
|
||||
self.share_deal_reduce_trades_check,
|
||||
self.share_deal_reduce_amount_check
|
||||
]
|
||||
|
||||
self.check_boxes_ticked = [
|
||||
True,
|
||||
True,
|
||||
False,
|
||||
False,
|
||||
@ -173,27 +171,22 @@ class PlatformEdit(QWidget):
|
||||
return -1
|
||||
|
||||
widgets = []
|
||||
font = QFont()
|
||||
font.setPointSize(11)
|
||||
|
||||
widgets.append(QLabel(self.gridLayoutWidget_2))
|
||||
widgets[0].setFont(font)
|
||||
widgets[0].setText(f"between {int(self.first_tier_box.value())} and")
|
||||
|
||||
widgets.append(FastEditQDoubleSpinBox(self.gridLayoutWidget_2))
|
||||
widgets[1].setPrefix("£")
|
||||
widgets[1].setMaximum(9999999)
|
||||
widgets[1].setButtonSymbols(FastEditQDoubleSpinBox.ButtonSymbols.NoButtons)
|
||||
widgets[1].setFont(font)
|
||||
|
||||
widgets.append(QLabel(self.gridLayoutWidget_2))
|
||||
widgets[2].setText(f"the fee is")
|
||||
widgets[2].setFont(font)
|
||||
|
||||
widgets.append(FastEditQDoubleSpinBox(self.gridLayoutWidget_2))
|
||||
widgets[3].setSuffix("%")
|
||||
widgets[3].setMaximum(100)
|
||||
widgets[3].setButtonSymbols(FastEditQDoubleSpinBox.ButtonSymbols.NoButtons)
|
||||
widgets[3].setFont(font)
|
||||
|
||||
# TODO: why 28.5?
|
||||
self.gridLayoutWidget_2.setGeometry(11, 314, 611, int(round(28.5 * (self.fund_fee_rows + 1), 0)))
|
||||
@ -211,9 +204,7 @@ class PlatformEdit(QWidget):
|
||||
prev_box_row = cur_box_pos[0] - 1
|
||||
prev_box_item = self.gridLayout_2.itemAtPosition(prev_box_row, cur_box_pos[1]).widget()
|
||||
cur_label_item = self.gridLayout_2.itemAtPosition(cur_label_pos[0], cur_label_pos[1]).widget()
|
||||
cur_label_item.setText(f"between £{int(prev_box_item.value())} and")
|
||||
|
||||
# TODO: Tab order
|
||||
cur_label_item.setText(f"between {int(prev_box_item.value())} and")
|
||||
|
||||
def remove_row(self):
|
||||
if not self.fund_fee_rows > 1:
|
||||
|
Loading…
x
Reference in New Issue
Block a user