[Qgis-developer] how to change point features to some picture.

Tim Sutton tim at linfiniti.com
Thu Feb 15 21:00:59 EST 2007


Hi


here is a short snipet that may help:

    914   if (mypVectorLayer->isValid())
    915   {
    916     qDebug("Vector Layer is valid");
    917   }
    918   else
    919   {
    920     qDebug("Vector Layer is NOT valid");
    921     return;
    922   }
    923   QgsSymbol *  mypSymbol = new QgsSymbol(mypVectorLayer->vectorType());
    924   mypSymbol->setFillColor(Qt::black);
    925   mypSymbol->setColor(Qt::white); //outline
    926   mypSymbol->setPointSize(5);
    927   mypSymbol->setFillStyle(Qt::SolidPattern);
    928   QgsSingleSymbolRenderer *mypRenderer = new
QgsSingleSymbolRenderer(mypVectorLayer->vectorType());
    929   mypRenderer->addSymbol(mypSymbol);
    930   mypVectorLayer->setRenderer(mypRenderer);

regards

Tim

2007/2/15, Tim Sutton <tim at linfiniti.com>:
> Hi
>
> I suggest looking in the source code of qgis at the vector properties
> dialog (qgsvectorpropertiesdialog.cpp from memory) as it should give
> you some useful hints on how to proceed.
>
> Regards
>
> Tim
>
> 2007/2/15, satya satya <satya341 at gmail.com>:
> > Hello,
> >          I am trying to develop a interface which just displays shpe files.
> > I followed one of the tutorials on qgis.org webiste and i was able to do
> > that.
> >  Now i want to change some of the display features.
> >  let's consider , i displayed shape file with some point data and that point
> > data is related to gas stations in particular place, i want to replace those
> > points with some picture.
> >  could you please tell me which class or functions i have to use to do this.
> >  thanks in advance
> >  satya
> >
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.qgis.org
> > http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
> >
> >
>
>
> --
> --
> Tim Sutton
>
> Visit http://qgis.org for a great Open Source GIS
> Home Page: http://linfiniti.com
> Skype: timlinux
> MSN: tim_bdworld at msn.com
> Yahoo: tim_bdworld at yahoo.com
> Jabber: timlinux
> Irc: timlinux on #qgis at freenode.net
>


-- 
-- 
Tim Sutton

Visit http://qgis.org for a great Open Source GIS
Home Page: http://linfiniti.com
Skype: timlinux
MSN: tim_bdworld at msn.com
Yahoo: tim_bdworld at yahoo.com
Jabber: timlinux
Irc: timlinux on #qgis at freenode.net



More information about the Qgis-developer mailing list