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
195a57b0
Commit
195a57b0
authored
8 years ago
by
benjamin.jakimow@geo.hu-berlin.de
Browse files
Options
Downloads
Patches
Plain Diff
set CRS using QgsProjectionSelectionWidget
parent
e3b9ab27
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
timeseriesviewer/ui/docks.py
+10
-7
10 additions, 7 deletions
timeseriesviewer/ui/docks.py
timeseriesviewer/ui/navigationdock.ui
+108
-84
108 additions, 84 deletions
timeseriesviewer/ui/navigationdock.ui
with
118 additions
and
91 deletions
timeseriesviewer/ui/docks.py
+
10
−
7
View file @
195a57b0
...
...
@@ -103,10 +103,11 @@ class NavigationDockUI(TsvDockWidgetBase, load('navigationdock.ui')):
def
__init__
(
self
,
parent
=
None
):
super
(
NavigationDockUI
,
self
).
__init__
(
parent
)
self
.
setupUi
(
self
)
self
.
mCrs
=
None
#default: disable QgsSync box
self
.
gbSyncQgs
.
setEnabled
(
False
)
self
.
btnCrs
.
crsChanged
.
connect
(
self
.
sigCrsChanged
.
emit
)
self
.
btnCrs
.
crsChanged
.
connect
(
self
.
onCrsUpdated
)
self
.
cbSyncQgsMapExtent
.
clicked
.
connect
(
self
.
qgsSyncStateChanged
)
self
.
cbSyncQgsMapCenter
.
clicked
.
connect
(
self
.
qgsSyncStateChanged
)
...
...
@@ -146,14 +147,16 @@ class NavigationDockUI(TsvDockWidgetBase, load('navigationdock.ui')):
sigCrsChanged
=
pyqtSignal
(
QgsCoordinateReferenceSystem
)
def
setCrs
(
self
,
crs
):
assert
isinstance
(
crs
,
QgsCoordinateReferenceSystem
)
old
=
self
.
mCrs
self
.
mCrs
=
crs
self
.
textBoxCRSInfo
.
setPlainText
(
crs
.
toWkt
())
if
self
.
mCrs
!=
old
:
self
.
sigCrsChanged
.
emit
(
crs
)
self
.
btnCrs
.
setCrs
(
crs
)
self
.
btnCrs
.
setLayerCrs
(
crs
)
self
.
onCrsUpdated
(
crs
)
def
crs
(
self
):
return
self
.
mCrs
return
self
.
btnCrs
.
crs
()
def
onCrsUpdated
(
self
,
crs
):
self
.
gbCrs
.
setTitle
(
crs
.
authid
())
self
.
textBoxCRSInfo
.
setPlainText
(
crs
.
toWkt
())
sigSpatialExtentChanged
=
pyqtSignal
(
SpatialExtent
)
...
...
This diff is collapsed.
Click to expand it.
timeseriesviewer/ui/navigationdock.ui
+
108
−
84
View file @
195a57b0
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
2
37
</width>
<height>
217
</height>
<width>
3
9
7
</width>
<height>
309
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -291,103 +291,113 @@
</layout>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QToolButton"
name=
"btnCRS"
>
<property
name=
"text"
>
<string>
...
</string>
</property>
<property
name=
"icon"
>
<iconset
resource=
"resources.qrc"
>
<normaloff>
:/timeseriesviewer/icons/CRS.png
</normaloff>
:/timeseriesviewer/icons/CRS.png
</iconset>
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QPlainTextEdit"
name=
"textBoxCRSInfo"
>
<property
name=
"enabled"
>
<bool>
true
</bool>
</property>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
50
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
50
</height>
</size>
</property>
<property
name=
"frameShape"
>
<enum>
QFrame::StyledPanel
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Plain
</enum>
</property>
<property
name=
"readOnly"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item
row=
"4"
column=
"0"
colspan=
"2"
>
<widget
class=
"QGroupBox"
name=
"gbSyncQgs"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
50
</height>
</size>
</property>
<widget
class=
"QgsCollapsibleGroupBox"
name=
"gbCrs"
>
<property
name=
"title"
>
<string>
Sync with QGIS on...
</string>
<string>
<
Coordinate Reference System
>
</string>
</property>
<property
name=
"
flat
"
>
<bool>
fals
e
</bool>
<property
name=
"
collapsed
"
>
<bool>
tru
e
</bool>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_3"
>
<item>
<widget
class=
"QCheckBox"
name=
"cbSyncQgsMapCenter"
>
<property
name=
"text"
>
<string>
center
</string>
</property>
</widget>
</item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<property
name=
"spacing"
>
<number>
0
</number>
</property>
<property
name=
"margin"
>
<number>
6
</number>
</property>
<item>
<widget
class=
"Q
CheckBox"
name=
"cbSyncQgsMapExtent
"
>
<property
name=
"
text
"
>
<
string>
exent
</string
>
<widget
class=
"Q
PlainTextEdit"
name=
"textBoxCRSInfo
"
>
<property
name=
"
enabled
"
>
<
bool>
true
</bool
>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"cbSyncQgsCRS"
>
<property
name=
"text"
>
<string>
CRS
</string>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
100
</height>
</size>
</property>
<property
name=
"
sizeHint"
stdset=
"0
"
>
<property
name=
"
maximumSize
"
>
<size>
<width>
40
</width>
<height>
20
</height>
<width>
16777215
</width>
<height>
16777215
</height>
</size>
</property>
</spacer>
<property
name=
"frameShape"
>
<enum>
QFrame::StyledPanel
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Plain
</enum>
</property>
<property
name=
"readOnly"
>
<bool>
true
</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QgsProjectionSelectionWidget"
name=
"btnCrs"
/>
</item>
</layout>
</widget>
</item>
<item>
<widget
class=
"QGroupBox"
name=
"gbSyncQgs"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
50
</height>
</size>
</property>
<property
name=
"title"
>
<string>
Sync with QGIS on...
</string>
</property>
<property
name=
"flat"
>
<bool>
false
</bool>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_3"
>
<item>
<widget
class=
"QCheckBox"
name=
"cbSyncQgsMapCenter"
>
<property
name=
"text"
>
<string>
center
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"cbSyncQgsMapExtent"
>
<property
name=
"text"
>
<string>
exent
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"cbSyncQgsCRS"
>
<property
name=
"text"
>
<string>
CRS
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
...
...
@@ -455,6 +465,20 @@
</property>
</action>
</widget>
<customwidgets>
<customwidget>
<class>
QgsCollapsibleGroupBox
</class>
<extends>
QGroupBox
</extends>
<header>
qgscollapsiblegroupbox.h
</header>
<container>
1
</container>
</customwidget>
<customwidget>
<class>
QgsProjectionSelectionWidget
</class>
<extends>
QWidget
</extends>
<header>
qgsprojectionselectionwidget.h
</header>
<container>
1
</container>
</customwidget>
</customwidgets>
<resources>
<include
location=
"resources.qrc"
/>
</resources>
...
...
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