Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEM: Move _ViewProviderFemAnalysis class to separate file
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
- Loading branch information
Showing
4 changed files
with
49 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import FreeCAD | ||
|
||
if FreeCAD.GuiUp: | ||
import FreeCADGui | ||
import FemGui | ||
|
||
|
||
class _ViewProviderFemAnalysis: | ||
"A View Provider for the FemAnalysis container object" | ||
|
||
def __init__(self): | ||
#vobj.addProperty("App::PropertyLength", "BubbleSize", "Base", str(translate("Fem", "The size of the axis bubbles"))) | ||
pass | ||
|
||
def getIcon(self): | ||
return ":/icons/fem-analysis.svg" | ||
|
||
def attach(self, vobj): | ||
self.ViewObject = vobj | ||
self.Object = vobj.Object | ||
self.bubbles = None | ||
|
||
def updateData(self, obj, prop): | ||
return | ||
|
||
def onChanged(self, vobj, prop): | ||
return | ||
|
||
def doubleClicked(self, vobj): | ||
if not FemGui.getActiveAnalysis() == self.Object: | ||
if FreeCADGui.activeWorkbench().name() != 'FemWorkbench': | ||
FreeCADGui.activateWorkbench("FemWorkbench") | ||
FemGui.setActiveAnalysis(self.Object) | ||
return True | ||
else: | ||
import _JobControlTaskPanel | ||
taskd = _JobControlTaskPanel(self.Object) | ||
FreeCADGui.Control.showDialog(taskd) | ||
return True | ||
|
||
def __getstate__(self): | ||
return None | ||
|
||
def __setstate__(self, state): | ||
return None |