Skip to content
Snippets Groups Projects
__main__.py 1.58 KiB
Newer Older
  • Learn to ignore specific revisions
  • Benjamin Jakimow's avatar
    tbd
    Benjamin Jakimow committed
    # -*- coding: utf-8 -*-
    
    """
    ***************************************************************************
    
    Benjamin Jakimow's avatar
    Benjamin Jakimow committed
    
    
    Benjamin Jakimow's avatar
    tbd
    Benjamin Jakimow committed
        ---------------------
    
    Benjamin Jakimow's avatar
    tbd
    Benjamin Jakimow committed
        Copyright            : (C) 2017 by Benjamin Jakimow
    
        Email                : benjamin jakimow at geo dot hu-berlin dot de
    
    Benjamin Jakimow's avatar
    tbd
    Benjamin Jakimow committed
    ***************************************************************************
    *                                                                         *
    *   This program is free software; you can redistribute it and/or modify  *
    *   it under the terms of the GNU General Public License as published by  *
    *   the Free Software Foundation; either version 2 of the License, or     *
    *   (at your option) any later version.                                   *
    *                                                                         *
    ***************************************************************************
    """
    
    Benjamin Jakimow's avatar
    tbd
    Benjamin Jakimow committed
    
    
    Benjamin Jakimow's avatar
    Benjamin Jakimow committed
        # add site-packages to sys.path
    
        pluginDir = pathlib.Path(__file__).parents[1]
        sys.path.append(pluginDir.as_posix())
        print(pluginDir)
    
        from eotimeseriesviewer.tests import initQgisApplication
    
    Benjamin Jakimow's avatar
    Benjamin Jakimow committed
    
        import qgis.utils
        from qgis.gui import QgisInterface
        qgisIface = isinstance(qgis.utils.iface, QgisInterface)
    
        if not qgisIface:
            qgsApp = initQgisApplication()
    
    
        from eotimeseriesviewer import initAll
        initAll()
    
        from eotimeseriesviewer.main import TimeSeriesViewer
    
    Benjamin Jakimow's avatar
    Benjamin Jakimow committed
    
        ts = TimeSeriesViewer()
    
    Benjamin Jakimow's avatar
    Benjamin Jakimow committed
    
        if not qgisIface:
            qgsApp.exec_()
            qgsApp.exitQgis()
    
    
    Benjamin Jakimow's avatar
    tbd
    Benjamin Jakimow committed
    
    
    Benjamin Jakimow's avatar
    tbd
    Benjamin Jakimow committed
    if __name__ == '__main__':