-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlandsatprocessingplugindialog.py
68 lines (54 loc) · 2.7 KB
/
landsatprocessingplugindialog.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# -*- coding: utf-8 -*-
"""
/***************************************************************************
landsatProcessingPluginDialog
A QGIS plugin
Provides several processing steps on Landsat data. Landsat5 to Landsat7 conversion, DNs to radiance and reflectance conversion, TIR to temperature conversion, Indice calculation(NDVI, SAVI, NDWI, NDSI, tasseled cap indices)
-------------------
begin : 2013-02-14
copyright : (C) 2013 by Matthias Ludwig - Datalyze Solutions
email : [email protected]
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
"""
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from ui_landsatprocessingplugin import Ui_landsatProcessingPlugin
class Communicate(QObject):
sendFilename = pyqtSignal(QString)
doNothingSignal = pyqtSignal()
class landsatProcessingPluginDialog(QDialog):
def __init__(self):
QDialog.__init__(self)
# Set up the user interface from Designer.
self.ui = Ui_landsatProcessingPlugin()
self.ui.setupUi(self)
self.ui.buttonChooseMetadata.clicked.connect(self.test)
self.filestuff = Communicate()
def test(self):
print "hallo welt"
filename = self.getFile()
self.filestuff.sendFilename.emit(filename)
self.filestuff.doNothingSignal.emit()
#self.emit(SIGNAL("xyCoordinates(const QString &)"), QString(filename))
def getFile(self, filterList = 'Alle Dateien(*.*)'):
return QFileDialog.getOpenFileName(self, 'Datei wählen', '.', filterList)
#try:
#return QFileDialog.getOpenFileName(self.iface.mainWindow(), 'Datei wählen', '.', filterList)
#except:
#pass
#item = QtGui.QTreeWidgetItem(['name', 'tags'])
#item2 = QtGui.QTreeWidgetItem(['name2', 'tags2'])
#item.setCheckState(0,QtCore.Qt.Checked)
##self.ui.treeWidgetMetadata.addTopLevelItem(item)
#self.ui.treeWidgetMetadata.insertTopLevelItem(0, item)
#self.ui.treeWidgetMetadata.insertTopLevelItem(0, item2)
#def updateTreeWidget():
#update(metadata)