Skip to content
Snippets Groups Projects
viewmodels.py 1.8 KiB
Newer Older
  • Learn to ignore specific revisions
  • # -*- coding: utf-8 -*-
    """
    /***************************************************************************
    
                                  -------------------
            begin                : 2015-08-20
            git sha              : $Format:%H$
            copyright            : (C) 2017 by HU-Berlin
            email                : benjamin.jakimow@geo.hu-berlin.de
     ***************************************************************************/
    
    /***************************************************************************
     *                                                                         *
     *   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.                                   *
     *                                                                         *
     ***************************************************************************/
    """
    # noinspection PyPep8Naming
    
    from PyQt5.QtCore import *
    
    from timeseriesviewer.ui.widgets import *
    from timeseriesviewer.timeseries import TimeSeries, TimeSeriesDatum, SensorInstrument
    
    
    
    
    
    
    
    if __name__ == '__main__':
        import site, sys
        #add site-packages to sys.path as done by enmapboxplugin.py
    
    
    Benjamin Jakimow's avatar
    Benjamin Jakimow committed
        from tests import initQgisApplication
    
    Benjamin Jakimow's avatar
    Benjamin Jakimow committed
        qapp = initQgisApplication()
    
    Benjamin Jakimow's avatar
    Benjamin Jakimow committed
        import example
    
    Benjamin Jakimow's avatar
    Benjamin Jakimow committed
        vl = QgsVectorLayer(example.exampleEvents)
    
    Benjamin Jakimow's avatar
    Benjamin Jakimow committed
        store = QgsMapLayerStore()
        store.addMapLayer(vl)
    
    Benjamin Jakimow's avatar
    Benjamin Jakimow committed
        box = QgsMapLayerComboBox()
        box.model().sourceModel().addLayers([vl])
        box.show()
        qapp.exec_()