Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EO Time Series Viewer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin Jakimow
EO Time Series Viewer
Commits
0ac1404c
Commit
0ac1404c
authored
8 years ago
by
benjamin.jakimow@geo.hu-berlin.de
Browse files
Options
Downloads
Patches
Plain Diff
backup
parent
1894a37c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
timeseriesviewer/ui/widgets.py
+31
-17
31 additions, 17 deletions
timeseriesviewer/ui/widgets.py
with
31 additions
and
17 deletions
timeseriesviewer/ui/widgets.py
+
31
−
17
View file @
0ac1404c
...
...
@@ -31,9 +31,9 @@ from timeseriesviewer import jp
from
timeseriesviewer.ui
import
loadUIFormClass
,
DIR_UI
from
timeseriesviewer.main
import
SpatialExtent
PATH_MAIN_UI
=
jp
(
DIR_UI
,
'
timseriesviewer.ui
'
)
PATH_MAIN_UI
=
jp
(
DIR_UI
,
'
tim
e
seriesviewer.ui
'
)
PATH_BANDVIEWSETTINGS_UI
=
jp
(
DIR_UI
,
'
bandviewsettings.ui
'
)
PATH_
IMAGECHIPVIEW
SETTINGS_UI
=
jp
(
DIR_UI
,
'
imagechipview
settings.ui
'
)
PATH_
BANDVIEWRENDER
SETTINGS_UI
=
jp
(
DIR_UI
,
'
bandviewrender
settings.ui
'
)
PATH_BANDVIEW_UI
=
jp
(
DIR_UI
,
'
bandview.ui
'
)
PATH_TSDVIEW_UI
=
jp
(
DIR_UI
,
'
timeseriesdatumview.ui
'
)
...
...
@@ -54,8 +54,6 @@ class TimeSeriesViewerUI(QMainWindow,
#set button default actions -> this will show the action icons as well
#I don't know why this is not possible in the QDesigner when QToolButtons are
#placed outside a toolbar
self
.
btnSelectArea
.
setDefaultAction
(
self
.
actionSelectArea
)
self
.
btnSelectCenterCoordinate
.
setDefaultAction
(
self
.
actionSelectCenter
)
self
.
btnNavToFirstTSD
.
setDefaultAction
(
self
.
actionFirstTSD
)
self
.
btnNavToLastTSD
.
setDefaultAction
(
self
.
actionLastTSD
)
...
...
@@ -72,6 +70,10 @@ class TimeSeriesViewerUI(QMainWindow,
self
.
spinBoxSubsetSizeX
.
valueChanged
.
connect
(
lambda
:
self
.
onSubsetValueChanged
(
'
X
'
))
self
.
spinBoxSubsetSizeY
.
valueChanged
.
connect
(
lambda
:
self
.
onSubsetValueChanged
(
'
Y
'
))
self
.
tabifyDockWidget
(
self
.
dockNavigation
,
self
.
dockRendering
)
self
.
tabifyDockWidget
(
self
.
dockNavigation
,
self
.
dockLabeling
)
self
.
subsetRatio
=
None
...
...
@@ -79,6 +81,10 @@ class TimeSeriesViewerUI(QMainWindow,
self
.
spatialExtentWidgets
=
[
self
.
spinBoxExtentCenterX
,
self
.
spinBoxExtentCenterY
,
self
.
spinBoxExtentWidth
,
self
.
spinBoxExtentHeight
]
def
setQgsLinkWidgets
(
self
,
b
):
#enable/disable widgets that rely on QGIS instance interaction
s
=
""
def
_blockSignals
(
self
,
widgets
,
block
=
True
):
states
=
dict
()
if
isinstance
(
widgets
,
dict
):
...
...
@@ -96,7 +102,7 @@ class TimeSeriesViewerUI(QMainWindow,
assert
isinstance
(
crs
,
QgsCoordinateReferenceSystem
)
old
=
self
.
mCrs
self
.
mCrs
=
crs
self
.
textBoxCRSInfo
.
setText
(
crs
.
toWkt
())
self
.
textBoxCRSInfo
.
set
Plain
Text
(
crs
.
toWkt
())
if
self
.
mCrs
!=
old
:
self
.
sigCrsChanged
.
emit
(
crs
)
...
...
@@ -134,9 +140,9 @@ class TimeSeriesViewerUI(QMainWindow,
self
.
spinBoxExtentWidth
.
setValue
(
extent
.
width
())
self
.
spinBoxExtentHeight
.
setValue
(
extent
.
height
())
self
.
setCrs
(
extent
.
crs
())
self
.
_blockSignals
(
self
.
spatialExtentWidgets
,
states
)
self
.
_blockSignals
(
states
)
if
old
!=
extent
:
if
extent
!=
old
:
self
.
sigSpatialExtentChanged
.
emit
(
extent
)
...
...
@@ -263,7 +269,15 @@ class BandViewUI(QFrame, loadUIFormClass(PATH_BANDVIEW_UI)):
self
.
setupUi
(
self
)
self
.
btnRemoveBandView
.
setDefaultAction
(
self
.
actionRemoveBandView
)
self
.
btnAddBandView
.
setDefaultAction
(
self
.
actionAddBandView
)
self
.
btnToggleVisibility
.
setDefaultAction
(
self
.
actionToggleVisibility
)
self
.
btnHideBandView
.
setDefaultAction
(
self
.
actionHideBandView
)
s
=
""
def
bandViewVisibility
(
self
):
return
self
.
btnHideBandView
.
isChecked
()
def
setBandViewVisibility
(
self
,
show
):
self
.
btnHideBandView
.
setChecked
(
show
)
# send signal to thoose that need to know the visibility
class
TimeSeriesDatumViewUI
(
QFrame
,
loadUIFormClass
(
PATH_TSDVIEW_UI
)):
def
__init__
(
self
,
title
=
'
<#>
'
,
parent
=
None
):
...
...
@@ -293,12 +307,12 @@ class LineWidget(QFrame):
else
:
self
.
setSizePolicy
(
QSizePolicy
.
Fixed
,
QSizePolicy
.
Expanding
)
class
ImageChipView
SettingsUI
(
QGroupBox
,
loadUIFormClass
(
PATH_
IMAGECHIPVIEW
SETTINGS_UI
)):
class
BandViewRender
SettingsUI
(
QGroupBox
,
loadUIFormClass
(
PATH_
BANDVIEWRENDER
SETTINGS_UI
)):
def
__init__
(
self
,
parent
=
None
):
"""
Constructor.
"""
super
(
ImageChipView
SettingsUI
,
self
).
__init__
(
parent
)
super
(
BandViewRender
SettingsUI
,
self
).
__init__
(
parent
)
# Set up the user interface from Designer.
# After setupUI you can access any designer object by doing
# self.<objectname>, and you can use autoconnect slots - see
...
...
@@ -344,22 +358,21 @@ class BandViewMapCanvas(QgsMapCanvas):
class
ImageChipView
Settings
(
QObject
):
class
BandViewRender
Settings
(
QObject
):
#define signals
sigBandViewVisibility
=
pyqtSignal
(
bool
)
sigRendererChanged
=
pyqtSignal
(
QgsRasterRenderer
)
sigRemoveView
=
pyqtSignal
()
def
__init__
(
self
,
sensor
,
parent
=
None
):
"""
Constructor.
"""
super
(
ImageChipView
Settings
,
self
).
__init__
(
parent
)
super
(
BandViewRender
Settings
,
self
).
__init__
(
parent
)
self
.
ui
=
ImageChipView
SettingsUI
(
parent
)
self
.
ui
=
BandViewRender
SettingsUI
(
parent
)
self
.
ui
.
create
()
self
.
ui
.
setTitle
(
sensor
.
sensorName
)
self
.
ui
.
bandNames
=
sensor
.
bandNames
self
.
minValues
=
[
self
.
ui
.
tbRedMin
,
self
.
ui
.
tbGreenMin
,
self
.
ui
.
tbBlueMin
]
...
...
@@ -402,6 +415,7 @@ class ImageChipViewSettings(QObject):
self
.
ui
.
btn453
.
setEnabled
(
False
)
s
=
""
def
showSensorName
(
self
,
b
):
if
b
:
self
.
ui
.
setTitle
(
self
.
sensor
.
sensorName
)
...
...
@@ -438,7 +452,7 @@ class ImageChipViewSettings(QObject):
text
+=
'
({} {})
'
.
format
(
'
,
'
.
join
([
'
{:0.2f}
'
.
format
(
self
.
sensor
.
wavelengths
[
b
-
1
])
for
b
in
rgb
]),
self
.
sensor
.
wavelengthUnits
)
self
.
ui
.
label
Bands
.
setText
(
text
)
self
.
ui
.
label
Summary
.
setText
(
text
)
def
setLayerRenderer
(
self
,
renderer
):
ui
=
self
.
ui
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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