Skip to content

Commit 2f2adcb

Browse files
committed
update readme todo etc.
1 parent aa0869b commit 2f2adcb

File tree

5 files changed

+30
-4
lines changed

5 files changed

+30
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Digtize the graph(figure/chart) from image format, such as graph scanned from bo
1717
+ Setting multiple x-axis values or y-axis values
1818
+ Display axes grid predict by x-ais and y-axis setting
1919
+ Scale background(graph) image
20+
+ fiting any digitized curve by polynomials
2021
+ Export csv format curve points data
2122
+ Switch different system themes (xp, vista etc.)
2223

README_zh-CN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ ps:本人经常遇到需要使用扫描的曲线图,但是十分不便,所
1919
+ x坐标轴及y坐标轴均可以设置多个点
2020
+ 根据坐标轴设置,推断坐标轴各个点位置,并以网格形式显示
2121
+ 可以缩放曲线图图片
22+
+ 多项式拟合曲线
2223
+ 导出 csv 格式数据
2324
+ 支持切换系统主题(xp, vista etc.)
2425

src/core/graphicsView.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from PyQt5.QtCore import pyqtSignal, QRectF, QPoint, QPointF, Qt, QItemSelectionModel, QModelIndex, QItemSelection
1515
from PyQt5.QtGui import QStandardItemModel, QStandardItem, QPainter, QIcon, QPen, QPixmap, QColor
1616
from PyQt5.QtWidgets import (QGraphicsView, QGraphicsScene, QGraphicsPixmapItem, QGraphicsItem, QGraphicsLineItem,
17-
QInputDialog, QLineEdit)
17+
QInputDialog, QLineEdit, QStyledItemDelegate, qApp)
1818

1919
from core.enums import OpMode, PointType, RandItem
2020
from core.graphicsItems import QGraphicsPointItem, QGraphicsAxesItem
@@ -515,6 +515,9 @@ def addCurve(self, name=None):
515515
item3.setAutoTristate(False)
516516
item3.setEditable(False)
517517
item3.setCheckState(Qt.Checked)
518+
item1.setTextAlignment(Qt.AlignCenter)
519+
item2.setTextAlignment(Qt.AlignCenter)
520+
item3.setTextAlignment(Qt.AlignCenter)
518521
self.curveModel.appendRow([item1, item2, item3])
519522
self.changeCurrentCurve(name)
520523
self.sigModified.emit(True)
@@ -916,3 +919,21 @@ def switch(self, isOn):
916919
else:
917920
self.setIcon(self.iconoff)
918921
self.isOn = isOn
922+
923+
924+
# class IconDelegate(QStyledItemDelegate):
925+
# def __init__(self, parent=None):
926+
# super().__init__(parent)
927+
#
928+
# def paint(painter, option, index): # QStyleOptionViewItem QModelIndex
929+
# # 判断是不是icon所在的index
930+
# if index.column() == 0:
931+
# QStyledItemDelegate.paint(painter, option, index)
932+
#
933+
# QPixmap
934+
# pixmap = QPixmap("icon.png")
935+
# qApp.style().drawItemPixmap(painter, option.rect, Qt.AlignCenter, QPixmap(pixmap))
936+
937+
# tableWidget->setItemDelegate(new IconDelegate(this));
938+
# tableWidget->setItemDelegateForColumn(colum, new IconDelegate(this));
939+
# tableWidget->setItemDelegateForRow(row, new IconDelegate(this));

src/core/mainwin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def changecurvetable(index):
171171
if index.column() == 0:
172172
self.view.changeCurrentCurve(self.view.curveModel.item(index.row(), 1).text())
173173
elif index.column() == 1:
174-
self.view.renameCurve(name=self.view.curveModel.item(index.row(),1).text())
174+
self.view.renameCurve(name=self.view.curveModel.item(index.row(), 1).text())
175175

176176
self.curveTable.doubleClicked.connect(changecurvetable)
177177

todo.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11

22
# Todo
33

4-
1. double click to change curve name
54
1. order the points table of current curve by ascending order of x axis
65

76
for future
87

98
1. settings
109
+ export precision
10+
+ curve colors and types
11+
+ recent file
1112
2. i18n
12-
3. installition
13+
3. redo undo
14+
4. installition
1315

1416
# performed
1517

1618
+ 2020.05.06:fixed rename curve error
1719
+ 2020.05.06:add delete curve tool
1820
+ 2020.05.06:selected curve automatically be the current curve
1921
+ 2020.05.05:fitting curve by polynamial
22+
+ double click to change curve name

0 commit comments

Comments
 (0)