Re: [Qgis-developer] Re: python plugin and layer properties window

2011-07-25 Thread Marco Hugentobler
Hi Michael

Thanks for the notification, the signals are changed now.

Regards,
Marco

Am Montag, 25. Juli 2011, 15.29:33 schrieb Michael Pfeiffer:
> Hey Marco,
> 
> is it possible that the signals are inverted?
> 
> /void QgsComposerView::hideEvent( QHideEvent* e )
> {
>   emit( composerViewShow( this ) );
>   e->ignore();
> }
> void QgsComposerView::showEvent( QShowEvent* e )
> {
>   emit( composerViewHide( this ) );
>   e->ignore();
> }/
> 
> The composerViewShow signal is sent with the hideEvent and vice versa.
> 
> I think this should be inverse or am I wrong?
> 
> regards
> 
> Michael
> 
> 
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/python-plugin-and-layer-properties-
> window-tp6383931p6618303.html Sent from the qgis-developer mailing list
> archive at Nabble.com.
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


-- 
Dr. Marco Hugentobler
Sourcepole -  Linux & Open Source Solutions
Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Re: python plugin and layer properties window

2011-07-25 Thread Michael Pfeiffer
Hey Marco,

is it possible that the signals are inverted?

/void QgsComposerView::hideEvent( QHideEvent* e )
{
  emit( composerViewShow( this ) );
  e->ignore();
}
void QgsComposerView::showEvent( QShowEvent* e )
{
  emit( composerViewHide( this ) );
  e->ignore();
}/

The composerViewShow signal is sent with the hideEvent and vice versa.

I think this should be inverse or am I wrong?

regards 

Michael


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/python-plugin-and-layer-properties-window-tp6383931p6618303.html
Sent from the qgis-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] Re: python plugin and layer properties window

2011-07-01 Thread ludovic mercier

Hi,

the problem for me is to get the pointer of PropertiesWindows in a plugin.
I don't found in the doc how to get this with the QgsAppInterface.
I would connect the finish signal of Layer Properties dialog or another signal (which get a change in layer properties 
like render change single -> three band) to a method of my python plugin.


Regards

Ludovic

Le 15/06/2011 11:48, Camilo Polymeris a écrit :


Hello,
I am not sure I understand the question correctly, but:

Do none of the provided signals work for you, like
QMainWindow::destroyed() or QgsComposerView::finished() perhaps?
Or just QDialog::finished(int) in the case of the Layer Properties dialog?

You can get a pointer to those structures through QgsAppInterface, I
think. There is the activeComposers list, and, of course, the
mainWindow pointer.

Regards,
Camilo
___
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] Re: python plugin and layer properties window

2011-07-01 Thread ludovic mercier

Hi,

the problem for me is to get the pointer of PropertiesWindows in a plugin.
I don't found in the doc how to get this with the QgsAppInterface.
I would connect the finish signal of Layer Properties dialog or another signal (which get a change in layer properties 
like render change single -> three band) to a method of my python plugin.


Regards

Ludovic

Le 15/06/2011 11:48, Camilo Polymeris a écrit :


Hello,
I am not sure I understand the question correctly, but:

Do none of the provided signals work for you, like
QMainWindow::destroyed() or QgsComposerView::finished() perhaps?
Or just QDialog::finished(int) in the case of the Layer Properties dialog?

You can get a pointer to those structures through QgsAppInterface, I
think. There is the activeComposers list, and, of course, the
mainWindow pointer.

Regards,
Camilo
___
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


[Qgis-developer] Re: python plugin and layer properties window

2011-06-30 Thread Michael Pfeiffer
Thx a lot Marco

Regards,

Michael

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/python-plugin-and-layer-properties-window-tp6383931p6533538.html
Sent from the qgis-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] Re: python plugin and layer properties window

2011-06-30 Thread Marco Hugentobler
Hi Michael

Commit 4d051b8b32dc4fc85f59 introduces the signals 
QgsComposerView::composerViewShow and QgsComposerView::composerViewHide.

Regards,
Marco

Am Donnerstag, 30. Juni 2011, 11.29:00 schrieb Michael Pfeiffer:
> Hi Marco,
> 
> >> What do you exactly mean with composer window class?
> >> QgsComposerView or QgsComposerView.composerWindow() = QMainWindow?
> >
> >As the signal would be needed for Plugins, I thought about adding it to
> >QgsComposerView class. Do you need any additional information coming with
> 
> the
> 
> >signal (e.g. which composerview it is)?
> 
> Not at the moment.  But I think knowing which composerView it is could be
> useful some day.
> So am I understanding you right that this is sth for the core and not for
> solving in the PlugIn?
> 
> >> And is it right that the Map Composer is automatically opening after
> >> calling /self.iface.actionPrintComposer().trigger()/
> >> so using the composerWindow() isn't necessary?
> >
> >composerWindow() is useful whenever you need to get a pointer to the
> >window (trigger() only opens a new one but then you don't have a
> >pointer).
> 
> thx
> 
> Regards,
> 
> Michael
> 
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/python-plugin-and-layer-properties-
> window-tp6383931p6532468.html Sent from the qgis-developer mailing list
> archive at Nabble.com.
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


