Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moose
Manage
Activity
Members
Labels
Plan
Issues
9
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sahil Moza
moose
Commits
1628fa03
Commit
1628fa03
authored
8 years ago
by
HarshaRani
Browse files
Options
Downloads
Patches
Plain Diff
Squashed 'moose-gui/' changes from 1ef13c9-1ef13c9
parent
f0054556
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
moose-gui/plugins/kkitUtil.py
+7
-2
7 additions, 2 deletions
moose-gui/plugins/kkitUtil.py
moose-gui/plugins/modelBuild.py
+1
-1
1 addition, 1 deletion
moose-gui/plugins/modelBuild.py
with
8 additions
and
3 deletions
moose-gui/plugins/kkitUtil.py
+
7
−
2
View file @
1628fa03
...
...
@@ -129,12 +129,13 @@ def handleCollisions(compartments, moveCallback, layoutPt,margin = 5.0):
def
calculateChildBoundingRect
(
compt
):
'''
In this function I am trying to calculate BoundingRect of the compartments
looking into children and its children which default
"
ChildrenBoundingRect
"
function doing but in multi-compartment cross-compartment reaction
function
was
doing
it
but in multi-compartment cross-compartment reaction
the arrow width is taken into account which doesn
'
t belong to this perticular compartment
'''
ypos
=
[]
xpos
=
[]
for
l
in
compt
.
childItems
():
'''
All the children including pool,reac,enz,polygon(arrow),table
'''
if
not
isinstance
(
l
,
QtSvg
.
QGraphicsSvgItem
):
xpos
.
append
((
l
.
pos
().
x
())
+
(
l
.
boundingRect
().
bottomRight
().
x
()))
...
...
@@ -154,5 +155,9 @@ def calculateChildBoundingRect(compt):
(
not
isinstance
(
ll
,
QtGui
.
QGraphicsEllipseItem
))
):
ypos
.
append
(
l
.
pos
().
y
()
+
ll
.
pos
().
y
()
+
ll
.
boundingRect
().
bottomRight
().
y
())
calculateRectcompt
=
QtCore
.
QRectF
(
min
(
xpos
),
min
(
ypos
),(
max
(
xpos
)
-
min
(
xpos
)),(
max
(
ypos
)
-
min
(
ypos
)))
if
xpos
and
ypos
:
calculateRectcompt
=
QtCore
.
QRectF
(
min
(
xpos
),
min
(
ypos
),(
max
(
xpos
)
-
min
(
xpos
)),(
max
(
ypos
)
-
min
(
ypos
)))
else
:
calculateRectcompt
=
compt
.
rect
()
return
calculateRectcompt
\ No newline at end of file
This diff is collapsed.
Click to expand it.
moose-gui/plugins/modelBuild.py
+
1
−
1
View file @
1628fa03
...
...
@@ -44,7 +44,7 @@ def checkCreate(scene,view,modelpath,mobj,string,ret_string,num,event_pos,layout
mobj
.
volume
=
1e-15
mesh
=
moose
.
element
(
mobj
.
path
+
'
/mesh
'
)
qGItem
=
ComptItem
(
scene
,
pos
.
toPoint
().
x
(),
pos
.
toPoint
().
y
(),
5
00
,
5
00
,
mobj
)
qGItem
=
ComptItem
(
scene
,
pos
.
toPoint
().
x
(),
pos
.
toPoint
().
y
(),
1
00
,
1
00
,
mobj
)
qGItem
.
setPen
(
QtGui
.
QPen
(
Qt
.
QColor
(
66
,
66
,
66
,
100
),
1
,
Qt
.
Qt
.
SolidLine
,
Qt
.
Qt
.
RoundCap
,
Qt
.
Qt
.
RoundJoin
))
view
.
sceneContainerPt
.
addItem
(
qGItem
)
qGItem
.
cmptEmitter
.
connect
(
qGItem
.
cmptEmitter
,
QtCore
.
SIGNAL
(
"
qgtextPositionChange(PyQt_PyObject)
"
),
layoutPt
.
positionChange1
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment