Skip to content

Commit

Permalink
[sextante] some light code cleaning/polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed May 28, 2013
1 parent 17bdba9 commit 1dad149
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 18 deletions.
3 changes: 2 additions & 1 deletion python/plugins/sextante/algs/QGISAlgorithmProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ def __init__(self):
AutoincrementalField(), Explode(), FieldsPyculator(), EquivalentNumField(),
PointsLayerFromTable(), StatisticsByCategories(), Polygonize(),
# ------ raster ------
CreateConstantRaster(), RasterLayerStatistics()
#CreateConstantRaster(),
RasterLayerStatistics()
# ------ graphics ------
#VectorLayerHistogram(), VectorLayerScatterplot(), RasterLayerHistogram(),
#MeanAndStdDevPlot(), BarPlot(), PolarPlot()
Expand Down
3 changes: 2 additions & 1 deletion python/plugins/sextante/core/QGisLayers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* *
***************************************************************************
"""
from sextante.gdal.GdalUtils import GdalUtils

__author__ = 'Victor Olaya'
__date__ = 'August 2012'
Expand All @@ -29,6 +28,8 @@
from PyQt4.QtGui import *
from os import path
from sextante.core.SextanteConfig import SextanteConfig
from sextante.gdal.GdalUtils import GdalUtils


class QGisLayers:
'''This class contains method to communicate SEXTANTE with the QGIS interface,
Expand Down
10 changes: 1 addition & 9 deletions python/plugins/sextante/core/SextanteLog.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ def getLogEntries():
algorithms=[]
warnings=[]
info=[]
#lines = codecs.open(SextanteLog.logFilename(), encoding='utf-8')
#=======================================================================
# lines = open(SextanteLog.logFilename())
# line = lines.readline()
# while line != "":
#=======================================================================
lines = tail(SextanteLog.logFilename())
for line in lines:
line = line.strip("\n").strip()
Expand All @@ -108,8 +102,7 @@ def getLogEntries():
warnings.append(LogEntry(tokens[1], text))
elif line.startswith(SextanteLog.LOG_INFO):
info.append(LogEntry(tokens[1], text))
#line = lines.readline()
#lines.close()

entries[SextanteLog.LOG_ERROR] = errors
entries[SextanteLog.LOG_ALGORITHM] = algorithms
entries[SextanteLog.LOG_INFO] = info
Expand All @@ -136,7 +129,6 @@ def __init__(self, date, text):
self.text = text

import re
import time

#===============================================================================

Expand Down
1 change: 1 addition & 0 deletions python/plugins/sextante/gui/BatchInputSelectionPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
__copyright__ = '(C) 2012, Victor Olaya'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'

import os
from PyQt4 import QtGui, QtCore
from sextante.parameters.ParameterMultipleInput import ParameterMultipleInput
Expand Down
8 changes: 3 additions & 5 deletions python/plugins/sextante/gui/ConfigDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,18 @@
* *
***************************************************************************
"""
import os
from PyQt4 import QtGui

__author__ = 'Victor Olaya'
__date__ = 'August 2012'
__copyright__ = '(C) 2012, Victor Olaya'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'

import os
from PyQt4 import QtGui
from PyQt4.QtCore import *
from PyQt4.QtGui import *

from sextante.core.SextanteConfig import SextanteConfig

from sextante.ui.ui_DlgConfig import Ui_DlgConfig

class ConfigDialog(QDialog, Ui_DlgConfig):
Expand All @@ -53,7 +51,7 @@ def __init__(self, toolbox):

def edit(self, item, column):
if column > 0:
self.tree.editItem(item, column)
self.tree.editItem(item, column)

def fillTree(self):
self.items = {}
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/gui/CouldNotLoadResultsDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* *
***************************************************************************
"""
import webbrowser

__author__ = 'Victor Olaya'
__date__ = 'August 2012'
Expand All @@ -27,6 +26,7 @@
from PyQt4 import QtCore, QtGui, QtWebKit
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import webbrowser

class CouldNotLoadResultsDialog(QtGui.QDialog):
def __init__(self, wrongLayers, alg):
Expand Down
1 change: 1 addition & 0 deletions python/plugins/sextante/gui/Help2Html.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import pickle
from sextante.core.SextanteUtils import SextanteUtils
import os

class Help2Html():

ALG_DESC = "ALG_DESC"
Expand Down
1 change: 0 additions & 1 deletion python/plugins/sextante/gui/HelpEditionDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

import os
import pickle

from PyQt4.QtCore import *
from PyQt4.QtGui import *

Expand Down

0 comments on commit 1dad149

Please sign in to comment.