개정판 434162c1
update size symbol, line no from to context
Change-Id: I1c3af217358bc318b99707fc959633470622e08c
DTI_PID/DTI_PID/Shapes/EngineeringLineNoTextItem.py | ||
---|---|---|
160 | 160 |
menu.addAction(explodeKeepAction) |
161 | 161 |
''' |
162 | 162 | |
163 |
reverseAction = QAction('Reverse Flow', None) |
|
164 |
reverseAction.triggered.connect(self.contextReverse) |
|
165 |
menu.addAction(reverseAction) |
|
163 |
fromAction = QAction('Set From', None) |
|
164 |
fromAction.triggered.connect(self.contextFrom) |
|
165 |
menu.addAction(fromAction) |
|
166 | ||
167 |
toAction = QAction('Set To', None) |
|
168 |
toAction.triggered.connect(self.contextTo) |
|
169 |
menu.addAction(toAction) |
|
166 | 170 | |
167 | 171 |
highlightAction = QAction('Highlight', None) |
168 | 172 |
highlightAction.triggered.connect(lambda: self.contextHighlight(self)) |
... | ... | |
192 | 196 | |
193 | 197 |
menu.exec_(event.screenPos()) |
194 | 198 | |
199 |
def contextFrom(self): |
|
200 |
from App import App |
|
201 |
import SelectAttributeCommand |
|
202 |
_from = None |
|
203 |
for prop, value in self.properties.items(): |
|
204 |
if prop.Attribute == 'From': |
|
205 |
_from = prop |
|
206 |
break |
|
207 |
cmd = SelectAttributeCommand.SelectAttributeCommand(self, _from, App.mainWnd().graphicsView) |
|
208 |
cmd.onSuccess.connect(App.mainWnd().resultPropertyTableWidget.onSuccessSelectAttribute) |
|
209 |
App.mainWnd().graphicsView.command = cmd |
|
210 | ||
211 |
def contextTo(self): |
|
212 |
from App import App |
|
213 |
import SelectAttributeCommand |
|
214 |
_to = None |
|
215 |
for prop, value in self.properties.items(): |
|
216 |
if prop.Attribute == 'To': |
|
217 |
_to = prop |
|
218 |
break |
|
219 |
cmd = SelectAttributeCommand.SelectAttributeCommand(self, _to, App.mainWnd().graphicsView) |
|
220 |
cmd.onSuccess.connect(App.mainWnd().resultPropertyTableWidget.onSuccessSelectAttribute) |
|
221 |
App.mainWnd().graphicsView.command = cmd |
|
222 | ||
195 | 223 |
def contextHighlight(self, item): |
196 | 224 |
from App import App |
197 | 225 |
from HighlightCommand import HighlightCommand |
내보내기 Unified diff