Re: [Qgis-developer] fixes for python-sip 4.15

2013-12-01 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 01/12/2013 12:16, Hans-Peter Jansen ha scritto:

> Not being a newbie for python nor python-{sip,qt*} affairs, I
> noticed some issues of QGIS with sip 4.15 onwards. It was a rather
> noticeable update, as many complex bindings broke. Thankfully, the
> fixes are easy enough: it boils down to declare some missing
> private methods in the respective sip files.
> 
> Please see attached patches. What do you think?

Hi Hans,
thanks for this. If you reissue these as GithHub Pull Requests, their
acceptance will be far easier.
All the best.

- -- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlKcPBUACgkQ/NedwLUzIr4FlgCdGjrd+K1x2LGNFn76nAuGPaVp
tEQAni2jGmqNOSff8k6hiUIVyX1koXFR
=kp1L
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Shortcut changes in QGIS; call for opinions

2013-12-01 Thread A Huarte
Hi, I have tried to bring together all the comments and I have updated the pull 
request (https://github.com/ahuarte47/QGIS/compare/Issue_9094):

* Selection tools (With point, rectangle, circle...) delete selected 
features with 'backspace' or 'delete' key without confirmation (It is an 
undoable action). 
Also, a new status message notify the number of features deleted.
* DEL key in attribute table delete the seleted features similarly.
* Node tool, or capture tool, remove a node with 'backspace' or 
'delete' key.
* TOC remove selected layer[s] with Ctrl+D with ask for confirmation 
(It is not an undoable action).
Also, a new status message notify the number of layers removed.

Thank you very much for your advices!
Regards



>
> De: A Huarte 
>Para: "qgis-developer@lists.osgeo.org" ; 
>"qgis-u...@lists.osgeo.org"  
>Enviado: Jueves 28 de noviembre de 2013 16:11
>Asunto: Shortcut changes in QGIS; call for opinions
> 
>
>
>Hi, I would know objections in order to change some shortcut keys in QGIS 
>desktop.
>
>
>+ Delete selected features in map canvas -> DEL key without ask for 
>confirmation.
>   Now QGIS ask for confirmation first.
>   Other GIS app desktops, Arcmap, gvSIG use DEL key.
>
>
>+ Delete selected features in attribute table -> DEL key without ask for 
>confirmation.
>   Now QGIS uses Ctrl+D shortcut and ask for confirmation first.
>   Other GIS app desktops, Arcmap, gvSIG use DEL key. 
>
>
>+ Remove selected node of a feature -> 'backspace' key without ask for 
>confirmation.
>   Now QGIS uses DEL key, and similarly 'backspace' already deletes a node 
>when drawing a feature.
>  
>+ Remove layer from legend -> Ctrl+D with ask for confirmation.
>   Now QGIS does not ask for confirmation.
>
>
>Our purpose is to standardize these keys and avoid unnecessary and continuous 
>confirmation messages in an edit session (You can easily undo the removal 
>using the UNDO option menu or Ctrl+Z shortcut).
>
>
>
>
>You can see the current discussion in:
>
>http://hub.qgis.org/issues/9094
>
>
>
>Thank you very much!
>Regards
>
>___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] [Qgis-user] Shortcut changes in QGIS; call for opinions

2013-12-01 Thread A Huarte
Hi, in QGIS for windows you can select more than one layer (to remove) with the 
Ctrl key pressed in TOC, this is not possible on other platforms?


