Re: [Qgis-developer] How to enable labeling tools to move labels (since last merge of Larry's work)

2013-05-28 Thread Larry Shaffer
Hi Régis and Michael,

On Mon, May 27, 2013 at 3:53 AM, Larry Shaffer lar...@dakotacarto.comwrote:

 Hi,

 On Mon, May 27, 2013 at 2:09 AM, kimaidou kimai...@gmail.com wrote:

 Hi

 2013/5/27 HAUBOURG regis.haubo...@eau-adour-garonne.fr

  Hi Larry, 
 Putting expression item to the bottom of list, and renaming the entries
 as follow should be better IMHO, since expression is more advanced:

 “Field types : String, Int, Double”  - “choose Field ( enable map
 tools)”

 “Edit expression” -” Calculate value with expression (disable map tool)”
 

 Does that sound good?


 This sounds good to me, as I had the same problem easilly finding the way
 to choose fields here.


 Switching the order should help. Originally, the button's menu didn't have
 a field's submenu, and the fields were listed at the bottom of the menu (to
 allow for an unknown number of entries). That didn't work well for tables
 with lots of columns, since it often pushed access to expression menu
 actions off the screen; so I made a submenu.

 Changing the menu action text to long descriptions, like the proposed one
 for expression, may lead to 'missing' the entry to the submenu while
 mousing that far to the right. The text's width will dictate the total
 width of the menu. This was a problem with the expression string menu
 entry, which is now truncated.

 I'd prefer to just explain it better in the text below the buttons and in
 those button's description/tool tip.


I've made improvements today to the QgsDataDefinedButton, along the lines
of your suggestions, in commit dd60a34 [0].

Commit message:
Update QgsDataDefinedButton
- Add 'Usage info' functions; displays in description and tool tip
- Reorganize menu, adding conceptual section titles
- Add ability to paste in expression
- Add ability to clear defined expression
- Add check for non-matching data field types
- Add better truncation of expressions in tool tip and menu

Of note, I added the ability to set custom 'Usage info' for each button,
which allowed me to remove the general text ( Define attribute fields to
enable labeling map tools ) from below, and include more descriptive,
contextual information in the tool tip and description popup:

Usage:
In edit mode, layer's relevant labeling map tool is:
  Defined attribute field - enabled
  Defined expression - disabled

I would appreciate any further feedback on the button's new menu layout. I
consider the button's functionality to be ready for release, but there is
always room for improvement.  :^)

[0]
https://github.com/qgis/Quantum-GIS/commit/dd60a34fae326fcf28d3415d55140e3488f84d62

Regards,

Larry


 Regards,

 Larry




 

 ** **

 [0] https://dl.dropboxusercontent.com/u/72368800/label_dialog.png

 All the best

 Régis



 Regards
 Michael



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


Re: [Qgis-developer] How to enable labeling tools to move labels (since last merge of Larry's work)

2013-05-27 Thread HAUBOURG
One more tip,
Users here often don't get immediately that labeling with toolbar require to 
put layer in editing mode. Maybe could we append a comment in data defined 
options :
[..] Define attribute fields and activate editing of layer to enable labeling 
map tools. [..]


De : la...@shafferinteractive.com [mailto:la...@shafferinteractive.com] De la 
part de Larry Shaffer
Envoyé : vendredi 24 mai 2013 17:34
À : HAUBOURG
Cc : QGIS Developer List
Objet : Re: [Qgis-developer] How to enable labeling tools to move labels (since 
last merge of Larry's work)

Hi Régis,

On Fri, May 24, 2013 at 5:04 AM, Régis Haubourg 
regis.haubo...@eau-adour-garonne.frmailto:regis.haubo...@eau-adour-garonne.fr
 wrote:
Hi all,
Larry, first, congratulations for the great labeling refactoring, this is
huge!

I couldn't find a way to enable the move / rotate tools in toolbar, in edit
mode, after having defined fields for X and Y in expression. Tools that
opens a dialog to modify font, text.. is working, but I couldn't change Y X
values in it.
Is this an issue or a I missing something?

There is a short description about this below those settings:
( Define attribute fields to enable labeling map tools )
It means that only an attribute field mapping data definition can be used to 
enable the labeling map tools (e.g. Move, Rotate, Change Properties). An 
expression does not work. Since those tools directly edit the attribute table, 
access to the field needs to be established, i.e. a data defined mapped 
attribute field.
While it is possible to find out what attribute fields (aka columns) are 
referenced within an expression, there is no simple means of determining any 
one of those fields are intended to be open for writing new values. It is 
possible when there is only one field in the expression, and no other parts to 
the expression, to use it directly, but then why not just map a field?
There are use cases for allowing expressions for all of those settings (X, Y, 
Alignments, Rotation), so limiting those data definitions to only allowing 
attribute field mappings would not be a good idea.

It looks like the 1 line help description, noted above, needs more work. Maybe 
invert the logic?:
(Defining expressions will disable labeling map tools)

Also, a good and concise contextual help needs drafted to explain new labeling 
options and how they work. Then, expanded upon for inclusion in general 
documentation.

Regards,
Larry


régis




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/How-to-enable-labeling-tools-to-move-labels-since-last-merge-of-Larry-s-work-tp5055535.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.orgmailto: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


[Qgis-developer] How to enable labeling tools to move labels (since last merge of Larry's work)

2013-05-24 Thread Régis Haubourg
Hi all, 
Larry, first, congratulations for the great labeling refactoring, this is
huge! 

I couldn't find a way to enable the move / rotate tools in toolbar, in edit
mode, after having defined fields for X and Y in expression. Tools that
opens a dialog to modify font, text.. is working, but I couldn't change Y X
values in it. 
Is this an issue or a I missing something? 
régis




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/How-to-enable-labeling-tools-to-move-labels-since-last-merge-of-Larry-s-work-tp5055535.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] How to enable labeling tools to move labels (since last merge of Larry's work)

2013-05-24 Thread Larry Shaffer
Hi Régis,

On Fri, May 24, 2013 at 5:04 AM, Régis Haubourg 
regis.haubo...@eau-adour-garonne.fr wrote:

 Hi all,
 Larry, first, congratulations for the great labeling refactoring, this is
 huge!

 I couldn't find a way to enable the move / rotate tools in toolbar, in edit
 mode, after having defined fields for X and Y in expression. Tools that
 opens a dialog to modify font, text.. is working, but I couldn't change Y X
 values in it.
 Is this an issue or a I missing something?


There is a short description about this below those settings:
( Define attribute fields to enable labeling map tools )

It means that only an attribute field mapping data definition can be used
to enable the labeling map tools (e.g. Move, Rotate, Change Properties). An
expression does not work. Since those tools directly edit the attribute
table, access to the field needs to be established, i.e. a data defined
mapped attribute field.

While it is possible to find out what attribute fields (aka columns) are
referenced within an expression, there is no simple means of determining
any one of those fields are intended to be open for writing new values. It
is possible when there is only one field in the expression, and no other
parts to the expression, to use it directly, but then why not just map a
field?

There are use cases for allowing expressions for all of those settings (X,
Y, Alignments, Rotation), so limiting those data definitions to only
allowing attribute field mappings would not be a good idea.

It looks like the 1 line help description, noted above, needs more work.
Maybe invert the logic?:
(Defining expressions will disable labeling map tools)

Also, a good and concise contextual help needs drafted to explain new
labeling options and how they work. Then, expanded upon for inclusion in
general documentation.

Regards,

Larry



 régis




 --
 View this message in context:
 http://osgeo-org.1560.x6.nabble.com/How-to-enable-labeling-tools-to-move-labels-since-last-merge-of-Larry-s-work-tp5055535.html
 Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
 ___
 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