<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">
<div>>I prefer to remove the label only if the user gives an
empty text.<br>
</div>
<div>> Can I do it ?</div>
<br>
No objection from me. Currently, I'm not using the text
replacement capabilities.<br>
<br>
Marco<br>
<br>
On 28.05.2013 11:34, René-Luc D'Hont wrote:<br>
</div>
<blockquote
cite="mid:CAPkCcEbW+JGozRecZfryqwUkWMdFKvMOVHfsU8MQPMfnOR1Txw@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Marco<br>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
<br>
</div>
I guess yes. 'adjustSizeToText()' works for text, not
html. Html support for composer label was added recently
to the composer label class. Please adapt the relevant
lines to work with html labels too. </blockquote>
<div><br>
</div>
<div>I'll adapt it<br>
</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
<br>
>Question for Marco, Why removed label, if the
request doesn't define a value ? Why not used the
default value ?<br>
<br>
</div>
The idea was that the web client has the possibility to
remove an advertised text label completely if it is not
used. E.g. if a composition defines a text item with id
'author', the web client can simply ignore it if it does
not want to have author's name printed. Note that the
labels without ids are not removed as they are
considered to be fix, so not subject to client text
replacement (original meaning of label id was that this
text item is subject to text replacement by web client.
Later, the id has been generalized as an id for every
item type).<br>
<br>
Another possibility would be to remove the item only if
the client gives an empty text and use the default text
otherwise. What do you think?<br>
</blockquote>
<div><br>
<br>
</div>
<div>I prefer to remove the label only if the user gives
an empty text.<br>
</div>
<div>Can I do it ?<br>
<br>
<br>
</div>
<div>Regards,<br>
</div>
<div>René-Luc<br>
</div>
<div class="h5"> <br>
<br>
On <a moz-do-not-send="true" href="tel:27.05.2013%2022"
value="+12705201322" target="_blank">27.05.2013 22</a>:23,
rldhont wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div class="h5">
Hi Marco and other devs,<br>
<br>
In src/mapserver/qgsconfigparser.cpp:530 we can
read :<br>
<br>
//replace label text<br>
foreach ( QgsComposerLabel *currentLabel,
composerLabels )<br>
{<br>
QString title = parameterMap.value(
currentLabel->id().toUpper() );<br>
<br>
if ( title.isEmpty() )<br>
{<br>
//remove exported labels not referenced in
the request<br>
if ( !currentLabel->id().isEmpty() )<br>
{<br>
c->removeItem( currentLabel );<br>
delete currentLabel;<br>
}<br>
continue;<br>
}<br>
<br>
currentLabel->setText( title );<br>
currentLabel->adjustSizeToText();<br>
}<br>
<br>
This code is used to draw composer label with
value defined by the QGIS WMS Server Request
GetPrint.<br>
<br>
The bug defined in the issues #7894 <a
moz-do-not-send="true"
href="http://hub.qgis.org/issues/7894"
target="_blank">http://hub.qgis.org/issues/7894</a>
is probably du to the method adjustSizeToText()<br>
Someone can confim it ?<br>
<br>
Question for Marco, Why removed label, if the
request doesn't define a value ? Why not used the
default value ?<br>
<br>
Regards,<br>
René-Luc D'Hont<br>
3Liz<br>
</div>
</div>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a moz-do-not-send="true"
href="mailto:Qgis-developer@lists.osgeo.org"
target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/qgis-developer"
target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><span
class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote>
<span class="HOEnZb"><font color="#888888">
<br>
<br>
-- <br>
Dr. Marco Hugentobler<br>
Sourcepole - Linux & Open Source Solutions<br>
Weberstrasse 5, CH-8004 Zürich, Switzerland<br>
<a moz-do-not-send="true"
href="mailto:marco.hugentobler@sourcepole.ch"
target="_blank">marco.hugentobler@sourcepole.ch</a>
<a moz-do-not-send="true"
href="http://www.sourcepole.ch" target="_blank">http://www.sourcepole.ch</a><br>
Technical Advisor QGIS Project Steering Committee<br>
<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a moz-do-not-send="true"
href="mailto:Qgis-developer@lists.osgeo.org"
target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/qgis-developer"
target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</font></span></blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Dr. Marco Hugentobler
Sourcepole - Linux & Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
<a class="moz-txt-link-abbreviated" href="mailto:marco.hugentobler@sourcepole.ch">marco.hugentobler@sourcepole.ch</a> <a class="moz-txt-link-freetext" href="http://www.sourcepole.ch">http://www.sourcepole.ch</a>
Technical Advisor QGIS Project Steering Committee </pre>
</body>
</html>