Re: query to tcanvas

From: feverati <feverati_at_lapp.in2p3.fr>
Date: Fri, 15 Apr 2011 09:03:21 +0200


Hi Bernard,

thank you for your help. Still, I fail to understand how to realise the connection: the function Connect() needs a sender (in my case it will be the canvas) and a receiver. Who is the receiver? In my case the signal should be made available to the main part of the C++/ROOT code, not to another class.
Best regards

Giovanni

On 04/12/2011 12:32 PM, Fabbro Bernard wrote:
> Hi Giovanni,
>
> The TCanvas::Closed() signal could be a way to test if a canvas was open. If the canvas is being closed (by a mouse click for example), it emits a signal that can be received by other classes via the Connect(...) method. If this signal has not been emitted, the canvas is open. See ROOT documentation: "Event Processing: Signals and Slots" (p.400-404):
> ftp://root.cern.ch/root/doc/25WritingGUI.pdf
>
> Cheers,
> Bernard
>
> -----Message d'origine-----
> De : owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch] De la part de feverati
> Envoyé : mardi 12 avril 2011 10:50
> À : roottalk_at_root.cern.ch
> Objet : [ROOT] query to tcanvas
>
> Hi all
>
> is there a way to query root about a canvas being "opened"?
> What I mean is something like
> if (cc isopened){ ... }
> else{ .... }
>
> and cc is my canvas
> TCanvas *cc= ....
>
> Thank you
>
> Giovanni
>
Received on Fri Apr 15 2011 - 09:03:28 CEST

This archive was generated by hypermail 2.2.0 : Fri Apr 15 2011 - 17:50:01 CEST