ROOT  6.06/09
Reference Guide
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Friends | List of all members
TQObject Class Reference

This is the ROOT implementation of the Qt object communication mechanism (see also http://www.troll.no/qt/metaobjects.html)

Signals and slots are used for communication between objects. When an object has changed in some way that might be interesting for the outside world, it emits a signal to tell whoever is listening. All slots that are connected to this signal will be activated (called). It is even possible to connect a signal directly to another signal (this will emit the second signal immediately whenever the first is emitted.) There is no limitation on the number of slots that can be connected to a signal. The slots will be activated in the order they were connected to the signal. This mechanism allows objects to be easily reused, because the object that emits a signal does not need to know to which objects the signals are connected. Together, signals and slots make up a powerfull component programming mechanism.

Signals

Signal emitted when object is destroyed. This signal could be connected to some garbage-collector object.

ChangedBy(const char *method_name)

This signal is emitted when some important data members of the object were changed. method_name parameter can be used as an identifier of the modifier method.

Message(const char *msg)

General purpose message signal

Definition at line 53 of file TQObject.h.

Public Member Functions

 TQObject ()
 TQObject Constructor. More...
 
virtual ~TQObject ()
 TQObject Destructor. More...
 
TListGetListOfClassSignals () const
 Returns pointer to list of signals of this class. More...
 
TListGetListOfSignals () const
 
TListGetListOfConnections () const
 
Bool_t AreSignalsBlocked () const
 
Bool_t BlockSignals (Bool_t b)
 
void CollectClassSignalLists (TList &list, TClass *cls)
 Collect class signal lists from class cls and all its base-classes. More...
 
template<typename... T>
void EmitVA (const char *signal_name, Int_t, const T &...params)
 
void EmitVA (const char *signal, Int_t nargs, va_list va)=delete
 
void Emit (const char *signal)
 Acitvate signal without args. More...
 
void Emit (const char *signal, Long_t *paramArr)
 Emit a signal with a varying number of arguments, paramArr is an array of the parameters. More...
 
void Emit (const char *signal, const char *params)
 Activate signal with parameter text string. More...
 
void Emit (const char *signal, Double_t param)
 Activate signal with single parameter. More...
 
void Emit (const char *signal, Long_t param)
 Activate signal with single parameter. More...
 
void Emit (const char *signal, Long64_t param)
 Activate signal with single parameter. More...
 
void Emit (const char *signal, Bool_t param)
 
void Emit (const char *signal, Char_t param)
 
void Emit (const char *signal, UChar_t param)
 
void Emit (const char *signal, Short_t param)
 
void Emit (const char *signal, UShort_t param)
 
void Emit (const char *signal, Int_t param)
 
void Emit (const char *signal, UInt_t param)
 
void Emit (const char *signal, ULong_t param)
 
void Emit (const char *signal, ULong64_t param)
 
void Emit (const char *signal, Float_t param)
 
Bool_t Connect (const char *signal, const char *receiver_class, void *receiver, const char *slot)
 Non-static method is used to connect from the signal of this object to the receiver slot. More...
 
Bool_t Disconnect (const char *signal=0, void *receiver=0, const char *slot=0)
 Disconnects signal of this object from slot of receiver. More...
 
virtual void HighPriority (const char *signal_name, const char *slot_name=0)
 
virtual void LowPriority (const char *signal_name, const char *slot_name=0)
 
virtual Bool_t HasConnection (const char *signal_name) const
 Return true if there is any object connected to this signal. More...
 
virtual Int_t NumberOfSignals () const
 Return number of signals for this object. More...
 
virtual Int_t NumberOfConnections () const
 Return number of connections for this object. More...
 
virtual void Connected (const char *)
 
virtual void Disconnected (const char *)
 
virtual void Destroyed ()
 
virtual void ChangedBy (const char *method)
 
virtual void Message (const char *msg)
 

Static Public Member Functions

static Bool_t Connect (TQObject *sender, const char *signal, const char *receiver_class, void *receiver, const char *slot)
 Create connection between sender and receiver. More...
 
static Bool_t Connect (const char *sender_class, const char *signal, const char *receiver_class, void *receiver, const char *slot)
 This method allows to make a connection from any object of the same class to a single slot. More...
 
static Bool_t Disconnect (TQObject *sender, const char *signal=0, void *receiver=0, const char *slot=0)
 Disconnects signal in object sender from slot_method in object receiver. More...
 
static Bool_t Disconnect (const char *class_name, const char *signal, void *receiver=0, const char *slot=0)
 Disconnects "class signal". More...
 
static Bool_t AreAllSignalsBlocked ()
 Returns true if all signals are blocked. More...
 
static Bool_t BlockAllSignals (Bool_t b)
 Block or unblock all signals. Returns the previous block status. More...
 

Protected Member Functions

virtual voidGetSender ()
 
virtual const char * GetSenderClassName () const
 

Static Protected Member Functions

static Bool_t ConnectToClass (TQObject *sender, const char *signal, TClass *receiver_class, void *receiver, const char *slot)
 Create connection between sender and receiver. More...
 
static Bool_t ConnectToClass (const char *sender_class, const char *signal, TClass *receiver_class, void *receiver, const char *slot)
 This method allows to make connection from any object of the same class to the receiver object. More...
 
static Int_t CheckConnectArgs (TQObject *sender, TClass *sender_class, const char *signal, TClass *receiver_class, const char *slot)
 Checking of consitency of sender/receiver methods/arguments. More...
 
static TString CompressName (const char *method_name)
 

Protected Attributes

TListfListOfSignals
 
TListfListOfConnections
 list of signals from this object More...
 
Bool_t fSignalsBlocked
 list of connections to this object More...
 

Static Protected Attributes

static Bool_t fgAllSignalsBlocked = kFALSE
 flag used for suppression of signals More...
 

Private Member Functions

 TQObject (const TQObject &tqo)
 
TQObjectoperator= (const TQObject &tqo)
 

Friends

class TQConnection
 

#include <TQObject.h>

+ Inheritance diagram for TQObject:
+ Collaboration diagram for TQObject:

Constructor & Destructor Documentation

TQObject::TQObject ( const TQObject tqo)
private
TQObject::TQObject ( )

TQObject Constructor.

Comment:

  • In order to minimize memory allocation fListOfSignals and fListOfConnections are allocated only if it is neccesary
  • When fListOfSignals/fListOfConnections are empty they will be deleted

Definition at line 391 of file TQObject.cxx.

TQObject::~TQObject ( )
virtual

TQObject Destructor.

  • delete all connections and signal list

Definition at line 402 of file TQObject.cxx.

Member Function Documentation

Bool_t TQObject::AreAllSignalsBlocked ( )
static

Returns true if all signals are blocked.

Definition at line 1315 of file TQObject.cxx.

Bool_t TQObject::AreSignalsBlocked ( ) const
inline

Definition at line 97 of file TQObject.h.

Bool_t TQObject::BlockAllSignals ( Bool_t  b)
static

Block or unblock all signals. Returns the previous block status.

Definition at line 1323 of file TQObject.cxx.

Referenced by TROOT::~TROOT().

Bool_t TQObject::BlockSignals ( Bool_t  b)
inline

Definition at line 98 of file TQObject.h.

virtual void TQObject::ChangedBy ( const char *  method)
inlinevirtual
Int_t TQObject::CheckConnectArgs ( TQObject sender,
TClass sender_class,
const char *  signal,
TClass receiver_class,
const char *  slot 
)
staticprotected

Checking of consitency of sender/receiver methods/arguments.

Returns -1 on error, otherwise number or arguments of signal function. Static method.

Definition at line 179 of file TQObject.cxx.

Referenced by Connect(), ConnectToClass(), and TSAXParser::ConnectToHandler().

void TQObject::CollectClassSignalLists ( TList list,
TClass cls 
)

Collect class signal lists from class cls and all its base-classes.

The recursive traversal is not performed for classes not deriving from TQClass.

Definition at line 449 of file TQObject.cxx.

Referenced by Emit(), and EmitVA().

static TString TQObject::CompressName ( const char *  method_name)
staticprotected
Bool_t TQObject::Connect ( const char *  signal,
const char *  receiver_class,
void receiver,
const char *  slot 
)

Non-static method is used to connect from the signal of this object to the receiver slot.

Warning! No check on consistency of sender/receiver classes/methods.

This method makes possible to have connection/signals from interpreted class. See also RQ_OBJECT.h.

Definition at line 1135 of file TQObject.cxx.

Referenced by TRootDialog::Add(), TRootGuiBuilder::AddAction(), TGToolBar::AddButton(), TGPack::AddFrameInternal(), TRootGuiBuilder::AddSection(), TGeoManager::Browse(), TBonjourBrowser::BrowseForServiceType(), TRootBrowserLite::BrowseTextFile(), TGTextEditor::Build(), TEveGValuator::Build(), TNewQueryDlg::Build(), TEveGDoubleValuator::Build(), TEveGTriVecValuator::Build(), TSessionServerFrame::Build(), TSessionFrame::Build(), TEditQueryFrame::Build(), TSessionQueryFrame::Build(), TSessionOutputFrame::Build(), TSessionViewer::Build(), TTreeViewer::BuildInterface(), TGuiBldDragManager::ChangeBackgroundColor(), TGuiBldDragManager::ChangeBarColor(), TGuiBldDragManager::ChangeProperties(), TGuiBldDragManager::ChangeTextColor(), TGuiBldDragManager::ChangeTextFont(), ClassImp(), TEveViewerList::Connect(), TStyleManager::ConnectAll(), ConnectCINT(), TStyleManager::ConnectEditor(), TProofChain::ConnectProof(), TGeoManagerEditor::ConnectSelected(), TEveGListTreeEditorFrame::ConnectSignals(), TArrowEditor::ConnectSignals2Slots(), TCurlyArcEditor::ConnectSignals2Slots(), TPieSliceEditor::ConnectSignals2Slots(), TTextEditor::ConnectSignals2Slots(), TLineEditor::ConnectSignals2Slots(), TAttFillEditor::ConnectSignals2Slots(), TCurlyLineEditor::ConnectSignals2Slots(), TAttLineEditor::ConnectSignals2Slots(), TFrameEditor::ConnectSignals2Slots(), TAttMarkerEditor::ConnectSignals2Slots(), TAttTextEditor::ConnectSignals2Slots(), TF1Editor::ConnectSignals2Slots(), TPaveStatsEditor::ConnectSignals2Slots(), TGraphEditor::ConnectSignals2Slots(), TPadEditor::ConnectSignals2Slots(), TPieEditor::ConnectSignals2Slots(), TGeoEltuEditor::ConnectSignals2Slots(), TGeoTranslationEditor::ConnectSignals2Slots(), TGeoTrd1Editor::ConnectSignals2Slots(), TGeoTubeEditor::ConnectSignals2Slots(), TGeoBBoxEditor::ConnectSignals2Slots(), TGeoTrd2Editor::ConnectSignals2Slots(), TGeoHypeEditor::ConnectSignals2Slots(), TGeoTorusEditor::ConnectSignals2Slots(), TGeoParaEditor::ConnectSignals2Slots(), TGeoConeEditor::ConnectSignals2Slots(), TGeoNodeEditor::ConnectSignals2Slots(), TGeoMaterialEditor::ConnectSignals2Slots(), TAxisEditor::ConnectSignals2Slots(), TGeoMediumEditor::ConnectSignals2Slots(), TGeoPconEditor::ConnectSignals2Slots(), TSpiderEditor::ConnectSignals2Slots(), TGeoSphereEditor::ConnectSignals2Slots(), TGeoTrapEditor::ConnectSignals2Slots(), TParallelCoordEditor::ConnectSignals2Slots(), TGL5DDataSetEditor::ConnectSignals2Slots(), TGeoVolumeEditor::ConnectSignals2Slots(), TH1Editor::ConnectSignals2Slots(), TGeoTubeSegEditor::ConnectSignals2Slots(), TGeoPconSection::ConnectSignals2Slots(), TGeoConeSegEditor::ConnectSignals2Slots(), TH2Editor::ConnectSignals2Slots(), TGLViewerEditor::ConnectSignals2Slots(), TGeoManagerEditor::ConnectSignals2Slots(), TGeoRotationEditor::ConnectSignals2Slots(), TGeoMixtureEditor::ConnectSignals2Slots(), TGeoCombiTransEditor::ConnectSignals2Slots(), TGeoVolumeDialog::ConnectSignalsToSlots(), TGeoShapeDialog::ConnectSignalsToSlots(), TGeoMediumDialog::ConnectSignalsToSlots(), TGeoMaterialDialog::ConnectSignalsToSlots(), TGeoMatrixDialog::ConnectSignalsToSlots(), TAdvancedGraphicsDialog::ConnectSlots(), TFitEditor::ConnectSlots(), TGedEditor::ConnectToCanvas(), TSAXParser::ConnectToHandler(), TGFileBrowser::CreateBrowser(), TRootBrowserLite::CreateBrowser(), TRootBrowser::CreateBrowser(), TRootCanvas::CreateCanvas(), TGLViewerEditor::CreateClippingTab(), TGLPShapeObjEditor::CreateColorControls(), TGLPShapeObjEditor::CreateColorRadioButtons(), TGLPShapeObjEditor::CreateColorSliders(), TGLViewerEditor::CreateExtrasTab(), TGLPShapeObjEditor::CreateGeoControls(), TEveDigitSetEditor::CreateInfoTab(), TEveTrackPropagatorSubEditor::CreateRefsContainer(), TGeoPconEditor::CreateSections(), TGLViewerEditor::CreateStyleTab(), TH1Editor::DoAddBar(), TH1Editor::DoAddSimple(), TStyleManager::DoEditionUpdatePreview(), TProofProgressDialog::DoEnableSpeedo(), TFitEditor::DoFit(), TFunctionParametersDialog::DoFix(), TH1Editor::DoHistChanges(), TH1Editor::DoHistSimple(), TProofProgressLog::DoLog(), TFitParametersDialog::DoParFix(), TStyleManager::DoPreview(), TFunctionParametersDialog::DoReset(), TFitParametersDialog::DoReset(), TGLSAViewer::EnableMenuBarHiding(), TGComboBox::EnableTextInput(), TGSplitFrame::ExtractFrame(), TGSplitTool::HandleButton(), TGSplitButton::HandleMenu(), TGLSAViewer::HandleMenuBarHiding(), TGSplitFrame::HSplit(), TProofProgressLog::Init(), TGComboBox::Init(), TGTable::Init(), TRecorderReplaying::Initialize(), TEveParamListEditor::InitModel(), TGButtonGroup::Insert(), TGMenuBar::Layout(), TGLAnnotation::MakeEditor(), TGLLightSetSubEditor::MakeLampButton(), TEveCaloLegoEditor::MakeRebinFrame(), TEveCaloVizEditor::MakeSliceInfo(), TGuiBldDragManager::Menu4Frame(), TGuiBldDragManager::Menu4Lasso(), TNewQueryDlg::OnBrowseChain(), TEditQueryFrame::OnBrowseChain(), TSessionServerFrame::OnBtnConnectClicked(), TSessionQueryFrame::OnBtnSubmit(), TGMenuBar::PopupConnection(), TFitEditor::RecursiveRemove(), TBonjourRegistrar::RegisterService(), TProofProgressDialog::ResetProgressDialog(), TSessionQueryFrame::ResetProgressDialog(), TBonjourResolver::ResolveBonjourRecord(), TGTextEdit::Search(), TGContainer::Search(), TProofCondor::SetActive(), TFitEditor::SetCanvas(), TGedEditor::SetGlobal(), TGListView::SetHeaders(), TGuiBldDragManager::SetPropertyEditor(), TGSplitButton::SetSplit(), TRootBrowserLite::SetViewMode(), TMemStatShow::Show(), TRootCanvas::ShowEditor(), TSessionViewer::ShowLog(), TRootBrowserLite::ShowMacroButtons(), TRootCanvas::ShowToolBar(), TTimer::SingleShot(), TTimer::Start(), TRecorderRecording::StartRecording(), TMVA::StatDialogBDT::StatDialogBDT(), TMVA::StatDialogBDTReg::StatDialogBDTReg(), TMVA::StatDialogMVAEffs::StatDialogMVAEffs(), TRootBrowser::StopEmbedding(), TEveArrowEditor::TEveArrowEditor(), TEveBrowser::TEveBrowser(), TEveCalo3DEditor::TEveCalo3DEditor(), TEveCaloLegoEditor::TEveCaloLegoEditor(), TEveCaloVizEditor::TEveCaloVizEditor(), TEveCompositeFrame::TEveCompositeFrame(), TEveCompositeFrameInMainFrame::TEveCompositeFrameInMainFrame(), TEveElementEditor::TEveElementEditor(), TEveGedNameFrame::TEveGedNameFrame(), TEveLineEditor::TEveLineEditor(), TEveManager::TEveManager(), TEvePointSetArrayEditor::TEvePointSetArrayEditor(), TEveProjectionAxesEditor::TEveProjectionAxesEditor(), TEveProjectionManagerEditor::TEveProjectionManagerEditor(), TEveShapeEditor::TEveShapeEditor(), TEveTextEditor::TEveTextEditor(), TEveTrackEditor::TEveTrackEditor(), TEveTrackListEditor::TEveTrackListEditor(), TEveTrackPropagatorEditor::TEveTrackPropagatorEditor(), TEveTrackPropagatorSubEditor::TEveTrackPropagatorSubEditor(), TEveTransEditor::TEveTransEditor(), TEveTransSubEditor::TEveTransSubEditor(), TEveViewerListEditor::TEveViewerListEditor(), TEveWindowEditor::TEveWindowEditor(), TEveWindowSlot::TEveWindowSlot(), TGColorDialog::TGColorDialog(), TGComboBox::TGComboBox(), TGeoCtubEditor::TGeoCtubEditor(), TGeoGtraEditor::TGeoGtraEditor(), TGeoPgonEditor::TGeoPgonEditor(), TGFileDialog::TGFileDialog(), TGHtmlBrowser::TGHtmlBrowser(), TGLAutoRotator::TGLAutoRotator(), TGLClipSetEditor::TGLClipSetEditor(), TGLClipSetSubEditor::TGLClipSetSubEditor(), TGListView::TGListView(), TGSplitButton::TGSplitButton(), TGuiBldBorderFrame(), TGuiBldEditor::TGuiBldEditor(), TGuiBldHintsEditor::TGuiBldHintsEditor(), TGuiBldHintsManager(), TNewChainDlg::TNewChainDlg(), TRootBrowser::TRootBrowser(), TRootGuiBuilder::TRootGuiBuilder(), TStructViewerGUI::TStructViewerGUI(), TStyleDialog::TStyleDialog(), TUploadDataSetDlg::TUploadDataSetDlg(), TFitEditor::UpdateGUI(), TSessionViewer::UpdateListOfProofs(), and TGSplitFrame::VSplit().

Bool_t TQObject::Connect ( TQObject sender,
const char *  signal,
const char *  cl,
void receiver,
const char *  slot 
)
static

Create connection between sender and receiver.

Signal and slot string must have a form: "Draw(char*, Option_t* ,Int_t)" All blanks and "const" words will be removed,

cl != 0 - class name, it can be class with or without dictionary, e.g interpreted class. Example:

TGButton *myButton;
TH2F *myHist;
TQObject::Connect(myButton,"Clicked()",
"TH2F", myHist,"Draw(Option_t*)");

cl == 0 - corresponds to function (interpereted or global) the name of the function is defined by the slot string, parameter receiver should be 0. Example:

TGButton *myButton;
TH2F *myHist;
TQObject::Connect(myButton,"Clicked()",
0, 0,"hsimple()");

Warning: If receiver is class not derived from TQObject and going to be deleted, disconnect all connections to this receiver. In case of class derived from TQObject it is done automatically.

Definition at line 969 of file TQObject.cxx.

Bool_t TQObject::Connect ( const char *  class_name,
const char *  signal,
const char *  cl,
void receiver,
const char *  slot 
)
static

This method allows to make a connection from any object of the same class to a single slot.

Signal and slot string must have a form: "Draw(char*, Option_t* ,Int_t)" All blanks and "const" words will be removed,

cl != 0 - class name, it can be class with or without dictionary, e.g interpreted class. Example:

TGButton *myButton;
TH2F *myHist;
TQObject::Connect("TGButton", "Clicked()",
"TH2F", myHist, "Draw(Option_t*)");

cl == 0 - corresponds to function (interpereted or global) the name of the function is defined by the slot string, parameter receiver should be 0. Example:

TGButton *myButton;
TH2F *myHist;
TQObject::Connect("TGButton", "Clicked()",
0, 0, "hsimple()");

Warning:

If receiver class not derived from TQObject and going to be deleted, disconnect all connections to this receiver. In case of class derived from TQObject it is done automatically.

Definition at line 1061 of file TQObject.cxx.

virtual void TQObject::Connected ( const char *  )
inlinevirtual

Definition at line 151 of file TQObject.h.

Referenced by Connect(), and ConnectToClass().

Bool_t TQObject::ConnectToClass ( TQObject sender,
const char *  signal,
TClass cl,
void receiver,
const char *  slot 
)
staticprotected

Create connection between sender and receiver.

Receiver class needs to have a dictionary.

Definition at line 829 of file TQObject.cxx.

Referenced by Connect().

Bool_t TQObject::ConnectToClass ( const char *  class_name,
const char *  signal,
TClass cl,
void receiver,
const char *  slot 
)
staticprotected

This method allows to make connection from any object of the same class to the receiver object.

Receiver class needs to have a dictionary.

Definition at line 885 of file TQObject.cxx.

virtual void TQObject::Destroyed ( )
inlinevirtual

Reimplemented in TQConnection.

Definition at line 154 of file TQObject.h.

Referenced by ~TQObject().

Bool_t TQObject::Disconnect ( const char *  signal = 0,
void receiver = 0,
const char *  slot = 0 
)

Disconnects signal of this object from slot of receiver.

Equivalent to Disconnect(this, signal, receiver, slot)

Definition at line 1293 of file TQObject.cxx.

Referenced by TGuiBldDragManager::ChangeBackgroundColor(), TGuiBldDragManager::ChangeBarColor(), TGuiBldDragManager::ChangeProperties(), TGuiBldNameFrame::ChangeSelected(), TGuiBldDragManager::ChangeTextColor(), TGuiBldDragManager::ChangeTextFont(), TRootBrowser::CloseTabs(), TSessionLogView::CloseWindow(), TGTextEditor::CloseWindow(), TRootBrowser::CloseWindow(), TGeoTubeSegEditor::ConnectSignals2Slots(), TGeoConeSegEditor::ConnectSignals2Slots(), TGuiBldDragManager::DeletePropertyEditor(), TGTextEditor::DeleteWindow(), TProofProgressDialog::DisableAsyn(), TGLSAViewer::DisableMenuBarHiding(), TEveViewerList::Disconnect(), Disconnect(), TStyleManager::DisconnectAll(), TStyleManager::DisconnectEditor(), TGedEditor::DisconnectFromCanvas(), TGeoManagerEditor::DisconnectSelected(), TEveGListTreeEditorFrame::DisconnectSignals(), TFitParametersDialog::DisconnectSlots(), TFitEditor::DisconnectSlots(), TH1Editor::DoAddBar(), TH1Editor::DoAddSimple(), TStyleManager::DoEditionUpdatePreview(), TFitEditor::DoFit(), TFunctionParametersDialog::DoFix(), TH1Editor::DoHistChanges(), TH1Editor::DoHistSimple(), TProofProgressLog::DoLog(), TFitParametersDialog::DoParFix(), TStyleManager::DoPreview(), TStyleManager::DoPreviewClosed(), TFunctionParametersDialog::DoReset(), TFitParametersDialog::DoReset(), TFitEditor::DoSetParameters(), TGuiBldDragManager::HandleClientMessage(), TGSplitButton::HandleMenu(), TGLSAViewer::HandleMenuBarHiding(), TFitEditor::Hide(), TRootBrowserLite::HideTextEdit(), TProofProgressDialog::IndicateStop(), TSessionQueryFrame::IndicateStop(), TGMenuBar::Layout(), TGMenuBar::PopupConnection(), TProofProgressDialog::Progress(), TRootCanvas::ReallyDelete(), TProofChain::ReleaseProof(), TGButtonGroup::Remove(), TRootBrowser::RemoveTab(), TCurlyLineEditor::SetModel(), TGSplitButton::SetSplit(), TTimer::Start(), TRecorderRecording::Stop(), TFitEditor::Terminate(), TTimer::TurnOn(), TFitEditor::UpdateGUI(), TDrawFeedback::~TDrawFeedback(), TEveCompositeFrameInMainFrame::~TEveCompositeFrameInMainFrame(), TFitEditor::~TFitEditor(), TGColorDialog::~TGColorDialog(), TGContainer::~TGContainer(), TGedEditor::~TGedEditor(), TGFileBrowser::~TGFileBrowser(), TGFileDialog::~TGFileDialog(), TGTextEdit::~TGTextEdit(), TGTextEditor::~TGTextEditor(), TProofProgressDialog::~TProofProgressDialog(), TProofProgressLog::~TProofProgressLog(), TQClass::~TQClass(), TQObjSender::~TQObjSender(), TRecorderReplaying::~TRecorderReplaying(), TRootCanvas::~TRootCanvas(), TStatsFeedback::~TStatsFeedback(), and TStyleDialog::~TStyleDialog().

Bool_t TQObject::Disconnect ( TQObject sender,
const char *  signal = 0,
void receiver = 0,
const char *  slot = 0 
)
static

Disconnects signal in object sender from slot_method in object receiver.

For objects derived from TQObject signal-slot connection is removed when either of the objects involved are destroyed.

Disconnect() is typically used in three ways, as the following examples shows:

  • Disconnect everything connected to an object's signals:
    Disconnect(myObject);
  • Disconnect everything connected to a signal:
    Disconnect(myObject, "mySignal()");
  • Disconnect a specific receiver:
    Disconnect(myObject, 0, myReceiver, 0);

0 may be used as a wildcard in three of the four arguments, meaning "any signal", "any receiving object" or "any slot in the receiving object", respectively.

The sender has no default and may never be 0 (you cannot disconnect signals from more than one object).

If signal is 0, it disconnects receiver and slot_method from any signal. If not, only the specified signal is disconnected.

If receiver is 0, it disconnects anything connected to signal. If not, slots in objects other than receiver are not disconnected

If slot_method is 0, it disconnects anything that is connected to receiver. If not, only slots named slot_method will be disconnected, and all other slots are left alone. The slot_method must be 0 if receiver is left out, so you cannot disconnect a specifically-named slot on all objects.

Definition at line 1226 of file TQObject.cxx.

Bool_t TQObject::Disconnect ( const char *  class_name,
const char *  signal,
void receiver = 0,
const char *  slot = 0 
)
static

Disconnects "class signal".

The class is defined by class_name. See also Connect(class_name,signal,receiver,slot).

Definition at line 1274 of file TQObject.cxx.

virtual void TQObject::Disconnected ( const char *  )
inlinevirtual

Definition at line 152 of file TQObject.h.

void TQObject::Emit ( const char *  signal_name)

Acitvate signal without args.

Example: theButton->Emit("Clicked()");

Definition at line 559 of file TQObject.cxx.

Referenced by TSysEvtHandler::Activated(), TGPopupMenu::Activated(), TGLViewer::Activated(), TSysEvtHandler::Added(), TMessageHandler::Added(), TGFontDialog::AlignSelected(), TGColorSelect::AlphaColorSelected(), TGColorDialog::AlphaColorSelected(), TRootBrowserLite::BrowseObj(), TRootBrowser::BrowseObj(), TGHtml::ButtonClicked(), TGVFileSplitter::ButtonPressed(), TGVFileSplitter::ButtonReleased(), TGLLightSetSubEditor::Changed(), TEveGridStepperSubEditor::Changed(), TEveRGBAPaletteSubEditor::Changed(), TGLClipSetSubEditor::Changed(), TEveTrackPropagatorSubEditor::Changed(), TGeoPconSection::Changed(), ChangedBy(), TGuiBldEditor::ChangeSelected(), TRootBrowserLite::Checked(), TRootBrowser::Checked(), TGListTree::Checked(), TGHtml::CheckToggled(), TCanvas::Cleared(), TGButtonGroup::Clicked(), TGHtmlBrowser::Clicked(), TGLOverlayButton::Clicked(), TGToolBar::Clicked(), TGButton::Clicked(), TGTextView::Clicked(), TGContainer::Clicked(), TGListView::Clicked(), TGLViewer::Clicked(), TGListTree::Clicked(), TGMdiMainFrame::Close(), TGTextEdit::Closed(), TPad::Closed(), TCanvas::Closed(), TProof::CloseProgressDialog(), TGTab::CloseTab(), TRootBrowser::CloseTabs(), TGFontDialog::ColorSelected(), TGColorPalette::ColorSelected(), TGColorPick::ColorSelected(), TGColorSelect::ColorSelected(), TGColorDialog::ColorSelected(), TBonjourBrowser::CurrentBonjourRecordsChanged(), TQUndoManager::CurrentChanged(), TGContainer::CurrentChanged(), TGTextEntry::CursorOutDown(), TGTextEntry::CursorOutLeft(), TGTextEntry::CursorOutRight(), TGTextEntry::CursorOutUp(), TGTextView::DataChanged(), TGTextView::DataDropped(), TGListTree::DataDropped(), TSysEvtHandler::DeActivated(), TQConnection::Destroyed(), Destroyed(), TProof::DisableGoAsyn(), TGDockableFrame::Docked(), TGSplitFrame::Docked(), TRootBrowserLite::DoubleClicked(), TGTextView::DoubleClicked(), TGImageMap::DoubleClicked(), TGVFileSplitter::DoubleClicked(), TGContainer::DoubleClicked(), TRootBrowser::DoubleClicked(), TGListView::DoubleClicked(), TGTextEntry::DoubleClicked(), TGListBox::DoubleClicked(), TGLViewer::DoubleClicked(), TGListTree::DoubleClicked(), TGSplitter::DragStarted(), Emit(), TPad::EventPave(), TRootBrowserLite::ExecuteDefaultAction(), TRootBrowser::ExecuteDefaultAction(), TProof::Feedback(), TGTextEdit::FindAgain(), TGFontDialog::FontSelected(), TGMdiMainFrame::FrameClosed(), TGMdiMainFrame::FrameCreated(), TGMdiMainFrame::FrameMaximized(), TGMdiMainFrame::FrameMinimized(), TGMdiMainFrame::FrameRestored(), TGMdiMainFrame::FramesArranged(), TGMainFrame::HandleClientMessage(), TApplication::HandleIdleTimer(), TProof::HandleInputMessage(), TGToolTip::Hide(), TGPopupMenu::Highlighted(), TRootBrowserLite::IconBoxAction(), TGHtml::InputSelected(), TGNumberEntryField::InvalidInput(), TGContainer::InvertSelection(), TGSplitButton::ItemClicked(), TGContainer::KeyPressed(), TApplication::KeyPressed(), TGListTree::KeyPressed(), TGVFileSplitter::LayoutHeader(), TGVFileSplitter::LayoutListView(), TGSpeedo::LedClicked(), TApplication::LineProcessed(), TGTextView::Marked(), TGedMarkerSelect::MarkerSelected(), TGSplitButton::MBClicked(), TGSplitButton::MBPressed(), TGSplitButton::MBReleased(), Message(), TEveRGBAPalette::MinMaxValChanged(), TPad::Modified(), TGHtml::MouseDown(), TGLViewer::MouseIdle(), TGLViewer::MouseOver(), TGListTree::MouseOver(), TGHtml::MouseOver(), TGSplitter::Moved(), TSysEvtHandler::Notified(), TMessageHandler::Notified(), TGSpeedo::OdoClicked(), TSAXParser::OnCdataBlock(), TSAXParser::OnCharacters(), TSAXParser::OnComment(), TNewChainDlg::OnElementSelected(), TSAXParser::OnEndDocument(), TSAXParser::OnEndElement(), TSAXParser::OnError(), TSAXParser::OnFatalError(), TGImageMap::OnMouseOut(), TGImageMap::OnMouseOver(), TGContainer::OnMouseOver(), TSAXParser::OnStartDocument(), TSAXParser::OnStartElement(), TSAXParser::OnWarning(), TGTextEdit::Opened(), TGScrollBar::PageSizeChanged(), TEveParamList::ParamChanged(), TGedPatternSelect::PatternSelected(), TCanvas::Picked(), TGTripleVSlider::PointerPositionChanged(), TGTripleHSlider::PointerPositionChanged(), TEvePointSet::PointSelected(), TGPopupMenu::PoppedDown(), TGPopupMenu::PoppedUp(), TGSlider::PositionChanged(), TGDoubleSlider::PositionChanged(), TGScrollBar::PositionChanged(), TGButtonGroup::Pressed(), TGToolBar::Pressed(), TGSlider::Pressed(), TGButton::Pressed(), TGDoubleSlider::Pressed(), TProofLite::Process(), TGFrame::ProcessedConfigure(), TGEventHandler::ProcessedEvent(), TGClient::ProcessedEvent(), TCanvas::ProcessedEvent(), TGFrame::ProcessedEvent(), TProof::QueryResultReady(), TGHtml::RadioChanged(), TPad::RangeAxisChanged(), TGScrollBar::RangeChanged(), TPad::RangeChanged(), TMonitor::Ready(), TGLViewer::ReClicked(), TPad::RecordLatex(), TPad::RecordPave(), TBonjourResolver::RecordResolved(), TQCommand::Redo(), TGImageMap::RegionClicked(), TGClient::RegisteredWindow(), TGButtonGroup::Released(), TGToolBar::Released(), TGSlider::Released(), TGButton::Released(), TGDoubleSlider::Released(), TGLViewer::ReMouseOver(), TSysEvtHandler::Removed(), TMessageHandler::Removed(), TGTab::Removed(), TGToolTip::Reset(), TGComboBox::ReturnPressed(), TGContainer::ReturnPressed(), TApplication::ReturnPressed(), TGTextEntry::ReturnPressed(), TGListTree::ReturnPressed(), TGTextEdit::Saved(), TGTextEdit::SavedAs(), TEveTrack::SecSelected(), TEveDigitSet::SecSelected(), TGContainer::SelectAll(), TGShutterItem::Selected(), TGShutter::Selected(), TGTab::Selected(), TGComboBox::Selected(), TCanvas::Selected(), TGListBox::Selected(), TEveSelection::SelectionAdded(), TGListView::SelectionChanged(), TGListBox::SelectionChanged(), TEveSelection::SelectionCleared(), TEveSelection::SelectionRemoved(), TEveSelection::SelectionRepeated(), TBonjourRegistrar::ServiceRegistered(), TGMdiMainFrame::SetCurrent(), TGTextEntry::ShiftTabPressed(), TGToolTip::Show(), TGContainer::SpacePressed(), TPad::StartEditing(), TGHtml::SubmitClicked(), TGTextEntry::TabPressed(), TApplication::Terminate(), TGTextEntry::TextChanged(), TGSearchDialog::TextEntered(), TTimer::Timeout(), TGuiBldDragManager::TimerEvent(), TGButton::Toggled(), TEveTransSubEditor::TransChanged(), TTimer::TurnOff(), TTimer::TurnOn(), TGLViewer::UnClicked(), TQCommand::Undo(), TGDockableFrame::Undocked(), TGSplitFrame::Undocked(), TGLViewer::UnMouseOver(), TGContainer::UnSelectAll(), TStructNodeEditor::Update(), TProof::UpdateDialog(), TGuiBldEditor::UpdateSelected(), TEveTransSubEditor::UseTrans(), TGNumberEntry::ValueChanged(), TEveGValuator::ValueSet(), TEveGDoubleValuator::ValueSet(), TEveGTriVecValuator::ValueSet(), TGNumberEntry::ValueSet(), TEveWindowManager::WindowDeleted(), TEveWindowManager::WindowDocked(), TEveWindowManager::WindowSelected(), TEveWindowManager::WindowUndocked(), and TProof::~TProof().

void TQObject::Emit ( const char *  signal_name,
Long_t paramArr 
)

Emit a signal with a varying number of arguments, paramArr is an array of the parameters.

Note: any parameter should be converted to long type. Example:

TQObject *processor; // data processor
TH1F *hist; // filled with processor results
processor->Connect("Evaluated(Float_t,Float_t)",
"TH1F",hist,"Fill12(Axis_t,Axis_t)");
Long_t args[2];
args[0] = (Long_t)processor->GetValue(1);
args[1] = (Long_t)processor->GetValue(2);
processor->Emit("Evaluated(Float_t,Float_t)",args);

Definition at line 786 of file TQObject.cxx.

void TQObject::Emit ( const char *  signal_name,
const char *  params 
)

Activate signal with parameter text string.

Example:

myObject->Emit("Error(char*)","Fatal error");

Definition at line 731 of file TQObject.cxx.

void TQObject::Emit ( const char *  signal_name,
Double_t  param 
)

Activate signal with single parameter.

Example:

theButton->Emit("Scale(float)",factor)

Definition at line 688 of file TQObject.cxx.

void TQObject::Emit ( const char *  signal_name,
Long_t  param 
)

Activate signal with single parameter.

Example:

theButton->Emit("Clicked(int)",id)

Definition at line 602 of file TQObject.cxx.

void TQObject::Emit ( const char *  signal_name,
Long64_t  param 
)

Activate signal with single parameter.

Example:

theButton->Emit("Progress(Long64_t)",processed)

Definition at line 645 of file TQObject.cxx.

void TQObject::Emit ( const char *  signal,
Bool_t  param 
)
inline

Definition at line 112 of file TQObject.h.

void TQObject::Emit ( const char *  signal,
Char_t  param 
)
inline

Definition at line 114 of file TQObject.h.

void TQObject::Emit ( const char *  signal,
UChar_t  param 
)
inline

Definition at line 116 of file TQObject.h.

void TQObject::Emit ( const char *  signal,
Short_t  param 
)
inline

Definition at line 118 of file TQObject.h.

void TQObject::Emit ( const char *  signal,
UShort_t  param 
)
inline

Definition at line 120 of file TQObject.h.

void TQObject::Emit ( const char *  signal,
Int_t  param 
)
inline

Definition at line 122 of file TQObject.h.

void TQObject::Emit ( const char *  signal,
UInt_t  param 
)
inline

Definition at line 124 of file TQObject.h.

void TQObject::Emit ( const char *  signal,
ULong_t  param 
)
inline

Definition at line 126 of file TQObject.h.

void TQObject::Emit ( const char *  signal,
ULong64_t  param 
)
inline

Definition at line 128 of file TQObject.h.

void TQObject::Emit ( const char *  signal,
Float_t  param 
)
inline

Definition at line 130 of file TQObject.h.

template<typename... T>
void TQObject::EmitVA ( const char *  signal_name,
Int_t  ,
const T &...  params 
)
inline
void TQObject::EmitVA ( const char *  signal,
Int_t  nargs,
va_list  va 
)
delete
TList * TQObject::GetListOfClassSignals ( ) const

Returns pointer to list of signals of this class.

Definition at line 433 of file TQObject.cxx.

TList* TQObject::GetListOfConnections ( ) const
inline

Definition at line 95 of file TQObject.h.

TList* TQObject::GetListOfSignals ( ) const
inline
virtual void* TQObject::GetSender ( )
inlineprotectedvirtual
virtual const char* TQObject::GetSenderClassName ( ) const
inlineprotectedvirtual

Reimplemented in TQObjSender.

Definition at line 65 of file TQObject.h.

Referenced by CheckConnectArgs().

Bool_t TQObject::HasConnection ( const char *  signal_name) const
virtual

Return true if there is any object connected to this signal.

Only checks for object signals.

Definition at line 523 of file TQObject.cxx.

void TQObject::HighPriority ( const char *  signal_name,
const char *  slot_name = 0 
)
virtual
  1. If slot_name = 0 => makes signal defined by the signal_name to be the first in the fListOfSignals, this decreases the time for lookup.
  2. If slot_name != 0 => makes slot defined by the slot_name to be executed first when signal_name is emitted. Signal name is not compressed.

Definition at line 475 of file TQObject.cxx.

void TQObject::LowPriority ( const char *  signal_name,
const char *  slot_name = 0 
)
virtual
  1. If slot_name = 0 => makes signal defined by the signal_name to be the last in the fListOfSignals, this increase the time for lookup.
  2. If slot_name != 0 => makes slot defined by the slot_name to be executed last when signal_name is emitted. Signal name is not compressed.

Definition at line 501 of file TQObject.cxx.

virtual void TQObject::Message ( const char *  msg)
inlinevirtual

Reimplemented in TTreeViewer.

Definition at line 158 of file TQObject.h.

Int_t TQObject::NumberOfConnections ( ) const
virtual

Return number of connections for this object.

Definition at line 547 of file TQObject.cxx.

Int_t TQObject::NumberOfSignals ( ) const
virtual

Return number of signals for this object.

Only checks for object signals.

Definition at line 537 of file TQObject.cxx.

TQObject& TQObject::operator= ( const TQObject tqo)
private

Friends And Related Function Documentation

friend class TQConnection
friend

Definition at line 55 of file TQObject.h.

Referenced by Connect(), ConnectToClass(), and TQCommand::TQCommand().

Member Data Documentation

Bool_t TQObject::fgAllSignalsBlocked = kFALSE
staticprotected

flag used for suppression of signals

Definition at line 62 of file TQObject.h.

Referenced by AreAllSignalsBlocked(), BlockAllSignals(), Emit(), and EmitVA().

TList* TQObject::fListOfConnections
protected

list of signals from this object

Definition at line 59 of file TQObject.h.

Referenced by GetListOfConnections(), NumberOfConnections(), TQObject(), and ~TQObject().

TList* TQObject::fListOfSignals
protected
Bool_t TQObject::fSignalsBlocked
protected

list of connections to this object

Definition at line 60 of file TQObject.h.

Referenced by AreSignalsBlocked(), BlockSignals(), Emit(), EmitVA(), and TQObject().


The documentation for this class was generated from the following files: