[QGIS-Developer] Re-sizing legend item

2022-02-10 Thread Brian Haynes
I am attempting to display a legend for a mesh map layer in a custom QGIS 
application (3.20 Odense, C++). I've previously just added the layer tree view 
to a dock widget, but it took too much space and the color ramp displayed was 
still too small. This time I'm using the QgsLayout class to hopefully resize 
the legend and layout. A code excerpt and the image of my app is below; as you 
can see you can hardly make out the legend at the bottom. Is there any other 
way to make the legend bigger? My next idea is to find the bounding box for the 
legend, take a snapshot, and add as a QPixmap/QLabel widget.

QgsLayout *lay = new QgsLayout(prj->instance()); //prj = QgsProject
lay->setUnits(QgsUnitTypes::LayoutPixels);
QgsLayoutItemLegend *legend = new QgsLayoutItemLegend(lay);
legend->setAutoUpdateModel(false);
QgsLayerTree *tree = legend->model()->rootGroup();

for ( QgsMapLayer *mlay: prj->instance()->mapLayers() )
{
if ( mlay->type() != QgsMapLayerType::MeshLayer )
{
tree->removeLayer(mlay);
}
}

QgsLegendSettings lset = legend->legendSettings();
QgsLegendRenderer rend(legend->model(),lset);

for ( QgsLayerTreeNode *node: tree->children() )
{
rend.setNodeLegendStyle(node,QgsLegendStyle::Hidden);
}

legend->sizeWithUnits().setUnits(QgsUnitTypes::LayoutPixels);
legend->sizeWithUnits().setWidth(400);
legend->sizeWithUnits().setHeight(100);
lay->addLayoutItem(legend);
lay->refresh();
QgsLayoutView *view = new QgsLayoutView();
view->setCurrentLayout(lay);
ui->gridLayout->addWidget(view);


[enter image description here]

Brian
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] (no subject)

2022-02-10 Thread DelazJ
Le jeu. 10 févr. 2022 à 13:32, Stefano Campus  a écrit :

> thank you for your quick reply.
>
> the previous tag strings are untranslated, as you can see in [1],
>

Not sure if you wanted to add a link here (something like the Processing
tags [0]), or were referring to your initial image...


> so do you suggest to translate also  the old tags?
>

I'd say "Yes" if you want Italian users to find things using italian words
everywhere

in this way, do the function/modules of Processing and Expression are
> searchable both in english and italian?
>
> For Expression functions, yes! The way it's implemented, you could use
both English and translated tags (if any) to find a function.
For Processing, if I understood correctly, it uses a single language. If
you want both English and Italian tags to be used for search, you need to
keep source strings and add translated ones to the list in Transifex. If
there's no translation or translation == source as in [0] e.g., then only
English words are used for search.

[0]
https://www.transifex.com/qgis/QGIS/translate/#it/qgis-application/115113643?q=text%3Asplit

Hope that clarifies (and that I'm correct),
Harrissou

> please sorry for these questions maybe trivial...
>
> s.
>
>
> Il giorno gio 10 feb 2022 alle ore 13:03 DelazJ  ha
> scritto:
>
>> Hi stefano, all
>>
>> These are indeed search tags for expression functions implemented in [0]
>> and pushed as single words to be translated in Transifex.
>> I wonder if it's better for translators to have single (somehow)
>> uncontextualised string to translate [1], or whether we should display the
>> list of words to translate, as done for Processing tags.
>>
>> [0] https://github.com/qgis/QGIS/pull/46743
>> [1] https://github.com/qgis/QGIS/pull/33197#pullrequestreview-325964668
>>
>> Regards,
>> Harrissou
>>
>> Le jeu. 10 févr. 2022 à 12:36, Stefano Campus  a
>> écrit :
>>
>>> ciao,
>>> a few days ago about 600 new strings were added to Transifex to be
>>> translated.
>>> Most of these strings are a single word whose context is: [1]
>>> Context: QgsExpression
>>> Resource: qgis-application
>>>
>>> As an Italian translation group we can't figure out exactly what they
>>> are; they look like search tags.
>>> Do you think they should be translated or not?
>>>
>>> [1] https://ibb.co/0DyLSkv
>>>
>>> thank you
>>>
>>> s.
>>> ___
>>> QGIS-Developer mailing list
>>> QGIS-Developer@lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] (no subject)

2022-02-10 Thread Stefano Campus
thank you for your quick reply.

the previous tag strings are untranslated, as you can see in [1],
so do you suggest to translate also  the old tags?
in this way, do the function/modules of Processing and Expression are
searchable both in english and italian?

please sorry for these questions maybe trivial...

s.


Il giorno gio 10 feb 2022 alle ore 13:03 DelazJ  ha
scritto:

> Hi stefano, all
>
> These are indeed search tags for expression functions implemented in [0]
> and pushed as single words to be translated in Transifex.
> I wonder if it's better for translators to have single (somehow)
> uncontextualised string to translate [1], or whether we should display the
> list of words to translate, as done for Processing tags.
>
> [0] https://github.com/qgis/QGIS/pull/46743
> [1] https://github.com/qgis/QGIS/pull/33197#pullrequestreview-325964668
>
> Regards,
> Harrissou
>
> Le jeu. 10 févr. 2022 à 12:36, Stefano Campus  a
> écrit :
>
>> ciao,
>> a few days ago about 600 new strings were added to Transifex to be
>> translated.
>> Most of these strings are a single word whose context is: [1]
>> Context: QgsExpression
>> Resource: qgis-application
>>
>> As an Italian translation group we can't figure out exactly what they
>> are; they look like search tags.
>> Do you think they should be translated or not?
>>
>> [1] https://ibb.co/0DyLSkv
>>
>> thank you
>>
>> s.
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] (no subject)

2022-02-10 Thread DelazJ
Hi stefano, all

These are indeed search tags for expression functions implemented in [0]
and pushed as single words to be translated in Transifex.
I wonder if it's better for translators to have single (somehow)
uncontextualised string to translate [1], or whether we should display the
list of words to translate, as done for Processing tags.

[0] https://github.com/qgis/QGIS/pull/46743
[1] https://github.com/qgis/QGIS/pull/33197#pullrequestreview-325964668

Regards,
Harrissou

Le jeu. 10 févr. 2022 à 12:36, Stefano Campus  a écrit :

> ciao,
> a few days ago about 600 new strings were added to Transifex to be
> translated.
> Most of these strings are a single word whose context is: [1]
> Context: QgsExpression
> Resource: qgis-application
>
> As an Italian translation group we can't figure out exactly what they are;
> they look like search tags.
> Do you think they should be translated or not?
>
> [1] https://ibb.co/0DyLSkv
>
> thank you
>
> s.
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] (no subject)

2022-02-10 Thread Stefano Campus
ciao,
a few days ago about 600 new strings were added to Transifex to be
translated.
Most of these strings are a single word whose context is: [1]
Context: QgsExpression
Resource: qgis-application

As an Italian translation group we can't figure out exactly what they are;
they look like search tags.
Do you think they should be translated or not?

[1] https://ibb.co/0DyLSkv

thank you

s.
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Server: wording WFS3 / OGC API - Features

2022-02-10 Thread Alessandro Pasotti
Yes, definitely.

Also the mention of "Draft" should be now removed.



On Thu, Feb 10, 2022 at 12:14 PM pathmapper  wrote:

> Hi,
>
> currently the term "WFS3" is still used for the standard QGIS Server
> "OGC API - Features" landing page URL:
>
> http://localhost/qgisserver/wfs3
>
> and the docs:
>
> https://docs.qgis.org/testing/en/docs/server_manual/services/ogcapif.html
>
> Looks like WFS3 is not the official OGC wording anymore, also GDAL
> renamed the driver:
> https://gdal.org/drivers/vector/oapif.html
>
> Should we also go ahead and drop the use of the term "WFS3"?
>
> Cheers,
> Bjoern
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>


-- 
Alessandro Pasotti
QCooperative:  www.qcooperative.net
ItOpen:   www.itopen.it
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] Server: wording WFS3 / OGC API - Features

2022-02-10 Thread pathmapper

Hi,

currently the term "WFS3" is still used for the standard QGIS Server 
"OGC API - Features" landing page URL:


http://localhost/qgisserver/wfs3

and the docs:

https://docs.qgis.org/testing/en/docs/server_manual/services/ogcapif.html

Looks like WFS3 is not the official OGC wording anymore, also GDAL 
renamed the driver:

https://gdal.org/drivers/vector/oapif.html

Should we also go ahead and drop the use of the term "WFS3"?

Cheers,
Bjoern
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Installation Problem on Ubuntu Linux

2022-02-10 Thread WhereGroup

Hi Kim,

you posted this two weeks ago already and Andrea Giudiceandrea answered 
to you with


> it seems to me the capabilities XML file attached to your message has 
nothing wrong
> and demonstrates that the WMS served by QGIS is working correctly: 
the "airports",
> "places", "countries" and "countries_shapeburst" layers are exposed 
by the WMS.


The only new information you added now is

> I have also tried it with the QGIS directory within my home directory 
- no difference.


Have you actually tried to load the WMS server you created as a WMS 
server in QGIS? A web browser does not know WMS, it just sees the 
messages used by WMS (in XML) and does not know anything special (or 
spatial) about it. To use a WMS you need a client capable of "speaking" 
WMS, such as QGIS.


Please be aware that this is the developers mailing list, user questions 
might be more suitable for qgis-user. :)


Cheers, Hannes

Am 10.02.22 um 08:43 schrieb Kim Lyon:

Hi,
 I have a basic installation problem with QGIS.

I am setting up an Intel server running Ubuntu Linux 20.04 with an 
Apache2 HTTP server for our local volunteer Bush Fire Brigades in 
Margaret River, Western Australia.


Everything seems to be operational with the exception of QGIS on the 
HTML \ HTTP web server side.


I have created a separate QGIS directory in the home directory area 
and have set the user and group ownership to the operating user and 
group (administrator). There do not seem to be any permissions problems.


Within this directory I have placed the projects directory and there 
is a qgisserverdb directory.


The default .qgs file is set to /home/qgis/projects/world.qgs .

I have also tried it with the QGIS directory within my home directory 
- no difference.


The QGIS desktop application is installed and is running ok. It 
displays the world.qgs file without any problems with the exception of 
an older version warning.


If I use either URL

http://qgis/cgi-bin/qgis_mapserv.fcgi?service=WMS&request=GetCapabilities

or

http://qgis/cgi-bin/qgis_mapserv.fcgi?service=WMS&request=GetCapabilities&map=/home/qgis/projects/world.qgs

in the browser (Chromium or Firefox) I get the following error message :-

   This XML file does not appear to have any style information 
associated with it. The document tree is shown below.


followed by the attached XML file.

How do I solve this problem? I have looked extensively on the Internet 
and have not been able to find a solution.


Many Thanks

Yours Sincerely

Kim Lyon

kim.lyon@baremetal.systems

MargaretRiver.info 





___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer


--
Johannes Kröger / GIS-Entwickler/-Berater
WhereGroup GmbH
Grevenweg 89
20537 Hamburg
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
---

-
Schon gewusst?

In unserem Blog geben wir Tipps & Tricks zu
 Open-Source-GIS-Software
und berichten aus unserem Experten-Alltag:
https://wheregroup.com/blog/
-



OpenPGP_0xBF7B268A77C202D5.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer