Skip to content
Snippets Groups Projects
Commit 13a01b39 authored by benjamin.jakimow@geo.hu-berlin.de's avatar benjamin.jakimow@geo.hu-berlin.de
Browse files

refactoring

parent 068a9727
No related branches found
No related tags found
No related merge requests found
...@@ -58,8 +58,6 @@ SETTINGS = QSettings(QSettings.UserScope, 'HU Geomatics', 'TimeSeriesViewer') ...@@ -58,8 +58,6 @@ SETTINGS = QSettings(QSettings.UserScope, 'HU Geomatics', 'TimeSeriesViewer')
print('BASE INIT SITE-packages') print('BASE INIT SITE-packages')
site.addsitedir(DIR_SITE_PACKAGES) site.addsitedir(DIR_SITE_PACKAGES)
QGIS_TSV_BRIDGE = None
OPENGL_AVAILABLE = False OPENGL_AVAILABLE = False
try: try:
......
...@@ -138,7 +138,7 @@ class PlotStyleWidget(QWidget, load('plotstylewidget.ui')): ...@@ -138,7 +138,7 @@ class PlotStyleWidget(QWidget, load('plotstylewidget.ui')):
def refreshPreview(self, *args): def refreshPreview(self, *args):
if not self.mBlockUpdates: if not self.mBlockUpdates:
print('DEBUG: REFRESH NOW') #print('DEBUG: REFRESH NOW')
style = self.plotStyle() style = self.plotStyle()
#todo: set style to style preview #todo: set style to style preview
......
...@@ -297,7 +297,7 @@ def sandboxMultitemp2017(): ...@@ -297,7 +297,7 @@ def sandboxMultitemp2017():
if True: if True:
searchDir = r'O:\SenseCarbonProcessing\BJ_Multitemp2017\01_Data\Landsat' searchDir = r'O:\SenseCarbonProcessing\BJ_Multitemp2017\01_Data\Landsat'
imgs = file_search(searchDir, 'LC8*.vrt', recursive=True)[0:10] imgs = file_search(searchDir, 'LC8*.vrt', recursive=True)#[0:5]
S.addTimeSeriesImages(imgs) S.addTimeSeriesImages(imgs)
if True: if True:
...@@ -320,8 +320,8 @@ if __name__ == '__main__': ...@@ -320,8 +320,8 @@ if __name__ == '__main__':
if False: gdal_qgis_benchmark() if False: gdal_qgis_benchmark()
if False: sandboxQgisBridge() if False: sandboxQgisBridge()
if False: sandboxGui() if False: sandboxGui()
if False: sandboxTestdata() if True: sandboxTestdata()
if True: sandboxMultitemp2017() if False: sandboxMultitemp2017()
#close QGIS #close QGIS
qgsApp.exec_() qgsApp.exec_()
......
...@@ -26,14 +26,13 @@ class TimeSeriesViewerPlugin: ...@@ -26,14 +26,13 @@ class TimeSeriesViewerPlugin:
CONSOLE._console = CONSOLE.PythonConsole(iface.mainWindow()) CONSOLE._console = CONSOLE.PythonConsole(iface.mainWindow())
QTimer.singleShot(0, CONSOLE._console.activate) QTimer.singleShot(0, CONSOLE._console.activate)
def initGui(self): def initGui(self):
self.toolbarActions = [] self.toolbarActions = []
syspaths = [os.path.normpath(p) for p in sys.path] syspaths = [os.path.normpath(p) for p in sys.path]
if DIR_REPO not in syspaths: sys.path.append(DIR_REPO) if DIR_REPO not in syspaths: sys.path.append(DIR_REPO)
import timeseriesviewer.ui.resources_py2 import timeseriesviewer.ui.resources_py2
timeseriesviewer.ui.resources_py2.qInitResources() #timeseriesviewer.ui.resources_py2.qInitResources()
# add platform independent site-packages # add platform independent site-packages
if DIR_SITE_PACKAGES: if DIR_SITE_PACKAGES:
site.addsitedir(DIR_SITE_PACKAGES) site.addsitedir(DIR_SITE_PACKAGES)
...@@ -54,9 +53,9 @@ class TimeSeriesViewerPlugin: ...@@ -54,9 +53,9 @@ class TimeSeriesViewerPlugin:
from timeseriesviewer.main import TimeSeriesViewer from timeseriesviewer.main import TimeSeriesViewer
# open QGIS python console. this is required to allow for print() statements in the source code. # open QGIS python console. this is required to allow for print() statements in the source code.
if self.tsv is None: #if self.tsv is None:
self.tsv = TimeSeriesViewer(self.iface) self.tsv = TimeSeriesViewer(self.iface)
self.tsv.run() self.tsv.run()
self.tsv.ui.show() self.tsv.ui.show()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment