[Qgis-developer] plugin question

humarco marco.hugentobler at karto.baug.ethz.ch
Fri Sep 8 04:27:46 EDT 2006


Hi Radim,

Am Montag, 4. September 2006 16:33 schrieb Radim Blazek:
> On 9/3/06, humarco <marco.hugentobler at karto.baug.ethz.ch> wrote:
> > Dear qgis developers,
> >
> > As you probably know, I'm having a QGIS plugin writer workshop on the
> > FOSS4GEO conference next week (hoping that a lot of people will write
> > cool plugins for qgis after the conference :-) ).
> >
> > Now that I prepare this workshop I would like to know if there is a
> > possibility to store project specific information of plugins (in the
> > project file) and are there already existing plugins using such a
> > mechanism?
>
> Yes, GRASS plugin stores current GISDBASE, LOCATION
> and MAPSET and it is reopened with project.

I saved a project with a GRASS layer, but I cannot find these elements in the 
project file. Do I need to use the GRASS plugin in a different way that these 
elements are saved? The project file is attached below.


> BTW, I am writing a new plugin and I have 2 problems:
> 1) How to change it to standalone plugin with its own configure and
>     make system.

I don't see the problem here. You need to check for the qgis libraries 
(libqgis_gui, libqgis_core, ....), the qgis headers, the libraries qgis 
depends on and for the location of the plugins. Otherwise a normal autotool 
system.

> 2) How to make a distribution package for Windows and how to
>     automaticaly update the plugin when it is installed.

Unfortunately I don't know much about windows (I don't even use it). Maybe one 
of the windows gurus may answer?

cheers,
Marco




<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis projectname="" version="0.8.0" >
    <title></title>
    <units>meters</units>
    <extent>
        <xmin>665050.939394</xmin>
        <ymin>230710.000000</ymin>
        <xmax>713150.939394</xmax>
        <ymax>273988.787879</ymax>
    </extent>
    <projectlayers layercount="1" >
        <maplayer minScale="0" maxScale="1e+08" scaleBasedVisibilityFlag="0" 
visible="1" geometry="Line" type="vector" showInOverviewFlag="0" >
            <id>bahnzh20060908080849082</id>
            
<datasource>/home/humarco/geodaten/grass_zuerich/zuerich/humarco/bahnzh/1_line</datasource>
            <layername>bahnzh</layername>
            <coordinatetransform>
                <sourcesrs>
                    <spatialrefsys>
                        <proj4>+proj=longlat +ellps=WGS84 +datum=WGS84 
+no_defs</proj4>
                        <srsid>2585</srsid>
                        <srid>4326</srid>
                        <epsg>4326</epsg>
                        <description>WGS 84</description>
                        <projectionacronym>longlat</projectionacronym>
                        <ellipsoidacronym>WGS84</ellipsoidacronym>
                        <geographicflag>true</geographicflag>
                    </spatialrefsys>
                </sourcesrs>
                <destinationsrs>
                    <spatialrefsys>
                        <proj4>+proj=longlat +ellps=WGS84 +datum=WGS84 
+no_defs</proj4>
                        <srsid>2585</srsid>
                        <srid>4326</srid>
                        <epsg>4326</epsg>
                        <description>WGS 84</description>
                        <projectionacronym>longlat</projectionacronym>
                        <ellipsoidacronym>WGS84</ellipsoidacronym>
                        <geographicflag>true</geographicflag>
                    </spatialrefsys>
                </destinationsrs>
            </coordinatetransform>
            <transparencyLevelInt>255</transparencyLevelInt>
            <provider>grass</provider>
            <encoding>UTF-8</encoding>
            <displayfield>cat</displayfield>
            <label>0</label>
            <attributeactions/>
            <singlesymbol>
                <symbol>
                    <lowervalue></lowervalue>
                    <uppervalue></uppervalue>
                    <label></label>
                    <pointsymbol>hard:circle</pointsymbol>
                    <pointsize>6</pointsize>
                    <outlinecolor red="161" blue="189" green="236" />
                    <outlinestyle>SolidLine</outlinestyle>
                    <outlinewidth>1</outlinewidth>
                    <fillcolor red="0" blue="0" green="0" />
                    <fillpattern>NoBrush</fillpattern>
                </symbol>
            </singlesymbol>
            <labelattributes>
                <label field="" text="Label" />
                <family field="" name="Sans Serif" />
                <size field="" units="pt" value="12" />
                <bold field="" on="0" />
                <italic field="" on="0" />
                <underline field="" on="0" />
                <color field="" red="0" blue="0" green="0" />
                <x field="" />
                <y field="" />
                <offset x="0" y="0" yfield="" xfield="" units="pt" />
                <angle field="" value="0" />
                <alignment field="" value="center" />
                <buffercolor field="" red="255" blue="255" green="255" />
                <buffersize field="" units="pt" value="1" />
                <bufferenabled field="" on="" />
            </labelattributes>
        </maplayer>
    </projectlayers>
    <legend>
        <legendlayer open="true" checked="Qt::Checked" name="bahnzh" >
            <filegroup open="false" hidden="true" >
                <legendlayerfile layerid="bahnzh20060908080849082" />
            </filegroup>
        </legendlayer>
    </legend>
    <properties>
        <SpatialRefSys>
            <ProjectSRSID type="int" >2585</ProjectSRSID>
        </SpatialRefSys>
        <Gui>
            <SelectionColorBluePart type="int" >0</SelectionColorBluePart>
            <SelectionColorGreenPart type="int" >255</SelectionColorGreenPart>
            <SelectionColorRedPart type="int" >255</SelectionColorRedPart>
            <CanvasColorBluePart type="int" >255</CanvasColorBluePart>
            <CanvasColorGreenPart type="int" >255</CanvasColorGreenPart>
            <CanvasColorRedPart type="int" >255</CanvasColorRedPart>
        </Gui>
        <PositionPrecision>
            <DecimalPlaces type="int" >2</DecimalPlaces>
            <Automatic type="bool" >true</Automatic>
        </PositionPrecision>
    </properties>
</qgis>



More information about the Qgis-developer mailing list