[Add]增加VnTrader小数点显示配置参数
This commit is contained in:
parent
f2787e2390
commit
162b4cc7b6
@ -11,8 +11,10 @@
|
|||||||
|
|
||||||
"logActive": true,
|
"logActive": true,
|
||||||
"logLevel": "debug",
|
"logLevel": "debug",
|
||||||
"logConsole": false,
|
"logConsole": true,
|
||||||
"logFile": true,
|
"logFile": true,
|
||||||
|
|
||||||
"tdPenalty": ["IF", "IH", "IC"]
|
"tdPenalty": ["IF", "IH", "IC"],
|
||||||
|
|
||||||
|
"maxDecimal": 4
|
||||||
}
|
}
|
@ -14,5 +14,7 @@
|
|||||||
"logConsole": true,
|
"logConsole": true,
|
||||||
"logFile": true,
|
"logFile": true,
|
||||||
|
|
||||||
"tdPenalty": ["IF", "IH", "IC"]
|
"tdPenalty": ["IF", "IH", "IC"],
|
||||||
|
|
||||||
|
"maxDecimal": 4
|
||||||
}
|
}
|
@ -755,7 +755,7 @@ class TradingWidget(QtWidgets.QFrame):
|
|||||||
self.comboOffset.addItems(self.offsetList)
|
self.comboOffset.addItems(self.offsetList)
|
||||||
|
|
||||||
self.spinPrice = QtWidgets.QDoubleSpinBox()
|
self.spinPrice = QtWidgets.QDoubleSpinBox()
|
||||||
self.spinPrice.setDecimals(4)
|
self.spinPrice.setDecimals(globalSetting.get('maxDecimal', 4))
|
||||||
self.spinPrice.setMinimum(0)
|
self.spinPrice.setMinimum(0)
|
||||||
self.spinPrice.setMaximum(100000)
|
self.spinPrice.setMaximum(100000)
|
||||||
|
|
||||||
|
@ -10,9 +10,10 @@ import json
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from math import isnan
|
from math import isnan
|
||||||
|
|
||||||
|
from vtGlobal import globalSetting
|
||||||
|
|
||||||
MAX_NUMBER = 10000000000000
|
MAX_NUMBER = 10000000000000
|
||||||
MAX_DECIMAL = 4
|
MAX_DECIMAL = globalSetting.get('maxDecimal', 4)
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
def safeUnicode(value):
|
def safeUnicode(value):
|
||||||
@ -40,7 +41,13 @@ def todayDate():
|
|||||||
# 图标路径
|
# 图标路径
|
||||||
iconPathDict = {}
|
iconPathDict = {}
|
||||||
|
|
||||||
path = os.path.abspath(os.path.dirname(__file__))
|
path = os.path.abspath(os.path.dirname(__file__)) # 遍历vnpy安装目录
|
||||||
|
for root, subdirs, files in os.walk(path):
|
||||||
|
for fileName in files:
|
||||||
|
if '.ico' in fileName:
|
||||||
|
iconPathDict[fileName] = os.path.join(root, fileName)
|
||||||
|
|
||||||
|
path = os.getcwd() # 遍历工作目录
|
||||||
for root, subdirs, files in os.walk(path):
|
for root, subdirs, files in os.walk(path):
|
||||||
for fileName in files:
|
for fileName in files:
|
||||||
if '.ico' in fileName:
|
if '.ico' in fileName:
|
||||||
|
Loading…
Reference in New Issue
Block a user