Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GEPARD
GEPARD
Commits
1258436c
Commit
1258436c
authored
May 03, 2019
by
Lars Bittrich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfixes in AnalysisView, ParticleTypeView, and ExpExcelDialog
parent
04b35ae2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
8 deletions
+21
-8
analysis/analysisview.py
analysis/analysisview.py
+1
-1
analysis/analysiswidgets.py
analysis/analysiswidgets.py
+20
-7
No files found.
analysis/analysisview.py
100644 → 100755
View file @
1258436c
...
...
@@ -588,7 +588,7 @@ class ParticleAnalysis(QtWidgets.QMainWindow):
print
(
"abundancyList:"
,
abundancyList
)
print
(
"labelList:"
,
labelList
)
print
(
"colorList:"
,
colorList
)
self
.
typeHistogram
.
updateTypes
(
list
(
zip
(
abundancyList
,
labelList
,
colorList
)))
self
.
typeHistogram
.
updateTypes
(
list
(
zip
(
abundancyList
,
labelList
,
colorList
)))
#general size histogram
self
.
sizeHist_ax
.
clear
()
...
...
analysis/analysiswidgets.py
100644 → 100755
View file @
1258436c
...
...
@@ -155,7 +155,7 @@ class ExpExcelDialog(QtWidgets.QDialog):
if
not
os
.
path
.
exists
(
xlsname
):
validFileName
=
True
else
:
xlsname
=
self
.
directory
+
self
.
xlsFileName
.
text
()
+
' {}.xlsx'
.
format
(
incr
)
xlsname
=
self
.
directory
+
'//'
+
self
.
xlsFileName
.
text
()
+
' {}.xlsx'
.
format
(
incr
)
incr
+=
1
writer
=
pd
.
ExcelWriter
(
xlsname
,
engine
=
'xlsxwriter'
)
...
...
@@ -220,16 +220,24 @@ class ParticleIndicator(QtWidgets.QPushButton):
qp
=
QtGui
.
QPainter
()
qp
.
begin
(
self
)
qp
.
fillRect
(
self
.
rect
(),
QtCore
.
Qt
.
white
)
#qp.fillRect(self.rect(), QtCore.Qt.white)
qp
.
setBrush
(
QtCore
.
Qt
.
white
)
qp
.
drawRoundedRect
(
0
,
0
,
width
,
height
,
5.
,
5.
)
qp
.
setPen
(
self
.
color
)
qp
.
setBrush
(
self
.
color
)
qp
.
drawRoundedRect
(
0
,
0
,
int
(
width
*
r
),
height
,
5.
,
5.
)
qp
.
setPen
(
QtCore
.
Qt
.
black
)
qp
.
setBrush
(
QtCore
.
Qt
.
NoBrush
)
qp
.
drawRoundedRect
(
0
,
0
,
width
,
height
,
5.
,
5.
)
qp
.
drawText
(
self
.
rect
(),
QtCore
.
Qt
.
AlignLeft
|
QtCore
.
Qt
.
AlignVCenter
,
font
=
qp
.
font
()
font
.
setPointSize
(
13
)
font
.
setStyleStrategy
(
QtGui
.
QFont
.
NoAntialias
)
font
.
setWeight
(
0
)
qp
.
setFont
(
font
)
qp
.
setCompositionMode
(
QtGui
.
QPainter
.
RasterOp_SourceXorDestination
)
qp
.
setPen
(
QtCore
.
Qt
.
white
)
qp
.
drawText
(
5
,
0
,
width
-
10
,
height
,
QtCore
.
Qt
.
AlignLeft
|
QtCore
.
Qt
.
AlignVCenter
,
self
.
text
)
qp
.
end
()
...
...
@@ -252,12 +260,16 @@ class ParticleTypeView(QtWidgets.QScrollArea):
self
.
setWidgetResizable
(
True
)
self
.
setWidget
(
self
.
view
)
self
.
setAlignment
(
QtCore
.
Qt
.
AlignHCenter
)
self
.
widgets
=
[]
def
updateTypes
(
self
,
types
):
print
(
"Updating polymer type view"
,
flush
=
True
)
for
i
in
range
(
self
.
indicatorbox
.
count
()):
self
.
indicatorbox
.
takeAt
(
0
)
for
pi
in
self
.
widgets
:
self
.
indicatorbox
.
removeWidget
(
pi
)
pi
.
setParent
(
None
)
pi
.
destroy
()
self
.
indicatorbox
.
takeAt
(
0
)
self
.
widgets
=
[]
numtotal
=
sum
([
num
for
num
,
text
,
color
in
types
])
def
getIndexFunction
(
index
):
...
...
@@ -269,6 +281,7 @@ class ParticleTypeView(QtWidgets.QScrollArea):
pi
=
ParticleIndicator
(
num
,
numtotal
,
color
,
text
)
self
.
indicatorbox
.
addWidget
(
pi
)
pi
.
clicked
.
connect
(
getIndexFunction
(
index
))
self
.
widgets
.
append
(
pi
)
self
.
indicatorbox
.
addStretch
()
self
.
view
.
update
()
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment