siam Package

siam Package

/***********************************************************************
Siam
A QGIS plugin
For now only hypsometry around inlets

begin : 2013-11-05 copyright : (C) 2013 by Mikhail Titov email : mlt@gmx.us

***********************************************************************/

/***********************************************************************
  • 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. *

***********************************************************************/ This script initializes the plugin, making it known to QGIS.

siam.__init__.classFactory(iface)[source]

MultiProcessingLog Module

Python 2 logger for multiprocessing taken from http://stackoverflow.com/questions/641420/how-should-i-log-while-using-multiprocessing-in-python

class siam.MultiProcessingLog.QueueHandler(queue)[source]

Bases: logging.Handler

close()[source]
emit(record)[source]
send(s)[source]
class siam.MultiProcessingLog.QueueListener(queue)[source]

Bases: threading.Thread

run()[source]

hypsometry Module

Quick & Dirty way to retrieve a hypsometry given a set of starting points and DEM.

class siam.hypsometry.Hypsometry(args)[source]

Hypsometry creator

run()[source]
class siam.hypsometry.Starter(args)[source]

Performs initial work before spawning workers.

kill()[source]

To be used from GUI thread to abort operations

mkout()[source]

Set up output stuff

run()[source]
siam.hypsometry.run_part(args)[source]

Entry point for sub-processes.

Must be plain function on Windows. It can’t be un-/bound function:(

hypsometrydialog Module

hypsometrythread Module

persistent Module

Persistent entries dialog synopsis:

from persistent import PersistentDialog
from PyQt4.uic import loadUi
from PyQt4.QtCore import QSettings
from os.path import dirname, join

class MyDialog(PersistentDialog):
    def __init__(self):
        PersistentDialog.__init__(self)
        loadUi(join(dirname(__file__), 'ui_mydialog.ui'), self)
        self._load_settings()

    def _load_settings(self):
        ... # extra initialization of, e.g., combo box items goes here
        settings = QSettings()
        settings.beginGroup('myplugin')
        settings.beginGroup('mydialog')
        self.loadall(settings) # magic happens here
        settings.endGroup()
        settings.endGroup()

    def _save_settings(self):
        settings = QSettings()
        settings.beginGroup('myplugin')
        settings.beginGroup('mydialog')
        self.saveall(settings) # here is where magic happens
        settings.endGroup()
        settings.endGroup()

    def accept(self):
        super(MyDialog, self).accept()
        self._save_settings()

Todo

Emit signals upon changing entries

class siam.persistent.PersistentDialog[source]

Bases: PyQt4.QtGui.QDialog

QDialog with basic user entries persistence using QSettings

loadall(settings)

Load dialog entries once descended into necessary settings group

saveall(settings)

Save dialog entries once descended into necessary settings group

plugin_upload Module

siam.plugin_upload.hidepassword(url, start=6)[source]

Returns the http url with password part replaced with ‘*’.

siam.plugin_upload.main(options, args)[source]

resources_rc Module

siam.resources_rc.qCleanupResources()[source]
siam.resources_rc.qInitResources()[source]

siam Module

tst Module