Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
hru-delin-dev
hru-delin-qgis
Commits
70212aee
Unverified
Commit
70212aee
authored
Apr 25, 2020
by
Julien Veyssier
Browse files
polish a few things
Signed-off-by:
Julien Veyssier
<
eneiluj@posteo.net
>
parent
58acd2c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
hrudelin_dockwidget.py
View file @
70212aee
...
@@ -112,6 +112,11 @@ class HruDelinDockWidget(QtWidgets.QDockWidget, FORM_CLASS):
...
@@ -112,6 +112,11 @@ class HruDelinDockWidget(QtWidgets.QDockWidget, FORM_CLASS):
self
.
debugCheck
.
stateChanged
.
connect
(
self
.
debugChanged
)
self
.
debugCheck
.
stateChanged
.
connect
(
self
.
debugChanged
)
self
.
exportButton
.
clicked
.
connect
(
self
.
exportProjectConfig
)
self
.
exportButton
.
clicked
.
connect
(
self
.
exportProjectConfig
)
self
.
exportDataButton
.
clicked
.
connect
(
self
.
exportProjectData
)
self
.
exportDataButton
.
clicked
.
connect
(
self
.
exportProjectData
)
self
.
step1Check
.
clicked
.
connect
(
self
.
stepClicked
)
self
.
step2Check
.
clicked
.
connect
(
self
.
stepClicked
)
self
.
step3Check
.
clicked
.
connect
(
self
.
stepClicked
)
self
.
step4Check
.
clicked
.
connect
(
self
.
stepClicked
)
self
.
stepClicked
()
# help buttons
# help buttons
style
=
self
.
projectPathHelpButton
.
style
()
style
=
self
.
projectPathHelpButton
.
style
()
self
.
projectPathHelpButton
.
setIcon
(
style
.
standardIcon
(
QStyle
.
SP_MessageBoxQuestion
))
self
.
projectPathHelpButton
.
setIcon
(
style
.
standardIcon
(
QStyle
.
SP_MessageBoxQuestion
))
...
@@ -143,8 +148,9 @@ class HruDelinDockWidget(QtWidgets.QDockWidget, FORM_CLASS):
...
@@ -143,8 +148,9 @@ class HruDelinDockWidget(QtWidgets.QDockWidget, FORM_CLASS):
#self.subcatchmentLabel.setText(self.tr('Subcatchment'))
#self.subcatchmentLabel.setText(self.tr('Subcatchment'))
self
.
changeProjectPathButton
.
setText
(
self
.
tr
(
'Change'
))
self
.
changeProjectPathButton
.
setText
(
self
.
tr
(
'Change'
))
self
.
resetButton
.
setText
(
self
.
tr
(
'Reset project'
))
self
.
resetButton
.
setText
(
self
.
tr
(
'Reset project'
))
self
.
loadButton
.
setText
(
self
.
tr
(
'Load
Irip
config file (.cfg)'
))
self
.
loadButton
.
setText
(
self
.
tr
(
'Load
HRU-delin
config file (.cfg)'
))
self
.
debugCheck
.
setText
(
self
.
tr
(
'See all intermediate files
\n
(debug mode)'
))
self
.
debugCheck
.
setText
(
self
.
tr
(
'See all intermediate files
\n
(debug mode)'
))
self
.
debugCheck
.
setVisible
(
False
)
self
.
exportDataResultsCheck
.
setText
(
'Include results in exported archive'
)
self
.
exportDataResultsCheck
.
setText
(
'Include results in exported archive'
)
self
.
exportButton
.
setText
(
'Export cfg file'
)
self
.
exportButton
.
setText
(
'Export cfg file'
)
self
.
exportDataButton
.
setText
(
'Export portable config with input data'
)
self
.
exportDataButton
.
setText
(
'Export portable config with input data'
)
...
@@ -209,6 +215,23 @@ class HruDelinDockWidget(QtWidgets.QDockWidget, FORM_CLASS):
...
@@ -209,6 +215,23 @@ class HruDelinDockWidget(QtWidgets.QDockWidget, FORM_CLASS):
def
debugChanged
(
self
):
def
debugChanged
(
self
):
self
.
DEBUG
=
self
.
debugCheck
.
isChecked
()
self
.
DEBUG
=
self
.
debugCheck
.
isChecked
()
def
stepClicked
(
self
):
print
(
'plop'
)
checkBoxes
=
[
self
.
step1Check
,
self
.
step2Check
,
self
.
step3Check
,
self
.
step4Check
]
checkedIndexes
=
[]
for
i
,
cb
in
enumerate
(
checkBoxes
):
if
cb
.
isChecked
():
checkedIndexes
.
append
(
i
)
checkBoxes
[
i
].
setDisabled
(
False
)
if
len
(
checkedIndexes
)
>=
2
:
print
(
'range %s %s'
%
(
checkedIndexes
[
0
]
+
1
,
checkedIndexes
[
-
1
]))
print
(
list
(
range
(
checkedIndexes
[
0
]
+
1
,
checkedIndexes
[
-
1
])))
for
i
in
range
(
checkedIndexes
[
0
]
+
1
,
checkedIndexes
[
-
1
]):
checkBoxes
[
i
].
setChecked
(
True
)
checkBoxes
[
i
].
setDisabled
(
True
)
elif
len
(
checkedIndexes
)
==
1
:
checkBoxes
[
checkedIndexes
[
0
]].
setDisabled
(
True
)
########## manage layers ###########
########## manage layers ###########
def
createGroup
(
self
,
gid
,
project
):
def
createGroup
(
self
,
gid
,
project
):
...
...
hrudelin_dockwidget_base.ui
View file @
70212aee
...
@@ -114,7 +114,27 @@
...
@@ -114,7 +114,27 @@
</widget>
</widget>
</item>
</item>
<item>
<item>
<widget
class=
"QSpinBox"
name=
"nbProcessSpin"
/>
<widget
class=
"QSpinBox"
name=
"nbProcessSpin"
>
<property
name=
"minimumSize"
>
<size>
<width>
50
</width>
<height>
0
</height>
</size>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</item>
</layout>
</layout>
</item>
</item>
...
...
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