RE: [ROOT] Signals from the TBrowser.

From: Faine, Valeri (fine@bnl.gov)
Date: Fri Jan 03 2003 - 01:19:19 MET


Hello Clark,

With Qt/ROOT implementation (http://root.bnl.gov) 
all items of TBrowser are the instances either
TQtBrowserItem (for the left pane) or TQtIconBrowserItem (for the right
pane). They are in turn the subclasses of the Qt provided 
  QListViewItem (http://doc.trolltech.com/3.1/qlistviewitem.html )
Or
  QIconViewItem (http://doc.trolltech.com/3.1/qiconviewitem.html ).

This means if the user is "interacting" with Qt-based TBrowser it is
emitting the regular Qt signals. Those can be connected with the user'
slots.

In your particular case the Qt signals:
http://doc.trolltech.com/3.1/qiconview.html#clicked 
or 
http://doc.trolltech.com/3.0/qlistview.html#clicked

could have made the job.  Of course the other Qt signals can be used
also.

On other hand to enjoy this solution you are required to install (and
learn :-) Qt. (see: http://root.bnl.gov/QtRoot/QtRoot.html#free )


        Hope this helps.

                     My best regards. Valeri


> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]
> On Behalf Of Clark McGrew
> Sent: Monday, December 30, 2002 11:59 AM
> To: RootTalk mailing list
> Subject: [ROOT] Signals from the TBrowser.
> 
> Hello,
> 
> I hope I haven't missed this in the manual, or examples page.  I'm
> building an event browser and would like to leverage the TBrowser
> class.  But, I need some sort of signal or callback to indicate that
an
> object has been selected.  Does the browser a generic object selected
> signal, for instance Emit("ObjectBrowsed(TObject* obj)", theObject)?
> 
> For my own objects, I can generate a signal by placing an Emit in the
> Browse method; however, I would also like to know when a TFile is
opened
> from the menu or selected so that I can check if it contains event
> information.  I could get a similar effect by adding a mime action for
> my files, but I think that means picking a "magic" file name and
looses
> the ability of opening them from the browser menu.  Is there a signal
> that I can connect which will tell me when a file is opened from the
> browser?
> 
> Thanks,
> Clark
> --
> Clark McGrew	                State University of New York, Stony
> Brook
> (clark.mcgrew@sunysb.edu)	631-632-8299 (office)



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:08 MET