>
> De: Borys Jurgiel 
>Para: qgis-developer@lists.osgeo.org 
>Enviado: Viernes 29 de noviembre de 2013 11:56
>Asunto: Re: [Qgis-developer] [Qgis-user]  Shortcut changes in QGIS;call 
>for opinions
> 
>
>Dnia piątek, 29 listopada 2013 10:18:26 Andreas Neumann pisze:
>> As long as we don't have an undo option I would like to have the
>> confirmation question always when removing one or more layers. It is not
>> something that people do all the time, so it wouldn't be annoying. 
>
>It seems there are at least two opposite approaches in the TOC usage. When you 
>do any kind of data processing, you have billions of intermediate layers you 
>have to remove one by one, and it doesn't hurt you if you remove too much, as 
>you don't care about their style. Furthermore, then you have to remove them 
>all from disk and it also isn't especially dangerous if you only use 
>reasonable versioning and backups. Also I guess every admin spending her/his 
>days on browsing and fixing countless layers from her/his users might agree 
>with me.
>
>But you're right, I didn't consider your point of view, and seems that one is 
>definitely more popular. For the non-confirmation variant, I can see two 
>solutions:
>
>1. We already have a number of actions without default shortcut. Maybe we 
>could create an action that is neither placed in any menu/toolbar nor assigned 
>to any shortcut by default. Just waiting to be connected to a custom shortcut 
>if anybody wants it.
>
>2. If we don't want to make such "orphan" actions, let's drop it. I'll write a 
>supersimple plugin for adding non-standard actions and release it if anyone 
>interested.
>
>
>
>
>> I
>> also accidentally removed layers with right-click and there was no
>> confirmation that stopped me. So I would prefer to have the confirmation
>> when removing layers in all cases.
>> 
>> Andreas
>> 
>> Am 29.11.2013 07:56, schrieb Richard Duivenvoorde:
>> > On 28-11-13 23:19, Nathan Woodrow wrote:
>> >> Given that adding/removing a complex layer can be expensive and there is
>> >> no undo I would suggest to have a single key shortcut (D) with confirm
>> >> and a modified one without (Ctrl-D).  You want to avoid the user doing
>> >> something dangerous and in this case that is removing a layer layer
>> >> without undo.
>> > 
>> > Personally I do not like to add more then one key for the same action,
>> > keep stuff simple.
>> > 
>> > Although we could make confirmation an option, the number of options in
>> > the options dialogs are also growing and growing. I've already a lot of
>> > options to tweak for a new user to make it the best way for him/her.
>> > 
>> > If we do a a first time dialog with a 'do not ask me anymore', that is
>> > nice, BUT it means that we have to put a way to undo that somewhere in a
>> > dialog/option too (while the logic code actually is easy: just an extra
>> > if/flag).
>> > 
>> > Let's keep the interface as simple/logical/friendly as possible
>> > especially for non power users.
>> > 
>> > Could we maybe create some poweruser options list (like gnome-settings
>> > or :config in firefox). In which we put this kind of flags?
>> > So no cluttering of the interface with 'do not ask' actions or more
>> > options in the options dialogs. But only a list of configs which you
>> > could use.
>> > Which in practice would actually be a Qtable with filter for QSettings
>> > of QGIS, in my case: ~/.config/QGIS/QGIS2.conf
>> > 
>> > Regards,
>> > 
>> > Richard Duivenvoorde
>> > 
>> > ps Borys: we should not be afraid of some regression if it makes QGIS
>> > better in general :-)
>> > 
>> > 
>> > 
>> > ___
>> > Qgis-user mailing list
>> > qgis-u...@lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/qgis-user
>> 
>> ___
>> Qgis-user mailing list
>> qgis-u...@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>___
>Qgis-developer mailing list
>Qgis-developer@lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] [Qgis-user] Shortcut changes in QGIS; call for opinions

2013-12-01 Thread A Huarte
Hi Bernd, you are right, It would be better that this action would be undoable, 
and add a layer ... but for the moment there is no such implementation. 

Accepting the rule that any action not undaoble must be confirmed by the user, 
then it seems that deleting a layer should also request a confirmation, right?

Regards


>
> De: Bernd Vogelgesang 
>Para: qgis-developer@lists.osgeo.org 
>Enviado: Viernes 29 de noviembre de 2013 1:36
>Asunto: Re: [Qgis-developer] [Qgis-user]  Shortcut changes in QGIS; call for 
>opinions
> 
>
>Instead of a confirmation when deleting a layer, an Undo-action for  
>already deleted layers would be much more helpful.
>Cause you can happily confirm to delete sth, but figure out you were wrong  
>just a minute later ...
>
>Cheers
>Bernd
>
>
>Am 29.11.2013, 00:18 Uhr, schrieb A Huarte :
>
>> I agree with Nathan.
>>
>> I think that 'D' should ask confirmation, we can imagine the reaction of  
>> a user removing accidentaly a configured layer.
>> 'Ctrl+D' could remove layers without confirmation.
>>
>> Alvaro
>>
>>
>>> 
>>> De: Nathan Woodrow 
>>> Para: Borys Jurgiel 
>>> CC: "qgis-developer@lists.osgeo.org" ;  
>>> A Huarte ; "qgis-u...@lists.osgeo.org"  
>>> 
>>> Enviado: Jueves 28 de noviembre de 2013 23:19
>>> Asunto: Re: [Qgis-user] [Qgis-developer] Shortcut changes in QGIS; call  
>>> for opinions
>>>
>>>
>>>
>>> Given that adding/removing a complex layer can be expensive and there  
>>> is no undo I would suggest to have a single key shortcut (D) with  
>>> confirm and a modified one without (Ctrl-D).  You want to avoid the  
>>> user doing something dangerous and in this case that is removing a  
>>> layer layer without undo.
>>>
>>>
>>> - Nathan
>>>
>>>
>>>
>>> On Fri, Nov 29, 2013 at 3:11 AM, Borys Jurgiel   
>>> wrote:
>>>
>>> Dnia czwartek, 28 listopada 2013 15:11:30 A Huarte pisze:


> + Remove layer from legend -> Ctrl+D with ask for confirmation.
>    Now QGIS does not ask for confirmation.

 What about leaving the possibibility to remove the layer without  
 confirmation
 with a separate shortcut?

 Actually the first what I do after a fresh install is changing  
 "Ctrl-D" to
 simple "D", as I couldn't imagine myself using two fingers for such  
 basic
 action like layer removing ;)) The same with a dozen of other Ctrl-*
 shortcuts. And I believe I'm not the only one.

 Regards,
 B.

 ___
 Qgis-user mailing list
 qgis-u...@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-user

>>>
>>>
>
>
>-- 
>Bernd Vogelgesang * Siedlerstrasse 2 * 91083 Baiersdorf * +49-9133-825374
>___
>Qgis-developer mailing list
>Qgis-developer@lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] [Qgis-psc] PR1007 bump minimum to 4.7: objections?

2013-12-01 Thread Alex Mandel
On 11/30/2013 06:29 AM, Tim Sutton wrote:
> Hi
> 
> 
> On Sat, Nov 30, 2013 at 11:31 AM, Richard Duivenvoorde
> wrote:
> 
>> On 30-11-13 01:44, Nyall Dawson wrote:
>>> Ok - so what's the final call here? Is someone willing to make a final
>>> decision between bumping to 4.6 and keeping support for lucid or
>>> bumping to 4.7 and dropping lucid? (Looks like 4.8 is out of the
>>> question at the moment).
>>>
>>> If someone can make a call I'll update the pull request and make sure
>>> all #ifdef's for versions < 4.6/4.7 are removed.
>>
>> Hi Nyall,
>>
>> if I am correct, I think the general view of devs is that a bump to 4.7
>> only is not worth to pull without:
>>
>> 1) a cleanup of stuff that is not needed anymore because of the change
>> 2) a (good) purpose on why to do it
>>
>> one of the devs told me: "why not a good PR with
>> 1) the bump
>> 2) the cleanup
>> 3) the new stuff
>>
>> I think this whole discussion is because of different ideas about this
>> kind of pull requests between different people.
>>
>> @psc maybe we should write down this kind of things in governance?
>>
>> @nyall is a PR like above doable for you?
>>
>> Regards,
>>
>> Richard Duivenvoorde
>>
>> ___
>> Qgis-psc mailing list
>> qgis-...@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-psc
>>
> 
> For me upgrading to 4.7 is a +0 - I still use QGIS on 12.04 systems and I
> suspect that others do too. However 14.04 is just around the corner so it
> wont be hard to wait an extra few months before running QGIS 2.2.
> 
> What about being more aggressive and actually porting to Qt5? Its been out
> for a while now and should represent a stable target for us to develop
> against.
> 
> Regards
> 
> Tim
> 

Tim,

The controversy is over 10.04 (Qt 4.6) not 12.04 (Qt 4.8)
To me it seems good enough to bump to 4.6 now without breaking anything
and to consider 4.8 as minimum for QGIS 2.2

That seems reasonable given what out there and providing packagers time
to catch up. Presumably there are known fixes and features that devs
intend to take advantage of for 2.2 that warrant this shift (previous
notes on this thread indicate this to be true).

Move to Qt5 seems like a whole different discussion depending on level
or work needed.

Thanks,
Alex
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Plugin [400] TileLayer Plugin approval notification.

2013-12-01 Thread noreply

Plugin TileLayer Plugin approval by rduivenvoorde.
The plugin version "[400] TileLayer Plugin 0.11" is now approved
Link: http://plugins.qgis.org/plugins/TileLayerPlugin/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] fixes for python-sip 4.15

2013-12-01 Thread Hans-Peter Jansen
Hi,

being a newbie in gis affairs and therefore in QGIS, I would like to say 
warmth hello. 

Not being a newbie for python nor python-{sip,qt*} affairs, I noticed some 
issues of QGIS with sip 4.15 onwards. It was a rather noticeable update, as 
many complex bindings broke. Thankfully, the fixes are easy enough: it boils 
down to declare some missing private methods in the respective sip files.

Please see attached patches. What do you think? 

I noticed, that these issues are tackled differently in the current git: 
they're moved to protected methods. This is rather suboptimal, since due to 
sips "protected is public" trick, the whole protection is void.

BTW, I build my stuff in the public: 

https://build.opensuse.org/project/monitor/home:frispete:geo

and attempt to feed my fixes upstream (with this message) as well as to the 
more prominent openSUSE feeds (Application:Geo), but the submit request is 
still pending.

While at it, I noticed a long stream of error messages related to srs.db 
handling during build. A crude fix for that is also attached, but I have to 
admit, that I didn't fully grok the details of the database handling in this 
regard. I first concentrated on getting a clean build. Hence, I included the 
sample data as an additional package. 

