QML-Dateien Konstanten
This commit is contained in:
parent
5476c512af
commit
1549ea3d90
19
po_runner.py
19
po_runner.py
@ -13,6 +13,10 @@ from .po_modules.po_stations import PoStationReader
|
|||||||
from .po_modules.po_stations_qgs import PoStationReaderQgs
|
from .po_modules.po_stations_qgs import PoStationReaderQgs
|
||||||
from .po_modules.po_waterlevels_reader_qgs import PoWaterlevelReaderQgs
|
from .po_modules.po_waterlevels_reader_qgs import PoWaterlevelReaderQgs
|
||||||
|
|
||||||
|
STATIONS_QML = "styles/stations.qml"
|
||||||
|
|
||||||
|
WATERLEVELS_QML = "styles/waterlevels.qml"
|
||||||
|
|
||||||
|
|
||||||
class PoRunner(object):
|
class PoRunner(object):
|
||||||
|
|
||||||
@ -134,10 +138,8 @@ class PoRunner(object):
|
|||||||
if self.stations is None:
|
if self.stations is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
file = "styles/stations.qml"
|
|
||||||
|
|
||||||
if self.ui.rbStationsStyleSimple == button:
|
if self.ui.rbStationsStyleSimple == button:
|
||||||
self._layer_apply_style_from_file(self.stations, file)
|
self._layer_apply_style_from_file(self.stations, STATIONS_QML)
|
||||||
return
|
return
|
||||||
elif self.ui.rbStationsStyleAgency == button:
|
elif self.ui.rbStationsStyleAgency == button:
|
||||||
field = "agency"
|
field = "agency"
|
||||||
@ -145,11 +147,11 @@ class PoRunner(object):
|
|||||||
field = "water"
|
field = "water"
|
||||||
else:
|
else:
|
||||||
print("_bgStationsStyle_clicked: Style nicht implementiert: %s" % (button.objectName(),))
|
print("_bgStationsStyle_clicked: Style nicht implementiert: %s" % (button.objectName(),))
|
||||||
self._layer_apply_style_from_file(self.stations, file)
|
self._layer_apply_style_from_file(self.stations, STATIONS_QML)
|
||||||
return
|
return
|
||||||
|
|
||||||
self._stations_update_labels()
|
self._stations_update_labels()
|
||||||
self._layer_apply_style_per_category(self.stations, field, file)
|
self._layer_apply_style_per_category(self.stations, field, STATIONS_QML)
|
||||||
|
|
||||||
def _cbStationsVisible_toggled(self):
|
def _cbStationsVisible_toggled(self):
|
||||||
visible = self.ui.cbStationsVisible.isChecked()
|
visible = self.ui.cbStationsVisible.isChecked()
|
||||||
@ -240,9 +242,8 @@ class PoRunner(object):
|
|||||||
if self.waterlevels is None:
|
if self.waterlevels is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
file = "styles/waterlevels.qml"
|
|
||||||
if self.ui.rbWaterlevelsStyleSimple == button:
|
if self.ui.rbWaterlevelsStyleSimple == button:
|
||||||
self._layer_apply_style_from_file(self.waterlevels, file)
|
self._layer_apply_style_from_file(self.waterlevels, WATERLEVELS_QML)
|
||||||
return
|
return
|
||||||
elif self.ui.rbWaterlevelsStyleAgency == button:
|
elif self.ui.rbWaterlevelsStyleAgency == button:
|
||||||
field = "agency"
|
field = "agency"
|
||||||
@ -254,11 +255,11 @@ class PoRunner(object):
|
|||||||
field = "absolute"
|
field = "absolute"
|
||||||
else:
|
else:
|
||||||
print("_bgWaterlevelsStyle_clicked: Style nicht implementiert: %s" % (button.objectName(),))
|
print("_bgWaterlevelsStyle_clicked: Style nicht implementiert: %s" % (button.objectName(),))
|
||||||
self._layer_apply_style_from_file(self.waterlevels, file)
|
self._layer_apply_style_from_file(self.waterlevels, WATERLEVELS_QML)
|
||||||
return
|
return
|
||||||
|
|
||||||
self._waterlevels_update_labels()
|
self._waterlevels_update_labels()
|
||||||
self._layer_apply_style_per_category(self.waterlevels, field, file)
|
self._layer_apply_style_per_category(self.waterlevels, field, WATERLEVELS_QML)
|
||||||
|
|
||||||
def _cbWaterlevelsVisible_toggled(self):
|
def _cbWaterlevelsVisible_toggled(self):
|
||||||
visible = self.ui.cbWaterlevelsVisible.isChecked()
|
visible = self.ui.cbWaterlevelsVisible.isChecked()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user