-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlotModifiers.py
31 lines (23 loc) · 895 Bytes
/
PlotModifiers.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from PySide6.QtWidgets import QTreeWidgetItem
class PlotModifier(QTreeWidgetItem):
def __init__(self, parent, name):
super().__init__(parent, name)
self.setData(0, 1, self)
class ModifierLinestyle(PlotModifier):
def __init__(self, parent, name):
super().__init__(parent, name)
def clone(self):
copy = super().clone()
return ModifierLinestyle(copy.parent(), [copy.text(0)])
class ModifierLinecolor(PlotModifier):
def __init__(self, parent, name):
super().__init__(parent, name)
def clone(self):
copy = super().clone()
return ModifierLinecolor(copy.parent(), [copy.text(0)])
class ModifierColormap(PlotModifier):
def __init__(self, parent, name):
super().__init__(parent, name)
def clone(self):
copy = super().clone()
return ModifierColormap(copy.parent(), [copy.text(0)])