Now, the hopefully soon to be available packages for openSUSE are in a much 
better shape than before. Somebody with a deeper builder and user experience 
taking a look is highly appreciated, especially related to the available 
extensions. Which one's are really open source, which is a prerequisite for 
being build on the OBS?

Cheers,
PeteFrom: Hans-Peter Jansen 
Subject: sip 4.15 fixes

Declare some missing private methods in order to build QGIS2 with
newer python sip versions (>= 4.15).


Index: b/python/core/qgsmaplayerregistry.sip
===
--- a/python/core/qgsmaplayerregistry.sip
+++ b/python/core/qgsmaplayerregistry.sip
@@ -191,4 +191,6 @@ class QgsMapLayerRegistry : QObject
 //! protected constructor
 QgsMapLayerRegistry( QObject * parent = 0 );
 
+private:
+void connectNotify( const char * signal );
 }; // class QgsMapLayerRegistry
Index: b/python/gui/qgsmapcanvas.sip
===
--- a/python/gui/qgsmapcanvas.sip
+++ b/python/gui/qgsmapcanvas.sip
@@ -335,4 +335,6 @@ class QgsMapCanvas : QGraphicsView
 //! called on resize or changed extent to notify canvas items to change their rectangle
 void updateCanvasItemPositions();
 
+private:
+void connectNotify( const char * signal );
 }; // class QgsMapCanvas
Index: b/python/gui/qgsattributedialog.sip
===
--- a/python/gui/qgsattributedialog.sip
+++ b/python/gui/qgsattributedialog.sip
@@ -16,4 +16,7 @@ class QgsAttributeDialog : QObject
   int exec();
   void show();
   void dialogDestroyed();
+
+private:
+  bool eventFilter( QObject *obj, QEvent *event );
 };
Index: b/python/gui/qgsmessagelogviewer.sip
===
--- a/python/gui/qgsmessagelogviewer.sip
+++ b/python/gui/qgsmessagelogviewer.sip
@@ -14,4 +14,8 @@ class QgsMessageLogViewer: QDialog
 
   public slots:
 void logMessage( QString message, QString tag, QgsMessageLog::MessageLevel level );
+
+  private:
+void showEvent( QShowEvent * );
+void hideEvent( QHideEvent * );
 };
Index: b/src/core/qgscoordinatereferencesystem.cpp
===
--- a/src/core/qgscoordinatereferencesystem.cpp
+++ b/src/core/qgscoordinatereferencesystem.cpp
@@ -1658,6 +1658,8 @@ int QgsCoordinateReferenceSystem::syncDb
 {
   int inserted = 0, updated = 0, deleted = 0, errors = 0;
 
+  qDebug( "Load srs db from: %s", QgsApplication::srsDbFilePath().toLocal8Bit().constData());
+
   sqlite3 *database;
   if ( sqlite3_open( QgsApplication::srsDbFilePath().toUtf8().constData(), &database ) != SQLITE_OK )
   {
@@ -1672,6 +1674,10 @@ int QgsCoordinateReferenceSystem::syncDb
 
   }
 
+  // fix up database, if not done already //
+  if ( sqlite3_exec( database, "alter table tbl_srs add noupdate boolean", 0, 0, 0 ) == SQLITE_OK )
+sqlite3_exec( database, "update tbl_srs set noupdate=(auth_name='EPSG' and auth_id in (5513,5514,5221,2065,102067,4156,4818))", 0, 0, 0 );
+
   sqlite3_exec( database, "UPDATE tbl_srs SET srid=141001 WHERE srid=41001 AND auth_name='OSGEO' AND auth_id='41001'", 0, 0, 0 );
 
   OGRSpatialReferenceH crs = OSRNewSpatialReference( NULL );
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Plugin [400] TileLayer Plugin approval notification.

2013-12-01 Thread Andre Joost

Am 01.12.2013 09:47, schrieb noreply-qhywkign...@public.gmane.org:


Plugin TileLayer Plugin approval by rduivenvoorde.
The plugin version "[400] TileLayer Plugin 0.10" is now approved
Link: http://plugins.qgis.org/plugins/TileLayerPlugin/


This plugin looks promising, allowing transparent tiles to lay over 
normal tiles and easy adding of new tile sources.


Unfortunately,it does not work with the qgis dev version. It claims to 
require EPSG:3857 (which my project has), but maybe gets disturbed by 
the new datumshift selection of QGIS 2.1.0.


Greetings,
André Joost
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Plugin [400] TileLayer Plugin approval notification.

2013-12-01 Thread noreply

Plugin TileLayer Plugin approval by rduivenvoorde.
The plugin version "[400] TileLayer Plugin 0.10" is now approved
Link: http://plugins.qgis.org/plugins/TileLayerPlugin/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer