Skip to content

Commit

Permalink
First import
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Oct 28, 2010
0 parents commit 1ede7a6
Show file tree
Hide file tree
Showing 67 changed files with 5,043 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.pyc

8 changes: 8 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
NAME=$1
THEME=django
#THEME=default
python rst-directive.py \
--stylesheet=pygments.css \
--theme-url=ui/${THEME} \
--traceback \
${NAME}.rst > ${NAME}.html
Binary file added data/regioni.dbf
Binary file not shown.
1 change: 1 addition & 0 deletions data/regioni.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]
Binary file added data/regioni.shp
Binary file not shown.
Binary file added data/regioni.shx
Binary file not shown.
Binary file added data/sharp3.tiff.tif
Binary file not shown.
35 changes: 35 additions & 0 deletions examples/qgis_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
from qgis.gui import *
from qgis.core import *
QgsApplication.setPrefixPath("/usr", True)
QgsApplication.initQgis()

import os

wd = os.getcwd()

vlayer = QgsVectorLayer(wd + "/../data/regioni.shp", "regioni", "ogr")
vlayer.isValid()

QgsMapLayerRegistry.instance().addMapLayer(vlayer)
from PyQt4.QtGui import *
from PyQt4.QtCore import *
img = QImage(QSize(800,600), QImage.Format_ARGB32_Premultiplied)
p = QPainter()
p.begin(img)

p.setRenderHint(QPainter.Antialiasing)
render = QgsMapRenderer()
lst = [ vlayer.getLayerID() ]
render.setLayerSet(lst)
rect = QgsRectangle(render.fullExtent())
rect.scale(1.1)
render.setExtent(rect)
render.setOutputSize(img.size(), img.logicalDpiX())
img.size()
p.isActive()

render.render(p)
p.end()

img.save(wd + "/../images/render.png","png")
21 changes: 21 additions & 0 deletions examples/qgis_api_win.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
from PyQt4 import QtGui, QtCore
import sys, os
from qgis import core, gui

core.QgsApplication.setPrefixPath('/usr', True)
core.QgsApplication.initQgis()

l = core.QgsVectorLayer(sys.argv[1], os.path.basename(sys.argv[1]), 'ogr')
app = QtGui.QApplication(sys.argv)
canvas = gui.QgsMapCanvas()
canvas.resize(800,600)
core.QgsMapLayerRegistry.instance().addMapLayer(l)
canvas.setExtent(l.extent())
cl = gui.QgsMapCanvasLayer(l)
layers = [cl]
canvas.setLayerSet(layers)
canvas.show()
retval = app.exec_()
core.QgsApplication.exitQgis()
sys.exit(retval)
Binary file added images/bblocks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions images/bblocks.png.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<map id="G" name="G">
</map>
Binary file added images/duomo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/g.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions images/g.png.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<map id="g" name="g">
</map>
Binary file added images/ogc-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/qgis_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/qgis_qui_programming.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions images/qgis_qui_programming.png.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<map id="g" name="g">
</map>
Binary file added images/render.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/wms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions images/wms.png.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<map id="g" name="g">
</map>
70 changes: 70 additions & 0 deletions pygments.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
.highlight .hll { background-color: #333333 }
.highlight { background: #111111; color: #ffffff }
.highlight .c { color: #008800; font-style: italic; background-color: #0f140f } /* Comment */
.highlight .err { color: #ffffff } /* Error */
.highlight .g { color: #ffffff } /* Generic */
.highlight .k { color: #fb660a; font-weight: bold } /* Keyword */
.highlight .l { color: #ffffff } /* Literal */
.highlight .n { color: #ffffff } /* Name */
.highlight .o { color: #ffffff } /* Operator */
.highlight .x { color: #ffffff } /* Other */
.highlight .p { color: #ffffff } /* Punctuation */
.highlight .cm { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Multiline */
.highlight .cp { color: #ff0007; font-weight: bold; font-style: italic; background-color: #0f140f } /* Comment.Preproc */
.highlight .c1 { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Single */
.highlight .cs { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Special */
.highlight .gd { color: #ffffff } /* Generic.Deleted */
.highlight .ge { color: #ffffff } /* Generic.Emph */
.highlight .gr { color: #ffffff } /* Generic.Error */
.highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #ffffff } /* Generic.Inserted */
.highlight .go { color: #444444; background-color: #222222 } /* Generic.Output */
.highlight .gp { color: #ffffff } /* Generic.Prompt */
.highlight .gs { color: #ffffff } /* Generic.Strong */
.highlight .gu { color: #ffffff; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #ffffff } /* Generic.Traceback */
.highlight .kc { color: #fb660a; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #fb660a; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #fb660a; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #fb660a } /* Keyword.Pseudo */
.highlight .kr { color: #fb660a; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #cdcaa9; font-weight: bold } /* Keyword.Type */
.highlight .ld { color: #ffffff } /* Literal.Date */
.highlight .m { color: #0086f7; font-weight: bold } /* Literal.Number */
.highlight .s { color: #0086d2 } /* Literal.String */
.highlight .na { color: #ff0086; font-weight: bold } /* Name.Attribute */
.highlight .nb { color: #ffffff } /* Name.Builtin */
.highlight .nc { color: #ffffff } /* Name.Class */
.highlight .no { color: #0086d2 } /* Name.Constant */
.highlight .nd { color: #ffffff } /* Name.Decorator */
.highlight .ni { color: #ffffff } /* Name.Entity */
.highlight .ne { color: #ffffff } /* Name.Exception */
.highlight .nf { color: #ff0086; font-weight: bold } /* Name.Function */
.highlight .nl { color: #ffffff } /* Name.Label */
.highlight .nn { color: #ffffff } /* Name.Namespace */
.highlight .nx { color: #ffffff } /* Name.Other */
.highlight .py { color: #ffffff } /* Name.Property */
.highlight .nt { color: #fb660a; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #fb660a } /* Name.Variable */
.highlight .ow { color: #ffffff } /* Operator.Word */
.highlight .w { color: #888888 } /* Text.Whitespace */
.highlight .mf { color: #0086f7; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0086f7; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0086f7; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0086f7; font-weight: bold } /* Literal.Number.Oct */
.highlight .sb { color: #0086d2 } /* Literal.String.Backtick */
.highlight .sc { color: #0086d2 } /* Literal.String.Char */
.highlight .sd { color: #0086d2 } /* Literal.String.Doc */
.highlight .s2 { color: #0086d2 } /* Literal.String.Double */
.highlight .se { color: #0086d2 } /* Literal.String.Escape */
.highlight .sh { color: #0086d2 } /* Literal.String.Heredoc */
.highlight .si { color: #0086d2 } /* Literal.String.Interpol */
.highlight .sx { color: #0086d2 } /* Literal.String.Other */
.highlight .sr { color: #0086d2 } /* Literal.String.Regex */
.highlight .s1 { color: #0086d2 } /* Literal.String.Single */
.highlight .ss { color: #0086d2 } /* Literal.String.Symbol */
.highlight .bp { color: #ffffff } /* Name.Builtin.Pseudo */
.highlight .vc { color: #fb660a } /* Name.Variable.Class */
.highlight .vg { color: #fb660a } /* Name.Variable.Global */
.highlight .vi { color: #fb660a } /* Name.Variable.Instance */
.highlight .il { color: #0086f7; font-weight: bold } /* Literal.Number.Integer.Long */
Loading

0 comments on commit 1ede7a6

Please sign in to comment.