[QGIS Commit] r10588 - in trunk/qgis: images/themes/classic
images/themes/default images/themes/gis images/themes/nkids
python/gui src/app src/gui
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Apr 17 20:02:23 EDT 2009
Author: gsherman
Date: 2009-04-17 20:02:22 -0400 (Fri, 17 Apr 2009)
New Revision: 10588
Added:
trunk/qgis/images/themes/classic/mActionZoomNext.png
trunk/qgis/images/themes/default/mActionZoomNext.png
trunk/qgis/images/themes/gis/mActionZoomNext.png
trunk/qgis/images/themes/nkids/mActionZoomNext.png
Modified:
trunk/qgis/python/gui/qgisinterface.sip
trunk/qgis/python/gui/qgsmapcanvas.sip
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/app/qgisapp.h
trunk/qgis/src/app/qgisappinterface.cpp
trunk/qgis/src/app/qgisappinterface.h
trunk/qgis/src/gui/qgisinterface.h
trunk/qgis/src/gui/qgsmapcanvas.cpp
trunk/qgis/src/gui/qgsmapcanvas.h
Log:
Applied patch from ticket #1522 for Zoom Next functionality.
Includes icons for zoom next tool (same icon for all themes).
Added: trunk/qgis/images/themes/classic/mActionZoomNext.png
===================================================================
--- trunk/qgis/images/themes/classic/mActionZoomNext.png (rev 0)
+++ trunk/qgis/images/themes/classic/mActionZoomNext.png 2009-04-18 00:02:22 UTC (rev 10588)
@@ -0,0 +1,23 @@
+PNG
+
+
+IHDR szzô sRGB ®Îé bKGD ÿ ÿ ÿ ½§ pHYs @ @Oå tIMEÙ bÜ´ ÄIDATXõkPU×Çÿ{÷}q¯ÀAA!FÀ¨ (X
+õ
ÁúJ«Ó¤Ójë#1ɦ&&§¦¶ýÐ3±hÑúJ|ôKQ@@"A¯(rypß÷{öîG'f´smôÿåì9kþ³{5³áã~***J48@8Ëå)
+9²,ôH¸!Õ@yKý¹s-ø"÷ÈRT.ËêzYí)#FÔÙôÉÜ<¥¯§Çèl÷0og;ø¹ËåôDþÕ§Nê}$ É¢¾)jñÔ²¥â²Hrh¦$L5<x3ªu
t]ß´âPõòݹ ÛöíÝ»÷{L4Í¥Xè¾ä´©+EÍÏÃèd
+·|Ão
+ A#GrÛ@PÇMÑhÿ:¼çþ}ãÇåßùÇ¿}X zç ªlS{xê«Þ£3'";ÅAÏuçr 0)
+
cE(TUÁü%/cּŸäñ¼PUUõÿ+'=§X,ïUVë°Y:9G¦¨ÇB)±îë.ãÄqgÏÁ²mªDйhëfTpÀ1Lå÷Ó/pÓ\¾ìÇ3ËÊÊúâÎ@ii©"*ʦ¢seUQa2qÄÀ Iê=ÿÂr00
+Æ|Ä&¦)Rpqéª5¤«ûp¾¾áOU¿?2R:¬°äy0# êa¿[øݦH3T" ²|»/÷°ú`Á ¡$"4
ÇLÌÈýÁDx½Þ¼IqpÊÇZí
+S¦Æô ¡$¦1¿æµkw
+<Fpãß~¬ý" ÇÑÙ¸ÞuB@$ÀØ´,jW5º§2¯,ÌÀ9Xk+ô/¾ ù1zàSÄ.^¶q#¤Y³ !ë'ðÙ?oÁAßD »âP-§Fd&ôïûÌKÀ
+ãÞN}9vÅãÄqÐÌLÙcxfæ(ôõõN»ª¦úýCàF¹iÆÝ<2w×~17 ¸ïÖ ËéÚ¿?+z8Òp£µ0{jW.#DÀEEIyñ+Þxfkë]£ºx ÔÕ«!dgë:ô«íPU=³gÏfqe 4ÝìõòpDçÔÂhJ
+HR¨Ó j³X,òÆAYõÊ]²b%ÔõëAGJfµ%«ózgG;ÒÒsBHSÜM( v1yëµàß`Ç'sNT.«"»iûöËö*Ôµk»VIíw9:à²æ¦äåe ãîÚÚÚþééÿ^ #n7i1*ÄLSï+=·¸£C>Îóõ·«Ï! 8% ¡ø¤úcBALVL9çM54Eú5çfìÓÝ
Ó"e
+³IQ·C;ARµp¦Sb¢móëÐgtØî¯ÕÑíò¾ê?þùQLÆntu5WWW7?ô4\³víòÍ-ç/FùK (! 0õ`r,pß1Yl®YÑ íøàýH°[
+GÀÁ!
+b$Ç9àÙTØô,»êkîüè£êéÅÅgO;wÞÚoJ PU³õiVg'! ¥sfbßÝØ´q¬ª[ý? [¶lAAAZ]z:bÕ¨÷BÒÒÒ"µ´´¼uäØçåÝ^/¦N+EVödggcÔè,
+H}}=ZSc£¯®¶=Þn<S8
ûò,R8ÊÀf³¡ªòo
¾Æöi.FbmÐÍXum(îìôéÓSjëÎï¸ÒúkWW
+
 sÔTdLç%%ÓYSÃ
Þ'N¦l|}#µZ¨«ÃgÇ jÏ|L©qt1S|7Ú +ïA´9sÆ*â2ÎùÄþþþ ÝÝ^ÝaÇôt.IR/!äukÖ5"¡CK_ZvÔÃú
+ÌpCÞС
+fzïñ@类®.1.b[~~~àÛ±ñ99õFË!bëf
+EE
+¸$ÈN(Îí 0tp³¼mbÝ7ÀÿÒqIËmÛôò<ùÑó,K\ Õ9u' û1k¸·Í~â Àsãµ9.¾ûR¼Pâ@¦·¿DHYç@ϾE¦éow·! æhs\Vòî2÷Y;¸$ËpKÄñà<ë{>Ь`å# â1òÜ°uU,È·Ü[k2háÇ`+h«~Å´ üÄ# Â,y^Eøýk¥6²°ÀòÑGÁNÀâDCÇL¾û± ÀÄLy¾S£ïür¦TL¶Üóth¾npÊR<&5^Õ÷Ø8éãÔîþoêÔq¸1Äú±?ü°¿ù±eàtˬäw?j%á(ç¯+Ü~¿óÇ b¹ÛA×;4áMæ»\|y'ö_Q¡µÆðë IEND®B`
\ No newline at end of file
Added: trunk/qgis/images/themes/default/mActionZoomNext.png
===================================================================
--- trunk/qgis/images/themes/default/mActionZoomNext.png (rev 0)
+++ trunk/qgis/images/themes/default/mActionZoomNext.png 2009-04-18 00:02:22 UTC (rev 10588)
@@ -0,0 +1,23 @@
+PNG
+
+
+IHDR szzô sRGB ®Îé bKGD ÿ ÿ ÿ ½§ pHYs @ @Oå tIMEÙ bÜ´ ÄIDATXõkPU×Çÿ{÷}q¯ÀAA!FÀ¨ (X
+õ
ÁúJ«Ó¤Ójë#1ɦ&&§¦¶ýÐ3±hÑúJ|ôKQ@@"A¯(rypß÷{öîG'f´smôÿåì9kþ³{5³áã~***J48@8Ëå)
+9²,ôH¸!Õ@yKý¹s-ø"÷ÈRT.ËêzYí)#FÔÙôÉÜ<¥¯§Çèl÷0og;ø¹ËåôDþÕ§Nê}$ É¢¾)jñÔ²¥â²Hrh¦$L5<x3ªu
t]ß´âPõòݹ ÛöíÝ»÷{L4Í¥Xè¾ä´©+EÍÏÃèd
+·|Ão
+ A#GrÛ@PÇMÑhÿ:¼çþ}ãÇåßùÇ¿}X zç ªlS{xê«Þ£3'";ÅAÏuçr 0)
+
cE(TUÁü%/cּŸäñ¼PUUõÿ+'=§X,ïUVë°Y:9G¦¨ÇB)±îë.ãÄqgÏÁ²mªDйhëfTpÀ1Lå÷Ó/pÓ\¾ìÇ3ËÊÊúâÎ@ii©"*ʦ¢seUQa2qÄÀ Iê=ÿÂr00
+Æ|Ä&¦)Rpqéª5¤«ûp¾¾áOU¿?2R:¬°äy0# êa¿[øݦH3T" ²|»/÷°ú`Á ¡$"4
ÇLÌÈýÁDx½Þ¼IqpÊÇZí
+S¦Æô ¡$¦1¿æµkw
+<Fpãß~¬ý" ÇÑÙ¸ÞuB@$ÀØ´,jW5º§2¯,ÌÀ9Xk+ô/¾ ù1zàSÄ.^¶q#¤Y³ !ë'ðÙ?oÁAßD »âP-§Fd&ôïûÌKÀ
+ãÞN}9vÅãÄqÐÌLÙcxfæ(ôõõN»ª¦úýCàF¹iÆÝ<2w×~17 ¸ïÖ ËéÚ¿?+z8Òp£µ0{jW.#DÀEEIyñ+Þxfkë]£ºx ÔÕ«!dgë:ô«íPU=³gÏfqe 4ÝìõòpDçÔÂhJ
+HR¨Ó j³X,òÆAYõÊ]²b%ÔõëAGJfµ%«ózgG;ÒÒsBHSÜM( v1yëµàß`Ç'sNT.«"»iûöËö*Ôµk»VIíw9:à²æ¦äåe ãîÚÚÚþééÿ^ #n7i1*ÄLSï+=·¸£C>Îóõ·«Ï! 8% ¡ø¤úcBALVL9çM54Eú5çfìÓÝ
Ó"e
+³IQ·C;ARµp¦Sb¢móëÐgtØî¯ÕÑíò¾ê?þùQLÆntu5WWW7?ô4\³víòÍ-ç/FùK (! 0õ`r,pß1Yl®YÑ íøàýH°[
+GÀÁ!
+b$Ç9àÙTØô,»êkîüè£êéÅÅgO;wÞÚoJ PU³õiVg'! ¥sfbßÝØ´q¬ª[ý? [¶lAAAZ]z:bÕ¨÷BÒÒÒ"µ´´¼uäØçåÝ^/¦N+EVödggcÔè,
+H}}=ZSc£¯®¶=Þn<S8
ûò,R8ÊÀf³¡ªòo
¾Æöi.FbmÐÍXum(îìôéÓSjëÎï¸ÒúkWW
+
 sÔTdLç%%ÓYSÃ
Þ'N¦l|}#µZ¨«ÃgÇ jÏ|L©qt1S|7Ú +ïA´9sÆ*â2ÎùÄþþþ ÝÝ^ÝaÇôt.IR/!äukÖ5"¡CK_ZvÔÃú
+ÌpCÞС
+fzïñ@类®.1.b[~~~àÛ±ñ99õFË!bëf
+EE
+¸$ÈN(Îí 0tp³¼mbÝ7ÀÿÒqIËmÛôò<ùÑó,K\ Õ9u' û1k¸·Í~â Àsãµ9.¾ûR¼Pâ@¦·¿DHYç@ϾE¦éow·! æhs\Vòî2÷Y;¸$ËpKÄñà<ë{>Ь`å# â1òÜ°uU,È·Ü[k2háÇ`+h«~Å´ üÄ# Â,y^Eøýk¥6²°ÀòÑGÁNÀâDCÇL¾û± ÀÄLy¾S£ïür¦TL¶Üóth¾npÊR<&5^Õ÷Ø8éãÔîþoêÔq¸1Äú±?ü°¿ù±eàtˬäw?j%á(ç¯+Ü~¿óÇ b¹ÛA×;4áMæ»\|y'ö_Q¡µÆðë IEND®B`
\ No newline at end of file
Added: trunk/qgis/images/themes/gis/mActionZoomNext.png
===================================================================
--- trunk/qgis/images/themes/gis/mActionZoomNext.png (rev 0)
+++ trunk/qgis/images/themes/gis/mActionZoomNext.png 2009-04-18 00:02:22 UTC (rev 10588)
@@ -0,0 +1,23 @@
+PNG
+
+
+IHDR szzô sRGB ®Îé bKGD ÿ ÿ ÿ ½§ pHYs @ @Oå tIMEÙ bÜ´ ÄIDATXõkPU×Çÿ{÷}q¯ÀAA!FÀ¨ (X
+õ
ÁúJ«Ó¤Ójë#1ɦ&&§¦¶ýÐ3±hÑúJ|ôKQ@@"A¯(rypß÷{öîG'f´smôÿåì9kþ³{5³áã~***J48@8Ëå)
+9²,ôH¸!Õ@yKý¹s-ø"÷ÈRT.ËêzYí)#FÔÙôÉÜ<¥¯§Çèl÷0og;ø¹ËåôDþÕ§Nê}$ É¢¾)jñÔ²¥â²Hrh¦$L5<x3ªu
t]ß´âPõòݹ ÛöíÝ»÷{L4Í¥Xè¾ä´©+EÍÏÃèd
+·|Ão
+ A#GrÛ@PÇMÑhÿ:¼çþ}ãÇåßùÇ¿}X zç ªlS{xê«Þ£3'";ÅAÏuçr 0)
+
cE(TUÁü%/cּŸäñ¼PUUõÿ+'=§X,ïUVë°Y:9G¦¨ÇB)±îë.ãÄqgÏÁ²mªDйhëfTpÀ1Lå÷Ó/pÓ\¾ìÇ3ËÊÊúâÎ@ii©"*ʦ¢seUQa2qÄÀ Iê=ÿÂr00
+Æ|Ä&¦)Rpqéª5¤«ûp¾¾áOU¿?2R:¬°äy0# êa¿[øݦH3T" ²|»/÷°ú`Á ¡$"4
ÇLÌÈýÁDx½Þ¼IqpÊÇZí
+S¦Æô ¡$¦1¿æµkw
+<Fpãß~¬ý" ÇÑÙ¸ÞuB@$ÀØ´,jW5º§2¯,ÌÀ9Xk+ô/¾ ù1zàSÄ.^¶q#¤Y³ !ë'ðÙ?oÁAßD »âP-§Fd&ôïûÌKÀ
+ãÞN}9vÅãÄqÐÌLÙcxfæ(ôõõN»ª¦úýCàF¹iÆÝ<2w×~17 ¸ïÖ ËéÚ¿?+z8Òp£µ0{jW.#DÀEEIyñ+Þxfkë]£ºx ÔÕ«!dgë:ô«íPU=³gÏfqe 4ÝìõòpDçÔÂhJ
+HR¨Ó j³X,òÆAYõÊ]²b%ÔõëAGJfµ%«ózgG;ÒÒsBHSÜM( v1yëµàß`Ç'sNT.«"»iûöËö*Ôµk»VIíw9:à²æ¦äåe ãîÚÚÚþééÿ^ #n7i1*ÄLSï+=·¸£C>Îóõ·«Ï! 8% ¡ø¤úcBALVL9çM54Eú5çfìÓÝ
Ó"e
+³IQ·C;ARµp¦Sb¢móëÐgtØî¯ÕÑíò¾ê?þùQLÆntu5WWW7?ô4\³víòÍ-ç/FùK (! 0õ`r,pß1Yl®YÑ íøàýH°[
+GÀÁ!
+b$Ç9àÙTØô,»êkîüè£êéÅÅgO;wÞÚoJ PU³õiVg'! ¥sfbßÝØ´q¬ª[ý? [¶lAAAZ]z:bÕ¨÷BÒÒÒ"µ´´¼uäØçåÝ^/¦N+EVödggcÔè,
+H}}=ZSc£¯®¶=Þn<S8
ûò,R8ÊÀf³¡ªòo
¾Æöi.FbmÐÍXum(îìôéÓSjëÎï¸ÒúkWW
+
 sÔTdLç%%ÓYSÃ
Þ'N¦l|}#µZ¨«ÃgÇ jÏ|L©qt1S|7Ú +ïA´9sÆ*â2ÎùÄþþþ ÝÝ^ÝaÇôt.IR/!äukÖ5"¡CK_ZvÔÃú
+ÌpCÞС
+fzïñ@类®.1.b[~~~àÛ±ñ99õFË!bëf
+EE
+¸$ÈN(Îí 0tp³¼mbÝ7ÀÿÒqIËmÛôò<ùÑó,K\ Õ9u' û1k¸·Í~â Àsãµ9.¾ûR¼Pâ@¦·¿DHYç@ϾE¦éow·! æhs\Vòî2÷Y;¸$ËpKÄñà<ë{>Ь`å# â1òÜ°uU,È·Ü[k2háÇ`+h«~Å´ üÄ# Â,y^Eøýk¥6²°ÀòÑGÁNÀâDCÇL¾û± ÀÄLy¾S£ïür¦TL¶Üóth¾npÊR<&5^Õ÷Ø8éãÔîþoêÔq¸1Äú±?ü°¿ù±eàtˬäw?j%á(ç¯+Ü~¿óÇ b¹ÛA×;4áMæ»\|y'ö_Q¡µÆðë IEND®B`
\ No newline at end of file
Added: trunk/qgis/images/themes/nkids/mActionZoomNext.png
===================================================================
--- trunk/qgis/images/themes/nkids/mActionZoomNext.png (rev 0)
+++ trunk/qgis/images/themes/nkids/mActionZoomNext.png 2009-04-18 00:02:22 UTC (rev 10588)
@@ -0,0 +1,23 @@
+PNG
+
+
+IHDR szzô sRGB ®Îé bKGD ÿ ÿ ÿ ½§ pHYs @ @Oå tIMEÙ bÜ´ ÄIDATXõkPU×Çÿ{÷}q¯ÀAA!FÀ¨ (X
+õ
ÁúJ«Ó¤Ójë#1ɦ&&§¦¶ýÐ3±hÑúJ|ôKQ@@"A¯(rypß÷{öîG'f´smôÿåì9kþ³{5³áã~***J48@8Ëå)
+9²,ôH¸!Õ@yKý¹s-ø"÷ÈRT.ËêzYí)#FÔÙôÉÜ<¥¯§Çèl÷0og;ø¹ËåôDþÕ§Nê}$ É¢¾)jñÔ²¥â²Hrh¦$L5<x3ªu
t]ß´âPõòݹ ÛöíÝ»÷{L4Í¥Xè¾ä´©+EÍÏÃèd
+·|Ão
+ A#GrÛ@PÇMÑhÿ:¼çþ}ãÇåßùÇ¿}X zç ªlS{xê«Þ£3'";ÅAÏuçr 0)
+
cE(TUÁü%/cּŸäñ¼PUUõÿ+'=§X,ïUVë°Y:9G¦¨ÇB)±îë.ãÄqgÏÁ²mªDйhëfTpÀ1Lå÷Ó/pÓ\¾ìÇ3ËÊÊúâÎ@ii©"*ʦ¢seUQa2qÄÀ Iê=ÿÂr00
+Æ|Ä&¦)Rpqéª5¤«ûp¾¾áOU¿?2R:¬°äy0# êa¿[øݦH3T" ²|»/÷°ú`Á ¡$"4
ÇLÌÈýÁDx½Þ¼IqpÊÇZí
+S¦Æô ¡$¦1¿æµkw
+<Fpãß~¬ý" ÇÑÙ¸ÞuB@$ÀØ´,jW5º§2¯,ÌÀ9Xk+ô/¾ ù1zàSÄ.^¶q#¤Y³ !ë'ðÙ?oÁAßD »âP-§Fd&ôïûÌKÀ
+ãÞN}9vÅãÄqÐÌLÙcxfæ(ôõõN»ª¦úýCàF¹iÆÝ<2w×~17 ¸ïÖ ËéÚ¿?+z8Òp£µ0{jW.#DÀEEIyñ+Þxfkë]£ºx ÔÕ«!dgë:ô«íPU=³gÏfqe 4ÝìõòpDçÔÂhJ
+HR¨Ó j³X,òÆAYõÊ]²b%ÔõëAGJfµ%«ózgG;ÒÒsBHSÜM( v1yëµàß`Ç'sNT.«"»iûöËö*Ôµk»VIíw9:à²æ¦äåe ãîÚÚÚþééÿ^ #n7i1*ÄLSï+=·¸£C>Îóõ·«Ï! 8% ¡ø¤úcBALVL9çM54Eú5çfìÓÝ
Ó"e
+³IQ·C;ARµp¦Sb¢móëÐgtØî¯ÕÑíò¾ê?þùQLÆntu5WWW7?ô4\³víòÍ-ç/FùK (! 0õ`r,pß1Yl®YÑ íøàýH°[
+GÀÁ!
+b$Ç9àÙTØô,»êkîüè£êéÅÅgO;wÞÚoJ PU³õiVg'! ¥sfbßÝØ´q¬ª[ý? [¶lAAAZ]z:bÕ¨÷BÒÒÒ"µ´´¼uäØçåÝ^/¦N+EVödggcÔè,
+H}}=ZSc£¯®¶=Þn<S8
ûò,R8ÊÀf³¡ªòo
¾Æöi.FbmÐÍXum(îìôéÓSjëÎï¸ÒúkWW
+
 sÔTdLç%%ÓYSÃ
Þ'N¦l|}#µZ¨«ÃgÇ jÏ|L©qt1S|7Ú +ïA´9sÆ*â2ÎùÄþþþ ÝÝ^ÝaÇôt.IR/!äukÖ5"¡CK_ZvÔÃú
+ÌpCÞС
+fzïñ@类®.1.b[~~~àÛ±ñ99õFË!bëf
+EE
+¸$ÈN(Îí 0tp³¼mbÝ7ÀÿÒqIËmÛôò<ùÑó,K\ Õ9u' û1k¸·Í~â Àsãµ9.¾ûR¼Pâ@¦·¿DHYç@ϾE¦éow·! æhs\Vòî2÷Y;¸$ËpKÄñà<ë{>Ь`å# â1òÜ°uU,È·Ü[k2háÇ`+h«~Å´ üÄ# Â,y^Eøýk¥6²°ÀòÑGÁNÀâDCÇL¾û± ÀÄLy¾S£ïür¦TL¶Üóth¾npÊR<&5^Õ÷Ø8éãÔîþoêÔq¸1Äú±?ü°¿ù±eàtˬäw?j%á(ç¯+Ü~¿óÇ b¹ÛA×;4áMæ»\|y'ö_Q¡µÆðë IEND®B`
\ No newline at end of file
Modified: trunk/qgis/python/gui/qgisinterface.sip
===================================================================
--- trunk/qgis/python/gui/qgisinterface.sip 2009-04-17 23:41:14 UTC (rev 10587)
+++ trunk/qgis/python/gui/qgisinterface.sip 2009-04-18 00:02:22 UTC (rev 10588)
@@ -32,6 +32,8 @@
virtual void zoomFull()=0;
//! Zoom to previous view extent
virtual void zoomToPrevious()=0;
+ //! Zoom to next view extent
+ virtual void zoomToNext()=0;
//! Zoome to extent of the active layer
virtual void zoomToActiveLayer()=0;
Modified: trunk/qgis/python/gui/qgsmapcanvas.sip
===================================================================
--- trunk/qgis/python/gui/qgsmapcanvas.sip 2009-04-17 23:41:14 UTC (rev 10587)
+++ trunk/qgis/python/gui/qgsmapcanvas.sip 2009-04-18 00:02:22 UTC (rev 10588)
@@ -90,6 +90,9 @@
//! Zoom to the previous extent (view)
void zoomToPreviousExtent();
+ //! Zoom to the next extent (view)
+ void zoomToNextExtent();
+
/**Zooms to the extend of the selected features*/
void zoomToSelected();
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2009-04-17 23:41:14 UTC (rev 10587)
+++ trunk/qgis/src/app/qgisapp.cpp 2009-04-18 00:02:22 UTC (rev 10588)
@@ -724,6 +724,10 @@
mActionZoomLast->setStatusTip( tr( "Zoom to Last Extent" ) );
connect( mActionZoomLast, SIGNAL( triggered() ), this, SLOT( zoomToPrevious() ) );
+ mActionZoomNext = new QAction( getThemeIcon( "mActionZoomNext.png" ), tr( "Zoom Next" ), this );
+ mActionZoomNext->setStatusTip( tr( "Zoom to Forward Extent" ) );
+ connect( mActionZoomNext, SIGNAL( triggered() ), this, SLOT( zoomToNext() ) );
+
mActionZoomActualSize = new QAction( tr( "Zoom Actual Size" ), this );
mActionZoomActualSize->setStatusTip( tr( "Zoom to Actual Size" ) );
connect( mActionZoomActualSize, SIGNAL( triggered() ), this, SLOT( zoomActualSize() ) );
@@ -1098,6 +1102,7 @@
mViewMenu->addAction( mActionZoomToLayer );
mViewMenu->addAction( mActionZoomToSelected );
mViewMenu->addAction( mActionZoomLast );
+ mViewMenu->addAction( mActionZoomNext );
mViewMenu->addAction( mActionZoomActualSize );
mActionViewSeparator2 = mViewMenu->addSeparator();
@@ -1274,6 +1279,7 @@
mMapNavToolBar->addAction( mActionZoomToSelected );
mMapNavToolBar->addAction( mActionZoomToLayer );
mMapNavToolBar->addAction( mActionZoomLast );
+ mMapNavToolBar->addAction( mActionZoomNext );
mMapNavToolBar->addAction( mActionDraw );
mToolbarMenu->addAction( mMapNavToolBar->toggleViewAction() );
//
@@ -1489,6 +1495,7 @@
mActionZoomToSelected->setIcon( getThemeIcon( "/mActionZoomToSelected.png" ) );
mActionPan->setIcon( getThemeIcon( "/mActionPan.png" ) );
mActionZoomLast->setIcon( getThemeIcon( "/mActionZoomLast.png" ) );
+ mActionZoomNext->setIcon( getThemeIcon( "/mActionZoomNext.png" ) );
mActionZoomToLayer->setIcon( getThemeIcon( "/mActionZoomToLayer.png" ) );
mActionIdentify->setIcon( getThemeIcon( "/mActionIdentify.png" ) );
mActionSelect->setIcon( getThemeIcon( "/mActionSelect.png" ) );
@@ -3856,6 +3863,14 @@
}
+void QgisApp::zoomToNext()
+{
+ mMapCanvas->zoomToNextExtent();
+ // notify the project we've made a change
+ QgsProject::instance()->dirty( true );
+
+}
+
void QgisApp::zoomActualSize()
{
mMapLegend->legendLayerZoomNative();
@@ -5807,4 +5822,3 @@
return QPixmap( myDefaultPath );
}
}
-
Modified: trunk/qgis/src/app/qgisapp.h
===================================================================
--- trunk/qgis/src/app/qgisapp.h 2009-04-17 23:41:14 UTC (rev 10587)
+++ trunk/qgis/src/app/qgisapp.h 2009-04-18 00:02:22 UTC (rev 10588)
@@ -235,6 +235,7 @@
QAction *actionZoomToLayer() { return mActionZoomToLayer; }
QAction *actionZoomToSelected() { return mActionZoomToSelected; }
QAction *actionZoomLast() { return mActionZoomLast; }
+ QAction *actionZoomNext() { return mActionZoomNext; }
QAction *actionZoomActualSize() { return mActionZoomActualSize; }
QAction *actionViewSeparator2() { return mActionViewSeparator2; }
QAction *actionMapTips() { return mActionMapTips; }
@@ -326,6 +327,8 @@
void zoomFull();
//! Zoom to the previous extent
void zoomToPrevious();
+ //! Zoom to the forward extent
+ void zoomToNext();
//! Zoom to selected features
void zoomToSelected();
@@ -711,6 +714,7 @@
QAction *mActionZoomToLayer;
QAction *mActionZoomToSelected;
QAction *mActionZoomLast;
+ QAction *mActionZoomNext;
QAction *mActionZoomActualSize;
QAction *mActionViewSeparator2;
QAction *mActionMapTips;
Modified: trunk/qgis/src/app/qgisappinterface.cpp
===================================================================
--- trunk/qgis/src/app/qgisappinterface.cpp 2009-04-17 23:41:14 UTC (rev 10587)
+++ trunk/qgis/src/app/qgisappinterface.cpp 2009-04-18 00:02:22 UTC (rev 10588)
@@ -55,6 +55,11 @@
qgis->zoomToPrevious();
}
+void QgisAppInterface::zoomToNext()
+{
+ qgis->zoomToNext();
+}
+
void QgisAppInterface::zoomToActiveLayer()
{
qgis->zoomToLayerExtent();
@@ -245,6 +250,7 @@
QAction *QgisAppInterface::actionZoomToLayer() { return qgis->actionZoomToLayer(); }
QAction *QgisAppInterface::actionZoomToSelected() { return qgis->actionZoomToSelected(); }
QAction *QgisAppInterface::actionZoomLast() { return qgis->actionZoomLast(); }
+QAction *QgisAppInterface::actionZoomNext() { return qgis->actionZoomNext(); }
QAction *QgisAppInterface::actionZoomActualSize() { return qgis->actionZoomActualSize(); }
QAction *QgisAppInterface::actionViewSeparator2() { return qgis->actionViewSeparator2(); }
QAction *QgisAppInterface::actionMapTips() { return qgis->actionMapTips(); }
Modified: trunk/qgis/src/app/qgisappinterface.h
===================================================================
--- trunk/qgis/src/app/qgisappinterface.h 2009-04-17 23:41:14 UTC (rev 10587)
+++ trunk/qgis/src/app/qgisappinterface.h 2009-04-18 00:02:22 UTC (rev 10588)
@@ -47,6 +47,8 @@
void zoomFull();
//! Zoom map to previous extent
void zoomToPrevious();
+ //! Zoom map to next extent
+ void zoomToNext();
//! Zoom to active layer
void zoomToActiveLayer();
@@ -183,6 +185,7 @@
virtual QAction *actionZoomToLayer();
virtual QAction *actionZoomToSelected();
virtual QAction *actionZoomLast();
+ virtual QAction *actionZoomNext();
virtual QAction *actionZoomActualSize();
virtual QAction *actionViewSeparator2();
virtual QAction *actionMapTips();
Modified: trunk/qgis/src/gui/qgisinterface.h
===================================================================
--- trunk/qgis/src/gui/qgisinterface.h 2009-04-17 23:41:14 UTC (rev 10587)
+++ trunk/qgis/src/gui/qgisinterface.h 2009-04-18 00:02:22 UTC (rev 10588)
@@ -71,6 +71,9 @@
//! Zoom to previous view extent
virtual void zoomToPrevious() = 0;
+ //! Zoom to next view extent
+ virtual void zoomToNext() = 0;
+
//! Zoom to extent of the active layer
virtual void zoomToActiveLayer() = 0;
Modified: trunk/qgis/src/gui/qgsmapcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.cpp 2009-04-17 23:41:14 UTC (rev 10587)
+++ trunk/qgis/src/gui/qgsmapcanvas.cpp 2009-04-18 00:02:22 UTC (rev 10588)
@@ -85,7 +85,7 @@
setScene( mScene );
setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
-
+ mLastExtentIndex=-1;
mCurrentLayer = NULL;
mMapOverview = NULL;
mMapTool = NULL;
@@ -493,8 +493,17 @@
updateScale();
if ( mMapOverview )
mMapOverview->drawExtentRect();
- mLastExtent = current;
+ if (mLastExtent.size()>20) mLastExtent.removeAt(0);
+ //clear all extent items after current index
+ for (int i=mLastExtent.size()-1; i>mLastExtentIndex; i--)
+ {
+ mLastExtent.removeAt(i);
+ }
+
+
+ mLastExtent.append(extent()) ;
+ mLastExtentIndex=mLastExtent.size()-1;
// notify canvas items of change
updateCanvasItemPositions();
@@ -541,18 +550,44 @@
void QgsMapCanvas::zoomToPreviousExtent()
{
- if ( mDrawing )
- {
- return;
- }
+ if ( mDrawing )
+ {
+ return;
+ }
- QgsRectangle current = extent();
- setExtent( mLastExtent );
- mLastExtent = current;
+ if (mLastExtentIndex>1)
+ {
+ mLastExtentIndex--;
+ mMapRenderer->setExtent(mLastExtent[mLastExtentIndex]);
+ emit extentsChanged();
+ updateScale();
+ if ( mMapOverview )
+ mMapOverview->drawExtentRect();
+ }
+
refresh();
} // zoomToPreviousExtent
+void QgsMapCanvas::zoomToNextExtent()
+{
+ if ( mDrawing )
+ {
+ return;
+ }
+ if (mLastExtentIndex<mLastExtent.size()-1)
+ {
+ mLastExtentIndex++;
+ mMapRenderer->setExtent(mLastExtent[mLastExtentIndex]);
+ emit extentsChanged();
+ updateScale();
+ if ( mMapOverview )
+ mMapOverview->drawExtentRect();
+ }
+ refresh();
+}// zoomToNextExtent
+
+
bool QgsMapCanvas::hasCrsTransformEnabled()
{
return mMapRenderer->hasCrsTransformEnabled();
Modified: trunk/qgis/src/gui/qgsmapcanvas.h
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.h 2009-04-17 23:41:14 UTC (rev 10587)
+++ trunk/qgis/src/gui/qgsmapcanvas.h 2009-04-18 00:02:22 UTC (rev 10588)
@@ -29,6 +29,7 @@
#include <QDomDocument>
#include <QGraphicsView>
+#include <QtCore>
class QWheelEvent;
class QPixmap;
@@ -142,6 +143,9 @@
//! Zoom to the previous extent (view)
void zoomToPreviousExtent();
+ //! Zoom to the Next extent (view)
+ void zoomToNextExtent();
+
/**Zooms to the extend of the selected features*/
void zoomToSelected();
@@ -412,7 +416,8 @@
QgsMapTool* mLastNonZoomMapTool;
//! recently used extent
- QgsRectangle mLastExtent;
+ QList <QgsRectangle> mLastExtent;
+ int mLastExtentIndex;
//! Scale factor multiple for default zoom in/out
double mWheelZoomFactor;
More information about the QGIS-commit
mailing list