-- 
Dr. Marco Hugentobler
Sourcepole -  Linux & Open Source Solutions
Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Re: python plugin and layer properties window

2011-06-30 Thread Marco Hugentobler
> So am I understanding you right that this is sth for the core and not for
> solving in the PlugIn?

Yes, for core (more precisely gui). The plugin will then just need to catch 
the signal.

Regards,
Marco

Am Donnerstag, 30. Juni 2011, 11.29:00 schrieb Michael Pfeiffer:
> Hi Marco,
> 
> >> What do you exactly mean with composer window class?
> >> QgsComposerView or QgsComposerView.composerWindow() = QMainWindow?
> >
> >As the signal would be needed for Plugins, I thought about adding it to
> >QgsComposerView class. Do you need any additional information coming with
> 
> the
> 
> >signal (e.g. which composerview it is)?
> 
> Not at the moment.  But I think knowing which composerView it is could be
> useful some day.
> So am I understanding you right that this is sth for the core and not for
> solving in the PlugIn?
> 
> >> And is it right that the Map Composer is automatically opening after
> >> calling /self.iface.actionPrintComposer().trigger()/
> >> so using the composerWindow() isn't necessary?
> >
> >composerWindow() is useful whenever you need to get a pointer to the
> >window (trigger() only opens a new one but then you don't have a
> >pointer).
> 
> thx
> 
> Regards,
> 
> Michael
> 
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/python-plugin-and-layer-properties-
> window-tp6383931p6532468.html Sent from the qgis-developer mailing list
> archive at Nabble.com.
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


-- 
Dr. Marco Hugentobler
Sourcepole -  Linux & Open Source Solutions
Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Re: python plugin and layer properties window

2011-06-30 Thread Michael Pfeiffer
Hi Marco,

>> What do you exactly mean with composer window class?
>> QgsComposerView or QgsComposerView.composerWindow() = QMainWindow?
>
>As the signal would be needed for Plugins, I thought about adding it to
>QgsComposerView class. Do you need any additional information coming with
the
>signal (e.g. which composerview it is)?
>

Not at the moment.  But I think knowing which composerView it is could be
useful some day.
So am I understanding you right that this is sth for the core and not for
solving in the PlugIn?

>> And is it right that the Map Composer is automatically opening after
>> calling /self.iface.actionPrintComposer().trigger()/
>> so using the composerWindow() isn't necessary?
>
>composerWindow() is useful whenever you need to get a pointer to the window
>(trigger() only opens a new one but then you don't have a pointer).
>

thx

Regards,

Michael

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/python-plugin-and-layer-properties-window-tp6383931p6532468.html
Sent from the qgis-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] Re: python plugin and layer properties window

2011-06-30 Thread Marco Hugentobler
Hi Michael

> What do you exactly mean with composer window class?
> QgsComposerView or QgsComposerView.composerWindow() = QMainWindow?

As the signal would be needed for Plugins, I thought about adding it to 
QgsComposerView class. Do you need any additional information coming with the 
signal (e.g. which composerview it is)?

> And is it right that the Map Composer is automatically opening after
> calling /self.iface.actionPrintComposer().trigger()/
> so using the composerWindow() isn't necessary?

composerWindow() is useful whenever you need to get a pointer to the window 
(trigger() only opens a new one but then you don't have a pointer).

Regards,
Marco

Am Donnerstag, 30. Juni 2011, 10.25:47 schrieb Michael Pfeiffer:
> Hi Marco,
> 
> thx for your answer.
> What do you exactly mean with composer window class?
> QgsComposerView or QgsComposerView.composerWindow() = QMainWindow?
> And is it right that the Map Composer is automatically opening after
> calling /self.iface.actionPrintComposer().trigger()/
> so using the composerWindow() isn't necessary?
> 
> thx
> 
> Regards
> 
> Michael
> 
> 
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/python-plugin-and-layer-properties-
> window-tp6383931p6532300.html Sent from the qgis-developer mailing list
> archive at Nabble.com.
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


-- 
Dr. Marco Hugentobler
Sourcepole -  Linux & Open Source Solutions
Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Re: python plugin and layer properties window

2011-06-30 Thread Michael Pfeiffer
Hi Marco,

thx for your answer.
What do you exactly mean with composer window class?
QgsComposerView or QgsComposerView.composerWindow() = QMainWindow?
And is it right that the Map Composer is automatically opening after calling
/self.iface.actionPrintComposer().trigger()/
so using the composerWindow() isn't necessary?

thx

Regards

Michael


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/python-plugin-and-layer-properties-window-tp6383931p6532300.html
Sent from the qgis-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] Re: python plugin and layer properties window

2011-06-29 Thread Marco Hugentobler
Hi Michael

The composer window is not destroyed on close (only if it is deleted 
explicitely in the composer manager).

One possible solution would be to add a signal to the composer window class 
which is emited in the close event.

Regards,
Marco

Am Mittwoch, 29. Juni 2011, 09.57:32 schrieb Michael Pfeiffer:
> yes the QMainWindow::destroyed() Signal does work but the problem is it is
> only sending the signal when closing QGIS and not when closing the composer
> Window.
> Here is the code for this:
> 
> /beforeList = self.iface.activeComposers()
> comp = self.iface.actionPrintComposer()
> comp.trigger()
> afterList = self.iface.activeComposers()
> 
> self.diffList = []
> for item in afterList:
>if not item in  beforeList:
>   self.diffList.append(item)
> 
> self.composerView = self.diffList[0]
> composerWindow = self.composerView.composerWindow()
> print self.composerView.composerWindow()
> 
> QObject.connect(composerWindow, SIGNAL("destroyed()"), self.test)
> 
> def test(self):
>print "it works"
> /
> 
> So I need a kind of signal which is sent when you close the mapcomposer
> window with the x.
> I know that composerView must be still present after closing the
> mapcomposer window for the composer list.
> But where builts QGIS the UI you need for the mapcomposer window?
> And how can I get it for listening on the close Event?
> 
> regards,
> 
> Michael
> 
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/python-plugin-and-layer-properties-
> window-tp6383931p6528058.html Sent from the qgis-developer mailing list
> archive at Nabble.com.
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


-- 
Dr. Marco Hugentobler
Sourcepole -  Linux & Open Source Solutions
Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Re: python plugin and layer properties window

2011-06-29 Thread Michael Pfeiffer
yes the QMainWindow::destroyed() Signal does work but the problem is it is
only sending the signal when closing QGIS and not when closing the composer
Window.
Here is the code for this:

/beforeList = self.iface.activeComposers()
comp = self.iface.actionPrintComposer()
comp.trigger()
afterList = self.iface.activeComposers()

self.diffList = []
for item in afterList:
   if not item in  beforeList:
  self.diffList.append(item)

self.composerView = self.diffList[0]
composerWindow = self.composerView.composerWindow()
print self.composerView.composerWindow()

QObject.connect(composerWindow, SIGNAL("destroyed()"), self.test) 

def test(self):
   print "it works"
/

So I need a kind of signal which is sent when you close the mapcomposer
window with the x.
I know that composerView must be still present after closing the mapcomposer
window for the composer list.
But where builts QGIS the UI you need for the mapcomposer window?
And how can I get it for listening on the close Event?

regards,

Michael

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/python-plugin-and-layer-properties-window-tp6383931p6528058.html
Sent from the qgis-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] Re: python plugin and layer properties window

2011-06-15 Thread Camilo Polymeris
On Thu, Jun 9, 2011 at 5:18 AM, Michael Pfeiffer
 wrote:
> Hi everybody,
>
> no hints for this problem?
> I have the same problem with the mapcomposer window.
> When closing the mapcomposer window I want to get the close signal or close
> event of the window.
> I need this because I want to switch of some things in the map canvas
> automatically which I switched on when the user clicked the "Map Button" in
> the GUI.
>

Hello,
I am not sure I understand the question correctly, but:

Do none of the provided signals work for you, like
QMainWindow::destroyed() or QgsComposerView::finished() perhaps?
Or just QDialog::finished(int) in the case of the Layer Properties dialog?

You can get a pointer to those structures through QgsAppInterface, I
think. There is the activeComposers list, and, of course, the
mainWindow pointer.

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


[Qgis-developer] Re: python plugin and layer properties window

2011-06-09 Thread Michael Pfeiffer
Hi everybody,

no hints for this problem?
I have the same problem with the mapcomposer window.
When closing the mapcomposer window I want to get the close signal or close
event of the window.
I need this because I want to switch of some things in the map canvas
automatically which I switched on when the user clicked the "Map Button" in
the GUI.

thx in advance

Michael

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/python-plugin-and-layer-properties-window-tp6383931p6457108.html
Sent from the qgis-developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer